|
@ -119,8 +119,22 @@ public class FollowUpService extends BaseService {
|
|
|
re.put("followupTypeName", followupTypeName);
|
|
|
|
|
|
//随访类别转译
|
|
|
re.put("followupClass", followup.getFollowupClass());
|
|
|
|
|
|
String followupClass = followup.getFollowupClass();
|
|
|
re.put("followupClass", followupClass);
|
|
|
|
|
|
String followupClassName = systemDictService.getDictValue("FOLLOWUP_CLASS_DICT", followup.getFollowupClass());
|
|
|
if(followupClass.contains(",")){
|
|
|
String[] followupClassArray = followupClass.split(",");
|
|
|
followupClassName = "";
|
|
|
for (int i = 0; i < followupClassArray.length; i++) {
|
|
|
followupClassName += systemDictService.getDictValue("FOLLOWUP_CLASS_DICT", followupClassArray[i]);
|
|
|
if(i != followupClassArray.length -1){
|
|
|
followupClassName +=",";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
re.put("followupClassName", followupClassName);
|
|
|
|
|
|
//随访管理状态转译
|
|
@ -187,17 +201,17 @@ public class FollowUpService extends BaseService {
|
|
|
* @param type 类型:0全部,1计划,2记录
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray getListByPatientAndTeam(String patient, Long teamCode, int page, int pageSize, int type) {
|
|
|
public JSONArray getListByPatientAndTeam(String patient, Long teamCode, int page, int pageSize, String type) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC,"createTime");
|
|
|
PageRequest pageRequest = new PageRequest(page, pageSize,sort);
|
|
|
Page<Object> result = null;
|
|
|
|
|
|
if(type == 0){
|
|
|
if(StringUtils.isBlank(type)){
|
|
|
result = followupDao.findByPatientAndTeam(patient, teamCode, pageRequest);
|
|
|
}else if(type == 1){
|
|
|
}else if("1".equals(type)){
|
|
|
//已经开始的就是记录
|
|
|
result = followupDao.findPlanByPatientAndTeam(patient, teamCode, pageRequest);
|
|
|
}else if(type == 2){
|
|
|
}else if("2".equals(type)){
|
|
|
//未开始的就是计划
|
|
|
result = followupDao.findRecordByPatientAndTeam(patient, teamCode, pageRequest);
|
|
|
}else{}
|
|
@ -245,7 +259,22 @@ public class FollowUpService extends BaseService {
|
|
|
followup.put("followupType", objArr[3] == null ? "" : objArr[3]);
|
|
|
followup.put("followupTypeName", objArr[3] == null ? "" : (dictMap.get(objArr[3].toString()) != null ? dictMap.get(objArr[3].toString()) : ""));
|
|
|
followup.put("followupClass", objArr[4] == null ? "" : objArr[4]);
|
|
|
followup.put("followupClassName", objArr[4] == null ? "" : (objArr[4].toString().equals("1") ? "高血压" : "糖尿病"));
|
|
|
|
|
|
// followup.put("followupClassName", objArr[4] == null ? "" : (objArr[4].toString().equals("1") ? "高血压" : "糖尿病"));
|
|
|
|
|
|
if( objArr[4] == null){
|
|
|
followup.put("followupClassName", "");
|
|
|
}else{
|
|
|
if(objArr[4].toString().equals("1")){
|
|
|
followup.put("followupClassName", "高血压");
|
|
|
}else if(objArr[4].toString().equals("1")){
|
|
|
followup.put("followupClassName", "糖尿病");
|
|
|
}else if(objArr[4].toString().equals("1,2")){
|
|
|
followup.put("followupClassName", "高血压,糖尿病");
|
|
|
}else{}
|
|
|
}
|
|
|
|
|
|
|
|
|
followup.put("status", objArr[5] == null ? "" : objArr[5]);
|
|
|
followup.put("statusName", objArr[5] == null ? "" : (statusMap.get(objArr[5].toString()) != null ? statusMap.get(objArr[5].toString()) : ""));
|
|
|
followup.put("createTime", objArr[6] != null ? DateUtil.dateToStrLong((Date)objArr[6]) : "");
|
|
@ -370,10 +399,14 @@ public class FollowUpService extends BaseService {
|
|
|
/**
|
|
|
* 开始随访记录
|
|
|
*/
|
|
|
public void startFollowup(String id, String date, String followupType, String followupClass, String followupManagerStatus) throws Exception {
|
|
|
public void startFollowup(String id, String date, String followupType, String followupClass, String followupManagerStatus,String plandate) throws Exception {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
if (followup != null) {
|
|
|
followup.setFollowupDate(DateUtil.strToDate(date));
|
|
|
//计划下次随访时间--huangwenjie.2017.10.19
|
|
|
if(StringUtils.isNoneBlank(plandate)){
|
|
|
followup.setFollowupNextDate(DateUtil.strToDate(plandate));
|
|
|
}
|
|
|
followup.setFollowupType(followupType);
|
|
|
followup.setFollowupClass(followupClass);
|
|
|
followup.setFollowupManagerStatus(followupManagerStatus);
|