Posts by SM1312

    marcelvanherk

    Thanks Marcel.


    I did try the above like:


    [lua]

    Association = local list = {}; local list2={}

    ImportConverters =1

    ImportConverter0 = list[Data.SeriesInstanceUID]= Data.SeriesInstanceUID; list2[Data.StudyInstanceUID]= Data.StudyInstanceUID

    EndAssociation = local f=io.open(list2[1], 'wt') f:write(table.concat(list, '\n') f:close()


    But I get lua error in the console, for the line io.open(list2[1], 'wt') as list2 is nil when I restarted the server after changing dicom.ini.
    I thought EndAssociation will only be called after something comes in. May be I am understanding incorrectly?
    Please guide on me to properly configure dicom.ini to record data in a single association.

    Also, could you please clarify one more thing?

    In ImportConverters or ExportConverters, can I call two scripts in one converter?

    Currently, I call a lua script like this:


    ExportConverters = 1

    ExportConverter0 = process series after 10 by F:\myApp\processSeries1.lua "%u"|"%i"

    Can I call two lua scripts instead of one in the same converter?

    Thank you.

    marcelvanherk

    >> You can just use processStudy, and write a simple query to extract all series in that lua file.

    But the issue with this is that it would retrieve all series belonging to that study. I want only those series which came in at the time before processStudy got triggered!!!

    marcelvanherk

    Ah alright which makes it so hard to get my use case right. ImportConverters works fine when a single series comes in.

    Code
    ImportConverters = 2
    ImportConverter0 = process series after 15 by F:\Programming\CORA\myDev\artemis-wspark\processSeries.lua "%u"|"%i"|"%V0020,000E"|"%V0020,000D"|"%V0008,0060"|"%V0008,103E"|"%V0018,1030"
    ImportConverter1 = process study after 30 by F:\Programming\CORA\myDev\artemis-wspark\processStudy.lua "%u"|"%i"|"%V0020,000D"|"%V0010,0010"

    processSeries and processStudy gets called in order when a single series comes in. So no problem.

    But wWhen multiple series' (say 3) come in, the current order is:


    processSeries - for series 1
    processStudy

    processSeries - for series 2

    processSeries - for series 3

    How I would like the order to be is:


    processSeries - for series

    processSeries - for series 2

    processSeries - for series 3

    processStudy


    I am not sure how to achieve my desired order with either ImportConverters or ExportConverters !!!? ||

    marcelvanherk

    What you can do to test is replace your two batch files by two lua files, and see if it fails in the same way. This would exclude a problem in WinExec itself. In lua the parameters are in command_line.

    As per suggestion, I replaced the batch files with lua scripts,

    Code
    ExportConverters = 2
    ExportConverter0 = process series after 15 by F:\myApp\processSeries.lua "%u"|"%i"|"%V0020,000E"|"%V0020,000D"|"%V0008,0060"|"%V0008,103E"|"%V0018,1030"
    ExportConverter1 = process study after 30 by F:\myApp\processStudy.lua "%u"|"%i"|"%V0020,000D"|"%V0010,0010"

    There is no issue with the scripts but now the order of their execution is not always the same.
    I expect the ExportConverter0 to be triggered first always and then ExportConverter1 but sometimes ExportConverter1 gets executed before ExportConverter0 (FYI - When I had batch scripts, this order issue never occurred even though the delay was just 5 seconds b/w series and study)
    I even increased the delay between the series and the study to 15 seconds yet the issue persists.

    This issue doesn't happen consistently. Sometimes it executes in order and sometimes it doesn't.
    Not sure how to resolve this! :/

    Any help would be appreciated. Thank you.

    marcelvanherk,

    Sorry, probably I wasn't clear with my issue:

    Now, I just have simple ExportConverter0 = process series after 10 by F:\myApp\processSeries.lua "%u" with just one argument.

    However, in the lua script file, I just try to get that argument and print it.

    Neither this

    Code
    local sender = ...
    print(sender)

    Nor this

    Code
    print(args[0])

    Works for me. I am not sure how to unpack the arguments.


    When I look it up, everything points to ... should be the way to unpack. Not sure what am I doing wrong?

    marcelvanherk


    Thanks for the suggestion.

    I tried calling lua script in ExportConverter.

    Code
    ExportConverter0 = process series after 10 by F:\myApp\processSeries.lua "%u" "%i" "%V0020,000E" "%V0020,000D" "%V0008,0060" "%V0008,103E" "%V0018,1030"

    In the lua script, I tried to access the arguments:


    Code
    local sender, patientid, seriesuid, studyuid, modality, seriesdescription, protocol = ...
    print(sender)
    print(patientid)
    print(seriesuid)

    But they are all nil.

    What am I doing wrong? Thanks

    Hi,


    I have two ExportConverters one at series level while the other is study level:


    Code
    ExportConverters = 2
    ExportConverter0 = process series after 10 by F:\myApp\processSeries.bat "%d" "%u" "%i" "%V0020,000E" "%V0020,000D" "%V0008,0060" "%V0008,103E" "%V0018,1030"
    ExportConverter1 = process study after 15 by F:\myApp\processStudy.bat "%u" "%i" "%V0020,000D" "%V0010,0010"

    processSeries.bat writes the series into a text file.


    processStudy.bat calls a Nodejs script with the study arguments.

    The above scripts work fine and they do the operations as intended 95% of the time.

    ISSUE:
    The below issue has been observed when multiple studies come at the same time to the Conquest Node.
    For example, say two studies come at the same time.

    Code: serverstatus
    22/03/2024 12:47:31 [MYNODE0] Exportconverter0.0: queued process ser - (single object of <Patient1>) to F:\myApp\processSeries.bat <Arguments>
    22/03/2024 12:47:31 [MYNODE0] Exportconverter1.0: queued process stu - (single object of <Patient1>) to F:\myApp\processStudy.bat <Arguments>

    Like the above entry, I see that both the studies have the ExportConverters queued.
    But sometimes, the second Export Converter: ExportConverter1 for one of the study never gets executed as the batch script processStudy.bat (PFA second image) never logs successful execution. There is no error messages from batch script too.

    I am not whether this is a Conquest issue or anything else. But just checking whether you have any idea to debug the execution of ExportConverters properly?

    Any help would be appreciated. Thank you.

    Hi,

    I am using MySQL as the database.

    I wanted to add the DICOM tag (0020,1208) - Number of Study Related Instances to dicomstudies table in MySQL as it's not available default.

    So, I modified dicom.sql file to include that tag as below:



    And I (Re)-initialized my database through GUI.

    I see the column now, but the values are NULL. I suppose this is because this tag is not a part of the DICOM's IOD but rather a query tag. But not sure how to set this up properly.

    Could you please guide me on this? Thanks.

    Hi,

    I am using DICOM Server version 1.5.0c and its web server.

    I am wondering whether it supports DICOM embedded documents like PDF or HTML etc.,

    Unfortunately, I can't test this as I don't have any such documents. I thought its better to ask?

    Any help would be appreciated. Thanks.

    Hi,

    I came across the below error which is quite infrequent and sporadic when I query the web server. Not sure why this occurs.



    Could you please guide me on how to debug this? Not familiar with Lua. Thanks.

    Hi,

    I am having a problem when querying the Conquest Web Server.


    When I try to get the instances using a GET query, http://127.0.0.1/api/dicom/rs/studies/<myStudyUID>, I get no response and it throws 500 error.

    But when I do, http://127.0.0.1/api/dicom/rs/studies/<myStudyUID>/series/<mySrUID> or http://127.0.0.1/api/dicom/rs/studies/<myStudyUID>/series/<mySrUID>/instances/<myInstUID>, these two give me proper responses.

    Just trying to query study instance doesn't give me a response.

    Could you please guide me on this? Thanks.

    Hi,

    When I query the DICOM Web Server for the studies in a DICOM node, there is a DICOM tag (0008, 0061) for each study which lists the modalities in that study.


    Say, for a study initially, the value for the tag is `CT\\RTSTRUCT\\RTPLAN`

    Now, I go and delete a series, say RTPLAN from that study. If I run the query again, I expect the value of the tag to be `CT\\RTSTRUCT` but instead it retains the initial value.

    This issue happens with the deletion of any series inside a study and while querying studies again, the DICOM tag (0008, 0061) isn't updated properly.

    How would I resolve this issue?

    Thanks.