cqframework / cqframework/cql-tests-runner

Test Runner Not Detecting Equal Long Values

Open
#79 4 comments 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 CqlArithmeticFunctionsTest:Abs:AbsLong, the test runner reports:

Test CqlArithmeticFunctionsTest:Abs:AbsLong status: fail expected: 1L actual: 1L

My engine is returning the following result:

{
  "resourceType": "Parameters",
  "parameters": [
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-cqlType",
          "valueString": "System.Long"
        }
      ],
      "name": "return",
      "valueString": "1L"
    }
  ]
}

According to the CQL IG FHIR type mapping, System.Long maps to FHIR.string in R4, so I believe my engine is returning the correct result to represent 1L.

NOTE: I also tried returning it with "valueString": "1" instead of "valueString": "1L", but that also failed.

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 with the runner path that evaluates CqlArithmeticFunctionsTest:Abs:AbsLong and inspect how the expected and actual values are parsed and compared. Reproduce the failure with the reported Parameters payload, including both 1L and 1 representations, and consider the issue done when equal long results are recognized consistently.

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
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.