Outputs overview#
After running the .generate() method, medscheduler produces three interconnected outputs that
together simulate an outpatient scheduling system. Each output is returned as a pandas DataFrame and
can optionally be exported to CSV files for portability.
Appointments is the primary dataset and usually sufficient for analysis.
Slots enables capacity and utilization studies.
Patients provides demographic context and can be linked to appointments for richer analysis.
1. Appointments (primary output)#
The appointments table is the central dataset. It contains all information needed for most analytics workflows and can often be used on its own without referencing the auxiliary tables.
Key columns#
Column |
Description |
|---|---|
|
Unique identifier for each appointment. |
|
Links the appointment to a calendar slot. |
|
Identifier of the assigned patient. |
|
Date when the appointment was booked. |
|
Days between scheduling and appointment date (lead time). |
|
Scheduled date of the visit. |
|
Scheduled time of the visit. |
|
Outcome of the appointment: attended, did not attend, cancelled, rebooked, unknown. |
|
Patient demographics attached to the appointment. |
|
Actual time of arrival (attended only). |
|
When the consultation began and ended. |
|
Minutes waited before start. |
|
Duration of the consultation in minutes. |
Tip: For most analyses (attendance, waiting time, cancellations), this is the only table you need.
2. Slots (auxiliary)#
The slots table represents the appointment calendar capacity.
It is useful for analyzing utilization, availability, and overbooking strategies.
Key columns#
Column |
Description |
|---|---|
|
Unique identifier for each slot. |
|
Date of the slot. |
|
Time of the slot. |
|
Boolean flag indicating if the slot is still open. |
3. Patients (auxiliary)#
The patients table contains the synthetic registry of individuals who may receive appointments. Demographics are generated using age–sex distributions derived from NHS data, but can be customized.
Key columns#
Column |
Description |
|---|---|
|
Unique identifier for each synthetic patient. |
|
Fake name (generated with |
|
Biological sex of the patient. |
|
Age in years. |
|
Date of birth (if configured). |
|
Age band for grouped analysis. |
Next steps#
Continue to Customization options for detailed control of dataset generation.
Examine Appointments table for the main analytical output.
Review Patients table to understand how the synthetic population is structured.
Explore Slots table for insights into scheduling capacity and utilization.