← Back to projects
Case study · Nexus suite · Finance

Accounting
& Finance

A hospital-specific ERP finance module. Every clinical and operational money flow posts itself to a double-entry ledger, and each business unit (hospital, laboratory, radiology and pharmacy) keeps its own books in one database.

Role
Solution architect & lead engineer
Client
Private hospital, Kurdistan Region of Iraq
Part of
Nexus suite, fed by HMS, LIS, RIS & HR
Status
Going live, revenue areas first
Stack
Go · PostgreSQL · Lit

01 at a glance

02 what it covers

General ledger

double-entry core

  • Chart of accounts organised as a tree and kept per currency.
  • Journal entries that can only be posted when debits equal credits.
  • Period close and reopen, bank accounts and reconciliation, petty cash, budgets with variance, cost centres, tax codes, document numbering and an approval matrix.
  • Automatic posting from 12 flows: bills, payments by method, lab checkout, POS sales and voids, locker consumption and disposal, purchase invoices and payments, payroll accrual and payment, and cost of goods sold at the cost of the batches actually used.
  • Posting never blocks care: if account setup is missing, the gap is logged and the clinical action still goes through.

Pricing engine

tested in eight phases

  • Lookup order: the insurer's price list, then the Cash list, then "not found". Nothing is ever charged at a silent zero.
  • Variants by patient type, time band, priority and doctor.
  • Surcharges for nights, weekends and holidays; unit-of-measure price grids; surgery component pricing.
  • Packages with atomically reserved caps.
  • Price history is kept, so a past bill always reprices at the rate in force at the time.

Revenue cycle & insurance

cash control

  • A hospital cashier and 5 department cashiers built from one shared component.
  • Cash shifts with a Z-report, expected-vs-counted variance and denomination breakdown.
  • Payments capped at the balance due; credit notes kept separate from refunds; write-offs require a reason; itemised patient statements.
  • Insurance coverage rules by insurer and plan (co-pay, coverage %, limits, prior-authorisation gating), with the insurer's share as its own bill line.
  • Claims, appeals, EOB adjudication and eligibility checks.

Reporting & regional models

fitted to the market

  • Statements: balance sheet, cash flow, P&L, AR/AP aging.
  • Department contribution margin and full cost (salaries, depreciation, apportioned overhead), with each figure stating how much of the data it covers.
  • Group consolidation across 6 reports: revenue, P&L, receivables, payables, department revenue, cash shifts.
  • Regional models: doctor clinic rent (fixed / percentage / referral-based), doctor revenue shares, department revenue splits, and investor revenue share with a drag-and-drop periodic scheduler.
  • Inter-lab settlements with partner labs.

Supply chain & assets

procure to depreciate

  • Vendors and quotation comparison; purchase orders with checked approval steps.
  • Goods receipts with rejected quantities, supplier returns and credit notes, supplier ledger and aging, consignment stock.
  • One stock ledger for every movement, with earliest-expiry-first lot consumption, and department stock lockers with approval.
  • Fixed assets with a month-end depreciation run that can be safely repeated.

03 results

Roadmap

— the nexus suite