You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aidbox-custom-operations/measure-evaluate/sql/03-performance.sql
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,13 @@ CREATE INDEX IF NOT EXISTS ix_medrq_med_code ON medicationrequest ((resource->'m
55
55
CREATEINDEXIF NOT EXISTS ix_devicerq_subject ON devicerequest ((resource->'subject'->>'id'));
56
56
CREATEINDEXIF NOT EXISTS ix_devicerq_code ON devicerequest ((resource->'code'->'CodeableConcept'->'coding'->0->>'system'), (resource->'code'->'CodeableConcept'->'coding'->0->>'code'));
57
57
58
+
-- Observation: partial index for BP panel (observation_bp_flat legacy view)
59
+
-- Dramatically reduces rows scanned for CMS165 on legacy path
60
+
CREATEINDEXIF NOT EXISTS ix_observation_bp ON observation ((resource->'code'->'coding'->0->>'code')) WHERE resource->'code'->'coding'->0->>'code'='85354-9';
61
+
62
+
-- Encounter: class code (CMS165 disqualifying encounters)
63
+
CREATEINDEXIF NOT EXISTS ix_encounter_class ON encounter ((resource->'class'->>'code'));
0 commit comments