Skip to content

chore: update seed-script to use new ecr viewer processing endpoint #551

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

Merged
merged 24 commits into from
Apr 9, 2025

Conversation

lina-roth
Copy link
Collaborator

@lina-roth lina-roth commented Mar 20, 2025

PULL REQUEST

chore: update seed-script to use new ecr viewer processing endpoint

Summary

  • Update seed data script to zip test files and hit ecr viewer (previously hit orchestration)

Related Issue

Fixes #36

Acceptance Criteria

[ ] All actions, tests, scripts, etc that previously used the /process-zip endpoint on orchestration use the new processing endpoint on the eCR Viewer

@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.47%. Comparing base (8527003) to head (2b57eee).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #551      +/-   ##
==========================================
+ Coverage   87.61%   91.47%   +3.85%     
==========================================
  Files         250      115     -135     
  Lines       13501     4598    -8903     
  Branches      777      777              
==========================================
- Hits        11829     4206    -7623     
+ Misses       1664      384    -1280     
  Partials        8        8              
Flag Coverage Δ
ecr-viewer 94.16% <ø> (ø)
fhir-converter ?
ingestion ?
message-parser ?
message-refiner ?
orchestration 85.17% <ø> (ø)
record-linkage ?
trigger-code-reference ?
validation ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

description="Convert eICR and RR files to FHIR bundles and insert them into the database.",
epilog="For each directory in baseECR the script will look for a `CDA_eICR.xml` and `CDA_RR.xml` file. If they are found, it will convert them into a FHIR bundle (saved as `bundle.json`) and insert that into the database using the Orchestration service.",
)
parser.add_argument(
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there any way for process-zip to skip convert? and/or does it always skip convert if there's already a bundle?

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 think that ecr-viewer process-zip is only meant to process eicr/rr and does not accept bundle.json anymore

Copy link
Collaborator

Choose a reason for hiding this comment

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

@JNygaard-Skylight will that cause any issues? I think you were the one who added the skipping

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be convenient for development and troubleshooting if there were a way to import already converted JSON bundles, especially if we ever get back to having hundreds of eICRs in our development environment. That said, I do not think it is vital.

Copy link
Collaborator

@JNygaard-Skylight JNygaard-Skylight left a comment

Choose a reason for hiding this comment

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

Looks good to me.

description="Convert eICR and RR files to FHIR bundles and insert them into the database.",
epilog="For each directory in baseECR the script will look for a `CDA_eICR.xml` and `CDA_RR.xml` file. If they are found, it will convert them into a FHIR bundle (saved as `bundle.json`) and insert that into the database using the Orchestration service.",
)
parser.add_argument(
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be convenient for development and troubleshooting if there were a way to import already converted JSON bundles, especially if we ever get back to having hundreds of eICRs in our development environment. That said, I do not think it is vital.


import grequests

URL = "http://orchestration-service:8080"
UPLOAD_URL = "http://0.0.0.0:3000/ecr-viewer/api/process-zip"
Copy link
Collaborator

Choose a reason for hiding this comment

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

have you tried using docker.host.internal?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've tried host.docker.internal if that's what you meant.

@austin-hall-skylight austin-hall-skylight added this pull request to the merge queue Apr 9, 2025
Merged via the queue into main with commit b9d6cb4 Apr 9, 2025
17 checks passed
@austin-hall-skylight austin-hall-skylight deleted the lr/seed-data branch April 9, 2025 20:40
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.

Update seed-script and tests to use new Viewer processing endpoint
6 participants