Create Provider

This API creates healthcare provider records along with the corresponding Account records (for facilities) or Contact records (for practitioners). You can also use it to manage information about practitioner credentials.

Use Cases

The Create Provider API is mainly intended to support the operations of payer employees who handle provider records, such as credentialing specialists.

Credentialing Specialist

Goals:
  • Create provider records.
  • Collect and store credential-related data.
Activities:
  • When the provider has gone through the lead process, add maximum credential information to it so supervisor can make an approval decision.
  • When a new provider is added to the Health Plan Network, add its contact to the system so call center agent can direct patients to that new provider.
  • When new information is received about a provider, edit its contact info so the provider information is up to date.
Success Measures:
  • Account, Contact, and HealthCareProvider records are created.
  • Records in related entities (optionally, for example in License, Person Education, Operating Hours, Specialty records) can be created if customer provides values in the JSON.
  • Data created can be viewed and edited according to user’s access permission.

Prerequisites

Notes about lookups

To ensure uniqueness, when you create a HealthcareProviderSpecialty record with a SpecialtyId lookup field, a CareSpecialty record must exist with the CareSpecialty.SpecialtyCode field populated.

When you create a HealthcareProviderTaxonomy record, a CareTaxonomy.TaxonomyCode field must exist.

When you create a HealthcareFacilityNetworkSame record, a HealthcarePayerNetwork.Code field must exist.

You can look up to Operating Hours records if they exist, or create Operating Hours records via API.

For all other lookups, information should be provided in this format:

1"AccountId":{ 
2      "value":"101",
3      "referenceField":"HCGA__SourceSystemId__c"
4      }
In this example,
  • AccountId is the API name of the lookup field you want to populate.
  • referenceField is the field on the lookup object to establish the relationship. You can choose any reference field for these lookups as long as the values are unique.
  • value is the value of the referenceField.

When a single request includes multiple lookups to an object, use the same reference field for all those lookups.

For example, suppose you have created custom lookup fields to the Account object in HealthcareProviderSpecialty and healthcareTaxonomy. The lookup fields are called C_Account1 and C_Account2. Account1 record has its sourceSystem field set to A1, and Account2 record has the sourceSystem field set to A2. You want C_Account1 to be populated with the Account1 record and C_Account2 to be populated with Account2. The reference field to find the account record is SourceSystem. If sourceSystem is A1, you get the Account1 record, and if sourceSystem is A2 you get the Account2 record.

HealthcareFacilityNetwork has lookups to Account, Practitioner and HealthcarePractitionerFacility. You can create a HealthcareFacilityNetwork record in an input request in any of these ways:
  • Create a record with an account lookup for the facility you are creating.
  • Create a record with a practitioner lookup for the practitioner you are creating.
  • Create a record with a lookup to HealthcarePractitionerFacility for a practitioner at a given facility.

Apex is not directly supported. However, you can call this API using the HttpRequest Apex class.

Supported Fields

The Create provider API supports all standard and custom fields.

Any field that is required in the object specification is required in JSON request bodies for this API.

All fields specified in your JSON request body must be writable. The user must have read-write access.

If no user input is provided, the Name field is populated automatically using this format:

1HealthcareProviderSpecialty entity: Jimmy James Specialty - 10-20-20 11:22:33
  • Users can edit the Name field after it has been auto-populated.
  • When a user enters data from the UI, the Name field is not auto-populated.

Note

If person accounts are enabled, use the recordType parameter in your input to identify a person account.

If you are updating a practitioner record that has already been created, you only need practitioner ID, not Account or Contact.

Resources

Details and JSON samples
Resource
1/connect/health/providers
Available version
49.0 and later
Authentication
Authorization: Bearer token

The Lightning Platform REST API supports OAuth 2.0 (an open protocol to allow secure API authorization). See Authorize Apps with OAuth in Salesforce Help for more details.

Note

HTTP methods
POST

Supported Objects

Object Required Auto-filled Name field Required Fields Input/Output JSON key name
Account (for facility) or Contact (for practitioner) No NA account/contact
AccountContactRelationship No Yes providerAffliations
Accreditation No Yes Name accreditations
Award No Yes Name awards
BoardCertification No Yes Name boardCertifications
BusinessLicense No Yes Name businessLicenses
CareProviderAdverseAction No Yes Name careProviderAdverseActions
CareProviderFacilitySpecialty No Yes Name facilitySpecialties
ContactProfile No Yes contactProfile
HealthcareFacilityNetwork No Yes Name facilityNetworks
HealthcarePractitionerFacility No Yes Name practitionerFacilities
HealthcareProvider Yes Yes Name healthcareProvider
HealthcareProviderNpi No Yes Name npi
HealthcareProviderSpecialty No Yes Name specialties
HealthcareProviderTaxonomy No Yes Name taxonomies
HealthcareProviderService No Yes providerServices
HlthCareProvTreatedCondition No Yes treatedConditions
Identifier No
OperatingHours No Yes Name, TimeZone operatingHours
PersonEducation (Practioner only) Yes Name personEducations
PersonEmployment (Practitioner only) Yes Name, RelatedPerson (Account/Contact) personEmployments
TimeSlots No No OperatingHours, StartTime, EndTime, DayOfWeek TimeSlots

Code Samples

Here are some JSON samples that you can use as a starting point to build request bodies and interpret responses.
  • Associate a practitioner with a facility. Each Contact record must have an associated Account record.
  • Use the API name of the field, such as RecordType, not the label, such as Record Type.
  • Strings with trailing spaces aren’t supported.
  • The comments in these samples aren't meant to be valid JSON.

Sample Input: Create a Practitioner

1{
2    "providers": [{
3        "type": "practitioner",
4        "contact": {
5            "fields": {
6                "FirstName": "Rachel",
7                "LastName": "Green",
8                "Description" : "Rachel is a specialist surgeon."
9            }
10        },
11        "healthcareProvider": {
12            "fields": {
13                "ProviderType": "Medical Doctor",
14                "ProviderClass": "Solo Practitioner"
15            }
16        }
17    }]
18}

Sample Input - Create a Practitioner from an Existing Contact

In the sample input, the reference field can be any unique field.

Note

1{
2    "providers": [{
3        "type": "practitioner",
4        "contact": {
5            "id": {
6                "value": "003RM000007FnBvYAK",
7                "referenceField": "Id"
8            }
9        },
10        "healthcareProvider": {
11            "fields": {
12                "ProviderType": "Physician",
13                "EffectiveFrom": "2019-01-01 00:00:00"
14            }
15        }
16    }]
17}

Sample Input - Create a Practitioner as a Person Account

1{
2    "providers": [
3        {
4            "type": "practitioner",
5            "account":{
6                "fields":{
7                    "FirstName":"Jimmy",
8                    "LastName":"James",
9                    "Email":"jj@newsradio.com",
10                    "About": "Jimmy James is a doctor.",
11                    "RecordType": "PersonAccount"
12                }
13            },
14            "healthcareProvider":{
15                "fields":{
16                    "ProviderType":"Physician",
17                    "EffectiveFrom":"2019-01-01",
18                }
19            }
20     ]
21}

Sample Input - Create a Practitioner to Be Synced for Provider Search

To use the following code sample, ensure that the org has:

  • A facility Account record (Id 001RM000005J5UTYA0 in the code sample)
  • CareSpecialty records (SpecialtyCode 15 and 22 in the code sample)

Note

1{
2    "providers": [{
3            "type": "practitioner",
4            "contact": {
5                "fields": {
6                    "FirstName": "Will",
7                    "LastName": "Doc",
8                    "Email": "WillDoc@gmail.com",
9                    "Description": "Will is a doctor."
10                }
11            },
12            "healthcareProvider": {
13                "fields": {
14                    "ProviderType": "Medical Doctor",
15                    "ProviderClass": "Solo Practitioner"
16                }
17            },
18            "npis": [{
19                "fields": {
20                    "Npi": "WD-14",
21                    "NpiType": "Individual",
22                    "IsActive": true
23                }
24            }],
25            "specialties": [{
26                 "fields": {
27                        "SpecialtyId": {
28                            "value": "15",
29                            "referenceField": "SpecialtyCode"
30                        },
31                        "SpecialtyRole": "Specialist",
32                        "IsActive": true
33                    }
34                },
35                {
36                    "fields": {
37                        "SpecialtyId": {
38                            "value": "22",
39                            "referenceField": "SpecialtyCode"
40                        },
41                        "SpecialtyRole": "Dual",
42                        "IsActive": true
43                    }
44                }
45            ],
46            "practitionerFacilities": [{
47                    "fields": {
48                        "AccountId": {
49                            "value": "001RM000005J5UTYA0",
50                            "referenceField": "Id"
51                        },
52                        "IsActive": true
53                    },
54                    "facilityNetworks": [{
55                            "fields": {
56                                "PayerNetworkId": {
57                                    "value": "PPO",
58                                    "referenceField": "Code"
59                                },
60                                "IsActive": true,
61                                "LowestValidAge": 0,
62                                "PanelStatus": "Panel open",
63                                "PanelLimit": 100
64                            }
65                        },
66                        {
67                            "fields": {
68                                "PayerNetworkId": {
69                                    "value": "HMO",
70                                    "referenceField": "Code"
71                                },
72                                "IsActive": true,
73                                "GenderRestriction": "Female",
74                                "LowestValidAge": 0,
75                                "PanelStatus": "Panel open",
76                                "PanelLimit": 100
77                            }
78                        }
79                    ],
80                    "facilitySpecialties": [{
81                        "fields": {
82                            "SpecialtyId": {
83                                "value": "15",
84                                "referenceField": "SpecialtyCode"
85                            },
86                            "IsPrimarySpecialty": true,
87                            "SpecialtyRole": "Specialist",
88                            "IsActive": true
89                        }
90                    }]
91                }
92            ]
93        }
94    ]
95}

Sample Input - Create a Facility

1{
2    "providers": [{
3        "type": "facility",
4        "account": {
5            "fields": {
6                "Name": "Geller Clinic",
7                "Description": "Geller Clinic is an eye clinic.",
8                "Website": "gellerclinic.com"
9            },
10            "operatingHours": {
11                "fields": {
12                    "Name": "GellerClinicHours",
13                    "Description": "MWTF8-5"
14                },
15                "timeSlots": [{
16                    "fields": {
17                        "DayOfWeek": "Monday",
18                        "StartTime": "09:00:00",
19                        "EndTime": "17:30:00"
20                    }
21                }]
22            }
23        },
24        "healthcareProvider": {
25            "fields": {
26                "ProviderType": "MedicalDoctor",
27                "EffectiveFrom": "2019-01-01"
28            }
29        }
30    }]
31}

Sample Input - Create a Facility from an Existing Account

1{
2    "providers": [{
3        "type": "facility",
4        "account": {
5            "id": {
6                "value": "Geller Clinic",
7                "referenceField": "Name"
8            }
9        },
10        "healthcareProvider": {
11            "fields": {
12                "ProviderType": "MedicalDoctor",
13                "EffectiveFrom": "2019-01-01"
14            }
15        }
16    }]
17}

Sample Input - Create a Facility to Be Synced for Provider Search

To use the following code sample, ensure that the org has a Specialty record (SpecialtyCode 15 in the code sample).

Note

1{
2    "providers": [{
3        "type": "facility",
4        "account": {
5            "fields": {
6                "Name": "UCSF Hospital",
7                "Description": "Test UCSF hospital",
8                "Website": "UCSFHospital21@test.com"
9            },
10            "operatingHours": {
11                "fields": {
12                    "Name": "UCSF Hospital Hours",
13                    "Description": "MWTF8-5"
14                },
15                "timeSlots": [{
16                    "fields": {
17                        "DayOfWeek": "Monday",
18                        "StartTime": "09:00:00",
19                        "EndTime": "17:30:00"
20                    }
21                }]
22            }
23        },
24        "healthcareProvider": {
25            "fields": {
26                "ProviderType": "Hospital",
27                "Status": "Active",
28                "EffectiveFrom": "2019-01-01"
29            }
30        },  
31         "npis": [{
32             "fields": {
33                "Npi": "UCSFH21",
34                "NpiType": "Organization",
35                "IsActive": true
36            }
37        }],
38        "specialties": [{
39            "fields": {
40                "SpecialtyId": {
41                    "value": "15",
42                    "referenceField": "SpecialtyCode"
43                },
44                "IsPrimarySpecialty": true,
45                "SpecialtyRole": "Specialist",
46                "EffectiveFrom": "2019-01-01",
47                "EffectiveTo": "2036-01-01",
48                "IsActive": true
49            }
50        }],
51        "boardCertifications": [{
52            "fields": {
53                "CertificationType": "Dermatology",
54                "ExpirationDate": "2030-11-12",
55                "Status": "Certified"
56            }
57        }]
58    }]
59}

Sample Input - Create a Practitioner with All Possible Related Objects

Before you use the code sample, create existing lookup records in your org for the following objects:

  • Care Specialty
  • Care Taxonomy
  • Operating Hours
  • Healthcare Payer Network
  • Account for Healthcare Practitioner Facility

Note

1[
2  {
3    "providers": [
4      {
5        "type": "practitioner",
6        "contact": {
7          "fields": {
8            "FirstName": "Jimmy",
9            "LastName": "James",
10            "Email": "jj@newsradio.com",
11            "Description": "Jimmy James is a doctor.",
12            "AccountId": "001xx000003GbOJAA0"
13          }
14        },
15        "contactProfile": {
16          "fields": {
17            "Ethnicity": "Asian.",
18            "Race": "Asian"
19          }
20        },
21        "healthcareProvider": {
22          "fields": {
23            "ProviderType": "Physician",
24            "EffectiveFrom": "2019-01-01",
25            "ProviderPhotoId": "069xx0000004CDsAAM"
26          }
27        },
28        "providerAffiliations": [
29          {
30            "fields": {
31              "AccountId": {
32                "value": "001xx000003GbPvAAK",
33                "referenceField": "Id"
34              }
35            }
36          }
37        ],
38        "treatedConditions": [
39          {
40            "fields": {
41              "ConditionId": {
42                "value": "118xx000000MbKkAAK",
43                "referenceField": "Id"
44              },
45              "EffectiveFrom": "2019-01-01",
46              "EffectiveTo": "2029-01-01",
47              "IsActive": true
48            }
49          }
50        ],
51        "providerServices": [
52          {
53            "fields": {
54              "HealthcareServiceId": {
55                "value": "13xxx0000004C92AAE",
56                "referenceField": "Id"
57              },
58              "EffectiveFrom": "2019-01-01",
59              "EffectiveTo": "2029-01-01",
60              "IsActive": true
61            }
62          }
63        ],
64        "npis": [
65          {
66            "fields": {
67              "Npi": "12345123",
68              "NpiType": "Individual",
69              "IsActive": true
70            }
71          }
72        ],
73        "specialties": [
74          {
75            "fields": {
76              "SpecialtyId": {
77                "value": "20",
78                "referenceField": "SpecialtyCode"
79              },
80              "IsPrimarySpecialty": true,
81              "SpecialtyRole": "Specialist",
82              "EffectiveFrom": "2019-01-01",
83              "EffectiveTo": "2020-01-01",
84              "IsActive": true
85            }
86          },
87          {
88            "fields": {
89              "SpecialtyId": {
90                "value": "24",
91                "referenceField": "SpecialtyCode"
92              },
93              "IsPrimarySpecialty": false,
94              "SpecialtyRole": "Dual",
95              "EffectiveFrom": "2019-01-01",
96              "EffectiveTo": "2020-01-01",
97              "IsActive": true
98            }
99          }
100        ],
101        "taxonomies": [
102          {
103            "fields": {
104              "TaxonomyId": {
105                "value": "207X00000X",
106                "referenceField": "TaxonomyCode"
107              },
108              "IsPrimaryTaxonomy": true,
109              "SourceSystemIdentifier": "",
110              "EffectiveFrom": "2019-01-01",
111              "EffectiveTo": "2020-01-01",
112              "IsActive": true
113            }
114          },
115          {
116            "fields": {
117              "TaxonomyId": {
118                "value": "208200000X",
119                "referenceField": "TaxonomyCode"
120              },
121              "IsPrimaryTaxonomy": false,
122              "EffectiveFrom": "2019-01-01",
123              "EffectiveTo": "2020-01-01",
124              "IsActive": true
125            }
126          }
127        ],
128        "facilityNetworks": [
129          {
130            "fields": {
131              "IsActive": true,
132              "GenderRestriction": "None",
133              "HighestValidAge": 99,
134              "LowestValidAge": 10,
135              "PanelStatus": "Panel open",
136              "PanelLimit": 10
137            }
138          }
139        ],
140        "facilityServices": [
141          {
142            "fields": {
143              "HealthcareServiceId": {
144                "value": "13xxx0000004C92AAE",
145                "referenceField": "Id"
146              },
147              "EffectiveFrom": "2019-01-01",
148              "EffectiveTo": "2029-01-01",
149              "IsActive": true
150            }
151          }
152        ],
153        "practitionerFacilities": [
154          {
155            "fields": {
156              "AccountId": {
157                "value": "001xx000003GdxzAAC",
158                "referenceField": "Id"
159              },
160              "LowestValidAge": 12,
161              "OperatingHoursId": {
162                "value": "123",
163                "referenceField": "phone__c"
164              }
165            },
166            "providerFacilityServices": [
167              {
168                "fields": {
169                  "HealthcareServiceId": {
170                    "value": "13xxx0000004C92AAE",
171                    "referenceField": "Id"
172                  },
173                  "EffectiveFrom": "2019-01-01",
174                  "EffectiveTo": "2029-01-01",
175                  "IsActive": true
176                }
177              }
178            ],
179            "facilityNetworks": [
180              {
181                "fields": {
182                  "PayerNetworkId": {
183                    "value": "EB0012397",
184                    "referenceField": "Code"
185                  },
186                  "IsActive": true,
187                  "GenderRestriction": "Male",
188                  "HighestValidAge": 99,
189                  "LowestValidAge": 5,
190                  "PanelStatus": "Panel open",
191                  "PanelLimit": 10
192                }
193              },
194              {
195                "fields": {
196                  "PayerNetworkId": {
197                    "value": "UH23029",
198                    "referenceField": "Code"
199                  },
200                  "IsActive": true,
201                  "GenderRestriction": "Female",
202                  "HighestValidAge": 99,
203                  "LowestValidAge": 5,
204                  "PanelStatus": "Panel open",
205                  "PanelLimit": 10
206                }
207              }
208            ],
209            "facilitySpecialties": [
210              {
211                "fields": {
212                  "SpecialtyId": {
213                    "value": "20",
214                    "referenceField": "SpecialtyCode"
215                  },
216                  "IsPrimarySpecialty": true,
217                  "SpecialtyRole": "Specialist"
218                }
219              }
220            ]
221          },
222          {
223            "fields": {
224              "AccountId": {
225                "value": "001xx000003GdxzAAC",
226                "referenceField": "Id"
227              },
228              "InitialStartDate": "2018-05-12"
229            },
230            "facilityNetworks": [
231              {
232                "fields": {
233                  "PayerNetworkId": {
234                    "value": "UH23029",
235                    "referenceField": "Code"
236                  },
237                  "IsActive": true,
238                  "GenderRestriction": "Male",
239                  "HighestValidAge": 99,
240                  "LowestValidAge": 5,
241                  "PanelStatus": "Panel open",
242                  "PanelLimit": 10
243                }
244              },
245              {
246                "fields": {
247                  "PayerNetworkId": {
248                    "value": "UH23039",
249                    "referenceField": "Code"
250                  },
251                  "IsActive": true,
252                  "GenderRestriction": "Male",
253                  "HighestValidAge": 99,
254                  "LowestValidAge": 5,
255                  "PanelStatus": "Panel open",
256                  "PanelLimit": 10
257                }
258              }
259            ],
260            "facilitySpecialties": [
261              {
262                "fields": {
263                  "SpecialtyId": {
264                    "value": "28",
265                    "referenceField": "SpecialtyCode"
266                  },
267                  "IsPrimarySpecialty": true,
268                  "SpecialtyRole": "Dual"
269                }
270              }
271            ]
272          }
273        ],
274        "boardCertifications": [
275          {
276            "fields": {
277              "CertificationType": "Dermatology",
278              "Status": "Certified"
279            }
280          }
281        ],
282        "awards": [
283          {
284            "fields": {
285              "AwardDate": "2019-08-15 17:30:00",
286              "AwardedBy": "Barack Obama"
287            }
288          }
289        ],
290        "businessLicenses": [
291          {
292            "fields": {
293              "Name": "Pediatric lab technician",
294              "Status": "Draft"
295            }
296          }
297        ],
298        "accreditations": [
299          {
300            "fields": {
301              "Type": "Hospital",
302              "SubType": "Children's",
303              "AccreditingBody": "Joint Commission",
304              "Status": "Accreditated",
305              "SourceSystem": "Aetna-SF",
306              "SourceSystemIdentifier": "abcd1234"
307            }
308          },
309          {
310            "fields": {
311              "Type": "Clinic",
312              "SubType": "Children's",
313              "AccreditingBody": "Joint Commission",
314              "Status": "Verifying"
315            }
316          }
317        ],
318        "personEducations": [
319          {
320            "fields": {
321              "Name": "MedicalDegree",
322              "EducationLevel": "Masters",
323              "IsActive": true
324            }
325          }
326        ],
327        "personEmployments": [
328          {
329            "fields": {
330              "AnnualIncome": "400000",
331              "EmployerPhone": "4148767000"
332            }
333          }
334        ],
335        "careProviderAdverseActions": [
336          {
337            "fields": {
338              "AccreditationId": {
339                "value": "123",
340                "referenceField": "SourceSystemIdentifier"
341              },
342              "ActionType": "Disciplinary",
343              "Status": "Verified"
344            }
345          },
346          {
347            "fields": {
348              "AccreditationId": {
349                "value": "123",
350                "referenceField": "SourceSystemIdentifier"
351              },
352              "ActionType": "Disciplinary",
353              "Status": "Verified"
354            }
355          }
356        ]
357      }
358    ]
359  },
360  {
361    "providers": [
362      {
363        "type": "practitioner",
364        "contact": {
365          "fields": {
366            "FirstName": "Rachel",
367            "LastName": "Green",
368            "Description": "Rachel is a specialist surgeon."
369          }
370        },
371        "contactProfile": {
372          "fields": {
373            "Ethnicity": "Asian.",
374            "Race": "Asian"
375          }
376        },
377        "healthcareProvider": {
378          "fields": {
379            "ProviderType": "Medical Doctor",
380            "ProviderClass": "Solo Practitioner",
381            "ProviderPhotoId": "069xx0000004CDsAAM"
382          }
383        },
384        "providerAffiliations": [
385          {
386            "fields": {
387              "AccountId": {
388                "value": "001xx000003GbPvAAK",
389                "referenceField": "Id"
390              }
391            }
392          }
393        ],
394        "treatedConditions": [
395          {
396            "fields": {
397              "ConditionId": {
398                "value": "118xx000000MbKkAAK",
399                "referenceField": "Id"
400              },
401              "EffectiveFrom": "2019-01-01",
402              "EffectiveTo": "2029-01-01",
403              "IsActive": true
404            }
405          }
406        ],
407        "providerServices": [
408          {
409            "fields": {
410              "HealthcareServiceId": {
411                "value": "13xxx0000004C92AAE",
412                "referenceField": "Id"
413              },
414              "EffectiveFrom": "2019-01-01",
415              "EffectiveTo": "2029-01-01",
416              "IsActive": true
417            }
418          }
419        ],
420        "practitionerFacilities": [
421          {
422            "fields": {
423              "AccountId": {
424                "value": "001xx000003GYikAAG",
425                "referenceField": "Id"
426              },
427              "IsActive": true
428            },
429            "facilityNetworks": [
430              {
431                "fields": {
432                  "PayerNetworkId": {
433                    "value": "PPO",
434                    "referenceField": "Code"
435                  },
436                  "IsActive": true,
437                  "LowestValidAge": 0,
438                  "PanelStatus": "Panel open",
439                  "PanelLimit": 100
440                }
441              },
442              {
443                "fields": {
444                  "PayerNetworkId": {
445                    "value": "HMO",
446                    "referenceField": "Code"
447                  },
448                  "IsActive": true,
449                  "GenderRestriction": "Female",
450                  "LowestValidAge": 0,
451                  "PanelStatus": "Panel open",
452                  "PanelLimit": 100
453                }
454              }
455            ],
456            "providerFacilityServices": [
457              {
458                "fields": {
459                  "HealthcareServiceId": {
460                    "value": "13xxx0000004C92AAE",
461                    "referenceField": "Id"
462                  },
463                  "EffectiveFrom": "2019-01-01",
464                  "EffectiveTo": "2029-01-01",
465                  "IsActive": true
466                }
467              }
468            ],
469            "facilitySpecialties": [
470              {
471                "fields": {
472                  "SpecialtyId": {
473                    "value": "15",
474                    "referenceField": "SpecialtyCode"
475                  },
476                  "IsPrimarySpecialty": true,
477                  "SpecialtyRole": "Specialist",
478                  "IsActive": true
479                }
480              }
481            ]
482          }
483        ]
484      }
485    ]
486  }
487]

Sample Output Response for Creating a Practitioner with All Possible Related Objects

1{
2  "providers": [
3    {
4      "code": "201",
5      "isSuccess": true,
6      "message": "1 successfully processed - 0 failed",
7      "providers": [
8        {
9          "accreditations": [
10            {
11              "fields": {},
12              "id": "0Vlxx0000004CSOCA2"
13            },
14            {
15              "fields": {},
16              "id": "0Vlxx0000004CSPCA2"
17            }
18          ],
19          "awards": [
20            {
21              "fields": {},
22              "id": "0cFxx00000000XtEAI"
23            }
24          ],
25          "boardCertifications": [
26            {
27              "fields": {},
28              "id": "0YSxx00000000b7GAA"
29            }
30          ],
31          "businessLicenses": [
32            {
33              "fields": {},
34              "id": "0cExx00000000BJEAY"
35            }
36          ],
37          "careProviderAdverseActions": [
38            {
39              "fields": {},
40              "id": "0etxx00000000HlAAI"
41            },
42            {
43              "fields": {},
44              "id": "0etxx00000000HmAAI"
45            }
46          ],
47          "code": "201",
48          "contact": {
49            "fields": {},
50            "id": "003xx000004WmIiAAK"
51          },
52          "contactProfile": {
53            "fields": {},
54            "id": "11Axx0000004bCTEAY"
55          },
56          "facilityNetworks": [
57            {
58              "fields": {},
59              "id": "0bYxx00000000srEAA"
60            }
61          ],
62          "healthcareProvider": {
63            "fields": {},
64            "id": "0cmxx00000003HFAAY"
65          },
66          "message": "SUCCESS",
67          "npis": [
68            {
69              "fields": {},
70              "id": "0bNxx00000000rFEAQ"
71            }
72          ],
73          "personEducations": [
74            {
75              "fields": {},
76              "id": "0Srxx0000004CIiCAM"
77            }
78          ],
79          "personEmployments": [
80            {
81              "fields": {},
82              "id": "0Stxx0000004CPACA2"
83            }
84          ],
85          "practitionerFacilities": [
86            {
87              "facilityNetworks": [
88                {
89                  "fields": {},
90                  "id": "0bYxx00000000ssEAA"
91                },
92                {
93                  "fields": {},
94                  "id": "0bYxx00000000stEAA"
95                }
96              ],
97              "facilitySpecialties": [
98                {
99                  "fields": {},
100                  "id": "0bXxx00000000ZVEAY"
101                }
102              ],
103              "fields": {},
104              "id": "0bSxx00000000srEAA",
105              "identifiers": [],
106              "providerFacilityServices": [
107                {
108                  "fields": {},
109                  "id": "15Mxx0000004CgvEAE"
110                }
111              ]
112            },
113            {
114              "facilityNetworks": [
115                {
116                  "fields": {},
117                  "id": "0bYxx00000000suEAA"
118                },
119                {
120                  "fields": {},
121                  "id": "0bYxx00000000svEAA"
122                }
123              ],
124              "facilitySpecialties": [
125                {
126                  "fields": {},
127                  "id": "0bXxx00000000ZWEAY"
128                }
129              ],
130              "fields": {},
131              "id": "0bSxx00000000ssEAA",
132              "identifiers": [],
133              "providerFacilityServices": []
134            }
135          ],
136          "providerAffiliations": [
137            {
138              "fields": {},
139              "id": "07kxx0000004D0HAAU"
140            }
141          ],
142          "providerServices": [
143            {
144              "fields": {},
145              "id": "15Mxx0000004CguEAE"
146            }
147          ],
148          "specialties": [
149            {
150              "fields": {},
151              "id": "0bOxx00000000WHEAY"
152            },
153            {
154              "fields": {},
155              "id": "0bOxx00000000WIEAY"
156            }
157          ],
158          "taxonomies": [
159            {
160              "fields": {},
161              "id": "0bPxx00000000WHEAY"
162            },
163            {
164              "fields": {},
165              "id": "0bPxx00000000WIEAY"
166            }
167          ],
168          "treatedConditions": [
169            {
170              "fields": {},
171              "id": "1K4xx0000004D3UCAU"
172            }
173          ],
174          "type": "practitioner"
175        }
176      ]
177    },
178    {
179      "code": "201",
180      "isSuccess": true,
181      "message": "1 successfully processed - 0 failed",
182      "providers": [
183        {
184          "accreditations": [],
185          "awards": [],
186          "boardCertifications": [],
187          "businessLicenses": [],
188          "careProviderAdverseActions": [],
189          "code": "201",
190          "contact": {
191            "fields": {},
192            "id": "003xx000004Wj6KAAS"
193          },
194          "contactProfile": {
195            "fields": {},
196            "id": "11Axx0000004aebEAA"
197          },
198          "facilityNetworks": [],
199          "healthcareProvider": {
200            "fields": {},
201            "id": "0cmxx0000000149AAA",
202            "providerServices": [
203              {
204                "fields": {},
205                "id": "15Mxx0000004CLwEAM"
206              }
207            ],
208            "treatedConditions": [
209              {
210                "fields": {},
211                "id": "1K4xx0000004ClkCAE"
212              }
213            ]
214          },
215          "message": "SUCCESS",
216          "npis": [],
217          "personEducations": [],
218          "personEmployments": [],
219          "practitionerFacilities": [
220            {
221              "facilityNetworks": [
222                {
223                  "fields": {},
224                  "id": "0bYxx00000000CvEAI"
225                },
226                {
227                  "fields": {},
228                  "id": "0bYxx00000000CwEAI"
229                }
230              ],
231              "facilitySpecialties": [
232                {
233                  "fields": {},
234                  "id": "0bXxx00000000BJEAY"
235                }
236              ],
237              "fields": {},
238              "id": "0bSxx00000000CvEAI",
239              "identifiers": [],
240              "providerFacilityServices": [
241                {
242                  "fields": {},
243                  "id": "15Mxx0000004CLxEAM"
244                }
245              ]
246            }
247          ],
248          "specialties": [],
249          "taxonomies": [],
250          "type": "practitioner"
251        }
252      ]
253    }
254  ]
255}

Sample Output Response - Partial Success

1{
2    "code": "207",
3    "message": "all good",
4    "success": true,
5    "providers": [
6        {
7            "type": "facility",
8            "code" : "",
9            "message" : "Specialty Code "409" not found"
10            "success" : false,
11            "healthcareProvider" : {
12                "fields":{
13                    "ProviderType":"Physician",
14                    "EffectiveFrom":"2019-01-01"
15                }
16            }
17        },
18        {
19            "type": "practitioner",
20            "code": "200",
21            "message": "all good",
22            "success": true,
23            "Contact":{
24                "id": "<contact id>"
25            },
26            "healthcareProvider":{
27                "id": "provider id"
28                "fields":{
29                    "ProviderType":"Physician",
30                    "EffectiveFrom":"2019-01-01",
31                    "Hc4a__language__c" : "Spanish",
32                    "Hc4a__emergencyContactId__c" :  {
33                        "value" : "SF21083209",
34                        "referenceField" : "id"
35                    }
36                }
37            },
38            "npis":[{
39                "id": "npi id"
40            }],
41            "specialties":[
42                {
43                    "id": "specialty id"
44                }
45            ],
46            "taxonomies":[
47                {
48                    "id": "taxonomy id"
49                }
50            ],
51            "practitionerFacilities":[
52                {
53                    "id": "pract. fac. id",
54                    "facilityNetworks": [
55                        {
56                            "id": "payer. network id"
57                        },
58                        {
59                            "id": "payer. network id"
60                        }
61                    ],
62                    "facilitySpecialties": [
63                        {
64                            "id": "fac. spec. id"
65                        }
66                    ]
67                }
68            ],
69            "boardCertifications" : [
70                {
71                    "id": "board certification id"
72                }
73            ],
74            "awards" : [
75                {
76                    "id": "award id"
77                }
78            ]
79        }
80    ]
81}

Error Handling

This API supports bulk transactions, but Healthcare Provider records are committed one at a time. An input request can succeed in full or in part. Each provider included in the request succeeds or fails on its own.

For each record requested, HealthcareProvider creation is rolled back, along with any Account or Contact records created, at the first error for the request. If one related object fails, the remaining related objects are not attempted.

For example, if an input request contains 50 provider records and 10 of those records fail, the remaining 40 records are created. You only need to resubmit the failed providers, not the whole request.

Response Codes

Error Code Http Status Code Error Message
Bad Request 400 Your request contains invalid data types. Correct the value in section <section name>, field <JSON key>.
INSUFFICIENT_ACCESS 403 You don't have permission to perform this action on <object name> records. Contact your Salesforce admin for help.
"ResourceApiException CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY" Account: bad field names on insert/update call: Namea
"ResourceApiException CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY" sObject type 'HealthcareProvider' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity
"ResourceApiException CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY" Required fields are missing: [Name]
Exception Invalid format of the given date-time object <input date/time>
Bad Request 400 There is no input in the request body. Resubmit the request with valid input in the request body.
Bad Request 400 We couldn't parse the JSON input. Restructure the JSON and try again.
Too Many Requests 429 Your request contains <XXX> records. Reduce the number of records to fewer than <YYY> and try again.
Wrong Record Type An Account record is required for a facility. Resubmit the request with an Account record.
Too Many Record Types Resubmit the request with an Account record or a Contact record but not both.
Specify Provider Type Provider type is not specified. Resubmit the request indicating provider type as facility or practitioner.
Bad Request 400 "Out of Array of allowed Values(picklist) - for static picklist"
PersonAccount isnt enabled in the org, if input request is for a PA
Lookup not found, Specialty Code for eg
Bad Request 400 Missing required fields on standard objects