0.0.5 • Published 8 months ago

@ornament-health/lab-reports v0.0.5

Weekly downloads
-
License
private
Repository
github
Last release
8 months ago

Ornament WebSDK

This library provides easy access to Ornament API for external patient portals.

Table of contents

How to use

  1. Register at Ornament Pro and copy your API key from account settings page here

  2. Install the library with your package manager

npm i --save @ornament-health/lab-reports
// or
yarn add @ornament-health/lab-reports

Also you can add this script to your HTML file

<script src="https://unpkg.com/@ornament-health/lab-reports"></script>

And window.OrnamentSDK will be available for usage.

  1. Import OrnamentSDK and initialize it with API key that you obtained earlier
import OrnamentSDK from '@ornament-health/lab-reports';

interface Config {
  apiKey: string;
}
OrnamentSDK.init(config);

Check out Config docs here

  1. Now you are able to send lab reports for digitization using send() method:
OrnamentSDK.send({
  email: 'my-patient@mail.com',
  name: 'John Smith',   // optional
  age: 59,              // optional
  sex: 'M',             // optional
  urls: [
    'https://some.site/my_lab_report_1.pdf',
    'https://some.site/my_lab_report_2.pdf',
    'https://some.site/my_lab_report_3.pdf',
  ]
});

// or uploading files directly:

OrnamentSDK.send({
  email: 'my-patient@mail.com',
  name: 'John Smith',   // optional
  age: 59,              // optional
  sex: 'M',             // optional
  files: [
    blob1,
    blob2,
  ]
});

This method will send PDF files from provided links to the Ornament API. If user with given e-mail does not exist, it will be created and connected to your account. Digitized lab reports will be displayed in the Lab Reports section of the patient with given e-mail. name, age and sex are optional params.

Full docs for send() method here

Documentation

Full documentation can be accessed here

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

9 months ago