Skip to content

Commit

Permalink
updated spec tests with 3.12.0 translation
Browse files Browse the repository at this point in the history
  • Loading branch information
hossenlopp committed Jul 10, 2024
1 parent 4a02ed3 commit 8f144fe
Show file tree
Hide file tree
Showing 16 changed files with 31,168 additions and 10,748 deletions.
2 changes: 1 addition & 1 deletion test/generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ task watchTestData (dependsOn: 'classes', type: JavaExec) {

task generateSpecTestData(dependsOn: 'classes', type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'org.cqframework.cql.cql2elm.cli.CqlTranslator'
main = 'org.cqframework.cql.cql2elm.cli.Main'
args '--input', "${projectDir}/../spec-tests/cql", '--format', 'JSON'
}
1,044 changes: 789 additions & 255 deletions test/spec-tests/cql/CqlAggregateFunctionsTest.json

Large diffs are not rendered by default.

63 changes: 48 additions & 15 deletions test/spec-tests/cql/CqlAggregateTest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"library" : {
"annotation" : [ {
"translatorVersion" : "2.3.0",
"translatorVersion" : "3.12.0",
"translatorOptions" : "",
"signatureLevel" : "None",
"type" : "CqlToElmInfo"
} ],
"identifier" : {
Expand All @@ -16,88 +17,117 @@
"usings" : {
"def" : [ {
"localIdentifier" : "System",
"uri" : "urn:hl7-org:elm-types:r1"
"uri" : "urn:hl7-org:elm-types:r1",
"annotation" : [ ]
}, {
"localIdentifier" : "QUICK",
"uri" : "http://hl7.org/fhir/us/qicore",
"version" : "3.3.0"
"version" : "3.3.0",
"annotation" : [ ]
} ]
},
"contexts" : {
"def" : [ {
"name" : "Patient"
"name" : "Patient",
"annotation" : [ ]
} ]
},
"statements" : {
"def" : [ {
"name" : "Patient",
"context" : "Patient",
"annotation" : [ ],
"expression" : {
"type" : "SingletonFrom",
"annotation" : [ ],
"signature" : [ ],
"operand" : {
"dataType" : "{http://hl7.org/fhir/us/qicore}Patient",
"templateId" : "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient",
"type" : "Retrieve"
"type" : "Retrieve",
"annotation" : [ ],
"include" : [ ],
"codeFilter" : [ ],
"dateFilter" : [ ],
"otherFilter" : [ ]
}
}
}, {
"name" : "AggregateTests",
"context" : "Patient",
"accessLevel" : "Public",
"annotation" : [ ],
"expression" : {
"type" : "Tuple",
"annotation" : [ ],
"element" : [ {
"name" : "FactorialOfFive",
"value" : {
"type" : "Tuple",
"annotation" : [ ],
"element" : [ {
"name" : "expression",
"value" : {
"type" : "Query",
"annotation" : [ ],
"source" : [ {
"alias" : "Num",
"annotation" : [ ],
"expression" : {
"type" : "List",
"annotation" : [ ],
"element" : [ {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "1",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}, {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "2",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}, {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "3",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}, {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "4",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}, {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "5",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
} ]
}
} ],
"let" : [ ],
"relationship" : [ ],
"aggregate" : {
"identifier" : "Result",
"annotation" : [ ],
"expression" : {
"type" : "Multiply",
"annotation" : [ ],
"signature" : [ ],
"operand" : [ {
"name" : "Result",
"type" : "QueryLetRef"
"type" : "QueryLetRef",
"annotation" : [ ]
}, {
"name" : "Num",
"type" : "AliasRef"
"type" : "AliasRef",
"annotation" : [ ]
} ]
},
"starting" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "1",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}
}
}
Expand All @@ -106,20 +136,23 @@
"value" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "120",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}
} ]
}
}, {
"name" : "RolledOutIntervals",
"value" : {
"type" : "Tuple",
"annotation" : [ ],
"element" : [ {
"name" : "skipped",
"value" : {
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Translation Error: Could not resolve identifier MedicationRequestIntervals in the current library.",
"type" : "Literal"
"type" : "Literal",
"annotation" : [ ]
}
} ]
}
Expand Down
Loading

0 comments on commit 8f144fe

Please sign in to comment.