Populate your patient repository for TEFCA-CommonWell

Last updated: Jun 9, 2026
DEVELOPER
HEALTH TECH VENDOR
Who can use this how-to
  • Existing customers using Network Onramps

Before querying TEFCA-CommonWell for data, you must load your existing patient data into your Redox data on demand repository. Learn more about data on demand.

After first populating your patient repository, you must keep your patient demographics and records up-to-date as you continue patient care.

Prerequisites

  • You must have qualified for TEFCA and set up your credentials and OIDs. Learn more about setting up your onramp to TEFCA.
  • You must have created your TEFCA-Commonwell organization record. Learn more about creating an organization record.
  • Be familiar with the following terms and concepts to send requests to TEFCA-CommonWell:

Notes about code examples

The extensions in the code examples are all required for any PatientAdmin messages. Learn more about extensions.

Use curl for technical validation

You can copy our code examples and send the test requests with curl (learn more about curl) instead of Postman. If you do, remember to:

  • Remove any comments from the code examples (starting with //).
  • Replace any variables (e.g., {{YOUR-VARIABLE}}).
  • Add the source-id if you have multiple sources. We don’t include {{source-id}} in the code examples, so you’ll have to add them yourself. Learn about including source details.
  • Make sure you have a full request for your own use since some of the code examples are abbreviated.

Check out these troubleshooting guides if you run into errors:

Step 1: Populate your repostiory with existing patients

This is a critical first step in your TEFCA-CommonWell workflow. It must be done before querying TEFCA-CommonWell or maintaining your patient records.

Send a PatientAdmin.NewPatient request for each of your patients to create their patient record in TEFCA-CommonWell to associate your patient with the same patient in external organizations. You must use at least one patient identifier with the ID Type of the patient OID assigned to you.

  • The Meta.Destination.ID changes based on environment type:
    • Development destination ID: 3122bfff-f1fb-4fdf-97de-294f24338229
    • Production destination ID: 7fd005ac-d788-40c5-b4e8-b57bb8e310a9
  • For production queries, set the Test value to false.
  • The patient identifier and demographics below are example values only. Replace them with the relevant patient information.
    • The patient identifier should be the MRN or primary ID of the patient in your system.
    • The ID type should map to the value Redox provides. Typically, this means mapping a value like MR to this OID. This OID is linked to the repository and required to associate the patient.
    • For demographics, review the PatientAdmin data model schema for full requirements.
Example: Create a new patient in TEFCA-CommonWell
bash
1
curl \
2
-X POST https://api.redoxengine.com/endpoint \
3
-H "Content-Type: application/json" \
4
-H "Authorization: Bearer $API_TOKEN" \
5
-d '{
6
"Meta": {
7
"Extensions": {
8
"sender-organization-id": {
9
"url": "https://api.redoxengine.com/extensions/sender-organization-id",
10
"string": "{{ORGANIZATION-OID}}"
11
},
12
"user-id": {
13
"url": "https://api.redoxengine.com/extensions/user-id",
14
"string": "{{SENDING-USER-NAME}}"
15
},
16
"user-role": {
17
"url": "https://api.redoxengine.com/extensions/user-role",
18
"coding": {
19
"code": "112247003",
20
"display": "Medical Doctor"
21
}
22
},
23
"purpose-of-use": {
24
"url": "https://api.redoxengine.com/extensions/purpose-of-use",
25
"coding": {
26
"code": "TREATMENT",
27
"display": "Treatment"
28
}
29
}
30
},
31
"DataModel": "PatientAdmin",
32
"EventType": "NewPatient",
33
"Test": true,
34
"Destinations": [
35
{
36
"ID": "3122bfff-f1fb-4fdf-97de-294f24338229"
37
}
38
]
39
},
40
"Patient": {
41
"Identifiers": [
42
{
43
"ID": "1234",
44
"IDType": "MR"
45
}
46
],
47
"Demographics": {
48
"FirstName": "Timothy",
49
"MiddleName": "Paul",
50
"LastName": "Bixby",
51
"DOB": "2008-01-06",
52
"SSN": "101-01-0001",
53
"Sex": "Male",
54
"Race": "White",
55
"IsHispanic": null,
56
"MaritalStatus": "Married",
57
"IsDeceased": null,
58
"DeathDateTime": null,
59
"PhoneNumber": {
60
"Home": "+18088675301",
61
"Office": null,
62
"Mobile": null
63
},
64
"EmailAddresses": [],
65
"Language": "en",
66
"Citizenship": [],
67
"Address": {
68
"StreetAddress": "4762 Hickory Street",
69
"City": "Monroe",
70
"State": "WI",
71
"ZIP": "53566",
72
"County": "Green",
73
"Country": "US"
74
}
75
},
76
"Notes": [],
77
"Contacts": [
78
{
79
"FirstName": "Barbara",
80
"MiddleName": null,
81
"LastName": "Bixby",
82
"Address": {
83
"StreetAddress": "4762 Hickory Street",
84
"City": "Monroe",
85
"State": "WI",
86
"ZIP": "53566",
87
"County": "Green",
88
"Country": "US"
89
},
90
"PhoneNumber": {
91
"Home": "+18088675303",
92
"Office": "+17077543758",
93
"Mobile": "+19189368865"
94
},
95
"RelationToPatient": "Mother",
96
"EmailAddresses": [
97
"barb.bixby@test.net"
98
],
99
"Roles": [
100
"Emergency Contact"
101
]
102
}
103
],
104
"Allergies": [
105
{
106
"Code": "7982",
107
"Codeset": "RxNorm",
108
"Name": "Penicillin",
109
"Type": {
110
"Code": null,
111
"Codeset": null,
112
"Name": null
113
},
114
"OnsetDateTime": null,
115
"Reaction": [
116
{
117
"Code": "28926001",
118
"Codeset": "SNOMED CT",
119
"Name": "Rash"
120
},
121
{
122
"Code": "247472004",
123
"Codeset": "SNOMED CT",
124
"Name": "Hives"
125
}
126
],
127
"Severity": {
128
"Code": null,
129
"Codeset": null,
130
"Name": null
131
},
132
"Status": null
133
}
134
],
135
"PCP": {
136
"NPI": "4356789876",
137
"ID": "4356789876",
138
"IDType": "NPI",
139
"FirstName": "Pat",
140
"LastName": "Granite",
141
"Credentials": [
142
"MD"
143
],
144
"Address": {
145
"StreetAddress": "123 Main St.",
146
"City": "Madison",
147
"State": "WI",
148
"ZIP": "53703",
149
"County": "Dane",
150
"Country": "USA"
151
},
152
"EmailAddresses": [],
153
"PhoneNumber": {
154
"Office": "+16085551234"
155
},
156
"Location": {
157
"Type": null,
158
"Facility": null,
159
"Department": null,
160
"Room": null
161
}
162
},
163
"Guarantor": {
164
"Number": "10001910",
165
"FirstName": "Kent",
166
"MiddleName": null,
167
"LastName": "Bixby",
168
"SSN": null,
169
"DOB": null,
170
"Sex": null,
171
"Spouse": {
172
"FirstName": "Barbara",
173
"LastName": "Bixby"
174
},
175
"Address": {
176
"StreetAddress": "4762 Hickory Street",
177
"City": "Monroe",
178
"State": "WI",
179
"ZIP": "53566",
180
"County": "Green",
181
"Country": "USA"
182
},
183
"PhoneNumber": {
184
"Home": null,
185
"Business": null,
186
"Mobile": null
187
},
188
"EmailAddresses": [],
189
"Type": null,
190
"RelationToPatient": "Father",
191
"Employer": {
192
"Name": "Accelerator Labs",
193
"Address": {
194
"StreetAddress": "1456 Old Sauk Road",
195
"City": "Madison",
196
"State": "WI",
197
"ZIP": "53719",
198
"County": "Dane",
199
"Country": "USA"
200
},
201
"PhoneNumber": "+18083451121"
202
}
203
},
204
"Insurances": [
205
{
206
"Plan": {
207
"ID": "31572",
208
"IDType": "Payor ID",
209
"Name": "HMO Deductible Plan",
210
"Type": null
211
},
212
"MemberNumber": null,
213
"Company": {
214
"ID": "60054",
215
"IDType": null,
216
"Name": "aetna (60054 0131)",
217
"Address": {
218
"StreetAddress": "PO Box 14080",
219
"City": "Lexington",
220
"State": "KY",
221
"ZIP": "40512-4079",
222
"County": "Fayette",
223
"Country": "US"
224
},
225
"PhoneNumber": "+18089541123"
226
},
227
"GroupNumber": "847025-024-0009",
228
"GroupName": "Accelerator Labs",
229
"EffectiveDate": "2015-01-01",
230
"ExpirationDate": "2020-12-31",
231
"PolicyNumber": "9140860055",
232
"AgreementType": null,
233
"CoverageType": null,
234
"Insured": {
235
"Identifiers": [],
236
"LastName": null,
237
"MiddleName": null,
238
"FirstName": null,
239
"SSN": null,
240
"Relationship": null,
241
"DOB": null,
242
"Sex": null,
243
"Address": {
244
"StreetAddress": null,
245
"City": null,
246
"State": null,
247
"ZIP": null,
248
"County": null,
249
"Country": null
250
}
251
}
252
}
253
]
254
}
255
}

Repeat this step every time you add a new patient to your patient care.

Step 2: Update existing patient demographics

Complete this step every time demographics or contact information changes for existing patients.

Send a PatientAdmin.PatientUpdate request with the updated details. Patient demographics must be updated before you can query for their data again.

  • The destination ID changes based on environment type:
    • Development destination ID: 3122bfff-f1fb-4fdf-97de-294f24338229
    • Production destination ID: 7fd005ac-d788-40c5-b4e8-b57bb8e310a9
  • For production queries, set the Test value to false.
  • The patient identifier and demographics below are example values only. Replace them with the relevant patient information.
    • The patient identifier should be the MRN or primary ID of the patient in your system.
    • The ID type should map to the value Redox provides. Typically, this means mapping a value like MR to this OID. This OID is linked to the repository and required to associate the patient.
    • For demographics, review the PatientAdmin data model schema for full requirements.
Example: Update an existing patient in TEFCA-CommonWell
bash
1
curl \
2
-X POST https://api.redoxengine.com/endpoint \
3
-H "Content-Type: application/json" \
4
-H "Authorization: Bearer $API_TOKEN" \
5
-d '{
6
"Meta": {
7
"Extensions": {
8
"sender-organization-id": {
9
"url": "https://api.redoxengine.com/extensions/sender-organization-id",
10
"string": "{{ORGANIZATION-OID}}"
11
},
12
"user-id": {
13
"url": "https://api.redoxengine.com/extensions/user-id",
14
"string": "{{SENDING-USER-NAME}}"
15
},
16
"user-role": {
17
"url": "https://api.redoxengine.com/extensions/user-role",
18
"coding": {
19
"code": "112247003",
20
"display": "Medical Doctor"
21
}
22
},
23
"purpose-of-use": {
24
"url": "https://api.redoxengine.com/extensions/purpose-of-use",
25
"coding": {
26
"code": "TREATMENT",
27
"display": "Treatment"
28
}
29
}
30
},
31
"DataModel": "PatientAdmin",
32
"EventType": "PatientUpdate",
33
"Test": true,
34
"Destinations": [
35
{
36
"ID": "3122bfff-f1fb-4fdf-97de-294f24338229"
37
}
38
]
39
},
40
"Patient": {
41
"Identifiers": [
42
{
43
"ID": "1234",
44
"IDType": "MR"
45
}
46
],
47
"Demographics": {
48
"FirstName": "Timothy",
49
"MiddleName": "Paul",
50
"LastName": "Bixby",
51
"DOB": "2008-01-06",
52
"SSN": "101-01-0001",
53
"Sex": "Male",
54
"Race": "White",
55
"IsHispanic": null,
56
"MaritalStatus": "Married",
57
"IsDeceased": null,
58
"DeathDateTime": null,
59
"PhoneNumber": {
60
"Home": "+18088675301",
61
"Office": null,
62
"Mobile": null
63
},
64
"EmailAddresses": [],
65
"Language": "en",
66
"Citizenship": [],
67
"Address": {
68
"StreetAddress": "4435 Victoria Ln",
69
"City": "Madison",
70
"State": "WI",
71
"ZIP": "53719",
72
"County": "Dane",
73
"Country": "US"
74
}
75
},
76
"Notes": [],
77
"Contacts": [
78
{
79
"FirstName": "Barbara",
80
"MiddleName": null,
81
"LastName": "Bixby",
82
"Address": {
83
"StreetAddress": "4762 Hickory Street",
84
"City": "Monroe",
85
"State": "WI",
86
"ZIP": "53566",
87
"County": "Green",
88
"Country": "US"
89
},
90
"PhoneNumber": {
91
"Home": "+18088675303",
92
"Office": "+17077543758",
93
"Mobile": "+19189368865"
94
},
95
"RelationToPatient": "Mother",
96
"EmailAddresses": [
97
"barb.bixby@test.net"
98
],
99
"Roles": [
100
"Emergency Contact"
101
]
102
}
103
],
104
"Diagnoses": [
105
{
106
"Code": "R07.0",
107
"Codeset": "ICD-10",
108
"Name": "Pain in throat",
109
"Type": null,
110
"DocumentedDateTime": null
111
}
112
],
113
"Allergies": [
114
{
115
"Code": "7982",
116
"Codeset": "RxNorm",
117
"Name": "Penicillin",
118
"Type": {
119
"Code": null,
120
"Codeset": null,
121
"Name": null
122
},
123
"OnsetDateTime": null,
124
"Reaction": [
125
{
126
"Code": "28926001",
127
"Codeset": "SNOMED CT",
128
"Name": "Rash"
129
},
130
{
131
"Code": "247472004",
132
"Codeset": "SNOMED CT",
133
"Name": "Hives"
134
}
135
],
136
"Severity": {
137
"Code": null,
138
"Codeset": null,
139
"Name": null
140
},
141
"Status": null
142
}
143
],
144
"PCP": {
145
"NPI": "4356789876",
146
"ID": "4356789876",
147
"IDType": "NPI",
148
"FirstName": "Pat",
149
"LastName": "Granite",
150
"Credentials": [
151
"MD"
152
],
153
"Address": {
154
"StreetAddress": "123 Main St.",
155
"City": "Madison",
156
"State": "WI",
157
"ZIP": "53703",
158
"County": "Dane",
159
"Country": "USA"
160
},
161
"EmailAddresses": [],
162
"PhoneNumber": {
163
"Office": "+16085551234"
164
},
165
"Location": {
166
"Type": null,
167
"Facility": null,
168
"Department": null,
169
"Room": null
170
}
171
},
172
"Insurances": [
173
{
174
"Plan": {
175
"ID": "31572",
176
"IDType": "Payor ID",
177
"Name": "HMO Deductible Plan",
178
"Type": null
179
},
180
"MemberNumber": null,
181
"Company": {
182
"ID": "60054",
183
"IDType": null,
184
"Name": "aetna (60054 0131)",
185
"Address": {
186
"StreetAddress": "PO Box 14080",
187
"City": "Lexington",
188
"State": "KY",
189
"ZIP": "40512-4079",
190
"County": "Fayette",
191
"Country": "US"
192
},
193
"PhoneNumber": "+18089541123"
194
},
195
"GroupNumber": "847025-024-0009",
196
"GroupName": "Accelerator Labs",
197
"EffectiveDate": "2015-01-01",
198
"ExpirationDate": "2020-12-31",
199
"PolicyNumber": "9140860055",
200
"AgreementType": null,
201
"CoverageType": null,
202
"Insured": {
203
"Identifiers": [],
204
"LastName": null,
205
"MiddleName": null,
206
"FirstName": null,
207
"SSN": null,
208
"Relationship": null,
209
"DOB": null,
210
"Sex": null,
211
"Address": {
212
"StreetAddress": null,
213
"City": null,
214
"State": null,
215
"ZIP": null,
216
"County": null,
217
"Country": null
218
}
219
}
220
}
221
],
222
"Guarantor": {
223
"Number": "10001910",
224
"FirstName": "Kent",
225
"MiddleName": null,
226
"LastName": "Bixby",
227
"SSN": null,
228
"DOB": null,
229
"Sex": null,
230
"Spouse": {
231
"FirstName": "Barbara",
232
"LastName": "Bixby"
233
},
234
"Address": {
235
"StreetAddress": "4762 Hickory Street",
236
"City": "Monroe",
237
"State": "WI",
238
"ZIP": "53566",
239
"County": "Green",
240
"Country": "USA"
241
},
242
"PhoneNumber": {
243
"Home": null,
244
"Business": null,
245
"Mobile": null
246
},
247
"EmailAddresses": [],
248
"Type": null,
249
"RelationToPatient": "Father",
250
"Employer": {
251
"Name": "Accelerator Labs",
252
"Address": {
253
"StreetAddress": "1456 Old Sauk Road",
254
"City": "Madison",
255
"State": "WI",
256
"ZIP": "53719",
257
"County": "Dane",
258
"Country": "USA"
259
},
260
"PhoneNumber": "+18083451121"
261
}
262
}
263
}
264
}

Step 3: Combine duplicate patient records

Complete this step every time you identify duplicate records for the same patient.

Send a PatientAdmin.PatientMerge request to merge the patient records and replace the previous identifiers with the new one. Patient records must be merged appropriately before you can query for their data again.

  • The destination ID changes based on environment type:
    • Development destination ID: 3122bfff-f1fb-4fdf-97de-294f24338229
    • Production destination ID: 7fd005ac-d788-40c5-b4e8-b57bb8e310a9
  • For production queries, set the Test value to false.
  • The patient identifier and demographics below are example values only. Replace them with the relevant patient information.
    • The patient identifier should be the MRN or primary ID of the patient in your system.
    • The ID type should map to the value Redox provides. Typically, this means mapping a value like MR to this OID. This OID is linked to the repository and required to associate the patient.
    • For demographics, review the PatientAdmin data model schema for full requirements.
Example: Merge patient records in TEFCA-CommonWell
bash
1
curl \
2
-X POST https://api.redoxengine.com/endpoint \
3
-H "Content-Type: application/json" \
4
-H "Authorization: Bearer $API_TOKEN" \
5
-d '{
6
"Meta": {
7
"Extensions": {
8
"sender-organization-id": {
9
"url": "https://api.redoxengine.com/extensions/sender-organization-id",
10
"string": "{{ORGANIZATION-OID}}"
11
},
12
"user-id": {
13
"url": "https://api.redoxengine.com/extensions/user-id",
14
"string": "{{SENDING-USER-NAME}}"
15
},
16
"user-role": {
17
"url": "https://api.redoxengine.com/extensions/user-role",
18
// The role of the user identified above. This must be a SNOMED CT code.
19
"coding": {
20
"code": "112247003",
21
"display": "Medical Doctor"
22
}
23
},
24
"purpose-of-use": {
25
"url": "https://api.redoxengine.com/extensions/purpose-of-use",
26
"coding": {
27
"code": "TREATMENT",
28
"display": "Treatment"
29
}
30
}
31
},
32
"DataModel": "PatientAdmin",
33
"EventType": "PatientMerge",
34
"Test": true,
35
"Destinations": [
36
{
37
"ID": "3122bfff-f1fb-4fdf-97de-294f24338229"
38
}
39
]
40
},
41
"Patient": {
42
"Identifiers": [
43
{
44
"ID": "{{NEW-PATIENT-ID}}",
45
"IDType": "MR"
46
}
47
],
48
"PreviousIdentifiers": [
49
{
50
"ID": "{{OLD-PATIENT-ID}}",
51
"IDType": "MR"
52
}
53
],
54
"Demographics": {
55
"FirstName": "Timothy",
56
"MiddleName": "Paul",
57
"LastName": "Bixby",
58
"DOB": "2008-01-06",
59
"SSN": "101-01-0001",
60
"Sex": "Male",
61
"Race": "White",
62
"IsHispanic": null,
63
"MaritalStatus": "Married",
64
"IsDeceased": null,
65
"DeathDateTime": null,
66
"PhoneNumber": {
67
"Home": "+18088675301",
68
"Office": null,
69
"Mobile": null
70
},
71
"EmailAddresses": [],
72
"Language": "en",
73
"Citizenship": [],
74
"Address": {
75
"StreetAddress": "4762 Hickory Street",
76
"City": "Monroe",
77
"State": "WI",
78
"ZIP": "53566",
79
"County": "Green",
80
"Country": "US"
81
}
82
},
83
"Notes": []
84
}
85
}

Next steps

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