Time arithmetic that crosses midnight returns null instead of wrapping

Đang mở
#409 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
backend

Hướng nghiên cứu

Start by reproducing the three rows of the table in the issue against cql-execution's test-server build, since the payload does not name the source file. Locate where Time addition and subtraction are implemented and find why they return null instead of wrapping past midnight. Done when @T23:30:00 + 1 hour, @T23:30:00 + 30 minutes and @T00:30:00 - 1 hour return the expected wrapped Time values, with a test covering the midnight crossing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

Add (2.0):

As Time is cyclic, the result of overflowing the time value will be wrapped around the beginning of the day, so that adding 1 hour to @T23:30:00 will result in @T00:30:00 of the previous day, which is consistent with the behavior of DateTime values

(The 2.0 text says "of the previous day". It presumably means the following day. That's a typo in the spec and doesn't change the expected Time.) This sentence is new in 2.0. 1.5.3 doesn't say what happens.

Expression cql-execution Spec (2.0) Java engine 5.8.0
@T23:30:00 + 1 hour null @T00:30:00 @T00:30:00
@T23:30:00 + 30 minutes null @T00:00:00
@T00:30:00 - 1 hour null @T23:30:00 @T23:30:00

Environment

cql-execution master e8096c6, through test-server (the build has two unrelated Quantity modulo commits on top). The Java engine column is HAPI FHIR 9.0.0 with clinical-reasoning 4.17.0, through $cql.

Ngôn ngữ chính
JavaScript
Star
86
Fork
40
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cqframework/cql-execution

Tất cả issue của cqframework/cql-execution

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.