Skip to content

[Epic] Validation & enhancement pipeline stages — improve and verify results before reporting #51

Description

@Liohtml

Vision

MedCheck today runs a linear pipeline:

Ingest → Preprocess → ML Analyze → Vision AI → Report

This epic tracks purely additive pipeline stages that make the results more
trustworthy before they reach the report, plus the features that let MedCheck
serve patients responsibly. Nothing in the existing pipeline is removed or
replaced — every new stage is an optional, separately-registered PipelineStep.

Ingest → [+De-identify] → Preprocess → [+Segmentation grounding] → ML Analyze
        → Vision AI (+RAG grounding) → [+Cross-validation] → [+Reconcile vs official report]
        → [+Local 2nd opinion] → Report (professional | patient mode, +structured export)

Positioning — dual track (decided)

Deep research into the regulatory landscape established a hard boundary (verified
against FDA + EU MDR primary sources):

The moment software analyzes a medical image and presents findings to a
patient
as truth, it is a regulated medical device (US: fails FDA CDS
Criteria 1 & 3; EU: MDR Rule 11, ~Class IIb). A "not a medical device /
educational" disclaimer does not change this — intended use governs.

MedCheck therefore runs on two clearly-separated tracks:

  1. Research / developer track (existing) — professional radiology-style report,
    full image analysis, current "not a medical device, research use" disclaimer.
    Unchanged.
  2. Patient-education track (new) — an understand-your-report &
    prepare-questions-for-your-doctor
    layer. It explains an existing radiologist
    report, terminology, and anatomy; it never presents autonomous image-derived
    findings to a patient as truth, never says "looks normal/concerning," and always
    routes to a clinician. This is the safe side of the device line.

Why this matters (research-backed pain points)

Design principles

Child issues

Validation & grounding

Patient-education track

Privacy / safety foundation

Interoperability & local inference

Suggested order

  1. Add findings cross-validation pipeline step (LLM findings vs. ML signals) #52 (no deps, immediate value) → Add patient-friendly plain-language report mode #56 (comprehension, the top pain point)
  2. Add robust DICOM de-identification step (tag scrubbing + burned-in PHI + optional defacing) #57 (privacy foundation) → Trust & factuality bundle: RAG grounding, uncertainty + error-rate display, compliance docs #59 D (positioning docs — do early, cheap, de-risks everything)
  3. Trust & factuality bundle: RAG grounding, uncertainty + error-rate display, compliance docs #59 E/F (RAG grounding + uncertainty display)
  4. Add report reconciliation: compare official radiologist report against image analysis #58 (reconciliation — the differentiator; builds on Add findings cross-validation pipeline step (LLM findings vs. ML signals) #52/Add anatomy segmentation grounding step (MONAI / TotalSegmentator total_mr) #53/Add structured standards export: FHIR DiagnosticReport + DICOM SR #54/Add robust DICOM de-identification step (tag scrubbing + burned-in PHI + optional defacing) #57)
  5. Add local LLaVA-Med vision model provider #18 → Lingshu-7B, then Add anatomy segmentation grounding step (MONAI / TotalSegmentator total_mr) #53, Add local VLM second-opinion / consensus stage (cross-check cloud LLM against offline model) #55, Add structured standards export: FHIR DiagnosticReport + DICOM SR #54

On training our own models (researched)

Realistic ladder for a small Apache-2.0 team (verified):

License note (all children)

Components were checked against primary sources: MONAI/nnU-Net Apache-2.0;
TorchIO/highdicom/dicomweb-client/textstat MIT; FHIR spec CC0; Lingshu MIT. Excluded
from defaults due to research-only / non-commercial / custom terms: LLaVA-Med,
Med-Flamingo, BiomedGPT, MedGemma, and the non-commercial TotalSegmentator tasks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions