Composition $convert

post/Composition/$convert
Page View

This resource can be used to convert data between Clinical Document Architecture (CDA) and FHIR®. Use the general $convert operation to translate to FHIR®, and use the specific $convert-to-cda for translating to CDA. Learn about translating between FHIR® and CDA.

Supported fields and schema examples

We support any valid FHIR® field. However, we only display fields we’ve defined in our schema, which are usually based on what’s included in the U.S. Core profile. We recommend relying on U.S. Core requirements.

Our schema examples show the shape and possibility of each FHIR® resource; they aren’t code for real-time API calls. We don’t currently recommend copying and pasting these schema examples for your API calls. Consider reviewing FHIR® API actions for realistic examples for particular use cases.

$convert

Translate CDA entries to FHIR®.

The request contains the original CDA data, which is returned as a FHIR® bundle. 

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Composition/$convert' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/fhir+json' \
5
--data '{
6
"resourceType": "Bundle",
7
"id": "RedoxDocumentReferenceConvertBundleExample",
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": "urn:uuid: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/Composition/RedoxDocumentReferenceConvertDocRefExample",
28
"resource": {
29
"resourceType": "DocumentReference",
30
"id": "RedoxDocumentReferenceConvertDocRefExample",
31
"content": [
32
{
33
"attachment": {
34
"contentType": "text/xml",
35
"data": "PC4uLmJhc2UgNjQgZmlsZSBjb250ZW50cy4uLj4="
36
}
37
}
38
],
39
"status": "current",
40
"type": {
41
"text": "Empty File"
42
},
43
"subject": {
44
"reference": "Patient/RedoxPatientExampleTimothy"
45
},
46
"date": "2022-08-04T14:51:23Z"
47
}
48
},
49
{
50
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Patient/RedoxPatientExampleTimothy",
51
"resource": {
52
"resourceType": "Patient",
53
"id": "RedoxPatientExampleTimothy",
54
"meta": {
55
"extension": [
56
{
57
"url": "https://fhir.redoxengine.com/StructureDefinition/example-sort-order",
58
"valueInteger": 1
59
}
60
]
61
},
62
"extension": [
63
{
64
"extension": [
65
{
66
"url": "text",
67
"valueString": "White"
68
}
69
],
70
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"
71
},
72
{
73
"extension": [
74
{
75
"url": "ombCategory",
76
"valueCoding": {
77
"code": "2135-2",
78
"system": "urn:oid:2.16.840.1.113883.6.238",
79
"display": "Hispanic or Latino"
80
}
81
},
82
{
83
"url": "text",
84
"valueString": "Hispanic"
85
}
86
],
87
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"
88
}
89
],
90
"identifier": [
91
{
92
"value": "0000000001",
93
"system": "urn:redox:health-one:MR"
94
},
95
{
96
"value": "101-01-0001",
97
"system": "http://hl7.org/fhir/sid/us-ssn"
98
}
99
],
100
"name": [
101
{
102
"given": [
103
"Timothy",
104
"Paul"
105
],
106
"family": "Bixby",
107
"use": "official"
108
},
109
{
110
"text": "Billy",
111
"use": "usual"
112
}
113
],
114
"gender": "male",
115
"birthDate": "2008-01-06",
116
"telecom": [
117
{
118
"value": "+18088675301",
119
"system": "phone",
120
"use": "home"
121
},
122
{
123
"value": "+18008675309",
124
"system": "phone",
125
"use": "work"
126
},
127
{
128
"value": "timothy.bixby@redoxengine.com",
129
"system": "email"
130
}
131
],
132
"address": [
133
{
134
"line": [
135
"4762 Hickory Street"
136
],
137
"city": "Monroe",
138
"district": "Greene",
139
"state": "WI",
140
"postalCode": "53566",
141
"country": "US",
142
"use": "home"
143
}
144
],
145
"maritalStatus": {
146
"coding": [
147
{
148
"code": "M",
149
"system": "http://hl7.org/fhir/v3/MaritalStatus",
150
"display": "Married"
151
}
152
],
153
"text": "Married"
154
},
155
"communication": [
156
{
157
"language": {
158
"coding": [
159
{
160
"code": "en",
161
"system": "urn:ietf:bcp:47"
162
}
163
],
164
"text": "English"
165
}
166
}
167
],
168
"contact": [
169
{
170
"name": {
171
"given": [
172
"Barbara"
173
],
174
"family": "Bixby"
175
},
176
"telecom": [
177
{
178
"value": "+18088675303",
179
"system": "phone",
180
"use": "home"
181
},
182
{
183
"value": "barbara.bixby@redoxengine.com",
184
"system": "email"
185
}
186
],
187
"address": {
188
"line": [
189
"4762 Hickory St."
190
],
191
"city": "Monroe",
192
"district": "Green",
193
"state": "WI",
194
"postalCode": "53566",
195
"country": "USA"
196
},
197
"relationship": [
198
{
199
"coding": [
200
{
201
"code": "MTH",
202
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
203
"display": "mother"
204
}
205
],
206
"text": "Mother"
207
},
208
{
209
"coding": [
210
{
211
"code": "C",
212
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
213
"display": "Emergency Contact"
214
}
215
],
216
"text": "Emergency Contact"
217
}
218
]
219
}
220
],
221
"generalPractitioner": [
222
{
223
"reference": "Practitioner/RedoxPractitionerExamplePat"
224
}
225
],
226
"managingOrganization": {
227
"reference": "Organization/RedoxOrganizationManagingExample"
228
}
229
}
230
},
231
{
232
"fullUrl": "https://api.redoxengine.com/fhir/R4/redox-fhir-sandbox/Development/Organization/RedoxOrganizationManagingExample",
233
"resource": {
234
"resourceType": "Organization",
235
"id": "RedoxOrganizationManagingExample",
236
"identifier": [
237
{
238
"value": "1234",
239
"system": "urn:oid:1.2.3.4"
240
}
241
],
242
"active": true,
243
"name": "Custodial Org",
244
"address": [
245
{
246
"line": [
247
"123 Main St"
248
],
249
"city": "Madison",
250
"state": "WI"
251
}
252
],
253
"telecom": [
254
{
255
"value": "1-800-123-4567",
256
"system": "phone"
257
}
258
],
259
"type": [
260
{
261
"text": "Test Type"
262
}
263
]
264
}
265
}
266
],
267
"timestamp": "2021-06-17T20:33:22.422Z",
268
"Meta": {
269
"Logs": [
270
{
271
"ID": "d9f5d293-7110-461e-a875-3beb089e79f3",
272
"AttemptID": "925d1617-2fe0-468c-a14c-f8c04b572c54"
273
}
274
],
275
"Test": true,
276
"EventDateTime": "2026-05-08T21:14:54.438Z",
277
"Source": {
278
"ID": "7ce6f387-c33c-417d-8682-81e83628cbd9",
279
"Name": "Redox Dev Tools"
280
},
281
"Destinations": [
282
{
283
"ID": "af394f14-b34a-464f-8d24-895f370af4c9",
284
"Name": "Redox EMR"
285
}
286
],
287
"DataModel": "FHIR.Composition",
288
"EventType": "$convert"
289
}
290
}'

Request Body Schema

    Bundle sent as part of a DocumentReference convert 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, Composition, patient, 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/DocumentReferenceConvert
  • 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"

FHIR® is a registered trademark of Health Level Seven International (HL7) and is used with the permission of HL7. Use of this trademark does not constitute an endorsement of products/services by HL7®.