修改新增接口

3.2.4.44
宇宙皮皮娃 2 years ago
parent 11fce47cd2
commit f9a1451e6a

@ -26,8 +26,7 @@ public class TBasic implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "病案主键") @ApiModelProperty(value = "病案主键")
@TableId(value = "patient_id", type = IdType.ASSIGN_ID) private String patientId;
private Long patientId;
@ApiModelProperty(value = "住院次数") @ApiModelProperty(value = "住院次数")
private Integer admissTimes; private Integer admissTimes;

@ -18,8 +18,14 @@ public interface TBasicMapper{
Integer selectOne(@Param("jzh") String jzh); Integer selectOne(@Param("jzh") String jzh);
String getPatientId(@Param("jzh") String jzh);
Integer insert(@Param("tBasic") TBasic tBasic); Integer insert(@Param("tBasic") TBasic tBasic);
Integer insertExtend(@Param("tBasicExtend") TBasicExtend tBasicExtend); Integer insertExtend(@Param("tBasicExtend") TBasicExtend tBasicExtend);
Integer update(@Param("tBasic") TBasic tBasic);
Integer updateExtend(@Param("tBasicExtend") TBasicExtend tBasicExtend);
} }

@ -5,4 +5,7 @@ import com.docus.server.collection.dto.TBasicDto;
public interface ITBasicService { public interface ITBasicService {
public void setTBasic(TBasicDto dto) throws Exception; public void setTBasic(TBasicDto dto) throws Exception;
public void updateTBasic(TBasicDto dto) throws Exception;
} }

@ -43,16 +43,23 @@ public class TBasicServiceImpl implements ITBasicService {
Long patientId = idService.getDateSeq(); Long patientId = idService.getDateSeq();
//数据类型转化,格式处理 //数据类型转化,格式处理
Date admissDate = Func.parseDate(tBasicDto.getAdmissDate(), DateUtil.PATTERN_DATETIME_MINI); Date admissDate=null;
Date disDate = Func.parseDate(tBasicDto.getDisDate(), DateUtil.PATTERN_DATETIME_MINI); if(Func.isNotEmpty(tBasicDto.getAdmissDate())){
admissDate = Func.parseDate(tBasicDto.getAdmissDate(), DateUtil.PATTERN_DATETIME_MINI);
}
Date disDate=null;
if(Func.isNotEmpty(tBasicDto.getDisDate())){
disDate = Func.parseDate(tBasicDto.getDisDate(), DateUtil.PATTERN_DATETIME_MINI);
}
String admissTimesStr = tBasicDto.getAdmissTimes(); String admissTimesStr = tBasicDto.getAdmissTimes();
Integer admissTimes=null; Integer admissTimes=null;
if(NumberUtil.isInteger(admissTimesStr)){ if(NumberUtil.isInteger(admissTimesStr)){
admissTimes=Integer.parseInt(admissTimesStr); admissTimes=Integer.parseInt(admissTimesStr);
} }
String ageStr = tBasicDto.getAge(); String ageStr = tBasicDto.getAge();
ageStr =ageStr.substring(0,ageStr.length()-1); if(Func.isNotEmpty(ageStr)){
System.out.println(ageStr); ageStr =ageStr.substring(0,ageStr.length()-1);
}
Integer age=null; Integer age=null;
if(NumberUtil.isInteger(ageStr)){ if(NumberUtil.isInteger(ageStr)){
age=Integer.parseInt(ageStr); age=Integer.parseInt(ageStr);
@ -74,7 +81,7 @@ public class TBasicServiceImpl implements ITBasicService {
//组装数据 //组装数据
TBasic tBasic=new TBasic(); TBasic tBasic=new TBasic();
tBasic.setPatientId(patientId); tBasic.setPatientId(patientId.toString());
tBasic.setJzh(tBasicDto.getJzh()); tBasic.setJzh(tBasicDto.getJzh());
tBasic.setInpatientNo(tBasicDto.getInpatientNo()); tBasic.setInpatientNo(tBasicDto.getInpatientNo());
tBasic.setAdmissTimes(admissTimes); tBasic.setAdmissTimes(admissTimes);
@ -102,6 +109,84 @@ public class TBasicServiceImpl implements ITBasicService {
tBasicMapper.insert(tBasic); tBasicMapper.insert(tBasic);
tBasicMapper.insertExtend(tBasicExtend); tBasicMapper.insertExtend(tBasicExtend);
} }
@Override
@Transactional
public void updateTBasic(TBasicDto tBasicDto) throws Exception {
//判断jzh是否存在
String patientId = tBasicMapper.getPatientId(tBasicDto.getJzh());
if (Func.isEmpty(patientId)) {
setTBasic(tBasicDto);
return;
}
//数据类型转化,格式处理
Date admissDate=null;
if(Func.isNotEmpty(tBasicDto.getAdmissDate())){
admissDate = Func.parseDate(tBasicDto.getAdmissDate(), DateUtil.PATTERN_DATETIME_MINI);
}
Date disDate=null;
if(Func.isNotEmpty(tBasicDto.getDisDate())){
disDate = Func.parseDate(tBasicDto.getDisDate(), DateUtil.PATTERN_DATETIME_MINI);
}
String admissTimesStr = tBasicDto.getAdmissTimes();
Integer admissTimes=null;
if(NumberUtil.isInteger(admissTimesStr)){
admissTimes=Integer.parseInt(admissTimesStr);
}
String ageStr = tBasicDto.getAge();
if(Func.isNotEmpty(ageStr)){
ageStr =ageStr.substring(0,ageStr.length()-1);
}
Integer age=null;
if(NumberUtil.isInteger(ageStr)){
age=Integer.parseInt(ageStr);
}
String sexName=tBasicDto.getSexName();
if(sexName.length()>1){
sexName=sexName.substring(0,1);
}
String admissDaysStr = tBasicDto.getAdmissDays();
Integer admissDays=null;
if(NumberUtil.isInteger(admissDaysStr)){
admissDays=Integer.parseInt(admissDaysStr);
}
String isDeadStr = tBasicDto.getIsDead();
Integer isDead=0;
if("死亡".equals(isDeadStr)){
isDead=1;
}
//组装数据
TBasic tBasic=new TBasic();
tBasic.setJzh(tBasicDto.getJzh());
tBasic.setPatientId(patientId);
tBasic.setInpatientNo(tBasicDto.getInpatientNo());
tBasic.setAdmissTimes(admissTimes);
tBasic.setName(tBasicDto.getName());
tBasic.setAdmissDate(admissDate);
tBasic.setDisDate(disDate);
tBasic.setAdmissDeptName(tBasicDto.getAdmissDeptName());
tBasic.setDisDeptName(tBasicDto.getDisDeptName());
tBasic.setAttendingName(tBasicDto.getAttendingName());
tBasic.setAge(age);
tBasic.setSex(tBasicDto.getSex());
tBasic.setIdCard(tBasicDto.getIdCard());
tBasic.setDisDept(tBasicDto.getDisDept());
tBasic.setSexName(sexName);
tBasic.setBedNum(tBasicDto.getBedNum());
tBasic.setAdmissDays(admissDays);
tBasic.setIsDead(isDead);
TBasicExtend tBasicExtend=new TBasicExtend();
tBasicExtend.setPatientId(patientId);
tBasicExtend.setWardCode(tBasicDto.getWardCode());
tBasicExtend.setWardName(tBasicDto.getWardName());
//持久化
tBasicMapper.update(tBasic);
tBasicMapper.updateExtend(tBasicExtend);
}
} }

@ -1,6 +1,16 @@
package com.docus.server.collection.webservice; package com.docus.server.collection.webservice;
public interface BasicService { import javax.jws.WebService;
@WebService
public interface BasicService {
/**
* @description
*/
public String setTBasic(String str); public String setTBasic(String str);
/**
* @description
*/
public String updateTBasic(String str);
} }

@ -1,9 +1,12 @@
package com.docus.server.collection.webservice; package com.docus.server.collection.webservice;
import javax.jws.WebService;
/** /**
* @author Fang Ruichuan * @author Fang Ruichuan
* @date 2022-11-14 19:03 * @date 2022-11-14 19:03
*/ */
@WebService
public interface IDeptServer { public interface IDeptServer {
/** /**
* *

@ -2,10 +2,13 @@ package com.docus.server.collection.webservice;
import com.docus.server.collection.dto.UserDto; import com.docus.server.collection.dto.UserDto;
import javax.jws.WebService;
/** /**
* @author Fang Ruichuan * @author Fang Ruichuan
* @date 2022-11-14 19:03 * @date 2022-11-14 19:03
*/ */
@WebService
public interface IUserServer { public interface IUserServer {
/** /**
* *

@ -1,9 +1,13 @@
package com.docus.server.collection.webservice; package com.docus.server.collection.webservice;
import javax.jws.WebService;
/** /**
* @author Fang Ruichuan * @author Fang Ruichuan
* @date 2022-11-14 19:03 * @date 2022-11-14 19:03
*/ */
@WebService
public interface ReceiveServer { public interface ReceiveServer {
/** /**
* *
@ -14,6 +18,7 @@ public interface ReceiveServer {
String setTBasic(String str); String setTBasic(String str);
String updateTBasic(String str);
/** /**
* *
* @param receiveUser * @param receiveUser

@ -22,7 +22,6 @@ import javax.jws.WebService;
* @Version: 1.0 * @Version: 1.0
*/ */
@Service @Service
@WebService
@Slf4j @Slf4j
public class BasicServiceImpl implements BasicService { public class BasicServiceImpl implements BasicService {
@ -37,7 +36,7 @@ public class BasicServiceImpl implements BasicService {
//解析xml //解析xml
TBasicDto tBasicDto = null; TBasicDto tBasicDto = null;
try { try {
tBasicDto=getTBasicDto(body); tBasicDto=getNewTBasicDto(body);
//持久化 //持久化
tBasicService.setTBasic(tBasicDto); tBasicService.setTBasic(tBasicDto);
}catch (Exception e){ }catch (Exception e){
@ -48,8 +47,28 @@ public class BasicServiceImpl implements BasicService {
return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend()); return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
} }
@Override
public String updateTBasic(String body) {
if (Func.isEmpty(body)) {
return Result.failed(null,"参数为空",null,null);
}
//解析xml
TBasicDto tBasicDto = null;
try {
tBasicDto=getUpdateTBasicDto(body);
//持久化
tBasicService.updateTBasic(tBasicDto);
}catch (Exception e){
e.printStackTrace();
log.error(e.getMessage(), e);
return Result.failed(tBasicDto.getSerialId(),e.getMessage(),tBasicDto.getReceive(),tBasicDto.getSend());
}
return Result.success(tBasicDto.getSerialId(),tBasicDto.getReceive(),tBasicDto.getSend());
}
public TBasicDto getTBasicDto(String str) { public TBasicDto getNewTBasicDto(String str) {
XmlUtil xml=XmlUtil.of(str); XmlUtil xml=XmlUtil.of(str);
//id-消息流水号 //id-消息流水号
String serialId=null; String serialId=null;
@ -125,37 +144,37 @@ public class BasicServiceImpl implements BasicService {
} }
//年龄 //年龄
String age=null; String age=null;
Node ageNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age[@unit='岁']/@value"); Node ageNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age[@unit='岁']/@value");
if(Func.isNotEmpty(ageNode)){ if(Func.isNotEmpty(ageNode)){
age=ageNode.getNodeValue(); age=ageNode.getNodeValue();
} }
//性别 //性别
String sex=null; String sex=null;
Node sexNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@code"); Node sexNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@code");
if(Func.isNotEmpty(sexNode)){ if(Func.isNotEmpty(sexNode)){
sex=sexNode.getNodeValue(); sex=sexNode.getNodeValue();
} }
//身份证号 //身份证号
String idCard=null; String idCard=null;
Node idCardNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension"); Node idCardNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension");
if(Func.isNotEmpty(idCardNode)){ if(Func.isNotEmpty(idCardNode)){
idCard=idCardNode.getNodeValue(); idCard=idCardNode.getNodeValue();
} }
//出院科室 //出院科室
String disDept=null; String disDept=null;
Node disDeptCardNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension"); Node disDeptCardNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
if(Func.isNotEmpty(disDeptCardNode)){ if(Func.isNotEmpty(disDeptCardNode)){
disDept=disDeptCardNode.getNodeValue(); disDept=disDeptCardNode.getNodeValue();
} }
//性别名称 //性别名称
String sexName=null; String sexName=null;
Node sexNameNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@displayName"); Node sexNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@displayName");
if(Func.isNotEmpty(sexNameNode)){ if(Func.isNotEmpty(sexNameNode)){
sexName=sexNameNode.getNodeValue(); sexName=sexNameNode.getNodeValue();
} }
//床位号 //床位号
String bedNum=null; String bedNum=null;
Node bedNumNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/id/@extension"); Node bedNumNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
if(Func.isNotEmpty(bedNumNode)){ if(Func.isNotEmpty(bedNumNode)){
bedNum=bedNumNode.getNodeValue(); bedNum=bedNumNode.getNodeValue();
} }
@ -173,13 +192,176 @@ public class BasicServiceImpl implements BasicService {
} }
//病区编号 //病区编号
String wardCode=null; String wardCode=null;
Node wardCodeNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension"); Node wardCodeNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
if(Func.isNotEmpty(wardCodeNode)){
wardCode=wardCodeNode.getNodeValue();
}
//病区名称
String wardName=null;
Node wardNameNode = xml.getNode("/PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name");
if(Func.isNotEmpty(wardNameNode)){
wardName=wardNameNode.getTextContent();
}
//设置dto
TBasicDto dto=new TBasicDto();
dto.setSerialId(serialId);
dto.setSend(send);
dto.setReceive(receive);
dto.setInpatientNo(inpatientNo);
dto.setName(name);
dto.setJzh(jzh);
dto.setAdmissDeptName(admissDeptName);
dto.setDisDeptName(disDeptName);
dto.setAdmissDate(admissDate);
dto.setDisDate(disDate);
dto.setAdmissTimes(admissTimes);
dto.setAttendingName(attendingName);
dto.setAge(age);
dto.setSex(sex);
dto.setIdCard(idCard);
dto.setDisDept(disDept);
dto.setSexName(sexName);
dto.setBedNum(bedNum);
dto.setIsDead(isDead);
dto.setAdmissDays(admissDays);
dto.setWardCode(wardCode);
dto.setWardName(wardName);
return dto;
}
public TBasicDto getUpdateTBasicDto(String str) {
XmlUtil xml=XmlUtil.of(str);
//id-消息流水号
String serialId=null;
Node serialIdNode = xml.getNode("/PRPA_HIP0033/id/@extension");
if(Func.isNotEmpty(serialIdNode)){
serialId=serialIdNode.getNodeValue();
}
//接受方
String receive=null;
Node receiveNode = xml.getNode("/PRPA_HIP0033/receiver/device/id/item/@extension");
if(Func.isNotEmpty(receiveNode)){
receive=receiveNode.getNodeValue();
}
//发送方
String send=null;
Node sendNode = xml.getNode("/PRPA_HIP0033/sender/device/id/item/@extension");
if(Func.isNotEmpty(sendNode)){
send=sendNode.getNodeValue();
}
//住院流水号
String jzh=null;
Node jzhNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/item/@extension");
if(Func.isNotEmpty(jzhNode)){
jzh=jzhNode.getNodeValue();
}
//住院号标识
String inpatientNo=null;
Node inpatientNoNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/id/item/@extension");
if(Func.isNotEmpty(inpatientNoNode)){
inpatientNo=inpatientNoNode.getNodeValue();
}
//住院次数[]
String admissTimes=null;
Node admissTimesNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='次']/@value");
if(Func.isNotEmpty(admissTimesNode)){
admissTimes=admissTimesNode.getNodeValue();
}
//姓名
String name=null;
Node nameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/name/item/part/@value");
if(Func.isNotEmpty(nameNode)){
name=nameNode.getNodeValue();
}
//入院日期时间
String admissDate=null;
Node admissDateNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/effectiveTime/low/@value");
if(Func.isNotEmpty(admissDateNode)){
admissDate=admissDateNode.getNodeValue();
}
//出院日期时间
String disDate=null;
Node disDateNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/effectiveTime/high/@value");
if(Func.isNotEmpty(disDateNode)){
disDate=disDateNode.getNodeValue();
}
//入院诊断科室名称[]
String admissDeptName=null;
Node admissDeptNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/component[@displayName='入院诊断']/section/entry[@displayName='入院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
if(Func.isNotEmpty(admissDeptNameNode)){
admissDeptNameNode.getTextContent();
}
//出院诊断科室名称[]
String disDeptName=null;
Node disDeptNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院诊断-西医条目']/observation/performer/assignedEntity/representedOrganization/name");
if(Func.isNotEmpty(disDeptNameNode)){
disDeptName=disDeptNameNode.getTextContent();
}
//主治医师[]
String attendingName=null;
Node attendingNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/authenticator[@displayName='主治医师']/assignedEntity/assignedPerson/name");
if(Func.isNotEmpty(attendingNameNode)){
attendingName=attendingNameNode.getTextContent();
}
//年龄
String age=null;
Node ageNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/age[@unit='岁']/@value");
if(Func.isNotEmpty(ageNode)){
age=ageNode.getNodeValue();
}
//性别
String sex=null;
Node sexNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@code");
if(Func.isNotEmpty(sexNode)){
sex=sexNode.getNodeValue();
}
//身份证号
String idCard=null;
Node idCardNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/id/item/@extension");
if(Func.isNotEmpty(idCardNode)){
idCard=idCardNode.getNodeValue();
}
//出院科室
String disDept=null;
Node disDeptCardNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
if(Func.isNotEmpty(disDeptCardNode)){
disDept=disDeptCardNode.getNodeValue();
}
//性别名称
String sexName=null;
Node sexNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/subject/patient/patientPerson/administrativeGenderCode/@displayName");
if(Func.isNotEmpty(sexNameNode)){
sexName=sexNameNode.getNodeValue();
}
//床位号
String bedNum=null;
Node bedNumNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
if(Func.isNotEmpty(bedNumNode)){
bedNum=bedNumNode.getNodeValue();
}
//住院天数数[]
String admissDays=null;
Node admissDaysNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/lengthOfStayQuantity[@unit='天']/@value");
if(Func.isNotEmpty(admissDaysNode)){
admissDays=admissDaysNode.getNodeValue();
}
//是否死亡[]
String isDead=null;
Node isDeadNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/component[@displayName='出院诊断']/section/entry[@displayName='出院情况']/observation/value");
if(Func.isNotEmpty(isDeadNode)){
isDead=isDeadNode.getTextContent();
}
//病区编号
String wardCode=null;
Node wardCodeNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/id/@extension");
if(Func.isNotEmpty(wardCodeNode)){ if(Func.isNotEmpty(wardCodeNode)){
wardCode=wardCodeNode.getNodeValue(); wardCode=wardCodeNode.getNodeValue();
} }
//病区名称 //病区名称
String wardName=null; String wardName=null;
Node wardNameNode = xml.getNode("//PRPA_HIP0032/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name"); Node wardNameNode = xml.getNode("/PRPA_HIP0033/controlActProcess/subject/encounterEvent/componentOf/encompassingEncounter/location/healthCareFacility/serviceProviderOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/asOrganizationPartOf/wholeOrganization/name");
if(Func.isNotEmpty(wardNameNode)){ if(Func.isNotEmpty(wardNameNode)){
wardName=wardNameNode.getTextContent(); wardName=wardNameNode.getTextContent();
} }
@ -211,5 +393,6 @@ public class BasicServiceImpl implements BasicService {
dto.setWardName(wardName); dto.setWardName(wardName);
return dto; return dto;
} }
} }

@ -21,7 +21,6 @@ import java.util.Date;
* @date 202322521:56:33 * @date 202322521:56:33
*/ */
@Service @Service
@WebService
@Slf4j @Slf4j
public class DeptServerImpl implements IDeptServer { public class DeptServerImpl implements IDeptServer {

@ -19,7 +19,6 @@ import javax.jws.WebService;
* @Version: 1.0 * @Version: 1.0
*/ */
@Service @Service
@WebService
@Slf4j @Slf4j
public class ReceiveServerImpl implements ReceiveServer { public class ReceiveServerImpl implements ReceiveServer {
@Resource @Resource
@ -40,6 +39,11 @@ public class ReceiveServerImpl implements ReceiveServer {
return basicService.setTBasic(str); return basicService.setTBasic(str);
} }
@Override
public String updateTBasic(String str) {
return basicService.updateTBasic(str);
}
@Override @Override
public String userModify(String receiveUser) { public String userModify(String receiveUser) {
return userServer.userModify(receiveUser); return userServer.userModify(receiveUser);

@ -21,7 +21,6 @@ import java.util.Date;
* @date 202322521:56:33 * @date 202322521:56:33
*/ */
@Service @Service
@WebService
@Slf4j @Slf4j
public class UserServerImpl implements IUserServer { public class UserServerImpl implements IUserServer {

@ -7,8 +7,10 @@
INSERT INTO `docus_medicalrecord`.`t_basic` INSERT INTO `docus_medicalrecord`.`t_basic`
(`admiss_days`,`is_dead`,`sex_name`,`bed_num`,`age`,`sex`,`id_card`,`dis_dept`,`patient_id`, `admiss_times`, `inpatient_no`,`name`, `admiss_date`, `admiss_dept_name`, `dis_date`, `dis_dept_name`,`attending_name`,`jzh`) (`admiss_days`,`is_dead`,`sex_name`,`bed_num`,`age`,`sex`,`id_card`,`dis_dept`,`patient_id`, `admiss_times`, `inpatient_no`,`name`, `admiss_date`, `admiss_dept_name`, `dis_date`, `dis_dept_name`,`attending_name`,`jzh`)
VALUES VALUES
(#{tBasic.admissDays},#{tBasic.isDead},#{tBasic.sexName},#{tBasic.bedNum},#{tBasic.age},#{tBasic.sex},#{tBasic.idCard},#{tBasic.disDept},#{tBasic.patientId},#{tBasic.admissTimes},#{tBasic.inpatientNo},#{tBasic.name}, (#{tBasic.admissDays},#{tBasic.isDead},#{tBasic.sexName},#{tBasic.bedNum},#{tBasic.age},#{tBasic.sex},#{tBasic.idCard},
#{tBasic.admissDate},#{tBasic.admissDeptName},#{tBasic.disDate},#{tBasic.disDeptName},#{tBasic.attendingName},#{tBasic.jzh}) #{tBasic.disDept},#{tBasic.patientId},#{tBasic.admissTimes},#{tBasic.inpatientNo},
#{tBasic.name},#{tBasic.admissDate},#{tBasic.admissDeptName},#{tBasic.disDate},#{tBasic.disDeptName},
#{tBasic.attendingName},#{tBasic.jzh})
</insert> </insert>
<insert id="insertExtend"> <insert id="insertExtend">
INSERT INTO `docus_medicalrecord`.`t_basic_extend` INSERT INTO `docus_medicalrecord`.`t_basic_extend`
@ -17,7 +19,79 @@
(#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName}) (#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName})
</insert> </insert>
<update id="update">
UPDATE `docus_medicalrecord`.`t_basic`
<set>
<if test="tBasic.admissDays !=null ">
`admiss_days`=#{tBasic.admissDays},
</if>
<if test="tBasic.isDead !=null ">
`is_dead`=#{tBasic.isDead},
</if>
<if test="tBasic.sexName !=null ">
`sex_name`=#{tBasic.sexName},
</if>
<if test="tBasic.bedNum !=null ">
`bed_num`=#{tBasic.bedNum},
</if>
<if test="tBasic.age !=null ">
`age`=#{tBasic.age},
</if>
<if test="tBasic.sex !=null ">
`sex`=#{tBasic.sex},
</if>
<if test="tBasic.idCard !=null ">
`id_card`=#{tBasic.idCard},
</if>
<if test="tBasic.disDept !=null ">
`dis_dept`=#{tBasic.disDept},
</if>
<if test="tBasic.admissTimes !=null ">
`admiss_times`=#{tBasic.admissTimes},
</if>
<if test="tBasic.inpatientNo !=null ">
`inpatient_no`=#{tBasic.inpatientNo},
</if>
<if test="tBasic.name !=null ">
`name`=#{tBasic.name},
</if>
<if test="tBasic.admissDate !=null ">
`admiss_date`=#{tBasic.admissDate},
</if>
<if test="tBasic.admissDeptName !=null ">
`admiss_dept_name`=#{tBasic.admissDeptName},
</if>
<if test="tBasic.disDate !=null ">
`dis_date`=#{tBasic.disDate},
</if>
<if test="tBasic.disDeptName !=null ">
`dis_dept_name`=#{tBasic.disDeptName},
</if>
<if test="tBasic.attendingName !=null ">
`attending_name`=#{tBasic.attendingName},
</if>
</set>
WHERE `patient_id`=#{tBasic.patientId,jdbcType=VARCHAR};
</update>
<update id="updateExtend">
UPDATE `docus_medicalrecord`.`t_basic_extend`
<set>
<if test="tBasicExtend.wardCode !=null ">
`ward_code`=#{tBasicExtend.wardCode},
</if>
<if test="tBasicExtend.wardName !=null ">
`ward_name`=#{tBasicExtend.wardName},
</if>
</set>
WHERE `patient_id`=#{tBasicExtend.patientId};
</update>
<select id="selectOne" resultType="java.lang.Integer"> <select id="selectOne" resultType="java.lang.Integer">
select count(patient_id) from t_basic where jzh=#{jzh} select count(patient_id) from t_basic where jzh=#{jzh}
</select> </select>
<select id="getPatientId" resultType="java.lang.String">
select patient_id from t_basic where jzh=#{jzh}
</select>
</mapper> </mapper>

Loading…
Cancel
Save