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 e423fbbba..666e79aa9 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 @@ -778,7 +778,7 @@ public class ProfileUtilities extends TranslatingUtilities { // fix the slice names too while we're at it... for (TypeSlice ts : typeList) if (ts.type != null) - ts.defn.setSliceName(ts.type); + ts.defn.setSliceName(rootName(cpath)+Utilities.capitalize(ts.type)); // ok passed the checks. // copy the root diff, and then process any children it has @@ -1072,6 +1072,12 @@ public class ProfileUtilities extends TranslatingUtilities { } + private String rootName(String cpath) { + String t = tail(cpath); + return t.replace("[x]", ""); + } + + private String determineTypeSlicePath(String path, String cpath) { String headP = path.substring(0, path.lastIndexOf(".")); // String tailP = path.substring(path.lastIndexOf(".")+1); diff --git a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/manifest.xml b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/manifest.xml index b1a33a0ca..506aedb6a 100644 --- a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/manifest.xml +++ b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/manifest.xml @@ -204,14 +204,14 @@ - - + + - - + + diff --git a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t29-expected.xml b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t29-expected.xml index 053eb4eb1..c3a51c50c 100644 --- a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t29-expected.xml +++ b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t29-expected.xml @@ -773,9 +773,9 @@ - + - + @@ -792,7 +792,7 @@ - + @@ -814,7 +814,7 @@ - + @@ -846,7 +846,7 @@ - + @@ -877,7 +877,7 @@ - + @@ -907,7 +907,7 @@ - + @@ -937,7 +937,7 @@ - + @@ -970,7 +970,7 @@ - + diff --git a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t43-expected.xml b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t43-expected.xml index 79bfed65c..ff21d1455 100644 --- a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t43-expected.xml +++ b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t43-expected.xml @@ -39,7 +39,7 @@ - + @@ -60,7 +60,7 @@ Slice: Unordered, Unspecified by type:$this - + @@ -76,7 +76,7 @@ Quantity some text for quantity - + @@ -91,7 +91,7 @@ 1.. - + @@ -955,9 +955,9 @@ - + - + @@ -992,7 +992,7 @@ - + @@ -1014,7 +1014,7 @@ - + @@ -1046,7 +1046,7 @@ - + @@ -1073,7 +1073,7 @@ - + @@ -1109,7 +1109,7 @@ - + @@ -1138,7 +1138,7 @@ - + @@ -1165,7 +1165,7 @@ - + diff --git a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t44-expected.xml b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t44-expected.xml index ee071f60d..47e174da2 100644 --- a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t44-expected.xml +++ b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t44-expected.xml @@ -39,7 +39,7 @@ - + @@ -55,7 +55,7 @@ Quantity some text - + @@ -69,7 +69,7 @@ some text for quantity - + @@ -84,7 +84,7 @@ 1.. - + @@ -948,9 +948,9 @@ - + - + @@ -985,7 +985,7 @@ - + @@ -1007,7 +1007,7 @@ - + @@ -1039,7 +1039,7 @@ - + @@ -1066,7 +1066,7 @@ - + @@ -1102,7 +1102,7 @@ - + @@ -1131,7 +1131,7 @@ - + @@ -1158,7 +1158,7 @@ - + diff --git a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t6-expected.xml b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t6-expected.xml index 238a4ef1e..f4ee7faad 100644 --- a/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t6-expected.xml +++ b/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t6-expected.xml @@ -598,9 +598,9 @@ - + - +