RadiAnt DICOM Viewer - Discussion Forum
automatically extract patients data from DICOM tags

hi there,
is there any way I can automatically extract some patients data (name, DOB, ID) from the currently viewed case in RadiAnt and save them as a text string?

actually you can inspect those data from DICOM tags panel (Ctrl+Alt+T) select them and copy them one by one with Ctrl+C and Ctrl+V

I'd like to create a script that automatically copies them all together and assembles them in a string with this format

PATIENT NAME_DATE OF BIRTH_DATE OF EXAM

my aim is to link the images viewed in RadiAnt to my report templates which follow the same format.

If I'm able to obtain such a string from the study viewed in RadiAnt it will be easy for me to have a custom script that loads the report template that corresponds to that patient

so the question is, command line parameters of RadiAnt may help me doing this?


Nov 6, 2015 01:09 PM
by Tommy
to make a more concrete example

I have a MICKEY MOUSE_110134_061115_mri.doc
which is the report template for the MRI exam of MICKEY MOUSE (date of birth 11-01-34) (date of exam 06-11-2015)

ideally loading the DICOM images in RadiAnt and running my script I want to extract the data of the current exam from the DICOM tags, then assemble into a text string which is the filename of the template report .doc file I wanna load


Nov 6, 2015 03:36 PM
by Tommy
an alternative and maybe easier approach could be acting the opposite direction...
I already have the patients data in my report template...

is there any way I can create a script that extract the patient data from the report template and the loads the corresponding images in the RadiAnt viewer?


Nov 7, 2015 07:13 AM
by Tommy
in the manual I see these interesting command line examples...

-pstv

Start downloading studies that match a specific DICOM tag/value pair (radiantviewer.exe -pstv 00080050 "1412-14-ACCESSION-NUMBER" or radiantviewer.exe -pstv 0020000D "1.4.24.2.1107.STUDYUID")


-paet


Start downloading studies from the specific PACS host, matched by the AE title (radiantviewer.exe -paet MYPACSAETITLE -pstv 00100020 "23874623-PATIENTID")


-tg

Export DICOM meta data to text files (radiantviewer.exe -d folder_in -tg folder_out)


a few questions:

1- which is the exact different between "pstv" and "paet" ? consider that I have a single PACS archive but multiple RadiAnt installations on different PCs. which one best fits my setting?

2- does the "tg" command extract the full list of DICOM tags or is it possible to extract selectively only those you need?






Nov 7, 2015 07:23 AM
by Tommy
after playing with command line I was able to extract the DICOM tags as a .txt file

I used this syntax in the commands prompt

C:\Program Files\RadiAntViewer64bit>radiantviewer.exe -d C:\Test\DICOM -tg C:\Test\DICOM

I tried to save this code as a .bat file but it doesn't work this way...

what I'm doing wrong? it would be easier to me to just click a .bat file instead of using the commands prompt



Nov 7, 2015 09:20 PM
by Tommy
got it... had to put the .bat file inside the RadiAnt installation folder and run it from there


Nov 8, 2015 02:51 AM
by Tommy
I made some more progress

thanks to a macro I can correctly extract the data I need from the DICOM tags text file

next step would be to have a fast way to automatically extract the DICOM tags from the currently viewed case in RadiAnt

actually I manually export a single DICOM image from the currently viewed case into the target folder of my .bat file and then run the .bat and the macro

is there a way I can export that single image with command line?


Nov 8, 2015 03:56 AM
by Tommy
1) If you have only one PACS location defined, you don't need to use "-paet", as searching all locations and a specified location will be just the same.
2) You can't extract dicom tags selectively with the "-tg" param. Actually it was a feature for our internal testing that happened somehow to make its way to the manual ;-)
3) You can export tags from a single file: radiantviewer.exe -f file.dcm -tg outputfolder
4) Use this code in a bat file:
C:\Program Files\RadiAntViewer64bit\radiantviewer.exe -f C:\inputfile.dcm -tg C:\outputfolder



Nov 9, 2015 09:05 PM
by RadiAnt
I'm afraid that you can't export the tags of currently viewed image...


Nov 9, 2015 09:07 PM
by RadiAnt
Ok, it's not a problem since I can already extract tags from a .dcm file using the -tg command.

what about saving the currently viewed .dcm image into a target folder with command line?

is there a way I can automate this instead of manually click the export images toolbar menu?


Nov 10, 2015 08:10 PM
by Tommy
for the record the code:
C:\Program Files\RadiAntViewer64bit\radiantviewer.exe -f C:\inputfile.dcm -tg C:\outputfolder

doesn't work since there's a space in the "Program Files" path
I had to put quotes to make it work

"C:\Program Files\RadiAntViewer64bit\RadiAntViewer.exe" -d C:\Test\DICOM -tg C:\Test\DICOM


Nov 11, 2015 07:19 AM
by Tommy
Tommy, I'm afraid that currently there's only the manual way of doing this.
I'm not sure if and when we could implement this. It seems very "specific" feature...


Nov 12, 2015 08:12 PM
by RadiAnt
ok. nevermind.
I'll workaround this creating a script that monitors the temp folder and when a new DICOM case appears it extracts DICOM tags using the command line


Nov 12, 2015 10:50 PM
by Tommy
Post reply

Author:


Message: