Referral Letter

POST /api/v1/referralReturns a Referral Letter in string format. This endpoint requires both a transcript and a summary from a consultation to generate a referral letter. Optional parameters include template for custom formatting and patientData for additional patient context. Critical information needed in the referral letter that is unable to be sourced from the summary or transcript is enclosed within square brackets.HEADER PARAMETERS
REQUIREDX-Scrubs-Clinic-Codestring
Clinic code or identifier of the clinic making the API request.
REQUIREDX-Scrubs-Clinic-Providerstring
Provider ID associated with your EHR application.
REQUIREDX-Scrubs-<any-other-header>any
Other required headers depending on your organisation's provider ID.
BODY PARAMETERS
REQUIREDtranscriptstring
A consultation transcription. It does not need to follow the format of transcription endpoint.
REQUIREDsummarystring
A consultation summary. It does not need to follow the format of summaries from the summary endpoint but should resemble a SOAP note.
OPTIONALtemplatestring
An optional template for the referral letter. If provided, Scrubs will use this template structure and fill in the content within curly braces.
OPTIONALpatientDataobject
An optional object containing structured patient data that will be incorporated into the referral letter to provide additional context.
Domain
BASE URL
1https://usescrubs.com
Sample Request
CURL
NodeJS
Python
Go
CURL
1curl --location 'https://usescrubs.com/api/v1/referral' \
2--header 'X-Scrubs-Clinic-Code: 00A123' \
3--header 'X-Scrubs-Clinic-Provider: SAMPLE_EHR_1' \
4--header 'Content-Type: application/json' \
5--data '{
6    "transcript":"Hi, doctor, I have been having a headache for the past 1 week ...",
7    "summary":"Patient reports having a headache for the past week ...",
8    "template":"Dear {recipient}, ...",
9    "patientData": {
10        "name": "John Doe",
11        "age": 45,
12        "gender": "Male",
13        "medicalHistory": ["Hypertension", "Diabetes"],
14        "medications": ["Metformin", "Lisinopril"]
15    }
16}'
Sample Response
JSON
1{
2    "referral": "Dear [Name of Doctor], I am referring Mr. John [Patient's Last Name], ..."
3}
Contact us: support@usescrubs.com