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

fix: encounter date sorting #3177

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

fix: encounter date sorting #3177

wants to merge 9 commits into from

Conversation

mcmcgrath13
Copy link
Collaborator

@mcmcgrath13 mcmcgrath13 commented Jan 22, 2025

PULL REQUEST

Summary

Fix encounter date sorting:

  1. SQL server had validation code that wasn't accounting for the difference in UI column and DB column names. This was causing report_date sorting to fall back to create date sorting
  2. The initialization of the EcrTableClient was overwriting the search params/props provided value
  3. Move the useQueryParam hook to its own file in a new hooks folder so it's more easily reused across different components (felt weird importing from BaseFilter here)
  4. Generally simplify the EcrTableClient logic

Related Issue

Fixes #3134

Acceptance Criteria

Dates should be properly ordered

Additional Information

image

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.

Project coverage is 89.28%. Comparing base (33cf61e) to head (8335173).
Report is 832 commits behind head on main.

Files with missing lines Patch % Lines
...s/ecr-viewer/src/app/components/EcrTableClient.tsx 69.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3177      +/-   ##
==========================================
+ Coverage   87.07%   89.28%   +2.21%     
==========================================
  Files         221       85     -136     
  Lines       13723     4267    -9456     
  Branches      726      729       +3     
==========================================
- Hits        11949     3810    -8139     
+ Misses       1765      436    -1329     
- Partials        9       21      +12     
Flag Coverage Δ
ecr-viewer 91.10% <91.30%> (-0.01%) ⬇️
fhir-converter ?
ingestion ?
message-parser ?
message-refiner ?
orchestration 85.67% <ø> (ø)
record-linkage ?
trigger-code-reference ?
validation ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...iners/ecr-viewer/src/app/components/BaseFilter.tsx 100.00% <100.00%> (ø)
...ntainers/ecr-viewer/src/app/components/Filters.tsx 97.72% <100.00%> (+0.01%) ⬆️
...tainers/ecr-viewer/src/app/hooks/useQueryParam.tsx 100.00% <100.00%> (ø)
containers/ecr-viewer/src/app/page.tsx 100.00% <100.00%> (ø)
.../ecr-viewer/src/app/services/listEcrDataService.ts 74.58% <100.00%> (+0.40%) ⬆️
...s/ecr-viewer/src/app/components/EcrTableClient.tsx 86.53% <69.23%> (-2.80%) ⬇️

... and 137 files with indirect coverage changes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Locally I'm consistently getting the first two tests fail on chrome. I think it has to do with the compiling of the /view-data endpoint that takes ~10-15 seconds. Previously it would work because page.waitForUrl has a longer timeout.
If we increase the timeout on expect in the playwright config to be 15 seconds (expect: { timeout: 15_000}) we can match the functionality that waitForUrl was providing.
image
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, nice! everything was passing locally for me, but everyone hates flaky tests - I'll update

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just pushed it up, could you try again @BobanL ?

@mcmcgrath13 mcmcgrath13 requested a review from BobanL January 23, 2025 20:04
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.

Sort by date encounter date in SQL Server is not accurate
2 participants