blue-button-fhir
FHIR to Blue Button Model Translator
This library translates an array of FHIR resources to blue button model.
Currently the following resources are supported
- Allergy Intolerance
- Adverse Reaction and Substance resources that are externally referenced from any Allergy Intolerance resource is assumed to be in the input array of resources.
- Condition
- Medication Administration
- Medication and Medication Prescription resources that are externally referenced from any Medication Administration resource is assumed to be in the input array resources.
- Medication Prescription
- Medication resources that are externally referenced from any Medication Prescription resource is assumed to be in the input array resources.
- Observation
- Observation resources are assumed to have an extension->valueCoding element that defines the LOINC description of the type of the resource. Vitals (code - 8716-3) and Results (code - 11502-2) are supported.
Usage
Require blue-button-fhir module
var bbfhir = require("blue-button-fhir");
and translate an array of resources
var model = bbfhir.toModel(input);
Only allergies, vitals, results, medications and problems sections of blue button data are filled.
console.log(model.data.allergies);
console.log(model.data.vitals);
console.log(model.data.results);
console.log(model.data.medications);
console.log(model.data.problems);