Skip to content

Commit

Permalink
DICOM-QR queries now use Study Root instead of Patient Root fixes #38
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdk committed Mar 23, 2023
1 parent 490ca5e commit 3131018
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dicomtrolley/dicom_qr.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pydicom.datadict import tag_for_keyword
from pydicom.dataset import Dataset
from pynetdicom import AE, debug_logger
from pynetdicom.sop_class import PatientRootQueryRetrieveInformationModelFind
from pynetdicom.sop_class import StudyRootQueryRetrieveInformationModelFind

from dicomtrolley.core import Query, QueryLevels, Searcher, Study
from dicomtrolley.exceptions import DICOMTrolleyError
Expand Down Expand Up @@ -216,7 +216,7 @@ def send_c_find(self, query):
if self.debug:
debug_logger()
ae = AE(ae_title=bytes(self.aet, encoding="utf-8"))
ae.add_requested_context(PatientRootQueryRetrieveInformationModelFind)
ae.add_requested_context(StudyRootQueryRetrieveInformationModelFind)

assoc = ae.associate(
self.host, self.port, ae_title=bytes(self.aec, encoding="utf-8")
Expand All @@ -226,11 +226,11 @@ def send_c_find(self, query):
# Send the C-FIND request
c_find_response = assoc.send_c_find(
query.as_dataset(),
PatientRootQueryRetrieveInformationModelFind,
StudyRootQueryRetrieveInformationModelFind,
)
for (status, identifier) in c_find_response:
if status:
# I don't understand this status.. For now just collect non-None
# I don't understand this status. For now just collect non-None
if identifier:
responses.append(identifier)

Expand Down

0 comments on commit 3131018

Please sign in to comment.