Data Model
A simple data model for a system-design discussion: keep external imaging records separate from our derived AI outputs, review decisions, report state, and audit history.
Conceptual Entities
| Entity group | What it represents | Examples |
|---|---|---|
| Hospital / tenant | Where the study came from and which integration settings apply. | Hospital id, site config, enabled models, supported modalities, handoff destination. |
| Study / image references | Pointer to the external imaging study plus our derived display assets. | Study UID, modality, series/image references, thumbnails, object storage paths. |
| AI run / finding | What model ran and what it suggested. | Model version, confidence, label, bounding box, mask, slice, summary text. |
| Review decision | What the radiologist did with each AI suggestion. | Accepted, rejected, edited geometry, changed label, attached to report. |
| Report | Optional sidecar draft plus status reference to the legacy report workflow. | Draft text, linked reviewed findings, legacy completion status, completion timestamp. |
| Audit event | Append-only history of meaningful system and user actions. | Study received, AI run completed, finding viewed, annotation edited, legacy report completed. |
State Model
Each study should have a simple workflow state so operators and product stakeholders can answer where work is stuck.
| State | Meaning | Next expected action |
|---|---|---|
| Received | Study metadata and image references have entered our system. | Validate and prepare display/ML assets. |
| Processed | Images are normalized enough for viewer display and AI inference. | Run AI pipeline. |
| AI complete | Model outputs have been stored as findings, scores, and overlays. | Mark case ready for radiologist review. |
| Ready for review | Case is available in worklist with AI context attached. | Assign or open by radiologist. |
| In review | Radiologist has opened the case and may be accepting, rejecting, or editing findings. | Capture review decisions and draft report. |
| Sidecar draft ready | Optional draft/support text exists but is not the official report. | Radiologist continues in existing reporting workflow. |
| Legacy report completed | Radiologist has completed the official report outside or adjacent to the sidecar. | Record completion status or handoff metadata. |
| Status recorded | Sidecar has recorded completion, handoff, or acknowledgement state. | Close workflow or monitor unresolved handoff issues. |
Events Over Updates
For review actions, we should prefer appending events over overwriting the old value. This gives us traceability and future analytics without building a complicated audit product up front.
finding: AI-generated suspicious nodule
annotation v1: AI bounding box
review event: radiologist modifies box
annotation v2: radiologist-adjusted box
sidecar draft: may reference v2 if clinically relevant
legacy report: final clinical submission remains in existing workflow
Storage Split
| Storage | What belongs there |
|---|---|
| Object storage | Raw received image objects, derived PNG/JPEG previews, masks, heatmaps, generated thumbnails, visual artifacts. |
| Relational database | Studies, users, AI runs, findings, review events, reports, workflow state. |
| Search / analytics later | Audit queries, report search, review disagreement analysis, model monitoring dashboards. |
LLM Context
For LLM-assisted report drafting, we should build context from structured system data rather than sending an unbounded blob of everything we know.
llm_report_context:
task: draft_report_assist
study:
modality: chest_ct
accession_ref: external_accession_id
current_state: in_review
ai_findings_selected_for_context:
- finding_id: f_123
model_version: lung-nodule-detector-v4
label: pulmonary_nodule
confidence: 0.87
location: left_lower_lobe
radiologist_review_state: accepted
report_link_state: attached_to_draft
radiologist_inputs:
edited_findings: true
rejected_findings_count: 1
freeform_notes: "compare with prior if available"
patient_context:
prior_report_summary: "stable pulmonary findings on prior study"
relevant_history_summary: "limited summary pulled from EHR context"
output_constraints:
format: structured_findings_and_impression
tone: concise_radiology_report
must_not:
- invent measurements
- cite findings not present in context
- finalize diagnosis without radiologist signoff