Skip to content

janstuemmel/fhir-proof

Repository files navigation

Build Status Test Coverage npm version

FhirProof

This library provides a (very small atm) subset of javascript classes for the HL7 FHIR standard.

FhirProof_UML

Install

npm install fhir-proof --save

run tests with npm test

Usage

import { Resources, Types } from 'fhir-proof';

const { Observation } = Resources;
const { CodeableConcept, Coding } = Types;


const c = Coding({
  system: 'http://loinc.org',
  code: '8302-2',
  display: 'height'
});

const cc = CodeableConcept({
  text: 'Height',
  coding: [ c ]
});

const o = Observation({
  id: '1',
  status: 'final',
  code: cc
});

// will throw an error because foo is no observation status code
const o2 = Observation({ status: 'foo' });

Please look in the tests directory for more usage examples.

About

javascript models and verification for fhir resources

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published