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

Bulk Upload Fhir Conversion #5511

Merged
merged 3 commits into from
Mar 27, 2023
Merged

Bulk Upload Fhir Conversion #5511

merged 3 commits into from
Mar 27, 2023

Conversation

DanielSass
Copy link
Collaborator

@DanielSass DanielSass commented Mar 23, 2023

BACKEND PULL REQUEST

Related Issue

Changes Proposed

  • Add functionality to create FHIR Bundles from the Test Result Bulk Upload csv"

Testing

I did some manual testing with very large files just to verify how things behave. I did this with repeated records (5 records copied and pasted until we had x# in the file) so it's not particularly prod-like. Might look at writing a quick python script to generate data with faker or something like that in the future.

For context: 9999 records is the most the front end will let you submit. I believe looking at metabase the largest file uploads we've seen in prod are ~4000 records. The overwhelming majority are under ~2000 records.

Of note - these timings don't include the report stream interaction, and for larger files I've noticed this is significant - at least for local dev.

Execution time pre-async

Execution time for conversion: 9325 milliseconds
2225 Records converted.
Execution time for parse: 1193 milliseconds

Execution time for conversion: 23478 milliseconds
5000 Records converted.
Execution time for parse: 2703 milliseconds

Execution time for conversion: 50486 milliseconds
9999 Records converted.
Execution time for parse: 5427 milliseconds

Execution time post-async

Execution time for conversion & parse: 1708 milliseconds
2500 Records converted.

Execution time for conversion & parse: 1920 milliseconds
5000 Records converted.

Execution time for conversion & parse: 3790 milliseconds
9998 Records converted.

@DanielSass DanielSass force-pushed the dan/5069-csv-to-fhir branch 2 times, most recently from de393cf to 92bc204 Compare March 24, 2023 15:53
pr feedback

async fhir conversion + processing for bulk upload

updating test

bulk upload fhir conversion
fhir conversion -> async

adding new fields

error handling around interupt exceptions
@DanielSass DanielSass force-pushed the dan/5069-csv-to-fhir branch from 92bc204 to 0098bba Compare March 24, 2023 19:06
@DanielSass DanielSass requested a review from BobanL March 24, 2023 19:41
@DanielSass DanielSass marked this pull request as ready for review March 24, 2023 19:41
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

82.4% 82.4% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@zdeveloper zdeveloper left a comment

Choose a reason for hiding this comment

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

LGTM! thank you for putting this together, would love to see a test that has a csv input file and an expected bundle.ndjson file (could be added in future PR since this is a foundational pr)

Copy link
Contributor

@BobanL BobanL left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks 😃

@DanielSass DanielSass merged commit fcd7098 into main Mar 27, 2023
@DanielSass DanielSass deleted the dan/5069-csv-to-fhir branch March 27, 2023 15:38
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.

3 participants