Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use passed in executionDateTime timeZoneOffset when available #313

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

elsaperelli
Copy link
Contributor

Pull requests into cql-execution require the following.
Submitter and reviewer should ✔ when done.
For items that are not-applicable, mark "N/A" and ✔.

CDS Connect and Bonnie are the main users of this repository.
It is strongly recommended to include a person from each of those projects as a reviewer.

Summary

Previously, getDateTime() in dateTime.ts was not passing in a timeZoneOffset when creating a new DateTime. We only want to do this if an executionDateTime is not provided since it will set the timeZoneOffset to the timeZoneOffset of the evaluation. In the case where the executionDateTime is passed in, we want the timeZoneOffset to come from that. We now achieve this by passing the ctx.getExecutionDateTime().timeZoneOffset to functions that call getDateTime().

Submitter:

  • [✔] This pull request describes why these changes were made
  • [✔] Code diff has been done and been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
  • [✔] Tests are included and test edge cases
  • [✔] Tests have been run locally and pass
  • [✔] Code coverage has not gone down and all code touched or added is covered.
  • [✔] Code passes lint and prettier (hint: use npm run test:plus to run tests, lint, and prettier)
  • [✔] All dependent libraries are appropriately updated or have a corresponding PR related to this change
  • [✔] cql4browsers.js built with npm run build:browserify if source changed.

Reviewer:

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2023

Codecov Report

Merging #313 (ad16658) into master (5e1b210) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head ad16658 differs from pull request most recent head 877578c. Consider uploading reports for the commit 877578c to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##           master     #313   +/-   ##
=======================================
  Coverage   86.15%   86.15%           
=======================================
  Files          52       52           
  Lines        4506     4508    +2     
  Branches     1270     1270           
=======================================
+ Hits         3882     3884    +2     
  Misses        324      324           
  Partials      300      300           
Files Changed Coverage Δ
src/datatypes/datetime.ts 89.48% <100.00%> (ø)
src/elm/clinical.ts 82.64% <100.00%> (+0.14%) ⬆️
src/elm/type.ts 81.15% <100.00%> (+0.06%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmoesel cmoesel self-assigned this Aug 25, 2023
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, @elsaperelli. It looks really good! I only made a couple of very minor comments -- none of which affect the actual code (just code comments and a test description).

src/elm/clinical.ts Outdated Show resolved Hide resolved
test/elm/clinical/clinical-test.ts Show resolved Hide resolved
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks for making the engine better!

@cmoesel cmoesel merged commit cc3ff79 into cqframework:master Aug 30, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants