Dm dashboard new controlled bp statin cards#5770
Open
jamiecarter7 wants to merge 1 commit intomasterfrom
Open
Conversation
jamiecarter7
commented
Feb 18, 2026
| <%= render Dashboard::Diabetes::DmPrescribedStatinsComponent.new(args_with_ltfu) %> | ||
| </div> | ||
| <% end %> | ||
|
|
Contributor
Author
There was a problem hiding this comment.
@Gyan-Gupta-Rtsl If you can just review this flipper flag is correct
Contributor
Gyan-Gupta-Rtsl
left a comment
There was a problem hiding this comment.
LGTM , Please resolve the merge conflicts in db/structure.sql before merging.
| <%= render Dashboard::Diabetes::DmPrescribedStatinsComponent.new(args_with_ltfu) %> | ||
| </div> | ||
| <% end %> | ||
|
|
Gyan-Gupta-Rtsl
approved these changes
Feb 20, 2026
Statins card Statin colour fixes and 18month data Minor fixes Sc 17708 (#5753) **Story card:** [sc-17708](https://app.shortcut.com/simpledotorg/story/17708/wire-dm-patients-with-controlled-bp-chart-to-dashboard) The DM dashboard "DM patients with controlled BP" card was using dummy data and needed backend support to display real metrics. 1. Adds backend methods in RegionSummarySchema to calculate DM patients with controlled BP (<140/90 and <130/80) 2. Wires DmBpControlledComponent to use real data from RepositoryPresenter 3. Adds specs for the new metrics Suit test cases. sc-17709: add backend for DM patients ≥40 prescribed statins chart (#5759) **Story card:** [sc-17709](https://app.shortcut.com/simpledotorg/story/17709/wire-dm-patients-40-prescribed-statins-chart-to-dashboard) **Metabase report:** [Diabetes patients aged >=40 prescribed statins at latest visit in past 12 months](https://metabase.bd.simple.org/question/647-diabetes-patients-aged-40-prescribed-statins-at-latest-visit-in-past-12-months) The dashboard needs backend data to display DM patients aged ≥40 who are prescribed statins, in order to track statin prescription rates for diabetes management. 1. Adds backend methods to calculate DM patients ≥40 under care and those prescribed statins 2. Wires these metrics into the dashboard data source for the “DM patients ≥40 prescribed statins” chart 3. Applies facility group and eligibility filters (months_since_registration >= 3, htn_care_state = 'under_care', age >= 40) 1. Run test cases Add LTFU toggle to statins card Add denominator string change when LTFU enable SIMPLEBACK-36: fix ltfu toggle bug (#5765) **Ticket**: [ltfu toggle bug ](https://rtsl.atlassian.net/browse/SIMPLEBACK-36) When the LTFU toggle is ON, the first three dashboard periods were showing denominator = 0. This happened because LTFU calculations rely on period.adjusted_period (3-month lookback), but the required historical data was not included in the query range. 1. Extends internal query range by REGISTRATION_BUFFER_IN_MONTHS (3 months) for denominator calculations 2. Keeps UI window strictly limited to original 18 months 3. Ensures first 3 periods correctly include cumulative assigned patients 4. Maintains backward compatibility and does not expose buffer months to UI 1. Enable LTFU toggle in [dashboard charts](https://api-sandbox.simple.org/reports/regions/facility/chc-lonand-gaon/diabetes?period%5Btype%5D=month&period%5Bvalue%5D=2025-10-01&with_ltfu=true) 2. Verify first three periods show correct registered patient counts 3. Confirm UI still displays only 18 months 4. Run full test suite, all specs should pass Adding flipper flag to new CVD and statins section list issue
ec605f1 to
7d81d47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Story card: 15132 SIMPLEBACK-35 SIMPLEBACK-31
Because
This PR is adding 2 new charts to the Simple DM dashboard:
This addresses
New DM indicators.
Test instructions
This feature is behind a flipper flag while adding to production to test before roll-out.
Flag:
diabetes_cvd_indicators