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

Under certain contains Create Mode can lead to duplicate patient records #188

Closed
dustinburson opened this issue Apr 22, 2022 · 1 comment

Comments

@dustinburson
Copy link
Member

Currently the IoMT Connector publishes normalized data to partitions by device id. If a new patient's data for two different devices arrives at the exact same time the creates on the patient will be issued concurrently potentially leading to duplicate patient records sharing the same identifier.

See #183 and #186 for more details.

dustinburson added a commit that referenced this issue Jul 14, 2023
Switch device and patient logic to use deterministic ids based on the identifiers. Instead of using Create so the service sets the resource id, the id will be set and the Update path used (necessary per FHIR spec to set the resource id).  Logic now mirrors a recent change made to Observations.

- Added unit tests ResourceManagementService.
- Added additional test helper extensions for IFhirService mocks for common test scenarios.
- Updated R4DeviceAndPatientCreateIdentityServiceTests to validate ids generated for resources are dervied from the identifier as expected.
- Refactored SHA256HashGenerator to an extension method and renamed file to match other extension method files.
dustinburson added a commit that referenced this issue Jul 14, 2023
dustinburson added a commit that referenced this issue Jul 14, 2023
Switch device and patient logic to use deterministic ids based on the identifiers. Instead of using Create so the service sets the resource id, the id will be set and the Update path used (necessary per FHIR spec to set the resource id).  Logic now mirrors a recent change made to Observations.

- Added unit tests ResourceManagementService.
- Added additional test helper extensions for IFhirService mocks for common test scenarios.
- Updated R4DeviceAndPatientCreateIdentityServiceTests to validate ids generated for resources are dervied from the identifier as expected.
- Refactored SHA256HashGenerator to an extension method and renamed file to match other extension method files.
@dustinburson
Copy link
Member Author

Fixed in #285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant