From 87801477075b298ae3aab6c7d8350508b887c4ec Mon Sep 17 00:00:00 2001 From: Bryant Austin Date: Fri, 24 Oct 2025 15:11:24 -0600 Subject: [PATCH 1/2] added clinical operators children; NOTE: also added the 2 contains operators --- input/pages/09-b-cqlreference.md | 7 +- .../CodeSystem-cql-language-capabilities.json | 104 +++++++++++++++++- 2 files changed, 108 insertions(+), 3 deletions(-) diff --git a/input/pages/09-b-cqlreference.md b/input/pages/09-b-cqlreference.md index 47665b6..e2344be 100644 --- a/input/pages/09-b-cqlreference.md +++ b/input/pages/09-b-cqlreference.md @@ -5976,6 +5976,8 @@ define "EquivalentIsFalse": Concept1 ~ Concept2 > Note: Because code declarations in CQL allow the value of the code to be any valid code from the code system, it is possible to define code declarations that use expressions if the code system supports it (_post-coordinated expressions_ in SNOMED, for example). However, using such features of a code system would effectively require a terminology server in order to fully support the capability, and CQL is not prescriptive about such support, and artifacts that make use of these types of features for code equivalence should come with a warning about implementability. {: .note-warning} +{: .contains_codesystem} + #### Contains (Codesystem) > The EquivalentContains (`~contains`) operator was introduced in CQL 2.0, and has trial-use status. @@ -6020,6 +6022,7 @@ define "CodesystemContainsNullString": "SNOMED:2014" ~contains null as String // > Note carefully that the use of the string overloads for membership testing in code systems and value sets is potentially problematic and should be used with caution, if at all {: .note-warning} +{: #in_codesystem} #### In (Codesystem) > The EquivalentIn (`~in`) operator was introduced in CQL 2.0, and has trial-use status. For backwards-compatibility the normative In (`in`) can still be used to test code system membership. @@ -6092,7 +6095,7 @@ valueset "Value Set Reference": 'http://example.org/ValueSet/ExampleValueSet' define TestExpandValueSet: ExpandValueSet("Value Set Reference") ``` - +{: .contains_valueset} #### Contains (Valueset) > The EquivalentContains (`~contains`) operator was introduced in CQL 2.0, and has trial-use status. @@ -6137,6 +6140,8 @@ define "ValuesetContainsNullString": "Acute Pharyngitis" ~contains null as Strin > Note carefully that the use of the string overloads for membership testing in code systems and value sets is potentially problematic and should be used with caution, if at all {: .note-warning} +{: .in_valueset} + #### In (Valueset) > The EquivalentIn (`~in`) operator was introduced in CQL 2.0, and has trial-use status. For backwards-compatibility the normative In (`in`) can still be used to test code system membership. diff --git a/input/vocabulary/CodeSystem-cql-language-capabilities.json b/input/vocabulary/CodeSystem-cql-language-capabilities.json index d4108a9..3cdaa4d 100644 --- a/input/vocabulary/CodeSystem-cql-language-capabilities.json +++ b/input/vocabulary/CodeSystem-cql-language-capabilities.json @@ -1299,9 +1299,109 @@ "property": [ { "code": "version", "valueString": "1.0" }, { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#clinical-operators" } + ], + "concept": [ + { + "code": "clinical-operators.age", + "display": "Clinical Operators age", + "definition": "The Age operators calculate the age of the patient as of the current date in the precision named in the operator.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#age" } + ] + }, + { + "code": "clinical-operators.ageat", + "display": "Clinical Operators age at", + "definition": "The AgeAt operators calculate the age of the patient as of a given date and in the precision named in the operator.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#ageat" } + ] + }, + { + "code": "clinical-operators.calculateage", + "display": "Clinical Operators calculate age", + "definition": "The CalculateAge operators calculate the age of a person born on the given birth date, as of the current date, and in the precision named in the operator.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#calculateage" } + ] + }, + { + "code": "clinical-operators.calculateageat", + "display": "Clinical Operators Calculate age at", + "definition": "The CalculateAgeAt operators calculate the age of a person born on the given birth date as of the given date, and in the precision named in the operator.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#calculateageat" } + ] + }, + { + "code": "clinical-operators.contains_codesystem", + "display": "Clinical Operators contains codesystem", + "definition": "The ~contains (Codesystem) operators determine whether or not a given code, or any of a list of codes, is in a particular codesystem. Note that these operators can only be invoked by referencing a defined codesystem or CodeSystem-valued expression.", + "property": [ + { "code": "version", "valueString": "2.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#calculateage" } + ] + }, + { + "code": "clinical-operators.contains_valueset", + "display": "Clinical Operators contains valueset", + "definition": "The ~contains (Valueset) operators determine whether or not a given code, or any of a list of codes, is in a particular valueset. Note that these operators can only be invoked by referencing a defined valueset or ValueSet-valued expression.", + "property": [ + { "code": "version", "valueString": "2.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#contains_valueset" } + ] + }, + { + "code": "clinical-operators.equal", + "display": "Clinical Operators equal", + "definition": "The equal (=) operator for Codes and Concepts uses tuple equality semantics. This means that the operator will return true if and only if the values for each element by name are equal.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#equal-3" } + ] + }, + { + "code": "clinical-operators.equivalent", + "display": "Clinical Operators equivalent", + "definition": "The equivalent (~) operator for Code values returns true if the code and system elements are equivalent. The version and display elements are ignored for the purposes of determining Code equivalence.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#equivalent-3" } + ] + }, + { + "code": "clinical-operators.in-codesysterm", + "display": "Clinical Operators in (Codesystem)", + "definition": "The in (Codesystem) operators determine whether or not a given code, or any of a list of codes, is in a particular codesystem. Note that these operators can only be invoked by referencing a defined codesystem.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#in-codesystem" } + ] + }, + { + "code": "clinical-operators.expandvalueset", + "display": "Clinical Operators expand valueset", + "definition": "The ExpandValueSet function returns the current expansion for the given value set.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#expandvalueset" } + ] + }, + { + "code": "clinical-operators.in_valueset", + "display": "Clinical Operators in valueset", + "definition": "The in (Valueset) operators determine whether or not a given code, or any of a list of codes, is in a particular valueset. Note that these operators can only be invoked by referencing a defined valueset.", + "property": [ + { "code": "version", "valueString": "1.0" }, + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#in_valueset" } + ] + } ] - }, - { + }, { "code": "diagnostic-operators", "display": "Diagnostic Operators", "definition": "Errors and messaging functions.", From 350eca45cdb3084a8088e7f2054e424d45a0dc02 Mon Sep 17 00:00:00 2001 From: Bryant Austin Date: Mon, 27 Oct 2025 11:25:20 -0600 Subject: [PATCH 2/2] addressed change requests --- input/pages/09-b-cqlreference.md | 2 -- input/vocabulary/CodeSystem-cql-language-capabilities.json | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/input/pages/09-b-cqlreference.md b/input/pages/09-b-cqlreference.md index e2344be..651475f 100644 --- a/input/pages/09-b-cqlreference.md +++ b/input/pages/09-b-cqlreference.md @@ -6095,7 +6095,6 @@ valueset "Value Set Reference": 'http://example.org/ValueSet/ExampleValueSet' define TestExpandValueSet: ExpandValueSet("Value Set Reference") ``` -{: .contains_valueset} #### Contains (Valueset) > The EquivalentContains (`~contains`) operator was introduced in CQL 2.0, and has trial-use status. @@ -6140,7 +6139,6 @@ define "ValuesetContainsNullString": "Acute Pharyngitis" ~contains null as Strin > Note carefully that the use of the string overloads for membership testing in code systems and value sets is potentially problematic and should be used with caution, if at all {: .note-warning} -{: .in_valueset} #### In (Valueset) diff --git a/input/vocabulary/CodeSystem-cql-language-capabilities.json b/input/vocabulary/CodeSystem-cql-language-capabilities.json index 3cdaa4d..729c815 100644 --- a/input/vocabulary/CodeSystem-cql-language-capabilities.json +++ b/input/vocabulary/CodeSystem-cql-language-capabilities.json @@ -1352,7 +1352,7 @@ "definition": "The ~contains (Valueset) operators determine whether or not a given code, or any of a list of codes, is in a particular valueset. Note that these operators can only be invoked by referencing a defined valueset or ValueSet-valued expression.", "property": [ { "code": "version", "valueString": "2.0" }, - { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#contains_valueset" } + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html" } ] }, { @@ -1397,7 +1397,7 @@ "definition": "The in (Valueset) operators determine whether or not a given code, or any of a list of codes, is in a particular valueset. Note that these operators can only be invoked by referencing a defined valueset.", "property": [ { "code": "version", "valueString": "1.0" }, - { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html#in_valueset" } + { "code": "reference", "valueString": "https://cql.hl7.org/09-b-cqlreference.html" } ] } ]