Domain specifications / D05-FIN / 14. Technical and Architectural Constraints
14. Technical and Architectural Constraints¶
14.1 Architectural Alignment¶
The domain is realised by two bounded contexts named in REF-003 section 4.2: Revenue Cycle (charges, tariffs, billing accounts, claims, payments, adjustments and payer status) and Inventory & Procurement (stock lots, locations, replenishment, purchase requests and orders, issue and return). MOD-FIN-001 to MOD-FIN-007 belong to the first, MOD-FIN-008 to MOD-FIN-010 to the second, and MOD-FIN-011 spans both. REF-004 lists the corresponding services (charge service, invoice service, claim adapter, payment service, finance connector; inventory service, procurement adapter, stock ledger).
Alignment points:
- Each context owns its data and schema; other services use published APIs and events, never direct database reads (REF-003 section 4.3).
- Financial postings and stock movements use append-only persistence with correction by reversal (REF-003 section 6.1; PRS section 7.2 and the "financial ledger" in the persistence plane of PRS section 8.1).
- Cross-domain state propagation is by durable, versioned, idempotently consumed events with transactional outbox and inbox; billing is a secondary consumer that must not block bedside transactions (INF-004).
- Long-running cross-domain processes (claim to remittance, requisition to receipt) are explicit process managers with idempotent, observable, compensatable steps.
- A modular-monolith implementation of the modules within each context is acceptable where it reduces operational complexity, provided internal boundaries and an extraction path are documented (REF-003 section 4.3).
- External exchange is through Domain 2 adapters; the internal model is not the exchange format, and FHIR is a facade (PRS section 7.4).
- Analytics consume governed events and extracts; no analytical workload runs on FIN transactional stores (ANA-003).
14.2 Logical Components¶
| Component ID | Component | Responsibility | Interfaces |
|---|---|---|---|
| CMP-FIN-001 | Charge capture service | Consume chargeable events; create charge items; automatic reversals | IF-FIN-001, IF-FIN-002; EVT-FIN-001 |
| CMP-FIN-002 | Tariff and pricing engine | Charge master, tariff versions, pricing rules, simulation, recomputation | IF-FIN-002; EVT-FIN-009 |
| CMP-FIN-003 | Account and invoice service | Account ledger, invoices, credit notes, reversals and adjustments, statement read model | IF-FIN-006; EVT-FIN-002, EVT-FIN-010 |
| CMP-FIN-004 | Claims service | Claim assembly, validation, lifecycle, denial queues, remittance reconciliation | IF-FIN-004, IF-FIN-005; EVT-FIN-003, EVT-FIN-004 |
| CMP-FIN-005 | Coverage and eligibility service | Coverage layers, eligibility checks, authorizations | IF-FIN-003; EVT-FIN-011 |
| CMP-FIN-006 | Payment service | Payments, receipts, allocations, refunds, cashier sessions | EVT-FIN-005, EVT-FIN-012 |
| CMP-FIN-007 | Finance connector | Posting batches, mappings, acknowledgements, posting reconciliation | IF-FIN-007; EVT-FIN-013 |
| CMP-FIN-008 | Financial FHIR facade mapping | Mapping of FIN records to FHIR financial resources | IF-FIN-008 |
| CMP-FIN-009 | Inventory service and stock ledger | Item master, locations, lots, movements, balances, stocktake, pharmacy stock reconciliation | IF-FIN-009, IF-FIN-010; EVT-FIN-006, EVT-FIN-007, EVT-FIN-014 |
| CMP-FIN-010 | Procurement service and adapter | Requisitions, purchase orders, goods receipt, procurement exchange | IF-FIN-011; EVT-FIN-015 |
| CMP-FIN-011 | Replenishment and availability service | Reorder evaluation, proposals, availability read model | IF-FIN-009; EVT-FIN-008 |
| CMP-FIN-012 | Exception and reconciliation service | Exception items, queues, reconciliation runs, downtime reconciliation | EVT-FIN-016 |
| CMP-FIN-013 | Payer adapters (hosted on Domain 2 integration layer) | Canonical-to-payer format mapping for eligibility, authorization, claims and remittance | IF-FIN-003, IF-FIN-004 |
14.3 Deployment Considerations¶
- Deployment model. On-premises, private-cloud or hybrid hosting under hospital control, as for the platform (PRS section 8.4). No FIN function may require a third-party cloud control plane or a commercial HIS, ERP or payer product at runtime (DEP-001).
- Runtime dependencies. Event backbone, API gateway, integration layer and observability (Domain 2); identity, authorization, audit, workflow, notification, master data and terminology (Domain 10); patient and encounter services (Domain 1). FIN services degrade to queued or pending states when partner systems are unavailable.
- Infrastructure requirements. Transactional stores with strong referential integrity and point-in-time recovery for the two contexts; append-only ledger storage; durable inbox and outbox. Sizing follows the capacity model (NFR-017).
- High availability. Tier 2 services are deployed resiliently with queue-based degradation and defined recovery (PRS section 12.1). They are isolated by bulkheads and resource quotas so that they cannot exhaust Tier 1 capacity, and so that their failure does not propagate upstream.
- Disaster recovery. Replicated data and tested runbooks to the RTO and RPO of the tier (NFR-FIN-010); ledgers are included in immutable or offline backup copies (BCP-004); recovery is followed by the reconciliations in section 8.6.
- Environment separation. Production, disaster recovery, pre-production, development/integration and training environments are isolated; non-production environments use synthetic or masked financial and patient data; payer and finance interfaces in non-production environments point to test endpoints only.
- Upgrade and rollback. Rolling or controlled releases with database migration, event schema compatibility and rollback or forward-fix plans (NFR-016, SDLC-006). Because ledgers are append-only, rollback of a release must not remove posted entries; forward-fix with correcting entries is the rule for data.
14.4 Technology and Dependency Policy¶
The sources name no mandatory technology for this domain. Every implementation choice is subject to the PRS dependency policy (section 3). The table lists the external dependencies the domain's requirements imply.
| Dependency | Purpose | Mandatory / Optional | Maintenance Status | Licensing | Exit Strategy |
|---|---|---|---|---|---|
| Hospital finance / ERP system (external, hospital-retained) | General ledger and accounts payable | Optional integration (FIN-006, Should); FIN operates without it | To be assessed when the system is identified | Hospital's own contract | Documented open posting format allows replacement of the finance system without change to the core |
| External procurement system | Purchasing, where not done in the HIS | Optional | To be assessed | Hospital's own contract | Internal requisition, order and receipt functions remain available |
| Payer endpoints | Eligibility, authorization, claims, remittance | First release: private payers through staff workqueues and portals; BPJS Kesehatan in a later release (DEC-FIN-003) | Per payer | Per payer agreement | Adapter per payer; manual and document-output path |
| ANSI X12 transaction sets | Payer exchange | Not used in the Indonesia deployment (DEC-FIN-003) | – | – | Would be confined to an adapter if a future deployment needs it |
| HL7 FHIR financial resources | API exposure | Optional (RCM-012, Should) | Standard; FHIR R4 (4.0.1), hospital profiles derived from R4 core (DEC-ISE-004) | Open specification | Facade mapping is replaceable; internal model independent |
| HL7 v2 DFT / BAR | Partner billing exchange | Optional | Standard | Open specification | Confined to an adapter |
| GS1 identifiers and DataMatrix parsing | Lot and expiry capture | Mandatory where available and required (ANC-008) | Standard; any parsing library subject to dependency review | GS1 standards are free to implement; GTINs are allocated by the supplier under its GS1 Indonesia company prefix, so the hospital needs no GS1 licence to read them. Parsing library under an open-source licence that passes the dependency policy (for example ZXing, Apache 2.0) | Manual entry path; parser is replaceable |
| ICD-10 / ICD-11, CPT/HCPCS or local equivalents | Classification codes on claims | Indonesia: ICD-10 for diagnoses and ICD-9-CM for procedures, 2010 editions with the Indonesian modification, as INA-CBG requires; ICD-11, CPT and HCPCS not used | Governed by Domain 10 terminology service | Free for this deployment: ICD-10 through WHO and the Kemenkes national edition, ICD-9-CM public domain (COMP-ESS-005, DEC-ESS-012) | Codes are consumed by reference with version; code systems replaceable by configuration |
| Payment channel providers: bank card terminal, QRIS, bank transfer and virtual account | Electronic payment | Required for the first release (DEC-FIN-008); acquiring bank and payment provider selected by the CFO | To be assessed | To be assessed | Adapter; cash and manual methods remain |
| Database engine, message broker and other infrastructure components | Persistence and messaging | Implementation choice, not a product requirement | Must pass dependency policy (DEP-003, DEP-004) | Must pass legal review | Replaceable; documented export (DEP-005) |
← 13. Configuration and Administration Requirements | Contents | Identifier index | 15. Testing and Verification Requirements →