Use of Conquest as an anonymization system

  • It is possible to use a Conquest DICOM server as reciever in a clinical department that anonymizes all data it recieves.
    This allows:

    1) Proper anonymization of even complex data (e.g. RT) changing all UIDs consistently
    2) Clinical users to inspect and modify the anonymization script - written in lua
    3) Sending data for different studies to one machine, using different AE titles to keep things apart.
    4) Integration of processed data into the anonymous patient data
    5) Let the clinical people use their systems to see the data - as it has been properly modified it does not clash
    6) Even potentially allows de-anonymization of processed data to put it back into the clinical DICOM archive

    This is the configuration - after setup Conquest as standard DICOM server (Save config - regenerate database) - you change these items in dicom.ini:

    ImportExportDragAndDrop = 1
    FileNameSyntax = %calledae\%id\%studydate\%seriesid\%sopuid.dcm
    ImportConverter0 = anonymize_script.lua

    You maybe need to change the location of log files as defined in anonymize_script.lua. Reversible anonymization will be part of version 1.4.17beta.


  • Thanks. The basics of this seem to work, but I can't seem to modify the FileNameSyntax. Well, I can modify it, but it doesn't do anything. Even the default you have listed does not seem to create that behavior. It looks like to me that the images should be organized into folders by series ID, but that doesn't seem to happen. Everything seems to be dumped into one folder named after the anonymized patient ID.

    Is there a way to change the folder organization of this function?

    Edit: I got this to work after I found the post about the "Incoming" folder feature. If I copy the study there, it works brilliantly and I can customize the folder hierarchy. However, it seems to behave oddly if I try to drag and drop into the GUI. Also of note, sometime it seems the drag to gui just doesn't work anymore on 1.4.17. It has always seemed very reliable in the past. But now sometimes it just seems to not do anything. Sometimes reinstalling as NT service works, but sometimes not.

  • A two way anonymization gateway is possible in many ways. E.g.,

    to anonymize: PACS --> GATEWAY --> DIRTYPACS
    to deanonymize: DIRTYPACS --> GATEWAY --> PACS

    These entries are needed in dicom.ini:

    ImportConverter0 = ifequal "%u", "PACS"; lua/anonymize_script.lua; forward to DIRTYPACSExportConverters=1ExportConverter0 = ifequal "%u", "PACS"; stop; forward to PACS script "lua/deanonymize_script.lua"

    All data from PACS is anonymized, stored in the conquest dicom server and forwarded to DIRTYPACS.
    All data incoming from other systems is stored in the conquest dicom server, and forwarded to PACS deanonymized

    Another setup is with just a conquest server to store the anonymized data:

    to anonymize: PACS --> CONQUEST
    to deanonymize: CLIENT(or drop files) --> CONQUEST --> PACS

    ImportExportDragAndDrop = 1
    ImportConverter0 = ifequal "%u", "PACS"; lua/anonymize_script.lua
    ExportConverter0 = ifequal "%u", "PACS"; stop; forward to PACS script "lua/deanonymize_script.lua"

    All data from PACS is anonymized, and stored in the conquest dicom server
    All data incoming from other systems is stored in the conquest dicom server, and forwarded to PACS deanonymized.

    This all works because CONQUEST keeps a database table with the conversion between the original and anonymized UIDs and IDs. In the second setup it is therefore essential NOT to share the SQL database, only the DICOM files.


  • Hi Marcel

    Thanks for the great tool to keep anonymized data on the conquest server. However, is there a way to query by old/real patient ID or name? What can you suggest the best way to achieve this?


  • Lucy,

    you can try to call the anonimisation script on the query data and query result data, e.g.,

    QueryConverter0 = lua/anonymize_script.lua
    QueryResultConverter0 = lua/deanonymize_script.lua

    But not all data are de-anonymized, so some queries may behave erratically.


  • Thank you, Marcel,

    I put these two sentences in and I tried to query by real patient name but I received the following error in anonymize_script.lua.

    [CONQUESTSRV1] UPACS THREAD 97: STARTED AT: Thu Mar 06 11:34:50 2014
    [CONQUESTSRV1] Calling Application Title : "CONQUESTSRV1 "
    [CONQUESTSRV1] Called Application Title : "CONQUESTSRV1 "
    [CONQUESTSRV1] Application Context : "1.2.840.10008.", PDU length: 16384
    [CONQUESTSRV1] Presentation Context 0 "1.2.840.10008." 1
    [CONQUESTSRV1] Presentation Context 1 "1.2.840.10008." 1
    [CONQUESTSRV1] Presentation Context 2 "1.2.840.10008." 1
    [CONQUESTSRV1] Presentation Context 3 "1.2.840.10008." 1
    [CONQUESTSRV1] *** lua run error lua/anonymize_script.lua:64: attempt to concatenate field 'SOPInstanceUID' (a nil value) in 'dofile('lua/anonymize_script.lua')'
    [CONQUESTSRV1] (PatientRootQuery) search level: PATIENT
    [CONQUESTSRV1] C-Find (PatientRoot) located 0 records
    [CONQUESTSRV1] UPACS THREAD 97: ENDED AT: Thu Mar 06 11:34:50 2014

    Also, I just want to return the anonymized data to the workstation which does the queries.


  • Marcel,
    Thank you. I modified the anonymize_script.lua as below and it now works fine on Conquest DICOM server GUI. But I can't get it working on the web mode. I even added these two queryconverter lines in the dicom.ini and it still doesn't work on the web page. Can you help? Thanks,

  • Hi,

    Many thanks for testing (I built this as a theoretical option but had not tried it myself) and for the update/fix. Some keys are required in a DICOM object but not in a query. So their presence needs to be tested.

    The web page (top 2 lines) uses a direct database query that does not go through DICOM queries and the scripts. The third line (find xxx on xxx) does a DICOM query and will go through the scripts. Can you check that that option works as requested? I have recently received a fully lua scripted version of the web interface (From Luiz) that uses only DICOM queries. Are you willing to have a look at that? Just pm me you mail.

    Another potential issue is that pattern matching on anonymized items in the query will of course not work.


  • HI Marcel,

    Thanks. I tired my third line query and unfortunately it doesn't return anything even when I leave blank. I tried to run server as NT service and it still doesn't return anything. Do I have a connection problem?


  • Yes, it was set correctly. I tried without these two QueryConverter lines and it worked fine on the query of anonymized data. After adding these two query lines, these are the only difference in server status logs:
    3/6/2014 7:39:53 PM [CONQUESTSRV1] Importconverter-1.0 executes: newuids

  • HI Marcel

    Another funny thing is that in the GUI, when I query by the real/old patient name, it returns the real patient name the first time but the second time I click query it shows the new/anonymized name. And the third time, it returns to real/old and so on and forth. I don't know what's going on? Here is my modified deanonymize lua file:


  • Hi,

    The log shows the anonymization is called. I think the issue is that the conquest function used to do the query gets mixed up if it returns something different than asked for.

    I think the trick needs a bit more thinking...


Participate now!

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