Skip to content

Includes returns false instead of null if either operand is null #956

@bryantaustin13

Description

@bryantaustin13

To dupe:

<?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="CqlListOperatorsTest">
	<group name="SingleTest" version="1.0">
		<test name="IncludesNullLeft" version="1.0">
			<capability code="list-operators" />
			<expression>null includes {2}</expression>
			<output>null</output>
		</test>
	</group>
</tests>

actual: false

According to https://cql.hl7.org/09-b-cqlreference.html#includes "For the interval-interval overload, if either argument is null, the result is null."
This actually is slightly ambiguous because it only specifically states interval-interval, but one could infer that it applies to all.

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