From 9a70172cbc0504471fe142a8505facba9d2100f0 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Mon, 28 Sep 2026 00:41:11 +0530 Subject: [PATCH] fix(abdm): use apointment_date in AbdmTaskBoardSyncService --- app/Libraries/Abdm/Sync/AbdmTaskBoardSyncService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Libraries/Abdm/Sync/AbdmTaskBoardSyncService.php b/app/Libraries/Abdm/Sync/AbdmTaskBoardSyncService.php index 95cada1..1af7a4d 100644 --- a/app/Libraries/Abdm/Sync/AbdmTaskBoardSyncService.php +++ b/app/Libraries/Abdm/Sync/AbdmTaskBoardSyncService.php @@ -75,7 +75,7 @@ class AbdmTaskBoardSyncService // 1. Fetch done appointments from the last 30 days where patient has ABHA $rows = $this->db->table('opd_master o') - ->select('o.opd_id, o.p_id, o.P_name, o.apointment_date, o.opd_date, o.opd_status, o.doc_name, o.doc_id, p.' . $abhaCol . ' as abha_id, p.p_fname, p.gender, p.dob', false) + ->select('o.opd_id, o.p_id, o.P_name, o.apointment_date, o.opd_status, o.doc_name, p.' . $abhaCol . ' as abha_id, p.p_fname, p.gender, p.dob', false) ->join('patient_master p', 'p.id = o.p_id', 'left') ->where('o.opd_status', 2) ->where('DATE(o.apointment_date) >=', date('Y-m-d', strtotime('-30 days')), false) @@ -202,7 +202,7 @@ class AbdmTaskBoardSyncService $summary['eligible']++; - $consultDate = (string) ($row['apointment_date'] ?? $row['opd_date'] ?? ''); + $consultDate = (string) ($row['apointment_date'] ?? ''); $visitDate = $consultDate !== '' ? date('Y-m-d', strtotime($consultDate)) : date('Y-m-d'); $derivedCcRef = 'OPD-' . $opdId . '-S' . ($sessionId > 0 ? $sessionId : 0) . '-' . $visitDate;