From a5302b8934c9a95fd0a3af5c0793789ce0007a9b Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Fri, 4 Mar 2022 21:55:31 -0700 Subject: [PATCH 1/4] Fix XML escaping to not escape single-quotes - because our XML serializer always wraps attributes in double-quotes, making escaping unnecessary. --- .../src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java index 9e0ad4116..34ba270a5 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java @@ -273,9 +273,9 @@ public class XMLUtil { for (int i = 0; i < rawContent.length(); i++) { char ch = rawContent.charAt(i); - if (ch == '\'') - sb.append("'"); - else if (ch == '&') + // We don't escape ' because our code always spits out attributes surrounded by "", which means + // it's not necessary to escape ' - and it's *much* less ugly and more bandwidth-efficient when we don't. + if (ch == '&') sb.append("&"); else if (ch == '"') sb.append("""); From ca91cfad1a7aaa7433f6cc229eda8a3131d60e3d Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Fri, 4 Mar 2022 21:56:27 -0700 Subject: [PATCH 2/4] When running in Eclipse, the version comes in as upper-case, and the enum comparison needs it to be lower-case, so fold it to be that way. --- .../org/hl7/fhir/r5/model/Enumerations.java | 483 +++++++++--------- 1 file changed, 243 insertions(+), 240 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java index d153c5280..7728bc7ca 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java @@ -6874,71 +6874,72 @@ The primary difference between a medicationusage and a medicationadministration public static FHIRVersion fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; - if ("0.01".equals(codeString)) - return _0_01; - if ("0.05".equals(codeString)) - return _0_05; - if ("0.06".equals(codeString)) - return _0_06; - if ("0.11".equals(codeString)) - return _0_11; - if ("0.0.80".equals(codeString)) - return _0_0_80; - if ("0.0.81".equals(codeString)) - return _0_0_81; - if ("0.0.82".equals(codeString)) - return _0_0_82; - if ("0.4.0".equals(codeString)) - return _0_4_0; - if ("0.5.0".equals(codeString)) - return _0_5_0; - if ("1.0.0".equals(codeString)) - return _1_0_0; - if ("1.0.1".equals(codeString)) - return _1_0_1; - if ("1.0.2".equals(codeString)) - return _1_0_2; - if ("1.1.0".equals(codeString)) - return _1_1_0; - if ("1.4.0".equals(codeString)) - return _1_4_0; - if ("1.6.0".equals(codeString)) - return _1_6_0; - if ("1.8.0".equals(codeString)) - return _1_8_0; - if ("3.0.0".equals(codeString)) - return _3_0_0; - if ("3.0.1".equals(codeString)) - return _3_0_1; - if ("3.0.2".equals(codeString)) - return _3_0_2; - if ("3.3.0".equals(codeString)) - return _3_3_0; - if ("3.5.0".equals(codeString)) - return _3_5_0; - if ("4.0.0".equals(codeString)) - return _4_0_0; - if ("4.0.1".equals(codeString)) - return _4_0_1; - if ("4.1.0".equals(codeString)) - return _4_1_0; - if ("4.2.0".equals(codeString)) - return _4_2_0; - if ("4.3.0-snapshot1".equals(codeString)) - return _4_3_0SNAPSHOT1; - if ("4.3.0-cibuild".equals(codeString)) - return _4_3_0CIBUILD; - if ("4.4.0".equals(codeString)) - return _4_4_0; - if ("4.5.0".equals(codeString)) - return _4_5_0; - if ("4.6.0".equals(codeString)) - return _4_6_0; - if ("5.0.0-snapshot1".equals(codeString)) - return _5_0_0SNAPSHOT1; - if ("5.0.0-cibuild".equals(codeString)) - return _5_0_0CIBUILD; - throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); + codeString = codeString.toLowerCase(); + if ("0.01".equals(codeString)) + return _0_01; + if ("0.05".equals(codeString)) + return _0_05; + if ("0.06".equals(codeString)) + return _0_06; + if ("0.11".equals(codeString)) + return _0_11; + if ("0.0.80".equals(codeString)) + return _0_0_80; + if ("0.0.81".equals(codeString)) + return _0_0_81; + if ("0.0.82".equals(codeString)) + return _0_0_82; + if ("0.4.0".equals(codeString)) + return _0_4_0; + if ("0.5.0".equals(codeString)) + return _0_5_0; + if ("1.0.0".equals(codeString)) + return _1_0_0; + if ("1.0.1".equals(codeString)) + return _1_0_1; + if ("1.0.2".equals(codeString)) + return _1_0_2; + if ("1.1.0".equals(codeString)) + return _1_1_0; + if ("1.4.0".equals(codeString)) + return _1_4_0; + if ("1.6.0".equals(codeString)) + return _1_6_0; + if ("1.8.0".equals(codeString)) + return _1_8_0; + if ("3.0.0".equals(codeString)) + return _3_0_0; + if ("3.0.1".equals(codeString)) + return _3_0_1; + if ("3.0.2".equals(codeString)) + return _3_0_2; + if ("3.3.0".equals(codeString)) + return _3_3_0; + if ("3.5.0".equals(codeString)) + return _3_5_0; + if ("4.0.0".equals(codeString)) + return _4_0_0; + if ("4.0.1".equals(codeString)) + return _4_0_1; + if ("4.1.0".equals(codeString)) + return _4_1_0; + if ("4.2.0".equals(codeString)) + return _4_2_0; + if ("4.3.0-snapshot1".equals(codeString)) + return _4_3_0SNAPSHOT1; + if ("4.3.0-cibuild".equals(codeString)) + return _4_3_0CIBUILD; + if ("4.4.0".equals(codeString)) + return _4_4_0; + if ("4.5.0".equals(codeString)) + return _4_5_0; + if ("4.6.0".equals(codeString)) + return _4_6_0; + if ("5.0.0-snapshot1".equals(codeString)) + return _5_0_0SNAPSHOT1; + if ("5.0.0-cibuild".equals(codeString)) + return _5_0_0CIBUILD; + throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); } public String toCode() { switch (this) { @@ -7104,51 +7105,52 @@ public String toCode(int len) { public static boolean isValidCode(String codeString) { if (codeString == null || "".equals(codeString)) return false; - if ("0.01".equals(codeString)) - return true; - if ("0.05".equals(codeString)) - return true; - if ("0.06".equals(codeString)) - return true; - if ("0.11".equals(codeString)) - return true; - if ("0.0.80".equals(codeString)) - return true; - if ("0.0.81".equals(codeString)) - return true; - if ("0.0.82".equals(codeString)) - return true; - if ("0.4.0".equals(codeString)) - return true; - if ("0.5.0".equals(codeString)) - return true; - if ("1.0.0".equals(codeString)) - return true; - if ("1.0.1".equals(codeString)) - return true; - if ("1.0.2".equals(codeString)) - return true; - if ("1.1.0".equals(codeString)) - return true; - if ("1.4.0".equals(codeString)) - return true; - if ("1.6.0".equals(codeString)) - return true; - if ("1.8.0".equals(codeString)) - return true; - if ("3.0.0".equals(codeString)) - return true; - if ("3.0.1".equals(codeString)) - return true; - if ("3.3.0".equals(codeString)) - return true; - if ("3.5.0".equals(codeString)) - return true; - if ("4.0.0".equals(codeString)) - return true; - if ("4.2.0".equals(codeString)) - return true; - return false; + codeString = codeString.toLowerCase(); + if ("0.01".equals(codeString)) + return true; + if ("0.05".equals(codeString)) + return true; + if ("0.06".equals(codeString)) + return true; + if ("0.11".equals(codeString)) + return true; + if ("0.0.80".equals(codeString)) + return true; + if ("0.0.81".equals(codeString)) + return true; + if ("0.0.82".equals(codeString)) + return true; + if ("0.4.0".equals(codeString)) + return true; + if ("0.5.0".equals(codeString)) + return true; + if ("1.0.0".equals(codeString)) + return true; + if ("1.0.1".equals(codeString)) + return true; + if ("1.0.2".equals(codeString)) + return true; + if ("1.1.0".equals(codeString)) + return true; + if ("1.4.0".equals(codeString)) + return true; + if ("1.6.0".equals(codeString)) + return true; + if ("1.8.0".equals(codeString)) + return true; + if ("3.0.0".equals(codeString)) + return true; + if ("3.0.1".equals(codeString)) + return true; + if ("3.3.0".equals(codeString)) + return true; + if ("3.5.0".equals(codeString)) + return true; + if ("4.0.0".equals(codeString)) + return true; + if ("4.2.0".equals(codeString)) + return true; + return false; } @Override @@ -7169,71 +7171,72 @@ public String toCode(int len) { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; - if ("0.01".equals(codeString)) - return FHIRVersion._0_01; - if ("0.05".equals(codeString)) - return FHIRVersion._0_05; - if ("0.06".equals(codeString)) - return FHIRVersion._0_06; - if ("0.11".equals(codeString)) - return FHIRVersion._0_11; - if ("0.0.80".equals(codeString)) - return FHIRVersion._0_0_80; - if ("0.0.81".equals(codeString)) - return FHIRVersion._0_0_81; - if ("0.0.82".equals(codeString)) - return FHIRVersion._0_0_82; - if ("0.4.0".equals(codeString)) - return FHIRVersion._0_4_0; - if ("0.5.0".equals(codeString)) - return FHIRVersion._0_5_0; - if ("1.0.0".equals(codeString)) - return FHIRVersion._1_0_0; - if ("1.0.1".equals(codeString)) - return FHIRVersion._1_0_1; - if ("1.0.2".equals(codeString)) - return FHIRVersion._1_0_2; - if ("1.1.0".equals(codeString)) - return FHIRVersion._1_1_0; - if ("1.4.0".equals(codeString)) - return FHIRVersion._1_4_0; - if ("1.6.0".equals(codeString)) - return FHIRVersion._1_6_0; - if ("1.8.0".equals(codeString)) - return FHIRVersion._1_8_0; - if ("3.0.0".equals(codeString)) - return FHIRVersion._3_0_0; - if ("3.0.1".equals(codeString)) - return FHIRVersion._3_0_1; - if ("3.0.2".equals(codeString)) - return FHIRVersion._3_0_2; - if ("3.3.0".equals(codeString)) - return FHIRVersion._3_3_0; - if ("3.5.0".equals(codeString)) - return FHIRVersion._3_5_0; - if ("4.0.0".equals(codeString)) - return FHIRVersion._4_0_0; - if ("4.0.1".equals(codeString)) - return FHIRVersion._4_0_1; - if ("4.1.0".equals(codeString)) - return FHIRVersion._4_1_0; - if ("4.2.0".equals(codeString)) - return FHIRVersion._4_2_0; - if ("4.3.0-snapshot1".equals(codeString)) - return FHIRVersion._4_3_0SNAPSHOT1; - if ("4.3.0-cibuild".equals(codeString)) - return FHIRVersion._4_3_0CIBUILD; - if ("4.4.0".equals(codeString)) - return FHIRVersion._4_4_0; - if ("4.5.0".equals(codeString)) - return FHIRVersion._4_5_0; - if ("4.6.0".equals(codeString)) - return FHIRVersion._4_6_0; - if ("5.0.0-snapshot1".equals(codeString)) - return FHIRVersion._5_0_0SNAPSHOT1; - if ("5.0.0-cibuild".equals(codeString)) - return FHIRVersion._5_0_0CIBUILD; - throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'"); + codeString = codeString.toLowerCase(); + if ("0.01".equals(codeString)) + return FHIRVersion._0_01; + if ("0.05".equals(codeString)) + return FHIRVersion._0_05; + if ("0.06".equals(codeString)) + return FHIRVersion._0_06; + if ("0.11".equals(codeString)) + return FHIRVersion._0_11; + if ("0.0.80".equals(codeString)) + return FHIRVersion._0_0_80; + if ("0.0.81".equals(codeString)) + return FHIRVersion._0_0_81; + if ("0.0.82".equals(codeString)) + return FHIRVersion._0_0_82; + if ("0.4.0".equals(codeString)) + return FHIRVersion._0_4_0; + if ("0.5.0".equals(codeString)) + return FHIRVersion._0_5_0; + if ("1.0.0".equals(codeString)) + return FHIRVersion._1_0_0; + if ("1.0.1".equals(codeString)) + return FHIRVersion._1_0_1; + if ("1.0.2".equals(codeString)) + return FHIRVersion._1_0_2; + if ("1.1.0".equals(codeString)) + return FHIRVersion._1_1_0; + if ("1.4.0".equals(codeString)) + return FHIRVersion._1_4_0; + if ("1.6.0".equals(codeString)) + return FHIRVersion._1_6_0; + if ("1.8.0".equals(codeString)) + return FHIRVersion._1_8_0; + if ("3.0.0".equals(codeString)) + return FHIRVersion._3_0_0; + if ("3.0.1".equals(codeString)) + return FHIRVersion._3_0_1; + if ("3.0.2".equals(codeString)) + return FHIRVersion._3_0_2; + if ("3.3.0".equals(codeString)) + return FHIRVersion._3_3_0; + if ("3.5.0".equals(codeString)) + return FHIRVersion._3_5_0; + if ("4.0.0".equals(codeString)) + return FHIRVersion._4_0_0; + if ("4.0.1".equals(codeString)) + return FHIRVersion._4_0_1; + if ("4.1.0".equals(codeString)) + return FHIRVersion._4_1_0; + if ("4.2.0".equals(codeString)) + return FHIRVersion._4_2_0; + if ("4.3.0-snapshot1".equals(codeString)) + return FHIRVersion._4_3_0SNAPSHOT1; + if ("4.3.0-cibuild".equals(codeString)) + return FHIRVersion._4_3_0CIBUILD; + if ("4.4.0".equals(codeString)) + return FHIRVersion._4_4_0; + if ("4.5.0".equals(codeString)) + return FHIRVersion._4_5_0; + if ("4.6.0".equals(codeString)) + return FHIRVersion._4_6_0; + if ("5.0.0-snapshot1".equals(codeString)) + return FHIRVersion._5_0_0SNAPSHOT1; + if ("5.0.0-cibuild".equals(codeString)) + return FHIRVersion._5_0_0CIBUILD; + throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'"); } public Enumeration fromType(Base code) throws FHIRException { if (code == null) @@ -7243,71 +7246,71 @@ public String toCode(int len) { String codeString = ((PrimitiveType) code).asStringValue(); if (codeString == null || "".equals(codeString)) return null; - if ("0.01".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_01); - if ("0.05".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_05); - if ("0.06".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_06); - if ("0.11".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_11); - if ("0.0.80".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_0_80); - if ("0.0.81".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_0_81); - if ("0.0.82".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_0_82); - if ("0.4.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_4_0); - if ("0.5.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._0_5_0); - if ("1.0.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_0_0); - if ("1.0.1".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_0_1); - if ("1.0.2".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_0_2); - if ("1.1.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_1_0); - if ("1.4.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_4_0); - if ("1.6.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_6_0); - if ("1.8.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._1_8_0); - if ("3.0.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._3_0_0); - if ("3.0.1".equals(codeString)) - return new Enumeration(this, FHIRVersion._3_0_1); - if ("3.0.2".equals(codeString)) - return new Enumeration(this, FHIRVersion._3_0_2); - if ("3.3.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._3_3_0); - if ("3.5.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._3_5_0); - if ("4.0.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_0_0); - if ("4.0.1".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_0_1); - if ("4.1.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_1_0); - if ("4.2.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_2_0); - if ("4.3.0-snapshot1".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_3_0SNAPSHOT1); - if ("4.3.0-cibuild".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_3_0CIBUILD); - if ("4.4.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_4_0); - if ("4.5.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_5_0); - if ("4.6.0".equals(codeString)) - return new Enumeration(this, FHIRVersion._4_6_0); - if ("5.0.0-snapshot1".equals(codeString)) - return new Enumeration(this, FHIRVersion._5_0_0SNAPSHOT1); - if ("5.0.0-cibuild".equals(codeString)) - return new Enumeration(this, FHIRVersion._5_0_0CIBUILD); - throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); + if ("0.01".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_01); + if ("0.05".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_05); + if ("0.06".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_06); + if ("0.11".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_11); + if ("0.0.80".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_0_80); + if ("0.0.81".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_0_81); + if ("0.0.82".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_0_82); + if ("0.4.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_4_0); + if ("0.5.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._0_5_0); + if ("1.0.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_0_0); + if ("1.0.1".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_0_1); + if ("1.0.2".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_0_2); + if ("1.1.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_1_0); + if ("1.4.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_4_0); + if ("1.6.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_6_0); + if ("1.8.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._1_8_0); + if ("3.0.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._3_0_0); + if ("3.0.1".equals(codeString)) + return new Enumeration(this, FHIRVersion._3_0_1); + if ("3.0.2".equals(codeString)) + return new Enumeration(this, FHIRVersion._3_0_2); + if ("3.3.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._3_3_0); + if ("3.5.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._3_5_0); + if ("4.0.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_0_0); + if ("4.0.1".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_0_1); + if ("4.1.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_1_0); + if ("4.2.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_2_0); + if ("4.3.0-snapshot1".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_3_0SNAPSHOT1); + if ("4.3.0-cibuild".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_3_0CIBUILD); + if ("4.4.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_4_0); + if ("4.5.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_5_0); + if ("4.6.0".equals(codeString)) + return new Enumeration(this, FHIRVersion._4_6_0); + if ("5.0.0-snapshot1".equals(codeString)) + return new Enumeration(this, FHIRVersion._5_0_0SNAPSHOT1); + if ("5.0.0-cibuild".equals(codeString)) + return new Enumeration(this, FHIRVersion._5_0_0CIBUILD); + throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); } public String toCode(FHIRVersion code) { if (code == FHIRVersion._0_01) From 9f01f7c9f22b8ae5fe83856dd215523cec79141e Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Fri, 4 Mar 2022 21:58:17 -0700 Subject: [PATCH 3/4] Per FHIR-31722 and FHIR-34453, ensure that CodeableReference and RatioRange aren't allowed in extensions Parameters, etc. in R4B --- .../main/java/org/hl7/fhir/r5/utils/TypesUtilities.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/TypesUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/TypesUtilities.java index 22c7f7706..84bd15995 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/TypesUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/TypesUtilities.java @@ -132,7 +132,9 @@ public class TypesUtilities { res.add(new WildcardInformation("Annotation", TypeClassification.DATATYPE)); res.add(new WildcardInformation("Attachment", TypeClassification.DATATYPE)); res.add(new WildcardInformation("CodeableConcept", TypeClassification.DATATYPE)); - res.add(new WildcardInformation("CodeableReference", TypeClassification.DATATYPE)); + if (!VersionUtilities.isR4BVer(version)) { + res.add(new WildcardInformation("CodeableReference", TypeClassification.DATATYPE)); + } res.add(new WildcardInformation("Coding", TypeClassification.DATATYPE)); res.add(new WildcardInformation("ContactPoint", TypeClassification.DATATYPE)); res.add(new WildcardInformation("Count", TypeClassification.DATATYPE)); @@ -145,7 +147,9 @@ public class TypesUtilities { res.add(new WildcardInformation("Quantity", TypeClassification.DATATYPE)); res.add(new WildcardInformation("Range", TypeClassification.DATATYPE)); res.add(new WildcardInformation("Ratio", TypeClassification.DATATYPE)); - res.add(new WildcardInformation("RatioRange", TypeClassification.DATATYPE)); + if (!VersionUtilities.isR4BVer(version)) { + res.add(new WildcardInformation("RatioRange", TypeClassification.DATATYPE)); + } res.add(new WildcardInformation("Reference", " - a reference to another resource", TypeClassification.DATATYPE)); res.add(new WildcardInformation("SampledData", TypeClassification.DATATYPE)); res.add(new WildcardInformation("Signature", TypeClassification.DATATYPE)); From 0b3ccbbe37b636314149f74d6c3f73caabcbde04 Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Thu, 10 Mar 2022 16:48:41 -0700 Subject: [PATCH 4/4] Reverted lower-casing of version comparison --- .../src/main/java/org/hl7/fhir/r5/model/Enumerations.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java index 8aedc92c1..95723dedb 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java @@ -6874,7 +6874,6 @@ The primary difference between a medicationusage and a medicationadministration public static FHIRVersion fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; - codeString = codeString.toLowerCase(); if ("0.01".equals(codeString)) return _0_01; if ("0.05".equals(codeString)) @@ -7105,7 +7104,6 @@ public String toCode(int len) { public static boolean isValidCode(String codeString) { if (codeString == null || "".equals(codeString)) return false; - codeString = codeString.toLowerCase(); if ("0.01".equals(codeString)) return true; if ("0.05".equals(codeString)) @@ -7171,7 +7169,6 @@ public String toCode(int len) { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; - codeString = codeString.toLowerCase(); if ("0.01".equals(codeString)) return FHIRVersion._0_01; if ("0.05".equals(codeString))