Skip to content

Commit

Permalink
Fixup code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-c committed Nov 19, 2024
1 parent c86fb23 commit a4596f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion patientsearch/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,9 @@ def external_search(resource_type):
audit_entry("multiple patients returned from PDMP", extra=extra, level="warn")

if external_match_count:
external_search_bundle["entry"][0]["resource"].setdefault("id", local_fhir_patient["id"])
external_search_bundle["entry"][0]["resource"].setdefault(
"id", local_fhir_patient["id"]
)

message = "PDMP found match" if external_match_count else "fEMR found match"
audit_entry(message, extra=extra)
Expand Down
4 changes: 3 additions & 1 deletion patientsearch/models/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def sync_bundle(token, bundle, consider_active=False):
for entry in bundle.get("entry"):
# Restrict to what is expected for now
if entry["resource"]["resourceType"] != "Patient":
raise ValueError(f"Can't sync resourceType {entry['resource']['resourceType']}")
raise ValueError(
f"Can't sync resourceType {entry['resource']['resourceType']}"
)

patient = sync_patient(token, entry["resource"], consider_active)
# TODO handle multiple external matches (if it ever happens!)
Expand Down

0 comments on commit a4596f0

Please sign in to comment.