Class 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 Detail

      • IDENTIFIER

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

        Description:
        Type: token
        Path: Encounter.identifier

      • 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

      • PATIENT

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

        Description:
        Type: reference
        Path: Encounter.patient

      • 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

      • REASON

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

        Description:
        Type: token
        Path: Encounter.reason

      • INDICATION

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

        Description:
        Type: reference
        Path: Encounter.indication

      • CONDITION

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

        Description:
        Type: reference
        Path: Encounter.indication

      • PROCEDURE

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

        Description:
        Type: reference
        Path: Encounter.indication

      • 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

      • 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

      • TYPE

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

        Description:
        Type: token
        Path: Encounter.type

      • 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

      • 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

      • 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

      • 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

      • EPISODEOFCARE

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

        Description:
        Type: reference
        Path: Encounter.episodeOfCare

      • INCOMINGREFERRAL

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

        Description:
        Type: reference
        Path: Encounter.incomingReferral

      • 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".
    • Method Detail

      • 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

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

        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

        public IdentifierDt 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<EncounterStateEnumgetStatusElement()
        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:

      • getStatusHistory

        public List<Encounter.StatusHistorygetStatusHistory()
        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

        public Encounter setStatusHistory​(List<Encounter.StatusHistory> theValue)
        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

        public Encounter.StatusHistory 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

        public Encounter addStatusHistory​(Encounter.StatusHistory theValue)
        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

        public Encounter.StatusHistory 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<EncounterClassEnumgetClassElementElement()
        Gets the value(s) for class (class). creating it if it does not exist. Will not return null.

        Definition:

      • getClassElement

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

        Definition:

      • getType

        public List<CodeableConceptDtgetType()
        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

        public CodeableConceptDt 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

        public CodeableConceptDt 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

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

        Definition:

      • getPatient

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

        Definition:

      • getEpisodeOfCare

        public List<ResourceReferenceDtgetEpisodeOfCare()
        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

        public Encounter setEpisodeOfCare​(List<ResourceReferenceDt> theValue)
        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

        public ResourceReferenceDt 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

        public List<ResourceReferenceDtgetIncomingReferral()
        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)

      • addIncomingReferral

        public ResourceReferenceDt addIncomingReferral()
        Adds and returns a new value for incomingReferral ()

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

      • getParticipant

        public List<Encounter.ParticipantgetParticipant()
        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

      • addParticipant

        public Encounter.Participant addParticipant()
        Adds and returns a new value for participant ()

        Definition: The list of people responsible for providing the service

      • addParticipant

        public Encounter addParticipant​(Encounter.Participant theValue)
        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

        public Encounter.Participant 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

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

        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

        public DurationDt 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

        public List<CodeableConceptDtgetReason()
        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

        public CodeableConceptDt 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

        public CodeableConceptDt 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

        public List<ResourceReferenceDtgetIndication()
        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

        public Encounter setIndication​(List<ResourceReferenceDt> theValue)
        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

        public ResourceReferenceDt 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

      • getLocation

        public List<Encounter.LocationgetLocation()
        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

      • addLocation

        public Encounter.Location addLocation()
        Adds and returns a new value for location ()

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

      • addLocation

        public Encounter addLocation​(Encounter.Location theValue)
        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

        public Encounter.Location 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

        public ResourceReferenceDt 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

        public Encounter setServiceProvider​(ResourceReferenceDt theValue)
        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

        public ResourceReferenceDt 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

        public String 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