fix header report
parent
584f29c2f8
commit
80645d8ba8
|
|
@ -149,7 +149,7 @@ class LabelStickerController extends \yii\web\Controller
|
|||
return $pdf->render();
|
||||
}
|
||||
|
||||
public function actionStickerPdfNoAuto($id_case, $label, $no_slide = null, $stain1 = null, $stain2 = null, $stain_1 = null, $stain_2 = null)
|
||||
public function actionStickerPdfNoAuto($id_case, $label, $no_slide = null)
|
||||
{
|
||||
$stain1 = null;
|
||||
$stain2 = null;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
use common\models\CaseSurgical;
|
||||
use common\models\SurgicalSlide;
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ class CaseController extends Controller
|
|||
],
|
||||
'marginLeft' => 12,
|
||||
'marginRight' => 10,
|
||||
'marginTop' => 103,
|
||||
'marginTop' => 77,
|
||||
'marginBottom' => 20,
|
||||
'marginFooter' => 3,
|
||||
]);
|
||||
|
|
@ -1543,6 +1543,106 @@ class CaseController extends Controller
|
|||
$case = null;
|
||||
$alert = null; // กำหนดค่าเริ่มต้น
|
||||
|
||||
// ค้นหาข้อมูลจากตารางที่เกี่ยวข้อง
|
||||
if ($case_type == 'surgical') {
|
||||
$case = SurgicalDiagnosis::findOne(['id_case' => $id_case]);
|
||||
} elseif ($case_type == 'non-gyn') {
|
||||
$case = CytoNonGynDiagnosis::findOne(['id_case' => $id_case]);
|
||||
} elseif ($case_type == 'pap') {
|
||||
$case = CytoPapDiagnosis::findOne(['id_case' => $id_case]);
|
||||
}
|
||||
|
||||
// ตรวจสอบว่ามีการตั้งค่า critical diagnosis หรือไม่
|
||||
if (!empty($case) && (int)$case->is_critical_diagnosis === 1) {
|
||||
$alert = '
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="
|
||||
border:0.8pt solid red;
|
||||
padding:2px 4px;
|
||||
color:red;
|
||||
font-size:8pt;
|
||||
font-weight:bold;
|
||||
line-height:1.15;
|
||||
text-align:center;
|
||||
">
|
||||
CRITICAL REPORT<br>
|
||||
<span style="font-size:7.5pt; font-weight:normal;">
|
||||
แจ้งแพทย์ด่วน
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
}
|
||||
// กำหนดความสูงของ element
|
||||
$height = ($alert !== null) ? "1.3cm" : "1.81cm";
|
||||
$vn_text = null;
|
||||
if ($vn != '') {
|
||||
|
||||
if (preg_match('/^[a-z0-9-_+.]+$/i', $vn)) { // ห้าม key ไทย
|
||||
$vn_text = '<div style="font-size:10pt;">VN : ' . $vn . '</div>';
|
||||
}
|
||||
}
|
||||
return '
|
||||
|
||||
<!-- TOP LINE -->
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="55%" style="vertical-align:middle;">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="padding-right:6px;">
|
||||
' . Html::img(
|
||||
Yii::getAlias('@webroot') . '/img/logo_report/logo.png',
|
||||
['style' => 'height:1.8cm;']
|
||||
) . '
|
||||
</td>
|
||||
<td style="vertical-align:middle;">
|
||||
<div style="font-size:10pt; font-weight:bold;">
|
||||
Suratthani Hospital
|
||||
</div>
|
||||
<div style="font-size:8.5pt; line-height:1.2;">
|
||||
Muang Suratthani, Suratthani 84000<br>
|
||||
Tel. 077 952 900 ต่อ 7322, 7328
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="45%" align="right" style="vertical-align:middle;">
|
||||
<h6>' . $alert . '</h6>
|
||||
<strong class="id_case">' . Html::encode($id_case) . '</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- TITLE -->
|
||||
<table width="100%" cellpadding="0" cellspacing="0" style="margin-top:4px;">
|
||||
<tr>
|
||||
<td style="
|
||||
background:#2d6bb6;
|
||||
color:#fff;
|
||||
text-align:center;
|
||||
font-size:11pt;
|
||||
font-weight:bold;
|
||||
padding:3px 0;
|
||||
">
|
||||
<strong>' . strtoupper($name) . ' PATHOLOGY REPORT</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
|
||||
}
|
||||
|
||||
/*public function header($id_case, $name, $vn = null, $is_critical_diagnosis = null, $is_first_diagnosis = null)
|
||||
{
|
||||
|
||||
$case_type = Yii::$app->pathology->getCaseType($id_case);
|
||||
|
||||
$case = null;
|
||||
$alert = null; // กำหนดค่าเริ่มต้น
|
||||
|
||||
// ค้นหาข้อมูลจากตารางที่เกี่ยวข้อง
|
||||
if ($case_type == 'surgical') {
|
||||
$case = SurgicalDiagnosis::findOne(['id_case' => $id_case]);
|
||||
|
|
@ -1604,7 +1704,7 @@ class CaseController extends Controller
|
|||
</th>
|
||||
</tr>
|
||||
</table><div class="row"><div class="mt-3"></div></div>';
|
||||
}
|
||||
}*/
|
||||
|
||||
public function header_finance($id_case, $name, $vn = null)
|
||||
{
|
||||
|
|
@ -1622,13 +1722,25 @@ class CaseController extends Controller
|
|||
} elseif ($case_type == 'pap') {
|
||||
$case = CytoPapDiagnosis::findOne(['id_case' => $id_case]);
|
||||
}
|
||||
|
||||
// ตรวจสอบว่ามีการตั้งค่า critical diagnosis หรือไม่
|
||||
if (!empty($case) && $case->is_critical_diagnosis == 1) {
|
||||
$alert = '<table>
|
||||
if (!empty($case) && (int)$case->is_critical_diagnosis === 1) {
|
||||
$alert = '
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="border: 1px solid red; padding: 4px; color:red; font-size: 14pt; text-align: left;">
|
||||
<strong>CRITICAL REPORT<br>
|
||||
แจ้งแพทย์ด่วน</strong>
|
||||
<td style="
|
||||
border:0.8pt solid red;
|
||||
padding:2px 4px;
|
||||
color:red;
|
||||
font-size:8pt;
|
||||
font-weight:bold;
|
||||
line-height:1.15;
|
||||
text-align:center;
|
||||
">
|
||||
CRITICAL REPORT<br>
|
||||
<span style="font-size:7.5pt; font-weight:normal;">
|
||||
แจ้งแพทย์ด่วน
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
|
@ -1643,7 +1755,7 @@ class CaseController extends Controller
|
|||
$vn_text = '<div style="font-size:10pt;">VN : ' . $vn . '</div>';
|
||||
}
|
||||
}
|
||||
return '
|
||||
/*return '
|
||||
|
||||
<table class="demTable">
|
||||
<tbody>
|
||||
|
|
@ -1666,9 +1778,46 @@ class CaseController extends Controller
|
|||
</tbody>
|
||||
</table>
|
||||
<hr style="color:#2d6bb6; height:3px; border-width:0; background-color:#2d6bb6;">
|
||||
';*/
|
||||
|
||||
return '
|
||||
|
||||
<!-- TOP LINE -->
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="55%" style="vertical-align:middle;">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="padding-right:6px;">
|
||||
' . Html::img(
|
||||
Yii::getAlias('@webroot') . '/img/logo_report/logo.png',
|
||||
['style' => 'height:1.8cm;']
|
||||
) . '
|
||||
</td>
|
||||
<td style="vertical-align:middle;">
|
||||
<div style="font-size:10pt; font-weight:bold;">
|
||||
Suratthani Hospital
|
||||
</div>
|
||||
<div style="font-size:8.5pt; line-height:1.2;">
|
||||
Muang Suratthani, Suratthani 84000<br>
|
||||
Tel. 077 952 900 ต่อ 7322, 7328
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="45%" align="right" style="vertical-align:middle;">
|
||||
<h6>' . $alert . '</h6>
|
||||
<strong class="id_case">' . Html::encode($id_case) . '</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="color:#2d6bb6; height:3px; border-width:0; background-color:#2d6bb6;">
|
||||
';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param $id_case
|
||||
* @param $mode
|
||||
|
|
|
|||
|
|
@ -1,53 +1,59 @@
|
|||
<?php
|
||||
<div class="after-title">
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
<div class="mpdf-header">
|
||||
<!-- ตารางนอก: แบ่ง 3 คอลัมน์ -->
|
||||
<table class="report-outer">
|
||||
<table class="info-outer">
|
||||
<tr>
|
||||
|
||||
<!-- คอลัมน์ซ้าย -->
|
||||
<td width="35%">
|
||||
<table class="coltbl">
|
||||
<td class="info-col">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label">Name:</td>
|
||||
<td class="value">
|
||||
<?= isset($model->title) ? $model->title->name : '' ?>
|
||||
<?= isset($model) ? $model->getFullname() : '' ?>
|
||||
<td class="info-label">Name:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= $model->getFullname() ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Sex:</td>
|
||||
<td class="value"><?= Yii::$app->pathology->getGender($model->gender) ?></td>
|
||||
<td class="info-label">Sex:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->getGender($model->gender) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Age:</td>
|
||||
<td class="value"><?= $model->age > 0 ? $model->age . ' ' . $model->age_unit : '-' ?></td>
|
||||
<td class="info-label">Age:</td>
|
||||
<td class="info-value">
|
||||
<?= $model->age ?> <?= $model->age_unit ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Hospital:</td>
|
||||
<td class="value"><?= $model->hospital->name ?? '-' ?></td>
|
||||
<td class="info-label">Hospital:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= $model->hospital->name ?? '-' ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- คอลัมน์กลาง -->
|
||||
<td width="35%">
|
||||
<table class="coltbl">
|
||||
<td class="info-col">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label">HN:</td>
|
||||
<td class="value"><?= $model->h_n ?></td>
|
||||
<td class="info-label">HN:</td>
|
||||
<td class="info-value"><?= $model->h_n ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Ward:</td>
|
||||
<td class="value"><?= $model->constWard->name ?? '-' ?></td>
|
||||
<td class="info-label">Ward:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= nl2br(wordwrap($model->constWard->name ?? '-', 24, "\n")) ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Pathologist:</td>
|
||||
<!--<td class="value"><?php // $diagnosis->pathologist->realname ?? '-'
|
||||
?></td>-->
|
||||
|
||||
<td class="info-label">Pathologist:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||
|
|
@ -60,62 +66,41 @@ use yii\helpers\Html;
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Clinician:</td>
|
||||
<td class="value">
|
||||
<?php /*
|
||||
echo $model->constDoctor ? (!empty($model->constDoctor->fullname) ? Html::encode($model->constDoctor->fullname)
|
||||
: Html::encode(trim(($model->constDoctor->prefix ?? '') . ' ' . ($model->constDoctor->name ?? '') . ' ' . ($model->constDoctor->surname ?? ''))))
|
||||
: '-';
|
||||
*/ ?>
|
||||
<td class="info-label">Clinician:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= $model->constDoctor->fullname ?? '-' ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- คอลัมน์ขวา (ชิดบน) -->
|
||||
<td width="30%" valign="top" style="vertical-align: top;">
|
||||
<table class="coltbl">
|
||||
|
||||
<!-- คอลัมน์ขวา -->
|
||||
<td class="info-col info-col-right">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label">Collection Date:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
if ($model->collected_at) {
|
||||
echo Yii::$app->pathology->engToDateOnly($model->collected_at);
|
||||
} else {
|
||||
echo "-";
|
||||
}
|
||||
?>
|
||||
<td class="info-label">Collection Date:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->engToDateOnly($model->collected_at) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Received Date:</td>
|
||||
<td class="value"><?= Yii::$app->pathology->thaiToDateOnly($model->receive_at) ?></td>
|
||||
<td class="info-label">Received Date:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->thaiToDateOnly($model->receive_at) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Reported Date:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||
if (!empty($diagnosis->pathologist_id)) {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->pathologist_at);
|
||||
} elseif (!empty($diagnosis->cytotech1_at)) {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->cytotech1_at);
|
||||
}
|
||||
?>
|
||||
<?php /*
|
||||
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||
if (!empty($diagnosis->pathologist_id)) {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->pathologist_at);
|
||||
} elseif ($case == 'pap') {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->cytotech1_at);
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
*/ ?>
|
||||
<td class="info-label">Reported Date:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->thaiToDateOnly($diagnosis->pathologist_at) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="height:2px; border:none; color:#2d6bb6; width:100%;">
|
||||
</div>
|
||||
|
|
@ -1,86 +1,94 @@
|
|||
<?php
|
||||
<div class="after-title">
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
<!-- ตารางนอก: แบ่ง 3 คอลัมน์ -->
|
||||
<table class="report-outer">
|
||||
<table class="info-outer">
|
||||
<tr>
|
||||
|
||||
<!-- คอลัมน์ซ้าย -->
|
||||
<td width="35%">
|
||||
<table class="coltbl">
|
||||
<td class="info-col">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label">Name:</td>
|
||||
<td class="value">
|
||||
<?= isset($model->title) ? $model->title->name : '' ?>
|
||||
<?= isset($model) ? $model->getFullname() : '' ?>
|
||||
<td class="info-label">Name:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= $model->getFullname() ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Sex:</td>
|
||||
<td class="value"><?= Yii::$app->pathology->getGender($model->gender) ?></td>
|
||||
<td class="info-label">Sex:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->getGender($model->gender) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Age:</td>
|
||||
<td class="value"><?= $model->age > 0 ? $model->age . ' ' . $model->age_unit : '-' ?></td>
|
||||
<td class="info-label">Age:</td>
|
||||
<td class="info-value">
|
||||
<?= $model->age ?> <?= $model->age_unit ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Hospital:</td>
|
||||
<td class="value"><?= $model->hospital->name ?? '-' ?></td>
|
||||
<td class="info-label">Hospital:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= $model->hospital->name ?? '-' ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- คอลัมน์กลาง -->
|
||||
<td width="35%">
|
||||
<table class="coltbl">
|
||||
<td class="info-col">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label">HN:</td>
|
||||
<td class="value"><?= $model->h_n ?></td>
|
||||
<td class="info-label">HN:</td>
|
||||
<td class="info-value"><?= $model->h_n ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Ward:</td>
|
||||
<td class="value"><?= $model->constWard->name ?? '-' ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Pathologist:</td>
|
||||
<td class="value"><?= $model->pathologist->realname ?? '-' ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Clinician:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
echo $model->constDoctor
|
||||
? (!empty($model->constDoctor->fullname)
|
||||
? Html::encode($model->constDoctor->fullname)
|
||||
: Html::encode(trim(($model->constDoctor->prefix ?? '') . ' ' . ($model->constDoctor->name ?? '') . ' ' . ($model->constDoctor->surname ?? ''))))
|
||||
: '-';
|
||||
?>
|
||||
<td class="info-label">Ward:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= nl2br(wordwrap($model->constWard->name ?? '-', 24, "\n")) ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- คอลัมน์ขวา (ชิดบน) -->
|
||||
<td width="30%" valign="top" style="vertical-align: top;">
|
||||
<table class="coltbl">
|
||||
<tr>
|
||||
<td class="label">Collection Date:</td>
|
||||
<td class="info-label">Pathologist:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
if ($model->collected_at) {
|
||||
echo Yii::$app->pathology->engToDateOnly($model->collected_at);
|
||||
} else {
|
||||
echo "-";
|
||||
}
|
||||
<?= $diagnosis->pathologist->realname ?? '-';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Received Date:</td>
|
||||
<td class="value"><?= Yii::$app->pathology->thaiToDateOnly($model->receive_at) ?></td>
|
||||
<td class="info-label">Clinician:</td>
|
||||
<td>
|
||||
<span class="info-value block">
|
||||
<?= $model->constDoctor->fullname ?? '-' ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<!-- คอลัมน์ขวา -->
|
||||
<td class="info-col info-col-right">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="info-label">Collection Date:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->engToDateOnly($model->collected_at) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-label">Received Date:</td>
|
||||
<td class="info-value">
|
||||
<?= Yii::$app->pathology->thaiToDateOnly($model->receive_at) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="height:3px; border:none; color:#2d6bb6; width:100%;">
|
||||
</div>
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
<div class="mpdf-header">
|
||||
<!-- ตารางนอก: แบ่ง 3 คอลัมน์ -->
|
||||
<table class="report-outer">
|
||||
<tr>
|
||||
<!-- คอลัมน์ซ้าย -->
|
||||
<td width="35%">
|
||||
<table class="coltbl">
|
||||
<tr>
|
||||
<td class="label">Name:</td>
|
||||
<td class="value">
|
||||
<?= isset($model->title) ? $model->title->name : '' ?>
|
||||
<?= isset($model) ? $model->getFullname() : '' ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Sex:</td>
|
||||
<td class="value"><?= Yii::$app->pathology->getGender($model->gender) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Age:</td>
|
||||
<td class="value"><?= $model->age > 0 ? $model->age . ' ' . $model->age_unit : '-' ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Hospital:</td>
|
||||
<td class="value"><?= $model->hospital->name ?? '-' ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- คอลัมน์กลาง -->
|
||||
<td width="35%">
|
||||
<table class="coltbl">
|
||||
<tr>
|
||||
<td class="label">HN:</td>
|
||||
<td class="value"><?= $model->h_n ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Ward:</td>
|
||||
<td class="value"><?= $model->constWard->name ?? '-' ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Pathologist:</td>
|
||||
<!--<td class="value"><?php // $diagnosis->pathologist->realname ?? '-'
|
||||
?></td>-->
|
||||
|
||||
<td class="value">
|
||||
<?php
|
||||
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||
if ($diagnosis->report_type === 'outlab') {
|
||||
echo $model->pathologist_outlab ?? '-';
|
||||
} else {
|
||||
echo $diagnosis->pathologist->realname ?? '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Clinician:</td>
|
||||
<td class="value">
|
||||
<?php /*
|
||||
echo $model->constDoctor ? (!empty($model->constDoctor->fullname) ? Html::encode($model->constDoctor->fullname)
|
||||
: Html::encode(trim(($model->constDoctor->prefix ?? '') . ' ' . ($model->constDoctor->name ?? '') . ' ' . ($model->constDoctor->surname ?? ''))))
|
||||
: '-';
|
||||
*/ ?>
|
||||
<?= $model->constDoctor->fullname ?? '-' ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!-- คอลัมน์ขวา (ชิดบน) -->
|
||||
<td width="30%" valign="top" style="vertical-align: top;">
|
||||
<table class="coltbl">
|
||||
<tr>
|
||||
<td class="label">Collection Date:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
if ($model->collected_at) {
|
||||
echo Yii::$app->pathology->engToDateOnly($model->collected_at);
|
||||
} else {
|
||||
echo "-";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Received Date:</td>
|
||||
<td class="value"><?= Yii::$app->pathology->thaiToDateOnly($model->receive_at) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Reported Date:</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||
if (!empty($diagnosis->pathologist_id)) {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->pathologist_at);
|
||||
} elseif (!empty($diagnosis->cytotech1_at)) {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->cytotech1_at);
|
||||
}
|
||||
?>
|
||||
<?php /*
|
||||
$case = Yii::$app->pathology->getCase($model->id_case);
|
||||
if (!empty($diagnosis->pathologist_id)) {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->pathologist_at);
|
||||
} elseif ($case == 'pap') {
|
||||
echo Yii::$app->pathology->thaiToDateOnly($diagnosis->cytotech1_at);
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
*/ ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
<hr style="height:2px; border:none; color:#2d6bb6; width:100%;">
|
||||
</div>
|
||||
|
|
@ -1240,3 +1240,6 @@ textarea {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ p {
|
|||
}
|
||||
|
||||
.id_case {
|
||||
font-size: 30pt;
|
||||
font-size: 18pt;
|
||||
}
|
||||
|
||||
.report_header {
|
||||
|
|
@ -91,3 +91,148 @@ p {
|
|||
/* ใช้กับ header ทั้งหมด */
|
||||
.mpdf-header { font-family: 'kanit', sans-serif; }
|
||||
|
||||
|
||||
|
||||
/* ส่วนหัว */
|
||||
.header-wrap {
|
||||
font-family: sarabun;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.header-top {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-top td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.hospital-name {
|
||||
font-size: 10.5pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hospital-info {
|
||||
font-size: 9pt;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.critical-box {
|
||||
border: 1.5px solid red;
|
||||
color: red;
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
|
||||
.report-no {
|
||||
font-size: 14pt;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.title-bar {
|
||||
background: #2d6bb6;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
padding: 4px 0;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
padding: 2px 4px;
|
||||
line-height: 1.25;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hr {
|
||||
border-top: 1px solid #000;
|
||||
margin-top: 6px;
|
||||
}
|
||||
/* ส่วนหัว */
|
||||
|
||||
|
||||
/* ตารางข้อมูลผู้ป่วย */
|
||||
/* ===== Block ข้อมูลผู้ป่วย (COMPACT) ===== */
|
||||
.after-title {
|
||||
margin-top: 4px; /* ระยะบน */
|
||||
margin-bottom: 4px; /* ระยะล่าง (เท่ากัน) */
|
||||
}
|
||||
|
||||
/* ===== ตารางรวม ===== */
|
||||
.info-outer {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* คอลัมน์ */
|
||||
.info-col {
|
||||
width: 33%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.info-col-right {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
/* ตารางย่อย */
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* ช่องไฟในแถว (บีบขึ้นอีก) */
|
||||
.info-table td {
|
||||
padding: 1.5px 6px; /* ลดจาก 2px */
|
||||
vertical-align: top;
|
||||
line-height: 1.25; /* กระชับ แต่ยังอ่านง่าย */
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.info-label {
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Value */
|
||||
.info-value {
|
||||
font-size: 16px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* Value ยาว */
|
||||
.info-value.block {
|
||||
display: block;
|
||||
margin-left: 18px; /* ลด indent ให้แน่นขึ้น */
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* ===== เส้นคั่นเปิด Section ถัดไป ===== */
|
||||
.after-title hr {
|
||||
margin-top: 4px; /* ระยะจากข้อมูล (เท่ากับด้านบน) */
|
||||
margin-bottom: 0;
|
||||
height: 2px;
|
||||
border: none;
|
||||
background-color: #2d6bb6;
|
||||
}
|
||||
|
||||
/* ส่วนข้อมูลค้นไข้ */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue