Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

Adds documentation for update_patient transition. #213

Merged
merged 4 commits into from
May 12, 2020

Conversation

dianabarsan
Copy link
Member

Copy link
Contributor

@SCdF SCdF 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 change / clearup, but nothing that would stop you from merging!


### update_patient

Updates a `data_record` to set its patient to its sender, the resulting doc will have `fields.patient_uuid` and `fields.patient_id` filled with the sender's information. Provides hydrated patient information to subsequent transitions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Updates a `data_record` to set its patient to its sender, the resulting doc will have `fields.patient_uuid` and `fields.patient_id` filled with the sender's information. Provides hydrated patient information to subsequent transitions.
Updates a `data_record` to set its patient to its sender. The resulting doc will have `fields.patient_uuid` and `fields.patient_id` filled with the sender's information. Provides hydrated patient information to subsequent transitions.

You somewhat explain it the next paragraph, but consider explicitly stating that "sender" is the person who is attached to the phone number the original SMS was sent from.

@abbyad
Copy link
Contributor

abbyad commented Apr 28, 2020

The transition name update_patient could lead to confusion since we've had requests to update the patient doc via SMS reports. Can we add some reference to self reporting, eg self_report? I think that will be clearer from a configurer (app developer) perspective.

@dianabarsan
Copy link
Member Author

@abbyad I like self_report! Thanks for the suggestion!

@dianabarsan dianabarsan requested a review from SCdF April 29, 2020 10:59
Copy link
Contributor

@SCdF SCdF left a comment

Choose a reason for hiding this comment

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

Looks good! One slight re-wording to consider, but it could really just be in my head


Updates a `data_record` to set its patient to its sender. The resulting doc will have `fields.patient_uuid` and `fields.patient_id` filled with the sender's information. Provides hydrated patient information to subsequent transitions.
The `sender` is the contact associated with the phone number that sent the original SMS.
If a doc already contains a `patient` field, does not have a sender or does not have a configured `form` field, it will be ignored by this transition.
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider:

Suggested change
If a doc already contains a `patient` field, does not have a sender or does not have a configured `form` field, it will be ignored by this transition.
If a doc already contains a `patient` field, does not have a sender or whose `form` is not configured to be enabled for this transition, it will be ignored.

When I read my first thought was that you meant a form field that is any configured form (like for the entire application).

@dianabarsan dianabarsan merged commit 33537f8 into master May 12, 2020
@dianabarsan dianabarsan deleted the 6286-update-patient-transition branch May 20, 2020 11:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants