API Referrals

See API Specification

Referrals GET

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.

Example Request:
GET /referrals
GET /referrals?Offset=200

Example Response:
[
{
"ReferralNum": 1,
"LName": "Davidson",
"FName": "Norm",
"MName": "",
"Specialty": 465,
"specialty": "Endodontics",
"Note": "",
"NotPerson": "false",
"Title": "DMD",
"PatNum": 0,
"IsDoctor": "true",
"isPatient": "false"
},
{
"ReferralNum": 2,
"LName": "Facebook Ad",
"FName": "",
"MName": "",
"Specialty": 0,
"specialty": "",
"Note": "Ad active from 06/01/2021 to 09/01/2021",
"NotPerson": "true",
"Title": "",
"PatNum": 0,
"IsDoctor": "false",
"isPatient": "false"
},
{
"ReferralNum": 3,
"LName": "Beringer",
"FName": "Debbie",
"MName": "L",
"Specialty": 0,
"specialty": "",
"Note": "",
"NotPerson": "false",
"Title": "",
"PatNum": 435,
"IsDoctor": "false",
"isPatient": "true"

},
etc...
]

200 OK

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": "",
"NotPerson": "false",
"Title": "Mr",
"PatNum": 435,
"IsDoctor": "false",
"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",
"NotPerson": "false",
"Title": "DDS",
"PatNum": 0,
"IsDoctor": "true",
"isPatient": "false"
}

200 OK
400 BadRequest (Missing or Invalid fields)
404 NotFound (with explanation)