Skip to content

Commit a90ad60

Browse files
Added Systolic BP reading report in quick links (#5550)
**Story card:** [sc-15060](https://app.shortcut.com/simpledotorg/story/15060/update-systolic-bp-readings-query-report-layout) Because At district level, quick links will open the corresponding metabase report for that district This Addresses Will open the quick links for the respective district Test Instructions Enable the flipper "quick_link_for_metabase"
1 parent 9fe8e1c commit a90ad60

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.env.BD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ DISTRICT_FACILITY_TREND_REPORT_URL = "https://api.bd.simple.org/my_facilities/bp
88
DISTRICT_DRUG_STOCK_REPORT_URL = "https://api.bd.simple.org/my_facilities/drug_stocks?facility_group="
99
DISTRICT_METABASE_TITRATION_URL = "https://metabase.bd.simple.org/question/997-district-titration-trend?months=past9months&district_name="
1010
DISTRICT_METABASE_BP_FUDGING_URL = "https://metabase.bd.simple.org/question/1000-01-district-report?state_name="
11+
DISTRICT_METABASE_SYSTOLIC_BP_URL = "https://metabase.bd.simple.org/question/1005-histogram-systolic-reading-for-all-bp-measures-in-past-3-months?district="

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ DISTRICT_DRUG_STOCK_REPORT_URL = "https://api.example.com/my_facilities/drug_sto
7070
DISTRICT_FACILITY_TREND_REPORT_URL = "https://api.example.com/my_facilities/bp_controlled?facility_group="
7171
DISTRICT_METABASE_TITRATION_URL = "https://metabase.example.com/titration?district_name="
7272
DISTRICT_METABASE_BP_FUDGING_URL = "https://metabase.example.com/bp_fudging?state_name="
73+
DISTRICT_METABASE_SYSTOLIC_BP_URL = "https://metabase.example.com/systolic?district_name="

app/views/reports/regions/show.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
<div><a href="<%= ENV.fetch('DISTRICT_METABASE_BP_FUDGING_URL', '') %><%= @region.parent.name %>&district_name=<%= @region.name %>" target="_blank">
3838
Metabase: BP fudging report
3939
</a></div>
40+
<div><a href="<%= ENV.fetch('DISTRICT_METABASE_SYSTOLIC_BP_URL', '') %><%= @region.name %>" target="_blank">
41+
Metabase: Systolic BP reading report
42+
</a></div>
4043
</div>
4144
<% end %>
4245
<% end %>

spec/controllers/reports/regions_controller_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@
9292
expect(response.body).to include("Drug stock")
9393
expect(response.body).to include("Metabase: Titration report")
9494
expect(response.body).to include("Metabase: BP fudging report")
95+
expect(response.body).to include("Metabase: Systolic BP reading report")
9596
expect(response.body).to include("https://api.example.com/my_facilities/drug_stocks?facility_group=")
9697
expect(response.body).to include("https://api.example.com/my_facilities/bp_controlled?facility_group=")
9798
expect(response.body).to include("https://metabase.example.com/titration?district_name=")
9899
expect(response.body).to include("https://metabase.example.com/bp_fudging?state_name=")
100+
expect(response.body).to include("https://metabase.example.com/systolic?district_name=")
99101
end
100102
end
101103
context "and the feature flag is disabled" do
@@ -106,10 +108,12 @@
106108
expect(response.body).to_not include("District Drug sto_notck report")
107109
expect(response.body).to_not include("Metabase: Titration report")
108110
expect(response.body).to_not include("Metabase: BP fudging report")
111+
expect(response.body).to_not include("Metabase: Systolic BP reading report")
109112
expect(response.body).to_not include("https://api.example.com/my_facilities/drug_stocks?facility_group=")
110113
expect(response.body).to_not include("https://api.example.com/my_facilities/bp_controlled?facility_group=")
111114
expect(response.body).to_not include("https://metabase.example.com/titration?district_name=")
112115
expect(response.body).to_not include("https://metabase.example.com/bp_fudging?state_name=")
116+
expect(response.body).to_not include("https://metabase.example.com/systolic?district_name=")
113117
end
114118
end
115119
end

0 commit comments

Comments
 (0)