Best practice to resolve erroneous patient id

Given ( names and id numbers fictitious ):
“PatientID”:“245”,“PatientName”:“JONES^S”
“PatientID”:“678”,“PatientName”:“ROBBINS^C”

An image is sent to Orthanc with the following erroneous dicom tags.

“PatientID”:“678”,“PatientName”:“JONES^S”

My planned intervention:

  1. Send images again with correct PatientID.
  2. Delete study sent with wrong PatientID.

Any problems with this workflow? Any reason to prefer to use rest api to replace patientID at study level?

This might be related: https://groups.google.com/g/orthanc-users/c/D23rRJCwyeU/m/EQFqUS-1rwkJ

The “duplicate PatientID problem” is common and vexing. I have custom code that looks at errors in any of the following elements (I have found them all):

“name” => “0010,0010”,
“dicom_patient_id” => “0010,0020”,
“dob” => “0010,0030”,
“gender” => “0010,0040”,

If any individual lookup (“/instances/$orthanc_instance_id/content/$dicom_tag”) result does not match what comes across in the Changes Log “Path” lookup, I create a new patient via split: /studies/$orthanc_study_id/split

I prepend a “FIX” variable with a self counting appended integer (e.g., “SPECIALFIX1_”, “SPECIALFIX2_”, etc.) to the prior study to avoid conflicts and correct errors. I have seen this in a commercial application.

In that way, I do “replace patientID at study level” per your post.

Hope that helps. I have a large data set (from many disparate input sources) and found this work around entirely necessary because the real world and the “DICOM model of the real world” never align.

BR

As also described: https://book.orthanc-server.com/faq/orthanc-ids.html