Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions chris_backend/pacsfiles/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ def query(self, pacs_name, query, timeout=30):
Send a PACS query dictionary to pfdcm.
"""
headers = {'Content-Type': self.content_type, 'Accept': self.content_type}

data = {
'PACSservice' : {'value': pacs_name},
'listenerService' : {'value': 'default'},
'PACSdirective' : query
}

for i in range(5):
try:
resp = post(self.pacs_query_url, json=data, timeout=timeout,
Expand All @@ -75,13 +77,16 @@ def retrieve(self, pacs_name, query, timeout=30):
Send a PACS query dictionary to pfdcm to initiate a PACS retrieve.
"""
headers = {'Content-Type': self.content_type, 'Accept': self.content_type}

query['then'] = 'retrieve'
query['withFeedBack'] = True

data = {
'PACSservice' : {'value': pacs_name},
'listenerService' : {'value': 'default'},
'PACSdirective' : query,
'withFeedBack': True,
'then': 'retrieve'
'PACSdirective' : query
}

for i in range(5):
try:
resp = post(self.pacs_retrieve_url, json=data, timeout=timeout,
Expand Down
Loading