-->

HL7 to JSON conversion

2019-04-02 17:39发布

问题:

I am trying to convert hl7 to json, but I am not able to find any solutions. Is there any way to achieve this? I found that FHIR is capable of converting to json but I didn't find any examples.

回答1:

I just had to deal with converting HL7 messages to JSON for some of the work I'm doing and decided to write up the basics here. It's two simple helper methods around the hl7apy python library.

http://www.prschmid.com/2016/11/converting-adt-hl7-message-to-json.html

Hope it helps and addresses your needs!



回答2:

Here is a suggestion:

  1. Download and Install Mirth Connect
  2. Create a new channel
  3. Under the "Scripts" tab, select "preprocessor"
  4. Use the following to convert the HL7 message to XML:

// Modify the message variable below to pre process data
message = SerializerFactory.getSerializer('HL7V2').toXML(message);
    
return message;

  1. Now you have the XML file in the variable message, so you can write inline code to convert it to JSON without a library from here: https://davidwalsh.name/convert-xml-json


回答3:

For example, you can manualy convert hl7 to json using jut JUT examples and js implementation