Skip to content

days between DateTime with Uncertain Interval returns string instead of interval #947

@bryantaustin13

Description

@bryantaustin13

days between DateTime(2014, 1, 15) and DateTime(2014, 2) when evaluated returns a String, “Interval[16, 44]“, not an Interval object

To duplicate the error run this test against cql-tests-runner:

<?xml version="1.0" encoding="utf-8"?>
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://hl7.org/fhirpath/tests" xsi:schemaLocation="http://hl7.org/fhirpath/tests ../../testSchema/testSchema.xsd"
	   name="CqlIntervalOperatorsTest" reference="https://cql.hl7.org/09-b-cqlreference.html#interval-operators-3" version="1.0">
	<group name="IntervalFail" version="1.0">
		<test name="DateTimeDurationBetweenUncertainInterval" version="1.4">
			<capability code="precision-based-timing"/>
			<capability code="uncertainty-intervals"/>
			<expression>days between DateTime(2014, 1, 15) and DateTime(2014, 2)</expression>
			<output>Interval[ 16, 44 ]</output>
		</test>
	</group>
</tests>

A number of cql-tests in the CqlIntervalOperators file depend on this. Currently showing an error because it is expecting an object not a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions