|
|
|
@ -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<TBasic>().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;
|
|
|
|
|