简体   繁体   English

使用Hapi以外的Java的HL7 2.7版解析器

[英]HL7 version 2.7 parser using java except Hapi

Is there any good parser which can parser HL7 V2.7 message using Java except HAPI. 除了HAPI之外,是否有任何好的解析器都可以使用Java解析HL7 V2.7消息。 My goal is to convert the message into a XML file. 我的目标是将消息转换为XML文件。

this http://www.dcm4che.org/confluence/display/ee2/Home open source Java software can receive various HL7 messages through the MLLP protocol, convert them to XML, run through XSLT transformer and then load them into database and serve to DICOM clients as needed. 这个http://www.dcm4che.org/confluence/display/ee2/Home开源Java软件可以通过MLLP协议接收各种HL7消息,将它们转换为XML,通过XSLT转换器运行,然后将其加载到数据库中并用于DICOM客户根据需要。 In order to do this in the code base there is the HL7->XML code. 为了在代码库中执行此操作,请使用HL7-> XML代码。 Just find it, copy/paste it and use it. 只需找到它,将其复制/粘贴并使用即可。

Once I knew where exactly this code is as I was troubleshooting message character set problem. 一旦我知道了这段代码的确切位置,就可以解决消息字符集问题。 At that time I have found that the HL7 parser is rather simple-minded and can understand only 1 character set provided in the configuration. 那时我发现HL7解析器思想很简单,只能理解配置中提供的1个字符集。 It does not read/use character set (MSH-18, Table 0211, Grahame Grieve's encoding tips ) provided in the messages neither does it support switching character sets during the message decoding (see chapter "Escape sequences supporting multiple character sets" in HL7 specification). 它不读取/不使用消息中提供的字符集(MSH-18,表0211, Grahame Grieve的编码技巧 ),也不支持在消息解码期间切换字符集(请参阅HL7规范中的“支持多个字符集的转义序列”一章) )。

So I know the parser code is there. 所以我知道解析器代码在那里。 It is in Java. 它是在Java中。 It produces XML inputs for the customer-specific XSLT transformation script. 它为特定于客户的XSLT转换脚本生成XML输入。 It should be quite easy to reuse. 它应该很容易重用。

You should be able to find it by yourself. 您应该可以自己找到它。 Otherwise your question would turn out as plain finding a tool §4 is an off-topic :) 否则,您的问题就会变成简单地找到工具§4是不合时宜的:)

There is my own open source alternative called HL7X , which does work with any HL7v2 version. 我有一个自己的开源替代品HL7X ,它可以与任何HL7v2版本一起使用。 It converts your HL7 String into a XML String. 它将您的HL7字符串转换为XML字符串。

Example: 例:

MSH|^~\&|||||20121116122025||ADT^A01|5730224|P|2.5||||||UNICODE UTF-8
EVN|A01|20130120151827
PID||0|123||Name^Firstname^^^^||193106170000|w
PV1||E|

Gets transformed to 转化为

<?xml version="1.0" encoding="UTF-8"?>
<HL7X>
<HL7X>
    <MSH>
        <MSH.1>^~\&amp;</MSH.1>
        <MSH.6>20121116122025</MSH.6>
        <MSH.8>
            <MSH.8.1>ADT</MSH.8.1>
            <MSH.8.2>A01</MSH.8.2>
        </MSH.8>
        <MSH.9>5730224</MSH.9>
        <MSH.10>P</MSH.10>
        <MSH.11>2.5</MSH.11>
        <MSH.17>UNICODE UTF-8</MSH.17>
    </MSH>
    <EVN>
        <EVN.1>A01</EVN.1>
        <EVN.2>20130120151827</EVN.2>
    </EVN>
    <PID>
        <PID.2>0</PID.2>
        <PID.3>123</PID.3>    
        <PID.5>
            <PID.5.1>Name</PID.5.1>
            <PID.5.2>Firstname</PID.5.2>
        </PID.5>
        <PID.7>193106170000</PID.7>
        <PID.8>F</PID.8>
    </PID>
    <PV1>
        <PV1.2>E</PV1.2>            
    </PV1>
</HL7X>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM