opensrp / opensrp-client-chw

Reference OpenSRP application for Community Health Workers (CHWs)
Other
3 stars 21 forks source link

Update visit due logic #1285

Open isabelcshaw opened 4 years ago

isabelcshaw commented 4 years ago

A CHA should only be prompted to record a monthly visit/a monthly visit should only become due IF a vaccine dose is due as well. Aka if it has been a month since a child's last visit, but that child does not have anything vaccines due, then do not prompt the CHA to conduct a visit.

rkodev commented 4 years ago

This requires a shift in the scheduling of visits i.e base visit on pending services and not regular monthly visits. @isabelcshaw, please confirm this is the expected behavior

  1. Visits are no longer pegged to a monthly schedule. i.e Due to a visit is only enabled when a vaccine/service is due.
  2. The aggregated family status is also only generated from due/overdue vaccines
  3. We no longer have an overdue status for vaccines/services

Areas to be modified

  1. All register views (child and family) are based on vaccines alone
  2. Profile page and profile services are based on vaccines only
  3. Upcoming services
isabelcshaw commented 4 years ago

@paulinembabu what we want to do here is actually just put a condition on a monthly visit.

They want to maintain the monthly visit schedule as the base. Aka just because a child has something due, doesn't mean that the CHW will go to their house at any point in time. They will still only going on a monthly basis. BUT they also want to not show a visit is due if there are no vaccines due. Aka the CHW will not go to that house, even if it has been a month because there is nothing due and, therefore, nothing to record.

So, in order for a visit to be due two things have to be true: it has been a month + there is a vaccine due for someone in the household.

But point 3 above is correct - we don't need the concept/status of overdue anymore.

Areas to modify also look good.