Change accession number with --modifystudy

  • I am needing to edit the accession number of outside studies to match the one on the order in PACS before sending the study to PACS. Searching through these forums I tried using the following command line code to do this

    dgate64 "--modifystudy:,,:set 0008,0050 to ""12345""

    However it is not working. any help would be much appreciated.

  • We use conquest as a receiving and holding place for outside studies. this way we can remove the outside accession # and MRN to avoid conflicts in our PACS. I already have a PHP web app that will allow people to view what is on conquest and then send the studies from conquest to the correct PACS (we have more than one). PHP uses the dgate --movestudy via the command line to do this. I was hoping I could add the ability to change the accession number before sending, that way the studies do not have to be reconciled in PACS by a PACS admin. The images will just go into the order with the matching accession number. Unless there is a different way to do this through a web app then I need to be able to change the accession number via the command line.

  • Sure,

    I think you can add the script to set accessionnumber directly to --movestudy: Quoting strings is usually the most difficult part. If you use lua: you can use [[string]] to avoid needing extra quotes.


  • All of command lines I have tried return an error. For example the following is what I get for:

    --modifystudy:,[[SIUID]],:"Data.AccessionNumber = 12345" *** Importconverter-1.0 error: :Data.AccessionNumber = 12345

    I have tried several different combinations of "" thinking it was a syntax error but with no success. I also tried the command "set 0008,0050 = 12345" also with different combinations of "" but with the same result. I am still thinking it is a syntax issue but I am at a loss as to what it might be. In the log I can see where it is trying to modify the dicom header for each image in the study so if I can get the syntax correct I think it should work. I have not done anything with LUA before so its probably something I am doing wrong.

    I am running this directly from the command prompt from within the conquest folder. We are using ConQuest DICOM server 1.4.19c might this be the issue? Do I need a newer version?

  • When I tried the above script it still did not work so I decided to d/l and install the latest version of conquest to see if that made a difference, and it did. Everything is working just fine now. Thank you very much for your time in helping me resolve this.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!