plasma-fhir-backend-utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

plasma-fhir-backend-utils

Utility functions and APIs to help with building backend apps for NodeJS.

Installation

yarn add plasma-fhir-backend-utils

Usage

Create a PlasmaFHIRApi instance:

import { plasmaForBackend } from "plasma-fhir-backend-utils";
import { PlasmaFHIRApi, Resources } from "plasma-fhir-app-utils";

const plasma: PlasmaFHIRApi = await plasmaForBackend(iss, privateKey, clientId, tokenUrl);

plasma.readResource<Resources.Immunization>("Immunization",  { "patient": patientId })
    .then((immunizations: Resources.Immunization[]) => {
        console.log("Immunizations", immunizations);
    });

Development

Build

  • yarn build
    • or tsc if that doesn't work

Unit Tests

  • yarn test

Publish/Deploy

  • yarn build
  • yarn test
    • Windows: npx mocha -r ts-node/register tests/**/*.spec.ts
  • Login as plasmafhir
  • Increment version
  • npm publish

Readme

Keywords

none

Package Sidebar

Install

npm i plasma-fhir-backend-utils

Weekly Downloads

1

Version

0.0.7

License

none

Unpacked Size

10.1 kB

Total Files

8

Last publish

Collaborators

  • plasmafhir