Преглед на файлове

Modifying last argument of sentCFind to be a dictionary with required Query and optional Level field

Andrej преди 4 седмици
родител
ревизия
56ec5b679b
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      orthancQR.py

+ 3 - 2
orthancQR.py

@@ -28,8 +28,8 @@ class orthancQR:
       #OK if empty,JSON if fail
       return orthancDatabaseBrowser.extractJSON(response.data)
 
-   def sendCFind(self,name,query):
-      v={"Level":"Study","Query":query}
+   def sendCFind(self,name,par):
+      v={"Level":par.get("Level","Study"),"Query":par["Query"]}
       apiURL='/'.join([self.net.getCoreURL(),'modalities',name,'query'])
       response=self.net.post(apiURL,json.dumps(v),'json')
       #pair of ID/Path json object
@@ -61,3 +61,4 @@ class orthancQR:
       response=self.net.post(apiURL,json.dumps(v),'json')
       return orthancDatabaseBrowser.extractJSON(response.data)
 
+