The RecordLinker is a service that links records from two datasets based on a set of common attributes. The service is designed to be used in a variety of public health contexts, such as linking patient records from different sources or linking records from different public health surveillance systems.
Add the get_block_data and insert_matched_patient functions to a new module, data_access.py for the new schema.
Acceptance Criteria
[ ] Implementations of the above functions
[ ] Unit tests for the above functions to show it works as expected
Details / Tasks
No need to use the existing function signatures for the reimplementation, as there are some readability issues with passing nested lists; going forward, use these signatures
When inserting a patient, abstract the functions necessary for creating the patient row along with creating new blocking keys. Its likely with this design that we'll need a way to generate new blocking keys when an algorithm changes, so keeping that functionality separate will open doors for future expansion.
Summary
Add the
get_block_data
andinsert_matched_patient
functions to a new module,data_access.py
for the new schema.Acceptance Criteria
Details / Tasks
No need to use the existing function signatures for the reimplementation, as there are some readability issues with passing nested lists; going forward, use these signatures
Notes / Comments
When inserting a patient, abstract the functions necessary for creating the patient row along with creating new blocking keys. Its likely with this design that we'll need a way to generate new blocking keys when an algorithm changes, so keeping that functionality separate will open doors for future expansion.