- Auto-resolve missing name, gender, year_of_birth, abha_address, and abha_number in hipLinkToken and hipLinkCareContext endpoints using patient_master lookup
- Calculate birth year with fallback to age (current_year - age) when DOB is 0000-00-00, empty, or invalid
- Support resolving ABHA identifier whether saved in abha_address or legacy abha_id column
- Pass patient_id from client link modal and views (opd_prescription_basic, Patient_Profile_Opd_V, Person_profile_V)
- Fix demographic resolution in AbdmTaskBoardSyncService for background OPD and work task publishing
- Add comprehensive PHPUnit test suite in tests/unit/Abdm/TestHipDemographicsCareContext.php
- Fix Undefined variable \ 500 error in Person_Edit_V.php
- Safeguard auth()->user() and variable access in Person_Edit_V.php and Person_profile_V.php
- Enhance getPrescriptionMedicines with fallback dosing, remarks, and SNOMED lookup for OP Consultation FHIR
- Add deep-link SMS notify and link verification in ABDM gateway and task board
- Add PatientEditViewTest covering profile and edit view rendering
- Support hospital, patient, doctor, and date placeholders matching template variables
- Convert local logo and signature paths to base64 Data URIs for mPDF
- Apply token replacement to report body in single and compiled prints
- Add interactive placeholder toolbar in diagnosis template settings view
- Add unit tests in tests/unit/DiagnosisTemplateTokenTest.php
- Add getTasks() method with status filtering (all, open, completed, failed) to AbdmWorkTaskService
- Enhance AbdmTaskBoard to enrich all task types with health_records, invoice_code, and care contexts
- Add status toggle filter buttons (All, Open, Completed) with dynamic count badges to Task Board UI
- Add real-time fuzzy/keyword search input for instant filtering by invoice ID, patient name, ABHA, or task code
- Render completed/linked tasks with green LINKED badge, gateway reference, and FHIR Preview button
- Add unit tests in AbdmTaskBoardBackfillTest
- Fix empty string fallback in validateAbha and EAtriaBridgeConnector to properly extract healthIdNumber and real fullName from data payload
- Skip generic bridge envelope messages in extractBridgeErrorText to surface specific field rejections like loginHint
- Translate non-existent ABHA address errors to 'ABHA Address does not exist or was not found in the ABDM registry'
- Support both 14-digit ABHA numbers and ABHA addresses in Diagnosis publish and ABDM Task Board
- Prevent completed task duplication in lab/radiology backfill
- Add unit tests in AbhaOtpErrorHandlingTest and AbdmTaskBoardBackfillTest
- Align care context reference format (RAD- prefix for radiology, clean Ymd date) between discovery, shareDiagnosisReportBundle, and AbdmTaskBoardSyncService
- Automatically push FHIR document bundle to Bridge (POST /api/v3/records/push) on care context linking or already-linked confirmation in abdm_hip_link_modal
- Provide clear instructions to user regarding PHR app 'Fetch Records' pull flow
- Add unit test testShareDiagnosisReportBundleFormatsRadiologyCareContext
- 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
- 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
- Add Day Care (<24h) and Emergency (Casualty) admission pathways with prefixes DC- and ER-
- Add dedicated physical wards, ESI 5-level triage, MLC tracking, and PADSS day care discharge
- Implement audited 'Convert to IPD' workflow with SBAR handover and automated bed transfer
- Support unified IPD billing with dedicated group headers for Day Care and Emergency charges
- Redesign Hospital Admission Desk with executive card layout and modern triage controls
- Add comprehensive user documentation and SVG flowchart in public/help.html
- Completely remove legacy patient_master.p_lname column from database and application code
- 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
- Reorder and streamline wizard into 5 steps (Aadhaar, Aadhaar OTP, Mobile OTP, ABHA Address, Profile & Card)
- Add Aadhaar vs Communication mobile matching to skip or mandate mobile OTP (CRT_ABHA_108 vs CRT_ABHA_109)
- Enforce full consent declarations with master 'I Agree' checkbox and step validation (CRT_ABHA_102)
- Enforce UIDAI Verhoeff algorithm pre-validation and normalize upstream loginId errors (CRT_ABHA_104 / VRFY_ABHA_403)
- Enforce ABHA address validation policy: 8-18 chars, dot/underscore in between only, duplicate detection (CRT_ABHA_112)
- Enforce 60s timer and maximum 2 resend attempts on both OTP verification steps (CRT_ABHA_106)
- Support instant jump to profile & card for existing accounts with 'ABHA Already Exist' notice (VRFY_ABHA_404)
- Update Patient Management and Profile view buttons to 'Create / Find ABHA Record'
- M1: Update Find ABHA via Mobile to compliance flow: Mobile Number -> Profiles -> OTP -> Complete Profile Fetched
- M2: Support walk-in non-ABHA patient discovery via demographic matching (verified mobile, gender, year of birth, name)
- M2: Implement care context linking endpoints (/records/link/init and /records/link/confirm) with OTP verification
- Add abdm_link_transactions database migration
- Support Bearer token and HMAC signature authentication for bridge callbacks over VPN
- Add B2C same-invoice exchange and pure refund workflows (Marg ERP standard)
- Support returning excess/unused medicines with proportional unit pricing on original invoice
- Auto-net return credits against new medicines in POS cart with refund outflow handling
- Implement stock replenishment for restocked batches with audit trail in mst_stock_audit
- Generate sequential GST Credit Notes in mst_sale_returns and mst_sale_return_items
- Update Thermal 80mm, A5, and A4 print templates with separated dispensed vs returned items
- Add CI4 migration 2026-09-08-000001_CreateMedicalStoreReturnsAndExchanges.php for remote execution
- Add standalone SQL script scripts/sql/2026-09-08_medical_store_b2c_returns_and_exchanges.sql
- 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
- Dynamically resolve and generate PDF using designated Online/ABDM template (is_abdm=1) from ipd_discharge_templates
- Unify mPDF rendering logic between show_discharge and generateDischargeSummaryPdfBinary for exact byte-for-byte consistency
- Attach generated PDF as DocumentReference under SNOMED 373942005 (Discharge summary) in NRCES FHIR DocumentBundle
- Add quick-set actions and AJAX endpoints for Default and ABDM template selection in discharge template list UI
- Update unit tests covering DocumentReference generation and template resolution
- discharge_create.php (JS): Fixed AJAX done handler to JSON.parse the
raw string response (jQuery with dataType:'html' does not auto-parse
JSON), then re-render #discharge_medicine_tbody from result.drugRows.
Also fixed Remove All (#btn_discharge_med_reset) to send AJAX POST
with action=remove_all_drugs so records are deleted from DB, not just
cleared from the DOM.
- Ipd_discharge.php (Controller): In the AJAX JSON response block,
resolve dosage/dosage_when/dosage_freq IDs to human-readable labels
using getDoseMasterRows() before returning drugRows, so the table
displays 'BD / After Food' instead of raw numeric IDs. Added new
remove_all_drugs action that deletes all medicine rows for the IPD
from both legacy (ipd_discharge_prescrption_prescribed) and classic
(ipd_discharge_drug) tables. Added remove_all_drugs to both
lightweight-action whitelists to skip the expensive getIpdPanelInfo()
join.