Domain specifications / D03-CLI / 15. Testing and Verification Requirements
15. Testing and Verification Requirements¶
15.1 Verification Strategy¶
- Unit testing. Business rules, validation, calculations (doses, scores), permissions, state transitions and error handling for every module; the state models of section 4.3 are tested exhaustively for valid and invalid transitions.
- Component testing. Each service against its contract with dependencies simulated, including degraded modes (CDS, terminology, stock, notification unavailable).
- Integration testing. Order dispatch, acknowledgement, status and result flows with Domain 4 and external systems (HL7 v2, FHIR); stock interface with Domain 5; ADC interface; event contracts with Domains 5, 6, 7, 8, 9; retries, duplicates, out-of-order delivery and reconciliation (PRS 17.1).
- End-to-end workflow testing. Complete patient journeys across registration, documentation, ordering, results, medication and discharge, and each workflow WF-CLI-001 to WF-CLI-009.
- Clinical safety testing. Hazard-control tests: wrong-patient prevention, medication safety, critical results, downtime and recovery scenarios (PRS 17.1); every hazard in the hazard log has at least one linked test.
- CDS content testing. Regression packs with positive, negative, missing-data and stale-data cases; simulation against representative cohorts before activation (PRS CDS-003, MED-003).
- Performance testing. Peak concurrency for chart, CPOE and eMAR; high-volume observations; CDS evaluation latency; event bursts; failover.
- Security testing. Access-policy tests for allowed and denied access by context, signed-content immutability, token scope, audit completeness, penetration testing (PRS SEC-003, SEC-011).
- Usability testing. Representative tasks per persona before each major clinical release, including interruption and task switching; accessibility paths (PRS SAFE-006, NFR-010, NFR-011).
- User acceptance testing. Scenario-based clinical UAT with clinical owner approval for all Tier 1 workflows (PRS ACC-002).
- Operational readiness testing. Monitoring, runbooks, backup and restore validation, downtime and restoration reconciliation rehearsal by representative departments (PRS ACC-007, ACC-009).
- Migration testing. Trial migrations with counts, checksums and clinical sampling (PRS 16.2).
Test evidence uses approved synthetic or de-identified data and records test case ID, requirement ID, build, environment, tester, date, outcome, defects and approver (PRS 17.3). Code coverage alone is not evidence of clinical safety (PRS SDLC-004).
15.2 Test Scenario Catalogue¶
| Test ID | Requirement ID | Scenario | Test Type | Expected Result |
|---|---|---|---|---|
| TEST-CLI-001 | FR-CLI-EHR-001 | Patient with encounters at two facilities; open chart | Functional / End-to-end | One reconciled timeline with facility, author, status, source |
| TEST-CLI-002 | FR-CLI-EHR-001 | Corrected result and amended note in timeline; two locales | Functional | Current version shown, prior retrievable; canonical values unchanged |
| TEST-CLI-003 | FR-CLI-EHR-002 | Import external allergy and medication; redeliver; accept one, reject one | Integration | Labelled unverified; one pending item; accepted entry has provenance link |
| TEST-CLI-004 | FR-CLI-PRB-001 | Enter diagnosis with inactive code; resolve problem; assign classification code in Domain 6 | Functional | Rejected or flagged; history retained; clinical concept unchanged |
| TEST-CLI-005 | FR-CLI-PRB-002 | New patient unassessed; free-text allergy; refuted allergy | Clinical safety | "Not assessed" shown; unchecked reported; refuted excluded from CDS |
| TEST-CLI-006 | FR-CLI-DOC-001 | Template v1 document, activate v2, roll back; export structured note | Functional | Historical rendering preserved; rollback audited; export complete |
| TEST-CLI-007 | FR-CLI-DOC-002 | Sign note; inspect provenance in chart and audit | Functional | Author, role, encounter, times, status, source, signature present |
| TEST-CLI-008 | FR-CLI-DOC-002 | Attempt update and delete of signed note via UI and API; amend; concurrent amend; unsigned machine draft | Clinical safety / Security | Writes rejected and audited; original and amendment retrievable; one concurrent amend wins; draft never signed |
| TEST-CLI-009 | FR-CLI-DOC-003 | Copy-forward with changed medication and allergy; cross-patient copy | Clinical safety | Stale content flagged; signing blocked until reviewed; cross-patient rejected |
| TEST-CLI-010 | FR-CLI-OBS-001 | Manual entry with wrong unit and implausible value; device artefact; duplicate device message | Functional / Integration | Rejected or confirmed; artefact flagged and excluded; no duplicate |
| TEST-CLI-011 | FR-CLI-OBS-002 | Complete assessment; missing component; unacknowledged escalation | Clinical safety | Rule version stored; incomplete score; escalation to next level |
| TEST-CLI-012 | FR-CLI-CAR-001 | Care plan with scheduled intervention; referral accepted and answered; pathway proposal ignored | Functional | Tasks created; referral completed with linked response; no task from unaccepted proposal |
| TEST-CLI-013 | FR-CLI-CAR-002 | Transfer patient; overdue critical task; administer dose | Functional / Integration | Worklists follow assignment; supervisor notified; task auto-completed |
| TEST-CLI-014 | FR-CLI-CAR-003 | Handover with pending orders, unacknowledged result, overdue task; no acknowledgement | Functional | SBAR content complete; acknowledgement audited; escalation |
| TEST-CLI-015 | FR-CLI-CPO-001 | Author and sign each order class; missing required field; pathway-proposed order unsigned | Functional / Clinical safety | Required attributes present; signing blocked; proposal stays Draft and is not dispatched |
| TEST-CLI-016 | FR-CLI-CPO-001 | Routine order on cancelled encounter; emergency exception | Functional | Rejected; exception accepted and audited |
| TEST-CLI-017 | FR-CLI-CPO-002 | Weight-based order set with no weight, stale weight, valid weight; version change; retired favourite | Clinical safety | No silent calculation; validated values; version recorded; favourite blocked |
| TEST-CLI-018 | FR-CLI-ORD-001 | Catalogue change with invalid destination; approve, promote, roll back | Functional | Approval blocked; rollback restores prior version |
| TEST-CLI-019 | FR-CLI-ORD-002 | Exercise every valid and invalid order transition; cancel, modify, replace | Functional | Valid succeed, invalid rejected; history complete; replaced not shown active |
| TEST-CLI-020 | FR-CLI-ORD-002 | Double submission; duplicate order within window; concurrent change | Clinical safety | One order; warning with reason required; stale version rejected |
| TEST-CLI-021 | FR-CLI-ORD-003 | No acknowledgement; rejection; unknown placer status event; Domain 5 outage | Integration | Escalated on stale worklist; action required; unmatched queue; orders unaffected and charges replayed |
| TEST-CLI-022 | FR-CLI-MHR-001 | Medications in every state and source | Functional | States distinguished; source and effective period shown; patient-reported labelled |
| TEST-CLI-023 | FR-CLI-MHR-002 | Admission, transfer and discharge reconciliation with differences; unresolved item; substituted home medication | Clinical safety | Signing blocked until resolved or documented; instructions generated; resume prompt |
| TEST-CLI-024 | FR-CLI-RXV-001 | Medication orders by type with missing attributes; modify verified order | Functional | Signing blocked; order returns to Pending Verification |
| TEST-CLI-025 | FR-CLI-RXV-002 | Verify, substitute, return to prescriber; dispense unverified order; dispense and reconcile | End-to-end | Gate enforced; dispense reconciles to order and stock movement |
| TEST-CLI-026 | FR-CLI-RXV-002 | Dispense during Domain 5 outage | Integration | Posting pending; reconciled after recovery |
| TEST-CLI-027 | FR-CLI-RXV-003 | Scan malformed, unknown and expired GS1 codes | Clinical safety | All rejected |
| TEST-CLI-028 | FR-CLI-RXV-003 | ADC removal with and without verified order; override | Integration | Reconciled to order, user, cabinet, pocket, stock movement; override reviewed |
| TEST-CLI-029 | FR-CLI-RXV-003 | Controlled-substance partial dose, witnessed wastage, same-user witness, unreconciled balance | Functional | Reconciles; same-user witness rejected; discrepancy raised |
| TEST-CLI-030 | FR-CLI-MAR-001 | Record administered, held, refused, omitted for scheduled, PRN, one-time doses | Functional | Reason where required, user and time on every state |
| TEST-CLI-031 | FR-CLI-MAR-001 | Discontinue order with future doses; PRN before minimum interval; record dose twice | Clinical safety | Doses cancelled; interval enforced; second record rejected |
| TEST-CLI-032 | FR-CLI-MAR-002 | Wrong patient, product, dose, route, out-of-window, unverified order | Clinical safety | Blocked or escalated per configuration; wrong patient always blocked |
| TEST-CLI-033 | FR-CLI-MAR-002 | Confirmation retry after network error; compliance report | Clinical safety | One record; report shows eligible, scanned, overrides, exceptions |
| TEST-CLI-034 | FR-CLI-MAR-003 | Transcribe downtime administrations including one already recorded | Clinical safety | Provenance recorded; duplicate held for resolution |
| TEST-CLI-035 | FR-CLI-MAR-003 | Wi-Fi outage: record offline, order discontinued centrally, reconnect; expired cache | Clinical safety | Three-state display; conflict worklist; no duplicate, no lost audit; expired cache refused |
| TEST-CLI-036 | FR-CLI-CDS-001 | Rule missing attribute; failing regression; approve, activate, roll back | Functional | Activation blocked; history complete |
| TEST-CLI-037 | FR-CLI-CDS-003 | Each medication check category: positive, negative, missing, stale; hard stop with and without override pathway | Clinical safety | Expected alerts; governed override recorded and visible downstream |
| TEST-CLI-038 | FR-CLI-CDS-002 | Stale creatinine, missing weight, uncertain allergy, conflicting medication lists; CDS timeout; tiers | Clinical safety | No definitive recommendation; data gap stated; failure visible; tiers distinct |
| TEST-CLI-039 | FR-CLI-CDS-004 | Duplicate non-critical alert and critical alert with suppression configured; inspect log | Functional | Non-critical suppressed and audited; critical shown; log supports analytics |
| TEST-CLI-040 | FR-CLI-CDS-004 | Rule exceeds override threshold | Functional | Flagged to review queue with metrics; not disabled |
| TEST-CLI-041 | FR-CLI-CDS-005 | Trace hazard to requirements, controls, tests, incident; release with usability findings | Inspection | Traceable to closure or acceptance; findings dispositioned |
| TEST-CLI-042 | FR-CLI-RSP-001 | Preliminary, final, corrected, withdrawn result; mixed units; unmatched result; out-of-order versions | Integration | Supersession correct; trend validated; unmatched not in chart |
| TEST-CLI-043 | FR-CLI-RSP-002 | Review and acknowledge; critical result unacknowledged; correction after review; release policy by type | Clinical safety | Escalation with timestamps; review reopens; no release against policy |
| TEST-CLI-044 | FR-CLI-RSP-003 | Persona usability tasks; switch patient mid-action; identity zone during dialogs | Usability / Clinical safety | Task criteria met; mismatch rejected; zone always visible |
| TEST-CLI-045 | FR-CLI-CDS-002 | CDS latency test; launched application token scope, expiry, revocation | Performance / Security | p50, p95, p99 recorded; scope enforced; revoked token denied |
| TEST-CLI-046 | All (WF-CLI-001 to 007) | End-to-end inpatient scenario: admit, document, order, result, prescribe, verify, dispense, administer, hand over, reconcile, discharge | End-to-end / UAT | All steps complete with traceability; clinical owner sign-off |
| TEST-CLI-047 | FR-CLI-MAR-003, FR-CLI-DOC-002, FR-CLI-ORD-002 | Clinical downtime exercise and restoration reconciliation on a ward and in pharmacy | Operational readiness | 100% of items reconciled or exceptioned |
| TEST-CLI-048 | NFR-CLI-019 | Export all domain data and configuration; independent validation | Operational readiness | Identifiers, provenance, versions preserved |
| TEST-CLI-049 | NFR-CLI-006, section 9.2 | Access-policy matrix: allowed and denied by role, assignment, facility, label; Break-the-Glass | Security | Decisions match policy; emergency access audited |
| TEST-CLI-050 | NFR-CLI-001, 003, 005, 007 | Peak load on chart, CPOE, eMAR with observation burst and fault injection | Performance / Reliability | Targets met or gaps recorded; no lost or duplicated transaction |
| TEST-CLI-051 | FR-CLI-CAR-001 | External referral sent to the SATUSEHAT Rujukan sandbox; acceptance, decline and reply letter returned; service unavailable; resend after transport failure | Integration | States follow section 4.3; national referral number stored; printed letter with QR issued in fallback; no duplicate national referral |
| TEST-CLI-052 | FR-CLI-RXV-001 | Discharge prescription for an external pharmacy; prescription with a narcotic; prescriber without valid SIP; item without KFA code | Functional / Integration | MedicationRequest with KFA codes offered to Domain 6 and accepted by the SATUSEHAT sandbox; QR print verifies; narcotic kept with the hospital pharmacy; signing blocked without SIP |
| TEST-CLI-053 | FR-CLI-CAR-002 | Diet order before and after cut-off; "Nothing by mouth" after cut-off; transfer and discharge | Functional | Meal tasks created per meal service; late change applies to the next meal; fasting applies at once with alert; tasks move or cancel with ADT |
| TEST-CLI-054 | FR-CLI-CDS-003 | Load a medication knowledge release; simulate on 30 days of orders; activate; roll back; catalogue item without KFA mapping | Functional / Clinical safety | Release versioned with source references; simulation results stored; rollback restores previous release; unmapped item shows "Medication checks incomplete for this item" |
15.3 Acceptance Criteria¶
The domain is accepted for a release when:
- All Must requirements in the agreed release scope pass verification or have an approved, time-bound waiver recorded in the traceability matrix (PRS ACC-001).
- All Tier 1 workflows (documentation and signing, order entry to completion, medication closed loop, CDS alert and override, result review, handover) pass end-to-end clinical scenario tests with clinical owner approval (PRS ACC-002).
- Integration contracts with Domains 1, 4, 5, 6, 7, 9 and 10 and critical external interfaces demonstrate acknowledgement, error handling, replay, reconciliation and monitoring (PRS ACC-005).
- Security and privacy controls pass assessment with no unresolved critical or high vulnerability without formal risk acceptance (PRS ACC-003).
- Performance, availability and recovery targets approved for the release are met (PRS ACC-006).
- Clinical data migration and cutover reconciliation are validated with clinical, HIM and privacy sign-off.
- Clinical governance has approved order sets, medication rules, alerts, templates and relevant terminology (PRS ACC-010), and the clinical safety case and hazard log are approved for the release.
- Downtime and restoration reconciliation have been rehearsed by representative clinical departments (PRS ACC-007).
- Complete export of the domain's data and configuration has been demonstrated (PRS ACC-008).
- Runbooks, dashboards, super-users, training with observed competency assessment for high-risk workflows, and support paths including clinical safety escalation are operational (PRS ACC-009, 16.3).
- Outstanding risks are formally accepted or resolved.
15.4 Requirement Verification Matrix¶
| Requirement ID | Test ID | Verification Method | Result | Evidence |
|---|---|---|---|---|
| FR-CLI-EHR-001 | TEST-CLI-001, 002, 046 | Test | Pending | TBD |
| FR-CLI-EHR-002 | TEST-CLI-003 | Test | Pending | TBD |
| FR-CLI-PRB-001 | TEST-CLI-004 | Test | Pending | TBD |
| FR-CLI-PRB-002 | TEST-CLI-005 | Test | Pending | TBD |
| FR-CLI-DOC-001 | TEST-CLI-006 | Test | Pending | TBD |
| FR-CLI-DOC-002 | TEST-CLI-007, 008, 047 | Test | Pending | TBD |
| FR-CLI-DOC-003 | TEST-CLI-009 | Test | Pending | TBD |
| FR-CLI-OBS-001 | TEST-CLI-010 | Test | Pending | TBD |
| FR-CLI-OBS-002 | TEST-CLI-011 | Test | Pending | TBD |
| FR-CLI-CAR-001 | TEST-CLI-012, 051 | Test | Pending | TBD |
| FR-CLI-CAR-002 | TEST-CLI-013, 053 | Test | Pending | TBD |
| FR-CLI-CAR-003 | TEST-CLI-014 | Test | Pending | TBD |
| FR-CLI-CPO-001 | TEST-CLI-015, 016, 046 | Test | Pending | TBD |
| FR-CLI-CPO-002 | TEST-CLI-017 | Test / Analysis (clinical validation of calculations) | Pending | TBD |
| FR-CLI-ORD-001 | TEST-CLI-018 | Test / Inspection | Pending | TBD |
| FR-CLI-ORD-002 | TEST-CLI-019, 020, 047 | Test | Pending | TBD |
| FR-CLI-ORD-003 | TEST-CLI-021 | Test | Pending | TBD |
| FR-CLI-MHR-001 | TEST-CLI-022 | Test | Pending | TBD |
| FR-CLI-MHR-002 | TEST-CLI-023 | Test | Pending | TBD |
| FR-CLI-RXV-001 | TEST-CLI-024, 052 | Test | Pending | TBD |
| FR-CLI-RXV-002 | TEST-CLI-025, 026 | Test | Pending | TBD |
| FR-CLI-RXV-003 | TEST-CLI-027, 028, 029 | Test | Pending | TBD |
| FR-CLI-MAR-001 | TEST-CLI-030, 031 | Test | Pending | TBD |
| FR-CLI-MAR-002 | TEST-CLI-032, 033 | Test | Pending | TBD |
| FR-CLI-MAR-003 | TEST-CLI-034, 035, 047 | Test | Pending | TBD |
| FR-CLI-CDS-001 | TEST-CLI-036 | Test / Inspection | Pending | TBD |
| FR-CLI-CDS-002 | TEST-CLI-038, 045 | Test | Pending | TBD |
| FR-CLI-CDS-003 | TEST-CLI-037, 054 | Test | Pending | TBD |
| FR-CLI-CDS-004 | TEST-CLI-039, 040 | Test / Inspection | Pending | TBD |
| FR-CLI-CDS-005 | TEST-CLI-041 | Inspection | Pending | TBD |
| FR-CLI-RSP-001 | TEST-CLI-042 | Test | Pending | TBD |
| FR-CLI-RSP-002 | TEST-CLI-043 | Test | Pending | TBD |
| FR-CLI-RSP-003 | TEST-CLI-044 | Test (usability) | Pending | TBD |
| NFR-CLI-001 to NFR-CLI-019 | TEST-CLI-045, 048, 049, 050 and Domain 2 platform tests | Test / Analysis | Pending | TBD |
← 14. Technical and Architectural Constraints | Contents | Identifier index | 16. Implementation and Deployment Considerations →