Skip to content

Hospital Analytics & Reporting #43

@Josemiles-ctr

Description

@Josemiles-ctr

Description

Provide hospital admins with analytics and reporting on request performance.

Detailed Requirements

  • Analytics dashboard showing:

    • Total requests (all time, this month, today)
    • Pending requests count
    • Average response time
    • Average completion time
    • Request trend chart (last 30 days)
    • Requests by status (pie chart)
    • Most active ambulance
    • Busiest hours
  • Reports:

    • Generate report by date range
    • Export to PDF
    • Group by ambulance, hour, status
  • Performance metrics:

    • Response time: submitted → assigned
    • Completion time: submitted → arrived
    • Peak hours

Technical Details

  • API: GET /api/hospital/analytics?date_from=&date_to=
  • Charts: Use library like MPAndroidChart or Compose Charts
  • PDF Export: Use iText or similar

Acceptance Criteria

  • Analytics dashboard displays all metrics
  • Charts render correctly
  • Date range picker works
  • Metrics update when date range changes
  • PDF report generates successfully
  • PDF includes all selected metrics
  • Performance metrics calculated correctly
  • Response time average correct
  • Completion time average correct
  • Trend chart shows correct data
  • Empty state if no data
  • Loading state during fetch
  • Unit tests for metric calculation (min 85% coverage)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions