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 executedBefore = before.execute(results.toList(), passed);
final executedAfter = after.execute(results.toList(), passed);
final beforeBool = SingletonEvaluation.toBool(executedBefore,
name: "parameter before 'and'", operation: 'and', collection: results);
final afterBool = SingletonEvaluation.toBool(executedAfter,
name: "parameter after 'and'", operation: 'and', collection: results);
if (beforeBool == true && afterBool == true) {
return [true];
}
if (beforeBool == false || afterBool == false) {
return [false];
}
return [];
}