|
|
@ -1,12 +1,17 @@
|
|
|
|
package com.docus.server.collect.medical.record;
|
|
|
|
package com.docus.server.collect.medical.record;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.docus.core.util.DateUtil;
|
|
|
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
import com.docus.core.util.XmlUtil;
|
|
|
|
import com.docus.core.util.XmlUtil;
|
|
|
|
import com.docus.server.collect.service.IParseService;
|
|
|
|
import com.docus.server.collect.service.IParseService;
|
|
|
|
import com.docus.server.record.pojo.entity.MedicalRecord;
|
|
|
|
import com.docus.server.record.pojo.entity.MedicalRecord;
|
|
|
|
import com.docus.server.sys.common.pojo.dto.DeptDTO;
|
|
|
|
import com.docus.server.sys.common.pojo.dto.DeptDTO;
|
|
|
|
|
|
|
|
import com.docus.server.tool.IdUtil;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.w3c.dom.Node;
|
|
|
|
import org.w3c.dom.Node;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
public class ParseServiceImpl implements IParseService {
|
|
|
|
public class ParseServiceImpl implements IParseService {
|
|
|
|
|
|
|
|
|
|
|
@ -45,4 +50,78 @@ public class ParseServiceImpl implements IParseService {
|
|
|
|
deptDto.setAuthorName(authorNameNode.getNodeValue());
|
|
|
|
deptDto.setAuthorName(authorNameNode.getNodeValue());
|
|
|
|
return deptDto;
|
|
|
|
return deptDto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String parseDeptOkXml(DeptDTO deptDTO) {
|
|
|
|
|
|
|
|
String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
|
|
|
|
|
|
|
|
return "<MCCI_IN000002UV01 ITSVersion=\"XML_1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:hl7-org:v3\" xsi:schemaLocation=\"urn:hl7-org:v3\n" +
|
|
|
|
|
|
|
|
"file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/MCCI\n" +
|
|
|
|
|
|
|
|
"_IN000002UV01.xsd\">\n" +
|
|
|
|
|
|
|
|
"\t<id extension=\"" + IdUtil.standardUUID() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t<creationTime value=\"" + createTime + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t<interactionId root=\"2.16.840.1.113883.1.6\" extension=\"MCCI_IN000002UV01\"/>\n" +
|
|
|
|
|
|
|
|
"\t<processingCode code=\"P\"/>\n" +
|
|
|
|
|
|
|
|
"\t<processingModeCode/>\n" +
|
|
|
|
|
|
|
|
"\t<acceptAckCode code=\"AL\"/>\n" +
|
|
|
|
|
|
|
|
"\t<receiver typeCode=\"RCV\">\n" +
|
|
|
|
|
|
|
|
"\t\t<device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
|
|
|
|
|
|
|
|
"\t\t\t<id>\n" +
|
|
|
|
|
|
|
|
"\t\t\t\t<item extension=\"MDM\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t\t</id>\n" +
|
|
|
|
|
|
|
|
"\t\t</device>\n" +
|
|
|
|
|
|
|
|
"\t</receiver>\n" +
|
|
|
|
|
|
|
|
"\t<sender typeCode=\"SND\">\n" +
|
|
|
|
|
|
|
|
"\t\t<device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
|
|
|
|
|
|
|
|
"\t\t\t<id>\n" +
|
|
|
|
|
|
|
|
"\t\t\t\t<item extension=\"" + deptDTO.getReceiver() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t\t</id>\n" +
|
|
|
|
|
|
|
|
"\t\t</device>\n" +
|
|
|
|
|
|
|
|
"\t</sender>\n" +
|
|
|
|
|
|
|
|
"\t<acknowledgement typeCode=\"AA\">\n" +
|
|
|
|
|
|
|
|
"\t\t<targetMessage>\n" +
|
|
|
|
|
|
|
|
"\t\t\t<id extension=\"" + deptDTO.getMessageId() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t</targetMessage>\n" +
|
|
|
|
|
|
|
|
"\t\t<acknowledgementDetail>\n" +
|
|
|
|
|
|
|
|
"\t\t\t<text value=\"" + "操作成功!" + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t</acknowledgementDetail>\n" +
|
|
|
|
|
|
|
|
"\t</acknowledgement>\n" +
|
|
|
|
|
|
|
|
"</MCCI_IN000002UV01>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String parseDeptFailXml(DeptDTO deptDto) {
|
|
|
|
|
|
|
|
String createTime = Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
|
|
|
|
|
|
|
|
return "<RCMR_IN000030UV01 ITSVersion=\"XML_1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:hl7-org:v3\" xsi:schemaLocation=\"urn:hl7-org:v3\n" +
|
|
|
|
|
|
|
|
"file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/RCMR\n" +
|
|
|
|
|
|
|
|
"_IN000030UV01.xsd\">\n" +
|
|
|
|
|
|
|
|
"\t<id extension=\"" + IdUtil.standardUUID() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t<creationTime value=\"" + createTime + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t<interactionId root=\"2.16.840.1.113883.1.6\" extension=\"RCMR_IN000030UV01\"/>\n" +
|
|
|
|
|
|
|
|
"\t<processingCode code=\"P\"/>\n" +
|
|
|
|
|
|
|
|
"\t<processingModeCode/>\n" +
|
|
|
|
|
|
|
|
"\t<acceptAckCode code=\"AL\"/>\n" +
|
|
|
|
|
|
|
|
"\t<receiver typeCode=\"RCV\">\n" +
|
|
|
|
|
|
|
|
"\t\t<device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
|
|
|
|
|
|
|
|
"\t\t\t<id>\n" +
|
|
|
|
|
|
|
|
"\t\t\t\t<item extension=\"MDM\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t\t</id>\n" +
|
|
|
|
|
|
|
|
"\t\t</device>\n" +
|
|
|
|
|
|
|
|
"\t</receiver>\n" +
|
|
|
|
|
|
|
|
"\t<sender typeCode=\"SND\">\n" +
|
|
|
|
|
|
|
|
"\t\t<device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
|
|
|
|
|
|
|
|
"\t\t\t<id>\n" +
|
|
|
|
|
|
|
|
"\t\t\t\t<item extension=\"" + deptDto.getReceiver() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t\t</id>\n" +
|
|
|
|
|
|
|
|
"\t\t</device>\n" +
|
|
|
|
|
|
|
|
"\t</sender>\n" +
|
|
|
|
|
|
|
|
"\t<acknowledgement typeCode=\"AE\">\n" +
|
|
|
|
|
|
|
|
"\t\t<targetMessage>\n" +
|
|
|
|
|
|
|
|
"\t\t\t<id extension=\"" + deptDto.getMessageId() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t</targetMessage>\n" +
|
|
|
|
|
|
|
|
"\t\t<acknowledgementDetail>\n" +
|
|
|
|
|
|
|
|
"\t\t\t<text value=\"" + deptDto.getErrorMsg() + "\"/>\n" +
|
|
|
|
|
|
|
|
"\t\t</acknowledgementDetail>\n" +
|
|
|
|
|
|
|
|
"\t</acknowledgement>\n" +
|
|
|
|
|
|
|
|
"</RCMR_IN000030UV01>\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|