Hi There, (and specially Sebastien, sorry i’m going to bother you ^^)
I think I picked up some bugs in the Anon API,
-
a character set problem, if the new StudyDescription value contains some french special character as " ï " (ex : “Scintigraphie Thyroïdienne”) it lands on a 400 Bad Request Exception. It is a bug in Orthanc or something that could be handled at a client level ?
-
When anonymizing a patient having been edited (/modify API on a patient level and then anonymizing one of the studies of the created modified patient) the anons API works but the answer does not contains the “AnonymizedFrom” property, so the anonymized study cannot be tracked from it’s original ressource.
These report are made using orthanc 1.9.0
Best regards,
Salim
Dear Salim,
(1) The JSON file that describes an anonymization/modification operation must be encoded using UTF-8. I suspect that your terminal is not configured to use UTF-8, or that your REST client uses another encoding (maybe Latin-1).
For instance, I can type the following command on my GNU/Linux computer with an UTF-8 terminal:
$ curl -s http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/modify
-d ‘{“Replace”:{“StudyDescription”:“Scintigraphie Thyroïdienne”}}’ > /tmp/a.dcm &&
dcm2xml /tmp/a.dcm | iconv -f latin1 -t utf8 | grep -E ‘SpecificCharacterSet|StudyDescription’
ISO_IR 100
Scintigraphie Thyroïdienne
Note how “iconv” has been used to convert the output of dcm2xml (formatted in Latin-1 because of the ISO_IR 100 specific character set) to UTF-8.
(2) I am unable to reproduce your issue. You’ll find attached to this message, a sample Python script that shows that the “AnonymizedFrom” property is attached to the anonymized study. This sample also illustrates how to use UTF-8 in Python.
HTH,
Sébastien-
test.py (1.42 KB)
Thanks sebastien I finally got the problem !
Salim