Message247

Author admin
Recipients
Date 2017-07-10.18:06:23
Content
[BitBucket user: Alain Mazy]
[BitBucket date: 2017-07-10.16:06:23]

* upload the attached file
* you now have one patient 'ORTHO' whose PatientID = 2345
* there is one study in the DB:
```
curl http://localhost:8042/patients/d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be
{
   "ID" : "d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be",
   "IsStable" : true,
   "LastUpdate" : "20170710T175954",
   "MainDicomTags" : {
      "PatientBirthDate" : "19720405",
      "PatientID" : "2345",
      "PatientName" : "ORTHO"
   },
   "Studies" : [ "f37603bd-c1f318ed-ca55353f-61aa3375-fc7909b2" ],
   "Type" : "Patient"
}
```
* modify this patient to rename it (following the orthanc book recommendation, include the PatientID in the request):
```
curl -X POST http://localhost:8042/patients/d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be/modify -v -d {\"Replace\":{\"PatientID\":\"2345\",\"PatientName\":\"ORTHO2\"}}
```
* the request is accepted:
```
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Content-Length: 219
<
{
   "ID" : "d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be",
   "Path" : "/patients/d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be",
   "PatientID" : "d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be",
   "Type" : "Patient"
}
```
* there are now 2 studies in Orthanc, one with the 'ORTHO' patient name and one with 'ORTHO2'
```
curl http://localhost:8042/patients/d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be
{
   "ID" : "d2f75e82-04fedf2e-acd261e2-461b2964-e3bfd5be",
   "IsStable" : true,
   "LastUpdate" : "20170710T180244",
   "MainDicomTags" : {
      "PatientBirthDate" : "19720405",
      "PatientID" : "2345",
      "PatientName" : "ORTHO"
   },
   "Studies" : [
      "f37603bd-c1f318ed-ca55353f-61aa3375-fc7909b2",
      "a87e76fa-e87bb7d0-ba36c979-5b7833ec-54ec88a2"
   ],
   "Type" : "Patient"
}
```

We should either:

- forbid the request since it will lead to DB - files inconsistencies
- accept the request but remove the original studies and rename the patient in DB (this is, I think, the expected behaviour)
- carefully document this behaviour.
History
Date User Action Args
2026-07-29 15:51:20adminlinkissue55 messages
2026-07-29 15:51:20admincreate