Hi,
I wanted to change PatientName of one of a subjects by REST API. I followed the manual and called this command:
`
curl http://localhost:8080/patients/$PATIENT_ID/modify -X POST -d ‘{“Replace”:{„PatientID”:“DYS112”,“PatientName”:“DYS112”},“Force”:true}’
`
I am not fully satisfied with the result, because:
- Orthanc created new study with changed PatientName but did not delete the old one,
- in REST API (find query) I can retrieve PatientID only when I look for the old PatientName,
- both studies (old and new) seems to be belong to one (old) patient.
I use Orthanc version: mainline (20190123T134658) from orthanc-plugins docker container.
B.
Im also trying to figure out if its possible to modify a dicom tag of a study “in place” ie without the study being saved as a new study with a new ID
Regarding: “Modifying a study in place”, you’ll have to use the REST API to iterate over the instances of the study, and to modify each individual instance (which allows you to keep the same StudyInstanceUID and SeriesInstanceUID) before uploading them:
http://book.orthanc-server.com/users/anonymization.html#anonymization-of-a-single-instance
As always, please contribute by creating a dedicated plugin if you want a different behavior:
http://book.orthanc-server.com/developers/creating-plugins.html
Regarding: “In REST API (find query) I can retrieve PatientID only when I look for the old PatientName”, make the search at the “Study” level instead of “Patient”.
http://book.orthanc-server.com/users/rest.html#performing-finds-within-orthanc
Regarding: “Both studies (old and new) seems to be belong to one (old) patient”, this is because they share the same “PatientID”:
http://book.orthanc-server.com/faq/orthanc-ids.html
I remember that the “Force” option is there for advanced usages:
http://book.orthanc-server.com/users/anonymization.html