Abort with "no value available" upon CFIND request
blissdismissed opened this issue · 4 comments
I'm trying to do a series of queries to get from an accession number to a studyUID. But all of my attempts at querying result in an A-Abort with the reason of (no value available).
I don't understand why. I tried by patient name and patientID and made sure they exist in the PACS db. Am I missing something else in the query to get this to work?
from pydicom.dataset import Dataset
from pynetdicom import AE, debug_logger
from pynetdicom.sop_class import PatientRootQueryRetrieveInformationModelFind
debug_logger()
ae = AE()
ae.add_requested_context(PatientRootQueryRetrieveInformationModelFind)
# Create our Identifier (query) dataset
ds = Dataset()
ds.PatientName = 'Last^first'
ds.QueryRetrieveLevel = 'PATIENT'
# Associate with the peer AE at IP 127.0.0.1 and port 11112
assoc = ae.associate("172.11.165.11", 20500, ae_title="PACS-AETitle")
if assoc.is_established:
# Send the C-FIND request
responses = assoc.send_c_find(ds, PatientRootQueryRetrieveInformationModelFind)
for (status, identifier) in responses:
if status:
print('C-FIND query status: 0x{0:04X}'.format(status.Status))
else:
print('Connection timed out, was aborted or received invalid response')
# Release the association
assoc.release()
else:
print('Association rejected, aborted or never connected')
Appreciate any help folks can offer.
If it helps I am trying to query a Visage 7 pacs instance. My CMOVE with the patientID, studyInstanceUID and seriesInstanceUID works well. Just trying to get those parameters as a first step in the process is not working.
What's the output from debug_logger()
look like?
In case it helps anyone else, I found the problem.
I needed to add the requesting AE Title to my application entity instance:
ae = AE() ==> ae = AE(ae_title="mySCU_AETitle)
The documentation and examples should be clearer about this, as I had to really dig into the assocation to find a hidden default aetitle of pynetdicom.