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.
Create a new API endpoint, /link, that behaves similar to the existing /link-record endpoint. The difference is that it will accept a raw PII payload rather than a FHIR bundle.
Acceptance Criteria
[x] A new API endpoint /link that returns matches
[x] Renaming the person.internal_id column
[x] Adding the patient.reference_id column
[x] Test cases for the new API
Details / Tasks
Inputs
The new endpoint should accept the other parameters like external_person_id and algorithm, the new record parameter should map to the PIIRecord class. That is the PIIRecord class should act as a validator and serializer for the incoming data.
Outputs
The output will be different in that we will no longer return a FHIR bundle. Instead a payload should be returned with the following information.
is_match: bool
patient_reference_id: uuid
person_reference_id: uuid
Model Changes
rename person.internal_id to person.reference_id
add patient.reference_id to the Patient table (uuid with a default value of uuid.uuid4())
Summary
Create a new API endpoint,
/link
, that behaves similar to the existing/link-record
endpoint. The difference is that it will accept a raw PII payload rather than a FHIR bundle.Acceptance Criteria
/link
that returns matchesperson.internal_id
columnpatient.reference_id
columnDetails / Tasks
Inputs
The new endpoint should accept the other parameters like external_person_id and algorithm, the new record parameter should map to the PIIRecord class. That is the PIIRecord class should act as a validator and serializer for the incoming data.
Outputs
The output will be different in that we will no longer return a FHIR bundle. Instead a payload should be returned with the following information.
Model Changes