Skip to content

Issue a warning when a query is a noop #1386

@brynrhodes

Description

@brynrhodes

CQL grammar allows a "no-op" query

However, this is frequently an unintended bug, and so the compiler should issue a warning to help authors identify this case.

For example, consider:

codesystem "NUCC taxonomy": 'http://nucc.org/provider-taxonomy'
code "Mental Health Specialty 1": 'code' from "NUCC taxonomy"
code "Mental Health Specialty 2": 'code2' from "NUCC taxonomy"
code "Psych Mental Health Child Adolescent 1": 'code 3' from "NUCC taxonomy"
code "Psych Mental Health 1": 'code 4' from "NUCC taxonomy"

define "Mental Health Specialties": {
    "Mental Health Specialty 1"
    "Mental Health Specialty 2",
    "Psych Mental Health Child Adolescent 1",
    "Psych Mental Health 1",
}

Thread for background:
https://chat.fhir.org/#narrow/stream/179220-cql/topic/Spot.20the.20bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions