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

Implement Conditional Delete #2803

Open
rahul1 opened this issue Sep 9, 2023 — with Slack · 1 comment
Open

Implement Conditional Delete #2803

rahul1 opened this issue Sep 9, 2023 — with Slack · 1 comment
Labels
fhir-datastore Related to the FHIR datastore, includes API and FHIR operations

Comments

Copy link
Member

rahul1 commented Sep 9, 2023

User Driven: https://discord.com/channels/905144809105260605/1146114778239078501/1146114778239078501

Use Case

When testing on localhost / a developer project, users often want to "reset" their project by clearing out groups of resources. Currently, the only way to do this is to query all the resources to get their IDs, and then to create a batch request to delete each resource individuall

Proposal

The FHIR spec allows for deleting all resources according to a search query, known as conditional delete

@codyebberson
Copy link
Member

This is a good feature request.

The trick will be finding a way to do it performantly. In theory, it should be as simple as DELETE FROM "Patient" WHERE [...], but we do soft deletes and maintain the history table, so this will be O(n) queries :/

@reshmakh reshmakh added the fhir-datastore Related to the FHIR datastore, includes API and FHIR operations label Sep 17, 2023
@rahul1 rahul1 added this to the Milestone Quality milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fhir-datastore Related to the FHIR datastore, includes API and FHIR operations
Projects
Status: No status
Development

No branches or pull requests

3 participants