Need Mulitple source ae title on orthanc peer.

Hi,
we have implemented orthanc as Dicom Router to send study on multiple targeted destination by using lua script.

It works perfectly. but when study is routed from orthanc dicom router to targeted orthanc. it shows source ae of dicom router. but we want original source ae title from where(machine console or moaldity ae) study was performed and sent to rothanc dicom router. shown in picture attached herewith. we are receving from mutliple centers and multiple modalities. we have an issue how to find out which study is belong to which center and modality. we can’t differniate studies of multiple source at orthanc peer layer

Need Help how to sort-out issue.

orthanc.PNG

Hello,

You are visibly looking for the “LocalAet” option available in the “/modalities/…/store” route the REST API, which allows you to overwrite the AET of Orthanc in C-STORE SCU jobs:
https://book.orthanc-server.com/users/rest.html#rest-store-scu

The “LocalAet” field is also available in the “DicomModalities” configuration option, which allows you to define two modalities in Orthanc pointing to the same SCP but with different AET for Orthanc:

https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.3/OrthancServer/Resources/Configuration.json#l338

Sébastien-

Thank you Sebastien for your suggestion, but I want to know how to write correct steps of lua script to route instances,
i wrote this script. Kindly suggest correct code of lua.

function OnStoredInstance(instanceId, tags, metadata)

local RemoteAET = metadata[‘RemoteAET’]

if string.find(RemoteAET, ‘WKS1’) ~= nil then

local data={
“Resources” : [“…instanceId…”],
“Synchronous” : false,
“LocalAet” : “WKS1”,
“MoveOriginatorAet”:“ORTHANC”,
“MoveOriginatorID”: 1234,
“Timeout”: 10,
“StorageCommitment”: false
}

RestApiPost(‘modalities/ORTHANC/store’, data )
end
end

Thank you Sébastien

This resolved my problem.