Browse Source

Recent updates

Andrej 1 year ago
parent
commit
ad99d7cd50
3 changed files with 36 additions and 11 deletions
  1. 2 1
      pythonScripts/assignOrthancStudy.ipynb
  2. 16 9
      pythonScripts/test.ipynb
  3. 18 1
      pythonScripts/workflow.py

+ 2 - 1
pythonScripts/assignOrthancStudy.ipynb

@@ -2,7 +2,7 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 2,
+   "execution_count": 23,
    "metadata": {},
    "outputs": [
     {
@@ -32,6 +32,7 @@
     "import json\n",
     "import chardet\n",
     "import re\n",
+    "import getData\n",
     "\n",
     "import segmentation\n",
     "import importlib\n",

File diff suppressed because it is too large
+ 16 - 9
pythonScripts/test.ipynb


+ 18 - 1
pythonScripts/workflow.py

@@ -7,7 +7,14 @@ import segmentation
 import plotData
 import os
 
-
+def getRows(setup,returnFB=False):
+    qFilter=config.getFilter(setup)
+    db,fb=getData.connectDB(setup['network'])
+    rows=getData.getPatients(db,setup,qFilter)
+    #print(rows)
+    if returnFB:
+        return fb,db,rows
+    return rows
 
 def listRequiredFiles(stage,r,setup):
     code=config.getCode(r,setup)
@@ -405,3 +412,13 @@ def workflow(r,setup,stage,fb=None,db=None):
 
 
     uploadCreatedFiles(stage,fb,r,setup)
+
+def main(setupFile):
+   with open(setupFile,'r') as f:
+      setup=json.load(f)
+   db,fb,rows=getRows(setup,returnFB=True)
+   for r in rows:
+      workflow(r,setup,setup['stage'],fb=fb,db=db)
+
+if __name__=="__main__":
+   main(sys.argv[1])

Some files were not shown because too many files changed in this diff