Getting Orthanc ID from a query


I am trying to get a automized service to retrieve studies from a modality. The service would read a file with all the Dicom StudyInstanceUID + PatientID to retrieve.

Query stuff is ok, but it does not give me the OrthancID needed to retrieve a study via REST API.

As far as i know, the OrthancID works formatting the Dicom ID, for patients is simply formatting the ID to sha-1. In case of a study it is formatting the concatenation of Dicom PatientID + StudyUID.
I can’t get this Study OrthancID. Could you help?


This is explained in the Orthanc Book:


Thanks for pointing it + the very quick response