mrkcp 2025-04-04 08:50:45 +07:00
commit 69872ede85
102 changed files with 1342 additions and 284 deletions

View File

@ -0,0 +1,80 @@
<?php
namespace common\models;
use Yii;
use yii\behaviors\BlameableBehavior;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ca_confirm".
*
* @property int $id
* @property string $id_case ID Case
* @property string $report_type Report Type
* @property int $pathologist_id Pathologist
* @property int $pathologist2_id Pathologist2
* @property int $diagnosis_id Diagnosis
* @property string|null $remark Remark
* @property int|null $created_at
* @property int|null $updated_at
* @property int|null $created_by
* @property int|null $updated_by
*/
class CaConfirm extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ca_confirm';
}
public function behaviors()
{
return[
TimestampBehavior::class,
BlameableBehavior::class,
];
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['id_case', 'report_type', 'pathologist_id', 'pathologist2_id', 'diagnosis_id'], 'required'],
[['pathologist_id', 'pathologist2_id', 'diagnosis_id', 'created_at', 'updated_at', 'created_by', 'updated_by'], 'integer'],
[['remark'], 'string'],
[['id_case', 'report_type'], 'string', 'max' => 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']);
}
}

View File

@ -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',
];
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
frontend/modules/cyto/models/CytoGynStickerForm.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

0
frontend/modules/cyto/views/hpv/_old-hpv-all.php Normal file → Executable file
View File

0
frontend/modules/cyto/views/sticker/_sticker_gyn.php Normal file → Executable file
View File

0
frontend/modules/cyto/views/sticker/_sticker_old.php Normal file → Executable file
View File

0
frontend/modules/cyto/views/sticker/sticker-gyn.php Normal file → Executable file
View File

View File

@ -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');
}
}
}

View File

View File

@ -77,6 +77,7 @@ $session = Yii::$app->session;
<thead>
<tr>
<th>Block No.</th>
<th>Remark</th>
<th>จำนวนชิ้นเนื้อ</th>
<th>ผู้ Embed</th>
<th>วันที่ Embed</th>
@ -84,14 +85,19 @@ $session = Yii::$app->session;
</thead>
<tbody>
<?php foreach (HistoHeEmbedDetail::find()->joinWith(['histoHeEmbed'])->where(['id_case' => $session['he-embed-case']])->all() as $block): ?>
<?php $surgicalSlides=SurgicalSlide::find() ->where(['id_case' => $session['he-embed-case']])
->andWhere(['no_slide' => $block->block_no])
->all(); ?>
<tr>
<td><?= $block->histoHeEmbed->id_case ?> <?= $block->block_no ?></td>
<td>
<?php
$surgicalSlides = SurgicalSlide::find()
->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)) : '-';
?>
</td>
<td>
<?php
echo !empty($surgicalSlides) ? array_sum(array_map(fn($slide) => $slide->quantity, $surgicalSlides)) : '-';
?>
</td>
@ -124,9 +130,15 @@ $session = Yii::$app->session;
'label' => 'รายการ Block ที่ Embed แล้ว',
'format' => 'raw',
'value' => function ($model) {
$rt = '<div class="table-outer"><table class="table table-striped truncate m-0"><thead><tr><th>Block No.</th><th>ผู้ Embed</th><th>วันที่ Embed</th></tr></thead><tbody>';
$rt = '<div class="table-outer"><table class="table table-striped truncate m-0"><thead><tr><th>Block No.</th><th>ผู้ Embed</th><th>วันที่ Embed</th><th>Remark</th></tr></thead><tbody>';
foreach (HistoHeEmbedDetail::find()->joinWith(['histoHeEmbed'])->where(['id_case' => $model->id_case])->all() as $block) {
$rt .= '<tr><td>' . $block->block_no . '</td><td>' . $block->embedBy->realname . '</td><td>' . $block->embed_at . '</td></tr>';
$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 .= '<tr><td>' . $block->block_no . '</td><td>' . $block->embedBy->realname . '</td><td>' . $block->embed_at . '</td><td>' . implode(', ', $remarks) . '</td></tr>';
}
$rt .= '</tbody></table></div>';
return $rt;

View File

@ -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;
<div id="PrintThis">
<?= 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}<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' => [
@ -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'
]),

View File

@ -96,6 +96,31 @@ $this->params['breadcrumbs'][] = $this->title;
$rt .= '</tbody></table></div>';
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;
</div>
<?= Html::endForm() ?>
</div>
</div>
</div>

View File

@ -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}<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'],
[
@ -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 '';
}
],
[

View File

@ -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}<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\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 '';
}
],
[

View File

@ -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,

View File

@ -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}<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>",
'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'],
/*[
@ -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;'],

View File

@ -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'] . '<br />' . $immuno_staining['out_at'] : '',
'value' => isset($immuno_staining->operate_id) > 1 ? $immuno_staining['send']['realname'] . '<br />' . $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;
</div>
<div class="card-body">
<embed src="<?= Url::to(['request-pdf', 'id_case' => $immuno_staining->id_case], true) ?>"
type="application/pdf" width="100%" height="300">
type="application/pdf" width="100%" height="500">
<?php } ?>
</div>
</div>

View File

@ -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;
?>

View File

@ -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 = '<div class="table-outer"><table class="table table-striped truncate m-0" style="font-size: 11px;" class="table m-3 align-middle"><thead><tr><th width="10%">Block No.</th><th width="30%">Test</th><th width="30%">Note</th><th width="20%">ผู้รับงาน</th><th width="20%">วันรับงาน</th></tr></thead><tbody>';
foreach ($staining as $item) {
$finance = FinanceServiceCharge::find()
->joinWith(['charge'])
->where(['from_id' => $item->id, 'const_service_charge.lab' => 'special'])
->one();
$rt .= '<tr>';
$rt .= '<td>' . $item->block_no . '</td><td>' . (isset($finance->charge) ? $finance->charge->name : '') . '</td><td>' . (isset($item->note) ? $item->note : '') . '</td><td>' . (isset($item->operate) ? $item->operate->realname : '') . '</td><td>' . $item->prepare_at . '</td>';
$rt .= '</tr>';
}
$rt .= '</tbody></table></div>';
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 = '<div class="table-outer"><table class="table table-striped truncate m-0" style="font-size: 11px;" class="table m-3 align-middle"><thead><tr><th width="10%">Block No.</th><th width="30%">Test</th><th width="30%">note</th><th width="30%">ผู้รับงาน</th><th width="30%">วันที่รับงาน</th></tr></thead><tbody>';
foreach ($staining as $item) {
$finance = FinanceServiceCharge::find()
->joinWith(['charge'])
->where(['from_id' => $item->id, 'const_service_charge.lab' => 'immuno'])
->one();
$rt .= '<tr>';
$rt .= '<td>' . $item->block_no . '</td><td>' . (isset($finance->charge) ? $finance->charge->name : '') . '</td><td>' . (isset($item->note) ? $item->note : '') . '</td><td>' . (isset($item->operate) ? $item->operate->realname : '') . '</td><td>' . (isset($item->receive_at) ? $item->receive_at : '') . '</td>';
$rt .= '</tr>';
}
],
$rt .= '</tbody></table></div>';
return $rt;
}
],
[
'attribute' => 'id_case',
'headerOptions' => ['style' => 'text-align:center; width: 150;'],

View File

@ -0,0 +1,185 @@
<?php
namespace frontend\modules\pathologist\controllers;
use Yii;
use common\models\CaConfirm;
use common\models\CaseSurgical;
use common\models\SurgicalDiagnosis;
use frontend\modules\pathologist\models\CaConfirmSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* CaConfirmController implements the CRUD actions for CaConfirm model.
*/
class CaConfirmController extends Controller
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'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.');
}
}

View File

@ -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,
]);
}
}
}

View File

@ -0,0 +1,77 @@
<?php
namespace frontend\modules\pathologist\models;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\CaConfirm;
/**
* CaConfirmSearch represents the model behind the search form of `common\models\CaConfirm`.
*/
class CaConfirmSearch extends CaConfirm
{
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['id', 'pathologist_id', 'pathologist2_id', 'diagnosis_id', 'created_at', 'updated_at', 'created_by', 'updated_by', 'status'], 'integer'],
[['id_case', 'report_type', 'remark'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = CaConfirm::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $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;
}
}

View File

@ -0,0 +1,41 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\CaConfirm */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="ca-confirm-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'id_case')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'report_type')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pathologist_id')->textInput() ?>
<?= $form->field($model, 'pathologist2_id')->textInput() ?>
<?= $form->field($model, 'diagnosis_id')->textInput() ?>
<?= $form->field($model, 'remark')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'created_by')->textInput() ?>
<?= $form->field($model, 'updated_by')->textInput() ?>
<div class="form-group">
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@ -0,0 +1,47 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model frontend\modules\pathologist\models\CaConfirmSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="ca-confirm-search">
<?php $form = ActiveForm::begin([
'action' => ['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') ?>
<?php // echo $form->field($model, 'diagnosis_id') ?>
<?php // echo $form->field($model, 'remark') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'created_by') ?>
<?php // echo $form->field($model, 'updated_by') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-outline-secondary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@ -0,0 +1,93 @@
<?php
use common\models\SurgicalDiagnosis;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\User;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
$this->title = 'CA Confirm';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="card">
<div class="card-header">
<h4 class="card-title"><?= Html::encode($this->title) ?></h4>
</div>
<div class="card-body">
<?php $form = ActiveForm::begin(); ?>
<?= $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',
]); ?>
<div id="disagree-container" style="display: none;">
<table cellpadding="4" cellspacing="0" border="0">
<tr>
<td><?= $form->field($diagnosis, 'is_suggesstion_ihc')->checkbox() ?></td>
<td><?= $form->field($diagnosis, 'suggesstion_ihc')->textInput(['maxlength' => true]) ?></td>
</tr>
<tr>
<td><?= $form->field($diagnosis, 'is_suggesstion_special_stain')->checkbox() ?></td>
<td><?= $form->field($diagnosis, 'suggesstion_special_stain')->textInput(['maxlength' => true]) ?></td>
</tr>
<tr>
<td><?= $form->field($diagnosis, 'is_suggesstion_other')->checkbox() ?></td>
<td><?= $form->field($diagnosis, 'suggesstion_other')->textInput(['maxlength' => true]) ?></td>
</tr>
</table>
</div>
<?= $form->errorSummary($diagnosis) ?>
<div class="row mt-4">
<div class="col-sm-6">
<?= Html::submitButton('<i class="ri-save-line"></i> Save', ['class' => 'btn btn-success btn-block', 'value' => 'save', 'name' => 'surgical']) ?>
</div>
<div class="col-sm-6 text-end">
<?= Html::submitButton('<i class="ri-checkbox-line"></i> Approve', ['class' => 'btn btn-primary btn-block', 'value' => 'approve', 'name' => 'surgical']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
<?php
$script = <<<JS
function toggleDisagreeContainer() {
const isDisagreeChecked = $('#is_ca_confirm_agree input[value="2"]').is(':checked');
if (isDisagreeChecked) {
$('#disagree-container').show();
} else {
$('#disagree-container').hide();
}
}
// Initial check on page load
toggleDisagreeContainer();
$('#is_ca_confirm_agree input').on('change', function() {
toggleDisagreeContainer();
});
JS;
$this->registerJs($script);
?>
</div>
</div>
<div class="card mt-4">
<div class="card-header">
<h5 class="card-title" id="report"><i class="ri-file-pdf-2-line"></i> Preview Final Report</h5>
</div>
<div class="card-body pdf-scroll">
<embed
src="<?= Url::to(['/report/case/surgical-pdf', 'id_case' => $case_surgical->id_case, 'report_type' => $diagnosis->report_type, 'id' => $diagnosis->id, 'mode' => 'preview', 'watermark' => 0, 'file' => false]) ?>"
type="application/pdf" width="100%" height="1200">
</div>
</div>

View File

@ -0,0 +1,20 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\CaConfirm */
$this->title = 'Create Ca Confirm';
$this->params['breadcrumbs'][] = ['label' => 'Ca Confirms', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ca-confirm-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@ -0,0 +1,9 @@
<?php
/* @var $this yii\web\View */
?>
<h1>ca-confirm/gyn</h1>
<p>
You may change the content of this page by modifying
the file <code><?= __FILE__; ?></code>.
</p>

View File

@ -0,0 +1,46 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel frontend\modules\pathologist\models\CaConfirmSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Ca Confirms';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ca-confirm-index">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Create Ca Confirm', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?php // echo $this->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'],
],
]); ?>
</div>

View File

@ -0,0 +1,9 @@
<?php
/* @var $this yii\web\View */
?>
<h1>ca-confirm/non-gyn</h1>
<p>
You may change the content of this page by modifying
the file <code><?= __FILE__; ?></code>.
</p>

View File

@ -0,0 +1,74 @@
<?php
use common\models\User;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $searchModel frontend\modules\pathologist\models\CaConfirmSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'CA Confirm Surgical';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="card">
<div class="card-header">
<h4 class="card-title"><?= Html::encode($this->title) ?></h4>
</div>
<div class="card-body">
<?php // echo $this->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',
]);
},
],
],
],
]); ?>
</div>
</div>

View File

@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\CaConfirm */
$this->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';
?>
<div class="ca-confirm-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@ -0,0 +1,46 @@
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\CaConfirm */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Ca Confirms', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="ca-confirm-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= 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',
],
]) ?>
</p>
<?= 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',
],
]) ?>
</div>

View File

View File

View File

@ -0,0 +1,112 @@
<?php
use common\models\User;
use yii\helpers\ArrayHelper;
?>
<?= $form->field($model, 'is_ca_confirm')->checkbox([
'id' => 'is_ca_confirm',
]); ?>
<div id="pathologist2-container" style="display: none;">
<div class="alert alert-warning">
<strong>Note:</strong> Please select a pathologist to confirm the report.
</div>
<?= $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]) ?>
<?php /*= $form->field($model, 'is_ca_confirm_agree')->radioList([
1 => 'Agree',
2 => 'Disagree',
], [
'id' => 'is_ca_confirm_agree',
]);*/ ?>
<!--<div id="disagree-container" style="display: none;">
<table cellpadding="4" cellspacing="0" border="0">
<tr>
<td><?= $form->field($model, 'is_suggesstion_ihc')->checkbox() ?></td>
<td><?= $form->field($model, 'suggesstion_ihc')->textInput(['maxlength' => true]) ?></td>
</tr>
<tr>
<td><?= $form->field($model, 'is_suggesstion_special_stain')->checkbox() ?></td>
<td><?= $form->field($model, 'suggesstion_special_stain')->textInput(['maxlength' => true]) ?></td>
</tr>
<tr>
<td><?= $form->field($model, 'is_suggesstion_other')->checkbox() ?></td>
<td><?= $form->field($model, 'suggesstion_other')->textInput(['maxlength' => true]) ?></td>
</tr>
</table>
</div>-->
<?php
$arr_agree = [
1 => 'Agree',
2 => 'Disagree',
];
?>
<div class="alert alert-danger">
<?= $arr_agree[$model->is_ca_confirm_agree] ?>
<table cellpadding="4" cellspacing="0" border="0">
<tr>
<td><?= $model->is_suggesstion_ihc ? 'Yes' : '' ?></td>
<td><?= htmlspecialchars($model->suggesstion_ihc, ENT_QUOTES, 'UTF-8') ?></td>
</tr>
<tr>
<td><?= $model->is_suggesstion_special_stain ? 'Yes' : '' ?></td>
<td><?= htmlspecialchars($model->suggesstion_special_stain, ENT_QUOTES, 'UTF-8') ?></td>
</tr>
<tr>
<td><?= $model->is_suggesstion_other ? 'Yes' : '' ?></td>
<td><?= htmlspecialchars($model->suggesstion_other, ENT_QUOTES, 'UTF-8') ?></td>
</tr>
</table>
Pathologist2 Approve at: <?= $model->pathologist2_at?>
</div>
</div>
<?php
$script = <<<JS
// Function to toggle visibility based on checkbox state
function togglePathologistContainer() {
if ($('#is_ca_confirm').is(':checked')) {
$('#pathologist2-container').show();
} else {
$('#pathologist2-container').hide();
}
}
function toggleDisagreeContainer() {
const isDisagreeChecked = $('#is_ca_confirm_agree input[value="2"]').is(':checked');
if (isDisagreeChecked) {
$('#disagree-container').show();
} else {
$('#disagree-container').hide();
}
}
// Initial check on page load
togglePathologistContainer();
toggleDisagreeContainer();
// Bind change events
$('#is_ca_confirm').on('change', function() {
togglePathologistContainer();
});
$('#is_ca_confirm_agree input').on('change', function() {
toggleDisagreeContainer();
});
JS;
$this->registerJs($script);
?>

0
frontend/modules/pathologist/views/do/hpv.php Normal file → Executable file
View File

View File

@ -379,6 +379,11 @@ $this->params['breadcrumbs'][] = $this->title;
</div>
</div>-->
<?= $this->render('_is_ca_confirm', [
'form' => $form,
'model' => $model,
]) ?>
<div class="mt-4">
<i class="ri-map-pin-user-fill"></i> Register by
: <?= isset($case_surgical->register) ? $case_surgical->register->realname : ' ' ?>

View File

@ -1,6 +1,7 @@
<?php
use common\models\ApproveStatus;
use common\models\CaseSurgical;
use common\models\HistoHeEmbed;
use common\models\HistoHeSection;
use common\models\HistoHeStaining;
@ -11,10 +12,18 @@ use common\models\ImmunoSlideSpecial;
use common\models\HistoSlideSpecial;
use common\models\SurgicalConsult;
use yii\bootstrap5\ActiveForm;
use yii\data\ArrayDataProvider;
use yii\grid\GridView;
$this->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,
]);
?>
<?php //$this->render('/layouts/_operation')
?>

0
frontend/modules/pathologist/views/task/_hpv.php Normal file → Executable file
View File

0
frontend/modules/pathologist/views/task/hpv-new.php Normal file → Executable file
View File

0
frontend/modules/pathologist/views/task/hpv.php Normal file → Executable file
View File

View File

View File

View File

@ -89,8 +89,8 @@ use unclead\multipleinput\MultipleInputColumn;
</div>
<div class="col-md-6">
<?php if (!$model->isNewRecord) { ?>
<embed src="<?= Url::to(['sticker/print', 'id_case' => $model->id_case], true) ?>#view=fit"
type="application/pdf" width="100%" height="252">
<embed src="<?= Url::to(['sticker/print', 'id_case' => $model->id_case], true) ?>#view=fit"
type="application/pdf" width="100%" height="252">
<?php } ?>
</div>
</div>
@ -303,10 +303,10 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
]) ?>
</div>
<div class="col-md-3">
<?= $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() {
<div class="mt-3">
<div class="row">
<?php if (!$model->isNewRecord) { ?>
<div class="col-md-3">
<?php /* $form->field($model, 'cytotech1_id')->widget(Select2::class, [
<div class="col-md-3">
<?php /* $form->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...'
]
]) ?>
</div>
<div class="col-md-3">
<?= $form->field($model, 'pathologist_id')->widget(Select2::class, [
</div>
<div class="col-md-3">
<?= $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...'
]
]) ?>
</div>
</div>
<?php } ?>
<div class="col-md-2 mt-4">
<?= $form->field($model, 'is_express')->checkbox() ?>
@ -731,12 +731,12 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
</div>
<?php if (!$model->isNewRecord) { ?>
<div class="mt-4">
<h5><i class="ri-draft-line"></i> รายการ Spicimen</h5>
</div>
<div class="mt-4">
<div class="table-responsive">
<?= $form->field($cyto_non_gyn_container, 'items')->label(false)->widget(MultipleInput::class, [
<div class="mt-4">
<h5><i class="ri-draft-line"></i> รายการ Spicimen</h5>
</div>
<div class="mt-4">
<div class="table-responsive">
<?= $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() {
],
]
]) ?>
</div>
</div>
</div>
<?php } ?>
<?php
$this->registerJs("
@ -864,13 +864,13 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
) ?>
<?php if (!$model->isNewRecord) { ?>
<div class="row">
<div class="col-md-12">
<div class="mt-3">
<h6><i class="ri-bill-line"></i>
รายการ Test Order</h6>
</div>
<?= GridView::widget([
<div class="row">
<div class="col-md-12">
<div class="mt-3">
<h6><i class="ri-bill-line"></i>
รายการ Test Order</h6>
</div>
<?= 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' => "<div class='table-outer'>\n{items}\n</div><div class='d-flex justify-content-between align-items-center mt-4'>{pager}</div>",
]) ?>
</div>
</div>
</div>
<?php } ?>
<div class="mt-5">
@ -898,8 +898,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
foreach ($model->getFiles() as $file => $val) {
if (!empty($val)) {
?>
<li><?= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/non-gyn/files/' . $val, ['target' => '_blank']); ?>
<?php
<li><?= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/non-gyn/files/' . $val, ['target' => '_blank']); ?>
<?php
echo Html::a('<i class="ri-close-fill"></i>', [
'file-del',
'file' => $val,
@ -910,7 +910,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'data-confirm' => 'ต้องการลบ?'
]);
?>
</li>
</li>
<?php
}
} ?>
@ -933,30 +933,30 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
Container List</h6>
</div>
<div style="width: 250px"><?= $model->getSpecimenDelImgs() ?></div>
<?php } ?>
<?php } ?>
<strong>
<h6 class="mt-4"><i class="ri-file-copy-2-fill"></i> Outsource Data</h6>
</strong>
<strong>
<h6 class="mt-4"><i class="ri-file-copy-2-fill"></i> Outsource Data</h6>
</strong>
<div class="mt-3">
<div class="row">
<div class="col-md-12">
<?= $form->field($model, 'is_outlab')->checkbox() ?>
<div class="outlab_report"
<?= !$model->isNewRecord && $model->is_outlab ? '' : 'style="display: none;"' ?>>
<?= $form->field($model, 'outlab_report[]')->fileInput(['multiple' => true]) ?>
<div class="mb-3">
<div class="alert bg-warning text-white alert-dismissible d-flex align-items-center fade show"
role="alert">
<i class="ri-alarm-warning-line fs-3 me-2 lh-1"></i>หมายเหตุ: กรุณาอัพโหลดไฟล์
Outsource Data ก่อน
Sticker
<div class="mt-3">
<div class="row">
<div class="col-md-12">
<?= $form->field($model, 'is_outlab')->checkbox() ?>
<div class="outlab_report"
<?= !$model->isNewRecord && $model->is_outlab ? '' : 'style="display: none;"' ?>>
<?= $form->field($model, 'outlab_report[]')->fileInput(['multiple' => true]) ?>
<div class="mb-3">
<div class="alert bg-warning text-white alert-dismissible d-flex align-items-center fade show"
role="alert">
<i class="ri-alarm-warning-line fs-3 me-2 lh-1"></i>หมายเหตุ: กรุณาอัพโหลดไฟล์
Outsource Data ก่อน
Sticker
</div>
</div>
</div>
</div>
<?php $this->registerJs("
<?php $this->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() {
}
});
") ?>
<ul>
<?php
<ul>
<?php
foreach ($model->getReport() as $file => $val) {
?>
<li><?= 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() {
]);
?>
</li>
<?php } ?>
</ul>
<?php } ?>
</ul>
</div>
</div>
</div>
</div>
<div class="mt-4">
<div class="mb-3">
<?= Html::submitButton('<i class="ri-save-line"></i> บันทึกข้อมูล', ['class' => 'btn btn-success']) ?>
<div class="mt-4">
<div class="mb-3">
<?= Html::submitButton('<i class="ri-save-line"></i> บันทึกข้อมูล', ['class' => 'btn btn-success']) ?>
</div>
</div>
</div>
<div class="alert bg-info text-white alert-dismissible d-flex align-items-center fade show" role="alert">
<i class="ri-alarm-warning-line fs-3 me-2 lh-1"></i>หมายเหตุ: กรุณาบันทึกข้อมูลก่อนการ Print
Sticker
</div>
<div class="alert bg-info text-white alert-dismissible d-flex align-items-center fade show" role="alert">
<i class="ri-alarm-warning-line fs-3 me-2 lh-1"></i>หมายเหตุ: กรุณาบันทึกข้อมูลก่อนการ Print
Sticker
</div>
<?php ActiveForm::end() ?>
<?php ActiveForm::end() ?>
</div>
</div>

View File

@ -74,8 +74,8 @@ use common\models\FinanceServiceCharge;
</div>
<div class="col-md-6">
<?php if (!$model->isNewRecord) { ?>
<embed src="<?= Url::to(['sticker/print', 'id_case' => $model->id_case], true) ?>#view=fit"
type="application/pdf" width="100%" height="252">
<embed src="<?= Url::to(['sticker/print', 'id_case' => $model->id_case], true) ?>#view=fit"
type="application/pdf" width="100%" height="252">
<?php } ?>
</div>
</div>
@ -290,10 +290,10 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
<?php // $form->field($model, 'clinician')->textInput()
?>
<div class="col-md-3">
<?= $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() {
<div class="row">
<?php if (!$model->isNewRecord) { ?>
<div class="col-md-3">
<?= $form->field($model, 'cytotech1_id')->widget(Select2::class, [
<div class="col-md-3">
<?= $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...'
]
]) ?>
</div>
</div>
<?php } ?>
@ -640,13 +640,13 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
</div>
<?php if (!$model->isNewRecord) { ?>
<div class="row">
<div class="col-md-12">
<div class="mt-3">
<h6><i class="ri-bill-line"></i>
รายการ Test Order</h6>
</div>
<?= GridView::widget([
<div class="row">
<div class="col-md-12">
<div class="mt-3">
<h6><i class="ri-bill-line"></i>
รายการ Test Order</h6>
</div>
<?= 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' => "<div class='table-outer'>\n{items}\n</div><div class='d-flex justify-content-between align-items-center mt-4'>{pager}</div>",
]) ?>
</div>
</div>
<?php
</div>
<?php
$case_hpv = CaseHpv::find()->where(['his_ln' => $model->his_ln])->one();
if ($case_hpv) { ?>
<div class="alert alert-warning bg-warning mt-4">
มีการส่งตรวจ HPV ด้วย ID Case: <?= $case_hpv->id_case ?>
</div>
<?php } ?>
<div class="alert alert-warning bg-warning mt-4">
มีการส่งตรวจ HPV ด้วย ID Case: <?= $case_hpv->id_case ?>
</div>
<?php } ?>
<?php } ?>
@ -686,8 +686,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
foreach ($model->getFiles() as $file => $val) {
if (!empty($val)) {
?>
<li><?= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/files/' . $val, ['target' => '_blank']); ?>
<?php
<li><?= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/files/' . $val, ['target' => '_blank']); ?>
<?php
echo Html::a('<i class="ri-close-fill"></i>', [
'file-del',
'file' => $val,
@ -698,7 +698,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'data-confirm' => 'ต้องการลบ?'
]);
?>
</li>
</li>
<?php
}
} ?>
@ -731,8 +731,8 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
<?php
foreach ($model->getReport() as $file => $val) {
?>
<li><?= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/report/' . $val, ['target' => '_blank']); ?>
<?php
<li><?= Html::a($val, Yii::getAlias('@web') . '/uploads/cyto/pap/report/' . $val, ['target' => '_blank']); ?>
<?php
echo Html::a('<i class="ri-close-fill"></i>', [
'report-del',
'file' => $val,
@ -743,7 +743,7 @@ $('#patient-detail').on('click', '.select-patient-btn', function() {
'data-confirm' => 'ต้องการลบ?'
]);
?>
</li>
</li>
<?php } ?>
</ul>

View File

View File

View File

View File

0
frontend/modules/register/views/case/_patient_hpv.php Normal file → Executable file
View File

0
frontend/modules/register/views/case/external.php Normal file → Executable file
View File

0
frontend/modules/register/views/center/ex.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
frontend/modules/register/views/cyto-fixation/view.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
frontend/modules/register/views/cyto-specimen/view.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

0
frontend/modules/register/views/sticker/_sticker.php Normal file → Executable file
View File

View File

0
frontend/modules/report/views/report-log/pdf.php Normal file → Executable file
View File

View File

@ -17,7 +17,6 @@ $this->params['breadcrumbs'][] = $this->title;
<h5 class="card-title"> <?= Html::encode($this->title) ?>
</h5>
</div>
<div class="card-body">
<?php echo $this->render('_search', ['model' => $searchModel]);

Some files were not shown because too many files have changed in this diff Show More