wso2esb - WSO2 ESB HL7 处理
问题描述
我目前正在构建一个处理 HL7 的中介流程。我通过 MLLP 收到 HL7。然后我将消息克隆成两部分。在第一个中,我过滤了运行良好的消息类型。然后我只想将消息转发到 MLLP 系统,但我不知道该怎么做。在第二部分中,我想将 HL7 写在一个目录中。我可以创建一个文件,但内容是用 xml 而不是 hl7 格式编写的。这是我的序列的内容:
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="NormalSeq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<propertyGroup>
<property expression="//hl7:MSG.1[1]/text()" name="HL7_TYPE" scope="default" type="STRING" xmlns:hl7="urn:hl7-org:v2xml"/>
<property expression="//hl7:MSG.2[1]/text()" name="HL7_SUBTYPE" scope="default" type="STRING" xmlns:hl7="urn:hl7-org:v2xml"/>
</propertyGroup>
<clone>
<target>
<sequence>
<log>
<property name="ROUTE" value="MED_EQUIPMENT"/>
</log>
<filter regex="true" source="get-property('HL7_TYPE') = 'ADT' and get-property('HL7_SUBTYPE') = 'A04'">
<then>
<log>
<property name="FOR_MED_EQU" value="YES"/>
</log>
<call>
<endpoint key="HL7MEDEQU"/>
</call>
</then>
<else>
<log>
<property name="FOR_MED_EQU" value="NO"/>
</log>
<drop/>
</else>
</filter>
</sequence>
</target>
<target>
<sequence>
<propertyGroup>
<property name="ROUTE" scope="default" type="STRING" value="LAB"/>
<property expression="fn:concat(get-property('SYSTEM_DATE', 'yyyyMMdd.HHmmssSSS'), '.hl7')" name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
</propertyGroup>
<log>
<property expression="get-property('transport.vfs.ReplyFileName')" name="FILENAME"/>
<property expression="fn:concat(get-property('SYSTEM_DATE', 'yyyyMMdd.HHmmssSSS'), '.hl7')" name="SYSDATE"/>
</log>
<send>
<endpoint key="HL7_Lab_EP"/>
</send>
</sequence>
</target>
<target>
<sequence/>
</target>
</clone>
</sequence>
这是入站内嵌的代码:
<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="HL7GW" onError="FaultSeq" protocol="hl7" sequence="NormalSeq" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
<parameters>
<parameter name="inbound.hl7.Port">2000</parameter>
<parameter name="inbound.hl7.AutoAck">true</parameter>
<parameter name="inbound.hl7.TimeOut">10000</parameter>
<parameter name="inbound.hl7.CharSet">UTF-8</parameter>
<parameter name="inbound.hl7.ValidateMessage">true</parameter>
<parameter name="inbound.hl7.BuildInvalidMessages">true</parameter>
<parameter name="inbound.hl7.PassThroughInvalidMessages">true</parameter>
</parameters>
</inboundEndpoint>
这是端点代码:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="HL7_ECG_EP" xmlns="http://ws.apache.org/ns/synapse">
<address uri="hl7://localhost:2001">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="HL7_Lab_EP" xmlns="http://ws.apache.org/ns/synapse">
<address uri="vfs:file:///c:/temp/hl7">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
总而言之,我想: 1. 在 ESB 外部的系统上以 MLLP 发送 HL7 2. 将这些 HL7 保存在 HL7 格式而不是 XML 的目录中,如下所示:
MSH|^~\&|HL7Soup|Instance1|HL7Soup|Instance2|200808181126|SECURITY|ADT^A04|MSG00001|P|2.5.1
EVN|A01-|200808181123|
PID||77291|PATID1234^9^55A||Smith^Willian^A^III||19720415|M-||2106-3|555 Upper Harbour Rd^^Springfield^NC^3401-540|NN|(919)479-4354|(919)371-654~(919)377-3455||S|AGN|PATID12345001^2^R10|1234567890|A-84334^NC
NK1|1|Smith^Barbara^K|SPO|||||20011105
NK1|1|Smith^Bill^A|FTH
PV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||-||1|A0-
AL1|1||^PENICILLIN||PRODUCES HIVES~RASH
AL1|2||^CAT DANDER
DG1|001|I9|1550|MAL NEO LIVER, PRIMARY|20080501103005|F||
PR1|2234|M11|111^CODE151|COMMON PROCEDURES|200809081123
ROL|45^RECORDER^ROLE MASTER LIST|AD|CP|34622^SMITH^JILL|200805011201
GT1|1122|1519|BILL^GATES^A
IN1|001|A357|1234|BCMD|||||132987
IN2|ID1551001|SSN12345678
任何帮助将不胜感激。
解决方案
经过几次测试,我终于设法使 hl7 消息的记录以 hl7 格式而不是 XML 文件的形式工作。
我必须在服务器(WSO2 Enterprise Integrator 6.5.0)上部署 ESB 解决方案并激活该服务器上 axis2.xml 文件中的 HL7。
不知为何,如果我修改了 WSO2 Integration Studio 的axis2.xml 文件,一旦我在WSO2 Integration Studio 中启动解决方案,配置文件就会恢复到之前的状态。无论文件中的修改如何,都会发生这种情况。即使您添加了简单的注释,文件也会直接返回到其原始版本。
推荐阅读
- postgresql - 如何从 Knex / Postgresql 查询中返回纯值?
- android - 我正在使用适用于 Agora.io 的 Android SDK 并尝试实现实时音频广播。出现错误
- c# - 如何使用实体框架执行左外连接
- ios - 使用来自 GoogleService-Info.plist 的信息访问 Firebase 前端
- peoplesoft - HCM 完全数据同步到 FSCM 不发布数据
- sql-server - TCP 握手后 JDBC 连接到 MSSQL 服务器失败
- android - 签名不匹配 - 尝试测试更新
- batch-file - 用户输入后意外退出
- javascript - 使用 Vue.js 确定放置坐标是否在另一个元素上?
- java - 通过从文件中读取字节数从目录生成哈希