Skip to content

QA Specifying Type For Sort By

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

Questions and Answers


Q&A - Specifying Type For Sort-By

Question

We need to sort by the highest lab result for the day. We have attempted "sort by result desc" which gives an error about not being able to resolve the comparison operator.

  "Dabigatran Given" Given
    with "Lab CrCl and eGFR Test" Lab
      such that Lab.result during Given.relevantPeriod
    sort by result desc

Answer

Because result can be different types, you would need to indicate which type you want to use to do the sort, so:

  sort by (result as Quantity) desc

Wiki Index

Home

Authoring Patterns - QICore v4.1.1

Authoring Patterns - QICore v5.0.0

Authoring Patterns - QICore v6.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