Commit Graph

134 Commits

Author SHA1 Message Date
7f131aeae8 Add OPD doctor/date update endpoint and invoice validation feedback 2026-04-09 19:47:57 +05:30
b4ae081d28 Add refer doctor filter to diagnosis report 2026-04-09 19:11:39 +05:30
aa2e092758 Add OPD Total Report with doctor/type/fee filters 2026-04-09 18:44:35 +05:30
7275d13500 Add OPD keyword manager and caret-aligned autocomplete 2026-04-09 06:25:03 +05:30
418fb3e5e7 Add cached consult autotype suggestions and doctor/master keyword save 2026-04-09 06:07:46 +05:30
b1d329e462 Port legacy OPD autotype suggestions for complaints, provisional diagnosis, and findings 2026-04-09 06:00:29 +05:30
e087b26fc6 Do not render default footer when document print template footer is blank 2026-04-09 04:45:02 +05:30
9fcb7c9ee1 Apply placeholder resolver to general document body in create_final and normalize escaped newlines 2026-04-09 04:32:44 +05:30
90ac310cf0 Port CI3 vitals chart and treatment chart forms to CI4 IPD form print (form_no 6 and 7) 2026-04-09 04:26:09 +05:30
5299a9d7c2 Resolve {{H_Name}} and other placeholders in document print custom header/footer HTML 2026-04-09 04:04:38 +05:30
5f35d22f86 Fix medicine search cache key format 2026-04-08 20:06:08 +05:30
2795e6255c Add medicine search DB indexes and prefix query optimization 2026-04-08 19:49:51 +05:30
fad0d89260 Speed up medicine autocomplete with cache and 10-row limit 2026-04-08 19:47:38 +05:30
935d6edd0b Keep IPD charges visible when optional tab queries fail 2026-04-08 11:52:27 +05:30
cbe861ad53 Guard IPD tab panel-data load to prevent remote ipd-charges 500 2026-04-08 11:48:48 +05:30
d003c67b1e Harden IPD charges tab render to avoid Whoops on remote 2026-04-08 11:45:25 +05:30
2977192017 Make IPD forms dynamic and stop stale OPD refresh polling 2026-04-08 11:41:33 +05:30
8bc9158e14 fix: support legacy doc_format schema in doctor document workspace
- Make docedit_load/doc_input_list/create_doc flows tolerant when doc_format_sub.active is missing\n- Guard master/sub insert/update payloads by existing DB columns to avoid SQL 500 on old dumps\n- Avoid hard dependency on created_at/updated_at/default_print_type print margin columns\n- Keep behavior unchanged on upgraded schemas while restoring compatibility with legacy production data
2026-04-08 10:10:05 +05:30
1a2dbf5366 feat: upgrade IPD Document Master to OPD-style print builder
- Add paper print settings to IPD templates (page size/custom size/margins)\n- Add Header HTML, Footer HTML, and Style (CSS) support\n- Update IPD PDF renderer to honor template paper settings and header/footer\n- Extend IPD placeholders with logo/QR support: {{H_logo}}, {{H_logo_abs}}, {{hospital_logo_html}}, {{qr_content}}, {{qr_code_html}}\n- Improve token rendering with robust curly placeholder parser for body/header/footer\n- Keep legacy sticker forms aligned with custom label dimensions and migrate old default rows
2026-04-08 07:56:43 +05:30
bca95f14e6 fix: {{medical}} prints Generic Name instead of Substitute in OPD consult print
Root cause: the fallback lookup from opd_med_master used
  $labelField = $masterSaltField ?? $masterGenericField
which preferred salt_name (the Substitute / other brand names field) over
genericname (the actual Generic Name / composition). If a prescription row's
inline genericname was empty, the Substitute string was written into it and
then printed as \"Salt/Generic\" in the {{medical}} block.

Fixes applied in three places:
1. Opd.php buildOpdLetterPrintData - master lookup now prefers genericname
2. Opd.php buildOpdLetterPrintData second loop - removed inline salt_name
   fallback that overwrote genericname with Substitute value
3. Opd.php buildLegacyDashboardTemplateVars - removed salt_name from the
   generic resolution chain used when rendering the medicine table HTML
4. Opd_prescription.php medicine list function - same preferGenericname fix
   and removed inline salt_name -> genericname overwrite"
2026-04-07 11:34:57 +05:30
2958f2e9b6 fix: queue no per-doctor-per-day isolation and stop auto-refresh on digest poll
- Queue No (Opd.php::autoCreateOpdQueue, Opd_prescription.php::opd_prescription_save
  and ::ensurePrescriptionSession): changed MAX(queue_no) query to JOIN through
  opd_master.doc_id instead of trusting opd_prescription.doc_id, ensuring queue
  numbering is strictly per-doctor per-day regardless of stale doc_id values in
  opd_prescription rows.

- OPD appointment list: replaced auto-reload-on-digest-change with a manual
  'Refresh' button. When the 8s digest poll detects new data the button turns
  yellow with a 'New' badge; the page only reloads when the user explicitly clicks
  it, preventing disruptive mid-session reloads."
2026-04-07 11:23:20 +05:30
16f3c95053 Fix OPD template builder sync and formulation formatting 2026-04-07 03:55:53 +05:30
19db43762d Enhance OPD and patient workflows with live updates and UX improvements 2026-04-07 03:27:39 +05:30
67664ab8ff fix: move confirmed opd appointments into waiting 2026-04-06 13:11:46 +05:30
ca4b4195aa fix: keep new OPD appointments in booked list 2026-04-06 12:51:11 +05:30
b03eb0064a fix: show booked queue actions in waiting list 2026-04-06 12:47:00 +05:30
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