Use virtual health data tables
This article lists some common examples of virtual health data table capabilities.
Search and filter
The virtual health data tables support search and sort in a limited scope, depending on the FHIR (Fast Healthcare Interoperability Resources) server. Support is based on what the target FHIR server currently supports. The following sections explain some examples.
Filter on observation for a specific patient
In the main Observation view, open the Advanced filters panel. In this panel, select Add Row, select Subject (Patient) as the column, and then select one or more patient records from the list.
Select Apply to view the filtered results.
Filter on observation for one or more codes
Follow the same steps explained in the previous example to filter on Observation Code. Select a Code and a Code value for filtering.
The result would be as follows:
Filter on linked entities
The virtual health data tables only support one level of linked entity filtering. Linked entity filtering requires that the data being filtered should also exist on the FHIR server, such as Patient. The following screenshot displays an example of filtering on a patient with the last name "James":
The Azure API for FHIR limits the subquery results to 1,000 records. If the subquery isn't selective enough, the FHIR server returns an error and no results. For example, changing the last name filter to "Smith" in the same example results in the following error:
The latest version of Azure Health Data Services should address this issue.
Use virtual health data table events
With the virtual health data table events feature, you can register your own plug-ins to receive events and execute custom code. To learn more about the events feature, go to Virtual health data table events.
Register plug-ins for virtual events
Virtual tables include support to raise asynchronous Dataverse events. The virtual health data tables include Virtual Entity Metadata records as part of the deployment solution. The events are enabled by default with no extra configuration required.
After you deploy virtual health data tables, you can immediately register new plug-ins against these events.
Example: Register for events on encounters
In this example, we assume you have a plug-in assembly compiled and registered in your environment. After you register the assembly, you can register the new virtual events.
Using the Plug-in Registration tool, select your assembly, and then select Register New Step. In the list of messages, you can see the following three available messages for virtual tables:
OnExternalCreated
OnExternalUpdated
OnExternalDeleted
These new messages are available because we deployed the Virtual Entity Metadata records for the virtual health data table virtualized tables.
Select OnExternalCreated, and then select Primary Entity to view the list of available virtualized tables.
Because the virtual events are asynchronous, apply the Execution Mode for the final setting. Set the value to Asynchronous.
After you save the changes, your plug-in receives the requested events within the Dataverse Event framework pipeline. In this example, your plug-in is registered against the OnExternalCreated message. When the event triggers, your plug-in has access to the Encounter FHIR data via the target object plug-in execution context, similar to a standard Dataverse plug-in.
For more information on virtual table events and examples, see Enable Virtual Tables to support Dataverse events.