Hi,
I want to import lots of old images into Orthanc and was surprised that Patient information seems not to be updated after the Patient has been created.
Is this by design?
And is there a way, via HTTP or a Lua script, to update Patient information without deleting/reimporting all of a patients instances?
The reason this matters to me is because I would like to import all my legacy data into Orthanc, and later fix the issues by updating all the instances that have inconsistencies. (In the future I probably add a Lua script that does this on import [1])
Let's say I have a few instances with the same PatientID, but different patient names:
img2dcm -k "(0010,0020)"="test" -k "(0010,0010)"="A" a.jpg a.dcm
img2dcm -k "(0010,0020)"="test" -k "(0010,0010)"="B" a.jpg b.dcm
img2dcm -k "(0010,0020)"="test" -k "(0010,0010)"="C" -k "(0010,0030)"=20161101 a.jpg c.dcm
When I send the first instance to Orthanc, a Patient is created.
dcmsend -v localhost 4242 a.dcm
curl -s "http://orthanc:orthanc@localhost:8042/patients/a94a8fe5-ccb19ba6-1c4c0873-d391e987-982fbbd3" | jq ".MainDicomTags.PatientName"
#=> "A"
When I send the second instance, it is associated with the same Patient, and the Patient.LastUpdate timestamp is updated.
Patient metadata is not updated however:
dcmsend -v localhost 4242 b.dcm
curl -s "http://orthanc:orthanc@localhost:8042/patients/a94a8fe5-ccb19ba6-1c4c0873-d391e987-982fbbd3" | jq ".MainDicomTags.PatientName"
#=> "A"
Sending a third instance with additional attributes also does not add these attributes to the patient:
dcmsend -v localhost 4242 c.dcm
curl -s "http://orthanc:orthanc@localhost:8042/patients/a94a8fe5-ccb19ba6-1c4c0873-d391e987-982fbbd3" | jq ".MainDicomTags.PatientBirthDate"
#=> ""
Deleting older instances (a.dcm, b.dcm) does not change the Patient data either. The only way I could find to change what is returned in Patient.MainDicomTags was to delete all Studies/Instances and add them again (in a different order)
This was surprising to me. I would have expected the last Instance that is sent to Orthanc to "win" and the patient tags to be updated. (although Patient BirthDate won't change, PatientName is relatively likely to for at least some Patients)
The place where this comes up as an issue seems to be in two places:
- C-Find on the patient level uses the global patient. `findscu -k 0008,0052=PATIENT -k PatientName=B` will not return anything.
But then, C-Find by Patient name on the patient level is probably a bad idea anyway.
- The web interface looks wrong: http://i.imgur.com/xwfGlo5.png (should the patient information that is displayed here come from the Study?)
But I'm not going to use the web interface because it doesn't handle the amount of data I'll have inside Orthanc
Poking a bit more, I see that the Patient information in studies is _not_ the global patient but the patient specific to that study, nice!
Thank you,
Levin Alexander (sorry about writing so many emails)
(I'm using "Orthanc version: mainline (20160927T190404)" from the docker image with default settings)
[1] I'm delighted by how easy to use and useful the callbacks look. Looking forward to writing some.