I am implementing some workflow below
where by when i initially fill out the
Appointment form
and select the viral load option, the Viral load lab test results task
is triggered however the challenge am facing is when i select the unknown
option during the process of selecting the result in the Viral load lab test results form
, the opening up of the New Appointment
task again fails to show up.How can i get the appointment form to open up again when the
Unknown
option is selected as seen in the screen shot above …Below is my configuration code for triggering …
{
name: 'new-appointment-task-cd4a',
title: 'New Appointment',
icon: 'assessment',
appliesTo: 'reports',
appliesToType: ['lab'],
appliesIf: function(r){
return getField(r, 'appoint_this') === 'snooze1';
},
actions: [{ form: 'appointment', }],
events: [{
start: 1,
days: 1,
end: 1,
}],
resolvedIf: function(c, r, event, dueDate) {
// Resolved if there is appointment received in time window
return isFormFromArraySubmittedInWindow(c.reports, 'appointment',
Utils.addDate(dueDate, -event.start).getTime(),
Utils.addDate(dueDate, event.end+1).getTime());
},
},