1 library PRS_HEDIS_2020 version '1.4.000' 2 3 using QDM version '5.5' 4 5 include NCQA_Common version '5.1.000' called Common 6 7 codesystem "SNOMEDCT": 'urn:oid:2.16.840.1.113883.6.96' 8 9 valueset "37 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1509' 10 valueset "38 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1510' 11 valueset "39 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1511' 12 valueset "40 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1512' 13 valueset "41 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1513' 14 valueset "42 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1514' 15 valueset "43 Weeks Gestation": 'urn:oid:2.16.840.1.113883.3.464.1004.1515' 16 valueset "Adult Influenza Immunization": 'urn:oid:2.16.840.1.113883.3.464.1004.1913' 17 valueset "Adult Influenza Vaccine Procedure": 'urn:oid:2.16.840.1.113883.3.464.1004.1914' 18 valueset "Deliveries": 'urn:oid:2.16.840.1.113883.3.464.1004.1072' 19 valueset "Ethnicity": 'urn:oid:2.16.840.1.114222.4.11.837' 20 valueset "Hospice Encounter": 'urn:oid:2.16.840.1.113883.3.464.1004.1761' 21 valueset "Hospice Intervention": 'urn:oid:2.16.840.1.113883.3.464.1004.1762' 22 valueset "ONC Administrative Sex": 'urn:oid:2.16.840.1.113762.1.4.1' 23 valueset "Payer": 'urn:oid:2.16.840.1.114222.4.11.3591' 24 valueset "Race": 'urn:oid:2.16.840.1.114222.4.11.836' 25 valueset "Tdap Immunization": 'urn:oid:2.16.840.1.113883.3.464.1004.1791' 26 valueset "Tdap Vaccine Procedure": 'urn:oid:2.16.840.1.113883.3.464.1004.1792' 27 valueset "Weeks of Gestation Less than 37": 'urn:oid:2.16.840.1.113883.3.464.1004.1479' 28 29 code "Anaphylaxis due to diphtheria and tetanus vaccine (disorder)": '428281000124107' from "SNOMEDCT" display 'Anaphylaxis due to diphtheria and tetanus vaccine (disorder)' 30 code "Anaphylaxis due to tetanus, diphtheria and acellular pertussis vaccine (disorder)": '428291000124105' from "SNOMEDCT" display 'Anaphylaxis due to tetanus, diphtheria and acellular pertussis vaccine (disorder)' 31 code "Influenza virus vaccine adverse reaction (disorder)": '420113004' from "SNOMEDCT" display 'Influenza virus vaccine adverse reaction (disorder)' 32 code "Length of gestation at birth (observable entity)": '412726003' from "SNOMEDCT" display 'Length of gestation at birth (observable entity)' 33 code "Post diphtheria vaccination encephalitis (disorder)": '192711008' from "SNOMEDCT" display 'Post diphtheria vaccination encephalitis (disorder)' 34 code "Post pertussis vaccination encephalitis (disorder)": '192712001' from "SNOMEDCT" display 'Post pertussis vaccination encephalitis (disorder)' 35 code "Post tetanus vaccination encephalitis (disorder)": '192710009' from "SNOMEDCT" display 'Post tetanus vaccination encephalitis (disorder)' 36 37 parameter "Measurement Period" Interval 38 parameter "Product Line" String 39 40 context Patient 41 42 define "SDE Ethnicity": 43 ["Patient Characteristic Ethnicity": "Ethnicity"] 44 45 define "SDE Payer": 46 ["Patient Characteristic Payer": "Payer"] 47 48 define "SDE Race": 49 ["Patient Characteristic Race": "Race"] 50 51 define "SDE Sex": 52 ["Patient Characteristic Sex": "ONC Administrative Sex"] 53 54 define "LOG": 55 1 + 1 = 2 56 /* 57 Quality Gate 1 LOGIC UPDATE 4.19.2019 58 change definition name "Delivery at Less than 37 Weeks Gestation" to "Delivery in Measurement Period at Less than 37 Weeks Gestation" 59 change definition name "Delivery with Hospice Order or Intervention" to "Delivery in Measurement Period with Hospice Order or Intervention" 60 61 5/31 updated Common library to 5.0. Added Parameter def. Updated Continuous Enrollment Defs.Updated stratification. Updated Hospice Def to call Common library 62 */ 63 64 define "Delivery in Measurement Period with Hospice Intervention or Encounter": 65 "Delivery" DeliveryProcedure 66 where exists Common."Hospice Intervention or Encounter" 67 68 define "Denominator Exclusions": 69 "Delivery in Measurement Period at Less than 37 Weeks Gestation" 70 union "Delivery in Measurement Period with Hospice Intervention or Encounter" 71 72 define "Numerator 1": 73 ( "Delivery" DeliveryProcedure 74 where "Has Influenza Vaccine 18 Months or Less Before End of Measurement Period and Delivery" 75 or "Has Influenza Vaccine Adverse Reaction Before or During Measurement Period" 76 ) 77 78 define "Numerator 3": 79 ( "Delivery" DeliveryProcedure 80 where "Has Influenza Vaccine or Vaccine Reaction and TDAP Vaccine or Vaccine Reaction" 81 ) 82 83 define "Stratification 1": 84 Common."Product Line"("Product Line", "Delivery Event Date", Interval["Delivery Event Date" - 28 days, "Delivery Event Date"])= Common."Commercial Product" 85 and exists "Delivery" 86 87 define "Stratification 2": 88 Common."Product Line"("Product Line", "Delivery Event Date", Interval["Delivery Event Date" - 28 days, "Delivery Event Date"])= Common."Medicaid Product" 89 and exists "Delivery" 90 91 define function "Conception Date"(Delivery "Procedure, Performed" ): 92 end of Delivery.relevantPeriod - Last("All Gestational Age Assessment" Assessment 93 where Assessment.authorDatetime within 24 hours of 94 end of Delivery.relevantPeriod 95 sort by authorDatetime 96 ).result 97 98 context Population 99 100 define "All Gestational Age Assessment": 101 ( ( "Gestational Age Assessment" 102 union "Gestational Age Diagnosis" 103 union "Less than 37 Weeks Assessment" ) GestationalAge 104 ) 105 106 define "Delivery": 107 ["Procedure, Performed": "Deliveries"] Procedure 108 where Procedure.relevantPeriod during "Measurement Period" 109 110 define "Delivery At Greater Than 36 Weeks Gestation": 111 "All Gestational Age Assessment" AgeAssessment 112 with "Delivery" DeliveryProcedure 113 such that AgeAssessment.authorDatetime during DeliveryProcedure.relevantPeriod 114 and AgeAssessment.result > 36 weeks 115 116 define "Delivery Event Date": 117 First("Delivery" DeliveryProcedure 118 where DeliveryProcedure.relevantPeriod during "Measurement Period" 119 return DeliveryProcedure.authorDatetime 120 ) 121 122 define "Delivery in Measurement Period at Less than 37 Weeks Gestation": 123 "Delivery" DeliveryProcedure 124 with "Less than 37 Weeks Assessment" Assessment 125 such that Assessment.authorDatetime within 24 hours of DeliveryProcedure.relevantPeriod 126 127 define "Denominator 1": 128 "Initial Population" 129 130 define "Denominator 2": 131 "Initial Population" 132 133 define "Denominator 3": 134 "Initial Population" 135 136 define "Enrolled During Participation Period": 137 Common."Is Enrolled"("Product Line", "Delivery Event Date", Interval["Delivery Event Date" - 28 days, "Delivery Event Date"], 0) 138 139 define "Gestational Age Assessment": 140 ["Assessment, Performed": "Length of gestation at birth (observable entity)"] 141 142 define "Gestational Age Diagnosis": 143 ( ["Diagnosis": "37 Weeks Gestation"] D 144 return { 145 id: D.id, 146 code: D.code, 147 authorDatetime: 148 end of D.prevalencePeriod, 149 result: 37 weeks 150 } 151 ) 152 union ( ["Diagnosis": "38 Weeks Gestation"] D 153 return { 154 id: D.id, 155 code: D.code, 156 authorDatetime: 157 end of D.prevalencePeriod, 158 result: 38 weeks 159 } 160 ) 161 union ( ["Diagnosis": "39 Weeks Gestation"] D 162 return { 163 id: D.id, 164 code: D.code, 165 authorDatetime: 166 end of D.prevalencePeriod, 167 result: 39 weeks 168 } 169 ) 170 union ( ["Diagnosis": "40 Weeks Gestation"] D 171 return { 172 id: D.id, 173 code: D.code, 174 authorDatetime: 175 end of D.prevalencePeriod, 176 result: 40 weeks 177 } 178 ) 179 union ( ["Diagnosis": "41 Weeks Gestation"] D 180 return { 181 id: D.id, 182 code: D.code, 183 authorDatetime: 184 end of D.prevalencePeriod, 185 result: 41 weeks 186 } 187 ) 188 union ( ["Diagnosis": "42 Weeks Gestation"] D 189 return { 190 id: D.id, 191 code: D.code, 192 authorDatetime: 193 end of D.prevalencePeriod, 194 result: 42 weeks 195 } 196 ) 197 union ( ["Diagnosis": "43 Weeks Gestation"] D 198 return { 199 id: D.id, 200 code: D.code, 201 authorDatetime: 202 end of D.prevalencePeriod, 203 result: 43 weeks 204 } 205 ) 206 207 define "Has Influenza Vaccine Adverse Reaction Before or During Measurement Period": 208 exists ( ["Diagnosis": "Influenza virus vaccine adverse reaction (disorder)"] InfluenzaReaction 209 where InfluenzaReaction.prevalencePeriod starts before "Measurement Period" 210 or InfluenzaReaction.prevalencePeriod starts during "Measurement Period" 211 ) 212 213 define "Less than 37 Weeks Assessment": 214 ( ( ["Assessment, Performed": "Length of gestation at birth (observable entity)"] GestationAssessment 215 where GestationAssessment.result < 37 weeks 216 and GestationAssessment.authorDatetime in "Measurement Period" 217 ) 218 union "Less Than 37 Weeks Diagnosis" GestationalDiagnosis 219 where GestationalDiagnosis.authorDatetime in "Measurement Period" 220 ) 221 222 define "Less Than 37 Weeks Diagnosis": 223 ["Diagnosis": "Weeks of Gestation Less than 37"] 224 225 define "Numerator 2": 226 ( "Delivery with Tdap Vaccine between Conception and Delivery" 227 union ( "Delivery" DeliveryProcedure 228 where exists "TD or TDAP Vaccine Contraindications" 229 ) 230 ) 231 232 define "Delivery with Tdap Vaccine between Conception and Delivery": 233 "Delivery" DeliveryProcedure 234 with ( ["Immunization, Administered": "Tdap Immunization"] 235 union ["Procedure, Performed": "Tdap Vaccine Procedure"] TdapVaccine 236 return "Immunization, Administered" { authorDatetime: start of TdapVaccine.relevantPeriod } ) TDAP 237 such that TDAP.authorDatetime between "Conception Date"(DeliveryProcedure)and 238 end of DeliveryProcedure.relevantPeriod 239 240 define "Initial Population": 241 "Delivery" Procedure 242 with ( "All Gestational Age Assessment" ) AgeAssessment 243 such that Procedure.relevantPeriod starts before AgeAssessment.authorDatetime 244 and AgeAssessment.authorDatetime within 24 hours of 245 end of Procedure.relevantPeriod 246 and AgeAssessment is not null 247 where "Enrolled During Participation Period" 248 249 define "Has Influenza Vaccine 18 Months or Less Before End of Measurement Period and Delivery": 250 exists ( ( ["Immunization, Administered": "Adult Influenza Immunization"] 251 union ["Procedure, Performed": "Adult Influenza Vaccine Procedure"] InfluenzaVaccine 252 return "Immunization, Administered" { authorDatetime: start of InfluenzaVaccine.relevantPeriod } ) Influenza 253 with "Delivery" DeliveryProcedure 254 such that Influenza.authorDatetime during Interval[ 255 end of "Measurement Period" - 17 months - 31 days, 256 end of DeliveryProcedure.relevantPeriod] 257 ) 258 259 define "Has Influenza Vaccine or Vaccine Reaction and TDAP Vaccine or Vaccine Reaction": 260 exists ( ( ( ["Immunization, Administered": "Adult Influenza Immunization"] 261 union ["Procedure, Performed": "Adult Influenza Vaccine Procedure"] InfluenzaVaccine 262 return "Immunization, Administered" { authorDatetime: start of InfluenzaVaccine.relevantPeriod } ) Influenza 263 with "Delivery" DeliveryProcedure 264 such that Influenza.authorDatetime during Interval[ 265 end of "Measurement Period" - 17 months - 31 days, 266 end of DeliveryProcedure.relevantPeriod] 267 ) 268 union ( ["Diagnosis": "Influenza virus vaccine adverse reaction (disorder)"] InfluenzaReaction 269 where InfluenzaReaction.prevalencePeriod starts before "Measurement Period" 270 or InfluenzaReaction.prevalencePeriod starts during "Measurement Period" 271 ) 272 ) 273 and exists ( ( ( ["Immunization, Administered": "Tdap Immunization"] 274 union ["Procedure, Performed": "Tdap Vaccine Procedure"] TdapVaccine 275 return "Immunization, Administered" { authorDatetime: start of TdapVaccine.relevantPeriod } ) TDAP 276 with "Delivery" DeliveryProcedure 277 such that TDAP.authorDatetime between "Conception Date"(DeliveryProcedure)and 278 end of DeliveryProcedure.relevantPeriod 279 ) 280 union ( "TD or TDAP Vaccine Contraindications" ) 281 ) 282 283 define "TD or TDAP Vaccine Contraindications": 284 ( ( ["Diagnosis": "Anaphylaxis due to diphtheria and tetanus vaccine (disorder)"] ) 285 union ( ["Diagnosis": "Anaphylaxis due to tetanus, diphtheria and acellular pertussis vaccine (disorder)"] ) 286 union ( ["Diagnosis": "Post diphtheria vaccination encephalitis (disorder)"] ) 287 union ( ["Diagnosis": "Post pertussis vaccination encephalitis (disorder)"] ) 288 union ( ["Diagnosis": "Post tetanus vaccination encephalitis (disorder)"] ) VaccineContraindications 289 where VaccineContraindications.prevalencePeriod starts before "Measurement Period" 290 or VaccineContraindications.prevalencePeriod starts during "Measurement Period" 291 ) /******************************************************************************************************************* ERRORS: ******************************************************************************************************************** Line 98: Could not resolve context name Population in model QDM. *******************************************************************************************************************/