cqframework / cqframework/cql-tests-runner

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

Open
#80 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5
Forks
3
Avg merge
2d 16h
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running CqlAggregateTest:AggregateTests:RolledOutIntervals and inspect how the test runner compares the expected Interval list with the repeated FHIR Period results shown in the issue. Done means the runner recognizes these equivalent list values without breaking other aggregate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.