tags:

views:

1519

answers:

4
+1  Q: 

HL7 parsing in PHP

Hi all,

I'm looking into options for parsing HL7 messages via PHP. I'm aware of the Net_HL7 package on PEAR but to be perfectly honest, I don't think that I want to base my code around a seemingly 'abandoned' package and even if I did, I just don't think that my brain suits the functions 'correctly'. Maybe if I had more of an HL7 background it would make a bit more sense, I don't know.

Anyway: I'm guessing that 95% of the time, I'm going to be parsing and reading data from messages. The other 5%, I'll be creating and/or sending messages.

I don't necessarily need to do any form of validation on the messages themselves, I just need to pull/push data.

I definitely need support for 'non-XML' HL7 v2.x, but naturally XML-based v2 and v3 would be a bonus.

So does anyone have any suggestions as to other libraries that I might use? I'm looking for pure PHP solutions as I want to have minimal requirements on the server that aren't "copy this directory here".

Thanks!

+2  A: 

Depending on how much hl7 work you need done you can either roll your own, or try integrating with tools that provide an interface in a lower level language (like C++) and build some sort of php wrapper around it.

The company I work at does provide an hl7 parsing/mapping tool, but without the php interface. At the very least looking at the manual will give you a good overview of hl7 and how hard it will be to write your own hl7 parser.

Snazzer
Thanks for the reply, Snazzer. In fact, Interfaceware has been a great resource for my learning and so on. It's unfortunate that Chameleon doesn't have a PHP interface as we were looking at it at one point. In the end, I think I'm going to write my own with a view to open sourcing it. I may hit you up with some questions along the way though :)
Narcissus
YEa, at a time we did have a php interface but we dropped it due to lack of interest...that was years ago though. Now we push Iguana, which is more of a end user product that does what most people would typically code themselves when using Chameleon.
Snazzer
A: 

If you want a open source solution for hl7 parsing then I recommend Mirth. You can check out how Mirth does its' hl7 parsing by checking out the source code. good luck.

bradd
A: 

Dear Narcissus:

The "pure PHP solutions" for HL7 parsing, do u find out or made ur own already? could u share it. tks anyway :)

orson
Hi orson: I ended up writing my own 'read-only' implementation in pure PHP. I'm hoping to find some time soon to make it 'read-write' but I'm not sure when that will happen. I also have to talk to management about releasing the code (I'm pretty sure they're happy to license it right now, but not necessarily open source it)... so I guess you should just keep bugging me until I bug them enough about it, too.
Narcissus
A: 

Hi,

I am wondering if you ever completed this, or if there is anything I can see related to it? I need to start parsing basic Hl7 messages for scheduling hopefully using only php.. thank you.

samuel morhaim
I guess the answer is 'yes', I completed it. Unfortunately at this point, it's not really 'available'. I'm reworking some of it at the moment to make it support 'writes' and when it's complete, I will discuss options with my employer... that's all I can report, I'm afraid. I will, however, update this thread once I know what we can do with it.
Narcissus