Newer Version Available

This content describes an older version of this product. View Latest

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
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
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
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 you can use as a starting point for building request bodies and interpreting responses.

Sample Input: Create a Practitioner

  • A practitioner must be associated with a facility. In other words, don't create a Contact record without 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 are not supported.
  • The comments in these samples are for documentation purposes only and aren't meant to be valid JSON.

Note

1{
2    "providers": [{
3        "type": "practitioner", // facility / practitioner
4        "contact": {
5            "fields": {
6                "FirstName": "Richard",
7                "LastName": "Paul",
8                "Email": "richardpaul456@gmail.com",
9                "Description": "Richard Paul is a doctor."
10            }
11        },
12        "healthcareProvider": {
13            "fields": {
14                "ProviderType": "Medical Doctor",
15                "ProviderClass": "Solo Practitioner",
16                "EffectiveFrom": "2019-01-01",
17                "Hc4a_language__c" : "Spanish", // Custom field should have valid API name
18                "Hc4a_emergencyContactId__c" : { // custom lookup example
19                    "value" : "Samuel Miranda",
20                    "referenceField" : "Name"
21             }
22         }
23         "npis": [{
24             "fields": {
25                "Npi": "93847329810",
26                "NpiType": "Individual",
27                "IsActive": true
28            }
29        }],
30        "specialties": [{
31                "fields": {
32                    "SpecialtyId": {
33                        "value": "25",  // eg code for Orthopedic surgery
34                        "referenceField": "SpecialtyCode"
35                    },
36                    "IsPrimarySpecialty": true,
37                    "SpecialtyRole": "Specialist",
38                    "EffectiveFrom": "2019-02-15 18:05:32",
39                    "EffectiveTo": "2050-01-01 23:00:00",
40                    "IsActive": true
41                }
42            },
43            {
44                "fields": {
45                    "SpecialtyId": {
46                        "value": "32", 
47                        "referenceField": "SpecialtyCode"
48                    },
49                    "IsPrimarySpecialty": false,
50                    "SpecialtyRole": "Dual",
51                    "EffectiveFrom": "2019-08-25",
52                    "EffectiveTo": "2028-01-11",
53                    "IsActive": true
54                }
55            }
56        ],
57        "taxonomies": [{
58                "fields": {
59                    "TaxonomyId": {
60                        "value": "GG654KUU46",  // eg code for  Allopathic & Osteopathic Physicians/Orthopaedic Surgery
61                        "referenceField": "TaxonomyCode" 
62                    },
63                    "IsPrimaryTaxonomy": true,
64                    "EffectiveFrom": "2019-01-01",
65                    "EffectiveTo": "2040-01-01",
66                    "IsActive": true
67                }
68            },
69            {
70                "fields": {
71                    "TaxonomyId": {
72                        "value": "RR169APP55",
73                        "referenceField": "TaxonomyCode"
74                    },
75                    "IsPrimaryTaxonomy": false,
76                    "EffectiveFrom": "2019-01-01",
77                    "EffectiveTo": "2030-01-01",
78                    "IsActive": true
79                }
80            }
81        ],
82        "practitionerFacilities": [{
83                "fields": {
84                    "AccountId": {
85                        "value": "001RM000004yhnPYAQ",
86                        "referenceField": "Id"
87                    },
88                    "InitialStartDate": "2019-02-04",
89                    "IsPrimaryFacility": true,
90                    "LowestValidAge": 12,
91                    "OperatingHoursId": { // using existing operating hours
92                        "value": "0OHRM0000000FdI4AU",
93                        "referenceField": "Id"
94                    }
95                },
96                "facilityNetworks": [{
97                        "fields": {
98                            "PayerNetworkId": {
99                                "value": "HCPN _UIDbbbbcbbc_b_baa",
100                                "referenceField": "Name"
101                            },
102                            "IsActive": true,
103                            "GenderRestriction": "Male",
104                            "HighestValidAge": 99,
105                            "LowestValidAge": 5,
106                            "PanelStatus": "Panel open",
107                            "PanelLimit": 10
108                        }
109                    },
110                    {
111                        "fields": {
112                            "PayerNetworkId": {
113                                "value": "HCPN _UIDbbbbcbbc_b_bb",
114                                "referenceField": "Name"
115                            },
116                            "IsActive": true,
117                            "GenderRestriction": "Female",
118                            "HighestValidAge": 99,
119                            "LowestValidAge": 5,
120                            "PanelStatus": "Panel open",
121                            "PanelLimit": 10
122                        }
123                    }
124                ],
125                "facilitySpecialties": [{
126                    "fields": {
127                        "SpecialtyId": {
128                            "value": "Addiction Medicine",
129                            "referenceField": "Name"
130                        },
131                        "IsPrimarySpecialty": true,
132                        "SpecialtyRole": "Specialist"
133                    }
134                }]
135            },
136            {
137                "fields": {
138                    "AccountId": {
139                        "value": "001RM000004zJ9WYAU",
140                        "referenceField": "Id"
141                    },
142                    "InitialStartDate": "2018-05-12",
143                    "IsPrimaryFacility": false
144                },
145                "operatingHours": { // to create a new operating hour for the facility
146                    "fields": {
147                        "Name": "AetnaSFHours",
148                        "Description": "MWF9-5"
149                    },
150                    "timeSlots": [{
151                        "fields": {
152                            "DayOfWeek": "Monday",
153                            "StartTime": "09:00:00.000Z",
154                            "EndTime": "17:00:00.000Z",
155                            "Type": "Normal"
156                        }
157                    }]
158                },
159                "facilityNetworks": [{
160                    "fields": {
161                        "PayerNetworkId": {
162                            "value": "HCPN _UIDbbbbcbbc_b_bac",
163                            "referenceField": "Name"
164                        },
165                        "IsActive": true,
166                        "GenderRestriction": "Male",
167                        "HighestValidAge": 99,
168                        "LowestValidAge": 5,
169                        "PanelStatus": "Panel open",
170                        "PanelLimit": 10
171                    }
172                }],
173                "facilitySpecialties": [{
174                    "fields": {
175                        "SpecialtyId": {
176                            "value": "Anatomic Pathology",
177                            "referenceField": "Name"
178                        },
179                        "IsPrimarySpecialty": true,
180                        "SpecialtyRole": "Dual"
181                    }
182                }],
183                "identifiers": [{
184                    "fields": {
185                        "IdValue": "1234",
186                        "EffectiveDate": "2020-12-12 00:00:00"
187                    }
188                }]
189            }
190        ],
191        "boardCertifications": [{
192            "fields": {
193                "CertificationType": "Dermatology",
194                "ExpirationDate": "2030-11-12 12:00:00",
195                "Status": "Certified"
196            }
197        }],
198        "awards": [{
199            "fields": {
200                "AwardDate": "2019-08-15 00:00:00",
201                "AwardedBy": "Barack Obama"
202            }
203        }],
204        "businessLicenses": [{
205            "fields": {
206                "Name": "Pediatric lab technician",
207                "Status": "Inactive"
208            }
209        }],
210        "accreditations": [{
211                "fields": {
212                    "Type": "Hospital",
213                    "SubType": "Children's",
214                    "AccreditingBody": "Joint Commission",
215                    "Status": "Accreditated",
216                    "LastFullSurveyDate": "2018-01-11 00:00:00"
217                }
218            },
219            {
220                "fields": {
221                    "Type": "Clinic",
222                    "SubType": "Children's",
223                    "AccreditingBody": "Joint Commission",
224                    "Status": "Verifying",
225                    "LastFullSurveyDate": "2020-01-11 00:00:00"
226                }
227            }
228        ],
229        "personEducations": [{
230            "fields": {
231                "Name": "MedicalDegree",
232                "EducationLevel": "Masters",
233                "IsActive": true,
234                "Status": "Verified",
235                "VerifiedDate": "2020-01-11 00:00:00"
236            }
237        }],
238        "personEmployments": [{
239            "fields": {
240                "Name" : "UCSF Clinic",
241                "AnnualIncome": "400000",
242                "EmployerPhone": "4148767000",
243                "EndDate": "2040-01-01 00:00:00",
244                "RelatedPersonId" : {
245                     "value": "001RM000004zJ9WYAU",
246                     "referenceField": "Id"
247                 }
248            }
249        }],
250        "careProviderAdverseActions": [{
251                "fields": {
252                    "ActionType": "Court Order",
253                    "Status": "Active"
254                }
255            }
256        ]
257    }]
258}

Sample Input - Create a Practitioner From an Existing Contact

1{
2    "providers": [{
3        "type": "practitioner",
4        "contact": { // use an existing contact information, referenceField can be any unique field
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         "npis": [{
17             "fields": {
18                "Npi": "93847329810",
19                "NpiType": "Individual",
20                "IsActive": true
21            }
22        }],
23        "specialties": [{
24            "fields": {
25                "SpecialtyId": {
26                    "value": "Clinical Psychology",
27                    "referenceField": "Name"
28                },
29                "IsPrimarySpecialty": true,
30                "SpecialtyRole": "Specialist",
31                "EffectiveFrom": "2019-01-01 00:00:00",
32                "EffectiveTo": "2020-01-01 00:00:00",
33                "IsActive": true
34            }
35        }],
36        "taxonomies": [{
37            "fields": {
38                "TaxonomyId": {
39                    "value": "JT832CKV98",
40                    "referenceField": "TaxonomyCode"
41                },
42                "IsPrimaryTaxonomy": true,
43                "EffectiveFrom": "2019-01-01 00:00:00",
44                "EffectiveTo": "2020-01-01 00:00:00",
45                "IsActive": true
46            }
47        }],
48        "practitionerFacilities": [{
49            "fields": {
50                "AccountId": {
51                    "value": "Jay Sean Clinic",
52                    "referenceField": "Name"
53                },
54                "InitialStartDate": "2019-02-04 00:00:00",
55                "IsPrimaryFacility": true,
56                "LowestValidAge": 12,
57                "OperatingHoursId": {
58                    "value": "OH Mon-Sun",
59                    "referenceField": "Name"
60                }
61            },
62            "facilityNetworks": [{
63                "fields": {
64                    "PayerNetworkId": {
65                        "value": "HCPN _UIDbbbbcbbc_b_bbc",
66                        "referenceField": "Name"
67                    },
68                    "IsActive": true,
69                    "GenderRestriction": "Male",
70                    "HighestValidAge": 99,
71                    "LowestValidAge": 5,
72                    "PanelStatus": "Panel open",
73                    "PanelLimit": 10
74                }
75            }],
76            "facilitySpecialties": [{
77                "fields": {
78                    "SpecialtyId": {
79                        "value": "Chiropractic",
80                        "referenceField": "Name"
81                    },
82                    "IsPrimarySpecialty": true,
83                    "SpecialtyRole": "Specialist"
84                }
85            }],
86            "identifiers": [{
87                "fields": {
88                    "IdValue": "1234231",
89                    "EffectiveDate": "2020-12-12 00:00:00"
90                }
91            }]
92        }],
93        "boardCertifications": [{
94            "fields": {
95                "CertificationType": "Dermatology",
96                "ExpirationDate": "2030-11-12 00:00:00",
97                "Status": "Certified"
98            }
99        }],
100        "awards": [{
101            "fields": {
102                "AwardDate": "2019-08-15 00:00:00",
103                "AwardedBy": "Barack Obama"
104            }
105        }],
106        "businessLicenses": [{
107            "fields": {
108                "Name": "Laser lab technician",
109                "Status": "Active"
110            }
111        }],
112        "accreditations": [{
113            "fields": {
114                "Type": "Laboratory",
115                "SubType": "General",
116                "AccreditingBody": "Joint Commission",
117                "Status": "Accreditated",
118                "LastFullSurveyDate": "2020-01-01 00:00:00",
119                "SourceSystem": "Aetna-SF",
120                "SourceSystemIdentifier": "accred5678"
121            }
122        }],
123        "personEducations": [{
124            "fields": {
125                "Name": "MedicalDegree",
126                "IsActive": true,
127                "EducationLevel": "Medical School",
128                "VerifiedDate": "2020-01-01 00:00:00"
129            }
130        }],
131        "personEmployments": [{
132            "fields": {
133                "Name": "Regis Hospital",
134                "AnnualIncome": "400000",
135                "EmployerPhone": "4148767000",
136                "RelatedPersonId" : {
137                    "value": "Jay Sean Clinic",
138                    "referenceField": "Name"
139                    },
140                "EndDate": "2055-11-01 00:00:00"
141            }
142        }],
143        "careProviderAdverseActions": [{
144            "fields": {
145                "AccreditationId": {
146                    "value": "AccreditationGeller",
147                    "referenceField": "Name"
148                },
149                "ActionType": "Disciplinary",
150                "Status": "Verified"
151            }
152        }]
153    }]
154}

Sample Input - Create a Practitioner as a Person Account

1{
2    "providers": [
3        {
4            "type": "practitioner", // facility | 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 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         "npis": [{
31             "fields": {
32                "Npi": "93847329810",
33                "NpiType": "Individual",
34                "IsActive": true
35                "Hc4a_CustomNPIAccount__c" : { // custom lookup example
36                        "value" : "Geller NPI Account", 
37                        "referenceField" : "Name" }
38        }],
39        "specialties": [{
40            "fields": {
41                "SpecialtyId": {
42                    "value": "15",
43                    "referenceField": "SpecialtyCode"
44                },
45                "IsPrimarySpecialty": true,
46                "SpecialtyRole": "Specialist",
47                "EffectiveFrom": "2019-01-01",
48                "EffectiveTo": "2036-01-01",
49                "IsActive": true
50            }
51        }],
52        "taxonomies": [{
53            "fields": {
54                "TaxonomyId": {
55                    "value": "101YA0400X",
56                    "referenceField": "TaxonomyCode"
57                },
58                "IsPrimaryTaxonomy": true,
59                "EffectiveFrom": "2019-01-01",
60                "EffectiveTo": "2020-01-01",
61                "IsActive": true
62            }
63        }],
64        "facilityNetworks": [{
65            "fields": {
66                "PayerNetworkId": {
67                    "value": "Code4",
68                    "referenceField": "Code"
69                },
70                "IsActive": true,
71                "GenderRestriction": "Male",
72                "HighestValidAge": 99,
73                "LowestValidAge": 5,
74                "PanelStatus": "Panel open",
75                "PanelLimit": 10
76            }
77        }],
78        "practitionerFacilities": [{
79            "fields": {
80                "PractitionerId": {
81                    "value": "Jimmy James",
82                    "referenceField": "Name"
83                },
84                "InitialStartDate": "2019-02-04",
85                "PrimaryLocation": true,
86                "LowestValidAge": 12
87            },
88            "facilityNetworks": [{
89                    "fields": {
90                        "PayerNetworkId": {
91                            "value": "Code2",
92                            "referenceField": "Code"
93                        },
94                        "IsActive": true,
95                        "GenderRestriction": "Male",
96                        "HighestValidAge": 99,
97                        "LowestValidAge": 5,
98                        "PanelStatus": "Panel open",
99                        "PanelLimit": 10
100                    }
101                },
102                {
103                    "fields": {
104                        "PayerNetworkId": {
105                            "value": "Code6",
106                            "referenceField": "Code"
107                        },
108                        "IsActive": true,
109                        "GenderRestriction": "Female",
110                        "HighestValidAge": 99,
111                        "LowestValidAge": 5,
112                        "PanelStatus": "Panel open",
113                        "PanelLimit": 5
114                    }
115                }
116            ],
117            "facilitySpecialties": [{
118                "fields": {
119                    "SpecialtyId": {
120                        "value": "22",
121                        "referenceField": "SpecialtyCode"
122                    },
123                    "Primary": true,
124                    "SpecialtyRole": "Specialist"
125                }
126            }]
127        }],
128        "boardCertifications": [{
129            "fields": {
130                "CertificationType": "Dermatology",
131                "ExpirationDate": "2030-11-12",
132                "Status": "Certified"
133            }
134        }],
135        "awards": [{
136            "fields": {
137                "Date": "2019-08-15",
138                "AwardedBy": "Barack Obama"
139            }
140        }],
141        "businessLicenses": [{
142            "fields": {
143                "Name": "Pyschology Clinician",
144                "Status": "Ongoing"
145            }
146        }],
147        "accreditations": [{
148            "fields": {
149                "Type": "Hospital",
150                "SubType": "Children's",
151                "AccreditingBody": "Joint Commission",
152                "Status": "Accreditated",
153                "LastFullSurveyDate": "2020-01-01"
154            }
155        }],
156        "careProviderAdverseActions": [{
157            "fields": {
158                "AccreditationId": {
159                    "value": "Geller Accreditattion",
160                    "referenceField": "Name"
161                },
162                "BoardCertificationId": {
163                    "value": "0YSRM00000003uQ4AQ",
164                    "referenceField": "Id"
165                },
166                "ActionType": "Disciplinary",
167                "Status": "Verified"
168            }
169        }]
170    }]
171}

Sample Input - Create a Facility From an Existing Account

1{
2    "providers": [
3        {
4            "type": "facility",
5            "account" : {  // existing account
6                "id" : {
7                    "value": "Geller Clinic",
8                    "referenceField" : "Name"
9                }
10            },
11            "healthcareProvider":{
12                "fields":{
13                    "ProviderType":"MedicalDoctor",
14                    "EffectiveFrom":"2019-01-01"
15                }
16            },
17         "npis": [{
18             "fields": {
19                "Npi": "93847329810",
20                "NpiType": "Individual",
21                "IsActive": true
22            }
23           }],
24            "specialties":[
25                {
26                    "fields":{
27                        "SpecialtyId": {
28                            "value": "26",
29                            "referenceField" : "SpecialtyCode"
30                        }, 
31                        "IsPrimarySpecialty": true,
32                        "SpecialtyRole": "Specialist",
33                        "EffectiveFrom": "2019-01-01",
34                        "EffectiveTo": "2020-01-01",
35                        "IsActive": true
36                    }
37                }
38            ],
39            "taxonomies":[
40                {                 
41                    "fields":{
42                        "TaxonomyId": {
43                            "value": "26",
44                            "referenceField" : "TaxonomyCode"
45                        },
46                        "IsPrimaryTaxonomy": true,
47                        "EffectiveFrom": "2019-01-01",
48                        "EffectiveTo": "2020-01-01",
49                        "IsActive": true
50                    }
51                }
52            ],
53            "facilityNetworks":[
54                {
55                    "fields":{
56                                "IsActive": true,
57                                "GenderRestriction": "Male",
58                                "HighestValidAge": 99,
59                                "LowestValidAge": 5,
60                                "PanelStatus": "Panel open",
61                                "PanelLimit": 10
62                            }
63            }],
64            "practitionerFacilities":[
65                {               
66                    "fields":{
67                        "PractitionerId":{
68                            "value":"Jimmy James",
69                            "referenceField":"Name"
70                        },
71                        "InitialStartDate": "2019-02-04",
72                        "PrimaryLocation": true,
73                        "LowestValidAge": 12
74                    },
75                    "facilitySpecialties": [
76                        {
77                            "fields":{
78                                "SpecialtyId": 20,
79                                "Primary": true,
80                                "SpecialtyRole": "Specialist"
81                            }
82                        }]
83             }],
84            "boardCertifications": [
85                    {
86                        "fields": {
87                            "CertificationType": "Dermatology",
88                            "ExpirationDate": "2030-11-12",
89                            "Status": "Certified"
90                        }
91                    }
92             ],
93            "accreditations" : [
94                    {
95                         "fields": {
96                            "Type": "Hospital",  
97                            "SubType": "Children's",
98                            "AccreditingBody" : "Joint Commission",
99                            "Status": "Accreditated",
100                            "LastFullSurveyDate": "2020-01-01"
101                     }  
102            }]
103     }]
104}

Sample Output Response

1{
2    "code": "200",
3    "message": "all good",
4    "success": true,
5    "providers": [
6        {
7            "type": "practitioner",
8            "code": "200",
9            "message": "all good",
10            "success": true,
11            "Contact":{
12                "id": "<contact id>"
13            },
14            "healthcareProvider":{
15                "id": "provider id"
16            },
17            "npis":[{
18                "id": "npi id"
19            }],
20            "specialties":[
21                {
22                    "id": "specialty id"
23                },
24                {
25                    "id": "specialty id"
26                }
27            ],
28            "taxonomies":[
29                {
30                    "id": "taxonomy id"
31                },
32                {
33                    "id": "taxonomy id"
34                }
35            ],
36            "facilityNetworks" :[
37                {
38                    "id": "facility network id"
39                }
40            ],
41            "practitionerFacilities":[
42                {
43                    "id": "pract. fac. id",
44                    "operatingHours" :[
45                        {
46                            "id" : "operating hours id"
47                        }
48                    ],
49                    "facilityNetworks": [
50                        {
51                            "id": "payer. network id"
52                        },
53                        {
54                            "id": "payer. network id"
55                        }
56                    ],
57                    "facilitySpecialties": [
58                        {
59                            "id": "fac. spec. id"
60                        }
61                    ]
62                },
63                {
64                    "id": "pract. loc. id",
65                    "facilityNetworks": [
66                        {
67                            "id": "payer. network id"
68                        },
69                        {
70                            "id": "payer. network id"
71                        }
72                    ],
73                    "facilitySpecialties": [
74                        {
75                            "id": "fac. spec id"
76                        }
77                    ]
78                }
79            ],
80            "boardCertifications" : [
81                {
82                    "id": "board certification id"
83                }
84            ],
85            "awards" : [
86                {
87                    "id": "award id"
88                }
89            ],
90            "businessLicenses" : [
91                {
92                    "id": "business license id"
93                }
94            ],
95            "accreditations" : [
96                {
97                    "id": "accreditation id"
98                },
99                {
100                    "id": "accreditation id"
101                }
102            ],
103            "personEducations" : [
104                {
105                    "id": "person education id"
106                }
107            ],
108            "personEmployments" : [
109                {
110                    "id": "person employment id"
111                }
112            ],
113            "careProviderAdverseActions" : [
114                {
115                    "id": "care provider adverse action id"
116                }
117            ]
118        }
119    ]
120}

Sample Output Response - Partial Success

1{
2    "code": "207",
3    "message": "all good", // general message? Prod & CX
4    "success": true, // ??
5    "providers": [
6        {
7            "type": "facility",
8            "code" : "",
9            "message" : "Specialty Code "409" not found" //This error will come from validation logic
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