cqframework / cql-engine

Clinical Quality Language Evaluation Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make test suite test uncertainties in some useful way

duncand opened this issue · comments

There are currently 6 tests in the CQL portable test suite (XML) that fail specifically because each test question expression results in an uncertainty, and CQL/ELM do not surface uncertainties by design, which makes direct testing in CQL that we have the correct results not possible:

  • CqlDateTimeOperatorsTest.xml -> DateTimeDurationBetweenUncertainInterval
  • CqlDateTimeOperatorsTest.xml -> DateTimeDurationBetweenUncertainInterval2
  • CqlDateTimeOperatorsTest.xml -> DateTimeDurationBetweenUncertainAdd
  • CqlDateTimeOperatorsTest.xml -> DateTimeDurationBetweenUncertainSubtract
  • CqlDateTimeOperatorsTest.xml -> DateTimeDurationBetweenUncertainMultiply
  • CqlTypesTest.xml -> DateTimeUncertain

As currently written, each of these tests fails with the message: "Test comparison of actual and expected answers resulted in an uncertainty/null value in Engine." Each is trying to compare an uncertainty interval with a regular interval having the same endpoints, which is actually invalid and so the comparison is rightfully resulting in null.

The task of this issue is to find some way to enhance the test suite so that it can meaningfully test CQL uncertainties, for example to meaningfully test that the DateTIme operations given above are behaving correctly.

I will be implementing this ticket tomorrow, along with other XML test suite improvements.