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

bugfix: bulk insert serialization of data #136

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

ericbuckley
Copy link
Collaborator

@ericbuckley ericbuckley commented Nov 19, 2024

Description

Data can be inserted when linking or seeding, in the former we were inserting the data as a dictionary into the Patient.data column, however in the latter we inserted the data as a string. This causes issues on subsequent reads when using the data.

The call to convert the PIIRecord into a value for the database has been standardized in PIIRecord.to_dict(), and the bulk insert method (which is used in the seeding process) has been updated to use this method.

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

Data can be inserted when linking or seeding, in the former we were
inserting the data as a dictionary into the Patient.data column, however
in the latter we inserted the data as a string.  This causes issues on
subsequent reads when using the data.

The call to convert the PIIRecord into a value for the database has been
standardized in PIIRecord.to_dict(), and the bulk insert method (which
is used in the seeding process) has been updated to use this method.
@ericbuckley ericbuckley self-assigned this Nov 19, 2024
@ericbuckley ericbuckley added the bug Something isn't working label Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.47%. Comparing base (7bd7b09) to head (929fcfb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #136   +/-   ##
=======================================
  Coverage   95.46%   95.47%           
=======================================
  Files          31       31           
  Lines        1411     1414    +3     
=======================================
+ Hits         1347     1350    +3     
  Misses         64       64           

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


🚨 Try these New Features:

@ericbuckley ericbuckley marked this pull request as ready for review November 19, 2024 20:29
Copy link
Contributor

@alhayward alhayward left a comment

Choose a reason for hiding this comment

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

LGTM. Nice catch! @cbrinson-rise8

@ericbuckley ericbuckley merged commit 3182485 into main Nov 19, 2024
14 checks passed
@ericbuckley ericbuckley deleted the fix/seed-serialize-data branch November 19, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants