Browse Source

Adding retrieve calls

Andrej 2 weeks ago
parent
commit
ac12ec035a
1 changed files with 13 additions and 0 deletions
  1. 13 0
      orthancQR.py

+ 13 - 0
orthancQR.py

@@ -47,4 +47,17 @@ class orthancQR:
       #content of answer, object with DICOM codes (IDs etc)
       return orthancDatabaseBrowser.extractJSON(response.data)
 
+   def sendCMoveForAll(self,queryId):
+#returns jobDescripton as JSON (ID,Path)
+      apiURL='/'.join([self.net.getCoreURL(),'queries',queryId,'retrieve'])
+      v={"TargetAet":"NIXLJUOIL","RetrieveMethod":"C-MOVE","Synchronous":False}
+      response=self.net.post(apiURL,json.dumps(v),'json')
+      return orthancDatabaseBrowser.extractJSON(response.data)
+
+   def sendCMove(self,queryId,answerId):
+#returns jobDescripton as JSON (ID,Path)
+      apiURL='/'.join([self.net.getCoreURL(),'queries',queryId,'answers',answerId,'retrieve'])
+      v={"TargetAet":"NIXLJUOIL","RetrieveMethod":"C-MOVE","Synchronous":False}
+      response=self.net.post(apiURL,json.dumps(v),'json')
+      return orthancDatabaseBrowser.extractJSON(response.data)