API Referrals

See API Specification

See Referral List for more information.

Referrals GET (single)

Version Added: 24.1.34

Gets a single referral.

Parameters:

ReferralNum: Required in URL.

Example Request:
GET /referrals/1

Example Response:
{
"ReferralNum": 1,
"LName": "Davidson",
"FName": "Norm",
"MName": "",
"Specialty": 465,
"specialty": "Endodontics",
"Note": "",
"IsHidden": "false",
"NotPerson": "false",
"Title": "DMD",
"PatNum": 0,
"IsDoctor": "true",
"DateTStamp": "2021-06-21 10:03:08",
"IsPreferred": "true",
"BusinessName": "",
"isPatient": "false"
}

200 OK
404 NotFound (with explanation)

Referrals GET (multiple)

Version Added: 21.4

Gets a list of all referral sources. These can be either a Provider, Patient, or non-patient. The description of non-patient sources is stored in the LName field.

Parameters: All optional.

IsHidden: (Added in version 24.1.34) Filter hidden responses. Either "true" or "false"
NotPerson: (Added in version 24.1.34) Filter referrals that are marked NotPerson. Either "true" or "false".
IsDoctor: (Added in version 24.1.34) Filter referrals that are marked IsDoctor. Either "true" or "false".
IsPreferred: (Added in version 24.1.34) Filter referrals that are marked Preferred. Either "true" or "false"
isPatient: (Added in version 24.1.34) Filter referrals that are marked isPatient. Either "true" or "false".

Example Requests:
GET /referrals
GET /referrals?IsPreferred=true
GET /referrals?IsPreferred=true&isPatient=true

Example Response:
[
{
"ReferralNum": 1,
"LName": "Davidson",
"FName": "Norm",
"MName": "",
"Specialty": 465,
"specialty": "Endodontics",
"Note": "",
"IsHidden": "false",
"NotPerson": "false",
"Title": "DMD",
"PatNum": 0,
"IsDoctor": "true",
"DateTStamp": "2021-06-21 10:03:08",
"IsPreferred": "true",
"BusinessName": "",
"isPatient": "false"
},
{
"ReferralNum": 2,
"LName": "Facebook Ad",
"FName": "",
"MName": "",
"Specialty": 0,
"specialty": "",
"Note": "Ad active from 06/01/2021 to 09/01/2021",
"IsHidden": "false",
"NotPerson": "true",
"Title": "",
"PatNum": 0,
"IsDoctor": "false",
"DateTStamp": "2021-07-21 11:03:08",
"IsPreferred": "true",
"BusinessName": "Facebook Ad",
"isPatient": "false"
},
{
"ReferralNum": 3,
"LName": "Beringer",
"FName": "Debbie",
"MName": "L",
"Specialty": 0,
"specialty": "",
"Note": "",
"IsHidden": "false",
"NotPerson": "false",
"Title": "",
"PatNum": 435,
"IsDoctor": "false",
"DateTStamp": "2021-09-21 12:03:08",
"IsPreferred": "false",
"BusinessName": "",
"isPatient": "true"

},
etc...
]

200 OK
400 BadRequest (with explanation)
404 NotFound (with explanation)

Referrals POST (create)

Version Added: 22.3

Creates a new Referral. Referrals can be for Patients (provide PatNum), Providers (provide specialty) or Non Persons (provide neither PatNum or specialty). In the last case, isPatient and IsDoctor will be set false automatically while NotPerson will be set to true. If you wish to create an associated RefAttach please see RefAttaches POST. Users cannot set the following fields: IsDoctor, isPatient and NotPerson.

LName: Required. The last name of a Referral source or Referral source description.
FName: Optional. The Referral source's first name.
MName: Optional. The Referral source's middle name or initial.
Title: Optional. The Referral source's title.
Specialty: Optional. definition.DefNum where definition.Category=35 (ProviderSpecialty). If this is set, IsDoctor is automatically set to true, while isPatient and NotPerson are set to false.
specialty: Optional. Only set this if the Referral source is a Provider. This is a definition.ItemName where the DefCat is ProviderSpecialty(35). If this is set, IsDoctor is automatically set to true, isPatient and NotPerson are set to false.
Note: Optional.
PatNum: Optional. Only set this if the Referral source is a Patient. The provided LName must match the Patient for whom the PatNum is given. This automatically sets FName, MName and Title based on the given Patient if they were not provided by the user. If this is set, isPatient is automatically set to true, IsDoctor and NotPerson are set to false.

Example Request:
POST /referrals
{
"LName": "Yellow Pages"
}

{
"LName": "Smith",
"FName": "James",
"PatNum": 435
}

{
"LName": "Smith",
"FName": "John",
"specialty": "Surgery"
}

Example Response:
{
"ReferralNum": 314,
"LName": "Smith",
"FName": "James",
"MName": "",
"Specialty": 0,
"specialty": "",
"Note": "",
"IsHidden": "false",
"NotPerson": "false",
"Title": "Mr",
"PatNum": 435,
"IsDoctor": "false",
"DateTStamp": "2021-06-21 10:03:08",
"IsPreferred": "false",
"BusinessName": "",
"isPatient": "true"
}

201 Created
400 BadRequest (Missing or Invalid fields)
404 NotFound "Patient not found"

Referrals PUT (update)

Version Added: 22.4.24

Updates an existing Referral. Referrals for a patient can only have the Note field modified. Note will overwrite any existing note.

LName: Optional. The last name of a Referral source or Referral source description.
FName: Optional. The Referral source's first name.
MName: Optional. The Referral source's middle name or initial.
Title: Optional. The Referral source's title.
Specialty: Optional. definition.DefNum where definition.Category=35 (ProviderSpecialty). If this is set, IsDoctor is automatically set to true, while isPatient and NotPerson are set to false. Use 0 to indicate None.
Note: Optional.

Example Requests:
PUT /referrals/325

{
"Note": "Referral credit added to account on 08/21/2022"
}

or

{
"LName": "Smithers",
"FName": "Jonathan",
"MName": "C",
"Title": "DDS",
"Specialty": 272,
"Note": "Out on Thursdays"
}

Example Response:
{
"ReferralNum": 325,
"LName": "Smithers",
"FName": "Jonathan",
"MName": "C",
"Specialty": 272,
"specialty": "Surgery",
"Note": "Out on Thursdays",
"IsHidden": "false",
"NotPerson": "false",
"Title": "DDS",
"PatNum": 0,
"IsDoctor": "true",
"DateTStamp": "2021-06-21 10:03:08",
"IsPreferred": "false",
"BusinessName": "Surgery Center",
"isPatient": "false"
}

200 OK
400 BadRequest (with explanation)
404 NotFound (with explanation)