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

Support for DELETing resources via batch operations #2058

Open
chgl opened this issue Aug 15, 2024 · 1 comment
Open

Support for DELETing resources via batch operations #2058

chgl opened this issue Aug 15, 2024 · 1 comment

Comments

@chgl
Copy link
Collaborator

chgl commented Aug 15, 2024

Currently, "Only update requests are supported for use within the batch operation" (https://github.com/aehrc/pathling/blob/main/fhir-server/src/main/java/au/csiro/pathling/update/BatchProvider.java#L109-L110). It would be great if resources could also be deleted.

For an initial version of this feature, it might be sufficient to only support batch bundles that exclusively contain either DELETE or PUT requests.

Looking at the logic in https://github.com/aehrc/pathling/blob/main/fhir-server/src/main/java/au/csiro/pathling/update/BatchProvider.java it doesn't seem too difficult to implement, so I'd definitely be interested in contributing - unless its already on the roadmap anyways :)

@johngrimes
Copy link
Member

Hi @chgl,

Sure, we'd be happy to accept your contributions!

It would be good to implement both the DELETE operation for individual resources, and DELETE within batch.

Probably the best way to do it would be to add a couple of methods to au.csiro.pathling.io.Database, something like:

  • public void delete(@Nonnull final ResourceType resourceType, @Nonnull final IBaseResource resource)
  • public void delete(@Nonnull final ResourceType resourceType, @Nonnull final List<IBaseResource> resources)

And then update au.csiro.pathling.update.BatchProvider and also create a new au.csiro.pathling.update.DeleteProvider (which will be similar to au.csiro.pathling.update.UpdateProvider).

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

2 participants