Skip to content

Add Address feature for comparisons#61

Merged
ericbuckley merged 5 commits into
mainfrom
feature/24-add-address-feature
Oct 3, 2024
Merged

Add Address feature for comparisons#61
ericbuckley merged 5 commits into
mainfrom
feature/24-add-address-feature

Conversation

@ericbuckley

@ericbuckley ericbuckley commented Oct 2, 2024

Copy link
Copy Markdown
Collaborator

Description

Adding the ability to compare on address line and also create blocking keys on it. Also making a few testing changes and fixing bugs to make the code ready for #24.

Related Issues

#24

Additional Notes

Mypy fixes

  • Updated type annotations in compare function to use models.Feature instead of models.FEATURE. (src/recordlinker/linking/link.py)
  • Changed the comparison result type from bool to float to allow for more granular matching results. (src/recordlinker/linking/link.py)

Improvements to Patient class:

  • Introduced a setter for the data property to update the internal state and clear the cached record. (src/recordlinker/models/mpi.py)
  • Modified the record property and its setter to use model_construct for creating PIIRecord objects, enhancing data handling and validation. (src/recordlinker/models/mpi.py)

New features:

  • Added ADDRESS as a new BlockingKey to support blocking based on the first four characters of the address. (src/recordlinker/models/mpi.py)
  • Implemented logic for the ADDRESS blocking key in the to_value method. (src/recordlinker/models/mpi.py)

<--------------------- 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.
  • I have notified teammates in the review thread to build awareness.

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.

@ericbuckley ericbuckley self-assigned this Oct 2, 2024
@ericbuckley ericbuckley linked an issue Oct 2, 2024 that may be closed by this pull request
2 tasks
@ericbuckley ericbuckley added the api New API feature label Oct 2, 2024
@ericbuckley ericbuckley marked this pull request as ready for review October 2, 2024 18:32

@cbrinson-rise8 cbrinson-rise8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

@ericbuckley ericbuckley merged commit 2684280 into main Oct 3, 2024
@ericbuckley ericbuckley deleted the feature/24-add-address-feature branch October 3, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api New API feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parameterize main for different schemas

2 participants