How to use the output of send_c_find(), need a StudyInstanceUID #942
dcri-tim
started this conversation in
Query/Retrieve
Replies: 1 comment 1 reply
-
The responses = assoc.send_c_find(ds, PatientRootQueryRetrieveInformationModelFind)
for (status, dataset) in responses:
if status:
uid = dataset.StudyInstanceUID
... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I had previously written a utility using the dcmtk findscu.exe to query an AE, then parse the text output with regular expressions. After parsing the output, I use movescu.exe to do a C-MOVE with the StudyInstanceUID.
I am rewriting this to use pynetdicom. I have the association working, and if I use debug_logger() I see text output similar to findscu.exe.
But I don't understand how to read the dataset(s) returned from send_c_find(). All it seems to be is the status. I was expecting it to be zero, one or more datasets for the found studies, including a StudyInstanceUID for each. I see the StudyInstanceUID in the debug_logger text, so I know it is being returned from the SCP.
All the examples of send_c_find() just check that the call was successful or not, but I don't see anything that shows how to read the Study UID from the returned datasets. I only see status. Since this as Python I expected to read a value from a returned dataset or datasets.
How do I get a StudyInstanceUID from the results of send_c_find()? Am I supposed to read and parse the text somehow like I did with findscu?
Beta Was this translation helpful? Give feedback.
All reactions