Overview
TheAppointment entity manages scheduled appointments between patients and service providers. It includes status tracking, duration management, and soft deletion capabilities.
Interface Definition
Properties
Unique identifier for the appointment
Identifier of the patient associated with this appointment
ISO 8601 timestamp for the scheduled appointment date and time
Duration of the appointment in minutes
Current status of the appointment. Must be one of:
pending: Appointment is scheduled and awaiting completioncancelled: Appointment has been cancelledcompleted: Appointment has been completed
ISO 8601 timestamp indicating when the appointment was created
ISO 8601 timestamp indicating when the appointment was last updated
Soft deletion flag. When
true, the appointment is marked as deleted but not removed from the databaseOptional notes or additional information about the appointment
Usage Example
Common Operations
Creating a New Appointment
Updating Appointment Status
Cancelling an Appointment
Status Workflow
The typical appointment status flow:- pending: Initial state when appointment is created
- completed or cancelled: Final states
Once an appointment is marked as
completed or cancelled, it typically should not transition to other states.