Risk Assessment & Escalation — PHQ-9 Screening
Build a clinical screening workflow that administers the PHQ-9 depression questionnaire, scores responses, and routes to appropriate care based on severity.
Risk Assessment & Escalation — PHQ-9 Screening
What You'll Accomplish
By the end of this tutorial, you'll have a workflow that administers the PHQ-9 (Patient Health Questionnaire-9) depression screening, automatically scores responses, and routes members to the appropriate level of care based on their score. High-risk responses trigger immediate escalation to clinical staff.
Clinical note: The PHQ-9 is a validated screening tool, not a diagnostic instrument. This workflow supports screening — clinical diagnosis and treatment decisions must involve a licensed provider.
What You'll Need
- A Gravity Rail workspace
- A channel for administering the screening (web chat or SMS recommended)
- An agent configured for your workspace
- Clinical staff who will receive escalation notifications
Step 1: Create the PHQ-9 Form
The PHQ-9 asks 9 questions, each scored 0-3. Create a form to capture responses.
-
Go to Knowledge > Forms
-
Click Create Form
-
Configure:
- Name: "PHQ-9 Screening"
- Slug:
phq9 - Collection: Enabled (members may complete multiple screenings over time)
- Prompt: "Administer the PHQ-9 depression screening. Ask each question conversationally, one at a time. Use the exact clinical phrasing but deliver it in a natural, empathetic way. For each question, the member should indicate how often they've experienced the symptom over the last 2 weeks."
-
Add the 9 question fields:
| Field Name | Type | Slug | Options |
|---|---|---|---|
| Little interest or pleasure | Dropdown | q1_interest | Not at all (0), Several days (1), More than half the days (2), Nearly every day (3) |
| Feeling down, depressed, or hopeless | Dropdown | q2_depressed | Same as above |
| Trouble falling/staying asleep, or sleeping too much | Dropdown | q3_sleep | Same as above |
| Feeling tired or having little energy | Dropdown | q4_energy | Same as above |
| Poor appetite or overeating | Dropdown | q5_appetite | Same as above |
| Feeling bad about yourself | Dropdown | q6_self_esteem | Same as above |
| Trouble concentrating | Dropdown | q7_concentration | Same as above |
| Moving or speaking slowly / being fidgety or restless | Dropdown | q8_psychomotor | Same as above |
| Thoughts of self-harm | Dropdown | q9_self_harm | Same as above |
For each dropdown, set the Value to the numeric score (0, 1, 2, 3) and the Label to the descriptive text ("Not at all", "Several days", etc.). Mark all fields as Required.
- Add a score field:
| Field Name | Type | Slug | Notes |
|---|---|---|---|
| Total Score | Formula | total_score | Sum of all 9 questions |
| Severity | Formula | severity | Derived from total score |
| Screening Date | Date & Time | screening_date | Auto-populated |
- For the Total Score formula field, use:
int(record.data.q1_interest) + int(record.data.q2_depressed) + int(record.data.q3_sleep) + int(record.data.q4_energy) + int(record.data.q5_appetite) + int(record.data.q6_self_esteem) + int(record.data.q7_concentration) + int(record.data.q8_psychomotor) + int(record.data.q9_self_harm)
For more on forms and computed fields, see the Forms and Computed Fields guides.
PHQ-9 Scoring Reference
| Score Range | Severity | Clinical Action |
|---|---|---|
| 0-4 | Minimal | No immediate action needed |
| 5-9 | Mild | Watchful waiting, rescreen later |
| 10-14 | Moderate | Consider treatment plan |
| 15-19 | Moderately Severe | Active treatment recommended |
| 20-27 | Severe | Immediate clinical review |
Critical safety item: Question 9 (thoughts of self-harm) requires special handling regardless of total score. Any positive response (score > 0) should trigger immediate escalation.
Step 2: Build the Screening Workflow
Create a workflow that administers the screening and routes based on results.
Create the workflow
- Go to Workflows and click Create Workflow
- Name it "PHQ-9 Screening"
- Assign your agent
Add the tasks
Task 1: Introduction (Starting Task)
- Name: "Introduction"
- Prompt:
You're conducting a mental health screening. Introduce the process warmly: - Explain that you'll be asking a few questions about how they've been feeling over the past 2 weeks - Emphasize that this is routine and confidential - Let them know there are no right or wrong answers - Ask if they're comfortable proceeding Be empathetic and normalizing. Many people feel anxious about mental health screenings — your tone should put them at ease. - Goal: "Member has agreed to proceed with screening"
- Sub-Tasks: Administer PHQ-9
Task 2: Administer PHQ-9
- Name: "Administer PHQ-9"
- Prompt:
Administer the PHQ-9 questionnaire. For each question, ask about the symptom in a conversational way and provide the response options: - Not at all - Several days - More than half the days - Nearly every day Ask one question at a time. If the member seems distressed, acknowledge their feelings before moving to the next question. Use the exact clinical phrasing for each symptom but wrap it in natural conversation. IMPORTANT: If at any point the member expresses active suicidal ideation or intent to harm themselves (not just answering question 9, but spontaneous disclosure), immediately provide the 988 Suicide & Crisis Lifeline number (call or text 988) and escalate to a clinical team member. - Goal: "All 9 PHQ-9 questions have been answered"
- Data Types: Attach the PHQ-9 Screening form
- Sub-Tasks: Review Results
Task 3: Review Results
- Name: "Review Results"
- Prompt:
The screening is complete. Based on the responses: 1. Thank the member for completing the screening 2. Provide a general, non-clinical summary: - Low scores (0-4): "Your responses suggest minimal symptoms. That's good to hear." - Mild (5-9): "Your responses suggest some mild symptoms. It's common to experience these from time to time." - Moderate+ (10+): "Your responses suggest you may be experiencing some significant symptoms. It's important to talk with a care provider about this." 3. Do NOT provide a diagnosis or clinical interpretation 4. Let them know a care team member will review the results 5. Ask if they have any questions Route to the appropriate next task based on severity. - Goal: "Member has been informed of next steps"
- Sub-Tasks: Routine Follow-Up, Clinical Review, Urgent Escalation
Task 4: Routine Follow-Up (for minimal/mild scores)
- Name: "Routine Follow-Up"
- Prompt: "The member's screening indicates minimal or mild symptoms. Let them know their care team has the results and will discuss at their next appointment. Provide self-care resources if appropriate (exercise, sleep hygiene, stress management). Thank them for their time."
- Goal: "Follow-up guidance provided"
Task 5: Clinical Review (for moderate/moderately severe scores)
- Name: "Clinical Review"
- Prompt: "The member's screening indicates moderate symptoms that warrant clinical attention. Let them know a care team member will reach out to discuss the results and potential next steps. Ask about their preferred contact method and best times to reach them."
- Goal: "Contact preferences collected, care team notified"
Task 6: Urgent Escalation (for severe scores or positive Q9)
- Name: "Urgent Escalation"
- Prompt:
The member's screening indicates severe symptoms or a positive response to the self-harm question. This requires immediate clinical attention. 1. Express concern and empathy — do not be alarming 2. Provide the 988 Suicide & Crisis Lifeline: call or text 988 3. Let them know a clinical team member will contact them very soon 4. If they are in immediate danger, advise calling 911 5. Stay in the conversation — do not end abruptly 6. Ask if they are currently safe Your primary goal is to keep the member engaged and safe until a clinician can take over. - Goal: "Member has been provided crisis resources and clinical team has been notified"
Connect the tasks
Use the visual Task Flow editor:
- Introduction > Administer PHQ-9 > Review Results
- Review Results > Routine Follow-Up
- Review Results > Clinical Review
- Review Results > Urgent Escalation
Set "Introduction" as the Starting Task.
Step 3: Configure Escalation Actions
Set up actions that notify your clinical team based on screening results.
Critical escalation (Question 9 positive or severe score)
-
Go to Actions and click New Action
-
Configure:
- Trigger: Task Entered, targeting "Urgent Escalation"
- Action Type: Member Notify
- Recipients: Clinical lead / crisis response team
- Message: "URGENT: {{member.name}} has flagged on PHQ-9 screening (severe symptoms or positive Q9). Immediate clinical review required."
-
Create a second action for the same trigger:
- Action Type: Member Label
- Label: Add "urgent-clinical-review"
Moderate escalation
-
Create another action:
- Trigger: Task Entered, targeting "Clinical Review"
- Action Type: Member Notify
- Recipients: Care coordination team
- Message: "{{member.name}} completed PHQ-9 with moderate/moderately severe score. Clinical follow-up recommended."
-
Add a label action:
- Action Type: Member Label
- Label: Add "clinical-review-needed"
Webhook for clinical systems (optional)
If you have an external care management system:
- Create a webhook action:
- Trigger: Data Record Created, targeting the PHQ-9 form
- Action Type: Send Webhook
- URL: Your care management system's API endpoint
- Payload includes member ID and screening data
For details on actions and conditions, see the Actions guide.
Step 4: Schedule Recurring Screenings
For care programs that require periodic screening, set up automated outreach.
- Go to Events and click New Event
- Configure:
- Schedule Type: CRON
- CRON Expression:
0 10 1 * *(first of every month at 10 AM) - Targeting: Member Filter — filter for members enrolled in your screening program (e.g., members with label "phq9-program")
- Create a Send SMS action:
- Message: "Hi {{member.first_name}}, it's time for your monthly check-in. Reply START to begin your brief wellness screening."
- Attach the action and activate the event
Step 5: Connect a Channel
Deploy the screening through a channel appropriate for your use case.
Web chat (for in-office screening)
- Go to Channels > Sites
- Create a site with "PHQ-9 Screening" as the default workflow
- Patients complete the screening on a tablet or computer in the waiting room
SMS (for remote screening)
- Set up a phone number with SMS enabled
- Set the default workflow to "PHQ-9 Screening"
- Patients receive a text prompt and complete the screening via SMS
Confirm the Result
-
Complete a test screening with low scores. Verify the conversation flows through all 9 questions, calculates the score correctly, and routes to Routine Follow-Up.
-
Complete a test screening with high scores. Answer several questions with "Nearly every day" and verify routing to Clinical Review or Urgent Escalation based on the total score.
-
Test the safety question. Answer Question 9 with any positive response and verify immediate escalation regardless of the total score.
-
Verify notifications. Check that your clinical team receives the appropriate notification for each escalation level.
-
Check the data. Go to Knowledge > Forms > "PHQ-9 Screening" and verify records are created with correct scores.
If the scoring isn't calculating correctly, verify the dropdown values are set to numeric scores (0, 1, 2, 3) and the formula field references the correct field slugs.
What's Next
- Add more screening tools. Build similar workflows for GAD-7 (anxiety), AUDIT-C (alcohol use), or other validated instruments your practice uses.
- Track trends over time. With Collection mode enabled, you can track a member's PHQ-9 scores over time. Use template variables to reference previous scores in the conversation:
{{member.collections.phq9.recent}}. - Integrate with your EHR. Push screening results to your electronic health record using a webhook or MCP Server integration.
- Build a care pathway. Use Journeys to create a multi-week care program that includes periodic PHQ-9 screenings, check-ins, and resource sharing.
Related Resources
Send an HTML Email Campaign with AI-Powered Reply Handling
Build a complete email campaign with personalized HTML emails and AI-powered reply handling.
Build Your First Workflow — Appointment Reminder
Create an automated appointment reminder workflow that contacts members via SMS and handles rescheduling requests.
Build an AI-Powered Knowledge Base from Your Document Library
Upload a document library, enable semantic indexing, and configure your AI agent to search and reference the content during conversations.
All Guides
Browse all available guides