From 2441dc3ede16db16942c6866bf578ea624dc7ed5 Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Mon, 4 Dec 2023 09:40:49 -0700 Subject: [PATCH] - Added friendly names --- .../parsers/schema_defs/tribal_tanf/t4.py | 13 +++++++ .../parsers/schema_defs/tribal_tanf/t5.py | 34 ++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t4.py b/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t4.py index 8e0d2d074..f5227781b 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t4.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t4.py @@ -19,6 +19,7 @@ Field( item="0", name="RecordType", + friendly_name="record type", type="string", startIndex=0, endIndex=2, @@ -28,6 +29,7 @@ Field( item="4", name="RPT_MONTH_YEAR", + friendly_name="reporting month and year", type="number", startIndex=2, endIndex=8, @@ -40,6 +42,7 @@ Field( item="6", name="CASE_NUMBER", + friendly_name="case number", type="string", startIndex=8, endIndex=19, @@ -49,6 +52,7 @@ Field( item="2", name="COUNTY_FIPS_CODE", + friendly_name="county fips code", type="string", startIndex=19, endIndex=22, @@ -58,6 +62,7 @@ Field( item="5", name="STRATUM", + friendly_name="stratum", type="string", startIndex=22, endIndex=24, @@ -67,6 +72,7 @@ Field( item="7", name="ZIP_CODE", + friendly_name="zip code", type="string", startIndex=24, endIndex=29, @@ -76,6 +82,7 @@ Field( item="8", name="DISPOSITION", + friendly_name="disposition", type="number", startIndex=29, endIndex=30, @@ -85,6 +92,7 @@ Field( item="9", name="CLOSURE_REASON", + friendly_name="closure reason", type="string", startIndex=30, endIndex=32, @@ -98,6 +106,7 @@ Field( item="10", name="REC_SUB_HOUSING", + friendly_name="receives subsidized housing", type="number", startIndex=32, endIndex=33, @@ -107,6 +116,7 @@ Field( item="11", name="REC_MED_ASSIST", + friendly_name="receives medical assistance", type="number", startIndex=33, endIndex=34, @@ -116,6 +126,7 @@ Field( item="12", name="REC_FOOD_STAMPS", + friendly_name="receives food stamps", type="number", startIndex=34, endIndex=35, @@ -125,6 +136,7 @@ Field( item="13", name="REC_SUB_CC", + friendly_name="receives subsidized child care", type="number", startIndex=35, endIndex=36, @@ -134,6 +146,7 @@ Field( item="14", name="BLANK", + friendly_name="blank", type="string", startIndex=36, endIndex=71, diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t5.py b/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t5.py index c5fedbd18..47213e2d1 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t5.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t5.py @@ -105,6 +105,7 @@ Field( item="0", name="RecordType", + friendly_name="record type", type="string", startIndex=0, endIndex=2, @@ -114,6 +115,7 @@ Field( item="4", name="RPT_MONTH_YEAR", + friendly_name="reporting month and year", type="number", startIndex=2, endIndex=8, @@ -126,6 +128,7 @@ Field( item="6", name="CASE_NUMBER", + friendly_name="case number", type="string", startIndex=8, endIndex=19, @@ -135,6 +138,7 @@ Field( item="14", name="FAMILY_AFFILIATION", + friendly_name="family affiliation", type="number", startIndex=19, endIndex=20, @@ -144,16 +148,21 @@ Field( item="15", name="DATE_OF_BIRTH", + friendly_name="date of birth", type="number", startIndex=20, endIndex=28, required=True, - validators=[validators.isLargerThan(0)], + validators=[ + validators.dateYearIsLargerThan(1900), + validators.dateMonthIsValid(), + ], ), TransformField( transform_func=tanf_ssn_decryption_func, item="16", name="SSN", + friendly_name="social security number - ssn", type="string", startIndex=28, endIndex=37, @@ -164,6 +173,7 @@ Field( item="17A", name="RACE_HISPANIC", + friendly_name="race hispanic", type="number", startIndex=37, endIndex=38, @@ -173,6 +183,7 @@ Field( item="17B", name="RACE_AMER_INDIAN", + friendly_name="race american indian", type="number", startIndex=38, endIndex=39, @@ -182,6 +193,7 @@ Field( item="17C", name="RACE_ASIAN", + friendly_name="race asian", type="number", startIndex=39, endIndex=40, @@ -191,6 +203,7 @@ Field( item="17D", name="RACE_BLACK", + friendly_name="race black", type="number", startIndex=40, endIndex=41, @@ -200,6 +213,7 @@ Field( item="17E", name="RACE_HAWAIIAN", + friendly_name="race hawaiian", type="number", startIndex=41, endIndex=42, @@ -209,6 +223,7 @@ Field( item="17F", name="RACE_WHITE", + friendly_name="race white", type="number", startIndex=42, endIndex=43, @@ -218,6 +233,7 @@ Field( item="18", name="GENDER", + friendly_name="gender", type="number", startIndex=43, endIndex=44, @@ -227,6 +243,7 @@ Field( item="19A", name="REC_OASDI_INSURANCE", + friendly_name="receives old-age survivors and disability insurance", type="number", startIndex=44, endIndex=45, @@ -236,6 +253,7 @@ Field( item="19B", name="REC_FEDERAL_DISABILITY", + friendly_name="receives federal disability", type="number", startIndex=45, endIndex=46, @@ -245,6 +263,7 @@ Field( item="19C", name="REC_AID_TOTALLY_DISABLED", + friendly_name="receives aid for totally disabled", type="number", startIndex=46, endIndex=47, @@ -254,6 +273,7 @@ Field( item="19D", name="REC_AID_AGED_BLIND", + friendly_name="receives from the aid to the aged, blind, and disabled program", type="number", startIndex=47, endIndex=48, @@ -263,6 +283,7 @@ Field( item="19E", name="REC_SSI", + friendly_name="receives social security income", type="number", startIndex=48, endIndex=49, @@ -272,6 +293,7 @@ Field( item="20", name="MARITAL_STATUS", + friendly_name="marital status", type="number", startIndex=49, endIndex=50, @@ -281,6 +303,7 @@ Field( item="21", name="RELATIONSHIP_HOH", + friendly_name="relationship to head of household", type="string", startIndex=50, endIndex=52, @@ -290,6 +313,7 @@ Field( item="22", name="PARENT_MINOR_CHILD", + friendly_name="parent of minor child", type="number", startIndex=52, endIndex=53, @@ -299,6 +323,7 @@ Field( item="23", name="NEEDS_OF_PREGNANT_WOMAN", + friendly_name="needs of pregnant woman", type="number", startIndex=53, endIndex=54, @@ -308,6 +333,7 @@ Field( item="24", name="EDUCATION_LEVEL", + friendly_name="educational level", type="string", startIndex=54, endIndex=56, @@ -322,6 +348,7 @@ Field( item="25", name="CITIZENSHIP_STATUS", + friendly_name="citizenship status", type="number", startIndex=56, endIndex=57, @@ -335,6 +362,7 @@ Field( item="26", name="COUNTABLE_MONTH_FED_TIME", + friendly_name="countable months toward federal time", type="string", startIndex=57, endIndex=60, @@ -344,6 +372,7 @@ Field( item="27", name="COUNTABLE_MONTHS_STATE_TRIBE", + friendly_name="countable months remaining under state tribe", type="string", startIndex=60, endIndex=62, @@ -353,6 +382,7 @@ Field( item="28", name="EMPLOYMENT_STATUS", + friendly_name="employment status", type="number", startIndex=62, endIndex=63, @@ -362,6 +392,7 @@ Field( item="29", name="AMOUNT_EARNED_INCOME", + friendly_name="amount earnedof income", type="string", startIndex=63, endIndex=67, @@ -371,6 +402,7 @@ Field( item="30", name="AMOUNT_UNEARNED_INCOME", + friendly_name="amount of unearned income", type="string", startIndex=67, endIndex=71,