generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(linking): implement possible match short-term (#111)
## Description * Implement Possible Match using short-term approach: Apply a user-configurable range to the Belongingness Ratio threshold. * To support Possible Match, update Link API response as follows: **Example:** `belongingness_ratio=[0.75, 0.9]` **No Match** ``` { "patient_reference_id": "5a12bf00-16f8-4c03-b980-81d3f5ff6db6", "person_reference_id": "b104942e-6327-4643-801a-5fb22cb621c4", # New Person ID "results": [] } ``` **Possible Match** ``` { "patient_reference_id": "c5fcfc39-a915-4b65-afc7-b681c892652e", "person_reference_id": None, "results": [ { "person_reference_id": "bf27f9f2-2882-4e6f-9db9-6a916679cff7", "belongingness_ratio": 0.8 } ] } ``` **Match** `include_multiple_matches=false` ``` { "patient_reference_id": "2eb14d86-217f-45c3-a528-d038e7eadce7", "person_reference_id": "6abb63cb-6c31-4142-bdbf-8b2956dab1c1", "results": [ { "person_reference_id": "6abb63cb-6c31-4142-bdbf-8b2956dab1c1", "belongingness_ratio": 0.98 }, ] } ``` **Match** `include_multiple_matches=true` ``` { "patient_reference_id": "2eb14d86-217f-45c3-a528-d038e7eadce7", "person_reference_id": "6abb63cb-6c31-4142-bdbf-8b2956dab1c1", # Person ID with highest Belongingness Ratio "results": [ { "person_reference_id": "6abb63cb-6c31-4142-bdbf-8b2956dab1c1", "belongingness_ratio": 0.98 }, { "person_reference_id": "8acf6104-d633-4516-8c7f-2c6e88a8ceae", "belongingness_ratio": 0.8 }, ] } ``` ## Related Issues #91 ## Additional Notes * Rename `cluster_ratio` -> `belongingness_ratio` for clarity * Move `belongingness_ratio` definition from `AlgorithmPass` to `Algorithm` level (this was the DIBBs team's original intent) * Add user-configurable `Algorithm.include_multiple_matches` boolean parameter to return multiple matches * Given `belongingness_ratio=[X, Y], if `Algorithm.include_multiple_matches=true`, return all `results` where `belongingness_ratio >= X]. Assign `person_reference_id` of Person with highest Belongingness Ratio. * Add test coverage for * Possible Match result (Basic, Enhanced Algorithm) * New Link API response (`LinkResponse`, `LinkFhirResponse`) * Include multiple matches or not (`Algorithm.include_multiple_matches`) * Add new test patient bundle assets for above coverage --------- Co-authored-by: Eric Buckley <[email protected]> Co-authored-by: cbrinson-rise8 <[email protected]>
- Loading branch information
1 parent
379cd47
commit 1775e79
Showing
20 changed files
with
1,191 additions
and
291 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
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
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.