Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Authored measures' most-recent sort: mixed timezone offsets and same-instant ties still depend on order

Open
#750 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
typescript
Domain
data

Research direction

Start with the review in #749 and trace the authored-measure sorting path, including normalize.ts and the cql-execution comparison behavior. Confirm how authored cms122 handles mixed offsets and same-instant ties, then get the owner’s decision on the tie rule before defining completion.

Written by the indexing model from the issue text.

Description

backend bug

Two ordering edge cases are left after #749. Both affect only the authored measures; the official CMS measures don't use this sort.

1. Mixed timezone offsets order by text

cql-execution compares sort keys with <. A CQL DateTime has no valueOf, so it compares the toString() output, which ends in the offset. Results with the same offset sort correctly; results with different offsets can sort wrongly when they're close in time.

  • Example (authored cms122): 7.5% at 2026-05-13T23:00:00-10:00 (the newer result) against 10.5% at 2026-05-14T02:00:00+00:00 gives OVERDUE in both orders.
  • How it can happen: WebChart-sourced times carry a local offset (Maui is −10:00), while normalize.ts falls back to issued, usually in Z, when effectiveDateTime is missing.
  • Impact: at most one day on the day-window measures.
  • Fix options: normalise instants to UTC at ingest, or give the sort key one offset.

2. Ties keep input order

Two results at the same instant compare as "greater" both ways, so Last() picks the first-listed of the tied pair. That matters only for value-reading measures (authored cms122: 7.5 then 10.5 gives COMPLIANT; 10.5 then 7.5 gives OVERDUE). A tie needs a rule: a secondary key such as issued, or worst-value-wins. That choice is clinical, so it's an owner decision.

Found in #749's review. Low priority.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
3h 6m
Merged PRs (30d)
113

Getting set up

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.

More from Taleef7/workwell

All issues in Taleef7/workwell

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.