Get Visit Types

Overview

get_visit_types retrieves available visit types for the patient from the scheduling system. It should only be called when scheduling with Direct Scheduling providers — for Open Scheduling providers, the visit type code is determined by the skill's decision tree instead. It returns a list of visit types, each with a code (the ID to pass as visit_type_id), text (display name, e.g. 'Office Visit'), and status. The patient selects a visit type, and its code is then passed as visit_type_id to get_scheduling_slots. This tool may fail if the patient is not registered for online scheduling with the health system.

Optional Parameters

patient_id (string)

  • Default: None
  • Patient ID (EMPI). Optional — returns all visit types if omitted.

debug (boolean)

  • Default: false
  • Whether to display debugging information.

Returns

Returns a VisitTypesResult object with:

  • visit_types (list, optional) — The available visit types. Each entry has:
    • code (string, optional) — Visit type code/ID, to be passed as visit_type_id.
    • text (string, optional) — Visit type display name.
    • status (string, optional) — Visit type status.
  • count (integer, optional) — Number of visit types returned.
  • Also includes the shared base result fields: result, error, urls, meta, and debug (the latter two populated only when debug=true).

Notes

  • This tool is typically the first step of the new-appointment booking flow: get_visit_typesget_scheduling_slotsschedule_appointment.
  • If this tool fails with a "patient not registered" error, call register_patient for the relevant department, then retry get_visit_types.


Did this page help you?