A hl7 parser
$ npm install --save nodengine-hl7or 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 versionTo run tests:
$ npm testNOTE: All hl7 test fixtures are samples taken from various places on the internet
Constructor
Constructor
| Name | Type(s) | Description |
|---|---|---|
| segments | Array, Segment | A single Segment or an array of Segments |
Does this message have any segments?
Adds the given segment to the message
| Name | Type(s) | Description |
|---|---|---|
| segment | Segment | The Segment to add to the message |
Gets the header Segment of the Message
Gets the delimiters for the given message. These are taken from the MSH
Constructor
Parses data as a hl7 segment
| Name | Type(s) | Description |
|---|---|---|
| data | Buffer, String | The segment |
Is the given segment a header segment?
| Name | Type(s) | Description |
|---|---|---|
| segment | Segment | A Segment object |
Is the given segment type a header segment?
| Name | Type(s) | Description |
|---|---|---|
| type | String | The segment type |
MIT (See LICENSE for more info)
