Clinical Quality Language Specification
2.0.0-ballot - R2 STU 1 (Ballot)

Clinical Quality Language Specification, published by Clinical Decision Support WG. This guide is not an authorized publication; it is the continuous build for version 2.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/cql/ and changes regularly. See the Directory of published versions

## : CQL Message Codes - TTL Representation

Page standards status: Trial-use | Maturity Level: 2

Raw ttl | Download

    @prefix fhir: <http://hl7.org/fhir/> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    # - resource -------------------------------------------------------------------

     a fhir:CodeSystem ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:id [ fhir:v "cql-message-codes"] ; #
      fhir:text [
    fhir:status [ fhir:v "generated" ] ;
    fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: CodeSystem cql-message-codes</b></p><a name=\"cql-message-codes\"> </a><a name=\"hccql-message-codes\"> </a><p><b>Properties</b></p><p><b>This code system defines the following properties for its concepts</b></p><table class=\"grid\"><tr><td><b>Name</b></td><td><b>Code</b></td><td><b>URI</b></td><td><b>Type</b></td><td><b>Description</b></td><td><b>Value Set</b></td></tr><tr><td>Category</td><td>category</td><td>http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#category</td><td>code</td><td>The language area, possible values are codes in the [CQL Message Category Codes](CodeSystem-cql-message-category-codes.html) code system</td><td><a href=\"ValueSet-cql-message-category.html\">CQL Message Category</a></td></tr><tr><td>Severity</td><td>severity</td><td>http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#severity</td><td>code</td><td>Severity of the issue, possible values are codes in the [CQL Message Severity Codes](CodeSystem-cql-message-severity-codes.html) code system</td><td><a href=\"ValueSet-cql-message-severity.html\">CQL Message Severity</a></td></tr><tr><td>Source</td><td>source</td><td>http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#source</td><td>code</td><td>The source of the issue, providing information about where the issue is originating and how it might be addressed, possible values are codes in the [CQL Message Source Codes](CodeSystem-cql-message-source-codes.html) code system</td><td><a href=\"ValueSet-cql-message-source.html\">CQL Message Source</a></td></tr><tr><td>Example Message</td><td>example</td><td>http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#example</td><td>string</td><td>An example message providing a sample of what kinds of actual messages will be returned with this code.</td><td/></tr><tr><td>Notes</td><td>notes</td><td>http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#notes</td><td>string</td><td>Notes about the message, especially how to address the issue being identified</td><td/></tr><tr><td>Specification Link</td><td>spec-link</td><td>http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#spec-link</td><td>string</td><td>A URL to the point in the specification where this message is defined</td><td/></tr></table><p><b>Concepts</b></p><p>This case-sensitive code system <code>http://cql.hl7.org/CodeSystem/cql-message-codes</code> defines the following codes:</p><table class=\"codes\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td><td><b>Category</b></td><td><b>Severity</b></td><td><b>Source</b></td><td><b>Example Message</b></td><td><b>Notes</b></td><td><b>Specification Link</b></td></tr><tr><td style=\"white-space:nowrap\">000-00000<a name=\"cql-message-codes-000-00000\"> </a></td><td>Internal</td><td>Internal translator error</td><td>compile-time</td><td>error</td><td>content</td><td>Internal translator error</td><td>This message code typically indicates an unexpected error was encountered while attempting to compile CQL.</td><td>20-m-messages.html#messages</td></tr><tr><td style=\"white-space:nowrap\">001-00000<a name=\"cql-message-codes-001-00000\"> </a></td><td>Lexical</td><td>Lexical error</td><td>lexical</td><td>error</td><td>content</td><td>Lexical error</td><td>This is a general message code for lexical errors encountered while processing CQL. The actual message will typically contain more detailed information about the issue and how to address it.</td><td>20-m-messages.html#messages</td></tr><tr><td style=\"white-space:nowrap\">002-00000<a name=\"cql-message-codes-002-00000\"> </a></td><td>Syntax</td><td>Syntax error</td><td>syntax</td><td>error</td><td>content</td><td>Syntax error</td><td>This is a general message code for syntax errors encountered while processing CQL. The actual message will typically contain more detailed information about the issue and how to address it.</td><td>20-m-messages.html#messages</td></tr><tr><td style=\"white-space:nowrap\">003-00000<a name=\"cql-message-codes-003-00000\"> </a></td><td>Semantic</td><td>Semantic error</td><td>semantic</td><td>error</td><td>content</td><td>Semantic error</td><td>This is a general message code for semantic errors encountered while processing CQL. The actual message will typically contain more detailed information about the issue and how to address it.</td><td>20-m-messages.html#messages</td></tr><tr><td style=\"white-space:nowrap\">003-10000<a name=\"cql-message-codes-003-10000\"> </a></td><td>Conditional expression resulted in a choice type</td><td>Indicates that a conditional expression resulted in a choice type when none of the branches of the conditional were choice types. This can indicate a mistake and should be reviewed.</td><td>semantic</td><td>warning</td><td>content</td><td>Conditional expression resulted in a choice type `Choice&lt;Boolean, List&lt;Integer&gt;`</td><td>This message may be suppressed with the @suppressWarning tag</td><td>03-developersguide.html#type-inference-of-conditional-expressions</td></tr><tr><td style=\"white-space:nowrap\">100-00000<a name=\"cql-message-codes-100-00000\"> </a></td><td>Run-time</td><td>Runtime error</td><td>run-time</td><td>error</td><td>content</td><td>Run-time error</td><td>This is a general message code for run-time errors encountered while attempting to evaluate CQL. The actual message will typically contain more detailed information about the issue and how to address it.</td><td>20-m-messages.html#messages</td></tr></table></div>"^^rdf:XMLLiteral
      ] ; #
      fhir:extension ( [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "cds"     ]
      ] [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "trial-use"     ]
      ] [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:integer ;
    fhir:v 2     ]
      ] ) ; #
      fhir:url [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-codes"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "2.0.0-ballot"] ; #
      fhir:name [ fhir:v "CQLMessageCodes"] ; #
      fhir:title [ fhir:v "CQL Message Codes"] ; #
      fhir:status [ fhir:v "active"] ; #
      fhir:experimental [ fhir:v false] ; #
      fhir:date [ fhir:v "2025-10-24T16:45:25+00:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "Clinical Decision Support WG"] ; #
      fhir:contact ( [
        ( fhir:telecom [
    fhir:system [ fhir:v "url" ] ;
    fhir:value [ fhir:v "http://www.hl7.org/Special/committees/dss/index.cfm" ]     ] )
      ] ) ; #
      fhir:description [ fhir:v "Codes for messages returned by applications that process Clinical Quality Language, whether as part of authoring or evaluating. This code system is intended to be a place to identify codes for messages that are indicated by the specification itself. Implementation-specific, application-specific, and content-specific codes may be provided with codes from other code systems, but should ideally map to some code (possibly a more general code) in this code system."] ; #
      fhir:caseSensitive [ fhir:v true] ; #
      fhir:valueSet [
    fhir:v "http://cql.hl7.org/ValueSet/cql-message-code"^^xsd:anyURI ;
    fhir:link <http://cql.hl7.org/ValueSet/cql-message-code>
      ] ; #
      fhir:content [ fhir:v "complete"] ; #
      fhir:property ( [
        ( fhir:extension [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/codesystem-property-valueset"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:canonical ;
    fhir:v "http://cql.hl7.org/ValueSet/cql-message-category"^^xsd:anyURI ;
    fhir:link <http://cql.hl7.org/ValueSet/cql-message-category>       ]     ] ) ;
    fhir:code [ fhir:v "category" ] ;
    fhir:uri [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#category"^^xsd:anyURI ] ;
    fhir:description [ fhir:v "The language area, possible values are codes in the [CQL Message Category Codes](CodeSystem-cql-message-category-codes.html) code system" ] ;
    fhir:type [ fhir:v "code" ]
      ] [
        ( fhir:extension [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/codesystem-property-valueset"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:canonical ;
    fhir:v "http://cql.hl7.org/ValueSet/cql-message-severity"^^xsd:anyURI ;
    fhir:link <http://cql.hl7.org/ValueSet/cql-message-severity>       ]     ] ) ;
    fhir:code [ fhir:v "severity" ] ;
    fhir:uri [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#severity"^^xsd:anyURI ] ;
    fhir:description [ fhir:v "Severity of the issue, possible values are codes in the [CQL Message Severity Codes](CodeSystem-cql-message-severity-codes.html) code system" ] ;
    fhir:type [ fhir:v "code" ]
      ] [
        ( fhir:extension [
    fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/codesystem-property-valueset"^^xsd:anyURI ] ;
    fhir:value [
    a fhir:canonical ;
    fhir:v "http://cql.hl7.org/ValueSet/cql-message-source"^^xsd:anyURI ;
    fhir:link <http://cql.hl7.org/ValueSet/cql-message-source>       ]     ] ) ;
    fhir:code [ fhir:v "source" ] ;
    fhir:uri [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#source"^^xsd:anyURI ] ;
    fhir:description [ fhir:v "The source of the issue, providing information about where the issue is originating and how it might be addressed, possible values are codes in the [CQL Message Source Codes](CodeSystem-cql-message-source-codes.html) code system" ] ;
    fhir:type [ fhir:v "code" ]
      ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:uri [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#example"^^xsd:anyURI ] ;
    fhir:description [ fhir:v "An example message providing a sample of what kinds of actual messages will be returned with this code." ] ;
    fhir:type [ fhir:v "string" ]
      ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:uri [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#notes"^^xsd:anyURI ] ;
    fhir:description [ fhir:v "Notes about the message, especially how to address the issue being identified" ] ;
    fhir:type [ fhir:v "string" ]
      ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:uri [ fhir:v "http://cql.hl7.org/CodeSystem/cql-message-characteristic-codes#spec-link"^^xsd:anyURI ] ;
    fhir:description [ fhir:v "A URL to the point in the specification where this message is defined" ] ;
    fhir:type [ fhir:v "string" ]
      ] ) ; #
      fhir:concept ( [
    fhir:code [ fhir:v "000-00000" ] ;
    fhir:display [ fhir:v "Internal" ] ;
    fhir:definition [ fhir:v "Internal translator error" ] ;
        ( fhir:property [
    fhir:code [ fhir:v "category" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "compile-time"       ]     ] [
    fhir:code [ fhir:v "severity" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "error"       ]     ] [
    fhir:code [ fhir:v "source" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "content"       ]     ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Internal translator error"       ]     ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "This message code typically indicates an unexpected error was encountered while attempting to compile CQL."       ]     ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "20-m-messages.html#messages"       ]     ] )
      ] [
    fhir:code [ fhir:v "001-00000" ] ;
    fhir:display [ fhir:v "Lexical" ] ;
    fhir:definition [ fhir:v "Lexical error" ] ;
        ( fhir:property [
    fhir:code [ fhir:v "category" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "lexical"       ]     ] [
    fhir:code [ fhir:v "severity" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "error"       ]     ] [
    fhir:code [ fhir:v "source" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "content"       ]     ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Lexical error"       ]     ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "This is a general message code for lexical errors encountered while processing CQL. The actual message will typically contain more detailed information about the issue and how to address it."       ]     ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "20-m-messages.html#messages"       ]     ] )
      ] [
    fhir:code [ fhir:v "002-00000" ] ;
    fhir:display [ fhir:v "Syntax" ] ;
    fhir:definition [ fhir:v "Syntax error" ] ;
        ( fhir:property [
    fhir:code [ fhir:v "category" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "syntax"       ]     ] [
    fhir:code [ fhir:v "severity" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "error"       ]     ] [
    fhir:code [ fhir:v "source" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "content"       ]     ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Syntax error"       ]     ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "This is a general message code for syntax errors encountered while processing CQL. The actual message will typically contain more detailed information about the issue and how to address it."       ]     ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "20-m-messages.html#messages"       ]     ] )
      ] [
    fhir:code [ fhir:v "003-00000" ] ;
    fhir:display [ fhir:v "Semantic" ] ;
    fhir:definition [ fhir:v "Semantic error" ] ;
        ( fhir:property [
    fhir:code [ fhir:v "category" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "semantic"       ]     ] [
    fhir:code [ fhir:v "severity" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "error"       ]     ] [
    fhir:code [ fhir:v "source" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "content"       ]     ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Semantic error"       ]     ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "This is a general message code for semantic errors encountered while processing CQL. The actual message will typically contain more detailed information about the issue and how to address it."       ]     ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "20-m-messages.html#messages"       ]     ] )
      ] [
    fhir:code [ fhir:v "003-10000" ] ;
    fhir:display [ fhir:v "Conditional expression resulted in a choice type" ] ;
    fhir:definition [ fhir:v "Indicates that a conditional expression resulted in a choice type when none of the branches of the conditional were choice types. This can indicate a mistake and should be reviewed." ] ;
        ( fhir:property [
    fhir:code [ fhir:v "category" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "semantic"       ]     ] [
    fhir:code [ fhir:v "severity" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "warning"       ]     ] [
    fhir:code [ fhir:v "source" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "content"       ]     ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Conditional expression resulted in a choice type `Choice<Boolean, List<Integer>`"       ]     ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "This message may be suppressed with the @suppressWarning tag"       ]     ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "03-developersguide.html#type-inference-of-conditional-expressions"       ]     ] )
      ] [
    fhir:code [ fhir:v "100-00000" ] ;
    fhir:display [ fhir:v "Run-time" ] ;
    fhir:definition [ fhir:v "Runtime error" ] ;
        ( fhir:property [
    fhir:code [ fhir:v "category" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "run-time"       ]     ] [
    fhir:code [ fhir:v "severity" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "error"       ]     ] [
    fhir:code [ fhir:v "source" ] ;
    fhir:value [
    a fhir:code ;
    fhir:v "content"       ]     ] [
    fhir:code [ fhir:v "example" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "Run-time error"       ]     ] [
    fhir:code [ fhir:v "notes" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "This is a general message code for run-time errors encountered while attempting to evaluate CQL. The actual message will typically contain more detailed information about the issue and how to address it."       ]     ] [
    fhir:code [ fhir:v "spec-link" ] ;
    fhir:value [
    a fhir:string ;
    fhir:v "20-m-messages.html#messages"       ]     ] )
      ] ) . #