medOS ultra

Publication

Universal Facility-Stay Billing Engine (technical brief) — one rule engine for every country's stay billing

2026-05-15PublicationBilling

A technical brief on the rule engine that expresses rounding modes, grace periods, day caps, surcharges, and package replacements as per-country data rows.

This technical brief details the universal facility-stay billing engine that bills ER, IPD, OR, and LR stays from one set of rules.

It specifies the JSONB scope/predicate/action/priority schema — the same shape as the policy-gate engine — and a safe token grammar for expressing rounding modes, grace periods, day caps, surcharges, and scheme overrides.

Worked examples cover Thailand, the Philippines, and Japan, each implemented as different rule rows against the same engine.

Ask Anything