Skip to content

Commit

Permalink
Removed flag change
Browse files Browse the repository at this point in the history
  • Loading branch information
Filienko committed Jan 18, 2024
1 parent f62ae67 commit 4e40df9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions patientsearch/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,6 @@ def external_search(resource_type):
# Only consider active external patients
params["active"] = "true"

if active_patient_flag:
# Add default behavior for when the active consideration is disabled
reactivate_patient = True
# Tag any matching results with identifier naming source
try:
external_search_bundle = add_identifier_to_resource_type(
Expand Down Expand Up @@ -588,7 +585,8 @@ def external_search(resource_type):
local_fhir_patient = None
if internal_bundle["total"] > 0:
local_fhir_patient = internal_bundle["entry"][0]["resource"]
if active_patient_flag and reactivate_patient:
active = local_fhir_patient.get("active", True)
if reactivate_patient and not active:
local_fhir_patient = restore_patient(token, local_fhir_patient)

if internal_bundle["total"] > 1:
Expand Down

0 comments on commit 4e40df9

Please sign in to comment.