手动生成任务接口。

This commit is contained in:
haown 2024-05-22 18:03:01 +08:00
parent fcd69a94e0
commit 974c0e7f7f
22 changed files with 681 additions and 94 deletions

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.controller.patientnodeparamscurrent;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
@ -33,11 +34,11 @@ public class PatientNodeParamsCurrentController extends BaseController {
@Resource
private IPatientNodeParamsCurrentService patientNodeParamsCurrentService;
/**
* 查询患者节点参数列表
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:list')")
@GetMapping("/list")
/**
* 查询患者节点参数列表
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:list')")
@GetMapping("/list")
public TableDataInfo list(PatientNodeParamsCurrent patientNodeParamsCurrent) {
startPage();
List<PatientNodeParamsCurrent> list = patientNodeParamsCurrentService.selectPatientNodeParamsCurrentList(patientNodeParamsCurrent);
@ -94,4 +95,15 @@ public class PatientNodeParamsCurrentController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(patientNodeParamsCurrentService.deletePatientNodeParamsCurrentByIds(ids));
}
/**
* 批量新增患者节点参数
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:add')")
@Log(title = "患者节点参数", businessType = BusinessType.INSERT)
@PostMapping("/inserList")
public R<?> inserList(@RequestBody List<List<PatientNodeParamsCurrent>> paramsList) {
patientNodeParamsCurrentService.insertList(paramsList);
return R.ok();
}
}

View File

@ -5,13 +5,12 @@ import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
@ -89,29 +88,12 @@ public class SignPatientManageRouteNodeController extends BaseController {
* 查询患者任务节点
*/
@ApiOperation("生成数据---任务节点列表")
@GetMapping("/getAllNodeByPatient")
public R<List<SignPatientManageRouteNode>> getAllNodeByPatient(PatientTaskDto patientTaskDto) {
@GetMapping("/getSpecialDiseaseNode")
public R<List<PatientSpecialDiseaseNodeVo>> getSpecialDiseaseNode(PatientTaskDto patientTaskDto) {
if (patientTaskDto.getPatientId() == null) {
throw new ServiceException("请选择患者!");
}
if (StringUtils.isBlank(patientTaskDto.getRouteCheckStatus())) {
throw new ServiceException("请选择审核状态!");
}
return R.ok(signNodeService.getAllNodeByPatient(patientTaskDto));
return R.ok(signNodeService.getSpecialDiseaseNode(patientTaskDto));
}
/**
* 根据节点id提取参数列表
*/
@ApiOperation("根据节点id提取参数列表")
@GetMapping("/getParams")
public R<List<PatientNodeParamsCurrent>> getParams(Long patientId, Long manageNodeId) {
if (patientId == null) {
throw new ServiceException("请选择患者!");
}
if (manageNodeId == null) {
throw new ServiceException("请选择节点!");
}
return R.ok(signNodeService.getParams(patientId, manageNodeId));
}
}

View File

@ -3,19 +3,29 @@ package com.xinelu.manage.controller.specialdiseasenode;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import java.util.Objects;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 专病路径-管理节点信息Controller
@ -112,4 +122,16 @@ public class SpecialDiseaseNodeController extends BaseController {
}
return specialDiseaseNodeService.updateRouteCheckStatus(specialDiseaseNode);
}
/**
* 根据节点id提取参数列表
*/
@ApiOperation("根据节点id提取参数列表")
@GetMapping("/getParams")
public R<List<List<PatientNodeParamsCurrent>>> getParams(Long id, Long patientId) {
if (id == null) {
throw new ServiceException("请选择节点!");
}
return R.ok(specialDiseaseNodeService.getParams(id, patientId));
}
}

View File

@ -46,6 +46,13 @@ private static final long serialVersionUID=1L;
@Excel(name = "任务细分名称")
private String taskPartitionDictName;
/**
* 任务细分编码
*/
@ApiModelProperty(value = "任务细分编码")
@Excel(name = "任务细分编码")
private String taskPartitionCode;
/** 任务类型表id */
@ApiModelProperty(value = "任务类型表id")
@Excel(name = "任务类型表id")
@ -56,6 +63,11 @@ private static final long serialVersionUID=1L;
@Excel(name = "任务类型名称")
private String taskTypeName;
/** 任务类型编码 */
@ApiModelProperty(value = "任务类型编码")
@Excel(name = "任务类型编码")
private String taskTypeCode;
/** 专病路径表id */
@ApiModelProperty(value = "专病路径表id")
@Excel(name = "专病路径表id")

View File

@ -40,6 +40,11 @@ public class SignPatientManageRouteNode extends BaseEntity {
@Excel(name = "路径名称", readConverterExp = "任务名称")
private String manageRouteName;
/** 管理路径节点id */
@ApiModelProperty(value = "管理路径节点id")
@Excel(name = "管理路径节点id")
private Long routeNodeId;
/** 管理路径节点名称 */
@ApiModelProperty(value = "管理路径节点名称")
@Excel(name = "管理路径节点名称")

View File

@ -41,4 +41,16 @@ public class SignPatientManageRouteNodeDto {
* */
@ApiModelProperty(value = "任务类型列表")
private List<String> taskTypeList;
/**
* 患者表主键
*/
@ApiModelProperty(value = "患者表主键")
private Long patientId;
/**
* 专病路径节点id
*/
@ApiModelProperty(value = "专病路径节点id")
private String routeNodeId;
}

View File

@ -3,7 +3,6 @@ package com.xinelu.manage.mapper.patientnodeparamslcurrent;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import java.util.List;
/**
* 患者节点参数Mapper接口
*
@ -58,4 +57,7 @@ public interface PatientNodeParamsCurrentMapper {
* @return 结果
*/
int deletePatientNodeParamsCurrentByIds(Long[] ids);
int insertList(List<PatientNodeParamsCurrent> paramsList);
}

View File

@ -58,4 +58,6 @@ public interface PatientNodeParamsLogMapper {
* @return 结果
*/
int deletePatientNodeParamsLogByIds(Long[] ids);
int insertList(List<PatientNodeParamsLog> paramsLogList);
}

View File

@ -85,4 +85,5 @@ public interface SignPatientManageRouteNodeMapper {
* @return 患者任务列表
*/
List<PatientTaskVo> selectPatientTaskList(PatientTaskDto patientTaskDto);
}

View File

@ -1,9 +1,9 @@
package com.xinelu.manage.mapper.specialdiseasenode;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo;
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import java.util.List;
@ -87,4 +87,12 @@ public interface SpecialDiseaseNodeMapper {
* @return 专病路径-管理节点信息
*/
SpecialDiseaseRouteVO selectSpecialDiseaseByRouteId(Long specialDiseaseRouteId);
/**
* 查询专病路径-管理节点信息
*
* @param specialDiseaseRouteId 专病路径-管理节点信息主键
* @return 专病路径-管理节点信息
*/
List<PatientSpecialDiseaseNodeVo> selectRouteNodeByRouteId(Long specialDiseaseRouteId);
}

View File

@ -58,4 +58,13 @@ public interface IPatientNodeParamsCurrentService {
* @return 结果
*/
int deletePatientNodeParamsCurrentById(Long id);
/**
* 批量新增患者节点参数
*
* @param paramsList 患者节点参数列表
* @return 结果
*/
void insertList(List<List<PatientNodeParamsCurrent>> paramsList);
}

View File

@ -1,12 +1,21 @@
package com.xinelu.manage.service.patientnodeparamscurrent.impl;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.patientnodeparamslog.PatientNodeParamsLog;
import com.xinelu.manage.mapper.patientnodeparamslcurrent.PatientNodeParamsCurrentMapper;
import com.xinelu.manage.mapper.patientnodeparamslog.PatientNodeParamsLogMapper;
import com.xinelu.manage.service.patientnodeparamscurrent.IPatientNodeParamsCurrentService;
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 患者节点参数Service业务层处理
@ -18,6 +27,10 @@ import org.springframework.stereotype.Service;
public class PatientNodeParamsCurrentServiceImpl implements IPatientNodeParamsCurrentService {
@Resource
private PatientNodeParamsCurrentMapper patientNodeParamsCurrentMapper;
@Resource
private PatientNodeParamsLogMapper patientNodeParamsLogMapper;
@Resource
private ISignPatientManageRouteNodeService manageRouteNodeService;
/**
* 查询患者节点参数
@ -86,4 +99,68 @@ public class PatientNodeParamsCurrentServiceImpl implements IPatientNodeParamsCu
public int deletePatientNodeParamsCurrentById(Long id) {
return patientNodeParamsCurrentMapper.deletePatientNodeParamsCurrentById(id);
}
@Override
@Transactional
public void insertList(List<List<PatientNodeParamsCurrent>> paramsList) {
// 多个list组合成一个参数list
List<PatientNodeParamsCurrent> allList = new ArrayList<>();
List<PatientNodeParamsCurrent> saveList = new ArrayList<>();
List<PatientNodeParamsCurrent> updList = new ArrayList<>();
List<List<PatientNodeParamsCurrent>> generateTaskList = new ArrayList<>();
List<List<PatientNodeParamsCurrent>> updateTaskList = new ArrayList<>();
for (List<PatientNodeParamsCurrent> paramList : paramsList) {
AtomicBoolean generateTask = new AtomicBoolean(true);
paramList.forEach(param-> {
if (param.getId() == null) {
param.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
param.setCreateTime(LocalDateTime.now());
saveList.add(param);
} else {
param.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
param.setUpdateTime(LocalDateTime.now());
updList.add(param);
generateTask.set(false);
}
allList.add(param);
});
if (generateTask.get()) {
// 生成任务
generateTaskList.add(paramList);
} else {
// 修改任务
updateTaskList.add(paramList);
}
}
if (CollectionUtils.isNotEmpty(saveList)) {
patientNodeParamsCurrentMapper.insertList(saveList);
}
if (CollectionUtils.isNotEmpty(updList)) {
updList.forEach(updParam -> {
patientNodeParamsCurrentMapper.updatePatientNodeParamsCurrent(updParam);
});
}
// 保存参数日志表
List<PatientNodeParamsLog> paramsLogList = new ArrayList<>();
allList.forEach(paramCurrent -> {
PatientNodeParamsLog paramsLog = new PatientNodeParamsLog();
BeanUtils.copyBeanProp(paramsLog, paramCurrent);
paramsLog.setId(null);
paramsLog.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
paramsLog.setCreateTime(LocalDateTime.now());
paramsLogList.add(paramsLog);
});
patientNodeParamsLogMapper.insertList(paramsLogList);
// 生成任务
if (CollectionUtils.isNotEmpty(generateTaskList)) {
manageRouteNodeService.generateTask(generateTaskList);
}
// 修改任务
if (CollectionUtils.isNotEmpty(updateTaskList)) {
manageRouteNodeService.updateTask(updateTaskList);
}
}
}

View File

@ -9,6 +9,7 @@ import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNo
import com.xinelu.manage.vo.signpatientmanageroutenode.AppletRouteNodeListVo;
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo;
import java.util.List;
@ -103,7 +104,17 @@ public interface ISignPatientManageRouteNodeService {
*/
List<AppletRouteNodeListVo> getAppletTaskList(AppletPatientTaskDto appletPatientTaskDto);
List<SignPatientManageRouteNode> getAllNodeByPatient(PatientTaskDto patientTaskDto);
List<PatientSpecialDiseaseNodeVo> getSpecialDiseaseNode(PatientTaskDto patientTaskDto);
List<PatientNodeParamsCurrent> getParams(Long patientId, Long manageNodeId);
/**
* 根据参数列表生成任务
* @param paramsCurrentLists 参数列表
*/
void generateTask(List<List<PatientNodeParamsCurrent>> paramsCurrentLists);
/**
* 根据参数列表修改任务
* @param paramsCurrentLists 参数列表
*/
void updateTask(List<List<PatientNodeParamsCurrent>> paramsCurrentLists);
}

View File

@ -5,7 +5,10 @@ import com.xinelu.common.constant.RouteNodeNameConstants;
import com.xinelu.common.constant.TaskContentConstants;
import com.xinelu.common.constant.TaskCreateTypeConstant;
import com.xinelu.common.constant.VisitMethodConstants;
import com.xinelu.common.enums.NodeExecuteStatusEnum;
import com.xinelu.common.enums.RouteCheckStatusEnum;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
@ -15,6 +18,7 @@ import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import com.xinelu.manage.dto.signpatientmanageroutenode.AppletPatientTaskDto;
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
@ -26,6 +30,9 @@ import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper;
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper;
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper;
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
import com.xinelu.manage.service.questioninfo.IQuestionInfoService;
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
@ -36,10 +43,10 @@ import com.xinelu.manage.vo.signpatientmanageroutenode.AppletRouteNodeListVo;
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeInfoVo;
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
@ -82,6 +89,12 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
private SignPatientRecordMapper signPatientRecordMapper;
@Resource
private PatientVisitRecordMapper patientVisitRecordMapper;
@Resource
private SpecialDiseaseNodeMapper specialDiseaseNodeMapper;
@Resource
private SpecialDiseaseTriggerConditionMapper triggerConditionMapper;
@Resource
private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper;
/**
* 查询签约患者管理任务路径节点
@ -349,70 +362,174 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
return retList;
}
@Override public List<SignPatientManageRouteNode> getAllNodeByPatient(PatientTaskDto patientTaskDto) {
@Override public List<PatientSpecialDiseaseNodeVo> getSpecialDiseaseNode(PatientTaskDto patientTaskDto) {
// 查询最新一次签约记录
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId());
if (ObjectUtils.isEmpty(patientInfo)) {
throw new ServiceException("请选择患者!");
}
patientTaskDto.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
return signPatientManageRouteNodeMapper.getNodeList(patientTaskDto);
SignPatientManageRoute routeQuery = new SignPatientManageRoute();
routeQuery.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
routeQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
List<SignPatientManageRoute> manageRouteList = signRouteMapper.selectSignPatientManageRouteList(routeQuery);
if (CollectionUtils.isEmpty(manageRouteList)) {
throw new ServiceException("未找到签约管理路径");
}
// 根据专病路径查询专病节点信息
return specialDiseaseNodeMapper.selectRouteNodeByRouteId(manageRouteList.get(0).getRouteId());
}
@Override
public List<PatientNodeParamsCurrent> getParams(Long patientId, Long manageNodeId) {
List<PatientNodeParamsCurrent> nodeParams = new ArrayList<>();
SignPatientManageRouteNode signPatientManageRouteNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(manageNodeId);
if (StringUtils.isNotBlank(signPatientManageRouteNode.getNodeContent()) && signPatientManageRouteNode.getNodeContent().contains("data-fieldMark")) {
JSONObject paramValues = getParamsValue(signPatientManageRouteNode.getTaskSubdivision(), patientId);
Document document = Jsoup.parse(signPatientManageRouteNode.getNodeContent());
// 需要提取的span
Elements spanlist = document.getElementsByClass("attachment");
for (Element span : spanlist) {
PatientNodeParamsCurrent nodeParam = new PatientNodeParamsCurrent();
String paramKey = span.attr("data-fieldMark");
String paramName = span.attr("data-fileSpan");
nodeParam.setParamName(paramName);
nodeParam.setParamKey(paramKey);
nodeParam.setParamValue(paramValues.getOrDefault(paramKey, "").toString());
nodeParams.add(nodeParam);
@Transactional(rollbackFor = Exception.class)
public void generateTask(List<List<PatientNodeParamsCurrent>> paramsCurrentLists) {
// 查询患者
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(paramsCurrentLists.get(0).get(0).getPatientId());
SignPatientManageRoute routeQuery = new SignPatientManageRoute();
routeQuery.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
routeQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
List<SignPatientManageRoute> manageRouteList = signRouteMapper.selectSignPatientManageRouteList(routeQuery);
if (CollectionUtils.isEmpty(manageRouteList)) {
throw new ServiceException("未找到签约管理路径");
}
// 查询专病路径节点
SpecialDiseaseNode specialDiseaseNode = specialDiseaseNodeMapper.selectSpecialDiseaseNodeById(paramsCurrentLists.get(0).get(0).getRouteNodeId());
if (ObjectUtils.isEmpty(specialDiseaseNode)) {
throw new ServiceException("数据错误,请联系管理员");
}
List<SignPatientManageRouteNode> manageNodeList = new ArrayList<>();
for (List<PatientNodeParamsCurrent> paramsCurrentList : paramsCurrentLists) {
List<SignPatientManageRouteNode> nodeList = paramsCurrentList.stream().map(params -> {
SignPatientManageRouteNode manageRouteNode = new SignPatientManageRouteNode();
BeanUtils.copyBeanProp(manageRouteNode, specialDiseaseNode);
manageRouteNode.setManageRouteId(manageRouteList.get(0).getId());
manageRouteNode.setManageRouteName(manageRouteList.get(0).getRouteName());
manageRouteNode.setId(null);
manageRouteNode.setRouteNodeId(specialDiseaseNode.getId());
manageRouteNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
manageRouteNode.setRouteCheckDate(LocalDateTime.now());
manageRouteNode.setRouteCheckRemark("手动生成任务");
manageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
// 替换文本
manageRouteNode.setNodeContent(replaceNodeContent(specialDiseaseNode.getNodeContent(), paramsCurrentList));
manageRouteNode.setCreateTime(LocalDateTime.now());
manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return manageRouteNode;
}).collect(Collectors.toList());
manageNodeList.addAll(nodeList);
}
// 批量保存
signPatientManageRouteNodeMapper.insertBatch(manageNodeList);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateTask(List<List<PatientNodeParamsCurrent>> paramsCurrentLists) {
// 查询患者
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(paramsCurrentLists.get(0).get(0).getPatientId());
SignPatientManageRoute routeQuery = new SignPatientManageRoute();
routeQuery.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
routeQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
List<SignPatientManageRoute> manageRouteList = signRouteMapper.selectSignPatientManageRouteList(routeQuery);
if (CollectionUtils.isEmpty(manageRouteList)) {
throw new ServiceException("未找到签约管理路径");
}
SignPatientManageRouteNodeDto signPatientManageRouteNodeDto = new SignPatientManageRouteNodeDto();
signPatientManageRouteNodeDto.setPatientId(paramsCurrentLists.get(0).get(0).getPatientId());
signPatientManageRouteNodeDto.setManageRouteId(manageRouteList.get(0).getId());
List<SignPatientManageRouteNode> manageNodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNodeDto);
if (CollectionUtils.isEmpty(manageRouteList)) {
// 生成任务
generateTask(paramsCurrentLists);
} else {
if (StringUtils.equals(NodeExecuteStatusEnum.EXECUTED.getInfo(), manageNodeList.get(0).getNodeExecuteStatus())) {
// 任务已执行不修改
} else {
// 逐条修改任务nodeContent
for (int i = 0; i < manageNodeList.size(); i++) {
SignPatientManageRouteNode node = manageNodeList.get(i);
node.setNodeContent(replaceNodeContent(node.getNodeContent(), paramsCurrentLists.get(i)));
signPatientManageRouteNodeMapper.updateSignPatientManageRouteNode(node);
}
}
}
return nodeParams;
}
/**
* 根据任务细分类型获取患者的真实信息
* @param taskSubdivision 任务细分类型code
* @param patientId 患者主键
* @return 实际信息
*/
private JSONObject getParamsValue(String taskSubdivision, Long patientId) {
JSONObject retObj = new JSONObject();
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
switch (taskSubdivision) {
// 健康档案
case "TPC202405200001":
retObj = JSONObject.parseObject(JSONObject.toJSONString(patientInfo));
break;
default:
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
retObj.fluentPut("patientName", patientInfo.getPatientName())
.fluentPut("dischargeTime", patientInfo.getDischargeTime().format(df))
.fluentPut("visitDate", patientInfo.getVisitDate().format(df));
break;
private String replaceNodeContent(String nodeContent, List<PatientNodeParamsCurrent> paramsList) {
Map<String, String> map = paramsList.stream().collect(Collectors.toMap(PatientNodeParamsCurrent::getParamKey,PatientNodeParamsCurrent::getParamValue,(key1,key2)->key2));
Document document = Jsoup.parse(nodeContent);
// 需要提取的span
Elements spanlist = document.select("span[data-w-e-type]");
for (Element span : spanlist) {
PatientNodeParamsCurrent nodeParam = new PatientNodeParamsCurrent();
String paramKey = span.attr("data-fieldMark");
span.text(map.getOrDefault(paramKey, ""))
.removeAttr("data-w-e-type")
.removeAttr("data-fieldMark")
.removeAttr("data-link")
.removeAttr("data-w-e-is-void")
.removeAttr("data-w-e-is-inline")
.removeAttr("data-filespan")
.removeAttr("data-filename");
}
return retObj;
return document.body().html();
}
// nodeContent标签提取替换
public static void main(String[] args) {
// json为数据库中的对象
JSONObject json = new JSONObject();
json.fluentPut("name", "张三");
json.fluentPut("patientName", "张三");
json.fluentPut("sex", "");
json.fluentPut("age", "10");
// html为前端传入后端的数据
String s = "<p><span id=\"name\" class = \"attachment\" data-w-e-type=\"attachment\" data-w-e-is-void data-w-e-is-inline data-link=\"\" data-fileSpan=\"姓名\", data-fileName=\"患者信息\"><span class=\"path-tag-wrap\"><span>患者信息</span><span>姓名</span></span></span>:请按时使用药物治疗。"
+ "<span id=\"name\" class = \"attachment\" data-w-e-type=\"attachment\" data-w-e-is-void data-w-e-is-inline data-link=\"\" data-fileSpan=\"姓名\", data-fileName=\"患者信息\"><span class=\"path-tag-wrap\"><span>患者信息</span><span>姓名</span></span></span>:请按时吃饭。</p>";
String s = "<p><strong>基本信息</strong></p><p>姓名:<span data-w-e-type=\"attachmenttwo\"\n"
+ " data-w-e-is-void\n"
+ " data-w-e-is-inline\n"
+ " data-link=\"\"\n"
+ " data-fieldMark=\"patientName\"\n"
+ " data-fileSpan=\"姓名\"\n"
+ " data-fileName=\"基本信息\">\n"
+ " <span class=\"path-tag-wrap\">\n"
+ " <span>基本信息</span>\n"
+ " <span>姓名</span>\n"
+ " </span>\n"
+ " </span></p><p>性别:<span data-w-e-type=\"attachmenttwo\"\n"
+ " data-w-e-is-void\n"
+ " data-w-e-is-inline\n"
+ " data-link=\"\"\n"
+ " data-fieldMark=\"sex\"\n"
+ " data-fileSpan=\"性别\"\n"
+ " data-fileName=\"基本信息\">\n"
+ " <span class=\"path-tag-wrap\">\n"
+ " <span>基本信息</span>\n"
+ " <span>性别</span>\n"
+ " </span>\n"
+ " </span></p><p>年龄:<span data-w-e-type=\"attachmenttwo\"\n"
+ " data-w-e-is-void\n"
+ " data-w-e-is-inline\n"
+ " data-link=\"\"\n"
+ " data-fieldMark=\"age\"\n"
+ " data-fileSpan=\"年龄\"\n"
+ " data-fileName=\"基本信息\">\n"
+ " <span class=\"path-tag-wrap\">\n"
+ " <span>基本信息</span>\n"
+ " <span>年龄</span>\n"
+ " </span>\n"
+ " </span></p><p>地址:<span data-w-e-type=\"attachmenttwo\"\n"
+ " data-w-e-is-void\n"
+ " data-w-e-is-inline\n"
+ " data-link=\"\"\n"
+ " data-fieldMark=\"address\"\n"
+ " data-fileSpan=\"地址\"\n"
+ " data-fileName=\"基本信息\">\n"
+ " <span class=\"path-tag-wrap\">\n"
+ " <span>基本信息</span>\n"
+ " <span>地址</span>\n"
+ " </span>\n"
+ " </span></p>";
Document document = Jsoup.parse(s);
//Elements spanlist = document.getElementsByClass("attachment");
//for (Element span : spanlist) {
@ -429,10 +546,34 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
//Elements element = document.getElementsByTag("p");
//System.out.println("---------------------\n"+element.get(0).html());
Elements spanlist = document.getElementsByClass("attachment");
//Elements spanlist = document.select("span[data-w-e-type]");
//for (Element span : spanlist) {
// String paramKey = span.attr("data-fieldMark");
// String paramName = span.attr("data-fileSpan");
// System.out.println("属性==========" + paramName + ":"+ paramKey);
//}
Elements spanlist = document.select("span[data-w-e-type]");
for (Element span : spanlist) {
String customAttribute = span.attr("data-fileSpan");
System.out.println("属性==========" + customAttribute);
PatientNodeParamsCurrent nodeParam = new PatientNodeParamsCurrent();
String paramKey = span.attr("data-fieldMark");
String text = json.getOrDefault(paramKey, "").toString();
//span.replaceWith(new TextNode("<p>" + text +"</p"));
span.text(text)
.removeAttr("id")
.removeAttr("class")
.removeAttr("data-w-e-type")
.removeAttr("data-link")
.removeAttr("data-w-e-is-void")
.removeAttr("data-w-e-is-inline")
.removeAttr("data-fieldmark")
.removeAttr("data-filespan")
.removeAttr("data-filename");
}
//Elements element = document.getElementsByTag("p");
//System.out.println("---------------------\n"+element.get(0).html());
System.out.println(document.body().html());
}
}

View File

@ -187,7 +187,10 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
if (CollectionUtils.isEmpty(nodeList)) {
throw new ServiceException("该管理任务没有任务节点");
}
List<SignPatientManageRouteNode> manageNodeList = nodeList.stream().map(node -> {
// nodeContent为空或者不包含替换标签则自动生成任务
List<SignPatientManageRouteNode> manageNodeList = nodeList.stream()
.filter(node -> StringUtils.isBlank(node.getNodeContent()) || !node.getNodeContent().contains("data-w-e-type"))
.map(node -> {
SignPatientManageRouteNode manageRouteNode = new SignPatientManageRouteNode();
BeanUtils.copyBeanProp(manageRouteNode, node);
manageRouteNode.setManageRouteId(signPatientManageRoute.getId());
@ -197,12 +200,15 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
manageRouteNode.setRouteCheckDate(LocalDateTime.now());
manageRouteNode.setRouteCheckRemark("签约自动审核通过");
manageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
manageRouteNode.setRouteNodeId(node.getId());
manageRouteNode.setCreateTime(LocalDateTime.now());
manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return manageRouteNode;
}).collect(Collectors.toList());
// 批量保存
manageRouteNodeMapper.insertBatch(manageNodeList);
if (!CollectionUtils.isEmpty(manageNodeList)) {
manageRouteNodeMapper.insertBatch(manageNodeList);
}
// 保存触发条件
SpecialDiseaseTriggerCondition triggerConditionQuery = new SpecialDiseaseTriggerCondition();
triggerConditionQuery.setRouteId(signPatientManageRoute.getRouteId());

View File

@ -1,9 +1,9 @@
package com.xinelu.manage.service.specialdiseasenode;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import java.util.List;
/**
@ -76,4 +76,6 @@ public interface ISpecialDiseaseNodeService {
* @return AjaxResult
*/
AjaxResult updateRouteCheckStatus(SpecialDiseaseNode specialDiseaseNode);
List<List<PatientNodeParamsCurrent>> getParams(Long id, Long patientId);
}

View File

@ -1,29 +1,41 @@
package com.xinelu.manage.service.specialdiseasenode.impl;
import com.alibaba.fastjson2.JSONObject;
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.patientinfo.PatientInfo;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.patientnodeparamslcurrent.PatientNodeParamsCurrentMapper;
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService;
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.TreeSet;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 专病路径-管理节点信息Service业务层处理
*
@ -37,6 +49,10 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
private SpecialDiseaseNodeMapper specialDiseaseNodeMapper;
@Resource
private SpecialDiseaseRouteMapper specialDiseaseRouteMapper;
@Resource
private PatientNodeParamsCurrentMapper patientNodeParamsCurrentMapper;
@Resource
private PatientInfoMapper patientInfoMapper;
/**
@ -183,4 +199,68 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
specialDiseaseNode.setRouteCheckDate(LocalDateTime.now());
return AjaxResult.success(specialDiseaseNodeMapper.updateSpecialDiseaseNode(specialDiseaseNode));
}
@Override
public List<List<PatientNodeParamsCurrent>> getParams(Long id, Long patientId) {
List<List<PatientNodeParamsCurrent>> retList = new ArrayList<>();
// 根据节点id查询是否有已经维护的参数
PatientNodeParamsCurrent paramsQuery = new PatientNodeParamsCurrent();
paramsQuery.setPatientId(patientId);
paramsQuery.setRouteNodeId(id);
List<PatientNodeParamsCurrent> nodeParams = patientNodeParamsCurrentMapper.selectPatientNodeParamsCurrentList(paramsQuery);
if (CollectionUtils.isEmpty(nodeParams)) {
SpecialDiseaseNode specialDiseaseNode = specialDiseaseNodeMapper.selectSpecialDiseaseNodeById(id);
if (StringUtils.isNotBlank(specialDiseaseNode.getNodeContent()) && specialDiseaseNode.getNodeContent().contains("data-fieldMark")) {
JSONObject paramValues = getParamsValue(specialDiseaseNode.getTaskSubdivision(), patientId);
Document document = Jsoup.parse(specialDiseaseNode.getNodeContent());
// 需要提取的span
Elements spanlist = document.select("span[data-w-e-type]");
for (Element span : spanlist) {
PatientNodeParamsCurrent nodeParam = new PatientNodeParamsCurrent();
String paramKey = span.attr("data-fieldMark");
String paramName = span.attr("data-fileSpan");
nodeParam.setSn("1");
nodeParam.setParamName(paramName);
nodeParam.setParamKey(paramKey);
nodeParam.setParamValue(paramValues.getOrDefault(paramKey, "").toString());
nodeParams.add(nodeParam);
}
// nodeParams去重
nodeParams = nodeParams.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()-> new TreeSet<>(Comparator.comparing(PatientNodeParamsCurrent::getParamKey))), ArrayList::new));
retList.add(nodeParams);
}
} else {
Map<String, List<PatientNodeParamsCurrent>> groupBySn = nodeParams.stream().collect(Collectors.groupingBy(PatientNodeParamsCurrent::getSn));
for (String sn : groupBySn.keySet()) {
retList.add(groupBySn.get(sn));
}
}
return retList;
}
/**
* 根据任务细分类型获取患者的真实信息
* @param taskSubdivision 任务细分类型code
* @param patientId 患者主键
* @return 实际信息
*/
private JSONObject getParamsValue(String taskSubdivision, Long patientId) {
JSONObject retObj = new JSONObject();
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
switch (taskSubdivision) {
// 健康档案
case "TPC202405200001":
retObj = JSONObject.parseObject(JSONObject.toJSONString(patientInfo));
break;
default:
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
retObj.fluentPut("patientName", patientInfo.getPatientName())
.fluentPut("dischargeTime", patientInfo.getDischargeTime().format(df))
.fluentPut("visitDate", patientInfo.getVisitDate().format(df));
break;
}
return retObj;
}
}

View File

@ -0,0 +1,76 @@
package com.xinelu.manage.vo.signpatientmanageroutenode;
import com.xinelu.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description: 患者管理路径节点
* @author: haown
* @create: 2024-05-21 10:14
**/
@ApiModel("患者管理路径节点")
@Data
public class PatientMangeRouteNodeVo {
/** 主键id */
private Long id;
/** 签约患者管理任务表id */
@ApiModelProperty(value = "签约患者管理任务表id")
@Excel(name = "签约患者管理任务表id")
private Long manageRouteId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任务名称")
private String manageRouteName;
/** 管理路径节点名称 */
@ApiModelProperty(value = "管理路径节点名称")
@Excel(name = "管理路径节点名称")
private String routeNodeName;
/** 管理路径节点时间,时间单位为:天 */
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
@Excel(name = "管理路径节点时间,时间单位为:天")
private Integer routeNodeDay;
/** 任务细分id */
@ApiModelProperty(value = "任务细分id")
@Excel(name = "任务细分id")
private Long taskPartitionDictId;
/** 任务细分名称 */
@ApiModelProperty(value = "任务细分名称")
@Excel(name = "任务细分名称")
private String taskPartitionDictName;
/**
* 任务细分编码
*/
@ApiModelProperty(value = "任务细分编码")
@Excel(name = "任务细分编码")
private String taskPartitionCode;
/** 任务类型表id */
@ApiModelProperty(value = "任务类型表id")
@Excel(name = "任务类型表id")
private Long taskTypeId;
/** 任务类型名称 */
@ApiModelProperty(value = "任务类型名称")
@Excel(name = "任务类型名称")
private String taskTypeName;
/** 任务类型编码 */
@ApiModelProperty(value = "任务类型编码")
@Excel(name = "任务类型编码")
private String taskTypeCode;
/** 节点审核状态同意AGREE不同意DISAGREE */
@ApiModelProperty(value = "节点审核状态同意AGREE不同意DISAGREE")
@Excel(name = "节点审核状态同意AGREE不同意DISAGREE")
private String routeCheckStatus;
}

View File

@ -0,0 +1,71 @@
package com.xinelu.manage.vo.specialdiseasenode;
import com.xinelu.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description: 患者签约专病管理路径节点信息
* @author: haown
* @create: 2024-05-21 11:17
**/
@ApiModel("患者签约专病管理路径节点信息")
@Data
public class PatientSpecialDiseaseNodeVo {
/** 任务细分id */
@ApiModelProperty(value = "任务细分id")
private Long taskPartitionDictId;
/** 任务细分名称 */
@ApiModelProperty(value = "任务细分名称")
private String taskPartitionDictName;
/**
* 任务细分编码
*/
@ApiModelProperty(value = "任务细分编码")
private String taskPartitionCode;
/** 任务类型表id */
@ApiModelProperty(value = "任务类型表id")
private Long taskTypeId;
/** 任务类型名称 */
@ApiModelProperty(value = "任务类型名称")
private String taskTypeName;
/** 任务类型编码 */
@ApiModelProperty(value = "任务类型编码")
private String taskTypeCode;
/** 专病路径表id */
@ApiModelProperty(value = "专病路径表id")
private Long routeId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
private String routeName;
/**
* 节点天数单位
*/
@ApiModelProperty(value = "节点天数,单位:天")
private Integer routeNodeDay;
/** 节点ID */
@ApiModelProperty(value = "节点ID")
private Long routeNodeId;
/** 节点名称 */
@ApiModelProperty(value = "节点名称")
private String routeNodeName;
/**
* 节点审核状态同意AGREE不同意DISAGREE
*/
@ApiModelProperty(value = "节点审核状态同意AGREE不同意DISAGREE")
@Excel(name = "节点审核状态同意AGREE不同意DISAGREE")
private String routeCheckStatus;
}

View File

@ -236,4 +236,21 @@
#{id}
</foreach>
</delete>
<insert id="insertList">
insert into patient_node_params_current
(patient_id, patient_name, task_partition_dict_id, task_partition_dict_name,
task_type_id, task_type_name, route_id, route_name, route_node_id, route_node_name,
sn, param_name, param_key, param_value, create_time, update_by, update_time, create_by)
values
<foreach collection="list" separator="," item="item">
(#{item.patientId}, #{item.patientName}, #{item.taskPartitionDictId}, #{item.taskPartitionDictName},
#{item.taskTypeId}, #{item.taskTypeName}, #{item.routeId},
#{item.routeName}, #{item.routeNodeId}, #{item.routeNodeName},
#{item.sn},#{item.paramName},#{item.paramKey},#{item.paramValue}, #{item.createTime}, #{item.updateBy},
#{item.updateTime}, #{item.createBy}
)
</foreach>
</insert>
</mapper>

View File

@ -236,4 +236,20 @@
#{id}
</foreach>
</delete>
<insert id="insertList">
insert into patient_node_params_log
(patient_id, patient_name, task_partition_dict_id, task_partition_dict_name,
task_type_id, task_type_name, route_id, route_name, route_node_id, route_node_name,
sn, param_name, param_key, param_value, create_time, create_by, update_by, update_time)
values
<foreach collection="list" separator="," item="item">
(#{item.patientId}, #{item.patientName}, #{item.taskPartitionDictId}, #{item.taskPartitionDictName},
#{item.taskTypeId}, #{item.taskTypeName}, #{item.routeId},
#{item.routeName}, #{item.routeNodeId}, #{item.routeNodeName},
#{item.sn},#{item.paramName},#{item.paramKey},#{item.paramValue}, #{item.createTime}, #{item.createBy}, #{item.updateBy},
#{item.updateTime}
)
</foreach>
</insert>
</mapper>

View File

@ -826,4 +826,27 @@
left join task_partition_dict tpd on tpd.task_partition_code = sdn.task_subdivision
where sdr.id = #{specialDiseaseRouteId}
</select>
<select id="selectRouteNodeByRouteId" resultType="com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo">
select sdr.id routeId,
sdr.route_name routeName,
sdn.id as routeNodeId,
sdn.route_node_name routeNodeName,
sdn.route_node_day routeNodeDay,
sdn.task_type,
sdn.task_subdivision,
sdn.route_check_status routeCheckStatus,
ttd.id taskTypeId,
ttd.task_type_name taskTypeName,
ttd.task_type_code taskTypeCode,
tpd.id taskPartitionDictId,
tpd.task_partition_name taskPartitionDictName,
tpd.task_partition_code taskPartitionCode
from special_disease_route sdr
left join special_disease_node sdn ON sdn.route_id = sdr.id
left join task_type_dict ttd ON ttd.task_type_code = sdn.task_type
left join task_partition_dict tpd on tpd.task_partition_code = sdn.task_subdivision
where sdr.id = #{specialDiseaseRouteId} and sdn.node_content like '%data-w-e-type%'
and sdn.route_check_status = 'AGREE'
</select>
</mapper>