We have discovered that our CHVs sometimes submit multiple death reports for a single contact because they get confused if the form got submitted or not since it takes time for the contact profile to turn grey.
When a CHV submits a death report, a field called date_of_death
is added in the contact’s document. Hence, in the death_report.properties.json
, we ensure that the form does not appear if date_of_death
field is available. Here’s the code:
{
“title”: [
{
“locale”: “en”,
“content”: “Death Report”
},
{
“locale”: “sw”,
“content”: “Taarifa ya kifo”
}
],
“icon”: “death”,
“context”: {
“person”: true,
“place”: false,
“expression”: “contact && contact.type === ‘person’ && contact.parent && contact.parent.parent && contact.parent.parent.parent && !contact.date_of_death”
}
}
While this check works after the contact profile turns grey, the problem occurs between the time a death form is submitted to when the profile changes. I observed that there is a delay of at least 30 seconds to a minute before the contact’s profile turns grey and the death form disappears. In this short time frame, I was able to submit another death report (which should not be the case).
Has anyone experienced this and if so, how did you go about resolving it?