# Setup guide — Patient Intake Summary Agent

## 1. Install and connect (in-scope)

Install the agent and connect intake within your compliant environment.

```
pipx install patient-intake-agent
patient-intake-agent connect --intake forms --ehr epic:scoped
patient-intake-agent doctor
```

## 2. Configure clinical guardrails

No-diagnosis and faithful summarization are enforced here.

```
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
NO_DIAGNOSIS=true
NO_TREATMENT_ADVICE=true
FLAG_RED_FLAGS=true
PHI_IN_SCOPE_ONLY=true
```

## 3. Define red-flag list & template

Set the red-flag symptoms to surface and the summary format.

```
# intake.yml
red_flags: [chest_pain, dyspnea, severe_bleeding, stroke_signs, suicidal_ideation]
summary_sections: [cc, hpi, meds, allergies, history, red_flags, missing]
```

## 4. Validate on sample intakes

Review summaries for faithfulness and zero diagnoses.

```
patient-intake-agent eval --set ./sample-intakes --explain
# checks faithfulness + a hard check: any diagnosis/advice (must be 0)
```

## 5. Wire into the workflow

Summarize intakes for clinician review before visits.

```
# intake submitted -> structured summary -> clinician reviews before the visit
```
