问题
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:
- Download and Install Mirth Connect
- Create a new channel
- Under the "Scripts" tab, select "preprocessor"
- 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;
- 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
来源:https://stackoverflow.com/questions/40152674/hl7-to-json-conversion