cqframework / cqframework/cql-tests-runner
Test Runner Not Detecting Equal DateTimes (Offset vs No Offset)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 3
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 2
Description
When running the test CqlDateTimeOperatorsTest:Add:DateTimeAdd5Hours, the test runner reports:
Test CqlDateTimeOperatorsTest:Add:DateTimeAdd5Hours status: fail expected: @2005-05-10T10 actual: @2005-05-10T10+00:00
My engine is returning the following result:
{
"resourceType": "Parameters",
"parameters": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/cqf-cqlType",
"valueString": "System.DateTime"
}
],
"name": "return",
"valueDateTime": "2005-05-10T10+00:00"
}
]
}
I suspect that the issue is that my DateTime uses offset +00:00, but the runner is expecting no offset. It should be valid for the engine to return a DateTime with an offset in its results since the CQL specification says:
If no timezone offset is specified, the timezone offset of the evaluation request timestamp is used.
So after processing, it seems reasonable that resulting DateTimes would have the evaluation timestamp's offset applied.
NOTE: I think this may be what #77 is intending to address.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CqlDateTimeOperatorsTest:Add:DateTimeAdd5Hours test and the runner's result-comparison logic. Check how DateTime values with and without offsets are compared against the CQL specification, then run this test to confirm that equivalent values pass without weakening other comparisons.
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