诊后后院后兼容性BUG修复
This commit is contained in:
parent
fed6999a00
commit
b61eb0f052
@ -293,4 +293,10 @@ aiob:
|
||||
secretKey: 4287bfa1d5a34c229aacb5e056c94682
|
||||
# 任务执行回调地址--测试
|
||||
callBackUrl: http://182.92.166.109:9707/api/taskCallBack
|
||||
# callBackUrl: http://182.92.166.109:19090/api/taskCallBack
|
||||
# callBackUrl: http://101.200.89.70:19090/api/taskCallBack
|
||||
# callBackUrl: http://8.131.93.145:54011/api/taskCallBack
|
||||
|
||||
xinyilu-database:
|
||||
# 公共机构ID(新医路,用于宣教库公共库查询)
|
||||
id: 46
|
||||
|
||||
@ -23,6 +23,14 @@ public interface LabelFieldContentMapper {
|
||||
*/
|
||||
public LabelFieldContent selectLabelFieldContentById(Long id);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param patientId
|
||||
* @return
|
||||
*/
|
||||
public List<LabelFieldContent> selectLabelFieldContentByPatientId(Long patientId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询标签字段内容信息列表
|
||||
*
|
||||
|
||||
@ -15,6 +15,8 @@ import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -162,17 +164,27 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
||||
if (CollectionUtils.isNotEmpty(patientAndNodes)) {
|
||||
allCount = patientAndNodes.size();
|
||||
for (PatientAndNode patientAndNode : patientAndNodes) {
|
||||
LocalDate localDate = null;
|
||||
if (Objects.nonNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getRouteNodeDay())) {
|
||||
localDate = patientAndNode.getDischargeTime().plusDays(patientAndNode.getRouteNodeDay());
|
||||
LocalDateTime localDateTime = null;
|
||||
//如果有计划执行时间,则直接获取
|
||||
if (patientAndNode.getNodePlanTime() != null) {
|
||||
localDateTime = patientAndNode.getNodePlanTime();
|
||||
}
|
||||
if (Objects.isNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getVisitDate()) && Objects.nonNull(patientAndNode.getRouteNodeDay())) {
|
||||
localDate = patientAndNode.getVisitDate().plusDays(patientAndNode.getRouteNodeDay());
|
||||
// 否则 ,则根据诊后/院后 第几天 计算
|
||||
else {
|
||||
LocalTime et = LocalTime.of(8,0,0);
|
||||
|
||||
if (Objects.nonNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getRouteNodeDay()) ) {
|
||||
localDateTime = LocalDateTime.of(patientAndNode.getDischargeTime().plusDays(patientAndNode.getRouteNodeDay()).toLocalDate(), et);
|
||||
|
||||
}
|
||||
if (Objects.isNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getVisitDate()) && Objects.nonNull(patientAndNode.getRouteNodeDay())) {
|
||||
localDateTime = LocalDateTime.of(patientAndNode.getVisitDate().plusDays(patientAndNode.getRouteNodeDay()).toLocalDate(), et);
|
||||
}
|
||||
if (Objects.isNull(localDateTime)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (Objects.isNull(localDate)) {
|
||||
continue;
|
||||
}
|
||||
boolean before = localDate.isBefore(LocalDate.now()) || localDate.isEqual(LocalDate.now());
|
||||
boolean before = localDateTime.isBefore(LocalDateTime.now()) || localDateTime.isEqual(LocalDateTime.now());
|
||||
if (before) {
|
||||
//未执行
|
||||
if (!NodeExecuteStatusEnum.EXECUTED.getInfo().equals(patientAndNode.getNodeExecuteStatus())) {
|
||||
@ -185,4 +197,4 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
||||
taskSituations.add(new TaskSituation("人工随访", unExecutedCount, allCount));
|
||||
return taskSituations;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +22,13 @@ public interface ILabelFieldContentService {
|
||||
*/
|
||||
LabelFieldContent selectLabelFieldContentById(Long id);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param patientId
|
||||
* @return
|
||||
*/
|
||||
List<LabelFieldContent> selectLabelFieldContentByPatientId(Long patientId);
|
||||
|
||||
/**
|
||||
* 查询标签字段内容信息列表
|
||||
*
|
||||
|
||||
@ -68,6 +68,16 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
|
||||
return labelFieldContentMapper.selectLabelFieldContentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param patientId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LabelFieldContent> selectLabelFieldContentByPatientId(Long patientId){
|
||||
return labelFieldContentMapper.selectLabelFieldContentByPatientId(patientId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签字段内容信息列表
|
||||
*
|
||||
|
||||
@ -278,8 +278,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
return AjaxResult.error(901, "修改签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
}
|
||||
//适用场景:对未签约患者 手动创建任务
|
||||
else {
|
||||
//适用场景:对未签约患者 手动创建任务, 或已签约但尚未审核画像的
|
||||
if(labelFieldContentService.selectLabelFieldContentByPatientId(signPatientManageRoute.getPatientId()).size()==0) {
|
||||
//获取画像信息
|
||||
List<LabelFieldAndPartitionDict> labelFieldAndPartitionDictList = labelFieldContentService.groupingValue(0L, signPatientManageRoute.getPatientId());
|
||||
// 画像信息保存
|
||||
|
||||
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 患者节点任务参数对象
|
||||
@ -18,15 +19,19 @@ public class PatientAndNode {
|
||||
private Long signPatientManageRouteNodeIds;
|
||||
|
||||
@ApiModelProperty(value = "出院时间(出院患者)")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate dischargeTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime dischargeTime;
|
||||
|
||||
@ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate visitDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime visitDate;
|
||||
|
||||
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||
private Integer routeNodeDay;
|
||||
|
||||
@ApiModelProperty(value = "计划时间(手动创建的任务指定时间的有值),格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime nodePlanTime;
|
||||
|
||||
private String nodeExecuteStatus;
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,11 @@
|
||||
<include refid="selectLabelFieldContentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectLabelFieldContentByPatientId" parameterType="Long"
|
||||
resultMap="LabelFieldContentResult">
|
||||
<include refid="selectLabelFieldContentVo"/>
|
||||
where patient_id = #{patientId}
|
||||
</select>
|
||||
<select id="existCountByFieldIdAndContentName" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from label_field_content
|
||||
@ -453,4 +457,4 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user