Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

HL7 Intergration

Developers
2012-10-15
2013-04-06
  • Simon Didcote
    Simon Didcote
    2012-10-15

    Hello,

    I am new to OpenEMR so please bear with me.

    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.

    Many thanks

     
  • 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.

     
  • Simon Didcote
    Simon Didcote
    2012-10-17

    Hi,

    Thanks for your response.

    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.

    Cheers

     
  • 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.

    Good luck

     
  • Tony McCormick
    Tony McCormick
    2012-10-17

    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
    
     
  • Simon Didcote
    Simon Didcote
    2012-10-18

    Hi,

    Many thanks for your responses.

    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.

    Sorry if my questions wasn't clear

     
  • 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.

    Has anybody else done this?

     
  • Rod Roark
    Rod Roark
    2013-02-07

    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:

    https://github.com/openemr/openemr/commits/master?page=2

    A bit of extra work will be required for each new lab, but the hard stuff is done.

    Rod
    www.sunsetsystems.com

     
  • Thank you, Rod.  I'll check that out. (But now that I have mirth up and running, I won't be able to resist tinkering with that too.)

    Ron Leemhuis

     
  • Kevin Yeh
    Kevin Yeh
    2013-02-07

    Another possibility for ordering labs would be to implement a bridge similar to the greasemonkey scripts for Allscripts.  

     
  • 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.

    Ronald Leemhuis