diff --git a/app/Controllers/Ipd_discharge.php b/app/Controllers/Ipd_discharge.php index 2a572d6..624dc39 100644 --- a/app/Controllers/Ipd_discharge.php +++ b/app/Controllers/Ipd_discharge.php @@ -1364,7 +1364,7 @@ class Ipd_discharge extends BaseController private function isNarrativeTemplateSectionAllowed(string $section): bool { - return in_array($section, ['diagnosis_remark', 'course_remark'], true); + return in_array($section, ['diagnosis_remark', 'course_remark', 'instruction_other', 'instruction_remark'], true); } private function narrativeSectionTable(string $section): ?string diff --git a/app/Controllers/Patient.php b/app/Controllers/Patient.php index 71c713b..80ce487 100644 --- a/app/Controllers/Patient.php +++ b/app/Controllers/Patient.php @@ -918,6 +918,16 @@ class Patient extends BaseController return $this->response->setStatusCode(404)->setBody('Patient not found'); } + $request = service('request'); + $backUrl = trim((string) $request->getGet('back_url')); + $backTitle = trim((string) $request->getGet('back_title')); + if ($backUrl === '') { + $backUrl = base_url('billing/patient/person_record') . '/' . $pno . '/0'; + } + if ($backTitle === '') { + $backTitle = 'Profile'; + } + $opdFields = $this->db->getFieldNames('opd_master') ?? []; $opdSelect = [ 'opd_id', @@ -1041,6 +1051,8 @@ class Patient extends BaseController return view('billing/Patient_Profile_Opd_V', [ 'patient' => $patient, 'opdGroups' => $opdGroups, + 'backUrl' => $backUrl, + 'backTitle' => $backTitle, ]); } diff --git a/app/Views/billing/Patient_Profile_Opd_V.php b/app/Views/billing/Patient_Profile_Opd_V.php index 105cfc4..f13453f 100644 --- a/app/Views/billing/Patient_Profile_Opd_V.php +++ b/app/Views/billing/Patient_Profile_Opd_V.php @@ -1,3 +1,13 @@ +id ?? 0) . '/0'; +} +?> +