Beispiel #1
0
 def get_mapping(self):
     if self.dob==None:
         dob = '0000-00-0000 00:00:00.00'
         age = 0
     else:
         dob = '%s' % self.dob
         now = mx.DateTime.now()
         age = mx.DateTime.Age(now,self.dob).years
             
     return  {
         'pid' : self.pid,
         'first' : self.first,
         'middle' : self.middle,
         'last' : self.last,
         'dob' : dob,
         'age' : age,
         'race' : self.race,
         'race_desc' : CodeRegistry.get_description(
         'race', self.race ),
         'sex' : self.sex,
         'sex_desc' : CodeRegistry.get_description(
         'sex', self.sex ),
         'employment' : self.employment,
         'employment_desc' :  CodeRegistry.get_description(
         'Employment', self.employment ),
         'consent' : self.consent,
         'consent_desc' :  CodeRegistry.get_description(
         'consent', self.consent ),
         'iq' : self.iq,
         'dbase_status' : self.dbase_status,
         'summary' : self.summary
         
         } 
Beispiel #2
0
    def get_mapping(self):
        s = DatafileEntry.get_mapping(self)
        s['channels'] = self.channels
        s['freq'] = self.freq
        s['classification'] = self.classification
        s['classification_desc'] = CodeRegistry.get_description(
            'EEG classification', self.classification)
        s['file_type'] = self.file_type
        s['file_type_desc'] = CodeRegistry.get_description(
            'EEG file type', self.file_type )
        s['behavior_state'] = self.behavior_state
        s['behavior_state_desc'] = CodeRegistry.get_description(
            'Behavioral State', self.behavior_state )

        return s
Beispiel #3
0
 def get_mapping(self):
         return  {
             'pid' : self.pid,
             'seizure_classification' : self.seizure_classification,
             'seizure_classification_desc' : CodeRegistry.get_description(
             'Seizure classification', self.seizure_classification ),
             'info' : self.info
             } 
Beispiel #4
0
 def get_mapping(self):
     relpath = 'Patients/%d/%s/' % \
               (self.pid, self.get_folder())
     return  {
         'pid' : self.pid,
         'date' : self.date,
         'filename' : self.filename,
         'file_type' : self.file_type,
         'file_type_desc' : CodeRegistry.get_description(
         'Multifile type', self.file_type ),
         'spacing' : self.spacing,
         'tilt' : self.tilt,
         'width' : self.width,
         'folder' : self.get_folder(),
         'relpath' : relpath
         }
Beispiel #5
0
 def get_mapping(self):
     s = DatafileEntry.get_mapping(self)
     s['type'] = self.type
     s['type_desc'] = CodeRegistry.get_description(
         'Associated File', self.type )
     return s
Beispiel #6
0
 def get_mapping(self):
     s = DatafileEntry.get_mapping(self)
     s['classification'] = self.classification
     s['classification_desc'] = CodeRegistry.get_description(
         'Image classification', self.classification )
     return s