|
@ -7,6 +7,7 @@ import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.base.servicePackage.ServiceItemPlanDO;
|
|
|
import com.yihu.jw.entity.care.device.DevicePatientHealthIndex;
|
|
|
import com.yihu.jw.entity.door.SignFamily;
|
|
|
import com.yihu.jw.entity.followup.Followup;
|
|
|
import com.yihu.jw.entity.specialist.RehabilitationServiceItemDO;
|
|
@ -181,7 +182,7 @@ public class RehabilitationManageService {
|
|
|
String relationType = detailDO.getHospitalServiceItemId();
|
|
|
Integer plan_start_time_type = detailDO.getTimeType();//计划开始时间类型
|
|
|
String server_count = detailDO.getServerCount();//服务次数
|
|
|
if(StringUtils.isBlank(server_count)){
|
|
|
if(StringUtils.isBlank(server_count)&&!"3".equals(relationType)){
|
|
|
return planDOList;
|
|
|
}
|
|
|
String planDetailId = detailDO.getId();
|
|
@ -1385,6 +1386,25 @@ public class RehabilitationManageService {
|
|
|
detailDO.setCompleteTime(completeTime);
|
|
|
detailDO.setPlanTime(planTime);
|
|
|
detailDO.setName(serviceItemMap.get(key));
|
|
|
if("3".equals(key)){
|
|
|
PatientRehabilitationPlanDO patientRehabilitationPlanDO = patientRehabilitationPlanDao.findById(planId).orElse(null);
|
|
|
String patient = patientRehabilitationPlanDO.getPatient();
|
|
|
String sqlTotal = "select count(*) as total from wlyy_patient_health_index p " +
|
|
|
"where p.user ='" + patient + "' and p.type IN(1,2) ";//and p.record_date >= '"+createTime+"'
|
|
|
Integer signCount = jdbcTemplate.queryForObject(sqlTotal,Integer.class);
|
|
|
detailDO.setSignCount(signCount);
|
|
|
if(signCount>0){
|
|
|
String sqlTemp = "select p.* from wlyy_patient_health_index p where p.user ='" + patient + "' and p.type IN(1,2) order by p.record_date desc limit 0,1 ";
|
|
|
List<DevicePatientHealthIndex> indexList = jdbcTemplate.query(sqlTemp,new BeanPropertyRowMapper<>(DevicePatientHealthIndex.class));
|
|
|
if(indexList.size()>0){
|
|
|
DevicePatientHealthIndex index = indexList.get(0);
|
|
|
detailDO.setSignType(index.getType());
|
|
|
detailDO.setValue1(index.getValue1());
|
|
|
detailDO.setValue2(index.getValue2());
|
|
|
detailDO.setValue3(index.getValue3());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return detailDOList;
|
|
|
}
|