Closed AnjaliBhagabati closed 2 months ago
backup:
// Documentation - https://docs.mongodb.com/realm-legacy/docs/javascript/latest/index.html#queries
'use strict';
({params, imports}) => {
let indList = params.db.objects('ProgramEnrolment')
.filtered(`voided = false AND programExitDateTime = null AND program.name = 'Child'`);
indList = indList.filter(enrolment=>{
let temp = false;
let x = enrolment.findLatestObservationInEntireEnrolment("Is QRT Intervention Required?");
temp = (x)?x.getReadableValue() == 'Yes':false;
return temp;
}).map(enrolment=>enrolment.individual);
return indList;
};
@vedfordev as confirmed by the client, can you add in the decision rule that if "Is QRT Intervention Required?" is answered as Yes in the Medical Facilitation by Poshan Sathi form, consider "To be monitored by QRT "as Yes irrespective of the QRT scheduling in the Growth Monitoring
cc @nupoorkhandelwal @Dinesh2019
QRT Intervention Required? Logic: In the Medical Facilitation Form for Poshan Sathi, if in the question "Is QRT Intervention Required?" is answered as "Yes" for any child, that count should be shown in this "QRT Intervention Required?" offline dashboard card till a corresponding QRT form (Medical Facilitation - for QRT) is not filled
Link
Tech notes