Posts by simjo

    Hi,

    For the purpose of a scientific study I have to anonymize some series of one study and transfer them into different independent studies. The user may not know that the series belonged to the same study prior to anonymization.

    I managed to split the original study into different studies with each one of the original series and anonymize them. I did this using the following importconverter:

    Code
    ImportConverter0 = lua "dofile('lua/anonymize_scriptCS3D1.lua')" 

    and the essential part of this lua file is as follows

    The seriesDescriptions in the code are just for testing purposes as I use with a simple study with just three series to test my code.

    This importconverter gives me three studies with one series each but they are still linked to the same patient.

    In the next phase I need to change the patient for each of the studies in such a way that one can no longer see that they originally belonged to the same patient.

    I try to do this with a second importconverter

    Code
    ImportConverter1 = process series after 10 by lua/anonymize_scriptCS3D2.lua %VAccessionNumber,%VStudyInstanceUID

    The main content of this second lua file is as follows

    Code
    local AccessionNumber
    local SeriesDescription
    AccessionNumber, StudyInstanceUID = command_line:match("([^,]+),([^,]+)")
    os.execute("c:/anonymizer/dgate64.exe --modifystudy:,"..StudyInstanceUID..",\"set 0010,0020 to \"PAT_"..AccessionNumber.."\"\"");

    I also tried a variant of this with "newuids" but none of these attempts was successfull. All studies still have the same patient in common.

    Is there a way of changing the patientid of different studies belonging to one patient so that in the end each study belongs to its own independent patient?


    Johan

    So the correct syntax is

    lua “Data.StudyInstanceUID = changeuid(Data.StudyInstanceUID, ‘345’)”
    Just out of intrest, what is the rationale behind the syntax changeuid(olduid, newuid)? Why not just writing changeuid(newuid)? After all, it’s clear that I know the newuid, so what is the function of the olduid as a parameter?

    Johan

    Hi,

    I’m trying to use changeuid in order to modify the studyuid.

    I’m using the following importconverter (just a test so I know this is a bad uid):

    lua “changeuid(Data.StudyInstanceUID, ‘345’)”


    When I look in the mysql database I see that an entry was made in a table called uidmods.

    It gives me the olduid and the new uid as expected.

    But when I look into the dicomheader I see that the old uid is still present.

    What am I doing wrong and why is the old uid not replaced by the new one?


    I’m using windows and conquest 1.4.19b


    Johan

    Hi,

    I use Conquest 1.4.19b together with the anonymization script.

    Everything works fine but when I send large studies to Conquest, I get a MySQL error

    20180712 11:19:23 ***Cannot connect to MySQL on port 3306

    20180712 11:19:23 ***MySQL Error message: Can't connect to MySQL server on 'localhost' (10048)

    I might be wrong but i think this has to do with too many connections to the database being open, hence no new connections to the database can be made.

    I searched the internet and the suggestion there is to make changes in the registry. (increase the MaxUserPort and decrease the TcpTimedWaiteDelay as described in the Conquest Windows manual for MariaDB)

    Anyway, I now find a number of dicom files in a subdirectory called "Empty" of the Data-directory.

    What is the purpose of this directory? Is it to store dicom files for later reprocessing or does it serve another purpose?


    Johan Simoen