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