diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java index 343490142..1ef878654 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java @@ -252,6 +252,10 @@ public class Utilities { return new Inflector().camelCase(value.trim().replace(" ", "_"), false); } + public static String upperCamelCase(String value) { + return new Inflector().upperCamelCase(value.trim().replace(" ", "_")); + } + public static String escapeXml(String doco) { if (doco == null) return ""; diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/CodeSystemValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/CodeSystemValidator.java index b482b84ec..3cb045afe 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/CodeSystemValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/CodeSystemValidator.java @@ -98,8 +98,10 @@ public class CodeSystemValidator extends BaseValidator { rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("status"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "status"); rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("experimental"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "experimental"); rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("description"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "description"); - rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("caseSensitive"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "caseSensitive"); rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("content"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "content"); + if (!"supplement".equals(cs.getChildValue("content"))) { + rule(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("caseSensitive"), I18nConstants.VALUESET_SHAREABLE_MISSING_HL7, "caseSensitive"); + } } else { warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("url"), I18nConstants.VALUESET_SHAREABLE_MISSING, "url"); warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("version"), I18nConstants.VALUESET_SHAREABLE_MISSING, "version"); @@ -108,8 +110,10 @@ public class CodeSystemValidator extends BaseValidator { warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("status"), I18nConstants.VALUESET_SHAREABLE_MISSING, "status"); warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("experimental"), I18nConstants.VALUESET_SHAREABLE_MISSING, "experimental"); warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("description"), I18nConstants.VALUESET_SHAREABLE_MISSING, "description"); - warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("caseSensitive"), I18nConstants.VALUESET_SHAREABLE_MISSING, "caseSensitive"); warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("content"), I18nConstants.VALUESET_SHAREABLE_MISSING, "content"); + if (!"supplement".equals(cs.getChildValue("content"))) { + warning(errors, IssueType.REQUIRED, cs.line(), cs.col(), stack.getLiteralPath(), cs.hasChild("caseSensitive"), I18nConstants.VALUESET_SHAREABLE_MISSING, "caseSensitive"); + } } } }