2024-12-25 03:04:59 +00:00
< ? php
2025-04-23 07:41:34 +00:00
use yii\helpers\Url ;
use yii\helpers\Html ;
use kartik\select2\Select2 ;
2024-12-25 03:04:59 +00:00
use common\models\ConstRace ;
use common\models\ConstWard ;
2025-04-23 07:41:34 +00:00
use yii\helpers\ArrayHelper ;
use yii\widgets\MaskedInput ;
use common\models\ConstOrgan ;
use common\models\ConstDoctor ;
use common\models\ConstRights ;
2024-12-25 03:04:59 +00:00
use common\models\SurgicalImg ;
2025-04-23 07:41:34 +00:00
use yii\bootstrap5\ActiveForm ;
use common\models\PatientTitle ;
use common\models\ConstHospital ;
2024-12-25 03:04:59 +00:00
use dosamigos\ckeditor\CKEditor ;
2025-04-23 07:41:34 +00:00
use common\models\ConstNationality ;
2024-12-25 03:04:59 +00:00
use kartik\datetime\DateTimePicker ;
2025-04-23 07:41:34 +00:00
use common\models\SurgicalDiagnosis ;
use common\models\ConstCancerRegistry ;
2025-04-25 08:51:33 +00:00
use common\models\ConstOrganCode ;
2024-12-25 03:04:59 +00:00
$this -> title = Html :: encode ( 'Surgical Revised Report : ' . $model -> id_case . ' - ' . isset ( $model -> surgical ) ? $model -> surgical -> getFullname () : '' );
$this -> params [ 'breadcrumbs' ][] = [ 'label' => Html :: encode ( $model -> id_case ), 'url' => [ 'surgical' , 'id_case' => $model -> id_case ]];
$this -> params [ 'breadcrumbs' ][] = $this -> title ;
?>
< ? = $this -> render ( '_all_report_surgical' , [
'dataProviderReport' => $dataProviderReport ,
'case_surgical' => $case_surgical
]) ?>
< ? php $form = ActiveForm :: begin ([
2025-04-23 07:41:34 +00:00
'id' => 'diagnosis-form' ,
2025-03-21 05:07:24 +00:00
//'options' => ['onsubmit' => 'handleFormSubmit(event)'] // ไม่คืนค่าจาก function
2024-12-25 03:04:59 +00:00
]) ?>
2025-04-23 07:41:34 +00:00
< ? = $this -> render ( '_patient_surgical_form' , [
2024-12-25 03:04:59 +00:00
'form' => $form ,
'case_surgical' => $case_surgical
2025-04-23 07:41:34 +00:00
]) ?>
2024-12-25 03:04:59 +00:00
2025-04-23 07:41:34 +00:00
< div class = " card mt-4 " >
2024-12-25 03:04:59 +00:00
< div class = " card-header " >
2025-04-23 07:41:34 +00:00
< h5 class = " card-title " >< i class = " ri-user-add-line " ></ i > พยาธิแพทย์ ( Pathologist ) </ h5 >
2024-12-25 03:04:59 +00:00
</ div >
< div class = " card-body " >
2025-04-23 07:41:34 +00:00
< ? = $form -> errorSummary ( $case_surgical ) ?>
2024-12-25 03:04:59 +00:00
< ? php if ( ! empty ( $case_surgical -> files )) { ?>
2025-04-25 08:51:33 +00:00
< h6 >< i class = " ri-file-text-line " ></ i > ใบส่งตรวจ ( Request ) </ h6 >
< ul >
< ? php
2025-04-23 07:41:34 +00:00
foreach ( $case_surgical -> getFiles () as $file => $val ) {
?>
2025-04-25 08:51:33 +00:00
< li >< ? = Html :: a ( $val , Yii :: getAlias ( '@web' ) . '/uploads/surgical/file/' . $val , [ 'target' => '_blank' ]); ?>
</ li >
< ? php } ?>
</ ul >
2024-12-25 03:04:59 +00:00
< ? php } ?>
< div class = " row " >
< ? php
$directoryPath = Yii :: getAlias ( '@webroot' ) . '/uploads/surgical/gross/' . $case_surgical -> id_case ;
if ( is_dir ( $directoryPath )) {
$files = \yii\helpers\FileHelper :: findFiles ( $directoryPath );
if ( ! empty ( $files )) {
foreach ( $files as $index => $file ) {
$nameFicheiro = basename ( $file );
$filePath = Yii :: getAlias ( '@web' ) . '/uploads/surgical/gross/' . $case_surgical -> id_case . '/' . $nameFicheiro ;
echo " <div class= \" col-md-2 \" > " . Html :: a ( Html :: img ( $filePath , [ 'class' => 'img-fluid' ]), $filePath , [ 'target' => '_blank' ]) . " </div> " ;
}
}
}
?>
</ div >
2025-04-23 07:41:34 +00:00
< ? php
$surgical_img = SurgicalImg :: find () -> where ([ 'id_case' => $case_surgical -> id_case ]) -> all ();
if ( $surgical_img ) { ?>
2025-04-25 08:51:33 +00:00
< h6 >< i class = " ri-image-2-line " ></ i > รูปภาพชิ้นเนื้อ </ h6 >
< ? php foreach ( $surgical_img as $item ) { ?>
< div style = " width: 250px " >
< ? = Html :: a ( Html :: img ( Yii :: getAlias ( '@web' ) . '/uploads/surgical/img/' . $item -> file_path , [ 'class' => 'img-fluid' ]), Yii :: getAlias ( '@web' ) . '/uploads/surgical/img/' . $item -> file_path , [ 'target' => '_blank' ]) ?>
</ div >
< ? php } ?>
2025-04-23 07:41:34 +00:00
< ? php } ?> <br />
2024-12-25 03:04:59 +00:00
< ? php if ( ! empty ( $case_surgical -> gross_img )) { ?>
2025-04-25 08:51:33 +00:00
< h5 >< i class = " ri-image-2-fill " ></ i > Gross Image </ h5 >
< div style = " width: 250px " >< ? = $case_surgical -> getGrossImgs () ?> </div><br />
2024-12-25 03:04:59 +00:00
< ? php } ?>
2025-04-23 07:41:34 +00:00
< div class = " row " >
< div class = " col-md-3 " >
< ? = $form -> field ( $case_surgical , 'cancer_registry_id' ) -> widget ( Select2 :: class , [
'data' => ArrayHelper :: map ( ConstCancerRegistry :: find () -> orderBy ([ 'name' => SORT_ASC ]) -> all (), 'id' , 'name' ), //->where('id > 1')
'theme' => Select2 :: THEME_BOOTSTRAP ,
'pluginOptions' => [
'allowClear' => true ,
'placeholder' => 'เลือก Cancer Registry...'
],
]) ?>
</ div >
< div class = " col-md-4 " >
< ? = $form -> field ( $model , 'organ_id' ) -> widget ( Select2 :: class , [
'data' => ArrayHelper :: map ( ConstOrgan :: find () -> orderBy ([ 'name' => SORT_ASC ]) -> all (), 'id' , 'name' ), //->where('id > 1')
'theme' => Select2 :: THEME_BOOTSTRAP ,
'pluginOptions' => [
'allowClear' => true ,
'placeholder' => 'เลือก Cons...'
],
]) ?>
</ div >
< div class = " col-md-3 " >< ? = $form -> field ( $model , 'organ_remark' ) ?> </div>
< div class = " col-md-2 " >
2025-04-25 08:51:33 +00:00
< ? = $form -> field ( $model , 'organ_code' ) -> widget ( Select2 :: class , [
'data' => ArrayHelper :: map ( ConstOrganCode :: find () -> orderBy ([ 'code' => SORT_ASC ]) -> all (), 'id' , function ( $model ) {
return $model -> code . ' - ' . ' (' . $model -> price . ')' ;
}),
'theme' => Select2 :: THEME_BOOTSTRAP ,
'pluginOptions' => [
'allowClear' => true ,
'placeholder' => 'เลือก Organ Code...'
],
2025-04-23 07:41:34 +00:00
]) ?>
2024-12-25 03:04:59 +00:00
</ div >
</ div >
2025-04-25 08:51:33 +00:00
< h6 class = " mt-4 " >< strong > Pathological Diagnosis </ strong ></ h6 >
< ? = $form -> field ( $model , 'diagnosis' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
'preset' => 'custom' ,
//'options' => ['id' => 'microscopic_description_editor'],
'clientOptions' => [
'height' => 200 ,
'removePlugins' => 'scayt' ,
'disableNativeSpellChecker' => false ,
'extraPlugins' => 'font,justify,colorbutton,iframe,dialogadvtab,liststyle' ,
'removeButtons' => 'Source,Save,NewPage,Preview,Print,Templates,Find,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CopyFormatting,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,Replace,Snippet' ,
'toolbarGroups' => [
[ 'name' => 'clipboard' , 'groups' => [ 'undo' , 'redo' , 'cut' , 'copy' , 'paste' , 'clipboard' ]],
[ 'name' => 'styles' , 'groups' => [ 'font' ]],
[ 'name' => 'colors' , 'groups' => [ 'TextColor' , 'BGColor' ]],
[ 'name' => 'basicstyles' , 'groups' => [ 'basicstyles' , 'cleanup' ]],
[ 'name' => 'paragraph' , 'groups' => [ 'list' , 'align' , 'bidi' , 'paragraph' ]],
[ 'name' => 'editing' , 'groups' => [ 'find' , 'selection' , /*'spellchecker'*/ ]],
//['name' => 'tools', 'groups' => ['dialogadvtab', 'devtools', 'div']],
[ 'name' => 'insert' , 'groups' => [ 'table' , 'specialchar' ]],
//['name' => 'tools', 'groups' => ['maximize']],
],
]
]) ?>
< ? php $this -> registerJs ( "
$ ( '#checkDiagButton' ) . on ( 'click' , function ( event ) {
event . preventDefault ();
var text = CKEDITOR . instances [ 'surgicaldiagnosis-diagnosis' ] . getData ();
$ . ajax ({
url : '" . Url::to([' / site / spell - checker ']) . "' ,
type : 'POST' ,
data : { text : text },
//dataType: 'json',
success : function ( data ) {
//highlightMisspelledWords(data);
$ ( '#misspelledDiagWords' ) . html ( data );
}
});
});
" ) ?>
< div id = " misspelledDiagWords " ></ div >
< ? = Html :: button ( '<i class="ri-list-check-3"></i> Check Spelling' , [ 'id' => 'checkDiagButton' , 'class' => 'btn btn-warning' ]) ?>
< ? = Html :: button ( '<i class="ri-file-text-line"></i> Diagnosis Template' , [ 'class' => 'btn btn-info activity-select-diagnosis-template' , 'data' => [ 'bs-toggle' => 'modal' , 'bs-target' => '#activity-modal-diagnosis' ]]) ?>
< h6 class = " mt-3 " >< strong > Specimen And Clinical Information </ strong ></ h6 >
2024-12-25 03:04:59 +00:00
2025-04-23 07:41:34 +00:00
< ? = $form -> field ( $case_surgical , 'clinical_diagnosis' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
2024-12-25 03:04:59 +00:00
'preset' => 'custom' ,
'clientOptions' => [
'height' => 150 ,
'removePlugins' => 'scayt' ,
'disableNativeSpellChecker' => false ,
'extraPlugins' => 'font,justify,colorbutton,iframe,dialogadvtab,liststyle' ,
'removeButtons' => 'Source,Save,NewPage,Preview,Print,Templates,Find,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CopyFormatting,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,Table,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,Replace,Snippet' ,
'toolbarGroups' => [
[ 'name' => 'clipboard' , 'groups' => [ 'undo' , 'redo' , 'cut' , 'copy' , 'paste' , 'clipboard' ]],
[ 'name' => 'styles' , 'groups' => [ 'font' ]],
[ 'name' => 'colors' , 'groups' => [ 'TextColor' , 'BGColor' ]],
[ 'name' => 'basicstyles' , 'groups' => [ 'basicstyles' , 'cleanup' ]],
[ 'name' => 'paragraph' , 'groups' => [ 'list' , 'align' , 'bidi' , 'paragraph' ]],
[ 'name' => 'editing' , 'groups' => [ 'find' , 'selection' , /*'spellchecker'*/ ]],
//['name' => 'tools', 'groups' => ['dialogadvtab', 'devtools', 'div']],
[ 'name' => 'insert' , 'groups' => [ 'specialchar' ]],
//['name' => 'tools', 'groups' => ['maximize']],
],
]
]) ?>
2025-04-25 08:51:33 +00:00
< h6 class = " mb-3 " >< strong > Gross Description </ strong ></ h6 >
2024-12-25 03:04:59 +00:00
< div class = " mb-3 " >
2025-04-23 07:41:34 +00:00
< ? = $form -> field ( $model , 'gross_description' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
2024-12-25 03:04:59 +00:00
'preset' => 'custom' ,
2025-04-23 07:41:34 +00:00
//'options' => ['id' => 'surgicaldiagnosis-gross_description'],
2024-12-25 03:04:59 +00:00
'clientOptions' => [
'height' => 150 ,
'removePlugins' => 'scayt' ,
'disableNativeSpellChecker' => false ,
'extraPlugins' => 'font,justify,colorbutton,iframe,dialogadvtab,liststyle' ,
'removeButtons' => 'Source,Save,NewPage,Preview,Print,Templates,Find,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CopyFormatting,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,Table,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,Replace,Snippet' ,
'toolbarGroups' => [
[ 'name' => 'clipboard' , 'groups' => [ 'undo' , 'redo' , 'cut' , 'copy' , 'paste' , 'clipboard' ]],
[ 'name' => 'styles' , 'groups' => [ 'font' ]],
[ 'name' => 'colors' , 'groups' => [ 'TextColor' , 'BGColor' ]],
[ 'name' => 'basicstyles' , 'groups' => [ 'basicstyles' , 'cleanup' ]],
[ 'name' => 'paragraph' , 'groups' => [ 'list' , 'align' , 'bidi' , 'paragraph' ]],
[ 'name' => 'editing' , 'groups' => [ 'find' , 'selection' , /*'spellchecker'*/ ]],
//['name' => 'tools', 'groups' => ['dialogadvtab', 'devtools', 'div']],
[ 'name' => 'insert' , 'groups' => [ 'specialchar' ]],
//['name' => 'tools', 'groups' => ['maximize']],
],
]
]) ?>
</ div >
2025-04-23 07:41:34 +00:00
< ? php $this -> registerJs ( "
$ ( '#checkGrossButton' ) . on ( 'click' , function ( event ) {
event . preventDefault ();
var text = CKEDITOR . instances [ 'surgicaldiagnosis-gross_description' ] . getData ();
$ . ajax ({
url : '" . Url::to([' / site / spell - checker ']) . "' ,
type : 'POST' ,
data : { text : text },
//dataType: 'json',
success : function ( data ) {
//highlightMisspelledWords(data);
$ ( '#misspelledGrossWords' ) . html ( data );
}
});
});
" ) ?>
< div id = " misspelledGrossWords " ></ div >
< ? = Html :: button ( '<i class="ri-list-check-3"></i> Check Spelling' , [ 'id' => 'checkGrossButton' , 'class' => 'btn btn-warning' ]) ?>
2024-12-25 03:04:59 +00:00
< ? = Html :: button ( '<i class="ri-file-text-line"></i> Gross Template' , [ 'class' => 'btn btn-info activity-select-gross-template' , 'data' => [ 'bs-toggle' => 'modal' , 'bs-target' => '#activity-modal-gross' ]]) ?>
2025-04-23 07:41:34 +00:00
< ? php if ( ! empty ( $case_surgical -> gross_description )) { ?>
2025-04-25 08:51:33 +00:00
<!--
2025-04-23 07:41:34 +00:00
< div class = " gross-description " >
< ? php // \yii\helpers\HtmlPurifier::process($case_surgical->gross_description)
?>
</ div >< br />
-->
2025-04-25 08:51:33 +00:00
< div class = " gorss-by mt-4 " >
< i class = " ri-edit-box-line " ></ i > Write gross
by : < ? = isset ( $case_surgical -> gross ) ? Html :: encode ( $case_surgical -> gross -> realname ) : '' ?>
at : < ? = $case_surgical -> gross_at ?>
2025-04-23 07:41:34 +00:00
2025-04-25 08:51:33 +00:00
< ? php if ( isset ( $case_surgical -> cut )) { ?>
Cut by : < ? = $case_surgical -> cut -> report_name ?>
< ? php } ?>
2024-12-25 03:04:59 +00:00
2025-04-25 08:51:33 +00:00
< ? php if ( isset ( $case_surgical -> write )) { ?>
Write by : < ? = $case_surgical -> write -> report_name ?>
< ? php } ?>
2024-12-25 03:04:59 +00:00
2025-04-25 08:51:33 +00:00
</ div >
<!--
2025-04-23 07:41:34 +00:00
< br >
2025-04-25 08:51:33 +00:00
< h5 class = " mt-4 " >< span data - feather = " image " style = " width: 17px; margin-bottom: 4px; " ></ span > Gross Image
</ h5 >
< ? php /* if ( ! empty ( $case_surgical -> gross_img )) { ?>
2024-12-25 03:04:59 +00:00
2025-04-25 08:51:33 +00:00
< ? = $case_surgical -> getGrossImgs () ?>
< ? php } ?>
< div class = " row " >
< ? php
if ( is_dir ( Yii :: getAlias ( '@webroot' ) . '/GrossPhoto/' . $case_surgical -> id_case )) {
$files = \yii\helpers\FileHelper :: findFiles ( Yii :: getAlias ( '@webroot' ) . '/GrossPhoto/' . $case_surgical -> id_case );
if ( isset ( $files [ 0 ])) {
foreach ( $files as $index => $file ) {
$nameFicheiro = substr ( $file , strrpos ( $file , '\\' ) + 1 );
echo " <div class= \" col-md-2 \" > " . ( Html :: a ( Html :: img ( Yii :: getAlias ( '@web' ) . '/GrossPhoto/' . $case_surgical -> id_case . '/' . $nameFicheiro , [ 'class' => 'img-fluid' ]), Url :: base () . '/GrossPhoto/' . $case_surgical -> id_case . '/' . $nameFicheiro , [ 'target' => '_blank' ])) . " </div> " ; // render do ficheiro no browser
}
}
}
*/ ?>
</ div >
-->
< br >
< ? php // Html::a('<span class="fa fa-refresh"></span> Reject Gross', ['order/surgical-gross-reject', 'id_case' => $case_surgical->id_case, 'report_type' => $model->report_type, 'id' => $model->id], ['class' => 'btn btn-danger', 'name' => 'surgical', 'value' => 'reject-gross'])
?>
2025-04-23 07:41:34 +00:00
< ? php } ?>
2024-12-25 03:04:59 +00:00
2025-04-25 08:51:33 +00:00
< h6 class = " mt-4 " >< strong > Microscopic Description </ strong ></ h6 >
2025-04-23 07:41:34 +00:00
< ? = $form -> field ( $model , 'is_no_microscopic' ) -> checkbox () ?>
2024-12-25 03:04:59 +00:00
< div class = " mb-3 " >
2025-04-23 07:41:34 +00:00
< ? = $form -> field ( $model , 'microscopic_description' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
2024-12-25 03:04:59 +00:00
'preset' => 'custom' ,
2025-04-23 07:41:34 +00:00
//'options' => ['id' => 'microscopic_description_editor'],
2024-12-25 03:04:59 +00:00
'clientOptions' => [
'height' => 200 ,
'removePlugins' => 'scayt' ,
'disableNativeSpellChecker' => false ,
'extraPlugins' => 'font,justify,colorbutton,iframe,dialogadvtab,liststyle' ,
2025-04-23 07:41:34 +00:00
'removeButtons' => 'Source,Save,NewPage,Preview,Print,Templates,Find,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CopyFormatting,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,Replace,Snippet' ,
2024-12-25 03:04:59 +00:00
'toolbarGroups' => [
[ 'name' => 'clipboard' , 'groups' => [ 'undo' , 'redo' , 'cut' , 'copy' , 'paste' , 'clipboard' ]],
[ 'name' => 'styles' , 'groups' => [ 'font' ]],
[ 'name' => 'colors' , 'groups' => [ 'TextColor' , 'BGColor' ]],
[ 'name' => 'basicstyles' , 'groups' => [ 'basicstyles' , 'cleanup' ]],
[ 'name' => 'paragraph' , 'groups' => [ 'list' , 'align' , 'bidi' , 'paragraph' ]],
[ 'name' => 'editing' , 'groups' => [ 'find' , 'selection' , /*'spellchecker'*/ ]],
//['name' => 'tools', 'groups' => ['dialogadvtab', 'devtools', 'div']],
2025-04-23 07:41:34 +00:00
[ 'name' => 'insert' , 'groups' => [ 'table' , 'specialchar' ]],
2024-12-25 03:04:59 +00:00
//['name' => 'tools', 'groups' => ['maximize']],
],
]
]) ?>
</ div >
2025-04-23 07:41:34 +00:00
< div id = " misspelledMicroWords " ></ div >
< ? php $this -> registerJs ( "
$ ( '#checkMicroButton' ) . on ( 'click' , function ( event ) {
event . preventDefault ();
var text = CKEDITOR . instances [ 'surgicaldiagnosis-microscopic_description' ] . getData ();
$ . ajax ({
url : '" . Url::to([' / site / spell - checker ']) . "' ,
type : 'POST' ,
data : { text : text },
//dataType: 'json',
success : function ( data ) {
//highlightMisspelledWords(data);
$ ( '#misspelledMicroWords' ) . html ( data );
}
});
});
" ) ?>
< ? = Html :: button ( '<i class="ri-list-check-3"></i> Check Spelling' , [ 'id' => 'checkMicroButton' , 'class' => 'btn btn-warning' ]) ?>
< ? = Html :: button ( '<i class="ri-file-text-line"></i> Microscopic Template' , [ 'class' => 'btn btn-info activity-select-microscopic-template' , 'data' => [ 'bs-toggle' => 'modal' , 'bs-target' => '#activity-modal-microscopic' ]]) ?>
< ? = Html :: submitButton ( '<i class="ri-image-add-fill"></i> เพิ่มรูปภาพ Micro' , [ 'class' => 'btn btn-danger' , 'value' => 'micro' , 'name' => 'surgical' ]) ?>
2025-04-25 08:51:33 +00:00
< h6 class = " mt-3 " >< strong > Previous </ strong ></ h6 >
< ? = $form -> field ( $case_surgical , 'previous_description' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
'preset' => 'custom' ,
'clientOptions' => [
'height' => 150 ,
'removePlugins' => 'scayt' ,
'disableNativeSpellChecker' => false ,
'extraPlugins' => 'font,justify,colorbutton,iframe,dialogadvtab,liststyle' ,
'removeButtons' => 'Source,Save,NewPage,Preview,Print,Templates,Find,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CopyFormatting,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,Table,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,Replace,Snippet,Font,TextColor,BGColor' ,
'toolbarGroups' => [
[ 'name' => 'clipboard' , 'groups' => [ 'undo' , 'redo' , 'cut' , 'copy' , 'paste' , 'clipboard' ]],
[ 'name' => 'basicstyles' , 'groups' => [ 'basicstyles' , 'cleanup' ]],
[ 'name' => 'paragraph' , 'groups' => [ 'list' , 'align' , 'bidi' , 'paragraph' ]],
[ 'name' => 'editing' , 'groups' => [ 'find' , 'selection' , /*'spellchecker'*/ ]],
//['name' => 'tools', 'groups' => ['dialogadvtab', 'devtools', 'div']],
[ 'name' => 'insert' , 'groups' => [ 'specialchar' ]],
//['name' => 'tools', 'groups' => ['maximize']],
],
]
2024-12-25 03:04:59 +00:00
]) ?>
2025-04-23 07:41:34 +00:00
< div class = " mt-4 " ></ div >
< ? = $this -> render ( '_coder_surgical_form' , [
'form' => $form ,
'model' => $model ,
]) ?>
2024-12-25 03:04:59 +00:00
< h6 class = " mt-4 " > Critical Diagnosis </ h6 >
< ? = $form -> field ( $model , 'is_critical_diagnosis' ) -> checkbox ([
'labelOptions' => [
'style' => 'color:red'
]
]) ?>
2025-04-25 08:51:33 +00:00
<!--< h6 class = " mt-4 " > Co Pathlogist </ h6 >
< ? php /* $form -> field ( $model , 'is_co_pathologist' ) -> checkbox () ?>
< ? php $this -> registerJs ( "
$ ( \ " input[name=' " . Html :: getInputName ( $model , 'is_co_pathologist' ) . " '] \" ).change(function() {
if ( this . checked == true ){
$ ( '.is_co_pathologist' ) . show ();
} else {
$ ( '.is_co_pathologist' ) . hide ();
}
});
" ) ?>
< div class = " is_co_pathologist "
< ? = ! $model -> isNewRecord && $model -> is_co_pathologist ? '' : 'style="display: none;"' ?> >
< div class = " col-md-3 " >
< ? = $form -> field ( $model , 'co_pathologist_id' ) -> label ( false ) -> widget ( Select2 :: class , [
'data' => ArrayHelper :: map ( User :: find () -> where ([ 'role' => 'pathologist' , 'status' => 10 ]) -> orderBy ([ 'realname' => SORT_DESC ]) -> all (), 'id' , 'realname' ),
'theme' => Select2 :: THEME_BOOTSTRAP ,
'pluginOptions' => [
'allowClear' => true ,
'placeholder' => 'เลือก Co Pathologist...'
]
]) */ ?>
</ div >
</ div >-->
< ? = $this -> render ( '_is_ca_confirm' , [
'form' => $form ,
'model' => $model ,
]) ?>
2024-12-25 03:04:59 +00:00
< div class = " mt-4 " >
< i class = " ri-map-pin-user-fill " ></ i > Register by
: < ? = isset ( $case_surgical -> register ) ? $case_surgical -> register -> realname : ' ' ?>
at : < ? = $case_surgical -> register_at ?>
</ div >
</ div >
2025-04-23 07:41:34 +00:00
<!-- card body -->
2024-12-25 03:04:59 +00:00
</ div >
2025-04-25 08:51:33 +00:00
<!-- card -->
2024-12-25 03:04:59 +00:00
2025-04-29 05:08:18 +00:00
< ? = $this -> render ( '_quality_assessment_he' , [
'form' => $form ,
'slide_qa_he' => $slide_qa_he ,
]) ?>
2024-12-25 03:04:59 +00:00
< ? = $form -> errorSummary ( $case_surgical ) ?>
2025-04-29 05:25:27 +00:00
< div class = " row mt-3 " >
2024-12-25 03:04:59 +00:00
< div class = " col-sm-6 " >
< ? = Html :: submitButton ( '<i class="ri-save-line"></i> Save' , [ 'class' => 'btn btn-success btn-block' , 'value' => 'save' , 'name' => 'surgical' ]) ?>
</ div >
< div class = " col-sm-6 text-end " >
< ? = Html :: submitButton ( '<i class="ri-checkbox-line"></i> Approve' , [ 'class' => 'btn btn-primary btn-block' , 'value' => 'approve' , 'name' => 'surgical' ]) ?>
</ div >
</ div >
< ? php ActiveForm :: end () ?>
< ? php $this -> registerJs ( " CKEDITOR.config.scayt_autoStartup = true; " ) ?>
< div class = " card shadow mt-4 " >
< div class = " card-header " >
< h5 class = " card-title " id = " report " >< i class = " ri-file-pdf-2-line " ></ i > Preview Revised Report </ h5 >
</ div >
< div class = " card-body pdf-scroll " >
< ? php if ( ! $model -> isNewRecord && SurgicalDiagnosis :: findOne ([
'id_case' => $case_surgical -> id_case ,
'report_type' => 'revised' ,
'status_id' => 3 ,
'id' => $model -> id ,
])) { ?>
2025-04-25 08:51:33 +00:00
< embed
src = " <?= Url::to(['/report/case/surgical-pdf', 'id_case' => $case_surgical->id_case , 'report_type' => 'revised', 'id' => $model->id , 'mode' => 'preview', 'file' => false, 'watermark' => false]) ?> "
type = " application/pdf " width = " 100% " height = " 1200 " >
2024-12-25 03:04:59 +00:00
< ? php } else { ?>
2025-04-25 08:51:33 +00:00
< div class = " alert bg-info text-white alert-dismissible d-flex fade show " >
< span class = " ri-alarm-warning-line fs-3 me-2 lh-1 " ></ span >
ผลการตรวจวินิจฉัยนี้ยังไม่ได้ถูกบันทึกในระบบ < br />
หากต้องการออกผล
Revised Report ให้กดปุ่ม Save เพื่อแสดงตัวอย่าง Revised Report
</ div >
2024-12-25 03:04:59 +00:00
< ? php } ?>
</ div >
</ div >
< div class = " mt-3 " >
< div class = " card shadow " >
< div class = " card-header " >
< h5 class = " card-title " >< i class = " ri-file-history-line " ></ i >
ประวัติการส่งตรวจของคนไข้ :
< ? = $case_surgical -> id_case . ' ' . Html :: encode ( $case_surgical -> getFullname ()) ?>
</ h5 >
</ div >
< div class = " card-body " >
< div class = " row " >
< div class = " col-md-12 " >
< div class = " mt-4 " >
< ? = $this -> render ( 'history' , [ 'case' => $case_surgical ,]) ?>
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
2024-12-26 04:45:57 +00:00
< ? php /* $this -> render ( 'history-his' , [
2024-12-25 03:04:59 +00:00
'case' => $case_surgical ,
2024-12-26 04:45:57 +00:00
]) */ ?>
2024-12-25 03:04:59 +00:00
< ? = $this -> render ( '_template_surgical' , [
'searchModelGross' => $searchModelGross ,
'dataProviderGross' => $dataProviderGross ,
'searchModelMicroscopic' => $searchModelMicroscopic ,
'dataProviderMicroscopic' => $dataProviderMicroscopic ,
'searchModelDiagnosis' => $searchModelDiagnosis ,
'dataProviderDiagnosis' => $dataProviderDiagnosis
]) ?>