Finance
Hub & ERP
Campus-scoped operations under /dashboard/finance: AR/cash visibility, journals, budgets, expense claims, day-close, payables, and doctor-share payouts. Invoice pay/refund mutations stay in Billing.
Purpose
Give finance officers a Working-in campus ledger view of receivables, collections, cash close, ERP posting (COA/journals/budgets/claims), supplier AP, and doctor-share settlement — without conflating clinical Branch geography with HR OrgUnit.
Who uses it
- → Finance officers / CFO delegates
- → Billing supervisors (read companions on AR/cash tabs)
- → Cashier leads (day-close / cashier shift)
- → Procurement (supplier payables); share settlement clerks
How Finance Relates to Billing
Observe Campus Cash & AR
Overview KPIs, Receivables aging, Collections, Advances/Refunds mirrors, Revenue-by-source, Payer mix, AR SLA, Claims queue.
Close the Day / Shift
Cash summary + variance → Day close snapshot → optional Cashier shift with declared cash. Reopen mis-closed packets with audited reason.
ERP: Journals, Budgets, Claims
Maintain COA; post/reverse journals; budget draft→approve→freeze; expense claims with optional budget lines and media receipts.
Payables & Doctor Share
Pay GRN supplier AP; settle doctor share (single Pay or Settle batch ≤25) with optional soft AI narrative; void / sync accruals with edit geo.
Major Sidebar Areas
Journals & COA
Campus chart of accounts and balanced journal entries (manual + system sourceType).
External accounting needs a posted ledger, not only invoice screens.
finance:journals:view|create|reverse; reverse posts an offsetting entry with reason.
Budgets & Utilization
Budget plans (draft→submit→approve→active/freeze) and utilization dashboards.
PO and expense commits must stay inside fiscal envelopes.
finance:budget:*; inventory PO approve may call budgets/check.
Expense Claims
Staff expense claims with categories, budget lines, receipt uploads, approvals, pay.
Operational spend outside payroll needs controlled reimbursement.
finance:expenses:* workflow; distinct from Payroll cost read tab under Expenses nav.
Day Close & Cashier Shift
Persisted daily cash packets and per-cashier declared counts with reopen.
End-of-day control and variance investigation.
Create geography for close/reopen; history endpoints; payroll outflows included in draft.
Supplier Payables
Open AP from posted GRN; record payment; optional budget consumption + GL.
Procurement liabilities must clear into cash and ledger.
finance:payables:view|pay; Working-in campus lists.
Doctor Share & Payouts
Accrual ledger, payouts, Settle batch wizard, void, share-basis reconciliation.
Clinician revenue share settles independently of patient collections UI.
finance:doctor-share:view|pay|void; cash shareBase* math; MFA step-up on batch when enrolled.
Insights & Exports
AI briefing/anomalies, duplicate payments, refund leakage, watchlist, CSV/Xero-style exports.
Controls and external systems need extracts without inventing new RBAC for each detector.
finance:ai:* / section view grants; finance:exports alone does not open the hub.
Technical Architecture
| Field | Type | Institutional Role |
|---|---|---|
| branchId | UUID | Clinical campus stamp from Working-in. |
| sourceType | Enum/String | Journal origin (manual vs auto-posting). |
| status | Enum | Day-close/cashier: closed|reopened; budgets: draft→active/frozen. |
| shareAccrued | Decimal | Doctor-share accrual balance (cash share base). |
Note: Sensitive fields use AES-256 field-level encryption where applicable.
Governance & Power
finance:viewfinance:journals:viewfinance:budget:viewfinance:day-close:viewfinance:payables:viewfinance:doctor-share:viewfinance:doctor-share:payfinance:manageBilling settles
Cashier pays / refunds / advances in Billing module.
Finance observes
AR, collections, cash summary update for Working-in.
Close & ERP
Day-close + journals/budgets/payables as required.
Share payout
Settle doctor share with create geo; void with edit geo.