temetro is in beta and under active development. Expect things to change.
temetro

Analytics

Clinic-level aggregates for the dashboard.

MethodPathAccess
GET/api/analyticsAny clinic member
GET/api/analytics/liveAny clinic member

GET /api/analytics returns the aggregate numbers behind the app's Analysis dashboard — patient counts, appointment volume, prescription and task throughput, and earnings — computed for the active clinic.

curl -b cookies.txt http://localhost:4000/api/analytics

Earnings are computed from invoices and look like:

{
  "earnings": {
    "totalBilled": 4200,
    "totalPaid": 3100,
    "totalOutstanding": 1100,
    "byMonth": [{ "label": "Jun", "billed": 900, "paid": 600 }]
  }
}

The rest of the response is a single JSON object of aggregates; its exact fields evolve with the dashboard, so treat the dashboard UI (/analysis in the app) as the reference.

GET /api/analytics/live returns { "value": <number> } — patients checked in today — a cheap metric the Analysis Live card polls.