FHIR
FHIR copied to clipboard
Bundle validation for duplicate resources should be done
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
- 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.
an edge case for this one might be a conditional create/update/delete where the search resolves to the same resource
team decision: lets do this one JUST FOR TRANSACTION (and leave batch processing alone)