diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 23962a876..864b31ff3 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -4229,14 +4229,16 @@ public class ProfileUtilities extends TranslatingUtilities { Row currRow = row; List groups = readChoices(element, children); boolean isExtension = Utilities.existsInList(tail(element.getPath()), "extension", "modifierExtension"); - for (ElementDefinition child : children) { - if (!child.hasSliceName()) { - currRow = row; - } - Row childRow = chooseChildRowByGroup(gen, currRow, groups, child, element, isConstraintMode); - - if (logicalModel || !child.getPath().endsWith(".id") || (child.getPath().endsWith(".id") && (profile != null) && (profile.getDerivation() == TypeDerivationRule.CONSTRAINT))) { - currRow = genElement(defPath, gen, childRow.getSubRows(), child, all, profiles, showMissing, profileBaseFileName, isExtension, snapshot, corePath, imagePath, false, logicalModel, isConstraintMode, allInvariants, currRow, mustSupport, rc); + if (!element.prohibited()) { + for (ElementDefinition child : children) { + if (!child.hasSliceName()) { + currRow = row; + } + Row childRow = chooseChildRowByGroup(gen, currRow, groups, child, element, isConstraintMode); + + if (logicalModel || !child.getPath().endsWith(".id") || (child.getPath().endsWith(".id") && (profile != null) && (profile.getDerivation() == TypeDerivationRule.CONSTRAINT))) { + currRow = genElement(defPath, gen, childRow.getSubRows(), child, all, profiles, showMissing, profileBaseFileName, isExtension, snapshot, corePath, imagePath, false, logicalModel, isConstraintMode, allInvariants, currRow, mustSupport, rc); + } } } // if (!snapshot && (extensions == null || !extensions)) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java index 8c8e23a27..e35d08127 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java @@ -5107,9 +5107,6 @@ public class FHIRPathEngine { return new ArrayList(); } if (exp.parameterCount() == 2) { - if (i1+i2 >= sw.length()) { - return new ArrayList(); - } s = sw.substring(i1, Math.min(sw.length(), i1+i2)); } else { s = sw.substring(i1);