Fix push_to_gateway variable scope in fhir submit flow

This commit is contained in:
DevSoftTech Server 2026-06-26 23:49:51 +05:30
parent a797b7d096
commit 617cecdcbf

View File

@ -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()]);