|
@@ -222,6 +222,7 @@ public class ClinicalPathwayPatientService {
|
|
|
|
|
|
Date createTime = patient.getCreateTime();
|
|
|
Date now = new Date();
|
|
|
+ // 判断当前时间和入径的时间相差几天
|
|
|
long betweenDay = DateUtil.betweenDay(now, createTime, true);
|
|
|
List<ClinicalPathwayPatientDayLog> execDays = dao.selectExecDay(patNo, times, patient.getTemplateId(), DateUtil.formatDate(patient.getCreateTime(), DateUtil.DATE));
|
|
|
int execDay = execDays.size();
|
|
@@ -230,8 +231,8 @@ public class ClinicalPathwayPatientService {
|
|
|
if (execDay == 0) {
|
|
|
checkPatientPathway(patNo, times);
|
|
|
}
|
|
|
-
|
|
|
- if ((betweenDay + 1) == dao.execDayByTemplateId(patient.getTemplateId())) {
|
|
|
+ // 判断已经执行了几天和这个模板需要执行几天,如果时间一样的话就说明完成了临床路径,如果是第三天的话就需要多点一次了
|
|
|
+ if (execDay == dao.execDayByTemplateId(patient.getTemplateId())) {
|
|
|
ClinicalPathwayPatient updateParams = new ClinicalPathwayPatient();
|
|
|
updateParams.setId(patient.getId());
|
|
|
updateParams.setState(ClinicalPathwayPatientState.完成.getCode());
|