get_rating_distribution
Analyze provider and patient rating distributions over time to identify patterns and trends. Generate histograms with counts, percentages, and statistics, and compare ratings across subscriptions, accounts, or groups.
Instructions
Get rating distribution (histogram) for provider and/or patient ratings over a time period. Returns rating buckets with counts and percentages, plus statistics (average, min, max, total count). Supports grouping by subscription, account, or group for comparative analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ratingType | Yes | Type of rating to analyze: "provider", "patient", or "both" | |
| bucketSize | No | Rating bucket size (default: 1, e.g., 1 = 1-2, 2-3, 3-4, etc.) | |
| startDate | No | Start date. Format: ISO date (YYYY-MM-DD) or date math (now-30d, now-1y). Default: now-30d. | |
| endDate | No | End date. Format: ISO date (YYYY-MM-DD) or date math (now). Default: now. | |
| account | No | Optional account name to filter by | |
| group | No | Optional group name to filter by | |
| subscription | No | Optional subscription tier to filter by | |
| groupBy | No | Optional grouping dimension (default: none). When set, returns separate distributions for each group value. | none |