I am looking to get a handle on the integration options available within OpenEMR. Specifically I am looking to get HL7 data into OpenEMR from other systems (using Mirth probably) and also data out of OpenEMR without polling.
Could anyone give me any pointers on where to start?
Essentially for the incoming side I am looking to configure Mirth to covert HL7 vital sign data and input it into OpenEMR.
For the output side of things I am looking to develop some software that interfaces with OpenEMR and is somehow notified by OpenEMR when something happens such as data being added. In response to that output, I will then generate an output HL7 message.
Just wondering, have you considered the HL7 standards publications at http://www.hl7.org? There is a “caregiver” membership and then standards publications. Also, what is the usage case? I took a look at Mirth www.mirthcorp.com/, but there is a pretty high price tag associated. I think the entangling license/membership requirements are the main reason the HL7 “standard” is not in OpenEMR, because there is some prior attempt at it.
Here is a bit more info on the use case where System X is what I am trying to build
Monitors produce HL7 (cant change that sadly) which goes into OpenEMR
OpenEMR receives HL7 and notifies System X of that vital sign information and who it is for
System X takes that vital sign information and does something with it - lets say it combines certain vital signs into another index somehow (say a “wellness” index)
System X sends that new wellness index back into OpenEMR
The adoption of HL7 really is outside of my control as I want to interface directly with medical monitor devices that all talk HL7.
Perhaps the vendors of your machines will provide an HL7 guide, so their messages can be interpreted. As I understand it, HL7 will have a set of codes or cues that are supposed to be paired with the data item. I am just guessing, but the data will probably be in a text file that is transmitted through a network connection or can be copied onto a thumb drive. OpenEMR had an HL7 reader function somewhere in the code. It did not work, but I guess that was because the HL7 “standard” was not known for the application. I may be mistaken, but I suspect you will need to be able to decipher the HL7 data and then match it to the OpenEMR database table/fields. It all may be doable by writing a few scripts, without a big extra expense. It looks like you are considering Mirth because you don’t know how to handle the HL7 (nor do I), but I think you should actually look at what your machines produce and whether you can write code to interpret it. So much of this type of thing is proprietary, so I doubt you are going to find any plug-n-play type solution.
If you are curious this is an example HL7 message from a Lab Result (test data, not real)
MSH|^~\&|SQ-PLANO|SPECTRUM|TCPCLIENTS|449845|201209131204||ORU^R01|@449845_12257916237|T|2.2
PID|1|12345678|N209450086||LAB^SOLSTAS^S||19000101|M|||||||||||222-22-2222
PV1|1|O|||||^PROVIDER^TEST
ORC|RE||555555551|||||||||^PROVIDER^TEST|||||449845^449845
OBR|1||555555551|2404^BMP with Estimated GFR|||201204031215||||N|||201204031540||^PROVIDER^TEST||CLNT|||SLN|||^|F
NTE|1|L|H,L,CRITICAL Critical result called to, read back by, and
NTE|2|L|verified with: MARY 040312 AT 1545 BY SCOTK (This data in not in the result report)
OBX|1|NM|230005^Sodium||144|mEq/L|135-145|N|||F|||201204031618
OBX|2|NM|230010^Potassium||6.5|mEq/L|3.5-5.3|HH|||F|||201204031618
NTE|1|L|Specimen hemolyzed: test results may be affected (This data is not in the result report below)
OBX|3|NM|230015^Chloride||102|mEq/L|96-112|N|||F|||201204031618
OBX|4|NM|230020^CO2||26|mEq/L|19-32|N|||F|||201204031618
OBX|5|NM|230025^Glucose||33|mg/dL|70-99|LL|||F|||201204031618
OBX|6|NM|230035^BUN||25|mg/dL|6-23|H|||F|||201204031618
OBX|7|NM|230040^Creatinine||2.55|mg/dL|0.40-1.50|H|||F|||201204031618
OBX|8|NM|230105^Calcium||7.4|mg/dL|8.4-10.5|L|||F|||201204031618
OBX|9|ST|231685^Est GFR, African American||>60|mL/min|>60|N|||F|||201204031618
OBX|10|ST|231690^Est GFR, NonAfrican American||>60|mL/min|>60|N|||F|||201204031618
I already have access to the Vendor’s HL7 and a fairly good grasp of HL7 in general. I have written a Mirth channel that extracts the relevant bits of the HL7 - there would be one of these per vendor as they are all different. From each HL7 I get Patient ID/Location (PID/PV1), one or more observation records (ORUs) and one or more observations per ORU (OBXs).
The problem I have is what to do with that once I have it. As an example from another system I have been looking at - OpenMRS - I then take those values and using Mirth, convert them to a web services API call that results in records appearing in OpenMRS. I’m looking for similar functionality in OpenEMR.
On the flip side of the coin, I am them looking to get some kind of notification from OpenEMR when data arrives - maybe another web services call back to Mirth. I can then use that message to generate a HL7 output message from Mirth.
Following your lead, didster, I installed MirthConnect on my Ubuntu server. Quest labs provides a utility that downloads lab reports automatically to any designated directory. These have been available as pdfs for a long time. The other day I called and asked whether they could send hl7 files. They flipped a switch, and there they were!
I played around with Mirth channels and got it to read hl7 files in the download directory and connected the output to the MySQL openemr database. It then allows semi-automated mapping to the relevant files. It looks to me like I’ll want to map selected content (e.g. LDL cholesterol, A1C values to start) into the tables procedure_order, procedure_report and procedure_result.
Quest has their own free online lab ordering program (rudimentary free version of care360) to do the ordering. Ultimately, I’d like to figure out how to configure Mirth to sent hl7 orders TO the lab from procedure_order entries I create from within OpenEMR.
For starters, I think I’ll just create fake procedure_order entry for each procedure_result that comes in, if that proves necessary.
There’s already support for generation of HL7 lab orders and receipt of HL7 results in the master (development) branch on SourceForge. No Mirth required. See the commits dated January 29 here:
Granted that Rod and other gurus have been working on proper lab integration, I have been playing around with Mirth Connect on my server. It allows one to transform/translate information from one format to another - for example hl7, x12, text, MySQL database tables etc. Quest Labs gave me a utility that automatically downloads my lab results in pdf and hl7 formats. While I am accustomed to seeing the printed page, the hl7 files translate easily to database files in OpenEMR. Just as a test of the concept, I set it up to populate all the fields of the pnotes table with sample hl7 lab reports. I hard coded some of the fields and populated others with values from the hl7 report. Each lab report can have several (up to 20?) separately labeled results in a panel, for example. For now I have just written a transformer that looks for 20 results and concatenates them into one text field with descriptions and results separated by semicolons. (Very crude method but allows me to gain experience with the Mirth Connect program perhaps for other applications.) Still haven’t figured out how to reconcile the patient id properly, because the patient ids do not show up on the incoming lab hl7s, and even if they did, I don’t think I could rely on them. Well, it’s at least a learning experience.