Hello Friends, could someone give me a big help, I’m using this script
“function OnStoredInstance ( instanceId , tags , metadata )
Delete ( SendToModality ( instanceId , ‘example’ ))
end”
to self-send images to another server, but it makes requests to send a tomography exam, for example, I would like a script that sends the exam in just one request
Hi, Gerson
You can perform a DICOM C-MOVE using the Rest API. Take a look at the following link:
https://book.orthanc-server.com/users/rest.html#performing-c-move
From a Lua script you’ll want to call the HttpPost function. Also you’ll want to change the event your script is reacting to. Use OnStableStudy instead of OnStoredInstance. That way, once the study stabilized, orthanc will call your script, just once.
Finally, because your script deletes the image, you’ll also want your script to call HTTP DELETE on the study that stabilized.
Link explaining the delete request: https://book.orthanc-server.com/users/rest.html#deleting-resources-from-orthanc
Hope this helps.
Best,
Luiz