GetQuestionnaires

Gets all questionnaires for future appointments based on filters. Gets complete, incomplete and partially complete questionnaires.

JavaScript library method

patientportal.appointment.getQuestionnaires({
    patient: <patient>,
    questionnaireTypeName: <questionnaire-type-name>,
    expirationFrom: <expiration-from>,
    expirationTo: < expiration-to>,
    status: <status>,
    appointment: <appointmentId>,
    pageSortColumn: <page-sort-column>,
    pageSortDescending: <page-sort-descending>,
    pageNumber: <page-number>,
    pageSize: <page-size>
});

HTTP Method

Verb URL
GET /patientportalapi/appointment/questionnaires

URL Parameters

patient

string (optional)

The key of the patient provided by the API upon section Patients.

Default is undefined which returns questionnaires for all patients.

questionnaire-type-name

string (optional)

The questionnaire type name filter. Optional if appointment id is provided

expiration-from

DateTime (optional)

The questionnaire start date filter.

expiration-to

DateTime (optional)

The questionnaire start date filter.

status

int (optional)

Status code of the questionnaire:

  • 0 = Incomplete
  • 1 = Complete
  • 2 = Partially Complete
  • -1 = all

Default: -1

appointment

Int
(optional)

Appointment id to get questionnaires of a booked appointment. Optional if questionnaire name is provided.

page-sort-column

int (optional)

The column index to sort the result:

  • 0 –Expiration date
  • 1 – Status

Default: 0

page-sort-descending

int (optional)

True to sort result descending. Default false.

page-number

int (optional)

Required page number. Default 1.

page-size

int (optional)

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

Returns

QuestionnaireOverviewData[]

Returned JSON

{
    "Items": [
        {
            "Key": "q13788",
            "Name": "Basic questionnaire",
            "Description": "",
            "StatusCode": 0,
            "Status": "Incomplete",
            "AppointmentKey": "apt5821",
            "Expiration": "2013-08-25",
            "Sent": "2013-07-01",
            "ReferralKey": "8ebb55f10382d73e494e7207d1bd7272",
            "CanRefer": 0
        }
    ],
    "TotalCount":1,
    "CurrentPage":1,
    "PageSize":10,
    "SortColumn": 0,
    "SortDescending": false
}

Remarks

Overview data doesn’t contain definitions of questionnaires (questionnaire markup). The client has to call GetQuestionnaireDetail to retrieve it.