execute method
The iterable, nested function that evaluates the entire FHIRPath expression one object at a time
Implementation
@override
List execute(List results, Map<String, dynamic> passed) {
final descendants = DescendantsParser().execute(results, passed);
final answerMaps = descendants.where((element) =>
(element is Map<String, dynamic>) && element.containsKey('answer'));
final answers = <dynamic>[];
answerMaps.forEach((element) {
answers.addAll((element as Map<String, dynamic>)['answer'] as Iterable);
});
return answers;
}