Class Observation.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Resource>
-
- com.ibm.fhir.model.resource.Resource.Builder
-
- com.ibm.fhir.model.resource.DomainResource.Builder
-
- com.ibm.fhir.model.resource.Observation.Builder
-
- Enclosing class:
- Observation
public static class Observation.Builder extends DomainResource.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.resource.DomainResource.Builder
contained, extension, modifierExtension, text
-
Fields inherited from class com.ibm.fhir.model.resource.Resource.Builder
id, implicitRules, language, meta
-
Fields inherited from class com.ibm.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Observation.Builder
basedOn(Reference... basedOn)
A plan, proposal or order that is fulfilled in whole or in part by this event.Observation.Builder
basedOn(java.util.Collection<Reference> basedOn)
A plan, proposal or order that is fulfilled in whole or in part by this event.Observation.Builder
bodySite(CodeableConcept bodySite)
Indicates the site on the subject's body where the observation was made (i.e.Observation
build()
Build theObservation
Observation.Builder
category(CodeableConcept... category)
A code that classifies the general type of observation being made.Observation.Builder
category(java.util.Collection<CodeableConcept> category)
A code that classifies the general type of observation being made.Observation.Builder
code(CodeableConcept code)
Describes what was observed.Observation.Builder
component(Observation.Component... component)
Some observations have multiple component observations.Observation.Builder
component(java.util.Collection<Observation.Component> component)
Some observations have multiple component observations.Observation.Builder
contained(Resource... contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.Observation.Builder
contained(java.util.Collection<Resource> contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.Observation.Builder
dataAbsentReason(CodeableConcept dataAbsentReason)
Provides a reason why the expected value in the element Observation.value[x] is missing.Observation.Builder
derivedFrom(Reference... derivedFrom)
The target resource that represents a measurement from which this observation value is derived.Observation.Builder
derivedFrom(java.util.Collection<Reference> derivedFrom)
The target resource that represents a measurement from which this observation value is derived.Observation.Builder
device(Reference device)
The device used to generate the observation data.Observation.Builder
effective(Element effective)
The time or time-period the observed value is asserted as being true.Observation.Builder
effective(java.time.ZonedDateTime effective)
Convenience method for settingeffective
with choice type Instant.Observation.Builder
encounter(Reference encounter)
The healthcare event (e.g.Observation.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource.Observation.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource.Observation.Builder
focus(Reference... focus)
The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor.Observation.Builder
focus(java.util.Collection<Reference> focus)
The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor.protected Observation.Builder
from(Observation observation)
Observation.Builder
hasMember(Reference... hasMember)
This observation is a group observation (e.g.Observation.Builder
hasMember(java.util.Collection<Reference> hasMember)
This observation is a group observation (e.g.Observation.Builder
id(java.lang.String id)
The logical id of the resource, as used in the URL for the resource.Observation.Builder
identifier(Identifier... identifier)
A unique identifier assigned to this observation.Observation.Builder
identifier(java.util.Collection<Identifier> identifier)
A unique identifier assigned to this observation.Observation.Builder
implicitRules(Uri implicitRules)
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.Observation.Builder
interpretation(CodeableConcept... interpretation)
A categorical assessment of an observation value.Observation.Builder
interpretation(java.util.Collection<CodeableConcept> interpretation)
A categorical assessment of an observation value.Observation.Builder
issued(Instant issued)
The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.Observation.Builder
issued(java.time.ZonedDateTime issued)
Convenience method for settingissued
.Observation.Builder
language(Code language)
The base language in which the resource is written.Observation.Builder
meta(Meta meta)
The metadata about the resource.Observation.Builder
method(CodeableConcept method)
Indicates the mechanism used to perform the observation.Observation.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants.Observation.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants.Observation.Builder
note(Annotation... note)
Comments about the observation or the results.Observation.Builder
note(java.util.Collection<Annotation> note)
Comments about the observation or the results.Observation.Builder
partOf(Reference... partOf)
A larger event of which this particular Observation is a component or step.Observation.Builder
partOf(java.util.Collection<Reference> partOf)
A larger event of which this particular Observation is a component or step.Observation.Builder
performer(Reference... performer)
Who was responsible for asserting the observed value as "true".Observation.Builder
performer(java.util.Collection<Reference> performer)
Who was responsible for asserting the observed value as "true".Observation.Builder
referenceRange(Observation.ReferenceRange... referenceRange)
Guidance on how to interpret the value by comparison to a normal or recommended range.Observation.Builder
referenceRange(java.util.Collection<Observation.ReferenceRange> referenceRange)
Guidance on how to interpret the value by comparison to a normal or recommended range.Observation.Builder
specimen(Reference specimen)
The specimen that was used when this observation was made.Observation.Builder
status(ObservationStatus status)
The status of the result value.Observation.Builder
subject(Reference subject)
The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed.Observation.Builder
text(Narrative text)
A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human.protected void
validate(Observation observation)
Observation.Builder
value(Element value)
The information determined as a result of making the observation, if the information has a simple value.Observation.Builder
value(java.lang.Boolean value)
Convenience method for settingvalue
with choice type Boolean.Observation.Builder
value(java.lang.Integer value)
Convenience method for settingvalue
with choice type Integer.Observation.Builder
value(java.lang.String value)
Convenience method for settingvalue
with choice type String.Observation.Builder
value(java.time.LocalTime value)
Convenience method for settingvalue
with choice type Time.-
Methods inherited from class com.ibm.fhir.model.resource.DomainResource.Builder
from, validate
-
Methods inherited from class com.ibm.fhir.model.resource.Resource.Builder
from, validate
-
Methods inherited from class com.ibm.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public Observation.Builder id(java.lang.String id)
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.- Overrides:
id
in classDomainResource.Builder
- Parameters:
id
- Logical id of this artifact- Returns:
- A reference to this Builder instance
-
meta
public Observation.Builder meta(Meta meta)
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.- Overrides:
meta
in classDomainResource.Builder
- Parameters:
meta
- Metadata about the resource- Returns:
- A reference to this Builder instance
-
implicitRules
public Observation.Builder implicitRules(Uri implicitRules)
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.- Overrides:
implicitRules
in classDomainResource.Builder
- Parameters:
implicitRules
- A set of rules under which this content was created- Returns:
- A reference to this Builder instance
-
language
public Observation.Builder language(Code language)
The base language in which the resource is written.- Overrides:
language
in classDomainResource.Builder
- Parameters:
language
- Language of the resource content- Returns:
- A reference to this Builder instance
-
text
public Observation.Builder text(Narrative text)
A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.- Overrides:
text
in classDomainResource.Builder
- Parameters:
text
- Text summary of the resource, for human interpretation- Returns:
- A reference to this Builder instance
-
contained
public Observation.Builder contained(Resource... contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
-
contained
public Observation.Builder contained(java.util.Collection<Resource> contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.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:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
extension
public Observation.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource. 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 classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public Observation.Builder extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource. 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 classDomainResource.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 Observation.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 is allowed to 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 classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
-
modifierExtension
public Observation.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 is allowed to 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 classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
identifier
public Observation.Builder identifier(Identifier... identifier)
A unique identifier assigned to this observation.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- Business Identifier for observation- Returns:
- A reference to this Builder instance
-
identifier
public Observation.Builder identifier(java.util.Collection<Identifier> identifier)
A unique identifier assigned to this observation.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:
identifier
- Business Identifier for observation- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
basedOn
public Observation.Builder basedOn(Reference... basedOn)
A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
basedOn
- Fulfills plan, proposal or order- Returns:
- A reference to this Builder instance
-
basedOn
public Observation.Builder basedOn(java.util.Collection<Reference> basedOn)
A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
basedOn
- Fulfills plan, proposal or order- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
partOf
public Observation.Builder partOf(Reference... partOf)
A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
partOf
- Part of referenced event- Returns:
- A reference to this Builder instance
-
partOf
public Observation.Builder partOf(java.util.Collection<Reference> partOf)
A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
partOf
- Part of referenced event- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
status
public Observation.Builder status(ObservationStatus status)
The status of the result value.This element is required.
- Parameters:
status
- registered | preliminary | final | amended +- Returns:
- A reference to this Builder instance
-
category
public Observation.Builder category(CodeableConcept... category)
A code that classifies the general type of observation being made.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
category
- Classification of type of observation- Returns:
- A reference to this Builder instance
-
category
public Observation.Builder category(java.util.Collection<CodeableConcept> category)
A code that classifies the general type of observation being made.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:
category
- Classification of type of observation- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
code
public Observation.Builder code(CodeableConcept code)
Describes what was observed. Sometimes this is called the observation "name".This element is required.
- Parameters:
code
- Type of observation (code / type)- Returns:
- A reference to this Builder instance
-
subject
public Observation.Builder subject(Reference subject)
The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.Allowed resource types for this reference:
- Parameters:
subject
- Who and/or what the observation is about- Returns:
- A reference to this Builder instance
-
focus
public Observation.Builder focus(Reference... focus)
The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
focus
- What the observation is about, when it is not about the subject of record- Returns:
- A reference to this Builder instance
-
focus
public Observation.Builder focus(java.util.Collection<Reference> focus)
The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.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:
focus
- What the observation is about, when it is not about the subject of record- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
encounter
public Observation.Builder encounter(Reference encounter)
The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.Allowed resource types for this reference:
- Parameters:
encounter
- Healthcare event during which this observation is made- Returns:
- A reference to this Builder instance
-
effective
public Observation.Builder effective(java.time.ZonedDateTime effective)
Convenience method for settingeffective
with choice type Instant.- Parameters:
effective
- Clinically relevant time/time-period for observation- Returns:
- A reference to this Builder instance
- See Also:
effective(Element)
-
effective
public Observation.Builder effective(Element effective)
The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.This is a choice element with the following allowed types:
- Parameters:
effective
- Clinically relevant time/time-period for observation- Returns:
- A reference to this Builder instance
-
issued
public Observation.Builder issued(java.time.ZonedDateTime issued)
Convenience method for settingissued
.- Parameters:
issued
- Date/Time this version was made available- Returns:
- A reference to this Builder instance
- See Also:
issued(com.ibm.fhir.model.type.Instant)
-
issued
public Observation.Builder issued(Instant issued)
The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.- Parameters:
issued
- Date/Time this version was made available- Returns:
- A reference to this Builder instance
-
performer
public Observation.Builder performer(Reference... performer)
Who was responsible for asserting the observed value as "true".Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
performer
- Who is responsible for the observation- Returns:
- A reference to this Builder instance
-
performer
public Observation.Builder performer(java.util.Collection<Reference> performer)
Who was responsible for asserting the observed value as "true".Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
performer
- Who is responsible for the observation- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
value
public Observation.Builder value(java.lang.String value)
Convenience method for settingvalue
with choice type String.- Parameters:
value
- Actual result- Returns:
- A reference to this Builder instance
- See Also:
value(Element)
-
value
public Observation.Builder value(java.lang.Boolean value)
Convenience method for settingvalue
with choice type Boolean.- Parameters:
value
- Actual result- Returns:
- A reference to this Builder instance
- See Also:
value(Element)
-
value
public Observation.Builder value(java.lang.Integer value)
Convenience method for settingvalue
with choice type Integer.- Parameters:
value
- Actual result- Returns:
- A reference to this Builder instance
- See Also:
value(Element)
-
value
public Observation.Builder value(java.time.LocalTime value)
Convenience method for settingvalue
with choice type Time.- Parameters:
value
- Actual result- Returns:
- A reference to this Builder instance
- See Also:
value(Element)
-
value
public Observation.Builder value(Element value)
The information determined as a result of making the observation, if the information has a simple value.This is a choice element with the following allowed types:
- Parameters:
value
- Actual result- Returns:
- A reference to this Builder instance
-
dataAbsentReason
public Observation.Builder dataAbsentReason(CodeableConcept dataAbsentReason)
Provides a reason why the expected value in the element Observation.value[x] is missing.- Parameters:
dataAbsentReason
- Why the result is missing- Returns:
- A reference to this Builder instance
-
interpretation
public Observation.Builder interpretation(CodeableConcept... interpretation)
A categorical assessment of an observation value. For example, high, low, normal.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
interpretation
- High, low, normal, etc.- Returns:
- A reference to this Builder instance
-
interpretation
public Observation.Builder interpretation(java.util.Collection<CodeableConcept> interpretation)
A categorical assessment of an observation value. For example, high, low, normal.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:
interpretation
- High, low, normal, etc.- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
note
public Observation.Builder note(Annotation... note)
Comments about the observation or the results.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
note
- Comments about the observation- Returns:
- A reference to this Builder instance
-
note
public Observation.Builder note(java.util.Collection<Annotation> note)
Comments about the observation or the results.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:
note
- Comments about the observation- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
bodySite
public Observation.Builder bodySite(CodeableConcept bodySite)
Indicates the site on the subject's body where the observation was made (i.e. the target site).- Parameters:
bodySite
- Observed body part- Returns:
- A reference to this Builder instance
-
method
public Observation.Builder method(CodeableConcept method)
Indicates the mechanism used to perform the observation.- Parameters:
method
- How it was done- Returns:
- A reference to this Builder instance
-
specimen
public Observation.Builder specimen(Reference specimen)
The specimen that was used when this observation was made.Allowed resource types for this reference:
- Parameters:
specimen
- Specimen used for this observation- Returns:
- A reference to this Builder instance
-
device
public Observation.Builder device(Reference device)
The device used to generate the observation data.Allowed resource types for this reference:
- Parameters:
device
- (Measurement) Device- Returns:
- A reference to this Builder instance
-
referenceRange
public Observation.Builder referenceRange(Observation.ReferenceRange... referenceRange)
Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
referenceRange
- Provides guide for interpretation- Returns:
- A reference to this Builder instance
-
referenceRange
public Observation.Builder referenceRange(java.util.Collection<Observation.ReferenceRange> referenceRange)
Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used.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:
referenceRange
- Provides guide for interpretation- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
hasMember
public Observation.Builder hasMember(Reference... hasMember)
This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
hasMember
- Related resource that belongs to the Observation group- Returns:
- A reference to this Builder instance
-
hasMember
public Observation.Builder hasMember(java.util.Collection<Reference> hasMember)
This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
hasMember
- Related resource that belongs to the Observation group- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
derivedFrom
public Observation.Builder derivedFrom(Reference... derivedFrom)
The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
derivedFrom
- Related measurements the observation is made from- Returns:
- A reference to this Builder instance
-
derivedFrom
public Observation.Builder derivedFrom(java.util.Collection<Reference> derivedFrom)
The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
derivedFrom
- Related measurements the observation is made from- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
component
public Observation.Builder component(Observation.Component... component)
Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
component
- Component results- Returns:
- A reference to this Builder instance
-
component
public Observation.Builder component(java.util.Collection<Observation.Component> component)
Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.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:
component
- Component results- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public Observation build()
- Specified by:
build
in interfaceBuilder<Resource>
- Specified by:
build
in classDomainResource.Builder
- Returns:
- An immutable object of type
Observation
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Observation per the base specification
-
validate
protected void validate(Observation observation)
-
from
protected Observation.Builder from(Observation observation)
-
-