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

ID Triplet Feature #146

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

ID Triplet Feature #146

wants to merge 6 commits into from

Conversation

cbrinson-rise8
Copy link
Collaborator

@cbrinson-rise8 cbrinson-rise8 commented Dec 2, 2024

Description

  • Implemenet the ID Triplet as described in RFC-001
  • Replace MRN, SSN and DRIVERS_LICENSE with the new IDENTIFIER triplet concept introduced in RFC-001.

Related Issues

closes #125

Additional Notes

  • Update the /link endpoint to accept an identifier triplet
  • Create blocking values on IDENTIFIER values
  • Feature match on IDENTIFIER and/or IDENTIFIER:XXX values
  • Add new test cases for blocking and feature matching on the new values
  • Update documentation in references.md regarding the new blocking key and feature

<--------------------- 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.

@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/id-triplet branch 3 times, most recently from 9bee5d0 to 5ebabcd Compare December 16, 2024 19:30
@ericbuckley ericbuckley linked an issue Dec 16, 2024 that may be closed by this pull request
5 tasks
@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/id-triplet branch 2 times, most recently from e2a9f43 to a9bb607 Compare December 17, 2024 17:57
@cbrinson-rise8 cbrinson-rise8 self-assigned this Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 99.59514% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.46%. Comparing base (b1cdc7d) to head (16f8aaa).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/recordlinker/schemas/identifier.py 99.40% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
+ Coverage   97.21%   97.46%   +0.25%     
==========================================
  Files          30       31       +1     
  Lines        1328     1501     +173     
==========================================
+ Hits         1291     1463     +172     
- Misses         37       38       +1     

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

@cbrinson-rise8 cbrinson-rise8 marked this pull request as ready for review December 18, 2024 15:06
Copy link
Collaborator

@ericbuckley ericbuckley left a comment

Choose a reason for hiding this comment

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

Good start @cbrinson-rise8

docs/site/reference.md Outdated Show resolved Hide resolved
docs/site/reference.md Outdated Show resolved Hide resolved
src/recordlinker/assets/initial_algorithms.json Outdated Show resolved Hide resolved
src/recordlinker/assets/initial_algorithms.json Outdated Show resolved Hide resolved
src/recordlinker/hl7/fhir.py Outdated Show resolved Hide resolved
src/recordlinker/schemas/identifier.py Outdated Show resolved Hide resolved
src/recordlinker/schemas/pii.py Outdated Show resolved Hide resolved
src/recordlinker/schemas/pii.py Outdated Show resolved Hide resolved
src/recordlinker/schemas/pii.py Outdated Show resolved Hide resolved
@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/id-triplet branch 2 times, most recently from 13db043 to e42578f Compare January 8, 2025 17:09
@@ -51,7 +51,7 @@ def compare(
details: dict[str, typing.Any] = {"patient.reference_id": str(patient.reference_id)}
for e in evals:
# TODO: can we do this check earlier?
feature = getattr(schemas.Feature, e.feature, None)
feature = schemas.Feature.parse(e.feature)
Copy link
Collaborator

Choose a reason for hiding this comment

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

calling the parse method here means we have to evaluate the string every time we run a feature comparison, which can add up. If we do it in say the bound_evaluators call, we only have to do it once per request. I know that simple change would create a model->schema dependency which isn't ideal, but can you think of another way to do this earlier in the stack?

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.

id triplet feature
2 participants