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

[New Feature Request]: Update the Partial Contacts to save the Practitioner Details. #878

Closed
2 tasks
dubdabasoduba opened this issue Aug 24, 2022 · 7 comments · May be fixed by #903
Closed
2 tasks

[New Feature Request]: Update the Partial Contacts to save the Practitioner Details. #878

dubdabasoduba opened this issue Aug 24, 2022 · 7 comments · May be fixed by #903
Assignees
Labels
general app updates(WHO ANC) QA+ Size: Large (4-5) Will take 4 to 5 days to resolve Tech Partner (Zambia & Rwanda) This tag will be used to track all the support issues created by our tech partners (Zambia & Rwanda)

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Aug 24, 2022

Feature Use Case

  • We have a use case where multiple practitioners will be responsible for filling out the contact forms.
  • Based on this we would need to know who filled out each form.
  • We can do this by saving the practitioner details on the partial forms. The details in question are Practitioner Id, Practitioner Username, Team Id & name & the Location Id
  • We will then use these details when processing the partial forms to events.

Test Steps

  • Check that a partial contact has a practitioner array with practitioner details (table to check -> partial_contacts)
  • check the event generated when completing a contact has the same provider ID, Team ID and team location as partial contact. table to check -> event_table

Acceptance criteria

  • All partial contacts should have an attribute called practitionerDetails. This will hold the details mentioned above.
  • All the contact events should have the same practitioners as those on the partial forms.

Relevant Information

No response

@AngelaKabari AngelaKabari added the Tech Partner (Zambia & Rwanda) This tag will be used to track all the support issues created by our tech partners (Zambia & Rwanda) label Aug 24, 2022
@dubdabasoduba dubdabasoduba removed their assignment Aug 26, 2022
@AngelaKabari AngelaKabari changed the title [New Feature Request]: Update the Partial Contacts to saved the Practitioner Details. [New Feature Request]: Update the Partial Contacts to save the Practitioner Details. Aug 30, 2022
@SebaMutuku SebaMutuku self-assigned this Sep 14, 2022
@SebaMutuku
Copy link
Contributor

SebaMutuku commented Sep 22, 2022

  • [ Addition of userId in client core to make it available on shared preferences]
  • [Update Event Class on Client Core to have PractitionerDetails]

@madrinekariuki
Copy link

madrinekariuki commented Sep 27, 2022

@SebaMutuku cc @Naima-Bashir
apk reference-app-release-partial-contacts.apk
users demo and demo2

Steps:

have 2 users.

  • Open android studio and install the apk.
  • login with one of the users
  • sync data.
  • register a client and do a partial contact (fill in some modules and save changes)
  • sync data
  • download the DB
  • open the db and go to the partial contacts table.
  • confirm it shows the module you are at.
  • copy the data on form_json and open it in a json formatter
  • scroll down to the provider/practioner details and confirm they are there i.e providerBaseEntityId,providerId,teamId,team,locationId and take note of them.
  • for partial contact, log out and login with the other user and you will observe the partial contact written contact 1 in progress.
  • When you check open the provider/practitioner details it shall be details of the previous user .AND in case you make any changes to the contact e.g fill in another module or complete the contact, the provider details i.e providerBaseEntityId, providerId will change to that of the most recent user to add data in the contact
  • complete the contact and save data.
  • open the DB
  • For Event Check the event generated when after completing a contact has the same provider ID, Team ID and team location as partial contact. table to check -> event_table search the client by BaseEntityId (you can get this from ec_clients table).

Observation.

  • partial contact show the correct details i.e according to the user who has made changes to the contact
  • partial contacts for multiple clients also show. (you can do artial contacts for like 2 or more clients)
  • once a contact is complete partial_contact table gets updated. (partial) data is removed from this table.
  • in the event, details of provider ID, Team ID and team location are the same as those of the partial contact

items to address/clarify:

  • There is no Event created when a client contact is not complete i.e partial should this be the case?.
  • @SebaMutuku what are the conditions to have an event generated?.. should one have to complete a contact?
  • user cannot add a new client to this apk. (thus this has been tested with old data)

@SebaMutuku
Copy link
Contributor

@madrinekariuki ,as for the apk not creating client, I have shared another apk which works well.

Find below answers to your questions:
1.once a contact is complete partial_contact table gets updated. (partial) data is removed from this table.
-There is no Event created when a client contact is not complete partial should this be the case?.
@seb what are the conditions to have an event generated?.. should one have to complete a contact?-> Partial Contacts are not Synced from client app to opensrp web (ANC Architecture) hence no event for Partial contact is generated.

  1. The event generated is for a complete contact which can be found in event table on drisht database. In this table, there exists event jsons for each contact container.
    cc @dubdabasoduba

@madrinekariuki
Copy link

@SebaMutuku cc @dubdabasoduba

see below test findings from the shared apk with the fix.

steps:
followed steps mentioned above.

observations:

  • partial contact show the correct details according to the user who has made changes to the contact (screenshot below)
  • once a contact is complete partial_contact table gets updated and an event is generated.
  • in the event, details of provider ID, Team ID and team location are the same as those of the partial contact.
  • events generated from an old client are different from those of new clients there some values missing. e.g _rev,obs, identifiers,serverVersion . (screenshots below) @SebaMutuku adviced these are not mandatory values.
  • important to note that partial contact is only possible in one device not multiple devices.

partial contact screenshot
image

event screenshot
image

@Naima-Bashir
Copy link
Collaborator

Apk was shared with the Bluecode team on September 28th. Awaiting client QA

@Naima-Bashir
Copy link
Collaborator

@tobiasmakai can we close this issue? has it passed QA from your end?

@Naima-Bashir
Copy link
Collaborator

Closing this after getting the go ahead from the client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general app updates(WHO ANC) QA+ Size: Large (4-5) Will take 4 to 5 days to resolve Tech Partner (Zambia & Rwanda) This tag will be used to track all the support issues created by our tech partners (Zambia & Rwanda)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants