Case Outsource

master
SuraMew 2025-08-13 11:38:37 +07:00
parent b7d66bd36f
commit d40bb25867
6 changed files with 135 additions and 137 deletions

View File

@ -4,8 +4,7 @@ services:
frontend: frontend:
build: frontend build: frontend
ports: ports:
- 20081:81 - 20079:80
- 54002:54002
volumes: volumes:
# Re-use local composer cache via host-volume # Re-use local composer cache via host-volume
- ~/.composer-docker/cache:/root/.composer/cache:delegated - ~/.composer-docker/cache:/root/.composer/cache:delegated
@ -17,7 +16,7 @@ services:
backend: backend:
build: backend build: backend
ports: ports:
- 21081:81 - 21079:80
volumes: volumes:
# Re-use local composer cache via host-volume # Re-use local composer cache via host-volume
- ~/.composer-docker/cache:/root/.composer/cache:delegated - ~/.composer-docker/cache:/root/.composer/cache:delegated
@ -48,7 +47,7 @@ services:
PMA_HOST: mariadb PMA_HOST: mariadb
MYSQL_ROOT_PASSWORD: Ss157344121165 MYSQL_ROOT_PASSWORD: Ss157344121165
ports: ports:
- "8081:83" - "8079:80"
depends_on: depends_on:
- mariadb - mariadb
networks: networks:

View File

@ -24,31 +24,31 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<?= $form->field($model, 'id_case')->widget(MaskedInput::class, [ <?= $form->field($model, 'id_case')->widget(MaskedInput::class, [
'mask' => 'A99-99999', 'mask' => 'A99-99999',
]) ?> ]) ?>
</div> </div>
<div class="col-md-3"><?= $form->field($model, 'no_slide') ?></div> <div class="col-md-3"><?= $form->field($model, 'no_slide') ?></div>
<div class="col-md-3"> <div class="col-md-3">
<?= $form->field($model, 'label')->dropDownList( <?= $form->field($model, 'label')->dropDownList(
[ [
1 => 'Recut', 1 => 'Recut',
2 => 'Recut1', 2 => 'Recut1',
3 => 'Recut2', 3 => 'Recut2',
4 => 'Deeper 1', 4 => 'Deeper 1',
5 => 'Deeper 2', 5 => 'Deeper 2',
6 => 'Deeper 3', 6 => 'Deeper 3',
7 => 'Serial cut1', 7 => 'Serial cut1',
8 => 'Serial cut2', 8 => 'Serial cut2',
9 => 'Serial cut3', 9 => 'Serial cut3',
10 => 'Reprocess', 10 => 'Reprocess',
11 => 'ReEmbedded', 11 => 'ReEmbedded',
], ],
[ [
'prompt' => 'เลือก Label', 'prompt' => 'เลือก Label',
] ]
); ?> ); ?>
</div> </div>
</div> </div>
@ -74,16 +74,16 @@ $this->params['breadcrumbs'][] = $this->title;
<?php if ($model->load(Yii::$app->request->post())) { ?> <?php if ($model->load(Yii::$app->request->post())) { ?>
<div class="card mt-3"> <div class="card mt-3">
<div class="card-header"> <div class="card-header">
<h5 class="card-title"><i class="ri-qr-code-fill"></i> <h5 class="card-title"><i class="ri-qr-code-fill"></i>
QR Sticker</h5> QR Sticker</h5>
</div>
<div class="card-body">
<embed
src="<?= Url::to(['sticker-pdf-no-auto', 'id_case' => $model->id_case, 'no_slide' => $model->no_slide, 'label' => $model->label, 'stain1' => $model->stain1, 'stain2' => $model->stain2], true) ?>"
type="application/pdf" width="100%" height="500">
</div>
</div> </div>
<div class="card-body">
<embed
src="<?= Url::to(['sticker-pdf-no-auto', 'id_case' => $model->id_case, 'no_slide' => $model->no_slide, 'label' => $model->label, 'stain1' => $model->stain1, 'stain2' => $model->stain2], true) ?>"
type="application/pdf" width="100%" height="500">
</div>
</div>
<?php } ?> <?php } ?>

View File

@ -67,14 +67,14 @@ $histo_he = new ArrayDataProvider([
?> ?>
<?= Html::a('<i class="ri-file-text-line"></i> Final Report', ['/pathologist/do/surgical-final', 'id_case' => $case_surgical->id_case, 'type' => 'final'], ['class' => 'btn btn-block btn-success']) ?> <?= Html::a('<i class="ri-file-text-line"></i> Final Report', ['/pathologist/do/surgical-final', 'id_case' => $case_surgical->id_case, 'type' => 'final'], ['class' => 'btn btn-block btn-success']) ?>
<?php if (null != (SurgicalDiagnosis::find()->where(['id_case' => $case_surgical->id_case])->andWhere(['in', 'report_type', ['final', 'consult', 'preliminary', 'outlab', 'consult-outlab']])->one())) { ?> <?php if (null != (SurgicalDiagnosis::find()->where(['id_case' => $case_surgical->id_case])->andWhere(['in', 'report_type', ['final', 'consult', 'preliminary', 'outlab', 'consult-outlab']])->one())) { ?>
<?= Html::a('<i class="fa fa-plus"></i> Addendum Report', ['/pathologist/do/surgical-addendum', 'id_case' => $case_surgical->id_case, 'type' => 'addendum'], ['class' => 'btn btn-block btn-primary']) ?> <?= Html::a('<i class="fa fa-plus"></i> Addendum Report', ['/pathologist/do/surgical-addendum', 'id_case' => $case_surgical->id_case, 'type' => 'addendum'], ['class' => 'btn btn-block btn-primary']) ?>
<?php // Html::a('<i class="fa fa-plus"></i> Addendum Report', ['/pathologist/do/surgical-addendum', 'id_case' => $case_surgical->id_case, 'type' => 'addendum'], ['class' => 'btn btn-block btn-primary']) <?php // Html::a('<i class="fa fa-plus"></i> Addendum Report', ['/pathologist/do/surgical-addendum', 'id_case' => $case_surgical->id_case, 'type' => 'addendum'], ['class' => 'btn btn-block btn-primary'])
?> ?>
<?php //= Html::a('<i class="fa fa-check"></i> Corrected Report', ['/pathologist/do/surgical-correct', 'id_case' => $case_surgical->id_case, 'type' => 'corrected'], ['class' => 'btn btn-md btn-warning']) <?php //= Html::a('<i class="fa fa-check"></i> Corrected Report', ['/pathologist/do/surgical-correct', 'id_case' => $case_surgical->id_case, 'type' => 'corrected'], ['class' => 'btn btn-md btn-warning'])
?> ?>
<?php //= Html::a('<i class="fa fa-check-square-o"></i> Revised Report', ['/pathologist/do/surgical-revise', 'id_case' => $case_surgical->id_case, 'type' => 'revised'], ['class' => 'btn btn-md btn-danger']) <?php //= Html::a('<i class="fa fa-check-square-o"></i> Revised Report', ['/pathologist/do/surgical-revise', 'id_case' => $case_surgical->id_case, 'type' => 'revised'], ['class' => 'btn btn-md btn-danger'])
?> ?>
<!--<div class="btn-group" role="group"> <!--<div class="btn-group" role="group">
<button id="btnGroupCorrect1" type="button" class="btn btn-warning dropdown-toggle" <button id="btnGroupCorrect1" type="button" class="btn btn-warning dropdown-toggle"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-check"></i> Corrected Report <i class="fa fa-check"></i> Corrected Report
@ -124,13 +124,13 @@ $histo_he = new ArrayDataProvider([
<?php } */ ?> <?php } */ ?>
</ul> </ul>
</div>--> </div>-->
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<button id="btnGroupCorrect1" type="button" class="btn btn-danger dropdown-toggle" <button id="btnGroupCorrect1" type="button" class="btn btn-danger dropdown-toggle"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-check-fill"></i> Revised Report <i class="ri-check-fill"></i> Revised Report
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnGroupCorrect1"> <ul class="dropdown-menu" aria-labelledby="btnGroupCorrect1">
<?php foreach ( <?php foreach (
SurgicalDiagnosis::find()->where([ SurgicalDiagnosis::find()->where([
'id_case' => $case_surgical->id_case 'id_case' => $case_surgical->id_case
])->andWhere(['>', 'status_id', 3])->orderBy(['id' => SORT_ASC])->all() as $case_revise ])->andWhere(['>', 'status_id', 3])->orderBy(['id' => SORT_ASC])->all() as $case_revise
@ -140,14 +140,14 @@ $histo_he = new ArrayDataProvider([
'approve_status' => 4, 'approve_status' => 4,
'ref_id' => $case_revise->id, 'ref_id' => $case_revise->id,
])->one(); ?> ])->one(); ?>
<?php if ($approve) { ?> <?php if ($approve) { ?>
<li> <li>
<?= Html::a($case_revise->id_case . '[' . ucfirst($case_revise->report_type) . ']-' . $case_revise->pathologist_at, ['/pathologist/do/surgical-revised', 'id_case' => $case_surgical->id_case, 'from_id' => $case_revise->id, 'type' => 'revised'], ['class' => 'dropdown-item']) ?> <?= Html::a($case_revise->id_case . '[' . ucfirst($case_revise->report_type) . ']-' . $case_revise->pathologist_at, ['/pathologist/do/surgical-revised', 'id_case' => $case_surgical->id_case, 'from_id' => $case_revise->id, 'type' => 'revised'], ['class' => 'dropdown-item']) ?>
</li> </li>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
</ul> </ul>
</div> </div>
<?php } ?> <?php } ?>
<?php <?php
/*$diagnosis_outlab = SurgicalDiagnosis::find()->andFilterWhere([ /*$diagnosis_outlab = SurgicalDiagnosis::find()->andFilterWhere([
@ -158,7 +158,7 @@ $histo_he = new ArrayDataProvider([
])->one(); ])->one();
*/ ?> */ ?>
<?php if (null != (SurgicalDiagnosis::find()->where(['id_case' => $case_surgical->id_case])->andWhere(['in', 'report_type', ['outlab']])->one())) { ?> <?php if (null != (SurgicalDiagnosis::find()->where(['id_case' => $case_surgical->id_case])->andWhere(['in', 'report_type', ['outlab']])->one())) { ?>
<?= Html::a('<i class="ri-file-text-line"></i> Outlab Report', ['/pathologist/do/surgical-outlab', 'id_case' => $case_surgical->id_case, 'type' => 'outlab'], ['class' => 'btn btn-block btn-warning']) ?> <?= Html::a('<i class="ri-file-text-line"></i> Outsource Report', ['/pathologist/do/surgical-outlab', 'id_case' => $case_surgical->id_case, 'type' => 'outlab'], ['class' => 'btn btn-block btn-warning']) ?>
<?php } ?> <?php } ?>
<?php /* <?php /*
$diagnosis_outlab = SurgicalDiagnosis::find()->andFilterWhere([ $diagnosis_outlab = SurgicalDiagnosis::find()->andFilterWhere([
@ -173,13 +173,13 @@ $histo_he = new ArrayDataProvider([
<?php <?php
$consult = SurgicalConsult::findOne(['id_case' => $case_surgical->id_case, 'status' => 2]); $consult = SurgicalConsult::findOne(['id_case' => $case_surgical->id_case, 'status' => 2]);
if (isset($consult) && $consult->diagnosis_by == 1) { ?> if (isset($consult) && $consult->diagnosis_by == 1) { ?>
<?= Html::a('<i class="ri-chat-new-line"></i> Consult Report', ['/pathologist/do/surgical-consult', 'id_case' => $case_surgical->id_case, 'type' => 'consult'], ['class' => 'btn btn-block btn-info']) ?> <?= Html::a('<i class="ri-chat-new-line"></i> Consult Report', ['/pathologist/do/surgical-consult', 'id_case' => $case_surgical->id_case, 'type' => 'consult'], ['class' => 'btn btn-block btn-info']) ?>
<?php } ?> <?php } ?>
</div> </div>
<div class="report-action"> <div class="report-action">
<div class="mt-4"> <div class="mt-4">
<?php if (null != (SurgicalDiagnosis::find()->where(['id_case' => $case_surgical->id_case])->andWhere(['in', 'report_type', ['consult-outlab']])->one())) { ?> <?php if (null != (SurgicalDiagnosis::find()->where(['id_case' => $case_surgical->id_case])->andWhere(['in', 'report_type', ['consult-outlab']])->one())) { ?>
<?= Html::a('<i class="ri-file-text-line"></i> Consult Outlab Report', ['/pathologist/do/surgical-consult-outlab', 'id_case' => $case_surgical->id_case, 'type' => 'consult-outlab'], ['class' => 'btn btn-block btn-warning']) ?> <?= Html::a('<i class="ri-file-text-line"></i> Consult Outlab Report', ['/pathologist/do/surgical-consult-outlab', 'id_case' => $case_surgical->id_case, 'type' => 'consult-outlab'], ['class' => 'btn btn-block btn-warning']) ?>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
@ -312,10 +312,10 @@ $histo_he = new ArrayDataProvider([
<div id="collapseSlideOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne"> <div id="collapseSlideOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="card-body"> <div class="card-body">
<?= $this->render('_quality_assessment_he_surgical', [ <?= $this->render('_quality_assessment_he_surgical', [
'form' => $form, 'form' => $form,
'slide_qa_he' => $slide_qa_he, 'slide_qa_he' => $slide_qa_he,
'case_surgical' => $case_surgical 'case_surgical' => $case_surgical
]) ])
?> ?>
</div> </div>
@ -529,66 +529,66 @@ $histo_he = new ArrayDataProvider([
<div id="collapseTwo" class="panel-collapse collapse show in" role="tabpanel" aria-labelledby="headingTwo"> <div id="collapseTwo" class="panel-collapse collapse show in" role="tabpanel" aria-labelledby="headingTwo">
<div class="card-body"> <div class="card-body">
<?php if (SurgicalDiagnosis::find()->where([ <?php if (SurgicalDiagnosis::find()->where([
'id_case' => $case_surgical->id_case 'id_case' => $case_surgical->id_case
])->count() > 0) { ?> ])->count() > 0) { ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => new ActiveDataProvider([ 'dataProvider' => new ActiveDataProvider([
'query' => SurgicalDiagnosis::find()->andFilterWhere([ 'query' => SurgicalDiagnosis::find()->andFilterWhere([
'id_case' => $case_surgical->id_case 'id_case' => $case_surgical->id_case
]),
'sort' => [
'defaultOrder' => [
'pathologist_at' => SORT_DESC
]
]
]), ]),
'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'], 'sort' => [
'layout' => "{summary}<div class='table-outer'><div class='table-responsive'>\n{items}\n</div></div><div class='d-flex justify-content-between align-items-center mt-4'>{pager}</div>", 'defaultOrder' => [
'columns' => [ 'pathologist_at' => SORT_DESC
['class' => 'yii\grid\SerialColumn'],
'id_case',
'pathologist_at',
[
'attribute' => 'status_id',
'value' => function ($model) {
// return isset($model->status) ? Html::encode($model->status->name) : '';
return isset($model->status) ? ($model->status->name) : '';
}
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}',
'buttons' => [
'view' => function ($url, $model, $key) {
if ($model->status_id >= 4) {
$ap = '';
$approve = ApproveStatus::findOne(['id_case' => $model->id_case, 'report_type' => $model->report_type, 'ref_id' => $model->id]);
if ($approve && $approve->approve_status < 4) {
return '<span class="badge bg-danger">รอตรวจสอบ</span>';
}
$case_type = Yii::$app->pathology->getCaseType($model->id_case);
$case = Yii::$app->pathology->getCase($model->id_case);
if ($model->report_type == 'outlab') {
foreach ($model->getReport() as $file => $val) {
return Html::a('<i class="ri-file-pdf-2-line"></i> View Report', Yii::getAlias('@web') . '/' . $model->uploadReportFolder . '/' . $val, ['class' => 'btn btn-md btn-info btn-block', 'target' => '_blank']);
}
} elseif ($model->report_type == 'consult-outlab') {
foreach ($model->getConsultReport() as $file => $val) {
return Html::a('<i class="ri-file-pdf-2-line"></i> View Report', Yii::getAlias('@web') . '/' . $model->uploadConsultReportFolder . '/' . $val, ['class' => 'btn btn-md btn-info btn-block', 'target' => '_blank']);
}
} else {
return Html::a('<i class="ri-file-pdf-2-line"></i> View Report', ['/report/case/' . $case_type . '-pdf', 'id_case' => $model->id_case, 'report_type' => $model->report_type, 'id' => $model->id, 'mode' => 'final', 'file' => false, 'watermark' => false], ['class' => 'btn btn-md btn-info btn-block', 'target' => '_blank']) . $ap;
}
}
},
],
] ]
] ]
]) ?> ]),
'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'],
'layout' => "{summary}<div class='table-outer'><div class='table-responsive'>\n{items}\n</div></div><div class='d-flex justify-content-between align-items-center mt-4'>{pager}</div>",
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id_case',
'pathologist_at',
[
'attribute' => 'status_id',
'value' => function ($model) {
// return isset($model->status) ? Html::encode($model->status->name) : '';
return isset($model->status) ? ($model->status->name) : '';
}
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}',
'buttons' => [
'view' => function ($url, $model, $key) {
if ($model->status_id >= 4) {
$ap = '';
$approve = ApproveStatus::findOne(['id_case' => $model->id_case, 'report_type' => $model->report_type, 'ref_id' => $model->id]);
if ($approve && $approve->approve_status < 4) {
return '<span class="badge bg-danger">รอตรวจสอบ</span>';
}
$case_type = Yii::$app->pathology->getCaseType($model->id_case);
$case = Yii::$app->pathology->getCase($model->id_case);
if ($model->report_type == 'outlab') {
foreach ($model->getReport() as $file => $val) {
return Html::a('<i class="ri-file-pdf-2-line"></i> View Report', Yii::getAlias('@web') . '/' . $model->uploadReportFolder . '/' . $val, ['class' => 'btn btn-md btn-info btn-block', 'target' => '_blank']);
}
} elseif ($model->report_type == 'consult-outlab') {
foreach ($model->getConsultReport() as $file => $val) {
return Html::a('<i class="ri-file-pdf-2-line"></i> View Report', Yii::getAlias('@web') . '/' . $model->uploadConsultReportFolder . '/' . $val, ['class' => 'btn btn-md btn-info btn-block', 'target' => '_blank']);
}
} else {
return Html::a('<i class="ri-file-pdf-2-line"></i> View Report', ['/report/case/' . $case_type . '-pdf', 'id_case' => $model->id_case, 'report_type' => $model->report_type, 'id' => $model->id, 'mode' => 'final', 'file' => false, 'watermark' => false], ['class' => 'btn btn-md btn-info btn-block', 'target' => '_blank']) . $ap;
}
}
},
],
]
]
]) ?>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
<?php //$this->registerJs("CKEDITOR.config.scayt_autoStartup = true;") <?php //$this->registerJs("CKEDITOR.config.scayt_autoStartup = true;")
?> ?>
</div> </div>

View File

@ -179,7 +179,7 @@ $this->params['breadcrumbs'][] = $this->title;
'filter' => [1 => 'Case Outlab'], 'filter' => [1 => 'Case Outlab'],
'format' => 'raw', 'format' => 'raw',
'value' => function ($model) { 'value' => function ($model) {
return $model->is_outlab == 1 ? '<span class="badge border border-danger bg-danger-subtle text-danger">Case Outlab</span>' : ''; return $model->is_outlab == 1 ? '<span class="badge border border-danger bg-danger-subtle text-danger">Case Outsource</span>' : '';
} }
], ],
[ [

View File

@ -229,7 +229,7 @@ $this->params['breadcrumbs'][] = $this->title;
'filter' => [1 => 'Case Outlab'], 'filter' => [1 => 'Case Outlab'],
'format' => 'raw', 'format' => 'raw',
'value' => function ($model) { 'value' => function ($model) {
return $model->is_outlab == 1 ? '<span class="badge border border-danger bg-danger-subtle text-danger">Case Outlab</span>' : ''; return $model->is_outlab == 1 ? '<span class="badge border border-danger bg-danger-subtle text-danger">Case Outsource</span>' : '';
} }
], ],
[ [

View File

@ -58,11 +58,11 @@ $asset = Yii::$app->assetManager->getPublishedUrl('@frontend/themes/nikom/assets
} }
") ?> ") ?>
<style> <style>
body { body {
font-family: "Kanit"; font-family: "Kanit";
font-size: 14px !important; font-size: 14px !important;
font-weight: 300; font-weight: 300;
} }
</style> </style>
</head> </head>
@ -210,7 +210,6 @@ $asset = Yii::$app->assetManager->getPublishedUrl('@frontend/themes/nikom/assets
</div> </div>
</div> </div>
<!-- Header user settings ends --> <!-- Header user settings ends -->
</div> </div>
<!-- App header actions ends --> <!-- App header actions ends -->
@ -287,27 +286,28 @@ $asset = Yii::$app->assetManager->getPublishedUrl('@frontend/themes/nikom/assets
<!-- App body starts --> <!-- App body starts -->
<div class="app-body"> <div class="app-body">
<?php if (Yii::$app->controller->module->id == 'admin') { ?> <?php if (Yii::$app->controller->module->id == 'admin') { ?>
<?= Alert::widget() ?> <?= Alert::widget() ?>
<div class="card mb-5"> <div class="card mb-5">
<div class="card-header"> <div class="card-header">
<h4 class="card-title"><?= Html::encode($this->title) ?></h4> <h4 class="card-title"><?= Html::encode($this->title) ?></h4>
</div> </div>
<div class="card-body"> <div class="card-body">
<?= $content ?> <?= $content ?>
<div class="mb-4"></div> <div class="mb-4"></div>
</div>
</div> </div>
</div>
<?php } else { ?> <?php } else { ?>
<?= Alert::widget() ?> <?= Alert::widget() ?>
<?= $content ?> <?= $content ?>
<?php } ?> <?php } ?>
</div> </div>
<!-- App body ends --> <!-- App body ends -->
<!-- App footer starts --> <!-- App footer starts -->
<div class="app-footer bg-white"> <div class="app-footer bg-white">
<span>HANUMAN PATHOLOGY LIS v202411 ผลิตในประเทศไทย © 2024 <?php // date('Y') ?> <span>HANUMAN PATHOLOGY LIS v202411 ผลิตในประเทศไทย © 2024 <?php // date('Y')
?>
<?= Html::a('HANUMANIT Co., Ltd.', 'https://hanumanit.co.th', ['target' => '_blank']) ?></span> <?= Html::a('HANUMANIT Co., Ltd.', 'https://hanumanit.co.th', ['target' => '_blank']) ?></span>
</div> </div>
<!-- App footer ends --> <!-- App footer ends -->
@ -341,11 +341,10 @@ $asset = Yii::$app->assetManager->getPublishedUrl('@frontend/themes/nikom/assets
] ]
]) ?> ]) ?>
<?php //$this->registerJsFile(Yii::getAlias('@web').'/js/noti.js') <?php //$this->registerJsFile(Yii::getAlias('@web').'/js/noti.js')
?> ?>
<?php $this->endBody() ?> <?php $this->endBody() ?>
</body> </body>
</html> </html>
<?php $this->endPage(); <?php $this->endPage();