Reference
PRD: TBMJA PRD - Section 9. Dashboard
https://pmp.piramalswasthya.org/confluence/spaces/AMRIT/pages/149487638/TBMJA+PRD#TBMJAPRD-9.Dashboard
Overview
The landing page has two tabs: Home and Dashboard. The Dashboard tab switches the landing page to an analytics view showing a set of KPI cards driven by two filters. All KPI cards must auto-populate based on the selected filter(s), with totals shown in bold and sex/demographic-disaggregated breakups shown within each card.
User Story
As a program user (e.g. camp/village level staff or supervisor), I want to view a Dashboard tab with filterable, demographic-wise TB screening and treatment analytics, so that I can quickly understand screening coverage, presumptive/confirmed case load, diagnostic and treatment pipeline status, and ID (Nikshay/ABHA) coverage for a selected village and time period.
Filters (applies to all cards unless a card explicitly overrides)
- Time Period - Dropdown: Today / January / February / March / April / May / June / July / August / September / October / November / December
- Village Name - Dropdown populated with village/hamlet names
Note: A few cards (called out below) are calculated by Village only, ignoring the Period filter - this must be implemented exactly as specified per card, not uniformly.
Dashboard Cards & KPI Breakdown Logic
1. Screening Coverage Summary
- Total Screened Population (%)
- Village Population (count)
- Screened (count + %)
- Unscreened (count + %) - Unscreened = registered beneficiaries who have not undergone Symptom Screening
- Screened Population breakup: Male, Female, Pregnant Women, Children ([15 yrs), Age ]=60 yrs, Transgender
- Screened-side figures: filtered by Village + Period
- Unscreened figures: filtered by Village only (NOT Period)
2. Total Presumptive Cases Summary
- Total TB Presumptive Cases with breakup: Male, Female, Pregnant Women, Children ([15 yrs), Age ]=60 yrs, Transgender
- Filtered by Village + Period
3. Past History of TB Cases Summary
- Total beneficiaries with past TB history, breakup: Male, Female, Pregnant Women, Children ([15 yrs), Age ]=60 yrs, Transgender
- Filtered by Village only (NOT Period)
4. Currently on Anti-TB Drugs
- Total on Anti-TB drugs, breakup: Male, Female, Pregnant Women, Children ([15 yrs), Age ]=60 yrs, Transgender
- Filtered by Village only (NOT Period)
5. Chest X-Ray Summary
- Total X-Rays conducted, demographic breakup: Male, Female, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, result breakup: Normal / Abnormal (Non-TB Presumptive) / TB Presumptive / AI Invalid Result
- Filtered by Village + Period
6. Sputum Collection Summary
- Total samples collected, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, status breakup: Sample Collected / Sample Not Collected / Sample Rejected
- Filtered by Village + Period
7. MTB Test Summary
- Total MTB tests conducted, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, result breakup: TB Positive / TB Negative / Invalid / TB Negative + X-Ray Normal / TB Negative + X-Ray Abnormal but not TB Presumptive / TB Negative + X-Ray TB Presumptive
- Filtered by Village + Period
8. RIF Test Summary
- Total RIF tests conducted, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, result breakup: DR TB / Non-DR TB / Indeterminate / Invalid
- Filtered by Village + Period
9. Samples for Liquid Culture Test Summary
- Total samples sent, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, result breakup: Positive / Negative / Contaminated / Invalid/Error / Result Pending
- Filtered by Village + Period
10. HWC Referral Cases Summary
- Total cases referred to HWCs, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Filtered by Village + Period
11. Clinical Assessment & Diagnosis Cases Summary
- Total beneficiaries undergoing clinical assessment/diagnosis, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, classification breakup: Diagnosed with TB / Not Diagnosed with TB / Diagnosis Pending / Referred for Further Evaluation / Drug-Resistant TB Diagnosed
- Filtered by Village + Period
12. TB Confirmed Cases Summary
- Total confirmed cases, demographic breakup: Male, Female, Pregnant Women, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, classification breakup: Microbiologically Confirmed TB / Clinically Diagnosed TB / Drug-Sensitive TB (DS-TB) / Drug-Resistant TB (DR-TB)
- Filtered by Village + Period
13. TPT (TB Preventive Treatment) Cases Summary
- Total beneficiaries initiated on TPT, demographic breakup: Male, Female, Children ([15 yrs), Senior Citizens (]=60 yrs), Transgender
- Per demographic, status breakup: Eligible for TPT / Initiated on TPT / TPT Ongoing / TPT Completed / TPT Discontinued/Defaulted / Not Eligible for TPT
- Filtered by Village + Period
14. NIKSHAY IDs Summary
- Total beneficiaries issued a NIKSHAY ID, for selected Village + Period
15. ABHA IDs Summary
- Total beneficiaries issued an ABHA ID, for selected Village + Period
Acceptance Criteria
- Landing page shows Home and Dashboard tabs; selecting Dashboard switches to the analytics view without full page reload.
- Time Period dropdown offers exactly: Today, January-December; Village Name dropdown is populated dynamically from master village/hamlet list.
- Changing either filter immediately re-populates all 15 cards' totals and breakups (no stale data, no manual refresh needed).
- Each of the 15 cards listed above renders with: bold total, correct demographic breakup, and correct sub-classification breakup (where applicable), matching the logic defined per card.
- Cards marked "Village only" (Unscreened Population, Past History of TB, Currently on Anti-TB Drugs) correctly ignore the Period filter and update only on Village change.
- All other cards correctly apply both Village and Period filters together.
- For every card, sum of demographic sub-counts (Male + Female + Pregnant Women + Children + Senior Citizens + Transgender, as applicable to that card) equals the card's displayed Total - verified with test data covering edge cases (zero records, single-category records, boundary ages).
- For every card with a result/status/classification breakup, sum of those sub-counts equals that demographic's count for the card.
- Pregnant Women counting rule (included within Female vs. separate non-overlapping bucket) is applied consistently across every card that has this field, per confirmed product rule.
- Age boundaries (Children [15 yrs, Senior Citizens ]=60 yrs) are applied consistently and correctly (no off-by-one errors) across all cards.
- "Today" filter returns only current day's data; month filters return full-month data for the selected month (current or relevant year per existing app logic).
- Nikshay ID and ABHA ID summary cards show correct counts of beneficiaries issued IDs within the selected Village + Period.
- QA sign-off confirms number bifurcation/alignment across all cards against source data before this story is closed.
Important Notes
- Number bifurcation must be correct and fully aligned with the logic above for every card - this is the single most critical acceptance point for this story; mismatches between total and sub-counts must be treated as blocking bugs, not cosmetic issues.
- Village-only vs Village+Period filtering must not be mixed up between cards - this is a common source of bugs and must be explicitly unit-tested per card.
- Totals must be shown in bold; demographic-disaggregated data shown per card as specified.