cht-conf icon indicating copy to clipboard operation
cht-conf copied to clipboard

Declarative Configuration - tasks&targets should ignore contacts which are muted by default

Open kennsippell opened this issue 5 years ago • 1 comments

Tasks and targets should ignore muted contacts by default. Today, every task and target which wants to ignore them needs to add && (!c.contact || !c.contact.muted) onto their appliesTo function. It's an easy thing to miss, an easy thing to forget to test, an easy thing to forget the null check, etc.

It would be nice to add a new boolean flag to both the tasks and targets declarative schema. When true, muted contacts will be ignored. Default to true

kennsippell avatar Dec 12 '19 22:12 kennsippell

I definitely agree we should ignore muted contacts when generating tasks, and I'd include deceased in this too.

With targets it's a little more complicated. If your goal is to visit a certain % of your patients then we shouldn't include muted or deceased contacts in either the denominator or the numerator. However for counts I think we should still include actions that occurred before the contact was muted. That may be enough of an edge case to ignore...

garethbowen avatar Dec 12 '19 22:12 garethbowen