Task #75
openDignosis_wise Report (Admin)
0%
Description
Task Objective:
Implement a Diagnosis-wise Report in the Admin module to show the frequency of diagnoses recorded during doctor consultations over a selected time period.
This report helps the admin understand common diagnoses and disease trends within the hospital.
! No new database tables or columns should be added.
All data must be derived from existing consultation records.
Navigation:
Admin Login → Reports → Diagnosis Report
Fields to Display:
Serial Number
Diagnosis Name
Diagnosis Code
Total Count (number of times diagnosed)
Summary Section:
Total unique diagnoses
Total diagnosis count
Search bar
Filters:
Today
Monthly
Yearly
From Date – To Date (custom range)
Data Source:
consultations
consultation_diagnosis
diagnosis_master
Features to Implement:
Load diagnosis data based on selected date filter
Group consultations by diagnosis
Display diagnosis frequency count
Apply hospital-level filtering using hospital_id
Show report in tabular format with serial numbers
Display summary totals below the table
Pagination for large datasets
Read-only report view
Search bar to search the dignosis name
Excel Download:
Provide “Download Excel” button
Export the same diagnosis data shown on screen
Include:
Report title
Selected date range
Diagnosis name and counts
File name example:
Diagnosis_Report_YYYYMMDD.xlsx
Validations & Rules:
From Date must not be greater than To Date
Date range is mandatory for custom filter
Admin can access only their hospital’s data
Only completed consultations should be included
Disable report generation during API call
Backend Requirements:
Use created_at from consultations for date filtering
Use SQL aggregation:
COUNT()
GROUP BY diagnosis_id
Do not store report results in database
Completion Criteria:
Diagnosis counts are accurate for all date filters
Pagination works correctly
Excel download matches report data
No new tables or columns added
Hospital-level data isolation enforced