Posts by hammad

    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

    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?

    Sorry for the late reply. Please find my dicom.ini enteries


    MAGDevices = 6
    MAGDevice0 = D:\Images\
    MAGDevice1 = D:\QIH\
    MAGDevice2 = D:\UMC\
    MAGDevice3 = D:\AH\
    MAGDevice4 = D:\PMH\
    MAGDevice5 = D:\hY9\


    NightlyCleanThreshhold = 0
    NightlyMoveThreshhold = 0
    NightlyMoveTarget =



    ExportConverters =3
    ExportConverter0 = copy %f to D:\TestFolder
    ExportConverter1 = append "%d%t%t%t%u%t%t%t%i%t%t%t%s%n" to c:\log.txt
    ExportConverter2 = save jpg as C:\JPG\%i-%m.jpg


    [lua]
    ImportConverter0 = dofile('storage.lua')



    I wanted to know if i want to set a DICOM Tag of incoming Image and then forward it. Should i add these lines in the end or should i use lua to do the required tasks.


    [lua]
    ImportConvertor = 2
    ImportConverter0 = dofile('hammad.lua')
    ImportConverter1 = set 0008,0080 to "XXXXX"


    On running the above line i get the following error


    [PACS] *** lua run error [string "set (0008,0080) to "XXXXX""]:1: attempt to call global 'set' (a nil value) in 'set (0008,0080) to "XXXXX"'


    --HM

    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

    Marcel i also figure some strange working in the flow and sequence of converters. Instead of Export Converter 0 to be executed first 1 is executed first then 0 and in the last 2. Why is that?? Appended below is my server log:-



    [PACS] Monitoring for files in: D:\Images\incoming\
    [PACS] DGATE (1.4.17d, build Sun Mar 09 15:18:24 2014, bits 64) is running as threaded server
    [PACS] Database type: native MySQL connection
    [PACS] Started 3 export queue thread(s)
    [PACS] User interface test: local server is running!
    [PACS]
    [PACS] UPACS THREAD 1: STARTED AT: Thu Dec 10 21:59:49 2015
    [PACS] Calling Application Title : "DCMSND "
    [PACS] Called Application Title : "PACS "
    [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.1.1" 1
    [PACS] Importconverter-1.0: sets preferred storage to MAG1
    [PACS] [recompress]: recompressed with mode = jk (strip=1)
    [PACS] Written file: D:\QIH\10801\1.2.826.0.1.3680043.2.135.735925.9725531.7.1449071366.828.2_1001_001001_14498135930000.dcm
    [PACS] Exportconverter1.0 executes: append "Thu Dec 10 21:59:53 2015 DCMSND 10801 ru0 " to c:\incoming.txt
    [PACS] Exportconverter0.0 executes: copy D:\QIH\10801\1.2.826.0.1.3680043.2.135.735925.9725531.7.1449071366.828.2_1001_001001_14498135930000.dcm to D:\TestFolder
    [PACS] Exportconverter2.0 executes: save jpg as C:\JPG\10801-CR.jpg

    But as i mentioned in my case only export converters were executed not import one.


    Please update me is there any time difference between the execution of bot converters i mean import converters will run after x seconds after export or vice versa.

    Hi


    I had define three export converter that works fine . Details of Export converter is as follow:-
    1. First Export Converter copy incoming images to a specified folder
    2. Second Export Converter make a log file of the incoming dicom images.
    3. Third Export Converter make Jpeg of incoming dicom images


    All of the above three converters work fine. But when i add an Import Converter in the end of dicom.ini file that calls a lua script then Export Converters are executed but import converter don't call the lua script.


    My dicom.ini file is something like this



    ExportConverters = 3
    ExportConverter0 = copy files to folder
    ExportConverter1 = make log file
    ExportConverter2 = make JPEG



    [lua]
    ImportConverter0 = dofile('script.lua')


    And i also want to make one thing clear that Export Converter are always define before [lua] tag starts or i can define after the [lua] Import Converter ..........
    In this scenario the export converter is not executed just like import converter .


    Please also define the sequence in which both of them are define.


    --HM

    Yes they are same. No changes in the dicom.ini file.


    These large images are of DX and Mammo. Even i simply unzip these images and placed even single image in incoming folder i get the same error and even by sending via dcm4chee toolkit. When i send these Mammo images to Mayam using dcm4chee toolkit and throw the images from its archive to Server console the server accepts the same images. WHY IS THAT????


    I test this with all the images that give me error like Nuclear Medicine Images, Mammoo, DX and CR.


    --HM

    I am facing some issue of slow response and application hanging in new alpha release.


    The scenario is like this :-


    1. Copied dicom studies zip files and uncompressed in Conquest incoming folder (size almost 5GB)
    2. Push Dicom Studies (uncompressed size almost 2 GB) using dcm4chee toolkit
    3. Push Dicom Studies (uncompressed size almost 2 GB) again using dcm4chee toolkit
    4. Push Dicom Studies (uncompressed size almost 650 MB) using EFILM
    5. Push Dicom Studies (uncompressed size almost 1 GB) using MAYAM
    6. Push Dicom Studies (uncompressed size almost 1 GB) using Clear Canvas Workstation
    7. Query and Retrieve studies from conquest using MAYAM, EFILM, KODAK MXR, VITREA , Clear canvas and Weasis (via web interface)


    And sometimes i also get this error message on server console :
    "[PACS] ***VR:ReAlloc out of memory allocating 1342177280 bytes
    [PACS] ***A fatal error occurred (out of memory) - closing server";


    I restarted the server by clicking on "KILL AND RESTART SERVER" but no success until i close the whole application and start the application again.


    At the time of error CPU utilization was around 45% and RAM used was around 55% to 75%.


    But same test works fine with the older versions.


    --HM

    Is this correct ???


    in dicom.sql
    { 0x0009, 0x1234, "HOSPID", 10, SQL_C_CHAR, DT_STR },


    hammad.lua file


    iif Data.InstitutionName == 'ABC Hospital' then
    Data.Storage='MAG2'


    print('------ testing an SQL statement --------')
    print ('Hospital Name is :'..Data.InstitutionName);
    print ('Study Instance Saved is :'..Data.StudyInstanceUID);
    print ('*****************************************************');
    print ('**********Start of Sql Statement***********************');
    print ('******************************************************');
    sql("UPDATE DICOMSTUDIES SET HOSPID= 'ABCH' where dicomstudies.StudyInsta='Data.StudyInstanceUID'");
    print ('******************SUCCESS************************************');
    --sql(format("UPDATE dicomstudies SET Data['0009,1234']='ABCCH' where dicomstudies.StudyInsta='%s', Data.StudyInstanceUID));


    end


    Records are not updated and I get no errors but as all statements are executed. Please guide me.
    --HM

    Hi


    I had created a new column HOSPCODE in database table name DICOMSTUDIES. Now i want to set the value of HOSPCODE on the basis of Hospital Name. My entry in dicom.ini file is as below:-


    [lua]
    global = print ('hello world');


    ImportConverter0 = if Data.InstitutionName == 'ABC Children Hospital' then Data.Storage='MAG2' and set HCODE to "ABCCH" and Data.Modality == 'CT' then Data:Compress('jk') end;



    or i should write each separate importconvertor like this.


    [lua]
    global = print ('hello world');


    ImportConverter0 = if Data.InstitutionName == 'ABC Children Hospital' then Data.Storage='MAG2' end;
    ImportConvertor1 = if Data.InstitutionName == 'ABC Children Hospital' then set HCODE to "ABCCH" end;
    ImportConvertor2 = if Data.InstitutionName == 'ABC Children Hospital' and Data.Modality == 'CT' then Data:Compress('jk') end;


    In this way i uses 3 Importconvertors to perform the same task and i want to avoid this due to the limitation of Importconvertor (i.e Importconvertor 1 to 99). Please guide me how can i use nested IF statements in lua.