Describe the bug
When doing a POST search with a batch bundle as the payload, the "_elements" parameter in the included GET requests are not honored.
To Reproduce
For example - if you make this simple GET request to the FHIR server, the FHIR resource will exclude most elements in the resources, including only: resourceType, id, meta and medicationCodeableConcept:
/MedicationStatement?_elements=medicationCodeableConcept
However - if you execute a batch search with the same thing nested in the bundle, then all the elements in the returned resources are returned, instead of just those listed above, such as "dateAsserted", "dosage", etc:
{
"resourceType": "Bundle",
"type": "batch",
"entry": [
{
"request": {
"method": "GET",
"url": "/MedicationStatement?_elements=medicationCodeableConcept"
}
}
]
}
Expected behavior
The _elements filter value should be honored in batch searches, just as it is in non-batch searches.
Environment (please complete the following information):
This happens on the HAPI FHIR JPS server. I verified it happens in the latest version running on the public hapi fhir server:
Describe the bug
When doing a POST search with a batch bundle as the payload, the "_elements" parameter in the included GET requests are not honored.
To Reproduce
For example - if you make this simple GET request to the FHIR server, the FHIR resource will exclude most elements in the resources, including only: resourceType, id, meta and medicationCodeableConcept:
However - if you execute a batch search with the same thing nested in the bundle, then all the elements in the returned resources are returned, instead of just those listed above, such as "dateAsserted", "dosage", etc:
Expected behavior
The _elements filter value should be honored in batch searches, just as it is in non-batch searches.
Environment (please complete the following information):
This happens on the HAPI FHIR JPS server. I verified it happens in the latest version running on the public hapi fhir server: