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 === '') {
-
-
-
-
-
-
-
-
-
-
- | Date |
- Title |
- Care Context |
- Org / Hospital |
- Request 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();