Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/deactivate account fix #204

Merged
merged 115 commits into from
Jan 18, 2024
Merged

Conversation

Filienko
Copy link
Contributor

@Filienko Filienko commented Dec 13, 2023

Working on implementing active boolean field in the Patient as per https://www.pivotaltracker.com/story/show/185455581

@Filienko Filienko requested a review from pbugni December 13, 2023 23:37
patientsearch/api.py Show resolved Hide resolved
patientsearch/api.py Outdated Show resolved Hide resolved
and active_patient_flag
and not is_inactive_search
):
params["active"] = "true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can just be set to the result of the nested function above.

patientsearch/api.py Outdated Show resolved Hide resolved
patientsearch/api.py Outdated Show resolved Hide resolved
@Filienko Filienko requested a review from pbugni January 18, 2024 17:22
Copy link
Contributor

@pbugni pbugni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor request, but looking solid!

del params["inactive_search"]
elif active_patient_flag:
params["active"] = "true"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better, thank you.

@@ -500,12 +577,18 @@ def external_search(resource_type):
# See if local match already exists
patient = resource_from_args(resource_type, request.args)
try:
internal_bundle = internal_patient_search(token, patient)
internal_bundle = internal_patient_search(
token, patient, not reactivate_patient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using keyword arguments will prevent getting them out of order, and make this easier to read/review. i had to look up internal_patient_search to see what that third parameter is. i.e. active_only=not reactivate_patient

@Filienko Filienko merged commit 4fc6feb into develop Jan 18, 2024
7 checks passed
@Filienko Filienko deleted the feature/deactivate-account-fix branch January 18, 2024 21:31
@Filienko Filienko restored the feature/deactivate-account-fix branch January 18, 2024 21:33
@Filienko Filienko deleted the feature/deactivate-account-fix branch January 19, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants