The following snippet ideally should give some value only if there is a visit scheduled of the specified type which is not completed and cancelled. (and not consider the visit user is completing) But at any moment it gives 'hello>>>>', [ { that: {} } ] irrespective if there is already a visit scheduled or a scheduled visit is being completed of that type.
As an implementor we do not have any way to identify if the visit is already scheduled or not!
The following snippet ideally should give some value only if there is a visit scheduled of the specified type which is not completed and cancelled. (and not consider the visit user is completing) But at any moment it gives 'hello>>>>', [ { that: {} } ] irrespective if there is already a visit scheduled or a scheduled visit is being completed of that type.
As an implementor we do not have any way to identify if the visit is already scheduled or not!
const hello = programEncounter.programEnrolment.scheduledEncountersOfType('Child followup'); console.log('hello>>>>', hello);