nh

nodengine-hl7

HL7 parser for nodengine

Showing:

Popularity

Downloads/wk

52

GitHub Stars

22

Maintenance

Last Commit

5yrs ago

Contributors

4

Package

Dependencies

4

Size (min+gzip)

1.9KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

nodengine-hl7

Build Status Coverage Status

A hl7 parser

Installation

$ npm install --save nodengine-hl7

or install globally for the CLI tool

$ npm install -g nodengine-hl7
$ ne-hl7 --help
ne-hl7 - a streaming parser for hl7 messages

    usage: ne-hl7 [options]

    options:

      -h, --help                  show help and usage
      -l, --loglevel <level>      set log level
      -f, --file <file>           parse file
      -s, --segments              only show segment types
      -c, --count                 print message count
      -j, --json                  output in json
      -v, --version               show version

Unit Tests

To run tests:

$ npm test

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

API

Parser

Constructor


Message

Constructor

Params
NameType(s)Description
segmentsArray, SegmentA 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
NameType(s)Description
segmentSegmentThe 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
NameType(s)Description
dataBuffer, StringThe segment

utils.segmentIsHeader()

Is the given segment a header segment?

Params
NameType(s)Description
segmentSegmentA Segment object

utils.segmentTypeIsHeader()

Is the given segment type a header segment?

Params
NameType(s)Description
typeStringThe segment type

License

MIT (See LICENSE for more info)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100