Package org.hl7.fhir

Class Observation

All Implemented Interfaces:
org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2

public class Observation extends DomainResource implements org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
If the element is present, it must have either a @value, an @id, or extensions

Java class for Observation complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="Observation">
   <complexContent>
     <extension base="{http://hl7.org/fhir}DomainResource">
       <sequence>
         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
         <element name="status" type="{http://hl7.org/fhir}ObservationStatus"/>
         <element name="category" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
         <element name="code" type="{http://hl7.org/fhir}CodeableConcept"/>
         <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
         <element name="encounter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
         <choice minOccurs="0">
           <element name="effectiveDateTime" type="{http://hl7.org/fhir}dateTime"/>
           <element name="effectivePeriod" type="{http://hl7.org/fhir}Period"/>
         </choice>
         <element name="issued" type="{http://hl7.org/fhir}instant" minOccurs="0"/>
         <element name="performer" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
         <choice minOccurs="0">
           <element name="valueQuantity" type="{http://hl7.org/fhir}Quantity"/>
           <element name="valueCodeableConcept" type="{http://hl7.org/fhir}CodeableConcept"/>
           <element name="valueString" type="{http://hl7.org/fhir}string"/>
           <element name="valueRange" type="{http://hl7.org/fhir}Range"/>
           <element name="valueRatio" type="{http://hl7.org/fhir}Ratio"/>
           <element name="valueSampledData" type="{http://hl7.org/fhir}SampledData"/>
           <element name="valueAttachment" type="{http://hl7.org/fhir}Attachment"/>
           <element name="valueTime" type="{http://hl7.org/fhir}time"/>
           <element name="valueDateTime" type="{http://hl7.org/fhir}dateTime"/>
           <element name="valuePeriod" type="{http://hl7.org/fhir}Period"/>
         </choice>
         <element name="dataAbsentReason" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
         <element name="interpretation" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
         <element name="comment" type="{http://hl7.org/fhir}string" minOccurs="0"/>
         <element name="bodySite" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
         <element name="method" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
         <element name="specimen" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
         <element name="device" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
         <element name="referenceRange" type="{http://hl7.org/fhir}Observation.ReferenceRange" maxOccurs="unbounded" minOccurs="0"/>
         <element name="related" type="{http://hl7.org/fhir}Observation.Related" maxOccurs="unbounded" minOccurs="0"/>
         <element name="component" type="{http://hl7.org/fhir}Observation.Component" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </extension>
   </complexContent>
 </complexType>
 
  • Field Details

  • Constructor Details

    • Observation

      public Observation()
  • Method Details

    • getIdentifier

      public List<Identifier> getIdentifier()
      Gets the value of the identifier property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the Jakarta XML Binding object. This is why there is not a set method for the identifier property.

      For example, to add a new item, do as follows:

          getIdentifier().add(newItem);
       

      Objects of the following type(s) are allowed in the list Identifier

    • getStatus

      public ObservationStatus getStatus()
      Gets the value of the status property.
      Returns:
      possible object is ObservationStatus
    • setStatus

      public void setStatus(ObservationStatus value)
      Sets the value of the status property.
      Parameters:
      value - allowed object is ObservationStatus
    • getCategory

      public CodeableConcept getCategory()
      Gets the value of the category property.
      Returns:
      possible object is CodeableConcept
    • setCategory

      public void setCategory(CodeableConcept value)
      Sets the value of the category property.
      Parameters:
      value - allowed object is CodeableConcept
    • getCode

      public CodeableConcept getCode()
      Gets the value of the code property.
      Returns:
      possible object is CodeableConcept
    • setCode

      public void setCode(CodeableConcept value)
      Sets the value of the code property.
      Parameters:
      value - allowed object is CodeableConcept
    • getSubject

      public Reference getSubject()
      Gets the value of the subject property.
      Returns:
      possible object is Reference
    • setSubject

      public void setSubject(Reference value)
      Sets the value of the subject property.
      Parameters:
      value - allowed object is Reference
    • getEncounter

      public Reference getEncounter()
      Gets the value of the encounter property.
      Returns:
      possible object is Reference
    • setEncounter

      public void setEncounter(Reference value)
      Sets the value of the encounter property.
      Parameters:
      value - allowed object is Reference
    • getEffectiveDateTime

      public DateTime getEffectiveDateTime()
      Gets the value of the effectiveDateTime property.
      Returns:
      possible object is DateTime
    • setEffectiveDateTime

      public void setEffectiveDateTime(DateTime value)
      Sets the value of the effectiveDateTime property.
      Parameters:
      value - allowed object is DateTime
    • getEffectivePeriod

      public Period getEffectivePeriod()
      Gets the value of the effectivePeriod property.
      Returns:
      possible object is Period
    • setEffectivePeriod

      public void setEffectivePeriod(Period value)
      Sets the value of the effectivePeriod property.
      Parameters:
      value - allowed object is Period
    • getIssued

      public Instant getIssued()
      Gets the value of the issued property.
      Returns:
      possible object is Instant
    • setIssued

      public void setIssued(Instant value)
      Sets the value of the issued property.
      Parameters:
      value - allowed object is Instant
    • getPerformer

      public List<Reference> getPerformer()
      Gets the value of the performer property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the Jakarta XML Binding object. This is why there is not a set method for the performer property.

      For example, to add a new item, do as follows:

          getPerformer().add(newItem);
       

      Objects of the following type(s) are allowed in the list Reference

    • getValueQuantity

      public Quantity getValueQuantity()
      Gets the value of the valueQuantity property.
      Returns:
      possible object is Quantity
    • setValueQuantity

      public void setValueQuantity(Quantity value)
      Sets the value of the valueQuantity property.
      Parameters:
      value - allowed object is Quantity
    • getValueCodeableConcept

      public CodeableConcept getValueCodeableConcept()
      Gets the value of the valueCodeableConcept property.
      Returns:
      possible object is CodeableConcept
    • setValueCodeableConcept

      public void setValueCodeableConcept(CodeableConcept value)
      Sets the value of the valueCodeableConcept property.
      Parameters:
      value - allowed object is CodeableConcept
    • getValueString

      public String getValueString()
      Gets the value of the valueString property.
      Returns:
      possible object is String
    • setValueString

      public void setValueString(String value)
      Sets the value of the valueString property.
      Parameters:
      value - allowed object is String
    • getValueRange

      public Range getValueRange()
      Gets the value of the valueRange property.
      Returns:
      possible object is Range
    • setValueRange

      public void setValueRange(Range value)
      Sets the value of the valueRange property.
      Parameters:
      value - allowed object is Range
    • getValueRatio

      public Ratio getValueRatio()
      Gets the value of the valueRatio property.
      Returns:
      possible object is Ratio
    • setValueRatio

      public void setValueRatio(Ratio value)
      Sets the value of the valueRatio property.
      Parameters:
      value - allowed object is Ratio
    • getValueSampledData

      public SampledData getValueSampledData()
      Gets the value of the valueSampledData property.
      Returns:
      possible object is SampledData
    • setValueSampledData

      public void setValueSampledData(SampledData value)
      Sets the value of the valueSampledData property.
      Parameters:
      value - allowed object is SampledData
    • getValueAttachment

      public Attachment getValueAttachment()
      Gets the value of the valueAttachment property.
      Returns:
      possible object is Attachment
    • setValueAttachment

      public void setValueAttachment(Attachment value)
      Sets the value of the valueAttachment property.
      Parameters:
      value - allowed object is Attachment
    • getValueTime

      public Time getValueTime()
      Gets the value of the valueTime property.
      Returns:
      possible object is Time
    • setValueTime

      public void setValueTime(Time value)
      Sets the value of the valueTime property.
      Parameters:
      value - allowed object is Time
    • getValueDateTime

      public DateTime getValueDateTime()
      Gets the value of the valueDateTime property.
      Returns:
      possible object is DateTime
    • setValueDateTime

      public void setValueDateTime(DateTime value)
      Sets the value of the valueDateTime property.
      Parameters:
      value - allowed object is DateTime
    • getValuePeriod

      public Period getValuePeriod()
      Gets the value of the valuePeriod property.
      Returns:
      possible object is Period
    • setValuePeriod

      public void setValuePeriod(Period value)
      Sets the value of the valuePeriod property.
      Parameters:
      value - allowed object is Period
    • getDataAbsentReason

      public CodeableConcept getDataAbsentReason()
      Gets the value of the dataAbsentReason property.
      Returns:
      possible object is CodeableConcept
    • setDataAbsentReason

      public void setDataAbsentReason(CodeableConcept value)
      Sets the value of the dataAbsentReason property.
      Parameters:
      value - allowed object is CodeableConcept
    • getInterpretation

      public CodeableConcept getInterpretation()
      Gets the value of the interpretation property.
      Returns:
      possible object is CodeableConcept
    • setInterpretation

      public void setInterpretation(CodeableConcept value)
      Sets the value of the interpretation property.
      Parameters:
      value - allowed object is CodeableConcept
    • getComment

      public String getComment()
      Gets the value of the comment property.
      Returns:
      possible object is String
    • setComment

      public void setComment(String value)
      Sets the value of the comment property.
      Parameters:
      value - allowed object is String
    • getBodySite

      public CodeableConcept getBodySite()
      Gets the value of the bodySite property.
      Returns:
      possible object is CodeableConcept
    • setBodySite

      public void setBodySite(CodeableConcept value)
      Sets the value of the bodySite property.
      Parameters:
      value - allowed object is CodeableConcept
    • getMethod

      public CodeableConcept getMethod()
      Gets the value of the method property.
      Returns:
      possible object is CodeableConcept
    • setMethod

      public void setMethod(CodeableConcept value)
      Sets the value of the method property.
      Parameters:
      value - allowed object is CodeableConcept
    • getSpecimen

      public Reference getSpecimen()
      Gets the value of the specimen property.
      Returns:
      possible object is Reference
    • setSpecimen

      public void setSpecimen(Reference value)
      Sets the value of the specimen property.
      Parameters:
      value - allowed object is Reference
    • getDevice

      public Reference getDevice()
      Gets the value of the device property.
      Returns:
      possible object is Reference
    • setDevice

      public void setDevice(Reference value)
      Sets the value of the device property.
      Parameters:
      value - allowed object is Reference
    • getReferenceRange

      public List<ObservationReferenceRange> getReferenceRange()
      Gets the value of the referenceRange property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the Jakarta XML Binding object. This is why there is not a set method for the referenceRange property.

      For example, to add a new item, do as follows:

          getReferenceRange().add(newItem);
       

      Objects of the following type(s) are allowed in the list ObservationReferenceRange

    • getRelated

      public List<ObservationRelated> getRelated()
      Gets the value of the related property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the Jakarta XML Binding object. This is why there is not a set method for the related property.

      For example, to add a new item, do as follows:

          getRelated().add(newItem);
       

      Objects of the following type(s) are allowed in the list ObservationRelated

    • getComponent

      public List<ObservationComponent> getComponent()
      Gets the value of the component property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the Jakarta XML Binding object. This is why there is not a set method for the component property.

      For example, to add a new item, do as follows:

          getComponent().add(newItem);
       

      Objects of the following type(s) are allowed in the list ObservationComponent

    • withIdentifier

      public Observation withIdentifier(Identifier... values)
    • withIdentifier

      public Observation withIdentifier(Collection<Identifier> values)
    • withStatus

      public Observation withStatus(ObservationStatus value)
    • withCategory

      public Observation withCategory(CodeableConcept value)
    • withCode

      public Observation withCode(CodeableConcept value)
    • withSubject

      public Observation withSubject(Reference value)
    • withEncounter

      public Observation withEncounter(Reference value)
    • withEffectiveDateTime

      public Observation withEffectiveDateTime(DateTime value)
    • withEffectivePeriod

      public Observation withEffectivePeriod(Period value)
    • withIssued

      public Observation withIssued(Instant value)
    • withPerformer

      public Observation withPerformer(Reference... values)
    • withPerformer

      public Observation withPerformer(Collection<Reference> values)
    • withValueQuantity

      public Observation withValueQuantity(Quantity value)
    • withValueCodeableConcept

      public Observation withValueCodeableConcept(CodeableConcept value)
    • withValueString

      public Observation withValueString(String value)
    • withValueRange

      public Observation withValueRange(Range value)
    • withValueRatio

      public Observation withValueRatio(Ratio value)
    • withValueSampledData

      public Observation withValueSampledData(SampledData value)
    • withValueAttachment

      public Observation withValueAttachment(Attachment value)
    • withValueTime

      public Observation withValueTime(Time value)
    • withValueDateTime

      public Observation withValueDateTime(DateTime value)
    • withValuePeriod

      public Observation withValuePeriod(Period value)
    • withDataAbsentReason

      public Observation withDataAbsentReason(CodeableConcept value)
    • withInterpretation

      public Observation withInterpretation(CodeableConcept value)
    • withComment

      public Observation withComment(String value)
    • withBodySite

      public Observation withBodySite(CodeableConcept value)
    • withMethod

      public Observation withMethod(CodeableConcept value)
    • withSpecimen

      public Observation withSpecimen(Reference value)
    • withDevice

      public Observation withDevice(Reference value)
    • withReferenceRange

      public Observation withReferenceRange(ObservationReferenceRange... values)
    • withReferenceRange

      public Observation withReferenceRange(Collection<ObservationReferenceRange> values)
    • withRelated

      public Observation withRelated(ObservationRelated... values)
    • withRelated

      public Observation withRelated(Collection<ObservationRelated> values)
    • withComponent

      public Observation withComponent(ObservationComponent... values)
    • withComponent

      public Observation withComponent(Collection<ObservationComponent> values)
    • withText

      public Observation withText(Narrative value)
      Overrides:
      withText in class DomainResource
    • withContained

      public Observation withContained(ResourceContainer... values)
      Overrides:
      withContained in class DomainResource
    • withContained

      public Observation withContained(Collection<ResourceContainer> values)
      Overrides:
      withContained in class DomainResource
    • withExtension

      public Observation withExtension(Extension... values)
      Overrides:
      withExtension in class DomainResource
    • withExtension

      public Observation withExtension(Collection<Extension> values)
      Overrides:
      withExtension in class DomainResource
    • withModifierExtension

      public Observation withModifierExtension(Extension... values)
      Overrides:
      withModifierExtension in class DomainResource
    • withModifierExtension

      public Observation withModifierExtension(Collection<Extension> values)
      Overrides:
      withModifierExtension in class DomainResource
    • withId

      public Observation withId(Id value)
      Overrides:
      withId in class DomainResource
    • withMeta

      public Observation withMeta(Meta value)
      Overrides:
      withMeta in class DomainResource
    • withImplicitRules

      public Observation withImplicitRules(Uri value)
      Overrides:
      withImplicitRules in class DomainResource
    • withLanguage

      public Observation withLanguage(Code value)
      Overrides:
      withLanguage in class DomainResource
    • equals

      public boolean equals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, Object object, org.jvnet.jaxb2_commons.lang.EqualsStrategy2 strategy)
      Specified by:
      equals in interface org.jvnet.jaxb2_commons.lang.Equals2
      Overrides:
      equals in class DomainResource
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class DomainResource
    • hashCode

      public int hashCode(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, org.jvnet.jaxb2_commons.lang.HashCodeStrategy2 strategy)
      Specified by:
      hashCode in interface org.jvnet.jaxb2_commons.lang.HashCode2
      Overrides:
      hashCode in class DomainResource
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class DomainResource
    • toString

      public String toString()
      Overrides:
      toString in class DomainResource
    • append

      public StringBuilder append(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)
      Specified by:
      append in interface org.jvnet.jaxb2_commons.lang.ToString2
      Overrides:
      append in class DomainResource
    • appendFields

      public StringBuilder appendFields(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)
      Specified by:
      appendFields in interface org.jvnet.jaxb2_commons.lang.ToString2
      Overrides:
      appendFields in class DomainResource
    • setIdentifier

      public void setIdentifier(List<Identifier> value)
    • setPerformer

      public void setPerformer(List<Reference> value)
    • setReferenceRange

      public void setReferenceRange(List<ObservationReferenceRange> value)
    • setRelated

      public void setRelated(List<ObservationRelated> value)
    • setComponent

      public void setComponent(List<ObservationComponent> value)