Project

General

Profile

Task #73

Updated by Varsha N 25 days ago

Task Objective: 
 Implement an OP (Out-Patient) Consultation Report in the Admin module that displays consultation details and fee summaries for Today, Monthly, Yearly, and custom date ranges. 
 All calculations must be done in the backend using SQL queries. 
 ! No new database tables or columns should be added. 

 Navigation: 
 Admin Login → Reports → OP Consultation Report 

 Fields to Display: 
 Serial Number 
 Consultation ID 
 Patient Name 
 Consultation Fee 

 Summary Section: 
 Total number of consultations 
 Total consultation fee (summation) 

 Filters: 
 Today (default) 
 Monthly 
 Yearly 
 From Date – To Date (custom range) 
 Doctor 

 Data Source: 
 consultations 
 patients 

 Features to Implement: 
 Load today’s OP consultations by default 
 Support monthly and yearly views 
 Allow custom date range selection 
 Display consultation list with serial numbers 
 Calculate total consultation fees dynamically 
 Show summary totals below the list 
 Apply hospital-level filtering using hospital_id 
 Pagination for large result sets 
 Read-only report view 

 Validations & Rules: 
 From Date must not be greater than To Date 
 Date range is mandatory for custom filter 
 Only completed consultations should be included 
 Admin can view only their hospital’s data 
 Disable report generation during API call 

 Excel Download: 
 Provide “Download Excel” button on the report page 
 Downloaded Excel should reflect: 
 Applied date filters 
 Same data shown on screen 

 Excel file should include: 
 Report title 
 Date range selected 
 Column headers 
 Consultation rows 
 Total consultation fee at the bottom 
 Excel generation must be done server-side 
 File name format example: OP_Consultation_Report_YYYYMMDD.xlsx 

 Completion Criteria: 
 Report displays correct data for all date filters 
 Fee summation matches database values 
 Excel file downloads correctly with accurate data 
 No new database tables or columns added 
 Hospital-level data isolation enforced 

Back