> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veridianhp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI and clinical safety

> Multi-LLM routing, non-diagnostic output, PT-review gate, and red flags.

# AI and clinical safety

Veridian Motion uses **multi-provider large language models** to produce
**non-diagnostic triage support** for licensed PTs. AI output **never** goes
directly to inmates and **never** constitutes a diagnosis.

## Design principles

1. **Triage support, not diagnosis.** Language throughout the product uses
   *assessment*, *observations*, *hypotheses*, and *PT-reviewed
   recommendations* — not *diagnosis* or *treatment decision*.
2. **PT-review gate.** AI findings and draft exercise plans appear only in
   the provider dashboard until a PT marks the assessment **reviewed**.
3. **Red flags first.** AI-generated red-flag alerts render in a prominent
   **"review first"** callout. PTs confirm clinically before acting.
4. **Model transparency.** The model that produced each assessment is
   **recorded and displayed** to the PT (e.g., "Generated by …").

## Multi-LLM router

Server-side routing selects a provider with **automatic failover**:

| Priority | Provider                   |
| -------- | -------------------------- |
| 1        | Anthropic Claude (primary) |
| 2        | OpenAI GPT                 |
| 3        | xAI Grok                   |
| 4        | Fallback gateway           |

If a provider is unavailable or errors, the router tries the next provider.
The **successful model** is stored on the assessment record for audit and
display to the reviewing PT.

<Note>
  AI calls run in **TanStack server functions** — API keys and prompts are
  not exposed to the inmate kiosk browser.
</Note>

## What AI produces

For each submitted assessment, AI may generate:

| Output                   | Purpose                                                                    |
| ------------------------ | -------------------------------------------------------------------------- |
| **Observations**         | Structured notes on posture/MSK patterns visible from photos and complaint |
| **Hypotheses to review** | Non-diagnostic possibilities for PT consideration                          |
| **Red-flag alerts**      | Prompts for urgent in-person evaluation when patterns warrant              |
| **Draft exercise plan**  | Graded **bodyweight** exercises from the exercise-media library            |

All items are labeled **AI-generated, non-diagnostic** in the dashboard.

## What AI does not do

* Diagnose conditions or replace PT clinical judgment
* Send content to inmates without PT review
* Initiate external communications or emergency response
* Store prompts or responses containing PHI in application logs

## PT workflow

<Steps>
  <Step title="Review red flags first">
    Open the red-flag callout before other AI sections. Escalate through
    facility protocols if clinically indicated.
  </Step>

  <Step title="Review observations and hypotheses">
    Compare AI output to photos, body-map selections, and Q\&A. Accept, edit,
    or disregard as clinical judgment requires.
  </Step>

  <Step title="Edit the exercise plan">
    Adjust the draft bodyweight plan for custody constraints. Use the
    exercise-media library for images and video references.
  </Step>

  <Step title="Add PT notes">
    Document assessment and plan. Mark notes **shared with inmate** only when
    appropriate for the inmate to read.
  </Step>

  <Step title="Set status and release">
    Mark **reviewed** (or **needs\_followup**) when complete. Approved plan and
    shared notes become visible in the inmate **My plan / progress** view.
  </Step>
</Steps>

## AI note summarization

PTs may use **AI note summarization** to draft documentation from assessment
context. Summaries are drafts — the PT must review and approve before they
become part of the clinical record.

## Limitations and honesty

Veridian Motion is **not** FDA-cleared software as a medical device. AI
models may be wrong, incomplete, or biased. PTs and facilities remain
responsible for all clinical decisions and inmate safety.

## What's next

<CardGroup cols={2}>
  <Card title="Provider dashboard" icon="user-doctor" href="/veridian-motion/provider-dashboard">
    Review UI and tools.
  </Card>

  <Card title="Data model & privacy" icon="database" href="/veridian-motion/data-model-privacy">
    What is stored and how RLS applies.
  </Card>
</CardGroup>
