eMedicalPractice FHIR API Documentation

FHIR API Table of Contents

Overview

Easy-to-use JSON-based REST API for eMedPractice FHIR. See standard eMedPractice API docs here. The eMedPractice FHIR API conforms to the R4 specification and the US Core 3.1 Implementation Guide (IG).

Prerequisite

Enable the Standard FHIR service (/fhir/ endpoints) in eMedPractice menu: SiteAdmin->FhirSetup->”Enable eMedPractice Standard FHIR REST API”

Authorization

eMedPractice uses OIDC compliant authorization for API. SSL is required and setting baseurl at SiteAdmin->FhirSetup->’Site Address (required for OAuth2 and FHIR)’ is required.

See Authorization for more details.

FHIR API Documentation

The FHIR API is documented via Swagger. Can see this documentation (and can test it) by going to the swagger through the https://stage.emedpractice.com:8181/swagger/index.html directory in your eMedPractice installation. The FHIR API is documented there in the fhir section.

Standard FHIR endpoints Use https://stage.emedpractice.com:8080/ as base URI.

Example: https://stage.emedpractice.com:8181/fhri/r4/Patient returns a Patient’s bundle resource, etc

The Bearer token is required for each eMedPractice FHIR request (except for the Capability Statement), and is conveyed using an Authorization header. Note that the Bearer token is the access_token that is obtained in the Authorization section.

When registering an API client to use with Swagger the following for the redirect url and launch url for the client.

Request:

curl -X GET ‘https://service.emedpractice.com:8443/r4/Patient’ \-H ‘Authorization: Bearer eyJ0b2tlbiI6IjAwNnZ3eGJZYmFrOXlxUjF4U290Y1g4QVVDd3JOcG5yYXZEaFlqaHFjWXJXRGNDQUtFZmJONkh2cElTVkJiaWFobHBqOTBYZmlNRXpiY2FtU01pSHk1UzFlMmgxNmVqZEhcL1ZENlNtaVpTRFRLMmtsWDIyOFRKZzNhQmxMdUloZmNJM3FpMGFKZ003OXdtOGhYT3dpVkx5b3BFRXQ1TlNYNTE3UW5TZ0dsUVdQbG56WjVxOVYwc21tdDlSQ3RvcDV3TEkiLCJzaXRlX2lkIjoiZGVmYXVsdCIsImFwaSI6ImZoaXIifQ==’

Capability Statement

GET fhir/metadata

This will return the Capability Statement. Note this can be tested by going to the url GET 'https://stage.emedpractice.com:8181/fhir/r4/metadata' or sh curl -X GET 'https://stage.emedpractice.com:8181/fhir/r4/metadata'

Provenance Resources

Provenance resources are requested by including _revinclude=Provenance:target in the search of a resource. Is currently supported for the following resources:

curl -X GET ‘https://stage.emedpractice.com:8181/fhri/r4/AllergyIntolerance?_revinclude=Provenance:target’

BULK FHIR Exports

An export operation that implements the BULK FHIR Export ONC requirements can be requested by issuing a GET request to the following endpoints:

  • System Export, requires the system/*.$export scope. Exports All supported FHIR resources

curl -X GET ‘https://stage.emedpractice.com:8181/fhri/r4/$export’

  • Group Export, requires the system/Group.$export scope. Exports all data in the Patient Compartment for the group. The system automatically creates a group for every Practitioner resource in the system where the patients in the group are the individuals who have the Practitioner as their primary care provider.

curl -X GET ‘https://stage.emedpractice.com:8181/fhri/r4/Group/1/$export’

  • Patient Export, requires the system/Patient.$export scope. Exports all data for all patients in the Patient Compartment.

curl -X GET ‘https://stage.emedpractice.com:8181/fhri/r4/Patient/$export’

You will get an empty body response with a Content-Location header with the URL you can query for status updates on the export.

To query the status update operation you need the system/*.$bulkdata-status scope. An example query:

  • Status Query

curl -X GET ‘https://stage.emedpractice.com:8181/fhri/r4/$bulkdata-status?job=92a94c00-77d6-4dfc-ae3b-73550742536d’

Scroll to Top