Posts by SM1312

    Hi marcelvanherk

    I am using Conquest v1.5.0c webserver but with the exe of v1.5.0e.

    In the PHP code, I have a custom code to export data from CQ to destinations

    In the php.ini, I have the max_execution_time=480 (8 mins) to accomodate slow exports. Exporting to Elekta's Mosaiq is always slow and I don't know why.

    But the real issue is with such slow exports, I get an error from the PHP like this
    [{"destination":"DEST_NAME","error":"DICOM ERROR Protocol error 0 in PDU:Read"}

    In debug mode, sometimes in CQ's serverstatus log, I see this warning ReadAheadThread: warning - resolving deadlock due to erratic incoming order but no error.

    But the strange thing is all the data gets sent to the destination properly despite being slow and webserver returning error.

    Does CQ's application code has any default timeout for exports or something aside from the PHP settings?
    I don't know why this error is reported by the webserver and completely unsure how to debug or solve this?

    Any help would be appreciated? Thank you.

    marcelvanherk,

    Thank you. I have got it to work with the below:

    Hi marcelvanherk

    Sorry forgot to add the error message. here it is:

    JavaScript
    <b>Warning</b>:  Undefined array key 0 in <b>F:\Program Files\xampp\htdocs\api\dicom\posters.php</b> on line <b>135</b><br />
    <br />
    <b>Warning</b>:  Trying to access array offset on value of type null in <b>F:\Program Files\xampp\htdocs\api\dicom\posters.php</b> on line <b>138</b><br />
    <br />
    <b>Warning</b>:  Trying to access array offset on value of type null in <b>F:\Program Files\xampp\htdocs\api\dicom\posters.php</b> on line <b>138</b><br />
    *** lua run error posters.lua:4: bad argument #1 to 'write' (string expected, got nil) in 'dofile([[posters.lua]]);attachdicomfile([[C:\Users\username\AppData\Local\Temp\php3981.tmp]], [[]])'

    Hi marcelvanherk

    I am trying to use the webserver API to attach a new DICOM instance/file (/rs/attachdicom) into the server.

    In Nodejs, I have the below function (DICOM to be attached is read as a Buffer and sent)

    I couldn't get the request to attach dicom to be fulfilled as there is always some parsing issue with multipart content in attchdiomfile() function in posters.php].

    Temporarily I got it work using my own functions:

    PHP: posters.lua
    function fpoststow(path)
      local s = servercommand([[addimagefile:]]..path);
      iowrite(s or '')
    end

    Although my functions work, I would like to utilize the attachdicomfile function which you already provided.
    But I couldn't figure out what's wrong with the parsing of the multipart content!!!

    Am I doing anything wrong in building the request object for the POST request from Nodejs?

    Any help would be appreciated! Thank you.

    Hi marcelvanherk

    I have noticed few minor bugs in the webserver part of v1.5.0e (tested in Windows env).

    1) For move commands, index.php (line 237) passes null as default for source AE. But this in rquery.lua (line 157) its treated as an empty string because of the parsing in qido.php (line 158).

    Since its an empty string, local from = from or servercommand('get_param:MyACRNema')

    from is always an empty string because of which dicommove throws the error "AE not found".

    2) In rquery.lua, in some places, the output of the server command is passed directly to iowrite: iowrite(servercommand('lua:'..remotecode)).

    But this causes nil error in iowrite function when there is no command output.

    I have corrected them locally. Just listing them here, so you can add them to your next patch.

    Thank you.

    Hi marcelvanherk,

    Good afternoon. I am changing my existing Conquest installations to connect with MySQL Community Server 8.4.4.

    In MySQL 8.0, mysql_native_password is being disabled and from 9.0, its being removed completely in favour of caching_sha2_password.

    This being the case, Conquest can only connect with MySQL Server if its mysql_native_password

    How to make it work with caching_sha2_password?

    Any help would be appreciated. Thanks

    marcelvanherk

    In webserver/htdocs/api.dicom/posters.lua, there is already a function poststow(path) which takes filepath.
    I would like to add another similar function but instead of a filepath, it would take the binary dicom file content as argument.

    I could try this myself but I am not sure how to structure those remotecodes for such a function?
    If its not a bother, it would be very helpful if you could add such a function to the webserver.

    Thank you.

    Hi marcelvanherk

    Conquest Version: 1.5.0d

    When querying metadata, there is a minor incompatibility if the result is converted to JSON.

    The reason being the Value Representation for DS allows optional + at the start of either a fixed point number or a floating point number.

    Most of the programming languages don't care about the + at the front of a number but JSON treats it invalid.

    If metadata result has to be converted into a valid JSON, its quite tedious in JS or similar languages. But its quite simple in the C++ source code.

    I believe the issue can be rectified in the source Conquest-DICOM-Server/src/dgate/src/dgate.cpp

    by just adding this if (*q == '+') q++; after Line 7847 (Please verify this!!!)


    Would it possible to accommodate this change in a new minor release for [tt]dgate.exe[tt]?
    Thank you for your consideration.

    marcelvanherk

    When viewing the data (headers) in Conquest, I see the value without any problem.

    The problem is only when I query the webserver of Conquest. I am not sure whether the issue is with lua or php code inside \webserver\htdocs\api\dicom.

    I tried to call the specific getmetadata(...) function in rquery.lua from command line directly using dgate. But I believe the syntax is wrong and I can't get any result to debug this more.

    dgate64.exe "--lua:dofile(\"./webserver/htdocs/api/dicom/rquery.lua getmetadata <AETITLE> <STUDYUID> <SERIESUID> <INSTANCEUID>\")"

    Could you please look into this? Thank you.