A radiology report is prose, but its meaning is structured: a technique, a
comparison, a list of findings (each with anatomy, laterality, and a
measurement), and an impression that may carry an assessment category
(BI-RADS, Lung-RADS) and a follow-up recommendation. This skill turns the
narrative into that structure so findings are trackable — especially
incidental findings that need downstream follow-up.
OpenMed extracts the anatomy, disease/finding, and measurement spans on-device;
this skill organizes them into sectioned, coded findings. It is
decision-support, not a diagnostic device — every structured finding must be
attributable back to its source sentence for radiologist review.
{technique, comparison, findings[], impression} with measurements and
laterality.
assessment categories and the recommended action.
the report recommends.
report.
import openmed
report = (
"TECHNIQUE: CT chest without contrast.\n"
"COMPARISON: CT 2023-11-02.\n"
"FINDINGS: A 8 mm solid nodule is noted in the right upper lobe, "
"unchanged. No pleural effusion.\n"
"IMPRESSION: 8 mm right upper lobe nodule, stable. Lung-RADS 2. "
"Recommend annual low-dose CT screening."
)
# 1) De-identify the report on-device first (synthetic example shown).
deid = openmed.deidentify(report, policy="hipaa_safe_harbor")
text = deid.deidentified_text
# 2) Run NER for anatomy / finding / measurement spans.
ents = openmed.analyze_text(
text,
model_name="anatomy_detection_superclinical", # Anatomy category
output_format="dict",
)["entities"]
# 3) Split sections by header, then attach entities + measurements per finding.
import re
SECTION = re.compile(r"(?im)^(TECHNIQUE|COMPARISON|FINDINGS|IMPRESSION)\s*:")
sections, last, name = {}, 0, None
for m in SECTION.finditer(text):
if name: sections[name] = text[last:m.start()].strip()
name, last = m.group(1).upper(), m.end()
if name: sections[name] = text[last:].strip()
structured = {
"technique": sections.get("TECHNIQUE"),
"comparison": sections.get("COMPARISON"),
"findings": _split_findings(sections.get("FINDINGS", "")), # one per sentence
"impression": sections.get("IMPRESSION"),
"measurements": re.findall(r"\b\d+(?:\.\d+)?\s?(?:mm|cm)\b", text),
"laterality": sorted({w for w in ("right", "left", "bilateral")
if re.search(rf"\b{w}\b", text, re.I)}),
"assessment": (re.search(r"\b(?:BI-RADS|Lung-RADS)\s*\d[A-C]?\b", text, re.I)
or [None])[0] if re.search(r"RADS", text, re.I) else None,
"follow_up": _extract_followup(sections.get("IMPRESSION", "")),
}
_split_findings / _extract_followup are your sentence splitter and a
recommendation matcher ("recommend …", "follow-up in N months"); keep each
finding tied to its source sentence offsets.
openmed.deidentify(report, policy=...); structurefrom deidentified_text. Patient name, MRN, accession, and dates go before
anything is stored or shared.
IMPRESSION; also HISTORY/INDICATION). Reports vary — fall back to position if
headers are missing.
analyze_text for anatomy and finding entities; capture measurements("8 mm", "1.2 cm") and laterality ("right", "left", "bilateral") near each
finding.
laterality, measurement, changevsprior, source_offsets}`. "Unchanged",
"stable", "increased", "new" capture temporal change against the comparison.
impression and the recommended follow-up (modality + interval).
route them to a follow-up tracker so they aren't lost.
surface the whole structure to a radiologist for verification.
OpenMed's analyze_text returns a dict; result["entities"] items carrytext, label, confidence, start, end.
extracting-clinical-entities: Anatomy and Disease/finding entitiespopulate each structured finding; keep offsets so every field traces to a
source sentence.
extracting-lab-tables / OCR: if the report is a scan, OCR it first(openmed.multimodal.ocr.ocr), then run NER on the recognized text.
segmenting-clinical-sections: reuse section detection if your reportsdon't use canonical headers.
building-patient-timelines: dated findings + change-vs-prior feed alongitudinal view (e.g. nodule size over time).
extracting-dicom-metadata: pair the structured findings with thestudy's DICOM metadata when assembling a DICOM-SR object.
deidentifying-clinical-text (openmed.deidentify)before any export. Everything runs on-device.
exclude metastasis" are findings about absence/uncertainty — don't record
them as positive findings. Use resolving-clinical-context
(openmed.clinical) for negation/hedging before asserting a finding.
the correct finding; a misattributed side can drive wrong-site decisions. Tie
laterality to the nearest anatomy span by offset, not document-wide.
bare "8" is ambiguous. Capture the unit; for masses, capture all reported
dimensions ("2.1 x 1.4 cm"), not just the first.
Lung-RADS 1, 2, 3, 4A, 4B, 4X each map to a defined management action — don't
invent or round categories; pull the literal value from the impression.
classic missed follow-up. Explicitly separate incidental from
indication-related findings and push incidentals to a tracker.
the impression omits — structure both, and prefer the impression for
follow-up/assessment.
organizes text a radiologist authored. Every structured field must be reviewable
against its source. Do not auto-act on a derived category or follow-up without
clinician sign-off.