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

$document operation bundle in Hapi-Fhir does not comply with FHIR specifications regarding the use of total and entry.search elements #4713

Open
Eernie opened this issue Apr 4, 2023 · 1 comment · May be fixed by #4714

Comments

@Eernie
Copy link

Eernie commented Apr 4, 2023

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:

  1. Create a composition
  2. 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):

  • HAPI FHIR Version: 6.4.4
@jmeinsma
Copy link

Great, can someone apply this fix?
I was just looking for exactly this issue, very nice Eernie that you fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants