Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Create Referral Action

Create a patient referral record. A patient referral consists of multiple objects, such as an account, clinical service request, and clinical service request detail.

This action is available in API version 59.0 and later for users with the Health Cloud license.

Supported REST HTTP Methods

URI
/services/data/vXX.X/actions/standard/createReferral
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
matchDuplicates
Type
Boolean
Description
Indicates whether to match a duplicate record that has the highest matching confidence (true) or not (false).
performers
Type
String[]
Description
Required. Comma-separated list of IDs of the organizations or practitioners who perform the service.
referralDetailsRecords
Type
Reference
Description
Collection of ClinicalServiceRequestDetails records that contain the referral information.
referralNotes
Type
String
Description
Referral notes.
referralRecord
Type
Reference
Description
Required. ClinicalServiceRequest record that contains referral information.
requesterId
Type
String
Description
Required. ID of the provider requesting the service.
subjectRecord
Type
Reference
Description
Required. Account details of the patient being referred.

Outputs

Output Details
referralIds
Type
String[]
Description
List of IDs of the new referral records.

Example

Sample Request

1{
2   "inputs":[
3      {
4         "subjectRecord":{
5            "Id":"001RM000005bZVvYAM",
6            "FirstName":"Joe",
7            "LastName":"Clark"
8         },
9         "requesterId":"001RM000005bZW0YAM",
10         "performers":[
11            "001RM000005bZW5YAM"
12         ],
13         "referralRecord":{
14            "Priority":"Routine",
15            "Status":"Draft",
16            "Type":"Plan"
17         },
18         "matchDuplicates":false,
19         "referralNotes":"This is an urgent request",
20         "referralDetails":[
21            {
22               "detailType":"Insurance",
23               "detailRecordType":"Member Plan",
24               "detailRecordId":"0SqRM00000000N10AI"
25            }
26         ]
27      }
28   ]
29}

Sample Response

1{
2  "errors": null,
3  "isSuccess": true,
4  "outputValues": {
5    "referralIds": [
6      "0lvxx00004000001AAB"
7    ]
8  }
9}