-
Notifications
You must be signed in to change notification settings - Fork 523
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
Adds $purge-history operation #2022
Conversation
// Delete the resource. | ||
await _client.DeleteAsync($"{nameof(Observation)}/{resourceId}/$purge"); | ||
|
||
// Subsequent read on the resource should return Gone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't match the check that is happening after it. It looks like you are checking that the version id from a read matches the updated resource.
There are tests for soft and hard delete in multiple test files. Do you think it is worthwhile to add purge to these test files as well? |
@@ -58,6 +58,9 @@ internal class KnownRoutes | |||
public const string Everything = "$everything"; | |||
public const string PatientEverythingById = "Patient/" + IdRouteSegment + "/" + Everything; | |||
|
|||
public const string Purge = "$purge"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this suggestion :) PurgeHistory makes more sense to me too.
src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlServerFhirDataStore.cs
Outdated
Show resolved
Hide resolved
9712203
to
16c409d
Compare
src/Microsoft.Health.Fhir.SqlServer/Features/Schema/SchemaVersionConstants.cs
Outdated
Show resolved
Hide resolved
b8c8367
to
8f0e3e1
Compare
8f0e3e1
to
9f971f8
Compare
@@ -58,6 +58,9 @@ internal class KnownRoutes | |||
public const string Everything = "$everything"; | |||
public const string PatientEverythingById = "Patient/" + IdRouteSegment + "/" + Everything; | |||
|
|||
public const string PurgeHistory = "$purge-history"; | |||
public const string PurgeHistoryResourceTypeById = ResourceTypeById + "/" + PurgeHistory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I mentioned that we should look at making operations a little simpler to add :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were they made simpler to add? What is the minimum required to add an operation, if all of the FHIR resources are available?
When asking the question I was pointed here. But this seems to have additional changes that may not be required for other operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Adds support for
$purge-history
which can remove previous versions of a resource. This operation has been implemented as a variation ofhard-delete
since it is permanently removing data.Related issues
Addresses [issue #].
Testing
Adds E2E tests
FHIR Team Checklist
Semver Change (docs)
Patch