Commit Graph

260 Commits

Author SHA1 Message Date
fbbecee3b4 feat(ipd-charges): group delete, sort order, Up/Down buttons, foldable billing panels
- Safe delete for empty IPD charge groups with CSRF-safe AJAX
- Migration: add sort_order to ipd_item_type (backfilled)
- Sort order UI on create/edit/list views; persist in controller/model
- Up/Down swap buttons on group list (AJAX swap endpoint + CSRF refresh)
- Fix 500 on edit screen: restore missing getItemTypeById() in ItemIpdModel
- IpdBillingModel: propagate sort_order ordering to ipd-charges and bill-details tabs
- Billing IPD Charges tab: Bedside Clinical/Nursing Charge and Doctor Visit Charge panels now collapsible, start collapsed
2026-04-18 06:56:38 +05:30
058debb593 Respect formulation in duplicate medicine report groups 2026-04-17 09:53:02 +05:30
07916f3baf Allow same medicine name with different formulation in OPD save 2026-04-17 09:48:30 +05:30
b98b1e6f4a Fix predefined advice +Add firing twice due to duplicate document event binding 2026-04-17 05:22:45 +05:30
7612d738aa Make OPD scan list delete self-contained AJAX with inline CSRF sync 2026-04-17 04:50:40 +05:30
4d46ad1492 Fix scan list delete button blocked by carousel overlay on single-image view 2026-04-17 04:48:13 +05:30
f7c419c25e Harden OPD scan delete link fallback when modal CSRF helpers are unavailable 2026-04-17 04:45:35 +05:30
1cea1495fc Fix OPD scan delete button for direct file-list page and AJAX modal 2026-04-17 04:41:45 +05:30
a0b724e30d Fix serve_legacy_upload to also check public/uploads/ (FCPATH) 2026-04-17 04:20:49 +05:30
58ddd77d42 Add fallback route to serve legacy CI3 uploads from project-root uploads/ 2026-04-17 04:16:08 +05:30
11fe14089d Stop auto-filling prescription remarks from structured allergy fields 2026-04-17 03:50:01 +05:30
ec872c984c Strengthen OPD autocomplete normalization for spacing and punctuation variants 2026-04-17 03:41:01 +05:30
47423a7d38 Normalize OPD autocomplete suggestions and add one-time cleanup command 2026-04-17 03:31:33 +05:30
56a0fb83a4 Fix consult examination autocomplete selection behavior 2026-04-17 03:21:34 +05:30
1084ef8875 Fix: {{advice}} prints as-is (no Hindi/AI conversion); fix Schema Diff truncation 2026-04-16 12:31:42 +05:30
5ce3461a0c Update master DB schema snapshot 2026-04-15 09:55:13 +05:30
68288622a0 Update master schema/seed snapshots and Medical backpanel changes 2026-04-15 08:39:47 +05:30
c9daddddf3 Fix: Cast port to int and DBDebug to boolean from env() 2026-04-15 08:28:28 +05:30
48ee8b4156 Fix: Load database credentials in constructor to avoid constant expression errors 2026-04-15 08:22:39 +05:30
52556e9f9c Move database credentials to .env for security best practices 2026-04-15 08:19:40 +05:30
a0cfbfb5e0 Add CLI filesystem setup script 2026-04-15 06:25:12 +05:30
85ce007b26 Rename investigation toggle to Custom Investigation 2026-04-14 22:03:16 +05:30
287b0eb603 Adjust investigation toolbar buttons 2026-04-14 21:57:04 +05:30
aae6211f48 Add investigation shortcuts manager panel 2026-04-14 21:51:49 +05:30
57397d80e1 Fix OPD print remarks leaking NABH allergy lines 2026-04-14 08:34:46 +05:30
5801b5d276 Refine {{medical}} table widths and instruction row styling 2026-04-14 07:50:50 +05:30
b97bb74a5d Reformat {{medical}} rows with wide instruction line 2026-04-14 07:43:07 +05:30
0b2ae6ccc1 Broaden consult search candidates for phonetic medicine matches 2026-04-13 13:04:01 +05:30
992fd83ff2 Normalize separator variants in consult medicine SQL search 2026-04-13 12:57:16 +05:30
9e30d69487 Add phonetic matching for consult medicine search 2026-04-13 12:54:33 +05:30
05ff049526 Improve consult medicine search normalization and duplicate blocking 2026-04-13 12:46:42 +05:30
3cef35c832 Make OPD medicine duplicate detection strength-aware 2026-04-13 12:34:54 +05:30
779dbcbaa1 Show formulation with medicine name in OPD medicine list 2026-04-13 12:28:01 +05:30
93fe7741fa Show medicine formulation in OPD medicine autotext suggestions 2026-04-13 12:22:42 +05:30
f99f48b62f fix: restrict scan delete to 24h or same date 2026-04-11 04:49:59 +05:30
7233f5979e feat: auto visit-done on scan save and add scan delete actions 2026-04-11 04:45:45 +05:30
f748224cd0 fix: count OPD visits up to printed opd date 2026-04-10 21:30:47 +05:30
920f1033c0 fix: compute print total_no_visit from opd_master records 2026-04-10 21:28:15 +05:30
b50d72207e refactor: set number input step to 1 across views 2026-04-10 21:16:25 +05:30
d16a363a92 fix: recalculate IPD billing on panel open, bill-details, and print 2026-04-10 21:11:24 +05:30
9297849c8a fix: correct IPD balance display when computed balance is zero 2026-04-10 21:07:01 +05:30
6782aee1a4 fix: use computed item totals for IPD gross/net in bill views 2026-04-10 21:03:17 +05:30
a850e3229a fix: close lingering complaint autocomplete suggestions in consult form 2026-04-10 18:36:26 +05:30
2c3552ac07 fix: include medicine qty in {{medical}} consult print placeholder 2026-04-10 14:27:35 +05:30
54d0afaf95 fix: default OPD appointment filter to Waiting on load and refresh 2026-04-10 14:14:14 +05:30
5ed2bd13ae fix: include opd continuation template field in doctor template mappings 2026-04-10 13:42:23 +05:30
e1968e4b1d db: Add opd_cont_paper_print column to doctor_master table 2026-04-10 13:28:03 +05:30
385183fbe2 feat: Add Print Cont. Paper template selection to Doctor Master 2026-04-10 13:19:47 +05:30
910f46b06c feat: add Doctor Master OPD validity editing with hospital fallback
- Add OPD Validity (Days) field in Doctor add/edit forms\n- Save/update doctor_master.opd_valid_no_days from Doctor module\n- Use hospital_setting fallback keys when doctor validity is blank/zero\n- Apply fallback consistently in OPD showfee, print expiry, and running_opd lookup window\n- Supports hospital-wide defaults while preserving doctor-specific overrides
2026-04-10 12:58:17 +05:30
eec0642466 fix: OPD running validity period no longer extends per running visit
OpdModel.php:
- running_opd_id lookup now uses doctor's configured opd_valid_no_days
  instead of hardcoded 4 days (resolveRunningLookupDate helper)
- Doctors with validity > 5 days now correctly link running OPD back
  to the original paid OPD even on days 5..N of the window

Opd.php (buildOpdLetterPrintData):
- For running OPD entries (running_opd=1 or opd_fee_type=3), expiry
  display now shows "OPD Start Date: [paid visit] | Valid Upto: [paid
  visit + validity]" using old_opd record — mirrors Opd_print_1 legacy
  behavior and prevents validity window from advancing with each visit
2026-04-10 12:48:28 +05:30