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

Add CQL Test Queries to Troubleshooting #72

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/scripts/install-blazectl.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

VERSION="0.14.0"
VERSION="0.15.0"

curl -sLO "https://github.com/samply/blazectl/releases/download/v$VERSION/blazectl-$VERSION-linux-amd64.tar.gz"
tar xzf "blazectl-$VERSION-linux-amd64.tar.gz"
Expand Down
12 changes: 12 additions & 0 deletions feasibility-triangle/troubleshooting/cql/1-Patient.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
library "1-Patient"
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'

context Patient

define Criterion:
Patient.gender = 'female' or
Patient.gender = 'male'

define InInitialPopulation:
Criterion
5 changes: 5 additions & 0 deletions feasibility-triangle/troubleshooting/cql/1-Patient.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library: cql/1-Patient.cql
group:
- type: Patient
population:
- expression: InInitialPopulation
168 changes: 168 additions & 0 deletions feasibility-triangle/troubleshooting/cql/2-Condition.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
library "2-Condition"
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'

codesystem icd10: 'http://fhir.de/CodeSystem/bfarm/icd-10-gm'

context Patient

define Criterion:
exists [Condition: Code 'E10-E14' from icd10] or
exists [Condition: Code 'E12' from icd10] or
exists [Condition: Code 'E12.3' from icd10] or
exists [Condition: Code 'E12.31' from icd10] or
exists [Condition: Code 'E12.30' from icd10] or
exists [Condition: Code 'E12.1' from icd10] or
exists [Condition: Code 'E12.11' from icd10] or
exists [Condition: Code 'E12.0' from icd10] or
exists [Condition: Code 'E12.01' from icd10] or
exists [Condition: Code 'E12.7' from icd10] or
exists [Condition: Code 'E12.75' from icd10] or
exists [Condition: Code 'E12.74' from icd10] or
exists [Condition: Code 'E12.73' from icd10] or
exists [Condition: Code 'E12.72' from icd10] or
exists [Condition: Code 'E12.4' from icd10] or
exists [Condition: Code 'E12.41' from icd10] or
exists [Condition: Code 'E12.40' from icd10] or
exists [Condition: Code 'E12.8' from icd10] or
exists [Condition: Code 'E12.81' from icd10] or
exists [Condition: Code 'E12.80' from icd10] or
exists [Condition: Code 'E12.2' from icd10] or
exists [Condition: Code 'E12.21' from icd10] or
exists [Condition: Code 'E12.20' from icd10] or
exists [Condition: Code 'E12.5' from icd10] or
exists [Condition: Code 'E12.51' from icd10] or
exists [Condition: Code 'E12.50' from icd10] or
exists [Condition: Code 'E12.6' from icd10] or
exists [Condition: Code 'E12.61' from icd10] or
exists [Condition: Code 'E12.60' from icd10] or
exists [Condition: Code 'E12.9' from icd10] or
exists [Condition: Code 'E12.91' from icd10] or
exists [Condition: Code 'E12.90' from icd10] or
exists [Condition: Code 'E10' from icd10] or
exists [Condition: Code 'E10.3' from icd10] or
exists [Condition: Code 'E10.31' from icd10] or
exists [Condition: Code 'E10.30' from icd10] or
exists [Condition: Code 'E10.1' from icd10] or
exists [Condition: Code 'E10.11' from icd10] or
exists [Condition: Code 'E10.0' from icd10] or
exists [Condition: Code 'E10.01' from icd10] or
exists [Condition: Code 'E10.7' from icd10] or
exists [Condition: Code 'E10.75' from icd10] or
exists [Condition: Code 'E10.74' from icd10] or
exists [Condition: Code 'E10.73' from icd10] or
exists [Condition: Code 'E10.72' from icd10] or
exists [Condition: Code 'E10.4' from icd10] or
exists [Condition: Code 'E10.41' from icd10] or
exists [Condition: Code 'E10.40' from icd10] or
exists [Condition: Code 'E10.8' from icd10] or
exists [Condition: Code 'E10.81' from icd10] or
exists [Condition: Code 'E10.80' from icd10] or
exists [Condition: Code 'E10.2' from icd10] or
exists [Condition: Code 'E10.21' from icd10] or
exists [Condition: Code 'E10.20' from icd10] or
exists [Condition: Code 'E10.5' from icd10] or
exists [Condition: Code 'E10.51' from icd10] or
exists [Condition: Code 'E10.50' from icd10] or
exists [Condition: Code 'E10.6' from icd10] or
exists [Condition: Code 'E10.61' from icd10] or
exists [Condition: Code 'E10.60' from icd10] or
exists [Condition: Code 'E10.9' from icd10] or
exists [Condition: Code 'E10.91' from icd10] or
exists [Condition: Code 'E10.90' from icd10] or
exists [Condition: Code 'E11' from icd10] or
exists [Condition: Code 'E11.3' from icd10] or
exists [Condition: Code 'E11.31' from icd10] or
exists [Condition: Code 'E11.30' from icd10] or
exists [Condition: Code 'E11.1' from icd10] or
exists [Condition: Code 'E11.11' from icd10] or
exists [Condition: Code 'E11.0' from icd10] or
exists [Condition: Code 'E11.01' from icd10] or
exists [Condition: Code 'E11.7' from icd10] or
exists [Condition: Code 'E11.75' from icd10] or
exists [Condition: Code 'E11.74' from icd10] or
exists [Condition: Code 'E11.73' from icd10] or
exists [Condition: Code 'E11.72' from icd10] or
exists [Condition: Code 'E11.4' from icd10] or
exists [Condition: Code 'E11.41' from icd10] or
exists [Condition: Code 'E11.40' from icd10] or
exists [Condition: Code 'E11.8' from icd10] or
exists [Condition: Code 'E11.81' from icd10] or
exists [Condition: Code 'E11.80' from icd10] or
exists [Condition: Code 'E11.2' from icd10] or
exists [Condition: Code 'E11.21' from icd10] or
exists [Condition: Code 'E11.20' from icd10] or
exists [Condition: Code 'E11.5' from icd10] or
exists [Condition: Code 'E11.51' from icd10] or
exists [Condition: Code 'E11.50' from icd10] or
exists [Condition: Code 'E11.6' from icd10] or
exists [Condition: Code 'E11.61' from icd10] or
exists [Condition: Code 'E11.60' from icd10] or
exists [Condition: Code 'E11.9' from icd10] or
exists [Condition: Code 'E11.91' from icd10] or
exists [Condition: Code 'E11.90' from icd10] or
exists [Condition: Code 'E14' from icd10] or
exists [Condition: Code 'E14.3' from icd10] or
exists [Condition: Code 'E14.31' from icd10] or
exists [Condition: Code 'E14.30' from icd10] or
exists [Condition: Code 'E14.1' from icd10] or
exists [Condition: Code 'E14.11' from icd10] or
exists [Condition: Code 'E14.0' from icd10] or
exists [Condition: Code 'E14.01' from icd10] or
exists [Condition: Code 'E14.7' from icd10] or
exists [Condition: Code 'E14.75' from icd10] or
exists [Condition: Code 'E14.74' from icd10] or
exists [Condition: Code 'E14.73' from icd10] or
exists [Condition: Code 'E14.72' from icd10] or
exists [Condition: Code 'E14.4' from icd10] or
exists [Condition: Code 'E14.41' from icd10] or
exists [Condition: Code 'E14.40' from icd10] or
exists [Condition: Code 'E14.8' from icd10] or
exists [Condition: Code 'E14.81' from icd10] or
exists [Condition: Code 'E14.80' from icd10] or
exists [Condition: Code 'E14.2' from icd10] or
exists [Condition: Code 'E14.21' from icd10] or
exists [Condition: Code 'E14.20' from icd10] or
exists [Condition: Code 'E14.5' from icd10] or
exists [Condition: Code 'E14.51' from icd10] or
exists [Condition: Code 'E14.50' from icd10] or
exists [Condition: Code 'E14.6' from icd10] or
exists [Condition: Code 'E14.61' from icd10] or
exists [Condition: Code 'E14.60' from icd10] or
exists [Condition: Code 'E14.9' from icd10] or
exists [Condition: Code 'E14.91' from icd10] or
exists [Condition: Code 'E14.90' from icd10] or
exists [Condition: Code 'E13' from icd10] or
exists [Condition: Code 'E13.3' from icd10] or
exists [Condition: Code 'E13.31' from icd10] or
exists [Condition: Code 'E13.30' from icd10] or
exists [Condition: Code 'E13.1' from icd10] or
exists [Condition: Code 'E13.11' from icd10] or
exists [Condition: Code 'E13.0' from icd10] or
exists [Condition: Code 'E13.01' from icd10] or
exists [Condition: Code 'E13.7' from icd10] or
exists [Condition: Code 'E13.75' from icd10] or
exists [Condition: Code 'E13.74' from icd10] or
exists [Condition: Code 'E13.73' from icd10] or
exists [Condition: Code 'E13.72' from icd10] or
exists [Condition: Code 'E13.4' from icd10] or
exists [Condition: Code 'E13.41' from icd10] or
exists [Condition: Code 'E13.40' from icd10] or
exists [Condition: Code 'E13.8' from icd10] or
exists [Condition: Code 'E13.81' from icd10] or
exists [Condition: Code 'E13.80' from icd10] or
exists [Condition: Code 'E13.2' from icd10] or
exists [Condition: Code 'E13.21' from icd10] or
exists [Condition: Code 'E13.20' from icd10] or
exists [Condition: Code 'E13.5' from icd10] or
exists [Condition: Code 'E13.51' from icd10] or
exists [Condition: Code 'E13.50' from icd10] or
exists [Condition: Code 'E13.6' from icd10] or
exists [Condition: Code 'E13.61' from icd10] or
exists [Condition: Code 'E13.60' from icd10] or
exists [Condition: Code 'E13.9' from icd10] or
exists [Condition: Code 'E13.91' from icd10] or
exists [Condition: Code 'E13.90' from icd10]

define InInitialPopulation:
Criterion
5 changes: 5 additions & 0 deletions feasibility-triangle/troubleshooting/cql/2-Condition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library: cql/2-Condition.cql
group:
- type: Patient
population:
- expression: InInitialPopulation
25 changes: 25 additions & 0 deletions feasibility-triangle/troubleshooting/cql/3-Labor.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
library "3-Labor"
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'

codesystem loinc: 'http://loinc.org'

context Patient

define "Criterion 1":
exists [Observation: Code '718-7' from loinc]

define "Criterion 2":
exists [Observation: Code '17856-6' from loinc]

define "Criterion 3":
exists [Observation: Code '4548-4' from loinc]

define "Criterion 4":
exists [Observation: Code '4549-2' from loinc]

define InInitialPopulation:
"Criterion 1" or
"Criterion 2" or
"Criterion 3" or
"Criterion 4"
5 changes: 5 additions & 0 deletions feasibility-triangle/troubleshooting/cql/3-Labor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library: cql/3-Labor.cql
group:
- type: Patient
population:
- expression: InInitialPopulation
25 changes: 25 additions & 0 deletions feasibility-triangle/troubleshooting/cql/3-Laboratory.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
library "3-Laboratory"
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'

codesystem loinc: 'http://loinc.org'

context Patient

define "Criterion 1":
exists [Observation: Code '718-7' from loinc]

define "Criterion 2":
exists [Observation: Code '17856-6' from loinc]

define "Criterion 3":
exists [Observation: Code '4548-4' from loinc]

define "Criterion 4":
exists [Observation: Code '4549-2' from loinc]

define InInitialPopulation:
"Criterion 1" or
"Criterion 2" or
"Criterion 3" or
"Criterion 4"
5 changes: 5 additions & 0 deletions feasibility-triangle/troubleshooting/cql/3-Laboratory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library: cql/3-Laboratory.cql
group:
- type: Patient
population:
- expression: InInitialPopulation
Loading