Clinical Quality Language Specification
1.5.3 - Release 1 Errata 2

Clinical Quality Language Specification, published by Clinical Decision Support WG. This guide is not an authorized publication; it is the continuous build for version 1.5.3 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cql/ and changes regularly. See the Directory of published versions

Binary: Chlamydia Screening Common Library ELM in XML

    
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:a="urn:hl7-org:cql-annotations:r1">
   <annotation message="List-valued expression was demoted to a singleton." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation message="List-valued expression was demoted to a singleton." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation message="List-valued expression was demoted to a singleton." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation message="List-valued expression was demoted to a singleton." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <identifier id="ChlamydiaScreening_Common" version="2"/>
   <schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
   <usings>
      <def localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
      <def localIdentifier="QUICK" uri="http://hl7.org/fhir"/>
   </usings>
   <valueSets>
      <def name="Female Administrative Sex" id="2.16.840.1.113883.3.560.100.2" accessLevel="Public"/>
      <def name="Other Female Reproductive Conditions" id="2.16.840.1.113883.3.464.1003.111.12.1006" accessLevel="Public"/>
      <def name="Genital Herpes" id="2.16.840.1.113883.3.464.1003.110.12.1049" accessLevel="Public"/>
      <def name="Genococcal Infections and Venereal Diseases" id="2.16.840.1.113883.3.464.1003.112.12.1001" accessLevel="Public"/>
      <def name="Inflammatory Diseases of Female Reproductive Organs" id="2.16.840.1.113883.3.464.1003.112.12.1004" accessLevel="Public"/>
      <def name="Chlamydia" id="2.16.840.1.113883.3.464.1003.112.12.1003" accessLevel="Public"/>
      <def name="HIV" id="2.16.840.1.113883.3.464.1003.120.12.1003" accessLevel="Public"/>
      <def name="Syphilis" id="2.16.840.1.113883.3.464.1003.112.12.1002" accessLevel="Public"/>
      <def name="Complications of Pregnancy, Childbirth and the Puerperium" id="2.16.840.1.113883.3.464.1003.111.12.1012" accessLevel="Public"/>
      <def name="Pregnancy Test" id="2.16.840.1.113883.3.464.1003.111.12.1011" accessLevel="Public"/>
      <def name="Pap Test" id="2.16.840.1.113883.3.464.1003.108.12.1017" accessLevel="Public"/>
      <def name="Lab Tests During Pregnancy" id="2.16.840.1.113883.3.464.1003.111.12.1007" accessLevel="Public"/>
      <def name="Lab Tests for Sexually Transmitted Infections" id="2.16.840.1.113883.3.464.1003.110.12.1051" accessLevel="Public"/>
      <def name="Chlamydia Screening" id="2.16.840.1.113883.3.464.1003.110.12.1052" accessLevel="Public"/>
   </valueSets>
   <statements>
      <def name="Patient" context="Patient">
         <expression xsi:type="SingletonFrom">
            <operand dataType="fhir:Patient" templateId="patient-qicore-qicore-patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def name="Conditions Indicating Sexual Activity" context="Patient" accessLevel="Public">
         <expression xsi:type="Union">
            <operand xsi:type="Union">
               <operand xsi:type="Union">
                  <operand xsi:type="Union">
                     <operand xsi:type="Union">
                        <operand xsi:type="Union">
                           <operand xsi:type="Union">
                              <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                                 <codes name="Other Female Reproductive Conditions" xsi:type="ValueSetRef"/>
                              </operand>
                              <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                                 <codes name="Genital Herpes" xsi:type="ValueSetRef"/>
                              </operand>
                           </operand>
                           <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                              <codes name="Genococcal Infections and Venereal Diseases" xsi:type="ValueSetRef"/>
                           </operand>
                        </operand>
                        <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                           <codes name="Inflammatory Diseases of Female Reproductive Organs" xsi:type="ValueSetRef"/>
                        </operand>
                     </operand>
                     <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                        <codes name="Chlamydia" xsi:type="ValueSetRef"/>
                     </operand>
                  </operand>
                  <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                     <codes name="HIV" xsi:type="ValueSetRef"/>
                  </operand>
               </operand>
               <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
                  <codes name="Syphilis" xsi:type="ValueSetRef"/>
               </operand>
            </operand>
            <operand dataType="fhir:Condition" templateId="condition-qicore-qicore-condition" codeProperty="code" xsi:type="Retrieve">
               <codes name="Complications of Pregnancy, Childbirth and the Puerperium" xsi:type="ValueSetRef"/>
            </operand>
         </expression>
      </def>
      <def name="Laboratory Tests Indicating Sexual Activity" context="Patient" accessLevel="Public">
         <expression xsi:type="Union">
            <operand xsi:type="Union">
               <operand xsi:type="Union">
                  <operand dataType="fhir:DiagnosticOrder" templateId="diagnosticorder-qicore-qicore-diagnosticorder" codeProperty="item.code" xsi:type="Retrieve">
                     <codes name="Pregnancy Test" xsi:type="ValueSetRef"/>
                  </operand>
                  <operand dataType="fhir:DiagnosticOrder" templateId="diagnosticorder-qicore-qicore-diagnosticorder" codeProperty="item.code" xsi:type="Retrieve">
                     <codes name="Pap Test" xsi:type="ValueSetRef"/>
                  </operand>
               </operand>
               <operand dataType="fhir:DiagnosticOrder" templateId="diagnosticorder-qicore-qicore-diagnosticorder" codeProperty="item.code" xsi:type="Retrieve">
                  <codes name="Lab Tests During Pregnancy" xsi:type="ValueSetRef"/>
               </operand>
            </operand>
            <operand dataType="fhir:DiagnosticOrder" templateId="diagnosticorder-qicore-qicore-diagnosticorder" codeProperty="item.code" xsi:type="Retrieve">
               <codes name="Lab Tests for Sexually Transmitted Infections" xsi:type="ValueSetRef"/>
            </operand>
         </expression>
      </def>
      <def name="Tests Performed For Chlamydia" context="Patient" accessLevel="Public">
         <expression dataType="fhir:DiagnosticReport" templateId="diagnosticreport-qicore-qicore-diagnosticreport" codeProperty="name" xsi:type="Retrieve">
            <codes name="Chlamydia Screening" xsi:type="ValueSetRef"/>
         </expression>
      </def>
      <def name="Results Present For Chlamydia Screening" context="Patient" accessLevel="Public">
         <expression xsi:type="Query">
            <source alias="R">
               <expression dataType="fhir:DiagnosticReport" templateId="diagnosticreport-qicore-qicore-diagnosticreport" codeProperty="name" xsi:type="Retrieve">
                  <codes name="Chlamydia Screening" xsi:type="ValueSetRef"/>
               </expression>
            </source>
            <where xsi:type="Not">
               <operand xsi:type="IsNull">
                  <operand path="result" scope="R" xsi:type="Property"/>
               </operand>
            </where>
         </expression>
      </def>
   </statements>
</library>