diff --git a/CHANGELOG b/CHANGELOG index 8cede3f..c8f1e9d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ + ## [0.2.3] - 2017-02-14 + ### Changed + * Refactored c1s form - redcap C1 form to C1S in alz website + + ### Added + * Added few fields in the fvp form builder and forms file. + + ## [0.2.2] - 2017-02-02 ### Changed * Header key names for fvp forms. diff --git a/nacc/redcap2nacc.py b/nacc/redcap2nacc.py index fb02556..53011dd 100755 --- a/nacc/redcap2nacc.py +++ b/nacc/redcap2nacc.py @@ -206,4 +206,4 @@ def main(): print form if __name__ == '__main__': - main() + main() \ No newline at end of file diff --git a/nacc/uds3/fvp/builder.py b/nacc/uds3/fvp/builder.py index 073ca87..d0a3f08 100644 --- a/nacc/uds3/fvp/builder.py +++ b/nacc/uds3/fvp/builder.py @@ -544,127 +544,24 @@ def build_uds3_fvp_form(record): packet.append(b9) - c1 = fvp_forms.FormC1() - c1.MMSECOMP = record['fu_mmsecomp'] - c1.MMSEREAS = record['fu_mmsereas'] - c1.MMSELOC = record['fu_mmseloc'] - c1.MMSELAN = record['fu_mmselan'] - c1.MMSELANX = record['fu_mmselanx'] - c1.MMSEVIS = record['fu_mmsevis'] - c1.MMSEHEAR = record['fu_mmsehear'] - c1.MMSEORDA = record['fu_mmseorda'] - c1.MMSEORLO = record['fu_mmseorlo'] - c1.PENTAGON = record['fu_pentagon'] - c1.MMSE = record['fu_mmse'] - c1.NPSYCLOC = record['fu_npsycloc'] - c1.NPSYLAN = record['fu_npsylan'] - c1.NPSYLANX = record['fu_npsylanx'] - c1.LOGIMO = record['fu_logimo'] - c1.LOGIPREV = record['fu_logiprev'] - c1.LOGIMEM = record['fu_logimem'] - c1.UDSBENTC = record['fu_udsbentc'] - c1.DIGIF = record['fu_digif'] - c1.DIGIFLEN = record['fu_digiflen'] - c1.DIGIB = record['fu_digib'] - c1.DIGIBLEN = record['fu_digiblen'] - c1.ANIMALS = record['fu_animals'] - c1.VEG = record['fu_veg'] - c1.TRAILA = record['fu_traila'] - c1.TRAILARR = record['fu_trailarr'] - c1.TRAILALI = record['fu_trailali'] - c1.TRAILB = record['fu_trailb'] - c1.TRAILBRR = record['fu_trailbrr'] - c1.TRAILBLI = record['fu_trailbli'] - c1.MEMUNITS = record['fu_memunits'] - c1.MEMTIME = record['fu_memtime'] - c1.UDSBENTD = record['fu_udsbentd'] - c1.UDSBENRS = record['fu_udsbenrs'] - c1.BOSTON = record['fu_boston'] - c1.UDSVERFC = record['fu_udsverfc'] - c1.UDSVERFN = record['fu_udsverfn'] - c1.UDSVERNF = record['fu_udsvernf'] - c1.UDSVERLC = record['fu_udsverlc'] - c1.UDSVERLR = record['fu_udsverlr'] - c1.UDSVERLN = record['fu_udsverln'] - c1.UDSVERTN = record['fu_udsvertn'] - c1.UDSVERTE = record['fu_udsverte'] - c1.UDSVERTI = record['fu_udsverti'] - c1.COGSTAT = record['fu_cogstat'] - packet.append(c1) + # Among C1 and C2 forms, one must be filled, one must be empty. + isC1NotBlank = '0' + (record['fu_mmseloc'] and record['fu_mmseloc'].strip()) \ + or (record['fu_cogstat'] and record['fu_cogstat'].strip()) + isC2NotBlank = '0' + (record['fu_mocacomp'] and record['fu_mocacomp'].strip()) \ + or (record['fu_cogstat_c2'] and record['fu_cogstat_c2'].strip()) + condition = int(isC1NotBlank) + int(isC2NotBlank) - c2 = fvp_forms.FormC2() - c2.MOCACOMP = record['fu_mocacomp'] - c2.MOCAREAS = record['fu_mocareas'] - c2.MOCALOC = record['fu_mocaloc'] - c2.MOCALAN = record['fu_mocalan'] - c2.MOCALANX = record['fu_mocalanx'] - c2.MOCAVIS = record['fu_mocavis'] - c2.MOCAHEAR = record['fu_mocahear'] - c2.MOCATOTS = record['fu_mocatots'] - c2.MOCATRAI = record['fu_mocatrai'] - c2.MOCACUBE = record['fu_mocacube'] - c2.MOCACLOC = record['fu_mocacloc'] - c2.MOCACLON = record['fu_mocaclon'] - c2.MOCACLOH = record['fu_mocacloh'] - c2.MOCANAMI = record['fu_mocanami'] - c2.MOCAREGI = record['fu_mocaregi'] - c2.MOCADIGI = record['fu_mocadigi'] - c2.MOCALETT = record['fu_mocalett'] - c2.MOCASER7 = record['fu_mocaser7'] - c2.MOCAREPE = record['fu_mocarepe'] - c2.MOCAFLUE = record['fu_mocaflue'] - c2.MOCAABST = record['fu_mocaabst'] - c2.MOCARECN = record['fu_mocarecn'] - c2.MOCARECC = record['fu_mocarecc'] - c2.MOCARECR = record['fu_mocarecr'] - c2.MOCAORDT = record['fu_mocaordt'] - c2.MOCAORMO = record['fu_mocaormo'] - c2.MOCAORYR = record['fu_mocaoryr'] - c2.MOCAORDY = record['fu_mocaordy'] - c2.MOCAORPL = record['fu_mocaorpl'] - c2.MOCAORCT = record['fu_mocaorct'] - c2.NPSYCLOC = record['fu_npsycloc'] - c2.NPSYLAN = record['fu_npsylan'] - c2.NPSYLANX = record['fu_npsylanx'] - c2.CRAFTVRS = record['fu_craftvrs'] - c2.CRAFTURS = record['fu_crafturs'] - c2.UDSBENTC = record['fu_udsbentc'] - c2.DIGFORCT = record['fu_digforct'] - c2.DIGFORSL = record['fu_digforsl'] - c2.DIGBACCT = record['fu_digbacct'] - c2.DIGBACLS = record['fu_digbacls'] - c2.ANIMALS = record['fu_animals'] - c2.VEG = record['fu_veg'] - c2.TRAILA = record['fu_traila'] - c2.TRAILARR = record['fu_trailarr'] - c2.TRAILALI = record['fu_trailali'] - c2.TRAILB = record['fu_trailb'] - c2.TRAILBRR = record['fu_trailbrr'] - c2.TRAILBLI = record['fu_trailbli'] - c2.CRAFTDVR = record['fu_craftdvr'] - c2.CRAFTDRE = record['fu_craftdre'] - c2.CRAFTDTI = record['fu_craftdti'] - c2.CRAFTCUE = record['fu_craftcue'] - c2.UDSBENTD = record['fu_udsbentd'] - c2.UDSBENRS = record['fu_udsbenrs'] - c2.MINTTOTS = record['fu_minttots'] - c2.MINTTOTW = record['fu_minttotw'] - c2.MINTSCNG = record['fu_mintscng'] - c2.MINTSCNC = record['fu_mintscnc'] - c2.MINTPCNG = record['fu_mintpcng'] - c2.MINTPCNC = record['fu_mintpcnc'] - c2.UDSVERFC = record['fu_udsverfc'] - c2.UDSVERFN = record['fu_udsverfn'] - c2.UDSVERNF = record['fu_udsvernf'] - c2.UDSVERLC = record['fu_udsverlc'] - c2.UDSVERLR = record['fu_udsverlr'] - c2.UDSVERLN = record['fu_udsverln'] - c2.UDSVERTN = record['fu_udsvertn'] - c2.UDSVERTE = record['fu_udsverte'] - c2.UDSVERTI = record['fu_udsverti'] - c2.COGSTAT = record['fu_cogstat'] - packet.append(c2) + if(condition != 1): + ptid = record['ptid'] + message = "Could not parse packet as " + ("both" if condition > 1 else "neither") + " c1/c2 forms has data"; + message = message + " for PTID : " + ("unknown" if not ptid else ptid) + raise Exception(message) + + if(isC1NotBlank): + add_redcap_C1_alz_C1S(record, packet) + else: + addC2(record, packet) d1 = fvp_forms.FormD1() @@ -831,6 +728,8 @@ def build_uds3_fvp_form(record): d2.ANGIOPCI = record['fu_angiopci'] d2.PACEMAKE = record['fu_pacemake'] d2.HVALVE = record['fu_hvalve'] + d2.ANTIENC = record['fu_antienc'] + d2.ANTIENCX = record['fu_antiencx'] d2.OTHCOND = record['fu_othcond'] d2.OTHCONDX = record['fu_othcondx'] packet.append(d2) @@ -863,6 +762,131 @@ def build_uds3_fvp_form(record): update_header(record, packet) return packet +def add_redcap_C1_alz_C1S(record, packet): + c1 = fvp_forms.FormC1S() + c1.MMSECOMP = record['fu_mmsecomp'] + c1.MMSEREAS = record['fu_mmsereas'] + c1.MMSELOC = record['fu_mmseloc'] + c1.MMSELAN = record['fu_mmselan'] + c1.MMSELANX = record['fu_mmselanx'] + c1.MMSEVIS = record['fu_mmsevis'] + c1.MMSEHEAR = record['fu_mmsehear'] + c1.MMSEORDA = record['fu_mmseorda'] + c1.MMSEORLO = record['fu_mmseorlo'] + c1.PENTAGON = record['fu_pentagon'] + c1.MMSE = record['fu_mmse'] + c1.NPSYCLOC = record['fu_npsycloc'] + c1.NPSYLAN = record['fu_npsylan'] + c1.NPSYLANX = record['fu_npsylanx'] + c1.LOGIMO = record['fu_logimo'] + c1.LOGIDAY = record['fu_logiday'] #TODO + c1.LOGIYR = record['fu_logiyr'] #TODO + c1.LOGIPREV = record['fu_logiprev'] + c1.LOGIMEM = record['fu_logimem'] + c1.UDSBENTC = record['fu_udsbentc_c1'] #TODO + c1.DIGIF = record['fu_digif'] + c1.DIGIFLEN = record['fu_digiflen'] + c1.DIGIB = record['fu_digib'] + c1.DIGIBLEN = record['fu_digiblen'] + c1.ANIMALS = record['fu_animals'] + c1.VEG = record['fu_veg'] + c1.TRAILA = record['fu_traila'] + c1.TRAILARR = record['fu_trailarr'] + c1.TRAILALI = record['fu_trailali'] + c1.TRAILB = record['fu_trailb'] + c1.TRAILBRR = record['fu_trailbrr'] + c1.TRAILBLI = record['fu_trailbli'] + c1.MEMUNITS = record['fu_memunits'] + c1.MEMTIME = record['fu_memtime'] + c1.UDSBENTD = record['fu_udsbentd_c1'] #TODO + c1.UDSBENRS = record['fu_udsbenrs_c1'] #TODO + c1.BOSTON = record['fu_boston'] + c1.UDSVERFC = record['fu_udsverfc_c1'] #TODO + c1.UDSVERFN = record['fu_udsverfn_c1'] #TODO + c1.UDSVERNF = record['fu_udsvernf_c1'] #TODO + c1.UDSVERLC = record['fu_udsverlc_c1'] #TODO + c1.UDSVERLR = record['fu_udsverlr_c1'] #TODO + c1.UDSVERLN = record['fu_udsverln_c1'] #TODO + c1.UDSVERTN = record['fu_udsvertn_c1'] #TODO + c1.UDSVERTE = record['fu_udsverte_c1'] #TODO + c1.UDSVERTI = record['fu_udsverti_c1'] #TODO + c1.COGSTAT = record['fu_cogstat'] + packet.append(c1) + +def addC2(record, packet): + c2 = fvp_forms.FormC2() + c2.MOCACOMP = record['fu_mocacomp'] + c2.MOCAREAS = record['fu_mocareas'] + c2.MOCALOC = record['fu_mocaloc'] + c2.MOCALAN = record['fu_mocalan'] + c2.MOCALANX = record['fu_mocalanx'] + c2.MOCAVIS = record['fu_mocavis'] + c2.MOCAHEAR = record['fu_mocahear'] + c2.MOCATOTS = record['fu_mocatots'] + c2.MOCATRAI = record['fu_mocatrai'] + c2.MOCACUBE = record['fu_mocacube'] + c2.MOCACLOC = record['fu_mocacloc'] + c2.MOCACLON = record['fu_mocaclon'] + c2.MOCACLOH = record['fu_mocacloh'] + c2.MOCANAMI = record['fu_mocanami'] + c2.MOCAREGI = record['fu_mocaregi'] + c2.MOCADIGI = record['fu_mocadigi'] + c2.MOCALETT = record['fu_mocalett'] + c2.MOCASER7 = record['fu_mocaser7'] + c2.MOCAREPE = record['fu_mocarepe'] + c2.MOCAFLUE = record['fu_mocaflue'] + c2.MOCAABST = record['fu_mocaabst'] + c2.MOCARECN = record['fu_mocarecn'] + c2.MOCARECC = record['fu_mocarecc'] + c2.MOCARECR = record['fu_mocarecr'] + c2.MOCAORDT = record['fu_mocaordt'] + c2.MOCAORMO = record['fu_mocaormo'] + c2.MOCAORYR = record['fu_mocaoryr'] + c2.MOCAORDY = record['fu_mocaordy'] + c2.MOCAORPL = record['fu_mocaorpl'] + c2.MOCAORCT = record['fu_mocaorct'] + c2.NPSYCLOC = record['fu_npsycloc_c2'] #TODO + c2.NPSYLAN = record['fu_npsylan_c2'] #TODO + c2.NPSYLANX = record['fu_npsylanx_c2'] #TODO + c2.CRAFTVRS = record['fu_craftvrs'] + c2.CRAFTURS = record['fu_crafturs'] + c2.UDSBENTC = record['fu_udsbentc'] + c2.DIGFORCT = record['fu_digforct'] + c2.DIGFORSL = record['fu_digforsl'] + c2.DIGBACCT = record['fu_digbacct'] + c2.DIGBACLS = record['fu_digbacls'] + c2.ANIMALS = record['fu_animals_c2'] #TODO + c2.VEG = record['fu_veg_c2'] #TODO + c2.TRAILA = record['fu_traila_c2'] #TODO + c2.TRAILARR = record['fu_trailarr_c2'] #TODO + c2.TRAILALI = record['fu_trailali_c2'] #TODO + c2.TRAILB = record['fu_trailb_c2'] #TODO + c2.TRAILBRR = record['fu_trailbrr_c2'] #TODO + c2.TRAILBLI = record['fu_trailbli_c2'] #TODO + c2.CRAFTDVR = record['fu_craftdvr'] + c2.CRAFTDRE = record['fu_craftdre'] + c2.CRAFTDTI = record['fu_craftdti'] + c2.CRAFTCUE = record['fu_craftcue'] + c2.UDSBENTD = record['fu_udsbentd'] + c2.UDSBENRS = record['fu_udsbenrs'] + c2.MINTTOTS = record['fu_minttots'] + c2.MINTTOTW = record['fu_minttotw'] + c2.MINTSCNG = record['fu_mintscng'] + c2.MINTSCNC = record['fu_mintscnc'] + c2.MINTPCNG = record['fu_mintpcng'] + c2.MINTPCNC = record['fu_mintpcnc'] + c2.UDSVERFC = record['fu_udsverfc'] + c2.UDSVERFN = record['fu_udsverfn'] + c2.UDSVERNF = record['fu_udsvernf'] + c2.UDSVERLC = record['fu_udsverlc'] + c2.UDSVERLR = record['fu_udsverlr'] + c2.UDSVERLN = record['fu_udsverln'] + c2.UDSVERTN = record['fu_udsvertn'] + c2.UDSVERTE = record['fu_udsverte'] + c2.UDSVERTI = record['fu_udsverti'] + c2.COGSTAT = record['fu_cogstat_c2'] #TODO + packet.append(c2) + def update_header(record, packet): for header in packet: header.PACKET = "F" diff --git a/nacc/uds3/fvp/forms.py b/nacc/uds3/fvp/forms.py index dfee85f..05eb64c 100644 --- a/nacc/uds3/fvp/forms.py +++ b/nacc/uds3/fvp/forms.py @@ -570,8 +570,8 @@ def __init__(self): self.fields['LBDEVAL'] = nacc.uds3.Field(name='LBDEVAL', typename='Num', position=(590, 590), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=[]) self.fields['FTLDEVAL'] = nacc.uds3.Field(name='FTLDEVAL', typename='Num', position=(592, 592), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=[]) - -class FormC1(nacc.uds3.FieldBag): +# This is the C1 form in the redcap and C1S form in the ALZ website. +class FormC1S(nacc.uds3.FieldBag): def __init__(self): self.fields = header_fields() self.fields['MMSECOMP'] = nacc.uds3.Field(name='MMSECOMP', typename='Num', position=(45, 45), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=[]) @@ -589,6 +589,8 @@ def __init__(self): self.fields['NPSYLAN'] = nacc.uds3.Field(name='NPSYLAN', typename='Num', position=(133, 133), length=1, inclusive_range=(1, 3), allowable_values=['3', '2', '1'], blanks=[]) self.fields['NPSYLANX'] = nacc.uds3.Field(name='NPSYLANX', typename='Char', position=(135, 194), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 2b NPSYLAN ne 3 (Other)']) self.fields['LOGIMO'] = nacc.uds3.Field(name='LOGIMO', typename='Num', position=(196, 197), length=2, inclusive_range=(0, 12), allowable_values=['88'], blanks=[]) + self.fields['LOGIDAY'] = nacc.uds3.Field(name='LOGIDAY', typename='Num', position=(199, 200), length=2, inclusive_range=(1, 31), allowable_values=['88'], blanks=[]) + self.fields['LOGIYR'] = nacc.uds3.Field(name='LOGIYR', typename='Num', position=(202, 205), length=4, inclusive_range=(2005, CURRENT_YEAR), allowable_values=['8888'], blanks=[]) self.fields['LOGIPREV'] = nacc.uds3.Field(name='LOGIPREV', typename='Num', position=(207, 208), length=2, inclusive_range=(0, 25), allowable_values=['88'], blanks=[]) self.fields['LOGIMEM'] = nacc.uds3.Field(name='LOGIMEM', typename='Num', position=(210, 211), length=2, inclusive_range=(0, 25), allowable_values=['96', '95', '98', '97'], blanks=[]) self.fields['UDSBENTC'] = nacc.uds3.Field(name='UDSBENTC', typename='Num', position=(213, 214), length=2, inclusive_range=(0, 17), allowable_values=['96', '95', '98', '97'], blanks=[]) @@ -836,36 +838,37 @@ def __init__(self): self.fields = header_fields() self.fields['CANCER'] = nacc.uds3.Field(name='CANCER', typename='Num', position=(45, 45), length=1, inclusive_range=(0, 2), allowable_values=['2', '1', '0', '8'], blanks=[]) self.fields['CANCSITE'] = nacc.uds3.Field(name='CANCSITE', typename='Char', position=(47, 106), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 1 CANCER = 0 (No)', 'Blank if Question 1 CANCER = 8 (Not assessed)']) - self.fields['CANCACT'] = nacc.uds3.Field(name='CANCACT', typename='Num', position=(108, 108), length=1, inclusive_range=(1, 2), allowable_values=['2', '1'], blanks=['Blank if Question 1 CANCER = 0 (No)', 'Blank if Question 1 CANCER = 8 (Not assessed)']) - self.fields['DIABET'] = nacc.uds3.Field(name='DIABET', typename='Num', position=(110, 110), length=1, inclusive_range=(0, 3), allowable_values=['2', '1', '0', '9', '3'], blanks=[]) - self.fields['MYOINF'] = nacc.uds3.Field(name='MYOINF', typename='Num', position=(112, 112), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['CONGHRT'] = nacc.uds3.Field(name='CONGHRT', typename='Num', position=(114, 114), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['AFIBRILL'] = nacc.uds3.Field(name='AFIBRILL', typename='Num', position=(116, 116), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['HYPERT'] = nacc.uds3.Field(name='HYPERT', typename='Num', position=(118, 118), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['ANGINA'] = nacc.uds3.Field(name='ANGINA', typename='Num', position=(120, 120), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['HYPCHOL'] = nacc.uds3.Field(name='HYPCHOL', typename='Num', position=(122, 122), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['VB12DEF'] = nacc.uds3.Field(name='VB12DEF', typename='Num', position=(124, 124), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['THYDIS'] = nacc.uds3.Field(name='THYDIS', typename='Num', position=(126, 126), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['ARTH'] = nacc.uds3.Field(name='ARTH', typename='Num', position=(128, 128), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['ARTYPE'] = nacc.uds3.Field(name='ARTYPE', typename='Num', position=(130, 130), length=1, inclusive_range=(1, 3), allowable_values=['3', '2', '1', '9'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) - self.fields['ARTYPEX'] = nacc.uds3.Field(name='ARTYPEX', typename='Char', position=(132, 191), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 11a ARTYPE ne 3 (Other)']) - self.fields['ARTUPEX'] = nacc.uds3.Field(name='ARTUPEX', typename='Num', position=(193, 193), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) - self.fields['ARTLOEX'] = nacc.uds3.Field(name='ARTLOEX', typename='Num', position=(195, 195), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) - self.fields['ARTSPIN'] = nacc.uds3.Field(name='ARTSPIN', typename='Num', position=(197, 197), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) - self.fields['ARTUNKN'] = nacc.uds3.Field(name='ARTUNKN', typename='Num', position=(199, 199), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) - self.fields['URINEINC'] = nacc.uds3.Field(name='URINEINC', typename='Num', position=(201, 201), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['BOWLINC'] = nacc.uds3.Field(name='BOWLINC', typename='Num', position=(203, 203), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['SLEEPAP'] = nacc.uds3.Field(name='SLEEPAP', typename='Num', position=(205, 205), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['REMDIS'] = nacc.uds3.Field(name='REMDIS', typename='Num', position=(207, 207), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['HYPOSOM'] = nacc.uds3.Field(name='HYPOSOM', typename='Num', position=(209, 209), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['SLEEPOTH'] = nacc.uds3.Field(name='SLEEPOTH', typename='Num', position=(211, 211), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['SLEEPOTX'] = nacc.uds3.Field(name='SLEEPOTX', typename='Char', position=(213, 272), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 17 SLEEPOTH ne 1 (Yes)']) - self.fields['ANGIOCP'] = nacc.uds3.Field(name='ANGIOCP', typename='Num', position=(274, 274), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['ANGIOPCI'] = nacc.uds3.Field(name='ANGIOPCI', typename='Num', position=(276, 276), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['PACEMAKE'] = nacc.uds3.Field(name='PACEMAKE', typename='Num', position=(278, 278), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['HVALVE'] = nacc.uds3.Field(name='HVALVE', typename='Num', position=(280, 280), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['OTHCOND'] = nacc.uds3.Field(name='OTHCOND', typename='Num', position=(282, 282), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) - self.fields['OTHCONDX'] = nacc.uds3.Field(name='OTHCONDX', typename='Char', position=(284, 343), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 22 OTHCOND ne 1 (Yes)']) + self.fields['DIABET'] = nacc.uds3.Field(name='DIABET', typename='Num', position=(108, 108), length=1, inclusive_range=(0, 3), allowable_values=['2', '1', '0', '9', '3'], blanks=[]) + self.fields['MYOINF'] = nacc.uds3.Field(name='MYOINF', typename='Num', position=(110, 110), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['CONGHRT'] = nacc.uds3.Field(name='CONGHRT', typename='Num', position=(112, 112), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['AFIBRILL'] = nacc.uds3.Field(name='AFIBRILL', typename='Num', position=(114, 114), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['HYPERT'] = nacc.uds3.Field(name='HYPERT', typename='Num', position=(116, 116), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['ANGINA'] = nacc.uds3.Field(name='ANGINA', typename='Num', position=(118, 118), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['HYPCHOL'] = nacc.uds3.Field(name='HYPCHOL', typename='Num', position=(120, 120), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['VB12DEF'] = nacc.uds3.Field(name='VB12DEF', typename='Num', position=(122, 122), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['THYDIS'] = nacc.uds3.Field(name='THYDIS', typename='Num', position=(124, 124), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['ARTH'] = nacc.uds3.Field(name='ARTH', typename='Num', position=(126, 126), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['ARTYPE'] = nacc.uds3.Field(name='ARTYPE', typename='Num', position=(128, 128), length=1, inclusive_range=(1, 3), allowable_values=['3', '2', '1', '9'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) + self.fields['ARTYPEX'] = nacc.uds3.Field(name='ARTYPEX', typename='Char', position=(130, 189), length=60, inclusive_range=None, allowable_values=[], blanks=[]) + self.fields['ARTUPEX'] = nacc.uds3.Field(name='ARTUPEX', typename='Num', position=(191, 191), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) + self.fields['ARTLOEX'] = nacc.uds3.Field(name='ARTLOEX', typename='Num', position=(193, 193), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) + self.fields['ARTSPIN'] = nacc.uds3.Field(name='ARTSPIN', typename='Num', position=(195, 195), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) + self.fields['ARTUNKN'] = nacc.uds3.Field(name='ARTUNKN', typename='Num', position=(197, 197), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=['Blank if Question 11 ARTH = 0 (No)', 'Blank if Question 11 ARTH = 8 (Not assessed)']) + self.fields['URINEINC'] = nacc.uds3.Field(name='URINEINC', typename='Num', position=(199, 199), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['BOWLINC'] = nacc.uds3.Field(name='BOWLINC', typename='Num', position=(201, 201), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['SLEEPAP'] = nacc.uds3.Field(name='SLEEPAP', typename='Num', position=(203, 203), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['REMDIS'] = nacc.uds3.Field(name='REMDIS', typename='Num', position=(205, 205), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['HYPOSOM'] = nacc.uds3.Field(name='HYPOSOM', typename='Num', position=(207, 207), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['SLEEPOTH'] = nacc.uds3.Field(name='SLEEPOTH', typename='Num', position=(209, 209), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['SLEEPOTX'] = nacc.uds3.Field(name='SLEEPOTX', typename='Char', position=(211, 270), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 17 SLEEPOTH ne 1 (Yes)']) + self.fields['ANGIOCP'] = nacc.uds3.Field(name='ANGIOCP', typename='Num', position=(272, 272), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['ANGIOPCI'] = nacc.uds3.Field(name='ANGIOPCI', typename='Num', position=(274, 274), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['PACEMAKE'] = nacc.uds3.Field(name='PACEMAKE', typename='Num', position=(276, 276), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['HVALVE'] = nacc.uds3.Field(name='HVALVE', typename='Num', position=(278, 278), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['ANTIENC'] = nacc.uds3.Field(name='ANTIENC', typename='Num', position=(280, 280), length=1, inclusive_range=(0, 1), allowable_values=['8', '1', '0'], blanks=[]) + self.fields['ANTIENCX'] = nacc.uds3.Field(name='ANTIENCX', typename='Char', position=(282, 341), length=60, inclusive_range=None, allowable_values=[], blanks=['Blank if Question 22 ANTIENC ne 1 (Yes)']) + self.fields['OTHCOND'] = nacc.uds3.Field(name='OTHCOND', typename='Num', position=(343, 343), length=1, inclusive_range=(0, 1), allowable_values=['1', '0'], blanks=[]) + self.fields['OTHCONDX'] = nacc.uds3.Field(name='OTHCONDX', typename='Num', position=(345, 404), length=60, inclusive_range=(), allowable_values=[], blanks=['Blank if Question 23 OTHCOND ne 1 (Yes)']) class FormZ1(nacc.uds3.FieldBag): diff --git a/setup.py b/setup.py index 5dc6afd..6af4ccd 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages -VERSION="0.2.2" +VERSION="0.2.3" setup( name="nacculator",