Commit Graph

49 Commits

Author SHA1 Message Date
41d89a1969 feat(abdm): enhance care context discovery, async token retry, and modal backdrop cleanup
- Add multi-type care context discovery in AbdmGateway (DiagnosticReport, DischargeSummary, Immunization, OPConsult) with target task prioritization
- Implement automated retry backoff in EAtriaBridgeConnector for asynchronous ABDM link token callback delivery
- Handle already-linked contexts gracefully and synchronize Task Board row status on link completion
- Resolve modal backdrop freeze and inactive main screen on radiology report template update in PathLab_Report and welcome_message
- Add unit tests CareContextDiscoveryTest and EAtriaBridgeConnectorLinkTest
2026-09-29 14:02:22 +05:30
61206784f3 feat(abdm): implement care-context linking cooling window and timer reset on record modification
- Add cooling period configuration (60 min for OPD/Lab/Radiology/others, 24 hr for IPD Discharge) in AbdmConnector
- Add calculateCooling() logic in AbdmTaskBoardSyncService and skip automated linking during cooling window
- Touch and refresh work task timestamps on prescription save and IPD discharge summary save/print
- Update opd_fhir_documents on prescription edit rather than inserting duplicate bundles
- Enrich ABDM Task Board table and OPD consult list with active cooling badges, remaining minutes, and auto-link schedule
- Preserve manual 'Link Context' action on task board to allow immediate override anytime
- Update CLI commands (abdm:taskboard-sync, abdm:push-sync) with cooling counters and status logging
2026-09-28 18:29:50 +05:30
d0f7aa4542 feat(abdm): enable live fresh FHIR fetch on pull, remove old push options, and keep care context linking 2026-09-28 03:25:04 +05:30
90e63d2d58 fix(abdm): generate and publish OPD consultations as OPConsultRecord and support dynamic hi_type 2026-09-28 02:46:10 +05:30
dd1acb88e1 feat: add IPD census PDF, collection payment filter, fix report panel visibility, and implement ABDM HIP linking
- Reports:
  - Add PDF export option with A4-L print layout for IPD Census & Discharge Report
  - Add Payment Type filter (OPD, Charge, IPD, ORG, All) to Collection Report with URL routing and summary table updates
  - Ensure superadmin/admin/developer visibility in Report Panel controller permission checks
- ABDM:
  - Implement HIP patient care-context linking and discovery integration
  - Add on-demand FHIR health record fetch endpoints for Bridge connector
  - Add ABDM HIP link modal view and wire to patient/person profiles and prescription
2026-09-15 23:21:30 +05:30
ee7cf59c49 fix(abdm): enforce clinical decimal precision on vitals and temperature in FHIR bundles and task board 2026-09-07 16:11:24 +05:30
bb6589605a fix(abdm): resolve health document preview hang and wellness record display in task board
- Fix mPDF single-threaded server deadlock by replacing HTTP logo URL fallbacks with inline base64 data URIs
- Add fast path in DoctorDocument to read scanned NABH PDFs directly from disk without mPDF re-rendering
- Support doctor_document and patient_document entity types in task board health document preview
- Enhance task board preview form with in-modal PDF preview, image thumbnail, and download actions
- Populate Composition.encounter with AMB encounter and set Wellness Record display code
2026-09-07 00:46:17 +05:30
52f8d9691b feat(abdm): enhance IPD discharge FHIR generator with NRCES v6.5.0 single-coding and structured dosage instructions 2026-09-05 15:29:11 +05:30
4e748dbaa8 fix(abdm): map admission/discharge encounter period, split vitals by admission/discharge, and attach size/hash to pdf document reference 2026-09-04 06:15:08 +05:30
9bca2630c3 fix(abdm): allow GET/POST for ipd_discharge_fhir_preview and render detailed error in preview modal 2026-09-04 05:55:51 +05:30
29ac1ffe66 Update ABDM Work Task Board tab and header name to OPD Consult / Prescription Records 2026-09-03 14:33:37 +05:30
599c4806bb feat(abdm & reports): align ABDM FHIR R4 Wellness & HealthDocument generators, add NABH IPD scanner, balance column in invoice list, and old payment received report 2026-09-01 14:05:17 +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
2e8304636b feat(abdm): add digital share records
Generate standardized Digital Share PDFs for invoice and diagnostic records, strengthen FHIR document validation and sync handling, and keep task-board submissions AJAX-only.
2026-08-16 17:35:42 +05:30
625987955e feat(abdm): improve bridge record delivery
Add NAT-safe Immunization and InvoiceRecord Bridge workflows, stable care-context handling, ABHA address enrichment, embedded invoice PDFs, M2 status synchronization, and strict Bridge response normalization.
2026-08-16 01:30:11 +05:30
00b949ad0a Push M2 records to gateway for NAT deployment and cover all 8 HI types 2026-08-15 03:16:32 +05:30
90831d4b39 Harden ABDM bridge auth flow and sync handling 2026-07-28 00:14:49 +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
629590d9ab ABDM: separate course section and include doctor in discharge FHIR 2026-07-17 18:40:19 +05:30
ca025a088e ABDM: hide empty investigations and standardize discharge headings 2026-07-17 18:33:43 +05:30
d7fe05e6b0 ABDM: enrich discharge FHIR with observations advice and risks 2026-07-17 17:59:54 +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
7a38c3e55d ABDM task board: show submit action for FHIR-ready OPD rows 2026-06-28 02:17:41 +05:30
e651b18a01 ABDM: guard repeat OPD submits and dedupe health records 2026-06-27 00:32:14 +05:30
9b00974e4e ABDM task board: add OPD gateway retry action 2026-06-27 00:22:17 +05:30
db7ba044b1 ABDM task board: show OPD record lifecycle status 2026-06-27 00:21:02 +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
985d476bc1 ABDM: finalize ABHA verify persistence, M2 routes/workflows, and location masters seeding 2026-06-24 03:15:22 +05:30
0ebf8d2a8a ABDM: enforce PDF-backed report submit and improve gateway tracking 2026-05-31 04:17:39 +05:30
78c23af7e5 Checkpoint: pathology panel modal workflow, gateway component search, and ABDM-style component/print editors 2026-05-30 06:32:30 +05:30
4ed366ccb2 feat: commit all pending page and ABDM gateway updates 2026-05-26 06:04:34 +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
ba6b479da6 fix: add arrow-key/Enter/Escape navigation for SNOMED dropdown in FHIR form 2026-05-20 03:21:06 +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
4250000d43 feat: FHIR form view — inline complaint SNOMED edit with live search and save 2026-05-20 02:49:36 +05:30
a0989d3a4b feat: FHIR preview modal — Form View tab with patient/complaints/diagnosis/vitals/medications cards 2026-05-20 02:34:00 +05:30
44fbd5d1cc feat: FHIR preview modal — Update Codes dropdown + code quality badges 2026-05-20 02:17:23 +05:30
e9ccc40685 fix: remove orphaned JS listeners for deleted Quick FHIR Preview elements (null getElementById error) 2026-05-20 00:52:21 +05:30
e5ec25dfd3 feat: OPD Consult Publish - Preview FHIR opens in modal dialog 2026-05-20 00:48:33 +05:30
fd7b9df3f4 ui: remove Quick FHIR Preview and Today Credit OPD cards from task board 2026-05-20 00:31:56 +05:30
ed4e7c1fe4 feat: ABDM task board — remove All, rename ABHA Update, add OPD Book + OPD Consult Publish sections 2026-05-20 00:29:00 +05:30
368c0b831d ui: ABDM task board — full-width layout (remove max-width 1280px) 2026-05-20 00:14:23 +05:30
0628f8f813 feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix
ABDM OPD Queue (today):
- New EAtriaBridgeConnector: opdQueueFetch/opdTokenCreate/opdTokenUpdateStatus + patch() helper
- New AbdmOpdQueue controller: index/list/fetchQueue/createToken/updateTokenStatus/processScannedToken
  - fetchQueue syncs gateway tokens into abdm_opd_tokens (local DB) and enriches with HMS patient data
  - processScannedToken auto-finds/creates patient_master record from ABHA scan data, marks token CALLED
- New migration: abdm_opd_tokens table (gateway_token_id, source, status, patient_id, opd_id, processed_at)
- New view: abdm/opd_queue.php - reception screen with auto-refresh 30s, HMS Patient column (green row when OPD registered)
- Sidebar: ABDM OPD Queue nav link added
- Routes: AbdmOpdQueue with abdmPermFilter

ABHA Register tab (earlier this session):
- New Abha controller: initiate/verifyOtp/communication/verifyCommOtp/validateAbha/card + autoCreateOrFindPatient
- New views: abha/card.php, partials/abha_create_panel.php, partials/abha_otp_modal.php
- Patient_V.php: ABHA Register tab with 4-method wizard (ABHA number, QR scan, facility QR, mobile OTP)

Patient ABHA search fix:
- Patient::search() now detects ABHA column (abha_id/abha_no/abha/abha_address) and searches by it

ABDM Bridge infrastructure:
- EAtriaBridgeConnector: new connector for e-atria.in ABDM bridge gateway
- AbdmConnectorFactory/Interface updated
- AbdmGatewaySettings controller + view
- SNOMED/CSNOTK terminology service skeleton
- Finance payout OPD consult views
- Migration: AddAbdmPushFieldsToOpdAndPatient, CreateSnomedCoreTables
- Docs: abdm/ API specs, architecture, gateway guides
2026-05-16 04:21:31 +05:30
16f654289e Move ABDM sandbox to task board and improve OPD queue handling 2026-04-06 13:55:19 +05:30
062fc7ab32 feat: Add ABDM Task Board module with ABHA workflow
- Add ABDM sidebar heading and Task Board nav link
- Create migration 000040: abdm_work_tasks table
- Add AbdmTaskBoard controller with backfill methods
- Add AbdmWorkTaskService for task creation/deduplication
- Add AbdmGateway controller for ABDM API integration
- Separate task types: patient_abha_create vs patient_abha_update
- Add lab_report_publish and radiology_report_publish task types
- Patient.php: auto-create ABDM tasks on registration
- Diagnosis.php: auto-create tasks on report verify/finalize
- Task board UI: 7 filter buttons with default Unupdated ABHA view
- Fix SQL crash in backfillLabRadiologyTasks (dynamic column detection)
- Improve load_form AJAX error display with HTTP status + response text
- Add ABDM routes in Routes.php
- Add FHIR R4 builder library updates
- Add bridge sync service updates
2026-04-05 23:42:24 +05:30