Quality Measure Implementation Guide
1.0.0 - STU 1

Quality Measure Implementation Guide - Downloaded Version null See the Directory of published versions

## : Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention - XML Representation

Page standards status: Informative

Raw xml | Download

    <Measure xmlns="http://hl7.org/fhir">
      <id value="TSCComponent"/>
      <meta>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-publishablemeasure"/>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-computablemeasure"/>
        <profile
                 value="http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-proportionmeasure"/>
      </meta>
      <language value="en"/>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <table class="narrative-table">
        <tbody>
    <tr>

    <th colspan="2" scope="row" class="row-header">Metadata</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Title</th>

    <td class="content-container">Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Version</th>

    <td class="content-container">0.0.001</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Short Name</th>

    <td class="content-container">Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">GUID (Version Independent)</th>

    <td class="content-container">http://example.org/fhir/us/cqm/Measure/HBPComponent</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">GUID (Version Specific)</th>

    <td class="content-container">http://example.org/fhir/us/cqm/Measure/138v12</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Identifier</th>

    <td class="content-container">urn:oid:2.16.840.1.113883.4.642.40.61.29.18</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Effective Period</th>

    <td class="content-container">2022-01-01 through 2022-12-31</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Experimental</th>

    <td class="content-container">true</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Use Context</th>

    <td class="content-container"><span title="{http://terminology.hl7.org/CodeSystem/usage-context-type venue}">Clinical Venue</span> = <span title="Codes:{http://hl7.org/fhir/uv/cqm/CodeSystem/intended-venue-codes ec}">EC</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Jurisdiction</th>

    <td class="content-container"><span title="Codes:{http://unstats.un.org/unsd/methods/m49/m49.htm 001}">Global (Whole world)</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Steward (Publisher)</th>

    <td class="content-container">HL7 International / Clinical Quality Information</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Description</th>

    <td class="content-container"><div><p>This is an example only.</p>
    </div></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Basis</th>

    <td class="content-container">boolean</td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Scoring</th>

    <td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring proportion}">Proportion</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Measure Type</th>

    <td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-type process}">Process</span></td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Improvement Notation</th>

    <td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation increase}">Increased score indicates improvement</span></td>
    </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: primary)</th>

    </tr>

        <tr>

    <th scope="row" class="row-header">Initial Population</th>

          <td class="content-container">

            <em>ID</em>: primary-tsccomponent-initial-population
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-tsccomponent-initial-population">Initial Population</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator</th>

          <td class="content-container">

            <em>ID</em>: primary-tsccomponent-denominator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-tsccomponent-denominator">Denominator 1</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator Exception</th>

          <td class="content-container">

            <em>ID</em>: primary-tsccomponent-denominator-exception
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-tsccomponent-denominator-exception">Denominator Exceptions 1</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Numerator</th>

          <td class="content-container">

            <em>ID</em>: primary-tsccomponent-numerator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#primary-primary-tsccomponent-numerator">Numerator 1</a>

          </td>
        </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: group-2)</th>

    </tr>

        <tr>

    <th scope="row" class="row-header">Initial Population</th>

          <td class="content-container">

            <em>ID</em>: group-2-tsccomponent-initial-population
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-2-group-2-tsccomponent-initial-population">Initial Population</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator</th>

          <td class="content-container">

            <em>ID</em>: group-2-tsccomponent-denominator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-2-group-2-tsccomponent-denominator">Denominator 2</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator Exception</th>

          <td class="content-container">

            <em>ID</em>: group-2-tsccomponent-denominator-exception
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-2-group-2-tsccomponent-denominator-exception">Denominator Exceptions 2</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Numerator</th>

          <td class="content-container">

            <em>ID</em>: group-2-tsccomponent-numerator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-2-group-2-tsccomponent-numerator">Numerator 2</a>

          </td>
        </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: group-3)</th>

    </tr>

        <tr>

    <th scope="row" class="row-header">Initial Population</th>

          <td class="content-container">

            <em>ID</em>: group-3-tsccomponent-initial-population
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-3-group-3-tsccomponent-initial-population">Initial Population</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator</th>

          <td class="content-container">

            <em>ID</em>: group-3-tsccomponent-denominator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-3-group-3-tsccomponent-denominator">Denominator 3</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Denominator Exception</th>

          <td class="content-container">

            <em>ID</em>: group-3-tsccomponent-denominator-exception
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-3-group-3-tsccomponent-denominator-exception">Denominator Exceptions 3</a>

          </td>
        </tr>

        <tr>

    <th scope="row" class="row-header">Numerator</th>

          <td class="content-container">

            <em>ID</em>: group-3-tsccomponent-numerator
            <br/>

              <em>Description</em>: No description provided

                  <em>Criteria</em>: <a href="#group-3-group-3-tsccomponent-numerator">Numerator 3</a>

          </td>
        </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header">Supplemental Data Elements</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Supplemental Data Element</th>

      <td class="content-container">

          <em>ID</em>: fe7bab72-cc69-44bb-a678-473b24811e67

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: No description provided

            <br/>

              <em>Logic Definition</em>: <a href="#tsccomponent-sde-ethnicity">SDE Ethnicity</a>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Supplemental Data Element</th>

      <td class="content-container">

          <em>ID</em>: 2486f84d-df90-489b-8f5c-e55cdcfb361e

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: No description provided

            <br/>

              <em>Logic Definition</em>: <a href="#tsccomponent-sde-payer">SDE Payer</a>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Supplemental Data Element</th>

      <td class="content-container">

          <em>ID</em>: bb0949c4-1f7b-4ce2-a988-c2e60f1a0079

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: No description provided

            <br/>

              <em>Logic Definition</em>: <a href="#tsccomponent-sde-race">SDE Race</a>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Supplemental Data Element</th>

      <td class="content-container">

          <em>ID</em>: 742028bc-5aa5-4a5b-927d-be1908e10aaf

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: No description provided

            <br/>

              <em>Logic Definition</em>: <a href="#tsccomponent-sde-sex">SDE Sex</a>

      </td>
    </tr>

    <tr>

    <th colspan="2" scope="row" class="row-header">Measure Logic</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Primary Library</th>

    <td class="content-container"><a href="Library-TSCComponent.html">TSC Component Library</a></td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Contents</th>
      <td class="content-container">
        <em><a href="#population-criteria">Population Criteria</a></em>
        <br/>
        <em><a href="#definitions">Logic Definitions</a></em>
        <br/>
        <em><a href="#terminology">Terminology</a></em>
        <br/>
        <em><a href="#dependencies">Dependencies</a></em>
        <br/>
        <em><a href="#data-requirements">Data Requirements</a></em>
        <br/>
      </td>
    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="population-criteria"> </a>Population Criteria</th>

    </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: primary)</th>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Initial Population

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-tsccomponent-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:   exists ( [&quot;Patient&quot;] BirthDate         where Global.&quot;CalendarAgeInYearsAt&quot; ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of &quot;Measurement Period&quot; ) &gt;= 18     )       and ( Count(&quot;Office Based Visit During Measurement Period&quot;)&gt;= 2           or exists &quot;Preventive Visit During Measurement Period&quot;       )</code></pre>

          <a href="#tsccomponent-initial-population"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-tsccomponent-denominator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator 1&quot;:   &quot;Initial Population&quot;</code></pre>

          <a href="#tsccomponent-denominator-1"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator Exception

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-tsccomponent-denominator-exception"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions 1&quot;:   exists &quot;Medical Reason for Not Screening for Tobacco Use&quot;       or &quot;Has Limited Life Expectancy&quot;</code></pre>

          <a href="#tsccomponent-denominator-exceptions-1"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Numerator

      </th>
    </tr>
    <tr>

      <td>

          <a name="primary-primary-tsccomponent-numerator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator 1&quot;:   &quot;Most Recent Tobacco Use Screening Indicates Tobacco Non User&quot; is not null       or &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot; is not null</code></pre>

          <a href="#tsccomponent-numerator-1"><em>Definition</em></a>

      </td>

    </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: group-2)</th>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Initial Population

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-2-group-2-tsccomponent-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:   exists ( [&quot;Patient&quot;] BirthDate         where Global.&quot;CalendarAgeInYearsAt&quot; ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of &quot;Measurement Period&quot; ) &gt;= 18     )       and ( Count(&quot;Office Based Visit During Measurement Period&quot;)&gt;= 2           or exists &quot;Preventive Visit During Measurement Period&quot;       )</code></pre>

          <a href="#tsccomponent-initial-population"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-2-group-2-tsccomponent-denominator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator 2&quot;:   &quot;Initial Population&quot;       and &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot; is not null</code></pre>

          <a href="#tsccomponent-denominator-2"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator Exception

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-2-group-2-tsccomponent-denominator-exception"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions 2&quot;:   exists &quot;Medical Reason for Not Counseling Tobacco User&quot;       or exists &quot;Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy&quot;       or &quot;Has Limited Life Expectancy&quot;</code></pre>

          <a href="#tsccomponent-denominator-exceptions-2"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Numerator

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-2-group-2-tsccomponent-numerator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator 2&quot;:   exists &quot;Tobacco Cessation Counseling Given&quot;       or exists &quot;Tobacco Cessation Pharmacotherapy Ordered&quot;</code></pre>

          <a href="#tsccomponent-numerator-2"><em>Definition</em></a>

      </td>

    </tr>

        <tr>

    <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: group-3)</th>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Initial Population

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-3-group-3-tsccomponent-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:   exists ( [&quot;Patient&quot;] BirthDate         where Global.&quot;CalendarAgeInYearsAt&quot; ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of &quot;Measurement Period&quot; ) &gt;= 18     )       and ( Count(&quot;Office Based Visit During Measurement Period&quot;)&gt;= 2           or exists &quot;Preventive Visit During Measurement Period&quot;       )</code></pre>

          <a href="#tsccomponent-initial-population"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-3-group-3-tsccomponent-denominator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator 3&quot;:   &quot;Initial Population&quot;</code></pre>

          <a href="#tsccomponent-denominator-3"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Denominator Exception

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-3-group-3-tsccomponent-denominator-exception"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions 3&quot;:   exists &quot;Medical Reason for Not Screening for Tobacco Use&quot;       or exists &quot;Medical Reason for Not Counseling Tobacco User&quot;       or exists &quot;Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy&quot;       or &quot;Has Limited Life Expectancy&quot;</code></pre>

          <a href="#tsccomponent-denominator-exceptions-3"><em>Definition</em></a>

      </td>

    </tr>

                <tr>
      <th scope="row" rowspan="2" class="row-header">

        Numerator

      </th>
    </tr>
    <tr>

      <td>

          <a name="group-3-group-3-tsccomponent-numerator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator 3&quot;:   &quot;Most Recent Tobacco Use Screening Indicates Tobacco Non User&quot; is not null       or ( &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot; is not null           and ( exists &quot;Tobacco Cessation Counseling Given&quot;               or exists &quot;Tobacco Cessation Pharmacotherapy Ordered&quot;               //or exists &quot;Active Pharmacotherapy for Tobacco Cessation&quot;           )       )</code></pre>

          <a href="#tsccomponent-numerator-3"><em>Definition</em></a>

      </td>

    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="definitions"> </a>Logic Definitions</th>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-race"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:   (flatten (       Patient.extension Extension         where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'           return Extension.extension     )) E       where E.url = 'ombCategory'         or E.url = 'detailed'       return E.value as Coding</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-sex"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:   case       when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }       when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }       else null     end</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-payer"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:   [Coverage: type in &quot;Payer&quot;] Payer         return {           code: Payer.type,           period: Payer.period         }</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-ethnicity"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:   (flatten (       Patient.extension Extension         where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'           return Extension.extension     )) E       where E.url = 'ombCategory'         or E.url = 'detailed'       return E.value as Coding</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-most-recent-tobacco-use-screening-indicates-tobacco-non-user"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Most Recent Tobacco Use Screening Indicates Tobacco Non User&quot;:   ( Last([&quot;Observation&quot;: &quot;Tobacco Use Screening&quot;] TobaccoUseScreening         where Global.&quot;Normalize Interval&quot;(TobaccoUseScreening.effective)overlaps &quot;Measurement Period&quot;         sort by start of Global.&quot;Normalize Interval&quot;(effective)     )) MostRecentTobaccoUseScreening       where MostRecentTobaccoUseScreening.value in &quot;Tobacco Non-User&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-most-recent-tobacco-use-screening-indicates-tobacco-user"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot;:   ( Last([&quot;Observation&quot;: &quot;Tobacco Use Screening&quot;] TobaccoUseScreening         where Global.&quot;Normalize Interval&quot;(TobaccoUseScreening.effective)overlaps &quot;Measurement Period&quot;         sort by start of Global.&quot;Normalize Interval&quot;(effective)     )) MostRecentTobaccoUseScreening       where MostRecentTobaccoUseScreening.value in &quot;Tobacco User&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-tobacco-cessation-counseling-given"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// MedicationStatement is not available in R5, known publication issue //define &quot;Active Pharmacotherapy for Tobacco Cessation&quot;: //  [&quot;MedicationStatement&quot;: &quot;Tobacco Use Cessation Pharmacotherapy&quot;] TakingCessationPharmacotherapy //      where Global.&quot;Normalize Interval&quot; ( TakingCessationPharmacotherapy.effective ) overlaps after &quot;Measurement Period&quot; //        and TakingCessationPharmacotherapy.status in { 'active', 'completed' }  define &quot;Tobacco Cessation Counseling Given&quot;:   [&quot;Encounter&quot;: &quot;Tobacco Use Cessation Counseling&quot;] TobaccoCessationCounseling       where TobaccoCessationCounseling.period during &quot;Measurement Period&quot;         and TobaccoCessationCounseling.status = 'finished'</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-tobacco-cessation-pharmacotherapy-ordered"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Tobacco Cessation Pharmacotherapy Ordered&quot;:   [&quot;MedicationRequest&quot;: &quot;Tobacco Use Cessation Pharmacotherapy&quot;] CessationPharmacotherapyOrdered       where CessationPharmacotherapyOrdered.authoredOn during &quot;Measurement Period&quot;         and CessationPharmacotherapyOrdered.status = 'active'</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-numerator-3"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator 3&quot;:   &quot;Most Recent Tobacco Use Screening Indicates Tobacco Non User&quot; is not null       or ( &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot; is not null           and ( exists &quot;Tobacco Cessation Counseling Given&quot;               or exists &quot;Tobacco Cessation Pharmacotherapy Ordered&quot;               //or exists &quot;Active Pharmacotherapy for Tobacco Cessation&quot;           )       )</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-medical-reason-for-not-screening-for-tobacco-use"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Medical Reason for Not Screening for Tobacco Use&quot;:   [&quot;Observation&quot;: &quot;Tobacco Use Screening&quot;] NoTobaccoUseScreening       where NoTobaccoUseScreening.issued during &quot;Measurement Period&quot;         and &quot;Not Done&quot;(NoTobaccoUseScreening)         and &quot;Not Done Reason in Medical Reason&quot;(NoTobaccoUseScreening)         and NoTobaccoUseScreening.status = 'final'</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-has-limited-life-expectancy"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//or exists &quot;Active Pharmacotherapy for Tobacco Cessation&quot;  define &quot;Has Limited Life Expectancy&quot;:   exists ( [&quot;Condition&quot;] LimitedLifeExpectancy         where Global.&quot;Prevalence Period&quot; ( LimitedLifeExpectancy ) overlaps after &quot;Measurement Period&quot;           and LimitedLifeExpectancy.clinicalStatus ~ ToConcept(Global.&quot;active&quot;)     )</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-denominator-exceptions-1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions 1&quot;:   exists &quot;Medical Reason for Not Screening for Tobacco Use&quot;       or &quot;Has Limited Life Expectancy&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-numerator-1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator 1&quot;:   &quot;Most Recent Tobacco Use Screening Indicates Tobacco Non User&quot; is not null       or &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot; is not null</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-numerator-2"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator 2&quot;:   exists &quot;Tobacco Cessation Counseling Given&quot;       or exists &quot;Tobacco Cessation Pharmacotherapy Ordered&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-sde-race"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:   SDE.&quot;SDE Race&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-sde-sex"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:   SDE.&quot;SDE Sex&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-office-based-visit-during-measurement-period"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Office Based Visit During Measurement Period&quot;:   ( [&quot;Encounter&quot;: &quot;Health behavior intervention, individual, face-to-face; initial 30 minutes&quot;]       union [&quot;Encounter&quot;: &quot;Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)&quot;]       union [&quot;Encounter&quot;: &quot;Home Healthcare Services&quot;]       union [&quot;Encounter&quot;: &quot;Occupational Therapy Evaluation&quot;]       union [&quot;Encounter&quot;: &quot;Office Visit&quot;]       union [&quot;Encounter&quot;: &quot;Ophthalmological Services&quot;]       union [&quot;Encounter&quot;: &quot;Physical Therapy Evaluation&quot;]       union [&quot;Encounter&quot;: &quot;Psych Visit - Diagnostic Evaluation&quot;]       union [&quot;Encounter&quot;: &quot;Psych Visit - Psychotherapy&quot;]       union [&quot;Encounter&quot;: &quot;Psychoanalysis&quot;]       union [&quot;Encounter&quot;: &quot;Speech and Hearing Evaluation&quot;] ) OfficeBasedEncounter       where OfficeBasedEncounter.period during &quot;Measurement Period&quot;         and OfficeBasedEncounter.status = 'finished'</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-preventive-visit-during-measurement-period"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Preventive Visit During Measurement Period&quot;:   ( [&quot;Encounter&quot;: &quot;Annual Wellness Visit&quot;]       union [&quot;Encounter&quot;: &quot;Preventive Care Services - Established Office Visit, 18 and Up&quot;]       union [&quot;Encounter&quot;: &quot;Preventive Care Services - Group Counseling&quot;]       union [&quot;Encounter&quot;: &quot;Preventive Care Services - Other&quot;]       union [&quot;Encounter&quot;: &quot;Preventive Care Services-Individual Counseling&quot;]       union [&quot;Encounter&quot;: &quot;Preventive Care Services-Initial Office Visit, 18 and Up&quot;] ) PreventiveEncounter       where PreventiveEncounter.period during &quot;Measurement Period&quot;         and PreventiveEncounter.status = 'finished'</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:   exists ( [&quot;Patient&quot;] BirthDate         where Global.&quot;CalendarAgeInYearsAt&quot; ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of &quot;Measurement Period&quot; ) &gt;= 18     )       and ( Count(&quot;Office Based Visit During Measurement Period&quot;)&gt;= 2           or exists &quot;Preventive Visit During Measurement Period&quot;       )</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-denominator-3"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator 3&quot;:   &quot;Initial Population&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-denominator-2"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator 2&quot;:   &quot;Initial Population&quot;       and &quot;Most Recent Tobacco Use Screening Indicates Tobacco User&quot; is not null</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-sde-payer"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:   SDE.&quot;SDE Payer&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-sde-ethnicity"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:   SDE.&quot;SDE Ethnicity&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-medical-reason-for-not-counseling-tobacco-user"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Medical Reason for Not Counseling Tobacco User&quot;:   [&quot;Procedure&quot;: &quot;Tobacco Use Cessation Counseling&quot;] NoTobaccoCessationCounseling       where Global.&quot;Normalize Interval&quot; ( NoTobaccoCessationCounseling.performed ) starts during &quot;Measurement Period&quot;         and ( ( NoTobaccoCessationCounseling.status = 'not-done'               and NoTobaccoCessationCounseling.statusReason in &quot;Medical Reason&quot;           )             or ( &quot;Not Done&quot;(NoTobaccoCessationCounseling)                 and &quot;Not Done Reason in Medical Reason&quot;(NoTobaccoCessationCounseling)             )         )</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-medical-reason-for-not-ordering-tobacco-cessation-pharmacotherapy"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy&quot;:   [&quot;MedicationRequest&quot;: &quot;Tobacco Use Cessation Pharmacotherapy&quot;] NoCessationPharmacotherapyOrdered       where NoCessationPharmacotherapyOrdered.authoredOn during &quot;Measurement Period&quot;         and NoCessationPharmacotherapyOrdered.status = 'completed'         and ( ( &quot;Not Done&quot;(NoCessationPharmacotherapyOrdered)               and &quot;Not Done Reason in Medical Reason&quot;(NoCessationPharmacotherapyOrdered)           )             or ( NoCessationPharmacotherapyOrdered.doNotPerform = true                 and NoCessationPharmacotherapyOrdered.statusReason in &quot;Medical Reason&quot;             )         )</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-denominator-exceptions-2"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions 2&quot;:   exists &quot;Medical Reason for Not Counseling Tobacco User&quot;       or exists &quot;Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy&quot;       or &quot;Has Limited Life Expectancy&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-denominator-exceptions-3"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions 3&quot;:   exists &quot;Medical Reason for Not Screening for Tobacco Use&quot;       or exists &quot;Medical Reason for Not Counseling Tobacco User&quot;       or exists &quot;Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy&quot;       or &quot;Has Limited Life Expectancy&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-denominator-1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator 1&quot;:   &quot;Initial Population&quot;</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-not-done"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Not Done&quot;(res DomainResource ):   if ( res R       where ( &quot;GetModiferExtension&quot;(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone').value = true )   ) is not null then true     else false</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-getmodiferextension"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;GetModiferExtension&quot;(res DomainResource, url String ):   singleton from &quot;GetModifierExtensions&quot;(res, url)</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-getmodifierextensions"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;GetModifierExtensions&quot;(res DomainResource, url String ):   res.modifierExtension E     where E.url = ( url )     return E</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> TSCComponent</td>

    </tr>
    <tr>

      <td>

          <a name="tsccomponent-not-done-reason-in-medical-reason"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Not Done Reason in Medical Reason&quot;(res DomainResource ):   if ( res R       where &quot;GetModiferExtension&quot;(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason').value in &quot;Medical Reason&quot;   ) is not null then true     else false</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctions</td>

    </tr>
    <tr>

      <td>

          <a name="matglobalcommonfunctions-prevalence-period"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Prevalence Period&quot;(condition Condition):   Interval[start of &quot;Normalize Interval&quot;(condition.onset), end of &quot;Normalize Abatement&quot;(condition))</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctions</td>

    </tr>
    <tr>

      <td>

          <a name="matglobalcommonfunctions-normalize-abatement"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Normalize Abatement&quot;(condition Condition):  if condition.abatement is FHIR.dateTime then    Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]  else if condition.abatement is FHIR.Period then    FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)  else if condition.abatement is FHIR.string then     Message(null as Interval&lt;DateTime&gt;, true, '1', 'Error', 'Cannot compute an interval from a String value')  else if condition.abatement is FHIR.Age then   Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),    FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)  else if condition.abatement is FHIR.Range then    Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),     FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)  else if condition.abatement is FHIR.boolean then    Interval[end of &quot;Normalize Interval&quot;(condition.onset), condition.recordedDate)  else null</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctions</td>

    </tr>
    <tr>

      <td>

          <a name="matglobalcommonfunctions-calendarageinyearsat"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;CalendarAgeInYearsAt&quot;(BirthDateTime DateTime, AsOf DateTime):  years between ToDate(BirthDateTime)and ToDate(AsOf)</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctions</td>

    </tr>
    <tr>

      <td>

          <a name="matglobalcommonfunctions-todate"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;ToDate&quot;(Value DateTime):  DateTime(year from Value, month from Value, day from Value, 0, 0, 0, 0, timezoneoffset from Value)</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value string): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tointerval"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period) value to a CQL DateTime Interval @comment: If the start value of the given period is unspecified, the starting boundary of the resulting interval will be open (meaning the start of the interval is unknown, as opposed to interpreted as the beginning of time). */ define function ToInterval(period FHIR.Period):     if period is null then         null     else         if period.&quot;start&quot; is null then             Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]         else             Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value EncounterStatus): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-toconcept"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept. */ define function ToConcept(concept FHIR.CodeableConcept):     if concept is null then         null     else         System.Concept {             codes: concept.coding C return ToCode(C),             display: concept.text.value         }</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tocode"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code. */ define function ToCode(coding FHIR.Coding):     if coding is null then         null     else         System.Code {           code: coding.code.value,           system: coding.system.value,           version: coding.version.value,           display: coding.display.value         }</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-todatetime"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value MedicationRequestStatus): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-todatetime"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value instant): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-toboolean"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToBoolean(value boolean): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value base64Binary): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ObservationStatus): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-todate"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDate(value date): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-toquantity"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* @description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity)  value to a CQL Quantity @comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`) an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used. @seealso: ToCalendarUnit */ define function ToQuantity(quantity FHIR.Quantity):     case         when quantity is null then null         when quantity.value is null then null         when quantity.comparator is not null then             Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')         when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'               or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then             System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }         else             Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')     end</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tocalendarunit"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* @description: Converts a UCUM definite duration unit to a CQL calendar duration unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities)  topic of the CQL specification. @comment: Note that for durations above days (or weeks), the conversion is understood to be approximate */ define function ToCalendarUnit(unit System.String):     case unit         when 'ms' then 'millisecond'         when 's' then 'second'         when 'min' then 'minute'         when 'h' then 'hour'         when 'd' then 'day'         when 'wk' then 'week'         when 'mo' then 'month'         when 'a' then 'year'         else unit     end</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value AdministrativeGender): value.value</code></pre>
      </td>

    </tr>

    <tr>
      <th scope="row" rowspan="2" class="row-header">
        Logic Definition
      </th>

      <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ProcedureStatus): value.value</code></pre>
      </td>

    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="terminology"> </a>Terminology</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Code System</th>

      <td class="content-container">

        <em>Description</em>: Code system ConditionClinicalStatusCodes

        <br/>

        <em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-condition-clinical.html">Condition Clinical Status Codes</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Code System</th>

      <td class="content-container">

        <em>Description</em>: Code system CPT

        <br/>

        <em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-CPT.html">Current Procedural Terminology (CPT®)</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://www.ama-assn.org/go/cpt</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Tobacco Use Screening

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1278/expansion">Tobacco Use Screening</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1278</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Tobacco Non-User

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1189/expansion">Tobacco Non User</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1189</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Tobacco User

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1170/expansion">Tobacco User</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1170</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Tobacco Use Cessation Counseling

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.509/expansion">Tobacco Use Cessation Counseling</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Tobacco Use Cessation Pharmacotherapy

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1190/expansion">Tobacco Use Cessation Pharmacotherapy</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1190</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Medical Reason

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1007/expansion">Medical Reason</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Home Healthcare Services

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1016/expansion">Home Healthcare Services</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Occupational Therapy Evaluation

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1011/expansion">Occupational Therapy Evaluation</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Office Visit

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Ophthalmological Services

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1285/expansion">Ophthalmological Services</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Physical Therapy Evaluation

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1022/expansion">Physical Therapy Evaluation</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Psych Visit - Diagnostic Evaluation

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1492/expansion">Psych Visit Diagnostic Evaluation</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Psych Visit - Psychotherapy

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1496/expansion">Psych Visit Psychotherapy</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Psychoanalysis

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1141/expansion">Psychoanalysis</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1141</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Speech and Hearing Evaluation

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1530/expansion">Speech and Hearing Evaluation</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1530</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Annual Wellness Visit

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1240/expansion">Annual Wellness Visit</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Preventive Care Services - Established Office Visit, 18 and Up

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1025/expansion">Preventive Care Services Established Office Visit, 18 and Up</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Preventive Care Services - Group Counseling

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1027/expansion">Preventive Care Services Group Counseling</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Preventive Care Services - Other

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1030/expansion">Preventive Care Services Other</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1030</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Preventive Care Services-Individual Counseling

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1026/expansion">Preventive Care Services Individual Counseling</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Preventive Care Services-Initial Office Visit, 18 and Up

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1023/expansion">Preventive Care Services Initial Office Visit, 18 and Up</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Value Set</th>

      <td class="content-container">

        <em>Description</em>: Value set Payer

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>

      </td>
    </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

          <em>Code</em>: active
          <br/>
          <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

            <em>Display</em>: Health behavior intervention, individual, face-to-face; initial 30 minutes
            <br/>

          <em>Code</em>: 96158
          <br/>
          <em>System</em>: <tt>http://www.ama-assn.org/go/cpt</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

            <em>Display</em>: Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)
            <br/>

          <em>Code</em>: 96156
          <br/>
          <em>System</em>: <tt>http://www.ama-assn.org/go/cpt</tt>
        </td>
      </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="dependencies"> </a>Dependencies</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library Global

        <br/>

        <em>Resource</em>: <a href="Library-MATGlobalCommonFunctions.html">MAT Global Common Functions FHIR Libraryversion: null5.0.000)</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library FHIRHelpers

        <br/>

        <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html">http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library SDE

        <br/>

        <em>Resource</em>: <a href="Library-SupplementalDataElements.html">Supplemental Data Elementsversion: null2.0.000)</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cqm/Library/SupplementalDataElements|2.0.000</tt>

      </td>
    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header"><a name="data-requirements"> </a>Data Requirements</th>

    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Observation
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
        <br/>

        <em>Must Support Elements</em>: code, effective, value, issued, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1278/expansion">Tobacco Use Screening</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.509/expansion">Tobacco Use Cessation Counseling</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://terminology.hl7.org/6.5.0/CodeSystem-CPT.html#CPT-96158">Current Procedural Terminology (CPT®) 96158</a>: Health behavior intervention, individual, face-to-face; initial 30 minutes

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://terminology.hl7.org/6.5.0/CodeSystem-CPT.html#CPT-96156">Current Procedural Terminology (CPT®) 96156</a>: Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1016/expansion">Home Healthcare Services</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1011/expansion">Occupational Therapy Evaluation</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1285/expansion">Ophthalmological Services</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1022/expansion">Physical Therapy Evaluation</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1492/expansion">Psych Visit Diagnostic Evaluation</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1496/expansion">Psych Visit Psychotherapy</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1141/expansion">Psychoanalysis</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1530/expansion">Speech and Hearing Evaluation</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1240/expansion">Annual Wellness Visit</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1025/expansion">Preventive Care Services Established Office Visit, 18 and Up</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1027/expansion">Preventive Care Services Group Counseling</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1030/expansion">Preventive Care Services Other</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1026/expansion">Preventive Care Services Individual Counseling</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1023/expansion">Preventive Care Services Initial Office Visit, 18 and Up</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: MedicationRequest
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
        <br/>

        <em>Must Support Elements</em>: medication, authoredOn, status, doNotPerform, statusReason
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: medication</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1190/expansion">Tobacco Use Cessation Pharmacotherapy</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: MedicationRequest
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
        <br/>

        <em>Must Support Elements</em>: medication.reference, authoredOn, status, doNotPerform, statusReason
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Medication
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
        <br/>

        <em>Must Support Elements</em>: id, code
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Patient
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
        <br/>

        <em>Must Support Elements</em>: url, extension, value, birthDate
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Condition
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
        <br/>

        <em>Must Support Elements</em>: clinicalStatus
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Coverage
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/coverage.html">Coverage</a>
        <br/>

        <em>Must Support Elements</em>: type, period
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Procedure
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
        <br/>

        <em>Must Support Elements</em>: code, performed, status, statusReason
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.509/expansion">Tobacco Use Cessation Counseling</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th colspan="2" scope="row" class="row-header">Generated using version 0.4.9 of the sample-content-ig Liquid templates</th>
    </tr>

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