Commit Graph

108 Commits

Author SHA1 Message Date
44cb24c4e1 fix: restore legacy OPD queue workflow 2026-04-06 12:40:34 +05:30
f8cbaacfb0 perf: remove AI enrichment from consult new medicine save flow 2026-04-06 12:20:44 +05:30
30643c87f8 feat: add scan doc list modal and print medicine formulation prefix 2026-04-06 12:11:56 +05:30
2154af394c fix: build Next Visit chips from opd_nextvisit with date from today 2026-04-06 11:45:08 +05:30
f28fcf2717 feat: auto-create new consult medicines in OPD master with AI/local detail enrichment 2026-04-06 11:38:11 +05:30
1843460693 feat: restore Old Prescription panel with add-one/add-all into current consult 2026-04-06 11:24:11 +05:30
8a3157e579 fix: populate last_opdvisit_date token in OPD print templates with previous visit date 2026-04-06 10:42:03 +05:30
2fc4fbd82c fix: use Unicode-compatible Hindi fonts for IPD form PDF rendering 2026-04-06 09:17:48 +05:30
f09e16c3a2 fix: prevent provisional diagnosis from duplicating diagnosis token in OPD print 2026-04-06 08:38:35 +05:30
7e16ac92c2 fix: dynamic ABHA column SELECT in createOpdPrescriptionWorkTask (unknown column abha_no) 2026-04-06 00:01:08 +05:30
e049ddcf2b fix: dynamic ABHA column SELECT in openReportEditorPage to handle remote DB schema 2026-04-05 23:57:16 +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
9d88aaa2a6 Implement ABDM identity storage and align OPD consult/medicine dose masters 2026-04-04 17:26:40 +05:30
9d2f91e73a Pathology report list: optional hc_items filter with null-safe fallback 2026-04-03 16:15:23 +05:30
ab4b9a39f8 Pathology report list: exclude mixed ultrasound by requiring lab_repotests mapping 2026-04-03 16:09:50 +05:30
d9e4d50dc6 Pathology report list: include all lab_repo templates even if group mapping missing 2026-04-03 16:06:26 +05:30
721f374521 Pathology report list: show templates without strict hc_items join filter 2026-04-03 16:03:12 +05:30
259ea1331a Diagnosis: fix ONLY_FULL_GROUP_BY in edit test data query 2026-04-03 15:55:24 +05:30
fd28d6a01e IPD cash balance: fix date range picker submission and parser 2026-04-03 14:13:05 +05:30
eec58b546d OPD templates: render short description with nl2br 2026-04-03 13:59:57 +05:30
e009b748ca OPD templates: add doctor short description placeholder tokens 2026-04-03 13:46:10 +05:30
34f31aed6a Diagnosis: fix ONLY_FULL_GROUP_BY in lab search queries 2026-04-03 13:32:56 +05:30
435192f81a IPD payment receipt: fix modal loader, add PDF print route, and bank mode details 2026-04-03 13:29:03 +05:30
e282289227 Default new patient blood group to Not Define 2026-04-02 17:49:45 +05:30
d8f75b3a29 feat(stock): add modular hospital stock management with dashboard, masters, indents, purchase and reports 2026-04-02 10:28:38 +05:30
584c9ce59d Fix BedManagement controller header to restore bed-status route 2026-04-02 06:27:52 +05:30
7b7c9e510e Bed Status: graphic ward/floor map with patient search, colour-coded bed cards 2026-04-02 06:25:26 +05:30
7b04c8e419 Add Echo modality to diagnosis navigation and charge group setup 2026-04-02 05:12:08 +05:30
2b391705fe Rx print: persist and print Hindi advice from opd_advice 2026-04-01 20:23:10 +05:30
ddf8fd2345 Rx print: use regex sign extraction for dose Hindi lookup from opd_dose_shed 2026-04-01 20:13:10 +05:30
0d500d82b2 Rx print: fix dose translation (prefix match + one-time-a-day), consistent 11px Hindi font 2026-04-01 20:08:00 +05:30
caba6dc84b Rx print: professional font, vitals on one line, advice in Hindi 2026-04-01 20:01:38 +05:30
c3f07db430 Fix consult profile add: avoid duplicate investigation code 500 2026-04-01 19:33:55 +05:30
f4891c0bb4 Fix profile master data loading and remove city_auto_u migration 2026-04-01 19:22:03 +05:30
94e1253e40 Investigation Profile Master: CRUD and consult integration 2026-04-01 18:44:52 +05:30
d06fe77f03 Investigation Master: use legacy investigation key field 2026-04-01 18:33:20 +05:30
771fa64778 Investigation Master: CRUD, favourites, specialization filter 2026-04-01 18:26:33 +05:30
e27a69df5d OPD/IPD: add dosage defaults to medicine master form; make drug allergy non-mandatory (default: Allergies Not Known) 2026-04-01 18:12:25 +05:30
7ea22378f5 OPD medicine list: move DataTable to server-side ajax 2026-04-01 17:49:02 +05:30
c3bc8f89b8 OPD: simplify medicine list and reuse master dosage defaults 2026-04-01 17:40:50 +05:30
6b2c82e808 Map OPD dose Hindi labels from master tables 2026-04-01 08:46:29 +05:30
a9b5e76fc9 Improve OPD prescription print template variables 2026-04-01 07:58:48 +05:30
fe1156b68a Fix billing invoice balance/payment flow and deduction UI 2026-04-01 07:23:29 +05:30
3088d1fc85 Fix OPD print placeholders for consult fields
- Add fallback key resolution for complaints, diagnosis, provisional diagnosis, and finding examinations
- Expose placeholder aliases for mixed-case and lowercase template variables
- Keep provisional diagnosis precedence over diagnosis when present
2026-03-31 07:20:35 +05:30
af033c24e0 Add temporary debug logging to OPD paper settings save/read flow
Captures:
- Storage key being used
- Payload length
- Which candidate keys are checked
- Persistence verification results

Remove this commit after testing confirms the fix works
2026-03-31 06:55:59 +05:30
edd577e3e7 Fix OPD paper settings save failure: use short hashed keys + legacy fallback
- Shortened template-scoped paper setting keys to avoid s_name length limits in legacy schemas
- Added legacy key fallback so existing saved settings still load
- Updated rename/delete/reset flows to handle both new and legacy key aliases safely
- Restored corrupted buildOpdLetterPrintData method that broke class structure

This fixes the 'Unable to save OPD paper print settings' error when saving new templates
2026-03-31 06:55:06 +05:30
874d5ffba6 feat: add granular template permissions for role-based template access
- add new permissions:
  template.opd_print, template.pathology_print, template.diagnosis_print,
  template.document_print, template.ipd_document
- Template controller now accepts new permission keys (with backward-compatible fallbacks)
- IPD Document Master now has independent permission key (template.ipd_document)
- Template index tile visibility updated to use new granular keys
- OPD print template builder now honors template.opd_print permission
- preserve existing behavior via legacy permission fallbacks to avoid role breakage
2026-03-31 06:35:36 +05:30
f7b9a51c47 fix: sanitize noisy OCR output for OPD scan AI results
- add sanitizeExtractedScanText() to clean OCR text before analysis/storage
- strip non-ASCII/control noise that appears as mixed-script junk characters
- remove repeated junk tokens (e.g. ffffff, repeated words)
- add ECG-specific OCR normalization (KECG->ECG, Uniconfirmed->Unconfirmed, avt->aVL, VT->V1)
- apply sanitization to both OCR sources (document intelligence and vision fallback)
- keep fallback behavior when sanitization returns empty
2026-03-31 05:12:56 +05:30
cf299de505 feat: add Delete button to Rx-Group list
- new rx_group_delete(int rxId) method in Opd_prescription controller
- deletes linked medicines first (opd_prescrption_prescribed_template), then group row
- POST route: Opd_prescription/rx_group_delete/(:num)
- Delete button (red) added to each row in Rx-Group list table
- confirm dialog before delete (shows group name)
- reloads list after delete; clears form if deleted group was loaded
2026-03-31 04:28:18 +05:30
ad24857720 feat: align consult Rx medicine controls with Rx-Group Add/Edit masters
- consult form medicine Dose/When/Freq changed to dropdowns from dose masters
- added Where dropdown in consult medicine editor and table display
- consult now loads options from Opd_prescription/rx_group_dose_masters
- medicine add/update payload now includes dosage_where
- medicine list now returns dosage_where_label for readable table output
- edit mode supports existing values not present in current master set
- quick chips now map into select options (with safe fallback)
2026-03-31 03:31:26 +05:30