You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There's currently no way to export Location resources via a Bulk Export of a Group. This seems like a regression of #4080/#4081 where support for adding resources referenced by other resource types in the Patient compartment was added.
To Reproduce
Approach 1:
Load a Group with some Patients, where a Location resource is referenced by another resource that references the Patient. Sample Bundle (R4) attached: sample_group_to_export.json
Call the $export operation on the Group, with default settings (no additional parameters)
eg GET /Group/{id}/$export with header Prefer: respond-async
Content-Location in the response will point to the $export-poll-status location to poll, GET that url until it returns the export output
Result: Some data is exported, but the Location is not included; there is no Location file in the export
Approach 2:
4. Call the $export operation on a Group, explicitly specifying Location as a resourceType to return
eg GET /Group/{id}/$export?_type=Patient,Encounter,Location
Result: an error is immediately returned: HAPI-0512: Resource types [Location] are invalid for this type of export, as they do not contain search parameters that refer to patients
Expected behavior
It should be possible via some mechanism to include Location resources in a Group export
Screenshots
Environment (please complete the following information):
HAPI FHIR Version 7.0.2
(but based on the code I expect it's still there in 7.4.5)
Note that #4080 also refers to Organization, Group, and Device resources. Organization and Group are handled separately in the code because and this also allows them to be included when referenced from other resources via the includes logic I linked above
The text was updated successfully, but these errors were encountered:
Describe the bug
There's currently no way to export Location resources via a Bulk Export of a Group. This seems like a regression of #4080/#4081 where support for adding resources referenced by other resource types in the Patient compartment was added.
To Reproduce
Approach 1:
GET /Group/{id}/$export
with headerPrefer: respond-async
Approach 2:
4. Call the $export operation on a Group, explicitly specifying Location as a resourceType to return
GET /Group/{id}/$export?_type=Patient,Encounter,Location
HAPI-0512: Resource types [Location] are invalid for this type of export, as they do not contain search parameters that refer to patients
Expected behavior
It should be possible via some mechanism to include Location resources in a Group export
Screenshots
Environment (please complete the following information):
Additional context
It looks like this used to work when #4081 was merged, but at some point the
includes
logic was changed and now only resource types that are specifically requested will be returned: https://github.com/hapifhir/hapi-fhir/blob/v7.4.5/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/JpaBulkExportProcessor.java#L591But as noted it's not possible to specifically request Location resources
Note that #4080 also refers to Organization, Group, and Device resources. Organization and Group are handled separately in the code because and this also allows them to be included when referenced from other resources via the
includes
logic I linked aboveThe text was updated successfully, but these errors were encountered: