Describe the Feature:
Add to the config the ability to add a custon icon before or after the name of the contact in the contact liste
These icon could be configured to be displayed in red, yellow or green depending on a field, json key value, of the given contact
What “Pain Point” Does The Proposed Feature Address: [Is there an unmet need impacting patients, providers, managers, developers, etc?]
Once the CHW is in a household, she could scroll through the list of contacts and visually identify the contacts that need some special action, this is useful specially when the task on that contact has disappeared before being able to go to the family of the patient in question.
It could also be used with places in addition to persons
Proposed Solution:
In a similar way to the one we used to define the contact summary fields, we could have the ability to pass the “contact list fields” from the config,
{
appliesToType: 'person',
appliesIf: () => contact.role === 'patient' && contact.patient_age_in_months < 22,
position: 'after',
kpi-color: contact.vaccinal_state,
kpi-icon: 'fa-solid fa-syringe',
width:4
}
where available icons could be documented and kpi-color must be green, yellow or red, or maybe success, warning or danger
so in this case the icon with the color indicating the state should appear after each patient
update_contact transition
to easily have the contact’s field update I think that this will need a second feature, this is a transition to update de contact if some data_record is submitted in a very similar way as death_reporting works but with the ability to configure wich contact’s field would be updated
The update_contact transition would be a generalization of the de death_reporting transition that adds automatically a “date_of_death” field to the contact doc getting the value from a givien “date_field” in a list of forms specified in the mark_deceased_forms array and in the undo_deceased_forms array. So, maybe, it could be something like:
mark_contact_update_forms, array of forms identifiers
form_source_field, string with the path of the field in the form to use as a source value
form_source_field_type: 'date ' | 'string' | 'integer' | 'float'
the name of the field in the contact doc would be the same as form_source_field with the same form_source_field_type
If the field exists in the contact doc , the field would be updated with the new value
additionaly if we could have a transition_history like in mute/unmute transition this would be great.
Thanks