Tableau Connector for FHIR

Build 23.0.8839

Configuring a Connection

After Installing the Connector you can connect and create a Data Source for data in FHIR.

Setting Up a Data Source

Complete the following steps to connect to the data:

  1. Under Connect | To a Server, click More....
  2. Select the data source called FHIR by CData.
  3. Enter the information required for the connection.
  4. Click Sign In.
  5. If necessary, select a Database and Schema to discover what tables and views are available.

Using the Connection Builder

The connector makes the most common connection properties available directly in Tableau. However, it can be difficult to use if you need to use more advanced settings or need to troubleshoot connection issues. The connector includes a separate connection builder that allows you to create and test connections outside of Tableau.

There are two ways to access the connection builder:

  • On Windows, use a shortcut called Connection Builder in the Start menu, under the CData Tableau Connector for FHIR folder.
  • You can also start the connection builder by going to the driver install directory and running the .jar file in the lib directory.

In the connection builder, you can set values for connection properties and click Test Connection to validate that they work. You can also use the Copy to Clipboard button to save the connection string. This connection string can be given to the Connection String option included in the connector connection window in Tableau.

Connecting to FHIR

Set Url to the Service Base URL of the FHIR server. This is the address where the resources are defined in the FHIR server you would like to connect to.

Generic, Azure-based, AWS-based, and Google-based FHIR server implementations are supported.

Sample Urls for each implementation are found below:

  • Generic: http://my_fhir_server/r4b/
  • Azure: https://MY_AZURE_FHIR.azurehealthcareapis.com/
  • AWS: https://healthlake.REGION.amazonaws.com/datastore/DATASTORE_ID/r4/
  • Google: https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/

Authenticating to FHIR

Generic FHIR Instances

The connector supports connections to custom instances of FHIR.

Authentication to custom FHIR servers is handled via OAuth.

Before you can connect to custom FHIR instances, you must set ConnectionType to Generic.

OAuth

Set the AuthScheme to OAuth.

OAuth requires the authenticating user to interact with FHIR using the browser. The connector facilitates this in various ways as described in the following sections.

Before following the procedures below, you need to register an OAuth app with the service to obtain OAuthClientId and OAuthClientSecret.

Desktop Applications

Get and Refresh the OAuth Access Token

After setting the following, you are ready to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • OAuthClientId: Set this to the client Id assigned when you registered your app.
  • OAuthClientSecret: Set this to the client secret assigned when you registered your app.
  • CallbackURL: Set this to the redirect URI defined when you registered your app. For example: https://localhost:3333
  • OAuthAuthorizationURL: This is the URL where the user logs into the service and grants permissions to the application.
  • OAuthAccessTokenURL: This is the URL where the request for the access token is made.
  • OAuthRefreshTokenURL: This is the URL where the refresh token is exchanged for a new access token when the old one expires. Note that, for your data source, this may be the same as the access token URL.
When you connect, the connector opens FHIR's OAuth endpoint in your default browser. Log in and grant permissions to the application. The connector then completes the OAuth process:
  1. The connector obtains an access token from FHIR and uses it to request data.
  2. The OAuth values are saved in the location specified in OAuthSettingsLocation, to be persisted across connections.
The connector refreshes the access token automatically when it expires.

Azure FHIR Instances

The connector supports connections to instances of FHIR hosted on Microsoft Azure.

You can authenticate with Azure Active Directory, an Azure Service Principal, or Azure MSI.

Before you can connect to FHIR instances hosted on Azure, you must set ConnectionType to Azure.

Azure Active Directory

You can connect to FHIR instances hosted on Azure using an OAuth app registered with Azure Active Directory.

Set AuthScheme to AzureAD.

Embedded App

CData provides an embedded OAuth application that simplifies OAuth desktop Authentication. To authenticate using the embedded OAuth app, connect without setting any additional connection properties.

Custom App

Alternatively, you can create a custom OAuth application. See Creating a Custom OAuth App for information about creating custom applications and reasons for doing so.

Once your OAuth app has been created, set the following to connect:

  • OAuthClientId: Set this to the Application (client) ID, found on the Overview page of the OAuth app.
  • OAuthClientSecret: Set this to the Value of the client secret, generated at the Certificates and secrets page of the OAuth app.
  • AzureTenant (single tenant apps only): Set this to the Azure tenant Id, found on the Overview page of the OAuth app.
  • CallbackURL: Set this to the value you specified for Redirect URI during the creation of your custom OAuth app.

Azure MSI

If you are running FHIR on an Azure VM, set AuthScheme to AzureMSI to authenticate using Managed Service Identity (MSI) credentials.

The MSI credentials will then be automatically obtained for authentication.

Azure Service Principal

You can authenticate to Azure-hosted instances of FHIR using an Azure service principal.

See Creating a Custom OAuth App for information about creating custom applications and reasons for doing so.

Once your OAuth app has been created, set the following to connect:

  • AuthScheme: Set this to AzureServicePrincipal.
  • OAuthClientId: Set this to the Application (client) ID, found on the Overview page of the OAuth app used to authenticate to FHIR on Azure.
  • OAuthClientSecret: Set this to the Value of the client secret, generated at the Certificates and secrets page of the authenticating OAuth app.
  • CallbackURL: Set this to the value you specified for Redirect URI during the creation of your custom OAuth app.
  • OAuthJWTCert: Set this to the path of your service principal's certificate.
  • OAuthJWTCertType: Set this to your service principal's certificate type.

AWS FHIR Instances

The connector supports connections to instances of FHIR hosted on AWS.

You can authenticate with AWS Root Keys, AWS EC2 Roles, or AWS IAM Roles.

Before you can connect to FHIR instances hosted on AWS, you must set ConnectionType to AWS.

AWS Root Keys

You can authenticate using the access keys for the root AWS user. Set the following:

  • AuthScheme: Set this to AwsRootKeys.
  • AWSAccessKey: Set this to your AWS account access key. This value is accessible from your AWS security credentials page.
  • AWSSecretKey: Set this to your AWS account secret key. This value is accessible from your AWS security credentials page.

AWS IAM Roles

To authenticate to your AWS-hosted FHIR using IAM roles, set the following:

  • AuthScheme: Set this to AwsIAMRoles.
  • AWSAccessKey: Set this to your AWS account access key. This value is accessible from your AWS security credentials page.
  • AWSSecretKey: Set this to your AWS account secret key. This value is accessible from your AWS security credentials page.
  • AWSRoleARN: Set this to the Amazon Resource Name of the role you want to use when authenticating.

AWS EC2 Roles

If you are using the connector from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM role to authenticate.

Set AuthScheme to AwsEC2Roles.

If you are also using an IAM role to authenticate, you must additionally set AWSRoleARN to the Role ARN for the role you'd like to authenticate with. This will cause the connector to attempt to retrieve credentials for the specified role.

Google FHIR Instances

The connector supports connections to instances of FHIR hosted on Google Cloud Platform.

You can authenticate with standard OAuth or Service account authentication (with a JWT).

Before you can connect to FHIR instances hosted on Google Cloud Platform, you must set ConnectionType to Google.

OAuth

Set AuthScheme to OAuth.

Embedded App

CData provides an embedded OAuth application that simplifies OAuth desktop Authentication. To authenticate using the embedded OAuth app, connect without setting any additional connection properties.

Custom App

Alternatively, you can create a custom OAuth application. See Creating a Custom OAuth App for information about creating custom applications and reasons for doing so.

Unlike the Generic connection type, when ConnectionType is set to Google, OAuthAuthorizationURL, OAuthRefreshTokenURL, and OAuthAccessTokenURL are not required to be set.

This is because, when connecting to an instance of FHIR hosted on Google Cloud Platform, these properties have default values embedded in the connector.

Aside from omitting those properties, follow the same procedures for configuring OAuth authentication as with generic implementations of FHIR (see the "OAuth" section under the "Generic FHIR Instances" section above).

Service Accounts (OAuth JWT)

To authenticate using a service account, you must create a new service account and have a copy of the accounts certificate.

Google JSON Certificates

If you would like to use a JSON file as the certificate, you need to set these properties:

  • AuthScheme: Set this to OAuthJWT.
  • InitiateOAuth: Set this to GETANDREFRESH.
  • OAuthJWTCertType: Set this to GOOGLEJSON.
  • OAuthJWTCert: Set this to the path to the .json file provided by Google.
  • OAuthJWTSubject (optional): Only set this value if the service account is part of a GSuite domain and you want to enable delegation. The value of this property should be the email address of the user whose data you want to access.
PFX File Certificates

If you would like to use a PFX file as the certificate, you need to set these properties instead:

  • AuthScheme: Set this to OAuthJWT.
  • InitiateOAuth: Set this to GETANDREFRESH.
  • OAuthJWTCertType: Set this to PFXFILE.
  • OAuthJWTCert: Set this to the path to the .pfx file provided by Google.
  • OAuthJWTCertPassword (optional): Set this to the .pfx file password. In most cases, you will need to set this since Google encrypts PFX certificates.
  • OAuthJWTCertSubject (optional): Set this only if you are using a OAuthJWTCertType which stores multiple certificates. Should not be set for PFX certificates generated by Google.
  • OAuthJWTIssuer: Set this to the email address of the service account. This address will usually include the domain iam.gserviceaccount.com.
  • OAuthJWTSubject (optional): Only set this value if the service account is part of a GSuite domain and you want to enable delegation. The value of this property should be the email address of the user whose data you want to access.

Next Step

See Using the Connector to create data visualizations.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839