analytics
Patients who entered a target state in a period
Returns full analytics detail for each patient who entered target_status between from_date and to_date and is still in that status at to_date. Coordinator sees only their supervisors' data.
get/api/analytics/detail/transitions
Query parameters
target_statusstring required
Target status key (e.g. attivo_general, abbandono_psi).
Target status key (e.g. attivo_general, abbandono_psi).
from_datestring date required
Period start date (YYYY-MM-DD).
Period start date (YYYY-MM-DD).
to_datestring date required
Period end date (YYYY-MM-DD).
Period end date (YYYY-MM-DD).
operator_idstring uuid nullable
Filter by psychologist or nutritionist UUID.
Filter by psychologist or nutritionist UUID.
role'psychologist' | 'nutritionist' nullable
supervisor_idstring uuid nullable
searchstring nullable
Case-insensitive patient search.
Case-insensitive patient search.
sort_by'full_name' | 'email' | 'patient_registration_at' | 'supervisor_psychologist_name' | 'psychologist_name' | 'first_psi' | 'last_psi' | 'next_psi' | 'delta_psi' | 'done_psi' | 'expected_psi' | 'freq_psi_days' | 'percentage_psi' | 'supervisor_nutritionist_name' | 'nutritionist_name' | 'first_nutri' | 'last_nutri' | 'next_nutri' | 'delta_nutri' | 'done_nutri' | 'expected_nutri' | 'freq_nutri_days' | 'percentage_nutri' | 'assigned_experts' | 'total_spent' nullable
sort_dir'asc' | 'desc' nullable
per_pageinteger
pageinteger
Response
Successful Response
Example response
{
"items": [
{
"adherence_ratio_adjusted": 0.9,
"adherence_ratio_strict": 0.8,
"appointments_completed": 8,
"appointments_future": 2,
"assigned_experts": "Mario Rossi, Maria Rossi",
"coordinator_nutritionist_id": "...",
"coordinator_psychologist_id": "...",
"days_since_first_appointment": 100,
"days_since_last_appointment": 30,
"done_nutri": 10,
"done_psi": 10,
"email": "m@example.com",
"expected_nutri": 10,
"expected_psi": 10,
"expected_sessions_tot": 100,
"first_appointment": "2025-01-01T00:00:00Z",
"first_call": "2025-01-01T00:00:00Z",
"first_nutri": "2025-01-01T00:00:00Z",
"first_psi": "2025-01-01T00:00:00Z",
"freq_nutri_days": 7,
"freq_psi_days": 7,
"frequency_compliance": "compliant",
"full_name": "Mario Rossi",
"last_nutri": "2025-01-01T00:00:00Z",
"last_psi": "2025-01-01T00:00:00Z",
"months_in_path": 12,
"next_nutri": "2025-01-01T00:00:00Z",
"next_psi": "2025-01-01T00:00:00Z",
"nutri_frequency": "weekly",
"nutritionist_id": "...",
"nutritionist_name": "Maria Rossi",
"patient_id": "...",
"patient_registration_at": "2025-01-01T00:00:00Z",
"patient_status": {
"status": "active"
},
"patient_status_custom": {
"status": "active"
},
"phone": "1234567890",
"psi_frequency": "weekly",
"psychologist_id": "...",
"psychologist_name": "Mario Rossi",
"start_type": "new",
"supervisor_nutritionist_id": "...",
"supervisor_nutritionist_name": "Maria Rossi",
"supervisor_psychologist_id": "...",
"supervisor_psychologist_name": "Mario Rossi",
"total_appointments": 10,
"total_completed": 10,
"total_spent": 1000,
"user_id": "..."
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.