CFind results switch for xml #861
Replies: 4 comments 3 replies
-
send_c_find returns a dataset, not a string - you can handle the dataset items any way you want by iterating over them. There is also the possibility to convert the dataset to json. |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back to fast! I will try the convert to json. My issue is that I can iterate through it and put each record in a single column in a db table. But I then need to transform that dataset to key value pairs into another more readable table. Here is an example.. thats all in one column in my db. I want to break that out to a tag column and value columns. JSON would be easier to work with, I'll try that before I put it in the db. I was hoping the findscu had an option to dump into xml like dcm4che does or offis. thanks for the confirmation that it doesn't :) |
Beta Was this translation helpful? Give feedback.
-
findscu returns a dataset like this... So I can iterate through that and take each record above and parse it in python, but was hoping there were options on the output that findscu returns or pydicom had a method to parse it. |
Beta Was this translation helpful? Give feedback.
-
Nevermind. I figured it out. I clearly did not understand the dataset and how to extract the elements. Appreciate all the comments and questions. They pushed me to better understand what I was working with. thanks!! |
Beta Was this translation helpful? Give feedback.
-
I am able to make connections to PACS and use send_c_find to parse the database for meta data. The results come back in this format...
(0008, 0005) Specific Character Set CS: 'ISO_IR 192',
0008, 0052) Query/Retrieve Level CS: 'PATIENT',
0008, 0054) Retrieve AE Title AE: 'ANY-SCP',
(0010, 0010) Patient's Name PN: 'Test^Bart'"
Is there a way to force results to come back in xml format or something easier to parse?
Beta Was this translation helpful? Give feedback.
All reactions