Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcomellas/hl7parser
HL7 parser with segment code generators in C
https://github.com/jcomellas/hl7parser
Last synced: about 2 months ago
JSON representation
HL7 parser with segment code generators in C
- Host: GitHub
- URL: https://github.com/jcomellas/hl7parser
- Owner: jcomellas
- License: apache-2.0
- Created: 2013-12-27T22:37:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-27T22:46:57.000Z (about 11 years ago)
- Last Synced: 2024-05-09T21:51:38.472Z (8 months ago)
- Language: C
- Homepage:
- Size: 207 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HL7 Parser
## Overview
The parser is divided into two parts:
1. Low-level functions that implement a tokenizer, lexer, parser,
callback (SAX-like) parser for the [HL7](http://www.hl7.org/) protocol.
2. Custom segment accessors (code-generated by `hl7segdef.py`).This HL7 parser was designed for a memory-constrained hardware environment
and thus avoids allocating memory as much as possible. This makes its
interface weird at times, and care must be taken to avoid overwriting memory
that is in use by a message (e.g. modifying a parsed buffer while the
resulting message is still in use).## Requirements
The HL7 parser has no runtime dependency other than the standard C library,
but it requires [qmake](http://qt-project.org/wiki/Category:Tools::qmake)
from the [Qt project](http://www.qt-project.org/) to generate its makefiles.## Installation
To install qmake in Ubuntu/Debian you can run:
```
apt-get install libt4-dev qt4-qmake
```
Then run:
```
cd hl7parser
./configure
make
sudo make install
sudo ldconfig
```
This will install the dynamic libraries and headers for the project in
`/usr/local`. You can test the behavior of the library by using the
following programs:
```
bin/test_lexer
bin/test_cbparser
bin/test_parser
bin/test_segment
```## Custom segments
The segment accessors are defined in an XML file (`hl7segdef.xml`) and are
auto-generated by a Python script (`hl7segdef.py`). The code used to access
the segments is already included in the project (see the `src/seg_*.c` and
the `include/hl7parser/seg_*.h` files). If you need to modify the segment
definitions, just remove these files, modify the XML file and run the script
like this:
```
python ./hl7segdef.py
```