Class Observation
- java.lang.Object
-
- org.linuxforhealth.fhir.model.visitor.AbstractVisitable
-
- org.linuxforhealth.fhir.model.resource.Resource
-
- org.linuxforhealth.fhir.model.resource.DomainResource
-
- org.linuxforhealth.fhir.model.resource.Observation
-
- All Implemented Interfaces:
Visitable
@Generated("org.linuxforhealth.fhir.tools.CodeGenerator") public class Observation extends DomainResource
Measurements and simple assertions made about a patient, device or other subject.Maturity level: FMM5 (Normative)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Observation.Builder
static class
Observation.Component
Some observations have multiple component observations.static class
Observation.ReferenceRange
Guidance on how to interpret the value by comparison to a normal or recommended range.
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.resource.DomainResource
contained, extension, modifierExtension, text
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(java.lang.String elementName, int elementIndex, Visitor visitor)
Accept a Visitor and invoke the appropriate visit methods.static Observation.Builder
builder()
boolean
equals(java.lang.Object obj)
java.util.List<Reference>
getBasedOn()
A plan, proposal or order that is fulfilled in whole or in part by this event.CodeableConcept
getBodySite()
Indicates the site on the subject's body where the observation was made (i.e.java.util.List<CodeableConcept>
getCategory()
A code that classifies the general type of observation being made.CodeableConcept
getCode()
Describes what was observed.java.util.List<Observation.Component>
getComponent()
Some observations have multiple component observations.CodeableConcept
getDataAbsentReason()
Provides a reason why the expected value in the element Observation.value[x] is missing.java.util.List<Reference>
getDerivedFrom()
The target resource that represents a measurement from which this observation value is derived.Reference
getDevice()
The device used to generate the observation data.Element
getEffective()
The time or time-period the observed value is asserted as being true.Reference
getEncounter()
The healthcare event (e.g.java.util.List<Reference>
getFocus()
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.java.util.List<Reference>
getHasMember()
This observation is a group observation (e.g.java.util.List<Identifier>
getIdentifier()
A unique identifier assigned to this observation.java.util.List<CodeableConcept>
getInterpretation()
A categorical assessment of an observation value.Instant
getIssued()
The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.CodeableConcept
getMethod()
Indicates the mechanism used to perform the observation.java.util.List<Annotation>
getNote()
Comments about the observation or the results.java.util.List<Reference>
getPartOf()
A larger event of which this particular Observation is a component or step.java.util.List<Reference>
getPerformer()
Who was responsible for asserting the observed value as "true".java.util.List<Observation.ReferenceRange>
getReferenceRange()
Guidance on how to interpret the value by comparison to a normal or recommended range.Reference
getSpecimen()
The specimen that was used when this observation was made.ObservationStatus
getStatus()
The status of the result value.Reference
getSubject()
The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed.Element
getValue()
The information determined as a result of making the observation, if the information has a simple value.boolean
hasChildren()
int
hashCode()
Observation.Builder
toBuilder()
Create a new Builder from the contents of this Resource-
Methods inherited from class org.linuxforhealth.fhir.model.resource.DomainResource
getContained, getExtension, getModifierExtension, getText
-
Methods inherited from class org.linuxforhealth.fhir.model.resource.Resource
as, getId, getImplicitRules, getLanguage, getMeta, is
-
-
-
-
Method Detail
-
getIdentifier
public java.util.List<Identifier> getIdentifier()
A unique identifier assigned to this observation.- Returns:
- An unmodifiable list containing immutable objects of type
Identifier
that may be empty.
-
getBasedOn
public java.util.List<Reference> getBasedOn()
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.- Returns:
- An unmodifiable list containing immutable objects of type
Reference
that may be empty.
-
getPartOf
public java.util.List<Reference> getPartOf()
A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.- Returns:
- An unmodifiable list containing immutable objects of type
Reference
that may be empty.
-
getStatus
public ObservationStatus getStatus()
The status of the result value.- Returns:
- An immutable object of type
ObservationStatus
that is non-null.
-
getCategory
public java.util.List<CodeableConcept> getCategory()
A code that classifies the general type of observation being made.- Returns:
- An unmodifiable list containing immutable objects of type
CodeableConcept
that may be empty.
-
getCode
public CodeableConcept getCode()
Describes what was observed. Sometimes this is called the observation "name".- Returns:
- An immutable object of type
CodeableConcept
that is non-null.
-
getSubject
public Reference getSubject()
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.- Returns:
- An immutable object of type
Reference
that may be null.
-
getFocus
public java.util.List<Reference> getFocus()
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.- Returns:
- An unmodifiable list containing immutable objects of type
Reference
that may be empty.
-
getEncounter
public Reference getEncounter()
The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.- Returns:
- An immutable object of type
Reference
that may be null.
-
getEffective
public Element getEffective()
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.
-
getIssued
public Instant getIssued()
The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.- Returns:
- An immutable object of type
Instant
that may be null.
-
getPerformer
public java.util.List<Reference> getPerformer()
Who was responsible for asserting the observed value as "true".- Returns:
- An unmodifiable list containing immutable objects of type
Reference
that may be empty.
-
getValue
public Element getValue()
The information determined as a result of making the observation, if the information has a simple value.
-
getDataAbsentReason
public CodeableConcept getDataAbsentReason()
Provides a reason why the expected value in the element Observation.value[x] is missing.- Returns:
- An immutable object of type
CodeableConcept
that may be null.
-
getInterpretation
public java.util.List<CodeableConcept> getInterpretation()
A categorical assessment of an observation value. For example, high, low, normal.- Returns:
- An unmodifiable list containing immutable objects of type
CodeableConcept
that may be empty.
-
getNote
public java.util.List<Annotation> getNote()
Comments about the observation or the results.- Returns:
- An unmodifiable list containing immutable objects of type
Annotation
that may be empty.
-
getBodySite
public CodeableConcept getBodySite()
Indicates the site on the subject's body where the observation was made (i.e. the target site).- Returns:
- An immutable object of type
CodeableConcept
that may be null.
-
getMethod
public CodeableConcept getMethod()
Indicates the mechanism used to perform the observation.- Returns:
- An immutable object of type
CodeableConcept
that may be null.
-
getSpecimen
public Reference getSpecimen()
The specimen that was used when this observation was made.- Returns:
- An immutable object of type
Reference
that may be null.
-
getDevice
public Reference getDevice()
The device used to generate the observation data.- Returns:
- An immutable object of type
Reference
that may be null.
-
getReferenceRange
public java.util.List<Observation.ReferenceRange> getReferenceRange()
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.- Returns:
- An unmodifiable list containing immutable objects of type
Observation.ReferenceRange
that may be empty.
-
getHasMember
public java.util.List<Reference> getHasMember()
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.- Returns:
- An unmodifiable list containing immutable objects of type
Reference
that may be empty.
-
getDerivedFrom
public java.util.List<Reference> getDerivedFrom()
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.- Returns:
- An unmodifiable list containing immutable objects of type
Reference
that may be empty.
-
getComponent
public java.util.List<Observation.Component> getComponent()
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.- Returns:
- An unmodifiable list containing immutable objects of type
Observation.Component
that may be empty.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildren
in classDomainResource
-
accept
public void accept(java.lang.String elementName, int elementIndex, Visitor visitor)
Description copied from interface:Visitable
Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:if (visitor.preVisit(this)) { visitor.visitStart(elementName, elementIndex, this); if (visitor.visit(elementName, elementIndex, this)) { // visit children } visitor.visitEnd(elementName, elementIndex, this); visitor.postVisit(this); }
- Specified by:
accept
in interfaceVisitable
- Specified by:
accept
in classAbstractVisitable
- Parameters:
elementName
- the name of the element in the context of this visitelementIndex
- the index of the element in a list or -1 if it is not contained within a Listvisitor
- the visitor to use
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toBuilder
public Observation.Builder toBuilder()
Description copied from class:Resource
Create a new Builder from the contents of this Resource- Specified by:
toBuilder
in classDomainResource
-
builder
public static Observation.Builder builder()
-
-