Skip to content

Commit 0a12356

Browse files
authored
Bump Ethiopia patient line list to V3 (#5521)
**Story card:** [sc-13796](https://app.shortcut.com/simpledotorg/story/13796/patient-line-list-returning-no-data-in-simple-dashboard-ethiopia) ## Because For some reason, the select query is working in Metabase and on the box. So we think bumping this to v3 now is safe ## This addresses Updating the materialized view definition for patient line list to V3 ## Test instructions CI pipeline
1 parent 2d4754e commit 0a12356

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class EnablePatientSummariesV3ForEthiopia < ActiveRecord::Migration[6.1]
2+
def change
3+
if CountryConfig.current_country?("Ethiopia")
4+
update_view :materialized_patient_summaries,
5+
version: 3,
6+
revert_to_version: 2,
7+
materialized: true
8+
end
9+
end
10+
end

db/structure.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,9 @@ CREATE MATERIALIZED VIEW public.materialized_patient_summaries AS
11201120
medical_histories.deleted_at,
11211121
medical_histories.user_id,
11221122
medical_histories.hypertension,
1123-
medical_histories.receiving_treatment_for_diabetes
1123+
medical_histories.receiving_treatment_for_diabetes,
1124+
medical_histories.smoking,
1125+
medical_histories.cholesterol
11241126
FROM public.medical_histories
11251127
WHERE (medical_histories.deleted_at IS NULL)
11261128
), ranked_prescription_drugs AS (
@@ -7859,6 +7861,7 @@ INSERT INTO "schema_migrations" (version) VALUES
78597861
('20241126111757'),
78607862
('20241129212725'),
78617863
('20241204155510'),
7862-
('20241210092449');
7864+
('20241210092449'),
7865+
('20250120104431');
78637866

78647867

0 commit comments

Comments
 (0)