Skip to main content

How to Access AdvaPACS's FHIR API

To use the FHIR API you need the appropriate FHIR API URL and an API key with the appropriate permissions for the resources you wish to access. This guide outlines the steps to obtain them.

To start with, navigate to the API Keys page.

  1. Click Settings.

  2. Click API Keys.

Once you are on the page, refer to the following sections for steps in getting them

API URL

The full path to the FHIR API is the API URL plus the FHIR API path, [API URL] + [path].

To obtain the path, first, take note of the API URL.

Then, add the FHIR path at the end of the API URL. Each FHIR Version have different paths, refer to the table below for the path of each version:

FHIR VersionPath
Version 4/fhir
Version 5/fhir/R5

For example, if the API URL is hkg.api.integration.advapacs.com, then the full path is:

hkg.api.integration.advapacs.com/fhir

API Key

To generate the API Key, follow these steps:

  1. Enter a Key Name.

  2. Optional: Add an Expiration Date.

  3. In Permissions, tick the FHIR checkbox and select features that can be accessed when using this API Key.

  4. Click Generate.

  5. Copy and save the Access Key ID and Access Key Secret. These are only shown once and will be cleared once the page is reloaded.

If you wish to update the permissions of the key, click the "edit" button of the newly generated key.

Authentication

Provide the Access Key ID and Access Key Secret via the Authorization header of the HTTP request in this format:

Authorization: ID=<Access Key ID>,Secret=<Access Key Secret>

For example:

Authorization: ID=991004a2dfb04faead9e30e0eb66e186,Secret=XzzxHuSfPm76PVNSd+v1Sk69yb+YGtDlc

Summary

To connect to the FHIR API, you need:

  • The appropriate FHIR API URL
  • An API Key with permission to the FHIR features
  • A properly formatted Authorization header