Class Encounter

java.lang.Object
ca.uhn.fhir.model.api.BaseElement
ca.uhn.fhir.model.dstu2.resource.BaseResource
ca.uhn.fhir.model.dstu2.resource.Encounter
All Implemented Interfaces:
ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseResource

public class Encounter
extends BaseResource
implements ca.uhn.fhir.model.api.IResource
HAPI/FHIR Encounter Resource (workflow.encounter)

Definition: An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.

Requirements:

Profile Definition: http://hl7.org/fhir/profiles/Encounter

See Also:
Serialized Form
  • Field Details

    • SP_IDENTIFIER

      public static final String SP_IDENTIFIER
      Search parameter constant for identifier

      Description:
      Type: token
      Path: Encounter.identifier

      See Also:
      Constant Field Values
    • IDENTIFIER

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
      Fluent Client search parameter constant for identifier

      Description:
      Type: token
      Path: Encounter.identifier

    • SP_STATUS

      public static final String SP_STATUS
      Search parameter constant for status

      Description:
      Type: token
      Path: Encounter.status

      See Also:
      Constant Field Values
    • STATUS

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS
      Fluent Client search parameter constant for status

      Description:
      Type: token
      Path: Encounter.status

    • SP_DATE

      public static final String SP_DATE
      Search parameter constant for date

      Description: A date within the period the Encounter lasted
      Type: date
      Path: Encounter.period

      See Also:
      Constant Field Values
    • DATE

      public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE
      Fluent Client search parameter constant for date

      Description: A date within the period the Encounter lasted
      Type: date
      Path: Encounter.period

    • SP_PATIENT

      public static final String SP_PATIENT
      Search parameter constant for patient

      Description:
      Type: reference
      Path: Encounter.patient

      See Also:
      Constant Field Values
    • PATIENT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT
      Fluent Client search parameter constant for patient

      Description:
      Type: reference
      Path: Encounter.patient

    • SP_APPOINTMENT

      public static final String SP_APPOINTMENT
      Search parameter constant for appointment

      Description:
      Type: reference
      Path: Encounter.appointment

      See Also:
      Constant Field Values
    • APPOINTMENT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam APPOINTMENT
      Fluent Client search parameter constant for appointment

      Description:
      Type: reference
      Path: Encounter.appointment

    • SP_LENGTH

      public static final String SP_LENGTH
      Search parameter constant for length

      Description: Length of encounter in days
      Type: number
      Path: Encounter.length

      See Also:
      Constant Field Values
    • LENGTH

      public static final ca.uhn.fhir.rest.gclient.NumberClientParam LENGTH
      Fluent Client search parameter constant for length

      Description: Length of encounter in days
      Type: number
      Path: Encounter.length

    • SP_REASON

      public static final String SP_REASON
      Search parameter constant for reason

      Description:
      Type: token
      Path: Encounter.reason

      See Also:
      Constant Field Values
    • REASON

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON
      Fluent Client search parameter constant for reason

      Description:
      Type: token
      Path: Encounter.reason

    • SP_INDICATION

      public static final String SP_INDICATION
      Search parameter constant for indication

      Description:
      Type: reference
      Path: Encounter.indication

      See Also:
      Constant Field Values
    • INDICATION

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INDICATION
      Fluent Client search parameter constant for indication

      Description:
      Type: reference
      Path: Encounter.indication

    • SP_CONDITION

      public static final String SP_CONDITION
      Search parameter constant for condition

      Description:
      Type: reference
      Path: Encounter.indication

      See Also:
      Constant Field Values
    • CONDITION

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION
      Fluent Client search parameter constant for condition

      Description:
      Type: reference
      Path: Encounter.indication

    • SP_PROCEDURE

      public static final String SP_PROCEDURE
      Search parameter constant for procedure

      Description:
      Type: reference
      Path: Encounter.indication

      See Also:
      Constant Field Values
    • PROCEDURE

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROCEDURE
      Fluent Client search parameter constant for procedure

      Description:
      Type: reference
      Path: Encounter.indication

    • SP_LOCATION

      public static final String SP_LOCATION
      Search parameter constant for location

      Description:
      Type: reference
      Path: Encounter.location.location

      See Also:
      Constant Field Values
    • LOCATION

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION
      Fluent Client search parameter constant for location

      Description:
      Type: reference
      Path: Encounter.location.location

    • SP_LOCATION_PERIOD

      public static final String SP_LOCATION_PERIOD
      Search parameter constant for location-period

      Description:
      Type: date
      Path: Encounter.location.period

      See Also:
      Constant Field Values
    • LOCATION_PERIOD

      public static final ca.uhn.fhir.rest.gclient.DateClientParam LOCATION_PERIOD
      Fluent Client search parameter constant for location-period

      Description:
      Type: date
      Path: Encounter.location.period

    • SP_TYPE

      public static final String SP_TYPE
      Search parameter constant for type

      Description:
      Type: token
      Path: Encounter.type

      See Also:
      Constant Field Values
    • TYPE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE
      Fluent Client search parameter constant for type

      Description:
      Type: token
      Path: Encounter.type

    • SP_SPECIAL_ARRANGEMENT

      public static final String SP_SPECIAL_ARRANGEMENT
      Search parameter constant for special-arrangement

      Description:
      Type: token
      Path: Encounter.hospitalization.specialArrangement

      See Also:
      Constant Field Values
    • SPECIAL_ARRANGEMENT

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIAL_ARRANGEMENT
      Fluent Client search parameter constant for special-arrangement

      Description:
      Type: token
      Path: Encounter.hospitalization.specialArrangement

    • SP_PART_OF

      public static final String SP_PART_OF
      Search parameter constant for part-of

      Description:
      Type: reference
      Path: Encounter.partOf

      See Also:
      Constant Field Values
    • PART_OF

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF
      Fluent Client search parameter constant for part-of

      Description:
      Type: reference
      Path: Encounter.partOf

    • SP_PARTICIPANT

      public static final String SP_PARTICIPANT
      Search parameter constant for participant

      Description:
      Type: reference
      Path: Encounter.participant.individual

      See Also:
      Constant Field Values
    • PARTICIPANT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT
      Fluent Client search parameter constant for participant

      Description:
      Type: reference
      Path: Encounter.participant.individual

    • SP_PARTICIPANT_TYPE

      public static final String SP_PARTICIPANT_TYPE
      Search parameter constant for participant-type

      Description:
      Type: token
      Path: Encounter.participant.type

      See Also:
      Constant Field Values
    • PARTICIPANT_TYPE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam PARTICIPANT_TYPE
      Fluent Client search parameter constant for participant-type

      Description:
      Type: token
      Path: Encounter.participant.type

    • SP_EPISODEOFCARE

      public static final String SP_EPISODEOFCARE
      Search parameter constant for episodeofcare

      Description:
      Type: reference
      Path: Encounter.episodeOfCare

      See Also:
      Constant Field Values
    • EPISODEOFCARE

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EPISODEOFCARE
      Fluent Client search parameter constant for episodeofcare

      Description:
      Type: reference
      Path: Encounter.episodeOfCare

    • SP_INCOMINGREFERRAL

      public static final String SP_INCOMINGREFERRAL
      Search parameter constant for incomingreferral

      Description:
      Type: reference
      Path: Encounter.incomingReferral

      See Also:
      Constant Field Values
    • INCOMINGREFERRAL

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INCOMINGREFERRAL
      Fluent Client search parameter constant for incomingreferral

      Description:
      Type: reference
      Path: Encounter.incomingReferral

    • SP_PRACTITIONER

      public static final String SP_PRACTITIONER
      Search parameter constant for practitioner

      Description:
      Type: reference
      Path: Encounter.participant.individual

      See Also:
      Constant Field Values
    • PRACTITIONER

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER
      Fluent Client search parameter constant for practitioner

      Description:
      Type: reference
      Path: Encounter.participant.individual

    • INCLUDE_APPOINTMENT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_APPOINTMENT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:appointment".
    • INCLUDE_CONDITION

      public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:condition".
    • INCLUDE_EPISODEOFCARE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_EPISODEOFCARE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:episodeofcare".
    • INCLUDE_INCOMINGREFERRAL

      public static final ca.uhn.fhir.model.api.Include INCLUDE_INCOMINGREFERRAL
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:incomingreferral".
    • INCLUDE_INDICATION

      public static final ca.uhn.fhir.model.api.Include INCLUDE_INDICATION
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:indication".
    • INCLUDE_LOCATION

      public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:location".
    • INCLUDE_PART_OF

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:part-of".
    • INCLUDE_PARTICIPANT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:participant".
    • INCLUDE_PATIENT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:patient".
    • INCLUDE_PRACTITIONER

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:practitioner".
    • INCLUDE_PROCEDURE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PROCEDURE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Encounter:procedure".
  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
    • getAllPopulatedChildElementsOfType

      public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType​(Class<T> theType)
      Specified by:
      getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
    • getIdentifier

      Gets the value(s) for identifier (id). creating it if it does not exist. Will not return null.

      Definition:

    • setIdentifier

      public Encounter setIdentifier​(List<IdentifierDt> theValue)
      Sets the value(s) for identifier (id)

      Definition:

    • addIdentifier

      Adds and returns a new value for identifier (id)

      Definition:

    • addIdentifier

      public Encounter addIdentifier​(IdentifierDt theValue)
      Adds a given new value for identifier (id)

      Definition:

      Parameters:
      theValue - The identifier to add (must not be null)
    • getIdentifierFirstRep

      Gets the first repetition for identifier (id), creating it if it does not already exist.

      Definition:

    • getStatusElement

      public ca.uhn.fhir.model.primitive.BoundCodeDt<EncounterStateEnum> getStatusElement()
      Gets the value(s) for status (status). creating it if it does not exist. Will not return null.

      Definition:

    • getStatus

      public String getStatus()
      Gets the value(s) for status (status). creating it if it does not exist. This method may return null.

      Definition:

    • setStatus

      public Encounter setStatus​(ca.uhn.fhir.model.primitive.BoundCodeDt<EncounterStateEnum> theValue)
      Sets the value(s) for status (status)

      Definition:

    • setStatus

      public Encounter setStatus​(EncounterStateEnum theValue)
      Sets the value(s) for status (status)

      Definition:

    • getStatusHistory

      Gets the value(s) for statusHistory (). creating it if it does not exist. Will not return null.

      Definition: The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them

    • setStatusHistory

      Sets the value(s) for statusHistory ()

      Definition: The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them

    • addStatusHistory

      Adds and returns a new value for statusHistory ()

      Definition: The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them

    • addStatusHistory

      Adds a given new value for statusHistory ()

      Definition: The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them

      Parameters:
      theValue - The statusHistory to add (must not be null)
    • getStatusHistoryFirstRep

      Gets the first repetition for statusHistory (), creating it if it does not already exist.

      Definition: The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them

    • getClassElementElement

      public ca.uhn.fhir.model.primitive.BoundCodeDt<EncounterClassEnum> getClassElementElement()
      Gets the value(s) for class (class). creating it if it does not exist. Will not return null.

      Definition:

    • getClassElement

      Gets the value(s) for class (class). creating it if it does not exist. This method may return null.

      Definition:

    • setClassElement

      public Encounter setClassElement​(ca.uhn.fhir.model.primitive.BoundCodeDt<EncounterClassEnum> theValue)
      Sets the value(s) for class (class)

      Definition:

    • setClassElement

      Sets the value(s) for class (class)

      Definition:

    • getType

      Gets the value(s) for type (class). creating it if it does not exist. Will not return null.

      Definition: Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)

    • setType

      public Encounter setType​(List<CodeableConceptDt> theValue)
      Sets the value(s) for type (class)

      Definition: Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)

    • addType

      Adds and returns a new value for type (class)

      Definition: Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)

    • addType

      public Encounter addType​(CodeableConceptDt theValue)
      Adds a given new value for type (class)

      Definition: Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)

      Parameters:
      theValue - The type to add (must not be null)
    • getTypeFirstRep

      Gets the first repetition for type (class), creating it if it does not already exist.

      Definition: Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)

    • getPriority

      Gets the value(s) for priority (grade). creating it if it does not exist. Will not return null.

      Definition:

    • setPriority

      public Encounter setPriority​(CodeableConceptDt theValue)
      Sets the value(s) for priority (grade)

      Definition:

    • getPatient

      Gets the value(s) for patient (who.focus). creating it if it does not exist. Will not return null.

      Definition:

    • setPatient

      Sets the value(s) for patient (who.focus)

      Definition:

    • getEpisodeOfCare

      Gets the value(s) for episodeOfCare (context). creating it if it does not exist. Will not return null.

      Definition: Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)

    • setEpisodeOfCare

      Sets the value(s) for episodeOfCare (context)

      Definition: Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)

    • addEpisodeOfCare

      Adds and returns a new value for episodeOfCare (context)

      Definition: Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)

    • getIncomingReferral

      Gets the value(s) for incomingReferral (). creating it if it does not exist. Will not return null.

      Definition: The referral request this encounter satisfies (incoming referral)

    • setIncomingReferral

      Sets the value(s) for incomingReferral ()

      Definition: The referral request this encounter satisfies (incoming referral)

    • addIncomingReferral

      Adds and returns a new value for incomingReferral ()

      Definition: The referral request this encounter satisfies (incoming referral)

    • getParticipant

      Gets the value(s) for participant (). creating it if it does not exist. Will not return null.

      Definition: The list of people responsible for providing the service

    • setParticipant

      Sets the value(s) for participant ()

      Definition: The list of people responsible for providing the service

    • addParticipant

      Adds and returns a new value for participant ()

      Definition: The list of people responsible for providing the service

    • addParticipant

      Adds a given new value for participant ()

      Definition: The list of people responsible for providing the service

      Parameters:
      theValue - The participant to add (must not be null)
    • getParticipantFirstRep

      Gets the first repetition for participant (), creating it if it does not already exist.

      Definition: The list of people responsible for providing the service

    • getAppointment

      Gets the value(s) for appointment (). creating it if it does not exist. Will not return null.

      Definition:

    • setAppointment

      Sets the value(s) for appointment ()

      Definition:

    • getPeriod

      public PeriodDt getPeriod()
      Gets the value(s) for period (when.done). creating it if it does not exist. Will not return null.

      Definition: The start and end time of the encounter

    • setPeriod

      public Encounter setPeriod​(PeriodDt theValue)
      Sets the value(s) for period (when.done)

      Definition: The start and end time of the encounter

    • getLength

      Gets the value(s) for length (). creating it if it does not exist. Will not return null.

      Definition: Quantity of time the encounter lasted. This excludes the time during leaves of absence.

    • setLength

      public Encounter setLength​(DurationDt theValue)
      Sets the value(s) for length ()

      Definition: Quantity of time the encounter lasted. This excludes the time during leaves of absence.

    • getReason

      Gets the value(s) for reason (why). creating it if it does not exist. Will not return null.

      Definition: Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis

    • setReason

      public Encounter setReason​(List<CodeableConceptDt> theValue)
      Sets the value(s) for reason (why)

      Definition: Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis

    • addReason

      Adds and returns a new value for reason (why)

      Definition: Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis

    • addReason

      public Encounter addReason​(CodeableConceptDt theValue)
      Adds a given new value for reason (why)

      Definition: Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis

      Parameters:
      theValue - The reason to add (must not be null)
    • getReasonFirstRep

      Gets the first repetition for reason (why), creating it if it does not already exist.

      Definition: Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis

    • getIndication

      Gets the value(s) for indication (why). creating it if it does not exist. Will not return null.

      Definition: Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure

    • setIndication

      Sets the value(s) for indication (why)

      Definition: Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure

    • addIndication

      Adds and returns a new value for indication (why)

      Definition: Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure

    • getHospitalization

      Gets the value(s) for hospitalization (). creating it if it does not exist. Will not return null.

      Definition:

    • setHospitalization

      Sets the value(s) for hospitalization ()

      Definition:

    • getLocation

      Gets the value(s) for location (). creating it if it does not exist. Will not return null.

      Definition: List of locations where the patient has been during this encounter

    • setLocation

      Sets the value(s) for location ()

      Definition: List of locations where the patient has been during this encounter

    • addLocation

      Adds and returns a new value for location ()

      Definition: List of locations where the patient has been during this encounter

    • addLocation

      Adds a given new value for location ()

      Definition: List of locations where the patient has been during this encounter

      Parameters:
      theValue - The location to add (must not be null)
    • getLocationFirstRep

      Gets the first repetition for location (), creating it if it does not already exist.

      Definition: List of locations where the patient has been during this encounter

    • getServiceProvider

      Gets the value(s) for serviceProvider (). creating it if it does not exist. Will not return null.

      Definition: An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.

    • setServiceProvider

      Sets the value(s) for serviceProvider ()

      Definition: An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.

    • getPartOf

      Gets the value(s) for partOf (). creating it if it does not exist. Will not return null.

      Definition: Another Encounter of which this encounter is a part of (administratively or in time).

    • setPartOf

      public Encounter setPartOf​(ResourceReferenceDt theValue)
      Sets the value(s) for partOf ()

      Definition: Another Encounter of which this encounter is a part of (administratively or in time).

    • getResourceName

      Specified by:
      getResourceName in interface ca.uhn.fhir.model.api.IResource
    • getStructureFhirVersionEnum

      public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
      Specified by:
      getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
      Specified by:
      getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource