Remote Patient Observation System (24/7)
24/7 patient watch — async-Python WebRTC client.
Highlights
- Built a production async Python client running 24/7 on bedside PCs with heartbeat watchdog, graceful recovery, single-instance guard, and in-place auto-update
- Orchestrated low-latency WebRTC AV streaming over KSMedia with FFmpeg muxing for continuous remote-observer feeds
- Integrated a C++ DirectShow PTZ library via Python bindings for remote pan/tilt/zoom during observation sessions
- Packaged the whole stack as a single-binary Windows distribution for on-prem deployment with zero external runtime dependencies
Problem
Two clinical patterns drove the build: sitter consolidation, where one remote observer watches multiple high-risk beds (fall risk, suicide watch, post-op delirium) instead of one sitter per room, and tele-ICU coverage, where a central command center keeps eyes on beds across multiple hospitals overnight. The third-party telehealth tools previously in use were clunky enough to be a daily friction point — high latency, fragile sessions, and an installer that needed IT to babysit on every bedside PC.
Approach
An async Python client runs 24/7 on bedside all-in-one PCs with a heartbeat watchdog, single-instance guard, graceful recovery, and in-place auto-update — packaged as a single Windows binary with zero external runtime, so clinical IT does not have to touch each cart. The media stack is FFmpeg with H.264 video over a WebRTC pipeline; the trickier work was on the WebRTC side — owning the jitter buffer behavior under flaky bedside Wi-Fi, handling NAT traversal through STUN, and tuning bandwidth estimation so the observer feed degrades gracefully instead of stalling. The same C++ DirectShow PTZ library that drives the operator workstation drops in through Python bindings, so observers can pan and zoom whichever UVC PTZ camera the bedside cart happens to carry. A stalled feed is a clinical risk, not a UX glitch — uptime is the calibration target.
Result
A single observer covers up to 16 beds simultaneously. Deployed across 60 beds in 10 US hospitals, with 98% uptime over the past 12 months.