# OZI-RIS Complete Dummy Workflow Test

Date: 17 July 2026  
Data boundary: isolated SQLite test database; no production patient data used.

## Scenario

Dummy patient `DUMMY AISYAH COMPLETE WORKFLOW` was processed through real HTTP
routes, middleware, permissions, validation and controllers:

1. Patient registration with generated MRN and explicit email consent.
2. Exam Request creation for a dummy chest X-ray procedure.
3. Automatic accession, Study Instance UID, Requested Procedure ID and Scheduled
   Procedure Step ID generation.
4. Entry into the active Worklist.
5. Controlled `Scheduled → In Progress → Completed` transitions.
6. Explicit report request at completion.
7. Radiologist final report with non-clinical warning text.
8. Immutable report-version snapshot and electronic signature hash.
9. Consent-aware final-report email event in the provider-neutral outbox.
10. Final report print rendering and signed PDF download.

## Result

- Complete workflow test: passed, 38 assertions.
- DICOM identifiers remained within required lengths.
- Final report, signer, timestamps, version and notification records persisted.
- Print page and PDF returned successful responses.

## Regression found and corrected

The print and PDF templates require the shared RIS/hospital settings object, but
`ReportController` did not pass it. The print request returned HTTP 500 after a
valid finalization. Both print and PDF actions now load and pass `AppSetting`.

## External boundary

The clinical workflow test intentionally uses the isolated test database. Native
Orthanc C-STORE/QIDO and MWL validation are recorded separately in
`P2_DICOM_SITE_VALIDATION.md`; they do not mutate this clinical test transaction.

