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

chore: remove create and read fhir bundle from postgres #3137

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

Conversation

BobanL
Copy link
Collaborator

@BobanL BobanL commented Jan 16, 2025

PULL REQUEST

Summary

  • Remove data_source variable from core.sql
  • Remove postgres from get fhir-data and /save-fhir-data
  • Orchestration tests save to azure now
  • Remove unused metrics api and uninstall opentelemetry/api

Related Issue

Fixes #2406

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.39%. Comparing base (e1385f0) to head (9f074e5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3137      +/-   ##
==========================================
+ Coverage   87.03%   89.39%   +2.35%     
==========================================
  Files         221       84     -137     
  Lines       13664     4204    -9460     
  Branches      708      716       +8     
==========================================
- Hits        11892     3758    -8134     
+ Misses       1763      426    -1337     
- Partials        9       20      +11     
Flag Coverage Δ
ecr-viewer 91.29% <100.00%> (+0.30%) ⬆️
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 Δ
...-viewer/src/app/api/fhir-data/fhir-data-service.ts 94.33% <ø> (-1.32%) ⬇️
...ntainers/ecr-viewer/src/app/api/fhir-data/route.ts 100.00% <ø> (ø)
...ers/ecr-viewer/src/app/api/save-fhir-data/route.ts 76.19% <100.00%> (ø)
...c/app/api/save-fhir-data/save-fhir-data-service.ts 50.00% <100.00%> (+3.52%) ⬆️
containers/ecr-viewer/src/app/api/utils.ts 100.00% <ø> (ø)
.../ecr-viewer/src/app/services/listEcrDataService.ts 74.03% <ø> (ø)

... and 139 files with indirect coverage changes

@@ -3,7 +3,6 @@ CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE ecr_data (
eICR_ID VARCHAR(200) PRIMARY KEY,
set_id VARCHAR(255),
data_source VARCHAR(2), -- S3 or DB
Copy link
Collaborator

Choose a reason for hiding this comment

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

not really a question on this PR, but more generally. When we make a schema change like this, what's the migration plan for users?

values: [
ecrId,
metadata.last_name,
metadata.first_name,
metadata.birth_date,
"DB",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm trying to follow along on what this was doing in the first place. Was this correct? Couldn't we have saved the data to an S3 bucket, but saved the metadata to postgres?

Copy link
Collaborator

Choose a reason for hiding this comment

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

also, why don't I see a similar change in the sql server code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this was supposed to define where to find the FHIR_DATA for the ecr-viewer (s3 or azure blob), but we only have ever supported fetching the data from a single source.

For your second question, this is only affects postgres because the CORE schema only supports postgres.

@austin-hall-skylight, do you have any thoughts about keeping the data_source variable?

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.

Remove saving fhir bundles to postgres
2 participants