From d32750ed772bcb3d9ca554ef9cf3754db6dc4501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=AE=99=E7=9A=AE=E7=9A=AE=E5=A8=83?= <2964346877@qq.com> Date: Sat, 25 Feb 2023 19:25:22 +0800 Subject: [PATCH] v2 --- .../webservice/impl/TBasicServiceImpl.java | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/docus/server/collection/webservice/impl/TBasicServiceImpl.java b/src/main/java/com/docus/server/collection/webservice/impl/TBasicServiceImpl.java index 049f530..ad3d623 100644 --- a/src/main/java/com/docus/server/collection/webservice/impl/TBasicServiceImpl.java +++ b/src/main/java/com/docus/server/collection/webservice/impl/TBasicServiceImpl.java @@ -36,15 +36,11 @@ public class TBasicServiceImpl implements TBasicService { @Override public String setTBasic(String body) { - System.out.println(body); if (Func.isEmpty(body)) { return Result.failed(null,"参数为空"); } //解析xml TBasicDto tBasicDto = getTBasicDto(body); - - System.out.println(tBasicDto.toString()); - //判断jzh是否重复 TBasic selectTBasic = tBasicMapper.selectOne(new QueryWrapper().eq("jzh", tBasicDto.getJzh())); if (selectTBasic != null) { @@ -75,52 +71,52 @@ public class TBasicServiceImpl implements TBasicService { Node node=null; //id-消息流水号 node = xml.getNode("/PRPA_HIP0032/id/@extension"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setSerialId(node.getNodeValue()); } //住院流水号 node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/item/@extension"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setJzh(node.getNodeValue()); } //住院号标识 node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/id/item/@extension"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setInpatientNo( node.getNodeValue()); } //住院次数[] node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setAdmissTimes(node.getNodeValue()); } //姓名 node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setName(node.getNodeValue()); } //入院日期时间 node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/low/@value"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setAdmissDate(node.getNodeValue()); } //出院日期时间 node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/high/@value"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setDisDate(node.getNodeValue()); } //入院诊断科室名称[] node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='入院诊断']/section/entry[@displayName='入院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setAdmissDeptName(node.getTextContent()); } //出院诊断科室名称[] node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setDisDeptName(node.getTextContent()); } //主治医师[] node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/authenticator[@displayName='主治医师']/assignedEntity/assignedPerson/name"); - if(Func.isEmpty(node)){ + if(Func.isNotEmpty(node)){ dto.setAttendingName(node.getTextContent()); } return dto;