diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py b/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py index 0ba3d002d..f74a70f05 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py @@ -92,7 +92,7 @@ validators.isNumber(), ]), Field(item="5", name='STRATUM', type='string', startIndex=22, endIndex=24, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()), ]), @@ -129,7 +129,7 @@ validators.isInLimits(1, 2), ]), Field(item="15", name='RECEIVES_FOOD_STAMPS', type='number', startIndex=37, endIndex=38, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()), ]), @@ -138,7 +138,7 @@ validators.isLargerThanOrEqualTo(0), ]), Field(item="17", name='RECEIVES_SUB_CC', type='number', startIndex=42, endIndex=43, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isInLimits(0, 3), validators.numIsBlank()), ]), @@ -183,22 +183,22 @@ validators.isLargerThanOrEqualTo(0), ]), Field(item="24A", name='TRANSITION_SERVICES_AMOUNT', type='number', startIndex=78, endIndex=82, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isLargerThanOrEqualTo(0), validators.numIsBlank()), ]), Field(item="24B", name='TRANSITION_NBR_MONTHS', type='number', startIndex=82, endIndex=85, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isLargerThanOrEqualTo(0), validators.numIsBlank()), ]), Field(item="25A", name='OTHER_AMOUNT', type='number', startIndex=85, endIndex=89, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isLargerThanOrEqualTo(0), validators.numIsBlank()), ]), Field(item="25B", name='OTHER_NBR_MONTHS', type='number', startIndex=89, endIndex=92, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isLargerThanOrEqualTo(0), validators.numIsBlank()), ]), @@ -211,7 +211,7 @@ validators.oneOf([1, 2]), ]), Field(item="26AIII", name='FAMILY_SANC_ADULT', type='number', startIndex=97, endIndex=98, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.oneOf([0, 1, 2]), validators.numIsBlank()), ]), @@ -252,7 +252,7 @@ validators.oneOf([1, 2]), ]), Field(item="27", name='WAIVER_EVAL_CONTROL_GRPS', type='string', startIndex=113, endIndex=114, - required=True, validators=[ + required=False, validators=[ validators.or_validators( validators.and_validators( validators.or_validators(validators.matches('9'), validators.isEmpty()), @@ -266,7 +266,7 @@ 6, 7, 8, 9]) ]), Field(item="29", name='FAMILY_NEW_CHILD', type='number', startIndex=116, endIndex=117, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.oneOf([1, 2]), validators.numIsBlank()), ]), diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py b/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py index dc2886e00..fe6d64cfd 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py @@ -109,22 +109,22 @@ TransformField(transform_func=tanf_ssn_decryption_func, item="33", name='SSN', type='string', startIndex=29, endIndex=38, required=True, validators=[validators.validateSSN()], is_encrypted=False), - Field(item="34A", name='RACE_HISPANIC', type='number', startIndex=38, endIndex=39, required=True, + Field(item="34A", name='RACE_HISPANIC', type='number', startIndex=38, endIndex=39, required=False, validators=[validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()),]), - Field(item="34B", name='RACE_AMER_INDIAN', type='number', startIndex=39, endIndex=40, required=True, + Field(item="34B", name='RACE_AMER_INDIAN', type='number', startIndex=39, endIndex=40, required=False, validators=[validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()),]), - Field(item="34C", name='RACE_ASIAN', type='number', startIndex=40, endIndex=41, required=True, + Field(item="34C", name='RACE_ASIAN', type='number', startIndex=40, endIndex=41, required=False, validators=[validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()),]), - Field(item="34D", name='RACE_BLACK', type='number', startIndex=41, endIndex=42, required=True, + Field(item="34D", name='RACE_BLACK', type='number', startIndex=41, endIndex=42, required=False, validators=[validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()),]), - Field(item="34E", name='RACE_HAWAIIAN', type='number', startIndex=42, endIndex=43, required=True, + Field(item="34E", name='RACE_HAWAIIAN', type='number', startIndex=42, endIndex=43, required=False, validators=[validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()),]), - Field(item="34F", name='RACE_WHITE', type='number', startIndex=43, endIndex=44, required=True, + Field(item="34F", name='RACE_WHITE', type='number', startIndex=43, endIndex=44, required=False, validators=[validators.or_validators(validators.isInLimits(0, 2), validators.numIsBlank()),]), Field(item="35", name='GENDER', type='number', startIndex=44, endIndex=45, required=True, @@ -133,92 +133,92 @@ validators=[validators.oneOf([1, 2])]), Field(item="36B", name='FED_DISABILITY_STATUS', type='number', startIndex=46, endIndex=47, required=True, validators=[validators.oneOf([1, 2])]), - Field(item="36C", name='DISABLED_TITLE_XIVAPDT', type='string', startIndex=47, endIndex=48, required=True, + Field(item="36C", name='DISABLED_TITLE_XIVAPDT', type='string', startIndex=47, endIndex=48, required=False, validators=[validators.or_validators(validators.oneOf(["1", "2"]), validators.isBlank())]), - Field(item="36D", name='AID_AGED_BLIND', type='number', startIndex=48, endIndex=49, required=True, + Field(item="36D", name='AID_AGED_BLIND', type='number', startIndex=48, endIndex=49, required=False, validators=[validators.or_validators(validators.isLargerThanOrEqualTo(0), validators.numIsBlank()),]), Field(item="36E", name='RECEIVE_SSI', type='number', startIndex=49, endIndex=50, required=True, validators=[validators.oneOf([1, 2]),]), - Field(item="37", name='MARITAL_STATUS', type='number', startIndex=50, endIndex=51, required=True, + Field(item="37", name='MARITAL_STATUS', type='number', startIndex=50, endIndex=51, required=False, validators=[validators.or_validators(validators.isInLimits(0, 5), validators.numIsBlank()),]), Field(item="38", name='RELATIONSHIP_HOH', type='string', startIndex=51, endIndex=53, required=True, validators=[validators.isInStringRange(1, 10),]), - Field(item="39", name='PARENT_WITH_MINOR_CHILD', type='number', startIndex=53, endIndex=54, required=True, + Field(item="39", name='PARENT_WITH_MINOR_CHILD', type='number', startIndex=53, endIndex=54, required=False, validators=[validators.or_validators(validators.isInLimits(0, 3), validators.numIsBlank()),]), - Field(item="40", name='NEEDS_PREGNANT_WOMAN', type='number', startIndex=54, endIndex=55, required=True, + Field(item="40", name='NEEDS_PREGNANT_WOMAN', type='number', startIndex=54, endIndex=55, required=False, validators=[validators.or_validators(validators.isInLimits(0, 9), validators.numIsBlank()),]), - Field(item="41", name='EDUCATION_LEVEL', type='string', startIndex=55, endIndex=57, required=True, + Field(item="41", name='EDUCATION_LEVEL', type='string', startIndex=55, endIndex=57, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 16), validators.isInStringRange(98, 99), validators.isBlank())]), - Field(item="42", name='CITIZENSHIP_STATUS', type='number', startIndex=57, endIndex=58, required=True, + Field(item="42", name='CITIZENSHIP_STATUS', type='number', startIndex=57, endIndex=58, required=False, validators=[validators.or_validators(validators.oneOf([0, 1, 2, 9]), validators.numIsBlank()),]), - Field(item="43", name='COOPERATION_CHILD_SUPPORT', type='number', startIndex=58, endIndex=59, required=True, + Field(item="43", name='COOPERATION_CHILD_SUPPORT', type='number', startIndex=58, endIndex=59, required=False, validators=[validators.or_validators(validators.oneOf([0, 1, 2, 9]), validators.numIsBlank()),]), - Field(item="44", name='MONTHS_FED_TIME_LIMIT', type='string', startIndex=59, endIndex=62, required=True, + Field(item="44", name='MONTHS_FED_TIME_LIMIT', type='string', startIndex=59, endIndex=62, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 999), validators.isBlank()),]), - Field(item="45", name='MONTHS_STATE_TIME_LIMIT', type='string', startIndex=62, endIndex=64, required=True, + Field(item="45", name='MONTHS_STATE_TIME_LIMIT', type='string', startIndex=62, endIndex=64, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), Field(item="46", name='CURRENT_MONTH_STATE_EXEMPT', type='number', startIndex=64, endIndex=65, - required=True, validators=[validators.or_validators(validators.isInLimits(0, 9), + required=False, validators=[validators.or_validators(validators.isInLimits(0, 9), validators.numIsBlank()),]), - Field(item="47", name='EMPLOYMENT_STATUS', type='number', startIndex=65, endIndex=66, required=True, + Field(item="47", name='EMPLOYMENT_STATUS', type='number', startIndex=65, endIndex=66, required=False, validators=[validators.or_validators(validators.isInLimits(0, 3), validators.numIsBlank()),]), Field(item="48", name='WORK_ELIGIBLE_INDICATOR', type='string', startIndex=66, endIndex=68, required=True, validators=[validators.or_validators(validators.isInStringRange(0, 9), validators.oneOf(('11', '12')) )]), - Field(item="49", name='WORK_PART_STATUS', type='string', startIndex=68, endIndex=70, required=True, + Field(item="49", name='WORK_PART_STATUS', type='string', startIndex=68, endIndex=70, required=False, validators=[validators.or_validators( validators.oneOf(['01', '02', '05', '07', '09', '15', '16', '17', '18', '19', '99']), validators.isBlank()),]), - Field(item="50", name='UNSUB_EMPLOYMENT', type='string', startIndex=70, endIndex=72, required=True, + Field(item="50", name='UNSUB_EMPLOYMENT', type='string', startIndex=70, endIndex=72, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="51", name='SUB_PRIVATE_EMPLOYMENT', type='string', startIndex=72, endIndex=74, required=True, + Field(item="51", name='SUB_PRIVATE_EMPLOYMENT', type='string', startIndex=72, endIndex=74, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="52", name='SUB_PUBLIC_EMPLOYMENT', type='string', startIndex=74, endIndex=76, required=True, + Field(item="52", name='SUB_PUBLIC_EMPLOYMENT', type='string', startIndex=74, endIndex=76, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="53A", name='WORK_EXPERIENCE_HOP', type='string', startIndex=76, endIndex=78, required=True, + Field(item="53A", name='WORK_EXPERIENCE_HOP', type='string', startIndex=76, endIndex=78, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="53B", name='WORK_EXPERIENCE_EA', type='string', startIndex=78, endIndex=80, required=True, + Field(item="53B", name='WORK_EXPERIENCE_EA', type='string', startIndex=78, endIndex=80, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="53C", name='WORK_EXPERIENCE_HOL', type='string', startIndex=80, endIndex=82, required=True, + Field(item="53C", name='WORK_EXPERIENCE_HOL', type='string', startIndex=80, endIndex=82, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="54", name='OJT', type='string', startIndex=82, endIndex=84, required=True, validators=[ + Field(item="54", name='OJT', type='string', startIndex=82, endIndex=84, required=False, validators=[ validators.or_validators( validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="55A", name='JOB_SEARCH_HOP', type='string', startIndex=84, endIndex=86, required=True, + Field(item="55A", name='JOB_SEARCH_HOP', type='string', startIndex=84, endIndex=86, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="55B", name='JOB_SEARCH_EA', type='string', startIndex=86, endIndex=88, required=True, + Field(item="55B", name='JOB_SEARCH_EA', type='string', startIndex=86, endIndex=88, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="55C", name='JOB_SEARCH_HOL', type='string', startIndex=88, endIndex=90, required=True, + Field(item="55C", name='JOB_SEARCH_HOL', type='string', startIndex=88, endIndex=90, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="56A", name='COMM_SERVICES_HOP', type='string', startIndex=90, endIndex=92, required=True, + Field(item="56A", name='COMM_SERVICES_HOP', type='string', startIndex=90, endIndex=92, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="56B", name='COMM_SERVICES_EA', type='string', startIndex=92, endIndex=94, required=True, + Field(item="56B", name='COMM_SERVICES_EA', type='string', startIndex=92, endIndex=94, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), - Field(item="56C", name='COMM_SERVICES_HOL', type='string', startIndex=94, endIndex=96, required=True, + Field(item="56C", name='COMM_SERVICES_HOL', type='string', startIndex=94, endIndex=96, required=False, validators=[validators.or_validators(validators.isInStringRange(0, 99), validators.isBlank()),]), Field(item="57A", name='VOCATIONAL_ED_TRAINING_HOP', type='string', startIndex=96, endIndex=98, diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t3.py b/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t3.py index 351f98628..e3cdab0ad 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t3.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/tanf/t3.py @@ -84,22 +84,22 @@ endIndex=37, required=True, validators=[validators.validateSSN()], is_encrypted=False), Field(item="70A", name='RACE_HISPANIC', type='number', startIndex=37, endIndex=38, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70B", name='RACE_AMER_INDIAN', type='number', startIndex=38, endIndex=39, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70C", name='RACE_ASIAN', type='number', startIndex=39, endIndex=40, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70D", name='RACE_BLACK', type='number', startIndex=40, endIndex=41, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70E", name='RACE_HAWAIIAN', type='number', startIndex=41, endIndex=42, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70F", name='RACE_WHITE', type='number', startIndex=42, endIndex=43, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="71", name='GENDER', type='number', startIndex=43, endIndex=44, required=True, validators=[ @@ -114,12 +114,12 @@ validators.oneOf([1, 2]) ]), Field(item="73", name='RELATIONSHIP_HOH', type='string', startIndex=46, endIndex=48, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isInStringRange(0, 10), validators.isBlank()) ]), Field(item="74", name='PARENT_MINOR_CHILD', type='number', startIndex=48, endIndex=49, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.oneOf([0, 2, 3]), validators.numIsBlank()) ]), @@ -131,7 +131,7 @@ ) ]), Field(item="76", name='CITIZENSHIP_STATUS', type='number', startIndex=51, endIndex=52, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.oneOf([0, 1, 2, 9]), validators.numIsBlank()) ]), @@ -222,22 +222,22 @@ endIndex=78, required=True, validators=[validators.validateSSN()], is_encrypted=False), Field(item="70A", name='RACE_HISPANIC', type='number', startIndex=78, endIndex=79, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70B", name='RACE_AMER_INDIAN', type='number', startIndex=79, endIndex=80, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70C", name='RACE_ASIAN', type='number', startIndex=80, endIndex=81, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70D", name='RACE_BLACK', type='number', startIndex=81, endIndex=82, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70E", name='RACE_HAWAIIAN', type='number', startIndex=82, endIndex=83, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="70F", name='RACE_WHITE', type='number', startIndex=83, endIndex=84, - required=True, validators=[validators.or_validators(validators.validateRace(), + required=False, validators=[validators.or_validators(validators.validateRace(), validators.numIsBlank()),]), Field(item="71", name='GENDER', type='number', startIndex=84, endIndex=85, required=True, validators=[ @@ -252,12 +252,12 @@ validators.oneOf([1, 2]) ]), Field(item="73", name='RELATIONSHIP_HOH', type='string', startIndex=87, endIndex=89, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.isInStringRange(0, 10), validators.isBlank()) ]), Field(item="74", name='PARENT_MINOR_CHILD', type='number', startIndex=89, endIndex=90, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.oneOf([0, 2, 3]), validators.numIsBlank()) ]), @@ -269,7 +269,7 @@ ) ]), Field(item="76", name='CITIZENSHIP_STATUS', type='number', startIndex=92, endIndex=93, - required=True, validators=[ + required=False, validators=[ validators.or_validators(validators.oneOf([0, 1, 2, 9]), validators.numIsBlank()) ]),