3.2.4.44
宇宙皮皮娃 2 years ago
parent a4cb45f49c
commit d32750ed77

@ -36,15 +36,11 @@ public class TBasicServiceImpl implements TBasicService {
@Override @Override
public String setTBasic(String body) { public String setTBasic(String body) {
System.out.println(body);
if (Func.isEmpty(body)) { if (Func.isEmpty(body)) {
return Result.failed(null,"参数为空"); return Result.failed(null,"参数为空");
} }
//解析xml //解析xml
TBasicDto tBasicDto = getTBasicDto(body); TBasicDto tBasicDto = getTBasicDto(body);
System.out.println(tBasicDto.toString());
//判断jzh是否重复 //判断jzh是否重复
TBasic selectTBasic = tBasicMapper.selectOne(new QueryWrapper<TBasic>().eq("jzh", tBasicDto.getJzh())); TBasic selectTBasic = tBasicMapper.selectOne(new QueryWrapper<TBasic>().eq("jzh", tBasicDto.getJzh()));
if (selectTBasic != null) { if (selectTBasic != null) {
@ -75,52 +71,52 @@ public class TBasicServiceImpl implements TBasicService {
Node node=null; Node node=null;
//id-消息流水号 //id-消息流水号
node = xml.getNode("/PRPA_HIP0032/id/@extension"); node = xml.getNode("/PRPA_HIP0032/id/@extension");
if(Func.isEmpty(node)){ if(Func.isNotEmpty(node)){
dto.setSerialId(node.getNodeValue()); dto.setSerialId(node.getNodeValue());
} }
//住院流水号 //住院流水号
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/item/@extension"); node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/item/@extension");
if(Func.isEmpty(node)){ if(Func.isNotEmpty(node)){
dto.setJzh(node.getNodeValue()); dto.setJzh(node.getNodeValue());
} }
//住院号标识 //住院号标识
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/id/item/@extension"); node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/id/item/@extension");
if(Func.isEmpty(node)){ if(Func.isNotEmpty(node)){
dto.setInpatientNo( node.getNodeValue()); dto.setInpatientNo( node.getNodeValue());
} }
//住院次数[] //住院次数[]
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value"); node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value");
if(Func.isEmpty(node)){ if(Func.isNotEmpty(node)){
dto.setAdmissTimes(node.getNodeValue()); dto.setAdmissTimes(node.getNodeValue());
} }
//姓名 //姓名
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value"); 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()); dto.setName(node.getNodeValue());
} }
//入院日期时间 //入院日期时间
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/low/@value"); node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/low/@value");
if(Func.isEmpty(node)){ if(Func.isNotEmpty(node)){
dto.setAdmissDate(node.getNodeValue()); dto.setAdmissDate(node.getNodeValue());
} }
//出院日期时间 //出院日期时间
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/high/@value"); node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/effectiveTime/high/@value");
if(Func.isEmpty(node)){ if(Func.isNotEmpty(node)){
dto.setDisDate(node.getNodeValue()); dto.setDisDate(node.getNodeValue());
} }
//入院诊断科室名称[] //入院诊断科室名称[]
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='入院诊断']/section/entry[@displayName='入院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name"); 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()); dto.setAdmissDeptName(node.getTextContent());
} }
//出院诊断科室名称[] //出院诊断科室名称[]
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name"); 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()); dto.setDisDeptName(node.getTextContent());
} }
//主治医师[] //主治医师[]
node = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/authenticator[@displayName='主治医师']/assignedEntity/assignedPerson/name"); 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()); dto.setAttendingName(node.getTextContent());
} }
return dto; return dto;

Loading…
Cancel
Save