All,
I was hoping to get some assistance with my forward script. Just to provide a little background. I currently have three Orthanc servers running, all are setup as simple DICOM routers. I recently built one on newer and more powerful architecture and I want to consolidate all three of these older servers into the ONE new server. However, my roadblock is that each of them have different forward scripts.
Here’s what I am hoping to accomplish:
- I would like my SR to go to three locations (Location 1, Location 2, and Location 3).
- I would like my Mammos to go to Locations (Location 4 Location 5, and Location 6).
- I would like the individual series of CT exams (Series 1, 2, 501, and 502) to go to Location 1 as well. Additionally, for the CTs, I only want those three series and nothing else, the rest can be purged out.
I would like it so that a MG never ends up on Locations 1-3, or the remnants of the CT go to Location 4.
Please forgive my scripting, alas I am a noob, but I am actively learning to get better. I am sure I can accomplish the above in a few lines. But, this is what I need help with. The most effective way to accomplish this. See below.
Any assistance is greatly appreciated.
function OnStoredInstance(instanceId, tags, metadata, origin)
if tags[‘Modality’] == ‘SR’ then
SendToModality(instanceId, ‘Location1’)
SendToModality(instanceId, ‘Location2’)
SendToModality(instanceId, ‘Location3’)
end
if tags[‘Modality’] == ‘MG’ then
SendToModality(instanceId, ‘Location4’)
SendToModality(instanceId, ‘Location5’)
SendToModality(instanceId, ‘Location6’)
end
if tags[‘SeriesDescription’] == ‘Patient Protocol’ then
SendToModality(instanceId, ‘Location1’)
end
if tags[‘Modality’] == “CT” then
if tags[‘SeriesNumber’] == ‘1’ then
SendToModality(instanceId, ‘Location1’)
end
if tags[‘SeriesNumber’] == ‘2’ then
SendToModality(instanceId, ‘Location1’)
end
end