Skip to main content
GET
/
analytics
/
dashboards
/
patient-breakdown
/
patient-analytics-grouped
Get Patient Analytics Grouped
curl --request GET \
  --url https://api.decodahealth.com/analytics/dashboards/patient-breakdown/patient-analytics-grouped \
  --header 'API-KEY: <api-key>' \
  --header 'TENANT: <tenant>'
{
  "groups": [
    {
      "key": "<string>",
      "label": "<string>",
      "count": 123,
      "summary": {
        "totalPatients": 0,
        "totalSpent": 0,
        "totalAppointments": 0,
        "avgSpent": 0,
        "avgTenureDays": 123,
        "uniqueServices": 0,
        "uniqueProviders": 0
      },
      "rows": [
        {
          "patient": {
            "id": "<string>",
            "firstName": "<string>",
            "lastName": "<string>",
            "phoneNumber": "<string>",
            "email": "<string>",
            "type": "PATIENT",
            "locationId": "<string>",
            "dateOfBirth": "2023-12-25",
            "onSchedulingBlacklist": true
          },
          "patientSource": "<string>",
          "firstAppointmentDate": "2023-11-07T05:31:56Z",
          "lastAppointmentDate": "2023-11-07T05:31:56Z",
          "lastAppointmentServices": [
            "<string>"
          ],
          "lastAppointmentProviders": [
            {
              "id": "<string>",
              "firstName": "<string>",
              "lastName": "<string>"
            }
          ],
          "totalSpent": 0,
          "appointmentCount": 0
        }
      ]
    }
  ],
  "grandTotals": {
    "totalPatients": 0,
    "totalSpent": 0,
    "totalAppointments": 0,
    "avgSpent": 0,
    "avgTenureDays": 123,
    "uniqueServices": 0,
    "uniqueProviders": 0
  },
  "totalCount": 123
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Query Parameters

timezone
string
default:UTC
group_by
enum<string>
default:location
Available options:
location,
patient_source,
provider
sort_by
string
default:last_appointment_date
sort_direction
enum<string>
default:desc
Available options:
asc,
desc
start_date
string | null
end_date
string | null
patient_source
string[] | null
location_ids
string[] | null
days_since_last_appointment
integer | null
patient_name
string | null
patient_id
string | null
last_appointment_service_ids
string[] | null
last_appointment_provider_ids
string[] | null
last_visit_days
string | null
visit_span_days
string | null
per_page
integer
default:50
Required range: 1 <= x <= 500

Response

Successful Response

Response from the grouped patient analytics endpoint.

groups
PatientGroup · object[]
required
grandTotals
PatientGroupSummary · object
required

Aggregated summary for a patient group.

totalCount
integer
required