Ready to get started?

Learn more or sign up for a free trial:

CData Connect Server

Query FHIR Data in MySQL Workbench



Create a virtual MySQL database for FHIR data in CData Connect (or Connect Server) and work with live FHIR data in MySQL Workbench.

MySQL Workbench allows users to administer MySQL environments and gain better visibility into databases. When paired with CData Connect (on-premise or Connect Server), you get live access to FHIR data as if it were a MySQL database. This article shows how to create a virtual database for FHIR in Connect and work with live FHIR data in MySQL Workbench.

Create a Virtual MySQL Database for FHIR Data

CData Connect uses a straightforward, point-and-click interface to connect to data sources and generate APIs.

  1. Login to Connect and click Connections.
  2. Select "FHIR" from Available Data Sources.
  3. Enter the necessary authentication properties to connect 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. Set ConnectionType to a supported connection type. Set ContentType to the format of your documents. Set AuthScheme based on the authentication requirements for your FHIR server.

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

    Sample Service Base URLs

    • 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/

    Generic FHIR Instances

    The product supports connections to custom instances of FHIR. Authentication to custom FHIR servers is handled via OAuth (read more about OAuth in the Help documentation. Before you can connect to custom FHIR instances, you must set ConnectionType to Generic.

  4. Click Save Changes
  5. Click Privileges -> Add and add the new user (or an existing user) with the appropriate permissions.

With the virtual database created, you are ready to connect to FHIR from MySQL Workbench.

Query FHIR from MySQL Workbench

The steps below outline connecting to the virtual FHIR database in Connect from MySQL Workbench and issuing basic queries to work with live FHIR data.

Connect to FHIR through Connect

  1. In MySQL Workbench, click to add a new MySQL connection.
  2. Name the connection (CData Connect).
  3. Set the Hostname, Port, and Username parameters to connect to the SQL Gateway.
  4. Click Store in Vault to set and store the password.
  5. Click Test Connection to ensure the connection is configured properly and click OK.

Query FHIR Data

  1. Open the connection you just created (CData Connect).
  2. Click File -> New Query Tab.
  3. Write a SQL query to retrieve FHIR data, like SELECT * FROM fhirdb.Patient;

With access to live FHIR data from MySQL Workbench, you can easily query and update FHIR, just like you would a MySQL database. Request a demo of the CData Connect and start working with FHIR just like a MySQL database today.