From 617cecdcbfca90373a12d00a12a0d792a3d37fb4 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Fri, 26 Jun 2026 23:49:51 +0530 Subject: [PATCH] Fix push_to_gateway variable scope in fhir submit flow --- app/Controllers/Opd_prescription.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Controllers/Opd_prescription.php b/app/Controllers/Opd_prescription.php index 9bb6ce6..ef2f9f5 100644 --- a/app/Controllers/Opd_prescription.php +++ b/app/Controllers/Opd_prescription.php @@ -4650,8 +4650,6 @@ class Opd_prescription extends BaseController $opdId = (int) $this->request->getPost('opd_id'); $sessionId = (int) $this->request->getPost('opd_session_id'); - $pushToGateway = (int) $this->request->getPost('push_to_gateway') === 1; - $pushToGateway = (int) $this->request->getPost('push_to_gateway') === 1; return $this->response->setJSON($this->regenerateFhirBundleInternal($opdId, $sessionId)); } @@ -5269,6 +5267,7 @@ class Opd_prescription extends BaseController $opdId = (int) $this->request->getPost('opd_id'); $sessionId = (int) $this->request->getPost('opd_session_id'); + $pushToGateway = (int) $this->request->getPost('push_to_gateway') === 1; if ($opdId <= 0) { return $this->response->setJSON(['ok' => 0, 'error_text' => 'OPD ID required', 'csrfName' => csrf_token(), 'csrfHash' => csrf_hash()]);