Repository navigation
added tests for timezone offset tests - #88
bryantaustin13 wants to merge 9 commits into
Conversation
raleigh-g-thompson
left a comment
There was a problem hiding this comment.
- Incorrect outputs on the three "NullWhen..." tests in the "No default offset" group — shouldn't these be null rather than true?
- Missing version attribute — why is there no version attribute on the Policy: Default to server offset (normalize offset-less to server) group?
- {{SERVER_OFFSET_ISO}} placeholder — could you add a comment explaining the runtime substitution mechanism to help future maintainers?
- New capability codes — are timezone-offset-policy.no-default-offset and timezone-offset-policy.default-server-offset documented somewhere, or is that planned as a follow-up?
An offset-less DateTime takes the evaluation request's timezone offset,
so a "no default offset" policy is not something an engine can choose.
- Remove the two policy groups, the timezone-offset-policy.* capability
codes and the {{SERVER_OFFSET_ISO}} placeholder.
- Keep one group of explicit-offset tests instead of two copies.
- Add default-offset tests that compare offset-less values against
Now(), so they hold whatever offset the evaluation request uses.
- Revert the DateTimeDifferenceWeeks3 change: weeks count Sunday
boundaries, and 2012-03-10 to 2012-03-24 crosses two.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-request The "Default timezone offset (evaluation request)" group tests that an offset-less DateTime takes the evaluation request's timezone offset. Tag the group and its six tests with the capability code for that rule, default-timezone-offset-to-request, which HL7/cql#103 adds to the CQL Language Capabilities CodeSystem (cql-tests#81). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@brynrhodes @raleigh-g-thompson I've reworked this PR around Bryn's comment. When a DateTime has no offset, it takes the evaluation request's offset (Author's Guide, Date, DateTime, and Time). Extracting the offset from such a value returns that offset, "not null" (Extracting Date and Time Components). So a "no default offset" policy isn't something an engine can choose, and the policy framing is gone:
Raleigh, this also covers your points. The Checked on the cqframework Java engine (CQL engine 5.5.0 via clinical-reasoning 4.13.0 on HAPI FHIR 8.12.0): all 23 tests pass at an evaluation offset of Checked on cql-execution 4.0.0-beta.1 ( |
Matches the fix cqframework#156 made on main for the other test files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uses codes from HL7/cql#103 (comment)
Answers this issue
#81 -- Timezoneoffset policy tests
Use this version of cql-tests-runner:
cqframework/cql-tests-runner#77 (comment)