Clean crosswalk function

This commit is contained in:
Katon Minhas
2026-02-03 00:08:36 -05:00
parent 4af0e26990
commit bb96edb7c5
2 changed files with 1 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ from src.constants.constants import Constants
constants = Constants()
all_exhibit_rows = [
{"PRODUCT" : ['HEALTHfirst', 'KIDSfirst']}
{"LOB" : ['Medicaid']}
]
all_exhibit_rows = aarete_derived.get_crosswalk_fields(all_exhibit_rows, constants)
@@ -136,10 +136,7 @@ def fill_na_mapping(answer_dicts):
def get_crosswalk_fields(answer_dicts: list, constants: Constants):
crosswalk_fields = FieldSet(file_path=config.FIELD_JSON_PATH, crosswalk=True)
print("crosswalk_fields: ", crosswalk_fields)
for to_field in crosswalk_fields.fields:
print("to_field: ", to_field)
to_field_name, from_field_name = to_field.field_name, to_field.base_field
# Find crosswalk
crosswalk = constants.get_constant(to_field.crosswalk)
@@ -147,10 +144,6 @@ def get_crosswalk_fields(answer_dicts: list, constants: Constants):
for answer_dict in answer_dicts:
to_field_value = answer_dict.get(to_field_name)
from_field_value = answer_dict.get(from_field_name)
print("to_field_value: ", to_field_value)
print("from_field_value: ", from_field_value)
# If from_field_value is populated and to_field_value is not populated, perform mapping
if not string_utils.is_empty(
from_field_value