Radiology Service — Sync Contract
Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · 03 platform-services · 02 DDD
1. Per-Aggregate Conflict Policy
| Aggregate / Entity | Conflict policy | Rationale |
|---|---|---|
ImagingStudyRef | server_authoritative | PACS is the system-of-record; EHR metadata reflects PACS state |
RadiologyReport (preliminary) | server_authoritative | Only one radiologist owns a report draft at a time |
RadiologyReport (final) | append_only | Final reports are immutable; amendments create new versions |
PacsEndpoint | server_authoritative | Admin-only config; no offline mutations expected |
2. Offline Behavior
Radiology service is primarily hub-deployed; facility-node deployment is minimal (metadata only). When hub is unreachable:
- Study registration can be deferred; outbox accumulates.
- Viewer launch is blocked (requires PACS connectivity and valid ABAC check).
- Report ingestion via direct API is blocked; via HL7 v2 / interop-service may succeed if interop-service runs locally.
3. PACS Metadata Freshness
Study metadata (series count, instance count) is updated via QIDO-RS polling or webhook. Staleness policy: metadata older than 24 hours triggers a re-sync on next access.
4. Optimistic Locking
All mutable rows include a version column enforced on updates:
UPDATE radiology_reports
SET status = $status, version = version + 1
WHERE id = $id AND version = $expectedVersion;
Zero rows updated → 409 CONFLICT.