# Command: recall-lapsed-patients

Send recall messages to an approved patient segment and record responses in the practice management system.

## Inputs

**approved_segment** — The lapsed-patient cohort approved by clinical leadership; typically patients who haven't visited in 12+ months. Default: fetch from practice system by date range.

**campaign_template** — Pre-approved message text (SMS, email, or both); must be archived with compliance sign-off before use.

**practice_system_credentials** — Connection details (API key or OAuth token) to the practice management system; rotate annually.

**response_tracking_enabled** — Flag to log incoming replies (confirmations, declines, reschedules) as task notes; default true.

**escalation_rules** — If a patient mentions a symptom or concern, trigger human escalation instead of automated reply.

## Steps

1. Fetch the approved segment from the practice system by patient ID only; do not retrieve full protected health information (PHI) (names, DOB (date of birth), diagnoses) into memory.
2. Verify the campaign_template is marked approved in the compliance archive; stop if approval is missing or expired.
3. Send the message to each patient in the segment via the selected channel (SMS, email, or multi-channel).
4. Log each send attempt (delivery status, timestamp, patient ID) back to the practice system as a recall campaign record.
5. Ingest incoming responses: confirmations ("I'll call"), reschedules, and opt-outs into the practice system.
6. Flag any symptom mention (e.g., "pain," "bleeding," "fever") for immediate human escalation; do not reply clinically.

## Constraints

- Recall activation and any write to patient records beyond appointment confirmation require explicit human approval.
- Use patient ID only in task titles and memory; never embed names, dates of birth, or conditions.
- Stop immediately if a patient reports a symptom or acute concern; escalate to clinical staff without reply.

Done when: all approved patients in the segment have received the recall message and responses are logged in the practice system.