Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

JS Client Library to interact with IRIS Gateway

License

Notifications You must be signed in to change notification settings

InOG-projects/IRIS-library-js

Repository files navigation

IRIS Logo

IRIS - JS Library

IRIS stands for "Integration of Remote systems into Infection control Software" and is intended to be the central point of mediation between the various contact, event and guest tracking apps on the one hand and the infection control software (e.g. SORMAS) in the health departments on the other.

This repository is used as a client library to handle the connection with the IRIS gateway

⚠️ IMPORTANT NOTE ⚠️ This project moved to iris-gateway/IRIS-library-js.

Please find new versions, documentation and issues there.

The npm package name and organization were not touched and it can be still added via @inog/iris-library-js

Purpose

To help interact with the IRIS Gateway this helper library abstracts aspects of the interaction with the IRIS Gateway like encryption. This way you can just send the data without worrying about the annoying stuff.

Installation

You should have node and npm or yarn installed.

$ yarn add @inog/iris-library-js

Basic Usage

Before being able to send or check data the library must be initialized with the url of the IRIS Gateway:

import Iris from '@inog/iris-library-js';

const iris = new Iris({
  baseUrl: 'https://your.iris.url',
});

At first, it must be checked whether a data request for this code exists in the IRIS system. This way also the public key for addressing the correct health office is also obtained

const dataRequest = await iris.getDataRequest('12345-abcd');

Afterwards the data can be sent with the corresponding code

await iris.sendContactsEvents('12345-abcd', { your: 'data' }, { firstName: 'Sending', lastName: 'User' });

Please note: Before being able to call sendContactsEvents with a specific code, the data request must be received first by calling getDataRequest with the same code.

Documentation

Refer to the basic instructions above. More thorough documentation will be added asap.

Changelog

For a list of changes, please refer to the CHANGELOG.

Contributions

Contributions are more than welcome, check our CONTRIBUTING Guide.

Stay in touch

Innovationsverbund Öffentliche Gesundheit

License

MIT licensed.