Posts by vetmidi

    does it sounds good like this :

    ImportConverter4 = ifequal "%m","DX"; lua "process_us_images.lua"


    and a lua script :


    -- process_us_images.lua

    function mkdir(path)

    os.execute('mkdir "' .. path .. '"')

    end


    function convert_and_adjust_window_level(dicomPath, jpgPath, wc, ww)


    print("Converting and adjusting window level: ", dicomPath, jpgPath, wc, ww)

    end


    -- Main processing function

    function process_image(Data)

    local patientName = Data.PatientName

    local studyInstanceUID = Data.StudyInstanceUID

    local patientID = Data.PatientID

    local sopInstanceUID = Data.SOPInstanceUID


    local baseDir = 'C:\\Users\\xxxx\Dropbox\\xxxx\\'

    local dicomDir = baseDir .. patientName .. '\\' .. studyInstanceUID .. '\\'

    local jpgPath = dicomDir .. patientID .. '-' .. sopInstanceUID .. '.jpg'


    -- Ensure the directory exists

    mkdir(dicomDir)


    -- Example window level values, adjust as necessary

    local wc = 600

    local ww = 400


    -- Convert and apply window level

    convert_and_adjust_window_level(dicomPath, jpgPath, wc, ww)

    end


    thank you Marcel.
    It looks to me this is lua.
    I've never used lua in the ini file


    this is what I use :
    ImportConverter = ifequal "%m","DX"; mkdir C:\Users\xxxx\Dropbox\xxxx\%VPatientName\%VStudyInstanceUID\; save jpg to C:\Users\xxxx\Dropbox\xxxx\%VPatientName\%VStudyInstanceUID\%V0010,0020-%V0008,0018.jpg

    I don't know how to add the level to it.

    Hi,

    I would like to use my conquest instance as a MWL and send to it HL7 files generated by my PMS

    Can you help me and tell me how and where to send the HL7 files to conquest ?
    Is there a documentation for this ? Is it easy ?

    I'm ok to pay for some help if needed.
    thank you


    Kind regards

    Antoine

    thank you.

    I will go and read again ! Believe I did already but not deep enough.


    2) if Data.Modality=='DX' then end

    it means that modality filtering is has to be done only in a lua script ?

    Antoine

    Hi again,


    I tested it and I must do something wrong because I still have an error. I put the error and the dicom part later in this message if you can have a look to my mistake.


    Is there a way of filtering the modality on importconverter without lua ? Something like importmodality="" ?


    Can you also help me with the retryiing exportconverter. What is the exact formulation for : try once but do not retry ?


    And finally is there a variable with the patient name, something like %patientname ? for save as or mkdir to include the patient name ?


    thank you very much.


    *** lua syntax error [string "lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\\wo..."]:1: '<name>' expected near 'if' in 'lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\\work\\'..Data.SOPInstanceUID..'.jpg')'


    # Dicom Routing

    ImportConverter0 = mkdir C:\Users\PC\Dropbox\Etoy\RX_ETOY\%VStudyInstanceUID\; save jpg to C:\Users\PC\Dropbox\Etoy\RX_ETOY\%VStudyInstanceUID\%V0010,0020-%V0008,0018.jpg

    [lua]

    ImportConverter1 = lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\\work\\'..Data.SOPInstanceUID..'.jpg')

    Sorry to ask again.

    the script gives me an error, syntax error with a . or ' problem, I'm not sure.

    I've tried to changer Data:Script for Data.Script but it was not the solution.


    other question (I didn't find the solution on the manual or the forum)

    ExportModality0 = DX

    ExportStationName0 = NAME_MODALITY

    ExportCalledAE0

    ExportCallingAE0

    Can they be set for multiple exportconverter ? Or they have to be wrtitten for converter0 , converter1, etc ...


    And is it the same to write 4 exportconverter forward to nodes in 4 lines or in one line separeted by ";" ? It looked to me that on one line if one fails then the next on the line is not done ?


    And finally, is there something different to get images from ultrasound modality ? Because the modality see the conquest, the conquest see the modality but the is an error in the image export and no images in conquest DB.


    Thank you for the help.

    Antoine

    Dear Marcel

    thank you very much for this reply and example.


    I've tried to read a lot today about Lua scripts.

    they have to start with

    [lua] ?

    or not ?

    And lua scripts have to be written into the dicom.ini ?


    And in your example if I want to specify a path for a different folder how would you write it ?

    ImportConverter0 = lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\PATH\'..Data.SOPInstanceUID..'.jpg') end


    regards.

    Antoine

    Hi again, Marcel I've plaid with the HOROS preferences and it's working.


    May I ask something else :
    How to filter to transfert only DX ? something like that : ExportModality0 = DX

    And I know it's possible to convert automaticly Dx to jpeg and store them in a directory ? But I have no clue to write that easily.


    Thank you.

    Antoine

    Hi,

    I'm new to Conquest, not to PACS (DCM4CHEE).

    I've setup a server today.

    it works fine.

    I can send manually dicom files to other nodes in the local network

    I can send dicom files to the CONQUESTSRV2 node


    I've add intov the know dicom nodes the nodes I want to be able to retrieve and to be automatic forwarded. (example MYAE_TITLE)

    I've put into the dicom.ini from the windows manual :


    ForwardAssociationLevel = SERIES
    ForwardAssociationCloseDelay = 5
    ForwardAssociationRefreshDelay = 3600
    ExportConverters = 1
    DelayedForwarderThreads = 5
    ExportModality0 = DX
    ExportStationName0 = XX
    ExportCalledAE0 = CONQUESTSRV2
    ExportCallingAE0 = MYDX_NODE
    ExportConverter0 = forward to MYAE_TITLE


    In the logs I see the forwarding process starting. But I always get the error :
    Failed to send DICOM image(s) to host


    I've looked around but I don't know what to modifiy.


    Again I can send manually to that host (HOROS) without any problem.


    Thank you very much for the help.

    Antoine