Export converter with logging at image level

  • Hi Marcel,


    With export converter, I would like to log the each file after it is transmitted successfully to the destination.


    What is option in export converter to get notification at image level ( planning to call command line exe after each image transfer is done) when I try to forward the completed study/series.


    Thanks

    akhsuser.

  • Ok,


    "forward study" etc schedules a C-move. Every image sent triggers RetrieveResultConverter0. However, this is done before the image is sent. It is intended to allow e.g. processing of the data.


    Also use can pass a script to "forward study" (last parameter) that is called for each image. Again this is done before sending.


    The only one that gets acknowledgement of success is the move-client.


    Marcel

  • Thanks Marcel.

    I want to capture of acknowledgement of the success with use of move-client . can it be done in export converter or is it to be used in the lua script.

    Please send samples that receive acknowledgment with move client.


    Thanks

    akhsuser

  • Also i want to confirm this with you


    ExportConverters = 1

    ExportConverter0 = system "logforward.exe" %f;forward study to AKHSFTWS;


    In the above case, i am able to see logforward.exe being called for each image.

    I assume forward study happens only once.Is that correct?


    Actually i tried the same with lua script but it didn't work. what is the syntax in lua script replace system "logforward.exe".


    [lua]

    ExportConverters = 1

    ExportConverter0 = dofile(logforward.lua);forward study to AKHSFTWS;


    Thanks

    akhsuser

  • can you send this details, i would like to try this capture logs after image is sent at image level


    Thanks

    akhuser

  • Yes,


    1) a filter blocks identical forward requests,.


    2) ExportConverter0 = dofile("logforward.lua");script("forward study to AKHSFTWS")

    I tried with your syntax but exportconverter not fired at all.....


    this is my ini file.


    [sscscp]

    MicroPACS = sscscp


    # Network configuration: server name and TCP/IP port#

    MyACRNema = CONQUESTSRV1

    TCPPort = 5678


    # Host, database, username and password for database

    SQLHost = localhost

    SQLServer = C:\dicomserver150b\Data\dbase\conquest.db3

    Username = root

    Password =

    SqLite = 1

    DoubleBackSlashToDB = 0

    UseEscapeStringConstants = 0


    # Configure server

    ImportExportDragAndDrop = 1

    ZipTime = 05:

    UIDPrefix = 1.2.826.0.1.3680043.2.135.737931.77331817

    EnableComputedFields = 1


    FileNameSyntax = %v0008,0080\%studydate\%v0020,000d\%v0020,000e\%v0008,0018.dcm


    # Configuration of compression for incoming images and archival

    DroppedFileCompression = un

    IncomingCompression = un

    ArchiveCompression = as


    # For debug information

    PACSName = CONQUESTSRV1

    OperatorConsole = 127.0.0.1

    DebugLevel = 0


    # Configuration of disk(s) to store images

    MAGDeviceFullThreshHold = 30

    MAGDevices = 1

    MAGDevice0 = c:\dicomserver150b\data\


    # Configuration of forwarding and/or converter programs to export DICOM slices

    ForwardAssociationLevel = STUDY

    ForwardAssociationCloseDelay = 5

    ForwardAssociationRefreshDelay = 3600

    ForwardAssociationRelease = 1

    ForwardCollectDelay = 60

    MaximumExportRetries = 0

    MaximumDelayedFetchForwardRetries = 0



    [lua]

    ExportConverters = 1

    ExportConverter0 = dofile('c:/dicomserver150b/lua/forward.lua');script('forward study to AKHSFTWS')


    ImportConverters = 2

    ImportConverter0=dofile('c:/dicomserver/lua/f1.lua')

    ImportConverter1=dofile('c:/dicomserver/lua/f2.lua')

  • Sorry,


    script needs the image Data which is not loaded in an ExportConverter


    use this instead. Since the action of forward study is delayed it can be run on either import or export converters.


    ImportConverter2 = dofile('c:/dicomserver150b/lua/forward.lua');Data:Script('forward study to AKHSFTWS')


    Marcel

  • Thank you so much for your help.

    But i need to log the image data after it is forwarded successfully to the destination.

    With importconverter, logs being generated much before forward happens and this does not help my requirement


    1.Please send me how to achieve this with move client through scripts.

    2.I can make a lua file that does c-move. I could call the batch file.sample content of the bat file that triggers dgate to perform c-move really helps.

    3.Can't i have access association values in the export converter script?


    Thanks

    akhuser.

  • Hi


    1) forward study is delayed however you call it. The closest to a verification per image is "forward study to AE script lua:dofile('log.lua')"


    2) reading and parsing a file is basic lua code. See programming in lua.


    3) No, the association is closed by the time the export converter is called. There use an import converter.


    Marcel

  • In what language?


    But of course a forward is trigger by reception, so you cannot do that from an external program, it has to be a move. in the lua folder there are ample examples of doing it in lua (dicommove).


    Marcel

  • DICOM move options:

    --movepatient:source,dest,patid Move patient, source e.g. (local)

    --movestudy:source,dest,patid:studyuid Move study, patid: optional;

    --moveaccession:source,dest,patid:acc Move by Accession#, patid: optional

    --movestudies:source,dest,date(range) Move studies on date

    --moveseries:src,dst,patid:seruid,stuid Move series patid: optional

    --move:src,dst,p,st,ser,sop Move patient..image


    E.g. dgate64 --movepatient:CONQUESTSRV1,PACS,99001234


    No spaces allowed


    Marcel

  • Thanks for the answers.Much appreciated.


    I will try running the batch file with this. dgate64 --movepatient:CONQUESTSRV1,PACS,99001234.


    I have also checked about doing move using lua script.

    print('------ testing a C-MOVE --------')

    AE = 'CONQUESTSRV1';

    b=newdicomobject(); b.PatientName = 'HEAD EXP2'; b.QueryRetrieveLevel = 'STUDY'; dicommove('CONQUESTSRV1', AE, b);


    1. Is it possible to retrieve status of the dicom object in the script so i can do the logging with success/failed.?

    2.Can i run lua script via batch file.? if yes please write me simple syntax.


    Thanks

    akhsuser

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!