-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use imaging UID from OMOP-ES extract (#469)
* Add study uid to columns declaration * Add study UID as part of the message info * Query VNA with UID, fall back to MRN + accession number if not found * Add study UID to test data * Deal with ruff and mypy warnings * Test that VNA querying falls back to MRN + acc number if UID not found * Refactor `anonymise_dicom`; move database updating out of `_anonymise_dicom_from_scheme()` Avoids requiring `study_info` arg in `_anonymise_dicom_from_scheme()` and limiting its responsibilities * Query PIXL DB with study UID * Be more explicit about where study info values are coming from Avoids magic values that might cause confusion about where they're coming from. * Rename `row_for_dicom_testing` and be more explicit where its values come from * Update tests with new fixtures * Add study UID to PIXL DB Image model * Add study UIDs in `pixl_dcmd` test fixtures * Fix tests * Run alembic migration * Also filter out entries where accession number is empty string * Add study UID column to test files * Also add study UID when uploading images to PIXL DB * Add study UIDs in cli test data * Refactor core tests: add `mock_message` fixture and add study UID * Need `study_uid` here as well * This test file also needs a study UID column * Fall back to MRN + accession number when querying PIXL DB * Fix the study UID for the system test studies to match what is in the extracts * Add test for `get_unexported_image` fallback * Fix fallback with try-except `sqlalchemy` actually does raise an error when `.one()` doesn't return anything. * Test querying an existing pseudo study UID * Fix docstrings Co-authored-by: Stef Piatek <[email protected]> * Make `study_uid` column nullable Co-authored-by: Stef Piatek <[email protected]> * Make `study_uid` optional in PIXL DB --------- Co-authored-by: Stef Piatek <[email protected]>
- Loading branch information
1 parent
6eb8750
commit bd82c65
Showing
27 changed files
with
386 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.