|
@@ -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])
|