sorry for bringing this back
as seen in the screenshot below, when the care assessment form is filled more than once then the condition card appears more than once which makes it abit congested
we wanted to always only display the conditional card to display the risk category for the latest submitted care assessment form ie only appearing once
{
label: 'task.risk.status',
appliesToType: 'report',
appliesIf: function(r){
return r.form === 'care' && contact.type === 'person';
},
fields: function () {
const fields = [];
var careReport = getMostRecentReport(allReports, 'care');
console.log(careReport);
fields.push(
{ label: 'task.risk.category', value: getField(careReport, 'care.category'), width: 6 }
);
return fields;
}
},