Skip to content

Test Runner Not Detecting Equal Lists of Interval<DateTime>/Period #80

@cmoesel

Description

@cmoesel

When running the test CqlAggregateTest:AggregateTests:RolledOutIntervals, the test runner reports:

Test CqlAggregateTest:AggregateTests:RolledOutIntervals status: fail expected: {
                                  Interval[@2012-01-01, @2012-02-28],
                                  Interval[@2012-02-29, @2012-04-28],
                                  Interval[@2012-04-29, @2012-06-28]
                                } actual: [ [Object], [Object], [Object] ]

My engine is returning the following result:

{
  "resourceType": "Parameters",
  "parameters": [
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-cqlType",
          "valueString": "List<Interval<System.DateTime>>"
        }
      ],
      "name": "return",
      "valuePeriod": {
        "start": "2012-01-01",
        "end": "2012-02-28"
      }
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-cqlType",
          "valueString": "List<Interval<System.DateTime>>"
        }
      ],
      "name": "return",
      "valuePeriod": {
        "start": "2012-02-29",
        "end": "2012-04-28"
      }
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-cqlType",
          "valueString": "List<Interval<System.DateTime>>"
        }
      ],
      "name": "return",
      "valuePeriod": {
        "start": "2012-04-29",
        "end": "2012-06-28"
      }
    }
  ]
}

According to the CQL IG FHIR type mapping, Interval<System.DateTime> maps to FHIR.Period. According to the $cql operation, the parameter should be repeated for each element in the list. So.. I believe my engine is returning the correct result to represent the Interval<DateTime>s as FHIR.Periods in a list of results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions