From 0a31c6aa12974d6afcbeb44946cc25daed158db0 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Wed, 29 Jul 2026 03:41:29 +0530 Subject: [PATCH] ABDM UI: remove redundant document-list panel, add Fetch Data button when no records found for a consent request --- app/Views/billing/Patient_Profile_Opd_V.php | 42 ++++++--------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/app/Views/billing/Patient_Profile_Opd_V.php b/app/Views/billing/Patient_Profile_Opd_V.php index 93cbeac..581cc39 100644 --- a/app/Views/billing/Patient_Profile_Opd_V.php +++ b/app/Views/billing/Patient_Profile_Opd_V.php @@ -364,36 +364,6 @@ if ($patientPhotoPath === '') { -
-
-
- - -
-
- - - - - - - - - - - - - -
DateTitleCare ContextOrg / HospitalRequest ID
No records loaded.
-
-
-
-
-
Select a fetched document to view details.
-
-
-
- @@ -578,6 +548,7 @@ $(function() { var autoFlowMaxAttempts = 15; var autoFlowRunning = false; var fetchOnlyRunningIdx = -1; + var currentAbdmFetchModalIdx = -1; function consentStatusBadgeClass(status) { switch ((status || '').toString().toUpperCase()) { @@ -745,6 +716,7 @@ $(function() { return; } fetchOnlyRunningIdx = idx; + currentAbdmFetchModalIdx = idx; applyNewRequestButtonState(); setAbdmStatus('Fetching latest records using existing granted consent...', false); openAbdmFetchResultModal(); @@ -801,7 +773,10 @@ $(function() { function renderAbdmFetchResultModal(docs) { if (!docs || !docs.length) { - $('#abdmFetchResultModalBody').html('
No fetched records found for this consent request yet.
'); + var fetchBtnHtml = currentAbdmFetchModalIdx >= 0 + ? '
' + : ''; + $('#abdmFetchResultModalBody').html('
No fetched records found for this consent request yet.
' + fetchBtnHtml); return; } @@ -1206,6 +1181,11 @@ $(function() { runFetchRecordsForRow(idx); }); + $(document).off('click.abdmOpd', '.abdm-fetch-again-btn').on('click.abdmOpd', '.abdm-fetch-again-btn', function() { + var idx = Number($(this).data('idx')); + runFetchRecordsForRow(idx); + }); + $(document).off('shown.bs.tab.abdmOpd', '[data-bs-target="#opd-abdm-tab"]').on('shown.bs.tab.abdmOpd', '[data-bs-target="#opd-abdm-tab"]', function() { if (!currentAbdmRows.length) { loadAbdmDocs();