|
@ -3,34 +3,39 @@ package com.yihu.jw.hospital.module.followup.service;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fasterxml.jackson.databind.JavaType;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
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.system.SystemDictDO;
|
|
|
import com.yihu.jw.entity.followup.Followup;
|
|
|
import com.yihu.jw.entity.followup.FollowupContent;
|
|
|
import com.yihu.jw.entity.followup.FollowupMapping;
|
|
|
import com.yihu.jw.hospital.message.dao.BaseBannerDoctorDao;
|
|
|
|
|
|
import com.yihu.jw.hospital.module.followup.dao.FollowUpDao;
|
|
|
import com.yihu.jw.hospital.module.followup.dao.FollowupContentDao;
|
|
|
import com.yihu.jw.message.dao.MessageDao;
|
|
|
import com.yihu.jw.entity.door.SignFamily;
|
|
|
import com.yihu.jw.entity.followup.*;
|
|
|
import com.yihu.jw.entity.hospital.message.MessageNoticeSetting;
|
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
|
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
|
|
|
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
|
|
|
import com.yihu.jw.hospital.message.service.SystemMessageService;
|
|
|
import com.yihu.jw.hospital.module.followup.dao.*;
|
|
|
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationManageService;
|
|
|
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
|
|
|
import com.yihu.jw.hospital.task.PushMsgTask;
|
|
|
import com.yihu.jw.hospital.team.dao.WlyySignFamilyDao;
|
|
|
import com.yihu.jw.message.service.MessageService;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.rm.base.BaseRequestMapping;
|
|
|
import com.yihu.jw.patient.service.BasePatientService;
|
|
|
import com.yihu.jw.system.service.SystemDictService;
|
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
|
import com.yihu.jw.util.idcard.IdCardUtil;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.message.BasicNameValuePair;
|
|
|
|
|
|
import org.hibernate.sql.Delete;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.jsoup.Jsoup;
|
|
|
import org.jsoup.nodes.Document;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.data.domain.Page;
|
|
@ -41,11 +46,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.transaction.Transactional;
|
|
|
import java.io.BufferedWriter;
|
|
|
import java.io.File;
|
|
|
import java.io.FileWriter;
|
|
|
import java.text.DateFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@ -58,14 +59,14 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
@Component
|
|
|
@Transactional(rollbackOn = Exception.class)
|
|
|
public class FollowUpService {
|
|
|
public class FollowUpService {
|
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(FollowUpService.class);
|
|
|
|
|
|
//统计随访类型
|
|
|
public static String[] FOLLOWUP_TYPE = {"1","2","3","10","22"};
|
|
|
public static String[] FOLLOWUP_TYPE = {"1", "2", "3", "10", "22"};
|
|
|
//随访类别,多类别“,”分割【1.高血压 2.糖尿病 3.肿瘤 4.精神分裂症 5.产后 6.新生儿 7.严重精神病 8.80岁以上老人 9.肺结核】
|
|
|
public static String[] FOLLOWUP_CLASS = {"1","2","1,2","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"};
|
|
|
public static String[] FOLLOWUP_CLASS = {"1", "2", "1,2", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"};
|
|
|
|
|
|
@Autowired
|
|
|
private BaseDoctorDao doctorDao;
|
|
@ -80,16 +81,16 @@ public class FollowUpService {
|
|
|
private FollowupContentDao followupContentDao;
|
|
|
|
|
|
@Autowired
|
|
|
private SystemDictDO systemDictService;
|
|
|
private SystemDictService systemDictService;
|
|
|
|
|
|
@Autowired
|
|
|
private SignFamilyDao signFamilyDao;
|
|
|
private WlyySignFamilyDao signFamilyDao;
|
|
|
|
|
|
@Autowired
|
|
|
private DrHealthTeamService drHealthTeamService;
|
|
|
// @Autowired
|
|
|
// private DrHealthTeamService drHealthTeamService;
|
|
|
|
|
|
@Autowired
|
|
|
private MessageDao messageDao;
|
|
|
private SystemMessageDao messageDao;
|
|
|
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
@ -98,48 +99,57 @@ public class FollowUpService {
|
|
|
SystemDictService dictService;
|
|
|
|
|
|
@Autowired
|
|
|
private PatientService patientService;
|
|
|
private BasePatientService patientService;
|
|
|
@Autowired
|
|
|
private PushMsgTask pushMsgTask;
|
|
|
@Autowired
|
|
|
private FollowUpMappingDao followUpMappingDao;
|
|
|
@Autowired
|
|
|
private FollowupDrugsDao followupDrugsDao;
|
|
|
|
|
|
@Autowired
|
|
|
private HttpClientUtil httpClientUtil;
|
|
|
|
|
|
@Value("${doctorAssistant.api}")
|
|
|
private String doctorAssistant;
|
|
|
|
|
|
@Value("${doctorAssistant.target_url}")
|
|
|
private String targetUrl;
|
|
|
//
|
|
|
// @Value("${es.type.FollowUpContent}")
|
|
|
// private String esType;
|
|
|
// @Value("${es.index.FollowUp}")
|
|
|
// private String esIndex;
|
|
|
|
|
|
@Autowired
|
|
|
private HttpClientUtil httpClientUtil;
|
|
|
@Value("${es.type.FollowUpContent}")
|
|
|
private String esType;
|
|
|
@Value("${es.index.FollowUp}")
|
|
|
private String esIndex;
|
|
|
@Autowired
|
|
|
private ElasticFactory elasticFactory;
|
|
|
@Autowired
|
|
|
private ElastricSearchSave elastricSearchSave;
|
|
|
@Autowired
|
|
|
private MessageService messageService;
|
|
|
private SystemMessageService messageService;
|
|
|
@Autowired
|
|
|
private ObjectMapper objectMapper;
|
|
|
@Autowired
|
|
|
private FollowupSignDao followupSignDao;
|
|
|
@Autowired
|
|
|
private ElasticsearchUtil elasticsearchUtil;
|
|
|
@Autowired
|
|
|
private BusinessMappingDao businessMappingDao;
|
|
|
@Autowired
|
|
|
private PrescriptionDao prescriptionDao;
|
|
|
@Autowired
|
|
|
private DoctorMappingDao doctorMappingDao;
|
|
|
@Autowired
|
|
|
private VisitDetailService visitDetailService;
|
|
|
|
|
|
@Value("${fastDFS.fastdfs_file_url}")
|
|
|
private String imgUrlDomain;
|
|
|
@Autowired
|
|
|
private RehabilitationManageService rehabilitationManageService;
|
|
|
|
|
|
// @Autowired
|
|
|
// private VisitDetailService visitDetailService;
|
|
|
|
|
|
// @Autowired
|
|
|
// private ElasticFactory elasticFactory;
|
|
|
// @Autowired
|
|
|
// private ElastricSearchSave elastricSearchSave;
|
|
|
// @Autowired
|
|
|
// private ElasticsearchUtil elasticsearchUtil;
|
|
|
// @Autowired
|
|
|
// private BusinessMappingDao businessMappingDao;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 转译随访信息
|
|
|
*/
|
|
@ -147,7 +157,7 @@ public class FollowUpService {
|
|
|
Map<String, String> re = new HashMap<>();
|
|
|
//患者信息
|
|
|
String patientCode = followup.getPatientCode();
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
BasePatientDO patient = patientDao.findById(patientCode).orElse(null);
|
|
|
if (patient != null) {
|
|
|
re.put("patientCode", patientCode);
|
|
|
re.put("patientName", patient.getName());
|
|
@ -161,7 +171,7 @@ public class FollowUpService {
|
|
|
re.put("birthday", DateUtil.dateToStrLong(patient.getBirthday()));
|
|
|
re.put("photo", patient.getPhoto());
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到用户信息!");
|
|
|
throw new RuntimeException("查找不到用户信息!");
|
|
|
}
|
|
|
|
|
|
re.put("id", String.valueOf(followup.getId()));
|
|
@ -207,7 +217,7 @@ public class FollowUpService {
|
|
|
re.put("followupContentPhone", followup.getFollowupContentPhone());
|
|
|
re.put("createTime", DateUtil.dateToStrLong(followup.getCreateTime()));
|
|
|
re.put("creater", followup.getCreater());
|
|
|
re.put("prescriptionCode",followup.getPrescriptionCode());
|
|
|
re.put("prescriptionCode", followup.getPrescriptionCode());
|
|
|
|
|
|
return re;
|
|
|
}
|
|
@ -259,18 +269,18 @@ public class FollowUpService {
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray getListByPatientAndTeam(String patient, String doctor, Long teamCode, int page, int pageSize, String type) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "createTime");
|
|
|
PageRequest pageRequest = new PageRequest(page, pageSize, sort);
|
|
|
Sort sort = Sort.by(Sort.Direction.DESC, "createTime");
|
|
|
PageRequest pageRequest = PageRequest.of(page, pageSize, sort);
|
|
|
Page<Object> result = null;
|
|
|
|
|
|
if (StringUtils.isBlank(type)) {
|
|
|
result = followupDao.findByPatientAndTeam(patient, teamCode, doctor, pageRequest);
|
|
|
} else if ("1".equals(type)) {
|
|
|
//已经开始的就是记录
|
|
|
result = followupDao.findPlanByPatientAndTeam(patient,teamCode, doctor, pageRequest);
|
|
|
result = followupDao.findPlanByPatientAndTeam(patient, teamCode, doctor, pageRequest);
|
|
|
} else if ("2".equals(type)) {
|
|
|
//未开始的就是计划
|
|
|
result = followupDao.findRecordByPatientAndTeam(patient, teamCode,doctor, pageRequest);
|
|
|
result = followupDao.findRecordByPatientAndTeam(patient, teamCode, doctor, pageRequest);
|
|
|
} else {
|
|
|
}
|
|
|
|
|
@ -281,16 +291,18 @@ public class FollowUpService {
|
|
|
Map<String, String> dictMap = new HashMap<>();
|
|
|
Map<String, String> statusMap = new HashMap<>();
|
|
|
Map<String, String> mngStatusMap = new HashMap<>();
|
|
|
List<SystemDict> dicts = dictService.getDictByDictName("FOLLOWUP_WAY_DICT");
|
|
|
List<SystemDict> mngDicts = dictService.getDictByDictName("FOLLOWUP_MANAGER_STATUS");
|
|
|
List<SystemDictDO> dicts = dictService.getDictByDictName("FOLLOWUP_WAY_DICT");
|
|
|
List<SystemDictDO> mngDicts = dictService.getDictByDictName("FOLLOWUP_MANAGER_STATUS");
|
|
|
if (dicts != null) {
|
|
|
for (SystemDict dict : dicts) {
|
|
|
dictMap.put(dict.getCode(), dict.getValue());
|
|
|
for (SystemDictDO dict : dicts) {
|
|
|
// dictMap.put(dict.getCode(), dict.getValue());
|
|
|
dictMap.put(dict.getCode(), dict.getName());
|
|
|
}
|
|
|
}
|
|
|
if (mngDicts != null) {
|
|
|
for (SystemDict dict : mngDicts) {
|
|
|
mngStatusMap.put(dict.getCode(), dict.getValue());
|
|
|
for (SystemDictDO dict : mngDicts) {
|
|
|
// mngStatusMap.put(dict.getCode(), dict.getValue());
|
|
|
mngStatusMap.put(dict.getCode(), dict.getName());
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -303,7 +315,7 @@ public class FollowUpService {
|
|
|
JSONObject followup = new JSONObject();
|
|
|
Object[] objArr = (Object[]) obj;
|
|
|
// 返回值增加居民信息
|
|
|
Patient patientDetail = patientDao.findByCode(patient);
|
|
|
BasePatientDO patientDetail = patientDao.findById(patient).orElse(null);
|
|
|
followup.put("patientName", patientDetail.getName() != null ? patientDetail.getName() : "");
|
|
|
followup.put("photo", patientDetail.getPhoto() != null ? patientDetail.getPhoto() : "");
|
|
|
followup.put("sex", patientDetail.getSex() != null ? patientDetail.getSex() : "");
|
|
@ -367,8 +379,9 @@ public class FollowUpService {
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray getListByPatient(String patient, int page, int pageSize, String type) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "createTime");
|
|
|
PageRequest pageRequest = new PageRequest(page, pageSize, sort);
|
|
|
// Sort sort = new Sort(Sort.Direction.DESC, "createTime");
|
|
|
PageRequest pageRequest = PageRequest.of(page, pageSize);
|
|
|
|
|
|
Page<Object> result = null;
|
|
|
|
|
|
if (StringUtils.isBlank(type)) {
|
|
@ -389,16 +402,18 @@ public class FollowUpService {
|
|
|
Map<String, String> dictMap = new HashMap<>();
|
|
|
Map<String, String> statusMap = new HashMap<>();
|
|
|
Map<String, String> mngStatusMap = new HashMap<>();
|
|
|
List<SystemDict> dicts = dictService.getDictByDictName("FOLLOWUP_WAY_DICT");
|
|
|
List<SystemDict> mngDicts = dictService.getDictByDictName("FOLLOWUP_MANAGER_STATUS");
|
|
|
List<SystemDictDO> dicts = dictService.getDictByDictName("FOLLOWUP_WAY_DICT");
|
|
|
List<SystemDictDO> mngDicts = dictService.getDictByDictName("FOLLOWUP_MANAGER_STATUS");
|
|
|
if (dicts != null) {
|
|
|
for (SystemDict dict : dicts) {
|
|
|
dictMap.put(dict.getCode(), dict.getValue());
|
|
|
for (SystemDictDO dict : dicts) {
|
|
|
// dictMap.put(dict.getCode(), dict.getValue());
|
|
|
dictMap.put(dict.getCode(), dict.getName());
|
|
|
}
|
|
|
}
|
|
|
if (mngDicts != null) {
|
|
|
for (SystemDict dict : mngDicts) {
|
|
|
mngStatusMap.put(dict.getCode(), dict.getValue());
|
|
|
for (SystemDictDO dict : mngDicts) {
|
|
|
// mngStatusMap.put(dict.getCode(), dict.getValue());
|
|
|
mngStatusMap.put(dict.getCode(), dict.getName());
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -411,7 +426,7 @@ public class FollowUpService {
|
|
|
JSONObject followup = new JSONObject();
|
|
|
Object[] objArr = (Object[]) obj;
|
|
|
// 返回值增加居民信息
|
|
|
Patient patientDetail = patientDao.findByCode(patient);
|
|
|
BasePatientDO patientDetail = patientDao.findById(patient).orElse(null);
|
|
|
followup.put("patientName", patientDetail.getName() != null ? patientDetail.getName() : "");
|
|
|
followup.put("photo", patientDetail.getPhoto() != null ? patientDetail.getPhoto() : "");
|
|
|
followup.put("sex", patientDetail.getSex() != null ? patientDetail.getSex() : "");
|
|
@ -462,17 +477,19 @@ public class FollowUpService {
|
|
|
|
|
|
return array;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取医生随访列表(创建者)
|
|
|
*/
|
|
|
public List<Map<String, String>> getListByCreater(String doctorCode, String startTime, String endTime, String page, String pageSize) throws Exception {
|
|
|
List<Map<String, String>> re = new ArrayList<>();
|
|
|
// 排序
|
|
|
Sort sort = new Sort(Sort.Direction.ASC, "followupDate");
|
|
|
// Sort sort = new Sort(Sort.Direction.ASC, "followupDate");
|
|
|
// 分页信息
|
|
|
int pageInt = Integer.valueOf(page) - 1;
|
|
|
int pageSizeInt = Integer.valueOf(pageSize);
|
|
|
Pageable pageRequest = new PageRequest(pageInt, pageSizeInt, sort);
|
|
|
// Pageable pageRequest = new PageRequest(pageInt, pageSizeInt, sort);
|
|
|
PageRequest pageRequest = PageRequest.of(pageInt, pageSizeInt);
|
|
|
List<Followup> list = followupDao.findByCreater(doctorCode, DateUtil.strToDate(startTime), DateUtil.strToDate(endTime), pageRequest);
|
|
|
|
|
|
if (list != null && list.size() > 0) {
|
|
@ -495,19 +512,19 @@ public class FollowUpService {
|
|
|
List<Map<String, String>> list = objectMapper.readValue(data, javaType);
|
|
|
if (list != null && list.size() > 0) {
|
|
|
//获取患者信息
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
BasePatientDO patient = patientDao.findById(patientCode).orElse(null);
|
|
|
if (patient == null) {
|
|
|
throw new ServiceException("获取不到用户信息!");
|
|
|
throw new RuntimeException("获取不到用户信息!");
|
|
|
}
|
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
|
|
|
Long adminCodeId=0L;
|
|
|
Long adminCodeId = 0L;
|
|
|
|
|
|
List<Followup> followupPlan = new ArrayList<>();
|
|
|
for (Map<String, String> map : list) {
|
|
|
//获取医生信息
|
|
|
Doctor doctor = doctorDao.findByCode(map.get("doctor"));
|
|
|
BaseDoctorDO doctor = doctorDao.findById(map.get("doctor")).orElse(null);
|
|
|
if (doctor == null) {
|
|
|
throw new ServiceException("获取不到医生信息!");
|
|
|
throw new RuntimeException("获取不到医生信息!");
|
|
|
}
|
|
|
|
|
|
Followup followup = new Followup();
|
|
@ -515,10 +532,10 @@ public class FollowUpService {
|
|
|
Date date = DateUtil.strToDate(map.get("date"));
|
|
|
followup.setFollowupDate(date);
|
|
|
followup.setFollowupPlanDate(date);
|
|
|
followup.setDoctorCode(doctor.getCode());
|
|
|
followup.setDoctorCode(doctor.getId());
|
|
|
followup.setDoctorName(doctor.getName());
|
|
|
followup.setOrgCode(doctor.getHospital());
|
|
|
followup.setOrgName(doctor.getHospitalName());
|
|
|
// followup.setOrgCode(doctor.getHospital());
|
|
|
// followup.setOrgName(doctor.getHospitalName());
|
|
|
followup.setPatientCode(patientCode);
|
|
|
followup.setPatientName(patient.getName());
|
|
|
followup.setIdcard(patient.getIdcard());
|
|
@ -526,10 +543,10 @@ public class FollowUpService {
|
|
|
followup.setStatus("2"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup.setCreateTime(new Date());
|
|
|
followup.setCreater(doctorCode);
|
|
|
if (!map.get("followupClass").toString().equalsIgnoreCase("10")){
|
|
|
if (!map.get("followupClass").toString().equalsIgnoreCase("10")) {
|
|
|
if (signFamily == null) {
|
|
|
throw new ServiceException("非家签居民仅支持创建体温异常随访");
|
|
|
}else{
|
|
|
throw new RuntimeException("非家签居民仅支持创建体温异常随访");
|
|
|
} else {
|
|
|
adminCodeId = signFamily.getAdminTeamId();
|
|
|
}
|
|
|
}
|
|
@ -540,16 +557,16 @@ public class FollowUpService {
|
|
|
followup.setSignType(2);
|
|
|
|
|
|
//获取随访医生角色类型
|
|
|
List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(doctorCode);
|
|
|
if(doctorMapping.size() ==1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())){
|
|
|
followup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
}
|
|
|
// List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(doctorCode);
|
|
|
// if(doctorMapping.size() ==1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())){
|
|
|
// followup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
// }
|
|
|
//新增签约保存CODE
|
|
|
followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|
|
|
// followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|
|
|
followupPlan.add(followup);
|
|
|
}
|
|
|
|
|
|
return followupDao.save(followupPlan);
|
|
|
return followupDao.saveAll(followupPlan);
|
|
|
}
|
|
|
|
|
|
return null;
|
|
@ -560,17 +577,17 @@ public class FollowUpService {
|
|
|
*/
|
|
|
public Followup addFollowupPlanNew(String doctorCode, String patientCode, JSONObject data, String dataJson) throws Exception {
|
|
|
//获取患者信息
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
BasePatientDO patient = patientDao.findById(patientCode).orElse(null);
|
|
|
if (patient == null) {
|
|
|
throw new ServiceException("获取不到用户信息!");
|
|
|
throw new RuntimeException("获取不到用户信息!");
|
|
|
}
|
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
|
|
|
Long adminCodeId=0L;
|
|
|
Long adminCodeId = 0L;
|
|
|
|
|
|
//获取医生信息
|
|
|
Doctor doctor = doctorDao.findByCode(data.getString("doctor"));
|
|
|
BaseDoctorDO doctor = doctorDao.findById(data.getString("doctor")).orElse(null);
|
|
|
if (doctor == null) {
|
|
|
throw new ServiceException("获取不到医生信息!");
|
|
|
throw new RuntimeException("获取不到医生信息!");
|
|
|
}
|
|
|
|
|
|
Followup followup = new Followup();
|
|
@ -578,10 +595,10 @@ public class FollowUpService {
|
|
|
Date date = DateUtil.strToDate(data.getString("date"));
|
|
|
followup.setFollowupDate(date);
|
|
|
followup.setFollowupPlanDate(date);
|
|
|
followup.setDoctorCode(doctor.getCode());
|
|
|
// followup.setDoctorCode(doctor.getCode());
|
|
|
followup.setDoctorName(doctor.getName());
|
|
|
followup.setOrgCode(doctor.getHospital());
|
|
|
followup.setOrgName(doctor.getHospitalName());
|
|
|
// followup.setOrgCode(doctor.getHospital());
|
|
|
// followup.setOrgName(doctor.getHospitalName());
|
|
|
followup.setPatientCode(patientCode);
|
|
|
followup.setPatientName(patient.getName());
|
|
|
followup.setIdcard(patient.getIdcard());
|
|
@ -589,10 +606,10 @@ public class FollowUpService {
|
|
|
followup.setStatus("2"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup.setCreateTime(new Date());
|
|
|
followup.setCreater(doctorCode);
|
|
|
if (!data.getString("followupClass").toString().equalsIgnoreCase("10")){
|
|
|
if (!data.getString("followupClass").toString().equalsIgnoreCase("10")) {
|
|
|
if (signFamily == null) {
|
|
|
throw new ServiceException("非家签居民仅支持创建体温异常随访");
|
|
|
}else{
|
|
|
throw new RuntimeException("非家签居民仅支持创建体温异常随访");
|
|
|
} else {
|
|
|
adminCodeId = signFamily.getAdminTeamId();
|
|
|
}
|
|
|
}
|
|
@ -603,16 +620,17 @@ public class FollowUpService {
|
|
|
followup.setSignType(2);
|
|
|
|
|
|
//获取随访医生角色类型
|
|
|
List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(doctorCode);
|
|
|
if(doctorMapping.size() ==1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())){
|
|
|
followup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
}
|
|
|
// List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(doctorCode);
|
|
|
// if(doctorMapping.size() ==1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())){
|
|
|
// followup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
// }
|
|
|
//新增签约保存CODE
|
|
|
followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|
|
|
// followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|
|
|
followup = followupDao.save(followup);
|
|
|
|
|
|
rehabilitationManageService.updateRelationCodeByDetailId(data.getString("id"),followup.getId()+"");
|
|
|
rehabilitationManageService.saveRehabilitationOperateRecord(dataJson);
|
|
|
// 远程2.0接口,参数在改改
|
|
|
// rehabilitationManageService.updateRelationCodeByDetailId(data.getString("id"),followup.getId()+"");
|
|
|
// rehabilitationManageService.saveRehabilitationOperateRecord(dataJson);
|
|
|
|
|
|
return followup;
|
|
|
}
|
|
@ -621,7 +639,7 @@ public class FollowUpService {
|
|
|
* 编辑随访计划
|
|
|
*/
|
|
|
public void editFollowupPlan(String doctorCode, String id, String date, String followupType) throws Exception {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
Date followupDate = DateUtil.strToDate(date);
|
|
|
followup.setFollowupDate(followupDate);
|
|
@ -631,7 +649,7 @@ public class FollowUpService {
|
|
|
|
|
|
followupDao.save(followup);
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访!");
|
|
|
throw new RuntimeException("查找不到该随访!");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -639,9 +657,9 @@ public class FollowUpService {
|
|
|
* 开始随访记录
|
|
|
*/
|
|
|
public Followup startFollowup(String id, String followupNo, String date, String followupType, String followupClass, String followupManagerStatus, String plandate, String prescriptioncode) throws Exception {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
if(followup.getStatus().compareTo("2") == 0) {
|
|
|
if (followup.getStatus().compareTo("2") == 0) {
|
|
|
followup.setFollowupNo(followupNo);
|
|
|
followup.setFollowupDate(DateUtil.strToDate(date));
|
|
|
//计划下次随访时间--huangwenjie.2017.10.19
|
|
@ -673,10 +691,10 @@ public class FollowUpService {
|
|
|
nextFollowup.setSignType(followup.getSignType());
|
|
|
nextFollowup.setType(1);
|
|
|
//获取随访医生角色类型
|
|
|
List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(followup.getDoctorCode());
|
|
|
if(doctorMapping.size() ==1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())){
|
|
|
nextFollowup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
}
|
|
|
// List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(followup.getDoctorCode());
|
|
|
// if (doctorMapping.size() == 1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())) {
|
|
|
// nextFollowup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
// }
|
|
|
followupDao.save(nextFollowup);
|
|
|
|
|
|
}
|
|
@ -685,16 +703,16 @@ public class FollowUpService {
|
|
|
followup.setFollowupManagerStatus(followupManagerStatus);
|
|
|
followup.setStatus("3"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup.setPrescriptionCode(prescriptioncode);
|
|
|
|
|
|
if(StringUtils.isNoneBlank(prescriptioncode)){
|
|
|
try {
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptioncode);
|
|
|
// prescription.setViewSuifang(1);
|
|
|
prescriptionDao.save(prescription);
|
|
|
}catch (Exception e){
|
|
|
logger.info(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// if (StringUtils.isNoneBlank(prescriptioncode)) {
|
|
|
// try {
|
|
|
// Prescription prescription = prescriptionDao.findByCode(prescriptioncode);
|
|
|
//// prescription.setViewSuifang(1);
|
|
|
// prescriptionDao.save(prescription);
|
|
|
// } catch (Exception e) {
|
|
|
// logger.info(e.getMessage());
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
Followup f = followupDao.save(followup);
|
|
|
System.out.println("随访状态status" + f.getStatus());
|
|
@ -702,12 +720,13 @@ public class FollowUpService {
|
|
|
}
|
|
|
return followup;
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访!");
|
|
|
throw new RuntimeException("查找不到该随访!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 如果今日没有计划中的随访计划,则将随访消息设成已操作
|
|
|
*
|
|
|
* @param doctor
|
|
|
*/
|
|
|
public void getNotStartFollowup(String doctor, Date followupPlanDate) {
|
|
@ -717,11 +736,11 @@ public class FollowUpService {
|
|
|
String end = now + " 23:59:59";
|
|
|
|
|
|
String sql = "select count(1) count from wlyy_followup where status = 2 and (followup_class is null or followup_class in (1,2)) " +
|
|
|
"and followup_plan_date>='" + start + "' and followup_plan_date<='" + end + "'and doctor_code = '" +doctor +"'";
|
|
|
"and followup_plan_date>='" + start + "' and followup_plan_date<='" + end + "'and doctor_code = '" + doctor + "'";
|
|
|
//获取所有未执行随访计划
|
|
|
Long followupToday = jdbcTemplate.queryForObject(sql, Long.class);
|
|
|
System.out.println("计划中随访:" + followupToday);
|
|
|
if(followupToday == 0){
|
|
|
if (followupToday == 0) {
|
|
|
messageDao.setMessageOverByType(doctor, 4, DateUtil.strToDateLong(start), DateUtil.strToDateLong(end));
|
|
|
}
|
|
|
}
|
|
@ -730,27 +749,27 @@ public class FollowUpService {
|
|
|
/**
|
|
|
* 新增临时随访记录(返回ID)
|
|
|
*/
|
|
|
public String addFollowup(String doctorCode, String patientCode, String date, String followupType, String followupClass, String followupManagerStatus, String plandate, String prescriptioncode,Integer type) throws Exception {
|
|
|
public String addFollowup(String doctorCode, String patientCode, String date, String followupType, String followupClass, String followupManagerStatus, String plandate, String prescriptioncode, Integer type) throws Exception {
|
|
|
String re = "";
|
|
|
|
|
|
//获取医生信息
|
|
|
Doctor doctor = doctorDao.findByCode(doctorCode);
|
|
|
BaseDoctorDO doctor = doctorDao.findById(doctorCode).orElse(null);
|
|
|
if (doctor == null) {
|
|
|
throw new ServiceException("查找不到医生信息!");
|
|
|
throw new RuntimeException("查找不到医生信息!");
|
|
|
}
|
|
|
|
|
|
//获取患者信息
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
BasePatientDO patient = patientDao.findById(patientCode).orElse(null);
|
|
|
if (patient == null) {
|
|
|
throw new ServiceException("查找不到居民信息!");
|
|
|
throw new RuntimeException("查找不到居民信息!");
|
|
|
}
|
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
|
|
|
Long adminId = 0L;
|
|
|
if (!followupClass.equalsIgnoreCase("10")){
|
|
|
if (!followupClass.equalsIgnoreCase("10")) {
|
|
|
if (signFamily == null) {
|
|
|
throw new ServiceException("非家签居民仅支持创建体温异常随访");
|
|
|
}else {
|
|
|
adminId=signFamily.getAdminTeamId();
|
|
|
throw new RuntimeException("非家签居民仅支持创建体温异常随访");
|
|
|
} else {
|
|
|
adminId = signFamily.getAdminTeamId();
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -761,8 +780,8 @@ public class FollowUpService {
|
|
|
followup.setFollowupPlanDate(followDate);
|
|
|
followup.setDoctorCode(doctorCode);
|
|
|
followup.setDoctorName(doctor.getName());
|
|
|
followup.setOrgCode(doctor.getHospital());
|
|
|
followup.setOrgName(doctor.getHospitalName());
|
|
|
// followup.setOrgCode(doctor.getHospital());
|
|
|
// followup.setOrgName(doctor.getHospitalName());
|
|
|
followup.setPatientCode(patientCode);
|
|
|
followup.setPatientName(patient.getName());
|
|
|
followup.setIdcard(patient.getIdcard());
|
|
@ -775,11 +794,11 @@ public class FollowUpService {
|
|
|
followup.setCreater(doctorCode);
|
|
|
followup.setAdminTeamCode(signFamily.getAdminTeamId());
|
|
|
followup.setSignType(2);
|
|
|
if (type!=null&&type!=0){
|
|
|
if (type != null && type != 0) {
|
|
|
followup.setType(type);
|
|
|
}
|
|
|
//保存质询code
|
|
|
followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|
|
|
// followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|
|
|
|
|
|
//如果有填入续方CODE,则添加续方关联--huangwenjie.2017.11.02
|
|
|
if (StringUtils.isNotBlank(prescriptioncode)) {
|
|
@ -826,12 +845,12 @@ public class FollowUpService {
|
|
|
* 取消随访计划
|
|
|
*/
|
|
|
public void cancelFollowupPlan(String id) throws Exception {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
followup.setStatus("0"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followupDao.save(followup);
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访计划!");
|
|
|
throw new RuntimeException("查找不到该随访计划!");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -839,7 +858,7 @@ public class FollowUpService {
|
|
|
* 完成随访记录,并上传随访记录
|
|
|
*/
|
|
|
public void finishFollowup(String id) throws Exception {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
followup.setStatus("1"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup = followupDao.save(followup);
|
|
@ -858,17 +877,17 @@ public class FollowUpService {
|
|
|
followupMapping.setNeedUpload(1);
|
|
|
|
|
|
followUpMappingDao.save(followupMapping);
|
|
|
|
|
|
|
|
|
//随访完成,增加随访状态完成的标记
|
|
|
Prescription prescription = prescriptionDao.findByCode(followup.getPrescriptionCode());
|
|
|
if(prescription != null){
|
|
|
prescription.setViewSuifang(1);
|
|
|
prescriptionDao.save(prescription);
|
|
|
}
|
|
|
// Prescription prescription = prescriptionDao.findByCode(followup.getPrescriptionCode());
|
|
|
// if (prescription != null) {
|
|
|
// prescription.setViewSuifang(1);
|
|
|
// prescriptionDao.save(prescription);
|
|
|
// }
|
|
|
|
|
|
// new Thread(new FollowupUploadTask(String.valueOf(followup.getId()))).start();
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访计划!");
|
|
|
throw new RuntimeException("查找不到该随访计划!");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -878,11 +897,11 @@ public class FollowUpService {
|
|
|
*/
|
|
|
public Map<String, String> getFollowup(String id) throws Exception {
|
|
|
Map<String, String> re = new HashMap<>();
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
re = getFollowupDetail(followup);
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访信息");
|
|
|
throw new RuntimeException("查找不到该随访信息");
|
|
|
}
|
|
|
return re;
|
|
|
}
|
|
@ -895,15 +914,16 @@ public class FollowUpService {
|
|
|
//获取已填写的面访项目
|
|
|
// List<String> project = followupContentDao.findProjectByFollowupId(Long.valueOf(id));
|
|
|
//修改为通过ES查询---2017.11.01--huangwenjie
|
|
|
List<String> project = esfindProjectByFollowupId(id);
|
|
|
// List<String> project = esfindProjectByFollowupId(id);
|
|
|
List<String> project = null;
|
|
|
//获取所有面访项目
|
|
|
List<SystemDict> dictList = systemDictService.getDictByDictName("FOLLOWUP_PROJECT");
|
|
|
List<SystemDictDO> dictList = systemDictService.getDictByDictName("FOLLOWUP_PROJECT");
|
|
|
if (dictList != null && dictList.size() > 0) {
|
|
|
for (SystemDict dict : dictList) {
|
|
|
for (SystemDictDO dict : dictList) {
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
String code = dict.getCode();
|
|
|
map.put("projectCode", code);
|
|
|
map.put("projectName", dict.getValue());
|
|
|
map.put("projectName", dict.getName());
|
|
|
if (project != null && project.contains(code)) {
|
|
|
map.put("status", "1"); //已填写
|
|
|
} else {
|
|
@ -936,7 +956,7 @@ public class FollowUpService {
|
|
|
List<FollowupContent> dataList = followupContentDao.findByFollowupIdAndFollowupProject(Long.valueOf(id), followupProject);
|
|
|
|
|
|
//删除原有记录
|
|
|
followupContentDao.delete(dataList);
|
|
|
followupContentDao.deleteAll(dataList);
|
|
|
|
|
|
Map<String, String> data = objectMapper.readValue(followupProjectData, Map.class);
|
|
|
|
|
@ -951,11 +971,11 @@ public class FollowUpService {
|
|
|
item.setCreateTime(new Date());
|
|
|
newList.add(item);
|
|
|
}
|
|
|
followupContentDao.save(newList);
|
|
|
followupContentDao.saveAll(newList);
|
|
|
|
|
|
}
|
|
|
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
|
|
|
//如果该随访是已完成的,则添加随访信息上传映射,上传到基卫
|
|
|
if ("1".equals(followup.getStatus())) {
|
|
@ -979,11 +999,11 @@ public class FollowUpService {
|
|
|
*/
|
|
|
public String getFollowupPhone(String id) throws Exception {
|
|
|
String re = "";
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
re = followup.getFollowupContentPhone();
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访计划!");
|
|
|
throw new RuntimeException("查找不到该随访计划!");
|
|
|
}
|
|
|
return re;
|
|
|
}
|
|
@ -992,12 +1012,12 @@ public class FollowUpService {
|
|
|
* 记录电话随访内容
|
|
|
*/
|
|
|
public void saveFollowupPhone(String id, String content) throws Exception {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
|
|
|
if (followup != null) {
|
|
|
followup.setFollowupContentPhone(content);
|
|
|
followupDao.save(followup);
|
|
|
} else {
|
|
|
throw new ServiceException("查找不到该随访计划!");
|
|
|
throw new RuntimeException("查找不到该随访计划!");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1007,14 +1027,14 @@ public class FollowUpService {
|
|
|
/**
|
|
|
* 获取团队医生
|
|
|
*/
|
|
|
private List<Doctor> getTeamDoctors(String doctor, String patient) throws Exception {
|
|
|
List<Doctor> doctors = new ArrayList<>();
|
|
|
private List<BaseDoctorDO> getTeamDoctors(String doctor, String patient) throws Exception {
|
|
|
List<BaseDoctorDO> doctors = new ArrayList<>();
|
|
|
//获取医生团队成员
|
|
|
SignFamily signFamily = signFamilyDao.findByFamilyDoctorAndPatient(doctor, patient);
|
|
|
// 查询家庭医生团队
|
|
|
if (signFamily != null) {
|
|
|
doctors = drHealthTeamService.findTeamDoctors(signFamily.getTeamCode());
|
|
|
}
|
|
|
// if (signFamily != null) {
|
|
|
// doctors = drHealthTeamService.findTeamDoctors(signFamily.getTeamCode());
|
|
|
// }
|
|
|
|
|
|
return doctors;
|
|
|
}
|
|
@ -1027,11 +1047,12 @@ public class FollowUpService {
|
|
|
|
|
|
//获取医生团队成员
|
|
|
String[] doctors = new String[]{doctor};
|
|
|
List<Doctor> doctorList = getTeamDoctors(doctor, patient);
|
|
|
List<BaseDoctorDO> doctorList = getTeamDoctors(doctor, patient);
|
|
|
if (doctorList != null && doctorList.size() > 1) {
|
|
|
doctors = new String[doctorList.size()];
|
|
|
for (int i = 0; i < doctorList.size(); i++) {
|
|
|
doctors[i] = doctorList.get(i).getCode();
|
|
|
// doctors[i] = doctorList.get(i).getCode();
|
|
|
doctors[i] = doctorList.get(i).getId();
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1051,40 +1072,40 @@ public class FollowUpService {
|
|
|
/**
|
|
|
* 获取上次随访
|
|
|
*/
|
|
|
public void copyFollowup(Long id, Long fromId) throws Exception {
|
|
|
// List<FollowupContent> list = followupContentDao.findByFollowupId(fromId);
|
|
|
JestClient jestClient = null;
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", fromId))
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
List<FollowupContentESDO> list = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
|
|
|
if (list != null && list.size() > 0) {
|
|
|
List<FollowupContentESDO> copyList = new ArrayList<>();
|
|
|
for (FollowupContentESDO item : list) {
|
|
|
FollowupContentESDO copyItem = new FollowupContentESDO();
|
|
|
BeanUtils.copyProperties(item, copyItem);
|
|
|
copyItem.setId(null);
|
|
|
copyItem.setFollowup_id(id + "");
|
|
|
copyItem.setCreate_time(new Date());
|
|
|
// copyItem.setFollowupId(id);
|
|
|
// copyItem.setFollowupKey(item.getFollowupKey());
|
|
|
// copyItem.setFollowupValue(item.getFollowupValue());
|
|
|
// copyItem.setFollowupProject(item.getFollowupProject());
|
|
|
copyList.add(copyItem);
|
|
|
}
|
|
|
|
|
|
elastricSearchSave.save(copyList, esIndex, esType);
|
|
|
}
|
|
|
}
|
|
|
// public void copyFollowup(Long id, Long fromId) throws Exception {
|
|
|
//// List<FollowupContent> list = followupContentDao.findByFollowupId(fromId);
|
|
|
// JestClient jestClient = null;
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", fromId))
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
// List<FollowupContentESDO> list = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
//
|
|
|
// if (list != null && list.size() > 0) {
|
|
|
// List<FollowupContentESDO> copyList = new ArrayList<>();
|
|
|
// for (FollowupContentESDO item : list) {
|
|
|
// FollowupContentESDO copyItem = new FollowupContentESDO();
|
|
|
// BeanUtils.copyProperties(item, copyItem);
|
|
|
// copyItem.setId(null);
|
|
|
// copyItem.setFollowup_id(id + "");
|
|
|
// copyItem.setCreate_time(new Date());
|
|
|
//// copyItem.setFollowupId(id);
|
|
|
//// copyItem.setFollowupKey(item.getFollowupKey());
|
|
|
//// copyItem.setFollowupValue(item.getFollowupValue());
|
|
|
//// copyItem.setFollowupProject(item.getFollowupProject());
|
|
|
// copyList.add(copyItem);
|
|
|
// }
|
|
|
//
|
|
|
// elastricSearchSave.save(copyList, esIndex, esType);
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
/**************************************** 随访计划消息 ******************************************/
|
|
|
/**
|
|
@ -1101,7 +1122,7 @@ public class FollowUpService {
|
|
|
List<Map<String, Object>> followupToday = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
if (followupToday != null) {
|
|
|
List<Message> list = new ArrayList<>();
|
|
|
List<SystemMessageDO> list = new ArrayList<>();
|
|
|
for (Map<String, Object> map : followupToday) {
|
|
|
String doctor = String.valueOf(map.get("doctor_code"));
|
|
|
String count = String.valueOf(map.get("count"));
|
|
@ -1109,28 +1130,28 @@ public class FollowUpService {
|
|
|
// 添加签约消息
|
|
|
String title = "随访计划提醒";
|
|
|
String content = "您今日有" + count + "个随访计划待处理";
|
|
|
Message message = new Message();
|
|
|
message.setCode(getCode());
|
|
|
message.setCzrq(new Date());
|
|
|
SystemMessageDO message = new SystemMessageDO();
|
|
|
message.setCode(UUID.randomUUID().toString().replaceAll("-", ""));
|
|
|
message.setCreateTime(new Date());
|
|
|
message.setCreateTime(new Date());
|
|
|
message.setContent(content);
|
|
|
message.setRead(1);//设置未读
|
|
|
message.setIsRead("1");//设置未读
|
|
|
message.setReceiver(doctor);//设置接受医生的code
|
|
|
message.setSender("system");//设置发送的用户
|
|
|
message.setTitle(title);
|
|
|
message.setType(4);//随访计划提醒
|
|
|
message.setType("4");//随访计划提醒
|
|
|
message.setReadonly(1);//是否只读消息
|
|
|
list.add(message);
|
|
|
|
|
|
if(messageService.getMessageNoticeSettingByMessageType(doctor,"1", MessageNoticeSetting.MessageTypeEnum.systemSwitch.getValue())){
|
|
|
if (messageService.getMessageNoticeSettingByMessageType(doctor, "1", MessageNoticeSetting.MessageTypeEnum.systemSwitch.getValue())) {
|
|
|
// 推送消息给医生
|
|
|
pushMsgTask.put(doctor, "4", title, content, "");
|
|
|
try {
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
List<Followup> followups = followupDao.getByDoctorPlan(doctor,format.parse(start),format.parse(end));
|
|
|
for (Followup followup:followups) {
|
|
|
List<Followup> followups = followupDao.getByDoctorPlan(doctor, format.parse(start), format.parse(end));
|
|
|
for (Followup followup : followups) {
|
|
|
// 新增发送医生助手模板消息 v1.4.0 by wujunjie
|
|
|
Doctor doctor1 = doctorDao.findByCode(doctor);
|
|
|
BaseDoctorDO doctor1 = doctorDao.findById(doctor).orElse(null);
|
|
|
String doctorOpenID = doctor1.getOpenid();
|
|
|
if (StringUtils.isNotEmpty(doctorOpenID)) {
|
|
|
String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
|
|
@ -1138,7 +1159,7 @@ public class FollowUpService {
|
|
|
params.add(new BasicNameValuePair("type", "6"));
|
|
|
params.add(new BasicNameValuePair("openId", doctorOpenID));
|
|
|
params.add(new BasicNameValuePair("url", targetUrl));
|
|
|
params.add(new BasicNameValuePair("first", "您今日有"+count+"个随访计划待处理"));
|
|
|
params.add(new BasicNameValuePair("first", "您今日有" + count + "个随访计划待处理"));
|
|
|
params.add(new BasicNameValuePair("remark", ""));
|
|
|
SimpleDateFormat formatDate = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
|
|
|
String newDate = formatDate.format(new Date());
|
|
@ -1153,8 +1174,7 @@ public class FollowUpService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
messageDao.save(list);
|
|
|
messageDao.saveAll(list);
|
|
|
}
|
|
|
|
|
|
|
|
@ -1169,100 +1189,100 @@ public class FollowUpService {
|
|
|
* @author huangwenjie
|
|
|
* @date 2017/11/1 14:57
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void esSaveFollowupProjectData(String id, String followupProject, String followupProjectData) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
try {
|
|
|
|
|
|
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
.must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
FollowupContentESDO followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
|
|
|
List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
if(followupContentESDO != null){
|
|
|
dataList.add(followupContentESDO);
|
|
|
//删除原有记录
|
|
|
this.esDeleteFollowUpContent(dataList);
|
|
|
}
|
|
|
|
|
|
//保存新的随访详情信息
|
|
|
List<FollowupContentESDO> newdatalist = new ArrayList<>();
|
|
|
followupContentESDO = new FollowupContentESDO();
|
|
|
followupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
|
|
|
followupContentESDO.setFollowup_id(id);
|
|
|
followupContentESDO.setFollowup_project(followupProject);
|
|
|
followupContentESDO.setCreate_time(new Date());
|
|
|
newdatalist.add(followupContentESDO);
|
|
|
elastricSearchSave.save(newdatalist, esIndex, esType);
|
|
|
|
|
|
|
|
|
//如果该随访是已完成的,则添加随访信息上传映射,上传到基卫
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
if ("1".equals(followup.getStatus())) {
|
|
|
FollowupMapping followupMapping = followUpMappingDao.findByFollowupId(Integer.parseInt(id));
|
|
|
if (followupMapping == null) {
|
|
|
followupMapping = new FollowupMapping();
|
|
|
followupMapping.setCode(UUID.randomUUID().toString());
|
|
|
followupMapping.setFollowupId(Integer.parseInt(id));
|
|
|
followupMapping.setUpdateTime(DateUtil.getNowTimestamp());
|
|
|
followupMapping.setCreateTime(DateUtil.getNowTimestamp());
|
|
|
}
|
|
|
followupMapping.setNeedUpload(1);
|
|
|
followUpMappingDao.save(followupMapping);
|
|
|
//随访完成,增加随访状态完成的标记
|
|
|
Prescription prescription = prescriptionDao.findByCode(followup.getPrescriptionCode());
|
|
|
if(prescription != null){
|
|
|
prescription.setViewSuifang(1);
|
|
|
prescriptionDao.save(prescription);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// @Transactional
|
|
|
// public void esSaveFollowupProjectData(String id, String followupProject, String followupProjectData) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// try {
|
|
|
//
|
|
|
//
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// .must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
// FollowupContentESDO followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
//
|
|
|
// List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
// if(followupContentESDO != null){
|
|
|
// dataList.add(followupContentESDO);
|
|
|
// //删除原有记录
|
|
|
// this.esDeleteFollowUpContent(dataList);
|
|
|
// }
|
|
|
//
|
|
|
// //保存新的随访详情信息
|
|
|
// List<FollowupContentESDO> newdatalist = new ArrayList<>();
|
|
|
// followupContentESDO = new FollowupContentESDO();
|
|
|
// followupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
|
|
|
// followupContentESDO.setFollowup_id(id);
|
|
|
// followupContentESDO.setFollowup_project(followupProject);
|
|
|
// followupContentESDO.setCreate_time(new Date());
|
|
|
// newdatalist.add(followupContentESDO);
|
|
|
// elastricSearchSave.save(newdatalist, esIndex, esType);
|
|
|
//
|
|
|
//
|
|
|
// //如果该随访是已完成的,则添加随访信息上传映射,上传到基卫
|
|
|
// Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
// if ("1".equals(followup.getStatus())) {
|
|
|
// FollowupMapping followupMapping = followUpMappingDao.findByFollowupId(Integer.parseInt(id));
|
|
|
// if (followupMapping == null) {
|
|
|
// followupMapping = new FollowupMapping();
|
|
|
// followupMapping.setCode(UUID.randomUUID().toString());
|
|
|
// followupMapping.setFollowupId(Integer.parseInt(id));
|
|
|
// followupMapping.setUpdateTime(DateUtil.getNowTimestamp());
|
|
|
// followupMapping.setCreateTime(DateUtil.getNowTimestamp());
|
|
|
// }
|
|
|
// followupMapping.setNeedUpload(1);
|
|
|
// followUpMappingDao.save(followupMapping);
|
|
|
// //随访完成,增加随访状态完成的标记
|
|
|
// Prescription prescription = prescriptionDao.findByCode(followup.getPrescriptionCode());
|
|
|
// if(prescription != null){
|
|
|
// prescription.setViewSuifang(1);
|
|
|
// prescriptionDao.save(prescription);
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* ES获取面访项目数据
|
|
|
*/
|
|
|
public FollowupContentESDO esGetFollowupProjectData(String id, String followupProject) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
FollowupContentESDO followupContentESDO = null;
|
|
|
try {
|
|
|
//根据随访ID、分类ID获取随访记录详情
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
.must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
return followupContentESDO;
|
|
|
}
|
|
|
// public FollowupContentESDO esGetFollowupProjectData(String id, String followupProject) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// FollowupContentESDO followupContentESDO = null;
|
|
|
// try {
|
|
|
// //根据随访ID、分类ID获取随访记录详情
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// .must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
// followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// return followupContentESDO;
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* ES 删除随访详情信息
|
|
@ -1270,28 +1290,28 @@ public class FollowUpService {
|
|
|
* @author huangwenjie
|
|
|
* @date 2017/11/1 15:17
|
|
|
*/
|
|
|
public void esDeleteFollowUpContent(List<FollowupContentESDO> datalist) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
try {
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//根据id批量删除
|
|
|
Bulk.Builder bulk = new Bulk.Builder().defaultIndex(esIndex).defaultType(esType);
|
|
|
for (FollowupContentESDO obj : datalist) {
|
|
|
Delete index = new Delete.Builder(obj.getId()).build();
|
|
|
bulk.addAction(index);
|
|
|
}
|
|
|
BulkResult br = jestClient.execute(bulk.build());
|
|
|
|
|
|
logger.info("delete data count:" + datalist.size());
|
|
|
logger.info("delete flag:" + br.isSucceeded());
|
|
|
jestClient.shutdownClient();
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
// public void esDeleteFollowUpContent(List<FollowupContentESDO> datalist) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// try {
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //根据id批量删除
|
|
|
// Bulk.Builder bulk = new Bulk.Builder().defaultIndex(esIndex).defaultType(esType);
|
|
|
// for (FollowupContentESDO obj : datalist) {
|
|
|
// Delete index = new Delete.Builder(obj.getId()).build();
|
|
|
// bulk.addAction(index);
|
|
|
// }
|
|
|
// BulkResult br = jestClient.execute(bulk.build());
|
|
|
//
|
|
|
// logger.info("delete data count:" + datalist.size());
|
|
|
// logger.info("delete flag:" + br.isSucceeded());
|
|
|
// jestClient.shutdownClient();
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* ES获取面访项目数据列表
|
|
@ -1299,66 +1319,66 @@ public class FollowUpService {
|
|
|
* @author huangwenjie
|
|
|
* @date 2017/11/1 19:41
|
|
|
*/
|
|
|
public List<String> esfindProjectByFollowupId(String id) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
List<String> resultList = new ArrayList<>();
|
|
|
try {
|
|
|
//根据随访ID、分类ID获取随访记录详情
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.from(0).size(100);
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
|
|
|
List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
|
|
|
|
|
|
followupContentESDOList = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
if (!followupContentESDOList.isEmpty()) {
|
|
|
for (FollowupContentESDO followupContentESDO : followupContentESDOList) {
|
|
|
|
|
|
if("2".equals(followupContentESDO.getFollowup_project())){
|
|
|
// //判断血压必填
|
|
|
// if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())
|
|
|
// &&StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR()) && StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR_TYPE())){
|
|
|
// public List<String> esfindProjectByFollowupId(String id) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// List<String> resultList = new ArrayList<>();
|
|
|
// try {
|
|
|
// //根据随访ID、分类ID获取随访记录详情
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.from(0).size(100);
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
//
|
|
|
// List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
|
|
|
//
|
|
|
// followupContentESDOList = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
// if (!followupContentESDOList.isEmpty()) {
|
|
|
// for (FollowupContentESDO followupContentESDO : followupContentESDOList) {
|
|
|
//
|
|
|
// if("2".equals(followupContentESDO.getFollowup_project())){
|
|
|
//// //判断血压必填
|
|
|
//// if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())
|
|
|
//// &&StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR()) && StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR_TYPE())){
|
|
|
//// resultList.add(followupContentESDO.getFollowup_project());
|
|
|
//// } else if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())){
|
|
|
//// resultList.add(followupContentESDO.getFollowup_project());
|
|
|
//// }
|
|
|
// if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())){
|
|
|
// resultList.add(followupContentESDO.getFollowup_project());
|
|
|
// } else if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())){
|
|
|
// }
|
|
|
// if(StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR()) && StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR_TYPE())){
|
|
|
// resultList.add(followupContentESDO.getFollowup_project());
|
|
|
// }
|
|
|
if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())){
|
|
|
resultList.add(followupContentESDO.getFollowup_project());
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR()) && StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR_TYPE())){
|
|
|
resultList.add(followupContentESDO.getFollowup_project());
|
|
|
}
|
|
|
}else if("3".equals(followupContentESDO.getFollowup_project())){
|
|
|
//判断血糖必填
|
|
|
if(StringUtils.isNotBlank(followupContentESDO.getBS_FPG()) ||
|
|
|
StringUtils.isNotBlank(followupContentESDO.getNO_BS_FPG())||
|
|
|
StringUtils.isNotBlank(followupContentESDO.getRANDOM_BLOOD_SUGAR())){
|
|
|
resultList.add(followupContentESDO.getFollowup_project());
|
|
|
}
|
|
|
}else{
|
|
|
resultList.add(followupContentESDO.getFollowup_project());
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
jestClient.shutdownClient();
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
return resultList;
|
|
|
}
|
|
|
// }else if("3".equals(followupContentESDO.getFollowup_project())){
|
|
|
// //判断血糖必填
|
|
|
// if(StringUtils.isNotBlank(followupContentESDO.getBS_FPG()) ||
|
|
|
// StringUtils.isNotBlank(followupContentESDO.getNO_BS_FPG())||
|
|
|
// StringUtils.isNotBlank(followupContentESDO.getRANDOM_BLOOD_SUGAR())){
|
|
|
// resultList.add(followupContentESDO.getFollowup_project());
|
|
|
// }
|
|
|
// }else{
|
|
|
// resultList.add(followupContentESDO.getFollowup_project());
|
|
|
// }
|
|
|
//
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
// jestClient.shutdownClient();
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// return resultList;
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* ES获取面访项目数据详情
|
|
@ -1366,33 +1386,33 @@ public class FollowUpService {
|
|
|
* @author huangwenjie
|
|
|
* @date 2017/11/1 19:41
|
|
|
*/
|
|
|
public List<FollowupContentESDO> esfindFollowUpContestsByFollowupId(String id) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
|
|
|
try {
|
|
|
//根据随访ID、分类ID获取随访记录详情
|
|
|
|
|
|
List<String> resultList = new ArrayList<>();
|
|
|
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
return followupContentESDOList;
|
|
|
}
|
|
|
// public List<FollowupContentESDO> esfindFollowUpContestsByFollowupId(String id) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
|
|
|
// try {
|
|
|
// //根据随访ID、分类ID获取随访记录详情
|
|
|
//
|
|
|
// List<String> resultList = new ArrayList<>();
|
|
|
//
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
//
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// return followupContentESDOList;
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* 根据续方CODE获取随访记录信息
|
|
@ -1416,105 +1436,104 @@ public class FollowUpService {
|
|
|
* @param type
|
|
|
* @return
|
|
|
*/
|
|
|
public int getfollowupcontent(String followupid, String type) throws Exception {
|
|
|
|
|
|
int count = 0;
|
|
|
String[] typelist = null;
|
|
|
if (type.contains(",")) {
|
|
|
typelist = type.split(",");
|
|
|
} else {
|
|
|
typelist = new String[]{type};
|
|
|
}
|
|
|
|
|
|
for (String typekey : typelist) {
|
|
|
if (!"drug".equals(type)) {
|
|
|
// public int getfollowupcontent(String followupid, String type) throws Exception {
|
|
|
//
|
|
|
// int count = 0;
|
|
|
// String[] typelist = null;
|
|
|
// if (type.contains(",")) {
|
|
|
// typelist = type.split(",");
|
|
|
// } else {
|
|
|
// typelist = new String[]{type};
|
|
|
// }
|
|
|
//
|
|
|
// for (String typekey : typelist) {
|
|
|
// if (!"drug".equals(type)) {
|
|
|
//
|
|
|
// FollowupContentESDO followupContentESDO = this.esGetFollowupProjectData(followupid, typekey);
|
|
|
// if (followupContentESDO != null) {
|
|
|
// count++;
|
|
|
// }
|
|
|
//
|
|
|
// } else {
|
|
|
// //获取用药记录
|
|
|
// List<FollowupDrugs> drugsList = followupDrugsDao.findByFollowupId(Long.valueOf(followupid));
|
|
|
// if (!drugsList.isEmpty()) {
|
|
|
// count = count + drugsList.size();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
// return count;
|
|
|
//
|
|
|
// }
|
|
|
|
|
|
FollowupContentESDO followupContentESDO = this.esGetFollowupProjectData(followupid, typekey);
|
|
|
if (followupContentESDO != null) {
|
|
|
count++;
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
//获取用药记录
|
|
|
List<FollowupDrugs> drugsList = followupDrugsDao.findByFollowupId(Long.valueOf(followupid));
|
|
|
if (!drugsList.isEmpty()) {
|
|
|
count = count + drugsList.size();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return count;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 检查随访记录是否可完成
|
|
|
* @param followupid
|
|
|
* @return
|
|
|
*/
|
|
|
public boolean checkfollowupcompleted(String followupid) throws Exception {
|
|
|
boolean result = true;
|
|
|
|
|
|
List<FollowupContentESDO> eslist = this.esfindFollowUpContestsByFollowupId(followupid);
|
|
|
|
|
|
if (!eslist.isEmpty()) {
|
|
|
for (FollowupContentESDO followupContentESDO : eslist) {
|
|
|
|
|
|
if("2".equals(followupContentESDO.getFollowup_project())){
|
|
|
//判断血压必填
|
|
|
if(StringUtils.isBlank(followupContentESDO.getBP_D()) || StringUtils.isBlank(followupContentESDO.getBP_U())){
|
|
|
return false;
|
|
|
}
|
|
|
}else if("3".equals(followupContentESDO.getFollowup_project())){
|
|
|
//判断血糖必填
|
|
|
if(StringUtils.isBlank(followupContentESDO.getBS_FPG()) &&
|
|
|
StringUtils.isBlank(followupContentESDO.getNO_BS_FPG()) &&
|
|
|
StringUtils.isBlank(followupContentESDO.getRANDOM_BLOOD_SUGAR())){
|
|
|
return false;
|
|
|
}
|
|
|
}else if("5".equals(followupContentESDO.getFollowup_project())){
|
|
|
//判断评价
|
|
|
if(StringUtils.isBlank(followupContentESDO.getDIA_FOLLOWUP_TYPE_CODE()) &&
|
|
|
StringUtils.isBlank(followupContentESDO.getHYP_FOLLOWUP_TYPE_CODE())){
|
|
|
return false;
|
|
|
}
|
|
|
}else{}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
// public boolean checkfollowupcompleted(String followupid) throws Exception {
|
|
|
// boolean result = true;
|
|
|
//
|
|
|
// List<FollowupContentESDO> eslist = this.esfindFollowUpContestsByFollowupId(followupid);
|
|
|
//
|
|
|
// if (!eslist.isEmpty()) {
|
|
|
// for (FollowupContentESDO followupContentESDO : eslist) {
|
|
|
//
|
|
|
// if("2".equals(followupContentESDO.getFollowup_project())){
|
|
|
// //判断血压必填
|
|
|
// if(StringUtils.isBlank(followupContentESDO.getBP_D()) || StringUtils.isBlank(followupContentESDO.getBP_U())){
|
|
|
// return false;
|
|
|
// }
|
|
|
// }else if("3".equals(followupContentESDO.getFollowup_project())){
|
|
|
// //判断血糖必填
|
|
|
// if(StringUtils.isBlank(followupContentESDO.getBS_FPG()) &&
|
|
|
// StringUtils.isBlank(followupContentESDO.getNO_BS_FPG()) &&
|
|
|
// StringUtils.isBlank(followupContentESDO.getRANDOM_BLOOD_SUGAR())){
|
|
|
// return false;
|
|
|
// }
|
|
|
// }else if("5".equals(followupContentESDO.getFollowup_project())){
|
|
|
// //判断评价
|
|
|
// if(StringUtils.isBlank(followupContentESDO.getDIA_FOLLOWUP_TYPE_CODE()) &&
|
|
|
// StringUtils.isBlank(followupContentESDO.getHYP_FOLLOWUP_TYPE_CODE())){
|
|
|
// return false;
|
|
|
// }
|
|
|
// }else{}
|
|
|
//
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
// return result;
|
|
|
// }
|
|
|
//
|
|
|
|
|
|
/**
|
|
|
* 保存随访详情
|
|
|
* @param followupContentESDO
|
|
|
* @throws Exception
|
|
|
* followupContentESDO
|
|
|
*/
|
|
|
public void esSaveFollowupContentESDAO(FollowupContentESDO followupContentESDO)throws Exception{
|
|
|
JestClient jestClient = null;
|
|
|
try {
|
|
|
|
|
|
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
|
|
|
List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
if(followupContentESDO != null){
|
|
|
dataList.add(followupContentESDO);
|
|
|
//删除原有记录
|
|
|
this.esDeleteFollowUpContent(dataList);
|
|
|
}
|
|
|
elastricSearchSave.save(dataList, esIndex, esType);
|
|
|
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void updateFollowup(Long id){
|
|
|
Followup followup = followupDao.findOne(id);
|
|
|
// public void esSaveFollowupContentESDAO(FollowupContentESDO followupContentESDO)throws Exception{
|
|
|
// JestClient jestClient = null;
|
|
|
// try {
|
|
|
//
|
|
|
//
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
//
|
|
|
// List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
// if(followupContentESDO != null){
|
|
|
// dataList.add(followupContentESDO);
|
|
|
// //删除原有记录
|
|
|
// this.esDeleteFollowUpContent(dataList);
|
|
|
// }
|
|
|
// elastricSearchSave.save(dataList, esIndex, esType);
|
|
|
//
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
public void updateFollowup(Long id) {
|
|
|
Followup followup = followupDao.findById(id).orElse(null);
|
|
|
followup.setStatus("1");
|
|
|
followupDao.save(followup);
|
|
|
}
|
|
@ -1522,127 +1541,127 @@ public class FollowUpService {
|
|
|
|
|
|
//============================上门访视相关接口================================================
|
|
|
|
|
|
public Map<String,Object> findFollowupByMonth(String doctor,String patient,String followupClass,String patientName,String startTime,String endTime,String flag,Integer type1,String status)throws Exception{
|
|
|
public Map<String, Object> findFollowupByMonth(String doctor, String patient, String followupClass, String patientName, String startTime, String endTime, String flag, Integer type1, String status) throws Exception {
|
|
|
String sqlList = "select wf.id as id,wf.followup_no as followupNo,wf.followup_date as followupDate,wf.followup_plan_date as followupPlanDate,wf.followup_next_date as followupNextDate," +
|
|
|
" wf.followup_type as followupType,wf.followup_class as followupClass,wf.followup_manager_status as followupManagerStatus,wf.doctor_code as doctorCode,wf.doctor_name as doctorName," +
|
|
|
"wf.jwdoctor_code as jwdoctorCode,wf.org_code as orgCode,wf.org_name as orgName,wf.jworg_code as jworgCode,wf.patient_code as patientCode,wf.patient_name as patientName,wf.idcard," +
|
|
|
"wf.data_from as dataFrom,wf.status,wf.followup_content_phone as followupContentPhone,wf.creater,wf.sign_type as signType,wf.admin_team_code as adminTeamCode,wf.sign_code as signCode," +
|
|
|
"wf.prescription_code as prescriptionCode,wf.type";
|
|
|
String sql = " from wlyy_followup wf ";
|
|
|
sql+= " where 1=1 and wf.status !=0";
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(doctor)){
|
|
|
sql+=" and wf.doctor_code = '"+doctor+"'";
|
|
|
sql += " where 1=1 and wf.status !=0";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(doctor)) {
|
|
|
sql += " and wf.doctor_code = '" + doctor + "'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(patient)){
|
|
|
sql+=" and wf.patient_code = '"+patient+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(patient)) {
|
|
|
sql += " and wf.patient_code = '" + patient + "'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(followupClass)){
|
|
|
sql+=" and wf.followup_class = '"+followupClass+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(followupClass)) {
|
|
|
sql += " and wf.followup_class = '" + followupClass + "'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(patientName)){
|
|
|
sql+=" and wf.patient_name like '%"+patientName+"%'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(patientName)) {
|
|
|
sql += " and wf.patient_name like '%" + patientName + "%'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(startTime)){
|
|
|
sql+=" and wf.followup_plan_date >='"+startTime+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(startTime)) {
|
|
|
sql += " and wf.followup_plan_date >='" + startTime + "'";
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(status)){
|
|
|
sql+=" and wf.status ='"+status+"' ";
|
|
|
if (StringUtils.isNotBlank(status)) {
|
|
|
sql += " and wf.status ='" + status + "' ";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(endTime)){
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(endTime)) {
|
|
|
Date currentTime = DateUtil.strToDate(endTime + " 23:59:59");
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String dateString = formatter.format(currentTime);
|
|
|
sql+=" and wf.followup_plan_date <='"+dateString+"'";
|
|
|
sql += " and wf.followup_plan_date <='" + dateString + "'";
|
|
|
}
|
|
|
if (type1!=null&&type1!=0){
|
|
|
sql+=" and wf.type ="+type1;
|
|
|
if (type1 != null && type1 != 0) {
|
|
|
sql += " and wf.type =" + type1;
|
|
|
}
|
|
|
if(flag==null){
|
|
|
flag="0";
|
|
|
if (flag == null) {
|
|
|
flag = "0";
|
|
|
}
|
|
|
if(flag.equals("1")&&flag!=null){
|
|
|
sql+=" and wf.followup_class in(5,6,7,8,9)";
|
|
|
if (flag.equals("1") && flag != null) {
|
|
|
sql += " and wf.followup_class in(5,6,7,8,9)";
|
|
|
}
|
|
|
if(flag.equals("2")&&flag!=null){
|
|
|
sql+=" and (wf.followup_class in(1,2,3,4,11,12,13,14,15,16,17,18) or wf.followup_class IS NULL)";
|
|
|
if (flag.equals("2") && flag != null) {
|
|
|
sql += " and (wf.followup_class in(1,2,3,4,11,12,13,14,15,16,17,18) or wf.followup_class IS NULL)";
|
|
|
}
|
|
|
sql+=" order by wf.followup_plan_date desc";
|
|
|
List<Followup> followups = jdbcTemplate.query(sqlList+sql,new BeanPropertyRowMapper(Followup.class));
|
|
|
sql += " order by wf.followup_plan_date desc";
|
|
|
List<Followup> followups = jdbcTemplate.query(sqlList + sql, new BeanPropertyRowMapper(Followup.class));
|
|
|
//按时间分组
|
|
|
Map<String,Object> date = sortFollowupByDate(followups);
|
|
|
Map<String, Object> date = sortFollowupByDate(followups);
|
|
|
|
|
|
//统计每一天完成数与计划数目
|
|
|
if(date!=null&&date.size()>0){
|
|
|
for(String key : date.keySet()){
|
|
|
if (date != null && date.size() > 0) {
|
|
|
for (String key : date.keySet()) {
|
|
|
//获取一天的数据
|
|
|
Map<String,Object> d = (Map<String,Object>)date.get(key);
|
|
|
Map<String, Object> d = (Map<String, Object>) date.get(key);
|
|
|
// 获取一天随访数据
|
|
|
List<Followup> dateFollowups = (List<Followup>)d.get("followups");
|
|
|
List<Followup> dateFollowups = (List<Followup>) d.get("followups");
|
|
|
//统计一天各项纬度指标
|
|
|
List<Map<String,Object>> statistics = new ArrayList<>();
|
|
|
for(String type : FOLLOWUP_TYPE){
|
|
|
for(String cls:FOLLOWUP_CLASS ){
|
|
|
List<Map<String, Object>> statistics = new ArrayList<>();
|
|
|
for (String type : FOLLOWUP_TYPE) {
|
|
|
for (String cls : FOLLOWUP_CLASS) {
|
|
|
//统计单条
|
|
|
Map<String,Object> fs = sortFollowupList(type,cls,dateFollowups);
|
|
|
Integer count = (Integer)fs.get("count");
|
|
|
if(count!=0){
|
|
|
Map<String, Object> fs = sortFollowupList(type, cls, dateFollowups);
|
|
|
Integer count = (Integer) fs.get("count");
|
|
|
if (count != 0) {
|
|
|
statistics.add(fs);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
d.put("statistics",statistics);
|
|
|
d.put("statistics", statistics);
|
|
|
}
|
|
|
}
|
|
|
return date;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> sortFollowupByDate(List<Followup> followups){
|
|
|
public Map<String, Object> sortFollowupByDate(List<Followup> followups) {
|
|
|
//按时间分组
|
|
|
Map<String,Object> date = new HashedMap();
|
|
|
if(followups!=null&&followups.size()>0){
|
|
|
Map<String, Object> date = new HashedMap();
|
|
|
if (followups != null && followups.size() > 0) {
|
|
|
Iterator it = followups.iterator();
|
|
|
while (it.hasNext()){
|
|
|
Followup followup = (Followup)it.next();
|
|
|
while (it.hasNext()) {
|
|
|
Followup followup = (Followup) it.next();
|
|
|
|
|
|
//1.获取日期分组
|
|
|
Map<String,Object> dateFollows = (Map<String,Object>)date.get(DateUtil.dateToStr(followup.getFollowupPlanDate(),"yyyy-MM-dd"));
|
|
|
Map<String, Object> dateFollows = (Map<String, Object>) date.get(DateUtil.dateToStr(followup.getFollowupPlanDate(), "yyyy-MM-dd"));
|
|
|
|
|
|
//判断随访时间是否已经创建分组
|
|
|
if(dateFollows!=null&&dateFollows.size()>0){
|
|
|
if (dateFollows != null && dateFollows.size() > 0) {
|
|
|
//同一天时间已经有分组则加入list
|
|
|
List<Followup> list = (List<Followup>)dateFollows.get("followups");
|
|
|
List<Followup> list = (List<Followup>) dateFollows.get("followups");
|
|
|
list.add(followup);
|
|
|
|
|
|
}else{
|
|
|
} else {
|
|
|
//同一天的时间没有该分组则创建这天的随访计划List
|
|
|
Map<String,Object> newdateFollow = new HashedMap();
|
|
|
Map<String, Object> newdateFollow = new HashedMap();
|
|
|
|
|
|
List<Followup> dateFollowups = new ArrayList<>();
|
|
|
dateFollowups.add(followup);
|
|
|
newdateFollow.put("followups",dateFollowups);
|
|
|
newdateFollow.put("followups", dateFollowups);
|
|
|
|
|
|
date.put(DateUtil.dateToStr(followup.getFollowupPlanDate(),"yyyy-MM-dd"),newdateFollow);
|
|
|
date.put(DateUtil.dateToStr(followup.getFollowupPlanDate(), "yyyy-MM-dd"), newdateFollow);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return date;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> sortFollowupList(String followupType,String followupClass,List<Followup> followups){
|
|
|
public Map<String, Object> sortFollowupList(String followupType, String followupClass, List<Followup> followups) {
|
|
|
//统计完成数
|
|
|
Integer compeleCount = 0;
|
|
|
//总数
|
|
|
Integer count = 0;
|
|
|
//迭代数组
|
|
|
List<Followup> rs = new ArrayList<>();
|
|
|
if(followups!=null&&followups.size()>0){
|
|
|
if (followups != null && followups.size() > 0) {
|
|
|
Iterator it = followups.iterator();
|
|
|
while (it.hasNext()){
|
|
|
Followup followup = (Followup)it.next();
|
|
|
while (it.hasNext()) {
|
|
|
Followup followup = (Followup) it.next();
|
|
|
//判断随访类型与类别
|
|
|
if(followupClass.equals(followup.getFollowupClass())&& followupType.equals(followup.getFollowupType())){
|
|
|
if (followupClass.equals(followup.getFollowupClass()) && followupType.equals(followup.getFollowupType())) {
|
|
|
rs.add(followup);
|
|
|
if("1".equals(followup.getStatus())){
|
|
|
if ("1".equals(followup.getStatus())) {
|
|
|
compeleCount++;
|
|
|
}
|
|
|
//删除迭代器中元素
|
|
@ -1653,23 +1672,24 @@ public class FollowUpService {
|
|
|
count = rs.size();
|
|
|
}
|
|
|
|
|
|
Map<String,Object> mapFollow =new HashedMap();
|
|
|
mapFollow.put("followupType",followupType);
|
|
|
mapFollow.put("followupClass",followupClass);
|
|
|
mapFollow.put("compeleCount",compeleCount);
|
|
|
mapFollow.put("count",count);
|
|
|
Map<String, Object> mapFollow = new HashedMap();
|
|
|
mapFollow.put("followupType", followupType);
|
|
|
mapFollow.put("followupClass", followupClass);
|
|
|
mapFollow.put("compeleCount", compeleCount);
|
|
|
mapFollow.put("count", count);
|
|
|
return mapFollow;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取随访计划
|
|
|
*
|
|
|
* @param doctor
|
|
|
* @param startTime
|
|
|
* @param endTime
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<Followup> findFollowupList(String followIds,String doctor,String patient,String followupClass,String patientName,String startTime,String endTime,String flag,Integer type,String status)throws Exception {
|
|
|
public List<Followup> findFollowupList(String followIds, String doctor, String patient, String followupClass, String patientName, String startTime, String endTime, String flag, Integer type, String status) throws Exception {
|
|
|
//1.查找时间段中所有计划中的随访
|
|
|
|
|
|
String sqlList = "select wf.id as id,wf.followup_no as followupNo,wf.followup_date as followupDate,wf.followup_plan_date as followupPlanDate,wf.followup_next_date as followupNextDate," +
|
|
@ -1679,56 +1699,56 @@ public class FollowUpService {
|
|
|
"wf.prescription_code as prescriptionCode,wf.age,wf.sex,wf.mobile,wf.idcard_encrypt AS idcardEncrypt,wf.type" +
|
|
|
"";
|
|
|
String sql = " from wlyy_followup wf ";
|
|
|
sql+= " where 1=1 and wf.status !=0";
|
|
|
if (StringUtils.isNotBlank(followIds)){
|
|
|
sql += " where 1=1 and wf.status !=0";
|
|
|
if (StringUtils.isNotBlank(followIds)) {
|
|
|
List<String> followId = Arrays.asList(followIds.split(","));
|
|
|
String wfIds = followId.stream().map(String::valueOf).collect(Collectors.joining("','"));
|
|
|
sql+=" and wf.id in ('"+wfIds+"') ";
|
|
|
sql += " and wf.id in ('" + wfIds + "') ";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(doctor)){
|
|
|
sql+=" and wf.doctor_code = '"+doctor+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(doctor)) {
|
|
|
sql += " and wf.doctor_code = '" + doctor + "'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(patient)){
|
|
|
sql+=" and wf.patient_code = '"+patient+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(patient)) {
|
|
|
sql += " and wf.patient_code = '" + patient + "'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(followupClass)){
|
|
|
sql+=" and wf.followup_class = '"+followupClass+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(followupClass)) {
|
|
|
sql += " and wf.followup_class = '" + followupClass + "'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(patientName)){
|
|
|
sql+=" and wf.patient_name like '%"+patientName+"%'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(patientName)) {
|
|
|
sql += " and wf.patient_name like '%" + patientName + "%'";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(startTime)){
|
|
|
sql+=" and wf.followup_plan_date >='"+startTime+"'";
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(startTime)) {
|
|
|
sql += " and wf.followup_plan_date >='" + startTime + "'";
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(status)){
|
|
|
sql+=" and wf.status ='"+status+"' ";
|
|
|
if (StringUtils.isNotBlank(status)) {
|
|
|
sql += " and wf.status ='" + status + "' ";
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isEmpty(endTime)){
|
|
|
if (!org.apache.commons.lang.StringUtils.isEmpty(endTime)) {
|
|
|
Date currentTime = DateUtil.strToDate(endTime + " 23:59:59");
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String dateString = formatter.format(currentTime);
|
|
|
sql+=" and wf.followup_plan_date <='"+dateString+"'";
|
|
|
sql += " and wf.followup_plan_date <='" + dateString + "'";
|
|
|
}
|
|
|
if(flag==null){
|
|
|
flag="0";
|
|
|
if (flag == null) {
|
|
|
flag = "0";
|
|
|
}
|
|
|
if (type!=null&&type!=0){
|
|
|
sql+=" AND wf.type ="+type;
|
|
|
if (type != null && type != 0) {
|
|
|
sql += " AND wf.type =" + type;
|
|
|
}
|
|
|
if(flag.equals("1")&&flag!=null){
|
|
|
sql+=" and wf.followup_class in(5,6,7,8,9)";
|
|
|
if (flag.equals("1") && flag != null) {
|
|
|
sql += " and wf.followup_class in(5,6,7,8,9)";
|
|
|
}
|
|
|
if(flag.equals("2")&&flag!=null){
|
|
|
sql+=" and (wf.followup_class in(1,2,3,4,11,12,13,14,15,16,17,18) or wf.followup_class IS NULL)";
|
|
|
if (flag.equals("2") && flag != null) {
|
|
|
sql += " and (wf.followup_class in(1,2,3,4,11,12,13,14,15,16,17,18) or wf.followup_class IS NULL)";
|
|
|
}
|
|
|
sql+=" order by wf.followup_plan_date desc";
|
|
|
List<Followup> followupAll = jdbcTemplate.query(sqlList+sql,new BeanPropertyRowMapper(Followup.class));
|
|
|
sql += " order by wf.followup_plan_date desc";
|
|
|
List<Followup> followupAll = jdbcTemplate.query(sqlList + sql, new BeanPropertyRowMapper(Followup.class));
|
|
|
List<Followup> followups = new ArrayList<>();
|
|
|
for(Followup followup:followupAll){
|
|
|
Patient patient1 = patientDao.findByCode(followup.getPatientCode());
|
|
|
for (Followup followup : followupAll) {
|
|
|
BasePatientDO patient1 = patientDao.findById(followup.getPatientCode()).orElse(null);
|
|
|
int age = IdCardUtil.getAgeForIdcard(followup.getIdcard());
|
|
|
patient1.setAge(age);
|
|
|
List<Map<String,Object>> map = findPatientLabel(followup.getPatientCode());
|
|
|
List<Map<String, Object>> map = findPatientLabel(followup.getPatientCode());
|
|
|
followup.setPatient(patient1);
|
|
|
followup.setFollowupLabelPatient(map);
|
|
|
followups.add(followup);
|
|
@ -1738,14 +1758,15 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 获取随访标签列表带居民数
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> findLabelListWithCount(){
|
|
|
List<Map<String,Object>> rs = findFollowupLabel();
|
|
|
if(rs!=null&& rs.size()>0){
|
|
|
for(Map<String,Object> map:rs){
|
|
|
String labelCode = (String)map.get("LableCode");
|
|
|
map.put("count",findPatientFollowLabelCount(labelCode));
|
|
|
public List<Map<String, Object>> findLabelListWithCount() {
|
|
|
List<Map<String, Object>> rs = findFollowupLabel();
|
|
|
if (rs != null && rs.size() > 0) {
|
|
|
for (Map<String, Object> map : rs) {
|
|
|
String labelCode = (String) map.get("LableCode");
|
|
|
map.put("count", findPatientFollowLabelCount(labelCode));
|
|
|
}
|
|
|
}
|
|
|
return rs;
|
|
@ -1753,10 +1774,11 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 获取随访标签列表
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> findFollowupLabel(){
|
|
|
String sql=" SELECT " +
|
|
|
public List<Map<String, Object>> findFollowupLabel() {
|
|
|
String sql = " SELECT " +
|
|
|
" l.label_code AS LableCode, " +
|
|
|
" l.label_name AS labelName " +
|
|
|
" FROM " +
|
|
@ -1770,17 +1792,18 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 计算随访标签人数
|
|
|
*
|
|
|
* @param labelCode
|
|
|
* @return
|
|
|
*/
|
|
|
public Long findPatientFollowLabelCount(String labelCode){
|
|
|
String sql =" SELECT " +
|
|
|
public Long findPatientFollowLabelCount(String labelCode) {
|
|
|
String sql = " SELECT " +
|
|
|
" COUNT(1) AS total " +
|
|
|
" FROM " +
|
|
|
" wlyy_followup_label l " +
|
|
|
" JOIN wlyy_followup_label_patient p ON l.label_code = p.label_code " +
|
|
|
" WHERE " +
|
|
|
" l.label_code ='"+labelCode+"'";
|
|
|
" l.label_code ='" + labelCode + "'";
|
|
|
List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
|
|
|
Long count = 0L;
|
|
|
if (rstotal != null && rstotal.size() > 0) {
|
|
@ -1791,6 +1814,7 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 获取随访居民
|
|
|
*
|
|
|
* @param namekey
|
|
|
* @param labelCode
|
|
|
* @param page
|
|
@ -1798,7 +1822,7 @@ public class FollowUpService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public Map<String,Object> findFollowUpPatient(String namekey,String doctor,String labelCode,Integer page,Integer size)throws Exception{
|
|
|
public Map<String, Object> findFollowUpPatient(String namekey, String doctor, String labelCode, Integer page, Integer size) throws Exception {
|
|
|
String totalSql = " SELECT " +
|
|
|
" DISTINCT p.code " +
|
|
|
" FROM " +
|
|
@ -1807,11 +1831,11 @@ public class FollowUpService {
|
|
|
" JOIN wlyy_patient p ON lp.patient = p.code " +
|
|
|
" WHERE " +
|
|
|
" 1=1 ";
|
|
|
if(StringUtils.isNotBlank(namekey)){
|
|
|
totalSql +=" AND p.name LIKE '%"+namekey+"%'";
|
|
|
if (StringUtils.isNotBlank(namekey)) {
|
|
|
totalSql += " AND p.name LIKE '%" + namekey + "%'";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(labelCode)){
|
|
|
totalSql +=" AND lp.label_code ='"+labelCode+"' ";
|
|
|
if (StringUtils.isNotBlank(labelCode)) {
|
|
|
totalSql += " AND lp.label_code ='" + labelCode + "' ";
|
|
|
}
|
|
|
List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
|
|
|
Integer count = 0;
|
|
@ -1832,63 +1856,64 @@ public class FollowUpService {
|
|
|
" JOIN wlyy_patient p ON lp.patient = p.code " +
|
|
|
" WHERE " +
|
|
|
" 1=1 ";
|
|
|
if(StringUtils.isNotBlank(namekey)){
|
|
|
sql +=" AND p.name LIKE '%"+namekey+"%'";
|
|
|
if (StringUtils.isNotBlank(namekey)) {
|
|
|
sql += " AND p.name LIKE '%" + namekey + "%'";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(labelCode)){
|
|
|
sql +=" AND lp.label_code ='"+labelCode+"' ";
|
|
|
if (StringUtils.isNotBlank(labelCode)) {
|
|
|
sql += " AND lp.label_code ='" + labelCode + "' ";
|
|
|
}
|
|
|
|
|
|
sql +=" limit " + (page-1)*size +"," + size;
|
|
|
sql += " limit " + (page - 1) * size + "," + size;
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
//设置标签
|
|
|
if(list!=null&&list.size()>0){
|
|
|
for(Map<String,Object> map:list){
|
|
|
String patient = (String)map.get("code");
|
|
|
map.put("labels",findPatientLabel(patient));
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (Map<String, Object> map : list) {
|
|
|
String patient = (String) map.get("code");
|
|
|
map.put("labels", findPatientLabel(patient));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
rs.put("total",count);
|
|
|
Map<String, Object> rs = new HashedMap();
|
|
|
rs.put("total", count);
|
|
|
|
|
|
//统计随访数目
|
|
|
rs.put("list",findPatientFollowCount(list,doctor));
|
|
|
rs.put("list", findPatientFollowCount(list, doctor));
|
|
|
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 统计当前医生的居民计划数与完成数
|
|
|
*
|
|
|
* @param list
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<Map<String, Object>> findPatientFollowCount(List<Map<String,Object>> list,String doctor)throws Exception{
|
|
|
if(list!=null&&list.size()>0){
|
|
|
for(Map<String,Object> map:list){
|
|
|
String patient = (String)map.get("code");
|
|
|
List<Followup> followups = followupDao.findAllPatientPlan(patient,doctor);
|
|
|
public List<Map<String, Object>> findPatientFollowCount(List<Map<String, Object>> list, String doctor) throws Exception {
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (Map<String, Object> map : list) {
|
|
|
String patient = (String) map.get("code");
|
|
|
List<Followup> followups = followupDao.findAllPatientPlan(patient, doctor);
|
|
|
|
|
|
//统计数目
|
|
|
Integer count = 0;
|
|
|
Integer compeleCount =0;
|
|
|
Integer compeleCount = 0;
|
|
|
|
|
|
if(followups!=null&&followups.size()>0){
|
|
|
if (followups != null && followups.size() > 0) {
|
|
|
count = followups.size();
|
|
|
for(Followup followup:followups){
|
|
|
if("1".equals(followup.getStatus())){
|
|
|
for (Followup followup : followups) {
|
|
|
if ("1".equals(followup.getStatus())) {
|
|
|
compeleCount++;
|
|
|
}
|
|
|
}
|
|
|
map.put("count",count);
|
|
|
map.put("compeleCount",compeleCount);
|
|
|
map.put("followups",followups);
|
|
|
}else{
|
|
|
map.put("count",count);
|
|
|
map.put("compeleCount",compeleCount);
|
|
|
map.put("followups",followups);
|
|
|
map.put("count", count);
|
|
|
map.put("compeleCount", compeleCount);
|
|
|
map.put("followups", followups);
|
|
|
} else {
|
|
|
map.put("count", count);
|
|
|
map.put("compeleCount", compeleCount);
|
|
|
map.put("followups", followups);
|
|
|
}
|
|
|
|
|
|
}
|
|
@ -1898,10 +1923,11 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 获取居民详情
|
|
|
*
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String,Object> findPatientInfo(String patient){
|
|
|
public Map<String, Object> findPatientInfo(String patient) {
|
|
|
String sql = " SELECT " +
|
|
|
" p.`name`, " +
|
|
|
" p.code, " +
|
|
@ -1918,9 +1944,9 @@ public class FollowUpService {
|
|
|
" JOIN wlyy_followup_label_patient lp ON l.label_code = lp.label_code " +
|
|
|
" JOIN wlyy_patient p ON lp.patient = p.code " +
|
|
|
" WHERE " +
|
|
|
" p.code = '"+patient+ "'";
|
|
|
List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql);
|
|
|
if(rs!=null&&rs.size()>0){
|
|
|
" p.code = '" + patient + "'";
|
|
|
List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql);
|
|
|
if (rs != null && rs.size() > 0) {
|
|
|
return rs.get(0);
|
|
|
}
|
|
|
return null;
|
|
@ -1928,64 +1954,66 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 获取居民随访列表
|
|
|
*
|
|
|
* @param patient
|
|
|
* @param doctor
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<Followup> findPatientFollowList(String patient,String doctor)throws Exception{
|
|
|
List<Followup> followups = followupDao.findAllPatientPlan(patient,doctor);
|
|
|
public List<Followup> findPatientFollowList(String patient, String doctor) throws Exception {
|
|
|
List<Followup> followups = followupDao.findAllPatientPlan(patient, doctor);
|
|
|
return followups;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取居民随访列表
|
|
|
*
|
|
|
* @param patient
|
|
|
* @param doctor
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<Followup> findPatientFollowListByCondition(String patient,String doctor,String followupType,String followupClass,String type,
|
|
|
String status,String startDate,String endDate)throws Exception{
|
|
|
public List<Followup> findPatientFollowListByCondition(String patient, String doctor, String followupType, String followupClass, String type,
|
|
|
String status, String startDate, String endDate) throws Exception {
|
|
|
StringBuilder sql = new StringBuilder("select * from wlyy_followup a where 1=1 ");
|
|
|
if (StringUtils.isNotBlank(patient)){
|
|
|
sql.append(" and a.patient_code ='"+patient+"' ");
|
|
|
if (StringUtils.isNotBlank(patient)) {
|
|
|
sql.append(" and a.patient_code ='" + patient + "' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(doctor)){
|
|
|
sql.append(" and a.doctor_code ='"+doctor+"' ");
|
|
|
if (StringUtils.isNotBlank(doctor)) {
|
|
|
sql.append(" and a.doctor_code ='" + doctor + "' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(followupType)){
|
|
|
sql.append(" and a.followup_type ='"+followupType+"' ");
|
|
|
if (StringUtils.isNotBlank(followupType)) {
|
|
|
sql.append(" and a.followup_type ='" + followupType + "' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(followupClass)){
|
|
|
sql.append(" and a.followup_class in("+followupClass+") ");
|
|
|
if (StringUtils.isNotBlank(followupClass)) {
|
|
|
sql.append(" and a.followup_class in(" + followupClass + ") ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(type)){
|
|
|
sql.append(" and a.type ='"+type+"' ");
|
|
|
if (StringUtils.isNotBlank(type)) {
|
|
|
sql.append(" and a.type ='" + type + "' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(status)){
|
|
|
sql.append(" and a.status ='"+status+"' ");
|
|
|
if (StringUtils.isNotBlank(status)) {
|
|
|
sql.append(" and a.status ='" + status + "' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(startDate)){
|
|
|
sql.append(" and a.followup_date >='"+startDate+"' ");
|
|
|
if (StringUtils.isNotBlank(startDate)) {
|
|
|
sql.append(" and a.followup_date >='" + startDate + "' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(endDate)){
|
|
|
sql.append(" and a.followup_date <='"+endDate+"' ");
|
|
|
if (StringUtils.isNotBlank(endDate)) {
|
|
|
sql.append(" and a.followup_date <='" + endDate + "' ");
|
|
|
}
|
|
|
sql.append("order by a.followup_date desc");
|
|
|
List<Followup> followups = jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper<>(Followup.class));
|
|
|
List<Followup> followups = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(Followup.class));
|
|
|
|
|
|
for (Followup tmp:followups){
|
|
|
for (Followup tmp : followups) {
|
|
|
//随访方式
|
|
|
sql = new StringBuilder("select `value` from system_dict where dict_name='FOLLOWUP_WAY_DICT' and `code` ='"+tmp.getFollowupType()+"'");
|
|
|
tmp.setFollowupTypeName(jdbcTemplate.queryForObject(sql.toString(),String.class));
|
|
|
sql = new StringBuilder("select `value` from system_dict where dict_name='FOLLOWUP_WAY_DICT' and `code` ='" + tmp.getFollowupType() + "'");
|
|
|
tmp.setFollowupTypeName(jdbcTemplate.queryForObject(sql.toString(), String.class));
|
|
|
//随访类别
|
|
|
String followupClassTmp = tmp.getFollowupClass();
|
|
|
sql =new StringBuilder("select GROUP_CONCAT(\n" +
|
|
|
sql = new StringBuilder("select GROUP_CONCAT(\n" +
|
|
|
" `value` SEPARATOR ','\n" +
|
|
|
" ) AS followupClassName from system_dict where dict_name='FOLLOWUP_CLASS_DICT' ");
|
|
|
sql.append(" and `code` in ('").append(followupClassTmp.replace(",","','")).append("')");
|
|
|
tmp.setFollowupClassName(jdbcTemplate.queryForObject(sql.toString(),String.class));
|
|
|
sql.append(" and `code` in ('").append(followupClassTmp.replace(",", "','")).append("')");
|
|
|
tmp.setFollowupClassName(jdbcTemplate.queryForObject(sql.toString(), String.class));
|
|
|
}
|
|
|
|
|
|
return followups;
|
|
@ -1994,15 +2022,16 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 创建随访
|
|
|
*
|
|
|
* @param jsonFollowup
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public Followup saveFollowup(String jsonFollowup)throws Exception{
|
|
|
Followup followup = objectMapper.readValue(jsonFollowup,Followup.class);
|
|
|
public Followup saveFollowup(String jsonFollowup) throws Exception {
|
|
|
Followup followup = objectMapper.readValue(jsonFollowup, Followup.class);
|
|
|
//访视添加居民信息
|
|
|
if(StringUtils.isBlank(followup.getPatientName()) && StringUtils.isBlank(followup.getIdcard())) {
|
|
|
Patient p = patientDao.findByCode(followup.getPatientCode());
|
|
|
if (StringUtils.isBlank(followup.getPatientName()) && StringUtils.isBlank(followup.getIdcard())) {
|
|
|
BasePatientDO p = patientDao.findById(followup.getPatientCode()).orElse(null);
|
|
|
followup.setPatientName(p.getName());
|
|
|
followup.setIdcard(p.getIdcard());
|
|
|
|
|
@ -2012,14 +2041,14 @@ public class FollowUpService {
|
|
|
followup.setAdminTeamCode(signFamily.getAdminTeamId());
|
|
|
}
|
|
|
}
|
|
|
List<Date> dateList = followupDao.findFollowupDateList(followup.getDoctorCode(),followup.getPatientCode());
|
|
|
List<Date> dateList = followupDao.findFollowupDateList(followup.getDoctorCode(), followup.getPatientCode());
|
|
|
Date prior = null;
|
|
|
for (Date date : dateList) {
|
|
|
try {
|
|
|
if (prior == null) {
|
|
|
prior = date;
|
|
|
} else {
|
|
|
if(prior.after(date)) {
|
|
|
if (prior.after(date)) {
|
|
|
prior = date;
|
|
|
}
|
|
|
}
|
|
@ -2046,16 +2075,16 @@ public class FollowUpService {
|
|
|
String two = sdf.format(followupList.get(1).getFollowupDate());
|
|
|
Date twoDate = df.parse(two);
|
|
|
if (followupDate.getTime() >= twoDate.getTime()) {
|
|
|
throw new ServiceException("第一次访视时间不能晚于第二次访视时间!");
|
|
|
throw new RuntimeException("第一次访视时间不能晚于第二次访视时间!");
|
|
|
}
|
|
|
} else if (priorDate.getTime() >= followupDate.getTime()) {
|
|
|
throw new ServiceException("随访时间不能早于第一次随访时间!");
|
|
|
throw new RuntimeException("随访时间不能早于第一次随访时间!");
|
|
|
} else {
|
|
|
return followupDao.save(followup);
|
|
|
}
|
|
|
|
|
|
} else if (priorDate.getTime() >= followupDate.getTime()) {
|
|
|
throw new ServiceException("随访时间不能早于第一次随访时间!");
|
|
|
throw new RuntimeException("随访时间不能早于第一次随访时间!");
|
|
|
} else {
|
|
|
return followupDao.save(followup);
|
|
|
}
|
|
@ -2063,27 +2092,28 @@ public class FollowUpService {
|
|
|
return followupDao.save(followup);
|
|
|
}
|
|
|
|
|
|
public Followup delFollowup(Long followupId)throws Exception{
|
|
|
Followup followup = followupDao.findOne(followupId);
|
|
|
List<Followup> followupList = followupDao.findFollowupList(followup.getDoctorCode(),followup.getPatientCode());
|
|
|
if(followupList.size()>=2){
|
|
|
if(followupList.get(1)!=null&&followupList.get(1).getStatus().equals("1")){
|
|
|
throw new ServiceException("当前状态不可删除!");
|
|
|
public Followup delFollowup(Long followupId) throws Exception {
|
|
|
Followup followup = followupDao.findById(followupId).orElse(null);
|
|
|
List<Followup> followupList = followupDao.findFollowupList(followup.getDoctorCode(), followup.getPatientCode());
|
|
|
if (followupList.size() >= 2) {
|
|
|
if (followupList.get(1) != null && followupList.get(1).getStatus().equals("1")) {
|
|
|
throw new RuntimeException("当前状态不可删除!");
|
|
|
}
|
|
|
}
|
|
|
followupDao.delete(followupId);
|
|
|
followupDao.deleteById(followupId);
|
|
|
return followup;
|
|
|
// return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取随访详情
|
|
|
*
|
|
|
* @param followupId
|
|
|
* @return
|
|
|
*/
|
|
|
public Followup findFollowupInfo(Long followupId){
|
|
|
Followup followup = followupDao.findOne(followupId);
|
|
|
Patient patient = patientDao.findByCode(followup.getPatientCode());
|
|
|
public Followup findFollowupInfo(Long followupId) {
|
|
|
Followup followup = followupDao.findById(followupId).orElse(null);
|
|
|
BasePatientDO patient = patientDao.findById(followup.getPatientCode()).orElse(null);
|
|
|
followup.setPhoto(patient.getPhoto());
|
|
|
followup.setPatient(patient);
|
|
|
return followup;
|
|
@ -2091,27 +2121,28 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 随访签到
|
|
|
*
|
|
|
* @param jsonSign
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public Boolean saveFollowupSign(String jsonSign)throws Exception{
|
|
|
FollowupSign followupSign = objectMapper.readValue(jsonSign,FollowupSign.class);
|
|
|
List<FollowupSign> sign = followupSignDao.findByFollowupIdAndDel(followupSign.getFollowupId(),0);
|
|
|
if(sign!=null&&sign.size()>0){
|
|
|
public Boolean saveFollowupSign(String jsonSign) throws Exception {
|
|
|
FollowupSign followupSign = objectMapper.readValue(jsonSign, FollowupSign.class);
|
|
|
List<FollowupSign> sign = followupSignDao.findByFollowupIdAndDel(followupSign.getFollowupId(), 0);
|
|
|
if (sign != null && sign.size() > 0) {
|
|
|
//做更新操作
|
|
|
for(FollowupSign s:sign){
|
|
|
for (FollowupSign s : sign) {
|
|
|
s.setDel(1);
|
|
|
}
|
|
|
followupSignDao.save(sign);
|
|
|
}else{
|
|
|
followupSignDao.saveAll(sign);
|
|
|
} else {
|
|
|
//修改随访状态为进行中
|
|
|
Followup followup = followupDao.findOne(followupSign.getFollowupId());
|
|
|
Followup followup = followupDao.findById(followupSign.getFollowupId()).orElse(null);
|
|
|
followup.setStatus("3");
|
|
|
}
|
|
|
|
|
|
//新增更新随访状态
|
|
|
followupSign.setCode(getCode());
|
|
|
followupSign.setCode(UUID.randomUUID().toString().replaceAll("-", ""));
|
|
|
followupSign.setCreateTime(new Date());
|
|
|
followupSign.setDel(0);
|
|
|
followupSignDao.save(followupSign);
|
|
@ -2121,20 +2152,21 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 修改签到记录
|
|
|
*
|
|
|
* @param jsonSign
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public Boolean updateFollowupSign(String jsonSign)throws Exception{
|
|
|
public Boolean updateFollowupSign(String jsonSign) throws Exception {
|
|
|
//重新签到
|
|
|
FollowupSign followupSign = objectMapper.readValue(jsonSign,FollowupSign.class);
|
|
|
FollowupSign sign = followupSignDao.findOne(followupSign.getId());
|
|
|
FollowupSign followupSign = objectMapper.readValue(jsonSign, FollowupSign.class);
|
|
|
FollowupSign sign = followupSignDao.findById(followupSign.getId()).orElse(null);
|
|
|
sign.setDel(1);
|
|
|
followupSignDao.save(sign);
|
|
|
|
|
|
FollowupSign newSign = new FollowupSign();
|
|
|
|
|
|
newSign.setCode(getCode());
|
|
|
newSign.setCode(UUID.randomUUID().toString().replaceAll("-", ""));
|
|
|
newSign.setFollowupId(sign.getFollowupId());
|
|
|
newSign.setAddress(sign.getAddress());
|
|
|
newSign.setType(sign.getType());
|
|
@ -2152,25 +2184,26 @@ public class FollowUpService {
|
|
|
|
|
|
/**
|
|
|
* 门牌地址解析
|
|
|
*
|
|
|
* @param url
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String urlAnalysis(String url)throws Exception{
|
|
|
url.replace("http://www.fjadd.com/addr?","http://www.fjadd.com/shhyy/addr_list.jsp?showtp=1&system");
|
|
|
public String urlAnalysis(String url) throws Exception {
|
|
|
url.replace("http://www.fjadd.com/addr?", "http://www.fjadd.com/shhyy/addr_list.jsp?showtp=1&system");
|
|
|
Document doc = Jsoup.connect(url).get();
|
|
|
String html = doc.toString();
|
|
|
int start = html.indexOf("href=\"");
|
|
|
int end = html.indexOf("\"}");
|
|
|
|
|
|
int ed = url.indexOf("com");
|
|
|
String ym = url.substring(0,ed+3);
|
|
|
String path = html.substring(start+6,end);
|
|
|
String ym = url.substring(0, ed + 3);
|
|
|
String path = html.substring(start + 6, end);
|
|
|
|
|
|
Document d = Jsoup.connect(ym+path).get();
|
|
|
String address = d.select("div.dzksfd1_lz2").eq(0).text()+d.select("div.dzksfd1_lz2").eq(1).text();
|
|
|
Document d = Jsoup.connect(ym + path).get();
|
|
|
String address = d.select("div.dzksfd1_lz2").eq(0).text() + d.select("div.dzksfd1_lz2").eq(1).text();
|
|
|
|
|
|
logger.info("url:"+url+" path:"+ym+path+" adress:"+address);
|
|
|
logger.info("url:" + url + " path:" + ym + path + " adress:" + address);
|
|
|
return address;
|
|
|
}
|
|
|
|
|
@ -2179,88 +2212,89 @@ public class FollowUpService {
|
|
|
* @param followupId
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean updateFollowStatus(Long followupId,Integer isFlag)throws Exception{
|
|
|
Followup followup = followupDao.findOne(followupId);
|
|
|
followup.setStatus("1");
|
|
|
followupDao.save(followup);
|
|
|
BusinessMapping businessMapping = new BusinessMapping();
|
|
|
if (followup.getFollowupClass().equalsIgnoreCase("6")){
|
|
|
businessMapping.setBusinessType(1);
|
|
|
}else if (followup.getFollowupClass().equalsIgnoreCase("5")){
|
|
|
businessMapping.setBusinessType(2);
|
|
|
}else if (followup.getFollowupClass().equalsIgnoreCase("9")){
|
|
|
if (isFlag!=null){
|
|
|
if (isFlag==0){
|
|
|
businessMapping.setBusinessType(5);
|
|
|
}else if (isFlag==1){
|
|
|
businessMapping.setBusinessType(6);
|
|
|
}
|
|
|
}
|
|
|
}else if (followup.getFollowupClass().equalsIgnoreCase("8")){
|
|
|
businessMapping.setBusinessType(3);
|
|
|
businessMapping.setBusinessId(followupId);
|
|
|
businessMapping.setNeedUpload(1);
|
|
|
businessMapping.setCode(getCode());
|
|
|
businessMapping.setCreateTime(new Date());
|
|
|
businessMappingDao.save(businessMapping);
|
|
|
}else if (followup.getFollowupClass().equalsIgnoreCase("8")){
|
|
|
businessMapping.setBusinessType(4);
|
|
|
}
|
|
|
businessMapping.setBusinessId(followupId);
|
|
|
businessMapping.setNeedUpload(1);
|
|
|
businessMapping.setCode(getCode());
|
|
|
businessMapping.setCreateTime(new Date());
|
|
|
businessMappingDao.save(businessMapping);
|
|
|
return true;
|
|
|
}
|
|
|
// public Boolean updateFollowStatus(Long followupId,Integer isFlag)throws Exception{
|
|
|
// Followup followup = followupDao.findOne(followupId);
|
|
|
// followup.setStatus("1");
|
|
|
// followupDao.save(followup);
|
|
|
// BusinessMapping businessMapping = new BusinessMapping();
|
|
|
// if (followup.getFollowupClass().equalsIgnoreCase("6")){
|
|
|
// businessMapping.setBusinessType(1);
|
|
|
// }else if (followup.getFollowupClass().equalsIgnoreCase("5")){
|
|
|
// businessMapping.setBusinessType(2);
|
|
|
// }else if (followup.getFollowupClass().equalsIgnoreCase("9")){
|
|
|
// if (isFlag!=null){
|
|
|
// if (isFlag==0){
|
|
|
// businessMapping.setBusinessType(5);
|
|
|
// }else if (isFlag==1){
|
|
|
// businessMapping.setBusinessType(6);
|
|
|
// }
|
|
|
// }
|
|
|
// }else if (followup.getFollowupClass().equalsIgnoreCase("8")){
|
|
|
// businessMapping.setBusinessType(3);
|
|
|
// businessMapping.setBusinessId(followupId);
|
|
|
// businessMapping.setNeedUpload(1);
|
|
|
// businessMapping.setCode(getCode());
|
|
|
// businessMapping.setCreateTime(new Date());
|
|
|
// businessMappingDao.save(businessMapping);
|
|
|
// }else if (followup.getFollowupClass().equalsIgnoreCase("8")){
|
|
|
// businessMapping.setBusinessType(4);
|
|
|
// }
|
|
|
// businessMapping.setBusinessId(followupId);
|
|
|
// businessMapping.setNeedUpload(1);
|
|
|
// businessMapping.setCode(getCode());
|
|
|
// businessMapping.setCreateTime(new Date());
|
|
|
// businessMappingDao.save(businessMapping);
|
|
|
// return true;
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* 签到详细
|
|
|
*
|
|
|
* @param followupId
|
|
|
* @return
|
|
|
*/
|
|
|
public FollowupSign findByFollowupId(Long followupId){
|
|
|
List<FollowupSign> sign = followupSignDao.findByFollowupIdAndDel(followupId,0);
|
|
|
if(sign!=null&&sign.size()>0){
|
|
|
public FollowupSign findByFollowupId(Long followupId) {
|
|
|
List<FollowupSign> sign = followupSignDao.findByFollowupIdAndDel(followupId, 0);
|
|
|
if (sign != null && sign.size() > 0) {
|
|
|
return sign.get(0);
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
public List<Map<String,Object>> findPatientLabel(String patient){
|
|
|
String sql ="SELECT " +
|
|
|
public List<Map<String, Object>> findPatientLabel(String patient) {
|
|
|
String sql = "SELECT " +
|
|
|
" pl.label_code AS labelCode, " +
|
|
|
" pl.label_name AS labelName " +
|
|
|
" FROM " +
|
|
|
" wlyy_followup_label_patient pl " +
|
|
|
" WHERE " +
|
|
|
" pl.patient = '"+patient+"'";
|
|
|
List<Map<String,Object>> label = jdbcTemplate.queryForList(sql);
|
|
|
" pl.patient = '" + patient + "'";
|
|
|
List<Map<String, Object>> label = jdbcTemplate.queryForList(sql);
|
|
|
return label;
|
|
|
}
|
|
|
|
|
|
public Boolean isFirstTimeFollowup(String doctor,String patient,String followupClass,Integer followupId){
|
|
|
public Boolean isFirstTimeFollowup(String doctor, String patient, String followupClass, Integer followupId) {
|
|
|
//按时间升序取第一条
|
|
|
String sql =" SELECT " +
|
|
|
String sql = " SELECT " +
|
|
|
" f.id, " +
|
|
|
" f.create_time " +
|
|
|
" FROM " +
|
|
|
" wlyy_followup f " +
|
|
|
" WHERE " +
|
|
|
// " f.doctor_code = '"+doctor+"' AND " +
|
|
|
" f.patient_code = '"+patient+"' " +
|
|
|
" AND f.followup_class = '"+followupClass+"' and f.status != 0 " +
|
|
|
" f.patient_code = '" + patient + "' " +
|
|
|
" AND f.followup_class = '" + followupClass + "' and f.status != 0 " +
|
|
|
" ORDER BY " +
|
|
|
" f.followup_date " +
|
|
|
" ASC " +
|
|
|
" LIMIT 0,1";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
if(list!=null&&list.size()>0){
|
|
|
int id = (Integer)list.get(0).get("id");
|
|
|
if (list != null && list.size() > 0) {
|
|
|
int id = (Integer) list.get(0).get("id");
|
|
|
//如果与第一条的id不等,则非第一次
|
|
|
if(!(id==followupId)){
|
|
|
if (!(id == followupId)) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@ -2276,81 +2310,81 @@ public class FollowUpService {
|
|
|
/**
|
|
|
* ES获取表单项目数据
|
|
|
*/
|
|
|
public FollowupContentESDO esGetFollowupProjectDataList(String id, String followupProject) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
FollowupContentESDO followupContentESDO = null;
|
|
|
try {
|
|
|
//根据随访ID、分类ID获取随访记录详情
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
if(StringUtils.isNotBlank(followupProject)) {
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
.must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
);
|
|
|
}else {
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
.mustNot(QueryBuilders.existsQuery("followup_project"))
|
|
|
);
|
|
|
}
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
return followupContentESDO;
|
|
|
}
|
|
|
|
|
|
public void delFollowupProjectData(String followuoId,String followupProject,String all){
|
|
|
JestClient jestClient = null;
|
|
|
try {
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", followuoId))
|
|
|
.must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
if("1".equals(all)){
|
|
|
List<FollowupContentESDO> followupContentESDOS = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
if(followupContentESDOS != null){
|
|
|
dataList.addAll(followupContentESDOS);
|
|
|
//删除原有记录
|
|
|
this.esDeleteFollowUpContent(dataList);
|
|
|
}
|
|
|
}else {
|
|
|
FollowupContentESDO followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
if(followupContentESDO != null){
|
|
|
dataList.add(followupContentESDO);
|
|
|
//删除原有记录
|
|
|
this.esDeleteFollowUpContent(dataList);
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// public FollowupContentESDO esGetFollowupProjectDataList(String id, String followupProject) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// FollowupContentESDO followupContentESDO = null;
|
|
|
// try {
|
|
|
// //根据随访ID、分类ID获取随访记录详情
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// if(StringUtils.isNotBlank(followupProject)) {
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// .must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
// );
|
|
|
// }else {
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// .mustNot(QueryBuilders.existsQuery("followup_project"))
|
|
|
// );
|
|
|
// }
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
// followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// return followupContentESDO;
|
|
|
// }
|
|
|
|
|
|
// public void delFollowupProjectData(String followuoId,String followupProject,String all){
|
|
|
// JestClient jestClient = null;
|
|
|
// try {
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", followuoId))
|
|
|
// .must(QueryBuilders.matchQuery("followup_project", followupProject))
|
|
|
//
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
// if("1".equals(all)){
|
|
|
// List<FollowupContentESDO> followupContentESDOS = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
// List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
// if(followupContentESDOS != null){
|
|
|
// dataList.addAll(followupContentESDOS);
|
|
|
// //删除原有记录
|
|
|
// this.esDeleteFollowUpContent(dataList);
|
|
|
// }
|
|
|
// }else {
|
|
|
// FollowupContentESDO followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
|
|
|
// List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
// if(followupContentESDO != null){
|
|
|
// dataList.add(followupContentESDO);
|
|
|
// //删除原有记录
|
|
|
// this.esDeleteFollowUpContent(dataList);
|
|
|
// }
|
|
|
// }
|
|
|
// }catch (Exception e){
|
|
|
// e.printStackTrace();
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* ES 保存随访记录详情
|
|
@ -2358,1413 +2392,1464 @@ public class FollowUpService {
|
|
|
* @author huangwenjie
|
|
|
* @date 2017/11/1 14:57
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void saveAllFollowupProjectData(String id, String followupProjectData) throws Exception {
|
|
|
JestClient jestClient = null;
|
|
|
try {
|
|
|
|
|
|
|
|
|
jestClient = elasticFactory.getJestClient();
|
|
|
//先根据条件查找出来
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
searchSourceBuilder.query(
|
|
|
new BoolQueryBuilder()
|
|
|
.must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
);
|
|
|
|
|
|
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
.build();
|
|
|
SearchResult result = jestClient.execute(search);
|
|
|
List<FollowupContentESDO> followupContentESDOS = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
|
|
|
List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
if(followupContentESDOS != null){
|
|
|
dataList.addAll(followupContentESDOS);
|
|
|
//删除原有记录
|
|
|
this.esDeleteFollowUpContent(dataList);
|
|
|
}
|
|
|
|
|
|
//保存新的随访详情信息
|
|
|
List<FollowupContentESDO> newdatalist = new ArrayList<>();
|
|
|
FollowupContentESDO followupContentESDO = new FollowupContentESDO();
|
|
|
followupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
|
|
|
followupContentESDO.setFollowup_id(id);
|
|
|
followupContentESDO.setCreate_time(new Date());
|
|
|
newdatalist.add(followupContentESDO);
|
|
|
elastricSearchSave.save(newdatalist, esIndex, esType);
|
|
|
|
|
|
|
|
|
//如果该随访是已完成的,则添加随访信息上传映射,上传到基卫
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
if ("1".equals(followup.getStatus())) {
|
|
|
FollowupMapping followupMapping = followUpMappingDao.findByFollowupId(Integer.parseInt(id));
|
|
|
if (followupMapping == null) {
|
|
|
followupMapping = new FollowupMapping();
|
|
|
followupMapping.setCode(UUID.randomUUID().toString());
|
|
|
followupMapping.setFollowupId(Integer.parseInt(id));
|
|
|
followupMapping.setUpdateTime(DateUtil.getNowTimestamp());
|
|
|
followupMapping.setCreateTime(DateUtil.getNowTimestamp());
|
|
|
}
|
|
|
followupMapping.setNeedUpload(1);
|
|
|
followUpMappingDao.save(followupMapping);
|
|
|
}
|
|
|
|
|
|
} finally {
|
|
|
if (jestClient != null) {
|
|
|
jestClient.shutdownClient();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public File writeWordFile(List<Long> orderId, HttpServletResponse response) throws Exception {
|
|
|
String zipFileName = "入户访视详情";
|
|
|
long time = System.currentTimeMillis();
|
|
|
String exportConclusionList = time+"exportList";
|
|
|
String path = this.getClass().getResource("/").getPath() + exportConclusionList;
|
|
|
File file = new File(path);
|
|
|
// 删除文件夹、文件
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
System.out.println("创建文件夹时间:"+sdf.format(new Date()));
|
|
|
if (file.exists()) {
|
|
|
if (file != null){
|
|
|
DoorOrderService.deleteFolder(file);
|
|
|
file.mkdir();
|
|
|
}else {
|
|
|
file.delete();
|
|
|
file.mkdir();
|
|
|
}
|
|
|
}else {
|
|
|
file.mkdir();
|
|
|
}
|
|
|
int j =1;
|
|
|
long doorStart = System.currentTimeMillis();
|
|
|
long feeDetailStart = System.currentTimeMillis();
|
|
|
long feeDetailEnd = System.currentTimeMillis();
|
|
|
|
|
|
System.out.println("feeDetail用时:"+(feeDetailEnd-feeDetailStart)/1000);
|
|
|
System.out.println("开始生成Word:"+sdf.format(new Date()));
|
|
|
for (int i = 0; i < orderId.size(); i++) {
|
|
|
try {
|
|
|
Long followId = orderId.get(i);
|
|
|
Followup followup = followupDao.findOne(followId);
|
|
|
if (null==followup){
|
|
|
continue;
|
|
|
}
|
|
|
if (!"8".equals(followup.getFollowupClass())){
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
String fileName = "入户访视详情_"+followup.getPatientName()+"_"+followId+".doc";;
|
|
|
j = j + 1;
|
|
|
// fileName = URLEncoder.encode(fileName, "utf-8");
|
|
|
fileName = java.net.URLEncoder.encode(fileName,"UTF-8");
|
|
|
fileName = java.net.URLDecoder.decode(fileName,"UTF-8");
|
|
|
// response.setHeader("Content-Disposition", "attachment;filename=" + new String( fileName.getBytes(), "iso-8859-1"));
|
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
|
String pathName = this.getClass().getResource("/").getPath() + "health_examination.mht";
|
|
|
Document doc = Jsoup.parse(new File(pathName), "UTF-8");
|
|
|
String html = this.handleHealthExamData(doc, orderId.get(i),followup);
|
|
|
if (StringUtils.isNotBlank(html)){
|
|
|
BufferedWriter bw = new BufferedWriter(new FileWriter(path+"/"+fileName));//创建的文件
|
|
|
bw.write(html);
|
|
|
bw.close();
|
|
|
File zipFile = new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
|
|
|
if (zipFile.exists()) {
|
|
|
zipFile.delete();
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
System.out.println("Word生成结束:"+sdf.format(new Date()));
|
|
|
// 打包文件夹
|
|
|
if (FileUtil.fileToZip(path, path.replace(exportConclusionList, ""), zipFileName)) {
|
|
|
return new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
|
|
|
} else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public String handleHealthExamData(Document doc, Long orderId, Followup followup) throws Exception {
|
|
|
String html = doc.toString();
|
|
|
//根据随访ID获取随访记录详情
|
|
|
OlderPeopleHealthCheckRecordES olderPeopleHealthCheckRecord = visitDetailService.getOlderPeopleHealthCheckRecord(orderId+"",null);
|
|
|
if (null==olderPeopleHealthCheckRecord){
|
|
|
return null;
|
|
|
}
|
|
|
html = html.replace("${patientName}", null==olderPeopleHealthCheckRecord.getName()?"":olderPeopleHealthCheckRecord.getName());
|
|
|
html = html.replace("${idcard}", null==olderPeopleHealthCheckRecord.getIdcard()?"":olderPeopleHealthCheckRecord.getIdcard());
|
|
|
html = html.replace("${number}", null==olderPeopleHealthCheckRecord.getNumber()?"":olderPeopleHealthCheckRecord.getNumber());
|
|
|
html = html.replace("${duty}", null==olderPeopleHealthCheckRecord.getDuty()?" ":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getDuty()));
|
|
|
html = html.replace("${responsibility_doctor_name}",olderPeopleHealthCheckRecord.getResponsibility_doctor_name());
|
|
|
if (null==olderPeopleHealthCheckRecord.getSymptom()){
|
|
|
html = html.replace("${symptom}"," ");
|
|
|
}else {
|
|
|
StringBuilder symptomName = new StringBuilder();
|
|
|
String symptom = olderPeopleHealthCheckRecord.getSymptom();
|
|
|
String[] symptoms = symptom.split(",");
|
|
|
for (String tmp:symptoms){
|
|
|
symptomName.append(getSymptomName(tmp));
|
|
|
}
|
|
|
html = html.replace("${symptom}",symptomName.toString());
|
|
|
}
|
|
|
html = html.replace("${symptom_other}",olderPeopleHealthCheckRecord.getSymptom_other());
|
|
|
/**一般状况**/
|
|
|
html = html.replace("${temperature}",null==olderPeopleHealthCheckRecord.getTemperature()?" ":olderPeopleHealthCheckRecord.getTemperature()+"");
|
|
|
html = html.replace("${pulse_frequency}",olderPeopleHealthCheckRecord.getPulse_frequency());
|
|
|
html = html.replace("${breath_frequency}",olderPeopleHealthCheckRecord.getBreath_frequency());
|
|
|
html = html.replace("${blood_pressure_left_low}",null==olderPeopleHealthCheckRecord.getBlood_pressure_left_low()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_left_low()+"");
|
|
|
html = html.replace("${blood_pressure_left_high}",null==olderPeopleHealthCheckRecord.getBlood_pressure_left_high()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_left_high()+"");
|
|
|
html = html.replace("${blood_pressure_right_low}",null==olderPeopleHealthCheckRecord.getBlood_pressure_right_low()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_right_low()+"");
|
|
|
html = html.replace("${blood_pressure_right_high}",null==olderPeopleHealthCheckRecord.getBlood_pressure_right_high()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_right_high()+"");
|
|
|
html = html.replace("${height}",null==olderPeopleHealthCheckRecord.getHeight()?" ":olderPeopleHealthCheckRecord.getHeight()+"");
|
|
|
html = html.replace("${weight}",null==olderPeopleHealthCheckRecord.getWeight()?" ":olderPeopleHealthCheckRecord.getWeight()+"");
|
|
|
html = html.replace("${waistline}",null==olderPeopleHealthCheckRecord.getWaistline()?" ":olderPeopleHealthCheckRecord.getWaistline()+"");
|
|
|
html = html.replace("${BMI}",null==olderPeopleHealthCheckRecord.getBMI()?" ":olderPeopleHealthCheckRecord.getBMI()+"");
|
|
|
if (null==olderPeopleHealthCheckRecord.getHealth_status()){
|
|
|
html = html.replace("${health_status}"," ");
|
|
|
}else {
|
|
|
Integer health_status = olderPeopleHealthCheckRecord.getHealth_status();
|
|
|
switch (health_status){
|
|
|
case 1:html = html.replace("${health_status}","满意");break;
|
|
|
case 2:html = html.replace("${health_status}","基本满意");break;
|
|
|
case 3:html = html.replace("${health_status}","说不清");break;
|
|
|
case 4:html = html.replace("${health_status}","不太满意");break;
|
|
|
case 5:html = html.replace("${health_status}","不满意");break;
|
|
|
default:html = html.replace("${health_status}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getSelfcare_ability()){
|
|
|
html = html.replace("${selfcare_ability}"," ");
|
|
|
}else {
|
|
|
Integer selfcare_ability = olderPeopleHealthCheckRecord.getSelfcare_ability();
|
|
|
switch (selfcare_ability){
|
|
|
case 1:html = html.replace("${selfcare_ability}","可自理(0~3)分");break;
|
|
|
case 2:html = html.replace("${selfcare_ability}","轻度依赖(4~8)分");break;
|
|
|
case 3:html = html.replace("${selfcare_ability}","中度依赖(9~18)分");break;
|
|
|
case 4:html = html.replace("${selfcare_ability}","不能自理(≥19)分");break;
|
|
|
default:html = html.replace("${selfcare_ability}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getCognitive_function()){
|
|
|
html = html.replace("${cognitive_function}"," ");
|
|
|
}else {
|
|
|
Integer cognitiveFunction = olderPeopleHealthCheckRecord.getCognitive_function();
|
|
|
switch (cognitiveFunction){
|
|
|
case 1:html = html.replace("${cognitive_function}","粗筛阴性");break;
|
|
|
case 2:html = html.replace("${cognitive_function}","粗筛阳性");break;
|
|
|
default:html = html.replace("${cognitive_function}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${cognitive_function_score}",null==olderPeopleHealthCheckRecord.getCognitive_function_score()?" ":olderPeopleHealthCheckRecord.getCognitive_function_score()+"");
|
|
|
if (null==olderPeopleHealthCheckRecord.getEmotional_state()){
|
|
|
html = html.replace("${emotional_state}"," ");
|
|
|
}else {
|
|
|
Integer emotionalState = olderPeopleHealthCheckRecord.getEmotional_state();
|
|
|
switch (emotionalState){
|
|
|
case 1:html = html.replace("${emotional_state}","粗筛阴性");break;
|
|
|
case 2:html = html.replace("${emotional_state}","粗筛阳性");break;
|
|
|
default:html = html.replace("${emotional_state}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${emotional_state_score}",null==olderPeopleHealthCheckRecord.getEmotional_state_score()?" ":olderPeopleHealthCheckRecord.getEmotional_state_score()+"");
|
|
|
/**体育锻炼**/
|
|
|
if (null==olderPeopleHealthCheckRecord.getExercise_frequency()){
|
|
|
html = html.replace("${exercise_frequency}"," ");
|
|
|
}else {
|
|
|
Integer exerciseFrequency = olderPeopleHealthCheckRecord.getExercise_frequency();
|
|
|
switch (exerciseFrequency){
|
|
|
case 1:html = html.replace("${exercise_frequency}","每天");break;
|
|
|
case 2:html = html.replace("${exercise_frequency}","每周一次以上");break;
|
|
|
case 3:html = html.replace("${exercise_frequency}","偶尔");break;
|
|
|
case 4:html = html.replace("${exercise_frequency}","不锻炼");break;
|
|
|
default:html = html.replace("${exercise_frequency}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${exercise_time}",null==olderPeopleHealthCheckRecord.getExercise_time()?" ":olderPeopleHealthCheckRecord.getExercise_time()+"");
|
|
|
html = html.replace("${sustain_exercise_time}",null==olderPeopleHealthCheckRecord.getSustain_exercise_time()?" ":olderPeopleHealthCheckRecord.getSustain_exercise_time()+"");
|
|
|
html = html.replace("${exercise_type}",null==olderPeopleHealthCheckRecord.getExercise_type()?" ":olderPeopleHealthCheckRecord.getExercise_type()+"");
|
|
|
/**饮食习惯**/
|
|
|
if (null==olderPeopleHealthCheckRecord.getDietary_habit()){
|
|
|
html = html.replace("${dietary_habit}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getDietary_habit();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="荤素均衡 ";break;
|
|
|
case "2":valueStrTmp+="荤食为主 ";break;
|
|
|
case "3":valueStrTmp+="素食为主 ";break;
|
|
|
case "4":valueStrTmp+="嗜盐 ";break;
|
|
|
case "5":valueStrTmp+="嗜油 ";break;
|
|
|
case "6":valueStrTmp+="嗜糖 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${dietary_habit}",valueStrTmp);
|
|
|
}
|
|
|
|
|
|
/**吸烟情况**/
|
|
|
if (null==olderPeopleHealthCheckRecord.getSmoking_state()){
|
|
|
html = html.replace("${smoking_state}"," ");
|
|
|
}else {
|
|
|
Integer smokingState = olderPeopleHealthCheckRecord.getSmoking_state();
|
|
|
switch (smokingState){
|
|
|
case 1:html = html.replace("${smoking_state}","从不吸烟");break;
|
|
|
case 2:html = html.replace("${smoking_state}","已戒烟");break;
|
|
|
case 3:html = html.replace("${smoking_state}","吸烟");break;
|
|
|
default:html = html.replace("${smoking_state}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${smoking_daily}",null==olderPeopleHealthCheckRecord.getSmoking_daily()?" ":olderPeopleHealthCheckRecord.getSmoking_daily()+"");
|
|
|
html = html.replace("${start_smoking_age}",null==olderPeopleHealthCheckRecord.getStart_smoking_age()?" ":olderPeopleHealthCheckRecord.getStart_smoking_age()+"");
|
|
|
html = html.replace("${stop_smoking_age}",null==olderPeopleHealthCheckRecord.getStop_smoking_age()?" ":olderPeopleHealthCheckRecord.getStop_smoking_age()+"");
|
|
|
/**饮酒情况**/
|
|
|
if (null==olderPeopleHealthCheckRecord.getDrinking_frequency()){
|
|
|
html = html.replace("${drinking_frequency}"," ");
|
|
|
}else {
|
|
|
Integer drinkingFrequency = olderPeopleHealthCheckRecord.getDrinking_frequency();
|
|
|
switch (drinkingFrequency){
|
|
|
case 1:html = html.replace("${drinking_frequency}","从不");break;
|
|
|
case 2:html = html.replace("${drinking_frequency}","偶尔");break;
|
|
|
case 3:html = html.replace("${drinking_frequency}","经常");break;
|
|
|
case 4:html = html.replace("${drinking_frequency}","每天");break;
|
|
|
default:html = html.replace("${drinking_frequency}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${drinking_daily}",null==olderPeopleHealthCheckRecord.getDrinking_daily()?" ":olderPeopleHealthCheckRecord.getDrinking_daily()+"");
|
|
|
|
|
|
if (null==olderPeopleHealthCheckRecord.getIs_stop_drinking()){
|
|
|
html = html.replace("${is_stop_drinking}"," ");
|
|
|
}else {
|
|
|
Integer isStopDrinking = olderPeopleHealthCheckRecord.getIs_stop_drinking();
|
|
|
switch (isStopDrinking){
|
|
|
case 1:html = html.replace("${is_stop_drinking}","否");break;
|
|
|
case 2:html = html.replace("${is_stop_drinking}","是");break;
|
|
|
default:html = html.replace("${is_stop_drinking}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${stop_drinking_age}",null==olderPeopleHealthCheckRecord.getStop_drinking_age()?" ":olderPeopleHealthCheckRecord.getStop_drinking_age()+"");
|
|
|
html = html.replace("${start_drinking_age}",null==olderPeopleHealthCheckRecord.getStart_drinking_age()?" ":olderPeopleHealthCheckRecord.getStart_drinking_age()+"");
|
|
|
if (null==olderPeopleHealthCheckRecord.getDrunkenness()){
|
|
|
html = html.replace("${drunkenness}"," ");
|
|
|
}else {
|
|
|
Integer drunkenness = olderPeopleHealthCheckRecord.getDrunkenness();
|
|
|
switch (drunkenness){
|
|
|
case 1:html = html.replace("${drunkenness}","是");break;
|
|
|
case 2:html = html.replace("${drunkenness}","否");break;
|
|
|
default:html = html.replace("${drunkenness}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getDrinking_type()){
|
|
|
html = html.replace("${drinking_type}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getDrinking_type();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="白酒 ";break;
|
|
|
case "2":valueStrTmp+="啤酒 ";break;
|
|
|
case "3":valueStrTmp+="红酒 ";break;
|
|
|
case "4":valueStrTmp+="黄酒 ";break;
|
|
|
case "5":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${drinking_type}",valueStrTmp);
|
|
|
}
|
|
|
html = html.replace("${other_drinking_type}",null==olderPeopleHealthCheckRecord.getOther_drinking_type()?" ":olderPeopleHealthCheckRecord.getOther_drinking_type());
|
|
|
/**职业病危害因素接触史**/
|
|
|
html = html.replace("${dust}",null==olderPeopleHealthCheckRecord.getDust()?" ":olderPeopleHealthCheckRecord.getDust());
|
|
|
if (null==olderPeopleHealthCheckRecord.getDust_protective_measures()){
|
|
|
html = html.replace("${dust_protective_measures}"," ");
|
|
|
}else {
|
|
|
Integer dustProtectiveMeasures = olderPeopleHealthCheckRecord.getDust_protective_measures();
|
|
|
switch (dustProtectiveMeasures){
|
|
|
case 1:html = html.replace("${dust_protective_measures}","无");break;
|
|
|
case 2:html = html.replace("${dust_protective_measures}","有");break;
|
|
|
default:html = html.replace("${dust_protective_measures}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${dust_protective_measures_has}",null==olderPeopleHealthCheckRecord.getDust_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getDust_protective_measures_has());
|
|
|
html = html.replace("${radiogen}",null==olderPeopleHealthCheckRecord.getRadiogen()?" ":olderPeopleHealthCheckRecord.getRadiogen());
|
|
|
if (null==olderPeopleHealthCheckRecord.getRadiogen_protective_measures()){
|
|
|
html = html.replace("${radiogen_protective_measures}"," ");
|
|
|
}else {
|
|
|
Integer radiogenProtectiveMeasures = olderPeopleHealthCheckRecord.getRadiogen_protective_measures();
|
|
|
switch (radiogenProtectiveMeasures){
|
|
|
case 1:html = html.replace("${radiogen_protective_measures}","无");break;
|
|
|
case 2:html = html.replace("${radiogen_protective_measures}","有");break;
|
|
|
default:html = html.replace("${radiogen_protective_measures}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${radiogen_protective_measures_has}",null==olderPeopleHealthCheckRecord.getRadiogen_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getRadiogen_protective_measures_has());
|
|
|
html = html.replace("${physical_factor}",null==olderPeopleHealthCheckRecord.getPhysical_factor()?" ":olderPeopleHealthCheckRecord.getPhysical_factor());
|
|
|
if (null==olderPeopleHealthCheckRecord.getPhysical_protective_measures()){
|
|
|
html = html.replace("${physical_protective_measures}"," ");
|
|
|
}else {
|
|
|
Integer physicalProtectiveMeasures = olderPeopleHealthCheckRecord.getPhysical_protective_measures();
|
|
|
switch (physicalProtectiveMeasures){
|
|
|
case 1:html = html.replace("${physical_protective_measures}","无");break;
|
|
|
case 2:html = html.replace("${physical_protective_measures}","有");break;
|
|
|
default:html = html.replace("${physical_protective_measures}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${physical_protective_measures_has}",null==olderPeopleHealthCheckRecord.getPhysical_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getPhysical_protective_measures_has());
|
|
|
html = html.replace("${chemical_factor}",null==olderPeopleHealthCheckRecord.getChemical_factor()?" ":olderPeopleHealthCheckRecord.getChemical_factor());
|
|
|
if (null==olderPeopleHealthCheckRecord.getChemical_protective_measures()){
|
|
|
html = html.replace("${chemical_protective_measures}"," ");
|
|
|
}else {
|
|
|
Integer chemicalProtectiveMeasures = olderPeopleHealthCheckRecord.getChemical_protective_measures();
|
|
|
switch (chemicalProtectiveMeasures){
|
|
|
case 1:html = html.replace("${chemical_protective_measures}","无");break;
|
|
|
case 2:html = html.replace("${chemical_protective_measures}","有");break;
|
|
|
default:html = html.replace("${chemical_protective_measures}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${chemical_protective_measures_has}",null==olderPeopleHealthCheckRecord.getChemical_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getChemical_protective_measures_has());
|
|
|
html = html.replace("${physical_protective_measures_has}",null==olderPeopleHealthCheckRecord.getPhysical_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getPhysical_protective_measures_has());
|
|
|
html = html.replace("${other_hazard_factors}",null==olderPeopleHealthCheckRecord.getOther_hazard_factors()?" ":olderPeopleHealthCheckRecord.getOther_hazard_factors());
|
|
|
if (null==olderPeopleHealthCheckRecord.getOther_hazard_protective_measures()){
|
|
|
html = html.replace("${other_hazard_protective_measures}"," ");
|
|
|
}else {
|
|
|
Integer other_hazard_protective_measures = olderPeopleHealthCheckRecord.getOther_hazard_protective_measures();
|
|
|
switch (other_hazard_protective_measures){
|
|
|
case 1:html = html.replace("${other_hazard_protective_measures}","无");break;
|
|
|
case 2:html = html.replace("${other_hazard_protective_measures}","有");break;
|
|
|
default:html = html.replace("${other_hazard_protective_measures}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${other_hazard_protective_measures_has}",null==olderPeopleHealthCheckRecord.getOther_hazard_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getOther_hazard_protective_measures_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getLip()){
|
|
|
html = html.replace("${lip}"," ");
|
|
|
}else {
|
|
|
Integer lip = olderPeopleHealthCheckRecord.getLip();
|
|
|
switch (lip){
|
|
|
case 1:html = html.replace("${lip}","红润");break;
|
|
|
case 2:html = html.replace("${lip}","苍白");break;
|
|
|
case 3:html = html.replace("${lip}","发钳");break;
|
|
|
case 4:html = html.replace("${lip}","皲裂");break;
|
|
|
case 5:html = html.replace("${lip}","疱疹");break;
|
|
|
default:html = html.replace("${lip}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getDentition()){
|
|
|
html = html.replace("${dentition}"," ");
|
|
|
}else {
|
|
|
Integer dentition = olderPeopleHealthCheckRecord.getDentition();
|
|
|
switch (dentition){
|
|
|
case 1:html = html.replace("${dentition}","正常");break;
|
|
|
case 2:html = html.replace("${dentition}","缺齿");break;
|
|
|
case 3:html = html.replace("${dentition}","龋齿");break;
|
|
|
case 4:html = html.replace("${dentition}","义齿,假牙");break;
|
|
|
default:html = html.replace("${dentition}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getOropharynx()){
|
|
|
html = html.replace("${oropharynx}"," ");
|
|
|
}else {
|
|
|
Integer oropharynx = olderPeopleHealthCheckRecord.getOropharynx();
|
|
|
switch (oropharynx){
|
|
|
case 1:html = html.replace("${oropharynx}","无充血");break;
|
|
|
case 2:html = html.replace("${oropharynx}","充血");break;
|
|
|
case 3:html = html.replace("${oropharynx}","淋巴滤泡增生");break;
|
|
|
default:html = html.replace("${oropharynx}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${left_eyesight}",null==olderPeopleHealthCheckRecord.getLeft_eyesight()?"":olderPeopleHealthCheckRecord.getLeft_eyesight()+"");
|
|
|
html = html.replace("${right_eyesight}",null==olderPeopleHealthCheckRecord.getRight_eyesight()?"":olderPeopleHealthCheckRecord.getRight_eyesight()+"");
|
|
|
html = html.replace("${left_correctional_eyesight}",null==olderPeopleHealthCheckRecord.getLeft_correctional_eyesight()?"":olderPeopleHealthCheckRecord.getLeft_correctional_eyesight()+"");
|
|
|
html = html.replace("${right_correctional_eyesight}",null==olderPeopleHealthCheckRecord.getRight_correctional_eyesight()?"":olderPeopleHealthCheckRecord.getRight_correctional_eyesight()+"");
|
|
|
if (null==olderPeopleHealthCheckRecord.getHearing()){
|
|
|
html = html.replace("${hearing}"," ");
|
|
|
}else {
|
|
|
Integer hearing = olderPeopleHealthCheckRecord.getHearing();
|
|
|
switch (hearing){
|
|
|
case 1:html = html.replace("${hearing}","听见");break;
|
|
|
case 2:html = html.replace("${hearing}","听不清或无法听见");break;
|
|
|
default:html = html.replace("${hearing}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getMotor_function()){
|
|
|
html = html.replace("${motor_function}"," ");
|
|
|
}else {
|
|
|
Integer motor_function = olderPeopleHealthCheckRecord.getMotor_function();
|
|
|
switch (motor_function){
|
|
|
case 1:html = html.replace("${motor_function}","可顺利完成");break;
|
|
|
case 2:html = html.replace("${motor_function}","无法独立完成任何一个动作");break;
|
|
|
default:html = html.replace("${motor_function}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getFundus()){
|
|
|
html = html.replace("${fundus}"," ");
|
|
|
}else {
|
|
|
Integer function = olderPeopleHealthCheckRecord.getFundus();
|
|
|
switch (function){
|
|
|
case 1:html = html.replace("${fundus}","正常");break;
|
|
|
case 2:html = html.replace("${fundus}","异常");break;
|
|
|
default:html = html.replace("${fundus}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${fundus_abnormal}",null==olderPeopleHealthCheckRecord.getFundus_abnormal()?"":olderPeopleHealthCheckRecord.getFundus_abnormal());
|
|
|
if (null==olderPeopleHealthCheckRecord.getSkin()){
|
|
|
html = html.replace("${skin}"," ");
|
|
|
}else {
|
|
|
Integer skin = olderPeopleHealthCheckRecord.getSkin();
|
|
|
switch (skin){
|
|
|
case 1:html = html.replace("${skin}","正常");break;
|
|
|
case 2:html = html.replace("${skin}","潮红");break;
|
|
|
case 3:html = html.replace("${skin}","苍白");break;
|
|
|
case 4:html = html.replace("${skin}","发钳");break;
|
|
|
case 5:html = html.replace("${skin}","黄染");break;
|
|
|
case 6:html = html.replace("${skin}","色素沉着");break;
|
|
|
case 7:html = html.replace("${skin}","其他");break;
|
|
|
default:html = html.replace("${skin}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${skin_other}",null==olderPeopleHealthCheckRecord.getSkin_other()?"":olderPeopleHealthCheckRecord.getSkin_other());
|
|
|
if (null==olderPeopleHealthCheckRecord.getSclera()){
|
|
|
html = html.replace("${sclera}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getSclera();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${sclera}","正常");break;
|
|
|
case 2:html = html.replace("${sclera}","黄染");break;
|
|
|
case 3:html = html.replace("${sclera}","充血");break;
|
|
|
case 4:html = html.replace("${sclera}","其他");break;
|
|
|
default:html = html.replace("${sclera}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${sclera_other}",null==olderPeopleHealthCheckRecord.getSclera_other()?"":olderPeopleHealthCheckRecord.getSclera_other());
|
|
|
if (null==olderPeopleHealthCheckRecord.getLymphaden()){
|
|
|
html = html.replace("${lymphaden}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getLymphaden();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${lymphaden}","未触及");break;
|
|
|
case 2:html = html.replace("${lymphaden}","锁骨上");break;
|
|
|
case 3:html = html.replace("${lymphaden}","腋窝");break;
|
|
|
case 4:html = html.replace("${lymphaden}","其他");break;
|
|
|
default:html = html.replace("${lymphaden}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${lymphaden_other}",null==olderPeopleHealthCheckRecord.getLymphaden_other()?"":olderPeopleHealthCheckRecord.getLymphaden_other());
|
|
|
if (null==olderPeopleHealthCheckRecord.getBarrel_chest()){
|
|
|
html = html.replace("${barrel_chest}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getBarrel_chest();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${barrel_chest}","否");break;
|
|
|
case 2:html = html.replace("${barrel_chest}","是");break;
|
|
|
default:html = html.replace("${barrel_chest}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getBreath_sounds()){
|
|
|
html = html.replace("${breath_sounds}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getBreath_sounds();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${breath_sounds}","正常");break;
|
|
|
case 2:html = html.replace("${breath_sounds}","异常");break;
|
|
|
default:html = html.replace("${breath_sounds}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${breath_sounds_abnormal}",null==olderPeopleHealthCheckRecord.getBreath_sounds_abnormal()?"":olderPeopleHealthCheckRecord.getBreath_sounds_abnormal());
|
|
|
if (null==olderPeopleHealthCheckRecord.getRale()){
|
|
|
html = html.replace("${rale}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getRale();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${rale}","无");break;
|
|
|
case 2:html = html.replace("${rale}","干罗音");break;
|
|
|
case 3:html = html.replace("${rale}","湿罗音");break;
|
|
|
case 4:html = html.replace("${rale}","其他");break;
|
|
|
default:html = html.replace("${rale}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${rale_abnormal}",null==olderPeopleHealthCheckRecord.getRale_abnormal()?"":olderPeopleHealthCheckRecord.getRale_abnormal());
|
|
|
html = html.replace("${heart_rate}",null==olderPeopleHealthCheckRecord.getHeart_rate()?"":olderPeopleHealthCheckRecord.getHeart_rate()+"");
|
|
|
if (null==olderPeopleHealthCheckRecord.getHeart_rhythm()){
|
|
|
html = html.replace("${heart_rhythm}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getHeart_rhythm();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${heart_rhythm}","齐");break;
|
|
|
case 2:html = html.replace("${heart_rhythm}","不齐");break;
|
|
|
case 3:html = html.replace("${heart_rhythm}","绝对不齐");break;
|
|
|
default:html = html.replace("${heart_rhythm}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getHeart_noise()){
|
|
|
html = html.replace("${heart_noise}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getHeart_noise();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${heart_noise}","无");break;
|
|
|
case 2:html = html.replace("${heart_noise}","有");break;
|
|
|
default:html = html.replace("${heart_noise}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${heart_noise_has}",null==olderPeopleHealthCheckRecord.getHeart_noise_has()?"":olderPeopleHealthCheckRecord.getHeart_noise_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getAbdominal_tenderness()){
|
|
|
html = html.replace("${abdominal_tenderness}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_tenderness();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${abdominal_tenderness}","无");break;
|
|
|
case 2:html = html.replace("${abdominal_tenderness}","有");break;
|
|
|
default:html = html.replace("${abdominal_tenderness}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${tenderness_has}",null==olderPeopleHealthCheckRecord.getTenderness_has()?"":olderPeopleHealthCheckRecord.getTenderness_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getAbdominal_mass()){
|
|
|
html = html.replace("${abdominal_mass}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_mass();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${abdominal_mass}","无");break;
|
|
|
case 2:html = html.replace("${abdominal_mass}","有");break;
|
|
|
default:html = html.replace("${abdominal_mass}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${mass_has}",null==olderPeopleHealthCheckRecord.getMass_has()?"":olderPeopleHealthCheckRecord.getMass_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getAbdominal_hepatomegaly()){
|
|
|
html = html.replace("${abdominal_hepatomegaly}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_hepatomegaly();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${abdominal_hepatomegaly}","无");break;
|
|
|
case 2:html = html.replace("${abdominal_hepatomegaly}","有");break;
|
|
|
default:html = html.replace("${abdominal_hepatomegaly}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${hepatomegaly_has}",null==olderPeopleHealthCheckRecord.getHepatomegaly_has()?"":olderPeopleHealthCheckRecord.getHepatomegaly_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getAbdominal_spleen_big()){
|
|
|
html = html.replace("${abdominal_spleen_big}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_spleen_big();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${abdominal_spleen_big}","无");break;
|
|
|
case 2:html = html.replace("${abdominal_spleen_big}","有");break;
|
|
|
default:html = html.replace("${abdominal_spleen_big}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${spleen_big_has}",null==olderPeopleHealthCheckRecord.getSpleen_big_has()?"":olderPeopleHealthCheckRecord.getSpleen_big_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getAbdominal_shifting_dullness()){
|
|
|
html = html.replace("${abdominal_shifting_dullness}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_shifting_dullness();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${abdominal_shifting_dullness}","无");break;
|
|
|
case 2:html = html.replace("${abdominal_shifting_dullness}","有");break;
|
|
|
default:html = html.replace("${abdominal_shifting_dullness}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${shifting_dullness_has}",null==olderPeopleHealthCheckRecord.getShifting_dullness_has()?"":olderPeopleHealthCheckRecord.getShifting_dullness_has());
|
|
|
if (null==olderPeopleHealthCheckRecord.getCrura_edema()){
|
|
|
html = html.replace("${crura_edema}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getCrura_edema();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${crura_edema}","无");break;
|
|
|
case 2:html = html.replace("${crura_edema}","单侧");break;
|
|
|
case 3:html = html.replace("${crura_edema}","双侧不对称");break;
|
|
|
case 4:html = html.replace("${crura_edema}","双侧对称");break;
|
|
|
default:html = html.replace("${crura_edema}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getDorsal_foot_pulse()){
|
|
|
html = html.replace("${dorsal_foot_pulse}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getDorsal_foot_pulse();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${dorsal_foot_pulse}","未接触");break;
|
|
|
case 2:html = html.replace("${dorsal_foot_pulse}","触及双侧对称");break;
|
|
|
case 3:html = html.replace("${dorsal_foot_pulse}","触及左侧弱或消失");break;
|
|
|
case 4:html = html.replace("${dorsal_foot_pulse}","触及右侧弱或消失");break;
|
|
|
default:html = html.replace("${dorsal_foot_pulse}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if (null==olderPeopleHealthCheckRecord.getAnus_dre()){
|
|
|
html = html.replace("${anus_dre}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAnus_dre();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${anus_dre}","未见异常");break;
|
|
|
case 2:html = html.replace("${anus_dre}","触痛");break;
|
|
|
case 3:html = html.replace("${anus_dre}","包块");break;
|
|
|
case 4:html = html.replace("${anus_dre}","前列腺异常");break;
|
|
|
case 5:html = html.replace("${anus_dre}","其他");break;
|
|
|
default:html = html.replace("${anus_dre}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${anus_dre_other}",null==olderPeopleHealthCheckRecord.getAnus_dre_other()?"":olderPeopleHealthCheckRecord.getAnus_dre_other());
|
|
|
if (null==olderPeopleHealthCheckRecord.getBreast()){
|
|
|
html = html.replace("${breast}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getBreast();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="未见异常 ";break;
|
|
|
case "2":valueStrTmp+="乳房切除 ";break;
|
|
|
case "3":valueStrTmp+="异常泌乳 ";break;
|
|
|
case "4":valueStrTmp+="乳腺包块 ";break;
|
|
|
case "5":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${breast}",valueStrTmp);
|
|
|
}
|
|
|
html = html.replace("${breast_other}",null==olderPeopleHealthCheckRecord.getBreast_other()?"":olderPeopleHealthCheckRecord.getBreast_other());
|
|
|
if (null==olderPeopleHealthCheckRecord.getVulva()){
|
|
|
html = html.replace("${vulva}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getVulva();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${vulva}","未见异常");break;
|
|
|
case 2:html = html.replace("${vulva}","异常");break;
|
|
|
default:html = html.replace("${vulva}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${vulva_abnormal}",null==olderPeopleHealthCheckRecord.getVulva_abnormal()?"":olderPeopleHealthCheckRecord.getVulva_abnormal());
|
|
|
if (null==olderPeopleHealthCheckRecord.getVagina()){
|
|
|
html = html.replace("${vagina}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getVagina();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${vagina}","未见异常");break;
|
|
|
case 2:html = html.replace("${vagina}","异常");break;
|
|
|
default:html = html.replace("${vagina}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${vagina_abnormal}",null==olderPeopleHealthCheckRecord.getVagina_abnormal()?"":olderPeopleHealthCheckRecord.getVagina_abnormal());
|
|
|
if (null==olderPeopleHealthCheckRecord.getCervical()){
|
|
|
html = html.replace("${cervical}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getCervical();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${cervical}","未见异常");break;
|
|
|
case 2:html = html.replace("${cervical}","异常");break;
|
|
|
default:html = html.replace("${cervical}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${cervical_abnormal}",null==olderPeopleHealthCheckRecord.getCervical_abnormal()?"":olderPeopleHealthCheckRecord.getCervical_abnormal());
|
|
|
if (null==olderPeopleHealthCheckRecord.getCorpus()){
|
|
|
html = html.replace("${corpus}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getCorpus();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${corpus}","未见异常");break;
|
|
|
case 2:html = html.replace("${corpus}","异常");break;
|
|
|
default:html = html.replace("${corpus}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${corpus_abnormal}",null==olderPeopleHealthCheckRecord.getCorpus_abnormal()?"":olderPeopleHealthCheckRecord.getCorpus_abnormal());
|
|
|
if (null==olderPeopleHealthCheckRecord.getGynecologic_appendix()){
|
|
|
html = html.replace("${gynecologic_appendix}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getGynecologic_appendix();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${gynecologic_appendix}","未见异常");break;
|
|
|
case 2:html = html.replace("${gynecologic_appendix}","异常");break;
|
|
|
default:html = html.replace("${gynecologic_appendix}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${appendix_abnormal}",null==olderPeopleHealthCheckRecord.getAppendix_abnormal()?"":olderPeopleHealthCheckRecord.getAppendix_abnormal());
|
|
|
html = html.replace("${physical_examination_other}",null==olderPeopleHealthCheckRecord.getPhysical_examination_other()?"":olderPeopleHealthCheckRecord.getPhysical_examination_other());
|
|
|
html = html.replace("${hemoglobin}",null==olderPeopleHealthCheckRecord.getHemoglobin()?"":olderPeopleHealthCheckRecord.getHemoglobin()+"");
|
|
|
html = html.replace("${leukocyte}",null==olderPeopleHealthCheckRecord.getLeukocyte()?"":olderPeopleHealthCheckRecord.getLeukocyte()+"");
|
|
|
html = html.replace("${thrombocyte}",null==olderPeopleHealthCheckRecord.getThrombocyte()?"":olderPeopleHealthCheckRecord.getThrombocyte()+"");
|
|
|
html = html.replace("${blood_routine_other}",null==olderPeopleHealthCheckRecord.getBlood_routine_other()?"":olderPeopleHealthCheckRecord.getBlood_routine_other()+"");
|
|
|
html = html.replace("${urine_protein}",null==olderPeopleHealthCheckRecord.getUrine_protein()?"":olderPeopleHealthCheckRecord.getUrine_protein()+"");
|
|
|
html = html.replace("${urine_sugar}",null==olderPeopleHealthCheckRecord.getUrine_sugar()?"":olderPeopleHealthCheckRecord.getUrine_sugar()+"");
|
|
|
html = html.replace("${urine_acetone_bodies}",null==olderPeopleHealthCheckRecord.getUrine_acetone_bodies()?"":olderPeopleHealthCheckRecord.getUrine_acetone_bodies()+"");
|
|
|
html = html.replace("${urine_occult_blood}",null==olderPeopleHealthCheckRecord.getUrine_occult_blood()?"":olderPeopleHealthCheckRecord.getUrine_occult_blood()+"");
|
|
|
html = html.replace("${urine_routine_other}",null==olderPeopleHealthCheckRecord.getUrine_routine_other()?"":olderPeopleHealthCheckRecord.getUrine_routine_other()+"");
|
|
|
html = html.replace("${fasting_blood_glucose_L}",null==olderPeopleHealthCheckRecord.getFasting_blood_glucose_L()?"":olderPeopleHealthCheckRecord.getFasting_blood_glucose_L()+"");
|
|
|
html = html.replace("${fasting_blood_glucose_dL}",null==olderPeopleHealthCheckRecord.getFasting_blood_glucose_dL()?"":olderPeopleHealthCheckRecord.getFasting_blood_glucose_dL()+"");
|
|
|
if (null==olderPeopleHealthCheckRecord.getElectrocardiogram()){
|
|
|
html = html.replace("${electrocardiogram}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getElectrocardiogram();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${electrocardiogram}","正常");break;
|
|
|
case 2:html = html.replace("${electrocardiogram}","异常");break;
|
|
|
default:html = html.replace("${electrocardiogram}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${electrocardiogram_abnormal}",null==olderPeopleHealthCheckRecord.getElectrocardiogram_abnormal()?"":olderPeopleHealthCheckRecord.getElectrocardiogram_abnormal()+"");
|
|
|
html = html.replace("${microalbuminuria}",null==olderPeopleHealthCheckRecord.getMicroalbuminuria()?"":olderPeopleHealthCheckRecord.getMicroalbuminuria()+"");
|
|
|
if(null==olderPeopleHealthCheckRecord.getOccult_blood_in_stool()){
|
|
|
html = html.replace("${occult_blood_in_stool}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getOccult_blood_in_stool();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${occult_blood_in_stool}","阴性");break;
|
|
|
case 2:html = html.replace("${occult_blood_in_stool}","阳性");break;
|
|
|
default:html = html.replace("${occult_blood_in_stool}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${glycated_hemoglobin}",null==olderPeopleHealthCheckRecord.getGlycated_hemoglobin()?"":olderPeopleHealthCheckRecord.getGlycated_hemoglobin()+"");
|
|
|
if(null==olderPeopleHealthCheckRecord.getHBsAg()){
|
|
|
html = html.replace("${HBsAg}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getHBsAg();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${HBsAg}","阴性");break;
|
|
|
case 2:html = html.replace("${HBsAg}","阳性");break;
|
|
|
default:html = html.replace("${HBsAg}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${ALT}",null==olderPeopleHealthCheckRecord.getALT()?"":olderPeopleHealthCheckRecord.getALT()+"");
|
|
|
html = html.replace("${SGOT}",null==olderPeopleHealthCheckRecord.getSGOT()?"":olderPeopleHealthCheckRecord.getSGOT()+"");
|
|
|
html = html.replace("${albumin}",null==olderPeopleHealthCheckRecord.getAlbumin()?"":olderPeopleHealthCheckRecord.getAlbumin()+"");
|
|
|
html = html.replace("${total_bilirubin}",null==olderPeopleHealthCheckRecord.getTotal_bilirubin()?"":olderPeopleHealthCheckRecord.getTotal_bilirubin()+"");
|
|
|
html = html.replace("${conjugated_bilirubin}",null==olderPeopleHealthCheckRecord.getConjugated_bilirubin()?"":olderPeopleHealthCheckRecord.getConjugated_bilirubin()+"");
|
|
|
html = html.replace("${serum_creatinine}",null==olderPeopleHealthCheckRecord.getConjugated_bilirubin()?"":olderPeopleHealthCheckRecord.getConjugated_bilirubin()+"");
|
|
|
html = html.replace("${blood_urea_nitrogen}",null==olderPeopleHealthCheckRecord.getBlood_urea_nitrogen()?"":olderPeopleHealthCheckRecord.getBlood_urea_nitrogen()+"");
|
|
|
html = html.replace("${blood_potassium_concentration}",null==olderPeopleHealthCheckRecord.getBlood_potassium_concentration()?"":olderPeopleHealthCheckRecord.getBlood_potassium_concentration()+"");
|
|
|
html = html.replace("${blood_Na_concentration}",null==olderPeopleHealthCheckRecord.getBlood_Na_concentration()?"":olderPeopleHealthCheckRecord.getBlood_Na_concentration()+"");
|
|
|
html = html.replace("${uric_acid}",null==olderPeopleHealthCheckRecord.getUric_acid()?"":olderPeopleHealthCheckRecord.getUric_acid()+"");
|
|
|
html = html.replace("${total_cholesterol}",null==olderPeopleHealthCheckRecord.getTotal_cholesterol()?"":olderPeopleHealthCheckRecord.getTotal_cholesterol()+"");
|
|
|
html = html.replace("${triglyceride}",null==olderPeopleHealthCheckRecord.getTriglyceride()?"":olderPeopleHealthCheckRecord.getTriglyceride()+"");
|
|
|
html = html.replace("${LDL_cholesterol}",null==olderPeopleHealthCheckRecord.getLDL_cholesterol()?"":olderPeopleHealthCheckRecord.getLDL_cholesterol()+"");
|
|
|
html = html.replace("${HDL_cholesterol}",null==olderPeopleHealthCheckRecord.getHDL_cholesterol()?"":olderPeopleHealthCheckRecord.getHDL_cholesterol()+"");
|
|
|
html = html.replace("${alpha_fetal_protein}",null==olderPeopleHealthCheckRecord.getAlpha_fetal_protein()?"":olderPeopleHealthCheckRecord.getAlpha_fetal_protein()+"");
|
|
|
if(null==olderPeopleHealthCheckRecord.getChest_Xray()){
|
|
|
html = html.replace("${chest_Xray}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getChest_Xray();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${chest_Xray}","正常");break;
|
|
|
case 2:html = html.replace("${chest_Xray}","异常");break;
|
|
|
default:html = html.replace("${chest_Xray}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${chest_Xray_abnormal}",null==olderPeopleHealthCheckRecord.getChest_Xray_abnormal()?"":olderPeopleHealthCheckRecord.getChest_Xray_abnormal());
|
|
|
if(null==olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic()){
|
|
|
html = html.replace("${abdomen_B_ultrasonic}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${abdomen_B_ultrasonic}","正常");break;
|
|
|
case 2:html = html.replace("${abdomen_B_ultrasonic}","异常");break;
|
|
|
default:html = html.replace("${abdomen_B_ultrasonic}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${abdomen_B_ultrasonic_abnormal}",null==olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic_abnormal()?"":olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic_abnormal());
|
|
|
if(null==olderPeopleHealthCheckRecord.getB_ultrasonic_other()){
|
|
|
html = html.replace("${B_ultrasonic_other}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getB_ultrasonic_other();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${B_ultrasonic_other}","正常");break;
|
|
|
case 2:html = html.replace("${B_ultrasonic_other}","异常");break;
|
|
|
default:html = html.replace("${B_ultrasonic_other}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${B_ultrasonic_other_abnormal}",null==olderPeopleHealthCheckRecord.getB_ultrasonic_other_abnormal()?"":olderPeopleHealthCheckRecord.getB_ultrasonic_other_abnormal());
|
|
|
if(null==olderPeopleHealthCheckRecord.getCervical_smear()){
|
|
|
html = html.replace("${cervical_smear}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getCervical_smear();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${cervical_smear}","正常");break;
|
|
|
case 2:html = html.replace("${cervical_smear}","异常");break;
|
|
|
default:html = html.replace("${cervical_smear}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${cervical_smear_abnormal}",null==olderPeopleHealthCheckRecord.getCervical_smear_abnormal()?"":olderPeopleHealthCheckRecord.getCervical_smear_abnormal());
|
|
|
html = html.replace("${auxiliary_examination_other}",null==olderPeopleHealthCheckRecord.getAuxiliary_examination_other()?"":olderPeopleHealthCheckRecord.getAuxiliary_examination_other());
|
|
|
if(null==olderPeopleHealthCheckRecord.getMild_physical()){
|
|
|
html = html.replace("${mild_physical}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMild_physical();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${mild_physical}","是");break;
|
|
|
case 2:html = html.replace("${mild_physical}","倾向是");break;
|
|
|
default:html = html.replace("${mild_physical}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getQi_deficiency()){
|
|
|
html = html.replace("${qi_deficiency}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getQi_deficiency();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${qi_deficiency}","是");break;
|
|
|
case 2:html = html.replace("${qi_deficiency}","基本是");break;
|
|
|
default:html = html.replace("${qi_deficiency}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getYang_deficiency()){
|
|
|
html = html.replace("${yang_deficiency}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getYang_deficiency();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${yang_deficiency}","是");break;
|
|
|
case 2:html = html.replace("${yang_deficiency}","基本是");break;
|
|
|
default:html = html.replace("${yang_deficiency}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getYin_deficiency()){
|
|
|
html = html.replace("${yin_deficiency}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getYin_deficiency();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${yin_deficiency}","是");break;
|
|
|
case 2:html = html.replace("${yin_deficiency}","基本是");break;
|
|
|
default:html = html.replace("${yin_deficiency}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getPhlegm_dampness()){
|
|
|
html = html.replace("${phlegm_dampness}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getPhlegm_dampness();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${phlegm_dampness}","是");break;
|
|
|
case 2:html = html.replace("${phlegm_dampness}","基本是");break;
|
|
|
default:html = html.replace("${phlegm_dampness}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getDampness_heat()){
|
|
|
html = html.replace("${dampness_heat}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getDampness_heat();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${dampness_heat}","是");break;
|
|
|
case 2:html = html.replace("${dampness_heat}","基本是");break;
|
|
|
default:html = html.replace("${dampness_heat}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getBlood_stasis()){
|
|
|
html = html.replace("${blood_stasis}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getBlood_stasis();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${blood_stasis}","是");break;
|
|
|
case 2:html = html.replace("${blood_stasis}","基本是");break;
|
|
|
default:html = html.replace("${blood_stasis}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getLogistic_regression()){
|
|
|
html = html.replace("${logistic_regression}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getLogistic_regression();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${logistic_regression}","是");break;
|
|
|
case 2:html = html.replace("${logistic_regression}","基本是");break;
|
|
|
default:html = html.replace("${logistic_regression}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getGrasp_quality()){
|
|
|
html = html.replace("${grasp_quality}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getGrasp_quality();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${grasp_quality}","是");break;
|
|
|
case 2:html = html.replace("${grasp_quality}","基本是");break;
|
|
|
default:html = html.replace("${grasp_quality}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getCerebrovascular_disease()){
|
|
|
html = html.replace("${cerebrovascular_disease}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getCerebrovascular_disease();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="未发现 ";break;
|
|
|
case "2":valueStrTmp+="缺血性卒中 ";break;
|
|
|
case "3":valueStrTmp+="脑出血 ";break;
|
|
|
case "4":valueStrTmp+="蛛网膜下腔出血 ";break;
|
|
|
case "5":valueStrTmp+="短暂性脑缺血发作 ";break;
|
|
|
case "6":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${cerebrovascular_disease}",valueStrTmp);
|
|
|
}
|
|
|
html = html.replace("${cerebrovascular_disease_other}",null==olderPeopleHealthCheckRecord.getCerebrovascular_disease_other()?"":olderPeopleHealthCheckRecord.getCerebrovascular_disease_other());
|
|
|
if(null==olderPeopleHealthCheckRecord.getNephropathy()){
|
|
|
html = html.replace("${nephropathy}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getNephropathy();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="未发现 ";break;
|
|
|
case "2":valueStrTmp+="糖尿病肾病 ";break;
|
|
|
case "3":valueStrTmp+="肾功能衰竭 ";break;
|
|
|
case "4":valueStrTmp+="急性肾炎 ";break;
|
|
|
case "5":valueStrTmp+="慢性肾炎 ";break;
|
|
|
case "6":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${nephropathy}",valueStrTmp);
|
|
|
|
|
|
}
|
|
|
html = html.replace("${nephropathy_other}",null==olderPeopleHealthCheckRecord.getNephropathy_other()?"":olderPeopleHealthCheckRecord.getNephropathy_other());
|
|
|
if(null==olderPeopleHealthCheckRecord.getHeart_disease()){
|
|
|
html = html.replace("${heart_disease}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getHeart_disease();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="未发现 ";break;
|
|
|
case "2":valueStrTmp+="心肌梗死 ";break;
|
|
|
case "3":valueStrTmp+="心绞痛 ";break;
|
|
|
case "4":valueStrTmp+="冠状动脉血运重建 ";break;
|
|
|
case "5":valueStrTmp+="充血性心力衰竭 ";break;
|
|
|
case "6":valueStrTmp+="心前区疼痛 ";break;
|
|
|
case "7":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${heart_disease}",valueStrTmp);
|
|
|
}
|
|
|
html = html.replace("${heart_disease_other}",null==olderPeopleHealthCheckRecord.getHeart_disease_other()?"":olderPeopleHealthCheckRecord.getHeart_disease_other());
|
|
|
if(null==olderPeopleHealthCheckRecord.getVascular_disease()){
|
|
|
html = html.replace("${vascular_disease}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getVascular_disease();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="未发现 ";break;
|
|
|
case "2":valueStrTmp+="夹层动脉瘤 ";break;
|
|
|
case "3":valueStrTmp+="动脉闭塞性疾病 ";break;
|
|
|
case "4":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${vascular_disease}",valueStrTmp);
|
|
|
|
|
|
}
|
|
|
html = html.replace("${vascular_disease_other}",null==olderPeopleHealthCheckRecord.getVascular_disease_other()?"":olderPeopleHealthCheckRecord.getVascular_disease_other());
|
|
|
if(null==olderPeopleHealthCheckRecord.getEye_disease()){
|
|
|
html = html.replace("${eye_disease}"," ");
|
|
|
}else {
|
|
|
String smokingState = olderPeopleHealthCheckRecord.getEye_disease();
|
|
|
String[] smokingStates = smokingState.split(",");
|
|
|
String valueStrTmp = " ";
|
|
|
for (String tmp:smokingStates){
|
|
|
switch (tmp){
|
|
|
case "1":valueStrTmp+="未发现 ";break;
|
|
|
case "2":valueStrTmp+="视网膜出血或渗出 ";break;
|
|
|
case "3":valueStrTmp+="视乳头水肿 ";break;
|
|
|
case "4":valueStrTmp+="白内障 ";break;
|
|
|
case "5":valueStrTmp+="其他 ";break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${eye_disease}",valueStrTmp);
|
|
|
|
|
|
}
|
|
|
html = html.replace("${eye_disease_other}",null==olderPeopleHealthCheckRecord.getEye_disease_other()?"":olderPeopleHealthCheckRecord.getEye_disease_other());
|
|
|
if(null==olderPeopleHealthCheckRecord.getNervous_system_disease()){
|
|
|
html = html.replace("${nervous_system_disease}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getNervous_system_disease();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${nervous_system_disease}","未发现");break;
|
|
|
case 2:html = html.replace("${nervous_system_disease}","有");break;
|
|
|
default:html = html.replace("${nervous_system_disease}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${nervous_system_disease_has}",null==olderPeopleHealthCheckRecord.getNervous_system_disease_has()?"":olderPeopleHealthCheckRecord.getNervous_system_disease_has());
|
|
|
if(null==olderPeopleHealthCheckRecord.getOther_system_disease()){
|
|
|
html = html.replace("${other_system_disease}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getOther_system_disease();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${other_system_disease}","未发现");break;
|
|
|
case 2:html = html.replace("${other_system_disease}","有");break;
|
|
|
default:html = html.replace("${other_system_disease}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${other_system_disease_has}",null==olderPeopleHealthCheckRecord.getOther_system_disease_has()?"":olderPeopleHealthCheckRecord.getOther_system_disease_has());
|
|
|
html = html.replace("${admission_date1}",null==olderPeopleHealthCheckRecord.getAdmission_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getAdmission_date1()));
|
|
|
html = html.replace("${admission_date2}",null==olderPeopleHealthCheckRecord.getAdmission_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getAdmission_date2()));
|
|
|
html = html.replace("${discharge_date1}",null==olderPeopleHealthCheckRecord.getDischarge_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getDischarge_date1()));
|
|
|
html = html.replace("${discharge_date2}",null==olderPeopleHealthCheckRecord.getDischarge_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getDischarge_date2()));
|
|
|
html = html.replace("${admission_reason1}",null==olderPeopleHealthCheckRecord.getAdmission_reason1()?"":olderPeopleHealthCheckRecord.getAdmission_reason1());
|
|
|
html = html.replace("${admission_reason2}",null==olderPeopleHealthCheckRecord.getAdmission_reason2()?"":olderPeopleHealthCheckRecord.getAdmission_reason2());
|
|
|
html = html.replace("${admission_hospital_name1}",null==olderPeopleHealthCheckRecord.getAdmission_hospital_name1()?"":olderPeopleHealthCheckRecord.getAdmission_hospital_name1());
|
|
|
html = html.replace("${admission_hospital_name2}",null==olderPeopleHealthCheckRecord.getAdmission_hospital_name2()?"":olderPeopleHealthCheckRecord.getAdmission_hospital_name2());
|
|
|
html = html.replace("${admission_number1}",null==olderPeopleHealthCheckRecord.getAdmission_number1()?"":olderPeopleHealthCheckRecord.getAdmission_number1());
|
|
|
html = html.replace("${admission_number2}",null==olderPeopleHealthCheckRecord.getAdmission_number2()?"":olderPeopleHealthCheckRecord.getAdmission_number2());
|
|
|
html = html.replace("${building_bed_date1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getBuilding_bed_date1()));
|
|
|
html = html.replace("${building_bed_date2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getBuilding_bed_date2()));
|
|
|
html = html.replace("${cancel_bed_date1}",null==olderPeopleHealthCheckRecord.getCancel_bed_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getCancel_bed_date1()));
|
|
|
html = html.replace("${cancel_bed_date2}",null==olderPeopleHealthCheckRecord.getCancel_bed_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getCancel_bed_date2()));
|
|
|
html = html.replace("${building_bed_reason1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_reason1()?"":olderPeopleHealthCheckRecord.getBuilding_bed_reason1());
|
|
|
html = html.replace("${building_bed_reason2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_reason2()?"":olderPeopleHealthCheckRecord.getBuilding_bed_reason2());
|
|
|
html = html.replace("${building_bed_hospiatl_name1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name1()?"":olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name1());
|
|
|
html = html.replace("${building_bed_hospiatl_name2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name2()?"":olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name2());
|
|
|
html = html.replace("${building_bed_number1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_number1()?"":olderPeopleHealthCheckRecord.getBuilding_bed_number1());
|
|
|
html = html.replace("${building_bed_number2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_number2()?"":olderPeopleHealthCheckRecord.getBuilding_bed_number2());
|
|
|
html = html.replace("${medicine1}",null==olderPeopleHealthCheckRecord.getMedicine1()?"":olderPeopleHealthCheckRecord.getMedicine1());
|
|
|
html = html.replace("${medicine2}",null==olderPeopleHealthCheckRecord.getMedicine2()?"":olderPeopleHealthCheckRecord.getMedicine2());
|
|
|
html = html.replace("${medicine3}",null==olderPeopleHealthCheckRecord.getMedicine3()?"":olderPeopleHealthCheckRecord.getMedicine3());
|
|
|
html = html.replace("${medicine4}",null==olderPeopleHealthCheckRecord.getMedicine4()?"":olderPeopleHealthCheckRecord.getMedicine4());
|
|
|
html = html.replace("${medicine5}",null==olderPeopleHealthCheckRecord.getMedicine5()?"":olderPeopleHealthCheckRecord.getMedicine5());
|
|
|
html = html.replace("${medicine6}",null==olderPeopleHealthCheckRecord.getMedicine6()?"":olderPeopleHealthCheckRecord.getMedicine6());
|
|
|
html = html.replace("${medicine1_use}",null==olderPeopleHealthCheckRecord.getMedicine1_use()?"":olderPeopleHealthCheckRecord.getMedicine1_use());
|
|
|
html = html.replace("${medicine2_use}",null==olderPeopleHealthCheckRecord.getMedicine2_use()?"":olderPeopleHealthCheckRecord.getMedicine2_use());
|
|
|
html = html.replace("${medicine3_use}",null==olderPeopleHealthCheckRecord.getMedicine3_use()?"":olderPeopleHealthCheckRecord.getMedicine3_use());
|
|
|
html = html.replace("${medicine4_use}",null==olderPeopleHealthCheckRecord.getMedicine4_use()?"":olderPeopleHealthCheckRecord.getMedicine4_use());
|
|
|
html = html.replace("${medicine5_use}",null==olderPeopleHealthCheckRecord.getMedicine5_use()?"":olderPeopleHealthCheckRecord.getMedicine5_use());
|
|
|
html = html.replace("${medicine6_use}",null==olderPeopleHealthCheckRecord.getMedicine6_use()?"":olderPeopleHealthCheckRecord.getMedicine6_use());
|
|
|
html = html.replace("${medicine1_dosage}",null==olderPeopleHealthCheckRecord.getMedicine1_dosage()?"":olderPeopleHealthCheckRecord.getMedicine1_dosage());
|
|
|
html = html.replace("${medicine2_dosage}",null==olderPeopleHealthCheckRecord.getMedicine2_dosage()?"":olderPeopleHealthCheckRecord.getMedicine2_dosage());
|
|
|
html = html.replace("${medicine3_dosage}",null==olderPeopleHealthCheckRecord.getMedicine3_dosage()?"":olderPeopleHealthCheckRecord.getMedicine3_dosage());
|
|
|
html = html.replace("${medicine4_dosage}",null==olderPeopleHealthCheckRecord.getMedicine4_dosage()?"":olderPeopleHealthCheckRecord.getMedicine4_dosage());
|
|
|
html = html.replace("${medicine5_dosage}",null==olderPeopleHealthCheckRecord.getMedicine5_dosage()?"":olderPeopleHealthCheckRecord.getMedicine5_dosage());
|
|
|
html = html.replace("${medicine6_dosage}",null==olderPeopleHealthCheckRecord.getMedicine6_dosage()?"":olderPeopleHealthCheckRecord.getMedicine6_dosage());
|
|
|
html = html.replace("${medication1_time}",null==olderPeopleHealthCheckRecord.getMedication1_time()?"":olderPeopleHealthCheckRecord.getMedication1_time());
|
|
|
html = html.replace("${medication2_time}",null==olderPeopleHealthCheckRecord.getMedication2_time()?"":olderPeopleHealthCheckRecord.getMedication2_time());
|
|
|
html = html.replace("${medication3_time}",null==olderPeopleHealthCheckRecord.getMedication3_time()?"":olderPeopleHealthCheckRecord.getMedication3_time());
|
|
|
html = html.replace("${medication4_time}",null==olderPeopleHealthCheckRecord.getMedication4_time()?"":olderPeopleHealthCheckRecord.getMedication4_time());
|
|
|
html = html.replace("${medication5_time}",null==olderPeopleHealthCheckRecord.getMedication5_time()?"":olderPeopleHealthCheckRecord.getMedication5_time());
|
|
|
html = html.replace("${medication6_time}",null==olderPeopleHealthCheckRecord.getMedication6_time()?"":olderPeopleHealthCheckRecord.getMedication6_time());
|
|
|
if(null==olderPeopleHealthCheckRecord.getMedication1_compliance()){
|
|
|
html = html.replace("${medication1_compliance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMedication1_compliance();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${medication1_compliance}","规律");break;
|
|
|
case 2:html = html.replace("${medication1_compliance}","间断");break;
|
|
|
case 3:html = html.replace("${medication1_compliance}","不服药");break;
|
|
|
default:html = html.replace("${medication1_compliance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getMedication2_compliance()){
|
|
|
html = html.replace("${medication2_compliance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMedication2_compliance();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${medication2_compliance}","规律");break;
|
|
|
case 2:html = html.replace("${medication2_compliance}","间断");break;
|
|
|
case 3:html = html.replace("${medication2_compliance}","不服药");break;
|
|
|
default:html = html.replace("${medication2_compliance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getMedication3_compliance()){
|
|
|
html = html.replace("${medication3_compliance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMedication3_compliance();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${medication3_compliance}","规律");break;
|
|
|
case 2:html = html.replace("${medication3_compliance}","间断");break;
|
|
|
case 3:html = html.replace("${medication3_compliance}","不服药");break;
|
|
|
default:html = html.replace("${medication3_compliance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getMedication4_compliance()){
|
|
|
html = html.replace("${medication4_compliance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMedication4_compliance();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${medication4_compliance}","规律");break;
|
|
|
case 2:html = html.replace("${medication4_compliance}","间断");break;
|
|
|
case 3:html = html.replace("${medication4_compliance}","不服药");break;
|
|
|
default:html = html.replace("${medication4_compliance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getMedication5_compliance()){
|
|
|
html = html.replace("${medication5_compliance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMedication5_compliance();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${medication5_compliance}","规律");break;
|
|
|
case 2:html = html.replace("${medication5_compliance}","间断");break;
|
|
|
case 3:html = html.replace("${medication5_compliance}","不服药");break;
|
|
|
default:html = html.replace("${medication5_compliance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getMedication6_compliance()){
|
|
|
html = html.replace("${medication6_compliance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getMedication6_compliance();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${medication6_compliance}","规律");break;
|
|
|
case 2:html = html.replace("${medication6_compliance}","间断");break;
|
|
|
case 3:html = html.replace("${medication6_compliance}","不服药");break;
|
|
|
default:html = html.replace("${medication6_compliance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${vaccination_name1}",null==olderPeopleHealthCheckRecord.getVaccination_name1()?"":olderPeopleHealthCheckRecord.getVaccination_name1());
|
|
|
html = html.replace("${vaccination_name2}",null==olderPeopleHealthCheckRecord.getVaccination_name2()?"":olderPeopleHealthCheckRecord.getVaccination_name2());
|
|
|
html = html.replace("${vaccination_name3}",null==olderPeopleHealthCheckRecord.getVaccination_name3()?"":olderPeopleHealthCheckRecord.getVaccination_name3());
|
|
|
html = html.replace("${vaccination_date1}",null==olderPeopleHealthCheckRecord.getVaccination_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getVaccination_date1()));
|
|
|
html = html.replace("${vaccination_date2}",null==olderPeopleHealthCheckRecord.getVaccination_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getVaccination_date2()));
|
|
|
html = html.replace("${vaccination_date3}",null==olderPeopleHealthCheckRecord.getVaccination_date3()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getVaccination_date3()));
|
|
|
html = html.replace("${vaccination_hospital_name1}",null==olderPeopleHealthCheckRecord.getVaccination_hospital_name1()?"":olderPeopleHealthCheckRecord.getVaccination_hospital_name1());
|
|
|
html = html.replace("${vaccination_hospital_name2}",null==olderPeopleHealthCheckRecord.getVaccination_hospital_name2()?"":olderPeopleHealthCheckRecord.getVaccination_hospital_name2());
|
|
|
html = html.replace("${vaccination_hospital_name3}",null==olderPeopleHealthCheckRecord.getVaccination_hospital_name3()?"":olderPeopleHealthCheckRecord.getVaccination_hospital_name3());
|
|
|
if(null==olderPeopleHealthCheckRecord.getHealth_examination()){
|
|
|
html = html.replace("${health_examination}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getHealth_examination();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${health_examination}","无");break;
|
|
|
case 2:html = html.replace("${health_examination}","有异常");break;
|
|
|
default:html = html.replace("${health_examination}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${health_examination_abnormal1}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal1()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal1());
|
|
|
html = html.replace("${health_examination_abnormal2}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal2()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal2());
|
|
|
html = html.replace("${health_examination_abnormal3}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal3()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal3());
|
|
|
html = html.replace("${health_examination_abnormal4}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal4()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal4());
|
|
|
if(null==olderPeopleHealthCheckRecord.getRegular_followup()){
|
|
|
html = html.replace("${regular_followup}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getRegular_followup();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${regular_followup}","定期随访:是");break;
|
|
|
default:html = html.replace("${regular_followup}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getChronic_health_management()){
|
|
|
html = html.replace("${chronic_health_management}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getChronic_health_management();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${chronic_health_management}","纳入慢性病患者健康管理:是");break;
|
|
|
default:html = html.replace("${chronic_health_management}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getSuggest_recheck()){
|
|
|
html = html.replace("${suggest_recheck}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getSuggest_recheck();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${suggest_recheck}","建议复查:是");break;
|
|
|
default:html = html.replace("${suggest_recheck}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getSuggest_referral()){
|
|
|
html = html.replace("${suggest_referral}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getSuggest_referral();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${suggest_referral}","建议转诊:是");break;
|
|
|
default:html = html.replace("${suggest_referral}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getOther_health_guidance()){
|
|
|
html = html.replace("${other_health_guidance}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getOther_health_guidance();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${other_health_guidance}","其他");break;
|
|
|
default:html = html.replace("${other_health_guidance}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${other_health_guidance_description}",null==olderPeopleHealthCheckRecord.getOther_health_guidance_description()?"":olderPeopleHealthCheckRecord.getOther_health_guidance_description());
|
|
|
if(null==olderPeopleHealthCheckRecord.getStop_smoking()){
|
|
|
html = html.replace("${stop_smoking}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getStop_smoking();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${stop_smoking}","戒烟:是");break;
|
|
|
default:html = html.replace("${stop_smoking}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getHealthy_drinking()){
|
|
|
html = html.replace("${healthy_drinking}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getHealthy_drinking();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${healthy_drinking}","健康饮酒:是");break;
|
|
|
default:html = html.replace("${healthy_drinking}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getDiet()){
|
|
|
html = html.replace("${diet}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getDiet();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${diet}","饮食:是");break;
|
|
|
default:html = html.replace("${diet}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getExercise()){
|
|
|
html = html.replace("${exercise}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getExercise();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${exercise}","锻炼:是");break;
|
|
|
default:html = html.replace("${exercise}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getLose_weight()){
|
|
|
html = html.replace("${lose_weight}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getLose_weight();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${lose_weight}","减肥:是");break;
|
|
|
default:html = html.replace("${lose_weight}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${goal_weight}",null==olderPeopleHealthCheckRecord.getGoal_weight()?"":"目标:"+olderPeopleHealthCheckRecord.getGoal_weight()+"Kg");
|
|
|
if(null==olderPeopleHealthCheckRecord.getRecommended_vaccination()){
|
|
|
html = html.replace("${recommended_vaccination}"," ");
|
|
|
}else {
|
|
|
String sclera = olderPeopleHealthCheckRecord.getRecommended_vaccination();
|
|
|
switch (sclera){
|
|
|
case "2":html = html.replace("${recommended_vaccination}","建议接种疫苗:是");break;
|
|
|
default:html = html.replace("${recommended_vaccination}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getOther_advice()){
|
|
|
html = html.replace("${other_advice}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getOther_advice();
|
|
|
switch (sclera){
|
|
|
case 2:html = html.replace("${other_advice}","其他建议:是");break;
|
|
|
default:html = html.replace("${other_advice}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${other_advice_description}",null==olderPeopleHealthCheckRecord.getOther_advice_description()?"":olderPeopleHealthCheckRecord.getOther_advice_description());
|
|
|
if(null==olderPeopleHealthCheckRecord.getEat()){
|
|
|
html = html.replace("${eat}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getEat();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${eat}"," 独立完成0-3分");break;
|
|
|
case 2:html = html.replace("${eat}"," 轻度依赖4-8分");break;
|
|
|
case 3:html = html.replace("${eat}"," 中度依赖9-18分");break;
|
|
|
case 4:html = html.replace("${eat}"," 不能自理≥19分");break;
|
|
|
default:html = html.replace("${eat}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getWash()){
|
|
|
html = html.replace("${wash}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getWash();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${wash}"," 独立完成0-3分");break;
|
|
|
case 2:html = html.replace("${wash}"," 轻度依赖4-8分");break;
|
|
|
case 3:html = html.replace("${wash}"," 中度依赖9-18分");break;
|
|
|
case 4:html = html.replace("${wash}"," 不能自理≥19分");break;
|
|
|
default:html = html.replace("${wash}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getDress()){
|
|
|
html = html.replace("${dress}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getDress();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${dress}"," 独立完成0-3分");break;
|
|
|
case 2:html = html.replace("${dress}"," 轻度依赖4-8分");break;
|
|
|
case 3:html = html.replace("${dress}"," 中度依赖9-18分");break;
|
|
|
case 4:html = html.replace("${dress}"," 不能自理≥19分");break;
|
|
|
default:html = html.replace("${dress}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getToilet()){
|
|
|
html = html.replace("${toilet}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getToilet();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${toilet}"," 独立完成0-3分");break;
|
|
|
case 2:html = html.replace("${toilet}"," 轻度依赖4-8分");break;
|
|
|
case 3:html = html.replace("${toilet}"," 中度依赖9-18分");break;
|
|
|
case 4:html = html.replace("${toilet}"," 不能自理≥19分");break;
|
|
|
default:html = html.replace("${toilet}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
if(null==olderPeopleHealthCheckRecord.getActivity()){
|
|
|
html = html.replace("${activity}"," ");
|
|
|
}else {
|
|
|
Integer sclera = olderPeopleHealthCheckRecord.getActivity();
|
|
|
switch (sclera){
|
|
|
case 1:html = html.replace("${activity}"," 独立完成0-3分");break;
|
|
|
case 2:html = html.replace("${activity}"," 轻度依赖4-8分");break;
|
|
|
case 3:html = html.replace("${activity}"," 中度依赖9-18分");break;
|
|
|
case 4:html = html.replace("${activity}"," 能自理≥19分");break;
|
|
|
default:html = html.replace("${activity}"," ");break;
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${score}",null==olderPeopleHealthCheckRecord.getScore()?"":olderPeopleHealthCheckRecord.getScore()+"");
|
|
|
|
|
|
String sign_wayStr="";
|
|
|
String sign_time="";
|
|
|
String sign_address="";
|
|
|
String sign_imgs="";
|
|
|
|
|
|
List<FollowupSign> followupSignDOs = followupSignDao.findByFollowupIdAndDel(Long.valueOf(olderPeopleHealthCheckRecord.getFollowup_id()),0);
|
|
|
if (followupSignDOs.size()>0){
|
|
|
FollowupSign followupSignDO = followupSignDOs.get(0);
|
|
|
if (null!=followupSignDO){
|
|
|
try {
|
|
|
switch (followupSignDO.getType()){
|
|
|
case "1":sign_wayStr="定位"; break;
|
|
|
case "2":sign_wayStr="拍照";break;
|
|
|
case "3":sign_wayStr="门牌";break;
|
|
|
default:sign_wayStr=" ";break;
|
|
|
}
|
|
|
sign_address = null==followupSignDO.getAddress()?" ":followupSignDO.getAddress();
|
|
|
if(StringUtils.isNotBlank(followupSignDO.getImg())) {
|
|
|
String imgs = followupSignDO.getImg();
|
|
|
String[] imgsArray;
|
|
|
if (imgs.contains(",")) {
|
|
|
imgsArray = imgs.split(",");
|
|
|
} else {
|
|
|
imgsArray = new String[]{imgs};
|
|
|
}
|
|
|
for (String img : imgsArray) {
|
|
|
sign_imgs += "<img width='80' height='100' src='" + imgUrlDomain + img + "' /> ";
|
|
|
}
|
|
|
}
|
|
|
sign_time = DateUtil.dateToStrLong(followupSignDO.getCreateTime());
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("${sign_way}",sign_wayStr);
|
|
|
html = html.replace("${sign_time}",sign_time);
|
|
|
html = html.replace("${sign_address}",sign_address);
|
|
|
html = html.replace("${sigm_imgs}",sign_imgs);
|
|
|
return html;
|
|
|
}
|
|
|
|
|
|
public String getSymptomName(String symptom){
|
|
|
String symptomName="";
|
|
|
switch (symptom){
|
|
|
case "1": symptomName = " 无症状 ";break;
|
|
|
case "2": symptomName = " 头痛 ";break;
|
|
|
case "3": symptomName = " 头晕 ";break;
|
|
|
case "4": symptomName = " 心悸 ";break;
|
|
|
case "5": symptomName = " 胸闷 ";break;
|
|
|
case "6": symptomName = " 胸痛 ";break;
|
|
|
case "7": symptomName = " 慢性咳嗽 ";break;
|
|
|
case "8": symptomName = " 咳痰 ";break;
|
|
|
case "9": symptomName = " 呼吸困难 ";break;
|
|
|
case "10": symptomName = "多饮 ";break;
|
|
|
case "11": symptomName = "多尿 ";break;
|
|
|
case "12": symptomName = "体重下降 ";break;
|
|
|
case "13": symptomName = "乏力 ";break;
|
|
|
case "14": symptomName = "关节肿痛 ";break;
|
|
|
case "15": symptomName = "视力模糊 ";break;
|
|
|
case "16": symptomName = "手脚麻木 ";break;
|
|
|
case "17": symptomName = "尿急 ";break;
|
|
|
case "18": symptomName = "尿痛 ";break;
|
|
|
case "19": symptomName = "便秘 ";break;
|
|
|
case "20": symptomName = "腹泻 ";break;
|
|
|
case "21": symptomName = "恶心呕吐 ";break;
|
|
|
case "22": symptomName = "眼花 ";break;
|
|
|
case "23": symptomName = "耳鸣 ";break;
|
|
|
case "24": symptomName = "乳房胀痛 ";break;
|
|
|
case "25": symptomName = "其他 ";break;
|
|
|
default:symptomName=" ";break;
|
|
|
// @Transactional
|
|
|
// public void saveAllFollowupProjectData(String id, String followupProjectData) throws Exception {
|
|
|
// JestClient jestClient = null;
|
|
|
// try {
|
|
|
//
|
|
|
//
|
|
|
// jestClient = elasticFactory.getJestClient();
|
|
|
// //先根据条件查找出来
|
|
|
// SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
// searchSourceBuilder.query(
|
|
|
// new BoolQueryBuilder()
|
|
|
// .must(QueryBuilders.matchQuery("followup_id", id))
|
|
|
// );
|
|
|
//
|
|
|
// Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
|
|
|
// .build();
|
|
|
// SearchResult result = jestClient.execute(search);
|
|
|
// List<FollowupContentESDO> followupContentESDOS = result.getSourceAsObjectList(FollowupContentESDO.class);
|
|
|
//
|
|
|
// List<FollowupContentESDO> dataList = new ArrayList<>();
|
|
|
// if(followupContentESDOS != null){
|
|
|
// dataList.addAll(followupContentESDOS);
|
|
|
// //删除原有记录
|
|
|
// this.esDeleteFollowUpContent(dataList);
|
|
|
// }
|
|
|
//
|
|
|
// //保存新的随访详情信息
|
|
|
// List<FollowupContentESDO> newdatalist = new ArrayList<>();
|
|
|
// FollowupContentESDO followupContentESDO = new FollowupContentESDO();
|
|
|
// followupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
|
|
|
// followupContentESDO.setFollowup_id(id);
|
|
|
// followupContentESDO.setCreate_time(new Date());
|
|
|
// newdatalist.add(followupContentESDO);
|
|
|
// elastricSearchSave.save(newdatalist, esIndex, esType);
|
|
|
//
|
|
|
//
|
|
|
// //如果该随访是已完成的,则添加随访信息上传映射,上传到基卫
|
|
|
// Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
// if ("1".equals(followup.getStatus())) {
|
|
|
// FollowupMapping followupMapping = followUpMappingDao.findByFollowupId(Integer.parseInt(id));
|
|
|
// if (followupMapping == null) {
|
|
|
// followupMapping = new FollowupMapping();
|
|
|
// followupMapping.setCode(UUID.randomUUID().toString());
|
|
|
// followupMapping.setFollowupId(Integer.parseInt(id));
|
|
|
// followupMapping.setUpdateTime(DateUtil.getNowTimestamp());
|
|
|
// followupMapping.setCreateTime(DateUtil.getNowTimestamp());
|
|
|
// }
|
|
|
// followupMapping.setNeedUpload(1);
|
|
|
// followUpMappingDao.save(followupMapping);
|
|
|
// }
|
|
|
//
|
|
|
// } finally {
|
|
|
// if (jestClient != null) {
|
|
|
// jestClient.shutdownClient();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// public File writeWordFile(List<Long> orderId, HttpServletResponse response) throws Exception {
|
|
|
// String zipFileName = "入户访视详情";
|
|
|
// long time = System.currentTimeMillis();
|
|
|
// String exportConclusionList = time+"exportList";
|
|
|
// String path = this.getClass().getResource("/").getPath() + exportConclusionList;
|
|
|
// File file = new File(path);
|
|
|
// // 删除文件夹、文件
|
|
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
// System.out.println("创建文件夹时间:"+sdf.format(new Date()));
|
|
|
// if (file.exists()) {
|
|
|
// if (file != null){
|
|
|
// DoorOrderService.deleteFolder(file);
|
|
|
// file.mkdir();
|
|
|
// }else {
|
|
|
// file.delete();
|
|
|
// file.mkdir();
|
|
|
// }
|
|
|
// }else {
|
|
|
// file.mkdir();
|
|
|
// }
|
|
|
// int j =1;
|
|
|
// long doorStart = System.currentTimeMillis();
|
|
|
// long feeDetailStart = System.currentTimeMillis();
|
|
|
// long feeDetailEnd = System.currentTimeMillis();
|
|
|
//
|
|
|
// System.out.println("feeDetail用时:"+(feeDetailEnd-feeDetailStart)/1000);
|
|
|
// System.out.println("开始生成Word:"+sdf.format(new Date()));
|
|
|
// for (int i = 0; i < orderId.size(); i++) {
|
|
|
// try {
|
|
|
// Long followId = orderId.get(i);
|
|
|
// Followup followup = followupDao.findOne(followId);
|
|
|
// if (null==followup){
|
|
|
// continue;
|
|
|
// }
|
|
|
// if (!"8".equals(followup.getFollowupClass())){
|
|
|
// continue;
|
|
|
// }
|
|
|
//
|
|
|
// String fileName = "入户访视详情_"+followup.getPatientName()+"_"+followId+".doc";;
|
|
|
// j = j + 1;
|
|
|
//// fileName = URLEncoder.encode(fileName, "utf-8");
|
|
|
// fileName = java.net.URLEncoder.encode(fileName,"UTF-8");
|
|
|
// fileName = java.net.URLDecoder.decode(fileName,"UTF-8");
|
|
|
//// response.setHeader("Content-Disposition", "attachment;filename=" + new String( fileName.getBytes(), "iso-8859-1"));
|
|
|
// response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
|
// String pathName = this.getClass().getResource("/").getPath() + "health_examination.mht";
|
|
|
// Document doc = Jsoup.parse(new File(pathName), "UTF-8");
|
|
|
// String html = this.handleHealthExamData(doc, orderId.get(i),followup);
|
|
|
// if (StringUtils.isNotBlank(html)){
|
|
|
// BufferedWriter bw = new BufferedWriter(new FileWriter(path+"/"+fileName));//创建的文件
|
|
|
// bw.write(html);
|
|
|
// bw.close();
|
|
|
// File zipFile = new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
|
|
|
// if (zipFile.exists()) {
|
|
|
// zipFile.delete();
|
|
|
// }
|
|
|
// }
|
|
|
// }catch (Exception e){
|
|
|
// e.printStackTrace();
|
|
|
// continue;
|
|
|
// }
|
|
|
// }
|
|
|
// System.out.println("Word生成结束:"+sdf.format(new Date()));
|
|
|
// // 打包文件夹
|
|
|
// if (FileUtil.fileToZip(path, path.replace(exportConclusionList, ""), zipFileName)) {
|
|
|
// return new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
|
|
|
// } else {
|
|
|
// return null;
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// public String handleHealthExamData(Document doc, Long orderId, Followup followup) throws Exception {
|
|
|
// String html = doc.toString();
|
|
|
// //根据随访ID获取随访记录详情
|
|
|
// OlderPeopleHealthCheckRecordES olderPeopleHealthCheckRecord = visitDetailService.getOlderPeopleHealthCheckRecord(orderId+"",null);
|
|
|
// if (null==olderPeopleHealthCheckRecord){
|
|
|
// return null;
|
|
|
// }
|
|
|
// html = html.replace("${patientName}", null==olderPeopleHealthCheckRecord.getName()?"":olderPeopleHealthCheckRecord.getName());
|
|
|
// html = html.replace("${idcard}", null==olderPeopleHealthCheckRecord.getIdcard()?"":olderPeopleHealthCheckRecord.getIdcard());
|
|
|
// html = html.replace("${number}", null==olderPeopleHealthCheckRecord.getNumber()?"":olderPeopleHealthCheckRecord.getNumber());
|
|
|
// html = html.replace("${duty}", null==olderPeopleHealthCheckRecord.getDuty()?" ":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getDuty()));
|
|
|
// html = html.replace("${responsibility_doctor_name}",olderPeopleHealthCheckRecord.getResponsibility_doctor_name());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getSymptom()){
|
|
|
// html = html.replace("${symptom}"," ");
|
|
|
// }else {
|
|
|
// StringBuilder symptomName = new StringBuilder();
|
|
|
// String symptom = olderPeopleHealthCheckRecord.getSymptom();
|
|
|
// String[] symptoms = symptom.split(",");
|
|
|
// for (String tmp:symptoms){
|
|
|
// symptomName.append(getSymptomName(tmp));
|
|
|
// }
|
|
|
// html = html.replace("${symptom}",symptomName.toString());
|
|
|
// }
|
|
|
// html = html.replace("${symptom_other}",olderPeopleHealthCheckRecord.getSymptom_other());
|
|
|
// /**一般状况**/
|
|
|
// html = html.replace("${temperature}",null==olderPeopleHealthCheckRecord.getTemperature()?" ":olderPeopleHealthCheckRecord.getTemperature()+"");
|
|
|
// html = html.replace("${pulse_frequency}",olderPeopleHealthCheckRecord.getPulse_frequency());
|
|
|
// html = html.replace("${breath_frequency}",olderPeopleHealthCheckRecord.getBreath_frequency());
|
|
|
// html = html.replace("${blood_pressure_left_low}",null==olderPeopleHealthCheckRecord.getBlood_pressure_left_low()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_left_low()+"");
|
|
|
// html = html.replace("${blood_pressure_left_high}",null==olderPeopleHealthCheckRecord.getBlood_pressure_left_high()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_left_high()+"");
|
|
|
// html = html.replace("${blood_pressure_right_low}",null==olderPeopleHealthCheckRecord.getBlood_pressure_right_low()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_right_low()+"");
|
|
|
// html = html.replace("${blood_pressure_right_high}",null==olderPeopleHealthCheckRecord.getBlood_pressure_right_high()?" ":olderPeopleHealthCheckRecord.getBlood_pressure_right_high()+"");
|
|
|
// html = html.replace("${height}",null==olderPeopleHealthCheckRecord.getHeight()?" ":olderPeopleHealthCheckRecord.getHeight()+"");
|
|
|
// html = html.replace("${weight}",null==olderPeopleHealthCheckRecord.getWeight()?" ":olderPeopleHealthCheckRecord.getWeight()+"");
|
|
|
// html = html.replace("${waistline}",null==olderPeopleHealthCheckRecord.getWaistline()?" ":olderPeopleHealthCheckRecord.getWaistline()+"");
|
|
|
// html = html.replace("${BMI}",null==olderPeopleHealthCheckRecord.getBMI()?" ":olderPeopleHealthCheckRecord.getBMI()+"");
|
|
|
// if (null==olderPeopleHealthCheckRecord.getHealth_status()){
|
|
|
// html = html.replace("${health_status}"," ");
|
|
|
// }else {
|
|
|
// Integer health_status = olderPeopleHealthCheckRecord.getHealth_status();
|
|
|
// switch (health_status){
|
|
|
// case 1:html = html.replace("${health_status}","满意");break;
|
|
|
// case 2:html = html.replace("${health_status}","基本满意");break;
|
|
|
// case 3:html = html.replace("${health_status}","说不清");break;
|
|
|
// case 4:html = html.replace("${health_status}","不太满意");break;
|
|
|
// case 5:html = html.replace("${health_status}","不满意");break;
|
|
|
// default:html = html.replace("${health_status}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getSelfcare_ability()){
|
|
|
// html = html.replace("${selfcare_ability}"," ");
|
|
|
// }else {
|
|
|
// Integer selfcare_ability = olderPeopleHealthCheckRecord.getSelfcare_ability();
|
|
|
// switch (selfcare_ability){
|
|
|
// case 1:html = html.replace("${selfcare_ability}","可自理(0~3)分");break;
|
|
|
// case 2:html = html.replace("${selfcare_ability}","轻度依赖(4~8)分");break;
|
|
|
// case 3:html = html.replace("${selfcare_ability}","中度依赖(9~18)分");break;
|
|
|
// case 4:html = html.replace("${selfcare_ability}","不能自理(≥19)分");break;
|
|
|
// default:html = html.replace("${selfcare_ability}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getCognitive_function()){
|
|
|
// html = html.replace("${cognitive_function}"," ");
|
|
|
// }else {
|
|
|
// Integer cognitiveFunction = olderPeopleHealthCheckRecord.getCognitive_function();
|
|
|
// switch (cognitiveFunction){
|
|
|
// case 1:html = html.replace("${cognitive_function}","粗筛阴性");break;
|
|
|
// case 2:html = html.replace("${cognitive_function}","粗筛阳性");break;
|
|
|
// default:html = html.replace("${cognitive_function}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${cognitive_function_score}",null==olderPeopleHealthCheckRecord.getCognitive_function_score()?" ":olderPeopleHealthCheckRecord.getCognitive_function_score()+"");
|
|
|
// if (null==olderPeopleHealthCheckRecord.getEmotional_state()){
|
|
|
// html = html.replace("${emotional_state}"," ");
|
|
|
// }else {
|
|
|
// Integer emotionalState = olderPeopleHealthCheckRecord.getEmotional_state();
|
|
|
// switch (emotionalState){
|
|
|
// case 1:html = html.replace("${emotional_state}","粗筛阴性");break;
|
|
|
// case 2:html = html.replace("${emotional_state}","粗筛阳性");break;
|
|
|
// default:html = html.replace("${emotional_state}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${emotional_state_score}",null==olderPeopleHealthCheckRecord.getEmotional_state_score()?" ":olderPeopleHealthCheckRecord.getEmotional_state_score()+"");
|
|
|
// /**体育锻炼**/
|
|
|
// if (null==olderPeopleHealthCheckRecord.getExercise_frequency()){
|
|
|
// html = html.replace("${exercise_frequency}"," ");
|
|
|
// }else {
|
|
|
// Integer exerciseFrequency = olderPeopleHealthCheckRecord.getExercise_frequency();
|
|
|
// switch (exerciseFrequency){
|
|
|
// case 1:html = html.replace("${exercise_frequency}","每天");break;
|
|
|
// case 2:html = html.replace("${exercise_frequency}","每周一次以上");break;
|
|
|
// case 3:html = html.replace("${exercise_frequency}","偶尔");break;
|
|
|
// case 4:html = html.replace("${exercise_frequency}","不锻炼");break;
|
|
|
// default:html = html.replace("${exercise_frequency}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${exercise_time}",null==olderPeopleHealthCheckRecord.getExercise_time()?" ":olderPeopleHealthCheckRecord.getExercise_time()+"");
|
|
|
// html = html.replace("${sustain_exercise_time}",null==olderPeopleHealthCheckRecord.getSustain_exercise_time()?" ":olderPeopleHealthCheckRecord.getSustain_exercise_time()+"");
|
|
|
// html = html.replace("${exercise_type}",null==olderPeopleHealthCheckRecord.getExercise_type()?" ":olderPeopleHealthCheckRecord.getExercise_type()+"");
|
|
|
// /**饮食习惯**/
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDietary_habit()){
|
|
|
// html = html.replace("${dietary_habit}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getDietary_habit();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="荤素均衡 ";break;
|
|
|
// case "2":valueStrTmp+="荤食为主 ";break;
|
|
|
// case "3":valueStrTmp+="素食为主 ";break;
|
|
|
// case "4":valueStrTmp+="嗜盐 ";break;
|
|
|
// case "5":valueStrTmp+="嗜油 ";break;
|
|
|
// case "6":valueStrTmp+="嗜糖 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${dietary_habit}",valueStrTmp);
|
|
|
// }
|
|
|
//
|
|
|
// /**吸烟情况**/
|
|
|
// if (null==olderPeopleHealthCheckRecord.getSmoking_state()){
|
|
|
// html = html.replace("${smoking_state}"," ");
|
|
|
// }else {
|
|
|
// Integer smokingState = olderPeopleHealthCheckRecord.getSmoking_state();
|
|
|
// switch (smokingState){
|
|
|
// case 1:html = html.replace("${smoking_state}","从不吸烟");break;
|
|
|
// case 2:html = html.replace("${smoking_state}","已戒烟");break;
|
|
|
// case 3:html = html.replace("${smoking_state}","吸烟");break;
|
|
|
// default:html = html.replace("${smoking_state}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${smoking_daily}",null==olderPeopleHealthCheckRecord.getSmoking_daily()?" ":olderPeopleHealthCheckRecord.getSmoking_daily()+"");
|
|
|
// html = html.replace("${start_smoking_age}",null==olderPeopleHealthCheckRecord.getStart_smoking_age()?" ":olderPeopleHealthCheckRecord.getStart_smoking_age()+"");
|
|
|
// html = html.replace("${stop_smoking_age}",null==olderPeopleHealthCheckRecord.getStop_smoking_age()?" ":olderPeopleHealthCheckRecord.getStop_smoking_age()+"");
|
|
|
// /**饮酒情况**/
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDrinking_frequency()){
|
|
|
// html = html.replace("${drinking_frequency}"," ");
|
|
|
// }else {
|
|
|
// Integer drinkingFrequency = olderPeopleHealthCheckRecord.getDrinking_frequency();
|
|
|
// switch (drinkingFrequency){
|
|
|
// case 1:html = html.replace("${drinking_frequency}","从不");break;
|
|
|
// case 2:html = html.replace("${drinking_frequency}","偶尔");break;
|
|
|
// case 3:html = html.replace("${drinking_frequency}","经常");break;
|
|
|
// case 4:html = html.replace("${drinking_frequency}","每天");break;
|
|
|
// default:html = html.replace("${drinking_frequency}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${drinking_daily}",null==olderPeopleHealthCheckRecord.getDrinking_daily()?" ":olderPeopleHealthCheckRecord.getDrinking_daily()+"");
|
|
|
//
|
|
|
// if (null==olderPeopleHealthCheckRecord.getIs_stop_drinking()){
|
|
|
// html = html.replace("${is_stop_drinking}"," ");
|
|
|
// }else {
|
|
|
// Integer isStopDrinking = olderPeopleHealthCheckRecord.getIs_stop_drinking();
|
|
|
// switch (isStopDrinking){
|
|
|
// case 1:html = html.replace("${is_stop_drinking}","否");break;
|
|
|
// case 2:html = html.replace("${is_stop_drinking}","是");break;
|
|
|
// default:html = html.replace("${is_stop_drinking}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${stop_drinking_age}",null==olderPeopleHealthCheckRecord.getStop_drinking_age()?" ":olderPeopleHealthCheckRecord.getStop_drinking_age()+"");
|
|
|
// html = html.replace("${start_drinking_age}",null==olderPeopleHealthCheckRecord.getStart_drinking_age()?" ":olderPeopleHealthCheckRecord.getStart_drinking_age()+"");
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDrunkenness()){
|
|
|
// html = html.replace("${drunkenness}"," ");
|
|
|
// }else {
|
|
|
// Integer drunkenness = olderPeopleHealthCheckRecord.getDrunkenness();
|
|
|
// switch (drunkenness){
|
|
|
// case 1:html = html.replace("${drunkenness}","是");break;
|
|
|
// case 2:html = html.replace("${drunkenness}","否");break;
|
|
|
// default:html = html.replace("${drunkenness}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDrinking_type()){
|
|
|
// html = html.replace("${drinking_type}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getDrinking_type();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="白酒 ";break;
|
|
|
// case "2":valueStrTmp+="啤酒 ";break;
|
|
|
// case "3":valueStrTmp+="红酒 ";break;
|
|
|
// case "4":valueStrTmp+="黄酒 ";break;
|
|
|
// case "5":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${drinking_type}",valueStrTmp);
|
|
|
// }
|
|
|
// html = html.replace("${other_drinking_type}",null==olderPeopleHealthCheckRecord.getOther_drinking_type()?" ":olderPeopleHealthCheckRecord.getOther_drinking_type());
|
|
|
// /**职业病危害因素接触史**/
|
|
|
// html = html.replace("${dust}",null==olderPeopleHealthCheckRecord.getDust()?" ":olderPeopleHealthCheckRecord.getDust());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDust_protective_measures()){
|
|
|
// html = html.replace("${dust_protective_measures}"," ");
|
|
|
// }else {
|
|
|
// Integer dustProtectiveMeasures = olderPeopleHealthCheckRecord.getDust_protective_measures();
|
|
|
// switch (dustProtectiveMeasures){
|
|
|
// case 1:html = html.replace("${dust_protective_measures}","无");break;
|
|
|
// case 2:html = html.replace("${dust_protective_measures}","有");break;
|
|
|
// default:html = html.replace("${dust_protective_measures}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${dust_protective_measures_has}",null==olderPeopleHealthCheckRecord.getDust_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getDust_protective_measures_has());
|
|
|
// html = html.replace("${radiogen}",null==olderPeopleHealthCheckRecord.getRadiogen()?" ":olderPeopleHealthCheckRecord.getRadiogen());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getRadiogen_protective_measures()){
|
|
|
// html = html.replace("${radiogen_protective_measures}"," ");
|
|
|
// }else {
|
|
|
// Integer radiogenProtectiveMeasures = olderPeopleHealthCheckRecord.getRadiogen_protective_measures();
|
|
|
// switch (radiogenProtectiveMeasures){
|
|
|
// case 1:html = html.replace("${radiogen_protective_measures}","无");break;
|
|
|
// case 2:html = html.replace("${radiogen_protective_measures}","有");break;
|
|
|
// default:html = html.replace("${radiogen_protective_measures}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${radiogen_protective_measures_has}",null==olderPeopleHealthCheckRecord.getRadiogen_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getRadiogen_protective_measures_has());
|
|
|
// html = html.replace("${physical_factor}",null==olderPeopleHealthCheckRecord.getPhysical_factor()?" ":olderPeopleHealthCheckRecord.getPhysical_factor());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getPhysical_protective_measures()){
|
|
|
// html = html.replace("${physical_protective_measures}"," ");
|
|
|
// }else {
|
|
|
// Integer physicalProtectiveMeasures = olderPeopleHealthCheckRecord.getPhysical_protective_measures();
|
|
|
// switch (physicalProtectiveMeasures){
|
|
|
// case 1:html = html.replace("${physical_protective_measures}","无");break;
|
|
|
// case 2:html = html.replace("${physical_protective_measures}","有");break;
|
|
|
// default:html = html.replace("${physical_protective_measures}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${physical_protective_measures_has}",null==olderPeopleHealthCheckRecord.getPhysical_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getPhysical_protective_measures_has());
|
|
|
// html = html.replace("${chemical_factor}",null==olderPeopleHealthCheckRecord.getChemical_factor()?" ":olderPeopleHealthCheckRecord.getChemical_factor());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getChemical_protective_measures()){
|
|
|
// html = html.replace("${chemical_protective_measures}"," ");
|
|
|
// }else {
|
|
|
// Integer chemicalProtectiveMeasures = olderPeopleHealthCheckRecord.getChemical_protective_measures();
|
|
|
// switch (chemicalProtectiveMeasures){
|
|
|
// case 1:html = html.replace("${chemical_protective_measures}","无");break;
|
|
|
// case 2:html = html.replace("${chemical_protective_measures}","有");break;
|
|
|
// default:html = html.replace("${chemical_protective_measures}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${chemical_protective_measures_has}",null==olderPeopleHealthCheckRecord.getChemical_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getChemical_protective_measures_has());
|
|
|
// html = html.replace("${physical_protective_measures_has}",null==olderPeopleHealthCheckRecord.getPhysical_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getPhysical_protective_measures_has());
|
|
|
// html = html.replace("${other_hazard_factors}",null==olderPeopleHealthCheckRecord.getOther_hazard_factors()?" ":olderPeopleHealthCheckRecord.getOther_hazard_factors());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getOther_hazard_protective_measures()){
|
|
|
// html = html.replace("${other_hazard_protective_measures}"," ");
|
|
|
// }else {
|
|
|
// Integer other_hazard_protective_measures = olderPeopleHealthCheckRecord.getOther_hazard_protective_measures();
|
|
|
// switch (other_hazard_protective_measures){
|
|
|
// case 1:html = html.replace("${other_hazard_protective_measures}","无");break;
|
|
|
// case 2:html = html.replace("${other_hazard_protective_measures}","有");break;
|
|
|
// default:html = html.replace("${other_hazard_protective_measures}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${other_hazard_protective_measures_has}",null==olderPeopleHealthCheckRecord.getOther_hazard_protective_measures_has()?" ":olderPeopleHealthCheckRecord.getOther_hazard_protective_measures_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getLip()){
|
|
|
// html = html.replace("${lip}"," ");
|
|
|
// }else {
|
|
|
// Integer lip = olderPeopleHealthCheckRecord.getLip();
|
|
|
// switch (lip){
|
|
|
// case 1:html = html.replace("${lip}","红润");break;
|
|
|
// case 2:html = html.replace("${lip}","苍白");break;
|
|
|
// case 3:html = html.replace("${lip}","发钳");break;
|
|
|
// case 4:html = html.replace("${lip}","皲裂");break;
|
|
|
// case 5:html = html.replace("${lip}","疱疹");break;
|
|
|
// default:html = html.replace("${lip}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDentition()){
|
|
|
// html = html.replace("${dentition}"," ");
|
|
|
// }else {
|
|
|
// Integer dentition = olderPeopleHealthCheckRecord.getDentition();
|
|
|
// switch (dentition){
|
|
|
// case 1:html = html.replace("${dentition}","正常");break;
|
|
|
// case 2:html = html.replace("${dentition}","缺齿");break;
|
|
|
// case 3:html = html.replace("${dentition}","龋齿");break;
|
|
|
// case 4:html = html.replace("${dentition}","义齿,假牙");break;
|
|
|
// default:html = html.replace("${dentition}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getOropharynx()){
|
|
|
// html = html.replace("${oropharynx}"," ");
|
|
|
// }else {
|
|
|
// Integer oropharynx = olderPeopleHealthCheckRecord.getOropharynx();
|
|
|
// switch (oropharynx){
|
|
|
// case 1:html = html.replace("${oropharynx}","无充血");break;
|
|
|
// case 2:html = html.replace("${oropharynx}","充血");break;
|
|
|
// case 3:html = html.replace("${oropharynx}","淋巴滤泡增生");break;
|
|
|
// default:html = html.replace("${oropharynx}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${left_eyesight}",null==olderPeopleHealthCheckRecord.getLeft_eyesight()?"":olderPeopleHealthCheckRecord.getLeft_eyesight()+"");
|
|
|
// html = html.replace("${right_eyesight}",null==olderPeopleHealthCheckRecord.getRight_eyesight()?"":olderPeopleHealthCheckRecord.getRight_eyesight()+"");
|
|
|
// html = html.replace("${left_correctional_eyesight}",null==olderPeopleHealthCheckRecord.getLeft_correctional_eyesight()?"":olderPeopleHealthCheckRecord.getLeft_correctional_eyesight()+"");
|
|
|
// html = html.replace("${right_correctional_eyesight}",null==olderPeopleHealthCheckRecord.getRight_correctional_eyesight()?"":olderPeopleHealthCheckRecord.getRight_correctional_eyesight()+"");
|
|
|
// if (null==olderPeopleHealthCheckRecord.getHearing()){
|
|
|
// html = html.replace("${hearing}"," ");
|
|
|
// }else {
|
|
|
// Integer hearing = olderPeopleHealthCheckRecord.getHearing();
|
|
|
// switch (hearing){
|
|
|
// case 1:html = html.replace("${hearing}","听见");break;
|
|
|
// case 2:html = html.replace("${hearing}","听不清或无法听见");break;
|
|
|
// default:html = html.replace("${hearing}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getMotor_function()){
|
|
|
// html = html.replace("${motor_function}"," ");
|
|
|
// }else {
|
|
|
// Integer motor_function = olderPeopleHealthCheckRecord.getMotor_function();
|
|
|
// switch (motor_function){
|
|
|
// case 1:html = html.replace("${motor_function}","可顺利完成");break;
|
|
|
// case 2:html = html.replace("${motor_function}","无法独立完成任何一个动作");break;
|
|
|
// default:html = html.replace("${motor_function}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getFundus()){
|
|
|
// html = html.replace("${fundus}"," ");
|
|
|
// }else {
|
|
|
// Integer function = olderPeopleHealthCheckRecord.getFundus();
|
|
|
// switch (function){
|
|
|
// case 1:html = html.replace("${fundus}","正常");break;
|
|
|
// case 2:html = html.replace("${fundus}","异常");break;
|
|
|
// default:html = html.replace("${fundus}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${fundus_abnormal}",null==olderPeopleHealthCheckRecord.getFundus_abnormal()?"":olderPeopleHealthCheckRecord.getFundus_abnormal());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getSkin()){
|
|
|
// html = html.replace("${skin}"," ");
|
|
|
// }else {
|
|
|
// Integer skin = olderPeopleHealthCheckRecord.getSkin();
|
|
|
// switch (skin){
|
|
|
// case 1:html = html.replace("${skin}","正常");break;
|
|
|
// case 2:html = html.replace("${skin}","潮红");break;
|
|
|
// case 3:html = html.replace("${skin}","苍白");break;
|
|
|
// case 4:html = html.replace("${skin}","发钳");break;
|
|
|
// case 5:html = html.replace("${skin}","黄染");break;
|
|
|
// case 6:html = html.replace("${skin}","色素沉着");break;
|
|
|
// case 7:html = html.replace("${skin}","其他");break;
|
|
|
// default:html = html.replace("${skin}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${skin_other}",null==olderPeopleHealthCheckRecord.getSkin_other()?"":olderPeopleHealthCheckRecord.getSkin_other());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getSclera()){
|
|
|
// html = html.replace("${sclera}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getSclera();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${sclera}","正常");break;
|
|
|
// case 2:html = html.replace("${sclera}","黄染");break;
|
|
|
// case 3:html = html.replace("${sclera}","充血");break;
|
|
|
// case 4:html = html.replace("${sclera}","其他");break;
|
|
|
// default:html = html.replace("${sclera}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${sclera_other}",null==olderPeopleHealthCheckRecord.getSclera_other()?"":olderPeopleHealthCheckRecord.getSclera_other());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getLymphaden()){
|
|
|
// html = html.replace("${lymphaden}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getLymphaden();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${lymphaden}","未触及");break;
|
|
|
// case 2:html = html.replace("${lymphaden}","锁骨上");break;
|
|
|
// case 3:html = html.replace("${lymphaden}","腋窝");break;
|
|
|
// case 4:html = html.replace("${lymphaden}","其他");break;
|
|
|
// default:html = html.replace("${lymphaden}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${lymphaden_other}",null==olderPeopleHealthCheckRecord.getLymphaden_other()?"":olderPeopleHealthCheckRecord.getLymphaden_other());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getBarrel_chest()){
|
|
|
// html = html.replace("${barrel_chest}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getBarrel_chest();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${barrel_chest}","否");break;
|
|
|
// case 2:html = html.replace("${barrel_chest}","是");break;
|
|
|
// default:html = html.replace("${barrel_chest}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getBreath_sounds()){
|
|
|
// html = html.replace("${breath_sounds}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getBreath_sounds();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${breath_sounds}","正常");break;
|
|
|
// case 2:html = html.replace("${breath_sounds}","异常");break;
|
|
|
// default:html = html.replace("${breath_sounds}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${breath_sounds_abnormal}",null==olderPeopleHealthCheckRecord.getBreath_sounds_abnormal()?"":olderPeopleHealthCheckRecord.getBreath_sounds_abnormal());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getRale()){
|
|
|
// html = html.replace("${rale}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getRale();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${rale}","无");break;
|
|
|
// case 2:html = html.replace("${rale}","干罗音");break;
|
|
|
// case 3:html = html.replace("${rale}","湿罗音");break;
|
|
|
// case 4:html = html.replace("${rale}","其他");break;
|
|
|
// default:html = html.replace("${rale}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${rale_abnormal}",null==olderPeopleHealthCheckRecord.getRale_abnormal()?"":olderPeopleHealthCheckRecord.getRale_abnormal());
|
|
|
// html = html.replace("${heart_rate}",null==olderPeopleHealthCheckRecord.getHeart_rate()?"":olderPeopleHealthCheckRecord.getHeart_rate()+"");
|
|
|
// if (null==olderPeopleHealthCheckRecord.getHeart_rhythm()){
|
|
|
// html = html.replace("${heart_rhythm}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getHeart_rhythm();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${heart_rhythm}","齐");break;
|
|
|
// case 2:html = html.replace("${heart_rhythm}","不齐");break;
|
|
|
// case 3:html = html.replace("${heart_rhythm}","绝对不齐");break;
|
|
|
// default:html = html.replace("${heart_rhythm}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getHeart_noise()){
|
|
|
// html = html.replace("${heart_noise}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getHeart_noise();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${heart_noise}","无");break;
|
|
|
// case 2:html = html.replace("${heart_noise}","有");break;
|
|
|
// default:html = html.replace("${heart_noise}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${heart_noise_has}",null==olderPeopleHealthCheckRecord.getHeart_noise_has()?"":olderPeopleHealthCheckRecord.getHeart_noise_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getAbdominal_tenderness()){
|
|
|
// html = html.replace("${abdominal_tenderness}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_tenderness();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${abdominal_tenderness}","无");break;
|
|
|
// case 2:html = html.replace("${abdominal_tenderness}","有");break;
|
|
|
// default:html = html.replace("${abdominal_tenderness}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${tenderness_has}",null==olderPeopleHealthCheckRecord.getTenderness_has()?"":olderPeopleHealthCheckRecord.getTenderness_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getAbdominal_mass()){
|
|
|
// html = html.replace("${abdominal_mass}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_mass();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${abdominal_mass}","无");break;
|
|
|
// case 2:html = html.replace("${abdominal_mass}","有");break;
|
|
|
// default:html = html.replace("${abdominal_mass}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${mass_has}",null==olderPeopleHealthCheckRecord.getMass_has()?"":olderPeopleHealthCheckRecord.getMass_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getAbdominal_hepatomegaly()){
|
|
|
// html = html.replace("${abdominal_hepatomegaly}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_hepatomegaly();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${abdominal_hepatomegaly}","无");break;
|
|
|
// case 2:html = html.replace("${abdominal_hepatomegaly}","有");break;
|
|
|
// default:html = html.replace("${abdominal_hepatomegaly}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${hepatomegaly_has}",null==olderPeopleHealthCheckRecord.getHepatomegaly_has()?"":olderPeopleHealthCheckRecord.getHepatomegaly_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getAbdominal_spleen_big()){
|
|
|
// html = html.replace("${abdominal_spleen_big}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_spleen_big();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${abdominal_spleen_big}","无");break;
|
|
|
// case 2:html = html.replace("${abdominal_spleen_big}","有");break;
|
|
|
// default:html = html.replace("${abdominal_spleen_big}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${spleen_big_has}",null==olderPeopleHealthCheckRecord.getSpleen_big_has()?"":olderPeopleHealthCheckRecord.getSpleen_big_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getAbdominal_shifting_dullness()){
|
|
|
// html = html.replace("${abdominal_shifting_dullness}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAbdominal_shifting_dullness();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${abdominal_shifting_dullness}","无");break;
|
|
|
// case 2:html = html.replace("${abdominal_shifting_dullness}","有");break;
|
|
|
// default:html = html.replace("${abdominal_shifting_dullness}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${shifting_dullness_has}",null==olderPeopleHealthCheckRecord.getShifting_dullness_has()?"":olderPeopleHealthCheckRecord.getShifting_dullness_has());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getCrura_edema()){
|
|
|
// html = html.replace("${crura_edema}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getCrura_edema();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${crura_edema}","无");break;
|
|
|
// case 2:html = html.replace("${crura_edema}","单侧");break;
|
|
|
// case 3:html = html.replace("${crura_edema}","双侧不对称");break;
|
|
|
// case 4:html = html.replace("${crura_edema}","双侧对称");break;
|
|
|
// default:html = html.replace("${crura_edema}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getDorsal_foot_pulse()){
|
|
|
// html = html.replace("${dorsal_foot_pulse}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getDorsal_foot_pulse();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${dorsal_foot_pulse}","未接触");break;
|
|
|
// case 2:html = html.replace("${dorsal_foot_pulse}","触及双侧对称");break;
|
|
|
// case 3:html = html.replace("${dorsal_foot_pulse}","触及左侧弱或消失");break;
|
|
|
// case 4:html = html.replace("${dorsal_foot_pulse}","触及右侧弱或消失");break;
|
|
|
// default:html = html.replace("${dorsal_foot_pulse}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if (null==olderPeopleHealthCheckRecord.getAnus_dre()){
|
|
|
// html = html.replace("${anus_dre}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAnus_dre();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${anus_dre}","未见异常");break;
|
|
|
// case 2:html = html.replace("${anus_dre}","触痛");break;
|
|
|
// case 3:html = html.replace("${anus_dre}","包块");break;
|
|
|
// case 4:html = html.replace("${anus_dre}","前列腺异常");break;
|
|
|
// case 5:html = html.replace("${anus_dre}","其他");break;
|
|
|
// default:html = html.replace("${anus_dre}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${anus_dre_other}",null==olderPeopleHealthCheckRecord.getAnus_dre_other()?"":olderPeopleHealthCheckRecord.getAnus_dre_other());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getBreast()){
|
|
|
// html = html.replace("${breast}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getBreast();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="未见异常 ";break;
|
|
|
// case "2":valueStrTmp+="乳房切除 ";break;
|
|
|
// case "3":valueStrTmp+="异常泌乳 ";break;
|
|
|
// case "4":valueStrTmp+="乳腺包块 ";break;
|
|
|
// case "5":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${breast}",valueStrTmp);
|
|
|
// }
|
|
|
// html = html.replace("${breast_other}",null==olderPeopleHealthCheckRecord.getBreast_other()?"":olderPeopleHealthCheckRecord.getBreast_other());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getVulva()){
|
|
|
// html = html.replace("${vulva}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getVulva();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${vulva}","未见异常");break;
|
|
|
// case 2:html = html.replace("${vulva}","异常");break;
|
|
|
// default:html = html.replace("${vulva}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${vulva_abnormal}",null==olderPeopleHealthCheckRecord.getVulva_abnormal()?"":olderPeopleHealthCheckRecord.getVulva_abnormal());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getVagina()){
|
|
|
// html = html.replace("${vagina}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getVagina();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${vagina}","未见异常");break;
|
|
|
// case 2:html = html.replace("${vagina}","异常");break;
|
|
|
// default:html = html.replace("${vagina}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${vagina_abnormal}",null==olderPeopleHealthCheckRecord.getVagina_abnormal()?"":olderPeopleHealthCheckRecord.getVagina_abnormal());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getCervical()){
|
|
|
// html = html.replace("${cervical}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getCervical();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${cervical}","未见异常");break;
|
|
|
// case 2:html = html.replace("${cervical}","异常");break;
|
|
|
// default:html = html.replace("${cervical}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${cervical_abnormal}",null==olderPeopleHealthCheckRecord.getCervical_abnormal()?"":olderPeopleHealthCheckRecord.getCervical_abnormal());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getCorpus()){
|
|
|
// html = html.replace("${corpus}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getCorpus();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${corpus}","未见异常");break;
|
|
|
// case 2:html = html.replace("${corpus}","异常");break;
|
|
|
// default:html = html.replace("${corpus}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${corpus_abnormal}",null==olderPeopleHealthCheckRecord.getCorpus_abnormal()?"":olderPeopleHealthCheckRecord.getCorpus_abnormal());
|
|
|
// if (null==olderPeopleHealthCheckRecord.getGynecologic_appendix()){
|
|
|
// html = html.replace("${gynecologic_appendix}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getGynecologic_appendix();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${gynecologic_appendix}","未见异常");break;
|
|
|
// case 2:html = html.replace("${gynecologic_appendix}","异常");break;
|
|
|
// default:html = html.replace("${gynecologic_appendix}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${appendix_abnormal}",null==olderPeopleHealthCheckRecord.getAppendix_abnormal()?"":olderPeopleHealthCheckRecord.getAppendix_abnormal());
|
|
|
// html = html.replace("${physical_examination_other}",null==olderPeopleHealthCheckRecord.getPhysical_examination_other()?"":olderPeopleHealthCheckRecord.getPhysical_examination_other());
|
|
|
// html = html.replace("${hemoglobin}",null==olderPeopleHealthCheckRecord.getHemoglobin()?"":olderPeopleHealthCheckRecord.getHemoglobin()+"");
|
|
|
// html = html.replace("${leukocyte}",null==olderPeopleHealthCheckRecord.getLeukocyte()?"":olderPeopleHealthCheckRecord.getLeukocyte()+"");
|
|
|
// html = html.replace("${thrombocyte}",null==olderPeopleHealthCheckRecord.getThrombocyte()?"":olderPeopleHealthCheckRecord.getThrombocyte()+"");
|
|
|
// html = html.replace("${blood_routine_other}",null==olderPeopleHealthCheckRecord.getBlood_routine_other()?"":olderPeopleHealthCheckRecord.getBlood_routine_other()+"");
|
|
|
// html = html.replace("${urine_protein}",null==olderPeopleHealthCheckRecord.getUrine_protein()?"":olderPeopleHealthCheckRecord.getUrine_protein()+"");
|
|
|
// html = html.replace("${urine_sugar}",null==olderPeopleHealthCheckRecord.getUrine_sugar()?"":olderPeopleHealthCheckRecord.getUrine_sugar()+"");
|
|
|
// html = html.replace("${urine_acetone_bodies}",null==olderPeopleHealthCheckRecord.getUrine_acetone_bodies()?"":olderPeopleHealthCheckRecord.getUrine_acetone_bodies()+"");
|
|
|
// html = html.replace("${urine_occult_blood}",null==olderPeopleHealthCheckRecord.getUrine_occult_blood()?"":olderPeopleHealthCheckRecord.getUrine_occult_blood()+"");
|
|
|
// html = html.replace("${urine_routine_other}",null==olderPeopleHealthCheckRecord.getUrine_routine_other()?"":olderPeopleHealthCheckRecord.getUrine_routine_other()+"");
|
|
|
// html = html.replace("${fasting_blood_glucose_L}",null==olderPeopleHealthCheckRecord.getFasting_blood_glucose_L()?"":olderPeopleHealthCheckRecord.getFasting_blood_glucose_L()+"");
|
|
|
// html = html.replace("${fasting_blood_glucose_dL}",null==olderPeopleHealthCheckRecord.getFasting_blood_glucose_dL()?"":olderPeopleHealthCheckRecord.getFasting_blood_glucose_dL()+"");
|
|
|
// if (null==olderPeopleHealthCheckRecord.getElectrocardiogram()){
|
|
|
// html = html.replace("${electrocardiogram}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getElectrocardiogram();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${electrocardiogram}","正常");break;
|
|
|
// case 2:html = html.replace("${electrocardiogram}","异常");break;
|
|
|
// default:html = html.replace("${electrocardiogram}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${electrocardiogram_abnormal}",null==olderPeopleHealthCheckRecord.getElectrocardiogram_abnormal()?"":olderPeopleHealthCheckRecord.getElectrocardiogram_abnormal()+"");
|
|
|
// html = html.replace("${microalbuminuria}",null==olderPeopleHealthCheckRecord.getMicroalbuminuria()?"":olderPeopleHealthCheckRecord.getMicroalbuminuria()+"");
|
|
|
// if(null==olderPeopleHealthCheckRecord.getOccult_blood_in_stool()){
|
|
|
// html = html.replace("${occult_blood_in_stool}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getOccult_blood_in_stool();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${occult_blood_in_stool}","阴性");break;
|
|
|
// case 2:html = html.replace("${occult_blood_in_stool}","阳性");break;
|
|
|
// default:html = html.replace("${occult_blood_in_stool}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${glycated_hemoglobin}",null==olderPeopleHealthCheckRecord.getGlycated_hemoglobin()?"":olderPeopleHealthCheckRecord.getGlycated_hemoglobin()+"");
|
|
|
// if(null==olderPeopleHealthCheckRecord.getHBsAg()){
|
|
|
// html = html.replace("${HBsAg}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getHBsAg();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${HBsAg}","阴性");break;
|
|
|
// case 2:html = html.replace("${HBsAg}","阳性");break;
|
|
|
// default:html = html.replace("${HBsAg}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${ALT}",null==olderPeopleHealthCheckRecord.getALT()?"":olderPeopleHealthCheckRecord.getALT()+"");
|
|
|
// html = html.replace("${SGOT}",null==olderPeopleHealthCheckRecord.getSGOT()?"":olderPeopleHealthCheckRecord.getSGOT()+"");
|
|
|
// html = html.replace("${albumin}",null==olderPeopleHealthCheckRecord.getAlbumin()?"":olderPeopleHealthCheckRecord.getAlbumin()+"");
|
|
|
// html = html.replace("${total_bilirubin}",null==olderPeopleHealthCheckRecord.getTotal_bilirubin()?"":olderPeopleHealthCheckRecord.getTotal_bilirubin()+"");
|
|
|
// html = html.replace("${conjugated_bilirubin}",null==olderPeopleHealthCheckRecord.getConjugated_bilirubin()?"":olderPeopleHealthCheckRecord.getConjugated_bilirubin()+"");
|
|
|
// html = html.replace("${serum_creatinine}",null==olderPeopleHealthCheckRecord.getConjugated_bilirubin()?"":olderPeopleHealthCheckRecord.getConjugated_bilirubin()+"");
|
|
|
// html = html.replace("${blood_urea_nitrogen}",null==olderPeopleHealthCheckRecord.getBlood_urea_nitrogen()?"":olderPeopleHealthCheckRecord.getBlood_urea_nitrogen()+"");
|
|
|
// html = html.replace("${blood_potassium_concentration}",null==olderPeopleHealthCheckRecord.getBlood_potassium_concentration()?"":olderPeopleHealthCheckRecord.getBlood_potassium_concentration()+"");
|
|
|
// html = html.replace("${blood_Na_concentration}",null==olderPeopleHealthCheckRecord.getBlood_Na_concentration()?"":olderPeopleHealthCheckRecord.getBlood_Na_concentration()+"");
|
|
|
// html = html.replace("${uric_acid}",null==olderPeopleHealthCheckRecord.getUric_acid()?"":olderPeopleHealthCheckRecord.getUric_acid()+"");
|
|
|
// html = html.replace("${total_cholesterol}",null==olderPeopleHealthCheckRecord.getTotal_cholesterol()?"":olderPeopleHealthCheckRecord.getTotal_cholesterol()+"");
|
|
|
// html = html.replace("${triglyceride}",null==olderPeopleHealthCheckRecord.getTriglyceride()?"":olderPeopleHealthCheckRecord.getTriglyceride()+"");
|
|
|
// html = html.replace("${LDL_cholesterol}",null==olderPeopleHealthCheckRecord.getLDL_cholesterol()?"":olderPeopleHealthCheckRecord.getLDL_cholesterol()+"");
|
|
|
// html = html.replace("${HDL_cholesterol}",null==olderPeopleHealthCheckRecord.getHDL_cholesterol()?"":olderPeopleHealthCheckRecord.getHDL_cholesterol()+"");
|
|
|
// html = html.replace("${alpha_fetal_protein}",null==olderPeopleHealthCheckRecord.getAlpha_fetal_protein()?"":olderPeopleHealthCheckRecord.getAlpha_fetal_protein()+"");
|
|
|
// if(null==olderPeopleHealthCheckRecord.getChest_Xray()){
|
|
|
// html = html.replace("${chest_Xray}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getChest_Xray();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${chest_Xray}","正常");break;
|
|
|
// case 2:html = html.replace("${chest_Xray}","异常");break;
|
|
|
// default:html = html.replace("${chest_Xray}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${chest_Xray_abnormal}",null==olderPeopleHealthCheckRecord.getChest_Xray_abnormal()?"":olderPeopleHealthCheckRecord.getChest_Xray_abnormal());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic()){
|
|
|
// html = html.replace("${abdomen_B_ultrasonic}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${abdomen_B_ultrasonic}","正常");break;
|
|
|
// case 2:html = html.replace("${abdomen_B_ultrasonic}","异常");break;
|
|
|
// default:html = html.replace("${abdomen_B_ultrasonic}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${abdomen_B_ultrasonic_abnormal}",null==olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic_abnormal()?"":olderPeopleHealthCheckRecord.getAbdomen_B_ultrasonic_abnormal());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getB_ultrasonic_other()){
|
|
|
// html = html.replace("${B_ultrasonic_other}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getB_ultrasonic_other();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${B_ultrasonic_other}","正常");break;
|
|
|
// case 2:html = html.replace("${B_ultrasonic_other}","异常");break;
|
|
|
// default:html = html.replace("${B_ultrasonic_other}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${B_ultrasonic_other_abnormal}",null==olderPeopleHealthCheckRecord.getB_ultrasonic_other_abnormal()?"":olderPeopleHealthCheckRecord.getB_ultrasonic_other_abnormal());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getCervical_smear()){
|
|
|
// html = html.replace("${cervical_smear}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getCervical_smear();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${cervical_smear}","正常");break;
|
|
|
// case 2:html = html.replace("${cervical_smear}","异常");break;
|
|
|
// default:html = html.replace("${cervical_smear}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${cervical_smear_abnormal}",null==olderPeopleHealthCheckRecord.getCervical_smear_abnormal()?"":olderPeopleHealthCheckRecord.getCervical_smear_abnormal());
|
|
|
// html = html.replace("${auxiliary_examination_other}",null==olderPeopleHealthCheckRecord.getAuxiliary_examination_other()?"":olderPeopleHealthCheckRecord.getAuxiliary_examination_other());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMild_physical()){
|
|
|
// html = html.replace("${mild_physical}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMild_physical();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${mild_physical}","是");break;
|
|
|
// case 2:html = html.replace("${mild_physical}","倾向是");break;
|
|
|
// default:html = html.replace("${mild_physical}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getQi_deficiency()){
|
|
|
// html = html.replace("${qi_deficiency}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getQi_deficiency();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${qi_deficiency}","是");break;
|
|
|
// case 2:html = html.replace("${qi_deficiency}","基本是");break;
|
|
|
// default:html = html.replace("${qi_deficiency}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getYang_deficiency()){
|
|
|
// html = html.replace("${yang_deficiency}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getYang_deficiency();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${yang_deficiency}","是");break;
|
|
|
// case 2:html = html.replace("${yang_deficiency}","基本是");break;
|
|
|
// default:html = html.replace("${yang_deficiency}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getYin_deficiency()){
|
|
|
// html = html.replace("${yin_deficiency}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getYin_deficiency();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${yin_deficiency}","是");break;
|
|
|
// case 2:html = html.replace("${yin_deficiency}","基本是");break;
|
|
|
// default:html = html.replace("${yin_deficiency}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getPhlegm_dampness()){
|
|
|
// html = html.replace("${phlegm_dampness}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getPhlegm_dampness();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${phlegm_dampness}","是");break;
|
|
|
// case 2:html = html.replace("${phlegm_dampness}","基本是");break;
|
|
|
// default:html = html.replace("${phlegm_dampness}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getDampness_heat()){
|
|
|
// html = html.replace("${dampness_heat}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getDampness_heat();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${dampness_heat}","是");break;
|
|
|
// case 2:html = html.replace("${dampness_heat}","基本是");break;
|
|
|
// default:html = html.replace("${dampness_heat}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getBlood_stasis()){
|
|
|
// html = html.replace("${blood_stasis}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getBlood_stasis();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${blood_stasis}","是");break;
|
|
|
// case 2:html = html.replace("${blood_stasis}","基本是");break;
|
|
|
// default:html = html.replace("${blood_stasis}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getLogistic_regression()){
|
|
|
// html = html.replace("${logistic_regression}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getLogistic_regression();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${logistic_regression}","是");break;
|
|
|
// case 2:html = html.replace("${logistic_regression}","基本是");break;
|
|
|
// default:html = html.replace("${logistic_regression}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getGrasp_quality()){
|
|
|
// html = html.replace("${grasp_quality}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getGrasp_quality();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${grasp_quality}","是");break;
|
|
|
// case 2:html = html.replace("${grasp_quality}","基本是");break;
|
|
|
// default:html = html.replace("${grasp_quality}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getCerebrovascular_disease()){
|
|
|
// html = html.replace("${cerebrovascular_disease}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getCerebrovascular_disease();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="未发现 ";break;
|
|
|
// case "2":valueStrTmp+="缺血性卒中 ";break;
|
|
|
// case "3":valueStrTmp+="脑出血 ";break;
|
|
|
// case "4":valueStrTmp+="蛛网膜下腔出血 ";break;
|
|
|
// case "5":valueStrTmp+="短暂性脑缺血发作 ";break;
|
|
|
// case "6":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${cerebrovascular_disease}",valueStrTmp);
|
|
|
// }
|
|
|
// html = html.replace("${cerebrovascular_disease_other}",null==olderPeopleHealthCheckRecord.getCerebrovascular_disease_other()?"":olderPeopleHealthCheckRecord.getCerebrovascular_disease_other());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getNephropathy()){
|
|
|
// html = html.replace("${nephropathy}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getNephropathy();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="未发现 ";break;
|
|
|
// case "2":valueStrTmp+="糖尿病肾病 ";break;
|
|
|
// case "3":valueStrTmp+="肾功能衰竭 ";break;
|
|
|
// case "4":valueStrTmp+="急性肾炎 ";break;
|
|
|
// case "5":valueStrTmp+="慢性肾炎 ";break;
|
|
|
// case "6":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${nephropathy}",valueStrTmp);
|
|
|
//
|
|
|
// }
|
|
|
// html = html.replace("${nephropathy_other}",null==olderPeopleHealthCheckRecord.getNephropathy_other()?"":olderPeopleHealthCheckRecord.getNephropathy_other());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getHeart_disease()){
|
|
|
// html = html.replace("${heart_disease}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getHeart_disease();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="未发现 ";break;
|
|
|
// case "2":valueStrTmp+="心肌梗死 ";break;
|
|
|
// case "3":valueStrTmp+="心绞痛 ";break;
|
|
|
// case "4":valueStrTmp+="冠状动脉血运重建 ";break;
|
|
|
// case "5":valueStrTmp+="充血性心力衰竭 ";break;
|
|
|
// case "6":valueStrTmp+="心前区疼痛 ";break;
|
|
|
// case "7":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${heart_disease}",valueStrTmp);
|
|
|
// }
|
|
|
// html = html.replace("${heart_disease_other}",null==olderPeopleHealthCheckRecord.getHeart_disease_other()?"":olderPeopleHealthCheckRecord.getHeart_disease_other());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getVascular_disease()){
|
|
|
// html = html.replace("${vascular_disease}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getVascular_disease();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="未发现 ";break;
|
|
|
// case "2":valueStrTmp+="夹层动脉瘤 ";break;
|
|
|
// case "3":valueStrTmp+="动脉闭塞性疾病 ";break;
|
|
|
// case "4":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${vascular_disease}",valueStrTmp);
|
|
|
//
|
|
|
// }
|
|
|
// html = html.replace("${vascular_disease_other}",null==olderPeopleHealthCheckRecord.getVascular_disease_other()?"":olderPeopleHealthCheckRecord.getVascular_disease_other());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getEye_disease()){
|
|
|
// html = html.replace("${eye_disease}"," ");
|
|
|
// }else {
|
|
|
// String smokingState = olderPeopleHealthCheckRecord.getEye_disease();
|
|
|
// String[] smokingStates = smokingState.split(",");
|
|
|
// String valueStrTmp = " ";
|
|
|
// for (String tmp:smokingStates){
|
|
|
// switch (tmp){
|
|
|
// case "1":valueStrTmp+="未发现 ";break;
|
|
|
// case "2":valueStrTmp+="视网膜出血或渗出 ";break;
|
|
|
// case "3":valueStrTmp+="视乳头水肿 ";break;
|
|
|
// case "4":valueStrTmp+="白内障 ";break;
|
|
|
// case "5":valueStrTmp+="其他 ";break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${eye_disease}",valueStrTmp);
|
|
|
//
|
|
|
// }
|
|
|
// html = html.replace("${eye_disease_other}",null==olderPeopleHealthCheckRecord.getEye_disease_other()?"":olderPeopleHealthCheckRecord.getEye_disease_other());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getNervous_system_disease()){
|
|
|
// html = html.replace("${nervous_system_disease}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getNervous_system_disease();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${nervous_system_disease}","未发现");break;
|
|
|
// case 2:html = html.replace("${nervous_system_disease}","有");break;
|
|
|
// default:html = html.replace("${nervous_system_disease}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${nervous_system_disease_has}",null==olderPeopleHealthCheckRecord.getNervous_system_disease_has()?"":olderPeopleHealthCheckRecord.getNervous_system_disease_has());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getOther_system_disease()){
|
|
|
// html = html.replace("${other_system_disease}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getOther_system_disease();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${other_system_disease}","未发现");break;
|
|
|
// case 2:html = html.replace("${other_system_disease}","有");break;
|
|
|
// default:html = html.replace("${other_system_disease}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${other_system_disease_has}",null==olderPeopleHealthCheckRecord.getOther_system_disease_has()?"":olderPeopleHealthCheckRecord.getOther_system_disease_has());
|
|
|
// html = html.replace("${admission_date1}",null==olderPeopleHealthCheckRecord.getAdmission_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getAdmission_date1()));
|
|
|
// html = html.replace("${admission_date2}",null==olderPeopleHealthCheckRecord.getAdmission_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getAdmission_date2()));
|
|
|
// html = html.replace("${discharge_date1}",null==olderPeopleHealthCheckRecord.getDischarge_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getDischarge_date1()));
|
|
|
// html = html.replace("${discharge_date2}",null==olderPeopleHealthCheckRecord.getDischarge_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getDischarge_date2()));
|
|
|
// html = html.replace("${admission_reason1}",null==olderPeopleHealthCheckRecord.getAdmission_reason1()?"":olderPeopleHealthCheckRecord.getAdmission_reason1());
|
|
|
// html = html.replace("${admission_reason2}",null==olderPeopleHealthCheckRecord.getAdmission_reason2()?"":olderPeopleHealthCheckRecord.getAdmission_reason2());
|
|
|
// html = html.replace("${admission_hospital_name1}",null==olderPeopleHealthCheckRecord.getAdmission_hospital_name1()?"":olderPeopleHealthCheckRecord.getAdmission_hospital_name1());
|
|
|
// html = html.replace("${admission_hospital_name2}",null==olderPeopleHealthCheckRecord.getAdmission_hospital_name2()?"":olderPeopleHealthCheckRecord.getAdmission_hospital_name2());
|
|
|
// html = html.replace("${admission_number1}",null==olderPeopleHealthCheckRecord.getAdmission_number1()?"":olderPeopleHealthCheckRecord.getAdmission_number1());
|
|
|
// html = html.replace("${admission_number2}",null==olderPeopleHealthCheckRecord.getAdmission_number2()?"":olderPeopleHealthCheckRecord.getAdmission_number2());
|
|
|
// html = html.replace("${building_bed_date1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getBuilding_bed_date1()));
|
|
|
// html = html.replace("${building_bed_date2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getBuilding_bed_date2()));
|
|
|
// html = html.replace("${cancel_bed_date1}",null==olderPeopleHealthCheckRecord.getCancel_bed_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getCancel_bed_date1()));
|
|
|
// html = html.replace("${cancel_bed_date2}",null==olderPeopleHealthCheckRecord.getCancel_bed_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getCancel_bed_date2()));
|
|
|
// html = html.replace("${building_bed_reason1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_reason1()?"":olderPeopleHealthCheckRecord.getBuilding_bed_reason1());
|
|
|
// html = html.replace("${building_bed_reason2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_reason2()?"":olderPeopleHealthCheckRecord.getBuilding_bed_reason2());
|
|
|
// html = html.replace("${building_bed_hospiatl_name1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name1()?"":olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name1());
|
|
|
// html = html.replace("${building_bed_hospiatl_name2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name2()?"":olderPeopleHealthCheckRecord.getBuilding_bed_hospiatl_name2());
|
|
|
// html = html.replace("${building_bed_number1}",null==olderPeopleHealthCheckRecord.getBuilding_bed_number1()?"":olderPeopleHealthCheckRecord.getBuilding_bed_number1());
|
|
|
// html = html.replace("${building_bed_number2}",null==olderPeopleHealthCheckRecord.getBuilding_bed_number2()?"":olderPeopleHealthCheckRecord.getBuilding_bed_number2());
|
|
|
// html = html.replace("${medicine1}",null==olderPeopleHealthCheckRecord.getMedicine1()?"":olderPeopleHealthCheckRecord.getMedicine1());
|
|
|
// html = html.replace("${medicine2}",null==olderPeopleHealthCheckRecord.getMedicine2()?"":olderPeopleHealthCheckRecord.getMedicine2());
|
|
|
// html = html.replace("${medicine3}",null==olderPeopleHealthCheckRecord.getMedicine3()?"":olderPeopleHealthCheckRecord.getMedicine3());
|
|
|
// html = html.replace("${medicine4}",null==olderPeopleHealthCheckRecord.getMedicine4()?"":olderPeopleHealthCheckRecord.getMedicine4());
|
|
|
// html = html.replace("${medicine5}",null==olderPeopleHealthCheckRecord.getMedicine5()?"":olderPeopleHealthCheckRecord.getMedicine5());
|
|
|
// html = html.replace("${medicine6}",null==olderPeopleHealthCheckRecord.getMedicine6()?"":olderPeopleHealthCheckRecord.getMedicine6());
|
|
|
// html = html.replace("${medicine1_use}",null==olderPeopleHealthCheckRecord.getMedicine1_use()?"":olderPeopleHealthCheckRecord.getMedicine1_use());
|
|
|
// html = html.replace("${medicine2_use}",null==olderPeopleHealthCheckRecord.getMedicine2_use()?"":olderPeopleHealthCheckRecord.getMedicine2_use());
|
|
|
// html = html.replace("${medicine3_use}",null==olderPeopleHealthCheckRecord.getMedicine3_use()?"":olderPeopleHealthCheckRecord.getMedicine3_use());
|
|
|
// html = html.replace("${medicine4_use}",null==olderPeopleHealthCheckRecord.getMedicine4_use()?"":olderPeopleHealthCheckRecord.getMedicine4_use());
|
|
|
// html = html.replace("${medicine5_use}",null==olderPeopleHealthCheckRecord.getMedicine5_use()?"":olderPeopleHealthCheckRecord.getMedicine5_use());
|
|
|
// html = html.replace("${medicine6_use}",null==olderPeopleHealthCheckRecord.getMedicine6_use()?"":olderPeopleHealthCheckRecord.getMedicine6_use());
|
|
|
// html = html.replace("${medicine1_dosage}",null==olderPeopleHealthCheckRecord.getMedicine1_dosage()?"":olderPeopleHealthCheckRecord.getMedicine1_dosage());
|
|
|
// html = html.replace("${medicine2_dosage}",null==olderPeopleHealthCheckRecord.getMedicine2_dosage()?"":olderPeopleHealthCheckRecord.getMedicine2_dosage());
|
|
|
// html = html.replace("${medicine3_dosage}",null==olderPeopleHealthCheckRecord.getMedicine3_dosage()?"":olderPeopleHealthCheckRecord.getMedicine3_dosage());
|
|
|
// html = html.replace("${medicine4_dosage}",null==olderPeopleHealthCheckRecord.getMedicine4_dosage()?"":olderPeopleHealthCheckRecord.getMedicine4_dosage());
|
|
|
// html = html.replace("${medicine5_dosage}",null==olderPeopleHealthCheckRecord.getMedicine5_dosage()?"":olderPeopleHealthCheckRecord.getMedicine5_dosage());
|
|
|
// html = html.replace("${medicine6_dosage}",null==olderPeopleHealthCheckRecord.getMedicine6_dosage()?"":olderPeopleHealthCheckRecord.getMedicine6_dosage());
|
|
|
// html = html.replace("${medication1_time}",null==olderPeopleHealthCheckRecord.getMedication1_time()?"":olderPeopleHealthCheckRecord.getMedication1_time());
|
|
|
// html = html.replace("${medication2_time}",null==olderPeopleHealthCheckRecord.getMedication2_time()?"":olderPeopleHealthCheckRecord.getMedication2_time());
|
|
|
// html = html.replace("${medication3_time}",null==olderPeopleHealthCheckRecord.getMedication3_time()?"":olderPeopleHealthCheckRecord.getMedication3_time());
|
|
|
// html = html.replace("${medication4_time}",null==olderPeopleHealthCheckRecord.getMedication4_time()?"":olderPeopleHealthCheckRecord.getMedication4_time());
|
|
|
// html = html.replace("${medication5_time}",null==olderPeopleHealthCheckRecord.getMedication5_time()?"":olderPeopleHealthCheckRecord.getMedication5_time());
|
|
|
// html = html.replace("${medication6_time}",null==olderPeopleHealthCheckRecord.getMedication6_time()?"":olderPeopleHealthCheckRecord.getMedication6_time());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMedication1_compliance()){
|
|
|
// html = html.replace("${medication1_compliance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMedication1_compliance();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${medication1_compliance}","规律");break;
|
|
|
// case 2:html = html.replace("${medication1_compliance}","间断");break;
|
|
|
// case 3:html = html.replace("${medication1_compliance}","不服药");break;
|
|
|
// default:html = html.replace("${medication1_compliance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMedication2_compliance()){
|
|
|
// html = html.replace("${medication2_compliance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMedication2_compliance();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${medication2_compliance}","规律");break;
|
|
|
// case 2:html = html.replace("${medication2_compliance}","间断");break;
|
|
|
// case 3:html = html.replace("${medication2_compliance}","不服药");break;
|
|
|
// default:html = html.replace("${medication2_compliance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMedication3_compliance()){
|
|
|
// html = html.replace("${medication3_compliance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMedication3_compliance();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${medication3_compliance}","规律");break;
|
|
|
// case 2:html = html.replace("${medication3_compliance}","间断");break;
|
|
|
// case 3:html = html.replace("${medication3_compliance}","不服药");break;
|
|
|
// default:html = html.replace("${medication3_compliance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMedication4_compliance()){
|
|
|
// html = html.replace("${medication4_compliance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMedication4_compliance();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${medication4_compliance}","规律");break;
|
|
|
// case 2:html = html.replace("${medication4_compliance}","间断");break;
|
|
|
// case 3:html = html.replace("${medication4_compliance}","不服药");break;
|
|
|
// default:html = html.replace("${medication4_compliance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMedication5_compliance()){
|
|
|
// html = html.replace("${medication5_compliance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMedication5_compliance();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${medication5_compliance}","规律");break;
|
|
|
// case 2:html = html.replace("${medication5_compliance}","间断");break;
|
|
|
// case 3:html = html.replace("${medication5_compliance}","不服药");break;
|
|
|
// default:html = html.replace("${medication5_compliance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getMedication6_compliance()){
|
|
|
// html = html.replace("${medication6_compliance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getMedication6_compliance();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${medication6_compliance}","规律");break;
|
|
|
// case 2:html = html.replace("${medication6_compliance}","间断");break;
|
|
|
// case 3:html = html.replace("${medication6_compliance}","不服药");break;
|
|
|
// default:html = html.replace("${medication6_compliance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${vaccination_name1}",null==olderPeopleHealthCheckRecord.getVaccination_name1()?"":olderPeopleHealthCheckRecord.getVaccination_name1());
|
|
|
// html = html.replace("${vaccination_name2}",null==olderPeopleHealthCheckRecord.getVaccination_name2()?"":olderPeopleHealthCheckRecord.getVaccination_name2());
|
|
|
// html = html.replace("${vaccination_name3}",null==olderPeopleHealthCheckRecord.getVaccination_name3()?"":olderPeopleHealthCheckRecord.getVaccination_name3());
|
|
|
// html = html.replace("${vaccination_date1}",null==olderPeopleHealthCheckRecord.getVaccination_date1()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getVaccination_date1()));
|
|
|
// html = html.replace("${vaccination_date2}",null==olderPeopleHealthCheckRecord.getVaccination_date2()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getVaccination_date2()));
|
|
|
// html = html.replace("${vaccination_date3}",null==olderPeopleHealthCheckRecord.getVaccination_date3()?"":DateUtil.dateToStrShort(olderPeopleHealthCheckRecord.getVaccination_date3()));
|
|
|
// html = html.replace("${vaccination_hospital_name1}",null==olderPeopleHealthCheckRecord.getVaccination_hospital_name1()?"":olderPeopleHealthCheckRecord.getVaccination_hospital_name1());
|
|
|
// html = html.replace("${vaccination_hospital_name2}",null==olderPeopleHealthCheckRecord.getVaccination_hospital_name2()?"":olderPeopleHealthCheckRecord.getVaccination_hospital_name2());
|
|
|
// html = html.replace("${vaccination_hospital_name3}",null==olderPeopleHealthCheckRecord.getVaccination_hospital_name3()?"":olderPeopleHealthCheckRecord.getVaccination_hospital_name3());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getHealth_examination()){
|
|
|
// html = html.replace("${health_examination}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getHealth_examination();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${health_examination}","无");break;
|
|
|
// case 2:html = html.replace("${health_examination}","有异常");break;
|
|
|
// default:html = html.replace("${health_examination}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${health_examination_abnormal1}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal1()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal1());
|
|
|
// html = html.replace("${health_examination_abnormal2}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal2()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal2());
|
|
|
// html = html.replace("${health_examination_abnormal3}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal3()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal3());
|
|
|
// html = html.replace("${health_examination_abnormal4}",null==olderPeopleHealthCheckRecord.getHealth_examination_abnormal4()?"":olderPeopleHealthCheckRecord.getHealth_examination_abnormal4());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getRegular_followup()){
|
|
|
// html = html.replace("${regular_followup}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getRegular_followup();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${regular_followup}","定期随访:是");break;
|
|
|
// default:html = html.replace("${regular_followup}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getChronic_health_management()){
|
|
|
// html = html.replace("${chronic_health_management}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getChronic_health_management();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${chronic_health_management}","纳入慢性病患者健康管理:是");break;
|
|
|
// default:html = html.replace("${chronic_health_management}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getSuggest_recheck()){
|
|
|
// html = html.replace("${suggest_recheck}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getSuggest_recheck();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${suggest_recheck}","建议复查:是");break;
|
|
|
// default:html = html.replace("${suggest_recheck}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getSuggest_referral()){
|
|
|
// html = html.replace("${suggest_referral}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getSuggest_referral();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${suggest_referral}","建议转诊:是");break;
|
|
|
// default:html = html.replace("${suggest_referral}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getOther_health_guidance()){
|
|
|
// html = html.replace("${other_health_guidance}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getOther_health_guidance();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${other_health_guidance}","其他");break;
|
|
|
// default:html = html.replace("${other_health_guidance}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${other_health_guidance_description}",null==olderPeopleHealthCheckRecord.getOther_health_guidance_description()?"":olderPeopleHealthCheckRecord.getOther_health_guidance_description());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getStop_smoking()){
|
|
|
// html = html.replace("${stop_smoking}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getStop_smoking();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${stop_smoking}","戒烟:是");break;
|
|
|
// default:html = html.replace("${stop_smoking}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getHealthy_drinking()){
|
|
|
// html = html.replace("${healthy_drinking}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getHealthy_drinking();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${healthy_drinking}","健康饮酒:是");break;
|
|
|
// default:html = html.replace("${healthy_drinking}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getDiet()){
|
|
|
// html = html.replace("${diet}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getDiet();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${diet}","饮食:是");break;
|
|
|
// default:html = html.replace("${diet}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getExercise()){
|
|
|
// html = html.replace("${exercise}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getExercise();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${exercise}","锻炼:是");break;
|
|
|
// default:html = html.replace("${exercise}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getLose_weight()){
|
|
|
// html = html.replace("${lose_weight}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getLose_weight();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${lose_weight}","减肥:是");break;
|
|
|
// default:html = html.replace("${lose_weight}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${goal_weight}",null==olderPeopleHealthCheckRecord.getGoal_weight()?"":"目标:"+olderPeopleHealthCheckRecord.getGoal_weight()+"Kg");
|
|
|
// if(null==olderPeopleHealthCheckRecord.getRecommended_vaccination()){
|
|
|
// html = html.replace("${recommended_vaccination}"," ");
|
|
|
// }else {
|
|
|
// String sclera = olderPeopleHealthCheckRecord.getRecommended_vaccination();
|
|
|
// switch (sclera){
|
|
|
// case "2":html = html.replace("${recommended_vaccination}","建议接种疫苗:是");break;
|
|
|
// default:html = html.replace("${recommended_vaccination}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getOther_advice()){
|
|
|
// html = html.replace("${other_advice}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getOther_advice();
|
|
|
// switch (sclera){
|
|
|
// case 2:html = html.replace("${other_advice}","其他建议:是");break;
|
|
|
// default:html = html.replace("${other_advice}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${other_advice_description}",null==olderPeopleHealthCheckRecord.getOther_advice_description()?"":olderPeopleHealthCheckRecord.getOther_advice_description());
|
|
|
// if(null==olderPeopleHealthCheckRecord.getEat()){
|
|
|
// html = html.replace("${eat}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getEat();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${eat}"," 独立完成0-3分");break;
|
|
|
// case 2:html = html.replace("${eat}"," 轻度依赖4-8分");break;
|
|
|
// case 3:html = html.replace("${eat}"," 中度依赖9-18分");break;
|
|
|
// case 4:html = html.replace("${eat}"," 不能自理≥19分");break;
|
|
|
// default:html = html.replace("${eat}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getWash()){
|
|
|
// html = html.replace("${wash}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getWash();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${wash}"," 独立完成0-3分");break;
|
|
|
// case 2:html = html.replace("${wash}"," 轻度依赖4-8分");break;
|
|
|
// case 3:html = html.replace("${wash}"," 中度依赖9-18分");break;
|
|
|
// case 4:html = html.replace("${wash}"," 不能自理≥19分");break;
|
|
|
// default:html = html.replace("${wash}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getDress()){
|
|
|
// html = html.replace("${dress}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getDress();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${dress}"," 独立完成0-3分");break;
|
|
|
// case 2:html = html.replace("${dress}"," 轻度依赖4-8分");break;
|
|
|
// case 3:html = html.replace("${dress}"," 中度依赖9-18分");break;
|
|
|
// case 4:html = html.replace("${dress}"," 不能自理≥19分");break;
|
|
|
// default:html = html.replace("${dress}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getToilet()){
|
|
|
// html = html.replace("${toilet}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getToilet();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${toilet}"," 独立完成0-3分");break;
|
|
|
// case 2:html = html.replace("${toilet}"," 轻度依赖4-8分");break;
|
|
|
// case 3:html = html.replace("${toilet}"," 中度依赖9-18分");break;
|
|
|
// case 4:html = html.replace("${toilet}"," 不能自理≥19分");break;
|
|
|
// default:html = html.replace("${toilet}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// if(null==olderPeopleHealthCheckRecord.getActivity()){
|
|
|
// html = html.replace("${activity}"," ");
|
|
|
// }else {
|
|
|
// Integer sclera = olderPeopleHealthCheckRecord.getActivity();
|
|
|
// switch (sclera){
|
|
|
// case 1:html = html.replace("${activity}"," 独立完成0-3分");break;
|
|
|
// case 2:html = html.replace("${activity}"," 轻度依赖4-8分");break;
|
|
|
// case 3:html = html.replace("${activity}"," 中度依赖9-18分");break;
|
|
|
// case 4:html = html.replace("${activity}"," 能自理≥19分");break;
|
|
|
// default:html = html.replace("${activity}"," ");break;
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${score}",null==olderPeopleHealthCheckRecord.getScore()?"":olderPeopleHealthCheckRecord.getScore()+"");
|
|
|
//
|
|
|
// String sign_wayStr="";
|
|
|
// String sign_time="";
|
|
|
// String sign_address="";
|
|
|
// String sign_imgs="";
|
|
|
//
|
|
|
// List<FollowupSign> followupSignDOs = followupSignDao.findByFollowupIdAndDel(Long.valueOf(olderPeopleHealthCheckRecord.getFollowup_id()),0);
|
|
|
// if (followupSignDOs.size()>0){
|
|
|
// FollowupSign followupSignDO = followupSignDOs.get(0);
|
|
|
// if (null!=followupSignDO){
|
|
|
// try {
|
|
|
// switch (followupSignDO.getType()){
|
|
|
// case "1":sign_wayStr="定位"; break;
|
|
|
// case "2":sign_wayStr="拍照";break;
|
|
|
// case "3":sign_wayStr="门牌";break;
|
|
|
// default:sign_wayStr=" ";break;
|
|
|
// }
|
|
|
// sign_address = null==followupSignDO.getAddress()?" ":followupSignDO.getAddress();
|
|
|
// if(StringUtils.isNotBlank(followupSignDO.getImg())) {
|
|
|
// String imgs = followupSignDO.getImg();
|
|
|
// String[] imgsArray;
|
|
|
// if (imgs.contains(",")) {
|
|
|
// imgsArray = imgs.split(",");
|
|
|
// } else {
|
|
|
// imgsArray = new String[]{imgs};
|
|
|
// }
|
|
|
// for (String img : imgsArray) {
|
|
|
// sign_imgs += "<img width='80' height='100' src='" + imgUrlDomain + img + "' /> ";
|
|
|
// }
|
|
|
// }
|
|
|
// sign_time = DateUtil.dateToStrLong(followupSignDO.getCreateTime());
|
|
|
//
|
|
|
// }catch (Exception e){
|
|
|
// e.printStackTrace();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// html = html.replace("${sign_way}",sign_wayStr);
|
|
|
// html = html.replace("${sign_time}",sign_time);
|
|
|
// html = html.replace("${sign_address}",sign_address);
|
|
|
// html = html.replace("${sigm_imgs}",sign_imgs);
|
|
|
// return html;
|
|
|
// }
|
|
|
public String getSymptomName(String symptom) {
|
|
|
String symptomName = "";
|
|
|
switch (symptom) {
|
|
|
case "1":
|
|
|
symptomName = " 无症状 ";
|
|
|
break;
|
|
|
case "2":
|
|
|
symptomName = " 头痛 ";
|
|
|
break;
|
|
|
case "3":
|
|
|
symptomName = " 头晕 ";
|
|
|
break;
|
|
|
case "4":
|
|
|
symptomName = " 心悸 ";
|
|
|
break;
|
|
|
case "5":
|
|
|
symptomName = " 胸闷 ";
|
|
|
break;
|
|
|
case "6":
|
|
|
symptomName = " 胸痛 ";
|
|
|
break;
|
|
|
case "7":
|
|
|
symptomName = " 慢性咳嗽 ";
|
|
|
break;
|
|
|
case "8":
|
|
|
symptomName = " 咳痰 ";
|
|
|
break;
|
|
|
case "9":
|
|
|
symptomName = " 呼吸困难 ";
|
|
|
break;
|
|
|
case "10":
|
|
|
symptomName = "多饮 ";
|
|
|
break;
|
|
|
case "11":
|
|
|
symptomName = "多尿 ";
|
|
|
break;
|
|
|
case "12":
|
|
|
symptomName = "体重下降 ";
|
|
|
break;
|
|
|
case "13":
|
|
|
symptomName = "乏力 ";
|
|
|
break;
|
|
|
case "14":
|
|
|
symptomName = "关节肿痛 ";
|
|
|
break;
|
|
|
case "15":
|
|
|
symptomName = "视力模糊 ";
|
|
|
break;
|
|
|
case "16":
|
|
|
symptomName = "手脚麻木 ";
|
|
|
break;
|
|
|
case "17":
|
|
|
symptomName = "尿急 ";
|
|
|
break;
|
|
|
case "18":
|
|
|
symptomName = "尿痛 ";
|
|
|
break;
|
|
|
case "19":
|
|
|
symptomName = "便秘 ";
|
|
|
break;
|
|
|
case "20":
|
|
|
symptomName = "腹泻 ";
|
|
|
break;
|
|
|
case "21":
|
|
|
symptomName = "恶心呕吐 ";
|
|
|
break;
|
|
|
case "22":
|
|
|
symptomName = "眼花 ";
|
|
|
break;
|
|
|
case "23":
|
|
|
symptomName = "耳鸣 ";
|
|
|
break;
|
|
|
case "24":
|
|
|
symptomName = "乳房胀痛 ";
|
|
|
break;
|
|
|
case "25":
|
|
|
symptomName = "其他 ";
|
|
|
break;
|
|
|
default:
|
|
|
symptomName = " ";
|
|
|
break;
|
|
|
}
|
|
|
return symptomName;
|
|
|
}
|