From 7a7e3240b4c43ad631943d88b277f8c3e90429b3 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 5 May 2022 23:09:55 +1000 Subject: [PATCH] ElementDefinition adornments --- .../org/hl7/fhir/r5/model/ElementDefinition.java | 16 ++++++++++++++++ pom.xml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java index 43d47d795..56eb4d694 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java @@ -11572,6 +11572,22 @@ When pattern[x] is used to constrain a complex object, it means that each proper public boolean prohibited() { return "0".equals(getMax()); + } + + public boolean hasFixedOrPattern() { + return hasFixed() || hasPattern(); + } + + public DataType getFixedOrPattern() { + return hasFixed() ? getFixed() : getPattern(); + } + + public boolean isProhibited() { + return "0".equals(getMax()); + } + + public boolean isRequired() { + return getMin() == 1; } diff --git a/pom.xml b/pom.xml index 5ecafaf16..c2634aead 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 5.4.0 - 1.1.98 + 1.1.99-SNAPSHOT 5.7.1 1.7.1 3.0.0-M5