How to identify the source machine of a study in lua script

I have different machines sending studies to my orthanc server. I want to be able to identify and send some studies from some specific machines to my remote peer or send studies to different remote peers based on source machines. PS. I have lua scripts set up

1 Like

When I call the api to get study metadata, I only see LastUpdate and MainDicomTagsSignature.

Hello,

As indicated by @bcrickboom, you are looking for the RemoteAET metadata, which is only available at the level of DICOM instances. Indeed, a patient/study/series can possibly come from multiple modalities, so different instances could be labelled with different values of RemoteAET.

If you are sure that all the DICOM instances in your study originate from the same remote modality, you could use the route /studies/{id}/instances in REST API to identify all the instances attached to the study of interest, then look for the value RemoteAET of the first returned DICOM instance.

Regards,
Sébastien-

2 Likes

Thank you @jodogne

This worked