Class ElementDefinition

  • All Implemented Interfaces:
    Visitable

    @Generated("com.ibm.fhir.tools.CodeGenerator")
    public class ElementDefinition
    extends BackboneElement
    Captures constraints on each element within the resource, profile, or extension.
    • Method Detail

      • getPath

        public String getPath()
        The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.
        Returns:
        An immutable object of type String that is non-null.
      • getRepresentation

        public List<PropertyRepresentation> getRepresentation()
        Codes that define how this element is represented in instances, when the deviation varies from the normal case.
        Returns:
        An unmodifiable list containing immutable objects of type PropertyRepresentation that may be empty.
      • getSliceName

        public String getSliceName()
        The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.
        Returns:
        An immutable object of type String that may be null.
      • getSliceIsConstraining

        public Boolean getSliceIsConstraining()
        If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.
        Returns:
        An immutable object of type Boolean that may be null.
      • getLabel

        public String getLabel()
        A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.
        Returns:
        An immutable object of type String that may be null.
      • getCode

        public List<Coding> getCode()
        A code that has the same meaning as the element in a particular terminology.
        Returns:
        An unmodifiable list containing immutable objects of type Coding that may be empty.
      • getSlicing

        public ElementDefinition.Slicing getSlicing()
        Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
        Returns:
        An immutable object of type ElementDefinition.Slicing that may be null.
      • getShort

        public String getShort()
        A concise description of what this element means (e.g. for use in autogenerated summaries).
        Returns:
        An immutable object of type String that may be null.
      • getDefinition

        public Markdown getDefinition()
        Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
        Returns:
        An immutable object of type Markdown that may be null.
      • getComment

        public Markdown getComment()
        Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).
        Returns:
        An immutable object of type Markdown that may be null.
      • getRequirements

        public Markdown getRequirements()
        This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
        Returns:
        An immutable object of type Markdown that may be null.
      • getAlias

        public List<String> getAlias()
        Identifies additional names by which this element might also be known.
        Returns:
        An unmodifiable list containing immutable objects of type String that may be empty.
      • getMin

        public UnsignedInt getMin()
        The minimum number of times this element SHALL appear in the instance.
        Returns:
        An immutable object of type UnsignedInt that may be null.
      • getMax

        public String getMax()
        The maximum number of times this element is permitted to appear in the instance.
        Returns:
        An immutable object of type String that may be null.
      • getBase

        public ElementDefinition.Base getBase()
        Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.
        Returns:
        An immutable object of type ElementDefinition.Base that may be null.
      • getContentReference

        public Uri getContentReference()
        Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.
        Returns:
        An immutable object of type Uri that may be null.
      • getType

        public List<ElementDefinition.Type> getType()
        The data type or resource that the value of this element is permitted to be.
        Returns:
        An unmodifiable list containing immutable objects of type ElementDefinition.Type that may be empty.
      • getDefaultValue

        public Element getDefaultValue()
        The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').
        Returns:
        An immutable object of type Element that may be null.
      • getMeaningWhenMissing

        public Markdown getMeaningWhenMissing()
        The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').
        Returns:
        An immutable object of type Markdown that may be null.
      • getOrderMeaning

        public String getOrderMeaning()
        If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.
        Returns:
        An immutable object of type String that may be null.
      • getFixed

        public Element getFixed()
        Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non- significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.
        Returns:
        An immutable object of type Element that may be null.
      • getPattern

        public Element getPattern()
        Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.

        When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.

        When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.

        When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,

        1. If primitive: it must match exactly the pattern value

        2. If a complex object: it must match (recursively) the pattern value

        3. If an array: it must match (recursively) the pattern value.

        Returns:
        An immutable object of type Element that may be null.
      • getExample

        public List<ElementDefinition.Example> getExample()
        A sample value for this element demonstrating the type of information that would typically be found in the element.
        Returns:
        An unmodifiable list containing immutable objects of type ElementDefinition.Example that may be empty.
      • getMinValue

        public Element getMinValue()
        The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.
        Returns:
        An immutable object of type Element that may be null.
      • getMaxValue

        public Element getMaxValue()
        The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.
        Returns:
        An immutable object of type Element that may be null.
      • getMaxLength

        public Integer getMaxLength()
        Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.
        Returns:
        An immutable object of type Integer that may be null.
      • getCondition

        public List<Id> getCondition()
        A reference to an invariant that may make additional statements about the cardinality or value in the instance.
        Returns:
        An unmodifiable list containing immutable objects of type Id that may be empty.
      • getConstraint

        public List<ElementDefinition.Constraint> getConstraint()
        Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.
        Returns:
        An unmodifiable list containing immutable objects of type ElementDefinition.Constraint that may be empty.
      • getMustSupport

        public Boolean getMustSupport()
        If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.
        Returns:
        An immutable object of type Boolean that may be null.
      • getIsModifier

        public Boolean getIsModifier()
        If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
        Returns:
        An immutable object of type Boolean that may be null.
      • getIsModifierReason

        public String getIsModifierReason()
        Explains how that element affects the interpretation of the resource or element that contains it.
        Returns:
        An immutable object of type String that may be null.
      • getIsSummary

        public Boolean getIsSummary()
        Whether the element should be included if a client requests a search with the parameter _summary=true.
        Returns:
        An immutable object of type Boolean that may be null.
      • getBinding

        public ElementDefinition.Binding getBinding()
        Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).
        Returns:
        An immutable object of type ElementDefinition.Binding that may be null.
      • getMapping

        public List<ElementDefinition.Mapping> getMapping()
        Identifies a concept from an external specification that roughly corresponds to this element.
        Returns:
        An unmodifiable list containing immutable objects of type ElementDefinition.Mapping that may be empty.
      • accept

        public void accept​(String elementName,
                           int elementIndex,
                           Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:
         if (visitor.preVisit(this)) {
             visitor.visitStart(elementName, elementIndex, this);
             if (visitor.visit(elementName, elementIndex, this)) {
                 // visit children
             }
             visitor.visitEnd(elementName, elementIndex, this);
             visitor.postVisit(this);
         }
         
        Specified by:
        accept in interface Visitable
        Specified by:
        accept in class AbstractVisitable
        Parameters:
        elementName - the name of the element in the context of this visit
        elementIndex - the index of the element in a list or -1 if it is not contained within a List
        visitor - the visitor to use
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object