DICOM Logging

  • Hi


    I am working on trying to log every Query and Retrieve made by user on Conquest PACS Server in database. For testing purpose i am just trying to log the Query function first.


    my dicom,in files look like this:-


    [lua]
    QueryConverter0 = dofile('query.lua')


    query.lua look like


    --Get the Patient ID
    local PatientID = Data.PatientID


    --Get the Patient Name
    local Name = Data.PatientName


    --Get the Accession Number
    local AccessionNo = Data.AccessionNumber


    --Get the IP Address
    local IP = Association.ConnectedIP


    --Get the Called AET
    local CalledAET = Association.Called


    --Get the Calling AET
    local CallingAET = Association.Calling


    --Get Study Description
    local desc = Data.StudyDescription


    --Get Modality
    local modality = Data.Modality


    --Get the Current Date
    date = os.date('%Y'..'/%m/'..'%d')


    --Get the current Time
    local time = os.date("*t")
    time = ("%02d:%02d:%02d"):format(time.hour, time.min, time.sec)


    print ("Time is "..time)
    print ("Date is "..date)
    print ("Called AET is "..CalledAET)
    print ("Calling AET is "..CallingAET)
    print ("Patient ID is"..PatientID)
    print(" Patient Name is"..Data.PatientName)
    print ("IP Address is"..IP)
    print ("Study Description is "..desc)
    print (" Modality is "..modality)


    and Conquest console looks like


    PACS] UPACS THREAD 2: STARTED AT: Sun May 14 18:48:35 2017
    [PACS] Calling Application Title : "RADIANT "
    [PACS] Called Application Title : "KPACS "
    [PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
    [PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
    [PACS] Time is 18:48:35
    [PACS] Date is 2017/05/14
    [PACS] Called AET is KPACS
    [PACS] Calling AET is RADIANT
    [PACS] Patient ID is*A1234*
    [PACS] Patient Name is
    [PACS] IP Address is0.0.0.0
    [PACS] Study Description is
    [PACS] *** lua run error db.lua:40: attempt to concatenate local 'modality' (a nil value) in 'dofile('db.lua')'
    [PACS] (StudyRootQuery) search level: STUDY
    [PACS] C-Find (StudyRoot) located 1 records
    [PACS] UPACS THREAD 2: ENDED AT: Sun May 14 18:48:35 2017
    [PACS] UPACS THREAD 2: TOTAL RUNNING TIME: 0 SECONDS


    Issue is that i am not getting the IP Address of the Calling Client, Patient Name, Study Description and Modality.
    If i made a query on basis of date then the script only shows the data of the first record and in end it shows that 36 studies found. Not all the data is shown.


    Please guide why the above mentioned data is not displaying and secondly how can i log all the queries that are made to the server. And secondly, can i use the same script with the name retrieve.lua and will it shows the data of retrieve query results.


    In simple i wanted to made an Audit report which can be submitted to Management as required and when needed.


    --HM

  • You mean, if the user queried the PACS on Patient Name then data tags the subject tag information not the rest of the tags?


    Is there any way to get the remaining tags and beside this approach is there any other way to audit what users are Q/R from PACS.


    --HM

  • You are right the calling AE can tell me which user is performing Q/R on the server. But here in my setup the juniors doctors when free randomly queries the PACS and retrieve the images which are not of their concern. Sometimes they also take the picture of the scan from their camera and use them in their presentation without our knowledge or prior approval. Thats why i am working on this logging mechanism.


    So, that whenever a user is caught with such act we can show him/her that what they were Q/R and what Patient Scans they retrieve.


    --HM

Participate now!

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