Class Observation

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IAnyResource, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions, org.hl7.fhir.instance.model.api.IBaseResource, org.hl7.fhir.instance.model.api.IDomainResource

public class Observation extends DomainResource
Measurements and simple assertions made about a patient, device or other subject.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getIdentifier

      Returns:
      identifier (A unique identifier for the simple observation instance.)
    • hasIdentifier

      public boolean hasIdentifier()
    • addIdentifier

      Returns:
      identifier (A unique identifier for the simple observation instance.)
    • addIdentifier

    • getStatusElement

      Returns:
      status (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
    • hasStatusElement

      public boolean hasStatusElement()
    • hasStatus

      public boolean hasStatus()
    • setStatusElement

      Parameters:
      value - status (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
    • getStatus

      Returns:
      The status of the result value.
    • setStatus

      Parameters:
      value - The status of the result value.
    • getCategory

      Returns:
      category (A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.)
    • hasCategory

      public boolean hasCategory()
    • setCategory

      Parameters:
      value - category (A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.)
    • getCode

      Returns:
      code (Describes what was observed. Sometimes this is called the observation "name".)
    • hasCode

      public boolean hasCode()
    • setCode

      Parameters:
      value - code (Describes what was observed. Sometimes this is called the observation "name".)
    • getSubject

      Returns:
      subject (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.)
    • hasSubject

      public boolean hasSubject()
    • setSubject

      Parameters:
      value - subject (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.)
    • getSubjectTarget

      Returns:
      subject The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.)
    • setSubjectTarget

      Parameters:
      value - subject The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.)
    • getEncounter

      Returns:
      encounter (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.)
    • hasEncounter

      public boolean hasEncounter()
    • setEncounter

      Parameters:
      value - encounter (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.)
    • getEncounterTarget

      Returns:
      encounter The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.)
    • setEncounterTarget

      Parameters:
      value - encounter The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.)
    • getEffective

      public Type getEffective()
      Returns:
      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.)
    • getEffectiveDateTimeType

      public DateTimeType getEffectiveDateTimeType() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      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.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasEffectiveDateTimeType

      public boolean hasEffectiveDateTimeType()
    • getEffectivePeriod

      public Period getEffectivePeriod() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      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.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasEffectivePeriod

      public boolean hasEffectivePeriod()
    • hasEffective

      public boolean hasEffective()
    • setEffective

      public Observation setEffective(Type value)
      Parameters:
      value - 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.)
    • getIssuedElement

      Returns:
      issued (The date and time this observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
    • hasIssuedElement

      public boolean hasIssuedElement()
    • hasIssued

      public boolean hasIssued()
    • setIssuedElement

      Parameters:
      value - issued (The date and time this observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
    • getIssued

      public Date getIssued()
      Returns:
      The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
    • setIssued

      public Observation setIssued(Date value)
      Parameters:
      value - The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
    • getPerformer

      Returns:
      performer (Who was responsible for asserting the observed value as "true".)
    • hasPerformer

      public boolean hasPerformer()
    • addPerformer

      Returns:
      performer (Who was responsible for asserting the observed value as "true".)
    • addPerformer

    • getPerformerTarget

      Returns:
      performer (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Who was responsible for asserting the observed value as "true".)
    • getValue

      public Type getValue()
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
    • getValueQuantity

      public Quantity getValueQuantity() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueQuantity

      public boolean hasValueQuantity()
    • getValueCodeableConcept

      public CodeableConcept getValueCodeableConcept() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueCodeableConcept

      public boolean hasValueCodeableConcept()
    • getValueStringType

      public StringType getValueStringType() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueStringType

      public boolean hasValueStringType()
    • getValueRange

      public Range getValueRange() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueRange

      public boolean hasValueRange()
    • getValueRatio

      public Ratio getValueRatio() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueRatio

      public boolean hasValueRatio()
    • getValueSampledData

      public SampledData getValueSampledData() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueSampledData

      public boolean hasValueSampledData()
    • getValueAttachment

      public Attachment getValueAttachment() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueAttachment

      public boolean hasValueAttachment()
    • getValueTimeType

      public TimeType getValueTimeType() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueTimeType

      public boolean hasValueTimeType()
    • getValueDateTimeType

      public DateTimeType getValueDateTimeType() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValueDateTimeType

      public boolean hasValueDateTimeType()
    • getValuePeriod

      public Period getValuePeriod() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      value (The information determined as a result of making the observation, if the information has a simple value.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasValuePeriod

      public boolean hasValuePeriod()
    • hasValue

      public boolean hasValue()
    • setValue

      public Observation setValue(Type value)
      Parameters:
      value - value (The information determined as a result of making the observation, if the information has a simple value.)
    • getDataAbsentReason

      Returns:
      dataAbsentReason (Provides a reason why the expected value in the element Observation.value[x] is missing.)
    • hasDataAbsentReason

      public boolean hasDataAbsentReason()
    • setDataAbsentReason

      Parameters:
      value - dataAbsentReason (Provides a reason why the expected value in the element Observation.value[x] is missing.)
    • getInterpretation

      Returns:
      interpretation (The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.)
    • hasInterpretation

      public boolean hasInterpretation()
    • setInterpretation

      Parameters:
      value - interpretation (The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.)
    • getCommentsElement

      Returns:
      comments (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value
    • hasCommentsElement

      public boolean hasCommentsElement()
    • hasComments

      public boolean hasComments()
    • setCommentsElement

      Parameters:
      value - comments (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value
    • getComments

      public String getComments()
      Returns:
      May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.
    • setComments

      public Observation setComments(String value)
      Parameters:
      value - May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.
    • getBodySite

      Returns:
      bodySite (Indicates the site on the subject's body where the observation was made (i.e. the target site).)
    • hasBodySite

      public boolean hasBodySite()
    • setBodySite

      Parameters:
      value - bodySite (Indicates the site on the subject's body where the observation was made (i.e. the target site).)
    • getMethod

      Returns:
      method (Indicates the mechanism used to perform the observation.)
    • hasMethod

      public boolean hasMethod()
    • setMethod

      Parameters:
      value - method (Indicates the mechanism used to perform the observation.)
    • getSpecimen

      Returns:
      specimen (The specimen that was used when this observation was made.)
    • hasSpecimen

      public boolean hasSpecimen()
    • setSpecimen

      Parameters:
      value - specimen (The specimen that was used when this observation was made.)
    • getSpecimenTarget

      Returns:
      specimen The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The specimen that was used when this observation was made.)
    • setSpecimenTarget

      Parameters:
      value - specimen The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The specimen that was used when this observation was made.)
    • getDevice

      public Reference getDevice()
      Returns:
      device (The device used to generate the observation data.)
    • hasDevice

      public boolean hasDevice()
    • setDevice

      Parameters:
      value - device (The device used to generate the observation data.)
    • getDeviceTarget

      Returns:
      device The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device used to generate the observation data.)
    • setDeviceTarget

      Parameters:
      value - device The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device used to generate the observation data.)
    • getReferenceRange

      Returns:
      referenceRange (Guidance on how to interpret the value by comparison to a normal or recommended range.)
    • hasReferenceRange

      public boolean hasReferenceRange()
    • addReferenceRange

      Returns:
      referenceRange (Guidance on how to interpret the value by comparison to a normal or recommended range.)
    • addReferenceRange

    • getRelated

      Returns:
      related (A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.)
    • hasRelated

      public boolean hasRelated()
    • addRelated

      Returns:
      related (A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.)
    • addRelated

    • getComponent

      Returns:
      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.)
    • hasComponent

      public boolean hasComponent()
    • addComponent

      Returns:
      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.)
    • addComponent

    • listChildren

      protected void listChildren(List<Property> childrenList)
      Overrides:
      listChildren in class DomainResource
    • setProperty

      public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class DomainResource
    • copy

      public Observation copy()
      Specified by:
      copy in class DomainResource
    • typedCopy

      protected Observation typedCopy()
    • equalsDeep

      public boolean equalsDeep(Base other)
      Overrides:
      equalsDeep in class DomainResource
    • equalsShallow

      public boolean equalsShallow(Base other)
      Overrides:
      equalsShallow in class DomainResource
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class DomainResource
    • getResourceType

      Specified by:
      getResourceType in class Resource