I’m ultimately looking for Orthanc to make an API call to my application once a study has been successfully received and I’m looking for a little bit of logic confirmation on what I’ve been working on so far. This is also my first foray into using Lua, so bear with me!
My API needs to record the AET that the study came from and Orthanc’s AET it was sent to.
Logic
- Orthanc is configured with
- DicomCheckCalledAet : false. This puts Orthanc into promiscuous mode, allowing me to effectively have an unlimited set of AETs that Orthanc will respond to (Orthanc doesn’t check the calling partys’ AET or the AET that they called Orthanc with - it just accepts all connections)
- StableAge : 60. From my understanding, if a study doesn’t receive any more instances after this number of seconds, it’s deemed to be complete.
- From what I can see, the only way of obtaining the AET information is through Lua’s OnStoredInstance() function, as OnStoredStudy() doesn’t appear to have the origin property available to it.
- Once the an instance is stored, I have its InstanceID, which I then use to make an internal API call to /instances/instance_UID to obtain the parent SeriesID
- Another internal API call is immediately made to /series/series_UID to obtain the parent StudyID
- A final internal API call is made to /study/study_UID to obtain the IsStable status of the study itself.
- If the study is stable then I can notify my application using a technique similar to Alain’s excellent example.
Questions
If all this logic kinda makes sense, can I ask for confirmation on a couple of questions / assumptions that I’m making: - OnStoredInstance() is the only function that I can use to obtain the AET information (referred to in Logic #2)
- There’s no single API call, using an instance UID to obtain it’s parent’s study status - I have to find the instances’ parent series, then that series’ parent study.
- Am I missing anything?!! :O)
Thanks to all,
Dave