Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blue-button-gen-fhir

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blue-button-gen-fhir

FHIR generation from blue-button model

  • 1.6.0-beta.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
5
Weekly downloads
 
Created
Source

blue-button-gen-fhir

Blue Button Model To FHIR Translator

NPM

Build Status Coverage Status

This library translates health data in blue button model to a FHIR Bundle Resource. Currently the following sections are supported

  • Demographics
  • Medications
  • Problems
  • Vitals
  • Results
  • Allergies

Usage

Require blue-button-gen-fhir

var mtfhir = require('blue-button-gen-fhir');

read in some content that can be parsed by blue-button

var fs = require('fs');

var filePath = 'path/to/ccdafile.xml';
var content = fs.readFileSync(filePath, 'utf8');

translate the content to a FHIR Bundle resource

var bundle = mtfhir.contentToFHIR(content);
console.log(bundle);	

You can also pass a Patient resource to contain patient references. In this case demographics section is ignored

var patientEntry = {
    id: 'Patient/123456789'
    content: {
        resourceType: Patient,
        name: [{
            family: [
                "DOE"
            ],
            given: [
                "JOE"
            ]
        }]
    }
};

mtfhir.contentToFHIR(content, patientEntry);

and all the patient references in the Bundle will be updated. Otherwise the patient references are assigned from the newly created patient resource.

By default Medication and Substance resources are included as internal resources. You can request them as external resources instead

var externalize=true;
mtfhir.contentToFHIR(content, patientEntry, externalize);

Configuration

This project is configured by editing the lib/config.json file. There are two configuration items

  • logging: See bunyan for configuration options.
  • ccdaVitalSignPanel: Observation resources that are created for vitals can be put into a Observation panel. This item defines vital panels and which vitals will be in the panels.

Testing

Mocha and Grunt are used for testing this project. Simply run grunt in the project directory to run all the tests.

License

Licensed under Apache 2.0.

Keywords

FAQs

Package last updated on 26 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc