Before any appointments can be booked, an administrator must define the available time slots for the clinic’s schedule. Each time slot is stored as aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pabloeferreyra/Turnero/llms.txt
Use this file to discover all available pages before exploring further.
TimeTurn record and appears in the dropdown that staff and patients use when creating or editing an appointment. There is no hard-coded schedule — every option the booking form offers comes directly from the TimeTurn table, so the system is fully flexible around your clinic’s operating hours.
The TimeTurn Model
| Field | Type | Description |
|---|---|---|
Id | Guid | Auto-generated primary key |
Time | string | The display value shown in the booking dropdown (e.g. "08:00") |
Turns | Navigation | All appointments that reference this time slot |
How Time Slots Are Used
When a user opens the appointment create or edit form, the controller callsgetTimeTurns.GetCachedTimes() to retrieve the full list of TimeTurn records from memory and populates a dropdown with each record’s Time string. The selected TimeTurn.Id is stored on the appointment (Turn) as a foreign key (TimeId). This means every appointment is permanently linked to a specific TimeTurn record — deleting the record later does not remove the appointment, but it does leave that TimeId pointing to a row that no longer exists.
Caching
Time slot records are loaded from the database once at application startup and held in memory under the cache key"timeTurns". All subsequent requests for the time slot list read from this cache rather than querying the database.
Because the list is cached at startup, newly created time slots will not appear in the appointment booking dropdown until the application is restarted. Plan your time slot configuration before going live, or restart the app after making changes.
Creating a Time Slot
Open the Create form
Navigate to GET
/TimeTurn/Create. A blank form is displayed with an Id (Guid) field and a Time text field.Enter the time value
Type the time string into the Time field. Use 24-hour
HH:mm format for consistency across the schedule (e.g. "08:00", "08:30", "14:00"). The value is stored and displayed exactly as entered — there is no automatic formatting.Deleting a Time Slot
Open the confirmation page
Navigate to GET
/TimeTurn/Delete/{id}. The controller loads the record with getTimeTurns.GetTimeTurn(id) and displays it for review. A 404 Not Found response is returned if the ID does not exist.Example Time Slot Configuration
The table below shows a typical morning/afternoon schedule for a clinic with 30-minute appointments:| Time | Period |
|---|---|
08:00 | Morning |
08:30 | Morning |
09:00 | Morning |
09:30 | Morning |
10:00 | Morning |
10:30 | Morning |
11:00 | Morning |
11:30 | Morning |
14:00 | Afternoon |
14:30 | Afternoon |
15:00 | Afternoon |
15:30 | Afternoon |
16:00 | Afternoon |
16:30 | Afternoon |
17:00 | Afternoon |
17:30 | Afternoon |
TimeTurn record via /TimeTurn/Create, then restart the application to warm the cache.
All Time Slot Routes at a Glance
| Method | Route | Description |
|---|---|---|
GET | /TimeTurn/Index | List all configured time slots |
GET | /TimeTurn/Create | Show the create form |
POST | /TimeTurn/Create | Save a new time slot (binds Id, Time) |
GET | /TimeTurn/Delete/{id} | Show the deletion confirmation page |
POST | /TimeTurn/Delete | Confirm and delete the time slot |
All routes under
/TimeTurn/ require the Admin role. Reception staff (Ingreso) and doctors (Medico) can use time slots in the booking form but cannot create or delete them.