Hi,
I wrote a lua script to replace the station name of any stored instance with the remote AET title, after having saved the original station name in a private dicom tag :
Hi,
I wrote a lua script to replace the station name of any stored instance with the remote AET title, after having saved the original station name in a private dicom tag :
Hello,
The problem with your code is that you are modifying a single instance. As described in the wiki, in this case, Orthanc answers with the full modified DICOM file and doesn’t store this file into its database (in other words, the modified DICOM is generated on-the-fly):
https://code.google.com/p/orthanc/wiki/Anonymization#Anonymization_of_a_Single_Instance
What you actually want is to call “modifiy” on the series or study once it is fully received. As a consequence, please rather have a look at the following sample:
https://code.google.com/p/orthanc/source/browse/Resources/Samples/Lua/OnStableStudy.lua
HTH,
Sébastien-