master
mrkcp 2025-04-23 11:35:05 +07:00
parent 0e648c4f9b
commit ccb79aa807
3 changed files with 201 additions and 97 deletions

View File

@ -43,7 +43,7 @@ die();*/
</table> </table>
<!-- DIAGNOSIS --> <!-- DIAGNOSIS -->
<?php if (!empty($diagnosis->diagnosis)) { ?> <?php /* if (!empty($diagnosis->diagnosis)) { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"> <h3 style="margin-left: 0px; font-size: 16pt;">
<strong style="color: #2d6bb6"> <strong style="color: #2d6bb6">
<?php <?php
@ -58,10 +58,50 @@ die();*/
</strong> </strong>
</h3> </h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->diagnosis ?></div><br /> <div style="font-size: 14pt !important;"><?= $diagnosis->diagnosis ?></div><br />
<?php } */ ?>
<!-- DIAGNOSIS -->
<?php if (!empty($diagnosis->diagnosis) && ($diagnosis->report_type != 'addendum')) { ?>
<h3 style="margin-left: 0px; font-size: 16pt;">
<strong style="color: #2d6bb6">
<?php
if ($diagnosis->report_type === 'corrected') {
echo 'REPORT';
} else {
echo 'DIAGNOSIS:';
}
?>
</strong>
</h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->diagnosis ?></div><br />
<?php } else { ?>
<h3 style="margin-left: 0px; font-size: 16pt;">
<strong>
<?php
if ($diagnosis->report_type === 'addendum') {
$final = FrozenDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => 'final']);
$addendum = FrozenDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => 'addendum']);
if ($final) {
echo '<div style="color: #2d6bb6";>FINAL DIAGNOSIS</div>';
echo '<div style="font-size: 14pt !important;">' . $final->diagnosis . '</div><br>';
}
if ($addendum) {
echo '<div style="color: #2d6bb6";>ADDENDUM DIAGNOSIS</div>';
echo '<div style="font-size: 14pt !important;">' . $addendum->diagnosis . '</div><br>';
}
}
?>
</strong>
</h3>
<?php } ?> <?php } ?>
<!-- DIAGNOSIS --> <!-- DIAGNOSIS -->
<!-- DIAGNOSIS -->
<?php // ($model->is_critical_diagnosis ? '<div style="color: red; font-size: 14pt; text-align: right;">(แจ้งแพทย์ด่วน)</div>' : '') <?php // ($model->is_critical_diagnosis ? '<div style="color: red; font-size: 14pt; text-align: right;">(แจ้งแพทย์ด่วน)</div>' : '')
?> ?>

View File

@ -18,17 +18,17 @@ $final_report = CytoNonGynDiagnosis::findOne(['id_case' => $model->id_case, 'rep
</td> </td>
<td align="right" valign="top"> <td align="right" valign="top">
<?php if ($diagnosis->is_conference == 1) { ?> <?php if ($diagnosis->is_conference == 1) { ?>
<table> <table>
<tr> <tr>
<td style="font-size: 14pt; text-align: left;"> <td style="font-size: 14pt; text-align: left;">
<strong>Consensus Case <strong>Consensus Case
<?= Yii::$app->pathology->thaiToDateOnly($diagnosis->conference_at) ?> <?= Yii::$app->pathology->thaiToDateOnly($diagnosis->conference_at) ?>
</strong> </strong>
</td> </td>
</tr> </tr>
</table> </table>
<?php } ?> <?php } ?>
</td> </td>
</tr> </tr>
@ -42,86 +42,127 @@ $final_report = CytoNonGynDiagnosis::findOne(['id_case' => $model->id_case, 'rep
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<?php if (!empty($model->sourceSpecimen) && $diagnosis->report_type != 'addendum') { ?> <?php if (!empty($model->sourceSpecimen) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Source of specimen:</span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Source of specimen:</span>
<span style="font-size: 12pt; margin-right: 20px;"> <span style="font-size: 12pt; margin-right: 20px;">
<?= isset($model->sourceSpecimen) ? $model->sourceSpecimen->name : '' ?> <?= isset($model->sourceSpecimen) ? $model->sourceSpecimen->name : '' ?>
</span> </span>
&nbsp;&nbsp; &nbsp;&nbsp;
<?php } ?> <?php } ?>
<?php if ((!empty($model->non_gyn_specimen_other) || !empty($model->specimen)) && $diagnosis->report_type != 'addendum') { ?> <?php if ((!empty($model->non_gyn_specimen_other) || !empty($model->specimen)) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Site:</span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Site:</span>
<span style="font-size: 12pt;"> <span style="font-size: 12pt;">
<?= isset($model->non_gyn_specimen_other) && !empty($model->non_gyn_specimen_other) ? $model->non_gyn_specimen_other : (isset($model->specimen) ? $model->specimen->name : '') ?> <?= isset($model->non_gyn_specimen_other) && !empty($model->non_gyn_specimen_other) ? $model->non_gyn_specimen_other : (isset($model->specimen) ? $model->specimen->name : '') ?>
</span> </span>
&nbsp;&nbsp; &nbsp;&nbsp;
<?php } ?> <?php } ?>
<?php if ((!empty($model->volume) || !empty($model->color) || $model->is_out_of_specimen == 1) && $diagnosis->report_type != 'addendum') { ?> <?php if ((!empty($model->volume) || !empty($model->color) || $model->is_out_of_specimen == 1) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Appearance:</span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Appearance:</span>
<span style="font-size: 12pt; margin-right: 20px;"> <span style="font-size: 12pt; margin-right: 20px;">
<?php // isset($model->volume) && isset($model->color) ? $model->volume . ' ml, ' . $model->color : '' ?> <?php // isset($model->volume) && isset($model->color) ? $model->volume . ' ml, ' . $model->color : ''
<?= isset($model->volume) && !empty($model->volume) ? $model->volume . ' ml' : '' ?><?= !empty($model->color) ? ', ' . $model->color : '' ?><?= $model->is_out_of_specimen == 1 ? ', Out of NS' : '' ?> ?>
</span> <?= isset($model->volume) && !empty($model->volume) ? $model->volume . ' ml' : '' ?><?= !empty($model->color) ? ', ' . $model->color : '' ?><?= $model->is_out_of_specimen == 1 ? ', Out of NS' : '' ?>
</span>
<?php } ?> <?php } ?>
</div> </div>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<?php if (!empty($model->typeSpecimen) && $diagnosis->report_type != 'addendum') { ?> <?php if (!empty($model->typeSpecimen) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Type of specimen received:</span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Type of specimen received:</span>
<span style="font-size: 12pt; margin-right: 20px;"> <span style="font-size: 12pt; margin-right: 20px;">
<?= isset($model->typeSpecimen) ? $model->typeSpecimen->name : '' ?> <?= isset($model->typeSpecimen) ? $model->typeSpecimen->name : '' ?>
</span> </span>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<?php } ?> <?php } ?>
<?php if ((!empty($model->spin) || !empty($model->smear) || !empty($model->cell_block)) && $diagnosis->report_type != 'addendum') { ?> <?php if ((!empty($model->spin) || !empty($model->smear) || !empty($model->cell_block)) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Number of slides:</span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Number of slides:</span>
<?php <?php
$slideParts = []; $slideParts = [];
if (!empty($model->spin)) { if (!empty($model->spin)) {
$slideParts[] = "Spin: " . $model->spin; $slideParts[] = "Spin: " . $model->spin;
} }
if (!empty($model->smear)) { if (!empty($model->smear)) {
$slideParts[] = "Smear: " . $model->smear; $slideParts[] = "Smear: " . $model->smear;
} }
if (!empty($model->cell_block)) { if (!empty($model->cell_block)) {
$slideParts[] = "Cell Block: " . $model->cell_block; $slideParts[] = "Cell Block: " . $model->cell_block;
} }
?> ?>
<span style="font-size: 12pt; margin-right: 20px;"> <span style="font-size: 12pt; margin-right: 20px;">
<?php /* isset($model->spin) ? $model->spin : '' */ ?> <?php /* isset($model->spin) ? $model->spin : '' */ ?>
<?php if (!empty($slideParts)) { ?> <?php if (!empty($slideParts)) { ?>
<?= implode(' , ', $slideParts); ?> <?= implode(' , ', $slideParts); ?>
<?php } ?> <?php } ?>
</span> </span>
&nbsp;&nbsp; &nbsp;&nbsp;
<?php } ?> <?php } ?>
<?php if (!empty($model->fixation) && $diagnosis->report_type != 'addendum') { ?> <?php if (!empty($model->fixation) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Fixation:</span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Fixation:</span>
<span style="font-size: 12pt; margin-right: 20px;"> <span style="font-size: 12pt; margin-right: 20px;">
<?= isset($model->fixation) ? $model->fixation->name : '' ?> <?= isset($model->fixation) ? $model->fixation->name : '' ?>
</span> </span>
<?php } ?> <?php } ?>
</div> </div>
<?php if (!empty($diagnosis->specimen_adequacy1_other) || !empty($diagnosis->specimenAdequacy1) && $diagnosis->report_type != 'addendum') { ?> <?php if (!empty($diagnosis->specimen_adequacy1_other) || !empty($diagnosis->specimenAdequacy1) && $diagnosis->report_type != 'addendum') { ?>
<span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Adequacy of specimen: </span> <span style="color: #2d6bb6; font-size: 14pt; font-weight: bold;">Adequacy of specimen: </span>
<span style="font-size: 12pt; margin-right: 20px;"> <span style="font-size: 12pt; margin-right: 20px;">
<?= isset($diagnosis->specimen_adequacy1_other) && !empty($diagnosis->specimen_adequacy1_other) ? $diagnosis->specimen_adequacy1_other : (isset($diagnosis->specimenAdequacy1) ? $diagnosis->specimenAdequacy1->name : '') ?> <?= isset($diagnosis->specimen_adequacy1_other) && !empty($diagnosis->specimen_adequacy1_other) ? $diagnosis->specimen_adequacy1_other : (isset($diagnosis->specimenAdequacy1) ? $diagnosis->specimenAdequacy1->name : '') ?>
</span><br /><br /> </span><br /><br />
<?php } ?> <?php } ?>
<?php if (isset($diagnosis->diagnosis) ? $diagnosis->diagnosis : '') { ?> <!-- DIAGNOSIS -->
<?php if (!empty($diagnosis->diagnosis) && ($diagnosis->report_type != 'addendum')) { ?>
<h3 style="margin-left: 0px; font-size: 16pt;">
<strong style="color: #2d6bb6">
<?php
if ($diagnosis->report_type === 'corrected') {
echo 'REPORT';
} else {
echo 'DIAGNOSIS:';
}
?>
</strong>
</h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->diagnosis ?></div><br />
<?php } else { ?>
<h3 style="margin-left: 0px; font-size: 16pt;">
<strong>
<?php
if ($diagnosis->report_type === 'addendum') {
$final = CytoNonGynDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => 'final']);
$addendum = CytoNonGynDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => 'addendum']);
if ($final) {
echo '<div style="color: #2d6bb6";>FINAL DIAGNOSIS</div>';
echo '<div style="font-size: 14pt !important;">' . $final->diagnosis . '</div><br>';
}
if ($addendum) {
echo '<div style="color: #2d6bb6";>ADDENDUM DIAGNOSIS</div>';
echo '<div style="font-size: 14pt !important;">' . $addendum->diagnosis . '</div><br>';
}
}
?>
</strong>
</h3>
<?php } ?>
<!-- DIAGNOSIS -->
<?php /* if (isset($diagnosis->diagnosis) ? $diagnosis->diagnosis : '') { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"> <h3 style="margin-left: 0px; font-size: 16pt;">
<strong style="color: #2d6bb6"><?php // strtoupper($diagnosis->report_type) <strong style="color: #2d6bb6"><?php // strtoupper($diagnosis->report_type)
?> ?>
@ -132,56 +173,56 @@ $final_report = CytoNonGynDiagnosis::findOne(['id_case' => $model->id_case, 'rep
</h3> </h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->diagnosis ?></div><br /> <div style="font-size: 14pt !important;"><?= $diagnosis->diagnosis ?></div><br />
<?php } ?> <?php } */ ?>
<?php if (!empty($diagnosis->gross_description) /*&& $diagnosis->report_type != 'addendum'*/) { ?> <?php if (!empty($diagnosis->gross_description) /*&& $diagnosis->report_type != 'addendum'*/) { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6">Cytologic findings:</strong></h3> <h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6">Cytologic findings:</strong></h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->gross_description ?></div><br /> <div style="font-size: 14pt !important;"><?= $diagnosis->gross_description ?></div><br />
<?php } ?> <?php } ?>
<div> <div>
<?php if (!empty($diagnosis->comment) && $diagnosis->report_type != 'addendum') { ?> <?php if (!empty($diagnosis->comment) && $diagnosis->report_type != 'addendum') { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6"> <h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6">
Note: Note:
</strong></h3> </strong></h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->comment ?></div><br /> <div style="font-size: 14pt !important;"><?= $diagnosis->comment ?></div><br />
<?php } ?> <?php } ?>
</div> </div>
<div> <div>
<?php if (!empty($diagnosis->suggestion) && $diagnosis->report_type != 'addendum') { ?> <?php if (!empty($diagnosis->suggestion) && $diagnosis->report_type != 'addendum') { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6"> <h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6">
Suggestion: Suggestion:
</strong></h3> </strong></h3>
<div style="font-size: 14pt !important;"><?= $diagnosis->suggestion ?></div><br /> <div style="font-size: 14pt !important;"><?= $diagnosis->suggestion ?></div><br />
<?php } ?> <?php } ?>
</div> </div>
<div> <div>
<?php if ($diagnosis->report_type == 'addendum') { ?> <?php if ($diagnosis->report_type == 'addendum') { ?>
<strong> <strong>
Electronically signed out by : <?= $diagnosis->pathologist->report_name ?> Electronically signed out by : <?= $diagnosis->pathologist->report_name ?>
on <?= $diagnosis->pathologist_at ?><br /> on <?= $diagnosis->pathologist_at ?><br />
</strong><br /> </strong><br />
<?php } else if ($diagnosis->report_type == 'revised') { ?> <?php } else if ($diagnosis->report_type == 'revised') { ?>
<strong> <strong>
1) for Electronically signed out by 1) for Electronically signed out by
: <?= isset($final_report->pathologist) ? $final_report->pathologist->report_name : ' ' ?> : <?= isset($final_report->pathologist) ? $final_report->pathologist->report_name : ' ' ?>
on <?= isset($final_report) ? $final_report->pathologist_at : ' ' ?><br /> on <?= isset($final_report) ? $final_report->pathologist_at : ' ' ?><br />
2) for Revised report by : <?= $diagnosis->pathologist->report_name ?> 2) for Revised report by : <?= $diagnosis->pathologist->report_name ?>
on <?= $diagnosis->pathologist_at ?><br /> on <?= $diagnosis->pathologist_at ?><br />
</strong><br /> </strong><br />
<?php } else { ?> <?php } else { ?>
<strong>Cytotechnologist <strong>Cytotechnologist
: :
<strong><?= isset($diagnosis->cytotech1) ? $diagnosis->cytotech1->report_name : null ?></strong><br /> <strong><?= isset($diagnosis->cytotech1) ? $diagnosis->cytotech1->report_name : null ?></strong><br />
<?= isset($diagnosis->cytotech2) ? '<strong>' . $diagnosis->cytotech2->report_name . '</strong><br />' : null ?> <?= isset($diagnosis->cytotech2) ? '<strong>' . $diagnosis->cytotech2->report_name . '</strong><br />' : null ?>
<strong>Electronically signed out by <strong>Electronically signed out by
: <?= isset($diagnosis->pathologist) ? $diagnosis->pathologist->report_name : ' ' ?> : <?= isset($diagnosis->pathologist) ? $diagnosis->pathologist->report_name : ' ' ?>
on <?= $diagnosis->pathologist_at ?></strong><br /><?php // $agree on <?= $diagnosis->pathologist_at ?></strong><br /><?php // $agree
?><?php // $comment ?><?php // $comment
?> ?>
<?php } ?> <?php } ?>
@ -191,12 +232,12 @@ $final_report = CytoNonGynDiagnosis::findOne(['id_case' => $model->id_case, 'rep
<?php if ($diagnosis->diagnosis_type == 1) { <?php if ($diagnosis->diagnosis_type == 1) {
$approve = CenterApprove::find()->where(['id_case' => $diagnosis->id_case, 'report_type' => $diagnosis->report_type, 'ref_id' => $diagnosis->id])->one(); $approve = CenterApprove::find()->where(['id_case' => $diagnosis->id_case, 'report_type' => $diagnosis->report_type, 'ref_id' => $diagnosis->id])->one();
?> ?>
<strong><i>This case was passed QC <strong><i>This case was passed QC
on on
<?= isset($approve) && !empty($approve->approve_at) && $approve->approve_status == 4 ? $approve->approve_at : '' ?></i></strong> <?= isset($approve) && !empty($approve->approve_at) && $approve->approve_status == 4 ? $approve->approve_at : '' ?></i></strong>
<br /> <br />
<?php } else { ?> <?php } else { ?>
<br /> <br />
<?php } ?> <?php } ?>
<div style="text-align: center; font-size: 14pt">End of report <?= $model->id_case ?></div> <div style="text-align: center; font-size: 14pt">End of report <?= $model->id_case ?></div>

View File

@ -43,14 +43,13 @@ die();*/
</table> </table>
<!-- DIAGNOSIS --> <!-- DIAGNOSIS -->
<?php if (!empty($surgical_diagnosis->diagnosis)) { ?> <!-- DIAGNOSIS -->
<?php if (!empty($surgical_diagnosis->diagnosis) && ($surgical_diagnosis->report_type != 'addendum')) { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"> <h3 style="margin-left: 0px; font-size: 16pt;">
<strong style="color: #2d6bb6"> <strong style="color: #2d6bb6">
<?php <?php
if ($surgical_diagnosis->report_type === 'corrected') { if ($surgical_diagnosis->report_type === 'corrected') {
echo 'REPORT'; echo 'REPORT';
} elseif ($surgical_diagnosis->report_type === 'addendum') {
echo 'DIAGNOSIS:';
} else { } else {
echo 'DIAGNOSIS:'; echo 'DIAGNOSIS:';
} }
@ -58,10 +57,34 @@ die();*/
</strong> </strong>
</h3> </h3>
<div style="font-size: 14pt !important;"><?= $surgical_diagnosis->diagnosis ?></div><br /> <div style="font-size: 14pt !important;"><?= $surgical_diagnosis->diagnosis ?></div><br />
<?php } else { ?>
<h3 style="margin-left: 0px; font-size: 16pt;">
<strong>
<?php
if ($surgical_diagnosis->report_type === 'addendum') {
$final = SurgicalDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => 'final']);
$addendum = SurgicalDiagnosis::findOne(['id_case' => $model->id_case, 'report_type' => 'addendum']);
if ($final) {
echo '<div style="color: #2d6bb6";>FINAL DIAGNOSIS</div>';
echo '<div style="font-size: 14pt !important;">' . $final->diagnosis . '</div><br>';
}
if ($addendum) {
echo '<div style="color: #2d6bb6";>ADDENDUM DIAGNOSIS</div>';
echo '<div style="font-size: 14pt !important;">' . $addendum->diagnosis . '</div><br>';
}
}
?>
</strong>
</h3>
<?php } ?> <?php } ?>
<!-- DIAGNOSIS --> <!-- DIAGNOSIS -->
<!-- DIAGNOSIS -->
<?php // ($model->is_critical_diagnosis ? '<div style="color: red; font-size: 14pt; text-align: right;">(แจ้งแพทย์ด่วน)</div>' : '') <?php // ($model->is_critical_diagnosis ? '<div style="color: red; font-size: 14pt; text-align: right;">(แจ้งแพทย์ด่วน)</div>' : '')
?> ?>
@ -112,7 +135,7 @@ die();*/
<br /> <br />
<?php } */ ?> <?php } */ ?>
<?php if (!empty($surgical_diagnosis->gross_description) /* && $surgical_diagnosis->report_type != 'addendum') */){ ?> <?php if (!empty($surgical_diagnosis->gross_description) /* && $surgical_diagnosis->report_type != 'addendum') */) { ?>
<h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6">GROSS DESCRIPTION:</strong> <h3 style="margin-left: 0px; font-size: 16pt;"><strong style="color: #2d6bb6">GROSS DESCRIPTION:</strong>
</h3> </h3>