CDCgov / RecordLinker

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.
https://cdcgov.github.io/RecordLinker/
Apache License 2.0
2 stars 0 forks source link

Separate transformer and matching functions #9

Closed ericbuckley closed 1 month ago

ericbuckley commented 2 months ago

Summary

Create new modules, linkage/transformers.py and linkage/matchers.py, to store the functions referenced in the algorithms.py module.

Acceptance Criteria

Background / Context

This is not just about making the code reusable to test out the new schema, but also making it easier to read, and setting ourselves up for more flexibility in the future. When reading the algorithms.py module, its not obvious which are strings and what are references to function names. Furthermore, the strings that are references to functions, its not clear as to where those functions are defined. Moving the code to two modules, based on its use cases, will be the first step in clearing up some ambiguity around how its being used in the algorithm configuration.