Hello,
currently I have one EA title on the client side and OnStableStudy function in Lua on Orthanc side that will export to c:\Patients\patientID and execute a powershell A.ps1 on the data exported.
How can I have multiple EA titles on the client and OnStableStudy to execute different powershell files based on the called EA title?
Ex: if client has 4 EA titles, EA_A, EA_B, EA_C and EA_D on same IP and port, Orthanc can listen to those EA titles and execute powershell A.ps1, B.ps1, C.ps1 or D.ps1 accordingly.
Thank you.
Hi,
If it is possible to configure your client to have 4 AETs and use a specific one for each type of transfer, go ahead. Note that it might be easier to declare Orthanc 4 times in the client with 4 AETs, each one for a specific use case.
In any case, in Orthanc, you can use the origin argument of OnStoredInstance and save this info in a custom metadata at study level. Then, you can retrieve the metadata in the OnStableStudy callback. You can either use “RemoteAET”, the AET of the client or “CalledAET”, the AET of Orthanc that was used to push the instance.
In order to support multiple for Orthanc, you can simply configure Orthanc no to check the CalledAET:
// Check whether the called AET corresponds to the AET of Orthanc[](https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Configuration.json#l135)
// during an incoming DICOM SCU request[](https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Configuration.json#l136)
"DicomCheckCalledAet" : false,
HTH
Alain