Skip to content

feat(Admin): Download Analytics reports

Laxman Reddy requested to merge feat/admin-download-analytics-report into develop

What does this MR do and why?

This Merge Request implements the Download Analytics Report feature for the Admin Camp Analytics dashboard.

The feature enables administrators to download the analytics data of a selected medical camp as a CSV report directly from the dashboard. This improves usability by allowing admins to easily export and share analytics data for reporting, documentation, and further analysis without manually collecting information from the UI.

The Download CSV Report button is added near the Select Medical Camp dropdown, ensuring that the report corresponds to the currently selected camp.

The generated CSV report includes the following analytics metrics:

  • Camp Date
  • Patients Registered
  • Vitals Completed
  • Doctors Registered
  • Medicines Used
  • Vitals Completion Rate
  • Consultation Completion Rate

This implementation keeps the existing UI structure unchanged and uses the analytics data already available on the page.

References

Issue: feat(Admin): Download Analytics reports

Screenshots or screen recordings

Before After
Camp Analytics page without report download functionality Camp Analytics page with Download CSV Report button

(image)

How to set up and validate locally

  1. Clone the repository and navigate to the project directory.
git clone <repository-url>
cd ehrs-frontend-vite
  1. Checkout the feature branch.
git checkout feat/admin-download-analytics-report
  1. Install project dependencies.
npm install
  1. Start the development server.
npm run dev
  1. Login as Admin and navigate to:

Admin Dashboard → Camp Analytics

  1. Select a Medical Camp from the dropdown.

  2. Click the Download CSV Report button.

  3. Verify that a file named medical_camp_report.csv is downloaded and contains the corresponding analytics data.

MR acceptance checklist

  • Feature implemented according to the issue requirement
  • No breaking changes introduced
  • Existing UI layout and functionality remain unchanged
  • Changes limited to the Admin Camp Analytics page
  • Feature tested locally and CSV download verified

Merge request reports

Loading