如何将HL7 ACK发送回mule中的源应用程序

时间:2016-10-27 19:30:44

标签: mule mule-component

我有HL7 MLLP连接器传入的HL7消息。我正在使用HAPI测试面板发送HL7消息。我想将确认发送回HAPI测试面板。 HL7 ACK节点应该连接在哪里?如果我将它连接到流程中的任何地方,我都看不到ACK。 下面是我的配置xml

<hl7:endpoint host="localhost" port="50609" name="HL7_MLLP" responseTimeout="10000" doc:name="HL7 MLLP"/>
    <json:object-to-json-transformer name="Object_to_JSON" doc:name="Object to JSON"/>
    <http:request-config name="HTTP_Request_Configuration" host="localhost" port="8081" basePath="/api" connectionIdleTimeout="10000000" doc:name="HTTP Request Configuration"/>
    <flow name="wsconsumerFlow">
        <hl7:inbound-endpoint host="localhost" port="50609" tracking:enable-default-events="true" responseTimeout="10000"  doc:name="HL7 MLLP" metadata:id="1c7409bf-e286-4e3d-8e48-3dea6888f554" exchange-pattern="request-response"/>
        <hl7:hl7-encoding-transformer hl7Encoding="XML" validation="WEAK" metadata:id="1b0e4ffa-cb7c-4a40-a84d-f11208d5e586" doc:name="HL7 Encoding Transformer"/>
        <json:xml-to-json-transformer doc:name="XML to JSON"/>
        <dw:transform-message metadata:id="f4713091-d51d-4345-a887-d91acca250f7" doc:name="Transform Message">
            <dw:input-payload doc:sample="N:\Neha\Patient POC\patientData.json" mimeType="application/json"/>
            <dw:set-payload><![CDATA[%dw 1.0
%output application/json
---
{
    "PID": payload.ADT_A01.PID."PID.3"."CX.1",
    "FamilyName": payload.ADT_A01.PID."PID.5"."XPN.1"."FN.1",
    "GivenName": payload.ADT_A01.PID."PID.5"."XPN.2",
    "DateTimeOfBirth": payload.ADT_A01.PID."PID.7",
    "Sex": payload.ADT_A01.PID."PID.8",
    "Race": payload.ADT_A01.PID."PID.10"."CWE.1",
    "Street": payload.ADT_A01.PID."PID.11"."XAD.1"."SAD.1",
    "City": payload.ADT_A01.PID."PID.11"."XAD.3",
    "State": payload.ADT_A01.PID."PID.11"."XAD.4",
    "Country": payload.ADT_A01.PID."PID.12",
    "Phone": payload.ADT_A01.PID."PID.13"."XTN.1",
    "MaritalStatus": payload.ADT_A01.PID."PID.16"."CWE.1",
    "SSN": payload.ADT_A01.PID."PID.19"
}]]></dw:set-payload>
        </dw:transform-message>
        <http:request config-ref="HTTP_Request_Configuration" path="/PatientAdmission" method="POST" doc:name="HTTP">
            <http:success-status-code-validator values="200"/>
        </http:request>
        <logger message="Back to consumer" level="INFO" doc:name="Logger"/>
        <hl7:exception-strategy doc:name="HL7 Exception Strategy"/>
    </flow>
</mule>

1 个答案:

答案 0 :(得分:0)

通常,在检查收到的原始HL7 message格式错误,缺失数据和其他错误后,将返回确认。然后接收者/消费者将生成相应的ACK消息。在mule中使用ACK代是

<hl7:ack-component ackCode="AA" validation="STRONG" doc:name="HL7 ACK"/>

允许的ACK代码为:

  • AA:申请接受
  • AE:应用程序错误
  • AR:应用程序拒绝

尝试添加上述代码段代替hl7-exception代码。

HTH