From 98b25914d770443c4b0515cf6c55d9a2aa330e07 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Tue, 28 Jul 2026 02:15:34 +0530 Subject: [PATCH] Include callback operations in ABDM sync snapshot --- app/Controllers/Patient.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Controllers/Patient.php b/app/Controllers/Patient.php index 4159d46..49c59e6 100644 --- a/app/Controllers/Patient.php +++ b/app/Controllers/Patient.php @@ -3041,7 +3041,15 @@ class Patient extends BaseController $rows = $this->db->table('abdm_hiu_workflows') ->select(implode(', ', $select)) ->where('abha_address', $abhaAddress) - ->whereIn('operation', ['consent_request', 'consent_reconcile', 'data_fetch', 'consent_callback']) + ->whereIn('operation', [ + 'consent_request', + 'consent_status', + 'consent_reconcile', + 'data_fetch', + 'consent_callback', + 'hi_on_request_callback', + 'hi_data_push_callback', + ]) ->orderBy('id', 'DESC') ->get(40) ->getResultArray(); @@ -3092,9 +3100,12 @@ class Patient extends BaseController $phase = 'REQUESTED'; $priority = 120; - if ($operation === 'DATA_FETCH' && $status === 'SUCCESS') { + if (($operation === 'DATA_FETCH' || $operation === 'HI_DATA_PUSH_CALLBACK') && $status === 'SUCCESS') { $phase = 'COMPLETED'; $priority = 500; + } elseif (in_array($state, ['DATA_RECEIVED'], true)) { + $phase = 'COMPLETED'; + $priority = 480; } elseif (in_array($state, ['GRANTED'], true)) { $phase = 'GRANTED'; $priority = 420;