Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated cql-to-elm instructions in README.md #317

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 65 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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);
});
cmoesel marked this conversation as resolved.
Show resolved Hide resolved

```

Expand Down Expand Up @@ -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" }
]
}
}
]}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indent, on the other hand, looks good. I'm not sure how/why we had a three-space indent before. Thanks for fixing it!

}
```

Expand Down