FHIR icon indicating copy to clipboard operation
FHIR copied to clipboard

Bundle validation for duplicate resources should be done

Open d0roppe opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. when working with a transaction or batch bundle we should validate that resources are not duplicated in the same bundle like more than 1 update to the same resource. or a update and a delete to the same resource. we should stop that before we start processing the bundle.

Describe the solution you'd like A message should be issued if you reference a resource more than 1 time in the same bundle, and it should be at validation stage before we start processing the bundle

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Acceptance Criteria

  1. GIVEN [a precondition] AND [another precondition] WHEN [test step] AND [test step] THEN [verification step] AND [verification step]

Additional context From https://hl7.org/fhir/bundle.html#bundle-unique

When processing batches and transactions, it is at server discretion how to behave if multiple versions of a single resource are present.

d0roppe avatar Mar 11 '22 16:03 d0roppe

an edge case for this one might be a conditional create/update/delete where the search resolves to the same resource

lmsurpre avatar Mar 11 '22 18:03 lmsurpre

team decision: lets do this one JUST FOR TRANSACTION (and leave batch processing alone)

lmsurpre avatar Aug 09 '22 13:08 lmsurpre