DocumentReference $documentreference-create

post/DocumentReference/$documentreference-create
Page View

This resource contains metadata for any kind of document so that you can locate the document in a system. Typically, you may use this as a reference in another resource type that includes the subject, author, and context for a related document.

You may want to use this resource if:

  • You want raw XML data.
  • You want to pick which documents to view or retrieve.

If you’re familiar with our Redox data models, this is the FHIR® representation of the ClinicalSummary.DocumentGet. Learn more about the DocumentGet event type. Or, if you only want to retrieve the patient’s latest CDA, check out the PatientQuery event type.

You can review, retrieve, create, or edit document records.

$documentreference-create

Create a new document record in your connection's system.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/DocumentReference/$documentreference-create' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/fhir+json' \
5
--data '{
6
"resourceType": "Bundle",
7
"id": "RedoxDocumentReferenceCreateBundleExample",
8
"type": "message",
9
"entry": [
10
{
11
"resource": {
12
"eventUri": "https://fhir.redoxengine.com/EventDefinition/DocumentReferenceCreate",
13
"resourceType": "MessageHeader",
14
"id": "RedoxDocumentReferenceCreateMessageHeaderExample",
15
"source": {
16
"name": "Good Health Clinics",
17
"endpoint": "05107c08-fe2f-4740-8c1d-c7107d18ebe5"
18
},
19
"focus": [
20
{
21
"reference": "DocumentReference/RedoxDocumentReferenceCreateDocRefExample"
22
}
23
]
24
}
25
},
26
{
27
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/DocumentReference/RedoxDocumentReferenceCreateDocRefExample",
28
"resource": {
29
"resourceType": "DocumentReference",
30
"id": "RedoxDocumentReferenceCreateDocRefExample",
31
"status": "current",
32
"type": {
33
"text": "Empty File"
34
},
35
"category": [
36
{
37
"coding": [
38
{
39
"system": "urn:redox:document_kind",
40
"code": "Media"
41
}
42
]
43
}
44
],
45
"subject": {
46
"reference": "Patient/RedoxPatientExampleTimothy"
47
},
48
"date": "2022-08-04T14:51:23Z",
49
"context": {
50
"encounter": [
51
{
52
"reference": "Encounter/RedoxEncounterExample"
53
}
54
]
55
},
56
"content": [
57
{
58
"attachment": {
59
"contentType": "application/pdf",
60
"title": "SamplePDF-Order Specific Media",
61
"data": "PC4uLmJhc2UgNjQgZmlsZSBjb250ZW50cy4uLj4="
62
}
63
}
64
]
65
}
66
},
67
{
68
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Patient/RedoxPatientExampleTimothy",
69
"resource": {
70
"resourceType": "Patient",
71
"id": "RedoxPatientExampleTimothy",
72
"meta": {
73
"extension": [
74
{
75
"url": "https://fhir.redoxengine.com/StructureDefinition/example-sort-order",
76
"valueInteger": 1
77
}
78
]
79
},
80
"extension": [
81
{
82
"extension": [
83
{
84
"url": "text",
85
"valueString": "White"
86
}
87
],
88
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"
89
},
90
{
91
"extension": [
92
{
93
"url": "ombCategory",
94
"valueCoding": {
95
"code": "2135-2",
96
"system": "urn:oid:2.16.840.1.113883.6.238",
97
"display": "Hispanic or Latino"
98
}
99
},
100
{
101
"url": "text",
102
"valueString": "Hispanic"
103
}
104
],
105
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"
106
}
107
],
108
"identifier": [
109
{
110
"value": "0000000001",
111
"system": "urn:redox:health-one:MR"
112
},
113
{
114
"value": "101-01-0001",
115
"system": "http://hl7.org/fhir/sid/us-ssn"
116
}
117
],
118
"name": [
119
{
120
"given": [
121
"Timothy",
122
"Paul"
123
],
124
"family": "Bixby",
125
"use": "official"
126
},
127
{
128
"text": "Billy",
129
"use": "usual"
130
}
131
],
132
"gender": "male",
133
"birthDate": "2008-01-06",
134
"telecom": [
135
{
136
"value": "+18088675301",
137
"system": "phone",
138
"use": "home"
139
},
140
{
141
"value": "+18008675309",
142
"system": "phone",
143
"use": "work"
144
},
145
{
146
"value": "timothy.bixby@redoxengine.com",
147
"system": "email"
148
}
149
],
150
"address": [
151
{
152
"line": [
153
"4762 Hickory Street"
154
],
155
"city": "Monroe",
156
"district": "Greene",
157
"state": "WI",
158
"postalCode": "53566",
159
"country": "US",
160
"use": "home"
161
}
162
],
163
"maritalStatus": {
164
"coding": [
165
{
166
"code": "M",
167
"system": "http://hl7.org/fhir/v3/MaritalStatus",
168
"display": "Married"
169
}
170
],
171
"text": "Married"
172
},
173
"communication": [
174
{
175
"language": {
176
"coding": [
177
{
178
"code": "en",
179
"system": "urn:ietf:bcp:47"
180
}
181
],
182
"text": "English"
183
}
184
}
185
],
186
"contact": [
187
{
188
"name": {
189
"given": [
190
"Barbara"
191
],
192
"family": "Bixby"
193
},
194
"telecom": [
195
{
196
"value": "+18088675303",
197
"system": "phone",
198
"use": "home"
199
},
200
{
201
"value": "barbara.bixby@redoxengine.com",
202
"system": "email"
203
}
204
],
205
"address": {
206
"line": [
207
"4762 Hickory St."
208
],
209
"city": "Monroe",
210
"district": "Green",
211
"state": "WI",
212
"postalCode": "53566",
213
"country": "USA"
214
},
215
"relationship": [
216
{
217
"coding": [
218
{
219
"code": "MTH",
220
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
221
"display": "mother"
222
}
223
],
224
"text": "Mother"
225
},
226
{
227
"coding": [
228
{
229
"code": "C",
230
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
231
"display": "Emergency Contact"
232
}
233
],
234
"text": "Emergency Contact"
235
}
236
]
237
}
238
],
239
"generalPractitioner": [
240
{
241
"reference": "Practitioner/RedoxPractitionerExamplePat"
242
}
243
],
244
"managingOrganization": {
245
"reference": "Organization/RedoxOrganizationManagingExample"
246
}
247
}
248
},
249
{
250
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Encounter/RedoxEncounterExample",
251
"resource": {
252
"resourceType": "Encounter",
253
"id": "RedoxEncounterExample",
254
"identifier": [
255
{
256
"system": "urn:oid:1.2.840.114350.1.13.12345.1.7.2.698084.11",
257
"value": "9601346482"
258
}
259
],
260
"status": "finished",
261
"class": {
262
"code": "IMP",
263
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
264
"display": "inpatient encounter"
265
},
266
"type": [
267
{
268
"coding": [
269
{
270
"code": "99222",
271
"system": "http://www.ama-assn.org/go/cpt",
272
"display": "InPatient Admission"
273
}
274
]
275
}
276
],
277
"diagnosis": [
278
{
279
"condition": {
280
"reference": "Condition/RedoxConditionExampleEncounterDx"
281
}
282
}
283
],
284
"participant": [
285
{
286
"individual": {
287
"reference": "Practitioner/RedoxPractitionerExampleEncounter"
288
}
289
}
290
],
291
"location": [
292
{
293
"location": {
294
"reference": "Location/RedoxLocationExampleEncounter"
295
}
296
}
297
],
298
"subject": {
299
"reference": "Patient/RedoxPatientExampleTimothy"
300
},
301
"period": {
302
"start": "2022-02-06T04:00:00.000Z",
303
"end": "2022-02-06T04:15:00.000Z"
304
},
305
"length": {
306
"value": 16,
307
"code": "m",
308
"system": "http://unitsofmeasure.org"
309
},
310
"reasonCode": [
311
{
312
"coding": [
313
{
314
"code": "23360407",
315
"system": "http://snomed.info/sct"
316
}
317
],
318
"text": "Pneumonia"
319
}
320
]
321
}
322
},
323
{
324
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Organization/RedoxOrganizationManagingExample",
325
"resource": {
326
"resourceType": "Organization",
327
"id": "RedoxOrganizationManagingExample",
328
"identifier": [
329
{
330
"value": "1234",
331
"system": "urn:oid:1.2.3.4"
332
}
333
],
334
"active": true,
335
"name": "Custodial Org",
336
"address": [
337
{
338
"line": [
339
"123 Main St"
340
],
341
"city": "Madison",
342
"state": "WI"
343
}
344
],
345
"telecom": [
346
{
347
"value": "1-800-123-4567",
348
"system": "phone"
349
}
350
],
351
"type": [
352
{
353
"text": "Test Type"
354
}
355
]
356
}
357
}
358
],
359
"timestamp": "2021-06-17T20:33:22.422Z"
360
}'

Request Body Schema

    Bundle sent as part of a DocumentReference-create message

  • 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, documentReference, patient, encounter, organization or Other

    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 and the Bundle content.

        • endpoint
          required, string

          Identifies the routing target to send acknowledgements to.

        • name
          string

          Human-readable name for the source system.

      • focus
        required, Array of object

        This describes the focal target resource of the message from which the remainder of the content is referenced from

        Must be a resource of type DocumentReference.

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

      • eventUri
        required, string

        This describes the message being communicated

        Value: https://fhir.redoxengine.com/EventDefinition/DocumentReferenceCreate
  • 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
json
1
"Operation Response"