Domain specifications / D05-FIN / 15. Testing and Verification Requirements
15. Testing and Verification Requirements¶
15.1 Verification Strategy¶
Verification follows the PRS test strategy (section 17.1), applied as follows.
- Unit testing. Pricing calculations, rule evaluation order, liability split, tax and rounding, balance derivation, state transitions, validation rules, idempotency handling and permission checks.
- Component testing. Each service with its store: ledger immutability, reversal and adjustment, lot status logic, reorder evaluation, reconciliation calculations.
- Integration testing. Event consumption from Domains 1, 3 and 4 with retries, duplicates and out-of-order delivery; payer adapters with ACK/NACK, timeout and replay; finance and procurement interfaces; Domain 6 coding contract; Domain 7 statement read model. Contract tests for every published API and event.
- End-to-end workflow testing. Registration with eligibility, care with chargeable events, discharge, invoice, payment, claim, remittance and finance posting; requisition to receipt to dispense to charge; revenue lifecycle is part of the system test scope in PRS section 17.1.
- Performance testing. Peak cashier and billing concurrency; bursts of chargeable and stock events; batch invoice, eligibility and posting runs; demonstration that FIN load does not degrade clinical services.
- Security testing. Access policy tests by role and context; segregation-of-duties negative tests; attempts to alter posted entries; audit completeness; disclosure minimization on payer and finance interfaces; penetration testing as part of the platform assessment.
- Usability testing. Task-based tests of cashier, billing, claims and stores workflows with representative users; accessibility paths.
- User acceptance testing. Scenario-based acceptance by finance, revenue cycle, cashiering, stores, pharmacy stores and procurement, including financial reconciliation, which is the exit criterion of the revenue phase in PRS section 16.1.
- Operational readiness testing. Monitoring and alerts, backup and restore of ledgers, outage and recovery with reconciliation, downtime exercise for cashiering, stores and pharmacy stores, runbooks and support escalation.
- Migration testing. Trial migrations with counts, checksums, financial totals and stock totals (PRS section 17.1, migration / reconciliation).
Test evidence is retained as required by PRS section 17.3, using synthetic or de-identified data.
15.2 Test Scenario Catalogue¶
| Test ID | Requirement ID | Scenario | Test Type | Expected Result |
|---|---|---|---|---|
| TEST-FIN-001 | FR-FIN-CHG-001 | Chargeable medication, procedure, laboratory and accommodation events for an open encounter | Functional / Integration | One traceable charge per chargeable service; ChargeCaptured published |
| TEST-FIN-002 | FR-FIN-CHG-001 | FIN domain stopped while the clinical scenario pack runs; then restarted | Resilience (failure injection) | All clinical transactions succeed; all events charged or exceptioned after restart |
| TEST-FIN-003 | FR-FIN-CHG-001 | Duplicate delivery and replay of charged events; source cancellation | Integration | No duplicate charge; single linked reversal |
| TEST-FIN-004 | FR-FIN-CHG-002 | Charge against cancelled encounter; emergency unidentified patient; merge and unmerge; EncounterCorrected "Reattributed after unmerge" on an encounter with an issued invoice; a deposit with no encounter |
Functional | Held for review; emergency charges retained; histories intact; full trace available; invoice credited and reissued under the attributed identity, never edited; deposit in the billing supervisor's review queue |
| TEST-FIN-005 | FR-FIN-TAR-001 | Service dates either side of a tariff change; recomputation; draft not used; rollback | Functional | Correct version by service date; recomputed equals posted |
| TEST-FIN-006 | FR-FIN-TAR-002 | Bundle, exclusion, package, co-payment, discount over limit, tax change | Functional | Rule outcomes correct and recorded; over-limit discount awaits approval |
| TEST-FIN-007 | FR-FIN-BIL-001 | Account with charges, deposit, payments, adjustments, two coverage layers | Functional | Balance equals independent sum; receivables by party; closure blocked with balance |
| TEST-FIN-008 | FR-FIN-BIL-002 | Invoice run, interim and supplementary invoice, credit note, concurrent numbering; year change; invoice mixing VAT-exempt care and a VAT-able outpatient pharmacy sale for a PKP entity | Functional | Totals correct; no double billing; unique numbers in the INV/[facility]/[YYYY]/[number] format restarting on 1 January; mandatory content present; VAT shown only on the VAT-able lines and the invoice listed for e-Faktur export; issued invoice unchanged |
| TEST-FIN-009 | FR-FIN-BIL-003 | Correct a posted charge and payment; attempt update or delete via UI and API | Functional / Security | Original, reversal and adjustment linked; edits refused and audited |
| TEST-FIN-010 | FR-FIN-CLM-001 | Generate and validate claim; missing code, missing authorization, coding incomplete; CodingRevised and RecordReopened before and after submission | Functional / Integration | Ready only when valid; failures listed; codes taken from coding record with its version; Ready claim back to Draft on revision; submitted claim gets the task "Coding revised after submission" |
| TEST-FIN-011 | FR-FIN-CLM-002 | Submit, acknowledge, reject, deny, resubmit; payer outage; stale claim; denial with a coding-related reason code | Integration / Resilience | Correct states and queues; single transmission; queued during outage; ClaimReturnedForRecoding published once |
| TEST-FIN-012 | FR-FIN-CLM-003 | Remittance in full, partial with adjustment, unknown claim, duplicate remittance | Functional / Integration | Correct postings; exceptions for unmatched; no duplicate payment |
| TEST-FIN-013 | FR-FIN-CLM-004 | Add a new payer adapter; run conformance pack; deployment without X12; with JKN in scope, BPJS referral from a Domain 3 external referral, with VClaim available and unavailable | Integration / Conformance | No core change; regression passes; adapter gated by conformance; BPJS referral number returned to the referral, or a JKN work item on failure |
| TEST-FIN-014 | FR-FIN-PAY-001 | Real-time eligibility, payer timeout, batch run, manual verification | Integration / Resilience | Result linked to encounter; pending on timeout; registration unaffected |
| TEST-FIN-015 | FR-FIN-PAY-002 | Primary and secondary coverage; historical reorder; duplicate layer | Functional | Order applied by service date; duplicate rejected |
| TEST-FIN-016 | FR-FIN-PAY-003 | Service requiring authorization ordered without one; approved authorization on claim | Functional | Order unaffected; task created; claim validation uses authorization |
| TEST-FIN-017 | FR-FIN-CSH-001 | Full, partial and split payments; deposit allocation; repeated submission; online payment start, verified provider result, failure, expiry, late success and settlement reconciliation | Functional / Security | Correct posting and receipt; one payment for repeated submission; an online payment posted only on a verified result; no card data in the HIS |
| TEST-FIN-018 | FR-FIN-CSH-002 | Refund request, approval by different user, over-refund, double pay-out | Functional / Security | Linked refund; over-refund and self-approval rejected; single pay-out |
| TEST-FIN-019 | FR-FIN-CSH-003 | Session open, transactions, close with and without variance | Functional | Totals equal ledger; variance recorded and accepted by supervisor |
| TEST-FIN-020 | FR-FIN-GLP-001 | Daily posting batch, redelivery, finance outage, reconciliation | Integration / Resilience | Balanced batch; single posting; no blocking; reconciliation agrees |
| TEST-FIN-021 | FR-FIN-GLP-002 | FHIR financial resource conformance and access control | API / Conformance / Security | Profiles pass; cross-patient access denied and audited |
| TEST-FIN-022 | FR-FIN-INV-001 | Create, approve and retire items and locations; medication link | Functional | Governed lifecycle; retirement blocked with stock |
| TEST-FIN-023 | FR-FIN-INV-002 | Receipt, transfer, issue, return, reversal; edit attempt; balance-as-at; controlled item movement without a second person; transfer In transit confirmed at the destination | Functional / Security | Balances equal movement sums; edits refused; controlled movement refused without a witness |
| TEST-FIN-024 | FR-FIN-INV-003 | GS1 scan at receipt; issue of an expired lot, a lot On hold and a recalled lot; release from hold; lot trace; picking order | Functional | Lot data captured; unusable lots blocked with the shared scan messages; trace complete |
| TEST-FIN-025 | FR-FIN-INV-004 | Stocktake with variance, intervening movement, tolerance breach; blind count; recount; cancellation | Functional | Adjustment after approval only; balance equals count; blind count hides expected quantity and variance value |
| TEST-FIN-026 | FR-FIN-INV-005 | Dispense, return, ADC release and restock events; controlled-substance discrepancy; ledger outage; custody difference for a blood unit; SIPNAP monthly report with an open discrepancy | Integration / Resilience | One movement per event; one discrepancy per item, location and period; dispensing not blocked; custody difference listed; SIPNAP patient issues match Domain 3 transactions and sign-off waits for the discrepancy |
| TEST-FIN-027 | FR-FIN-PRC-001 | Requisition, approval, transfer fulfilment, partial fulfilment, short-close, cancellation, purchase order approval before issue, self-approval | Functional | Status visible; segregation enforced |
| TEST-FIN-028 | FR-FIN-PRC-002 | Partial receipt with lot and expiry; duplicate delivery; external system outage | Functional / Integration | Stock by lot; order status updated; message delivered once after recovery |
| TEST-FIN-029 | FR-FIN-REP-001 | Ward issue; chargeable implant consumption from theatre; department-level use; patient use at zero recorded balance; reversal within and after 24 hours | Integration | Movements posted; one supply charge; negative balance raised as a stock exception; reversal restores stock and charge |
| TEST-FIN-030 | FR-FIN-REP-002 | Reorder point reached; open order exists; availability query; critical stock-out | Functional | Single trigger; no duplicate proposal; availability with "as at"; alert sent |
| TEST-FIN-031 | FR-FIN-EXC-001 | Unmapped event to exception to reprocess; reconciliation with unaccounted event; escalation; daily and period-close FinancialControlTotalsReported and a corrected day |
Functional | Exception lifecycle correct; completeness computed; unaccounted listed; control totals published by 01:00 local with counts and amounts matching the published events, a correction re-sent with a higher version |
| TEST-FIN-032 | FR-FIN-EXC-002 | Downtime receipts, charges and stock issues entered after restoration alongside replayed events | Operational readiness | Provenance kept; no duplicates; missing forms reported |
| TEST-FIN-033 | All (end to end) | Registration with eligibility through care, discharge, invoice, payment, claim, remittance and finance posting | End-to-end | All records reconcile from source event to finance posting |
| TEST-FIN-034 | Section 9 | Role and context policy tests; segregation of duties, including Domain 10 rules 3 (charge entry or payment receipt vs refund, credit note or write-off approval on the same invoice; cashier and refund approver on one cash point) and 7 (purchase requester vs order approval and goods receipt); audit completeness against the registered event types of section 9.5; disclosure minimization | Security | Allowed and denied cases as specified; conflicting actions refused by the decision service; audit complete |
| TEST-FIN-035 | NFR-FIN-001, 002, 004, 011 | Peak interactive load and event bursts with concurrent clinical load | Performance | Targets met; no degradation of clinical services |
| TEST-FIN-036 | MIG-FIN-001 to 008 | Trial migration of tariffs, open receivables, deposits, open claims, coverage, stock and open orders | Migration | Counts and totals reconcile; exceptions resolved or accepted |
| TEST-FIN-037 | NFR-FIN-010, 012 | Restore and failover of FIN stores followed by reconciliation | Recovery exercise | RTO and RPO met; ledgers complete and consistent |
| TEST-FIN-038 | NFR-FIN-015 | Export of FIN data and configuration in documented formats | Inspection / Test | Independent consumer parses export |
| TEST-FIN-039 | FR-FIN-BIL-004 | Estimate for a planned admission with package and coverage; link to the encounter; compare at discharge | Functional | Shares and deposit proposal shown; no ledger entry; estimate and actual shown together |
| TEST-FIN-040 | FR-FIN-BIL-005 | Guarantor on an account; payment plan proposed, self-approval attempted, approved, instalments paid and one overdue | Functional / Security | Invoice addressed to guarantor; self-approval refused; plan states and receivable correct |
15.3 Acceptance Criteria¶
The domain is accepted when:
- All approved Must requirements in the agreed release scope pass verification or hold an approved, time-bound waiver (ACC-001).
- The end-to-end revenue workflow (TEST-FIN-033) and the procure-to-consume workflow pass with finance, revenue cycle, supply chain and pharmacy owner approval.
- The non-blocking test (TEST-FIN-002) passes: a FIN outage blocks no clinical transaction and all events are replayed and reconciled (PRS section 26, phase 5 exit gate).
- The financial ledger reconciles: account balances, source-to-charge completeness, claim and remittance reconciliation and finance posting reconciliation show no unexplained difference (PRS section 16.1 phase 5; section 26 phase 5).
- Stock balances reconcile to movements and, at cutover, to a physical count; dispense-to-stock reconciliation is clean.
- Integration contracts are validated: every critical FIN interface demonstrates acknowledgement, error handling, replay, reconciliation and monitoring (ACC-005); country or payer conformance packs pass for the payers in scope.
- Security and privacy controls pass assessment, including segregation of duties and audit completeness, with no unresolved critical or high vulnerability without formal risk acceptance (ACC-003).
- Performance, recovery and export targets in section 10 are met or formally re-baselined (ACC-006, ACC-008).
- Data migration and reconciliation are validated and signed off by finance and supply chain (PRS section 16.2).
- Downtime procedures for cashiering, stores and pharmacy stores are approved and rehearsed with restoration reconciliation (ACC-007, BCP-005).
- Operational documentation, runbooks, dashboards, support paths and trained super-users are in place (ACC-009).
- Outstanding risks in section 11.3 and open items in section 18 are resolved or formally accepted.
15.4 Requirement Verification Matrix¶
← 14. Technical and Architectural Constraints | Contents | Identifier index | 16. Implementation and Deployment Considerations →