opensrp / opensrp-client-chw

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

Fix button logic in the family register #1362

Open isabelcshaw opened 4 years ago

isabelcshaw commented 4 years ago

The logic for the status in the family register is currently not working the way it is intended.

This is what is expected:

  1. Blank -> This family has no pending tasks
  2. Task Done -> All tasks for the month have been completed
  3. Blue or Red number. Blue shows up when you have tasks that are due, red is indicated when at least 1 or more tasks are overdue.

Re 1.: E.g. "Mungs family" is blank but the last visit was over 200 days ago and the child has numerous vaccines due Re 3.: "Test Family" has a child with multiple vaccines overdue and yet it is not red

isabelcshaw commented 4 years ago

@paulinembabu I've moved this back over to in progress because when I tested this earlier, I was still seeing several cases of families that blanks (aka nothing due) on the register, but actually do have a home visit due once you click into them.

Is there a piece of logic I'm missing here? My understanding is that if the family does not have a button on the register view, then no family member should have any services due.