Reading Data
In this tutorial we will cover some of the ways to access data in the Commure Platform.
React Data Access
To access data from a React application, the simplest solution is to use the
Commure <FhirDataQuery/>
React
component, or the associated
<withFhirDataQuery/>
higher-order component.
In order for the <FhirDataQuery/>
component to work correctly, it must have
the <CommureSmartApp/>
component as an ancestor
in the component tree.
Related Reading
Non-React Data Access
It is also possible to access data in the Commure Platform without using React.
The Commure FHIR API can be queried directly using the programming language of
your choice, the curl
command, or a REST client like Postman.
For example, the same data retrieved in the React example above can be accessed
using the following curl
command:
You'll need to replace TENANT_ID
with your actual Commure tenant ID, which you
find in the top right menu in the console. The ACCESS_TOKEN
should
be replaced with the value obtained after
authentication.