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

Address Issue 188 #285

Merged

Conversation

dustinburson
Copy link
Member

@dustinburson dustinburson commented Jul 14, 2023

Address Github issue #188

Support deterministic device and patient ids in create mode to avoid duplicates.

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 for ResourceManagementService.
  • Added additional test helper extensions for IFhirService mocks for common test scenarios.
  • Updated R4DeviceAndPatientCreateIdentityServiceTests to validate ids generated for resources are derived from the identifier as expected.
  • Refactored SHA256HashGenerator to an extension method and renamed file to match other extension method files.

…ice to verify existing code path before introducing changes.
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 dustinburson requested a review from a team as a code owner July 14, 2023 16:55
@dustinburson dustinburson merged commit 749542f into main Jul 14, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants