Forráskód Böngészése

Merge branch 'dev' of huangwenjie/patient-co-management into dev

yeshijie 7 éve
szülő
commit
78bc236591

+ 40 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -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);

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -1463,8 +1463,12 @@ public class PatientHealthIndexService extends BaseService {
                } else if (type == 3) //体重
                {
                    String weight = item.getValue1();   //体重
                    String height = item.getValue2();   //身高
                    String bmi = item.getValue3();      //BMI
                    map.put("time", DateUtil.dateToStrShort(item.getRecordDate()));
                    map.put("weight", weight);
                    map.put("height", height);
                    map.put("bmi", bmi);
                    map.put("text", weight + " kg");
                    re.add(map);
                }

+ 5 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java

@ -68,7 +68,7 @@ public class DoctorFollowUpController extends BaseController {
                                          @RequestParam @ApiParam(value = "团队code") Long teamCode,
                                          @RequestParam @ApiParam(value = "第几页") int page,
                                          @RequestParam @ApiParam(value = "页大小") int pagesize,
                                          @RequestParam(value = "type",required = false) @ApiParam(value = "类型:0全部,1计划,2记录",defaultValue = "0") int type) {
                                          @RequestParam(value = "type",required = false) @ApiParam(value = "类型:放空为全部,1计划,2记录",defaultValue = "0") String type) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
@ -162,9 +162,11 @@ public class DoctorFollowUpController extends BaseController {
                                @ApiParam(name = "followupClass", value = "随访类别【1.高血压 2.糖尿病】", defaultValue = "1")
                                @RequestParam(value = "followupClass", required = true) String followupClass,
                                @ApiParam(name = "followupManagerStatus", value = "随访管理状态【字典FOLLOWUP_MANAGER_STATUS】", defaultValue = "1")
                                @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus) {
                                @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus,
                                @ApiParam(name = "plandate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                                @RequestParam(value = "plandate", required = false) String plandate) {
        try {
            followUpService.startFollowup(id, date, followupType, followupClass, followupManagerStatus);
            followUpService.startFollowup(id, date, followupType, followupClass, followupManagerStatus,plandate);
            return write(200, "开始随访记录成功!");
        } catch (Exception e) {