Posts by jaimerojast

    Hi Marcel,


    For a long time I had this problem, that when from OSIRIX / HOROS I was looking for multiple modalities, the conquest showed nothing.


    Searching the manual, I found the QueryResultConverter0, and did the following:



    dicom.ini

    Code
    1. QueryConverter0 = queryconverter.lua
    2. QueryResultConverter0 = queryresultconverter.lua


    queryconverter.lua

    Code
    1. modalities=Data.ModalitiesInStudy
    2. if string.find(Data.ModalitiesInStudy,'\\') then
    3. Data.ModalitiesInStudy=""
    4. end


    queryresultconverter.lua

    Code
    1. if string.find(modalities,'\\') then
    2. if not string.find(modalities,Data.ModalitiesInStudy) then
    3. destroy()
    4. end
    5. end


    At least it works for me until now.

    I wanted to know if you can give me some additional suggestions to make sure everything goes well.

    Thank you,


    Jaime.

    Marcel,


    it's work!, thnks!


    Code
    1. local state = servercommand('echo:SERVER2')
    2. if string.find(state,'DOWN') then
    3. print(state)
    4. script('reject')
    5. end
    6. if string.find(state,'UP') then
    7. script('forward to DICOMSRV001 channel *')
    8. end


    but, i don't understand yet, how could be used this:


    Quote

    [lua]

    association = local flag

    have you an example with more details?


    thnks for you help...


    James

    Marcel,


    First, say hello and I hope you are very well.


    I need your help, you could tell me how to control a disconnect error when I do an Import please.


    when this error occurs, or similar:


    "Forward failed to connect to host"


    i need to send a reject command for to stop the forward in progress.


    It's posible something like this?


    ImportConverter0 = ifnoterror {forward to DICOMSRV1 channel *}, reject;

    if not script("forward to DICOMSRV1 channel *") then script('reject');


    it's just an idea as an example


    or a try catch or something..


    thanks for your help

    regards

    Marcel,


    Find a way for the blocked AETITLE to appear. I do not know if it is the most appropriate, but, it serves me for now.


    deivr.cxx file


    Function


    BOOL DicomError(int error, const char *message, int info)


    Before


    Code
    1. printf("DICOM ERROR "); printf(message, info); return FALSE;


    Now


    Code
    1. printf("DICOM ERROR "); printf(message, info); char msgerror[500]; sprintf(msgerror, "DICOM ERROR %s\n", message); OperatorConsole.printf(msgerror); return FALSE;


    With this change the message appears, and others that did not appear.


    I also managed to locate where the message "Calling AE title not accepted" came from and also did some tests, and also worked.


    pdu.cxx file.


    Function


    BOOL PDU_Service :: InterogateAAssociateRQ()


    Before


    Code
    1. char *msg = "Calling AE title not accepted: "; char *aet = (char*)AAssociateRQ :: CallingApTitle; char msgshow[100]; sprintf(msgshow, "%s%s", msg, aet); DicomError(DCM_ERROR_ASSOCIATION, msgshow, 0); return ( FALSE );


    With added code


    Code
    1. char *msg = "Calling AE title not accepted: ";
    2. char *aet = (char*)AAssociateRQ :: CallingApTitle;
    3. char msgshow[100];
    4. sprintf(msgshow, "%s%s", msg, aet);
    5. DicomError(DCM_ERROR_ASSOCIATION, msgshow, 0);
    6. OperatorConsole.printf(msgshow);
    7. return ( FALSE );


    And worked well too.


    For now I'll keep changing the file deivr.cxx.


    Of course, I'm awaiting me what you suggest it, to make it more optimal.


    Regards,


    James.

    Hi,


    I would like to limit access by registering the AETITLES in the file dgtesop.lst with RemoteAE, my question is, it may appear in the log which is the AETITLE that is blocking?


    Example: *** multiplex: connection terminated [CONQUESTSVR1]


    In this case CONQUESTSVR1 would not be registered in the dgtesop.lst file with Remote AE.


    I have examined the code, and I still can not put that record.


    Currently it is like this:


    Code
    1. OperatorConsole.printf ("*** multiplex: connection terminated\n");


    Could there be anything like this?


    Code
    1. OperatorConsole.printf ("*** multiplex: connection terminated [%s]\n", CallingApTitle);


    Regards,


    James.

    Hi,


    Here are more examples.


    Sintaxis: --modifystudy:patientid,studyid,script


    PatientID -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0020 to \"1122334-4\"; "
    PatientName -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0010 to \"JHON^REDS\"; "
    PatientSex -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0040 to \"M\"; "
    PatientBirthDate -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0030 to \""19620323\"; "
    AccessionNumber -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0050 to \"77777\"; "
    StudyDate -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0020 to \"20160920\"; "
    StudyTime -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0030 to \"133000\"; "
    StudyDescription -> ./dgate --modifystudy:1122334-4,81617,"set 0008,1030 to \"RX Abdomen\"; "
    ReferPhysician -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0090 to \"ReferPhysician\"; "
    Modality -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0060 to \"CR\"; "


    regards,


    James.

    lua code after a studio is fully imported?
    Sent: Fri Nov 25, 2016 5:56 pm
    by jaimerojast


    Dear Marcel,


    A question, how can I run a lua code after a studio is fully imported?


    It's possible?


    Regards,


    James.


    Re: lua code after a studio is fully imported?
    Sent: Sat Nov 26, 2016 12:15 pm
    From: marcelvanherk
    To: jaimerojast


    Hi


    process study after 300 by test.lua %VStudyInstanceUID


    Starts after 300 s, the StudyInstanceUID shows up as command_line.


    Marcel

    get file size from dicomimages table
    Sent: Sat Nov 26, 2016 12:21 pm
    by jaimerojast


    Master,


    Is it possible to get the file size from the dicomimages table?


    Or how can I do it?


    Regards,



    Re: get file size from dicomimages table
    Sent: Sun Nov 27, 2016 10:22 am
    From: marcelvanherk
    To: jaimerojast


    Hi,


    it is not, unless you can calculate it from Rows and Columns ;->>>>


    I would prefer if you post these questions on the forum, my forum mailbox is very small and it fills. Also other can use the answers.


    Marcel

    Hi Marcel,


    I have a problem with Lua Script. I dont know why i can't to make this work. :(


    Am using ubuntu 14 x64 y apache 2.4.7.


    In my cgi-bin directory, this files exists:


      acrnema.map
      dgate
      dicom.ini
      dicom.sql
      sample.lua


    The apache conf file, have this


    Code
    1. ScriptAlias /cgi-bin/ /server/conquestdicom/webserver/cgi-bin/ <Directory "/server/conquestdicom/webserver/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted </Directory>


    Inside dicom.ini, i put this:


    Code
    1. [sample]source = sample.lua


    This is the url to navigate : http://192.168.1.22:8080/cgi-bin/dgate?mode=sample


    this is the contents of sample.lua


    HTML
    1. HTML('Content-type: text/html\n\n')print([[<!DOCTYPE html>]])print([[<html>]])print([[<head> <title>sample 1</title> <meta charset="UTF-8"/></head>]])print([[<body>]])b=newdicomobject(); b.PatientName = '*'; a=dicomquery('CONQUESTSRV1', 'PATIENT', b);print('patientname: ',a[0].PatientName);print('ACR: ', get_amap(0),[[</br>]])print([[</body>]])print([[</html>]])


    and when browsing the website, this is the source from the page



    in the command line i run this


    Code
    1. ./dgate --luastart:"dofile('webserver/cgi-bin/sample.lua')"


    and serverstatus.log show this



    i run this to


    Code
    1. ./dgate --dolua:"b=newdicomobject(); b.PatientName = '*'; a=dicomquery('CONQUESTSRV1', 'PATIENT', b);print('patientname:', a[0].PatientName);"


    and return


    Quote

    patientname: XXXXXXXX.


    apparently, some error occurs with cgi, since HTML code is shown truncated.


    what is i need to configure that LUA work correctly?


    help me, please..


    Regards,


    James.

    Thnks Marcel,


    It worked!


    dgate64 --deleteimagefile:E:\CONQUEST\data\09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm



    [CONQUESTSRV1] Server command sent using DGATE -- option
    [CONQUESTSRV1] Deleting database entry for image: E:\CONQUEST\data\09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm
    [CONQUESTSRV1] Removed file: [MAG0:09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm]



    Regards..

    Hi Marcel,


    Might you help me with this command please... I tried to find the correct way to remove an image file , but nothing has been good to me ....



    i run this..


    dgate64 --deleteimagefile:09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm



    but in the logs, appears this..


    [CONQUESTSRV1] Server command sent using DGATE -- option
    [CONQUESTSRV1] ***[DeleteImageFile] 09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm -FAILED: Error on Load



    regards..

    Marcel, how i could enable the delete link on the conquest web?


    The manual appears thus: "the delete link to remove the current series (not enabled by default)"


    Thank you very much for your help ...


    Jaime.

    Hello Marcel,


    I´m trying to connect from another viewer and when I do a Query/Retrieve I receive this error:



    [MYPACS] UPACS THREAD 210: STARTED AT: Fri Aug 31 16:26:41 2012
    [MYPACS] A-ASSOCIATE-RQ Packet Dump
    [MYPACS] Calling Application Title : "SE "
    [MYPACS] Called Application Title : "MYPACS "
    [MYPACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 32768
    [MYPACS] Number of Proposed Presentation Contexts: 2
    [MYPACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
    [MYPACS] Presentation Context 1 "1.2.840.10008.5.1.4.1.2.2.2" 1
    [MYPACS] Server Command := 0020
    [MYPACS] Message ID := 0001
    [MYPACS] (StudyRootQuery) search level: STUDY
    [MYPACS] Query On Study
    [MYPACS] Queried item 0008 0005 is not in the database
    [MYPACS] Issue Query on Columns: DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.StudyModal, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.StudyInsta, DICOMStudies.StudyID
    [MYPACS] Values: DICOMStudies.AccessionN = E'900565'
    [MYPACS] Tables: DICOMStudies
    [MYPACS] Sorting (DICOMStudies.PatientNam) DoSort := 1
    [MYPACS] Records = 1
    [MYPACS] C-Find (StudyRoot) located 1 records
    [MYPACS] Server Command := 0020
    [MYPACS] Message ID := 0002
    [MYPACS] ***(Imp) Encountered an invalid group order during load of DCM file (after 00201209)
    [MYPACS] ***Client Error: command 0020 failed **
    [MYPACS] ***Connection Terminated
    [MYPACS] 0000,0002 28 UI AffectedSOPClassUID "1.2.840.10008.5.1.4.1.2.2.1"
    [MYPACS] 0000,0100 2 US CommandField 32
    [MYPACS] 0000,0110 2 US MessageID 2
    [MYPACS] 0000,0700 2 US Priority 0
    [MYPACS] 0000,0800 2 US DataSetType 258
    [MYPACS] 0002,0010 17 UI TransferSyntaxUID "1.2.840.10008.1.2"



    Can you help me to find out what it is?


    Regards.

    Hello Marcel,


    am from chile, and i have a litle problem with a query/retrieve from efilm.


    look, when efilm make a query by modality, ex: CR, the conquest server tellme this:


    [OSSIS] UPACS THREAD 10: STARTED AT: Thu Jun 28 17:17:37 2012
    [OSSIS] A-ASSOCIATE-RQ Packet Dump
    [OSSIS] Calling Application Title : "OSSIS_RX"
    [OSSIS] Called Application Title : "OSSIS"
    [OSSIS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 64234
    [OSSIS] Number of Proposed Presentation Contexts: 6
    [OSSIS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.3.1" 1
    [OSSIS] Presentation Context 1 "1.2.840.10008.5.1.4.1.2.3.2" 1
    [OSSIS] Presentation Context 2 "1.2.840.10008.5.1.4.1.2.2.1" 1
    [OSSIS] Presentation Context 3 "1.2.840.10008.5.1.4.1.2.2.2" 1
    [OSSIS] Presentation Context 4 "1.2.840.10008.5.1.4.1.2.1.1" 1
    [OSSIS] Presentation Context 5 "1.2.840.10008.5.1.4.1.2.1.2" 1
    [OSSIS] Server Command := 0020
    [OSSIS] Message ID := 0003
    [OSSIS] (StudyRootQuery) search level: STUDY
    [OSSIS] Query On Study
    [OSSIS] Queried item 0008 0080 is not in the database
    [OSSIS] Queried item 0008 1040 is not in the database
    [OSSIS] Issue Query on Columns: DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.StudyModal, DICOMStudies.ReferPhysi, DICOMStudies.StudyDescr, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.PatientSex, DICOMStudies.StudyInsta, DICOMStudies.StudyID
    [OSSIS] Values: DICOMStudies.StudyDate >= E'20120628' and DICOMStudies.StudyDate <= '20120628' and (DICOMStudies.StudyModal = E'CR' or DICOMStudies.StudyModal LIKE ''CR\\\\%' or DICOMStudies.StudyModal LIKE '%\\\\'CR\\\\%' or DICOMStudies.StudyModal LIKE '%\\\\'CR')
    [OSSIS] Tables: DICOMStudies
    [OSSIS] Sorting (DICOMStudies.PatientNam) DoSort := 1
    [OSSIS] ***Failed SQLExecDirect : SELECT DISTINCT DICOMStudies.StudyDate, DICOMStudies.StudyTime, DICOMStudies.AccessionN, DICOMStudies.StudyModal, DICOMStudies.ReferPhysi, DICOMStudies.StudyDescr, DICOMStudies.PatientNam, DICOMStudies.PatientID, DICOMStudies.PatientBir, DICOMStudies.PatientSex, DICOMStudies.StudyInsta, DICOMStudies.StudyID FROM DICOMStudies WHERE DICOMStudies.StudyDate >= E'20120628' and DICOMStudies.StudyDate <= '20120628' and (DICOMStudies.StudyModal = E'CR' or DICOMStudies.StudyModal LIKE ''CR\\\\%' or DICOMStudies.StudyModal LIKE '%\\\\'CR\\\\%' or DICOMStudies.StudyModal LIKE '%\\\\'CR') ORDER BY (DICOMStudies.PatientNam)
    [OSSIS] ***Error: 7: 42601: ERROR: error de sintaxis en o cerca de «CR»; Error while executing the query
    [OSSIS] ***Error: 7: 42601: ERROR: error de sintaxis en o cerca de «CR»; Error while executing the query
    [OSSIS] C-Find (StudyRoot) located 0 records
    [OSSIS] UPACS THREAD 10: ENDED AT: Thu Jun 28 17:17:37 2012
    [OSSIS] UPACS THREAD 10: TOTAL RUNNING TIME: 0 SECONDS



    may you help me please.


    PD: with 1.4.15 version not happend. sorry for my english, is very basic.