Package com.ibm.fhir.model.type
Class ElementDefinition
- java.lang.Object
-
- com.ibm.fhir.model.visitor.AbstractVisitable
-
- com.ibm.fhir.model.type.Element
-
- com.ibm.fhir.model.type.BackboneElement
-
- com.ibm.fhir.model.type.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElementDefinition.BaseInformation 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.static classElementDefinition.BindingBinds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).static classElementDefinition.Builderstatic classElementDefinition.ConstraintFormal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.static classElementDefinition.ExampleA sample value for this element demonstrating the type of information that would typically be found in the element.static classElementDefinition.MappingIdentifies a concept from an external specification that roughly corresponds to this element.static classElementDefinition.SlicingIndicates that the element is sliced into a set of alternative definitions (i.e.static classElementDefinition.TypeThe data type or resource that the value of this element is permitted to be.
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.BackboneElement
modifierExtension
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(String elementName, int elementIndex, Visitor visitor)Accept a Visitor and invoke the appropriate visit methods.static ElementDefinition.Builderbuilder()booleanequals(Object obj)List<String>getAlias()Identifies additional names by which this element might also be known.ElementDefinition.BasegetBase()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.ElementDefinition.BindinggetBinding()Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).List<Coding>getCode()A code that has the same meaning as the element in a particular terminology.MarkdowngetComment()Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.List<Id>getCondition()A reference to an invariant that may make additional statements about the cardinality or value in the instance.List<ElementDefinition.Constraint>getConstraint()Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.UrigetContentReference()Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element.ElementgetDefaultValue()The value that should be used if there is no value stated in the instance (e.g.MarkdowngetDefinition()Provides a complete explanation of the meaning of the data element for human readability.List<ElementDefinition.Example>getExample()A sample value for this element demonstrating the type of information that would typically be found in the element.ElementgetFixed()Specifies a value that SHALL be exactly the value for this element in the instance.BooleangetIsModifier()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.StringgetIsModifierReason()Explains how that element affects the interpretation of the resource or element that contains it.BooleangetIsSummary()Whether the element should be included if a client requests a search with the parameter _summary=true.StringgetLabel()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.List<ElementDefinition.Mapping>getMapping()Identifies a concept from an external specification that roughly corresponds to this element.StringgetMax()The maximum number of times this element is permitted to appear in the instance.IntegergetMaxLength()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.ElementgetMaxValue()The maximum allowed value for the element.MarkdowngetMeaningWhenMissing()The Implicit meaning that is to be understood when this element is missing (e.g.UnsignedIntgetMin()The minimum number of times this element SHALL appear in the instance.ElementgetMinValue()The minimum allowed value for the element.BooleangetMustSupport()If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.StringgetOrderMeaning()If present, indicates that the order of the repeating element has meaning and describes what that meaning is.StringgetPath()The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.ElementgetPattern()Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance.List<PropertyRepresentation>getRepresentation()Codes that define how this element is represented in instances, when the deviation varies from the normal case.MarkdowngetRequirements()This element is for traceability of why the element was created and why the constraints exist as they do.StringgetShort()A concise description of what this element means (e.g.BooleangetSliceIsConstraining()If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile.StringgetSliceName()The name of this element definition slice, when slicing is working.ElementDefinition.SlicinggetSlicing()Indicates that the element is sliced into a set of alternative definitions (i.e.List<ElementDefinition.Type>getType()The data type or resource that the value of this element is permitted to be.booleanhasChildren()inthashCode()ElementDefinition.BuildertoBuilder()Create a new Builder from the contents of this Element-
Methods inherited from class com.ibm.fhir.model.type.BackboneElement
getModifierExtension
-
-
-
-
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
Stringthat 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
PropertyRepresentationthat 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
Stringthat 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
Booleanthat 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
Stringthat 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
Codingthat 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.Slicingthat 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
Stringthat 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
Markdownthat 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
Markdownthat 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
Markdownthat 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
Stringthat 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
UnsignedIntthat 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
Stringthat 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.Basethat 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
Urithat 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.Typethat 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
Elementthat 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
Markdownthat 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
Stringthat 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
Elementthat 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
Elementthat 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.Examplethat 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
Elementthat 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
Elementthat 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
Integerthat 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
Idthat 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.Constraintthat 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
Booleanthat 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
Booleanthat 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
Stringthat 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
Booleanthat 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.Bindingthat 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.Mappingthat may be empty.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildrenin classBackboneElement
-
accept
public void accept(String elementName, int elementIndex, Visitor visitor)
Description copied from interface:VisitableAccept 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:
acceptin interfaceVisitable- Specified by:
acceptin classAbstractVisitable- Parameters:
elementName- the name of the element in the context of this visitelementIndex- the index of the element in a list or -1 if it is not contained within a Listvisitor- the visitor to use
-
toBuilder
public ElementDefinition.Builder toBuilder()
Description copied from class:ElementCreate a new Builder from the contents of this Element- Specified by:
toBuilderin classBackboneElement
-
builder
public static ElementDefinition.Builder builder()
-
-