From 5547ac49620ad3a8eb3f07694b07e80612d3e550 Mon Sep 17 00:00:00 2001 From: Star Indy Date: Tue, 25 Mar 2025 22:42:46 +0700 Subject: [PATCH] update --- .../cyto/controllers/PapController.php | 82 +------------------ .../pathologist/views/do/non-gyn-final.php | 4 - .../pathologist/views/do/pap-final.php | 6 +- frontend/themes/nikom/views/layouts/_menu.php | 70 +++++++++++++--- frontend/themes/nikom/views/layouts/main.php | 2 +- 5 files changed, 63 insertions(+), 101 deletions(-) diff --git a/frontend/modules/cyto/controllers/PapController.php b/frontend/modules/cyto/controllers/PapController.php index 31dc0a14..d0e8b6f6 100755 --- a/frontend/modules/cyto/controllers/PapController.php +++ b/frontend/modules/cyto/controllers/PapController.php @@ -512,52 +512,23 @@ class PapController extends \yii\web\Controller //$model->save(); if ($case_pap->save() && $model->save()) { - $log = new CytoPapDiagnosisLog([ - 'id_case' => $model->id_case, - 'user_id' => Yii::$app->user->getId(), - 'report_type' => $model->report_type, - 'specimen_adequacy' => $model->specimen_adequacy, - 'specimen_adequacy_1' => $model->specimen_adequacy_1, - 'specimen_adequacy_2' => $model->specimen_adequacy_2, - 'specimen_adequacy_3' => $model->specimen_adequacy_3, - 'adequacy_other' => $model->adequacy_other, - 'general_categorization' => $model->general_categorization, - 'general_categorization_1' => $model->general_categorization_1, - 'general_categorization_2' => $model->general_categorization_2, - 'categorization_other' => $model->categorization_other, - 'suggestion_list' => $model->suggestion_list, - 'suggestion' => $model->suggestion, - 'approve_at' => date('Y-m-d H:i:s'), - ]); - - - if ($log->save()) { - } - $center_approve = CenterApprove::findOne([ 'id_case' => $model->id_case, 'report_type' => $model->report_type, 'ref_id' => $model->id, ]); + + if (!$center_approve) { $center_approve = new CenterApprove([ 'id_case' => $model->id_case, 'report_type' => $model->report_type, 'cytotech1_id' => Yii::$app->user->getId(), - 'approve_status' => 4, - 'release_at' => date('Y-m-d H:i:s'), - 'release_by' => Yii::$app->user->getId() + 'approve_status' => 1 ]); } - - $center_approve->approve_status = 4; $center_approve->ref_id = $model->id; - $center_approve->cytotech1_id = Yii::$app->user->getId(); - $center_approve->approve_by = Yii::$app->user->getId(); - $center_approve->approve_at = date('Y-m-d H:i:s'); - $center_approve->release_by = Yii::$app->user->getId(); - $center_approve->release_at = date('Y-m-d H:i:s'); $center_approve->save(); } @@ -585,51 +556,6 @@ class PapController extends \yii\web\Controller if ($case_pap->save() && $model->save()) { - - $log = new CytoPapDiagnosisLog([ - 'id_case' => $model->id_case, - 'user_id' => Yii::$app->user->getId(), - 'report_type' => $model->report_type, - 'specimen_adequacy' => $model->specimen_adequacy, - 'specimen_adequacy_1' => $model->specimen_adequacy_1, - 'specimen_adequacy_2' => $model->specimen_adequacy_2, - 'specimen_adequacy_3' => $model->specimen_adequacy_3, - 'adequacy_other' => $model->adequacy_other, - 'general_categorization' => $model->general_categorization, - 'general_categorization_1' => $model->general_categorization_1, - 'general_categorization_2' => $model->general_categorization_2, - 'categorization_other' => $model->categorization_other, - 'suggestion_list' => $model->suggestion_list, - 'suggestion' => $model->suggestion, - 'approve_at' => date('Y-m-d H:i:s'), - ]); - if ($log->save()) { - } - - $center_approve = CenterApprove::findOne([ - 'id_case' => $model->id_case, - 'report_type' => $model->report_type, - 'ref_id' => $model->id, - ]); - - if (!$center_approve) { - $center_approve = new CenterApprove([ - 'id_case' => $model->id_case, - 'report_type' => $model->report_type, - 'pathologist_id' => Yii::$app->user->getId(), - 'approve_status' => 4 - ]); - } - $center_approve->approve_status = 4; - $center_approve->ref_id = $model->id; - $center_approve->cytotech1_id = Yii::$app->user->getId(); - $center_approve->cytotech1_at = date('Y-m-d H:i:s'); - $center_approve->approve_by = Yii::$app->user->getId(); - $center_approve->approve_at = date('Y-m-d H:i:s'); - $center_approve->release_by = Yii::$app->user->getId(); - $center_approve->release_at = date('Y-m-d H:i:s'); - $center_approve->save(); - Yii::$app->session->setFlash('success', 'บันทึกข้อมูลและส่งให้พยาธิแพทย์ เรียบร้อยแล้ว'); return $this->redirect(['/cyto/pap/pap-new']); } @@ -1352,4 +1278,4 @@ class PapController extends \yii\web\Controller 'tmp_histo_staining' => $tmp_histo_staining, ]); } -} +} \ No newline at end of file diff --git a/frontend/modules/pathologist/views/do/non-gyn-final.php b/frontend/modules/pathologist/views/do/non-gyn-final.php index e47d957e..77747060 100644 --- a/frontend/modules/pathologist/views/do/non-gyn-final.php +++ b/frontend/modules/pathologist/views/do/non-gyn-final.php @@ -522,10 +522,6 @@ $this->params['breadcrumbs'][] = $this->title; -render('history-his', [ - 'case' => $case_non_gyn, -]) ?> - registerJs("CKEDITOR.config.scayt_autoStartup = false;") ?> render('_template_non_gyn', [ diff --git a/frontend/modules/pathologist/views/do/pap-final.php b/frontend/modules/pathologist/views/do/pap-final.php index 1d58ab29..d8f5e04f 100644 --- a/frontend/modules/pathologist/views/do/pap-final.php +++ b/frontend/modules/pathologist/views/do/pap-final.php @@ -311,8 +311,4 @@ $this->params['breadcrumbs'][] = $this->title; - - -render('history-his', [ - 'case' => $case_pap, -]) ?> \ No newline at end of file + \ No newline at end of file diff --git a/frontend/themes/nikom/views/layouts/_menu.php b/frontend/themes/nikom/views/layouts/_menu.php index 9978cfc8..d4760f78 100644 --- a/frontend/themes/nikom/views/layouts/_menu.php +++ b/frontend/themes/nikom/views/layouts/_menu.php @@ -317,6 +317,63 @@ if (Yii::$app->user->can('pathologist')) { ], ]; + $count_consult_surgical = SurgicalConsult::find()->filterWhere(['<', 'status', 2])->orFilterWhere(['is', 'pathologist2_id', new Expression('NULL')])->count(); + //$count_consult_non_gyn = CytoNonGynConsult::find()->filterWhere(['<', 'status', 2])->orFilterWhere(['is', 'pathologist2_id', new Expression('NULL')])->count(); + //$count_consult_pap = CytoPapConsult::find()->filterWhere(['<', 'status', 2])->orFilterWhere(['is', 'pathologist2_id', new Expression('NULL')])->count(); + //$count_consult_autopsy = AutopsyConsult::find()->filterWhere(['<', 'status', 2])->orFilterWhere(['is', 'pathologist2_id', new Expression('NULL')])->count(); + + $menuItems[] = [ + 'label' => ' รายการส่ง Consult
ภายใน' . ' ' . ($count_consult_surgical/* + $count_consult_non_gyn + $count_consult_pap + $count_consult_autopsy*/) . '', + 'url' => 'javascript:void()', + 'options' => ['class' => 'treeview'], + 'items' => [ + ['label' => ' Surgical Consult ' . $count_consult_surgical . '', 'url' => ['/register/surgical-consult/index']], + //['label' => ' Non-Gyn Consult ' . $count_consult_non_gyn . '', 'url' => ['/register/cyto-non-gyn-consult/index']], + //['label' => ' Gyn Consult ' . $count_consult_pap . '', 'url' => ['/register/cyto-pap-consult/index']], + //['label' => ' Autopsy Consult ' . $count_consult_autopsy . '', 'url' => ['/register/autopsy-consult/index']], + ], + ]; + + $count_consult_pathologist_surgical = SurgicalConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_non_gyn = CytoNonGynConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_pap = CytoPapConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_dish = DishConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_frozen = FrozenConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_fish = FishConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_flow = FlowConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + // $count_consult_pathologist_autopsy = AutopsyConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_molecular = MolecularConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + //$count_consult_pathologist_necropsy = NecropsyConsult::find()->where(['status' => 2, 'pathologist2_id' => Yii::$app->user->getId(), 'diagnosis_by' => 2])->count(); + + //$menu[] = ['label' => 'Consult Case', 'url' => '#', 'options' => ['class' => 'sidebar-list'], 'template' => '{label}', 'items' => [ + /*$menu[] = [ + 'label' => 'Consult Case' . '' . ($count_consult_pathologist_surgical + $count_consult_pathologist_non_gyn + $count_consult_pathologist_pap + $count_consult_pathologist_frozen + $count_consult_pathologist_dish + + $count_consult_pathologist_autopsy + $count_consult_pathologist_molecular + $count_consult_pathologist_necropsy) . '', 'url' => '#', 'options' => ['class' => 'sidebar-list'], 'template' => '{label}', 'items' => [ + ['label' => 'Surgical Consult' . $count_consult_pathologist_surgical . '', 'url' => ['/pathologist/surgical-consult/index']], + ['label' => 'Non-Gyn Consult' . $count_consult_pathologist_non_gyn . '', 'url' => ['/pathologist/non-gyn-consult/index']], + ['label' => 'Gyn Consult' . $count_consult_pathologist_pap . '', 'url' => ['/pathologist/pap-consult/index']], + //['label' => 'DISH Consult' . $count_consult_pathologist_dish . '', 'url' => ['/pathologist/dish-consult/index']], + //['label' => 'Frozen Consult' . $count_consult_pathologist_frozen . '', 'url' => ['/pathologist/frozen-consult/index']], + //['label' => 'FISH Consult' . $count_consult_pathologist_fish . '', 'url' => ['/pathologist/fish-consult/index']], + //['label' => 'Flow Consult' . $count_consult_pathologist_flow . '', 'url' => ['/pathologist/flow-consult/index']], + ['label' => 'Autopsy Consult' . $count_consult_pathologist_autopsy . '', 'url' => ['/pathologist/autopsy-consult/index']], + //['label' => 'Molecular Consult' . $count_consult_pathologist_molecular . '', 'url' => ['/pathologist/molecular-consult/index']], + //['label' => 'Necropsy Consult' . $count_consult_pathologist_necropsy . '', 'url' => ['/pathologist/necropsy-consult/index']], + ], 'submenuTemplate' => '' + ];*/ + + $menuItems[] = [ + //'label' => ' Consult Case ' . ' ' . ($count_consult_pathologist_surgical + $count_consult_pathologist_non_gyn + $count_consult_pathologist_pap + $count_consult_pathologist_autopsy) . '', + 'label' => ' Consult Diagnosis' . ' ' . ($count_consult_pathologist_surgical/* + $count_consult_pathologist_non_gyn + $count_consult_pathologist_pap + $count_consult_pathologist_autopsy*/) . '', + 'url' => 'javascript:void()', + 'options' => ['class' => 'treeview'], + 'items' => [ + ['label' => ' Surgical Consult ' . ($count_consult_pathologist_surgical) . '', 'url' => ['/pathologist/surgical-consult/index']], + // ['label' => ' Non-Gyn Consult ' . $count_consult_pathologist_non_gyn . '', 'url' => ['/pathologist/non-gyn-consult/index']], + // ['label' => ' Gyn Consult ' . $count_consult_pathologist_pap . '', 'url' => ['/pathologist/pap-consult/index']], + //['label' => ' Autopsy Consult ' . $count_consult_pathologist_autopsy . '', 'url' => ['/pathologist/autopsy-consult/index']], + ], + ]; + $menuItems[] = [ 'label' => ' ค้นหาผลตรวจ', 'url' => 'javascript:void()', @@ -358,19 +415,6 @@ if (Yii::$app->user->can('pathologist')) { ['label' => ' Diagnosis Template', 'url' => ['/pathologist/cyto-non-gyn-diagnosis-template/index']], ], ]; - - // $menuItems[] = ['label' => ' CENTER', 'url' => '#', 'options' => ['style' => 'background-color: #116aef;font-weight: bold;']]; - - /*$menuItems[] = [ - 'label' => ' Consult Outlab', - 'url' => 'javascript:void()', - 'options' => ['class' => 'treeview'], - 'items' => [ - ['label' => ' Case Surgical', 'url' => ['/register/consult-outlab-surgical/index']], - ['label' => ' Case Non Gyn', 'url' => ['/register/consult-outlab-non-gyn/index']], - ['label' => ' Case Gyn', 'url' => ['/register/consult-outlab-pap/index']], - ], - ];*/ } //รอตรวจสอบผล diff --git a/frontend/themes/nikom/views/layouts/main.php b/frontend/themes/nikom/views/layouts/main.php index e88965a2..4ae8f442 100644 --- a/frontend/themes/nikom/views/layouts/main.php +++ b/frontend/themes/nikom/views/layouts/main.php @@ -309,7 +309,7 @@ $asset = Yii::$app->assetManager->getPublishedUrl('@frontend/themes/nikom/assets