awinder / nodengine-hl7

HL7 parser for nodengine

Home Page:https://evanlucas.github.io/nodengine-hl7/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nodengine-hl7

Build Status

A hl7 parser

Installation

$ npm install --save nodengine-hl7

Unit Tests

To run tests:

$ npm test

NOTE: All hl7 test fixtures are samples taken from various places on the internet

To generate code coverage:

$ npm run cover

API

Parser

Constructor


Message

Constructor

Params
Name Type(s) Description
segments Array, Segment A single Segment or an array of Segments

Message.hasSegments()

Does this message have any segments?


Message.addSegment()

Adds the given segment to the message

Params
Name Type(s) Description
segment Segment The Segment to add to the message

Message.getHeader()

Gets the header Segment of the Message


Message.delimiters()

Gets the delimiters for the given message. These are taken from the MSH


Segment

Constructor


Segment.parse()

Parses data as a hl7 segment

Params
Name Type(s) Description
data Buffer, String The segment

utils.segmentIsHeader()

Is the given segment a header segment?

Params
Name Type(s) Description
segment Segment A Segment object

utils.segmentTypeIsHeader()

Is the given segment type a header segment?

Params
Name Type(s) Description
type String The segment type

Development (This is just what I use :])

homebrew

  • To install, copy and paste the below into Terminal, hit enter, and follow the onscreen instructions
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

node.js

Xcode (including command line tools)

  • Download from the App Store
  • To install command line tools, open Terminal and run:
$ git

About

HL7 parser for nodengine

https://evanlucas.github.io/nodengine-hl7/


Languages

Language:JavaScript 100.0%