Restriction Based image reterival

  • Hi


    Is there any way to put restriction that specific AET or Port only retrieve Axial, Sageital and Coronal images no volume data.


    I want this to save my bandwidth and Doctors in Clinics only need Axial, Sageital and Coronal images to view no volume data.


    Help Required.


    --HM

  • Can you please provide me the list of query convertors and filters with little bit example.


    I know that only the nodes registered on conquest can retrieve images from a study. But I need two things that I don't know if they can be done:


    1-Can I limit some nodes to query and retrieve only one type (eg.: a specific node can access only CR studies, another one which can query and retrieve only XA studies...)?
    2-Can I limit queries only to registered nodes? Only the registered nodes can retrieve the images, but all of them can query the existing studies. Is there any way to limit this?

  • Hi,


    here is a sample:


    [lua]
    QueryConverter0 = if Association.Calling='CRONLY' then Data.Modality = 'CR' end
    RetrieveConverter0 = if Association.Calling='CRONLY' then Data.Modality = 'CR' end


    Note that there is only converter 0 for these entries, so all commands have to be one line.


    Marcel

  • I used the following lines but get the following syntax error:


    [lua]
    QueryConverter0 = if Association.Calling ='MAYAM' then Data.Modality = 'CR' end
    RetrieveConverter0 = if Association.Calling ='MAYAM' then Data.Modality = 'CR' end


    Error
    [PACS] *** lua syntax error [string "if Association.Calling ='MAYAM' then Data.Modality = 'CR' end"]:1: 'then' expected near '=' in 'if Association.Calling ='MAYAM' then Data.Modality = 'CR' end'



    Please also guide me if i am wrong: QueryConverter0 command receive the query at server end and RetrieveConverter0 sends the modified result.


    Please provide some more details on QueryConvertors and also how can i use them in lua scripting (example please).


    --HM

  • Sorry,


    QueryConverter0 = if Association.Calling =='MAYAM' then Data.Modality = 'CR' end
    RetrieveConverter0 = if Association.Calling =='MAYAM' then Data.Modality = 'CR' end


    These converters modify the queries, i.e., they force a match for query and retrieve on CR only.


    Marcel

  • The lua script error is removed but query returns all the result regardless of Modality. I get CR as well CT and MRI on querying server in basis of Patient ID
    How can i do the same in lua scripting i mean i Query convertors will call lua file just like import convertors


    [lua]
    ImportConverter0 = dofile('storage.lua')
    QueryConverter0 = dofile (query.lua)
    RetrieveConverter0 = dofile(result.lua)


    query.lua


    if ( (Data.PatientID=='*') or (Data.PatientID=='') )then script('destroy') end;
    if Association.Calling =='MAYAM' then Data.Modality = 'CR' end



    Result.lua


    if Association.Calling =='MAYAM' then Data.Modality = 'CR' end


    Is this correct approach???


    --HM

  • One last thing if i want to add multiple Modalities then lua script will become


    QueryConverter0 = if Association.Calling =='MAYAM' then (Data.Modality = 'CR','MR') end
    RetrieveConverter0 = if Association.Calling =='MAYAM' then (Data.Modality = 'CR','MR') end


    and your statement is negated "These converters modify the queries, i.e., they force a match for query and retrieve on CR only". I am getting the complete list of Modalities against Patient ID

  • Hi,


    this modification only works at the series level. You will probably have to set ModalitiesInStudy as well to limit queries on the study level.


    if Association.Calling =='MAYAM' then Data.Modality = 'CR'; Data.ModalitiesInStudy = 'CR' end


    However, you can do only a single modality this way. You syntax to do more modalities is incorrect and I so not think there currently is a way to achieve this. The only thing I can think if is to use QueryResultConverter0 to invalidate the StudyInstanceUID and SeriesInstanceUID of results you do not like.


    QueryResultConverter0 = if Association.Calling =='MAYAM' and Data.Modality=='CR' then Data.StudyInstanceUID = 'xx'; Data.SeriesInstanceUID = 'xx' end


    Marcel

  • Thanks.....


    QueryConverter0 = if Association.Calling =='MAYAM' then Data.Modality = 'CR'; Data.ModalitiesInStudy = 'CR' end;if Association.Calling =='MAYAM' then Data.Modality = 'MR'; Data.ModalitiesInStudy = 'MR' end;


    RetrieveConverter0 = if Association.Calling =='MAYAM' then Data.Modality = 'CR';Data.ModalitiesInStudy = 'CR' end;if Association.Calling =='MAYAM' then Data.Modality = 'MR';Data.ModalitiesInStudy='MR' end;


    I get only MR no CR??

  • Yes,


    this approach only allows one modality, and you have just written the same item twice to different values.


    You can try to set ModalitiesInStudy to 'CR|MR' and not set Modality


    This would restrict the study query only but this might be enough.


    Marcel

  • Hi,


    I believe this is not possible now, although you can insert errors in the UIDs returned at series level and change the description, e.g. in your query converter file:


    if Data.Modality == 'MR' then
    Data.SeriesDescription = 'DO NOT USE'
    Data.SeriesInstanceUID = '0.0.0.0'
    end


    This will disable all MR at series level; you cannot hide them unfortunately.


    Marcel

  • Hi Marcel


    I have two questions :


    First Question ::
    If i create a following column in Database say DICOMSTUDIES table (0008,0054 RetrieveAETitle) . I manually set the value of this column. This column can have multiple values. Will you please guide in writing in lua script :: Whenever user queries PACS Server, the conquest first check the Requesting AET and return the result of all studies that match with the corresponding AET. In other words i want to include this AET check in every Q/R request forwarded to PACS.



    Second Question::


    I want to make some studies unavailable to doctors. I had created a column in database in DICOMSTUDIES table. (0008,0056 InstanceAvailability). I set its value NO. But even on Q/R operations the subject study is made available to doctors. I also want same check in worklist table. OR should i use Patient Status DICOM tag (0011,1010 PatientStatus).




    Please guide.


    --HM

  • Hi,


    you have to use dbquery to read a database in a script. There are samples on the distribution of how to use dbquery. If you want to stop access you can call reject() (1.4.19) or script('reject') (older) from the script.


    regards,


    Marcel

  • Hi Marcel


    I had gone through the user manual for dbquery and sql command. If possible will you please share some example of following scenarios.


    SQL Query :


    SELECT
    dicompatients.PatientID,
    dicompatients.PatientNam,
    dicompatients.PatientBir,
    dicompatients.PatientSex,
    dicomstudies.AccessionN,
    dicomstudies.ReferPhysi,
    dicomstudies.StudyModal,
    dicomstudies.StudyDate,
    dicomstudies.StudyTime,
    dicomstudies.StudyDescr
    FROM
    dicompatients
    INNER JOIN dicomstudies ON dicompatients.PatientID = dicomstudies.PatientID


    where dicomstudies.StudyModal = 'CT'


    and Secondly


    local a = sql("SELECT COUNT(PatientID) FROM DICOMPATIENTS");
    sql("INSERT INTO UserTable (CounterID,Val) VALUES ('CT',a) ");


    I wanted to insert some string and integer value data in tables.
    Is the second query correct. If possible for you please share some lua scripts that communicate with database.



    Please guide and share how can i write above query using dbquery command

  • From overview.lua:


    print(dbquery('DICOMPatients', 'PatientNam', 'PatientID LIKE \'2%\'')[1][1])


    I.e. dbquery return colums for records and rows for fields.


    and


    sql("INSERT INTO UserTable (CounterID,Val) VALUES ('CT',1) ON DUPLICATE KEY UPDATE Val=Val+1");


    you create lua methods to make the sql string.


    Marcel

Participate now!

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