Staffing Pools
Staffing Pools is a feature available with a Flywheel Clinical module.
A staffing pool is a named group of users who are eligible to be assigned reader tasks. When a task is assigned to a pool rather than a specific individual, any pool member can claim and complete it. This enables load balancing across a team of readers without requiring the task creator to select a specific person at the time of creation.
When a staffing pool is deleted, any tasks that were assigned to the pool transition to unassigned status. Creating and managing staffing pools requires Site Admin permissions.
Staffing pool fields
| Field | Description |
|---|---|
id | Unique identifier assigned by Flywheel |
label | Human-readable name for the pool (max 30 characters) |
description | Optional purpose or context description (max 50 characters) |
users | List of user IDs (email addresses) who are members of the pool |
origin | Pool creator |
created | Creation timestamp |
modified | Last-modified timestamp |
Create a staffing pool
fw.create_staffing_pool(body) creates a new pool. The label field is required. You can optionally include the initial list of member user IDs.
pool = fw.create_staffing_pool(
{
"label": "Radiology Team",
"description": "Senior radiologists for CT review",
"users": [
user_email,
],
}
)
empty_pool = fw.create_staffing_pool({"label": "Cardiology Readers", "users": []})
List staffing pools
fw.find_all_api_staffing_pools_get() returns a paginated list of all staffing pools on the site.
result = fw.find_all_api_staffing_pools_get()
for pool in result.results:
print(f"{pool.id}: {pool.label} ({len(pool.users)} members)")
Get a staffing pool by ID
Update pool membership
fw.modify_staffing_pool() replaces the pool's mutable fields. To update membership, pass the full intended users list. This operation replaces the existing membership list, so include all users you want in the pool.
updated = fw.modify_staffing_pool(
pool_id,
{
"users": [
user_email,
]
},
)
pool = fw.get_staffing_pool(pool_id)
current_users = list(pool.users or [])
if new_user_email not in current_users:
current_users.append(new_user_email)
fw.modify_staffing_pool(pool_id, {"users": current_users})
Set a user's pool memberships
fw.set_user_staffing_pools() assigns a user to one or more pools in a single call. This replaces all of the user's existing pool memberships with the specified list.
fw.set_user_staffing_pools(user_id=new_user_email, body={"staffing_pools": [pool_id]})
Delete a staffing pool
Deleting a pool is permanent. Tasks assigned to the pool at the time of deletion become unassigned.
Related pages
- Staffing Pools — Flywheel product documentation — UI instructions for creating and managing staffing pools in the Task Manager