Skip to content Skip to footer

Charge Events Belong to Encounters, Not Cron

Charge Events Belong to Encounters, Not Cron — Photo: Pexels

Custom healthcare platforms often treat charges as a finance microservice with writable Patient tables. Six months post-go-live, engineers run SQL to match invoices to encounters. The fix is not another export — it is making the encounter the aggregate root for revenue events.

Charges are projections, not imports

Persist ChargeItemCreated events when procedures complete, consumables apply, lab panels validate. Materialize Invoice documents for patients; emit Claim payloads at the remittance edge. HL7 FT1 and ASTM adapters publish inward; they do not own truth.

FHIR Invoice models hospital-side bills from ChargeItems — keep Claim contexts separate in code.

Anti-patterns we delete in discovery

  • Finance service minting parallel patient IDs
  • Cron billing “unmatched results” without encounter context
  • ClaimResponse handlers patching clinical rows
  • Spreadsheet tariff imports in production config

Strangler migrations behind flags beat Monday-morning big-bang cutovers.

Platform review checklist

Single UUID per human per tenant. Encounter timeline replayable without cross-database joins. ASTM duplicate delivery safe. Finance exports traceable to encounter UUID for accountants.

Promed HIS reference architecture for readers: billing on the patient timeline; custom delivery context: practice management platform.

Ask Competitor B whether “FHIR-ready” means read-only facades — or second writers your clinicians will learn to distrust.

Encounter spine first; ledger at the perimeter.

Leave a Comment