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

Add deletion markers to bulkdata export calls with the _since param #1927

Open
lmsurpre opened this issue Feb 9, 2021 · 0 comments
Open
Labels
bulk-data P3 Priority 3 - Nice To Have

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Feb 9, 2021

Is your feature request related to a problem? Please describe.
In the latest version of the FHIR bulkdata spec, they added support for deletion markers so that a consumer that is trying to synchronize two systems via bulk export could do so more accurately wrt deleted resources.

Bulk Data 2.0.0 http://hl7.org/fhir/uv/bulkdata/export.html

An array of deleted file items following the same structure as the output array.

The ability to convey deleted resources is important in cases when a server may have previously exported data and wishes to indicate that these data should be removed from downstream systems. When a _since timestamp is supplied in the export request, this array SHOULD be populated with output files containing FHIR Transaction Bundles that indicate which FHIR resources match the kick-off request criteria, but have been deleted subsequent to the _since date. If no resources have been deleted, or the _since parameter was not supplied, or the server has other reasons to avoid exposing these data, the server MAY omit this key or MAY return an empty array. Resources that appear in the 'deleted' section of an export manifest SHALL NOT appear in the 'output' section of the manifest. 

Describe the solution you'd like
This will be hard to support with our search-based export implementation because the deleted resources cannot be found via search. I think we will need to expand the FHIRPersistence interface once again to make it possible to retrieve the list of resources that have been deleted since some particular date.

Describe alternatives you've considered

Acceptance Criteria
GIVEN a resource that has been deleted since a given datetime
WHEN bulk export is invoked
AND the _since parameter is set to a datetime that is after the resource's creation time, but before the deletion
AND the export completes with success
THEN the export-status endpoint should return results that include a deleted field
AND that deleted field should point at one or more Bundle resources
AND exactly one of those Bundle resources should contain exactly one entry marker for the deleted resource

Additional context
The spec change was added under HL7/bulk-data#66 and can be found at http://build.fhir.org/ig/HL7/bulk-data/export.html#response---complete-status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bulk-data P3 Priority 3 - Nice To Have
Projects
None yet
Development

No branches or pull requests

1 participant