# CQL Selectivity - Using CQL With FHIR v3.0.0-ballot

## Extension: CQL Selectivity 

Describes the selectivity of a set of data requirements with respect to a particular expression.

**Context of Use**

**Usage info**

**Usages:**

* Use this Extension: [CQL Module](StructureDefinition-cql-module.md)

You can also check for [usages in the FHIR IG Statistics](https://packages2.fhir.org/xig/resource/hl7.fhir.uv.cql|current/StructureDefinition/StructureDefinition-cql-selectivity.json)

### Formal Views of Extension Content

 [Description Differentials, Snapshots, and other representations](http://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#structure-definitions). 

 

Other representations of profile: [CSV](../StructureDefinition-cql-selectivity.csv), [Excel](../StructureDefinition-cql-selectivity.xlsx), [Schematron](../StructureDefinition-cql-selectivity.sch) 



## Resource Content

```json
{
  "resourceType" : "StructureDefinition",
  "id" : "cql-selectivity",
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
    "valueCode" : "cds"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
    "valueInteger" : 1
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueCode" : "trial-use"
  }],
  "url" : "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-selectivity",
  "identifier" : [{
    "system" : "urn:ietf:rfc:3986",
    "value" : "urn:oid:2.16.840.1.113883.4.642.40.37.42.21"
  }],
  "version" : "3.0.0-ballot",
  "name" : "CQLSelectivity",
  "title" : "CQL Selectivity",
  "status" : "active",
  "experimental" : false,
  "date" : "2026-08-14T03:31:27+10:00",
  "publisher" : "HL7 International / Clinical Decision Support",
  "contact" : [{
    "telecom" : [{
      "system" : "url",
      "value" : "http://www.hl7.org/Special/committees/dss"
    }]
  }],
  "description" : "Describes the selectivity of a set of data requirements with respect to a particular expression.",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
      "code" : "001",
      "display" : "World"
    }]
  }],
  "fhirVersion" : "4.0.1",
  "mapping" : [{
    "identity" : "rim",
    "uri" : "http://hl7.org/v3",
    "name" : "RIM Mapping"
  }],
  "kind" : "complex-type",
  "abstract" : false,
  "context" : [{
    "type" : "element",
    "expression" : "Library"
  }],
  "type" : "Extension",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation" : "constraint",
  "differential" : {
    "element" : [{
      "id" : "Extension",
      "path" : "Extension",
      "short" : "Expression selectivity",
      "definition" : "Describes the selectivity of a set of data requirements with respect to a particular expression. The form indicates whether the expression being described is in Conjunctive or Disjunctive Normal Form. The coverage indicates whether the selectivity is total (i.e. the selectivity completely describes the expression) or partial. The inclusivity indicates whether the expression is a positive or negative existence test.",
      "min" : 0,
      "max" : "*"
    },
    {
      "id" : "Extension.extension:expressionIdentifier",
      "path" : "Extension.extension",
      "sliceName" : "expressionIdentifier",
      "short" : "What expression",
      "definition" : "The expression the selectivity is describing.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Extension"
      }]
    },
    {
      "id" : "Extension.extension:expressionIdentifier.extension",
      "path" : "Extension.extension.extension",
      "max" : "0"
    },
    {
      "id" : "Extension.extension:expressionIdentifier.url",
      "path" : "Extension.extension.url",
      "type" : [{
        "code" : "uri"
      }],
      "fixedUri" : "expressionIdentifier"
    },
    {
      "id" : "Extension.extension:expressionIdentifier.value[x]",
      "path" : "Extension.extension.value[x]",
      "min" : 1,
      "type" : [{
        "code" : "string"
      }]
    },
    {
      "id" : "Extension.extension:coverage",
      "path" : "Extension.extension",
      "sliceName" : "coverage",
      "short" : "How selective",
      "definition" : "The coverage level of the selectivity with respect to the expression",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Extension"
      }]
    },
    {
      "id" : "Extension.extension:coverage.extension",
      "path" : "Extension.extension.extension",
      "max" : "0"
    },
    {
      "id" : "Extension.extension:coverage.url",
      "path" : "Extension.extension.url",
      "type" : [{
        "code" : "uri"
      }],
      "fixedUri" : "coverage"
    },
    {
      "id" : "Extension.extension:coverage.value[x]",
      "path" : "Extension.extension.value[x]",
      "min" : 1,
      "type" : [{
        "code" : "code"
      }],
      "binding" : {
        "strength" : "required",
        "valueSet" : "http://hl7.org/fhir/uv/cql/ValueSet/selectivity-coverage"
      }
    },
    {
      "id" : "Extension.extension:inclusivity",
      "path" : "Extension.extension",
      "sliceName" : "inclusivity",
      "short" : "Inclusion/exclusion",
      "definition" : "The inclusivity of the selectivity (i.e. inclusion or exclusion)",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Extension"
      }]
    },
    {
      "id" : "Extension.extension:inclusivity.extension",
      "path" : "Extension.extension.extension",
      "max" : "0"
    },
    {
      "id" : "Extension.extension:inclusivity.url",
      "path" : "Extension.extension.url",
      "type" : [{
        "code" : "uri"
      }],
      "fixedUri" : "inclusivity"
    },
    {
      "id" : "Extension.extension:inclusivity.value[x]",
      "path" : "Extension.extension.value[x]",
      "min" : 1,
      "type" : [{
        "code" : "code"
      }],
      "binding" : {
        "strength" : "required",
        "valueSet" : "http://hl7.org/fhir/uv/cql/ValueSet/selectivity-inclusivity"
      }
    },
    {
      "id" : "Extension.extension:form",
      "path" : "Extension.extension",
      "sliceName" : "form",
      "short" : "Conjunctive/disjunctive",
      "definition" : "The form of the selectivity, conjunctive or disjunctive.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Extension"
      }]
    },
    {
      "id" : "Extension.extension:form.extension",
      "path" : "Extension.extension.extension",
      "max" : "0"
    },
    {
      "id" : "Extension.extension:form.url",
      "path" : "Extension.extension.url",
      "type" : [{
        "code" : "uri"
      }],
      "fixedUri" : "form"
    },
    {
      "id" : "Extension.extension:form.value[x]",
      "path" : "Extension.extension.value[x]",
      "min" : 1,
      "type" : [{
        "code" : "code"
      }],
      "binding" : {
        "strength" : "required",
        "valueSet" : "http://hl7.org/fhir/uv/cql/ValueSet/selectivity-form"
      }
    },
    {
      "id" : "Extension.extension:clause",
      "path" : "Extension.extension",
      "sliceName" : "clause",
      "short" : "A selectivity clause",
      "definition" : "A clause in the selectivity (e.g. A and B). In a conjunctive selectivity, clauses are joined with _and_, whereas in a disjunctive selectivity, clauses are joined with _or_.",
      "min" : 1,
      "max" : "*",
      "type" : [{
        "code" : "Extension"
      }]
    },
    {
      "id" : "Extension.extension:clause.extension:term",
      "path" : "Extension.extension.extension",
      "sliceName" : "term",
      "short" : "A selectivity term",
      "definition" : "A term in a clause of the selectivity (e.g. A.status = 'active'). Terms in a clause are joined with the opposite connective, by definition of Conjunctive and Disjunctive Normal Form (i.e. terms in a conjunctive selectivity are joined with _or_, whereas terms in a disjunctive selectivity are joined with _and_)",
      "min" : 1,
      "max" : "*"
    },
    {
      "id" : "Extension.extension:clause.extension:term.extension",
      "path" : "Extension.extension.extension.extension",
      "max" : "0"
    },
    {
      "id" : "Extension.extension:clause.extension:term.url",
      "path" : "Extension.extension.extension.url",
      "type" : [{
        "code" : "uri"
      }],
      "fixedUri" : "term"
    },
    {
      "id" : "Extension.extension:clause.extension:term.value[x]",
      "path" : "Extension.extension.extension.value[x]",
      "min" : 1,
      "type" : [{
        "code" : "DataRequirement"
      }]
    },
    {
      "id" : "Extension.extension:clause.url",
      "path" : "Extension.extension.url",
      "type" : [{
        "code" : "uri"
      }],
      "fixedUri" : "clause"
    },
    {
      "id" : "Extension.extension:clause.value[x]",
      "path" : "Extension.extension.value[x]",
      "min" : 0,
      "max" : "0"
    },
    {
      "id" : "Extension.url",
      "path" : "Extension.url",
      "fixedUri" : "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-selectivity"
    },
    {
      "id" : "Extension.value[x]",
      "path" : "Extension.value[x]",
      "min" : 0,
      "max" : "0"
    }]
  }
}

```
