Class ElementDefinition.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Element>
-
- org.linuxforhealth.fhir.model.type.Element.Builder
-
- org.linuxforhealth.fhir.model.type.BackboneElement.Builder
-
- org.linuxforhealth.fhir.model.type.ElementDefinition.Builder
-
- Enclosing class:
- ElementDefinition
public static class ElementDefinition.Builder extends BackboneElement.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
modifierExtension
-
Fields inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
extension, id
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementDefinition.Builder
_short(java.lang.String _short)
Convenience method for setting_short
.ElementDefinition.Builder
_short(String _short)
A concise description of what this element means (e.g.ElementDefinition.Builder
alias(java.lang.String... alias)
Convenience method for settingalias
.ElementDefinition.Builder
alias(java.util.Collection<String> alias)
Identifies additional names by which this element might also be known.ElementDefinition.Builder
alias(String... alias)
Identifies additional names by which this element might also be known.ElementDefinition.Builder
base(ElementDefinition.Base base)
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.Builder
binding(ElementDefinition.Binding binding)
Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).ElementDefinition
build()
Build theElementDefinition
ElementDefinition.Builder
code(java.util.Collection<Coding> code)
A code that has the same meaning as the element in a particular terminology.ElementDefinition.Builder
code(Coding... code)
A code that has the same meaning as the element in a particular terminology.ElementDefinition.Builder
comment(Markdown comment)
Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.ElementDefinition.Builder
condition(java.util.Collection<Id> condition)
A reference to an invariant that may make additional statements about the cardinality or value in the instance.ElementDefinition.Builder
condition(Id... condition)
A reference to an invariant that may make additional statements about the cardinality or value in the instance.ElementDefinition.Builder
constraint(java.util.Collection<ElementDefinition.Constraint> constraint)
Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.ElementDefinition.Builder
constraint(ElementDefinition.Constraint... constraint)
Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.ElementDefinition.Builder
contentReference(Uri contentReference)
Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element.ElementDefinition.Builder
defaultValue(java.lang.Boolean defaultValue)
Convenience method for settingdefaultValue
with choice type Boolean.ElementDefinition.Builder
defaultValue(java.lang.Integer defaultValue)
Convenience method for settingdefaultValue
with choice type Integer.ElementDefinition.Builder
defaultValue(java.lang.String defaultValue)
Convenience method for settingdefaultValue
with choice type String.ElementDefinition.Builder
defaultValue(java.time.LocalDate defaultValue)
Convenience method for settingdefaultValue
with choice type Date.ElementDefinition.Builder
defaultValue(java.time.LocalTime defaultValue)
Convenience method for settingdefaultValue
with choice type Time.ElementDefinition.Builder
defaultValue(java.time.ZonedDateTime defaultValue)
Convenience method for settingdefaultValue
with choice type Instant.ElementDefinition.Builder
defaultValue(Element defaultValue)
The value that should be used if there is no value stated in the instance (e.g.ElementDefinition.Builder
definition(Markdown definition)
Provides a complete explanation of the meaning of the data element for human readability.ElementDefinition.Builder
example(java.util.Collection<ElementDefinition.Example> example)
A sample value for this element demonstrating the type of information that would typically be found in the element.ElementDefinition.Builder
example(ElementDefinition.Example... example)
A sample value for this element demonstrating the type of information that would typically be found in the element.ElementDefinition.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element.ElementDefinition.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.ElementDefinition.Builder
fixed(java.lang.Boolean fixed)
Convenience method for settingfixed
with choice type Boolean.ElementDefinition.Builder
fixed(java.lang.Integer fixed)
Convenience method for settingfixed
with choice type Integer.ElementDefinition.Builder
fixed(java.lang.String fixed)
Convenience method for settingfixed
with choice type String.ElementDefinition.Builder
fixed(java.time.LocalDate fixed)
Convenience method for settingfixed
with choice type Date.ElementDefinition.Builder
fixed(java.time.LocalTime fixed)
Convenience method for settingfixed
with choice type Time.ElementDefinition.Builder
fixed(java.time.ZonedDateTime fixed)
Convenience method for settingfixed
with choice type Instant.ElementDefinition.Builder
fixed(Element fixed)
Specifies a value that SHALL be exactly the value for this element in the instance.protected ElementDefinition.Builder
from(ElementDefinition elementDefinition)
ElementDefinition.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).ElementDefinition.Builder
isModifier(java.lang.Boolean isModifier)
Convenience method for settingisModifier
.ElementDefinition.Builder
isModifier(Boolean isModifier)
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.ElementDefinition.Builder
isModifierReason(java.lang.String isModifierReason)
Convenience method for settingisModifierReason
.ElementDefinition.Builder
isModifierReason(String isModifierReason)
Explains how that element affects the interpretation of the resource or element that contains it.ElementDefinition.Builder
isSummary(java.lang.Boolean isSummary)
Convenience method for settingisSummary
.ElementDefinition.Builder
isSummary(Boolean isSummary)
Whether the element should be included if a client requests a search with the parameter _summary=true.ElementDefinition.Builder
label(java.lang.String label)
Convenience method for settinglabel
.ElementDefinition.Builder
label(String label)
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.ElementDefinition.Builder
mapping(java.util.Collection<ElementDefinition.Mapping> mapping)
Identifies a concept from an external specification that roughly corresponds to this element.ElementDefinition.Builder
mapping(ElementDefinition.Mapping... mapping)
Identifies a concept from an external specification that roughly corresponds to this element.ElementDefinition.Builder
max(java.lang.String max)
Convenience method for settingmax
.ElementDefinition.Builder
max(String max)
The maximum number of times this element is permitted to appear in the instance.ElementDefinition.Builder
maxLength(java.lang.Integer maxLength)
Convenience method for settingmaxLength
.ElementDefinition.Builder
maxLength(Integer maxLength)
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.ElementDefinition.Builder
maxValue(java.lang.Integer maxValue)
Convenience method for settingmaxValue
with choice type Integer.ElementDefinition.Builder
maxValue(java.time.LocalDate maxValue)
Convenience method for settingmaxValue
with choice type Date.ElementDefinition.Builder
maxValue(java.time.LocalTime maxValue)
Convenience method for settingmaxValue
with choice type Time.ElementDefinition.Builder
maxValue(java.time.ZonedDateTime maxValue)
Convenience method for settingmaxValue
with choice type Instant.ElementDefinition.Builder
maxValue(Element maxValue)
The maximum allowed value for the element.ElementDefinition.Builder
meaningWhenMissing(Markdown meaningWhenMissing)
The Implicit meaning that is to be understood when this element is missing (e.g.ElementDefinition.Builder
min(UnsignedInt min)
The minimum number of times this element SHALL appear in the instance.ElementDefinition.Builder
minValue(java.lang.Integer minValue)
Convenience method for settingminValue
with choice type Integer.ElementDefinition.Builder
minValue(java.time.LocalDate minValue)
Convenience method for settingminValue
with choice type Date.ElementDefinition.Builder
minValue(java.time.LocalTime minValue)
Convenience method for settingminValue
with choice type Time.ElementDefinition.Builder
minValue(java.time.ZonedDateTime minValue)
Convenience method for settingminValue
with choice type Instant.ElementDefinition.Builder
minValue(Element minValue)
The minimum allowed value for the element.ElementDefinition.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.ElementDefinition.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.ElementDefinition.Builder
mustSupport(java.lang.Boolean mustSupport)
Convenience method for settingmustSupport
.ElementDefinition.Builder
mustSupport(Boolean mustSupport)
If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.ElementDefinition.Builder
orderMeaning(java.lang.String orderMeaning)
Convenience method for settingorderMeaning
.ElementDefinition.Builder
orderMeaning(String orderMeaning)
If present, indicates that the order of the repeating element has meaning and describes what that meaning is.ElementDefinition.Builder
path(java.lang.String path)
Convenience method for settingpath
.ElementDefinition.Builder
path(String path)
The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.ElementDefinition.Builder
pattern(java.lang.Boolean pattern)
Convenience method for settingpattern
with choice type Boolean.ElementDefinition.Builder
pattern(java.lang.Integer pattern)
Convenience method for settingpattern
with choice type Integer.ElementDefinition.Builder
pattern(java.lang.String pattern)
Convenience method for settingpattern
with choice type String.ElementDefinition.Builder
pattern(java.time.LocalDate pattern)
Convenience method for settingpattern
with choice type Date.ElementDefinition.Builder
pattern(java.time.LocalTime pattern)
Convenience method for settingpattern
with choice type Time.ElementDefinition.Builder
pattern(java.time.ZonedDateTime pattern)
Convenience method for settingpattern
with choice type Instant.ElementDefinition.Builder
pattern(Element pattern)
Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance.ElementDefinition.Builder
representation(java.util.Collection<PropertyRepresentation> representation)
Codes that define how this element is represented in instances, when the deviation varies from the normal case.ElementDefinition.Builder
representation(PropertyRepresentation... representation)
Codes that define how this element is represented in instances, when the deviation varies from the normal case.ElementDefinition.Builder
requirements(Markdown requirements)
This element is for traceability of why the element was created and why the constraints exist as they do.ElementDefinition.Builder
sliceIsConstraining(java.lang.Boolean sliceIsConstraining)
Convenience method for settingsliceIsConstraining
.ElementDefinition.Builder
sliceIsConstraining(Boolean sliceIsConstraining)
If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile.ElementDefinition.Builder
sliceName(java.lang.String sliceName)
Convenience method for settingsliceName
.ElementDefinition.Builder
sliceName(String sliceName)
The name of this element definition slice, when slicing is working.ElementDefinition.Builder
slicing(ElementDefinition.Slicing slicing)
Indicates that the element is sliced into a set of alternative definitions (i.e.ElementDefinition.Builder
type(java.util.Collection<ElementDefinition.Type> type)
The data type or resource that the value of this element is permitted to be.ElementDefinition.Builder
type(ElementDefinition.Type... type)
The data type or resource that the value of this element is permitted to be.protected void
validate(ElementDefinition elementDefinition)
-
Methods inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public ElementDefinition.Builder id(java.lang.String id)
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.- Overrides:
id
in classBackboneElement.Builder
- Parameters:
id
- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public ElementDefinition.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public ElementDefinition.Builder extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public ElementDefinition.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
modifierExtension
public ElementDefinition.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
path
public ElementDefinition.Builder path(java.lang.String path)
Convenience method for settingpath
.This element is required.
- Parameters:
path
- Path of the element in the hierarchy of elements- Returns:
- A reference to this Builder instance
- See Also:
path(org.linuxforhealth.fhir.model.type.String)
-
path
public ElementDefinition.Builder path(String path)
The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.This element is required.
- Parameters:
path
- Path of the element in the hierarchy of elements- Returns:
- A reference to this Builder instance
-
representation
public ElementDefinition.Builder representation(PropertyRepresentation... representation)
Codes that define how this element is represented in instances, when the deviation varies from the normal case.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
representation
- xmlAttr | xmlText | typeAttr | cdaText | xhtml- Returns:
- A reference to this Builder instance
-
representation
public ElementDefinition.Builder representation(java.util.Collection<PropertyRepresentation> representation)
Codes that define how this element is represented in instances, when the deviation varies from the normal case.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
representation
- xmlAttr | xmlText | typeAttr | cdaText | xhtml- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
sliceName
public ElementDefinition.Builder sliceName(java.lang.String sliceName)
Convenience method for settingsliceName
.- Parameters:
sliceName
- Name for this particular element (in a set of slices)- Returns:
- A reference to this Builder instance
- See Also:
sliceName(org.linuxforhealth.fhir.model.type.String)
-
sliceName
public ElementDefinition.Builder sliceName(String sliceName)
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.- Parameters:
sliceName
- Name for this particular element (in a set of slices)- Returns:
- A reference to this Builder instance
-
sliceIsConstraining
public ElementDefinition.Builder sliceIsConstraining(java.lang.Boolean sliceIsConstraining)
Convenience method for settingsliceIsConstraining
.- Parameters:
sliceIsConstraining
- If this slice definition constrains an inherited slice definition (or not)- Returns:
- A reference to this Builder instance
- See Also:
sliceIsConstraining(org.linuxforhealth.fhir.model.type.Boolean)
-
sliceIsConstraining
public ElementDefinition.Builder sliceIsConstraining(Boolean sliceIsConstraining)
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.- Parameters:
sliceIsConstraining
- If this slice definition constrains an inherited slice definition (or not)- Returns:
- A reference to this Builder instance
-
label
public ElementDefinition.Builder label(java.lang.String label)
Convenience method for settinglabel
.- Parameters:
label
- Name for element to display with or prompt for element- Returns:
- A reference to this Builder instance
- See Also:
label(org.linuxforhealth.fhir.model.type.String)
-
label
public ElementDefinition.Builder label(String label)
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.- Parameters:
label
- Name for element to display with or prompt for element- Returns:
- A reference to this Builder instance
-
code
public ElementDefinition.Builder code(Coding... code)
A code that has the same meaning as the element in a particular terminology.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
code
- Corresponding codes in terminologies- Returns:
- A reference to this Builder instance
-
code
public ElementDefinition.Builder code(java.util.Collection<Coding> code)
A code that has the same meaning as the element in a particular terminology.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
code
- Corresponding codes in terminologies- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
slicing
public ElementDefinition.Builder slicing(ElementDefinition.Slicing slicing)
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).- Parameters:
slicing
- This element is sliced - slices follow- Returns:
- A reference to this Builder instance
-
_short
public ElementDefinition.Builder _short(java.lang.String _short)
Convenience method for setting_short
.- Parameters:
_short
- Concise definition for space-constrained presentation- Returns:
- A reference to this Builder instance
- See Also:
_short(org.linuxforhealth.fhir.model.type.String)
-
_short
public ElementDefinition.Builder _short(String _short)
A concise description of what this element means (e.g. for use in autogenerated summaries).- Parameters:
_short
- Concise definition for space-constrained presentation- Returns:
- A reference to this Builder instance
-
definition
public ElementDefinition.Builder definition(Markdown definition)
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).- Parameters:
definition
- Full formal definition as narrative text- Returns:
- A reference to this Builder instance
-
comment
public ElementDefinition.Builder comment(Markdown comment)
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).- Parameters:
comment
- Comments about the use of this element- Returns:
- A reference to this Builder instance
-
requirements
public ElementDefinition.Builder requirements(Markdown requirements)
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.- Parameters:
requirements
- Why this resource has been created- Returns:
- A reference to this Builder instance
-
alias
public ElementDefinition.Builder alias(java.lang.String... alias)
Convenience method for settingalias
.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
alias
- Other names- Returns:
- A reference to this Builder instance
- See Also:
#alias(org.linuxforhealth.fhir.model.type.String)
-
alias
public ElementDefinition.Builder alias(String... alias)
Identifies additional names by which this element might also be known.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
alias
- Other names- Returns:
- A reference to this Builder instance
-
alias
public ElementDefinition.Builder alias(java.util.Collection<String> alias)
Identifies additional names by which this element might also be known.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
alias
- Other names- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
min
public ElementDefinition.Builder min(UnsignedInt min)
The minimum number of times this element SHALL appear in the instance.- Parameters:
min
- Minimum Cardinality- Returns:
- A reference to this Builder instance
-
max
public ElementDefinition.Builder max(java.lang.String max)
Convenience method for settingmax
.- Parameters:
max
- Maximum Cardinality (a number or *)- Returns:
- A reference to this Builder instance
- See Also:
max(org.linuxforhealth.fhir.model.type.String)
-
max
public ElementDefinition.Builder max(String max)
The maximum number of times this element is permitted to appear in the instance.- Parameters:
max
- Maximum Cardinality (a number or *)- Returns:
- A reference to this Builder instance
-
base
public ElementDefinition.Builder base(ElementDefinition.Base base)
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.- Parameters:
base
- Base definition information for tools- Returns:
- A reference to this Builder instance
-
contentReference
public ElementDefinition.Builder contentReference(Uri contentReference)
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.- Parameters:
contentReference
- Reference to definition of content for the element- Returns:
- A reference to this Builder instance
-
type
public ElementDefinition.Builder type(ElementDefinition.Type... type)
The data type or resource that the value of this element is permitted to be.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
type
- Data type and Profile for this element- Returns:
- A reference to this Builder instance
-
type
public ElementDefinition.Builder type(java.util.Collection<ElementDefinition.Type> type)
The data type or resource that the value of this element is permitted to be.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
type
- Data type and Profile for this element- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
defaultValue
public ElementDefinition.Builder defaultValue(java.lang.Boolean defaultValue)
Convenience method for settingdefaultValue
with choice type Boolean.- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public ElementDefinition.Builder defaultValue(java.time.LocalDate defaultValue)
Convenience method for settingdefaultValue
with choice type Date.- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public ElementDefinition.Builder defaultValue(java.time.ZonedDateTime defaultValue)
Convenience method for settingdefaultValue
with choice type Instant.- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public ElementDefinition.Builder defaultValue(java.lang.Integer defaultValue)
Convenience method for settingdefaultValue
with choice type Integer.- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public ElementDefinition.Builder defaultValue(java.lang.String defaultValue)
Convenience method for settingdefaultValue
with choice type String.- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public ElementDefinition.Builder defaultValue(java.time.LocalTime defaultValue)
Convenience method for settingdefaultValue
with choice type Time.- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
- See Also:
defaultValue(Element)
-
defaultValue
public ElementDefinition.Builder defaultValue(Element defaultValue)
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').This is a choice element with the following allowed types:
Base64Binary
Boolean
Canonical
Code
Date
DateTime
Decimal
Id
Instant
Integer
Markdown
Oid
PositiveInt
String
Time
UnsignedInt
Uri
Url
Uuid
Address
Age
Annotation
Attachment
CodeableConcept
CodeableReference
Coding
ContactPoint
Count
Distance
Duration
HumanName
Identifier
Money
Period
Quantity
Range
Ratio
RatioRange
Reference
SampledData
Signature
Timing
ContactDetail
Contributor
DataRequirement
Expression
ParameterDefinition
RelatedArtifact
TriggerDefinition
UsageContext
Dosage
- Parameters:
defaultValue
- Specified value if missing from instance- Returns:
- A reference to this Builder instance
-
meaningWhenMissing
public ElementDefinition.Builder meaningWhenMissing(Markdown meaningWhenMissing)
The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').- Parameters:
meaningWhenMissing
- Implicit meaning when this element is missing- Returns:
- A reference to this Builder instance
-
orderMeaning
public ElementDefinition.Builder orderMeaning(java.lang.String orderMeaning)
Convenience method for settingorderMeaning
.- Parameters:
orderMeaning
- What the order of the elements means- Returns:
- A reference to this Builder instance
- See Also:
orderMeaning(org.linuxforhealth.fhir.model.type.String)
-
orderMeaning
public ElementDefinition.Builder orderMeaning(String orderMeaning)
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.- Parameters:
orderMeaning
- What the order of the elements means- Returns:
- A reference to this Builder instance
-
fixed
public ElementDefinition.Builder fixed(java.lang.Boolean fixed)
Convenience method for settingfixed
with choice type Boolean.- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
- See Also:
fixed(Element)
-
fixed
public ElementDefinition.Builder fixed(java.time.LocalDate fixed)
Convenience method for settingfixed
with choice type Date.- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
- See Also:
fixed(Element)
-
fixed
public ElementDefinition.Builder fixed(java.time.ZonedDateTime fixed)
Convenience method for settingfixed
with choice type Instant.- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
- See Also:
fixed(Element)
-
fixed
public ElementDefinition.Builder fixed(java.lang.Integer fixed)
Convenience method for settingfixed
with choice type Integer.- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
- See Also:
fixed(Element)
-
fixed
public ElementDefinition.Builder fixed(java.lang.String fixed)
Convenience method for settingfixed
with choice type String.- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
- See Also:
fixed(Element)
-
fixed
public ElementDefinition.Builder fixed(java.time.LocalTime fixed)
Convenience method for settingfixed
with choice type Time.- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
- See Also:
fixed(Element)
-
fixed
public ElementDefinition.Builder fixed(Element fixed)
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.This is a choice element with the following allowed types:
Base64Binary
Boolean
Canonical
Code
Date
DateTime
Decimal
Id
Instant
Integer
Markdown
Oid
PositiveInt
String
Time
UnsignedInt
Uri
Url
Uuid
Address
Age
Annotation
Attachment
CodeableConcept
CodeableReference
Coding
ContactPoint
Count
Distance
Duration
HumanName
Identifier
Money
Period
Quantity
Range
Ratio
RatioRange
Reference
SampledData
Signature
Timing
ContactDetail
Contributor
DataRequirement
Expression
ParameterDefinition
RelatedArtifact
TriggerDefinition
UsageContext
Dosage
- Parameters:
fixed
- Value must be exactly this- Returns:
- A reference to this Builder instance
-
pattern
public ElementDefinition.Builder pattern(java.lang.Boolean pattern)
Convenience method for settingpattern
with choice type Boolean.- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
- See Also:
pattern(Element)
-
pattern
public ElementDefinition.Builder pattern(java.time.LocalDate pattern)
Convenience method for settingpattern
with choice type Date.- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
- See Also:
pattern(Element)
-
pattern
public ElementDefinition.Builder pattern(java.time.ZonedDateTime pattern)
Convenience method for settingpattern
with choice type Instant.- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
- See Also:
pattern(Element)
-
pattern
public ElementDefinition.Builder pattern(java.lang.Integer pattern)
Convenience method for settingpattern
with choice type Integer.- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
- See Also:
pattern(Element)
-
pattern
public ElementDefinition.Builder pattern(java.lang.String pattern)
Convenience method for settingpattern
with choice type String.- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
- See Also:
pattern(Element)
-
pattern
public ElementDefinition.Builder pattern(java.time.LocalTime pattern)
Convenience method for settingpattern
with choice type Time.- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
- See Also:
pattern(Element)
-
pattern
public ElementDefinition.Builder pattern(Element pattern)
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.
This is a choice element with the following allowed types:
Base64Binary
Boolean
Canonical
Code
Date
DateTime
Decimal
Id
Instant
Integer
Markdown
Oid
PositiveInt
String
Time
UnsignedInt
Uri
Url
Uuid
Address
Age
Annotation
Attachment
CodeableConcept
CodeableReference
Coding
ContactPoint
Count
Distance
Duration
HumanName
Identifier
Money
Period
Quantity
Range
Ratio
RatioRange
Reference
SampledData
Signature
Timing
ContactDetail
Contributor
DataRequirement
Expression
ParameterDefinition
RelatedArtifact
TriggerDefinition
UsageContext
Dosage
- Parameters:
pattern
- Value must have at least these property values- Returns:
- A reference to this Builder instance
-
example
public ElementDefinition.Builder example(ElementDefinition.Example... example)
A sample value for this element demonstrating the type of information that would typically be found in the element.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
example
- Example value (as defined for type)- Returns:
- A reference to this Builder instance
-
example
public ElementDefinition.Builder example(java.util.Collection<ElementDefinition.Example> example)
A sample value for this element demonstrating the type of information that would typically be found in the element.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
example
- Example value (as defined for type)- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
minValue
public ElementDefinition.Builder minValue(java.time.LocalDate minValue)
Convenience method for settingminValue
with choice type Date.- Parameters:
minValue
- Minimum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
minValue(Element)
-
minValue
public ElementDefinition.Builder minValue(java.time.ZonedDateTime minValue)
Convenience method for settingminValue
with choice type Instant.- Parameters:
minValue
- Minimum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
minValue(Element)
-
minValue
public ElementDefinition.Builder minValue(java.time.LocalTime minValue)
Convenience method for settingminValue
with choice type Time.- Parameters:
minValue
- Minimum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
minValue(Element)
-
minValue
public ElementDefinition.Builder minValue(java.lang.Integer minValue)
Convenience method for settingminValue
with choice type Integer.- Parameters:
minValue
- Minimum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
minValue(Element)
-
minValue
public ElementDefinition.Builder minValue(Element minValue)
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.This is a choice element with the following allowed types:
- Parameters:
minValue
- Minimum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
-
maxValue
public ElementDefinition.Builder maxValue(java.time.LocalDate maxValue)
Convenience method for settingmaxValue
with choice type Date.- Parameters:
maxValue
- Maximum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
maxValue(Element)
-
maxValue
public ElementDefinition.Builder maxValue(java.time.ZonedDateTime maxValue)
Convenience method for settingmaxValue
with choice type Instant.- Parameters:
maxValue
- Maximum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
maxValue(Element)
-
maxValue
public ElementDefinition.Builder maxValue(java.time.LocalTime maxValue)
Convenience method for settingmaxValue
with choice type Time.- Parameters:
maxValue
- Maximum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
maxValue(Element)
-
maxValue
public ElementDefinition.Builder maxValue(java.lang.Integer maxValue)
Convenience method for settingmaxValue
with choice type Integer.- Parameters:
maxValue
- Maximum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
- See Also:
maxValue(Element)
-
maxValue
public ElementDefinition.Builder maxValue(Element maxValue)
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.This is a choice element with the following allowed types:
- Parameters:
maxValue
- Maximum Allowed Value (for some types)- Returns:
- A reference to this Builder instance
-
maxLength
public ElementDefinition.Builder maxLength(java.lang.Integer maxLength)
Convenience method for settingmaxLength
.- Parameters:
maxLength
- Max length for strings- Returns:
- A reference to this Builder instance
- See Also:
maxLength(org.linuxforhealth.fhir.model.type.Integer)
-
maxLength
public ElementDefinition.Builder maxLength(Integer maxLength)
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.- Parameters:
maxLength
- Max length for strings- Returns:
- A reference to this Builder instance
-
condition
public ElementDefinition.Builder condition(Id... condition)
A reference to an invariant that may make additional statements about the cardinality or value in the instance.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
condition
- Reference to invariant about presence- Returns:
- A reference to this Builder instance
-
condition
public ElementDefinition.Builder condition(java.util.Collection<Id> condition)
A reference to an invariant that may make additional statements about the cardinality or value in the instance.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
condition
- Reference to invariant about presence- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
constraint
public ElementDefinition.Builder constraint(ElementDefinition.Constraint... constraint)
Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
constraint
- Condition that must evaluate to true- Returns:
- A reference to this Builder instance
-
constraint
public ElementDefinition.Builder constraint(java.util.Collection<ElementDefinition.Constraint> constraint)
Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
constraint
- Condition that must evaluate to true- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
mustSupport
public ElementDefinition.Builder mustSupport(java.lang.Boolean mustSupport)
Convenience method for settingmustSupport
.- Parameters:
mustSupport
- If the element must be supported- Returns:
- A reference to this Builder instance
- See Also:
mustSupport(org.linuxforhealth.fhir.model.type.Boolean)
-
mustSupport
public ElementDefinition.Builder mustSupport(Boolean mustSupport)
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.- Parameters:
mustSupport
- If the element must be supported- Returns:
- A reference to this Builder instance
-
isModifier
public ElementDefinition.Builder isModifier(java.lang.Boolean isModifier)
Convenience method for settingisModifier
.- Parameters:
isModifier
- If this modifies the meaning of other elements- Returns:
- A reference to this Builder instance
- See Also:
isModifier(org.linuxforhealth.fhir.model.type.Boolean)
-
isModifier
public ElementDefinition.Builder isModifier(Boolean isModifier)
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.- Parameters:
isModifier
- If this modifies the meaning of other elements- Returns:
- A reference to this Builder instance
-
isModifierReason
public ElementDefinition.Builder isModifierReason(java.lang.String isModifierReason)
Convenience method for settingisModifierReason
.- Parameters:
isModifierReason
- Reason that this element is marked as a modifier- Returns:
- A reference to this Builder instance
- See Also:
isModifierReason(org.linuxforhealth.fhir.model.type.String)
-
isModifierReason
public ElementDefinition.Builder isModifierReason(String isModifierReason)
Explains how that element affects the interpretation of the resource or element that contains it.- Parameters:
isModifierReason
- Reason that this element is marked as a modifier- Returns:
- A reference to this Builder instance
-
isSummary
public ElementDefinition.Builder isSummary(java.lang.Boolean isSummary)
Convenience method for settingisSummary
.- Parameters:
isSummary
- Include when _summary = true?- Returns:
- A reference to this Builder instance
- See Also:
isSummary(org.linuxforhealth.fhir.model.type.Boolean)
-
isSummary
public ElementDefinition.Builder isSummary(Boolean isSummary)
Whether the element should be included if a client requests a search with the parameter _summary=true.- Parameters:
isSummary
- Include when _summary = true?- Returns:
- A reference to this Builder instance
-
binding
public ElementDefinition.Builder binding(ElementDefinition.Binding binding)
Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).- Parameters:
binding
- ValueSet details if this is coded- Returns:
- A reference to this Builder instance
-
mapping
public ElementDefinition.Builder mapping(ElementDefinition.Mapping... mapping)
Identifies a concept from an external specification that roughly corresponds to this element.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
mapping
- Map element to another set of definitions- Returns:
- A reference to this Builder instance
-
mapping
public ElementDefinition.Builder mapping(java.util.Collection<ElementDefinition.Mapping> mapping)
Identifies a concept from an external specification that roughly corresponds to this element.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
mapping
- Map element to another set of definitions- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public ElementDefinition build()
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
ElementDefinition
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid ElementDefinition per the base specification
-
validate
protected void validate(ElementDefinition elementDefinition)
-
from
protected ElementDefinition.Builder from(ElementDefinition elementDefinition)
-
-