Skip to content

Commit 01cdff5

Browse files
committed
record processor
1 parent 5b72fe6 commit 01cdff5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lambdas/id_sync/src/record_processor.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def process_nhs_number(nhs_number: str) -> Dict[str, Any]:
7878
discarded_records.append(detail)
7979

8080
if not matching_records:
81-
logger.info("No records matched PDS demographics: %d %s", discarded_count, discarded_records)
81+
logger.info("No records matched PDS demographics: %d\nDiscarded:\n%s", discarded_count,
82+
json.dumps(discarded_records, indent=2))
8283
return make_status("No records matched PDS demographics; update skipped", nhs_number)
8384

8485
response = ieds_update_patient_id(
@@ -109,7 +110,7 @@ def fetch_pds_and_ieds_resources(nhs_number: str):
109110

110111
count = len(ieds)
111112
logger.info("fetch_pds_and_ieds_resources: fetched PDS and %d IEDS items for %s", count, nhs_number)
112-
logger.info("fetch_ieds_resources:", ieds)
113+
logger.info("fetch_ieds_resources: %s", ieds)
113114
return pds, ieds
114115

115116

@@ -148,7 +149,8 @@ def normalize_strings(item: Any) -> str | None:
148149
pds_name = normalize_strings(extract_normalized_name_from_patient(pds_details))
149150
pds_gender = normalize_strings(pds_details.get("gender"))
150151
pds_birth = normalize_strings(pds_details.get("birthDate"))
151-
logger.info("demographics_match: demographics match for %s", pds_name, pds_gender, pds_birth)
152+
logger.info("demographics_match: demographics match for name=%s, gender=%s, birthDate=%s",
153+
pds_name, pds_gender, pds_birth)
152154

153155
# Retrieve patient resource from IEDS item
154156
patient = extract_patient_resource_from_item(ieds_item)

0 commit comments

Comments
 (0)