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

Update Record Linkage Container to utilize and make the external person id accessible #599

Merged
merged 38 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
55f27cf
Added functionality - and organized it in it's own function - to add/…
BradySkylight May 18, 2023
61d62fb
Updated new insert person function to return a bool of a matched reco…
BradySkylight May 18, 2023
ac41235
Made some updates to the return values as well as adding tests for th…
BradySkylight May 18, 2023
3bc6b1f
Update test_postgres_mpi_connector.py
BradySkylight May 18, 2023
09b9a26
Update postgres.py
BradySkylight May 18, 2023
d1a96be
Update postgres.py
BradySkylight May 18, 2023
853d133
Update test_postgres_mpi_connector.py
BradySkylight May 18, 2023
4ad2dae
Fixed test and description for record-linkage
BradySkylight May 18, 2023
e3c9ed5
Update postgres.py
BradySkylight May 18, 2023
95a2455
Update postgres.py
BradySkylight May 18, 2023
3e32777
Update test_postgres_mpi_connector.py
BradySkylight May 19, 2023
42a84e8
Update test_postgres_mpi_connector.py
BradySkylight May 19, 2023
169ce59
Update postgres.py
BradySkylight May 19, 2023
129f170
Update postgres.py
BradySkylight May 19, 2023
e23fec6
Update test_postgres_mpi_connector.py
BradySkylight May 19, 2023
be83782
Added Parameters to the linkage container and underlying code to acce…
BradySkylight May 19, 2023
1869e45
Update main.py
BradySkylight May 19, 2023
c1d477e
Update main.py
BradySkylight May 19, 2023
4fa5671
Update main.py
BradySkylight May 19, 2023
d03772b
Update main.py
BradySkylight May 19, 2023
bbce9fd
Remove print statements and fixed a major bug in the update statement
BradySkylight May 19, 2023
19c5697
Update phdi/linkage/postgres.py
BradySkylight May 19, 2023
d5f1483
Update postgres.py
BradySkylight May 19, 2023
0314407
Merge branch 'brady/add-external-person-id-mpi-seeding' of https://gi…
BradySkylight May 19, 2023
3aa6a15
Update postgres.py
BradySkylight May 19, 2023
bd60f95
fixed test
BradySkylight May 19, 2023
c30ce17
Update postgres.py
BradySkylight May 19, 2023
46c84a0
Update postgres.py
BradySkylight May 19, 2023
b423244
Update postgres.py
BradySkylight May 19, 2023
1429d48
Update postgres.py
BradySkylight May 19, 2023
f1678f2
Update postgres.py
BradySkylight May 19, 2023
46d97df
Update test_postgres_mpi_connector.py
BradySkylight May 19, 2023
ac55731
Update postgres.py
BradySkylight May 19, 2023
75112d4
removed print statements
BradySkylight May 19, 2023
f4059bb
Update main.py
BradySkylight May 19, 2023
539a079
Merge branch 'main' into brady/add-external-person-id-mpi-seeding
BradySkylight May 19, 2023
1bb206d
REmoved comment and pointed container to main
BradySkylight May 19, 2023
d4022b3
Update Dockerfile
BradySkylight May 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions containers/record-linkage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ FROM python:3.10-slim

WORKDIR /code

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
8 changes: 2 additions & 6 deletions containers/record-linkage/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ async def link_record(input: LinkRecordInput, response: Response) -> LinkRecordR

input = dict(input)
input_bundle = input.get("bundle", {})
# TODO: Once the code that includes the external_person_id in
# the sdk is merged, then bring back the external_id code here
# external_id = input.get("external_person_id", None)
external_id = input.get("external_person_id", None)

# Check that DB type is appropriately set up as Postgres so
# we can fail fast if it's not
Expand Down Expand Up @@ -203,12 +201,10 @@ async def link_record(input: LinkRecordInput, response: Response) -> LinkRecordR

# Initialize a DB connection for use with the MPI
# Then, link away
# TODO: Once the code that includes the external_person_id in
# the sdk is merged, then bring back the external_id code here
try:
db_client = connect_to_mpi_with_env_vars()
(found_match, new_person_id) = link_record_against_mpi(
record_to_link, algo_config, db_client # , external_id
record_to_link, algo_config, db_client, external_id
)
updated_bundle = add_person_resource(
new_person_id, record_to_link.get("id", ""), input_bundle
Expand Down
2 changes: 1 addition & 1 deletion containers/record-linkage/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fastapi
uvicorn
phdi
phdi @ git+https://github.com/CDCgov/phdi@main
httpx
pathlib
pydantic