Skip to content

RangerLoop - Raj Singh

Half of imaging referrals never complete.

Core trick

Calls imaging centers in sequence until a slot before the due date is found, then places a guardrailed voice call that verifies identity before booking.

Tags

Description

Half of imaging referrals never complete. RangerLoop is a closed-loop care-execution agent that finishes the job. It takes a signed imaging order, or an Abridge ambient encounter, and extracts the study and deadline, every field evidence-linked to the clinician's own words. Then it works the phones: it calls imaging centers one at a time until it finds a slot on or before the due date (striking out slots that are too late), then places a real, guardrailed voice call to the patient to verify identity and confirm - never disclosing clinical results - and books the appointment. It tracks each order ORDERED - SCHEDULED, and escalates safely to a human when it can't proceed. Claude Opus 4.8 is the visible orchestrator, deciding each next action via tool use with its reasoning streamed live; a thin deterministic policy layer validates every choice (the agent decides WHAT; the policy decides WHETHER), including a safety gate that blocks any booking without verified patient identity. Every record is FHIR-shaped (ServiceRequest / Patient / Task / Appointment), ready to write back to Epic or Oracle Health. Built entirely today; the voice/telephony stack is pre-existing infrastructure consumed over an HTTPS API only.
hrhraj/rangerloop★ 00 forksTypeScriptCreated Jul 18, 2026 · last push Jul 18, 2026

README excerpt

# RangerLoop

A closed-loop care-execution agent: a clinician's signed imaging order (or an ambient clinical
encounter) → extract the action + due date (evidence-linked) → call imaging centers for a compliant
slot → call the patient to confirm & book (guardrailed, never discloses results) → track
ORDERED → SCHEDULED → escalate safely on failure.

> Ambient AI captures the visit. RangerLoop gets it done.

**Live demo:** https://rangerloop-api.fly.dev — the board shows example loops across states. Click
**"+ Imaging order"** or **"Abridge encounter"** to run a fresh loop end-to-end (imaging-center calls are
simulated; the patient leg places a real, guardrailed voice call).
**Demo video:** https://www.loom.com/share/0d5d94ef03ba45988e6a5d908fa61913

Built at the Abridge × Anthropic × Lightspeed healthcare hackathon (2026-07-18).

## Built today (in this repo)
- **Evidence-linked extraction** from a signed order **or** an Abridge ambient-FHIR encounter — every
  action-driving field (study, due date, phone) is tied to an exact quote; for encounters, the quote is
  the clinician's spoken transcript line.
- The **loop state machine** — a forward-only reducer that is the single writer of all state, timeline,
  slots, and escalations.
- The **Claude tool-use orchestrator** — decides each next action; its reasoning renders live on the dashboard.
- The **deterministic policy / safety layer** (calls are sequential, no patient call before a compliant
  slot, no re-dialing a found center,

Team