2

I'm trying to perform a Patient level bulk export: "Endpoint - All Patients Export a detailed set of FHIR resources of diverse resource types pertaining to all patients. [fhir base]/Patient/$export "

I have a fhir server running on a smile CDR instance loaded with some basic data with the Synthea tool. I've generated 11 patients and more data related to it.

Resources loaded in the database are:

"AllergyIntolerance", "Bundle", "CarePlan", "CareTeam", "Claim", "Condition", "Coverage", "DiagnosticReport","DocumentReference", "Encounter", "ExplanationOfBenefit", "ImagingStudy", "Immunization", "Location", "Medication","MedicationAdministration", "MedicationRequest", "Observation", "Organization","Patient", "Practitioner","PractitionerRole","Procedure", "Provenance", "ServiceRequest"

When I request a resource export (Patient, Practitioner, Organization) the bulk export works:

http://localhost:8000/$export?_type=Organization

{
"resourceType": "Organization",
"id": "1633",
"meta": {
    "versionId": "1",
    "lastUpdated": "2021-11-12T20:42:45.627+00:00",
    "source": "#HJck1YaOzVjNjBTA",
    "profile": [
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization"
    ]
},....

}

Now, the patient level export is generating a status job with no results at all. First I launch the bulk job with:

http://localhost:8000/Patient/$export

and then, I ask for the job status with the provided url:

http://localhost:8000/$export-poll-status?_jobId=4aaadbc9-fbe8-44e1-b631-9335fc1c2712

And the response is always the same, with no results at all (I can see in the logs that the job is completed).

{
    "transactionTime": "2021-12-01T19:37:46.341+00:00",
    "request": "/Patient/$export?_outputFormat=application%2Ffhir%2Bndjson"
}

By reading the documentation I think the issue is related to the bulk export permissions. In FHIR_OP_INITIATE_BULK_DATA_EXPORT, I've configured "Patient" as permission, but no matter what word I wrote there, the behavior is the same (I mean, the resource export works, but not the patient level export). I would like to understand what I should configure on the FHIR_OP_INITIATE_BULK_DATA_EXPORT permission and on the other ones (FHIR_OP_INITIATE_BULK_DATA_EXPORT_GROUP, FHIR_OP_INITIATE_BULK_DATA_EXPORT_PATIENT, FHIR_OP_INITIATE_BULK_DATA_EXPORT_SYSTEM) to allow a user to download everything, like a super user.

eduardosufan
  • 1,441
  • 2
  • 23
  • 51

0 Answers0