Encounter $write

post/Encounter/$write
Page View

This resource contains details and outcomes for a patient encounter, which can include one or more providers, locations, and services. Encounters can encompass preadmission, outpatient visits, telehealth visits, inpatient stays, and discharges, depending on the organization and context for the encounter. Encounters can contain references to procedures if a procedure was completed during a patient visit or if a follow-up procedure is scheduled as a result of the encounter. 

You can receive or retrieve encounter details.

Request parameters and payload

cURL request example

1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Encounter/$write' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/fhir+json' \
5
--data '{
6
"resourceType": "Bundle",
7
"id": "RedoxEncounterMessageBundleExample",
8
"type": "message",
9
"timestamp": "2021-12-17T20:33:22.422Z",
10
"entry": [
11
{
12
"resource": {
13
"resourceType": "MessageHeader",
14
"id": "RedoxMessageHeaderExample",
15
"source": {
16
"name": "Good Health Clinics",
17
"endpoint": "05107c08-fe2f-4740-8c1d-c7107d18ebe5"
18
},
19
"eventCoding": {
20
"system": "urn:redox:event-type",
21
"code": "Encounter-New"
22
}
23
}
24
},
25
{
26
"resource": {
27
"resourceType": "Encounter",
28
"id": "RedoxEncounterExample",
29
"identifier": [
30
{
31
"system": "urn:oid:1.2.840.114350.1.13.12345.1.7.2.698084.11",
32
"value": "9601346482"
33
}
34
],
35
"status": "finished",
36
"class": {
37
"code": "IMP",
38
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
39
"display": "inpatient encounter"
40
},
41
"type": [
42
{
43
"coding": [
44
{
45
"code": "99222",
46
"system": "http://www.ama-assn.org/go/cpt",
47
"display": "InPatient Admission"
48
}
49
]
50
}
51
],
52
"diagnosis": [
53
{
54
"condition": {
55
"reference": "Condition/RedoxConditionExampleEncounterDx"
56
}
57
}
58
],
59
"participant": [
60
{
61
"individual": {
62
"reference": "Practitioner/RedoxPractitionerExampleEncounter"
63
}
64
}
65
],
66
"location": [
67
{
68
"location": {
69
"reference": "Location/RedoxLocationExampleEncounter"
70
}
71
}
72
],
73
"subject": {
74
"reference": "Patient/RedoxPatientExampleTimothy"
75
},
76
"period": {
77
"start": "2022-02-06T04:00:00.000Z",
78
"end": "2022-02-06T04:15:00.000Z"
79
},
80
"length": {
81
"value": 16,
82
"code": "m",
83
"system": "http://unitsofmeasure.org"
84
},
85
"reasonCode": [
86
{
87
"coding": [
88
{
89
"code": "23360407",
90
"system": "http://snomed.info/sct"
91
}
92
],
93
"text": "Pneumonia"
94
}
95
]
96
},
97
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Encounter?identifier=zzz123Encounter|urn:redox:encounterId"
98
},
99
{
100
"resource": {
101
"resourceType": "Patient",
102
"id": "RedoxPatientExampleTimothy",
103
"meta": {
104
"extension": [
105
{
106
"url": "https://fhir.redoxengine.com/StructureDefinition/example-sort-order",
107
"valueInteger": 1
108
}
109
]
110
},
111
"extension": [
112
{
113
"extension": [
114
{
115
"url": "text",
116
"valueString": "White"
117
}
118
],
119
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"
120
},
121
{
122
"extension": [
123
{
124
"url": "ombCategory",
125
"valueCoding": {
126
"code": "2135-2",
127
"system": "urn:oid:2.16.840.1.113883.6.238",
128
"display": "Hispanic or Latino"
129
}
130
},
131
{
132
"url": "text",
133
"valueString": "Hispanic"
134
}
135
],
136
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"
137
}
138
],
139
"identifier": [
140
{
141
"value": "0000000001",
142
"system": "urn:redox:health-one:MR"
143
},
144
{
145
"value": "101-01-0001",
146
"system": "http://hl7.org/fhir/sid/us-ssn"
147
}
148
],
149
"name": [
150
{
151
"given": [
152
"Timothy",
153
"Paul"
154
],
155
"family": "Bixby",
156
"use": "official"
157
},
158
{
159
"text": "Billy",
160
"use": "usual"
161
}
162
],
163
"gender": "male",
164
"birthDate": "2008-01-06",
165
"telecom": [
166
{
167
"value": "+18088675301",
168
"system": "phone",
169
"use": "home"
170
},
171
{
172
"value": "+18008675309",
173
"system": "phone",
174
"use": "work"
175
},
176
{
177
"value": "timothy.bixby@redoxengine.com",
178
"system": "email"
179
}
180
],
181
"address": [
182
{
183
"line": [
184
"4762 Hickory Street"
185
],
186
"city": "Monroe",
187
"district": "Greene",
188
"state": "WI",
189
"postalCode": "53566",
190
"country": "US",
191
"use": "home"
192
}
193
],
194
"maritalStatus": {
195
"coding": [
196
{
197
"code": "M",
198
"system": "http://hl7.org/fhir/v3/MaritalStatus",
199
"display": "Married"
200
}
201
],
202
"text": "Married"
203
},
204
"communication": [
205
{
206
"language": {
207
"coding": [
208
{
209
"code": "en",
210
"system": "urn:ietf:bcp:47"
211
}
212
],
213
"text": "English"
214
}
215
}
216
],
217
"contact": [
218
{
219
"name": {
220
"given": [
221
"Barbara"
222
],
223
"family": "Bixby"
224
},
225
"telecom": [
226
{
227
"value": "+18088675303",
228
"system": "phone",
229
"use": "home"
230
},
231
{
232
"value": "barbara.bixby@redoxengine.com",
233
"system": "email"
234
}
235
],
236
"address": {
237
"line": [
238
"4762 Hickory St."
239
],
240
"city": "Monroe",
241
"district": "Green",
242
"state": "WI",
243
"postalCode": "53566",
244
"country": "USA"
245
},
246
"relationship": [
247
{
248
"coding": [
249
{
250
"code": "MTH",
251
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
252
"display": "mother"
253
}
254
],
255
"text": "Mother"
256
},
257
{
258
"coding": [
259
{
260
"code": "C",
261
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
262
"display": "Emergency Contact"
263
}
264
],
265
"text": "Emergency Contact"
266
}
267
]
268
}
269
],
270
"generalPractitioner": [
271
{
272
"reference": "Practitioner/RedoxPractitionerExamplePat"
273
}
274
],
275
"managingOrganization": {
276
"reference": "Organization/RedoxOrganizationManagingExample"
277
}
278
},
279
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Patient?identifier=0000000001|urn:redox:MRN"
280
}
281
]
282
}'

Request Body Schema

  • resourceType
    required, string

    Identifies the type of the resource

    Value: Bundle
  • type
    required, string

    Identifies this bundle as a message

    Value: message
  • entry
    required, Array of MessageHeader, Encounter, Patient or Other

    An array of FHIR resources. At a minimum, an Encounter should include the following entries:

    • Patient - the patient
    • Encounter - the encounter related to the patient

      An entry in the bundle containing a FHIR resource

    • resource
      required, object

      Additional metadata about the message including the event

      • resourceType
        required, string

        Identifies the type of the resource

        Value: MessageHeader
      • source
        required, object

        Information about the sender of the message. This will typically be populated by Redox.

        • endpoint
          required, string

          Identifies the routing target to send acknowledgements to.

        • name
          string

          Human-readable name for the source system.

      • eventCoding
        required, object

        This describes the message being communicated

        • 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).

          Value: Encounter-New
  • timestamp
    string

    The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.

Response fields and example

Example

1
"Operation Response"