Walks every Whoop field through consent, the translator, and the hospital validator. A row is blocked if something stops it from reaching the hospital — this is where you'll see mismatches.
A
Whoop API
Mock wearable source. Serves the latest Whoop-style snapshot plus five days of history per patient. In production this would be the real Whoop OAuth integration.
localhost:4001
Endpoints
Verb
Path
Purpose
GET
/patients
List enrolled patients and scenarios
GET
/patients/:id/snapshot
Latest reading for one patient
GET
/patients/:id/history
Five-day history
GET
/patients/:id/recovery
Recovery slice only
GET
/patients/:id/sleep
Sleep slice only
GET
/patients/:id/cycle
Cycle slice only
Patients—
ID
Name
Scenario
Consent
Last sync
Action
Loading…
Snapshot inspector
Pick a patient to view raw snapshot.
B
Gateway API
Consent filter + translator. Pulls a Whoop snapshot, drops any field the patient hasn't consented to, calls Claude Opus 4.7 to emit a FHIR transaction Bundle (with a rule-based fallback), and posts it to the hospital. Telemetry events stream over SSE.
localhost:4002
Endpoints
Verb
Path
Purpose
POST
/sync/:patientId
Run the full pipeline for one patient
GET
/compatibility/:patientId
Compatibility matrix with blockers
GET
/mapping
LOINC + unmapped field reference
GET
/consent/:patientId
Current consent list
GET
/events
Recent telemetry (paginated snapshot)
GET
/events/stream
Live telemetry over SSE
GET
/health/all
Health probe across all services
LOINC mappingWhoop field → FHIR Observation
Whoop field
Source path
LOINC code
Display
Unit
Loading…
Unmapped fieldsPresent in Whoop · not translated
Source path
Reason
Loading…
C
Hospital API
FHIR receiver. Validates incoming transaction Bundles, stores Observations in memory, and runs threshold rules (high resting HR, low HRV, low SpO₂, poor sleep efficiency) to surface clinical alerts.
localhost:4003
Endpoints
Verb
Path
Purpose
POST
/fhir/Bundle
Receive a FHIR transaction Bundle
GET
/records
All stored records with alerts
GET
/records/:id
One record
GET
/patients/:ref/records
Records for one patient
Alert rulesIn hospital/alerts.js
LOINC
Observation
Threshold
Severity
40443-4
Resting heart rate
≥ 80 /min
warning
80404-7
HRV (SDNN)
≤ 25 ms
warning
59408-5
Oxygen saturation
≤ 92 %
warning
93829-0
Sleep efficiency
≤ 75 %
warning
Stored records—
Record
Patient
Received
Observations
Alerts
No records yet.
Transactions
Every FHIR Bundle the hospital has accepted, grouped per patient and per hospital. Expand a transaction to see the Observations that were sent.