Skip to main content

SIL House Calendars

Overview

SIL House Calendars provide appointment and schedule management for Supported Independent Living houses. Each SIL house gets a dedicated calendar linked to its venue record, with residents assigned colours for visual filtering and tracking.

Architecture

Calendar Type: sil_house

SIL house calendars extend the shared calendar system with:

  • Venue linking — each calendar is linked to a core_source.venues record
  • Resident assignment — participants are assigned to the calendar with individual colours
  • Staff assignment — support workers can be assigned to accompany residents to appointments
  • Outcome tracking — post-appointment notes collected via the staff portal token system
  • Appointment types — categorised events (GP, specialist, therapy, NDIS review, etc.)

Data Flow

Venue (SIL House)
└── Calendar (sil_house type)
├── calendar_resident (participant + colour)
└── calendar_event
├── calendar_event_resident (which residents)
├── assigned_staff_id (who's accompanying)
├── transport_required
├── appointment_type
├── outcome_status / outcome_notes
└── calendar_event_notification (reminders/alerts)

Key Tables

TableSchemaPurpose
admin_calendar.calendarExtended with venue_id, type sil_houseThe calendar itself
admin_calendar.calendar_residentNewLinks participants to calendar with colours
admin_calendar.calendar_event_residentNewLinks events to specific residents
admin_calendar.calendar_eventExtended with staff, transport, outcome fieldsAppointment details

API Endpoints

Resident Management

  • GET /api/v1/admin-calendar/sil/:calendarId/residents
  • POST /api/v1/admin-calendar/sil/:calendarId/residents
  • PATCH /api/v1/admin-calendar/sil/:calendarId/residents/:id
  • DELETE /api/v1/admin-calendar/sil/:calendarId/residents/:id

Event Extensions

Events on SIL house calendars accept additional fields:

  • residentIds — array of participant UUIDs
  • assignedStaffId — UUID of the support worker
  • transportRequired — boolean
  • appointmentType — string from predefined list

Outcome Collection

  • POST /api/v1/admin-calendar/events/:id/request-outcome — trigger outcome request
  • GET /api/v1/admin-calendar/outcome/:token — public outcome form
  • POST /api/v1/admin-calendar/outcome/:token — submit outcome

Cross-Entity Queries

  • GET /api/v1/admin-calendar/participant/:id/schedule — resident's appointments
  • GET /api/v1/admin-calendar/venue/:id/upcoming — house's upcoming appointments

Frontend Features

Resident Colour Chips

A horizontal bar of clickable chips filters the calendar by resident. Each chip shows the resident's name and assigned colour. Click to toggle visibility.

Event Modal

For SIL house calendars, the event creation modal includes resident selector, staff assignment, transport flag, and appointment type. Colour is auto-assigned from the primary resident.

Outcome Display

Appointment outcomes (attended/missed, notes, follow-up required) display on event detail view, participant schedule tab, and venue upcoming appointments.

Notification Integration

Uses the existing calendar_event_notification system:

  • Reminders to assigned staff before appointments
  • Alerts on schedule changes
  • Outcome request reminders if not submitted within 24 hours
  • Staff Portal Tokens (core_source.staff_portal_tokens) — outcome form authentication
  • Reggie — sends outcome request SMS/email to staff
  • Venues (core_source.venues) — SIL house records
  • Participants (core_source.participants) — resident records
  • Calendar Notifications (admin_calendar.calendar_event_notification) — reminders and alerts