analytics

Patients who entered a target state in a period

Changed on

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

Request

  • Base URL: https://api.corabea.it (the document declares no server; this is the origin it was published from)
  • URL: https://api.corabea.it/api/analytics/detail/transitions
  • Auth: HTTP bearer

Query parameters

target_statusstring required

Target status key (e.g. attivo_general, abbandono_psi).

from_datestring date required

Period start date (YYYY-MM-DD).

to_datestring date required

Period end date (YYYY-MM-DD).

operator_idstring uuid nullable

Filter by psychologist or nutritionist UUID.

role'PSICOLOGO' | 'NUTRIZIONISTA'

Operator profession constants.

supervisor_idstring uuid nullable
searchstring nullable

Case-insensitive patient search.

sort_by'full_name' | 'email' | 'patient_registration_at' | 'supervisor_psychologist_name' | 'psychologist_name' | 'first_psi' | 'last_psi' | 'next_psi' | 'done_psi' | 'psychology_frequency_status' | 'psychology_frequency_due_at' | 'supervisor_nutritionist_name' | 'nutritionist_name' | 'first_nutri' | 'last_nutri' | 'next_nutri' | 'done_nutri' | 'nutrition_frequency_status' | 'nutrition_frequency_due_at' | 'assigned_experts' | 'total_spent' | 'days_since_first_appointment' | 'days_since_last_appointment' | 'frequency' nullable
sort_dir'asc' | 'desc' nullable
per_pageinteger
pageinteger

Response

Successful Response

totalinteger required

Unique patients matching filters before pagination

per_pageinteger required
pageinteger required

Example response

{
  "items": [
    {
      "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",
      "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",
      "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",
      "nutrition_frequency": {
        "due_at": "2025-02-03T00:00:00Z",
        "holiday_days": 0,
        "interval_days": 30,
        "path_status": "attivo_nutri",
        "status": "respected",
        "suspension_days": 0,
        "tolerance_days": 3
      },
      "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",
      "psychologist_id": "...",
      "psychologist_name": "Mario Rossi",
      "psychology_frequency": {
        "due_at": "2025-01-19T00:00:00Z",
        "holiday_days": 0,
        "interval_days": 15,
        "path_status": "attivo_psi",
        "status": "respected",
        "suspension_days": 0,
        "tolerance_days": 3
      },
      "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

    • breaking

      removed the enum value delta_nutri from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value delta_psi from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value expected_nutri from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value expected_psi from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value freq_nutri_days from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value freq_psi_days from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value percentage_nutri from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • breaking

      removed the enum value percentage_psi from the property anyOf[subschema #1]/ of the query request parameter sort_by

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added the enum value days_since_first_appointment to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the enum value days_since_last_appointment to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the enum value frequency to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the enum value nutrition_frequency_due_at to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the enum value nutrition_frequency_status to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the enum value psychology_frequency_due_at to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the enum value psychology_frequency_status to the property anyOf[subschema #1]/ of the query request parameter sort_by

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status