diff --git a/common/models/CaConfirm.php b/common/models/CaConfirm.php
new file mode 100644
index 00000000..641c969a
--- /dev/null
+++ b/common/models/CaConfirm.php
@@ -0,0 +1,80 @@
+ 20],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'ID',
+ 'id_case' => 'ID Case',
+ 'report_type' => 'Report Type',
+ 'pathologist_id' => 'Request Confirm by',
+ 'pathologist2_id' => 'Pathologist2',
+ 'diagnosis_id' => 'Diagnosis',
+ 'remark' => 'Remark',
+ 'status' => 'Status',
+ 'created_at' => 'Created At',
+ 'updated_at' => 'Updated At',
+ 'created_by' => 'Created By',
+ 'updated_by' => 'Updated By',
+ ];
+ }
+
+ public function getPathologist()
+ {
+ return $this->hasOne(User::class, ['id' => 'pathologist_id']);
+ }
+}
diff --git a/common/models/SurgicalDiagnosis.php b/common/models/SurgicalDiagnosis.php
index db31978b..dbf4dc3c 100755
--- a/common/models/SurgicalDiagnosis.php
+++ b/common/models/SurgicalDiagnosis.php
@@ -72,10 +72,11 @@ class SurgicalDiagnosis extends PathologyActiveRecord
[['report_type', 'id_case'], 'required', 'on' => 'consult'],
[['diagnosis'], 'required', 'on' => 'pathologist'],
[['gross_description', 'microscopic_description', 'diagnosis', 'diagnosis_comment', 'review_remark'], 'string'],
- [['pathologist_id', 'status_id', 'is_critical_diagnosis', 'is_no_microscopic'/*, 'is_cancer'*/, 'reference_img_id', 'is_edit_patient_information', 'surgical_diagnosis_id', 'diagnosis_type', 'pathologist2_id', 'is_agree', /*'is_m'*/ 'diag_by', 'is_first_cancer', 'is_conference', 'is_review', 'patho_report_id', 'is_co_pathologist', 'co_pathologist_id'], 'integer'],
- [['report_at', 'conference_at', 'review_at'], 'safe'],
+ [['pathologist_id', 'status_id', 'is_critical_diagnosis', 'is_no_microscopic'/*, 'is_cancer'*/, 'reference_img_id', 'is_edit_patient_information', 'surgical_diagnosis_id', 'diagnosis_type', 'pathologist2_id', 'is_agree', /*'is_m'*/ 'diag_by', 'is_first_cancer', 'is_conference', 'is_review', 'patho_report_id', 'is_co_pathologist', 'co_pathologist_id', 'is_ca_confirm', 'is_ca_confirm_agree', 'is_suggesstion_ihc', 'is_suggesstion_special_stain', 'is_suggesstion_other'], 'integer'],
+ [['report_at', 'conference_at', 'review_at', 'is_ca_confirm_at', 'ca_confirm_remark', 'pathologist2_at'], 'safe'],
[['report_type', 'id_case', 'rev_date'], 'string', 'max' => 50],
[['rev'], 'string', 'max' => 100],
+ [['suggesstion_ihc', 'suggesstion_special_stain', 'suggesstion_other'], 'string', 'max' => 300],
[['reason'], 'string'],
[['outlab_report'], 'file', 'extensions' => 'pdf'],
[['consult_outlab_report'], 'file', 'extensions' => 'pdf'],
@@ -111,8 +112,18 @@ class SurgicalDiagnosis extends PathologyActiveRecord
'is_review' => 'Review Block/Slides',
'review_remark' => 'Review Block/Slides Remark',
'is_co_pathologist' => 'Co Pathologist?',
- 'co_pathologist_id' => 'Pathologist'
+ 'co_pathologist_id' => 'Pathologist',
//'is_cancer' => 'Cancer or Not?',
+ 'is_ca_confirm' => 'CA Confirm?',
+ 'is_ca_confirm_agree' => 'Agree/Disagree',
+ 'is_suggesstion_ihc' => 'IHC',
+ 'suggesstion_ihc' => 'IHC Suggestion',
+ 'is_suggesstion_special_stain' => 'Special Stain',
+ 'suggesstion_special_stain' => 'Special Stain Suggestion',
+ 'is_suggesstion_other' => 'Other',
+ 'suggesstion_other' => 'Other Suggestion',
+ 'pathologist2_id' => 'Pathologist 2',
+ 'ca_confirm_remark' => 'CA Confirm Remark',
];
}
diff --git a/frontend/modules/approve/views/center-approve-hpv/_all_report_pap.php b/frontend/modules/approve/views/center-approve-hpv/_all_report_pap.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/_cyto_screener.php b/frontend/modules/approve/views/center-approve-hpv/_cyto_screener.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/_form.php b/frontend/modules/approve/views/center-approve-hpv/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/_form_hpv.php b/frontend/modules/approve/views/center-approve-hpv/_form_hpv.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/_search.php b/frontend/modules/approve/views/center-approve-hpv/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/create.php b/frontend/modules/approve/views/center-approve-hpv/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/index.php b/frontend/modules/approve/views/center-approve-hpv/index.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/update.php b/frontend/modules/approve/views/center-approve-hpv/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/approve/views/center-approve-hpv/view.php b/frontend/modules/approve/views/center-approve-hpv/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/models/CytoGynStickerForm.php b/frontend/modules/cyto/models/CytoGynStickerForm.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/cyto-specimen-adequacy-1/_form.php b/frontend/modules/cyto/views/cyto-specimen-adequacy-1/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/cyto-specimen-adequacy-1/_search.php b/frontend/modules/cyto/views/cyto-specimen-adequacy-1/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/cyto-specimen-adequacy-1/create.php b/frontend/modules/cyto/views/cyto-specimen-adequacy-1/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/cyto-specimen-adequacy-1/index.php b/frontend/modules/cyto/views/cyto-specimen-adequacy-1/index.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/cyto-specimen-adequacy-1/update.php b/frontend/modules/cyto/views/cyto-specimen-adequacy-1/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/cyto-specimen-adequacy-1/view.php b/frontend/modules/cyto/views/cyto-specimen-adequacy-1/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/hpv/_old-hpv-all.php b/frontend/modules/cyto/views/hpv/_old-hpv-all.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/sticker/_sticker_gyn.php b/frontend/modules/cyto/views/sticker/_sticker_gyn.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/sticker/_sticker_old.php b/frontend/modules/cyto/views/sticker/_sticker_old.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/cyto/views/sticker/sticker-gyn.php b/frontend/modules/cyto/views/sticker/sticker-gyn.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/histo/controllers/StainingController.php b/frontend/modules/histo/controllers/StainingController.php
index fddfd401..9b71d485 100755
--- a/frontend/modules/histo/controllers/StainingController.php
+++ b/frontend/modules/histo/controllers/StainingController.php
@@ -29,7 +29,7 @@ class StainingController extends \yii\web\Controller
*/
public function actionAll()
{
- $searchModel = new HistoStainingSearch();
+ $searchModel = new HistoStainingNewSectionSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
/*$dataProvider->sort = [
@@ -223,7 +223,101 @@ class StainingController extends \yii\web\Controller
return $this->render('index');
}
+ /* public function actionNewRequest()
+ {
+ $case_search = new IdCaseForm();
+
+ $searchModel = new HistoStainingNewSectionSearch();
+ $searchModel->status_1 = 1;
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ $dataProvider->query->andWhere(['status_1' => 1]);
+
+
+ if (Yii::$app->request->post('selection')) { //แบบ selection
+ $time_now = date('Y-m-d H:i:s');
+ $selection = (array)Yii::$app->request->post('selection'); //typecasting
+ /*var_dump($selection);
+ die();
+ foreach ($selection as $id) {
+ $immuno_staining = ImmunoStaining::find()
+ ->where(['id_case' => $id])
+ ->andWhere(['status_1' => 1])
+ ->all();
+ foreach ($immuno_staining as $im) {
+ $ims = ImmunoStaining::findOne(['id' => $im->id]);
+ $ims->status_1 = 2;
+ $ims->receive_at = $time_now;
+ $ims->operate_id = Yii::$app->user->getId();
+ $ims->save();
+ }
+ }
+ Yii::$app->session->setFlash('success', 'รับเรียบร้อยแล้ว');
+ return $this->redirect(['new-request']);
+ }
+
+ if ($case_search->load(Yii::$app->request->get())) {
+ return $this->redirect(['get-staining', 'id_case' => $case_search->id_case]);
+ }
+ return $this->render('new-request', [
+ 'dataProvider' => $dataProvider,
+ 'searchModel' => $searchModel,
+ 'case_search' => $case_search,
+ ]);
+ }*/
+
public function actionNewRequest()
+ {
+ $case_search = new IdCaseForm();
+
+ $searchModel = new HistoStainingNewSectionSearch();
+ $searchModel->status_1 = 1;
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ $dataProvider->query->andWhere(['status_1' => 1]);
+ /*$dataProvider->sort = [
+ 'attributes' => [
+ 'id', 'hospital', 'id_case', 'pathologist', 'in_at', 'out_at', 'status_1'
+ ],
+ 'defaultOrder' => [
+ 'id' => SORT_DESC
+ ]
+ ];*/
+
+ if (Yii::$app->request->post('selection')) { //แบบ selection
+ $time_now = date('Y-m-d H:i:s');
+ $selection = (array)Yii::$app->request->post('selection'); //typecasting
+ /*var_dump($selection);
+ die();*/
+ foreach ($selection as $id) {
+ $histo_staining = HistoStaining::find()
+ ->where(['id_case' => $id])
+ ->andWhere(['status_1' => 1])
+ ->all();
+ foreach ($histo_staining as $im) {
+ $ims = HistoStaining::findOne(['id' => $im->id]);
+ $ims->status_1 = 2;
+ $ims->receive_at = $time_now;
+ $ims->operate_id = Yii::$app->user->getId();
+ $ims->save();
+ }
+ }
+ Yii::$app->session->setFlash('success', 'รับเรียบร้อยแล้ว');
+ return $this->redirect(['new-request']);
+ }
+
+ if ($case_search->load(Yii::$app->request->get())) {
+ return $this->redirect(['get-staining', 'id_case' => $case_search->id_case]);
+ }
+ return $this->render('new-request', [
+ 'dataProvider' => $dataProvider,
+ 'searchModel' => $searchModel,
+ 'case_search' => $case_search,
+ ]);
+ }
+
+
+ /*public function actionNewRequest()
{
//$model = new DateForm();
@@ -236,21 +330,13 @@ class StainingController extends \yii\web\Controller
];
//$dataProvider->pagination = false;
- // New IHC
- $searchModel_ihc = new ImmunoNewSectionStainingSearch();
- $dataProviderIhc = $searchModel_ihc->search(Yii::$app->request->queryParams);
- $dataProviderIhc->query->andWhere(['immuno_staining.status_1' => 1]);
- $dataProviderIhc->pagination = [
- 'pageSize' => 20,
- ];
-
if (Yii::$app->request->post('selection')) { //แบบ selection
$time_now = date('Y-m-d H:i:s');
$selection = (array)Yii::$app->request->post('selection'); //typecasting
/*var_dump($selection);
- die();*/
+ die();
foreach ($selection as $id) {
$histo_staining = HistoStaining::find()
@@ -272,16 +358,14 @@ class StainingController extends \yii\web\Controller
/*if ($case_search->load(Yii::$app->request->get())) {
return $this->redirect(['get-staining', 'id_case' => $case_search->id_case]);
- }*/
+ }
return $this->render('new-request', [
//'model' => $model,
'dataProviderSt' => $dataProviderSt,
- 'dataProviderIhc' => $dataProviderIhc,
'searchModel_st' => $searchModel_st,
- 'searchModel_ihc' => $searchModel_ihc,
]);
- }
+ }*/
public function actionPrintNewRequest()
{
@@ -1045,4 +1129,4 @@ class StainingController extends \yii\web\Controller
{
return $this->render('histo-check');
}
-}
+}
\ No newline at end of file
diff --git a/frontend/modules/histo/models/HistoHeSectionSearch_old.php b/frontend/modules/histo/models/HistoHeSectionSearch_old.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/histo/views/he/embed.php b/frontend/modules/histo/views/he/embed.php
index 83558012..17900d5e 100755
--- a/frontend/modules/histo/views/he/embed.php
+++ b/frontend/modules/histo/views/he/embed.php
@@ -77,6 +77,7 @@ $session = Yii::$app->session;
| Block No. |
+ Remark |
จำนวนชิ้นเนื้อ |
ผู้ Embed |
วันที่ Embed |
@@ -84,14 +85,19 @@ $session = Yii::$app->session;
joinWith(['histoHeEmbed'])->where(['id_case' => $session['he-embed-case']])->all() as $block): ?>
+ where(['id_case' => $session['he-embed-case']])
+ ->andWhere(['no_slide' => $block->block_no])
+ ->all(); ?>
| = $block->histoHeEmbed->id_case ?> = $block->block_no ?> |
where(['id_case' => $session['he-embed-case']])
- ->andWhere(['no_slide' => $block->block_no])
- ->all();
+ echo !empty($surgicalSlides) ? implode(', ', array_map(fn($slide) => $slide->remark, $surgicalSlides)) : '-';
+ ?>
+ |
+
+ $slide->quantity, $surgicalSlides)) : '-';
?>
|
@@ -124,9 +130,15 @@ $session = Yii::$app->session;
'label' => 'รายการ Block ที่ Embed แล้ว',
'format' => 'raw',
'value' => function ($model) {
- $rt = '| Block No. | ผู้ Embed | วันที่ Embed |
';
+ $rt = '| Block No. | ผู้ Embed | วันที่ Embed | Remark |
';
+
foreach (HistoHeEmbedDetail::find()->joinWith(['histoHeEmbed'])->where(['id_case' => $model->id_case])->all() as $block) {
- $rt .= '| ' . $block->block_no . ' | ' . $block->embedBy->realname . ' | ' . $block->embed_at . ' |
';
+ $surgicalSlides = SurgicalSlide::find()
+ ->where(['id_case' => $model->id_case])
+ ->andWhere(['no_slide' => $block->block_no])
+ ->all();
+ $remarks = array_map(fn($slide) => $slide->remark, $surgicalSlides);
+ $rt .= '| ' . $block->block_no . ' | ' . $block->embedBy->realname . ' | ' . $block->embed_at . ' | ' . implode(', ', $remarks) . ' |
';
}
$rt .= '
';
return $rt;
diff --git a/frontend/modules/histo/views/staining/new-request.php b/frontend/modules/histo/views/staining/new-request.php
index e4e742dd..d61ee8f8 100755
--- a/frontend/modules/histo/views/staining/new-request.php
+++ b/frontend/modules/histo/views/staining/new-request.php
@@ -15,7 +15,7 @@ use frontend\modules\histo\components\HistoComponent;
use common\models\HistoStaining;
use common\models\ImmunoStaining;
use common\models\User;
-use frontend\modules\immuno\components\ImmunoComponent;
+
$this->title = 'New Request Special';
$this->params['breadcrumbs'][] = $this->title;
@@ -37,8 +37,8 @@ $this->params['breadcrumbs'][] = $this->title;
= GridView::widget([
'pager' => ['class' => 'yii\bootstrap5\LinkPager'],
- 'dataProvider' => $dataProviderSt,
- 'filterModel' => $searchModel_st,
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'],
'layout' => "{summary}
{pager}
",
'columns' => [
@@ -162,7 +162,7 @@ $this->params['breadcrumbs'][] = $this->title;
//'filter' => ArrayHelper::map(ConstHospital::find()->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'),
'filter' => Select2::widget([
'theme' => Select2::THEME_BOOTSTRAP,
- 'model' => $searchModel_st,
+ 'model' => $searchModel,
'attribute' => 'pathologist_id',
'data' => ArrayHelper::map(User::find()->where(['role' => 'pathologist'])->all(), 'id', 'realname'),
'pluginOptions' => [
@@ -177,7 +177,7 @@ $this->params['breadcrumbs'][] = $this->title;
[
'attribute' => 'in_at',
'filter' => MaskedInput::widget([
- 'model' => $searchModel_st,
+ 'model' => $searchModel,
'attribute' => 'in_at',
'mask' => '99/99/9999'
]),
diff --git a/frontend/modules/histo/views/staining/section-case.php b/frontend/modules/histo/views/staining/section-case.php
index 8c56ef53..3fff309c 100755
--- a/frontend/modules/histo/views/staining/section-case.php
+++ b/frontend/modules/histo/views/staining/section-case.php
@@ -96,6 +96,31 @@ $this->params['breadcrumbs'][] = $this->title;
$rt .= '
';
return $rt;
}
+ ],[
+ 'label' => 'รายการย้อม Special',
+ 'format' => 'raw',
+ 'value' => function ($model) {
+ /*$staining = ImmunoStaining::find()
+ ->where(['id_case' => $model->id_case, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
+ //->andFilterWhere(['is', ''])
+ ->all();
+ foreach ($staining as $item) {
+ $finance = FinanceServiceCharge::find()
+ ->joinWith(['charge'])
+ ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno', 'id_case' => $item->id_case])
+ ->one();
+ $rt = (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ }
+ return $rt;*/
+ $finance = FinanceServiceCharge::find()
+ ->joinWith(['charge'])
+ ->where(['from_id' => $model->id, 'const_service_charge.lab' => 'immuno', 'id_case' => $model->id_case])
+ ->one();
+ if($finance){
+ return (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ }
+ return '';
+ }
],
[
'attribute' => 'id_case',
@@ -193,4 +218,4 @@ $this->params['breadcrumbs'][] = $this->title;
= Html::endForm() ?>
-
+
\ No newline at end of file
diff --git a/frontend/modules/histo/views/staining/send-case.php b/frontend/modules/histo/views/staining/send-case.php
index 9d5bf47d..c0a6d096 100755
--- a/frontend/modules/histo/views/staining/send-case.php
+++ b/frontend/modules/histo/views/staining/send-case.php
@@ -37,7 +37,8 @@ $this->params['breadcrumbs'][] = $this->title;
= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
- 'tableOptions' => ['class' => 'table truncate m-0 align-middle dataTable no-footer'],
+ 'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'],
+ 'layout' => "{summary}{pager}
",
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
@@ -66,21 +67,29 @@ $this->params['breadcrumbs'][] = $this->title;
],
'block_no',
[
- 'label' => 'รายการย้อม',
+ 'label' => 'รายการย้อม Special',
'format' => 'raw',
'value' => function ($model) {
- $staining = HistoStaining::find()
+ /*$staining = ImmunoStaining::find()
->where(['id_case' => $model->id_case, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
//->andFilterWhere(['is', ''])
->all();
foreach ($staining as $item) {
$finance = FinanceServiceCharge::find()
->joinWith(['charge'])
- ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'special'])
+ ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno', 'id_case' => $item->id_case])
->one();
$rt = (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
}
- return $rt;
+ return $rt;*/
+ $finance = FinanceServiceCharge::find()
+ ->joinWith(['charge'])
+ ->where(['from_id' => $model->id, 'const_service_charge.lab' => 'special', 'id_case' => $model->id_case])
+ ->one();
+ if($finance){
+ return (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ }
+ return '';
}
],
[
diff --git a/frontend/modules/histo/views/staining/staining-case.php b/frontend/modules/histo/views/staining/staining-case.php
index 09d98b92..9550b8c0 100755
--- a/frontend/modules/histo/views/staining/staining-case.php
+++ b/frontend/modules/histo/views/staining/staining-case.php
@@ -37,7 +37,8 @@ $this->params['breadcrumbs'][] = $this->title;
= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
- 'tableOptions' => ['class' => 'table truncate m-0 align-middle dataTable no-footer'],
+ 'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'],
+ 'layout' => "{summary}{pager}
",
'columns' => [
[
'class' => 'yii\grid\CheckboxColumn',
@@ -72,21 +73,29 @@ $this->params['breadcrumbs'][] = $this->title;
],
'block_no',
[
- 'label' => 'รายการย้อม',
+ 'label' => 'รายการย้อม Special',
'format' => 'raw',
'value' => function ($model) {
- $staining = HistoStaining::find()
+ /*$staining = ImmunoStaining::find()
->where(['id_case' => $model->id_case, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
//->andFilterWhere(['is', ''])
->all();
foreach ($staining as $item) {
$finance = FinanceServiceCharge::find()
->joinWith(['charge'])
- ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'special'])
+ ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno', 'id_case' => $item->id_case])
->one();
$rt = (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
}
- return $rt;
+ return $rt;*/
+ $finance = FinanceServiceCharge::find()
+ ->joinWith(['charge'])
+ ->where(['from_id' => $model->id, 'const_service_charge.lab' => 'special', 'id_case' => $model->id_case])
+ ->one();
+ if($finance){
+ return (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ }
+ return '';
}
],
[
diff --git a/frontend/modules/immuno/controllers/StainingController.php b/frontend/modules/immuno/controllers/StainingController.php
index a00b6238..5cc17005 100755
--- a/frontend/modules/immuno/controllers/StainingController.php
+++ b/frontend/modules/immuno/controllers/StainingController.php
@@ -369,9 +369,9 @@ class StainingController extends \yii\web\Controller
/*
- * แสดงรายการ New Special & IHC
+ * แสดงรายการ New IHC
*/
- public function actionNewRequest()
+ /*public function actionNewRequest()
{
$case_search = new IdCaseForm();
@@ -381,7 +381,7 @@ class StainingController extends \yii\web\Controller
$dataProvider->query->andWhere(['histo_staining.status_1' => 1]);
$dataProvider->pagination = [
'pageSize' => 20,
- ];*/
+ ];
//Section IHC
$searchModel = new ImmunoNewSectionStainingSearch();
@@ -395,7 +395,7 @@ class StainingController extends \yii\web\Controller
/*$time_now = date('Y-m-d H:i:s');
$this->sectionSelectionSpecial($selection, 'HistoStaining', $time_now);
- $this->sectionSelectionImmuno($selection, 'ImmunoStaining', $time_now);*/
+ $this->sectionSelectionImmuno($selection, 'ImmunoStaining', $time_now);
$time_now = date('Y-m-d H:i:s');
//$this->sectionSelectionNewSpecial($selection, $time_now);
@@ -409,66 +409,61 @@ class StainingController extends \yii\web\Controller
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
/*'dataProviderIhc' => $dataProviderIhc,
- 'searchModel_ihc' => $searchModel_ihc,*/
+ 'searchModel_ihc' => $searchModel_ihc,
+ 'case_search' => $case_search,
+ ]);
+ }*/
+
+ public function actionNewRequest()
+ {
+ $case_search = new IdCaseForm();
+
+ $searchModel = new ImmunoNewSectionStainingSearch();
+ $searchModel->status_1 = 1;
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ $dataProvider->query->andWhere(['status_1' => 1]);
+ /*$dataProvider->sort = [
+ 'attributes' => [
+ 'id', 'hospital', 'id_case', 'pathologist', 'in_at', 'out_at', 'status_1'
+ ],
+ 'defaultOrder' => [
+ 'id' => SORT_DESC
+ ]
+ ];*/
+
+ if (Yii::$app->request->post('selection')) { //แบบ selection
+ $time_now = date('Y-m-d H:i:s');
+ $selection = (array)Yii::$app->request->post('selection'); //typecasting
+ /*var_dump($selection);
+ die();*/
+ foreach ($selection as $id) {
+ $immuno_staining = ImmunoStaining::find()
+ ->where(['id_case' => $id])
+ ->andWhere(['status_1' => 1])
+ ->all();
+ foreach ($immuno_staining as $im) {
+ $ims = ImmunoStaining::findOne(['id' => $im->id]);
+ $ims->status_1 = 2;
+ $ims->receive_at = $time_now;
+ $ims->operate_id = Yii::$app->user->getId();
+ $ims->save();
+ }
+ }
+ Yii::$app->session->setFlash('success', 'รับเรียบร้อยแล้ว');
+ return $this->redirect(['new-request']);
+ }
+
+ if ($case_search->load(Yii::$app->request->get())) {
+ return $this->redirect(['get-staining', 'id_case' => $case_search->id_case]);
+ }
+ return $this->render('new-request', [
+ 'dataProvider' => $dataProvider,
+ 'searchModel' => $searchModel,
'case_search' => $case_search,
]);
}
- //เปลี่ยนสถานะ จาก NewRequest เป็น Section ย้อม Special
- /* public function sectionSelectionNewSpecial($selection, $time_now)
- {
- foreach ($selection as $id) {
- $special_staining = HistoStaining::find()->innerJoinWith(['immunoStaining'])->where(['histo_staining.id_case' => $id, 'histo_staining.status_1' => 1])->groupBy(['histo_staining.id_case', 'histo_staining.in_at', 'immuno_staining.id_case', 'immuno_staining.in_at'])->all();
- foreach ($special_staining as $sp) {
- $sps = HistoStaining::findOne(['id' => $sp->id]);
- $sps->status_1 = 2;
- $sps->prepare_at = $time_now;
- $sps->operate_id = Yii::$app->user->getId();
- $sps->save();
-
- /*Yii::$app->session->setFlash('success', 'รับงานเรียบร้อยแล้ว.');
- return $this->redirect(['section-case']);
- }
- }
- }*/
-
- //เปลี่ยนสถานะ จาก NewRequest เป็น Section ย้อม Immuno
- public function sectionSelectionNewImmuno($selection, $time_now)
- {
- foreach ($selection as $id) {
- //$immuno_staining = ImmunoStaining::findOne(['id_case' => $id, 'status_1' => 1]);
- $immuno_staining = ImmunoStaining::find()
- ->where(['id_case' => $id])
- ->andWhere(['status_1' => 1])
- ->all();
- foreach ($immuno_staining as $im) {
- /*var_dump($im);
- die();*/
- $ims = ImmunoStaining::findOne(['id' => $im->id]);
- $ims->status_1 = 2;
- $ims->receive_at = $time_now;
- $ims->operate_id = Yii::$app->user->getId();
- $ims->save();
-
- /*Yii::$app->session->setFlash('success', 'รับงานเรียบร้อยแล้ว.');
- return $this->redirect(['section-case']);*/
- }
-
- $special_staining = HistoStaining::find()->innerJoinWith(['immunoStaining'])->where(['histo_staining.id_case' => $id, 'histo_staining.status_1' => 1])->groupBy(['histo_staining.id_case', 'histo_staining.in_at', 'immuno_staining.id_case', 'immuno_staining.in_at'])->all();
- foreach ($special_staining as $sp) {
- $sps = HistoStaining::findOne(['id' => $sp->id]);
- $sps->status_1 = 2;
- $sps->prepare_at = $time_now;
- $sps->operate_id = Yii::$app->user->getId();
- $sps->save();
-
- /*Yii::$app->session->setFlash('success', 'รับงานเรียบร้อยแล้ว.');
- return $this->redirect(['section-case']);*/
- }
- }
- }
-
-
/*public function actionNewRequest()
{
$case_search = new IdCaseForm();
@@ -1011,23 +1006,12 @@ class StainingController extends \yii\web\Controller
->andWhere(['status_1' => 2])
->all();
foreach ($immuno_staining as $im) {
-
$ims = ImmunoStaining::findOne(['id' => $im->id]);
$ims->status_1 = 3;
$ims->section_at = $time_now;
$ims->section_id = Yii::$app->user->getId();
$ims->save();
}
-
- $special_staining = HistoStaining::find()->innerJoinWith(['immunoStaining'])->where(['histo_staining.id_case' => $id, 'histo_staining.status_1' => 2])->groupBy(['histo_staining.id_case', 'histo_staining.in_at', 'immuno_staining.id_case', 'immuno_staining.in_at'])->all();
- //$item = HistoStaining::findOne(['id_case' => $id_case, 'status_1' => 1]);
- foreach ($special_staining as $sp) {
- $sps = HistoStaining::findOne(['id' => $sp->id]);
- $sps->status_1 = 3;
- $sps->section_at = $time_now;
- $sps->section_id = Yii::$app->user->getId();
- $sps->save();
- }
}
}
@@ -1063,7 +1047,6 @@ class StainingController extends \yii\web\Controller
}
}*/
-
/*
* แสดงรายการที่กำลังย้อม
*/
@@ -1129,12 +1112,8 @@ class StainingController extends \yii\web\Controller
];
if ($selection = Yii::$app->request->post('selection')) {
- /*$time_now = date('Y-m-d H:i:s');
- $this->stainingSelectionSpecial($selection, 'HistoStaining', $time_now);
- $this->stainingSelectionImmuno($selection, 'ImmunoStaining', $time_now);*/
$time_now = date('Y-m-d H:i:s');
- $this->stainingSelectionSpecial($selection, $time_now);
$this->stainingSelectionImmuno($selection, $time_now);
Yii::$app->session->setFlash('success', 'ส่งงานเรียบร้อยแล้ว');
@@ -1152,24 +1131,6 @@ class StainingController extends \yii\web\Controller
]);
}
- //เปลี่ยนสถานะ จาก Staining เป็น Send ย้อม Special
- public function stainingSelectionSpecial($selection, $time_now)
- {
- foreach ($selection as $id) {
-
- $item = HistoStaining::findOne(['id' => $id, 'status_1' => 3]);
-
- if ($item) {
- $item->status_1 = 4;
- $item->staining_at = $time_now;
- $item->out_at = $time_now;
- $item->staining_id = Yii::$app->user->getId();
- $item->send_id = Yii::$app->user->getId();
- $item->save();
- }
- }
- }
-
//เปลี่ยนสถานะ จาก Staining เป็น Send ย้อม Imuuno
public function stainingSelectionImmuno($selection, $time_now)
{
@@ -1316,13 +1277,6 @@ class StainingController extends \yii\web\Controller
{
$case_search = new IdCaseForm();
- // Staining Spacial
- $searchModel_st = new HistoStainingAllSearch();
- $dataProviderSt = $searchModel_st->search(Yii::$app->request->queryParams);
- $dataProviderSt->query->andWhere(['status_1' => 4]);
- $dataProviderSt->pagination = [
- 'pageSize' => 50,
- ];
// Staining IHC
$searchModel_ihc = new ImmunoStainingSearch();
@@ -1334,8 +1288,6 @@ class StainingController extends \yii\web\Controller
return $this->render('send-case', [
- 'searchModel_st' => $searchModel_st,
- 'dataProviderSt' => $dataProviderSt,
'dataProviderIhc' => $dataProviderIhc,
'searchModel_ihc' => $searchModel_ihc,
'case_search' => $case_search,
diff --git a/frontend/modules/immuno/views/staining/all.php b/frontend/modules/immuno/views/staining/all.php
index 6e894f0d..48ba2eef 100755
--- a/frontend/modules/immuno/views/staining/all.php
+++ b/frontend/modules/immuno/views/staining/all.php
@@ -29,8 +29,8 @@ $this->params['breadcrumbs'][] = $this->title;
= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
- 'tableOptions' => ['class' => 'table table-striped truncate m-0'],
- 'layout' => "{summary}{pager}
",
+ 'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'],
+ 'layout' => "{summary}{pager}
",
'columns' => [
['class' => 'yii\grid\SerialColumn'],
/*[
@@ -63,23 +63,31 @@ $this->params['breadcrumbs'][] = $this->title;
],
'block_no',
[
- 'label' => 'รายการย้อม',
- 'format' => 'raw',
- 'value' => function ($model) {
- $staining = ImmunoStaining::find()
- ->where(['id' => $model->id, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
- //->andFilterWhere(['is', ''])
- ->all();
- foreach ($staining as $item) {
+ 'label' => 'รายการย้อม',
+ 'format' => 'raw',
+ 'value' => function ($model) {
+ /*$staining = ImmunoStaining::find()
+ ->where(['id_case' => $model->id_case, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
+ //->andFilterWhere(['is', ''])
+ ->all();
+ foreach ($staining as $item) {
+ $finance = FinanceServiceCharge::find()
+ ->joinWith(['charge'])
+ ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno', 'id_case' => $item->id_case])
+ ->one();
+ $rt = (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ }
+ return $rt;*/
$finance = FinanceServiceCharge::find()
->joinWith(['charge'])
- ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno'])
+ ->where(['from_id' => $model->id, 'const_service_charge.lab' => 'immuno', 'id_case' => $model->id_case])
->one();
- $rt = (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ if($finance){
+ return (isset($finance->charge) ? $finance->charge->code : '') . ' ' . (isset($finance->charge) ? $finance->charge->name : '');
+ }
+ return '';
}
- return $rt;
- }
- ],
+ ],
[
'attribute' => 'id_case',
'headerOptions' => ['style' => 'text-align:center; width: 150;'],
diff --git a/frontend/modules/immuno/views/staining/get-staining.php b/frontend/modules/immuno/views/staining/get-staining.php
index 2008d82c..63d6f539 100755
--- a/frontend/modules/immuno/views/staining/get-staining.php
+++ b/frontend/modules/immuno/views/staining/get-staining.php
@@ -55,7 +55,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'send_id',
'label' => 'ผู้ส่งงาน',
'format' => 'raw',
- 'value' => isset($immuno_staining->operate_id) > 1 ? $immuno_staining['send']['realname'] . '
' . $immuno_staining['out_at'] : '',
+ 'value' => isset($immuno_staining->operate_id) > 1 ? $immuno_staining['send']['realname'] . '
' . $immuno_staining['send_at'] : '',
'valueColOptions' => ['style' => 'width:30%']
]
],
@@ -85,7 +85,7 @@ $this->params['breadcrumbs'][] = $this->title;
[
'format' => 'raw',
'label' => 'ชื่อ',
- 'value' => isset($caseSurgical) ? $caseSurgical->getFullname() : null,
+ 'value' => isset($case) ? $case->getFullname() : null,
'valueColOptions' => ['style' => 'width:30%']
],
[
@@ -461,7 +461,7 @@ $this->params['breadcrumbs'][] = $this->title;
\ No newline at end of file
diff --git a/frontend/modules/immuno/views/staining/new-request.php b/frontend/modules/immuno/views/staining/new-request.php
index 74e4130b..a3309613 100755
--- a/frontend/modules/immuno/views/staining/new-request.php
+++ b/frontend/modules/immuno/views/staining/new-request.php
@@ -17,7 +17,7 @@ use frontend\modules\immuno\components\ImmunoComponent;
use kartik\select2\Select2;
use yii\helpers\ArrayHelper;
-$this->title = 'New Request Special & IHC';
+$this->title = 'New Request IHC';
$this->params['breadcrumbs'][] = ['url' => '/immuno/staining/index', 'label' => 'Immunohistochemistry Staining (IHC)'];
$this->params['breadcrumbs'][] = $this->title;
?>
diff --git a/frontend/modules/immuno/views/staining/section-case.php b/frontend/modules/immuno/views/staining/section-case.php
index 3bd13aff..02a8add2 100755
--- a/frontend/modules/immuno/views/staining/section-case.php
+++ b/frontend/modules/immuno/views/staining/section-case.php
@@ -16,7 +16,7 @@ use yii\widgets\MaskedInput;
use kartik\select2\Select2;
use yii\helpers\ArrayHelper;
-$this->title = 'Section Case Special & IHC';
+$this->title = 'Section Case IHC';
$this->params['breadcrumbs'][] = ['url' => '/immuno/staining/index', 'label' => 'Immunohistochemistry Staining (IHC)'];
$this->params['breadcrumbs'][] = $this->title;
?>
@@ -76,27 +76,29 @@ $this->params['breadcrumbs'][] = $this->title;
}
],
[
- 'label' => 'รายการย้อม Special',
- 'format' => 'raw',
- 'value' => function ($model) {
- $staining = HistoStaining::find()
- ->where(['id_case' => $model->id_case, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
- //->andFilterWhere(['is', ''])
- ->all();
- $rt = '| Block No. | Test | Note | ผู้รับงาน | วันรับงาน |
';
- foreach ($staining as $item) {
- $finance = FinanceServiceCharge::find()
- ->joinWith(['charge'])
- ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'special'])
- ->one();
- $rt .= '';
- $rt .= '| ' . $item->block_no . ' | ' . (isset($finance->charge) ? $finance->charge->name : '') . ' | ' . (isset($item->note) ? $item->note : '') . ' | ' . (isset($item->operate) ? $item->operate->realname : '') . ' | ' . $item->prepare_at . ' | ';
- $rt .= '
';
- }
- $rt .= '
';
- return $rt;
+ 'label' => 'รายการย้อม IHC',
+ 'format' => 'raw',
+ 'value' => function ($model) {
+ $staining = ImmunoStaining::find()
+ ->where(['id_case' => $model->id_case, 'in_at' => Yii::$app->pathology->engDateTime($model->in_at)])
+ //->andFilterWhere(['is', ''])
+ ->all();
+
+ $rt = '| Block No. | Test | note | ผู้รับงาน | วันที่รับงาน |
';
+ foreach ($staining as $item) {
+ $finance = FinanceServiceCharge::find()
+ ->joinWith(['charge'])
+ ->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno'])
+ ->one();
+ $rt .= '';
+ $rt .= '| ' . $item->block_no . ' | ' . (isset($finance->charge) ? $finance->charge->name : '') . ' | ' . (isset($item->note) ? $item->note : '') . ' | ' . (isset($item->operate) ? $item->operate->realname : '') . ' | ' . (isset($item->receive_at) ? $item->receive_at : '') . ' | ';
+ $rt .= '
';
}
- ],
+ $rt .= '
';
+
+ return $rt;
+ }
+ ],
[
'attribute' => 'id_case',
'headerOptions' => ['style' => 'text-align:center; width: 150;'],
diff --git a/frontend/modules/pathologist/controllers/CaConfirmController.php b/frontend/modules/pathologist/controllers/CaConfirmController.php
new file mode 100755
index 00000000..63c287c4
--- /dev/null
+++ b/frontend/modules/pathologist/controllers/CaConfirmController.php
@@ -0,0 +1,185 @@
+ [
+ 'class' => VerbFilter::className(),
+ 'actions' => [
+ 'delete' => ['POST'],
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Lists all CaConfirm models.
+ * @return mixed
+ */
+ public function actionIndex()
+ {
+ $searchModel = new CaConfirmSearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ ]);
+ }
+
+ /**
+ * Lists all CaConfirm models.
+ * @return mixed
+ */
+ public function actionSurgical()
+ {
+ $searchModel = new CaConfirmSearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('surgical', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ ]);
+ }
+
+ /**
+ * Displays a single CaConfirm model.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionConfirmSurgical($id)
+ {
+ $model = $this->findModel($id);
+ $case_surgical = CaseSurgical::findOne(['id_case' => $model->id_case]);
+ $diagnosis = SurgicalDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => $model->report_type, 'id' => $model->diagnosis_id]);
+ if ($diagnosis->load(Yii::$app->request->post())) {
+ $action = Yii::$app->request->post('surgical');
+
+ if ($action == 'save') {
+ if ($diagnosis->save()) {
+ $model->remark = $diagnosis->ca_confirm_remark;
+ $model->save();
+ }
+ Yii::$app->session->setFlash('success', 'Save successfully.');
+ return $this->redirect(['confirm-surgical', 'id' => $id]);
+ } elseif ($action == 'approve') {
+ $diagnosis->pathologist2_at = date('Y-m-d H:i:s');
+ if ($diagnosis->save()) {
+ $diagnosis->pathologist2_at = date('Y-m-d H:i:s');
+ $model->status = 2; // 2 = approved
+ $model->remark = $diagnosis->ca_confirm_remark;
+ $model->save();
+ }
+ Yii::$app->session->setFlash('success', 'Approve successfully.');
+ }
+ return $this->redirect(['surgical']);
+ }
+
+ return $this->render('confirm', [
+ 'model' => $this->findModel($id),
+ 'case_surgical' => $case_surgical,
+ 'diagnosis' => $diagnosis,
+ ]);
+ }
+
+ /**
+ * Displays a single CaConfirm model.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionView($id)
+ {
+ return $this->render('view', [
+ 'model' => $this->findModel($id),
+ ]);
+ }
+
+ /**
+ * Creates a new CaConfirm model.
+ * If creation is successful, the browser will be redirected to the 'view' page.
+ * @return mixed
+ */
+ public function actionCreate()
+ {
+ $model = new CaConfirm();
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'id' => $model->id]);
+ }
+
+ return $this->render('create', [
+ 'model' => $model,
+ ]);
+ }
+
+ /**
+ * Updates an existing CaConfirm model.
+ * If update is successful, the browser will be redirected to the 'view' page.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionUpdate($id)
+ {
+ $model = $this->findModel($id);
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'id' => $model->id]);
+ }
+
+ return $this->render('update', [
+ 'model' => $model,
+ ]);
+ }
+
+ /**
+ * Deletes an existing CaConfirm model.
+ * If deletion is successful, the browser will be redirected to the 'index' page.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionDelete($id)
+ {
+ $this->findModel($id)->delete();
+
+ return $this->redirect(['index']);
+ }
+
+ /**
+ * Finds the CaConfirm model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param integer $id
+ * @return CaConfirm the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($id)
+ {
+ if (($model = CaConfirm::findOne(['id' => $id, 'pathologist2_id' => Yii::$app->user->getId()])) !== null) {
+ return $model;
+ }
+
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+}
diff --git a/frontend/modules/pathologist/controllers/DoController.php b/frontend/modules/pathologist/controllers/DoController.php
index dbb75cf7..78ecab31 100755
--- a/frontend/modules/pathologist/controllers/DoController.php
+++ b/frontend/modules/pathologist/controllers/DoController.php
@@ -60,6 +60,7 @@ use common\models\FinanceServiceCharge;
use common\models\PathologistDiagnosis;
use common\models\FrozenDiagnosisPatient;
use common\models\AutopsyDiagnosisPatient;
+use common\models\CaConfirm;
use common\models\SurgicalDiagnosisPatient;
use common\models\MolecularDiagnosisPatient;
use common\models\CytoNonGynDiagnosisPatient;
@@ -9011,7 +9012,7 @@ class DoController extends \yii\web\Controller
$case_surgical->status_id = 15;
$case_surgical->save();
$model->save();
- Yii::$app->session->setFlash('success', 'บันทึกข้อมูลเรียบร้อยแล้ว');
+ Yii::$app->session->addFlash('success', 'บันทึกข้อมูลเรียบร้อยแล้ว');
return $this->redirect(['/pathologist/surgical-micro-img/create', 'id_case' => $case_surgical->id_case, 'report_type' => $model->report_type, 'surgical_diagnosis_id' => $model->id]);
}
@@ -9037,6 +9038,13 @@ class DoController extends \yii\web\Controller
} // if !empty()
+ if ($model->is_ca_confirm == 1) {
+ $model->is_ca_confirm_at = date('Y-m-d H:i:s');
+ }
+ if ($model->is_ca_confirm == 0) {
+ $model->is_ca_confirm_at = null;
+ }
+
if ($action == 'save') {
/*var_dump($case_surgical);
var_dump($model);
@@ -9058,7 +9066,33 @@ class DoController extends \yii\web\Controller
}
} //foreach Coder
} //Coder
- Yii::$app->session->setFlash('success', 'บันทึกข้อมูลเรียบร้อยแล้ว');
+
+ if ($model->is_ca_confirm == 1) {
+ $ca_confirm = CaConfirm::findOne([
+ 'id_case' => $model->id_case,
+ 'report_type' => $model->report_type,
+ 'pathologist_id' => Yii::$app->user->getId(),
+ 'pathologist2_id' => $model->pathologist2_id,
+ 'diagnosis_id' => $model->id
+ ]);
+ if (!$ca_confirm) {
+ $ca_confirm = new CaConfirm();
+ $ca_confirm->id_case = $model->id_case;
+ $ca_confirm->report_type = $model->report_type;
+ $ca_confirm->pathologist_id = Yii::$app->user->getId();
+ $ca_confirm->pathologist2_id = $model->pathologist2_id;
+ $ca_confirm->diagnosis_id = $model->id;
+ $ca_confirm->status = 1;
+ }
+ if ($ca_confirm->status == 1) { // ยังไม่ยืนยัน
+ $ca_confirm->remark = $model->ca_confirm_remark;
+ if ($ca_confirm->save()) {
+ Yii::$app->session->addFlash('success', 'บันทึกข้อมูล CA Confirm เรียบร้อยแล้ว');
+ }
+ }
+ }
+
+ Yii::$app->session->addFlash('success', 'บันทึกข้อมูลเรียบร้อยแล้ว');
if ($model->report_type == 'preliminary') {
return $this->redirect(['/pathologist/do/surgical-preliminary', 'id_case' => $case_surgical->id_case, 'type' => $model->report_type]);
}
@@ -9075,6 +9109,31 @@ class DoController extends \yii\web\Controller
$case_surgical->status_id = 17;
if ($case_surgical->save() && $model->save()) {
+ if ($model->is_ca_confirm == 1) {
+ $ca_confirm = CaConfirm::findOne([
+ 'id_case' => $model->id_case,
+ 'report_type' => $model->report_type,
+ 'pathologist_id' => Yii::$app->user->getId(),
+ 'pathologist2_id' => $model->pathologist2_id,
+ 'diagnosis_id' => $model->id
+ ]);
+ if (!$ca_confirm) {
+ $ca_confirm = new CaConfirm();
+ $ca_confirm->id_case = $model->id_case;
+ $ca_confirm->report_type = $model->report_type;
+ $ca_confirm->pathologist_id = Yii::$app->user->getId();
+ $ca_confirm->pathologist2_id = $model->pathologist2_id;
+ $ca_confirm->diagnosis_id = $model->id;
+ $ca_confirm->status = 1;
+ }
+ if ($ca_confirm->status == 1) { // ยังไม่ยืนยัน
+ $ca_confirm->remark = $model->ca_confirm_remark;
+ if ($ca_confirm->save()) {
+ Yii::$app->session->addFlash('success', 'บันทึกข้อมูล CA Confirm เรียบร้อยแล้ว');
+ }
+ }
+ }
+
$center_approve = CenterApprove::findOne([
'id_case' => $model->id_case,
'report_type' => $model->report_type,
@@ -9097,7 +9156,7 @@ class DoController extends \yii\web\Controller
//@Yii::$app->runAction('/pathologist/hl7/result', ['id_case' => $model->id_case, 'report_type' => $model->report_type, 'diagnosis_id' => $model->id]);
- Yii::$app->session->setFlash('success', 'บันทึกข้อมูลและยืนยัน (Approved) ผล Final Report เรียบร้อยแล้ว');
+ Yii::$app->session->addFlash('success', 'บันทึกข้อมูลและยืนยัน (Approved) ผล Final Report เรียบร้อยแล้ว');
return $this->redirect(['/pathologist/task/surgical-all']);
}
@@ -19228,4 +19287,4 @@ class DoController extends \yii\web\Controller
'dataProviderReport' => $dataProviderReport,
]);
}
-}
+}
\ No newline at end of file
diff --git a/frontend/modules/pathologist/models/CaConfirmSearch.php b/frontend/modules/pathologist/models/CaConfirmSearch.php
new file mode 100755
index 00000000..66fbb816
--- /dev/null
+++ b/frontend/modules/pathologist/models/CaConfirmSearch.php
@@ -0,0 +1,77 @@
+ $query,
+ ]);
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ // grid filtering conditions
+ $query->andFilterWhere([
+ 'id' => $this->id,
+ 'pathologist_id' => $this->pathologist_id,
+ 'pathologist2_id' => $this->pathologist2_id,
+ 'diagnosis_id' => $this->diagnosis_id,
+ 'created_at' => $this->created_at,
+ 'updated_at' => $this->updated_at,
+ 'created_by' => $this->created_by,
+ 'updated_by' => $this->updated_by,
+ ]);
+
+ $query->andFilterWhere(['like', 'id_case', $this->id_case])
+ ->andFilterWhere(['like', 'report_type', $this->report_type])
+ ->andFilterWhere(['like', 'remark', $this->remark]);
+
+ return $dataProvider;
+ }
+}
diff --git a/frontend/modules/pathologist/views/ca-confirm/_form.php b/frontend/modules/pathologist/views/ca-confirm/_form.php
new file mode 100755
index 00000000..42aab35d
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/_form.php
@@ -0,0 +1,41 @@
+
+
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/_search.php b/frontend/modules/pathologist/views/ca-confirm/_search.php
new file mode 100755
index 00000000..aae1525a
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/_search.php
@@ -0,0 +1,47 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'id_case') ?>
+
+ = $form->field($model, 'report_type') ?>
+
+ = $form->field($model, 'pathologist_id') ?>
+
+ = $form->field($model, 'pathologist2_id') ?>
+
+ field($model, 'diagnosis_id') ?>
+
+ field($model, 'remark') ?>
+
+ field($model, 'created_at') ?>
+
+ field($model, 'updated_at') ?>
+
+ field($model, 'created_by') ?>
+
+ field($model, 'updated_by') ?>
+
+
+ = Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton('Reset', ['class' => 'btn btn-outline-secondary']) ?>
+
+
+
+
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/confirm.php b/frontend/modules/pathologist/views/ca-confirm/confirm.php
new file mode 100755
index 00000000..4b5cdf14
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/confirm.php
@@ -0,0 +1,93 @@
+title = 'CA Confirm';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+
+
+ = $form->field($diagnosis, 'ca_confirm_remark')->textarea(['rows' => 6]) ?>
+
+ = $form->field($diagnosis, 'is_ca_confirm_agree')->radioList([
+ 1 => 'Agree',
+ 2 => 'Disagree',
+ ], [
+ 'id' => 'is_ca_confirm_agree',
+ ]); ?>
+
+
+
+
+ | = $form->field($diagnosis, 'is_suggesstion_ihc')->checkbox() ?> |
+ = $form->field($diagnosis, 'suggesstion_ihc')->textInput(['maxlength' => true]) ?> |
+
+
+ | = $form->field($diagnosis, 'is_suggesstion_special_stain')->checkbox() ?> |
+ = $form->field($diagnosis, 'suggesstion_special_stain')->textInput(['maxlength' => true]) ?> |
+
+
+ | = $form->field($diagnosis, 'is_suggesstion_other')->checkbox() ?> |
+ = $form->field($diagnosis, 'suggesstion_other')->textInput(['maxlength' => true]) ?> |
+
+
+
+ = $form->errorSummary($diagnosis) ?>
+
+
+ = Html::submitButton(' Save', ['class' => 'btn btn-success btn-block', 'value' => 'save', 'name' => 'surgical']) ?>
+
+
+ = Html::submitButton(' Approve', ['class' => 'btn btn-primary btn-block', 'value' => 'approve', 'name' => 'surgical']) ?>
+
+
+
+ registerJs($script);
+ ?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/modules/pathologist/views/ca-confirm/create.php b/frontend/modules/pathologist/views/ca-confirm/create.php
new file mode 100755
index 00000000..a99bf93b
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/create.php
@@ -0,0 +1,20 @@
+title = 'Create Ca Confirm';
+$this->params['breadcrumbs'][] = ['label' => 'Ca Confirms', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/gyn.php b/frontend/modules/pathologist/views/ca-confirm/gyn.php
new file mode 100755
index 00000000..25162726
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/gyn.php
@@ -0,0 +1,9 @@
+
+ca-confirm/gyn
+
+
+ You may change the content of this page by modifying
+ the file = __FILE__; ?>.
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/index.php b/frontend/modules/pathologist/views/ca-confirm/index.php
new file mode 100755
index 00000000..0510d762
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/index.php
@@ -0,0 +1,46 @@
+title = 'Ca Confirms';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Create Ca Confirm', ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ render('_search', ['model' => $searchModel]); ?>
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'id_case',
+ 'report_type',
+ 'pathologist_id',
+ 'pathologist2_id',
+ //'diagnosis_id',
+ //'remark:ntext',
+ //'created_at',
+ //'updated_at',
+ //'created_by',
+ //'updated_by',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/non-gyn.php b/frontend/modules/pathologist/views/ca-confirm/non-gyn.php
new file mode 100755
index 00000000..a0a130bb
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/non-gyn.php
@@ -0,0 +1,9 @@
+
+ca-confirm/non-gyn
+
+
+ You may change the content of this page by modifying
+ the file = __FILE__; ?>.
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/surgical.php b/frontend/modules/pathologist/views/ca-confirm/surgical.php
new file mode 100755
index 00000000..cec1b1c6
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/surgical.php
@@ -0,0 +1,74 @@
+title = 'CA Confirm Surgical';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+ render('_search', ['model' => $searchModel]);
+ ?>
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+
+ 'id_case',
+ 'report_type',
+ [
+ 'attribute' => 'pathologist_id',
+ 'value' => function ($model) {
+ return $model->pathologist->report_name;
+ },
+ 'filter' => ArrayHelper::map(User::find()->where(['role' => 'pathologist', 'status' => User::STATUS_ACTIVE])->all(), 'id', 'report_name'),
+ ],
+ 'remark:ntext',
+ [
+ 'attribute' => 'status',
+ 'filter' => [
+ 1 => 'Not Confirmed',
+ 2 => 'Confirmed',
+ ],
+ 'format' => 'raw',
+ 'value' => function ($model) {
+ return $model->status == 1 ? 'Not Confirmed' : 'Confirmed';
+ },
+
+ ],
+ //'created_at',
+ //'updated_at',
+ //'created_by',
+ //'updated_by',
+
+ [
+ 'class' => 'yii\grid\ActionColumn',
+ 'template' => '{view}',
+ 'buttons' => [
+ 'view' => function ($url, $model) {
+ return Html::a('CA Confirm', ['/pathologist/ca-confirm/confirm-surgical', 'id' => $model->id], [
+ 'title' => 'CA Confirm',
+ 'class' => 'btn btn-success btn-sm btn-block',
+ 'data-pjax' => '0',
+ ]);
+ },
+ ],
+ ],
+ ],
+ ]); ?>
+
+
+
\ No newline at end of file
diff --git a/frontend/modules/pathologist/views/ca-confirm/update.php b/frontend/modules/pathologist/views/ca-confirm/update.php
new file mode 100755
index 00000000..642891db
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/update.php
@@ -0,0 +1,21 @@
+title = 'Update Ca Confirm: ' . $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Ca Confirms', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/frontend/modules/pathologist/views/ca-confirm/view.php b/frontend/modules/pathologist/views/ca-confirm/view.php
new file mode 100755
index 00000000..0211bdcf
--- /dev/null
+++ b/frontend/modules/pathologist/views/ca-confirm/view.php
@@ -0,0 +1,46 @@
+title = $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Ca Confirms', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+\yii\web\YiiAsset::register($this);
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Delete', ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => 'Are you sure you want to delete this item?',
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'id_case',
+ 'report_type',
+ 'pathologist_id',
+ 'pathologist2_id',
+ 'diagnosis_id',
+ 'remark:ntext',
+ 'created_at',
+ 'updated_at',
+ 'created_by',
+ 'updated_by',
+ ],
+ ]) ?>
+
+
diff --git a/frontend/modules/pathologist/views/do/_cyto_non_gyn_screener.php b/frontend/modules/pathologist/views/do/_cyto_non_gyn_screener.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/pathologist/views/do/_cyto_screener.php b/frontend/modules/pathologist/views/do/_cyto_screener.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/pathologist/views/do/_is_ca_confirm.php b/frontend/modules/pathologist/views/do/_is_ca_confirm.php
new file mode 100755
index 00000000..1e17f4de
--- /dev/null
+++ b/frontend/modules/pathologist/views/do/_is_ca_confirm.php
@@ -0,0 +1,112 @@
+
+= $form->field($model, 'is_ca_confirm')->checkbox([
+ 'id' => 'is_ca_confirm',
+]); ?>
+
+
+
+ Note: Please select a pathologist to confirm the report.
+
+ = $form->field($model, 'pathologist2_id')->dropDownList(
+ ArrayHelper::map(User::find()
+ ->where([
+ 'role' => 'pathologist',
+ 'status' => User::STATUS_ACTIVE
+ ])
+ ->andWhere(['!=', 'id', Yii::$app->user->getId()])
+ ->orderBy(['report_name' => SORT_ASC])->all(), 'id', 'report_name'), // สมมติว่าคุณมีตัวแปรนี้สำหรับรายการ pathologists
+ ['prompt' => 'Select Pathologist']
+ ); ?>
+
+ = $form->field($model, 'ca_confirm_remark')->textarea(['rows' => 6]) ?>
+
+ field($model, 'is_ca_confirm_agree')->radioList([
+ 1 => 'Agree',
+ 2 => 'Disagree',
+ ], [
+ 'id' => 'is_ca_confirm_agree',
+ ]);*/ ?>
+
+
+
+ 'Agree',
+ 2 => 'Disagree',
+ ];
+
+ ?>
+
+
+ = $arr_agree[$model->is_ca_confirm_agree] ?>
+
+
+ | = $model->is_suggesstion_ihc ? 'Yes' : '' ?> |
+ = htmlspecialchars($model->suggesstion_ihc, ENT_QUOTES, 'UTF-8') ?> |
+
+
+ | = $model->is_suggesstion_special_stain ? 'Yes' : '' ?> |
+ = htmlspecialchars($model->suggesstion_special_stain, ENT_QUOTES, 'UTF-8') ?> |
+
+
+ | = $model->is_suggesstion_other ? 'Yes' : '' ?> |
+ = htmlspecialchars($model->suggesstion_other, ENT_QUOTES, 'UTF-8') ?> |
+
+
+ Pathologist2 Approve at: = $model->pathologist2_at?>
+
+
+registerJs($script);
+?>
\ No newline at end of file
diff --git a/frontend/modules/pathologist/views/do/hpv.php b/frontend/modules/pathologist/views/do/hpv.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/pathologist/views/do/surgical-final.php b/frontend/modules/pathologist/views/do/surgical-final.php
index 5118f30f..0e5a6a1f 100755
--- a/frontend/modules/pathologist/views/do/surgical-final.php
+++ b/frontend/modules/pathologist/views/do/surgical-final.php
@@ -379,6 +379,11 @@ $this->params['breadcrumbs'][] = $this->title;
-->
+ = $this->render('_is_ca_confirm', [
+ 'form' => $form,
+ 'model' => $model,
+ ]) ?>
+
Register by
: = isset($case_surgical->register) ? $case_surgical->register->realname : ' ' ?>
diff --git a/frontend/modules/pathologist/views/do/surgical.php b/frontend/modules/pathologist/views/do/surgical.php
index e03fed11..e346625a 100755
--- a/frontend/modules/pathologist/views/do/surgical.php
+++ b/frontend/modules/pathologist/views/do/surgical.php
@@ -1,6 +1,7 @@
title = 'Surgical (Case: ' . $case_surgical->id_case . ')';
$this->params['breadcrumbs'][] = $this->title;
+
+$surgical = CaseSurgical::find()->where(['id_case' => $case_surgical->id_case])->all();
+
+$histo_he = new ArrayDataProvider([
+ 'allModels' => $surgical ?: [],
+ 'pagination' => false,
+]);
?>
render('/layouts/_operation')
?>
diff --git a/frontend/modules/pathologist/views/task/_hpv.php b/frontend/modules/pathologist/views/task/_hpv.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/pathologist/views/task/hpv-new.php b/frontend/modules/pathologist/views/task/hpv-new.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/pathologist/views/task/hpv.php b/frontend/modules/pathologist/views/task/hpv.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case-update/external.php b/frontend/modules/register/views/case-update/external.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/_form_external.php b/frontend/modules/register/views/case/_form_external.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/_form_non_gyn.php b/frontend/modules/register/views/case/_form_non_gyn.php
index 68f7bbe1..703eae9d 100755
--- a/frontend/modules/register/views/case/_form_non_gyn.php
+++ b/frontend/modules/register/views/case/_form_non_gyn.php
@@ -89,8 +89,8 @@ use unclead\multipleinput\MultipleInputColumn;
isNewRecord) { ?>
-
@@ -303,10 +303,10 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
]) ?>
- = $form->field($model, 'collected_at')->widget(DateTimePicker::class, [
+ = $form->field($model, 'collected_at')->widget(DatePicker::class, [
'options' => ['placeholder' => 'เลือกวันที่เก็บสิ่งส่งตรวจ ...'],
'pluginOptions' => [
- 'format' => 'dd/mm/yyyy hh:ii:ss',
+ 'format' => 'dd/mm/yyyy',
'allowClear' => true,
'autoclose' => true,
'todayHighlight' => true,
@@ -454,8 +454,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
isNewRecord) { ?>
-
- field($model, 'cytotech1_id')->widget(Select2::class, [
+
+ field($model, 'cytotech1_id')->widget(Select2::class, [
'data' => ArrayHelper::map(User::find()->where(['role' => 'cyto'])->orderBy(['realname' => SORT_ASC])->all(), 'id', 'realname'),
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
@@ -463,7 +463,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'placeholder' => 'เลือก Cytotech...'
]
]) */ ?>
- = $form->field($model, 'cytotech1_id')->widget(Select2::class, [
+ = $form->field($model, 'cytotech1_id')->widget(Select2::class, [
// 'data' => ArrayHelper::map(User::find()->where(['role' => 'cyto', 'status' => 10])->orderBy(['realname' => SORT_ASC])->all(), 'id', 'realname'),
'data' => ArrayHelper::map(User::find()->andWhere(['or', ['role' => 'cyto', 'status' => 10], ['id' => 1060]])->orderBy(['realname' => SORT_ASC])->all(), 'id', 'realname'),
'theme' => Select2::THEME_BOOTSTRAP,
@@ -472,9 +472,9 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'placeholder' => 'เลือก Cytotech1...'
]
]) ?>
-
-
- = $form->field($model, 'pathologist_id')->widget(Select2::class, [
+
+
+ = $form->field($model, 'pathologist_id')->widget(Select2::class, [
'data' => ArrayHelper::map(User::find()->where(['role' => 'pathologist', 'status' => 10])->orderBy(['realname' => SORT_ASC])->all(), 'id', 'realname'),
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
@@ -482,7 +482,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'placeholder' => 'เลือก Pathologist...'
]
]) ?>
-
+
= $form->field($model, 'is_express')->checkbox() ?>
@@ -731,12 +731,12 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
isNewRecord) { ?>
-
-
รายการ Spicimen
-
-
-
- = $form->field($cyto_non_gyn_container, 'items')->label(false)->widget(MultipleInput::class, [
+
+
รายการ Spicimen
+
+
+
+ = $form->field($cyto_non_gyn_container, 'items')->label(false)->widget(MultipleInput::class, [
'max' => 50,
'id' => 'cytonongyncontainer-items',
'allowEmptyList' => true,
@@ -816,8 +816,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
],
]
]) ?>
-
+
registerJs("
@@ -864,13 +864,13 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
) ?>
isNewRecord) { ?>
-
-
-
-
- รายการ Test Order
-
- = GridView::widget([
+
+
+
+
+ รายการ Test Order
+
+ = GridView::widget([
'summary' => false,
'tableOptions' => ['class' => 'table table-striped truncate m-0'],
'dataProvider' => new ActiveDataProvider([
@@ -884,8 +884,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
],
'layout' => "
\n{items}\n
{pager}
",
]) ?>
-
+
@@ -898,8 +898,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
foreach ($model->getFiles() as $file => $val) {
if (!empty($val)) {
?>
-
= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/non-gyn/files/' . $val, ['target' => '_blank']); ?>
- = Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/non-gyn/files/' . $val, ['target' => '_blank']); ?>
+ ', [
'file-del',
'file' => $val,
@@ -910,7 +910,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'data-confirm' => 'ต้องการลบ?'
]);
?>
-
+
@@ -933,30 +933,30 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
Container List
= $model->getSpecimenDelImgs() ?>
-
+
-
- Outsource Data
-
+
+ Outsource Data
+
-
-
-
- = $form->field($model, 'is_outlab')->checkbox() ?>
-
isNewRecord && $model->is_outlab ? '' : 'style="display: none;"' ?>>
- = $form->field($model, 'outlab_report[]')->fileInput(['multiple' => true]) ?>
-
-
-
หมายเหตุ: กรุณาอัพโหลดไฟล์
- Outsource Data ก่อน
- Sticker
+
+
+
+ = $form->field($model, 'is_outlab')->checkbox() ?>
+
isNewRecord && $model->is_outlab ? '' : 'style="display: none;"' ?>>
+ = $form->field($model, 'outlab_report[]')->fileInput(['multiple' => true]) ?>
+
+
+ หมายเหตุ: กรุณาอัพโหลดไฟล์
+ Outsource Data ก่อน
+ Sticker
+
-
- registerJs("
+ registerJs("
$(\"input[name='" . Html::getInputName($model, 'is_outlab') . "']\").change(function() {
if(this.checked == true){
$('.outlab_report').show();
@@ -965,8 +965,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
}
});
") ?>
-
-
+ getReport() as $file => $val) {
?>
- = Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/non-gyn/report/' . $val, ['target' => '_blank']); ?>
@@ -982,25 +982,25 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
]);
?>
-
-
+
+
+
-
-
-
- = Html::submitButton('
บันทึกข้อมูล', ['class' => 'btn btn-success']) ?>
+
+
+ = Html::submitButton(' บันทึกข้อมูล', ['class' => 'btn btn-success']) ?>
+
-
-
- หมายเหตุ: กรุณาบันทึกข้อมูลก่อนการ Print
- Sticker
-
+
+ หมายเหตุ: กรุณาบันทึกข้อมูลก่อนการ Print
+ Sticker
+
-
+
diff --git a/frontend/modules/register/views/case/_form_pap.php b/frontend/modules/register/views/case/_form_pap.php
index c6e44310..1619e46a 100755
--- a/frontend/modules/register/views/case/_form_pap.php
+++ b/frontend/modules/register/views/case/_form_pap.php
@@ -74,8 +74,8 @@ use common\models\FinanceServiceCharge;
isNewRecord) { ?>
-
+
@@ -290,10 +290,10 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
field($model, 'clinician')->textInput()
?>
- = $form->field($model, 'collected_at')->widget(DateTimePicker::class, [
+ = $form->field($model, 'collected_at')->widget(DatePicker::class, [
'options' => ['placeholder' => 'เลือกวันที่เก็บสิ่งส่งตรวจ ...'],
'pluginOptions' => [
- 'format' => 'dd/mm/yyyy hh:ii:ss',
+ 'format' => 'dd/mm/yyyy',
'allowClear' => true,
'autoclose' => true,
'todayHighlight' => true,
@@ -393,8 +393,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
isNewRecord) { ?>
-
- = $form->field($model, 'cytotech1_id')->widget(Select2::class, [
+
+ = $form->field($model, 'cytotech1_id')->widget(Select2::class, [
// 'data' => ArrayHelper::map(User::find()->where(['role' => 'cyto', 'status' => 10])->orderBy(['realname' => SORT_ASC])->all(), 'id', 'realname'),
'data' => ArrayHelper::map(User::find()->andWhere(['or', ['role' => 'cyto', 'status' => 10], ['id' => 1060]])->orderBy(['realname' => SORT_ASC])->all(), 'id', 'realname'),
'theme' => Select2::THEME_BOOTSTRAP,
@@ -403,7 +403,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'placeholder' => 'เลือก Cytotech1...'
]
]) ?>
-
+
@@ -640,13 +640,13 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
isNewRecord) { ?>
-
-
-
-
- รายการ Test Order
-
- = GridView::widget([
+
+
+
+
+ รายการ Test Order
+
+ = GridView::widget([
'summary' => false,
'tableOptions' => ['class' => 'table table-striped truncate m-0'],
'dataProvider' => new ActiveDataProvider([
@@ -660,15 +660,15 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
],
'layout' => "
\n{items}\n
{pager}
",
]) ?>
-
-
+ where(['his_ln' => $model->his_ln])->one();
if ($case_hpv) { ?>
-
- มีการส่งตรวจ HPV ด้วย ID Case: = $case_hpv->id_case ?>
-
-
+
+ มีการส่งตรวจ HPV ด้วย ID Case: = $case_hpv->id_case ?>
+
+
@@ -686,8 +686,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
foreach ($model->getFiles() as $file => $val) {
if (!empty($val)) {
?>
-
= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/files/' . $val, ['target' => '_blank']); ?>
- = Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/files/' . $val, ['target' => '_blank']); ?>
+ ', [
'file-del',
'file' => $val,
@@ -698,7 +698,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'data-confirm' => 'ต้องการลบ?'
]);
?>
-
+
@@ -731,8 +731,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
getReport() as $file => $val) {
?>
-
= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/report/' . $val, ['target' => '_blank']); ?>
- = Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/report/' . $val, ['target' => '_blank']); ?>
+ ', [
'report-del',
'file' => $val,
@@ -743,7 +743,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'data-confirm' => 'ต้องการลบ?'
]);
?>
-
+
diff --git a/frontend/modules/register/views/case/_form_surgical-raw-3.php b/frontend/modules/register/views/case/_form_surgical-raw-3.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/_form_surgical-raw.php b/frontend/modules/register/views/case/_form_surgical-raw.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/_old_form_surgical2.php b/frontend/modules/register/views/case/_old_form_surgical2.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/_patient_detail.php b/frontend/modules/register/views/case/_patient_detail.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/_patient_hpv.php b/frontend/modules/register/views/case/_patient_hpv.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/case/external.php b/frontend/modules/register/views/case/external.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/center/ex.php b/frontend/modules/register/views/center/ex.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/const-cancer-registry/_form.php b/frontend/modules/register/views/const-cancer-registry/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/const-cancer-registry/_search.php b/frontend/modules/register/views/const-cancer-registry/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/const-cancer-registry/create.php b/frontend/modules/register/views/const-cancer-registry/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/const-cancer-registry/index.php b/frontend/modules/register/views/const-cancer-registry/index.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/const-cancer-registry/update.php b/frontend/modules/register/views/const-cancer-registry/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/const-cancer-registry/view.php b/frontend/modules/register/views/const-cancer-registry/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-fixation/_form.php b/frontend/modules/register/views/cyto-fixation/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-fixation/_search.php b/frontend/modules/register/views/cyto-fixation/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-fixation/create.php b/frontend/modules/register/views/cyto-fixation/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-fixation/index.php b/frontend/modules/register/views/cyto-fixation/index.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-fixation/update.php b/frontend/modules/register/views/cyto-fixation/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-fixation/view.php b/frontend/modules/register/views/cyto-fixation/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-source-of-specimen/_form.php b/frontend/modules/register/views/cyto-source-of-specimen/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-source-of-specimen/_search.php b/frontend/modules/register/views/cyto-source-of-specimen/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-source-of-specimen/create.php b/frontend/modules/register/views/cyto-source-of-specimen/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-source-of-specimen/index.php b/frontend/modules/register/views/cyto-source-of-specimen/index.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-source-of-specimen/update.php b/frontend/modules/register/views/cyto-source-of-specimen/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-source-of-specimen/view.php b/frontend/modules/register/views/cyto-source-of-specimen/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-specimen/_form.php b/frontend/modules/register/views/cyto-specimen/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-specimen/_search.php b/frontend/modules/register/views/cyto-specimen/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-specimen/create.php b/frontend/modules/register/views/cyto-specimen/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-specimen/update.php b/frontend/modules/register/views/cyto-specimen/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-specimen/view.php b/frontend/modules/register/views/cyto-specimen/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-type-of-specimen/_form.php b/frontend/modules/register/views/cyto-type-of-specimen/_form.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-type-of-specimen/_search.php b/frontend/modules/register/views/cyto-type-of-specimen/_search.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-type-of-specimen/create.php b/frontend/modules/register/views/cyto-type-of-specimen/create.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-type-of-specimen/index.php b/frontend/modules/register/views/cyto-type-of-specimen/index.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-type-of-specimen/update.php b/frontend/modules/register/views/cyto-type-of-specimen/update.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/cyto-type-of-specimen/view.php b/frontend/modules/register/views/cyto-type-of-specimen/view.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/sticker/_sticker.php b/frontend/modules/register/views/sticker/_sticker.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/register/views/sticker/print-barcode.php b/frontend/modules/register/views/sticker/print-barcode.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/report/views/report-log/pdf.php b/frontend/modules/report/views/report-log/pdf.php
old mode 100644
new mode 100755
diff --git a/frontend/modules/slide/views/send-pathologist-detail/index.php b/frontend/modules/slide/views/send-pathologist-detail/index.php
index 648a5aa9..ba0cc3d4 100755
--- a/frontend/modules/slide/views/send-pathologist-detail/index.php
+++ b/frontend/modules/slide/views/send-pathologist-detail/index.php
@@ -17,7 +17,6 @@ $this->params['breadcrumbs'][] = $this->title;
= Html::encode($this->title) ?>
-
render('_search', ['model' => $searchModel]);
diff --git a/frontend/modules/slide/views/send-pathologist/index.php b/frontend/modules/slide/views/send-pathologist/index.php
index 25dc6aed..36357ce0 100755
--- a/frontend/modules/slide/views/send-pathologist/index.php
+++ b/frontend/modules/slide/views/send-pathologist/index.php
@@ -28,7 +28,8 @@ $this->params['breadcrumbs'][] = $this->title;
= GridView::widget([
'pager' => ['class' => 'yii\bootstrap5\LinkPager'],
- 'tableOptions' => ['class' => 'table align-middle truncate m-0'],
+ 'tableOptions' => ['class' => 'table align-middle table-hover m-0 truncate'],
+ 'layout' => "{summary}
{pager}
",
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
diff --git a/frontend/themes/nikom/views/layouts/_menu.php b/frontend/themes/nikom/views/layouts/_menu.php
index 7d27c556..a725b8d8 100755
--- a/frontend/themes/nikom/views/layouts/_menu.php
+++ b/frontend/themes/nikom/views/layouts/_menu.php
@@ -6,6 +6,7 @@ use common\models\CaseNonGyn;
use common\models\PatientCase;
use common\models\SurgicalAdd;
use common\models\ApproveStatus;
+use common\models\CaConfirm;
use common\models\CenterApprove;
use common\models\HistoStaining;
use common\models\CytoPapConsult;
@@ -160,13 +161,13 @@ if (Yii::$app->user->can('center')) {
];
$count_consult_surgical = SurgicalConsult::find()->filterWhere(['<', 'status', 2])->orFilterWhere(['is', 'pathologist2_id', new Expression('NULL')])->count();
-
+
$menuItems[] = [
'label' => '