Support for references in typeFilters when using $export

40 views
Skip to first unread message

Patrick Palacin

unread,
Feb 23, 2021, 6:30:55 AM2/23/21
to HAPI FHIR
Hi guys,

as stated here the $export endpoint on Patient is not yet implemented:

Nevertheless, we want to offer our doctors/evaluators to export records of a single patient with a given set of related resources. I tried to implement it via the system-level $export endpoint, but using references with the typeFilters doesnt seem to work:


curl --location --request POST 'http://localhost:8080/fhir/$export' \
--header 'Content-Type: application/json' \
--header 'Prefer: respond-async' \
--header 'Authorization: JWT XXXX' \
--data-raw '{
"resourceType": "Parameters",
"parameter": [
{
"name": "_type",
"valueString": "Patient,Observation,MedicationUsage,DiagnosticReport"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
},
{
"name": "_typeFilter",
"valueString": "Patient?_id=517f2f9a-885a-11ea-9e44-327dcc10d7f6"
},
{
"name": "_typeFilter",
"valueString": "Observation?subject=Patient/517f2f9a-885a-11ea-9e44-327dcc10d7f6"
},
{
"name": "_typeFilter",
"valueString": "MedicationUsage?subject=Patient/517f2f9a-885a-11ea-9e44-327dcc10d7f6"
},
{
"name": "_typeFilter",
"valueString": "DiagnosticReport?subject=Patient/517f2f9a-885a-11ea-9e44-327dcc10d7f6"
}
]
}'

Unfortunately the created files contain all Observation, MedicationUsage and DiagnosticReports, not only limited to the ones for the Patient I requested.

Does anybody run into the same problem or has an idea how to solve it?

I am glad sharing our solution as soon as I found one.

Best
Patrick
Reply all
Reply to author
Forward
0 new messages