-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
…ivated patients, if such found, not creating new ones
…wcirg/cosri-patientsearch into feature/deactivate-account-fix
…wcirg/cosri-patientsearch into feature/deactivate-account-fix
…wcirg/cosri-patientsearch into feature/deactivate-account-fix
…wcirg/cosri-patientsearch into feature/deactivate-account-fix
…wcirg/cosri-patientsearch into feature/deactivate-account-fix
patientsearch/api.py
Outdated
and active_patient_flag | ||
and not is_inactive_search | ||
): | ||
params["active"] = "true" |
There was a problem hiding this comment.
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.
There was a problem hiding this 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" | ||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Working on implementing active boolean field in the Patient as per https://www.pivotaltracker.com/story/show/185455581