Add PATIENT_TITLE discharge placeholder
This commit is contained in:
parent
53bc924c06
commit
49d83dd105
|
|
@ -35,6 +35,7 @@ Example:
|
|||
|
||||
| Placeholder | Description | Example |
|
||||
|------------|-------------|---------|
|
||||
| `{{PATIENT_TITLE}}` | Patient title/prefix | "Mr." / "Mrs." / "Miss" |
|
||||
| `{{PATIENT_NAME}}` | Patient full name | "John Doe" |
|
||||
| `{{UHID}}` | Patient UHID/Registration number | "UHID123456" |
|
||||
| `{{IPD_CODE}}` | IPD admission code | "IPD001234" |
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@
|
|||
|
||||
```
|
||||
{{PATIENT_NAME}} - Full patient name
|
||||
{{PATIENT_TITLE}} - Patient title/prefix (e.g., "Mr.", "Mrs.", "Miss")
|
||||
{{UHID}} - Patient UHID/registration code
|
||||
{{AGE_GENDER}} - Age and gender combined (e.g., "26 Year / Female")
|
||||
{{GUARDIAN}} - Guardian relation and name (e.g., "W/O of RAM SINGH")
|
||||
{{GUARDIAN_RELATION}} - Guardian relation only (e.g., "W/O of")
|
||||
{{GUARDIAN}} - Guardian relation and name (e.g., "W/O RAM SINGH")
|
||||
{{GUARDIAN_RELATION}} - Guardian relation only (e.g., "W/O")
|
||||
{{GUARDIAN_NAME}} - Guardian name only (e.g., "RAM SINGH")
|
||||
{{PATIENT_ADDRESS}} - Full patient address
|
||||
{{PATIENT_PHONE}} - Patient phone number ✨ NEW
|
||||
|
|
|
|||
|
|
@ -311,6 +311,12 @@ class Ipd_discharge extends BaseController
|
|||
$ipd = $panelData['ipd_info'] ?? null;
|
||||
$person = $panelData['person_info'] ?? null;
|
||||
|
||||
$patientTitle = trim((string) (
|
||||
$person->title
|
||||
?? $person->p_title
|
||||
?? $person->prefix
|
||||
?? ''
|
||||
));
|
||||
$patientName = trim((string) ($person->p_fname ?? ''));
|
||||
$patientCode = trim((string) (
|
||||
$person->uhid
|
||||
|
|
@ -355,6 +361,7 @@ class Ipd_discharge extends BaseController
|
|||
|
||||
$tokens = [
|
||||
'CONTENT' => $content,
|
||||
'PATIENT_TITLE' => esc($patientTitle),
|
||||
'PATIENT_NAME' => esc($patientName),
|
||||
'UHID' => esc($patientCode),
|
||||
'IPD_CODE' => esc($ipdCode),
|
||||
|
|
@ -444,7 +451,7 @@ class Ipd_discharge extends BaseController
|
|||
$address = trim((string) ($ipd->address ?? $ipd->patient_address ?? $ipd->contact_address ?? ''));
|
||||
}
|
||||
|
||||
$guardianCombined = trim($guardianRelation . ($guardianName !== '' ? ' of ' . $guardianName : ''));
|
||||
$guardianCombined = trim($guardianRelation . ($guardianName !== '' ? ' ' . $guardianName : ''));
|
||||
if ($guardianCombined === '') {
|
||||
$guardianCombined = $guardianName !== '' ? $guardianName : $guardianRelation;
|
||||
}
|
||||
|
|
@ -471,7 +478,7 @@ class Ipd_discharge extends BaseController
|
|||
$doctorNames = $this->getDischargeDoctorNames($ipd);
|
||||
|
||||
return [
|
||||
'GUARDIAN_RELATION' => esc($guardianRelation !== '' ? $guardianRelation . ' of ' : ''),
|
||||
'GUARDIAN_RELATION' => esc($guardianRelation !== '' ? $guardianRelation . ' ' : ''),
|
||||
'GUARDIAN_NAME' => esc($guardianName),
|
||||
'GUARDIAN' => esc($guardianCombined),
|
||||
'PATIENT_ADDRESS' => esc($address),
|
||||
|
|
@ -5406,6 +5413,7 @@ class Ipd_discharge extends BaseController
|
|||
'hospital_address' => 'Hospital Full Address',
|
||||
'hospital_phone' => 'Hospital Phone',
|
||||
'hospital_email' => 'Hospital Email',
|
||||
'PATIENT_TITLE' => 'Patient Title (Mr./Mrs./Miss etc.)',
|
||||
'PATIENT_NAME' => 'Patient Name',
|
||||
'UHID' => 'Patient UHID',
|
||||
'IPD_CODE' => 'IPD Number/Code',
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ $status = (int) ($edit['status'] ?? 1);
|
|||
<div class="alert alert-info py-2 small">
|
||||
<strong>Available placeholders:</strong><br>
|
||||
<strong>1. Hospital Information:</strong> <code>{{hospital_name}}</code>, <code>{{H_address_1}}</code>, <code>{{H_address_2}}</code>, <code>{{hospital_phone}}</code>, <code>{{hospital_email}}</code>, <code>{{H_logo}}</code>, <code>{{H_logo_abs}}</code>, <code>{{hospital_address}}</code><br>
|
||||
<strong>2. Patient Information:</strong> <code>{{PATIENT_NAME}}</code>, <code>{{UHID}}</code>, <code>{{IPD_CODE}}</code>, <code>{{AGE_GENDER}}</code>, <code>{{GUARDIAN}}</code>, <code>{{GUARDIAN_RELATION}}</code>, <code>{{GUARDIAN_NAME}}</code>, <code>{{PATIENT_ADDRESS}}</code>, <code>{{PATIENT_PHONE}}</code> ✨<br>
|
||||
<strong>2. Patient Information:</strong> <code>{{PATIENT_TITLE}}</code>, <code>{{PATIENT_NAME}}</code>, <code>{{UHID}}</code>, <code>{{IPD_CODE}}</code>, <code>{{AGE_GENDER}}</code>, <code>{{GUARDIAN}}</code>, <code>{{GUARDIAN_RELATION}}</code>, <code>{{GUARDIAN_NAME}}</code>, <code>{{PATIENT_ADDRESS}}</code>, <code>{{PATIENT_PHONE}}</code> ✨<br>
|
||||
<strong>3. IPD Information:</strong> <code>{{DEPARTMENT}}</code>, <code>{{ADMIT_DATE}}</code>, <code>{{DISCHARGE_DATE}}</code>, <code>{{ADMISSION_TIME}}</code>, <code>{{DISCHARGE_TIME}}</code>, <code>{{ISDELIVERY}}</code>, <code>{{INSURANCE_COMPANY}}</code> ✨, <code>{{DOCTOR_NAMES}}</code> ✨, <code>{{DOCTOR_NAME}}</code> ✨<br>
|
||||
<strong>4. IPD Discharge Content:</strong> <code>{{CONTENT}}</code> (all sections), <code>{{PATIENT_INFO_TABLE}}</code> (pre-built patient table)<br>
|
||||
<strong>Section placeholders for custom layout/order:</strong> <code>{{DISCHARGE_SUMMARY}}</code>, <code>{{FINAL_DIAGNOSIS}}</code>, <code>{{SURGERY}}</code>, <code>{{PROCEDURE}}</code>, <code>{{PERSONAL_HISTORY}}</code>, <code>{{PRESENTING_COMPLAINTS}}</code>, <code>{{PAIN_MEASUREMENT_SCALE}}</code>, <code>{{GENERAL_EXAM_ADMISSION}}</code>, <code>{{CLINICAL_INVESTIGATION_REPORTS}}</code>, <code>{{COURSE_IN_HOSPITAL}}</code>, <code>{{EXAMINATION_ON_DISCHARGE}}</code>, <code>{{DRUG_ALLERGY_ADR}}</code>, <code>{{CO_MORBIDITIES}}</code>, <code>{{DISCHARGE_MEDICATIONS}}</code>, <code>{{DIETARY_ADVICE}}</code>, <code>{{OTHER_ADVICE}}</code>, <code>{{REVIEW_AFTER}}</code>, <code>{{FOLLOW_UP_INSTRUCTIONS}}</code><br>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user