I am trying to modify an instance via Mirth Connect/Orthanc REST API, on a Windows PC, and send to a modality without much luck. Something like this in curl…
$ curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/modify -X POST -d '{"Replace":{"PatientName":"hello","PatientID":"world"},"Remove":["InstitutionName"],"RemovePrivateTags": true, "Force": true}'
The result of this post is an error (ERROR: Error connecting to HTTP server [SocketException: Software caused connection abort: recv failed]). I am wondering if it is because I have not specified a file name for download, but I do not want to download the new instance.
I was hoping to get a new instance ID in the response and then send that new instance to a modality via another HTTP request.
- Is there something wrong with my syntax?
- Is this workflow even possible?
- Could this be accomplished by sending a Lua command through the REST API?
- Something like this…
-
$ curl -X POST http://localhost:8042/tools/execute-script --data-binary "Delete(SendToModality(ModifyInstance(6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f , '"Replace":{"PatientName":"hello","PatientID":"world"}', '"Remove":["InstitutionName"]', true), 'modality'))"
Any ideas?
Calvin.