From b2b3518f1c248bd99f8b738afd3b2dea19c3fb4d Mon Sep 17 00:00:00 2001 From: sorliog Date: Tue, 19 Dec 2023 15:31:38 -0500 Subject: [PATCH 1/2] Updated cql-to-elm instructions in README.md --- README.md | 130 +++++++++++++++++++++++++++--------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 3b43460dc..7faca3dd3 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Implementors should be aware of the following limitations and gaps in `cql-execu * External functions * While the source code of `cql-execution` is in TypeScript, full-fledged typing of the library is not yet implemented * Conversion from JavaScript to TypeScript was done in [this pull request](https://github.com/cqframework/cql-execution/pull/260), - with the intent on making incremental type improvements in subsequent pull requests. + with the intent on making incremental type improvements in subsequent pull requests. The above is a partial list covering the most significant limitations. For more details, see the [CQL_Execution_Features.xlsx](CQL_Execution_Features.xlsx) spreadsheet. @@ -79,8 +79,8 @@ the ELM. For the easiest integration, we will generate a JSON file using cql-to- repository to a location of your choice 3. `cd ${path_to_clinical_quality_language}/Src/java` (replacing `${path_to_clinical_quality_language}` with the path to the local clone) -4. `./gradlew :cql-to-elm:installDist` -5. `./cql-to-elm/build/install/cql-to-elm/bin/cql-to-elm --format=JSON --input ${path_to_cql} --output ${path_to_cql-execution}/customCQL` +4. `./gradlew :cql-to-elm-cli:installDist` +5. `./cql-to-elm-cli/build/install/cql-to-elm-cli/bin/cql-to-elm-cli --format=JSON --input ${path_to_cql} --output ${path_to_cql-execution}/customCQL` The above example puts the example CQL into a subfolder of the `cql-execution` project to make the relative paths to `cql-execution` libraries easier, but it doesn't _have_ to go there. If you put @@ -194,13 +194,13 @@ const psource = new cql.PatientSource([ { } ]); executor - .exec(psource) - .then(result => { - console.log(JSON.stringify(result, undefined, 2)); - }) - .catch(err => { - console.error(err); - }); + .exec(psource) + .then(result => { + console.log(JSON.stringify(result, undefined, 2)); + }) + .catch(err => { + console.error(err); + }); ``` @@ -251,62 +251,62 @@ define AllFalse: false and false */ module.exports['And'] = { - "library" : { - "identifier" : { "id" : "TestSnippet", "version" : "1" }, - "schemaIdentifier" : { "id" : "urn:hl7-org:elm", "version" : "r1" }, - "usings" : { - "def" : [ - { "localIdentifier" : "System", "uri" : "urn:hl7-org:elm-types:r1" }, - { "localIdentifier" : "Simple", "uri" : "https://github.com/cqframework/cql-execution/simple", "version" : "1.0.0" } - ] - }, - "statements" : { - "def" : [ { - "name" : "Patient", - "context" : "Patient", - "expression" : { - "type" : "SingletonFrom", - "operand" : { - "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", - "type" : "Retrieve" - } - } - }, { - "name" : "AllTrue", - "context" : "Patient", - "accessLevel" : "Public", - "expression" : { - "type" : "And", - "operand" : [ - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" } - ] - } - }, { - "name" : "SomeTrue", - "context" : "Patient", - "accessLevel" : "Public", - "expression" : { - "type" : "And", - "operand" : [ - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } - ] - } - }, { - "name" : "AllFalse", - "context" : "Patient", - "accessLevel" : "Public", - "expression" : { - "type" : "And", - "operand" : [ - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" }, - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } - ] - } - } + "library" : { + "identifier" : { "id" : "TestSnippet", "version" : "1" }, + "schemaIdentifier" : { "id" : "urn:hl7-org:elm", "version" : "r1" }, + "usings" : { + "def" : [ + { "localIdentifier" : "System", "uri" : "urn:hl7-org:elm-types:r1" }, + { "localIdentifier" : "Simple", "uri" : "https://github.com/cqframework/cql-execution/simple", "version" : "1.0.0" } + ] + }, + "statements" : { + "def" : [ { + "name" : "Patient", + "context" : "Patient", + "expression" : { + "type" : "SingletonFrom", + "operand" : { + "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", + "type" : "Retrieve" + } + } + }, { + "name" : "AllTrue", + "context" : "Patient", + "accessLevel" : "Public", + "expression" : { + "type" : "And", + "operand" : [ + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" } + ] + } + }, { + "name" : "SomeTrue", + "context" : "Patient", + "accessLevel" : "Public", + "expression" : { + "type" : "And", + "operand" : [ + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } + ] + } + }, { + "name" : "AllFalse", + "context" : "Patient", + "accessLevel" : "Public", + "expression" : { + "type" : "And", + "operand" : [ + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" }, + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } + ] + } + } ]} - } + } } ``` From 5ce41b2505b7f5e2c5a55eb4378156a92ef0c488 Mon Sep 17 00:00:00 2001 From: sorliog <114115520+sorliog@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:27:09 -0500 Subject: [PATCH 2/2] Changed tabs in code examples to be 4 spaces instead of 8 spaces --- README.md | 124 +++++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 7faca3dd3..024fcdb74 100644 --- a/README.md +++ b/README.md @@ -194,13 +194,13 @@ const psource = new cql.PatientSource([ { } ]); executor - .exec(psource) - .then(result => { - console.log(JSON.stringify(result, undefined, 2)); - }) - .catch(err => { - console.error(err); - }); + .exec(psource) + .then(result => { + console.log(JSON.stringify(result, undefined, 2)); + }) + .catch(err => { + console.error(err); + }); ``` @@ -251,62 +251,62 @@ define AllFalse: false and false */ module.exports['And'] = { - "library" : { - "identifier" : { "id" : "TestSnippet", "version" : "1" }, - "schemaIdentifier" : { "id" : "urn:hl7-org:elm", "version" : "r1" }, - "usings" : { - "def" : [ - { "localIdentifier" : "System", "uri" : "urn:hl7-org:elm-types:r1" }, - { "localIdentifier" : "Simple", "uri" : "https://github.com/cqframework/cql-execution/simple", "version" : "1.0.0" } - ] - }, - "statements" : { - "def" : [ { - "name" : "Patient", - "context" : "Patient", - "expression" : { - "type" : "SingletonFrom", - "operand" : { - "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", - "type" : "Retrieve" - } - } - }, { - "name" : "AllTrue", - "context" : "Patient", - "accessLevel" : "Public", - "expression" : { - "type" : "And", - "operand" : [ - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" } - ] - } - }, { - "name" : "SomeTrue", - "context" : "Patient", - "accessLevel" : "Public", - "expression" : { - "type" : "And", - "operand" : [ - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } - ] - } - }, { - "name" : "AllFalse", - "context" : "Patient", - "accessLevel" : "Public", - "expression" : { - "type" : "And", - "operand" : [ - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" }, - { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } - ] - } - } + "library" : { + "identifier" : { "id" : "TestSnippet", "version" : "1" }, + "schemaIdentifier" : { "id" : "urn:hl7-org:elm", "version" : "r1" }, + "usings" : { + "def" : [ + { "localIdentifier" : "System", "uri" : "urn:hl7-org:elm-types:r1" }, + { "localIdentifier" : "Simple", "uri" : "https://github.com/cqframework/cql-execution/simple", "version" : "1.0.0" } + ] + }, + "statements" : { + "def" : [ { + "name" : "Patient", + "context" : "Patient", + "expression" : { + "type" : "SingletonFrom", + "operand" : { + "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", + "type" : "Retrieve" + } + } + }, { + "name" : "AllTrue", + "context" : "Patient", + "accessLevel" : "Public", + "expression" : { + "type" : "And", + "operand" : [ + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" } + ] + } + }, { + "name" : "SomeTrue", + "context" : "Patient", + "accessLevel" : "Public", + "expression" : { + "type" : "And", + "operand" : [ + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "true", "type" : "Literal" }, + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } + ] + } + }, { + "name" : "AllFalse", + "context" : "Patient", + "accessLevel" : "Public", + "expression" : { + "type" : "And", + "operand" : [ + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" }, + { "valueType" : "{urn:hl7-org:elm-types:r1}Boolean", "value" : "false", "type" : "Literal" } + ] + } + } ]} - } + } } ```