|
|
|
@ -19,6 +19,7 @@ import java.util.Date;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* HIP1010-检验报告新增服务
|
|
|
|
|
*
|
|
|
|
|
* @author jiahsi
|
|
|
|
|
*/
|
|
|
|
|
@Service(WebserviceMessageType.HIP1010)
|
|
|
|
@ -55,15 +56,17 @@ public class HIP1010LaboratoryReportAdditionHandler implements WebserviceReceive
|
|
|
|
|
Node senderNode = xmlUtil.getNode("/PRPA_HIP1010/sender/device/id/item/@extension");
|
|
|
|
|
String sender = senderNode.getNodeValue();
|
|
|
|
|
String zdAssortId = ZdAssortConfig.getZdAssortId(sender);
|
|
|
|
|
if(Func.isBlank(zdAssortId)){
|
|
|
|
|
zdAssortId=ZdAssortConfig.getOtherAssortId();
|
|
|
|
|
if (Func.isBlank(zdAssortId)) {
|
|
|
|
|
zdAssortId = ZdAssortConfig.getOtherAssortId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Node inpatientNoNode = xmlUtil.getNode("/PRPA_HIP1010/controlActProcess/subject/encounterEvent/inpNo");
|
|
|
|
|
String inpatientNo = inpatientNoNode.getTextContent();
|
|
|
|
|
String inpatientNoNodeTextContent = inpatientNoNode.getTextContent();
|
|
|
|
|
String inpatientNo = Func.isBlank(inpatientNoNodeTextContent) ? "-1" : inpatientNoNodeTextContent;
|
|
|
|
|
|
|
|
|
|
Node admissTimesNode = xmlUtil.getNode("/PRPA_HIP1010/controlActProcess/subject/encounterEvent/visitId");
|
|
|
|
|
Integer admissTimes = Integer.valueOf(admissTimesNode.getTextContent());
|
|
|
|
|
String admissTimesNodeTextContent = admissTimesNode.getTextContent();
|
|
|
|
|
Integer admissTimes = Func.isBlank(admissTimesNodeTextContent) ? -1 : Integer.parseInt(admissTimesNodeTextContent);
|
|
|
|
|
|
|
|
|
|
// 检查报告单号标识
|
|
|
|
|
Node reportFlagNode = xmlUtil.getNode("/PRPA_HIP1010/controlActProcess/subject/encounterEvent/id[@root='2.16.156.10011.1.33']/@extension");
|
|
|
|
@ -105,8 +108,8 @@ public class HIP1010LaboratoryReportAdditionHandler implements WebserviceReceive
|
|
|
|
|
public String insertSuccess(String msgId, String sender, String receiver) {
|
|
|
|
|
String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
|
|
|
|
|
return "<MCCI_IN000002UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/MCCI _IN000002UV01.xsd\">" +
|
|
|
|
|
"<id extension=\""+ IdUtil.standardUUID()+"\"/>" +
|
|
|
|
|
"<creationTime value=\""+createTime+"\"/>" +
|
|
|
|
|
"<id extension=\"" + IdUtil.standardUUID() + "\"/>" +
|
|
|
|
|
"<creationTime value=\"" + createTime + "\"/>" +
|
|
|
|
|
"<interactionId root=\"2.16.840.1.113883.1.6\" extension=\"MCCI_IN000002UV01\"/>" +
|
|
|
|
|
"<processingCode code=\"P\"/>" +
|
|
|
|
|
"<processingModeCode/>" +
|
|
|
|
@ -127,7 +130,7 @@ public class HIP1010LaboratoryReportAdditionHandler implements WebserviceReceive
|
|
|
|
|
"</sender>" +
|
|
|
|
|
"<acknowledgement typeCode=\"AA\">" +
|
|
|
|
|
"<targetMessage>" +
|
|
|
|
|
"<id extension=\""+msgId+"\"/>" +
|
|
|
|
|
"<id extension=\"" + msgId + "\"/>" +
|
|
|
|
|
"</targetMessage>" +
|
|
|
|
|
"<acknowledgementDetail>" +
|
|
|
|
|
"<text value=\"成功\"/>" +
|
|
|
|
@ -147,8 +150,8 @@ public class HIP1010LaboratoryReportAdditionHandler implements WebserviceReceive
|
|
|
|
|
public String insertFailed(String msgId, String sender, String receiver, String failedMessage) {
|
|
|
|
|
String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
|
|
|
|
|
return "<MCCI_IN000002UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/MCCI _IN000002UV01.xsd\">" +
|
|
|
|
|
"<id extension=\""+IdUtil.standardUUID()+"\"/>" +
|
|
|
|
|
"<creationTime value=\""+createTime+"\"/>" +
|
|
|
|
|
"<id extension=\"" + IdUtil.standardUUID() + "\"/>" +
|
|
|
|
|
"<creationTime value=\"" + createTime + "\"/>" +
|
|
|
|
|
"<interactionId root=\"2.16.840.1.113883.1.6\" extension=\"MCCI_IN000002UV01\"/>" +
|
|
|
|
|
"<processingCode code=\"P\"/>" +
|
|
|
|
|
"<processingModeCode/>" +
|
|
|
|
@ -169,10 +172,10 @@ public class HIP1010LaboratoryReportAdditionHandler implements WebserviceReceive
|
|
|
|
|
"</sender>" +
|
|
|
|
|
"<acknowledgement typeCode=\"AE\">" +
|
|
|
|
|
"<targetMessage>" +
|
|
|
|
|
"<id extension=\""+msgId+"\"/>" +
|
|
|
|
|
"<id extension=\"" + msgId + "\"/>" +
|
|
|
|
|
"</targetMessage>" +
|
|
|
|
|
"<acknowledgementDetail>" +
|
|
|
|
|
"<text value=\""+failedMessage+"\"/>" +
|
|
|
|
|
"<text value=\"" + failedMessage + "\"/>" +
|
|
|
|
|
"</acknowledgementDetail>" +
|
|
|
|
|
"</acknowledgement>" +
|
|
|
|
|
"</MCCI_IN000002UV01>";
|
|
|
|
|