Patient $write

post/Patient/$write
Page View

This resource establishes demographics and identifiers for an individual visiting or receiving treatment from a healthcare organization. A patient record serves as the most common base for data being exchanged since it establishes the “who” behind the data. 

You can receive, retrieve, save, or match patient records. 

$write

This operation allows you to save patient details, whether administrative or characteristic, to create or update a patient record in the EHR system.

Request parameters and payload

cURL request example

1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Patient/$write' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/fhir+json' \
5
--data '{
6
"resourceType": "Bundle",
7
"id": "RedoxPatientAdminExampleTimothy",
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": "PatientAdmin-NewPatient"
22
}
23
}
24
},
25
{
26
"resource": {
27
"resourceType": "Patient",
28
"id": "RedoxPatientExampleTimothyWrite",
29
"extension": [
30
{
31
"extension": [
32
{
33
"url": "text",
34
"valueString": "White"
35
}
36
],
37
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"
38
},
39
{
40
"extension": [
41
{
42
"url": "ombCategory",
43
"valueCoding": {
44
"code": "2135-2",
45
"system": "urn:oid:2.16.840.1.113883.6.238",
46
"display": "Hispanic or Latino"
47
}
48
},
49
{
50
"url": "text",
51
"valueString": "Hispanic"
52
}
53
],
54
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"
55
}
56
],
57
"name": [
58
{
59
"given": [
60
"Timothy",
61
"Paul"
62
],
63
"family": "Bixby",
64
"use": "official"
65
},
66
{
67
"text": "Billy",
68
"use": "usual"
69
}
70
],
71
"gender": "male",
72
"birthDate": "2008-01-06",
73
"telecom": [
74
{
75
"value": "+18088675301",
76
"system": "phone",
77
"use": "home"
78
},
79
{
80
"value": "+18008675309",
81
"system": "phone",
82
"use": "work"
83
},
84
{
85
"value": "timothy.bixby@redoxengine.com",
86
"system": "email"
87
}
88
],
89
"address": [
90
{
91
"line": [
92
"4762 Hickory Street"
93
],
94
"city": "Monroe",
95
"district": "Greene",
96
"state": "WI",
97
"postalCode": "53566",
98
"country": "US",
99
"use": "home"
100
}
101
],
102
"maritalStatus": {
103
"coding": [
104
{
105
"code": "M",
106
"system": "http://hl7.org/fhir/v3/MaritalStatus",
107
"display": "Married"
108
}
109
],
110
"text": "Married"
111
},
112
"communication": [
113
{
114
"language": {
115
"coding": [
116
{
117
"code": "en",
118
"system": "urn:ietf:bcp:47"
119
}
120
],
121
"text": "English"
122
}
123
}
124
],
125
"contact": [
126
{
127
"name": {
128
"given": [
129
"Barbara"
130
],
131
"family": "Bixby"
132
},
133
"telecom": [
134
{
135
"value": "+18088675303",
136
"system": "phone",
137
"use": "home"
138
},
139
{
140
"value": "barbara.bixby@redoxengine.com",
141
"system": "email"
142
}
143
],
144
"address": {
145
"line": [
146
"4762 Hickory St."
147
],
148
"city": "Monroe",
149
"district": "Green",
150
"state": "WI",
151
"postalCode": "53566",
152
"country": "USA"
153
},
154
"relationship": [
155
{
156
"coding": [
157
{
158
"code": "MTH",
159
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
160
"display": "mother"
161
}
162
],
163
"text": "Mother"
164
},
165
{
166
"coding": [
167
{
168
"code": "C",
169
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
170
"display": "Emergency Contact"
171
}
172
],
173
"text": "Emergency Contact"
174
}
175
]
176
}
177
],
178
"generalPractitioner": [
179
{
180
"reference": "Practitioner/RedoxPractitionerExamplePat"
181
}
182
],
183
"managingOrganization": {
184
"reference": "Organization/RedoxOrganizationManagingExample"
185
},
186
"identifier": [
187
{
188
"value": "0000000001",
189
"type": {
190
"text": "MR"
191
}
192
}
193
]
194
}
195
}
196
]
197
}'

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, Patient 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. 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: PatientAdmin-NewPatient
  • 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"