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