PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.uv.cqm@2.0.0-ballot
    http://hl7.org/fhir/uv/cqm/Measure/TSCComponent
{
  "description": "This is an example only.",
  "_filename": "example/Measure-TSCComponent.json",
  "package_name": "hl7.fhir.uv.cqm",
  "date": "2025-08-13T17:14:51-06:00",
  "group": [ {
    "id": "group-1",
    "code": {
      "text": "Group 1"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId",
      "valueString": "primary"
    } ],
    "population": [ {
      "id": "1DE7294A-72AE-42D1-A2A6-BCAE23DBA8A6",
      "code": {
        "coding": [ {
          "code": "initial-population",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Initial Population"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Initial Population"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "primary-tsccomponent-initial-population"
      } ]
    }, {
      "id": "0F57D23C-C2AA-4CE1-9E20-33DAE1F2B145",
      "code": {
        "coding": [ {
          "code": "denominator",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Denominator"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Denominator 1"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "primary-tsccomponent-denominator"
      } ]
    }, {
      "id": "570F7624-72EC-4CFC-9137-F48E476D77DC",
      "code": {
        "coding": [ {
          "code": "denominator-exception",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Denominator Exception"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Denominator Exceptions 1"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "primary-tsccomponent-denominator-exception"
      } ]
    }, {
      "id": "20577EB7-3FE9-43D2-B918-A8C7AE5E0E91",
      "code": {
        "coding": [ {
          "code": "numerator",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Numerator"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Numerator 1"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "primary-tsccomponent-numerator"
      } ]
    } ]
  }, {
    "id": "group-2",
    "code": {
      "text": "Group 2"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId",
      "valueString": "group-2"
    } ],
    "population": [ {
      "id": "DD346C87-5D2B-4319-B41D-7BF64ADF95D0",
      "code": {
        "coding": [ {
          "code": "initial-population",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Initial Population"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Initial Population"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-2-tsccomponent-initial-population"
      } ]
    }, {
      "id": "A1FAA872-5C94-4F2B-A355-8E3A3390369C",
      "code": {
        "coding": [ {
          "code": "denominator",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Denominator"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Denominator 2"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-2-tsccomponent-denominator"
      } ]
    }, {
      "id": "3AE470CD-37DF-492D-A3A4-365BAF744C5A",
      "code": {
        "coding": [ {
          "code": "denominator-exception",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Denominator Exception"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Denominator Exceptions 2"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-2-tsccomponent-denominator-exception"
      } ]
    }, {
      "id": "B1F8B729-7BBD-4616-B39C-E90444B7884C",
      "code": {
        "coding": [ {
          "code": "numerator",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Numerator"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Numerator 2"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-2-tsccomponent-numerator"
      } ]
    } ]
  }, {
    "id": "group-3",
    "code": {
      "text": "Group 3"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId",
      "valueString": "group-3"
    } ],
    "population": [ {
      "id": "EA2696EE-326B-490A-82B5-E4D8FC581E77",
      "code": {
        "coding": [ {
          "code": "initial-population",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Initial Population"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Initial Population"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-3-tsccomponent-initial-population"
      } ]
    }, {
      "id": "D346BB79-EFD1-4DB1-902A-36F027BE75E9",
      "code": {
        "coding": [ {
          "code": "denominator",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Denominator"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Denominator 3"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-3-tsccomponent-denominator"
      } ]
    }, {
      "id": "6BBFE753-2072-4848-B189-0E5B44BE1F52",
      "code": {
        "coding": [ {
          "code": "denominator-exception",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Denominator Exception"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Denominator Exceptions 3"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-3-tsccomponent-denominator-exception"
      } ]
    }, {
      "id": "F8E22F0F-7307-4BED-9295-648803772928",
      "code": {
        "coding": [ {
          "code": "numerator",
          "system": "http://terminology.hl7.org/CodeSystem/measure-population",
          "display": "Numerator"
        } ]
      },
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "Numerator 3"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId",
        "valueString": "group-3-tsccomponent-numerator"
      } ]
    } ]
  } ],
  "meta": {
    "profile": [ "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-publishablemeasure", "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure", "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-proportionmeasure" ]
  },
  "publisher": "HL7 International / Clinical Quality Information",
  "jurisdiction": [ {
    "coding": [ {
      "code": "001",
      "system": "http://unstats.un.org/unsd/methods/m49/m49.htm"
    } ]
  } ],
  "name": "TSCComponent",
  "useContext": [ {
    "code": {
      "code": "venue",
      "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
      "display": "Clinical Venue"
    },
    "valueCodeableConcept": {
      "coding": [ {
        "code": "ec",
        "system": "http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes",
        "display": "EC"
      } ]
    }
  } ],
  "type": "[{:coding [{:system \\\"http://terminology.hl7.org/CodeSystem/measure-type\\\", :code \\\"process\\\"}]}]",
  "experimental": "true",
  "resourceType": "Measure",
  "title": "Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention",
  "supplementalData": [ {
    "id": "fe7bab72-cc69-44bb-a678-473b24811e67",
    "usage": [ {
      "coding": [ {
        "code": "supplemental-data",
        "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage"
      } ]
    } ],
    "criteria": {
      "language": "text/cql-identifier",
      "expression": "SDE Ethnicity"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.supplementalData.linkId",
      "valueString": "tsccomponent-sde-ethnicity"
    } ]
  }, {
    "id": "2486f84d-df90-489b-8f5c-e55cdcfb361e",
    "usage": [ {
      "coding": [ {
        "code": "supplemental-data",
        "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage"
      } ]
    } ],
    "criteria": {
      "language": "text/cql-identifier",
      "expression": "SDE Payer"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.supplementalData.linkId",
      "valueString": "tsccomponent-sde-payer"
    } ]
  }, {
    "id": "bb0949c4-1f7b-4ce2-a988-c2e60f1a0079",
    "usage": [ {
      "coding": [ {
        "code": "supplemental-data",
        "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage"
      } ]
    } ],
    "criteria": {
      "language": "text/cql-identifier",
      "expression": "SDE Race"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.supplementalData.linkId",
      "valueString": "tsccomponent-sde-race"
    } ]
  }, {
    "id": "742028bc-5aa5-4a5b-927d-be1908e10aaf",
    "usage": [ {
      "coding": [ {
        "code": "supplemental-data",
        "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage"
      } ]
    } ],
    "criteria": {
      "language": "text/cql-identifier",
      "expression": "SDE Sex"
    },
    "extension": [ {
      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.supplementalData.linkId",
      "valueString": "tsccomponent-sde-sex"
    } ]
  } ],
  "library": [ "http://hl7.org/fhir/uv/cqm/Library/TSCComponent" ],
  "package_version": "2.0.0-ballot",
  "extension": [ {
    "url": "http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-populationBasis",
    "valueCode": "boolean"
  }, {
    "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem",
    "valueReference": {
      "reference": "Device/software-system-example"
    }
  }, {
    "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements",
    "valueCanonical": "#effective-data-requirements"
  } ],
  "contained": [ {
    "dataRequirement": [ {
      "type": "Patient",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ],
      "mustSupport": [ "url", "extension", "value", "birthDate" ]
    }, {
      "type": "Observation",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Observation" ],
      "codeFilter": [ {
        "path": "code",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1278"
      } ],
      "mustSupport": [ "code", "effective", "value", "issued", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "code": [ {
          "code": "96158",
          "system": "http://www.ama-assn.org/go/cpt",
          "display": "Health behavior intervention, individual, face-to-face; initial 30 minutes"
        } ],
        "path": "type"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "code": [ {
          "code": "96156",
          "system": "http://www.ama-assn.org/go/cpt",
          "display": "Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)"
        } ],
        "path": "type"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1141"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1530"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1030"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "Encounter",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023"
      } ],
      "mustSupport": [ "type", "period", "status" ]
    }, {
      "type": "MedicationRequest",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/MedicationRequest" ],
      "codeFilter": [ {
        "path": "medication",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1190"
      } ],
      "mustSupport": [ "medication", "authoredOn", "status", "doNotPerform", "statusReason" ]
    }, {
      "type": "MedicationRequest",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/MedicationRequest" ],
      "mustSupport": [ "medication.reference", "authoredOn", "status", "doNotPerform", "statusReason" ]
    }, {
      "type": "Medication",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Medication" ],
      "mustSupport": [ "id", "code" ]
    }, {
      "type": "Condition",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Condition" ],
      "mustSupport": [ "clinicalStatus" ]
    }, {
      "type": "Coverage",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Coverage" ],
      "codeFilter": [ {
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
      } ],
      "mustSupport": [ "type", "period" ]
    }, {
      "type": "Procedure",
      "profile": [ "http://hl7.org/fhir/StructureDefinition/Procedure" ],
      "codeFilter": [ {
        "path": "code",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509"
      } ],
      "mustSupport": [ "code", "performed", "status", "statusReason" ]
    } ],
    "name": "EffectiveDataRequirements",
    "type": {
      "coding": [ {
        "code": "module-definition",
        "system": "http://terminology.hl7.org/CodeSystem/library-type"
      } ]
    },
    "resourceType": "Library",
    "extension": [ {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding": {
        "code": "active",
        "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"
      }
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding": {
        "code": "96158",
        "system": "http://www.ama-assn.org/go/cpt",
        "display": "Health behavior intervention, individual, face-to-face; initial 30 minutes"
      }
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding": {
        "code": "96156",
        "system": "http://www.ama-assn.org/go/cpt",
        "display": "Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)"
      }
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Most Recent Tobacco Use Screening Indicates Tobacco Non User"
      }, {
        "url": "statement",
        "valueString": "define \"Most Recent Tobacco Use Screening Indicates Tobacco Non User\":\n  ( Last([\"Observation\": \"Tobacco Use Screening\"] TobaccoUseScreening\n        where Global.\"Normalize Interval\"(TobaccoUseScreening.effective)overlaps \"Measurement Period\"\n        sort by start of Global.\"Normalize Interval\"(effective)\n    )) MostRecentTobaccoUseScreening\n      where MostRecentTobaccoUseScreening.value in \"Tobacco Non-User\""
      }, {
        "url": "displaySequence",
        "valueInteger": 0
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Most Recent Tobacco Use Screening Indicates Tobacco User"
      }, {
        "url": "statement",
        "valueString": "define \"Most Recent Tobacco Use Screening Indicates Tobacco User\":\n  ( Last([\"Observation\": \"Tobacco Use Screening\"] TobaccoUseScreening\n        where Global.\"Normalize Interval\"(TobaccoUseScreening.effective)overlaps \"Measurement Period\"\n        sort by start of Global.\"Normalize Interval\"(effective)\n    )) MostRecentTobaccoUseScreening\n      where MostRecentTobaccoUseScreening.value in \"Tobacco User\""
      }, {
        "url": "displaySequence",
        "valueInteger": 1
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Tobacco Cessation Counseling Given"
      }, {
        "url": "statement",
        "valueString": "// MedicationStatement is not available in R5, known publication issue\n//define \"Active Pharmacotherapy for Tobacco Cessation\":\n//  [\"MedicationStatement\": \"Tobacco Use Cessation Pharmacotherapy\"] TakingCessationPharmacotherapy\n//      where Global.\"Normalize Interval\" ( TakingCessationPharmacotherapy.effective ) overlaps after \"Measurement Period\"\n//        and TakingCessationPharmacotherapy.status in { 'active', 'completed' }\n\ndefine \"Tobacco Cessation Counseling Given\":\n  [\"Encounter\": \"Tobacco Use Cessation Counseling\"] TobaccoCessationCounseling\n      where TobaccoCessationCounseling.period during \"Measurement Period\"\n        and TobaccoCessationCounseling.status = 'finished'"
      }, {
        "url": "displaySequence",
        "valueInteger": 2
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Tobacco Cessation Pharmacotherapy Ordered"
      }, {
        "url": "statement",
        "valueString": "define \"Tobacco Cessation Pharmacotherapy Ordered\":\n  [\"MedicationRequest\": \"Tobacco Use Cessation Pharmacotherapy\"] CessationPharmacotherapyOrdered\n      where CessationPharmacotherapyOrdered.authoredOn during \"Measurement Period\"\n        and CessationPharmacotherapyOrdered.status = 'active'"
      }, {
        "url": "displaySequence",
        "valueInteger": 3
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Numerator 3"
      }, {
        "url": "statement",
        "valueString": "define \"Numerator 3\":\n  \"Most Recent Tobacco Use Screening Indicates Tobacco Non User\" is not null\n      or ( \"Most Recent Tobacco Use Screening Indicates Tobacco User\" is not null\n          and ( exists \"Tobacco Cessation Counseling Given\"\n              or exists \"Tobacco Cessation Pharmacotherapy Ordered\"\n              //or exists \"Active Pharmacotherapy for Tobacco Cessation\"\n          )\n      )"
      }, {
        "url": "displaySequence",
        "valueInteger": 4
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Medical Reason for Not Screening for Tobacco Use"
      }, {
        "url": "statement",
        "valueString": "define \"Medical Reason for Not Screening for Tobacco Use\":\n  [\"Observation\": \"Tobacco Use Screening\"] NoTobaccoUseScreening\n      where NoTobaccoUseScreening.issued during \"Measurement Period\"\n        and \"Not Done\"(NoTobaccoUseScreening)\n        and \"Not Done Reason in Medical Reason\"(NoTobaccoUseScreening)\n        and NoTobaccoUseScreening.status = 'final'"
      }, {
        "url": "displaySequence",
        "valueInteger": 5
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Has Limited Life Expectancy"
      }, {
        "url": "statement",
        "valueString": "//or exists \"Active Pharmacotherapy for Tobacco Cessation\"\n\ndefine \"Has Limited Life Expectancy\":\n  exists ( [\"Condition\"] LimitedLifeExpectancy\n        where Global.\"Prevalence Period\" ( LimitedLifeExpectancy ) overlaps after \"Measurement Period\"\n          and LimitedLifeExpectancy.clinicalStatus ~ ToConcept(Global.\"active\")\n    )"
      }, {
        "url": "displaySequence",
        "valueInteger": 6
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Denominator Exceptions 1"
      }, {
        "url": "statement",
        "valueString": "define \"Denominator Exceptions 1\":\n  exists \"Medical Reason for Not Screening for Tobacco Use\"\n      or \"Has Limited Life Expectancy\""
      }, {
        "url": "displaySequence",
        "valueInteger": 7
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Numerator 1"
      }, {
        "url": "statement",
        "valueString": "define \"Numerator 1\":\n  \"Most Recent Tobacco Use Screening Indicates Tobacco Non User\" is not null\n      or \"Most Recent Tobacco Use Screening Indicates Tobacco User\" is not null"
      }, {
        "url": "displaySequence",
        "valueInteger": 8
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Numerator 2"
      }, {
        "url": "statement",
        "valueString": "define \"Numerator 2\":\n  exists \"Tobacco Cessation Counseling Given\"\n      or exists \"Tobacco Cessation Pharmacotherapy Ordered\""
      }, {
        "url": "displaySequence",
        "valueInteger": 9
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "SupplementalDataElements"
      }, {
        "url": "name",
        "valueString": "SDE Race"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Race\":\n  (flatten (\n      Patient.extension Extension\n        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'\n          return Extension.extension\n    )) E\n      where E.url = 'ombCategory'\n        or E.url = 'detailed'\n      return E.value as Coding"
      }, {
        "url": "displaySequence",
        "valueInteger": 10
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "SDE Race"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Race\":\n  SDE.\"SDE Race\""
      }, {
        "url": "displaySequence",
        "valueInteger": 11
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "SupplementalDataElements"
      }, {
        "url": "name",
        "valueString": "SDE Sex"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Sex\":\n  case\n      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }\n      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }\n      else null\n    end"
      }, {
        "url": "displaySequence",
        "valueInteger": 12
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "SDE Sex"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Sex\":\n  SDE.\"SDE Sex\""
      }, {
        "url": "displaySequence",
        "valueInteger": 13
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Office Based Visit During Measurement Period"
      }, {
        "url": "statement",
        "valueString": "define \"Office Based Visit During Measurement Period\":\n  ( [\"Encounter\": \"Health behavior intervention, individual, face-to-face; initial 30 minutes\"]\n      union [\"Encounter\": \"Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)\"]\n      union [\"Encounter\": \"Home Healthcare Services\"]\n      union [\"Encounter\": \"Occupational Therapy Evaluation\"]\n      union [\"Encounter\": \"Office Visit\"]\n      union [\"Encounter\": \"Ophthalmological Services\"]\n      union [\"Encounter\": \"Physical Therapy Evaluation\"]\n      union [\"Encounter\": \"Psych Visit - Diagnostic Evaluation\"]\n      union [\"Encounter\": \"Psych Visit - Psychotherapy\"]\n      union [\"Encounter\": \"Psychoanalysis\"]\n      union [\"Encounter\": \"Speech and Hearing Evaluation\"] ) OfficeBasedEncounter\n      where OfficeBasedEncounter.period during \"Measurement Period\"\n        and OfficeBasedEncounter.status = 'finished'"
      }, {
        "url": "displaySequence",
        "valueInteger": 14
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Preventive Visit During Measurement Period"
      }, {
        "url": "statement",
        "valueString": "define \"Preventive Visit During Measurement Period\":\n  ( [\"Encounter\": \"Annual Wellness Visit\"]\n      union [\"Encounter\": \"Preventive Care Services - Established Office Visit, 18 and Up\"]\n      union [\"Encounter\": \"Preventive Care Services - Group Counseling\"]\n      union [\"Encounter\": \"Preventive Care Services - Other\"]\n      union [\"Encounter\": \"Preventive Care Services-Individual Counseling\"]\n      union [\"Encounter\": \"Preventive Care Services-Initial Office Visit, 18 and Up\"] ) PreventiveEncounter\n      where PreventiveEncounter.period during \"Measurement Period\"\n        and PreventiveEncounter.status = 'finished'"
      }, {
        "url": "displaySequence",
        "valueInteger": 15
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Initial Population"
      }, {
        "url": "statement",
        "valueString": "define \"Initial Population\":\n  exists ( [\"Patient\"] BirthDate\n        where Global.\"CalendarAgeInYearsAt\" ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of \"Measurement Period\" ) >= 18\n    )\n      and ( Count(\"Office Based Visit During Measurement Period\")>= 2\n          or exists \"Preventive Visit During Measurement Period\"\n      )"
      }, {
        "url": "displaySequence",
        "valueInteger": 16
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Denominator 3"
      }, {
        "url": "statement",
        "valueString": "define \"Denominator 3\":\n  \"Initial Population\""
      }, {
        "url": "displaySequence",
        "valueInteger": 17
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Denominator 2"
      }, {
        "url": "statement",
        "valueString": "define \"Denominator 2\":\n  \"Initial Population\"\n      and \"Most Recent Tobacco Use Screening Indicates Tobacco User\" is not null"
      }, {
        "url": "displaySequence",
        "valueInteger": 18
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "SupplementalDataElements"
      }, {
        "url": "name",
        "valueString": "SDE Payer"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Payer\":\n  [Coverage: type in \"Payer\"] Payer\n        return {\n          code: Payer.type,\n          period: Payer.period\n        }"
      }, {
        "url": "displaySequence",
        "valueInteger": 19
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "SDE Payer"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
      }, {
        "url": "displaySequence",
        "valueInteger": 20
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "SupplementalDataElements"
      }, {
        "url": "name",
        "valueString": "SDE Ethnicity"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Ethnicity\":\n  (flatten (\n      Patient.extension Extension\n        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'\n          return Extension.extension\n    )) E\n      where E.url = 'ombCategory'\n        or E.url = 'detailed'\n      return E.value as Coding"
      }, {
        "url": "displaySequence",
        "valueInteger": 21
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "SDE Ethnicity"
      }, {
        "url": "statement",
        "valueString": "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
      }, {
        "url": "displaySequence",
        "valueInteger": 22
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Medical Reason for Not Counseling Tobacco User"
      }, {
        "url": "statement",
        "valueString": "define \"Medical Reason for Not Counseling Tobacco User\":\n  [\"Procedure\": \"Tobacco Use Cessation Counseling\"] NoTobaccoCessationCounseling\n      where Global.\"Normalize Interval\" ( NoTobaccoCessationCounseling.performed ) starts during \"Measurement Period\"\n        and ( ( NoTobaccoCessationCounseling.status = 'not-done'\n              and NoTobaccoCessationCounseling.statusReason in \"Medical Reason\"\n          )\n            or ( \"Not Done\"(NoTobaccoCessationCounseling)\n                and \"Not Done Reason in Medical Reason\"(NoTobaccoCessationCounseling)\n            )\n        )"
      }, {
        "url": "displaySequence",
        "valueInteger": 23
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy"
      }, {
        "url": "statement",
        "valueString": "define \"Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy\":\n  [\"MedicationRequest\": \"Tobacco Use Cessation Pharmacotherapy\"] NoCessationPharmacotherapyOrdered\n      where NoCessationPharmacotherapyOrdered.authoredOn during \"Measurement Period\"\n        and NoCessationPharmacotherapyOrdered.status = 'completed'\n        and ( ( \"Not Done\"(NoCessationPharmacotherapyOrdered)\n              and \"Not Done Reason in Medical Reason\"(NoCessationPharmacotherapyOrdered)\n          )\n            or ( NoCessationPharmacotherapyOrdered.doNotPerform = true\n                and NoCessationPharmacotherapyOrdered.statusReason in \"Medical Reason\"\n            )\n        )"
      }, {
        "url": "displaySequence",
        "valueInteger": 24
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Denominator Exceptions 2"
      }, {
        "url": "statement",
        "valueString": "define \"Denominator Exceptions 2\":\n  exists \"Medical Reason for Not Counseling Tobacco User\"\n      or exists \"Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy\"\n      or \"Has Limited Life Expectancy\""
      }, {
        "url": "displaySequence",
        "valueInteger": 25
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Denominator Exceptions 3"
      }, {
        "url": "statement",
        "valueString": "define \"Denominator Exceptions 3\":\n  exists \"Medical Reason for Not Screening for Tobacco Use\"\n      or exists \"Medical Reason for Not Counseling Tobacco User\"\n      or exists \"Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy\"\n      or \"Has Limited Life Expectancy\""
      }, {
        "url": "displaySequence",
        "valueInteger": 26
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Denominator 1"
      }, {
        "url": "statement",
        "valueString": "define \"Denominator 1\":\n  \"Initial Population\""
      }, {
        "url": "displaySequence",
        "valueInteger": 27
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "MATGlobalCommonFunctions"
      }, {
        "url": "name",
        "valueString": "Normalize Interval"
      }, {
        "url": "statement",
        "valueString": "/*\n*\n*    CQFMeasures Common Logic\n*\n*/\n\ndefine function \"Normalize Interval\"(choice Choice, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):\n  case\n\t  when choice is FHIR.dateTime then\n    \tInterval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]\n\t\twhen choice is FHIR.Period then\n  \t\tFHIRHelpers.ToInterval(choice as FHIR.Period)\n\t\twhen choice is FHIR.instant then\n\t\t\tInterval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]\n\t\twhen choice is FHIR.Age then\n\t\t  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),\n\t\t\t  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)\n\t\twhen choice is FHIR.Range then\n\t\t  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),\n\t\t\t  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)\n\t\twhen choice is FHIR.Timing then\n\t\t  Message(null as Interval, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')\n    when choice is FHIR.string then\n      Message(null as Interval, true, '1', 'Error', 'Cannot compute an interval from a String value')\n\t\telse\n\t\t\tnull as Interval\n\tend"
      }, {
        "url": "displaySequence",
        "valueInteger": 28
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToDateTime"
      }, {
        "url": "statement",
        "valueString": "define function ToDateTime(value dateTime): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 29
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToInterval"
      }, {
        "url": "statement",
        "valueString": "/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
      }, {
        "url": "displaySequence",
        "valueInteger": 30
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToDateTime"
      }, {
        "url": "statement",
        "valueString": "define function ToDateTime(value instant): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 31
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToDate"
      }, {
        "url": "statement",
        "valueString": "define function ToDate(value date): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 32
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToQuantity"
      }, {
        "url": "statement",
        "valueString": "/*\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) \nvalue to a CQL Quantity\n@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity\nhas a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)\nan error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.\n@seealso: ToCalendarUnit\n*/\ndefine function ToQuantity(quantity FHIR.Quantity):\n    case\n        when quantity is null then null\n        when quantity.value is null then null\n        when quantity.comparator is not null then\n            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')\n        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\n              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\n            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\n        else\n            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')\n    end"
      }, {
        "url": "displaySequence",
        "valueInteger": 33
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToCalendarUnit"
      }, {
        "url": "statement",
        "valueString": "/*\n@description: Converts a UCUM definite duration unit to a CQL calendar duration\nunit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) \ntopic of the CQL specification.\n@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate\n*/\ndefine function ToCalendarUnit(unit System.String):\n    case unit\n        when 'ms' then 'millisecond'\n        when 's' then 'second'\n        when 'min' then 'minute'\n        when 'h' then 'hour'\n        when 'd' then 'day'\n        when 'wk' then 'week'\n        when 'mo' then 'month'\n        when 'a' then 'year'\n        else unit\n    end"
      }, {
        "url": "displaySequence",
        "valueInteger": 34
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value string): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 35
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value EncounterStatus): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 36
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToConcept"
      }, {
        "url": "statement",
        "valueString": "/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"
      }, {
        "url": "displaySequence",
        "valueInteger": 37
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToCode"
      }, {
        "url": "statement",
        "valueString": "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }"
      }, {
        "url": "displaySequence",
        "valueInteger": 38
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value MedicationRequestStatus): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 39
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Not Done"
      }, {
        "url": "statement",
        "valueString": "define function \"Not Done\"(res DomainResource ):\n  if ( res R\n      where ( \"GetModiferExtension\"(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone').value = true )\n  ) is not null then true\n    else false"
      }, {
        "url": "displaySequence",
        "valueInteger": 40
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToBoolean"
      }, {
        "url": "statement",
        "valueString": "define function ToBoolean(value boolean): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 41
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "GetModiferExtension"
      }, {
        "url": "statement",
        "valueString": "define function \"GetModiferExtension\"(res DomainResource, url String ):\n  singleton from \"GetModifierExtensions\"(res, url)"
      }, {
        "url": "displaySequence",
        "valueInteger": 42
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "GetModifierExtensions"
      }, {
        "url": "statement",
        "valueString": "define function \"GetModifierExtensions\"(res DomainResource, url String ):\n  res.modifierExtension E\n    where E.url = ( url )\n    return E"
      }, {
        "url": "displaySequence",
        "valueInteger": 43
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value uri): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 44
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "TSCComponent"
      }, {
        "url": "name",
        "valueString": "Not Done Reason in Medical Reason"
      }, {
        "url": "statement",
        "valueString": "define function \"Not Done Reason in Medical Reason\"(res DomainResource ):\n  if ( res R\n      where \"GetModiferExtension\"(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason').value in \"Medical Reason\"\n  ) is not null then true\n    else false"
      }, {
        "url": "displaySequence",
        "valueInteger": 45
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value base64Binary): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 46
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value ObservationStatus): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 47
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "MATGlobalCommonFunctions"
      }, {
        "url": "name",
        "valueString": "Prevalence Period"
      }, {
        "url": "statement",
        "valueString": "define function \"Prevalence Period\"(condition Condition):\n  Interval[start of \"Normalize Interval\"(condition.onset), end of \"Normalize Abatement\"(condition))"
      }, {
        "url": "displaySequence",
        "valueInteger": 48
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "MATGlobalCommonFunctions"
      }, {
        "url": "name",
        "valueString": "Normalize Abatement"
      }, {
        "url": "statement",
        "valueString": "define function \"Normalize Abatement\"(condition Condition):\n\tif condition.abatement is FHIR.dateTime then\n\t  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]\n\telse if condition.abatement is FHIR.Period then\n\t  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)\n\telse if condition.abatement is FHIR.string then\n    Message(null as Interval, true, '1', 'Error', 'Cannot compute an interval from a String value')\n\telse if condition.abatement is FHIR.Age then\n\t\tInterval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),\n\t\t\tFHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)\n\telse if condition.abatement is FHIR.Range then\n\t  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),\n\t\t  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)\n\telse if condition.abatement is FHIR.boolean then\n\t  Interval[end of \"Normalize Interval\"(condition.onset), condition.recordedDate)\n\telse null"
      }, {
        "url": "displaySequence",
        "valueInteger": 49
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value AdministrativeGender): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 50
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "MATGlobalCommonFunctions"
      }, {
        "url": "name",
        "valueString": "CalendarAgeInYearsAt"
      }, {
        "url": "statement",
        "valueString": "define function \"CalendarAgeInYearsAt\"(BirthDateTime DateTime, AsOf DateTime):\n\tyears between ToDate(BirthDateTime)and ToDate(AsOf)"
      }, {
        "url": "displaySequence",
        "valueInteger": 51
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "MATGlobalCommonFunctions"
      }, {
        "url": "name",
        "valueString": "ToDate"
      }, {
        "url": "statement",
        "valueString": "define function \"ToDate\"(Value DateTime):\n\tDateTime(year from Value, month from Value, day from Value, 0, 0, 0, 0, timezoneoffset from Value)"
      }, {
        "url": "displaySequence",
        "valueInteger": 52
      } ]
    }, {
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
      "extension": [ {
        "url": "libraryName",
        "valueString": "FHIRHelpers"
      }, {
        "url": "name",
        "valueString": "ToString"
      }, {
        "url": "statement",
        "valueString": "define function ToString(value ProcedureStatus): value.value"
      }, {
        "url": "displaySequence",
        "valueInteger": 53
      } ]
    } ],
    "status": "active",
    "id": "effective-data-requirements",
    "relatedArtifact": [ {
      "type": "depends-on",
      "display": "FHIR model information",
      "resource": "http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"
    }, {
      "type": "depends-on",
      "display": "Library Global",
      "resource": "http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000"
    }, {
      "type": "depends-on",
      "display": "Library FHIRHelpers",
      "resource": "http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"
    }, {
      "type": "depends-on",
      "display": "Library SDE",
      "resource": "http://hl7.org/fhir/uv/cqm/Library/SupplementalDataElements|2.0.000"
    }, {
      "type": "depends-on",
      "display": "Code system ConditionClinicalStatusCodes",
      "resource": "http://terminology.hl7.org/CodeSystem/condition-clinical"
    }, {
      "type": "depends-on",
      "display": "Code system CPT",
      "resource": "http://www.ama-assn.org/go/cpt"
    }, {
      "type": "depends-on",
      "display": "Value set Tobacco Use Screening",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1278"
    }, {
      "type": "depends-on",
      "display": "Value set Tobacco Non-User",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1189"
    }, {
      "type": "depends-on",
      "display": "Value set Tobacco User",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1170"
    }, {
      "type": "depends-on",
      "display": "Value set Tobacco Use Cessation Counseling",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509"
    }, {
      "type": "depends-on",
      "display": "Value set Tobacco Use Cessation Pharmacotherapy",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1190"
    }, {
      "type": "depends-on",
      "display": "Value set Medical Reason",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007"
    }, {
      "type": "depends-on",
      "display": "Value set Home Healthcare Services",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"
    }, {
      "type": "depends-on",
      "display": "Value set Occupational Therapy Evaluation",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011"
    }, {
      "type": "depends-on",
      "display": "Value set Office Visit",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"
    }, {
      "type": "depends-on",
      "display": "Value set Ophthalmological Services",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285"
    }, {
      "type": "depends-on",
      "display": "Value set Physical Therapy Evaluation",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022"
    }, {
      "type": "depends-on",
      "display": "Value set Psych Visit - Diagnostic Evaluation",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492"
    }, {
      "type": "depends-on",
      "display": "Value set Psych Visit - Psychotherapy",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496"
    }, {
      "type": "depends-on",
      "display": "Value set Psychoanalysis",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1141"
    }, {
      "type": "depends-on",
      "display": "Value set Speech and Hearing Evaluation",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1530"
    }, {
      "type": "depends-on",
      "display": "Value set Annual Wellness Visit",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240"
    }, {
      "type": "depends-on",
      "display": "Value set Preventive Care Services - Established Office Visit, 18 and Up",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025"
    }, {
      "type": "depends-on",
      "display": "Value set Preventive Care Services - Group Counseling",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027"
    }, {
      "type": "depends-on",
      "display": "Value set Preventive Care Services - Other",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1030"
    }, {
      "type": "depends-on",
      "display": "Value set Preventive Care Services-Individual Counseling",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026"
    }, {
      "type": "depends-on",
      "display": "Value set Preventive Care Services-Initial Office Visit, 18 and Up",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023"
    }, {
      "type": "depends-on",
      "display": "Value set Payer",
      "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
    } ],
    "parameter": [ {
      "max": "1",
      "min": 0,
      "use": "in",
      "name": "Measurement Period",
      "type": "Period"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Numerator 3",
      "type": "boolean"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Denominator Exceptions 1",
      "type": "boolean"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Numerator 1",
      "type": "boolean"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Numerator 2",
      "type": "boolean"
    }, {
      "max": "*",
      "min": 0,
      "use": "out",
      "name": "SDE Race",
      "type": "Coding"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "SDE Sex",
      "type": "Coding"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Denominator 3",
      "type": "boolean"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Denominator 2",
      "type": "boolean"
    }, {
      "max": "*",
      "min": 0,
      "use": "out",
      "name": "SDE Payer",
      "type": "Resource"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Initial Population",
      "type": "boolean"
    }, {
      "max": "*",
      "min": 0,
      "use": "out",
      "name": "SDE Ethnicity",
      "type": "Coding"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Denominator Exceptions 2",
      "type": "boolean"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Denominator Exceptions 3",
      "type": "boolean"
    }, {
      "max": "1",
      "min": 0,
      "use": "out",
      "name": "Denominator 1",
      "type": "boolean"
    } ]
  } ],
  "status": "active",
  "language": "en",
  "id": "92536c10-0084-47d0-9d41-327e9d82c862",
  "kind": null,
  "url": "http://hl7.org/fhir/uv/cqm/Measure/TSCComponent",
  "identifier": [ {
    "use": "official",
    "type": {
      "coding": [ {
        "code": "version-independent",
        "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "display": "Version Independent"
      } ]
    },
    "value": "http://example.org/fhir/us/cqm/Measure/HBPComponent",
    "system": "urn:ietf:rfc:3986"
  }, {
    "use": "official",
    "type": {
      "coding": [ {
        "code": "version-specific",
        "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "display": "Version Specific"
      } ]
    },
    "value": "http://example.org/fhir/us/cqm/Measure/138v12",
    "system": "urn:ietf:rfc:3986"
  }, {
    "use": "usual",
    "type": {
      "coding": [ {
        "code": "short-name",
        "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "display": "Short Name"
      } ]
    },
    "value": "Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention"
  }, {
    "value": "urn:oid:2.16.840.1.113883.4.642.40.61.29.18",
    "system": "urn:ietf:rfc:3986"
  } ],
  "scoring": {
    "coding": [ {
      "code": "proportion",
      "system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
      "display": "Proportion"
    } ]
  },
  "version": "0.0.001",
  "contact": [ {
    "telecom": [ {
      "value": "http://www.hl7.org/Special/committees/cqi",
      "system": "url"
    } ]
  } ],
  "improvementNotation": {
    "coding": [ {
      "code": "increase",
      "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation"
    } ]
  },
  "effectivePeriod": {
    "end": "2022-12-31",
    "start": "2022-01-01"
  }
}