Skip to main content

AppointmentScheduler

A scheduling widget for creating patient appointments with full FHIR R4 field support.

Usage

import { AppointmentScheduler } from '@clinikapi/react';

<AppointmentScheduler
  proxyUrl="/api/clinik"
  patientId="pt_abc123"
  practitionerId="prac_def456"
  theme="light"
/>

Props

PropTypeRequiredDescription
proxyUrlstringYesBackend proxy URL
patientIdstringYesPatient ID
practitionerIdstringNoDefault practitioner
theme'light' | 'dark'NoColor theme

Form Fields

The scheduler collects:
FieldDescription
Date & TimeAppointment start time
Duration15, 30, 45, 60, or 90 minutes
Appointment typeRoutine, follow-up, urgent, walk-in, check-up
Service typeWhat service is being booked (e.g. “Cardiology consultation”)
SpecialtyRequired specialty (e.g. “Cardiology”, “Dermatology”)
PriorityRoutine (0), low (1), medium (5), high (9) urgency
DescriptionSubject line for the appointment
ReasonReason for the visit
Patient instructionsInstructions for the patient (e.g. “Fast for 12 hours”)

Proxy Action

The widget sends appointments.create with:
{
  "action": "appointments.create",
  "data": {
    "status": "booked",
    "patientId": "pt_abc123",
    "practitionerId": "prac_def456",
    "start": "2025-02-01T14:00:00Z",
    "minutesDuration": 30,
    "appointmentType": "followup",
    "serviceType": "Cardiology consultation",
    "specialty": "Cardiology",
    "priority": 0,
    "description": "Follow-up for hypertension",
    "reasonCode": "Blood pressure check",
    "patientInstruction": "Bring home BP log"
  }
}