Common CQL Artifacts for FHIR (US-Based)
1.0.0-ballot - STU 1 Ballot United States of America flag

Common CQL Artifacts for FHIR (US-Based), published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 1.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/us-cql-ig/ and changes regularly. See the Directory of published versions

: Expression Library for the Medical Benefit Outpatient Drug Authorization Example - XML Representation

Page standards status: Informative Maturity Level: 3

Raw xml | Download


<Library xmlns="http://hl7.org/fhir">
  <id value="MBODAInitialExpressions"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
<div>
    <table class="grid dict">
        
        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">Expression Library for the Medical Benefit Outpatient Drug Authorization Example</td>
        </tr>
        

        
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">MBODAInitialExpressions</td>
        </tr>
        

        
        
        <tr>
            <th scope="row"><b>Version: </b></th>
            <td style="padding-left: 4px;">1.0.0-ballot</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="Library-MBODAInitialExpressions.html">Expression Library for the Medical Benefit Outpatient Drug Authorization Example</a></td>
        </tr>
        

        

        

        
        <tr>
            <th scope="row"><b>Status: </b></th>
            <td style="padding-left: 4px;">draft</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Experimental: </b></th>
            <td style="padding-left: 4px;">true</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Type: </b></th>
            <td style="padding-left: 4px;">
                
                    
                        
                        <p style="margin-bottom: 5px;">
                            <b>system: </b> <span><a href="http://terminology.hl7.org/6.5.0/CodeSystem-library-type.html">http://terminology.hl7.org/CodeSystem/library-type</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>logic-library</span>
                        </p>
                        
                        
                    
                
                
            </td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2025-09-10 20:00:05+0000</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Publisher: </b></th>
            <td style="padding-left: 4px;">HL7 International / Clinical Decision Support</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Description: </b></th>
            <td style="padding-left: 4px;"><div><p>Initial expressions for use in populating answers to questions in the Medical Benefit Outpatient Drug Authorization example questionnaire.</p>
</div></td>
        </tr>
        

        

        

        

        
        <tr>
            <th scope="row"><b>Jurisdiction: </b></th>
            <td style="padding-left: 4px;">US</td>
        </tr>
        

        

        

        

        

        

        

        

        

        

        
        
        <tr>
          <td colspan="2">
            <table>
              <tr><th><a id="cql-content"><b>Content: </b></a> text/cql</th></tr>
              <tr><td><pre><code class="language-cql">library MBODAInitialExpressions

using USCore version '7.0.0'
using FHIR version '4.0.1'

include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1'
include USCoreCommon called UC
include USCoreElements called UCE

//CumulativeMedicationDuration was created as part of the US ECQM and CDC Opioid Guideline development 
//http://fhir.org/guides/cdc/opioid-mme-r4
include CumulativeMedicationDuration called CMD

codesystem &quot;LOINC&quot;: 'http://loinc.org'
codesystem &quot;Identifier Type&quot;: 'http://terminology.hl7.org/CodeSystem/v2-0203'
code &quot;Body surface area&quot;: '8277-6' from &quot;LOINC&quot; display 'Intensive care unit'
code &quot;Member Number&quot;: 'MB' from &quot;Identifier Type&quot;

parameter &quot;MedicationRequest&quot; USCore.MedicationRequestProfile

context Patient

define &quot;Last Name&quot;:
  UCE.&quot;Last Name&quot;

define &quot;First Name&quot;:
  UCE.&quot;First Name&quot;

define &quot;Allergies&quot;:
  UCE.&quot;Active Confirmed Allergies and Intolerances&quot;.code.codes.display 

define &quot;Height&quot;:
  convert (((UCE.&quot;All Body Height Measurements&quot;).mostRecent() as &quot;observation-bodyheight&quot;).value) to '[in_i]'

define &quot;Height in [in_i]&quot;:
  &quot;Height&quot;.value

define &quot;Height in cm&quot;:
  convert(&quot;Height&quot;) to 'cm'

define &quot;Weight Most Recent&quot;:
  (UCE.&quot;All Body Weight Measurements&quot;).mostRecent() as &quot;observation-bodyweight&quot;

define &quot;Weight&quot;:
  convert (((UCE.&quot;All Body Weight Measurements&quot;).mostRecent() as &quot;observation-bodyweight&quot;).value) to '[lb_av]'

define &quot;Weight in [lb_av]&quot;:
  &quot;Weight&quot;.value

define &quot;Weight in kg&quot;:
  convert(&quot;Weight&quot;) to 'kg'

define &quot;BMI&quot;:
  (UCE.&quot;All Body Mass Index Measurements&quot;).value

define &quot;Most Recent BSA&quot;:
  UCE.&quot;Most Recent BSA&quot;

define &quot;BSA&quot;:
  Coalesce(&quot;Most Recent BSA&quot;, &quot;Calculated BSA - Mosteller&quot;)

define &quot;BSA in m2&quot;:
  &quot;BSA&quot;.value

// Mosteller formula using lbs and inches
define &quot;Calculated BSA - Mosteller&quot;:
  UCE.CalculateBSA('Mosteller', &quot;Height&quot;, &quot;Weight&quot;)
  //(((&quot;Weight&quot;*&quot;Height&quot;)/3131).value)^0.5

define &quot;Calculated BSA - DuBois and DuBois&quot;:
  UCE.CalculateBSA('DuBois and DuBois', &quot;Height&quot;, &quot;Weight&quot;)

define &quot;Diagnosis Codes&quot;:
  UCE.&quot;All Conditions&quot; C
    return C.code

define &quot;Diagnosis Descriptions&quot;:
  &quot;Diagnosis Codes&quot; ConceptItem
    return Combine(((ConceptItem.codes) C return C.display), '|')

define &quot;Medication Requested&quot;:
  UCE.&quot;All Medications&quot; M
    where EndsWith((&quot;Most Recent Medication Request&quot;.medication as USCore.Reference).reference, M.id)

define &quot;Medication Name&quot;:
  &quot;Medication Requested&quot; M
    return M.code.display

define &quot;Code of Requested Drug&quot;:
  &quot;Medication Requested&quot; M
    return M.code

define &quot;Retrieve Medication Request test parameter&quot;:
  // The VSCode extension doesn't support parameters
  // When executing CQL with the VSCode extension retrieve the resource specific for the test case
  //   the list of resource ids match the resources from the test case folders
  singleton from ([USCore.MedicationRequestProfile] MR where MR.id in { 
    'example',
    'example-continued-therapy',
    'example-new-therapy',
    'uscore-patient-1-med-request-example',
    'uscore-patient-2-med-request-example',
    'uscore-patient-3-med-request-example',
    'uscore-patient-4-med-request-example'})

define &quot;Most Recent Medication Request&quot;:
  Coalesce(
    MedicationRequest,
    &quot;Retrieve Medication Request test parameter&quot;
  )

define &quot;Medication Request References&quot;:
  (&quot;Most Recent Medication Request&quot;.medication as USCore.Reference).reference

define &quot;Most Recent Medication Request dosageInstruction&quot;:
  // TODO: should this really be a singleton?
  singleton from &quot;Most Recent Medication Request&quot;.dosageInstruction

define &quot;Most Recent Medication Request dosageInstruction.doseAndRate&quot;:
  // TODO: should this really be a singleton?
  singleton from &quot;Most Recent Medication Request dosageInstruction&quot;.doseAndRate

define &quot;Medication Dose&quot;:
  &quot;Most Recent Medication Request dosageInstruction.doseAndRate&quot;.dose

define &quot;Medication Route&quot;:
  &quot;Most Recent Medication Request dosageInstruction&quot;.route

define &quot;Medication Frequency value&quot;:
  &quot;Most Recent Medication Request dosageInstruction&quot;.timing.repeat.frequency

define &quot;Medication Frequency Period&quot;:
  if (IsNull(&quot;Most Recent Medication Request dosageInstruction&quot;.timing.repeat.period)) then 
    null
  else
    System.Quantity {
      value: &quot;Most Recent Medication Request dosageInstruction&quot;.timing.repeat.period,
      unit: &quot;Most Recent Medication Request dosageInstruction&quot;.timing.repeat.periodUnit
    }

define &quot;Medication Frequency&quot;: // '1x per 1d', '3x per 2wk', '1x per 1mo'
  ToString(&quot;Medication Frequency value&quot;) + 'x' +
  ' per ' + ToString(&quot;Medication Frequency Period&quot;.value) + 
  ' ' + &quot;Medication Frequency Period&quot;.unit

define &quot;Quantity or Number of requested Visits&quot;:
  &quot;Most Recent Medication Request&quot;.dispenseRequest.quantity

define &quot;Prior Prescription&quot;:
  &quot;Most Recent Medication Request&quot;.priorPrescription

define &quot;New therapy&quot;:
  IsNull(&quot;Prior Prescription&quot;)

define &quot;New therapy code&quot;:
  if (&quot;New therapy&quot;) then
    System.Code { code: 'NewMedication', display: 'New Medication' }
  else
    System.Code { code: 'ContinuedTherapy', display: 'Continuation of therapy' }

// MISSING: needs test data to validate
//Initial date of therapy does not return correct result if there have been more than 1 prior Prescriptions - logic needs to be adapted to that case
define &quot;Initial date of therapy&quot;:
  if not &quot;New therapy&quot; then
    UCE.&quot;All Medication Requests&quot; M
      where EndsWith((&quot;Most Recent Medication Request&quot;.priorPrescription as USCore.Reference).reference, M.id)
      return M.authoredOn
  else 
    null

define &quot;Medication Request Period&quot;:
  CMD.&quot;MedicationRequestPeriod&quot;(&quot;Most Recent Medication Request&quot;)

define &quot;Expected Therapy Length&quot;:
  convert(
    CMD.Quantity(days between start of &quot;Medication Request Period&quot; and end of &quot;Medication Request Period&quot;, 'd')
  ) to 'd'

define &quot;Anticipated/actual date of service&quot;:
  start of &quot;Medication Request Period&quot;

/*
//related Procedures - Procedure is not linked to medication request - not possible to find the related procedures
*/</code></pre></td></tr>
            </table>
          </td>
        </tr>
        
        
        
        
        
        <tr>
          <td colspan="2">
            <table>
              <tr><th><b>Content: </b> application/elm+xml</th></tr>
              <tr><td><pre><code/></pre></td></tr>
            </table>
          </td>
        </tr>
        
        
    </table>
</div>
</div>
  </text>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="3"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="cds"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="informative"/>
  </extension>
  <url value="http://hl7.org/fhir/us/cql/Library/MBODAInitialExpressions"/>
  <version value="1.0.0-ballot"/>
  <name value="MBODAInitialExpressions"/>
  <title
         value="Expression Library for the Medical Benefit Outpatient Drug Authorization Example"/>
  <status value="draft"/>
  <experimental value="true"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
      <code value="logic-library"/>
    </coding>
  </type>
  <date value="2025-09-10T20:00:05+00:00"/>
  <publisher value="HL7 International / Clinical Decision Support"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/dss"/>
    </telecom>
  </contact>
  <description
               value="Initial expressions for use in populating answers to questions in the Medical Benefit Outpatient Drug Authorization example questionnaire."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <content>
    <contentType value="text/cql"/>
    <data
          value="bGlicmFyeSBNQk9EQUluaXRpYWxFeHByZXNzaW9ucwoKdXNpbmcgVVNDb3JlIHZlcnNpb24gJzcuMC4wJwp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4xJwoKaW5jbHVkZSBobDcuZmhpci51di5jcWwuRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjEnCmluY2x1ZGUgVVNDb3JlQ29tbW9uIGNhbGxlZCBVQwppbmNsdWRlIFVTQ29yZUVsZW1lbnRzIGNhbGxlZCBVQ0UKCi8vQ3VtdWxhdGl2ZU1lZGljYXRpb25EdXJhdGlvbiB3YXMgY3JlYXRlZCBhcyBwYXJ0IG9mIHRoZSBVUyBFQ1FNIGFuZCBDREMgT3Bpb2lkIEd1aWRlbGluZSBkZXZlbG9wbWVudCAKLy9odHRwOi8vZmhpci5vcmcvZ3VpZGVzL2NkYy9vcGlvaWQtbW1lLXI0CmluY2x1ZGUgQ3VtdWxhdGl2ZU1lZGljYXRpb25EdXJhdGlvbiBjYWxsZWQgQ01ECgpjb2Rlc3lzdGVtICJMT0lOQyI6ICdodHRwOi8vbG9pbmMub3JnJwpjb2Rlc3lzdGVtICJJZGVudGlmaWVyIFR5cGUiOiAnaHR0cDovL3Rlcm1pbm9sb2d5LmhsNy5vcmcvQ29kZVN5c3RlbS92Mi0wMjAzJwpjb2RlICJCb2R5IHN1cmZhY2UgYXJlYSI6ICc4Mjc3LTYnIGZyb20gIkxPSU5DIiBkaXNwbGF5ICdJ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