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

Expand Feature Comparison Support #88

Merged
merged 8 commits into from
Oct 29, 2024

Conversation

cbrinson-rise8
Copy link
Contributor

@cbrinson-rise8 cbrinson-rise8 commented Oct 18, 2024

Description

NBS has requested that we add additional fields for feature comparisons. We won't need to block on any of these features, but we do need to have the ability to compare them in the second half of the algorithm.

Related Issues

closes #55

Additional Notes

  • Add the following values to recordlinker.models.pii.PIIRecord
  • Add the above 3 to recordlinker.models.pii.Feature, and additionally add 3 more
    • Telephone
    • Suffix
    • County
  • Rename recordlinker.models.pii.PIIRecord.field_iter to recordlinker.models.pii.PIIRecord.feature_iter
  • Update recordlinker.models.pii.PIIRecord.field_iter to extract the 6 features above
  • Update recordlinker.linking.fhir_record_to_pii_record to extract the 6 features from a FHIR payload
  • Add documentation to the docs/ directory to explain the process of adding a new Feature

HL7 FHIR resources

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

@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/expand-feature-comparisons branch from 7217829 to a61168c Compare October 18, 2024 16:34
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 94.82759% with 6 lines in your changes missing coverage. Please review.

Project coverage is 94.58%. Comparing base (0000ec5) to head (8782349).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/recordlinker/linking/link.py 50.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   94.24%   94.58%   +0.34%     
==========================================
  Files          21       21              
  Lines        1025     1146     +121     
==========================================
+ Hits          966     1084     +118     
- Misses         59       62       +3     

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

@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/expand-feature-comparisons branch from a61168c to c85b6b9 Compare October 18, 2024 17:26
@cbrinson-rise8 cbrinson-rise8 self-assigned this Oct 18, 2024
@cbrinson-rise8 cbrinson-rise8 added the feature New feature or request label Oct 18, 2024
@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/expand-feature-comparisons branch 3 times, most recently from f1152ab to bf812a2 Compare October 22, 2024 18:34
@cbrinson-rise8 cbrinson-rise8 marked this pull request as ready for review October 22, 2024 19:32
@ericbuckley ericbuckley mentioned this pull request Oct 24, 2024
3 tasks
Copy link
Contributor

@alhayward alhayward left a comment

Choose a reason for hiding this comment

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

Nice work! Left two questions & a suggestion. I also left two clarifying questions on the Related Issue #55.

@cbrinson-rise8
Copy link
Contributor Author

cbrinson-rise8 commented Oct 28, 2024

@ericbuckley @alhayward I adjusted the race and gender parsers to handle anything that doesn't map easily to just be either unknown or other. This is mainly to handle any values that aren't a part of these:
(8 races) https://www.hl7.org/fhir/us/core/ValueSet-omb-race-category.html
(5 genders) https://terminology.hl7.org/5.5.0/ValueSet-gender-identity.html

Do y'all think this is sufficient for now? Otherwise my thought was to just make the race field a string instead of an enum since there could be many different values depending on the data source.

code:
https://github.com/CDCgov/RecordLinker/pull/88/files#:~:text=%40pydantic.field_validator(%22race,return%20Race.OTHER

@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/expand-feature-comparisons branch from acbec9d to 92364db Compare October 28, 2024 14:54
@cbrinson-rise8 cbrinson-rise8 force-pushed the feat/expand-feature-comparisons branch from 92364db to 9cf0c53 Compare October 28, 2024 14:54
ericbuckley
ericbuckley previously approved these changes Oct 28, 2024
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.

Thanks for all the extra tests, that really helped clear up questions I had about behavior.

@cbrinson-rise8 cbrinson-rise8 merged commit 2533adb into main Oct 29, 2024
10 checks passed
@cbrinson-rise8 cbrinson-rise8 deleted the feat/expand-feature-comparisons branch October 29, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand support for feature comparisons
3 participants