OData Reference

The Anzo Data on Demand service follows the OData Version 4.0 specification, which defines the standard URL conventions and query options. This topic provides a quick reference for viewing the supported string operators and output formats. It also provides some example queries.

Note: The Anzo Data on Demand service does not impose limitations on the data that can be retrieved. However, some third-party applications do not support multi-value properties.

Supported String Operators

The Data on Demand service supports the following OData query string operators:

  • $count
  • $expand
  • $filter
  • $format
  • $orderby
  • $select
  • $skip
  • $top

Supported Output Formats

The Data on Demand service supports the following output formats:

  • text/CSV
  • JSON
  • XML

Use the $format operator to specify the output format. For example, the following query produces output in JSON format:

https://csi.com/dataondemand/EMR-Graphmart/Patients?$top=10&$format=json

And this query returns output in CSV format:

https://csi.com/dataondemand/EMR-Graphmart/Patients?$top=10&$format=text/csv

Example OData Queries

This section provides examples of common types of OData queries. The queries run against a sample graphmart that contains data from electronic medical records.

The query below selects all of the properties from the top 10 observations:

https://csi.com/dataondemand/EMR-Graphmart/Observations?$top=10

This query selects the patientID property of the top 10 Observations.

https://csi.com/dataondemand/EMR-Graphmart/Observations?$top=10$select=patientID

The query below selects the patientID and medication properties for the top 10 Observations:

https://csi.com/dataondemand/EMR-Graphmart/Observations?$top=10$select=patientID,medication

This query selects the medication property of the top 10 Observations and filters on values with an optimal property value of True:

https://csi.com/dataondemand/EMR-Graphmart/Observations?$top=10$select=medication&
$filter=optimal%20eq%20%27True%27
Related Topics