Commit Graph

24 Commits

Author SHA1 Message Date
5717763496 Add user-based sidebar auto-hide setting, movable from hospital default
- Create user_settings table to store individual user preferences
- UserSettings model for get/set/delete user setting values
- Home::myProfile loads user settings with hospital defaults fallback
- Home::myProfileSave persists user settings to DB
- my_profile.php adds Sidebar Auto-Hide Delay field (0-60 seconds)
- welcome_message.php checks user settings first, then hospital default
- Setting value 0 = auto-hide disabled; blank = use hospital default
- Extensible table design for future user settings (color theme, etc)
2026-04-28 13:47:46 +05:30
baba5521dd Fix dashboard and OPD counts for DATETIME appointment_date 2026-04-28 11:23:06 +05:30
d02244444e finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
eb13872f43 Finance bank audit: settlement tab/filter refinements, bank-only selection, and summary metrics 2026-04-21 19:06:16 +05:30
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
3cef35c832 Make OPD medicine duplicate detection strength-aware 2026-04-13 12:34:54 +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
21ddeefe40 fix: Running OPD zero-value validity, update_doc_field HTTP 500, PDF Unicode font (Devanagari)
- Opd.php showfee(): exclude zero-amount OPD from validity window query
- Opd.php confirm_opd(): anchor last_opdvisit_date to most recent paid OPD for zero-value running
- Opd.php buildOpdLetterPrintData(): use paid OPD start date for expiry on zero-value entries
- OpdModel.php insertOpd(): exclude fee_type=3/zero-amount from running_opd_id lookup; anchor visit count to paid OPD start when isZeroValueRunning
- DoctorDocument.php update_doc_field(): wrap in try/catch, schema-safe payload via filterPayloadByExistingColumns, structured JSON errors
- DoctorDocument.php create_final(): configure mPDF with FreeSans/FreeSerif (GNU FreeFont), useOTL=0xFF, autoScriptToLang=true for Devanagari/Hindi rendering
- doc_letterhead_print.php: add body/p/td/th font-family freesans for PDF Unicode output
2026-04-10 12:30:15 +05:30
a02340b90c IPD cash balance: fix ONLY_FULL_GROUP_BY on report query 2026-04-03 14:07:54 +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
d8f75b3a29 feat(stock): add modular hospital stock management with dashboard, masters, indents, purchase and reports 2026-04-02 10:28:38 +05:30
7df04b9ff2 OPD medicine: fuzzy duplicate detection for dosage variants (8MG/8 MG/8) 2026-04-01 17:52:49 +05:30
fe1156b68a Fix billing invoice balance/payment flow and deduction UI 2026-04-01 07:23:29 +05:30
911e7b50a7 Add Ayushman package import, billing claim sheet, and reporting dashboards 2026-03-26 15:42:40 +05:30
99ec71677a Restore legacy HMS flows and add IPD document master templates 2026-03-24 04:24:19 +05:30
38093da3b9 Implement IPD admission/discharge editing, bill PDF modes, and invoice list view action 2026-03-21 15:47:18 +05:30
addef91468 Fix legacy billing prints and pathology template compatibility 2026-03-21 02:23:31 +05:30
d94797a433 Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
aa845ac5ff Add report panel updates and related billing/discharge enhancements 2026-03-10 02:43:35 +05:30
2127063c7f Add nursing scan-to-structured workflow and discharge UI polish 2026-03-09 00:12:04 +05:30
614713f76b Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30