From 4f1833b09608432728dfd2a766bcdf7b4d5c8818 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sun, 19 Nov 2023 21:58:12 +1100 Subject: [PATCH] more FHIRPath fixes courtesy of Brian --- r5/fhirpath/tests-fhir-r5.xml | 41 ++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/r5/fhirpath/tests-fhir-r5.xml b/r5/fhirpath/tests-fhir-r5.xml index 2cccc30a..66a3e7c1 100644 --- a/r5/fhirpath/tests-fhir-r5.xml +++ b/r5/fhirpath/tests-fhir-r5.xml @@ -484,7 +484,7 @@ Any text enclosed within is ignored - iif(1 | 2 | 3, true, false) + iif(1 | 2 | 3, true, false) iif({}, true, false)false iif(true, true, false)true iif({} | true, true, false)true @@ -593,6 +593,45 @@ Any text enclosed within is ignored iif(Patient.name.empty(), 'unnamed', 'named') = 'named'true iif(true, true, (1 | 2).toString())true iif(false, (1 | 2).toString(), true)true + + + + iif(false, 'true-result').empty() + true + + + + + iif('non boolean criteria', 'true-result', 'true-result') + + + + + {}.iif(true, 'true-result', 'false-result') + true-result + + + + + ('item').iif(true, 'true-result', 'false-result') + true-result + + + + + ('context').iif(true, select($this), 'false-result') + context + + + + + ('item1' | 'item2').iif(true, 'true-result', 'false-result') + + + + ('context').iif(true, $this, 'false-result') + context +