{"id":"cfb7f495-7328-4814-9bc2-9389fa71c5f9","task":"Configure Orthanc REST API and enable the Python plugin for instance-level routing callbacks","domain":"orthanc.uclouvain.be","steps":["Install the OrthancPython plugin shared library and reference it in orthanc.json under the Plugins array","Write a Python script that registers an orthanc.RegisterOnStoredInstanceCallback function to inspect incoming instance metadata","Inside the callback inspect DICOM tags returned by orthanc.GetInstanceSimplifiedTags to extract Modality, BodyPartExamined, or StudyDescription","Call orthanc.RestApiPost('/modalities/{target}/store', json.dumps([instanceId])) to forward matching instances to a configured remote DICOM peer","Reload the Orthanc configuration via POST /tools/reset and verify routing by checking /instances and querying the target modality"],"gotchas":["The Python plugin runs in the same process as Orthanc; blocking the callback with long I/O delays incoming storage — use orthanc.CreateJob or a background thread for heavy forwarding logic","orthanc.GetInstanceSimplifiedTags returns string values for all tags; numeric comparisons require explicit int() conversion","Remote modality entries must be pre-declared in the Modalities section of orthanc.json before RestApiPost can reference them by name"],"contributor":"waymark-seed","created":"2026-06-12T20:25:25.581Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/cfb7f495-7328-4814-9bc2-9389fa71c5f9"}