I am using Lua script to modify the Patient ID. This part is working. But when the images are saved on the disk they are saved with the old Patient ID.
For example : If my DR machine is sending the DICOM Data with the Patient ID:: AA_BCDE_123 or AA-BCD-12. Whereas in our EMR we have PatientID as AA/BCDE/123 or AA/BCD/12.
The images are saved with the Patient ID AA/BCDE/123 or AA/BCD/12 in Database but physically they are saved as AA_BCDE_123 or AA-BCD-12.
The File Name Syntax i am using is as follow:-
FileNameSyntax = %studydate[6,7]-%studydate[4,5]-%studydate[0,3]\%id-(%name)\%VSeriesDescription\%series%counter.dcm
ImportConverter0 = dofile(updatepatid.lua')
Data.PatientID = string.gsub(Data.PatientID, '_', '/')
Data.PatientID = string.gsub(Data.PatientID, '-', '/')
And secondly, if i want to modify already saved data (there are around 25,000 studies), please also guide in this regard also.