Commit Graph

101 Commits

Author SHA1 Message Date
4a0889a200 feat(doctor): fix Patient Age calculation via get_age_1 and add Full HMS OPD Consult Form modal 2026-08-29 02:59:15 +05:30
69f0e1fa45 feat(nursing): add Nursing Station Master, ABDM credentials to Nurse Master, and Visual Bed Grid at /ipd/patient 2026-08-28 02:43:37 +05:30
7c04828e99 feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ea28bfa837 Improve discharge medication template output
Render class-only discharge medication tables with salt and medicine advice, and persist generic salt data from medicine search.
2026-08-09 13:45:50 +05:30
b7f789b1c3 Fix auto-flow false failures and remove dead opd.fhir.generated bridge event
- Patient.php: broaden non-fatal-pending detection in abdm_content_auto_flow() to recognize more bridge error wordings (No HIU sessions found / matching the criteria) and HTTP 400, stopping spurious 'Auto flow failed' toasts.
- Opd_prescription.php: remove dead opd.fhir.generated bridge_sync_queue enqueue in storePrescriptionFhirBundle(). This unprefixed event type routed to the CSNOtk terminology bridge which has no consumer for it, always 404ing. Real ABDM sharing already works via DreamsoftConnector::sharePrescriptionBundle() (abdm.fhir.share.requested).
2026-07-30 06:25:45 +05:30
a5bbe3cc20 fix(abdm): skip TLS verify on self-loopback FHIR gateway handoff call
HMS instances behind NAT with no live public IP can hit an expired/unreachable
TLS cert on their own base_url() when doing the internal handoff self-call to
AbdmGateway::share_prescription_bundle, causing 'Gateway handoff failed:
curl error 60: Peer's Certificate has expired'. This call never leaves the
local server, so skip peer verification by default via new
fhirGatewayHandoffSslVerify() helper. Set FHIR_HANDOFF_SSL_VERIFY=true in .env
to re-enable strict verification on deployments with a valid public cert.

Does not affect the actual outbound ABDM bridge submission (EAtriaBridgeConnector),
which keeps its own independent SSL verification/toggle.
2026-07-29 12:39:05 +05:30
c84ea383e4 ABDM records/push: treat 201/409 as submitted, persist record IDs, and update OPD UI state 2026-07-21 01:32:30 +05:30
5d6acdd480 Implement ABDM bridge health record flows
- add facility QR support and OPD queue bridge fixes
- support care-context push warnings for lab, radiology, IPD and remaining HI types
- improve ABHA patient matching and diagnosis autocomplete performance
- clean up webcam streams on page navigation
2026-07-20 03:02:09 +05:30
3801610cdf Add mbstring-safe fallbacks in OPD prescription save 2026-07-10 01:18:34 +05:30
bb5f570ead Return JSON error response for OPD autosave exceptions 2026-07-10 01:11:49 +05:30
6767fce287 Fix OPD prescription autosave 500 on non-string payload values 2026-07-10 01:07:27 +05:30
2b32dfe5da OPD: reduce consult search min chars and wildcard threshold 2026-07-09 16:11:53 +05:30
fd8e96747d OPD consult: add floating draggable section bookmarks with persistent position 2026-07-07 15:17:58 +05:30
681bb947b3 Investigation master: add category autofill action and rules 2026-07-02 19:05:33 +05:30
c930a54155 Investigations: use order_id sequence for profile apply and list order 2026-07-02 18:57:08 +05:30
c148b01466 OPD consult profiles: apply saved investigation order 2026-07-02 18:52:11 +05:30
0c85dddd43 Investigation profile: preserve select2 item order in edit panel 2026-07-02 18:43:34 +05:30
0a48fa6d2c OPD investigation list: order by id instead of name 2026-07-02 18:24:33 +05:30
14a9d851ad ABDM: force gateway push from OPD modal and treat timeout as queued when bridge already succeeded 2026-06-30 19:15:29 +05:30
c310221961 ABDM: use configured HFR for EAtria connector and avoid submit timeout HTML 500 2026-06-30 18:49:37 +05:30
3072639cd5 Revert "ABDM: fix local submit fallback, HFR runtime usage, status sync, and link-token retry"
This reverts commit e08c18f5b2.
2026-06-30 18:11:34 +05:30
e08c18f5b2 ABDM: fix local submit fallback, HFR runtime usage, status sync, and link-token retry 2026-06-30 18:09:55 +05:30
617cecdcbf Fix push_to_gateway variable scope in fhir submit flow 2026-06-26 23:49:51 +05:30
a797b7d096 Fix fhir_bundle_submit undefined push_to_gateway variable 2026-06-26 23:49:32 +05:30
d4595fa028 M2 flow: default OPD submit to HMS source care-context mode 2026-06-26 23:41:58 +05:30
e7e5cf88e7 ABDM submit: release session lock before internal handoff and extend client timeout 2026-06-26 16:39:53 +05:30
a23d1f215a ABDM submit: prevent indefinite loading with fetch timeout and safer response handling 2026-06-26 16:35:36 +05:30
428dcd2aa9 ABDM: treat transient handoff timeout as queued when recent OPD record exists 2026-06-26 16:30:52 +05:30
fbaa985857 feat(abdm): implement M2 gateway contract endpoints and live test tooling 2026-06-24 04:50:03 +05:30
1bac1f6e04 feat: update storestock flow and ABDM bridge handling 2026-06-18 17:38:20 +05:30
eefda96dca Preserve investigation profile test master order 2026-06-11 19:22:09 +05:30
8bfd11ccda Persist consult NABH fields via remarks fallback 2026-06-05 05:53:24 +05:30
c692340bb2 Store ABDM bundles in health records 2026-06-03 11:05:40 +05:30
510d121478 Normalize OPD preview bundle_type from profile 2026-06-01 14:04:44 +05:30
c68816ce57 Upgrade regenerated OPD bundle_type to OPConsultRecord 2026-06-01 14:02:23 +05:30
6f312dd0d8 Add manual GET wrapper for FHIR regenerate 2026-06-01 14:00:02 +05:30
b0e3459c19 Add ABDM careContexts and OPD visit key 2026-06-01 13:54:56 +05:30
b70e88dd75 Use OPConsultRecord for OPD bundles 2026-06-01 13:31:53 +05:30
33fc87ac88 Fix OPD FHIR submit record reference 2026-06-01 13:29:10 +05:30
9de803ace7 Send ABDM HFR ID only 2026-06-01 13:24:59 +05:30
e8ec06e8f8 Harden ABDM health record push payloads 2026-06-01 13:23:54 +05:30
07ed8ff305 Sanitize OPD FHIR patient name placeholders 2026-06-01 10:57:30 +05:30
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
1b6f2c2db7 feat: Add Submit to ABDM button on FHIR bundle preview
- POST Opd_prescription/fhir_bundle_submit endpoint:
  loads stored FHIR bundle, fetches patient/OPD/doctor context,
  calls EAtriaBridgeConnector::pushRecord to push to bridge
- Standalone preview page (/Opd_prescription/fhir_bundle_preview/N):
  added Submit to ABDM Bridge button with CSRF-safe AJAX + inline
  success/error alert
- FHIR modal in task_board.php: added Submit to ABDM button next
  to Copy JSON; JS reads _fhirOpdId/_fhirSessionId and posts to
  fhir_bundle_submit with CSRF token refresh
2026-05-22 15:54:13 +05:30
0fe556f37e fix: preserve doctor original text in FHIR form; add live complaint/diagnosis terms to preview 2026-05-20 03:14:17 +05:30
78060d03c8 feat: FHIR form view — inline diagnosis SNOMED edit + show doctor's original text 2026-05-20 03:02:03 +05:30
70bc85ae0c fix: restore advice_search() method declaration lost in prior commit 2026-05-20 02:53:48 +05:30
4250000d43 feat: FHIR form view — inline complaint SNOMED edit with live search and save 2026-05-20 02:49:36 +05:30
cd18551ce2 feat: FHIR bundle — use complaint_snomed_json for coded complaints (SNOMED + severity + duration) 2026-05-20 02:08:01 +05:30
32c1dc20e1 feat: Clinical Master workspace — Complaints + Diagnosis edit with SNOMED CT search 2026-05-20 01:25:01 +05:30