UNPKG

@phema/cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

184 lines (182 loc) 5.33 kB
{ "library" : { "annotation" : [ { "translatorOptions" : "", "type" : "CqlToElmInfo" } ], "identifier" : { "id" : "AgeAtMP", "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" } ] }, "parameters" : { "def" : [ { "name" : "MeasurementPeriod", "accessLevel" : "Public", "default" : { "lowClosed" : true, "highClosed" : false, "type" : "Interval", "low" : { "type" : "DateTime", "year" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "2013", "type" : "Literal" }, "month" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "1", "type" : "Literal" }, "day" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "1", "type" : "Literal" }, "hour" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" }, "minute" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" }, "second" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" }, "millisecond" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" } }, "high" : { "type" : "DateTime", "year" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "2014", "type" : "Literal" }, "month" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "1", "type" : "Literal" }, "day" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "1", "type" : "Literal" }, "hour" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" }, "minute" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" }, "second" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" }, "millisecond" : { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "0", "type" : "Literal" } } } } ] }, "statements" : { "def" : [ { "name" : "Patient", "context" : "Patient", "expression" : { "type" : "SingletonFrom", "operand" : { "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", "type" : "Retrieve" } } }, { "name" : "InDemographic", "context" : "Patient", "accessLevel" : "Public", "expression" : { "type" : "And", "operand" : [ { "type" : "GreaterOrEqual", "operand" : [ { "precision" : "Year", "type" : "CalculateAgeAt", "operand" : [ { "path" : "birthDate", "type" : "Property", "source" : { "name" : "Patient", "type" : "ExpressionRef" } }, { "type" : "Start", "operand" : { "name" : "MeasurementPeriod", "type" : "ParameterRef" } } ] }, { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "2", "type" : "Literal" } ] }, { "type" : "Less", "operand" : [ { "precision" : "Year", "type" : "CalculateAgeAt", "operand" : [ { "path" : "birthDate", "type" : "Property", "source" : { "name" : "Patient", "type" : "ExpressionRef" } }, { "type" : "Start", "operand" : { "name" : "MeasurementPeriod", "type" : "ParameterRef" } } ] }, { "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "18", "type" : "Literal" } ] } ] } } ] } } }