From 9de803ace7c770cc3a46d673bb250df86ff6087e Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Mon, 1 Jun 2026 13:24:59 +0530 Subject: [PATCH] Send ABDM HFR ID only --- app/Controllers/Opd_prescription.php | 1 - app/Libraries/Abdm/EAtriaBridgeConnector.php | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/app/Controllers/Opd_prescription.php b/app/Controllers/Opd_prescription.php index 0a2dbd5..8fa36c3 100644 --- a/app/Controllers/Opd_prescription.php +++ b/app/Controllers/Opd_prescription.php @@ -5306,7 +5306,6 @@ class Opd_prescription extends BaseController 'record_type' => 'PrescriptionRecord', 'hi_type' => 'PrescriptionRecord', 'visit_date' => $visitDate, - 'hospital_id' => (string) $opdId, 'care_context_reference' => $ccRef, 'care_context_display' => $displayLabel, 'notes' => $displayLabel, diff --git a/app/Libraries/Abdm/EAtriaBridgeConnector.php b/app/Libraries/Abdm/EAtriaBridgeConnector.php index 105d548..868f3c0 100644 --- a/app/Libraries/Abdm/EAtriaBridgeConnector.php +++ b/app/Libraries/Abdm/EAtriaBridgeConnector.php @@ -21,7 +21,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface private string $baseUrl; private string $token; private string $hfrId; - private string $hospitalId; private int $timeoutSec; public function __construct() @@ -31,7 +30,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface $this->baseUrl = rtrim((string) ($config->eatriaBridgeUrl ?? 'https://abdm-bridge.e-atria.in/api'), '/'); $this->token = (string) ($config->eatriaBridgeToken ?? ''); $this->hfrId = ''; - $this->hospitalId = ''; $this->timeoutSec = (int) ($config->eatriaBridgeTimeoutSec ?? 30); // DB (Admin Panel → ABDM Gateway Config) is the authoritative source for @@ -43,7 +41,7 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface if ($db->tableExists('hospital_setting')) { $rows = $db->table('hospital_setting') ->select('s_name, s_value') - ->whereIn('s_name', ['EATRIA_BRIDGE_TOKEN', 'EATRIA_BRIDGE_URL', 'ABDM_HFR_ID', 'ABDM_BRIDGE_HOSPITAL_ID', 'HOSPITAL_ID']) + ->whereIn('s_name', ['EATRIA_BRIDGE_TOKEN', 'EATRIA_BRIDGE_URL', 'ABDM_HFR_ID']) ->get() ->getResultArray(); @@ -58,11 +56,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface if (! empty($dbSettings['ABDM_HFR_ID'])) { $this->hfrId = trim($dbSettings['ABDM_HFR_ID']); } - if (! empty($dbSettings['ABDM_BRIDGE_HOSPITAL_ID'])) { - $this->hospitalId = trim($dbSettings['ABDM_BRIDGE_HOSPITAL_ID']); - } elseif (! empty($dbSettings['HOSPITAL_ID'])) { - $this->hospitalId = trim($dbSettings['HOSPITAL_ID']); - } } } catch (\Throwable $e) { // DB unavailable — continue with config/env values @@ -434,10 +427,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface $body['hfr_id'] = $this->hfrId; } - if ($this->hospitalId !== '') { - $body['hospital_id'] = $this->hospitalId; - } - foreach (['abha_id', 'doctor_name', 'department', 'notes', 'gender', 'year_of_birth'] as $optional) { if (! empty($data[$optional])) { $body[$optional] = (string) $data[$optional];