2024-12-25 03:04:59 +00:00
< ? php
2025-04-22 03:48:27 +00:00
use common\models\ConstCancerRegistry ;
2024-12-25 03:04:59 +00:00
use common\models\SurgicalDiagnosis ;
use common\models\SurgicalImg ;
use yii\helpers\Html ;
use yii\helpers\Url ;
use dosamigos\ckeditor\CKEditor ;
2025-04-22 03:48:27 +00:00
use kartik\select2\Select2 ;
2024-12-25 03:04:59 +00:00
use yii\bootstrap5\ActiveForm ;
2025-04-22 03:48:27 +00:00
use yii\helpers\ArrayHelper ;
2024-12-25 03:04:59 +00:00
$this -> title = Html :: encode ( 'Edit ' . ucfirst ( $diagnosis -> report_type ) . ' Report id_case: ' . $case_surgical -> id_case );
$this -> params [ 'breadcrumbs' ][] = $this -> title ;
?>
2025-04-22 03:48:27 +00:00
<!--
2024-12-25 03:04:59 +00:00
< div class = " card mb-4 " >
< div class = " card-header " >
2025-04-22 03:48:27 +00:00
< h5 class = " card-title " >< i class = " ri-file-user-line " ></ i > Patient Information
</ h5 >
2024-12-25 03:04:59 +00:00
</ div >
< div class = " card-body " >
< ? = $this -> render ( '../../../register/views/case/_patient_surgical' , [ 'model' => $case_surgical ]) ?>
</ div >
</ div >
2025-04-22 03:48:27 +00:00
-->
2024-12-25 03:04:59 +00:00
< ? php $form = ActiveForm :: begin () ?>
< ? = $form -> errorSummary ( $case_surgical ) ?>
2025-04-22 03:48:27 +00:00
< ? = $this -> render ( '_patient_surgical_form' , [
'form' => $form ,
'case_surgical' => $case_surgical
]) ?>
2024-12-25 03:04:59 +00:00
2025-04-22 03:48:27 +00:00
< div class = " card mt-4 " >
2024-12-25 03:04:59 +00:00
< div class = " card-header " >
2025-04-22 03:48:27 +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-22 03:48:27 +00:00
< ? = $form -> errorSummary ( $case_surgical ) ?>
2024-12-25 03:04:59 +00:00
2025-04-22 03:48:27 +00:00
< ? php if ( ! empty ( $case_surgical -> files )) { ?>
2025-05-12 07:24:16 +00:00
< h6 >< i class = " ri-file-text-line " ></ i > ใบส่งตรวจ ( Request ) </ h6 >
< ul >
< ? php
2025-04-22 03:48:27 +00:00
foreach ( $case_surgical -> getFiles () as $file => $val ) {
?>
2025-05-12 07:24:16 +00:00
< li >< ? = Html :: a ( $val , Yii :: getAlias ( '@web' ) . '/uploads/surgical/file/' . $val , [ 'target' => '_blank' ]); ?>
</ li >
< ? php } ?>
</ ul >
2025-04-22 03:48:27 +00:00
< ? php } ?>
2024-12-25 03:04:59 +00:00
< 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 >
< ? php
$surgical_img = SurgicalImg :: find () -> where ([ 'id_case' => $case_surgical -> id_case ]) -> all ();
if ( $surgical_img ) { ?>
2025-05-12 07:24:16 +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-22 03:48:27 +00:00
< ? php } ?> <br />
2024-12-25 03:04:59 +00:00
< ? php if ( ! empty ( $case_surgical -> gross_img )) { ?>
2025-05-12 07:24:16 +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-22 03:48:27 +00:00
< div class = " col-md-6 " >
< ? = $form -> field ( $case_surgical , 'cancer_registry_id' ) -> widget ( Select2 :: class , [
2025-05-02 10:20:54 +00:00
'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...'
],
]) ?>
2025-04-22 03:48:27 +00:00
</ div >
2024-12-25 03:04:59 +00:00
2025-04-22 03:48:27 +00:00
< h6 class = " mb-3 " >< strong >< i class = " ri-align-justify " ></ i > Specimen And Clinical Information </ strong ></ h6 >
< ? = $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' => [
2025-04-22 03:48:27 +00:00
'height' => 150 ,
2024-12-25 03:04:59 +00:00
'removePlugins' => 'scayt' ,
'disableNativeSpellChecker' => false ,
'extraPlugins' => 'font,justify,colorbutton,iframe,dialogadvtab,liststyle' ,
2025-04-22 03:48:27 +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,Table,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-22 03:48:27 +00:00
[ 'name' => 'insert' , 'groups' => [ 'specialchar' ]],
2024-12-25 03:04:59 +00:00
//['name' => 'tools', 'groups' => ['maximize']],
],
]
]) ?>
2025-04-22 03:48:27 +00:00
< h6 class = " mb-3 " >< strong >< i class = " ri-align-justify " ></ i > Gross Description </ strong ></ h6 >
2024-12-25 03:04:59 +00:00
< div class = " mb-3 " >
2025-04-22 03:48:27 +00:00
< ? = $form -> field ( $diagnosis , 'gross_description' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
2024-12-25 03:04:59 +00:00
'preset' => 'custom' ,
2025-04-22 03:48:27 +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' ,
2025-04-22 03:48:27 +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,Table,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-22 03:48:27 +00:00
[ 'name' => 'insert' , 'groups' => [ 'specialchar' ]],
2024-12-25 03:04:59 +00:00
//['name' => 'tools', 'groups' => ['maximize']],
],
]
]) ?>
</ div >
2025-04-22 03:48:27 +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' ]) ?>
< ? php if ( ! empty ( $case_surgical -> gross_description )) { ?>
2025-05-12 07:24:16 +00:00
<!--
2025-04-22 03:48:27 +00:00
< div class = " gross-description " >
< ? php // \yii\helpers\HtmlPurifier::process($case_surgical->gross_description)
?>
</ div >< br />
-->
2025-05-12 07:24:16 +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 ?>
2024-12-25 03:04:59 +00:00
2025-05-12 07:24:16 +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-05-12 07:24:16 +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-05-12 07:24:16 +00:00
</ div >
<!--
2025-04-22 03:48:27 +00:00
< br >
< 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-22 03:48:27 +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
}
}
}
*/ ?>
2024-12-25 03:04:59 +00:00
</ div >
2025-04-22 03:48:27 +00:00
-->
2025-05-12 07:24:16 +00:00
< br >
< ? php // Html::a('<span class="fa fa-refresh"></span> Reject Gross', ['order/surgical-gross-reject', 'id_case' => $case_surgical->id_case, 'report_type' => $diagnosis->report_type, 'id' => $diagnosis->id], ['class' => 'btn btn-danger', 'name' => 'surgical', 'value' => 'reject-gross'])
2025-04-22 03:48:27 +00:00
?>
2024-12-25 03:04:59 +00:00
< ? php } ?>
2025-04-22 03:48:27 +00:00
< h6 class = " mt-4 " >< i class = " ri-align-justify " ></ i > Microscopic Description </ h6 >
< ? = $form -> field ( $diagnosis , 'is_no_microscopic' ) -> checkbox () ?>
< div class = " mb-3 " >
< ? = $form -> field ( $diagnosis , 'microscopic_description' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
2024-12-25 03:04:59 +00:00
'preset' => 'custom' ,
2025-04-22 03:48:27 +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' ,
'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']],
],
]
]) ?>
</ div >
2025-04-22 03:48:27 +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' ]) ?>
2025-05-12 07:24:16 +00:00
< h6 class = " mt-4 " >< strong > Pathological Diagnosis </ strong ></ h6 >
2025-07-28 02:08:40 +00:00
< ? = $form -> field ( $diagnosis , 'diagnosis' ) -> label ( false ) -> textarea ([ 'spellcheck' => true ]) -> widget ( CKEditor :: class , [
2025-04-22 03:48:27 +00:00
'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' ]) ?>
2024-12-25 03:04:59 +00:00
< h6 class = " mt-4 " > Critical Diagnosis </ h6 >
< ? = $form -> field ( $diagnosis , 'is_critical_diagnosis' ) -> checkbox ([
'labelOptions' => [
'style' => 'color:red'
]
]) ?>
2025-04-22 03:48:27 +00:00
<!--< h6 class = " mt-4 " > Co Pathlogist </ h6 >
< ? php /* $form -> field ( $diagnosis , 'is_co_pathologist' ) -> checkbox () ?>
< ? php $this -> registerJs ( "
$ ( \ " input[name=' " . Html :: getInputName ( $diagnosis , 'is_co_pathologist' ) . " '] \" ).change(function() {
if ( this . checked == true ){
$ ( '.is_co_pathologist' ) . show ();
} else {
$ ( '.is_co_pathologist' ) . hide ();
}
});
" ) ?>
< div class = " is_co_pathologist "
< ? = ! $diagnosis -> isNewRecord && $diagnosis -> is_co_pathologist ? '' : 'style="display: none;"' ?> >
< div class = " col-md-3 " >
< ? = $form -> field ( $diagnosis , '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 ,
2024-12-25 03:04:59 +00:00
'pluginOptions' => [
'allowClear' => true ,
2025-04-22 03:48:27 +00:00
'placeholder' => 'เลือก Co Pathologist...'
2024-12-25 03:04:59 +00:00
]
2025-04-22 03:48:27 +00:00
]) */ ?>
2024-12-25 03:04:59 +00:00
</ div >
2025-04-22 03:48:27 +00:00
</ div >-->
2024-12-25 03:04:59 +00:00
2025-05-02 10:20:54 +00:00
< ? = $this -> render ( '_is_ca_confirm' , [
'form' => $form ,
'diagnosis' => $diagnosis ,
]) ?>
2025-04-22 03:48:27 +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 >
2024-12-25 03:04:59 +00:00
</ div >
2025-04-22 03:48:27 +00:00
<!-- card body -->
2024-12-25 03:04:59 +00:00
</ div >
2025-04-22 03:48:27 +00:00
<!-- card -->
2024-12-25 03:04:59 +00:00
2025-04-22 03:48:27 +00:00
< div class = " card shadow mt-4 " >
2024-12-25 03:04:59 +00:00
< div class = " card-header " >
2025-04-22 03:48:27 +00:00
< h5 class = " card-title " >< i class = " ri-chat-check-line " ></ i > Reply
Remark </ h5 >
2024-12-25 03:04:59 +00:00
</ div >
< div class = " card-body " >
< ? = $form -> field ( $center_approve , 'remark' ) -> textarea ([ 'rows' => 10 ]) ?>
</ div >
</ div >
2025-04-22 03:48:27 +00:00
< div class = " row mt-4 " >
2024-12-25 03:04:59 +00:00
< div class = " col-md-6 " >
2025-04-22 03:48:27 +00:00
< ? = Html :: submitButton ( '<i class="ri-save-line"></i> บันทึกข้อมูล' , [ 'class' => 'btn btn-success' , 'name' => 'surgical' , 'value' => 'save' ]) ?>
2024-12-25 03:04:59 +00:00
</ div >
< div class = " col-md-6 text-end " >
2025-04-22 03:48:27 +00:00
< ? = Html :: submitButton ( '<i class="ri-checkbox-line"></i> ส่งให้ Approve' , [ 'class' => 'btn btn-primary' , 'name' => 'surgical' , 'value' => 'approve' ]) ?>
2024-12-25 03:04:59 +00:00
</ div >
</ div >
2025-04-22 03:48:27 +00:00
< div class = " alert alert-info border-info alert-dismissible fade show text-info mt-3 " >
< i class = " ri-error-warning-line fs-3 me-2 lh-1 " ></ i > หากบันทึกข้อมูลเรียบร้อยแล้ว
2024-12-25 03:04:59 +00:00
กรุณากดปุ่ม ส่งให้ Approve เพื่อให้เจ้าหน้าที่ตรวจสอบ
และ Release ผลการตรวจให้หน่วยงาน
</ div >
< ? php ActiveForm :: end () ?>
< ? php $this -> registerJs ( " CKEDITOR.config.scayt_autoStartup = true; " ) ?>
2025-04-22 03:48:27 +00:00
< ? php /* if ( SurgicalDiagnosis :: findOne ([ 'id_case' => $case_surgical -> id_case , 'report_type' => $diagnosis -> report_type ])) { ?>
< div class = " card shadow mb-5 " >
< div class = " card-header " >
< h4 class = " card-title " id = " report " > Preview < ? = ucfirst ( $diagnosis -> report_type ) ?> Report</h4>
</ div >
< div class = " card-body " >
< iframe
src = " <?= Url::to(['/report/case/surgical-pdf', 'id_case' => $case_surgical->id_case , 'report_type' => $diagnosis->report_type , 'id' => $diagnosis->id , 'watermark' => false]) ?> "
frameborder = " 0 " height = " 800 " width = " 100% " ></ iframe >
</ div >
</ div >
< ? php } */ ?>
2024-12-25 03:04:59 +00:00
< ? php if ( SurgicalDiagnosis :: findOne ([ 'id_case' => $case_surgical -> id_case , 'report_type' => $diagnosis -> report_type ])) { ?>
2025-05-12 07:24:16 +00:00
< div class = " card shadow mt-5 " >
< div class = " card-header " >
< h5 class = " card-title " id = " report " >< i class = " ri-file-pdf-2-line " ></ i > Preview
< ? = ucfirst ( $diagnosis -> report_type ) ?> Report</h5>
</ div >
< div class = " card-body " >
< embed
src = " <?= Url::to(['/report/case/surgical-pdf', 'id_case' => $case_surgical->id_case , 'report_type' => $diagnosis->report_type , 'id' => $diagnosis->id , 'watermark' => false, 'file' => false]) ?> "
frameborder = " 0 " height = " 800 " width = " 100% " ></ embed >
2025-04-22 03:48:27 +00:00
</ div >
2025-05-12 07:24:16 +00:00
</ div >
2024-12-25 03:04:59 +00:00
< ? php } ?>
<!--
< div class = " card shadow mb-5 " >
< div class = " card-header " >
< h4 class = " card-title " id = " report " > Preview Final Report </ h4 >
</ div >
< div class = " card-body " >
< embed src = " <?php // Url::to(['/report/case/surgical-pdf', 'id_case' => $case_surgical->id_case , 'report_type' => $diagnosis->report_type , 'id' => $diagnosis->id ], true)
?> " type="application/pdf" width="100%" height="1200">
</ div >
</ div >
-->