Use opd_no on OPD history header
This commit is contained in:
parent
4e060b9b98
commit
39b5fc7c3e
|
|
@ -986,7 +986,9 @@ class Patient extends BaseController
|
||||||
$opdFields = $this->db->getFieldNames('opd_master') ?? [];
|
$opdFields = $this->db->getFieldNames('opd_master') ?? [];
|
||||||
$opdSelect = [
|
$opdSelect = [
|
||||||
'opd_id',
|
'opd_id',
|
||||||
|
'opd_no',
|
||||||
'opd_code',
|
'opd_code',
|
||||||
|
'doc_id',
|
||||||
'doc_name',
|
'doc_name',
|
||||||
'apointment_date',
|
'apointment_date',
|
||||||
];
|
];
|
||||||
|
|
@ -1001,12 +1003,12 @@ class Patient extends BaseController
|
||||||
|
|
||||||
$totalOpdVisits = count($opdList);
|
$totalOpdVisits = count($opdList);
|
||||||
$lastVisitDate = '';
|
$lastVisitDate = '';
|
||||||
$lastVisitSrNo = '';
|
$lastVisitOpdNo = '';
|
||||||
if ($totalOpdVisits > 0 && !empty($opdList[0]['apointment_date'])) {
|
if ($totalOpdVisits > 0 && !empty($opdList[0]['apointment_date'])) {
|
||||||
$lastVisitDate = (string) $opdList[0]['apointment_date'];
|
$lastVisitDate = (string) $opdList[0]['apointment_date'];
|
||||||
}
|
}
|
||||||
if ($totalOpdVisits > 0) {
|
if ($totalOpdVisits > 0) {
|
||||||
$lastVisitSrNo = trim((string) ($opdList[0]['queue_no'] ?? ''));
|
$lastVisitOpdNo = trim((string) (($opdList[0]['opd_no'] ?? '') !== '' ? $opdList[0]['opd_no'] : ($opdList[0]['opd_code'] ?? '')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$opdIds = array_column($opdList, 'opd_id');
|
$opdIds = array_column($opdList, 'opd_id');
|
||||||
|
|
@ -1119,7 +1121,7 @@ class Patient extends BaseController
|
||||||
'opdGroups' => $opdGroups,
|
'opdGroups' => $opdGroups,
|
||||||
'totalOpdVisits' => $totalOpdVisits,
|
'totalOpdVisits' => $totalOpdVisits,
|
||||||
'lastVisitDate' => $lastVisitDate,
|
'lastVisitDate' => $lastVisitDate,
|
||||||
'lastVisitSrNo' => $lastVisitSrNo,
|
'lastVisitOpdNo' => $lastVisitOpdNo,
|
||||||
'backUrl' => $backUrl,
|
'backUrl' => $backUrl,
|
||||||
'backTitle' => $backTitle,
|
'backTitle' => $backTitle,
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ $abhaIsVerified = $abhaVerifiedStatus === 'VERIFIED' || ($abhaKycVerified && $ab
|
||||||
$totalOpdVisits = (int) ($totalOpdVisits ?? 0);
|
$totalOpdVisits = (int) ($totalOpdVisits ?? 0);
|
||||||
$lastVisitDateRaw = trim((string) ($lastVisitDate ?? ''));
|
$lastVisitDateRaw = trim((string) ($lastVisitDate ?? ''));
|
||||||
$lastVisitDateLabel = $lastVisitDateRaw !== '' ? date('d-m-Y', strtotime($lastVisitDateRaw)) : 'Not available';
|
$lastVisitDateLabel = $lastVisitDateRaw !== '' ? date('d-m-Y', strtotime($lastVisitDateRaw)) : 'Not available';
|
||||||
$lastVisitSrNo = trim((string) ($lastVisitSrNo ?? ''));
|
$lastVisitOpdNo = trim((string) ($lastVisitOpdNo ?? ''));
|
||||||
|
|
||||||
$patientAge = trim((string) get_age_1($patient->dob ?? null, $patient->age ?? '', $patient->age_in_month ?? '', $patient->estimate_dob ?? ''));
|
$patientAge = trim((string) get_age_1($patient->dob ?? null, $patient->age ?? '', $patient->age_in_month ?? '', $patient->estimate_dob ?? ''));
|
||||||
$genderRaw = trim((string) ($patient->xgender ?? $patient->gender ?? ''));
|
$genderRaw = trim((string) ($patient->xgender ?? $patient->gender ?? ''));
|
||||||
|
|
@ -81,7 +81,7 @@ if ($patientPhotoPath === '') {
|
||||||
<span><strong>Age:</strong> <?= $patientAge !== '' ? esc($patientAge) : 'Not available' ?></span>
|
<span><strong>Age:</strong> <?= $patientAge !== '' ? esc($patientAge) : 'Not available' ?></span>
|
||||||
<span><strong>Gender:</strong> <?= esc($patientGender) ?></span>
|
<span><strong>Gender:</strong> <?= esc($patientGender) ?></span>
|
||||||
<span><strong>Last Visit:</strong> <?= esc($lastVisitDateLabel) ?></span>
|
<span><strong>Last Visit:</strong> <?= esc($lastVisitDateLabel) ?></span>
|
||||||
<span><strong>OPD Sr No.:</strong> <?= $lastVisitSrNo !== '' ? esc($lastVisitSrNo) : 'Not available' ?></span>
|
<span><strong>OPD No.:</strong> <?= $lastVisitOpdNo !== '' ? esc($lastVisitOpdNo) : 'Not available' ?></span>
|
||||||
<span><strong>No. of Visit:</strong> <?= esc((string) $totalOpdVisits) ?></span>
|
<span><strong>No. of Visit:</strong> <?= esc((string) $totalOpdVisits) ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -203,7 +203,7 @@ if ($patientPhotoPath === '') {
|
||||||
<span class="text-muted ms-2">Dr. <?= esc($group['doc_name']) ?></span>
|
<span class="text-muted ms-2">Dr. <?= esc($group['doc_name']) ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted text-end">
|
<div class="text-muted text-end">
|
||||||
<?= esc($group['opd_date']) ?> <?= esc($group['queue_no']) ?>
|
<?= esc($group['opd_date']) ?> <?= esc($group['queue_no'] !== '' ? $group['queue_no'] : ($group['rx_queue_no'] ?? '')) ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user