Skip to content

Commit 1c3eb9c

Browse files
committed
debugging demographics match
1 parent 3b31be8 commit 1c3eb9c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lambdas/id_sync/src/record_processor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def normalize_strings(item: Any) -> str | None:
144144
pds_name = normalize_strings(extract_normalized_name_from_patient(pds_details))
145145
pds_gender = normalize_strings(pds_details.get("gender"))
146146
pds_birth = normalize_strings(pds_details.get("birthDate"))
147+
logger.debug("demographics_match: demographics match for %s", pds_name, pds_gender, pds_birth)
147148

148149
# Retrieve patient resource from IEDS item
149150
patient = extract_patient_resource_from_item(ieds_item)
@@ -155,6 +156,7 @@ def normalize_strings(item: Any) -> str | None:
155156
ieds_name = normalize_strings(extract_normalized_name_from_patient(patient))
156157
ieds_gender = normalize_strings(patient.get("gender"))
157158
ieds_birth = normalize_strings(patient.get("birthDate"))
159+
logger.debug("demographics_match: demographics match for %s", patient)
158160

159161
# All required fields must be present
160162
if not all([pds_name, pds_gender, pds_birth, ieds_name, ieds_gender, ieds_birth]):
@@ -174,6 +176,7 @@ def normalize_strings(item: Any) -> str | None:
174176
logger.debug("demographics_match: name mismatch %s != %s", pds_name, ieds_name)
175177
return False
176178

179+
logger.debug("demographics_match: demographics match for %s", patient)
177180
return True
178181
except Exception:
179182
logger.exception("demographics_match: comparison failed with exception")

0 commit comments

Comments
 (0)