From 33d9304700aadb7b805095db756b2c6265e75720 Mon Sep 17 00:00:00 2001 From: Brian Postlethwaite Date: Fri, 12 Apr 2024 16:06:03 +1000 Subject: [PATCH] Missed the total and index copying to the child context. --- .../src/main/java/org/hl7/fhir/r5/fhirpath/FHIRPathEngine.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/fhirpath/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/fhirpath/FHIRPathEngine.java index 74fd1aca6..a8399b4f5 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/fhirpath/FHIRPathEngine.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/fhirpath/FHIRPathEngine.java @@ -4743,6 +4743,8 @@ public class FHIRPathEngine { private ExecutionContext contextForParameter(ExecutionContext context) { ExecutionContext newContext = new ExecutionContext(context.appInfo, context.focusResource, context.rootResource, context.context, context.aliases, context.thisItem); + newContext.total = context.total; + newContext.index = context.index; // append all of the defined variables from the context into the new context if (context.definedVariables != null) { for (String s : context.definedVariables.keySet()) {