fhir-proof
v0.4.0
Published
typed javascript classes for fhir
Downloads
4
Readme
FhirProof
This library provides a (very small atm) subset of javascript classes for the HL7 FHIR standard.
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.