Using CQL with FHIR
1.1.0-cibuild - CIBuild International flag

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

Library: ELM Example (Experimental)

Official URL: http://hl7.org/fhir/uv/cql/Library/ELMExample Version: 1.1.0-cibuild
Active as of 2024-06-10 Computable Name: ELMExample
Other Identifiers: OID:2.16.840.1.113883.4.642.40.37.28.3

Example ELM library demonstrating the ELM XML and ELM JSON profiles (a CQL library with only ELM)

Related Artifacts

depends-onFHIR model informationhttp://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
depends-onLibrary FHIRHelpershttp://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
depends-onCode system LOINCLogical Observation Identifiers, Names and Codes (LOINC)

Parameters

GlucoseThresholdin01Quantity
Patientout01Patient
Blood Glucose Observationsout0*Observation

Data Requirements

Type: Patient (Patient)
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 2339-0: Glucose Bld-mCnc

Contents

application/elm+xml

<?xml version='1.1' encoding='UTF-8'?>
<Library type="Library" localId="0">
  <wstxns1:identifier xmlns:wstxns1="urn:hl7-org:elm:r1" wstxns1:type="VersionedIdentifier" id="ELMExample" system="http://hl7.org/fhir/uv/cql"/>
  <wstxns2:schemaIdentifier xmlns:wstxns2="urn:hl7-org:elm:r1" wstxns2:type="VersionedIdentifier" id="urn:hl7-org:elm" version="r1"/>
  <wstxns3:usings xmlns:wstxns3="urn:hl7-org:elm:r1" wstxns3:type="Library$Usings">
    <wstxns3:def>
      <wstxns3:def wstxns3:type="UsingDef" localId="1" localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
      <wstxns3:def wstxns3:type="UsingDef" localId="206" locator="3:1-3:26" localIdentifier="FHIR" uri="http://hl7.org/fhir" version="4.0.1">
        <wstxns3:annotation>
          <wstxns3:annotation wstxns3:type="Annotation">
            <wstxns4:s xmlns:wstxns4="urn:hl7-org:cql-annotations:r1" r="206">
              <s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s></s>
                      <s>using </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value>
                          <s>
                            <s>FHIR</s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s> version '4.0.1'</s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
              </s>
            </wstxns4:s>
          </wstxns3:annotation>
        </wstxns3:annotation>
      </wstxns3:def>
    </wstxns3:def>
  </wstxns3:usings>
  <wstxns5:includes xmlns:wstxns5="urn:hl7-org:elm:r1" wstxns5:type="Library$Includes">
    <wstxns5:def>
      <wstxns5:def wstxns5:type="IncludeDef" localId="207" locator="5:1-5:35" localIdentifier="FHIRHelpers" path="http://hl7.org/fhir/FHIRHelpers" version="4.0.1">
        <wstxns5:annotation>
          <wstxns5:annotation wstxns5:type="Annotation">
            <wstxns6:s xmlns:wstxns6="urn:hl7-org:cql-annotations:r1" r="207">
              <s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s></s>
                      <s>include </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value>
                          <s>
                            <s>FHIRHelpers</s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s> version </s>
                      <s>'4.0.1'</s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
              </s>
            </wstxns6:s>
          </wstxns5:annotation>
        </wstxns5:annotation>
      </wstxns5:def>
    </wstxns5:def>
  </wstxns5:includes>
  <wstxns7:parameters xmlns:wstxns7="urn:hl7-org:elm:r1" wstxns7:type="Library$Parameters">
    <wstxns7:def>
      <wstxns7:def wstxns7:type="ParameterDef" localId="211" locator="10:1-10:35" name="GlucoseThreshold" accessLevel="Public">
        <wstxns7:parameterTypeSpecifier wstxns7:type="NamedTypeSpecifier" localId="212" locator="10:28-10:35" name="{http://hl7.org/fhir}Quantity"/>
        <wstxns7:annotation>
          <wstxns7:annotation wstxns7:type="Annotation">
            <wstxns8:s xmlns:wstxns8="urn:hl7-org:cql-annotations:r1" r="211">
              <s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s></s>
                      <s>parameter </s>
                      <s>GlucoseThreshold</s>
                      <s> </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value r="212">
                    <s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value>
                          <s>
                            <s>Quantity</s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
              </s>
            </wstxns8:s>
          </wstxns7:annotation>
        </wstxns7:annotation>
      </wstxns7:def>
    </wstxns7:def>
  </wstxns7:parameters>
  <wstxns9:codeSystems xmlns:wstxns9="urn:hl7-org:elm:r1" wstxns9:type="Library$CodeSystems">
    <wstxns9:def>
      <wstxns9:def wstxns9:type="CodeSystemDef" localId="208" locator="7:1-7:36" name="LOINC" id="http://loinc.org" accessLevel="Public">
        <wstxns9:annotation>
          <wstxns9:annotation wstxns9:type="Annotation">
            <wstxns10:s xmlns:wstxns10="urn:hl7-org:cql-annotations:r1" r="208">
              <s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s></s>
                      <s>codesystem </s>
                      <s>LOINC</s>
                      <s>: </s>
                      <s>'http://loinc.org'</s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
              </s>
            </wstxns10:s>
          </wstxns9:annotation>
        </wstxns9:annotation>
      </wstxns9:def>
    </wstxns9:def>
  </wstxns9:codeSystems>
  <wstxns11:codes xmlns:wstxns11="urn:hl7-org:elm:r1" wstxns11:type="Library$Codes">
    <wstxns11:def>
      <wstxns11:def wstxns11:type="CodeDef" localId="209" locator="8:1-8:68" name="Blood Glucose" id="2339-0" display="Glucose Bld-mCnc" accessLevel="Public">
        <wstxns11:codeSystem wstxns11:type="CodeSystemRef" localId="210" locator="8:37-8:41" name="LOINC"/>
        <wstxns11:annotation>
          <wstxns11:annotation wstxns11:type="Annotation">
            <wstxns12:s xmlns:wstxns12="urn:hl7-org:cql-annotations:r1" r="209">
              <s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s></s>
                      <s>code </s>
                      <s>"Blood Glucose"</s>
                      <s>: </s>
                      <s>'2339-0'</s>
                      <s> from </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value r="210">
                    <s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value>
                          <s>
                            <s>LOINC</s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s> display </s>
                      <s>'Glucose Bld-mCnc'</s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
              </s>
            </wstxns12:s>
          </wstxns11:annotation>
        </wstxns11:annotation>
      </wstxns11:def>
    </wstxns11:def>
  </wstxns11:codes>
  <wstxns13:contexts xmlns:wstxns13="urn:hl7-org:elm:r1" wstxns13:type="Library$Contexts">
    <wstxns13:def>
      <wstxns13:def wstxns13:type="ContextDef" localId="216" locator="12:1-12:15" name="Patient"/>
    </wstxns13:def>
  </wstxns13:contexts>
  <wstxns14:statements xmlns:wstxns14="urn:hl7-org:elm:r1" wstxns14:type="Library$Statements">
    <wstxns14:def>
      <wstxns14:def wstxns14:type="ExpressionDef" localId="214" locator="12:1-12:15" name="Patient" context="Patient">
        <wstxns14:expression wstxns14:type="SingletonFrom" localId="215">
          <wstxns14:operand wstxns14:type="Retrieve" localId="213" locator="12:1-12:15" dataType="{http://hl7.org/fhir}Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient"/>
        </wstxns14:expression>
      </wstxns14:def>
      <wstxns14:def wstxns14:type="ExpressionDef" localId="218" locator="14:1-16:37" name="Blood Glucose Observations" context="Patient" accessLevel="Public">
        <wstxns14:expression wstxns14:type="Query" localId="239" locator="15:3-16:37">
          <wstxns14:source>
            <wstxns14:source wstxns14:type="AliasedQuerySource" localId="219" locator="15:3-15:35" alias="BG">
              <wstxns14:expression wstxns14:type="Retrieve" localId="222" locator="15:3-15:32" dataType="{http://hl7.org/fhir}Observation" templateId="http://hl7.org/fhir/StructureDefinition/Observation" codeProperty="code" codeComparator="~">
                <wstxns14:codes wstxns14:type="ToList" localId="229">
                  <wstxns14:operand wstxns14:type="CodeRef" localId="221" locator="15:17-15:31" name="Blood Glucose"/>
                </wstxns14:codes>
              </wstxns14:expression>
            </wstxns14:source>
          </wstxns14:source>
          <wstxns14:where wstxns14:type="Greater" localId="230" locator="16:5-16:37">
            <wstxns14:signature>
              <wstxns14:signature wstxns14:type="NamedTypeSpecifier" localId="237" name="{urn:hl7-org:elm-types:r1}Quantity"/>
              <wstxns14:signature wstxns14:type="NamedTypeSpecifier" localId="238" name="{urn:hl7-org:elm-types:r1}Quantity"/>
            </wstxns14:signature>
            <wstxns14:operand>
              <wstxns14:operand wstxns14:type="FunctionRef" localId="235" name="ToQuantity" libraryName="FHIRHelpers">
                <wstxns14:operand>
                  <wstxns14:operand wstxns14:type="As" localId="234" asType="{http://hl7.org/fhir}Quantity">
                    <wstxns14:operand wstxns14:type="Property" localId="232" locator="16:11-16:18" path="value" scope="BG"/>
                  </wstxns14:operand>
                </wstxns14:operand>
              </wstxns14:operand>
              <wstxns14:operand wstxns14:type="FunctionRef" localId="236" name="ToQuantity" libraryName="FHIRHelpers">
                <wstxns14:operand>
                  <wstxns14:operand wstxns14:type="ParameterRef" localId="233" locator="16:22-16:37" name="GlucoseThreshold"/>
                </wstxns14:operand>
              </wstxns14:operand>
            </wstxns14:operand>
          </wstxns14:where>
        </wstxns14:expression>
        <wstxns14:annotation>
          <wstxns14:annotation wstxns14:type="Annotation">
            <wstxns15:s xmlns:wstxns15="urn:hl7-org:cql-annotations:r1" r="218">
              <s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value>
                    <s>
                      <s></s>
                      <s>define </s>
                      <s>"Blood Glucose Observations"</s>
                      <s>:
  </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
                <s>
                  <name>{urn:hl7-org:cql-annotations:r1}s</name>
                  <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                  <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                  <value r="239">
                    <s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value>
                          <s>
                            <s>
                              <name>{urn:hl7-org:cql-annotations:r1}s</name>
                              <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                              <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                              <value r="219">
                                <s>
                                  <s>
                                    <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                    <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                    <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                    <value r="222">
                                      <s>
                                        <s>
                                          <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                          <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                          <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                          <value r="222">
                                            <s>
                                              <s>
                                                <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                                <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                                <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                                <value>
                                                  <s>
                                                    <s>[</s>
                                                    <s>Observation</s>
                                                    <s>: </s>
                                                  </s>
                                                </value>
                                                <nil>false</nil>
                                                <globalScope>true</globalScope>
                                                <typeSubstituted>false</typeSubstituted>
                                              </s>
                                              <s>
                                                <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                                <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                                <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                                <value>
                                                  <s>
                                                    <s>
                                                      <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                                      <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                                      <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                                      <value>
                                                        <s>
                                                          <s>"Blood Glucose"</s>
                                                        </s>
                                                      </value>
                                                      <nil>false</nil>
                                                      <globalScope>true</globalScope>
                                                      <typeSubstituted>false</typeSubstituted>
                                                    </s>
                                                  </s>
                                                </value>
                                                <nil>false</nil>
                                                <globalScope>true</globalScope>
                                                <typeSubstituted>false</typeSubstituted>
                                              </s>
                                              <s>
                                                <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                                <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                                <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                                <value>
                                                  <s>
                                                    <s>]</s>
                                                  </s>
                                                </value>
                                                <nil>false</nil>
                                                <globalScope>true</globalScope>
                                                <typeSubstituted>false</typeSubstituted>
                                              </s>
                                            </s>
                                          </value>
                                          <nil>false</nil>
                                          <globalScope>true</globalScope>
                                          <typeSubstituted>false</typeSubstituted>
                                        </s>
                                      </s>
                                    </value>
                                    <nil>false</nil>
                                    <globalScope>true</globalScope>
                                    <typeSubstituted>false</typeSubstituted>
                                  </s>
                                  <s>
                                    <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                    <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                    <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                    <value>
                                      <s>
                                        <s> </s>
                                        <s>BG</s>
                                      </s>
                                    </value>
                                    <nil>false</nil>
                                    <globalScope>true</globalScope>
                                    <typeSubstituted>false</typeSubstituted>
                                  </s>
                                </s>
                              </value>
                              <nil>false</nil>
                              <globalScope>true</globalScope>
                              <typeSubstituted>false</typeSubstituted>
                            </s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value>
                          <s>
                            <s>
    </s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                      <s>
                        <name>{urn:hl7-org:cql-annotations:r1}s</name>
                        <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                        <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                        <value r="230">
                          <s>
                            <s>
                              <name>{urn:hl7-org:cql-annotations:r1}s</name>
                              <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                              <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                              <value>
                                <s>
                                  <s>where </s>
                                </s>
                              </value>
                              <nil>false</nil>
                              <globalScope>true</globalScope>
                              <typeSubstituted>false</typeSubstituted>
                            </s>
                            <s>
                              <name>{urn:hl7-org:cql-annotations:r1}s</name>
                              <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                              <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                              <value r="230">
                                <s>
                                  <s>
                                    <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                    <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                    <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                    <value r="232">
                                      <s>
                                        <s>
                                          <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                          <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                          <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                          <value r="231">
                                            <s>
                                              <s>
                                                <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                                <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                                <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                                <value>
                                                  <s>
                                                    <s>BG</s>
                                                  </s>
                                                </value>
                                                <nil>false</nil>
                                                <globalScope>true</globalScope>
                                                <typeSubstituted>false</typeSubstituted>
                                              </s>
                                            </s>
                                          </value>
                                          <nil>false</nil>
                                          <globalScope>true</globalScope>
                                          <typeSubstituted>false</typeSubstituted>
                                        </s>
                                        <s>
                                          <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                          <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                          <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                          <value>
                                            <s>
                                              <s>.</s>
                                            </s>
                                          </value>
                                          <nil>false</nil>
                                          <globalScope>true</globalScope>
                                          <typeSubstituted>false</typeSubstituted>
                                        </s>
                                        <s>
                                          <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                          <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                          <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                          <value r="232">
                                            <s>
                                              <s>
                                                <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                                <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                                <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                                <value>
                                                  <s>
                                                    <s>value</s>
                                                  </s>
                                                </value>
                                                <nil>false</nil>
                                                <globalScope>true</globalScope>
                                                <typeSubstituted>false</typeSubstituted>
                                              </s>
                                            </s>
                                          </value>
                                          <nil>false</nil>
                                          <globalScope>true</globalScope>
                                          <typeSubstituted>false</typeSubstituted>
                                        </s>
                                      </s>
                                    </value>
                                    <nil>false</nil>
                                    <globalScope>true</globalScope>
                                    <typeSubstituted>false</typeSubstituted>
                                  </s>
                                  <s>
                                    <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                    <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                    <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                    <value>
                                      <s>
                                        <s> </s>
                                        <s>&gt;</s>
                                        <s> </s>
                                      </s>
                                    </value>
                                    <nil>false</nil>
                                    <globalScope>true</globalScope>
                                    <typeSubstituted>false</typeSubstituted>
                                  </s>
                                  <s>
                                    <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                    <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                    <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                    <value r="233">
                                      <s>
                                        <s>
                                          <name>{urn:hl7-org:cql-annotations:r1}s</name>
                                          <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
                                          <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
                                          <value>
                                            <s>
                                              <s>GlucoseThreshold</s>
                                            </s>
                                          </value>
                                          <nil>false</nil>
                                          <globalScope>true</globalScope>
                                          <typeSubstituted>false</typeSubstituted>
                                        </s>
                                      </s>
                                    </value>
                                    <nil>false</nil>
                                    <globalScope>true</globalScope>
                                    <typeSubstituted>false</typeSubstituted>
                                  </s>
                                </s>
                              </value>
                              <nil>false</nil>
                              <globalScope>true</globalScope>
                              <typeSubstituted>false</typeSubstituted>
                            </s>
                          </s>
                        </value>
                        <nil>false</nil>
                        <globalScope>true</globalScope>
                        <typeSubstituted>false</typeSubstituted>
                      </s>
                    </s>
                  </value>
                  <nil>false</nil>
                  <globalScope>true</globalScope>
                  <typeSubstituted>false</typeSubstituted>
                </s>
              </s>
            </wstxns15:s>
          </wstxns14:annotation>
        </wstxns14:annotation>
      </wstxns14:def>
    </wstxns14:def>
  </wstxns14:statements>
  <wstxns16:annotation xmlns:wstxns16="urn:hl7-org:elm:r1">
    <wstxns16:annotation wstxns16:type="CqlToElmInfo" translatorVersion="3.9.0" translatorOptions="EnableAnnotations,EnableLocators" signatureLevel="Overloads"/>
    <wstxns16:annotation wstxns16:type="CqlToElmError" message="An operand identifier [reference] is hiding another identifier of the same name." errorType="semantic" errorSeverity="warning"/>
    <wstxns16:annotation wstxns16:type="CqlToElmError" message="An operand identifier [reference] is hiding another identifier of the same name." errorType="semantic" errorSeverity="warning"/>
    <wstxns16:annotation wstxns16:type="CqlToElmError" message="An operand identifier [reference] is hiding another identifier of the same name." errorType="semantic" errorSeverity="warning"/>
    <wstxns16:annotation wstxns16:type="Annotation">
      <wstxns17:s xmlns:wstxns17="urn:hl7-org:cql-annotations:r1" r="218">
        <s>
          <s>
            <name>{urn:hl7-org:cql-annotations:r1}s</name>
            <declaredType>org.hl7.cql_annotations.r1.Narrative</declaredType>
            <scope>jakarta.xml.bind.JAXBElement$GlobalScope</scope>
            <value>
              <s>
                <s></s>
                <s>library ELMExample</s>
              </s>
            </value>
            <nil>false</nil>
            <globalScope>true</globalScope>
            <typeSubstituted>false</typeSubstituted>
          </s>
        </s>
      </wstxns17:s>
    </wstxns16:annotation>
  </wstxns16:annotation>
</Library>

application/elm+json

{
  "library" : {
    "type" : "Library",
    "identifier" : {
      "type" : "VersionedIdentifier",
      "id" : "ELMExample",
      "system" : "http://hl7.org/fhir/uv/cql"
    },
    "schemaIdentifier" : {
      "type" : "VersionedIdentifier",
      "id" : "urn:hl7-org:elm",
      "version" : "r1"
    },
    "usings" : {
      "type" : "Library$Usings",
      "def" : [ {
        "type" : "UsingDef",
        "localId" : "1",
        "localIdentifier" : "System",
        "uri" : "urn:hl7-org:elm-types:r1"
      }, {
        "type" : "UsingDef",
        "annotation" : [ {
          "type" : "Annotation",
          "s" : {
            "s" : [ {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ "", "using " ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ "FHIR" ]
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                } ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ " version '4.0.1'" ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            } ],
            "r" : "206"
          }
        } ],
        "localId" : "206",
        "locator" : "3:1-3:26",
        "localIdentifier" : "FHIR",
        "uri" : "http://hl7.org/fhir",
        "version" : "4.0.1"
      } ]
    },
    "includes" : {
      "type" : "Library$Includes",
      "def" : [ {
        "type" : "IncludeDef",
        "annotation" : [ {
          "type" : "Annotation",
          "s" : {
            "s" : [ {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ "", "include " ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ "FHIRHelpers" ]
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                } ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ " version ", "'4.0.1'" ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            } ],
            "r" : "207"
          }
        } ],
        "localId" : "207",
        "locator" : "5:1-5:35",
        "localIdentifier" : "FHIRHelpers",
        "path" : "http://hl7.org/fhir/FHIRHelpers",
        "version" : "4.0.1"
      } ]
    },
    "parameters" : {
      "type" : "Library$Parameters",
      "def" : [ {
        "type" : "ParameterDef",
        "parameterTypeSpecifier" : {
          "type" : "NamedTypeSpecifier",
          "localId" : "212",
          "locator" : "10:28-10:35",
          "name" : "{http://hl7.org/fhir}Quantity"
        },
        "annotation" : [ {
          "type" : "Annotation",
          "s" : {
            "s" : [ {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ "", "parameter ", "GlucoseThreshold", " " ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ "Quantity" ]
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                } ],
                "r" : "212"
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            } ],
            "r" : "211"
          }
        } ],
        "localId" : "211",
        "locator" : "10:1-10:35",
        "name" : "GlucoseThreshold",
        "accessLevel" : "Public"
      } ]
    },
    "codeSystems" : {
      "type" : "Library$CodeSystems",
      "def" : [ {
        "type" : "CodeSystemDef",
        "annotation" : [ {
          "type" : "Annotation",
          "s" : {
            "s" : [ {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ "", "codesystem ", "LOINC", ": ", "'http://loinc.org'" ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            } ],
            "r" : "208"
          }
        } ],
        "localId" : "208",
        "locator" : "7:1-7:36",
        "name" : "LOINC",
        "id" : "http://loinc.org",
        "accessLevel" : "Public"
      } ]
    },
    "codes" : {
      "type" : "Library$Codes",
      "def" : [ {
        "type" : "CodeDef",
        "codeSystem" : {
          "type" : "CodeSystemRef",
          "localId" : "210",
          "locator" : "8:37-8:41",
          "name" : "LOINC"
        },
        "annotation" : [ {
          "type" : "Annotation",
          "s" : {
            "s" : [ {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ "", "code ", "\"Blood Glucose\"", ": ", "'2339-0'", " from " ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ "LOINC" ]
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                } ],
                "r" : "210"
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ " display ", "'Glucose Bld-mCnc'" ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            } ],
            "r" : "209"
          }
        } ],
        "localId" : "209",
        "locator" : "8:1-8:68",
        "name" : "Blood Glucose",
        "id" : "2339-0",
        "display" : "Glucose Bld-mCnc",
        "accessLevel" : "Public"
      } ]
    },
    "contexts" : {
      "type" : "Library$Contexts",
      "def" : [ {
        "type" : "ContextDef",
        "localId" : "216",
        "locator" : "12:1-12:15",
        "name" : "Patient"
      } ]
    },
    "statements" : {
      "type" : "Library$Statements",
      "def" : [ {
        "type" : "ExpressionDef",
        "expression" : {
          "type" : "SingletonFrom",
          "operand" : {
            "type" : "Retrieve",
            "localId" : "213",
            "locator" : "12:1-12:15",
            "dataType" : "{http://hl7.org/fhir}Patient",
            "templateId" : "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          "localId" : "215"
        },
        "localId" : "214",
        "locator" : "12:1-12:15",
        "name" : "Patient",
        "context" : "Patient"
      }, {
        "type" : "ExpressionDef",
        "expression" : {
          "type" : "Query",
          "source" : [ {
            "type" : "AliasedQuerySource",
            "expression" : {
              "type" : "Retrieve",
              "codes" : {
                "type" : "ToList",
                "operand" : {
                  "type" : "CodeRef",
                  "localId" : "221",
                  "locator" : "15:17-15:31",
                  "name" : "Blood Glucose"
                },
                "localId" : "229"
              },
              "localId" : "222",
              "locator" : "15:3-15:32",
              "dataType" : "{http://hl7.org/fhir}Observation",
              "templateId" : "http://hl7.org/fhir/StructureDefinition/Observation",
              "codeProperty" : "code",
              "codeComparator" : "~"
            },
            "localId" : "219",
            "locator" : "15:3-15:35",
            "alias" : "BG"
          } ],
          "where" : {
            "type" : "Greater",
            "signature" : [ {
              "type" : "NamedTypeSpecifier",
              "localId" : "237",
              "name" : "{urn:hl7-org:elm-types:r1}Quantity"
            }, {
              "type" : "NamedTypeSpecifier",
              "localId" : "238",
              "name" : "{urn:hl7-org:elm-types:r1}Quantity"
            } ],
            "operand" : [ {
              "type" : "FunctionRef",
              "operand" : [ {
                "type" : "As",
                "operand" : {
                  "type" : "Property",
                  "localId" : "232",
                  "locator" : "16:11-16:18",
                  "path" : "value",
                  "scope" : "BG"
                },
                "localId" : "234",
                "asType" : "{http://hl7.org/fhir}Quantity"
              } ],
              "localId" : "235",
              "name" : "ToQuantity",
              "libraryName" : "FHIRHelpers"
            }, {
              "type" : "FunctionRef",
              "operand" : [ {
                "type" : "ParameterRef",
                "localId" : "233",
                "locator" : "16:22-16:37",
                "name" : "GlucoseThreshold"
              } ],
              "localId" : "236",
              "name" : "ToQuantity",
              "libraryName" : "FHIRHelpers"
            } ],
            "localId" : "230",
            "locator" : "16:5-16:37"
          },
          "localId" : "239",
          "locator" : "15:3-16:37"
        },
        "annotation" : [ {
          "type" : "Annotation",
          "s" : {
            "s" : [ {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ "", "define ", "\"Blood Glucose Observations\"", ":\n  " ]
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            }, {
              "name" : "{urn:hl7-org:cql-annotations:r1}s",
              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
              "value" : {
                "s" : [ {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ {
                      "name" : "{urn:hl7-org:cql-annotations:r1}s",
                      "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                      "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                      "value" : {
                        "s" : [ {
                          "name" : "{urn:hl7-org:cql-annotations:r1}s",
                          "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                          "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                          "value" : {
                            "s" : [ {
                              "name" : "{urn:hl7-org:cql-annotations:r1}s",
                              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                              "value" : {
                                "s" : [ {
                                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                                  "value" : {
                                    "s" : [ "[", "Observation", ": " ]
                                  },
                                  "nil" : false,
                                  "globalScope" : true,
                                  "typeSubstituted" : false
                                }, {
                                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                                  "value" : {
                                    "s" : [ {
                                      "name" : "{urn:hl7-org:cql-annotations:r1}s",
                                      "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                                      "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                                      "value" : {
                                        "s" : [ "\"Blood Glucose\"" ]
                                      },
                                      "nil" : false,
                                      "globalScope" : true,
                                      "typeSubstituted" : false
                                    } ]
                                  },
                                  "nil" : false,
                                  "globalScope" : true,
                                  "typeSubstituted" : false
                                }, {
                                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                                  "value" : {
                                    "s" : [ "]" ]
                                  },
                                  "nil" : false,
                                  "globalScope" : true,
                                  "typeSubstituted" : false
                                } ],
                                "r" : "222"
                              },
                              "nil" : false,
                              "globalScope" : true,
                              "typeSubstituted" : false
                            } ],
                            "r" : "222"
                          },
                          "nil" : false,
                          "globalScope" : true,
                          "typeSubstituted" : false
                        }, {
                          "name" : "{urn:hl7-org:cql-annotations:r1}s",
                          "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                          "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                          "value" : {
                            "s" : [ " ", "BG" ]
                          },
                          "nil" : false,
                          "globalScope" : true,
                          "typeSubstituted" : false
                        } ],
                        "r" : "219"
                      },
                      "nil" : false,
                      "globalScope" : true,
                      "typeSubstituted" : false
                    } ]
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                }, {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ "\n    " ]
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                }, {
                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                  "value" : {
                    "s" : [ {
                      "name" : "{urn:hl7-org:cql-annotations:r1}s",
                      "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                      "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                      "value" : {
                        "s" : [ "where " ]
                      },
                      "nil" : false,
                      "globalScope" : true,
                      "typeSubstituted" : false
                    }, {
                      "name" : "{urn:hl7-org:cql-annotations:r1}s",
                      "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                      "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                      "value" : {
                        "s" : [ {
                          "name" : "{urn:hl7-org:cql-annotations:r1}s",
                          "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                          "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                          "value" : {
                            "s" : [ {
                              "name" : "{urn:hl7-org:cql-annotations:r1}s",
                              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                              "value" : {
                                "s" : [ {
                                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                                  "value" : {
                                    "s" : [ "BG" ]
                                  },
                                  "nil" : false,
                                  "globalScope" : true,
                                  "typeSubstituted" : false
                                } ],
                                "r" : "231"
                              },
                              "nil" : false,
                              "globalScope" : true,
                              "typeSubstituted" : false
                            }, {
                              "name" : "{urn:hl7-org:cql-annotations:r1}s",
                              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                              "value" : {
                                "s" : [ "." ]
                              },
                              "nil" : false,
                              "globalScope" : true,
                              "typeSubstituted" : false
                            }, {
                              "name" : "{urn:hl7-org:cql-annotations:r1}s",
                              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                              "value" : {
                                "s" : [ {
                                  "name" : "{urn:hl7-org:cql-annotations:r1}s",
                                  "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                                  "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                                  "value" : {
                                    "s" : [ "value" ]
                                  },
                                  "nil" : false,
                                  "globalScope" : true,
                                  "typeSubstituted" : false
                                } ],
                                "r" : "232"
                              },
                              "nil" : false,
                              "globalScope" : true,
                              "typeSubstituted" : false
                            } ],
                            "r" : "232"
                          },
                          "nil" : false,
                          "globalScope" : true,
                          "typeSubstituted" : false
                        }, {
                          "name" : "{urn:hl7-org:cql-annotations:r1}s",
                          "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                          "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                          "value" : {
                            "s" : [ " ", ">", " " ]
                          },
                          "nil" : false,
                          "globalScope" : true,
                          "typeSubstituted" : false
                        }, {
                          "name" : "{urn:hl7-org:cql-annotations:r1}s",
                          "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                          "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                          "value" : {
                            "s" : [ {
                              "name" : "{urn:hl7-org:cql-annotations:r1}s",
                              "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
                              "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
                              "value" : {
                                "s" : [ "GlucoseThreshold" ]
                              },
                              "nil" : false,
                              "globalScope" : true,
                              "typeSubstituted" : false
                            } ],
                            "r" : "233"
                          },
                          "nil" : false,
                          "globalScope" : true,
                          "typeSubstituted" : false
                        } ],
                        "r" : "230"
                      },
                      "nil" : false,
                      "globalScope" : true,
                      "typeSubstituted" : false
                    } ],
                    "r" : "230"
                  },
                  "nil" : false,
                  "globalScope" : true,
                  "typeSubstituted" : false
                } ],
                "r" : "239"
              },
              "nil" : false,
              "globalScope" : true,
              "typeSubstituted" : false
            } ],
            "r" : "218"
          }
        } ],
        "localId" : "218",
        "locator" : "14:1-16:37",
        "name" : "Blood Glucose Observations",
        "context" : "Patient",
        "accessLevel" : "Public"
      } ]
    },
    "annotation" : [ {
      "type" : "CqlToElmInfo",
      "translatorVersion" : "3.9.0",
      "translatorOptions" : "EnableAnnotations,EnableLocators",
      "signatureLevel" : "Overloads"
    }, {
      "type" : "CqlToElmError",
      "message" : "An operand identifier [reference] is hiding another identifier of the same name.",
      "errorType" : "semantic",
      "errorSeverity" : "warning"
    }, {
      "type" : "CqlToElmError",
      "message" : "An operand identifier [reference] is hiding another identifier of the same name.",
      "errorType" : "semantic",
      "errorSeverity" : "warning"
    }, {
      "type" : "CqlToElmError",
      "message" : "An operand identifier [reference] is hiding another identifier of the same name.",
      "errorType" : "semantic",
      "errorSeverity" : "warning"
    }, {
      "type" : "Annotation",
      "s" : {
        "s" : [ {
          "name" : "{urn:hl7-org:cql-annotations:r1}s",
          "declaredType" : "org.hl7.cql_annotations.r1.Narrative",
          "scope" : "jakarta.xml.bind.JAXBElement$GlobalScope",
          "value" : {
            "s" : [ "", "library ELMExample" ]
          },
          "nil" : false,
          "globalScope" : true,
          "typeSubstituted" : false
        } ],
        "r" : "218"
      }
    } ],
    "localId" : "0"
  }
}