Skip to content

QA Matching Typed Assessment Results With Value Sets

Darren Duncan edited this page Oct 12, 2017 · 1 revision

Questions and Answers


Q&A - Matching Typed Assessment Results With Value Sets

Question

Should a Text value be " " or ' '?

See this CQL Logic:

  define "Reasons of Assessment_Lab_Med"
    (["Assessment, Performed": "VTE Risk Assessment"] A where A.result = "Low Risk")
    union
    (["Laboratory Test, Performed": "INR"] L where L.result > 3.0)
    union
    "Reasons of Med" M

I expect the "Assessment, Performed" is passing, but it is not. I tried to use single quote as A.result = 'Low Risk' and it is no issue in MAT, but it causes importing issue in Bonnie.

Not sure why the logic did not go through. Due to HL7, text value should be used single 'Low Risk', but it causes Bonnie import error. When double quote = "Low Risk".

Answer

"Low Risk" represents a value set. The test should be whether or not the result is in the value set rather than whether or not it equals the value set. Try this:

where A.result in "Low Risk"

Question

I applied key word of 'in' before. The reason I changed to use "=" was that MAT tool did not take it. And I just tried again by using 'in "Low Risk" and error msg tells me there is wrong in where statement.

Answer

Try the following logic:

where A.result as Code in "Low Risk"

The error message is letting you know that the type of result is ambiguous, so you need to specify what kind of result you're looking for here (a code).

Wiki Index

Home

Authoring Patterns - QICore v4.1.1

Authoring Patterns - QICore v5.0.0

Authoring Measures in CQL

Composite Measure Development

Cooking with CQL Examples

Cooking with CQL Q&A All Categories
Additional Q&A Examples

CQL 1.3 Impact Guidance

CQL Error Messages

Developers Introduction to CQL

Discussion Items

Example Measures

Formatting and Usage Topics

Formatting Conventions

Library Versioning

Negation in QDM

QDM Known Issues

Specific Occurrences

Specifying Population Criteria

Supplemental Data Elements

Terminology in CQL

Translator Options For Measure Development

Unions in CQL

Clone this wiki locally