Class Encounter

  • 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 Encounter
    extends DomainResource
    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.
    See Also:
    Serialized Form
    • Field Detail

      • type

        protected List<CodeableConcept> type
        Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).
      • patientTarget

        protected Patient patientTarget
        The actual object that is the target of the reference (The patient present at the encounter.)
      • episodeOfCare

        protected List<Reference> episodeOfCare
        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).
      • episodeOfCareTarget

        protected List<EpisodeOfCare> episodeOfCareTarget
        The actual objects that are the target of the reference (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).)
      • incomingReferralTarget

        protected List<ReferralRequest> incomingReferralTarget
        The actual objects that are the target of the reference (The referral request this encounter satisfies (incoming referral).)
      • appointmentTarget

        protected Appointment appointmentTarget
        The actual object that is the target of the reference (The appointment that scheduled this encounter.)
      • period

        protected Period period
        The start and end time of the encounter.
      • length

        protected Duration length
        Quantity of time the encounter lasted. This excludes the time during leaves of absence.
      • reason

        protected List<CodeableConcept> reason
        Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.
      • indication

        protected List<Reference> indication
        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.
      • indicationTarget

        protected List<Resource> indicationTarget
        The actual objects that are the target of the reference (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.)
      • serviceProvider

        protected Reference serviceProvider
        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.
      • serviceProviderTarget

        protected Organization serviceProviderTarget
        The actual object that is the target of the reference (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.)
      • partOf

        protected Reference partOf
        Another Encounter of which this encounter is a part of (administratively or in time).
      • partOfTarget

        protected Encounter partOfTarget
        The actual object that is the target of the reference (Another Encounter of which this encounter is a part of (administratively or in time).)
      • PARTICIPANT_TYPE

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

        Description: Role of participant in encounter
        Type: token
        Path: Encounter.participant.type

      • SP_EPISODEOFCARE

        public static final String SP_EPISODEOFCARE
        Search parameter: episodeofcare

        Description: Episode(s) of care that this encounter should be recorded against
        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: Episode(s) of care that this encounter should be recorded against
        Type: reference
        Path: Encounter.episodeOfCare

      • 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".
      • SP_STATUS

        public static final String SP_STATUS
        Search parameter: status

        Description: planned | arrived | in-progress | onleave | finished | cancelled
        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: planned | arrived | in-progress | onleave | finished | cancelled
        Type: token
        Path: Encounter.status

      • SP_REASON

        public static final String SP_REASON
        Search parameter: reason

        Description: Reason the encounter takes place (code)
        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: Reason the encounter takes place (code)
        Type: token
        Path: Encounter.reason

      • SP_CONDITION

        public static final String SP_CONDITION
        Search parameter: condition

        Description: Reason the encounter takes place (resource)
        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: Reason the encounter takes place (resource)
        Type: reference
        Path: Encounter.indication

      • 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".
      • SP_LOCATION

        public static final String SP_LOCATION
        Search parameter: location

        Description: Location the encounter takes place
        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: Location the encounter takes place
        Type: reference
        Path: Encounter.location.location

      • 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".
      • SP_INDICATION

        public static final String SP_INDICATION
        Search parameter: indication

        Description: Reason the encounter takes place (resource)
        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: Reason the encounter takes place (resource)
        Type: reference
        Path: Encounter.indication

      • 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".
      • SP_TYPE

        public static final String SP_TYPE
        Search parameter: type

        Description: Specific type of encounter
        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: Specific type of encounter
        Type: token
        Path: Encounter.type

      • SP_DATE

        public static final String SP_DATE
        Search parameter: 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_SPECIAL_ARRANGEMENT

        public static final String SP_SPECIAL_ARRANGEMENT
        Search parameter: special-arrangement

        Description: Wheelchair, translator, stretcher, etc.
        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: Wheelchair, translator, stretcher, etc.
        Type: token
        Path: Encounter.hospitalization.specialArrangement

      • SP_PART_OF

        public static final String SP_PART_OF
        Search parameter: part-of

        Description: Another Encounter this encounter is part of
        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: Another Encounter this encounter is part of
        Type: reference
        Path: Encounter.partOf

      • 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".
      • SP_APPOINTMENT

        public static final String SP_APPOINTMENT
        Search parameter: appointment

        Description: The appointment that scheduled this encounter
        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: The appointment that scheduled this encounter
        Type: reference
        Path: Encounter.appointment

      • 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".
      • SP_PATIENT

        public static final String SP_PATIENT
        Search parameter: patient

        Description: The patient present at the encounter
        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: The patient present at the encounter
        Type: reference
        Path: Encounter.patient

      • 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".
      • SP_PRACTITIONER

        public static final String SP_PRACTITIONER
        Search parameter: practitioner

        Description: Persons involved in the encounter other than the patient
        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: Persons involved in the encounter other than the patient
        Type: reference
        Path: Encounter.participant.individual

      • 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".
      • SP_LENGTH

        public static final String SP_LENGTH
        Search parameter: 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_PARTICIPANT

        public static final String SP_PARTICIPANT
        Search parameter: participant

        Description: Persons involved in the encounter other than the patient
        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: Persons involved in the encounter other than the patient
        Type: reference
        Path: Encounter.participant.individual

      • 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".
      • SP_INCOMINGREFERRAL

        public static final String SP_INCOMINGREFERRAL
        Search parameter: incomingreferral

        Description: The ReferralRequest that initiated this encounter
        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: The ReferralRequest that initiated this encounter
        Type: reference
        Path: Encounter.incomingReferral

      • 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".
      • SP_IDENTIFIER

        public static final String SP_IDENTIFIER
        Search parameter: identifier

        Description: Identifier(s) by which this encounter is known
        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: Identifier(s) by which this encounter is known
        Type: token
        Path: Encounter.identifier

      • SP_PROCEDURE

        public static final String SP_PROCEDURE
        Search parameter: procedure

        Description: Reason the encounter takes place (resource)
        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: Reason the encounter takes place (resource)
        Type: reference
        Path: Encounter.indication

      • 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".
      • SP_LOCATION_PERIOD

        public static final String SP_LOCATION_PERIOD
        Search parameter: location-period

        Description: Time period during which the patient was present at the location
        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: Time period during which the patient was present at the location
        Type: date
        Path: Encounter.location.period

    • Method Detail

      • getStatusElement

        public Enumeration<Encounter.EncounterStategetStatusElement()
        Returns:
        status (planned | arrived | in-progress | onleave | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
      • getType

        public List<CodeableConceptgetType()
        Returns:
        type (Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).)
      • hasType

        public boolean hasType()
      • addType

        public CodeableConcept addType()
        Returns:
        type (Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).)
      • getPatientTarget

        public Patient getPatientTarget()
        Returns:
        patient 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 present at the encounter.)
      • setPatientTarget

        public Encounter setPatientTarget​(Patient value)
        Parameters:
        value - patient 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 present at the encounter.)
      • getEpisodeOfCare

        public List<ReferencegetEpisodeOfCare()
        Returns:
        episodeOfCare (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

        public Reference addEpisodeOfCare()
        Returns:
        episodeOfCare (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).)
      • getEpisodeOfCareTarget

        public List<EpisodeOfCaregetEpisodeOfCareTarget()
        Returns:
        episodeOfCare (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. 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).)
      • addEpisodeOfCareTarget

        public EpisodeOfCare addEpisodeOfCareTarget()
        Returns:
        episodeOfCare (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. 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).)
      • getIncomingReferralTarget

        public List<ReferralRequestgetIncomingReferralTarget()
        Returns:
        incomingReferral (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. The referral request this encounter satisfies (incoming referral).)
      • addIncomingReferralTarget

        public ReferralRequest addIncomingReferralTarget()
        Returns:
        incomingReferral (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The referral request this encounter satisfies (incoming referral).)
      • getAppointmentTarget

        public Appointment getAppointmentTarget()
        Returns:
        appointment 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 appointment that scheduled this encounter.)
      • setAppointmentTarget

        public Encounter setAppointmentTarget​(Appointment value)
        Parameters:
        value - appointment 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 appointment that scheduled this encounter.)
      • getLength

        public Duration getLength()
        Returns:
        length (Quantity of time the encounter lasted. This excludes the time during leaves of absence.)
      • setLength

        public Encounter setLength​(Duration value)
        Parameters:
        value - length (Quantity of time the encounter lasted. This excludes the time during leaves of absence.)
      • getReason

        public List<CodeableConceptgetReason()
        Returns:
        reason (Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.)
      • addReason

        public CodeableConcept addReason()
        Returns:
        reason (Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.)
      • getIndication

        public List<ReferencegetIndication()
        Returns:
        indication (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

        public Reference addIndication()
        Returns:
        indication (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.)
      • getIndicationTarget

        public List<ResourcegetIndicationTarget()
        Returns:
        indication (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. 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.)
      • getServiceProvider

        public Reference getServiceProvider()
        Returns:
        serviceProvider (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

        public Encounter setServiceProvider​(Reference value)
        Parameters:
        value - serviceProvider (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.)
      • getServiceProviderTarget

        public Organization getServiceProviderTarget()
        Returns:
        serviceProvider 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. (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.)
      • setServiceProviderTarget

        public Encounter setServiceProviderTarget​(Organization value)
        Parameters:
        value - serviceProvider 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. (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

        public Reference getPartOf()
        Returns:
        partOf (Another Encounter of which this encounter is a part of (administratively or in time).)
      • setPartOf

        public Encounter setPartOf​(Reference value)
        Parameters:
        value - partOf (Another Encounter of which this encounter is a part of (administratively or in time).)
      • getPartOfTarget

        public Encounter getPartOfTarget()
        Returns:
        partOf 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. (Another Encounter of which this encounter is a part of (administratively or in time).)
      • setPartOfTarget

        public Encounter setPartOfTarget​(Encounter value)
        Parameters:
        value - partOf 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. (Another Encounter of which this encounter is a part of (administratively or in time).)
      • getProperty

        public Base[] getProperty​(int hash,
                                  String name,
                                  boolean checkValid)
                           throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        getProperty in class DomainResource
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • makeProperty

        public Base makeProperty​(int hash,
                                 String name)
                          throws org.hl7.fhir.exceptions.FHIRException
        Description copied from class: Base
        make an instance of a property. If the property is a repeating property, make a new instance. if the property is not repeating, return the property
        Overrides:
        makeProperty in class DomainResource
        Returns:
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • isEmpty

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