npm install nodengine-hl7

A hl7 parser
sh
$ npm install --save nodengine-hl7
`or install globally for the CLI tool
`bash
$ 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 set log level
-f, --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:
`bash
$ npm test
`NOTE: All hl7 test fixtures are samples taken from various places on the internet
API
$3
Constructor
*
$3
Constructor
##### Params
| Name | Type(s) | Description |
| ---- | ------- | ----------- |
| segments | Array, Segment | A single Segment or an array of Segments |
*
$3
Does this message have any segments?
*
$3
Adds the given _segment_ to the message
##### Params
| Name | Type(s) | Description |
| ---- | ------- | ----------- |
| segment | Segment | The Segment to add to the message |
*
$3
Gets the header Segment of the Message
*
$3
Gets the delimiters for the given message. These are taken from the MSH
*
$3
Constructor
*
$3
Parses _data_ as a hl7 segment
##### Params
| Name | Type(s) | Description |
| ---- | ------- | ----------- |
| data | Buffer, String | The segment |
*
$3
Is the given _segment_ a header segment?
##### Params
| Name | Type(s) | Description |
| ---- | ------- | ----------- |
| segment | Segment | A Segment object |
*
$3
Is the given segment _type_ a header segment?
##### Params
| Name | Type(s) | Description |
| ---- | ------- | ----------- |
| type | String | The segment type |
License
MIT (See
LICENSE` for more info)