专病路径类型
This commit is contained in:
parent
1d6b088320
commit
b7e377c9c3
@ -4,7 +4,6 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.PatientSexEnum;
|
||||
import com.xinelu.common.enums.ReleaseStatusEnum;
|
||||
import com.xinelu.common.enums.TemplateTypeEnum;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.BaseUtil;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
@ -55,8 +54,8 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
private PatientNodeParamsCurrentMapper patientNodeParamsCurrentMapper;
|
||||
@Resource
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
@Resource
|
||||
private IPatientAllInfoViewService patientAllInfoViewService;
|
||||
@Resource
|
||||
private IPatientAllInfoViewService patientAllInfoViewService;
|
||||
|
||||
|
||||
/**
|
||||
@ -123,16 +122,16 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
if (Objects.nonNull(specialDiseaseNode) && Objects.nonNull(specialDiseaseNode.getSpecialDiseaseRouteId())) {
|
||||
SpecialDiseaseRoute specialDiseaseRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(specialDiseaseNode.getSpecialDiseaseRouteId());
|
||||
if (specialDiseaseRoute.getParentRouteId() == null || specialDiseaseRoute.getParentRouteId() == 0) {
|
||||
if (Objects.nonNull(specialDiseaseRoute) && StringUtils.isNotBlank(specialDiseaseRoute.getReleaseStatus()) && !ReleaseStatusEnum.UNPUBLISHED.getInfo().equals(specialDiseaseRoute.getReleaseStatus())) {
|
||||
return AjaxResult.error("已发布过的专病路径不能修改!");
|
||||
}
|
||||
if (Objects.nonNull(specialDiseaseRoute) && StringUtils.isNotBlank(specialDiseaseRoute.getReleaseStatus()) && !ReleaseStatusEnum.UNPUBLISHED.getInfo().equals(specialDiseaseRoute.getReleaseStatus())) {
|
||||
return AjaxResult.error("已发布过的专病路径不能修改!");
|
||||
}
|
||||
} else {
|
||||
// 判断主路径的发布状态
|
||||
SpecialDiseaseRoute parentRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(specialDiseaseRoute.getParentRouteId());
|
||||
if (Objects.nonNull(parentRoute) && StringUtils.isNotBlank(parentRoute.getReleaseStatus()) && !StringUtils.equals(ReleaseStatusEnum.UNPUBLISHED.getInfo(), specialDiseaseRoute.getReleaseStatus())) {
|
||||
return AjaxResult.error("已发布过的专病路径不能修改!");
|
||||
}
|
||||
}
|
||||
// 判断主路径的发布状态
|
||||
SpecialDiseaseRoute parentRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(specialDiseaseRoute.getParentRouteId());
|
||||
if (Objects.nonNull(parentRoute) && StringUtils.isNotBlank(parentRoute.getReleaseStatus()) && !StringUtils.equals(ReleaseStatusEnum.UNPUBLISHED.getInfo(), specialDiseaseRoute.getReleaseStatus())) {
|
||||
return AjaxResult.error("已发布过的专病路径不能修改!");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Long> longs = specialDiseaseNodeMapper.selectSpecialDiseaseRouteIds(specialDiseaseNode.getSpecialDiseaseRouteId());
|
||||
SpecialDiseaseRoute specialDiseaseRoute = new SpecialDiseaseRoute();
|
||||
@ -156,20 +155,18 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
List<SpecialDiseaseNodeVO> specialDiseaseNodeVOS = new ArrayList<>();
|
||||
int i = 0;
|
||||
for (SpecialDiseaseNodeVO diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) {
|
||||
if(StringUtils.isBlank(diseaseNode.getRouteNodeName())) {
|
||||
throw new ServiceException("请输入节点名称");
|
||||
}
|
||||
if (diseaseNode.getRouteNodeDay() == null) {
|
||||
throw new ServiceException("请输入节点时间");
|
||||
}
|
||||
if (StringUtils.isBlank(diseaseNode.getTaskType()) || StringUtils.isBlank(diseaseNode.getTaskSubdivision()) || StringUtils.isBlank(diseaseNode.getTaskStatus())) {
|
||||
throw new ServiceException("任务类型、任务细分、任务状态不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(diseaseNode.getRouteNodeName())) {
|
||||
throw new ServiceException("请输入节点名称");
|
||||
}
|
||||
if (diseaseNode.getRouteNodeDay() == null) {
|
||||
throw new ServiceException("请输入节点时间");
|
||||
}
|
||||
if (StringUtils.isBlank(diseaseNode.getTaskType()) || StringUtils.isBlank(diseaseNode.getTaskSubdivision()) || StringUtils.isBlank(diseaseNode.getTaskStatus())) {
|
||||
throw new ServiceException("任务类型、任务细分、任务状态不能为空");
|
||||
}
|
||||
diseaseNode.setRouteId(specialDiseaseRoute.getId());
|
||||
diseaseNode.setRouteName(specialDiseaseNode.getRouteName());
|
||||
diseaseNode.setTemplateType(null);
|
||||
if (StringUtils.isNotBlank(diseaseNode.getTaskSubdivisiontemplateType())
|
||||
&& (TemplateTypeEnum.QUESTIONNAIRE.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()) || TemplateTypeEnum.PROPAGANDA.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()) || TemplateTypeEnum.SCRIPT.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()))) {
|
||||
if (Objects.isNull(diseaseNode.getPhonePushSign()) || diseaseNode.getPhonePushSign() == 0) {
|
||||
diseaseNode.setTemplateType(diseaseNode.getTaskSubdivisiontemplateType());
|
||||
}
|
||||
diseaseNode.setUpdateTime(LocalDateTime.now());
|
||||
@ -281,26 +278,27 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
return retList;
|
||||
}
|
||||
|
||||
@Override public List<RouteTaskAuditVo> getByParentRouteId(Long parentRouteId) {
|
||||
return specialDiseaseNodeMapper.getByParentRouteId(parentRouteId);
|
||||
}
|
||||
@Override
|
||||
public List<RouteTaskAuditVo> getByParentRouteId(Long parentRouteId) {
|
||||
return specialDiseaseNodeMapper.getByParentRouteId(parentRouteId);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 根据任务细分类型获取患者的真实信息
|
||||
*
|
||||
* @param patientId 患者主键
|
||||
* @param patientId 患者主键
|
||||
* @return 实际信息
|
||||
*/
|
||||
private JSONObject getParamsValue(Long patientId) {
|
||||
JSONObject retObj = new JSONObject();
|
||||
PatientAllInfoView patientAllInfoView = patientAllInfoViewService.selectPatientAllInfoViewByPatientId(patientId);
|
||||
if (ObjectUtils.isEmpty(patientAllInfoView)) {
|
||||
throw new ServiceException("患者信息获取错误,请联系管理员!");
|
||||
}
|
||||
PatientAllInfoView patientAllInfoView = patientAllInfoViewService.selectPatientAllInfoViewByPatientId(patientId);
|
||||
if (ObjectUtils.isEmpty(patientAllInfoView)) {
|
||||
throw new ServiceException("患者信息获取错误,请联系管理员!");
|
||||
}
|
||||
retObj = JSONObject.parseObject(JSONObject.toJSONString(patientAllInfoView));
|
||||
// 性别转换成中文、计算年龄
|
||||
retObj.fluentPut("sex", PatientSexEnum.getInfoByCode(patientAllInfoView.getSex()).getInfo())
|
||||
.fluentPut("age", BaseUtil.getAge(patientAllInfoView.getBirthDate()));
|
||||
.fluentPut("age", BaseUtil.getAge(patientAllInfoView.getBirthDate()));
|
||||
return retObj;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user