ElementDefinition

class ElementDefinition(val id: Option[String], val min: Option[UnsignedInt], val max: Option[String], val path: String, val code: LitSeq[Coding], val label: Option[String], val short: Option[String], val alias: LitSeq[String], val comment: Option[Markdown], val fixed: Option[FixedChoice], val extension: LitSeq[Extension], val sliceName: Option[String], val maxLength: Option[Int], val condition: LitSeq[Id], val isSummary: Option[Boolean], val definition: Option[Markdown], val pattern: Option[PatternChoice], val isModifier: Option[Boolean], val minValue: Option[MinValueChoice], val maxValue: Option[MaxValueChoice], val mustSupport: Option[Boolean], val requirements: Option[Markdown], val orderMeaning: Option[String], val representation: LitSeq[PROPERTY_REPRESENTATION], val base: Option[Base], val defaultValue: Option[DefaultValueChoice], val contentReference: Option[UriStr], val isModifierReason: Option[String], val modifierExtension: LitSeq[Extension], val example: LitSeq[Example], val mapping: LitSeq[Mapping], `type`: LitSeq[Type], val meaningWhenMissing: Option[Markdown], val sliceIsConstraining: Option[Boolean], val binding: Option[Binding], val constraint: LitSeq[Constraint], val slicing: Option[Slicing], val primitiveAttributes: TreeMap[FHIRComponentFieldMeta[_], PrimitiveElementInfo]) extends BackboneElement

Base StructureDefinition for ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension.

Subclass of core.model.BackboneElement (Base StructureDefinition for BackboneElement Type: Base definition for all elements that are defined inside a resource - but not those in a data type.)

Value parameters:
`type`
  • The data type or resource that the value of this element is permitted to be.
alias
  • Identifies additional names by which this element might also be known.
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.
binding
  • Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).
code
  • A code that has the same meaning as the element in a particular terminology.
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).
condition
  • A reference to an invariant that may make additional statements about the cardinality or value in the instance.
constraint
  • Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.
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.
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').
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).
example
  • A sample value for this element demonstrating the type of information that would typically be found in the element.
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.
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.
id
  • Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
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.
isModifierReason
  • Explains how that element affects the interpretation of the resource or element that contains it.
isSummary
  • Whether the element should be included if a client requests a search with the parameter _summary=true.
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.
mapping
  • Identifies a concept from an external specification that roughly corresponds to this element.
max
  • The maximum number of times this element is permitted to appear in the instance.
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.
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.
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').
min
  • The minimum number of times this element SHALL appear in the instance.
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.
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).
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.
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.
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.
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
    1. If an array: it must match (recursively) the pattern value.
representation
  • Codes that define how this element is represented in instances, when the deviation varies from the normal case.
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.
short
  • A concise description of what this element means (e.g. for use in autogenerated summaries).
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.
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.
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).
Constructor:

Introduces the fields min, max, path, code, label, short, alias, comment, fixed, sliceName, maxLength, condition, isSummary, definition, pattern, isModifier, minValue, maxValue, mustSupport, requirements, orderMeaning, representation, base, defaultValue, contentReference, isModifierReason, example, mapping, type, meaningWhenMissing, sliceIsConstraining, binding, constraint, slicing.

Companion:
object
class BackboneElement
class Element
class FHIRObject
trait FHIRComponent
trait Utils
class Object
trait Matchable
class Any

Type members

Inherited classlikes

object extensions
Inherited from:
FHIRObject
object ids
Inherited from:
FHIRObject

Inherited types

type FieldToElementLookup = TreeMap[FHIRComponentFieldMeta[_], PrimitiveElementInfo]
Inherited from:
FHIRObject

Value members

Inherited methods

final def >>[T](fn: T => T)(implicit tt: LTag[T]): FHIRObject.this.type

Slower than nodalMap, but should work with subtypes (e.g. PositiveInt). If you must use it, then:

Slower than nodalMap, but should work with subtypes (e.g. PositiveInt). If you must use it, then:

  • T should not be a Choice[_], a LitSeq[_] or an Option[_]
  • It may require a type parameter sometimes (e.g. sampleResource >>[BUNDLE_TYPE] { (_: BUNDLE_TYPE) => BUNDLE_TYPE.SEARCHSET } )
Inherited from:
FHIRObject
final def >>=[T, F[_] : Monad](fn: T => F[T])(implicit evidence$7: Monad[F], tt: LTag[T]): F[FHIRObject]
Inherited from:
FHIRObject
final def ^^[From, To](fn: From => To)(implicit tt: LTag[From]): LitSeq[To]

Extract values of type From, and map to LitSeq[To] using fn: From => To. Unlike >>, this is safe even if From is a Choice[], a LitSeq[] or an Option[_] Quite slow, slower than nodalExtract

Extract values of type From, and map to LitSeq[To] using fn: From => To. Unlike >>, this is safe even if From is a Choice[], a LitSeq[] or an Option[_] Quite slow, slower than nodalExtract

Inherited from:
FHIRObject
final def ^^^[T](implicit tt: LTag[T]): LitSeq[T]
Inherited from:
FHIRObject
def companionClassName[T](tag: LTag[T]): String
Inherited from:
Utils
def companionOf[T <: FHIRObject : ClassTag](implicit evidence$1: ClassTag[T], tag: LTag[T]): CompanionFor[T]
Inherited from:
Utils
def constructor: Constructor[_]
Inherited from:
FHIRComponent
def decodeMethodFor[T <: FHIRObject : ClassTag](implicit evidence$2: ClassTag[T], tag: LTag[T], params: DecoderParams): HCursor => Try[T]
Inherited from:
Utils
override def equals(obj: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters:
that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
FHIRObject -> Any
Inherited from:
FHIRObject
def fields: Seq[FHIRComponentField[_]]
Inherited from:
FHIRObject
def getFieldByClass[T](name: String, clazz: Class[T]): LitSeq[T]
Inherited from:
FHIRComponent
def getFieldByType[T : LTag](name: String): LitSeq[T]
Inherited from:
FHIRComponent
override def hashCode(): Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Returns:

the hash code value for this object.

Definition Classes
FHIRObject -> Any
Inherited from:
FHIRObject
def modifyField[T : LTag, Up >: ElementDefinition <: FHIRObject](fieldName: String, modify: T => T)(implicit evidence$5: LTag[T], ct: ClassTag[Up], tt: LTag[Up]): Up
Inherited from:
FHIRObject
def modifyFieldUnsafe[T, Up >: ElementDefinition <: FHIRObject](fieldName: String, modify: T => T)(implicit ct: ClassTag[Up], tt: LTag[Up]): Up
Inherited from:
FHIRObject
final def nodalExtract[From, To](klass: Class[From], fn: From => To): LitSeq[To]

Convenience alias for nodalGetByClass andThen map to LitSeq[To] using fn: From => To.

Convenience alias for nodalGetByClass andThen map to LitSeq[To] using fn: From => To.

Inherited from:
FHIRObject
final def nodalGetByClass[Target](klass: Class[Target]): LitSeq[Target]

Extract values of type From Unlike nodalMap, this is safe even if From is a Choice[_], a LitSeq[_] or an Option[_], however there remains a caveat with 'subtyped' types (eg PositiveInt), in that we can't differentiate them from the parent class Quite slow but faster than ^^

Extract values of type From Unlike nodalMap, this is safe even if From is a Choice[_], a LitSeq[_] or an Option[_], however there remains a caveat with 'subtyped' types (eg PositiveInt), in that we can't differentiate them from the parent class Quite slow but faster than ^^

Inherited from:
FHIRObject
final def nodalMap[T](klass: Class[T], fn: T => T): FHIRObject.this.type

Bit faster than >>, but still much slower than using update$foo when possible. If you must use it, then:

Bit faster than >>, but still much slower than using update$foo when possible. If you must use it, then:

  • T should not be a Choice[_], a LitSeq[_], an Option[_], or any 'subtyped' type (eg PositiveInt). You should ensure, if T is a supertype of multiple valid choice values (e.g. T =:= Object), that the return value of fn retains the same type as the input value.
Inherited from:
FHIRObject
def setFromField[T, UpType >: ElementDefinition <: FHIRObject : LTag](field: FHIRComponentFieldMeta[T])(newVal: T): UpType
Inherited from:
FHIRObject
def thisClassName: String
Inherited from:
FHIRObject
def toClass[T](klass: Class[T]): Option[T]
Inherited from:
FHIRObject
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
FHIRObject -> Any
Inherited from:
FHIRObject
def toType[T](implicit ct: ClassTag[T]): Option[T]
Inherited from:
FHIRObject
def updateFromField[T, UpType >: ElementDefinition <: FHIRObject : LTag](field: FHIRComponentFieldMeta[T])(fn: T => T): UpType
Inherited from:
FHIRObject
def updatePrimitiveAttributes(fn: FieldToElementLookup => FieldToElementLookup): FHIRObject.this.type
Inherited from:
FHIRObject
def withField[T : LTag, Up >: ElementDefinition <: FHIRObject](fieldName: String, value: T)(implicit evidence$6: LTag[T], ct: ClassTag[Up], tt: LTag[Up]): Up
Inherited from:
FHIRObject
def withFieldUnsafe[T, Up >: ElementDefinition <: FHIRObject](fieldName: String, value: T)(implicit ct: ClassTag[Up], tt: LTag[Up]): Up
Inherited from:
FHIRObject
def withFields[Up >: ElementDefinition <: FHIRObject](replacementFields: (String, Any)*)(implicit ct: ClassTag[Up], tt: LTag[Up]): Up
Inherited from:
FHIRObject
def withPrimitiveAttributes(a: FieldToElementLookup): FHIRObject.this.type
Inherited from:
FHIRObject

Concrete fields

val `type`: LitSeq[Type]
val alias: LitSeq[String]
val base: Option[Base]
val binding: Option[Binding]
val code: LitSeq[Coding]
val comment: Option[Markdown]
val condition: LitSeq[Id]
val constraint: LitSeq[Constraint]
val contentReference: Option[UriStr]
val definition: Option[Markdown]
val example: LitSeq[Example]
override val extension: LitSeq[Extension]
val fixed: Option[FixedChoice]
override val id: Option[String]
val isModifier: Option[Boolean]
val isModifierReason: Option[String]
val isSummary: Option[Boolean]
val label: Option[String]
val mapping: LitSeq[Mapping]
val max: Option[String]
val maxLength: Option[Int]
val meaningWhenMissing: Option[Markdown]
val min: Option[UnsignedInt]
override val modifierExtension: LitSeq[Extension]
val mustSupport: Option[Boolean]
val orderMeaning: Option[String]
val path: String
val pattern: Option[PatternChoice]
override val primitiveAttributes: TreeMap[FHIRComponentFieldMeta[_], PrimitiveElementInfo]
val requirements: Option[Markdown]
val short: Option[String]
val sliceIsConstraining: Option[Boolean]
val sliceName: Option[String]
val slicing: Option[Slicing]
override val thisTypeName: String

Inherited fields

val companion: CompanionFor[ElementDefinition]
Inherited from:
FHIRObject