Hi, I am wondering if it is possible for 'conquest dicom' to send the patient's data (examination number, name, date of birth, date of examination) to another database after he received the examination from the station?
Get patient information
-
-
Hi,
importConverters can run a lua script that in principle can load database drivers to write to whatever or run external executables. What database did you have in mind?
Marcel
-
I need 'conquest to make records in two databases, in its standard one and in mysql
-
Ok, you need to find a working lua mysql driver first. It is called luasql_mysql. I do not have a copy, though.
-
Is this one suitable? https://github.com/LuaDist/luasql-mysql
-
Yes it is.
You can use e.g. ImportConverter0 = recordinfo.lua
In that script all patient information is available as e.g. Data.PatientID
Marcel
-
Debug by using a print statement, its output goes to the console.
-
Where should this file ' recordinfo.lua' be placed so that everything works correctly
-
I've never written in LUA, so I don't understand a lot of things
-
code
ImportConverter0 = "\Conquest-DICOM-Server-master\lua\recordinfo.lua"
dicom log:
CONQUESTSRV1] *** Importconverter0.0 error: \Conquest-DICOM-Server-master\lua\recordinfo.lua
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_002000_14579035620000.dcm
[CONQUESTSRV1] *** Importconverter0.0 error: \Conquest-DICOM-Server-master\lua\recordinfo.lua
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_003000_14579035620001.dcm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
code:
ImportConverter0 = lua "print(Data.PatientID)"
dicom log:
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_003000_14579035620001.dcm
[CONQUESTSRV1] 0009703828
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_002000_14579035620000.dcm
[CONQUESTSRV1] 0009703828
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_003000_14579035620001.dcm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Is it possible to specify in the script that from is executed only once for one patient?
-
Hi,
first:
ImportConverter0 = lua/recordinfo.lua
second:
ImportConverter0 = process study after 10 by lua/recordinfo.lua("%VPatientID;%VSeriesInstanceUID")
This will call recordinfo.lua with the information in variable command_line after 10s
The filename of the script is defined from where dgate64.exe is.
Marcel
-
dicom_ini:
ImportConverter0 = lua\recordinfo.lua
log_conquest:
[CONQUESTSRV1] 0009703828
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_002000_14579035620000.dcm
[CONQUESTSRV1] 0009703828
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_003000_14579035620001.dcm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dicom_ini:
ImportConverter0 = process study by lua\recordinfo.lua
log_conquest:
[CONQUESTSRV1] Importconverter0.0: queued process stu - (single object of 0009703828) to lua\recordinfo.lua
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_002000_14579035620000.dcm
[CONQUESTSRV1] Added file: c:\users\tk\desktop\conquest-dicom-server-master\data\0009703828\1.3.46.670589.5.2.10.2156913941.892665339.860724_0001_003000_14579035620001.dcm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is not necessary for me to output this data to the terminal, I do this for debugging, I just want that when the server receives a survey, it makes a record in the database, at the moment it makes a record after each new file
-
Hi, by default process study delays 5 minutes. You have to pass some information to the call to be able to identify for which study the call is, Data is not defined then.
Marcel
-
Sorry for the stupid questions, as I am not familiar with LUA language, could you give an example or a link to the documentation for this service
-
Untested.
ImportConverter0 = process study after 10 by lua/recordinfo.lua("%VStudyInstanceUID")
recordinfo.lua
Sample lua scripts can be found in overview.lua or the windows manual.
Marcel
-
Thanks for the explanation
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!