Install the highdicom Python library and import highdicom.sr.MeasurementReport along with the coded concept classes from highdicom.sr.coding
Build an ObservationContext using the algorithm name and version as the observer, specifying ObserverType as DEVICE for automated AI outputs
Create one or more MeasurementGroup entries, each with a TrackingIdentifier, a referenced image SOPInstanceUID, and a list of Measurement objects (each with a numeric value, unit, and DICOM coded concept for the measured quantity)
Instantiate MeasurementReport(observation_context=..., procedure_reported=..., imaging_measurements=[...]) and serialize to a DICOM dataset with the Comprehensive 3D SR SOP class (1.2.840.10008.5.1.4.1.1.88.34) or Enhanced SR (1.2.840.10008.5.1.4.1.1.88.22) as appropriate
Store the SR instance to PACS via STOW-RS or C-STORE and verify linking by querying QIDO-RS for instances with the same StudyInstanceUID
Known gotchas
TID 1500 requires that each MeasurementGroup includes a Tracking UID (globally unique) in addition to a human-readable Tracking ID; omitting the UID causes non-conformance with the IHE AIR profile
The SOP class UID determines rendering support in viewers — Comprehensive SR (1.2.840.10008.5.1.4.1.1.88.33) and Comprehensive 3D SR (1.2.840.10008.5.1.4.1.1.88.34) differ in whether spatial coordinates reference 2D or 3D geometry; choose based on whether findings are localized to a frame or a volumetric region
Referenced image UIDs in the SR must match exactly the SOP Instance UIDs stored in PACS; a UID mismatch causes viewers to silently fail to display the measurement overlay
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp