medOS Revenue
Universal Facility-Stay Billing
One engine, every country's stay rules
Per-department stay logs all write to one ledger; a dynamic country rule engine expresses rounding modes, grace periods, day caps, surcharges and package replacements as data rows. Adding a country is a seed file, zero TypeScript.
facility_billing_rule — JSONB scope/predicate/action/priority · rules are data rows
- 30-min grace period
- 30-min block rounding
- off-hours +20%
142 min − 30 grace = 112
112 → 4 blocks × ฿465
= ฿1,860
- package replaces lines
- 45-day room cap
3 lines ₱41,300
→ Z-package SKU
= ₱38,000 (replaces)
- units × regional yen multiplier
- monthly co-pay cap
584 units × ¥10.42
= ¥6,085 · co-pay 10%
cap ¥44,400 / month
same engine, different rule rows — adding a country = seed files, zero TypeScript
Capabilities
ER, IPD, OR and LR stay logs → one billable_ledger
facility_billing_rule: JSONB scope/predicate/action/priority rows
Thailand: 30-min grace, 30-min block rounding, off-hours surcharge
Philippines: PhilHealth Z-Benefit package replaces individual lines, 45-day cap
Japan: Kaigo per-unit × regional yen-multiplier, monthly co-pay cap