My Conquest Setup :: Dicom Routing/Failover/Load Balance

  • We altered the code so that the ImportConverter only fires when it comes across appropriate data. Here's the new version in case you want to share or use it for something in the future. Thanks. --Tim



    Code
    ImportConverter6 = if string.match(Data.PatientID, '^0') then Data.PatientID = string.gsub(Data.PatientID, '^0*', ''); print ('ImportConverter6.0 Modified PatientID to ', Data.PatientID) end


    In the example below, I sent two sets of images, PatientID 45056 and PatientID 000123465.


    First patient with no leading zeros

    Quote

    Wed Mar 30 14:21:29 2016 Importconverter0.0: nop CONQUESTSRV1 KPACS_TIM CT TEST1^TEST1 45056
    Wed Mar 30 14:21:29 2016 Written file: ./data/45056/
    Wed Mar 30 14:21:29 2016 Exportconverter0.1: nop KPACS_TIM CT 45056
    Wed Mar 30 14:21:29 2016 ExportConverter0.0: forward ./data/45056 to VMTEST_ARCHIVE


    Second patient with leading zeros

  • Hi Marcel. Do you know if there's a way to configure the import converter to convert all patient demographics to UPPERCASE?


    For instance ::


    a) if a name comes in as :: User, Test --> an import converter converts it to --> USER, TEST


    b) if a study description comes in as :: Head and Chest w/o --> an import converter converts it to --> HEAD AND CHEST W/O


    Thanks! --Tim

  • Hi Marcel,


    I tried to make up my own Lua string for this, however, I'm not sure that it's working. Would you mind weighing in on it? Thanks.



    Quote

    ImportConverter8 = if Data.StudyDescription:upper() ~= Data.StudyDescription then Data.StudyDescription = Data.StudyDescription:upper() end



    Ideally, it should look to see if the data field is already upper case, if not, it should make it upper case. --Tim

  • Hi,


    is must be in a [lua] section, and I would write it as follows (tested):



    if Data.StudyDescription and Data.StudyDescription:upper() ~= Data.StudyDescription then Data.StudyDescription = Data.StudyDescription:upper(); print(Data.StudyDescription) end


    Marcel

  • Thanks for the help Marcel.


    Made a modification by adding 2 functions in in [lua] string, plus printing the results with a more detailed description of the work it did.


    The part I don't understand is, why is this running with every single data import, rather than abiding by the IF statement and only running when data meets the correct criteria? Thanks. --Tim


    Code
    ImportConverter8 = if Data.StudyDescription and Data.StudyDescription:upper() ~= Data.StudyDescription then Data.StudyDescription = Data.StudyDescription:upper() end; print('ImportConverter8.0 Modified StudyDescription to ', Data.StudyDescription); if Data.PatientName and Data.PatientName:upper() ~= Data.PatientName then Data.PatientName = Data.PatientName:upper(); print('ImportConverter8.0 Modified PatientName to ', Data.PatientName) end

  • I think we got it.


    Code
    ImportConverter8 = if Data.StudyDescription and Data.StudyDescription:upper() ~= Data.StudyDescription then Data.StudyDescription = Data.StudyDescription:upper(); print('ImportConverter8.0 Modified StudyDescription to ', Data.StudyDescription) end; if Data.PatientName and Data.PatientName:upper() ~= Data.PatientName then Data.PatientName = Data.PatientName:upper(); print('ImportConverter8.0 Modified PatientName to ', Data.PatientName) end
  • Hi Marcel, we recently received some image data which was missing the MRN, DOB, Patient Name, and Gender (See below). It caused conquest to clog and not be able to process any additional images. We then attempted to delete that patient data via the DGATE command, however, that also didn't work.


    Conquest stored this data in a folder /conquest/data/unknown.


    I ended up having to manually move this patient image data to a temp directory to get Conquest moving again.


    What I would like to do is create a LUA script that automatically handles this type of problem in the future without causing any clogs.


    For instance, LUA script will look to see if these fields are empty or null...


    0010,0020 PatientID
    0010,0010 PatientName
    0010,0030 PatientBirthDate
    0010,0040 PatientSex


    If any of those fields are empty or null, then the LUA script will copy the patient image data into a temp directory, then delete the patient data out of the database via a DGATE script.


    My question is, is this possible?
    The main thing I'm unsure of is can LUA manipulate data on a file level, such as cp /conquest/data/unkown /conquest/temp/?
    Do you see any way that a script like this can be created, specifically the move part? Thanks! --Tim


    Unknown patient log in serverstatus.log


    unkown patient data dicom dump

Participate now!

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