HL7 to JSON conversion

2019-04-02 17:11发布

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.

3条回答
Bombasti
2楼-- · 2019-04-02 17:46

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!

查看更多
够拽才男人
3楼-- · 2019-04-02 17:59

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

查看更多
戒情不戒烟
4楼-- · 2019-04-02 18:01

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
查看更多
登录 后发表回答