Your question is Rank Top Failing Consent Workflows. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Wakemed Operations uses MyChart consent workflows for proxy access, releases, research participation, and interpreter-supported communications. Write a PostgreSQL query to identify the five workflows with the highest failure rates for selected patient segments.
pediatric_proxy, limited_english, and older_adult segments between 2025-01-01 inclusive and 2025-04-01 exclusive.| Column | Type | Description |
|---|---|---|
| workflow_idPK | INT | Unique consent workflow identifier |
| workflow_name | VARCHAR(150) | Display name of the consent workflow |
| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| user_segment | VARCHAR(50) | Operational segment assigned to the patient |
| Column | Type | Description |
|---|---|---|
| attempt_idPK | INT | Unique consent attempt identifier |
| workflow_id | INT | Workflow used for the attempt |
| patient_id | INT | Patient associated with the attempt |
| status | VARCHAR(20) | Attempt outcome, such as completed or failed |
| attempted_at | TIMESTAMP | Timestamp when the consent attempt occurred |