Encounter _search

post/Encounter/_search
Page View

This resource contains details and outcomes for a patient encounter, which can include one or more providers, locations, and services.

Encounters may encompass preadmission, outpatient visits, telehealth visits, inpatient stays, and discharges, depending on the organization and context for the encounter.

Encounters may contain references to procedures if:

  • A procedure was completed during a patient visit.
  • A follow-up procedure is scheduled as a result of the encounter.

You can review, retrieve, save, or cancel encounter details.

_search

Query for details about a patient visit.

This is a flexible option with query parameters to refine your search. The response returns a bundle of resources, known as a searchset bundle type. Learn about bundles and bundle types in our FHIR® glossary.

Request parameters and payload

When querying for this resource, one of the following sets of parameters must always be sent. Additional parameters may be sent at any time.
  • _id
  • date
  • status
  • identifier
  • patient

cURL request example

bash
1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Encounter/_search' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/x-www-form-urlencoded' \
5
--data-urlencode '_include=string' \
6
--data-urlencode 'identifier=string' \
7
--data-urlencode 'date=string' \
8
--data-urlencode 'practitioner=string' \
9
--data-urlencode 'practitioner.identifier=string' \
10
--data-urlencode 'patient=string' \
11
--data-urlencode 'patient.identifier=string' \
12
--data-urlencode 'location=string' \
13
--data-urlencode 'location.name=string' \
14
--data-urlencode 'location.name-physical-type=string' \
15
--data-urlencode 'destination=string' \
16
--data-urlencode 'status=string' \
17
--data-urlencode 'class-display=string'

Request Body Schema

  • identifier
    Array of string

    Identifier(s) by which this encounter is known

  • date
    Array of string

    A date within the period the Encounter lasted

  • practitioner
    Array of string

    Persons involved in the encounter other than the patient

  • practitioner.identifier
    Array of string

    One or more external identifiers for the practitioner

  • patient
    Array of string

    The patient or group present at the encounter

  • patient.identifier
    Array of string

    One or more external identifiers for the patient

  • location
    Array of string

    Location the encounter takes place

  • location.name
    Array of string

    The location's name.

  • location.name-physical-type
    Array of string

    Specify both name and physical-type at once. This is a Redox-specific parameter.

  • destination
    Array of string

    Location to which the patient is discharged

  • status
    Array of string

    The encounter's status

  • class-display
    Array of string

    The encounter's class; inpatient | outpatient | ambulatory | emergency +

  • _include
    Array of string

    Set to Encounter:location and Location:partof to include all location information associated with encounters.

    Additionally, Encounter:patient and Encounter:practitioner can be included to return patient and practitioners resources within the same search result bundle. If omitted, these resources can also be retrieved individually at a later time.

Response fields and example

Example payload generated from schema
1
{
2
"resourceType": "Bundle",
3
"type": "searchset",
4
"total": 1,
5
"entry": [
6
{
7
"resource": {
8
"resourceType": "Encounter",
9
"id": "RedoxEncounterExample",
10
"identifier": [
11
{
12
"system": "urn:oid:1.2.840.114350.1.13.12345.1.7.2.698084.11",
13
"value": "9601346482"
14
}
15
],
16
"status": "finished",
17
"class": {
18
"code": "IMP",
19
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
20
"display": "inpatient encounter"
21
},
22
"type": [
23
{
24
"coding": [
25
{
26
"code": "99222",
27
"system": "http://www.ama-assn.org/go/cpt",
28
"display": "InPatient Admission"
29
}
30
]
31
}
32
],
33
"diagnosis": [
34
{
35
"condition": {
36
"reference": "Condition/RedoxConditionExampleEncounterDx"
37
}
38
}
39
],
40
"participant": [
41
{
42
"individual": {
43
"reference": "Practitioner/RedoxPractitionerExampleEncounter"
44
}
45
}
46
],
47
"location": [
48
{
49
"location": {
50
"reference": "Location/RedoxLocationExampleEncounter"
51
}
52
}
53
],
54
"subject": {
55
"reference": "Patient/RedoxPatientExampleTimothy"
56
},
57
"period": {
58
"start": "2022-02-06T04:00:00.000Z",
59
"end": "2022-02-06T04:15:00.000Z"
60
},
61
"length": {
62
"value": 16,
63
"code": "m",
64
"system": "http://unitsofmeasure.org"
65
},
66
"reasonCode": [
67
{
68
"coding": [
69
{
70
"code": "23360407",
71
"system": "http://snomed.info/sct"
72
}
73
],
74
"text": "Pneumonia"
75
}
76
]
77
},
78
"search": {
79
"mode": "match"
80
}
81
}
82
]
83
}

    Response to an Encounter search operation containing encounter resources

  • resourceType
    required, string

    Identifies the type of the resource

    Value: Bundle
  • type
    required, string

    Identifies this bundle as a response to a search

    Value: searchset
  • total
    required, number

    The total number of matches

  • entry
    Array of Encounter, Location, Practitioner, Patient or Other

    A resource matching the search criteria or related to a matching resource

    • resource
      required, object

      Information about an interaction between a patient and healthcare provider

        A profile on the encounter resource that conforms to Redox requirements.

      • resourceType
        required, string

        Identifies the type of the resource

        Value: Encounter
      • status
        required, string

        Current status of the encounter.

        Possible Values: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, unknown
      • class
        required, object

        Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.

        • extension
          Array of OriginalText or Other

          May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

            A human language representation of the concept (resource/element) as seen/selected/uttered by the user who entered the data and/or which represents the full intended meaning of the user.

            See http://hl7.org/fhir/StructureDefinition/originalText for more information

          • url
            required, string

            Source of the definition for the extension code - a logical name or a URL.

            Value: http://hl7.org/fhir/StructureDefinition/originalText
          • valueString
            required, string

            The original text

        • system
          string

          The identification of the code system that defines the meaning of the symbol in the code.

        • code
          string

          A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

      • type
        required, Array of object

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

        • coding
          Array of object

          A reference to a code defined by a terminology system.

          • system
            string

            The identification of the code system that defines the meaning of the symbol in the code.

          • code
            string

            A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

        • text
          string

          A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

      • subject
        required, object

        The patient or group present at the encounter.

        Must be a resource of type Patient.

        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • id
        string

        The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

      • extension
        Array of Boolean, String, CodeableConcept, Coding, HumanName or Reference

        May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        • url
          required, string

          Source of the definition for the extension code - a logical name or a URL.

        • valueBoolean
          boolean

          A single value for the extension.

      • identifier
        Array of object

        Identifier(s) by which this encounter is known.

        • system
          required, string

          Establishes the namespace for the value - that is, a URL that describes a set values that are unique.

        • value
          required, string

          The portion of the identifier typically relevant to the user and which is unique within the context of the system.

        • extension
          Array of Boolean, String, CodeableConcept, Coding, HumanName or Reference

          May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

          • url
            required, string

            Source of the definition for the extension code - a logical name or a URL.

          • valueBoolean
            boolean

            A single value for the extension.

        • use
          string

          The purpose of this identifier.

          Possible Values: usual, official, temp, secondary, old (If known)
      • participant
        Array of object

        The list of people responsible for providing the service.

        • type
          Array of object

          Role of the participant in encounter eg, ATND=AttendingProvider, CON=ConsultingProvider, REF=ReferringProvider, PART=VisitProvider

          • coding
            Array of object

            A reference to a code defined by a terminology system.

            • system
              string

              The identification of the code system that defines the meaning of the symbol in the code.

            • code
              string

              A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

          • text
            string

            A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

        • period
          object

          The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.

          • start
            string

            The start of the period. The boundary is inclusive.

          • end
            string

            The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.

        • individual
          object

          Persons involved in the encounter other than the patient.

          Must reference one of the following types of resources:

          • Practitioner
          • PractitionerRole
          • RelatedPerson
          • reference
            string

            A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • period
        object

        The start and end time of the encounter.

        • start
          string

          The start of the period. The boundary is inclusive.

        • end
          string

          The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.

      • length
        object

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

        • value
          number

          The value of the measured amount. The value includes an implicit precision in the presentation of the value.

        • system
          string

          The identification of the system that provides the coded form of the unit.

        • code
          string

          A computer processable form of the unit in some unit representation system.

      • reasonCode
        Array of object

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

        • extension
          Array of OriginalText or Other

          May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

            A human language representation of the concept (resource/element) as seen/selected/uttered by the user who entered the data and/or which represents the full intended meaning of the user.

            See http://hl7.org/fhir/StructureDefinition/originalText for more information

          • url
            required, string

            Source of the definition for the extension code - a logical name or a URL.

            Value: http://hl7.org/fhir/StructureDefinition/originalText
          • valueString
            required, string

            The original text

        • text
          string

          A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

      • diagnosis
        Array of object

        The list of diagnosis relevant to this encounter.

        • condition
          required, object

          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.

          Must be a resource of type Condition.

          • reference
            string

            A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • account
        Array of object

        The set of accounts that may be used for billing for this Encounter.

        Must be a resource of type Account.

        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • hospitalization
        object

        Details about the admission to a healthcare service.

        • destination
          object

          Location/organization to which the patient is discharged.

          Must reference one of the following types of resources:

          • Location
          • Organization
          • reference
            string

            A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

        • dischargeDisposition
          object

          Category or kind of location after discharge.

          • coding
            Array of object

            A reference to a code defined by a terminology system.

            • system
              string

              The identification of the code system that defines the meaning of the symbol in the code.

            • code
              string

              A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

          • text
            string

            A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

      • location
        Array of object

        List of locations where the patient has been during this encounter.

        • location
          required, object

          The location where the encounter takes place.

          Must be a resource of type Location.

          • reference
            string

            A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

        • status
          string

          The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.

          Possible Values: planned, active, reserved, completed
    • search
      required, object

      Information about the search process that lead to the creation of this entry.

      • mode
        required, string

        Identifies the Encounter as matching the search parameters

        Value: match