Describe the bug
The issue pertains to the $document operation bundle in the Hapi-Fhir project and concerns non-compliance with FHIR specifications. Specifically, the Bundle specification (section 2.36.3.2) outlines two constraints related to the use of the total and entry.search elements. According to constraint bdl-1, the total element should only be present when a search or history operation is performed. Constraint bdl-2 states that the entry.search element should only be present when a search operation is performed.
However, the current implementation of the $document operation bundle in Hapi-Fhir is not adhering to these constraints. The operation is returning both entry.search and bundle.total. This non-compliance with the FHIR specification is causing issues when the consumer of this $document operation had strict validation.
To Reproduce
Steps to reproduce the behavior:
Create a composition
Run the $document operation
Expected behavior
The bundle should not have a total and the entries should not have a search element
Environment (please complete the following information):
Describe the bug The issue pertains to the $document operation bundle in the Hapi-Fhir project and concerns non-compliance with FHIR specifications. Specifically, the Bundle specification (section 2.36.3.2) outlines two constraints related to the use of the total and entry.search elements. According to constraint bdl-1, the total element should only be present when a search or history operation is performed. Constraint bdl-2 states that the entry.search element should only be present when a search operation is performed.
However, the current implementation of the $document operation bundle in Hapi-Fhir is not adhering to these constraints. The operation is returning both entry.search and bundle.total. This non-compliance with the FHIR specification is causing issues when the consumer of this $document operation had strict validation.
To Reproduce Steps to reproduce the behavior:
Expected behavior The bundle should not have a total and the entries should not have a search element
Environment (please complete the following information):