generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Create a new API endpoint, /link, that behaves similar to the existing /link-record endpoint. The difference is that it will accept a raw PII payload rather than a FHIR bundle. ## Related Issues closes #5 ## Additional Notes Overview of changes - Adds a new endpoint `/link` - Adds tests for new endpoint - updates `src.recordlinker.linking.link.link_record_against_mpi` function to accept a `schemas.PIIRecord` instead of a FHIR bundle. - `src.recordlinker.linking.link.link_record_against_mpi` now returns a `patient_reference_id` in addition to the other values in the returned tuple - Adds `patient_reference_id` column to `patient` mpi table - Renames `internal_id` column to `person_reference_id` in the `person` mpi table
- Loading branch information
1 parent
cbe8c78
commit 327d2f8
Showing
8 changed files
with
382 additions
and
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,8 @@ coverage: | |
default: | ||
target: 90% | ||
threshold: 10% | ||
patch: | ||
default: | ||
target: 90% | ||
threshold: 10% | ||
|
34 changes: 34 additions & 0 deletions
34
alembic/versions/fb1b1ba0ad1f_add_reference_id_to_person_and_patient.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""add reference_id to person and patient | ||
Revision ID: fb1b1ba0ad1f | ||
Revises: a30b8bbccfdf | ||
Create Date: 2024-10-15 14:57:00.688268 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'fb1b1ba0ad1f' | ||
down_revision: Union[str, None] = 'a30b8bbccfdf' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('mpi_patient', sa.Column('reference_id', sa.Uuid(), nullable=False)) | ||
op.add_column('mpi_person', sa.Column('reference_id', sa.Uuid(), nullable=False)) | ||
op.drop_column('mpi_person', 'internal_id') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('mpi_person', sa.Column('internal_id', sa.CHAR(length=32), nullable=False)) | ||
op.drop_column('mpi_person', 'reference_id') | ||
op.drop_column('mpi_patient', 'reference_id') | ||
# ### end Alembic commands ### |
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.