Ready to get started?

Download a free trial of the FHIR Data Provider to get started:

 Download Now

Learn more:

FHIR Icon FHIR ADO.NET Provider

Rapidly create and deploy powerful .NET applications that integrate with FHIR.

DataBind FHIR Data to the DevExpress Data Grid



Use the CData ADO.NET Provider for FHIR with the DevExpress Windows Forms and Web controls to provide FHIR data to a chart.

The ADO.NET Provider for FHIR by CData incorporates conventional ADO.NET data access components compatible with third-party controls. You can adhere to the standard ADO.NET data binding procedures to establish two-way access to real-time data through UI controls. This article will demonstrate the utilization of CData components for data binding with DevExpress UI Controls (Windows Forms and Web controls), specifically binding to a chart that visualizes live data.

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.

Windows Forms Controls

The code below shows how to populate a DevExpress chart with FHIR data. The FHIRDataAdapter binds to the Series property of the chart control. The Diagram property of the control defines the x- and y-axes as the column names.

using (FHIRConnection connection = new FHIRConnection( "URL=http://test.fhir.org/r4b/;ConnectionType=Generic;ContentType=JSON;AuthScheme=None;")) { FHIRDataAdapter dataAdapter = new FHIRDataAdapter( "SELECT Id, [name-use] FROM Patient WHERE [address-city] = 'New York'", connection); DataTable table = new DataTable(); dataAdapter.Fill(table); DevExpress.XtraCharts.Series series = new DevExpress.XtraCharts.Series(); chartControl1.Series.Add(series); series.DataSource = table; series.ValueDataMembers.AddRange(new string[] { "[name-use]" }); series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Qualitative; series.ArgumentDataMember = "Id"; series.ValueScaleType = DevExpress.XtraCharts.ScaleType.Numerical; chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true; }

Web Controls

The code below shows how to populate a DevExpress Web control with FHIR data. The FHIRDataAdapter binds to the Series property of the chart; the Diagram property defines the x- and y-axes as the column names.

using DevExpress.XtraCharts; using (FHIRConnection connection = new FHIRConnection( "URL=http://test.fhir.org/r4b/;ConnectionType=Generic;ContentType=JSON;AuthScheme=None;")) { FHIRDataAdapter FHIRDataAdapter1 = new FHIRDataAdapter("SELECT Id, [name-use] FROM Patient WHERE [address-city] = 'New York'", connection); DataTable table = new DataTable(); FHIRDataAdapter1.Fill(table); DevExpress.XtraCharts.Series series = new Series("Series1", ViewType.Bar); WebChartControl1.Series.Add(series); series.DataSource = table; series.ValueDataMembers.AddRange(new string[] { "[name-use]" }); series.ArgumentScaleType = ScaleType.Qualitative; series.ArgumentDataMember = "Id"; series.ValueScaleType = ScaleType.Numerical; ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true; }