From fd2bd896bf09570b33fbf3387490c6a4b32115f6 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 19 Dec 2024 13:14:17 +1100 Subject: [PATCH] Only use profiled datatype information for generating snapshots for Resource and Extension --- .../profile/ProfilePathProcessor.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java index 84497a099..f745853b9 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java @@ -652,13 +652,15 @@ public class ProfilePathProcessor { } } } - template = src.copy().setPath(currentBase.getPath()); - template.setSliceName(null); - // temporary work around - if (!"Extension".equals(diffMatches.get(0).getType().get(0).getCode())) { - template.setMin(currentBase.getMin()); - template.setMax(currentBase.getMax()); - } + if (Utilities.existsInList(currentBase.typeSummary(), "Extension", "Resource")) { + template = src.copy().setPath(currentBase.getPath()); + template.setSliceName(null); + // temporary work around + if (!"Extension".equals(diffMatches.get(0).getType().get(0).getCode())) { + template.setMin(currentBase.getMin()); + template.setMax(currentBase.getMax()); + } + } } } if (template == null)