Preparation

Before you begin, make sure you have the credentials to access your Extra Horizon environment. You'll need

Variable
Example

Host URL

api.dev.my-company.extrahorizon.io

OAUTH1 consumer key

bb6c5186acf8aca8ed64ef4ef49e08bb4484c7c4

OAUTH1 consumer secret

4808fbc315294aa7aeb2e40b76d84680c0b582ee

e-mail

john.doe@extrahorizon.com

password

SomeDiff!UnguessableP8ssword

Using Host URL, e-mail and password, you can access the Control Center UI at https://app.extrahorizon.com. Please log in and explore the UI at your leisure.

This tutorial will be based on code located in the GitHub repository at https://github.com/ExtraHorizon/medical-device-tutorial.

  1. You'll need to have Node.js installed in order to use the repository

  2. Check out the repository:

git clone git@github.com:ExtraHorizon/medical-device-tutorial.git
  1. In the repository, do

npm install

This will install all the repository dependencies, including the Extra Horizon SDK and CLI. The SDK will be used by our tutorial application to interact with the Extra Horizon API, while we'll use the CLI to set up & manage our Extra Horizon configuration.

  1. Now we'll need to authenticate the CLI to the Extra Horizon backend so that we can use the CLI to manage our configuration. Using the credentials mentioned at the top of this page, do

npx exh login --host=https://<Host URL> --email=<email> 
    --password=<password> --consumerKey=<consumer key> 
    --consumerSecret=<consumer secret>

The CLI will authenticate you & store your credentials in ~/.exh/credentials.

  1. Verify that the CLI works correctly by doing

npx exh data schemas list

which should return an (empty) list of data schemas.

Repository structure

The structure of the repository is as follows:

.
├── 1-data-model
│   └── schemas
├── 2-workflows
│   ├── schemas
│   ├── tasks
│   │   └── analyze-blood-pressure
│   │       └── src
│   └── templates
│       ├── mail-analysis
│       └── pdf-analysis
├── 3-permissions
│   └── schemas
├── 4-oauth-frontend
│   └── front-end
│       ├── dist
│       └── src
└── examples
    ├── permissions
    ├── workflow 1
    └── workflow 2

There are separate directories for each section of this tutorial. Next to that, there's an examples directory, which contains sample scripts to perform certain operations on the Extra Horizon backend. They will be used throughout the tutorial.

That's it! Now you're all set to begin the tutorial.

Last updated