SLH PeoplePower

Coverage Console · Sign in to continue
Access is restricted to SLH staff.
New here? Use Create an account below. Forgot your password? Use the button above.

SLH PeoplePower Coverage Console

— —
build: v0.276-hf2
Connecting to Supabase…
Your account is pending setup. You have Admissions access for now — an admin will enable the rest once your profile (role, class, ward) is configured.

Welcome.

Your upcoming
Loading…

Ward Dashboard : 

Wards
Loading…
Clinics
Loading…
CCT Home Care
Loading…
Leave Planner
Submit leave for engine review. Tier 1 violations block; Tier 2 warnings can be acknowledged.
Switch to this tab to load.
Loading…
St Luke's Hospital · Inpatient Wards
Loading data…
Workload table loads after the roster…

Call Roster : 

📞 On-Call · 🛏️ Standby · 👥 Weekend team · 😴 Post-call · PH · Away: n on leave
SLCC — Loading…
St Luke's Community Clinic · Outpatient sessions
Switch to this tab to load clinic data.
CCT Roster — Loading…
Community Care Team · Home-care sessions · Drag a slot from one cell to another to move it.
Switch to this tab to load the CCT roster.
Transfer Audit & Duty Team
Left: weekly Transfer Out Audit (facilitator rotates among ward-role Reg/Attendings; periods auto-tile, no gaps). Right: weekly Duty Team (ward team A–E rotates for low-intensity phone cover; Attending & Registrar follow the team). Visible to all staff; any signed-in user can edit both tables. Only "Generate next 52 weeks" is admin-only.
Switch to this tab to load the audit schedule.
Bid for Work
Pick the on-call shifts and weekend-team seats you'd prefer to take. Successful bids earn bonus points (+10 weekday OC, +20 PH/weekend). Thursday OC bids cost 5 points up-front (refunded on cancel).
You can only bid on shifts that have not yet been assigned.
Loading…

Admissions

Pending admissions captured from the mobile app — assign each to an available MO. Per-ward load and who's clerking, for the chosen day. Anyone can edit; the last change is logged.

Hero MOs (all-time peak month)

# MO Peak admissions Achieved
Important Messages
Broadcast to doctor groups · track read & acknowledged
(⌃⌘Space for more emojis)
Send to
…and/or specific doctors
Switch to this tab to load doctors.
…or whole teams
Display from: blank = send now · set a future time to queue the alert
Persist:
Sent messages
Switch to this tab to load.

Rich text + emojis; paste image/GIF/video URLs (e.g. Giphy, YouTube). Doctors see targeted messages on their Home (desktop + mobile). DEV — admin-only. "Until acknowledged" persists until each doctor clicks Acknowledge; "For X days" auto-expires.

OIL Awards
Award ad-hoc Off-In-Lieu to staff · running ledger
Ledger
Switch to this tab to load the ledger.

Off-In-Lieu is ad-hoc and uncapped — award when directed by leadership. Enter negative days to record a correction. The balance shows in the Leave Planner (under Birthday Leave). DEV simulation: balances seeded 0–5; in production OIL is held/fed by the HR/Payroll system.

Backup & Restore
Admin-only data snapshots · create, download & restore
Restore from a downloaded .json backup — the DR path when prod is unavailable. A cross-environment import re-links logins by email.
Switch to this tab to load snapshots.

Snapshots are stored in the database (versioned) and can be downloaded as a JSON file for off-site safekeeping. Data only — not a full disaster-recovery backup (database schema, login accounts & the rules engine are not included; pair with a periodic pg_dump for that). The downloaded file contains real names, emails & leave details — handle as confidential. Restore replaces the snapshot's tables (replace-all) after showing a dry-run preview & auto-saving a safety snapshot of the current state, so it's reversible.

📖 Instructions & “shit happens” DR runbook

What each backup contains

  • Config + Leave — doctors, eligibility flags, caps, ward/team/clinic setup, service requirements, CCT/SLCC templates & preferences, public holidays, all lookups, and every leave record. The hard-to-re-enter foundation.
  • Roster — generated output: shift instances, assignments, CCT roster, swaps, points ledger, solver runs.
  • Full — both layers. Use Full for DR.

Routine: download a Full backup regularly (e.g. weekly + before any risky change) and keep the .json file off this machine (cloud drive / email it to yourself). The DR plan only works if you have a recent file when prod dies.

🔥 “Shit happens” — prod is down or data is lost

  1. Don’t panic. With a recent Full backup file you can recover.
  2. Find your most recent slh-backup-prod-full-*.json (your off-device copy).
  3. Open the DEV app → dev.slh-peoplepower.pages.dev/app and sign in.
  4. Go to Admin ▸ BackupImport backup file… → choose your prod backup.
  5. Read the dry-run preview. It’s a cross-environment restore (prod→dev) — note the login warning.
  6. Type RESTORE → run. Dev now holds the prod data; a safety snapshot of dev’s prior state is saved automatically.
  7. Doctors use the dev app. Cross-env re-links logins by email — their dev account must exist (see DR auth, set up ahead of time).
  8. Operate from dev until prod is restored — the dev solver workers run on Neo against the dev DB.

Links & details

Not covered: database schema, login accounts & the rules engine aren’t inside a snapshot — for full disaster recovery also keep a periodic pg_dump. This restores data into an already-deployed app.

Ward Assignments — Loading…
Phase 1.4-B · Click any cell to edit · Save changes when done
Switch to this tab to load the grid.
MDM Setup
Configure ward MDM defaults — these are stable settings, rarely changed
Switch to this tab to load.
MOPEX & FMR Admin
Onboarding + posting periods + RCC sessions for non-SLH staff (MOPEX MOs, FMRs, Visiting).
Switch to this tab to load.
Leave Planning Windows
During an open window, doctors submit leaves. At close, clean leaves auto-approve; conflicts go to admin review.
Switch to this tab to load.
New Doctors
Onboard a doctor, manage sign-on invites, and confirm pending self-sign-ups.
Switch to this tab to load.
Coverage Eligibility
Leadership roles, SLCC preceptors, coverage capability flags, weekend weights, CCT & SLCC results-review preferences.
Switch to this tab to load.
Edit Doctor Profile
Offboards, role promotions / changes, and doctor profile edits.
Switch to this tab to load.
SLH Med Admin
Medical admin staff (SLH_MEDADMIN class) — onboarding and management.
Switch to this tab to load.
SLCC Admin
Configure SLCC clinics — day, AM/PM session, anchor preceptor. Each (day, session) can hold multiple parallel slots.
Switch to this tab to load.
CCT Admin
Configure Community Care Team services — day, AM/PM session, service type. Each (day, session) can hold multiple parallel service slots.
Switch to this tab to load.
NL Query Log
Natural-language leave-search interactions — what users typed, what the parser made of it, what they did next.

Top phrasings — grouped by lowercased text

Query Outcome Count Distinct staff Last seen

Raw log — most recent first, capped at 500 rows

When Who Query Outcome Parsed Suggestions Picked
Solver Runs
Queue an OR-Tools roster run, monitor status, accept the proposal. Worker (Python) must be running on your Mac for queued runs to execute — double-click solver/start-solver-worker.command.
Switch to this tab to load.
Leave & Bid Approval
Leave requests + work-bid submissions awaiting your decision, plus groups of overlapping requests that need to be looked at together so the wards stay covered.
Switch to this tab to load.
Leave calendar
Read-only view of every approved or pending leave for the selected period (toggle Month / 14-day / Week — fewer days = bigger cells, more detail), with PH markers. Mirrors the Leave Planner.
Loading calendar…
Leave Optimizer P2 · v0.85
After the call & weekend roster is accepted, this tool looks for slack in the schedule and proposes extra leave-days that can be granted without breaking ward coverage. Set the two sliders below to tell it how aggressive to be, then click Generate plan. Proposals appear in the Pending Approvals queue above, where you can accept, edit or reject each one.
Admin only
Defaults to next calendar month. The optimizer reads everything already locked for these dates and finds gaps it can fill with leave.
to
The DOM.11 rule today caps this at 2. The slider lets you ask “what if we relaxed it?” The production rule isn’t changed — this only affects what this run will propose.
12 (prod)345
Same as production policy. Keeps coverage safe at the cost of fewer leave-days granted per month.
Generous = grant leave even if a ward drops to a single doctor for a week (cross-cover absorbs it). Strict = only grant leave when every ward keeps its usual staffing.
GenerousLenientBalancedProtectiveStrict
Default. Allows two-anchor wards to drop to one for a week, but blocks anything more dramatic.
Higher = the optimizer harder favours doctors who’ve had less leave so far this year. 0 = ignore fairness.
Off123 (default)45
Cohort: Only doctors with is_ward_cover or is_weekend_cover are considered. Doctors without those flags are excluded from this run — that’s deliberate so the optimizer doesn’t hand leave to people who can’t cover anything in return. Fix their capability flags in Admin → Coverage Eligibility before running this if they should be included.
Recent runs
The Python solver picks up pending runs and writes proposals back as pending_review leave-requests — visible in the queue at the top of this page. If a run stays pending for more than a minute, the solver process isn’t running — ask engineering to start it (or run uv run python solver/leave_optimizer.py --watch).
Loading…