示例#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
         
         } 
示例#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
示例#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
             } 
示例#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
         }
示例#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
示例#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
示例#7
0
import os, sys

import CodeRegistry
from Code import Code

CodeRegistry.register_code(
    'race',
    Code([
        ('Unknown', 99),
        ('White', 0),
        ('Black', 1),
        ('Asian', 2),
        ('Hispanic', 3),
        ('Other', 98),
    ]))

CodeRegistry.register_code('sex', Code([('M', 0), ('F', 1), ('?', 99)]))

CodeRegistry.register_code('consent', Code([('No', 0), ('Yes', 1), ('?', 99)]))

CodeRegistry.register_code(
    'Employment',
    Code([
        ('Unknown', 99),
        ('Employed', 0),
        ('Unemployed', 1),
        ('Part-time', 2),
        ('Retired', 3),
        ('Student', 4),
        ('Pre-employment age', 5),
        ('Other', 98),
示例#8
0
import os, sys

import CodeRegistry
from Code import Code

CodeRegistry.register_code(
    'race',
    Code( [ ('Unknown' , 99),
            ('White' , 0),
            ('Black' , 1),
            ('Asian' , 2),
            ('Hispanic' , 3),
            ('Other' ,  98),
            
            ] ) )

CodeRegistry.register_code(
    'sex',
    Code( [ ('M', 0),
            ('F', 1),
            ('?', 99)
            ] ) )

CodeRegistry.register_code(
    'consent',
    Code( [ ('No', 0),
            ('Yes', 1),
            ('?', 99)
            ] ) )

CodeRegistry.register_code(