GetReferrals

Returns the referrals that meets the search criteria.

JavaScript library method

patientportal.referrals.getReferrals({
    patient: <patient>,
    text: <text>,
    status: <status>,
    referralNumber: <referral-number>,
    patientName: <patient-name>,
    referrerName: <referrer-name>,
    department: <department>,
    division: <division>,
    case: <case>,
    pageSortColumn: <page-sort-column>,
    pageSortDescending: <page-sort-descending>,
    pageNumber: <page-number>,
    pageSize: <page-size>
});

HTTP Method

Verb URL
GET /patientportalapi/referrals/referrals

URL Parameters

patient

string (optional)

The key of the patient provided by the API upon GetPatients.

text

string (optional)

Any text the API will try to filter by patient’s/referrer’s name, email, employee number or by referral number if the text is a number.

status

int (optional)

Status filter:

  • 0 – <disabled, filter no active>
  • 1 – Questionnaire required
  • 2 – Documents required
  • 3 – In progress
  • 4 – Closed only
  • 5 – Opened only

referral-number

string (optional)

The number of the referral.

patient-name

string (optional)

The patient name.

referrer-name

string (optional)

The referrer name.

department

string (optional)

Key of the department provided by the API upon GetDepartments.

division

string (optional)

Key of the division provided by the API upon GetDepartments.

case

int (optional)

The case key for the referral.

page-sort-column

int (optional)

The column index to sort the result:

  • 0 – Last modification date
  • 1 – Referral number
  • 2 – Patient name
  • 3 – Referrer name
  • 4 – Date created

By default the result is sorted by last modification date.

page-sort-descending

int (optional)

True to sort result descending. Note that this parameter is ignored for column index 0.

page-number

int (optional)

Required page number. Default 1.

page-size

int (optional)

Required page size. Default 10. Minimum 5. Maximum 50.

Returns

ReferralOverviewData[]

Returned JSON

{
    "Items": [
        {
            "Key": "R123",
            "PatientName": "Mr. John Smith",
            "ReferredBy": "Mr. Will Smith",
            "CreatedDate": "2015-03-13T14:22:12",
            "ModifiedDate": "2015-03-13T14:52:30",
            "State": "InProgress",
            "StateDisplayName": "In progress",
            "StateColor": "green",
            "SLARequired": true,
            "SLAFailed": true,
            "SLAFailedReason": "The appointment was not placed within the SLA (5 days): Patient cannot meet SLA.",
            "ReferralNumber": 13911,
            "AppointmentType": {
                "Name": "Referral",
                "Key": "REF1",
                "Notes": "",
                "CanBookAppointment": true,
                "CanReferPatient": true
            },
            "DaysToReviewDischargeLetterByPatient": 3
        }
    ],
    "TotalCount":1,
    "CurrentPage":1,
    "PageSize":10,
    "SortColumn": 0,
    "SortDescending": false
}