From 05d35f6021ea37fc05f6ad96e726b1aae277d330 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Tue, 28 Jul 2026 01:46:36 +0530 Subject: [PATCH] Make OPD ABDM flow wait for first request --- app/Views/billing/Patient_Profile_Opd_V.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Views/billing/Patient_Profile_Opd_V.php b/app/Views/billing/Patient_Profile_Opd_V.php index 87c438c..acf6612 100644 --- a/app/Views/billing/Patient_Profile_Opd_V.php +++ b/app/Views/billing/Patient_Profile_Opd_V.php @@ -758,13 +758,11 @@ $(function() { if (resetRequestId) { autoFlowRequestId = ''; + stopAutoFlowLoop(); updateConsentBadge('FAILED', false); - $('#abdmStatusBox').removeClass('text-danger').addClass('text-muted').text('Previous consent request is stale/failed. HMS is starting a fresh request automatically.'); - if (autoFlowAttempts < autoFlowMaxAttempts) { - autoFlowAttempts += 1; - autoFlowTimer = setTimeout(runAutoFlowStep, 1200); - return; - } + $('#btnAutoAbdmFlow').prop('disabled', false); + applyConsentButtonState(); + $('#abdmStatusBox').removeClass('text-danger').addClass('text-muted').text('Previous request is still being processed. Please wait for the first request to finish before starting a new one.'); return; }