fix view report
parent
8f15df6717
commit
6c86e15bf5
|
|
@ -410,6 +410,22 @@ class Pathology extends Component
|
||||||
return $collect_at;
|
return $collect_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function thaiDateTimeNoS($attribute)
|
||||||
|
{
|
||||||
|
error_log("thaiDateTimeNoS called with: " . $attribute);
|
||||||
|
if (empty($attribute) || $attribute === '0000-00-00 00:00:00') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$datetimeStr = explode('.', $attribute)[0];
|
||||||
|
$dt = new \DateTime($datetimeStr);
|
||||||
|
return $dt->format('d/m/Y H:i');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* จัด Format DateTime ให้เป็นแบบ 03/05/2023 จาก Y-m-d H:i:s
|
* จัด Format DateTime ให้เป็นแบบ 03/05/2023 จาก Y-m-d H:i:s
|
||||||
* @param $attribute
|
* @param $attribute
|
||||||
|
|
@ -2723,4 +2739,4 @@ class Pathology extends Component
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace frontend\modules\hospital\controllers;
|
namespace frontend\modules\hospital\controllers;
|
||||||
|
|
||||||
|
use common\models\FinanceServiceCharge;
|
||||||
use Yii;
|
use Yii;
|
||||||
use yii\rest\Controller;
|
use yii\rest\Controller;
|
||||||
use common\models\PatientCase;
|
use common\models\PatientCase;
|
||||||
|
|
@ -89,20 +89,20 @@ class ReportController extends Controller
|
||||||
|
|
||||||
// ลบ % และช่องว่างทั้งหมดออกจาก $hn
|
// ลบ % และช่องว่างทั้งหมดออกจาก $hn
|
||||||
$hn = str_replace(['%20', ' '], '', $hn);
|
$hn = str_replace(['%20', ' '], '', $hn);
|
||||||
|
|
||||||
if (empty($hn)) {
|
if (empty($hn)) {
|
||||||
throw new NotFoundHttpException('Invalid request');
|
throw new NotFoundHttpException('Invalid request');
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::findIdentityByAccessToken('qSQNw67zUp0R0zZfluRzXXnGX9J9LQMv');
|
$user = User::findIdentityByAccessToken('qSQNw67zUp0R0zZfluRzXXnGX9J9LQMv');
|
||||||
if ($user) {
|
if ($user) {
|
||||||
Yii::$app->user->login($user, 3600);
|
Yii::$app->user->login($user, 3600);
|
||||||
} else {
|
} else {
|
||||||
throw new NotFoundHttpException('User not found');
|
throw new NotFoundHttpException('User not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
$case = PatientCase::find()->where(['h_n' => $hn])->one();
|
$case = PatientCase::find()->where(['h_n' => $hn])->one();
|
||||||
|
|
||||||
if (!$case || empty($case->id_case)) {
|
if (!$case || empty($case->id_case)) {
|
||||||
//return $this->render('../../../report/views/case/history_his', ['hn' => $hn]); // ถ้ายังไม่ล็อกอิน ให้กลับไปหน้า login
|
//return $this->render('../../../report/views/case/history_his', ['hn' => $hn]); // ถ้ายังไม่ล็อกอิน ให้กลับไปหน้า login
|
||||||
return $this->redirect('http://192.168.207.14/patho/pathouser_old.php?inc_id=' . $hn);
|
return $this->redirect('http://192.168.207.14/patho/pathouser_old.php?inc_id=' . $hn);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ use common\models\AutopsyDiagnosis;
|
||||||
use common\models\ConstStatus;
|
use common\models\ConstStatus;
|
||||||
use common\models\CytoNonGynDiagnosis;
|
use common\models\CytoNonGynDiagnosis;
|
||||||
use common\models\CytoPapDiagnosis;
|
use common\models\CytoPapDiagnosis;
|
||||||
|
use common\models\FrozenDiagnosis;
|
||||||
use common\models\SurgicalDiagnosis;
|
use common\models\SurgicalDiagnosis;
|
||||||
use yii\bootstrap5\ActiveForm;
|
use yii\bootstrap5\ActiveForm;
|
||||||
use yii\grid\GridView;
|
use yii\grid\GridView;
|
||||||
|
|
@ -17,10 +18,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4 class="card-title">
|
<h5 class="card-title">
|
||||||
<i data-feather="file-text" style="width: 16px; margin-bottom: -5px;"></i>
|
<i class="ri-seo-fill"></i> ค้นหาผลตรวจทางพยาธิวิทยา
|
||||||
ผลตรวจทางพยาธิวิทยา
|
</h5>
|
||||||
</h4>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $form = ActiveForm::begin(['method' => 'get', 'action' => ['index']]) ?>
|
<?php $form = ActiveForm::begin(['method' => 'get', 'action' => ['index']]) ?>
|
||||||
|
|
@ -33,27 +33,33 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<?= $form->field($searchModel, 'id_case')->label('Patho Number')->widget(MaskedInput::class, [
|
<?= $form->field($searchModel, 'id_case')->label('Patho Number')->widget(MaskedInput::class, [
|
||||||
'mask' => 'A99-999999',
|
'mask' => 'A99-99999',
|
||||||
'options' => ['id' => 'id_case', 'class' => 'form-control input-lg']
|
'options' => ['id' => 'id_case', 'class' => 'form-control input-lg']
|
||||||
]) ?>
|
]) ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?= Html::submitButton('ค้นหาผลตรวจทางพยาธิวิทยา', ['class' => 'btn btn-sm btn-primary']) ?>
|
<?= Html::submitButton('<i class="ri-search-2-line"></i> ค้นหา', ['class' => 'btn btn-primary']) ?>
|
||||||
<?php ActiveForm::end() ?>
|
<?php ActiveForm::end() ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($searchModel->load(Yii::$app->request->get())) { ?>
|
<?php if ($searchModel->load(Yii::$app->request->get())) { ?>
|
||||||
<div class="card">
|
<div class="card mt-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="card-title">
|
||||||
|
<i class="ri-file-text-line"></i> ผลตรวจทางพยาธิวิทยา
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<?= GridView::widget([
|
<?= GridView::widget([
|
||||||
'dataProvider' => $dataProviderAll,
|
'dataProvider' => $dataProviderAll,
|
||||||
'pager' => ['class' => 'yii\bootstrap5\LinkPager'],
|
'pager' => ['class' => 'yii\bootstrap5\LinkPager'],
|
||||||
|
'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>",
|
||||||
//'filterModel' => $searchModel,
|
//'filterModel' => $searchModel,
|
||||||
'columns' => [
|
'columns' => [
|
||||||
[
|
[
|
||||||
|
|
||||||
'class' => 'yii\grid\ActionColumn',
|
'class' => 'yii\grid\ActionColumn',
|
||||||
'template' => '{view}',
|
'template' => '{view}',
|
||||||
'headerOptions' => ['style' => 'width: 300px;'], // Corrected width value
|
'headerOptions' => ['style' => 'width: 300px;'], // Corrected width value
|
||||||
|
|
@ -62,13 +68,13 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
'view' => function ($url, $model, $key) {
|
'view' => function ($url, $model, $key) {
|
||||||
if ($model->status_id == 18) {
|
if ($model->status_id == 18) {
|
||||||
return Html::a(
|
return Html::a(
|
||||||
'<span class="fa fa-file-pdf-o"></span> ผลการตรวจ',
|
'<i class="ri-file-text-line"></i> ผลการตรวจ',
|
||||||
['/hospital/report/view', 'id_case' => $model->id_case],
|
['/hospital/report/view', 'h_n' => $model->h_n],
|
||||||
['class' => 'btn btn-sm btn-info btn-block', 'title' => 'View this Report', 'target' => '_blank', 'data-pjax' => '0']
|
['class' => 'btn btn-sm btn-info btn-block', 'title' => 'View this Report', 'target' => '_blank', 'data-pjax' => '0']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($model->status_id < 18) {
|
if ($model->status_id < 18) {
|
||||||
return '<span class="badge badge-danger">' . 'ผลยังไม่ออก' . '</span>';
|
return '<span class="badge border border-danger bg-danger-subtle text-danger">' . 'ผลยังไม่ออก' . '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -116,8 +122,8 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
if ($case_type === 'non-gyn') {
|
if ($case_type === 'non-gyn') {
|
||||||
return 'Cyto';
|
return 'Cyto';
|
||||||
}
|
}
|
||||||
if ($case_type === 'autopsy') {
|
if ($case_type === 'frozen') {
|
||||||
return 'Autopsy';
|
return 'Frozen';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -150,9 +156,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
'headerOptions' => ['style' => 'text-align:center; width: 200px;'], // Corrected width value
|
'headerOptions' => ['style' => 'text-align:center; width: 200px;'], // Corrected width value
|
||||||
'contentOptions' => ['style' => 'vertical-align: middle;'],
|
'contentOptions' => ['style' => 'vertical-align: middle;'],
|
||||||
'attribute' => 'receive_at',
|
'attribute' => 'receive_at',
|
||||||
'label' => 'วันที่รับลงทะเบียน',
|
'label' => 'วันที่รับสิ่งส่งตรวจ',
|
||||||
'value' => function ($model) {
|
'value' => function ($model) {
|
||||||
return $model->receive_at ? Yii::$app->pathology->thaiToDateOnly($model->receive_at) : '';
|
return $model->receive_at ? Yii::$app->pathology->thaiDate($model->receive_at) : '';
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
@ -163,41 +169,50 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
'value' => function ($model) {
|
'value' => function ($model) {
|
||||||
$case_type = Yii::$app->pathology->getCaseType($model->id_case);
|
$case_type = Yii::$app->pathology->getCaseType($model->id_case);
|
||||||
if ($case_type === 'surgical') {
|
if ($case_type === 'surgical') {
|
||||||
foreach (SurgicalDiagnosis::find()
|
foreach (
|
||||||
->where([
|
SurgicalDiagnosis::find()
|
||||||
'id_case' => $model->id_case
|
->where([
|
||||||
])
|
'id_case' => $model->id_case
|
||||||
->all() as $surgical_diag)
|
])
|
||||||
return $surgical_diag->pathologist_at ? Yii::$app->pathology->thaiDateTime($surgical_diag->pathologist_at) : '';
|
->all() as $surgical_diag
|
||||||
|
)
|
||||||
|
return $surgical_diag ? Yii::$app->pathology->thaiDateTime($surgical_diag->pathologist_at) : '';
|
||||||
}
|
}
|
||||||
if ($case_type === 'pap') {
|
if ($case_type === 'pap') {
|
||||||
foreach (CytoPapDiagnosis::find()
|
$report = ''; // ป้องกัน undefined
|
||||||
->where([
|
|
||||||
'id_case' => $model->id_case
|
foreach (
|
||||||
])
|
CytoPapDiagnosis::find()
|
||||||
->all() as $pap_diag)
|
->where(['id_case' => $model->id_case])
|
||||||
|
->all() as $pap_diag
|
||||||
|
) {
|
||||||
if (!empty($pap_diag->pathologist_id)) {
|
if (!empty($pap_diag->pathologist_id)) {
|
||||||
$report = isset($pap_diag->pathologist_at) ? Yii::$app->pathology->thaiDateTime($pap_diag->pathologist_at) : '';
|
$report = isset($pap_diag->pathologist_at) ? Yii::$app->pathology->thaiDateTime($pap_diag->pathologist_at) : '';
|
||||||
} else {
|
} else {
|
||||||
$report = isset($pap_diag->cytotech1_at) ? Yii::$app->pathology->thaiDateTime($pap_diag->cytotech1_at) : '';
|
$report = isset($pap_diag->cytotech1_at) ? Yii::$app->pathology->thaiDateTime($pap_diag->cytotech1_at) : '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $report;
|
return $report;
|
||||||
}
|
}
|
||||||
if ($case_type === 'non-gyn') {
|
if ($case_type === 'non-gyn') {
|
||||||
foreach (CytoNonGynDiagnosis::find()
|
foreach (
|
||||||
->where([
|
CytoNonGynDiagnosis::find()
|
||||||
'id_case' => $model->id_case
|
->where([
|
||||||
])
|
'id_case' => $model->id_case
|
||||||
->all() as $non_gyn_diag)
|
])
|
||||||
|
->all() as $non_gyn_diag
|
||||||
|
)
|
||||||
return $non_gyn_diag->pathologist_at ? Yii::$app->pathology->thaiDateTime($non_gyn_diag->pathologist_at) : '';
|
return $non_gyn_diag->pathologist_at ? Yii::$app->pathology->thaiDateTime($non_gyn_diag->pathologist_at) : '';
|
||||||
}
|
}
|
||||||
if ($case_type === 'autopsy') {
|
if ($case_type === 'frozen') {
|
||||||
foreach (AutopsyDiagnosis::find()
|
foreach (
|
||||||
->where([
|
FrozenDiagnosis::find()
|
||||||
'id_case' => $model->id_case
|
->where([
|
||||||
])
|
'id_case' => $model->id_case
|
||||||
->all() as $autopsy_diag)
|
])
|
||||||
return $autopsy_diag->pathologist_at ? Yii::$app->pathology->thaiDateTime($autopsy_diag->pathologist_at) : '';
|
->all() as $frozen_diag
|
||||||
|
)
|
||||||
|
return $frozen_diag->pathologist_at ? Yii::$app->pathology->thaiDateTime($frozen_diag->pathologist_at) : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -213,18 +228,6 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
/*[
|
|
||||||
'contentOptions' => ['style' => 'width: 200px;'],
|
|
||||||
'attribute' => 'pathologist',
|
|
||||||
'value' => function ($model) {
|
|
||||||
if ($model->pathologist_id > 2) {
|
|
||||||
return $model->pathologist;
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],*/
|
|
||||||
//'pathologist',
|
|
||||||
]
|
]
|
||||||
]) ?>
|
]) ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,225 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use common\models\AutopsyDiagnosis;
|
||||||
|
use common\models\CenterApprove;
|
||||||
|
use common\models\CytoNonGynDiagnosis;
|
||||||
|
use common\models\CytoPapDiagnosis;
|
||||||
|
use common\models\DishDiagnosis;
|
||||||
|
use common\models\FrozenDiagnosis;
|
||||||
|
use common\models\MolecularDiagnosis;
|
||||||
|
use common\models\SurgicalDiagnosis;
|
||||||
|
use kartik\detail\DetailView;
|
||||||
|
use yii\helpers\Html;
|
||||||
|
|
||||||
|
$this->title = Html::encode($model->id_case . ' : ' . ' : ' . $model->getFullname());
|
||||||
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
|
$case_type = Yii::$app->pathology->getCaseType($model->id_case);
|
||||||
|
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||||
|
|
||||||
|
if ($case_type === 'surgical') {
|
||||||
|
$diagnosis = SurgicalDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
if ($case_type === 'non-gyn') {
|
||||||
|
$diagnosis = CytoNonGynDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
if ($case_type === 'pap') {
|
||||||
|
$diagnosis = CytoPapDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
if ($case_type === 'frozen') {
|
||||||
|
$diagnosis = FrozenDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
if ($case_type === 'dish') {
|
||||||
|
$diagnosis = DishDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
if ($case_type === 'molecular') {
|
||||||
|
$diagnosis = MolecularDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
if ($case_type === 'autopsy') {
|
||||||
|
$diagnosis = AutopsyDiagnosis::find()->where(['id_case' => $model->id_case])->all();
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="mt-4">
|
||||||
|
<h5>Patient Information</h5>
|
||||||
|
<?= DetailView::widget([
|
||||||
|
'model' => $model,
|
||||||
|
'condensed' => false,
|
||||||
|
'hover' => true,
|
||||||
|
'mode' => DetailView::MODE_VIEW,
|
||||||
|
'panel' => false,
|
||||||
|
'enableEditMode' => false,
|
||||||
|
'attributes' => [
|
||||||
|
[
|
||||||
|
'group' => true,
|
||||||
|
'label' => 'Patient Information',
|
||||||
|
'rowOptions' => ['class' => 'table-primary']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'id_case',
|
||||||
|
'valueColOptions' => ['style' => 'width:90%']
|
||||||
|
],
|
||||||
|
/*[
|
||||||
|
'attribute' => 'patient_address',
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
]*/
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'label' => 'Patient Name',
|
||||||
|
'value' => Html::encode($model->getFullname()),
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'attribute' => 'gender',
|
||||||
|
'value' => Yii::$app->pathology->getGender($model->gender),
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'birthdate',
|
||||||
|
'value' => Yii::$app->pathology->thaiToDateOnly($model->birthdate),
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'attribute' => 'age',
|
||||||
|
'value' => Html::encode($model->age . ' ' . $model->age_unit),
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'hospital_id',
|
||||||
|
'value' => Html::encode($model->hospital->name),
|
||||||
|
'valueColOptions' => ['style' => 'width:90%']
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'ward',
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'attribute' => 'clinician',
|
||||||
|
'valueColOptions' => ['style' => 'width:30%']
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'group' => true,
|
||||||
|
'label' => 'Specimen Information',
|
||||||
|
'rowOptions' => ['class' => 'table-primary']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'collected_at',
|
||||||
|
'value' => Yii::$app->pathology->thaiToDateOnly($model->collected_at),
|
||||||
|
'valueColOptions' => ['style' => 'width:90%']
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'clinical_diagnosis',
|
||||||
|
'format' => 'html',
|
||||||
|
'valueColOptions' => ['style' => 'width:90%']
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'columns' => [
|
||||||
|
[
|
||||||
|
'attribute' => 'register_id',
|
||||||
|
'value' => isset($model->register) ? $model->register->realname : '',
|
||||||
|
'valueColOptions' => ['style' => 'width: 30%']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'attribute' => 'register_at',
|
||||||
|
'valueColOptions' => ['style' => 'width: 30%']
|
||||||
|
],
|
||||||
|
|
||||||
|
]
|
||||||
|
],
|
||||||
|
]
|
||||||
|
]) ?>
|
||||||
|
</div>
|
||||||
|
<div class="mt-4">
|
||||||
|
<h5><?= strtoupper($case_type) ?> <?= Html::encode($model->id_case) ?> Reports</h5>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Report File</th>
|
||||||
|
<th>Report Type</th>
|
||||||
|
<th>Report At</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($diagnosis as $case) {
|
||||||
|
$center_approve = CenterApprove::findOne([
|
||||||
|
'id_case' => $case->id_case,
|
||||||
|
'report_type' => $case->report_type,
|
||||||
|
'ref_id' => $case->id
|
||||||
|
]);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php if (isset($center_approve) && $center_approve->approve_status == 4) { ?>
|
||||||
|
<?php if (empty($center_approve->release_at)) { ?>
|
||||||
|
<div class="text-center"><span class="badge badge-danger">ตรวจสอบผลแล้วยังไม่ Release</span>
|
||||||
|
</div>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?php if ($case->report_type == 'outlab') { ?>
|
||||||
|
<?php foreach ($case->getReport() as $file => $val) { ?>
|
||||||
|
<?= Html::a(Html::img(Yii::getAlias('@web') . '/img/icon/pdf-red.png', ['width' => 30]), Yii::getAlias('@web') . '/' . $case->uploadReportFolder . '/' . $val, ['target' => '_blank', 'class' => 'text-success']); ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($case->report_type == 'consult-outlab') { ?>
|
||||||
|
<?php foreach ($case->getConsultReport() as $file => $val) { ?>
|
||||||
|
<?= Html::a(Html::img(Yii::getAlias('@web') . '/img/icon/pdf-red.png', ['width' => 30]), Yii::getAlias('@web') . '/' . $case->uploadConsultReportFolder . '/' . $val, ['target' => '_blank', 'class' => 'text-success']); ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php }
|
||||||
|
if (($case->report_type != 'outlab') && ($case->report_type != 'consult-outlab')) { ?>
|
||||||
|
<?= Html::a(Html::img(Yii::getAlias('@web') . '/img/icon/pdf-red.png', ['width' => 30]), [$case_type . '-pdf', 'id_case' => $model->id_case, 'report_type' => $case->report_type, 'id' => $case->id, 'mode' => 'final'], ['target' => '_blank', 'class' => 'text-success']) ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } else { ?>
|
||||||
|
<div class="text-center"><span class="badge badge-danger">รอตรวจสอบผล</span></div>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
<td><?= ucfirst($case->report_type) ?> Report</td>
|
||||||
|
<td><?php if (!empty($case->pathologist_id)) { ?>
|
||||||
|
<?= Yii::$app->pathology->thaiDateTime($case->pathologist_at) ?>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?= Yii::$app->pathology->thaiDateTime($case->cytotech1_at) ?>
|
||||||
|
<?php } ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php } // foreach
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -4,12 +4,13 @@ return [
|
||||||
2 => [
|
2 => [
|
||||||
'center',
|
'center',
|
||||||
'slide',
|
'slide',
|
||||||
'chat',
|
|
||||||
'services',
|
'services',
|
||||||
'silde-qa',
|
'pms_charge',
|
||||||
|
'hospital',
|
||||||
],
|
],
|
||||||
3 => [
|
3 => [
|
||||||
'surgical',
|
'surgical',
|
||||||
|
'frozen',
|
||||||
],
|
],
|
||||||
1007 => [
|
1007 => [
|
||||||
'services',
|
'services',
|
||||||
|
|
@ -22,21 +23,21 @@ return [
|
||||||
'approve',
|
'approve',
|
||||||
'block-slide',
|
'block-slide',
|
||||||
'center',
|
'center',
|
||||||
'chat',
|
|
||||||
'cyto',
|
'cyto',
|
||||||
'durable',
|
'durable',
|
||||||
'histo',
|
'histo',
|
||||||
'immuno',
|
'immuno',
|
||||||
'pathologist',
|
'pathologist',
|
||||||
'services',
|
'services',
|
||||||
'silde-qa',
|
|
||||||
'slide',
|
'slide',
|
||||||
'special',
|
'special',
|
||||||
'stat',
|
'stat',
|
||||||
'surgical',
|
'surgical',
|
||||||
|
'frozen',
|
||||||
],
|
],
|
||||||
4 => [
|
4 => [
|
||||||
'pathologist',
|
'pathologist',
|
||||||
|
'approve',
|
||||||
],
|
],
|
||||||
7 => [
|
7 => [
|
||||||
'approve',
|
'approve',
|
||||||
|
|
@ -146,7 +147,6 @@ return [
|
||||||
'center',
|
'center',
|
||||||
'chat',
|
'chat',
|
||||||
'services',
|
'services',
|
||||||
'silde-qa',
|
|
||||||
'slide',
|
'slide',
|
||||||
],
|
],
|
||||||
1027 => [
|
1027 => [
|
||||||
|
|
@ -154,7 +154,6 @@ return [
|
||||||
'chat',
|
'chat',
|
||||||
'block-slide',
|
'block-slide',
|
||||||
'services',
|
'services',
|
||||||
'silde-qa',
|
|
||||||
'slide',
|
'slide',
|
||||||
],
|
],
|
||||||
1028 => [
|
1028 => [
|
||||||
|
|
@ -309,8 +308,8 @@ return [
|
||||||
'surgical',
|
'surgical',
|
||||||
'stat',
|
'stat',
|
||||||
'special',
|
'special',
|
||||||
'silde-qa',
|
|
||||||
'molecular',
|
'molecular',
|
||||||
|
'slideqa',
|
||||||
],
|
],
|
||||||
1063 => [
|
1063 => [
|
||||||
'surgical',
|
'surgical',
|
||||||
|
|
@ -366,4 +365,15 @@ return [
|
||||||
'pms_approve',
|
'pms_approve',
|
||||||
'pms_administrator',
|
'pms_administrator',
|
||||||
],
|
],
|
||||||
];
|
21 => [
|
||||||
|
'approve',
|
||||||
|
'pathologist',
|
||||||
|
],
|
||||||
|
22 => [
|
||||||
|
'print-report',
|
||||||
|
],
|
||||||
|
23 => [
|
||||||
|
'center',
|
||||||
|
'hospital',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
@ -11,6 +11,7 @@ return [
|
||||||
'/admin/*',
|
'/admin/*',
|
||||||
'/administrator/*',
|
'/administrator/*',
|
||||||
'/audit/*',
|
'/audit/*',
|
||||||
|
'/slideqa/*',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'administrator' => [
|
'administrator' => [
|
||||||
|
|
@ -37,6 +38,9 @@ return [
|
||||||
'/histo/case/sticker-pdf',
|
'/histo/case/sticker-pdf',
|
||||||
'/histo/staining/sticker-pdf',
|
'/histo/staining/sticker-pdf',
|
||||||
'/immuno/staining/sticker-pdf',
|
'/immuno/staining/sticker-pdf',
|
||||||
|
'/histo/label-sticker/*',
|
||||||
|
'/surgical/const-service-charge-rights/*',
|
||||||
|
'/slideqa/*',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'center' => [
|
'center' => [
|
||||||
|
|
@ -113,6 +117,8 @@ return [
|
||||||
'description' => 'สิทธิ์งานศัลยพยาธิ',
|
'description' => 'สิทธิ์งานศัลยพยาธิ',
|
||||||
'children' => [
|
'children' => [
|
||||||
'/surgical/*',
|
'/surgical/*',
|
||||||
|
'/cyto/non-gyn/cell-block',
|
||||||
|
'/cyto/non-gyn/block',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'surgical' => [
|
'surgical' => [
|
||||||
|
|
@ -136,6 +142,7 @@ return [
|
||||||
'description' => 'ตรวจสอบผลการตรวจ',
|
'description' => 'ตรวจสอบผลการตรวจ',
|
||||||
'children' => [
|
'children' => [
|
||||||
'/approve/*',
|
'/approve/*',
|
||||||
|
'/pathologist/hl7/*',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'pms_slide' => [
|
'pms_slide' => [
|
||||||
|
|
@ -152,6 +159,8 @@ return [
|
||||||
'/pathologist/*',
|
'/pathologist/*',
|
||||||
'/surgical/surgical-gross/index',
|
'/surgical/surgical-gross/index',
|
||||||
'/register/cyto-specimen-type/*',
|
'/register/cyto-specimen-type/*',
|
||||||
|
'/register/service-charge/*',
|
||||||
|
'/register/const-service-charge-rights/*',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'pathologist' => [
|
'pathologist' => [
|
||||||
|
|
@ -167,7 +176,7 @@ return [
|
||||||
],
|
],
|
||||||
'pms_report' => [
|
'pms_report' => [
|
||||||
'type' => 2,
|
'type' => 2,
|
||||||
'description' => 'View report',
|
'description' => 'สิทธิ์การเข้าถึงใบรายงานผลการวินิจฉัย',
|
||||||
'children' => [
|
'children' => [
|
||||||
'/report/*',
|
'/report/*',
|
||||||
],
|
],
|
||||||
|
|
@ -241,6 +250,8 @@ return [
|
||||||
'description' => 'สิทธิ์งาน Immuno',
|
'description' => 'สิทธิ์งาน Immuno',
|
||||||
'children' => [
|
'children' => [
|
||||||
'/immuno/*',
|
'/immuno/*',
|
||||||
|
'/register/service-charge/*',
|
||||||
|
'/slideqa/surgical/*',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'immuno' => [
|
'immuno' => [
|
||||||
|
|
@ -308,6 +319,8 @@ return [
|
||||||
'children' => [
|
'children' => [
|
||||||
'/special/*',
|
'/special/*',
|
||||||
'pms_histo',
|
'pms_histo',
|
||||||
|
'/slideqa/surgical/*',
|
||||||
|
'/register/service-charge/*',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'special' => [
|
'special' => [
|
||||||
|
|
@ -556,4 +569,55 @@ return [
|
||||||
'pms_hospital',
|
'pms_hospital',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'/print-report/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'pms_print_report' => [
|
||||||
|
'type' => 2,
|
||||||
|
'description' => 'สิทธิ์การพิมพ์ใบรายงานผล',
|
||||||
|
'children' => [
|
||||||
|
'/print-report/*',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'print-report' => [
|
||||||
|
'type' => 1,
|
||||||
|
'description' => 'บทบาทการพิมพ์ใบรายงานผล',
|
||||||
|
'children' => [
|
||||||
|
'pms_print_report',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'/register/service-charge/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/slideqa/surgical/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/pathologist/hl7/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/histo/label-sticker/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/finance/finance-service-charge/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'pms_charge' => [
|
||||||
|
'type' => 2,
|
||||||
|
'description' => 'สิทธิ์ charge',
|
||||||
|
'children' => [
|
||||||
|
'/finance/finance-service-charge/*',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'/surgical/const-service-charge-rights/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/cyto/non-gyn/cell-block' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/cyto/non-gyn/block' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
|
'/register/const-service-charge-rights/*' => [
|
||||||
|
'type' => 2,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue