Browse Source

Removing hard-coded ParticipantId from imageBrowser

Andrej Studen 2 years ago
parent
commit
1887c514ae
1 changed files with 3 additions and 2 deletions
  1. 3 2
      slicerModules/imageBrowser.py

+ 3 - 2
slicerModules/imageBrowser.py

@@ -689,7 +689,7 @@ class imageBrowserLogic(ScriptedLoadableModuleLogic):
 
     def saveSegmentation(self):
         #get the latest key by adding an entry to SegmentationList
-        copyFields=['ParticipantId','patientCode','visitCode','User']
+        copyFields=[self.isetup['participantField'],'patientCode','visitCode','User']
         outRow={x:self.segmentationEntry[x] for x in copyFields}
         sList=self.isetup['datasets']['SegmentationsList']
         resp=self.db.modifyRows('insert',sList['project'],
@@ -745,7 +745,8 @@ class imageBrowserLogic(ScriptedLoadableModuleLogic):
 
         #create segmentation entry for database update
         #note that origin is not set to database
-        copyFields=['ParticipantId','patientCode','visitCode','SequenceNum']
+        copyFields=[self.isetup['participantField'],'patientCode','visitCode','SequenceNum']
+        #copyFields=['ParticipantId','patientCode','visitCode','SequenceNum']
         self.segmentationEntry={x:entry[x] for x in copyFields}
         self.segmentationEntry['User']=self.remoteId['id']
         self.segmentationEntry['origin']='created'