cht-conf
cht-conf copied to clipboard
Declarative Configuration - tasks&targets should ignore contacts which are muted by default
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
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...