From 2bd52532a0db931c68fabf90f4d69cf8f4262aa0 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Sun, 19 Jul 2026 01:19:56 +0530 Subject: [PATCH] Add ABDM M3 fetch option to Ayushman claim sheet --- app/Controllers/Billing/Ipd.php | 1 + .../billing/ipd/ayushman_claim_sheet.php | 260 ++++++++++++++++++ 2 files changed, 261 insertions(+) diff --git a/app/Controllers/Billing/Ipd.php b/app/Controllers/Billing/Ipd.php index ff4f1e7..da1eddf 100644 --- a/app/Controllers/Billing/Ipd.php +++ b/app/Controllers/Billing/Ipd.php @@ -1918,6 +1918,7 @@ class Ipd extends BaseController 'person_info' => $panelData['person_info'] ?? null, 'checklist_items' => $checklistItems, 'generated_at' => date('d-m-Y H:i:s'), + 'output' => $output, ]; $content = view('billing/ipd/ayushman_claim_sheet', $data); diff --git a/app/Views/billing/ipd/ayushman_claim_sheet.php b/app/Views/billing/ipd/ayushman_claim_sheet.php index cae3b16..dddd638 100644 --- a/app/Views/billing/ipd/ayushman_claim_sheet.php +++ b/app/Views/billing/ipd/ayushman_claim_sheet.php @@ -3,6 +3,13 @@ $ipd = $ipd_info ?? null; $person = $person_info ?? null; $items = $checklist_items ?? []; $generatedAt = $generated_at ?? date('d-m-Y H:i:s'); +$isExport = (int) ($output ?? 0) === 1; +$patientId = (int) (($person->id ?? null) ?: ($ipd->p_id ?? 0)); +$abhaNumber = trim((string) (($person->abha_id ?? '') ?: ($person->abha_no ?? '') ?: ($person->abha ?? ''))); +$abhaAddress = trim((string) ($person->abha_address ?? '')); +$abhaVerifiedRaw = strtolower(trim((string) (($person->abha_verified_status ?? '') ?: ($person->abha_status ?? '') ?: ($person->abha_verified ?? '')))); +$abhaLooksVerified = in_array($abhaVerifiedRaw, ['1', 'verified', 'yes', 'y', 'true'], true); +$canUseM3 = $patientId > 0 && $abhaAddress !== ''; ?>
@@ -32,6 +39,58 @@ $generatedAt = $generated_at ?? date('d-m-Y H:i:s');
Remark: remark ?? '')) ?>
+ +
+
+
+
ABDM M3 Related Data
+
+ ABHA Number: +  |  ABHA Address: +  |  Status: Verified' : 'Not verified in HMS' ?> +
+
+
+ + + +
+
+
+
+ +
+
+
+
+ + +
+
+ + + + + + + + + + + +
DateTitleCare Context
No ABDM records loaded.
+
+
+
+
+
Select a fetched ABDM document to view claim-supporting clinical summary.
+
+
+
+
+
+ +
No Ayushman procedures linked to this IPD package list.
@@ -68,3 +127,204 @@ $generatedAt = $generated_at ?? date('d-m-Y H:i:s');
+ + + +