Merge branch '3.11_院后第二增量' of http://182.92.166.109:3000/jihan/PostDischargePatientManage into 3.11_院后第二增量
Conflicts: postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java
This commit is contained in:
commit
d861d0e498
@ -0,0 +1,67 @@
|
||||
package com.xinelu.common.utils;
|
||||
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/27 11:45
|
||||
*/
|
||||
public class AgeUtil {
|
||||
|
||||
/**
|
||||
* 根据出生日期计算年龄数值
|
||||
*
|
||||
* @param date 出生日期
|
||||
* @return 年龄数值
|
||||
*/
|
||||
public static Long getAgeMonth(String date) {
|
||||
if (StringUtils.isBlank(date)) {
|
||||
throw new ServiceException("请输入正确的出生日期!");
|
||||
}
|
||||
String[] data = StringUtils.split(date, "-");
|
||||
if (data.length < 3) {
|
||||
throw new ServiceException("请输入正确的出生日期!");
|
||||
}
|
||||
Calendar birthday = new GregorianCalendar(Integer.parseInt(data[0]), Integer.parseInt(data[1]), Integer.parseInt(data[2]));
|
||||
Calendar now = Calendar.getInstance();
|
||||
int day = now.get(Calendar.DAY_OF_MONTH) - birthday.get(Calendar.DAY_OF_MONTH);
|
||||
//月份从0开始计算,所以需要+1
|
||||
int month = now.get(Calendar.MONTH) + 1 - birthday.get(Calendar.MONTH);
|
||||
BigDecimal monthFraction;
|
||||
int year = now.get(Calendar.YEAR) - birthday.get(Calendar.YEAR);
|
||||
//按照减法原理,先day相减,不够向month借;然后month相减,不够向year借;最后year相减。
|
||||
if (day < 0) {
|
||||
month -= 1;
|
||||
//得到上一个月,用来得到上个月的天数。
|
||||
now.add(Calendar.MONTH, -1);
|
||||
}
|
||||
if (month < 0) {
|
||||
//当前月份加12个月
|
||||
monthFraction = BigDecimal.valueOf(month).add(BigDecimal.valueOf(12)).divide(BigDecimal.valueOf(12), 1, RoundingMode.HALF_UP);
|
||||
year--;
|
||||
} else {
|
||||
//当前月份
|
||||
monthFraction = BigDecimal.valueOf(month).divide(BigDecimal.valueOf(12), 1, RoundingMode.HALF_UP);
|
||||
}
|
||||
BigDecimal bigDecimal = BigDecimal.ZERO;
|
||||
if (year >= 0) {
|
||||
bigDecimal = bigDecimal.add(BigDecimal.valueOf(year));
|
||||
}
|
||||
if ((monthFraction.compareTo(BigDecimal.ZERO) > 0)) {
|
||||
bigDecimal = bigDecimal.add(monthFraction);
|
||||
}
|
||||
//今天出生
|
||||
if (year == 0 && month == 0 && day == 0) {
|
||||
return BigDecimal.ZERO.longValue();
|
||||
}
|
||||
return Math.round(bigDecimal.doubleValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ public class AgencyController extends BaseController {
|
||||
if (Objects.isNull(agency) || Objects.isNull(agency.getParentId())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return agencyService.subordinateAgencyList(agency);
|
||||
return agencyService.selectAgencyByIdList(agency);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -76,4 +76,12 @@ public class PatientTaskExecuteRecordController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(patientTaskExecuteRecordService.deletePatientTaskExecuteRecordByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据患者信息查询就诊记录
|
||||
*/
|
||||
@GetMapping("/selectVisitRecord")
|
||||
public AjaxResult selectVisitRecord(Long id) {
|
||||
return patientTaskExecuteRecordService.selectVisitRecord(id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class SpecialDiseaseNodeController extends BaseController {
|
||||
@Log(title = "专病路径-管理节点信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody SpecialDiseaseNodeDTO specialDiseaseNode) {
|
||||
return toAjax(specialDiseaseNodeService.insertSpecialDiseaseNode(specialDiseaseNode));
|
||||
return specialDiseaseNodeService.insertSpecialDiseaseNode(specialDiseaseNode);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,8 +76,8 @@ public class SpecialDiseaseNodeController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:specialDiseaseNode:edit')")
|
||||
@Log(title = "专病路径-管理节点信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody SpecialDiseaseNode specialDiseaseNode) {
|
||||
return toAjax(specialDiseaseNodeService.updateSpecialDiseaseNode(specialDiseaseNode));
|
||||
public AjaxResult edit(@RequestBody SpecialDiseaseNodeDTO specialDiseaseNode) {
|
||||
return specialDiseaseNodeService.updateSpecialDiseaseNode(specialDiseaseNode);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,4 +89,12 @@ public class SpecialDiseaseNodeController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(specialDiseaseNodeService.deleteSpecialDiseaseNodeByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专病路径-管理节点信息列表 - 触发条件列表
|
||||
*/
|
||||
@GetMapping("/selectSpecialDisease")
|
||||
public AjaxResult selectSpecialDisease(Long routeId) {
|
||||
return specialDiseaseNodeService.selectSpecialDisease(routeId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,11 @@ public class TaskStatusDictController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/taskStatusDictList")
|
||||
public AjaxResult taskStatusDictList(TaskStatusDict taskStatusDict) {
|
||||
return AjaxResult.success(taskStatusDictService.selectTaskStatusDictList(taskStatusDict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出任务状态字典列表
|
||||
*/
|
||||
|
||||
@ -112,6 +112,9 @@ public class PatientTaskExecuteRecord extends BaseEntity {
|
||||
@Excel(name = "备注信息")
|
||||
private String executeRemark;
|
||||
|
||||
@ApiModelProperty(value = "患者就诊记录基本信息表id")
|
||||
@Excel(name = "患者就诊记录基本信息表id")
|
||||
private Long visitRecordId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.xinelu.manage.dto.specialdiseasenode;
|
||||
|
||||
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||
import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -12,10 +15,20 @@ import java.util.List;
|
||||
* @author xinelu
|
||||
* @date 2024-03-13
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "专病路径-管理节点信息对象", description = "special_disease_node")
|
||||
public class SpecialDiseaseNodeDTO {
|
||||
public class SpecialDiseaseNodeDTO extends SpecialDiseaseRoute {
|
||||
|
||||
@ApiModelProperty(value = "专病路径表id")
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 专病路径
|
||||
*/
|
||||
List<SpecialDiseaseNode> specialDiseaseNodeList;
|
||||
|
||||
/**
|
||||
* 节点信息
|
||||
*/
|
||||
List<SpecialDiseaseTriggerCondition> triggerConditionList;
|
||||
}
|
||||
|
||||
@ -67,4 +67,12 @@ public interface PatientTaskExecuteRecordMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePatientTaskExecuteRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据患者信息查询就诊记录
|
||||
*
|
||||
* @param id id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
PatientTaskExecuteRecordVO selectVisitRecord(Long id);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.mapper.specialdiseasenode;
|
||||
|
||||
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
|
||||
import com.xinelu.manage.dto.specialdiseasenode.SpecialDiseaseNodeDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -61,4 +62,21 @@ public interface SpecialDiseaseNodeMapper {
|
||||
int deleteSpecialDiseaseNodeByIds(Long[] ids);
|
||||
|
||||
int insertSpecialDiseaseNodeList(List<SpecialDiseaseNode> specialDiseaseNodeList);
|
||||
|
||||
/**
|
||||
* 删除专病路径-管理节点信息
|
||||
*
|
||||
* @param routeId 专病路径-管理节点信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSpecialDiseaseNodeByRouteId(Long routeId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询专病路径-管理节点信息
|
||||
*
|
||||
* @param routeId 专病路径-管理节点信息主键
|
||||
* @return 专病路径-管理节点信息
|
||||
*/
|
||||
SpecialDiseaseNodeDTO selectSpecialDiseaseByRouteId(Long routeId);
|
||||
}
|
||||
|
||||
@ -66,4 +66,12 @@ public interface SpecialDiseaseTriggerConditionMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除触发条件关系
|
||||
*
|
||||
* @param routeId 触发条件关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSpecialDiseaseTriggerConditionByRouteId(Long routeId);
|
||||
}
|
||||
|
||||
@ -40,14 +40,6 @@ public interface IAgencyService {
|
||||
*/
|
||||
AjaxResult selectAgencyByIdList(Agency agency);
|
||||
|
||||
/**
|
||||
* 查询院区机构信息列表
|
||||
*
|
||||
* @param agency 机构信息
|
||||
* @return 机构信息集合
|
||||
*/
|
||||
AjaxResult subordinateAgencyList(Agency agency);
|
||||
|
||||
/**
|
||||
* 新增机构信息
|
||||
*
|
||||
|
||||
@ -98,18 +98,6 @@ public class AgencyServiceImpl implements IAgencyService {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询院区机构信息列表
|
||||
*
|
||||
* @param agency 机构信息
|
||||
* @return 机构信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult subordinateAgencyList(Agency agency) {
|
||||
return AjaxResult.success(agencyMapper.selectAgencyList(agency));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增机构信息
|
||||
*
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.service.patienttaskexecuterecord;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||
import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO;
|
||||
|
||||
@ -59,4 +60,12 @@ public interface IPatientTaskExecuteRecordService {
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePatientTaskExecuteRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 根据患者信息查询就诊记录
|
||||
*
|
||||
* @param id 记录id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult selectVisitRecord(Long id);
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.xinelu.manage.service.patienttaskexecuterecord.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.AgeUtil;
|
||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||
import com.xinelu.manage.mapper.patienttaskexecuterecord.PatientTaskExecuteRecordMapper;
|
||||
import com.xinelu.manage.service.patienttaskexecuterecord.IPatientTaskExecuteRecordService;
|
||||
@ -88,4 +90,17 @@ public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteR
|
||||
public int deletePatientTaskExecuteRecordById(Long id) {
|
||||
return patientTaskExecuteRecordMapper.deletePatientTaskExecuteRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据患者信息查询就诊记录
|
||||
*
|
||||
* @param id id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectVisitRecord(Long id) {
|
||||
PatientTaskExecuteRecordVO patientTaskExecuteRecordVO = patientTaskExecuteRecordMapper.selectVisitRecord(id);
|
||||
patientTaskExecuteRecordVO.setAge(AgeUtil.getAgeMonth(patientTaskExecuteRecordVO.getBirthDate().toString()));
|
||||
return AjaxResult.success(patientTaskExecuteRecordVO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.service.specialdiseasenode;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
|
||||
import com.xinelu.manage.dto.specialdiseasenode.SpecialDiseaseNodeDTO;
|
||||
|
||||
@ -34,7 +35,7 @@ public interface ISpecialDiseaseNodeService {
|
||||
* @param specialDiseaseNode 专病路径-管理节点信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSpecialDiseaseNode(SpecialDiseaseNodeDTO specialDiseaseNode);
|
||||
AjaxResult insertSpecialDiseaseNode(SpecialDiseaseNodeDTO specialDiseaseNode);
|
||||
|
||||
/**
|
||||
* 修改专病路径-管理节点信息
|
||||
@ -42,7 +43,7 @@ public interface ISpecialDiseaseNodeService {
|
||||
* @param specialDiseaseNode 专病路径-管理节点信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode);
|
||||
AjaxResult updateSpecialDiseaseNode(SpecialDiseaseNodeDTO specialDiseaseNode);
|
||||
|
||||
/**
|
||||
* 批量删除专病路径-管理节点信息
|
||||
@ -59,4 +60,12 @@ public interface ISpecialDiseaseNodeService {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSpecialDiseaseNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询专病路径-管理节点信息列表 - 触发条件列表
|
||||
*
|
||||
* @param routeId 路径id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult selectSpecialDisease(Long routeId);
|
||||
}
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
package com.xinelu.manage.service.specialdiseasenode.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
|
||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||
import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition;
|
||||
import com.xinelu.manage.dto.specialdiseasenode.SpecialDiseaseNodeDTO;
|
||||
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
|
||||
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
||||
import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper;
|
||||
import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
@ -18,10 +27,16 @@ import java.util.List;
|
||||
* @author xinelu
|
||||
* @date 2024-03-13
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService {
|
||||
@Resource
|
||||
private SpecialDiseaseNodeMapper specialDiseaseNodeMapper;
|
||||
@Resource
|
||||
private SpecialDiseaseRouteMapper specialDiseaseRouteMapper;
|
||||
@Resource
|
||||
private SpecialDiseaseTriggerConditionMapper triggerConditionMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询专病路径-管理节点信息
|
||||
@ -51,13 +66,36 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
* @param specialDiseaseNode 专病路径-管理节点信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int insertSpecialDiseaseNode(SpecialDiseaseNodeDTO specialDiseaseNode) {
|
||||
public AjaxResult insertSpecialDiseaseNode(SpecialDiseaseNodeDTO specialDiseaseNode) {
|
||||
SpecialDiseaseRoute specialDiseaseRoute = new SpecialDiseaseRoute();
|
||||
BeanUtils.copyBeanProp(specialDiseaseRoute, specialDiseaseNode);
|
||||
specialDiseaseRoute.setCreateTime(LocalDateTime.now());
|
||||
specialDiseaseRoute.setCreateBy(SecurityUtils.getUsername());
|
||||
int insertRouteCount = specialDiseaseRouteMapper.insertSpecialDiseaseRoute(specialDiseaseRoute);
|
||||
if (insertRouteCount < 0) {
|
||||
throw new ServiceException("新增专病路径管理节点信息失败");
|
||||
}
|
||||
for (SpecialDiseaseNode diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) {
|
||||
diseaseNode.setRouteId(specialDiseaseRoute.getId());
|
||||
diseaseNode.setCreateTime(LocalDateTime.now());
|
||||
diseaseNode.setCreateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
return specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNode.getSpecialDiseaseNodeList());
|
||||
int insertNodeCount = specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNode.getSpecialDiseaseNodeList());
|
||||
if (insertNodeCount < 0) {
|
||||
throw new ServiceException("新增专病路径管理节点信息失败");
|
||||
}
|
||||
for (SpecialDiseaseTriggerCondition triggerCondition : specialDiseaseNode.getTriggerConditionList()) {
|
||||
triggerCondition.setRouteId(specialDiseaseRoute.getId());
|
||||
triggerCondition.setCreateTime(LocalDateTime.now());
|
||||
triggerCondition.setCreateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
int insertConditionCount = triggerConditionMapper.insertTriggerConditionList(specialDiseaseNode.getTriggerConditionList());
|
||||
if (insertConditionCount < 0) {
|
||||
throw new ServiceException("新增专病路径管理节点信息失败");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -66,10 +104,49 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
* @param specialDiseaseNode 专病路径-管理节点信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode) {
|
||||
specialDiseaseNode.setUpdateTime(LocalDateTime.now());
|
||||
return specialDiseaseNodeMapper.updateSpecialDiseaseNode(specialDiseaseNode);
|
||||
public AjaxResult updateSpecialDiseaseNode(SpecialDiseaseNodeDTO specialDiseaseNode) {
|
||||
SpecialDiseaseRoute specialDiseaseRoute = new SpecialDiseaseRoute();
|
||||
BeanUtils.copyBeanProp(specialDiseaseRoute, specialDiseaseNode);
|
||||
specialDiseaseRoute.setUpdateTime(LocalDateTime.now());
|
||||
specialDiseaseRoute.setUpdateBy(SecurityUtils.getUsername());
|
||||
int updateRouteCount = specialDiseaseRouteMapper.updateSpecialDiseaseRoute(specialDiseaseRoute);
|
||||
if (updateRouteCount < 0) {
|
||||
log.info("修改专病路径失败");
|
||||
throw new ServiceException("修改专病路径管理节点信息失败");
|
||||
}
|
||||
int deleteCount = specialDiseaseNodeMapper.deleteSpecialDiseaseNodeByRouteId(specialDiseaseNode.getId());
|
||||
if (deleteCount < 0) {
|
||||
log.info("删除管理节点信息失败");
|
||||
throw new ServiceException("修改专病路径管理节点信息失败");
|
||||
}
|
||||
for (SpecialDiseaseNode diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) {
|
||||
diseaseNode.setRouteId(specialDiseaseRoute.getId());
|
||||
diseaseNode.setUpdateTime(LocalDateTime.now());
|
||||
diseaseNode.setUpdateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
int insertNodeCount = specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNode.getSpecialDiseaseNodeList());
|
||||
if (insertNodeCount < 0) {
|
||||
log.info("新增管理节点信息失败");
|
||||
throw new ServiceException("修改专病路径管理节点信息失败");
|
||||
}
|
||||
int deleteConditionCont = triggerConditionMapper.deleteSpecialDiseaseTriggerConditionByRouteId(specialDiseaseRoute.getId());
|
||||
if (deleteConditionCont < 0) {
|
||||
log.info("删除触发条件失败");
|
||||
throw new ServiceException("修改专病路径管理节点信息失败");
|
||||
}
|
||||
for (SpecialDiseaseTriggerCondition triggerCondition : specialDiseaseNode.getTriggerConditionList()) {
|
||||
triggerCondition.setRouteId(specialDiseaseRoute.getId());
|
||||
triggerCondition.setUpdateTime(LocalDateTime.now());
|
||||
triggerCondition.setUpdateBy(SecurityUtils.getUsername());
|
||||
}
|
||||
int insertConditionCount = triggerConditionMapper.insertTriggerConditionList(specialDiseaseNode.getTriggerConditionList());
|
||||
if (insertConditionCount < 0) {
|
||||
log.info("新增触发条件信息失败");
|
||||
throw new ServiceException("修改专病路径管理节点信息失败");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,4 +170,15 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
public int deleteSpecialDiseaseNodeById(Long id) {
|
||||
return specialDiseaseNodeMapper.deleteSpecialDiseaseNodeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专病路径-管理节点信息列表 - 触发条件列表
|
||||
*
|
||||
* @param routeId 路径id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectSpecialDisease(Long routeId) {
|
||||
return AjaxResult.success(specialDiseaseNodeMapper.selectSpecialDiseaseByRouteId(routeId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,12 +2,9 @@ package com.xinelu.manage.vo.patienttaskexecuterecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@ -18,102 +15,57 @@ import java.time.LocalDate;
|
||||
* @author xinelu
|
||||
* @date 2024-03-25
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "患者管理任务执行记录对象", description = "patient_task_execute_record")
|
||||
@Data
|
||||
public class PatientTaskExecuteRecordVO extends PatientTaskExecuteRecord {
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "患者年龄")
|
||||
private Long age;
|
||||
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者电话
|
||||
*/
|
||||
@ApiModelProperty(value = "患者电话")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
* 就诊流水号
|
||||
*/
|
||||
@ApiModelProperty(value = "就诊流水号")
|
||||
private String visitSerialNumber;
|
||||
|
||||
/**
|
||||
* 所属医院id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属医院id")
|
||||
private Long hospitalAgencyId;
|
||||
|
||||
/**
|
||||
* 所属医院名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属医院名称")
|
||||
private String hospitalAgencyName;
|
||||
|
||||
/**
|
||||
* 所属院区id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属院区id")
|
||||
private Long campusAgencyId;
|
||||
|
||||
/**
|
||||
* 所属院区名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属院区名称")
|
||||
private String campusAgencyName;
|
||||
|
||||
/**
|
||||
* 所属科室id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室id")
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 所属科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室名称")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 所属病区id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属病区id")
|
||||
private Long wardId;
|
||||
|
||||
/**
|
||||
* 所属病区名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属病区名称")
|
||||
private String wardName;
|
||||
|
||||
/**
|
||||
* 手术名称
|
||||
*/
|
||||
@ApiModelProperty(value = "手术名称")
|
||||
private String surgicalName;
|
||||
|
||||
/**
|
||||
* 入院时间,时间格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "入院时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate admissionDate;
|
||||
|
||||
/**
|
||||
* 出院时间(出院患者),时间格式:yyyy-MM-dd
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "出院时间(出院患者)")
|
||||
private LocalDate dischargeDate;
|
||||
|
||||
/**
|
||||
* 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL
|
||||
*/
|
||||
@ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL")
|
||||
private String visitMethod;
|
||||
|
||||
@ -123,34 +75,28 @@ public class PatientTaskExecuteRecordVO extends PatientTaskExecuteRecord {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 家属电话
|
||||
*/
|
||||
@ApiModelProperty(value = "家属电话")
|
||||
private String familyMemberPhone;
|
||||
|
||||
/**
|
||||
* 出生日期,格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate birthDate;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 性别,男:MALE,女:FEMALE
|
||||
*/
|
||||
@ApiModelProperty(value = "性别,男:MALE,女:FEMALE")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 住址
|
||||
*/
|
||||
@ApiModelProperty(value = "住址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "入院病历信息,存储患者入院的整个病历信息")
|
||||
private String inHospitalInfo;
|
||||
|
||||
@ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息")
|
||||
private String outHospitalInfo;
|
||||
|
||||
@ApiModelProperty(value = "手术记录")
|
||||
private String surgicalRecord;
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<result property="executePerson" column="execute_person"/>
|
||||
<result property="executeType" column="execute_type"/>
|
||||
<result property="executeRemark" column="execute_remark"/>
|
||||
<result property="visitRecordId" column="visit_record_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@ -36,6 +37,7 @@
|
||||
execute_person,
|
||||
execute_type,
|
||||
execute_remark,
|
||||
visit_record_id,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
@ -56,6 +58,9 @@
|
||||
<if test="manageRouteNodeId != null ">
|
||||
and manage_route_node_id = #{manageRouteNodeId}
|
||||
</if>
|
||||
<if test="visitRecordId != null ">
|
||||
and visit_record_id = #{visitRecordId}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient_name like concat('%', #{patientName}, '%')
|
||||
</if>
|
||||
@ -96,7 +101,6 @@
|
||||
pter.execute_time,
|
||||
pter.execute_person,
|
||||
pter.execute_type,
|
||||
pi.patient_phone,
|
||||
pi.patient_type,
|
||||
pi.visit_method,
|
||||
pi.hospital_agency_name,
|
||||
@ -107,13 +111,9 @@
|
||||
pi.admission_date,
|
||||
pi.discharge_date,
|
||||
pi.in_hospital_number,
|
||||
pi.family_member_phone,
|
||||
pi.birth_date,
|
||||
pi.card_no,
|
||||
pi.sex,
|
||||
pi.address
|
||||
pi.patient_phone
|
||||
from patient_task_execute_record pter
|
||||
left join patient_info pi ON pi.id = pter.patient_id
|
||||
LEFT JOIN patient_info pi ON pi.id = pter.patient_id
|
||||
where pi.del_flag = 0
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and pi.patient_name = #{patientName}
|
||||
@ -181,6 +181,8 @@
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="visitRecordId != null">visit_record_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">#{patientId},
|
||||
@ -213,6 +215,8 @@
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="visitRecordId != null">#{visitRecordId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -228,6 +232,9 @@
|
||||
<if test="manageRouteNodeId != null">manage_route_node_id =
|
||||
#{manageRouteNodeId},
|
||||
</if>
|
||||
<if test="visitRecordId != null ">
|
||||
and visit_record_id = #{visitRecordId}
|
||||
</if>
|
||||
<if test="patientName != null">patient_name =
|
||||
#{patientName},
|
||||
</if>
|
||||
@ -280,4 +287,23 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectVisitRecord"
|
||||
resultType="com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO">
|
||||
select pvr.in_hospital_info,
|
||||
pvr.out_hospital_info,
|
||||
pvr.surgical_record,
|
||||
ri.patient_name,
|
||||
ri.patient_phone,
|
||||
ri.family_member_phone,
|
||||
ri.birth_date,
|
||||
ri.card_no,
|
||||
ri.sex,
|
||||
ri.address
|
||||
FROM patient_task_execute_record pter
|
||||
LEFT JOIN patient_visit_record pvr ON pter.visit_record_id = pvr.id
|
||||
LEFT JOIN patient_info pi ON pi.id = pter.patient_id
|
||||
LEFT JOIN resident_info ri ON ri.id = pi.resident_id
|
||||
where pter.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -4,6 +4,26 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper">
|
||||
|
||||
<resultMap type="com.xinelu.manage.dto.specialdiseasenode.SpecialDiseaseNodeDTO" id="SpecialDiseaseRouteResult">
|
||||
<result property="routeId" column="routeId"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<result property="departmentName" column="department_name"/>
|
||||
<result property="diseaseTypeId" column="disease_type_id"/>
|
||||
<result property="diseaseTypeName" column="disease_type_name"/>
|
||||
<result property="routeName" column="route_name"/>
|
||||
<result property="routeCode" column="route_code"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="routeClassify" column="route_classify"/>
|
||||
<result property="releaseStatus" column="release_status"/>
|
||||
<result property="suitRange" column="suit_range"/>
|
||||
<result property="routeSort" column="route_sort"/>
|
||||
<result property="routeRemark" column="route_remark"/>
|
||||
<collection property="specialDiseaseNodeList" javaType="java.util.List"
|
||||
resultMap="SpecialDiseaseNodeResult"/>
|
||||
<collection property="triggerConditionList" javaType="java.util.List"
|
||||
resultMap="SpecialDiseaseTriggerConditionResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SpecialDiseaseNode" id="SpecialDiseaseNodeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="routeId" column="route_id"/>
|
||||
@ -52,6 +72,18 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SpecialDiseaseTriggerCondition" id="SpecialDiseaseTriggerConditionResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="routeId" column="route_id"/>
|
||||
<result property="routeName" column="route_name"/>
|
||||
<result property="triggerConditionCode" column="trigger_condition_code"/>
|
||||
<result property="triggerConditionName" column="trigger_condition_name"/>
|
||||
<result property="triggerConditionOperator" column="trigger_condition_operator"/>
|
||||
<result property="triggerConditionValue" column="trigger_condition_value"/>
|
||||
<result property="triggerConditionSort" column="trigger_condition_sort"/>
|
||||
<result property="triggerConditionRemark" column="trigger_condition_remark"/>
|
||||
|
||||
</resultMap>
|
||||
<sql id="selectSpecialDiseaseNodeVo">
|
||||
select id,
|
||||
route_id,
|
||||
@ -662,4 +694,80 @@
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteSpecialDiseaseNodeByRouteId">
|
||||
delete
|
||||
from special_disease_node
|
||||
where route_id = #{routeId}
|
||||
</delete>
|
||||
|
||||
<select id="selectSpecialDiseaseByRouteId"
|
||||
resultType="com.xinelu.manage.dto.specialdiseasenode.SpecialDiseaseNodeDTO"
|
||||
resultMap="SpecialDiseaseRouteResult">
|
||||
select sdr.id routeId,
|
||||
sdr.department_id,
|
||||
sdr.department_name,
|
||||
sdr.disease_type_id,
|
||||
sdr.disease_type_name,
|
||||
sdr.route_name,
|
||||
sdr.route_code,
|
||||
sdr.version,
|
||||
sdr.route_classify,
|
||||
sdr.release_status,
|
||||
sdr.suit_range,
|
||||
sdn.id specialDiseaseNodeId,
|
||||
sdn.route_id,
|
||||
sdn.route_name,
|
||||
sdn.route_node_name,
|
||||
sdn.route_node_day,
|
||||
sdn.task_type,
|
||||
sdn.task_subdivision,
|
||||
sdn.task_status,
|
||||
sdn.second_classify_describe,
|
||||
sdn.execution_time,
|
||||
sdn.template_id,
|
||||
sdn.template_name,
|
||||
sdn.template_type,
|
||||
sdn.message_push_sign,
|
||||
sdn.message_template__id,
|
||||
sdn.message_template_name,
|
||||
sdn.message_preview,
|
||||
sdn.message_node_content,
|
||||
sdn.official_push_sign,
|
||||
sdn.official_template_id,
|
||||
sdn.official_template_name,
|
||||
sdn.official_remind_content,
|
||||
sdn.official_node_content,
|
||||
sdn.applet_push_sign,
|
||||
sdn.applet_template_id,
|
||||
sdn.applet_template_name,
|
||||
sdn.applet_remind_content,
|
||||
sdn.applet_prompt_description,
|
||||
sdn.applet_node_content,
|
||||
sdn.phone_push_sign,
|
||||
sdn.phone_template_id,
|
||||
sdn.phone_template_name,
|
||||
sdn.phone_message_remind,
|
||||
sdn.phone_message_template_id,
|
||||
sdn.phone_message_template_name,
|
||||
sdn.phone_agency_name,
|
||||
sdn.phone_node_content,
|
||||
sdn.route_check_status,
|
||||
sdn.route_check_person,
|
||||
sdn.route_check_date,
|
||||
sdn.route_check_remark,
|
||||
sdtc.id triggerConditionId,
|
||||
sdtc.route_id,
|
||||
sdtc.route_name,
|
||||
sdtc.trigger_condition_code,
|
||||
sdtc.trigger_condition_name,
|
||||
sdtc.trigger_condition_operator,
|
||||
sdtc.trigger_condition_value,
|
||||
sdtc.trigger_condition_sort,
|
||||
sdtc.trigger_condition_remark
|
||||
from special_disease_route sdr
|
||||
left join special_disease_node sdn ON sdn.route_id = sdr.id
|
||||
LEFT JOIN special_disease_trigger_condition sdtc ON sdtc.route_id = sdr.id
|
||||
where sdr.id = #{routeId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -216,4 +216,10 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSpecialDiseaseTriggerConditionByRouteId">
|
||||
delete
|
||||
from special_disease_trigger_condition
|
||||
where route_id = #{routeId}
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user