@ornament-health/lab-reports
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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

/@ornament-health/lab-reports/

    Package Sidebar

    Install

    npm i @ornament-health/lab-reports

    Weekly Downloads

    1

    Version

    0.0.5

    License

    private

    Unpacked Size

    288 kB

    Total Files

    27

    Last publish

    Collaborators

    • maxim.murugin