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": "Endodontics",
"Note": "",
"NotPerson": "false",
"Title": "DMD",
"PatNum": 0,
"IsDoctor": "true",
"isPatient": "false"
},
{
"ReferralNum": 2,
"LName": "Facebook Ad",
"FName": "",
"MName": "",
"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": "",
"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. 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": "",
"Note": "",
"NotPerson": "false",
"Title": "Mr",
"PatNum": 435,
"IsDoctor": "false",
"isPatient": "true"
}

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