Metadata Title EXM125 - Breast Cancer Screening Library Version 8.0.000 Identifier EXM125 Identifier urn:oid:2.16.840.1.113883.4.642.40.61.28.10 Approval Date 2019-08-03 Last Review Date 2019-08-03 Experimental true Jurisdiction Global (Whole world) Steward (Publisher) HL7 International / Clinical Quality Information Description This library is used as an example in the FHIR Quality Measure Implementation Guide Type Logic Library Parameter Name: Measurement Period Use: In Min Cardinality: 0 Max Cardinality: 1 Type: Period Parameter Name: Patient Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Patient Parameter Name: SDE Ethnicity Use: Out Min Cardinality: 0 Max Cardinality: * Type: Coding Parameter Name: SDE Payer Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: SDE Race Use: Out Min Cardinality: 0 Max Cardinality: * Type: Coding Parameter Name: SDE Sex Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding Parameter Name: Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Unilateral Mastectomy Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Procedure Parameter Name: Right Mastectomy Use: Out Min Cardinality: 0 Max Cardinality: * Type: Condition Parameter Name: Left Mastectomy Use: Out Min Cardinality: 0 Max Cardinality: * Type: Condition Parameter Name: History Bilateral Mastectomy Use: Out Min Cardinality: 0 Max Cardinality: * Type: Condition Parameter Name: Bilateral Mastectomy Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Procedure Parameter Name: Numerator Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator Exclusion Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Data Requirement Type: Patient Profile(s): Patient Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, performed, status Code Filter(s): Path: code ValueSet: Unilateral Mastectomy Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, performed, status Code Filter(s): Path: code ValueSet: Bilateral Mastectomy Data Requirement Type: Condition Profile(s): Condition Must Support Elements: code, clinicalStatus, onset Code Filter(s): Path: code ValueSet: Status Post Right Mastectomy Data Requirement Type: Condition Profile(s): Condition Must Support Elements: code, clinicalStatus, onset Code Filter(s): Path: code ValueSet: Status Post Left Mastectomy Data Requirement Type: Condition Profile(s): Condition Must Support Elements: code, bodySite, clinicalStatus, onset Code Filter(s): Path: code ValueSet: Unilateral Mastectomy, Unspecified Laterality Data Requirement Type: Condition Profile(s): Condition Must Support Elements: code, onset, clinicalStatus Code Filter(s): Path: code ValueSet: History of bilateral mastectomy Data Requirement Type: DiagnosticReport Profile(s): DiagnosticReport Must Support Elements: code, effective, status Code Filter(s): Path: code ValueSet: Mammography Library Content CQL Content /*#xD; This example is a work in progress and should not be considered a final specification#xD; or recommendation for guidance. This example will help guide and direct the process#xD; of finding conventions and usage patterns that meet the needs of the various stakeholders#xD; in the measure development community.#xD; #xD; Based on CMS125v8 - Breast Cancer Screening#xD; */#xD; library EXM125 version '8.0.000'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers#xD; #xD; include Hospice version '2.0.000' called Hospice#xD; include AdultOutpatientEncounters version '2.0.000' called AdultOutpatientEncounters#xD; include MATGlobalCommonFunctions version '5.0.000' called Global#xD; include SupplementalDataElements version '2.0.000' called SDE#xD; #xD; valueset "ONC Administrative Sex": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1'#xD; valueset "Race": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836'#xD; valueset "Ethnicity": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837'#xD; valueset "Payer": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591'#xD; valueset "Bilateral Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1005'#xD; valueset "Female": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.560.100.2'#xD; valueset "Mammography": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1018'#xD; valueset "Unilateral Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1020'#xD; valueset "History of bilateral mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1068'#xD; valueset "Status Post Left Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1069'#xD; valueset "Status Post Right Mastectomy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1070'#xD; valueset "Left": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.122.12.1036'#xD; valueset "Right": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.122.12.1035'#xD; valueset "Unilateral Mastectomy, Unspecified Laterality": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1071'#xD; #xD; parameter "Measurement Period" Interval<DateTime>#xD; default Interval[@2019-01-01T00:00:00.0, @2020-01-01T00:00:00.0)#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; #xD; define "Unilateral Mastectomy Procedure":#xD; [Procedure: "Unilateral Mastectomy"] UnilateralMastectomyProcedure#xD; where Global."Normalize Interval"(UnilateralMastectomyProcedure.performed) ends before day of end of "Measurement Period"#xD; and UnilateralMastectomyProcedure.status = 'completed'#xD; #xD; define "Right Mastectomy":#xD; (#xD; ( [Condition: "Status Post Right Mastectomy"] C#xD; where C.clinicalStatus ~ ToConcept(Global."active")#xD; )#xD; union (#xD; [Condition: "Unilateral Mastectomy, Unspecified Laterality"] UnilateralMastectomyDiagnosis#xD; where UnilateralMastectomyDiagnosis.bodySite in "Right"#xD; and UnilateralMastectomyDiagnosis.clinicalStatus ~ ToConcept(Global."active")#xD; )#xD; ) RightMastectomy#xD; where Global."Normalize Interval"(RightMastectomy.onset) starts before day of end of "Measurement Period"#xD; #xD; define "Left Mastectomy":#xD; (#xD; ( [Condition: "Status Post Left Mastectomy"] C#xD; where C.clinicalStatus ~ ToConcept(Global."active")#xD; )#xD; union (#xD; [Condition: "Unilateral Mastectomy, Unspecified Laterality"] UnilateralMastectomyDiagnosis#xD; where UnilateralMastectomyDiagnosis.bodySite in "Left"#xD; and UnilateralMastectomyDiagnosis.clinicalStatus ~ ToConcept(Global."active")#xD; )#xD; ) LeftMastectomy#xD; where Global."Normalize Interval"(LeftMastectomy.onset) starts before day of end of "Measurement Period"#xD; #xD; define "History Bilateral Mastectomy":#xD; [Condition: "History of bilateral mastectomy"] BilateralMastectomyHistory#xD; where Global."Normalize Interval"(BilateralMastectomyHistory.onset) starts before day of end of "Measurement Period"#xD; and BilateralMastectomyHistory.clinicalStatus ~ ToConcept(Global."active")#xD; #xD; define "Bilateral Mastectomy Procedure":#xD; [Procedure: "Bilateral Mastectomy"] BilateralMastectomyPerformed#xD; where Global."Normalize Interval"(BilateralMastectomyPerformed.performed) ends before day of end of "Measurement Period"#xD; and BilateralMastectomyPerformed.status = 'completed'#xD; #xD; define "Numerator":#xD; exists (#xD; [DiagnosticReport: "Mammography"] Mammogram#xD; where ( Global."Normalize Interval"(Mammogram.effective) ends 27 months or less before day of end of "Measurement Period" )#xD; and Mammogram.status in { 'final', 'amended', 'corrected', 'appended' }#xD; )#xD; #xD; define "Denominator Exclusion":#xD; Hospice."Has Hospice"#xD; or ( Count("Unilateral Mastectomy Procedure") = 2 )#xD; or ( exists "Right Mastectomy" and exists "Left Mastectomy" )#xD; or exists "History Bilateral Mastectomy"#xD; or exists "Bilateral Mastectomy Procedure"#xD; #xD; define "Initial Population":#xD; Patient.gender = 'female'#xD; and Global."CalendarAgeInYearsAt"(FHIRHelpers.ToDate(Patient.birthDate), start of "Measurement Period") in Interval[51, 74]#xD; and exists AdultOutpatientEncounters."Qualifying Encounters"#xD; ELM XML Content Encoded data (111208 characters) ELM JSON Content Encoded data (207468 characters) Generated using version 0.4.9 of the sample-content-ig Liquid templates
EXM125 - Breast Cancer Screening Library
HL7 International / Clinical Quality Information
This library is used as an example in the FHIR Quality Measure Implementation Guide
Value set History of bilateral mastectomy
Value set Unilateral Mastectomy, Unspecified Laterality