0

I have wrote a simple HL7 message parser which is capable of parsing any message type. What it can't do is to validate the message.

The result of the message parsing is a tree which is easily traversable.

Now I want to improve the parser. I want it to be able to apply validation rules to the received message. I am thinking of using XML as a message definition. I am stuck on which approach to take. I am not sure if this makes sense.

Have you ever written a parser not necessarily for HL7 message where you had to apply schema to the message? How did you do that?

Thank you

3

1 Answer 1

0

You could roll your own solution. However there is a library out there that already does this quite well: https://hapifhir.github.io/hapi-hl7v2/ Usually those home-made solutions have all kinds of problems with intricacies of HL7 (quoting, non-standard delimiters, etc).

1
  • I am aware of hapi. I don't want to use hapi. I want to write my own. In order to do that I need to be able to define HL7 messages and for that I picked XML.
    – svager
    Mar 28, 2018 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.