Skip to main content

Facility — How it works

Overview

The facility engine models where care happens: facilities and their internal structure (departments, locations, rooms), the services a facility offers, and per-facility configuration. Facilities carry logical geography ids so they roll up through the metadata hierarchy for geographic access scoping (GeographyScopeResolver).

Data model & ownership

TablePurpose
facilityA care location; tenant-scoped; logical geography ids.
departmentA unit within a facility.
location / roomPhysical sub-structure.
facility_serviceServices the facility offers.
facility_configurationPer-facility settings.

Key rules & invariants

  • A facility's geography ids reference the metadata hierarchy; inherited geographic scopes cover facilities via GeographyScopeResolver.
  • Departments/locations/rooms belong to their facility; access scopes can target facility or department.

API

See the API Reference. Endpoint groups under /api/v1/facility: facilities, departments, locations, rooms, services, configuration.

Configuration & feature flags

None.