|
| 1 | +--- |
| 2 | +title: Configure export settings in Azure API for FHIR |
| 3 | +description: This article describes how to configure export settings in Azure API for FHIR |
| 4 | +author: matjazl |
| 5 | +ms.service: healthcare-apis |
| 6 | +ms.subservice: fhir |
| 7 | +ms.topic: reference |
| 8 | +ms.date: 3/5/2020 |
| 9 | +ms.author: matjazl |
| 10 | +--- |
| 11 | + |
| 12 | +# Configure export setting and export the data to a storage account |
| 13 | + |
| 14 | +Azure API for FHIR supports $export command that allows you to export the data out of Azure API for FHIR account to a storage account. |
| 15 | + |
| 16 | +There are four steps involved in performing export in Azure API for FHIR: |
| 17 | + |
| 18 | +1. Enable Managed Identity on Azure API for FHIR Service |
| 19 | +2. Creating a Azure storage account (if not done before) and assigning permission to Azure API for FHIR to the storage account |
| 20 | +3. Selecting the storage account in Azure API for FHIR as export storage account |
| 21 | +4. Executing the export by invoking $export command on Azure API for FHIR |
| 22 | + |
| 23 | +## Enabling Managed Identity on Azure API for FHIR |
| 24 | + |
| 25 | +First step in configuring Azure API for FHIR for export is to enable system wide managed identity on the service. You can read all about Managed Identities in Azure [here](../active-directory/managed-identities-azure-resources/overview.md). |
| 26 | + |
| 27 | +To do so, navigate to Azure API for FHIR service and select Identity blade. Changing the status to On will enable managed identity in Azure API for FHIR Service. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +Now we can move to next step and create a storage account and assign permission to our service. |
| 32 | + |
| 33 | +## Adding permission to storage account |
| 34 | + |
| 35 | +Next step in export is to assign permission for Azure API for FHIR service to write to the storage account. |
| 36 | + |
| 37 | +After we have created a storage account, navigate to Access Control (IAM) blade in Storage Account and select Add Role Assignments |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +Here we then add role Storage Blob Data Contributor to our service name. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +Now we are ready for next step where we can select the storage account in Azure API for FHIR as a default storage account for $export. |
| 46 | + |
| 47 | +## Selecting the storage account for $export |
| 48 | + |
| 49 | +Final step before invoking $export command is to assign the Azure storage account that Azure API for FHIR will use to export the data to. To do this, navigate to Integration blade in Azure API for FHIR service in Azure portal and select the storage account |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +After that we are ready to export the data using $export command. |
| 54 | + |
| 55 | +## Exporting the data using $export command |
| 56 | + |
| 57 | +After we have configured Azure API for FHIR for export, we can now go and use the $export command to export the data out of the service into the storage account we specified. To learn how to invoke $export command in FHIR server, please read documentation on $export specification at [https://hl7.org/Fhir/uv/bulkdata/export/index.html](https://hl7.org/Fhir/uv/bulkdata/export/index.html) |
| 58 | + |
| 59 | +> [!IMPORTANT] |
| 60 | +> Note that currently Azure API for FHIR only supports System Level Export as defined in Export specification at [https://hl7.org/Fhir/uv/bulkdata/export/index.html](https://hl7.org/Fhir/uv/bulkdata/export/index.html). We also currently do not support query parameters with the $export. |
| 61 | +
|
| 62 | +>[!div class="nextstepaction"] |
| 63 | +>[Additional Settings](azure-api-for-fhir-additional-settings.md) |
0 commit comments