Repository navigation
Backend Appointments and Scheduling
The heart of the clinical workflow — the full appointment lifecycle, availability, rooms/in-patient, triage/occupancy, and encounters/cases. Part of Backend Overview.
An appointment moves through: requested → accepted/rejected → checked-in → admitted → ready-for-billing → completed/no-show (see the state machine in the PIMS architecture guide). There are two route trees: a mobile one (pet-owner / object-scoped via requireMobileAuth, not role-based) and a PMS one (RBAC-guarded). This is the subsystem that most exercised the Prisma migration — now complete, with the dual-write/read-switch scaffold removed in PR #1819 (merged 2026-07-18); the active service is appointment.prisma.service.ts, with a legacy appointment.service.ts still alongside.
stateDiagram-v2
[*] --> Requested
Requested --> Accepted: accept (PMS)
Requested --> Rejected: reject
Accepted --> CheckedIn: check-in
CheckedIn --> Admitted: admit (in-patient)
CheckedIn --> ReadyForBilling: mark for billing
Admitted --> ReadyForBilling
ReadyForBilling --> Completed
CheckedIn --> NoShow: no-show (worker)
Completed --> [*]
appointment.router.ts, availability.router.ts, base-availability.router.ts, organisation-room.router.ts, room-unit.router.ts, room-unit-group.router.ts, service.router.ts, healthcare-service.router.ts, encounter.router.ts, episode-of-care.router.ts.
web/appointment.prisma.controller.ts (active) + legacy web/appointment.controller.ts; web/availability.controller.ts, web/base-availability.controller.ts; web/organisation-room.controller.ts, web/room-unit.controller.ts (+ room-unit.controller.shared.ts), web/room-unit-group.controller.ts; web/service.controller.ts; web/case-encounter.controller.ts (exports EncounterController and CaseController).
appointment.prisma.service.ts (active) + legacy appointment.service.ts; availability.service.ts, base-availability.service.ts; organisation-room.service.ts, room-unit.service.ts, room-unit-group.service.ts, room-management.helpers.ts; service.service.ts; case-encounter.service.ts; scheduling helpers in utils/scheduling.ts.
appointment.ts, base-availability.ts, weekly-availablity-override.ts (sic), organisation-room.ts, occupancy.ts, service.ts.
queues/appointment.queue.ts (AppointmentQueue, job MARK_NO_SHOW) + queues/appointment.scheduler.ts + workers/appointment.worker.ts → AppointmentService.markNoShowAppointments. See Backend: Realtime, Chat, Jobs.
- The active service exposes methods like
createAppointmentFromPms,approveRequestedFromPms,checkInAppointment,admitAppointmentToInpatient,rescheduleFromParent,cancelAppointment— with business logic in transactional helpers (createAppointmentwrapped inprisma.$transaction,upsertAppointmentOccupancy,ensureEncounterOnCheckIn). - In-patient care is modeled via rooms/room-units + occupancy; triage and encounters/episodes-of-care provide the clinical context around a visit.
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki