Commit Graph

578 Commits

Author SHA1 Message Date
a7727c9d9e fix(abdm): correct mobile ABHA discovery flow
Route Find ABHA via Mobile through standalone bridge OTP endpoints and remove exact placeholder values from generated FHIR bundles.
2026-08-24 23:19:21 +05:30
7ec5149ccf feat(ipd): manage admission examination fields
Add an Admin CRUD master for IPD admission examination fields with enabled state, display order, field types, and select options.
2026-08-24 00:53:01 +05:30
40c68da430 fix(report): tolerate legacy IPD surgery schema
Guard optional surgery report joins and return a readable response when a site-specific schema mismatch occurs.
2026-08-24 00:34:47 +05:30
225721ae02 feat(report): add IPD surgery export report
Add a permissioned IPD surgery report combining discharge surgery, patient, diagnosis, OT, and matched billing details.
2026-08-24 00:01:58 +05:30
83fce47ee1 feat(report): add searchable permissioned IPD census hub
Organize the report hub into permission-filtered searchable panels and add a protected IPD census and discharge report.
2026-08-23 20:36:09 +05:30
8e80bc4a7b fix(dashboard): align OPD referral totals with patient list
Use patient profile referral values for the OPD dashboard, matching the report patient-list source and counts.
2026-08-20 23:50:30 +05:30
9ca9320fee fix(report): include zero-fee OPD visits
Remove the payment-mode exclusion from the OPD patient-list report so it matches dashboard appointment totals.
2026-08-20 23:34:37 +05:30
6a690e80db fix(abdm): separate IPD discharge clinical sections
Map IPD chief complaints, final diagnoses, discharge advice, hospital course, and follow-up into profile-valid discharge FHIR sections.
2026-08-19 05:59:32 +05:30
16be448b6f fix(abdm): align IPD discharge FHIR with NRCES profile
Use mandatory SNOMED discharge composition and section codings, model completed investigations as DiagnosticReportLab resources, and restore local M3 attachment/value-string rendering.
2026-08-19 04:41:27 +05:30
9e35fe41fc Add discharge template CKEditor and watermarks 2026-08-18 17:50:51 +05:30
3b200e0290 Fail open when caching discharge PDF 2026-08-18 17:35:30 +05:30
306f8ef1c4 Refresh mPDF debug snapshot on build 2026-08-18 17:32:24 +05:30
16de9b0c0c Force discharge header onto first PDF page 2026-08-18 17:26:43 +05:30
f5743be68a Prevent duplicate discharge template content 2026-08-18 17:04:38 +05:30
4d5155a2f8 Avoid @page overriding discharge headers 2026-08-18 17:01:11 +05:30
0dbe4c6f64 Register discharge headers before first page 2026-08-18 16:50:42 +05:30
8a6319ac13 Render discharge template header with mPDF API 2026-08-18 16:46:09 +05:30
8cf0e42765 Activate discharge header with mPDF runtime API 2026-08-18 16:41:46 +05:30
28109df663 Build mPDF debug input on demand 2026-08-18 16:36:53 +05:30
53b79b5297 Add raw mPDF input debugger 2026-08-18 16:33:24 +05:30
ebf23b93e8 Use exact OPD header rendering pattern for discharge 2026-08-18 16:29:43 +05:30
94bcf4d37c Force discharge header on first page 2026-08-18 16:20:04 +05:30
b068fc3be2 Fix @page header activation for body-only template CSS 2026-08-18 16:13:53 +05:30
0ea3fc099a Use correct mPDF CSS-first structure for discharge 2026-08-18 15:59:23 +05:30
4835d34e0e Add Debug HTML button to discharge template editor 2026-08-18 15:55:09 +05:30
e353e5afdc Simplify discharge PDF to plain mPDF fragment 2026-08-18 15:42:01 +05:30
f69d10b417 Move discharge template CSS into PDF head 2026-08-18 15:40:22 +05:30
f9b1e02af8 Fix @page placement for mPDF discharge header 2026-08-18 15:37:22 +05:30
42abe7ed9b Use mPDF htmlpageheader for discharge header 2026-08-18 15:29:13 +05:30
1fec6c8677 Add IPD discharge template builder 2026-08-18 15:18:13 +05:30
e1de6e3215 Apply discharge header margin setting 2026-08-18 14:50:56 +05:30
c26589fa22 Render discharge header in PDF body 2026-08-18 14:48:23 +05:30
ce04de2adf Separate NABH audit template selection 2026-08-18 14:29:09 +05:30
aee50cb52f Rebuild IPD discharge template selection 2026-08-18 14:28:27 +05:30
2e7da51024 Add discharge header mode test buttons 2026-08-18 14:15:39 +05:30
80f9487e8f Show discharge header in HTML debug 2026-08-18 14:11:50 +05:30
8e9fe8fab3 Apply discharge template CSS to print fragments 2026-08-18 14:08:46 +05:30
e0ce677355 Make discharge header field authoritative 2026-08-18 13:58:14 +05:30
0047a0508a Respect blank discharge template headers 2026-08-18 13:46:35 +05:30
80593ba931 Preserve legacy discharge template headers 2026-08-18 13:40:52 +05:30
903478ce59 Add OPD patient list report with refer by 2026-08-18 13:09:03 +05:30
16f244f6be Add Refer By OPD template placeholder 2026-08-18 13:00:28 +05:30
662aeed7f1 Include full days in OPD total report 2026-08-18 12:55:32 +05:30
1bd93be698 fix(abdm): treat empty HIU sessions as pending, not failure
The bridge reply 'No HIU sessions found matching the criteria' means the facilities have not sent records yet. The consent-status step already handled that wording, but the data-fetch steps surfaced it as 'Auto flow failed'. Share the check via isPendingBridgeSessionError() and report a pending state that keeps polling.
2026-08-18 03:15:09 +05:30
fb2bfb8a8c fix(abdm): stamp consent status on its own request row
Reconciled status lived only on a separate reconcile row, whose correlation back to a session was rebuilt on every page load, so denied/expired requests reverted to REQUESTED after reopening. Write GRANTED/DENIED/EXPIRED/REVOKED onto the session's own consent_request row and treat a stamped terminal state as authoritative.
2026-08-18 03:11:09 +05:30
c6f415cfdc fix(abdm): file consent status under the right request
consent_request anchor rows only registered their HMS request_id, so reconcile rows (which carry the ABDM consent_request_id) matched nothing and fell back to the newest open session. A DENIED result therefore landed on the granted session, where GRANTED outranks it, and the denied request kept showing REQUESTED. Anchors now publish their ABDM ids, and the open-session fallback applies only when the row names no consent request or that session has not resolved its ABDM id yet.
2026-08-18 03:03:59 +05:30
1dbac7b367 fix(abdm): reconcile every open consent request
Check Live Status only reconciled the newest consent request, so requests the patient later denied or let expire in the PHR app stayed at REQUESTED. Reconcile all non-terminal sessions, expose each session request_id, and let a later revoked/expired/denied row override an earlier granted one.
2026-08-18 02:51:19 +05:30
7ae9a77d29 fix(abdm): save enrolment mobile on ABHA-created patients
ABDM does not echo the alternate mobile in aadhaar/verify-otp, so patients created from that response were saved without a phone number. Fall back to the enrolment mobile ABDM accepted, flag its origin via mobile_source, and state the origin in the wizard.
2026-08-18 02:51:14 +05:30
8be64239d5 fix(abdm): stop ABHA flow after Aadhaar-created account
ABDM v3 creates the ABHA inside aadhaar/verify-otp when an alternate mobile is supplied. HMS then ran a standalone mobile OTP login, which returned whichever ABHA owned that number (e.g. the parent's) and overwrote the child's record. Skip that step when an ABHA number is returned and show the operator an explicit alternate-mobile status instead.
2026-08-18 02:31:44 +05:30
841b15d27b fix(abdm): bind alternate mobile to enrolment
Use the dedicated Bridge enrolment-mobile OTP endpoints for child/dependent ABHA creation and reject any alternate-mobile response whose ABHA differs from the Aadhaar-verified identity.
2026-08-18 02:13:47 +05:30