Send ABDM HFR ID only

This commit is contained in:
DevSoftTech Server 2026-06-01 13:24:59 +05:30
parent e8ec06e8f8
commit 9de803ace7
2 changed files with 1 additions and 13 deletions

View File

@ -5306,7 +5306,6 @@ class Opd_prescription extends BaseController
'record_type' => 'PrescriptionRecord', 'record_type' => 'PrescriptionRecord',
'hi_type' => 'PrescriptionRecord', 'hi_type' => 'PrescriptionRecord',
'visit_date' => $visitDate, 'visit_date' => $visitDate,
'hospital_id' => (string) $opdId,
'care_context_reference' => $ccRef, 'care_context_reference' => $ccRef,
'care_context_display' => $displayLabel, 'care_context_display' => $displayLabel,
'notes' => $displayLabel, 'notes' => $displayLabel,

View File

@ -21,7 +21,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface
private string $baseUrl; private string $baseUrl;
private string $token; private string $token;
private string $hfrId; private string $hfrId;
private string $hospitalId;
private int $timeoutSec; private int $timeoutSec;
public function __construct() 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->baseUrl = rtrim((string) ($config->eatriaBridgeUrl ?? 'https://abdm-bridge.e-atria.in/api'), '/');
$this->token = (string) ($config->eatriaBridgeToken ?? ''); $this->token = (string) ($config->eatriaBridgeToken ?? '');
$this->hfrId = ''; $this->hfrId = '';
$this->hospitalId = '';
$this->timeoutSec = (int) ($config->eatriaBridgeTimeoutSec ?? 30); $this->timeoutSec = (int) ($config->eatriaBridgeTimeoutSec ?? 30);
// DB (Admin Panel → ABDM Gateway Config) is the authoritative source for // DB (Admin Panel → ABDM Gateway Config) is the authoritative source for
@ -43,7 +41,7 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface
if ($db->tableExists('hospital_setting')) { if ($db->tableExists('hospital_setting')) {
$rows = $db->table('hospital_setting') $rows = $db->table('hospital_setting')
->select('s_name, s_value') ->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() ->get()
->getResultArray(); ->getResultArray();
@ -58,11 +56,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface
if (! empty($dbSettings['ABDM_HFR_ID'])) { if (! empty($dbSettings['ABDM_HFR_ID'])) {
$this->hfrId = trim($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) { } catch (\Throwable $e) {
// DB unavailable — continue with config/env values // DB unavailable — continue with config/env values
@ -434,10 +427,6 @@ class EAtriaBridgeConnector implements AbdmConnectorInterface
$body['hfr_id'] = $this->hfrId; $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) { foreach (['abha_id', 'doctor_name', 'department', 'notes', 'gender', 'year_of_birth'] as $optional) {
if (! empty($data[$optional])) { if (! empty($data[$optional])) {
$body[$optional] = (string) $data[$optional]; $body[$optional] = (string) $data[$optional];