devsofttech_hms_ci4/scripts/check_push_logs.php
DevSoftTech Server 23cca1f9ba feat(abdm): proper FHIR bundles for lab reports and IPD discharge
- FhirR4Builder: rewrite buildLabReportBundle() with DiagnosticReportLab
  profile, structured Observation valueQuantity/valueString, reference
  ranges, interpretation codes, Binary+DocumentReference for HTML report,
  Encounter resource, HFR-based bundle identifier system

- FhirR4Builder: rewrite buildDischargeSummaryBundle() with optional
  Practitioner/Organization params, structured ABDM sections (chief
  complaints 422843007, medical history 1003642006, investigations
  721981007, procedures 1003640003, medications 721912009, follow-up
  736271009), HFR-based bundle identifier system

- AbdmGateway: shareIpdDischargeBundle() now builds a real
  DischargeSummaryRecord FHIR bundle and posts via pushRecord()
  (POST /v3/records/push) instead of the stale shareIpdDischargeBundle()

- AbdmGateway: shareDiagnosisReportBundle() now builds a real
  DiagnosticReportRecord FHIR bundle and posts via pushRecord()
  instead of the stale shareDiagnosisReportBundle()

- AbdmGateway: add getHospitalProfileForFhir() and mapLabTypeToTitle()
  helpers; fix pre-existing undefined \ bug in
  getActiveConsentRecord()

- Add ABDM_FHIR reference package, AbdmBridgeLog controller/view,
  bridge record migration, debug scripts and misc UI/settings updates
2026-05-23 04:41:59 +05:30

13 lines
726 B
PHP

<?php
$pdo = new PDO('mysql:host=localhost;port=3306;dbname=hms_data_ci4', 'root', '');
// Full detail for the latest push attempt
$r = $pdo->query("SELECT id, response_code, response_json, LEFT(request_json,400) as req, created_at FROM abdm_api_logs WHERE endpoint LIKE '%records/push%' ORDER BY id DESC LIMIT 1")->fetch(PDO::FETCH_ASSOC);
echo "ID:{$r['id']} | HTTP:{$r['response_code']} | {$r['created_at']}\n";
echo "RESPONSE: {$r['response_json']}\n";
echo "REQUEST(400): {$r['req']}\n\n";
// Token in DB
$t = $pdo->query("SELECT s_value FROM hospital_setting WHERE s_name='EATRIA_BRIDGE_TOKEN' LIMIT 1")->fetchColumn();
echo "TOKEN in DB: " . substr($t, 0, 8) . "***" . substr($t, -4) . " (len=" . strlen($t) . ")\n";