Selaa lähdekoodia

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

yeshijie 7 vuotta sitten
vanhempi
commit
c92ddb53b7

+ 3 - 3
common/common-entity/src/main/java/com/yihu/device/entity/DevicePatientHealthIndex.java

@ -51,7 +51,7 @@ public class DevicePatientHealthIndex extends IdEntity {
	//设备编号
	private String deviceSn;
	private Short status;//状态:0为标准,1为异常
	private int status;//状态:0为标准,1为异常
	public String getUser() {
		return user;
@ -188,11 +188,11 @@ public class DevicePatientHealthIndex extends IdEntity {
		this.deviceSn = deviceSn;
	}
	public Short getStatus() {
	public int getStatus() {
		return status;
	}
	public void setStatus(Short status) {
	public void setStatus(int status) {
		this.status = status;
	}
}

+ 10 - 10
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/DeviceService.java

@ -167,16 +167,16 @@ public class DeviceService {
        return "1";//"空腹血糖"
    }
 /*   private Boolean isInArea(String time, String[] timeArea) {
        String date = DateUtil.getDateFromDateTime(time);
        Long beginTime = DateUtil.compareDateTime(DateUtil.toTimestamp(time), DateUtil.toTimestamp(date + " " + timeArea[0] + ":00"));
        Long endTime = DateUtil.compareDateTime(DateUtil.toTimestamp(time), DateUtil.toTimestamp(date + " " + timeArea[1] + ":00"));
        if (beginTime > 0 && endTime < 0) {
            return true;
        } else {
            return false;
        }
    }*/
    /*   private Boolean isInArea(String time, String[] timeArea) {
           String date = DateUtil.getDateFromDateTime(time);
           Long beginTime = DateUtil.compareDateTime(DateUtil.toTimestamp(time), DateUtil.toTimestamp(date + " " + timeArea[0] + ":00"));
           Long endTime = DateUtil.compareDateTime(DateUtil.toTimestamp(time), DateUtil.toTimestamp(date + " " + timeArea[1] + ":00"));
           if (beginTime > 0 && endTime < 0) {
               return true;
           } else {
               return false;
           }
       }*/
// 判断时间是否在对应时间段
    private Boolean isInArea(String time,String begin,String end) {
        String date = DateUtil.getDateFromDateTime(time);

+ 73 - 73
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/SignController.java

@ -23,84 +23,84 @@ import java.util.Map;
@Api(description = "基卫签约服务接口")
public class SignController {
	@Autowired
	ZysoftService zysoftService;
    @Autowired
    ZysoftService zysoftService;
	@Autowired
	private SignZYService signZYService;
    @Autowired
    private SignZYService signZYService;
	/******************************* 签约接口 ********************************************************/
    /******************************* 签约接口 ********************************************************/
	@RequestMapping(value = "CheckSignFamily",method = RequestMethod.POST)
	@ApiOperation("查询是否已签约")
	public Result checkSignFamily(
			@ApiParam(name="idcard",value="患者身份证",defaultValue = "350821201112240026")
			@RequestParam(value="idcard",required = true) String idcard){
		try {
			Map<String,String> response = signZYService.checkSignFamily(idcard);
			return Result.success("查询签约成功!",response);
		} catch (Exception ex) {
			if(ex instanceof ApiException)
			{
				ApiException apiEx = (ApiException) ex;
				return Result.error(apiEx.errorCode(),ex.getMessage());
			}
			else{
				return Result.error(ex.getMessage());
			}
		}
	}
    @RequestMapping(value = "CheckSignFamily",method = RequestMethod.POST)
    @ApiOperation("查询是否已签约")
    public Result checkSignFamily(
            @ApiParam(name="idcard",value="患者身份证",defaultValue = "350821201112240026")
            @RequestParam(value="idcard",required = true) String idcard){
        try {
            Map<String,String> response = signZYService.checkSignFamily(idcard);
            return Result.success("查询签约成功!",response);
        } catch (Exception ex) {
            if(ex instanceof ApiException)
            {
                ApiException apiEx = (ApiException) ex;
                return Result.error(apiEx.errorCode(),ex.getMessage());
            }
            else{
                return Result.error(ex.getMessage());
            }
        }
    }
	@RequestMapping(value = "getSickFamilyDoctorSignLimit",method = RequestMethod.POST)
	@ApiOperation("查询家庭医生签约人数上限接口")
	public Result getSickFamilyDoctorSignLimit(
			@ApiParam(name="jwTeamCode",value="智业行政团队code",defaultValue = "44")
			@RequestParam(value="jwTeamCode",required = true) String jwTeamCode){
		try {
			String response = signZYService.getSickFamilyDoctorSignLimit(jwTeamCode);
			return Result.success("查询签约成功!",response);
		} catch (Exception ex) {
			ex.printStackTrace();
			if(ex instanceof ApiException)
			{
				ApiException apiEx = (ApiException) ex;
				return Result.error(apiEx.errorCode(),ex.getMessage());
			}
			else{
				return Result.error(ex.getMessage());
			}
		}
	}
    @RequestMapping(value = "getSickFamilyDoctorSignLimit",method = RequestMethod.POST)
    @ApiOperation("查询家庭医生签约人数上限接口")
    public Result getSickFamilyDoctorSignLimit(
            @ApiParam(name="jwTeamCode",value="智业行政团队code",defaultValue = "44")
            @RequestParam(value="jwTeamCode",required = true) String jwTeamCode){
        try {
            String response = signZYService.getSickFamilyDoctorSignLimit(jwTeamCode);
            return Result.success("查询签约成功!",response);
        } catch (Exception ex) {
            ex.printStackTrace();
            if(ex instanceof ApiException)
            {
                ApiException apiEx = (ApiException) ex;
                return Result.error(apiEx.errorCode(),ex.getMessage());
            }
            else{
                return Result.error(ex.getMessage());
            }
        }
    }
	@RequestMapping(value = "getSickFamilyDoctorSpecialistControl",method = RequestMethod.POST)
	@ApiOperation("查询家签慢病患者定标情况接口")
	public Result getSickFamilyDoctorSpecialistControl(
			@ApiParam(name="TIME_START",value="修改的开始时间",defaultValue = "2017-6-6 00:00:00")
			@RequestParam(value="TIME_START",required = false) String TIME_START,
			@ApiParam(name="TIME_END",value="修改的开始时间",defaultValue = "2017-6-7 23:59:59")
			@RequestParam(value="TIME_END",required = false) String TIME_END,
			@ApiParam(name="IDENTITY_CARD_NO",value="身份证号",defaultValue = "360502194503120013")
			@RequestParam(value="IDENTITY_CARD_NO",required = false) String IDENTITY_CARD_NO){
		try {
			String response = "";
			if(StringUtils.isBlank(IDENTITY_CARD_NO)){
				response = signZYService.getSickFamilyDoctorSpecialistControl(TIME_START,TIME_END);
			}else{
				response = signZYService.getSickFamilyDoctorSpecialistControlByIdcard(IDENTITY_CARD_NO);
			}
			return Result.success("查询成功!",response);
		} catch (Exception ex) {
			ex.printStackTrace();
			if(ex instanceof ApiException)
			{
				ApiException apiEx = (ApiException) ex;
				return Result.error(apiEx.errorCode(),ex.getMessage());
			}
			else{
				return Result.error(ex.getMessage());
			}
		}
	}
    @RequestMapping(value = "getSickFamilyDoctorSpecialistControl",method = RequestMethod.POST)
    @ApiOperation("查询家签慢病患者定标情况接口")
    public Result getSickFamilyDoctorSpecialistControl(
            @ApiParam(name="TIME_START",value="修改的开始时间",defaultValue = "2017-6-6 00:00:00")
            @RequestParam(value="TIME_START",required = false) String TIME_START,
            @ApiParam(name="TIME_END",value="修改的开始时间",defaultValue = "2017-6-7 23:59:59")
            @RequestParam(value="TIME_END",required = false) String TIME_END,
            @ApiParam(name="IDENTITY_CARD_NO",value="身份证号",defaultValue = "360502194503120013")
            @RequestParam(value="IDENTITY_CARD_NO",required = false) String IDENTITY_CARD_NO){
        try {
            String response = "";
            if(StringUtils.isBlank(IDENTITY_CARD_NO)){
                response = signZYService.getSickFamilyDoctorSpecialistControl(TIME_START,TIME_END);
            }else{
                response = signZYService.getSickFamilyDoctorSpecialistControlByIdcard(IDENTITY_CARD_NO);
            }
            return Result.success("查询成功!",response);
        } catch (Exception ex) {
            ex.printStackTrace();
            if(ex instanceof ApiException)
            {
                ApiException apiEx = (ApiException) ex;
                return Result.error(apiEx.errorCode(),ex.getMessage());
            }
            else{
                return Result.error(ex.getMessage());
            }
        }
    }

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -149,7 +149,7 @@ public class PatientService extends TokenService {
        }
        //如果之前患者的openId为空并且openID有值更新时间 如果opentime是空也设置时间
        if ((!org.springframework.util.StringUtils.isEmpty(openid) && org.springframework.util.StringUtils.isEmpty(patient.getOpenid())) ||
            patient.getOpenidTime() == null) {
                patient.getOpenidTime() == null) {
            patient.setOpenidTime(new Date());
        }
        //System.out.println("========openid=======");

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/health/repository/DevicePatientHealthIndexDao.java

@ -98,6 +98,12 @@ public interface DevicePatientHealthIndexDao
	@Query(value = "select DATE_FORMAT(a.record_date,'%Y-%m-%d') from device.wlyy_patient_health_index a where a.user = ?1 and a.record_date >= ?2 and a.record_date <= ?3 and a.del = '1' group by DATE_FORMAT(a.record_date,'%Y-%m-%d') order by DATE_FORMAT(a.record_date,'%Y-%m-%d') desc limit ?4 ,?5",nativeQuery = true)
	List<String> findDateList(String patient,Date start ,Date end,int currentSize,int pageSize);
	@Query(value= " select * from device.wlyy_patient_health_index where type in (?1) and record_date BETWEEN ?2 AND ?3  AND user in (select p.code from wlyy_patient p INNER JOIN wlyy_sign_family s on s.patient = p.code and s.status > 0 AND s.admin_team_code = ?4 and p.disease >0)",nativeQuery = true)
	@Query(value= " select * from device.wlyy_patient_health_index where type in (?1) and record_date BETWEEN ?2 AND ?3  AND user in (select p.code from wlyy.wlyy_patient p INNER JOIN wlyy.wlyy_sign_family s on s.patient = p.code and s.status > 0 AND s.admin_team_code = ?4 and p.disease >0)",nativeQuery = true)
	List<DevicePatientHealthIndex> findByTeamcodeAndRecordDate(String type ,Date start, Date end,String teamcode);
	@Query("select a from PatientHealthIndex a where a.user = ?1 and a.type =?2  order by recordDate desc ")
	List<DevicePatientHealthIndex> findByPatientAndType(String patientCode, int type, Pageable pageable);
	@Query("select count(a) from PatientHealthIndex a where a.recordDate >= ?1 and a.recordDate <= ?2 and a.type in (1,2) and a.status = ?3 and a.del = '1'")
	int getCountByTimeAndStatus(Date start, Date end,int status);
}

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

@ -29,6 +29,7 @@ import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.jpa.domain.Specification;
@ -118,7 +119,7 @@ public class PatientHealthIndexService extends BaseService {
            }
        }
        else{
           throw new Exception("Result not exit!");
            throw new Exception("Result not exit!");
        }
    }
@ -599,10 +600,15 @@ public class PatientHealthIndexService extends BaseService {
            if (index % 2 == 0) {
                if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueBefore, minValueBefore)) {
                    msgContent += patient.getName() + "血糖异常(" + value1 + "mmol/L)";
                    //体征异常,更新体征数据状态
                    data.setStatus(1);
                    patientHealthIndexDao.save(data);
                }
            } else { //餐前
                if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueAfter, minValueAfter)) {
                    msgContent += patient.getName() + "血糖异常(" + value1 + "mmol/L)";
                    data.setStatus(1);
                    patientHealthIndexDao.save(data);
                }
            }
        }
@ -633,6 +639,8 @@ public class PatientHealthIndexService extends BaseService {
            // 收缩压/舒张压校验
            if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueSSY, minValueSSY) || !checkHealthIndex(NumberUtils.toDouble(value2), maxValueSZY, minValueSZY)) {
                msgContent = patient.getName() + "血压异常(舒张压 " + value2 + "mmHg、收缩压 " + value1 + "mmHg)";
                data.setStatus(1);
                patientHealthIndexDao.save(data);
            }
        }
@ -783,6 +791,69 @@ public class PatientHealthIndexService extends BaseService {
        return obj;
    }
    /**
     * 判断居民的体征预警状态
     * @param obj
     */
    public void handlePatientStandarStatus(DevicePatientHealthIndex obj){
        //连续5次体征值正常,则修改为非预警状态;连续5次异常,修改为预警状态-----START
        String patientCode = obj.getUser();
        //患者信息
        Patient patient = patientDao.findByCode(patientCode);
        int bloodPressureBbnormalCount = 0;//血压异常次数
        int bloodSuggurBbnormalCount = 0;//血糖异常次数
        // 排序
        Sort sort = new Sort(Sort.Direction.DESC, "recordDate");
        // 分页信息
        Pageable pageRequest = new PageRequest(0, 5, sort);
        Pageable pageable = new PageRequest(1, 5);
        List<DevicePatientHealthIndex> bloodPressurepatientHealthIndices = new ArrayList<>();
        List<DevicePatientHealthIndex> bloodSuggurpatientHealthIndices = new ArrayList<>();
        if( 1 == patient.getDisease()){
            bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,2,pageable);
        } else if( 2 == patient.getDisease()){
            bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,1,pageable);
        } else {
            bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,2,pageable);
            bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,1,pageable);
        }
        for (DevicePatientHealthIndex patientHealthIndex : bloodPressurepatientHealthIndices) {
            if(1 == patientHealthIndex.getStatus()){
                bloodPressureBbnormalCount++;
            }
        }
        for (DevicePatientHealthIndex patientHealthIndex : bloodSuggurpatientHealthIndices) {
            if(1 == patientHealthIndex.getStatus()){
                bloodSuggurBbnormalCount++;
            }
        }
        //连续3次异常,修改用户为预警状态
        if( (3 == bloodPressureBbnormalCount || 3 == bloodSuggurBbnormalCount) && 0 == patient.getStandardStatus()){
            patient.setStandardStatus(1);
        }else{
            Date end = new Date();
            Date start = DateUtil.setDateTime(end,-7);
            //计算血糖或者血压一周内的异常记录数量
            int errorCount = patientHealthIndexDao.getCountByTimeAndStatus(start,end,1);
            if(errorCount >= 5){//超过5次,记为预警状态
                patient.setStandardStatus(1);
            }
        }
        //连续5次正常,修改用户为非预警状态
        if((0 == bloodPressureBbnormalCount && 0 == bloodSuggurBbnormalCount) && 1 == patient.getStandardStatus()){
            patient.setStandardStatus(0);
        }
        patientDao.save(patient);
        //连续5次体征值正常,则修改为非预警状态;连续5次异常,修改为预警状态-----END
    }
    /**
     * 按录入时间和患者标识查询健康记录

+ 6 - 31
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -4064,7 +4064,7 @@ public class SignPatientLabelInfoService extends BaseService {
                                                           String labelCode, String labelType, long teamCode,
                                                           String exLabelCode,
                                                           String exLabelType,
                                                           int page, int pagesize, String diseaseCondition) throws Exception {
                                                           int page, int pagesize) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        Map<String,Object> patientDeviceTypeMap = new HashMap<>();//用于存储患者设备绑定情况
@ -4098,8 +4098,7 @@ public class SignPatientLabelInfoService extends BaseService {
                "    AND t2.status = 1 " +
                (StringUtils.isNotEmpty(labelCode) ? " AND t2.label = ? " : "") +
                (StringUtils.isNotEmpty(labelType) ? " AND t2.label_type = ? " : "") +
                (teamCode > 0 ? (" AND admin_team_code = " + teamCode) : "")+
                (StringUtils.isNotEmpty(diseaseCondition) ? " AND t3.disease_condition in (?) " : "");
                (teamCode > 0 ? (" AND admin_team_code = " + teamCode) : "");
        sql = sql + " AND t3.disease > 0 AND t3.status > 0 ";
        if (matcher.find()) {
@ -4122,40 +4121,15 @@ public class SignPatientLabelInfoService extends BaseService {
            }
        }
        if(StringUtils.isNotEmpty(diseaseCondition)){
            Object[] argsnew = new Object[args.length+1];
            for (int i = 0; i < argsnew.length; i++) {
                if(i == (argsnew.length-1)){
                    argsnew[i] = diseaseCondition;
                }else{
                    argsnew[i] = args[i];
                }
            }
            sql = sql + " order by t3.standard_status,t3.disease_condition,t3.disease,t3.openid desc limit " + page + "," + pagesize;
            signList = jdbcTemplate.queryForList(sql, argsnew);
        }else{
            sql = sql + " order by t3.standard_status,t3.disease_condition,t3.disease,t3.openid desc limit " + page + "," + pagesize;
            signList = jdbcTemplate.queryForList(sql, args);
        }
        sql = sql + " order by t3.standard_status,t3.disease_condition,t3.disease,t3.openid desc limit " + page + "," + pagesize;
        signList = jdbcTemplate.queryForList(sql, args);
//        //查询患者设备绑定情况
//        String _pdsql = "select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user";
//        List<Map<String,Object>> patientCodeDeviceTypes =  jdbcTemplate.queryForList(_pdsql);
//
//        if(!patientCodeDeviceTypes.isEmpty()){
//            for (Map<String,Object> patientCodeDeviceType : patientCodeDeviceTypes) {
//                String user = String.valueOf(patientCodeDeviceType.get("user"));
//                String sum = String.valueOf(patientCodeDeviceType.get("deviceType"));
//                patientDeviceTypeMap.put(user,sum);
//            }
//        }
        if (signList != null && signList.size() > 0) {
            for (Map<String, Object> sign : signList) {
                Patient p = patientDao.findByCode(sign.get("patient") == null ? "" : sign.get("patient").toString());
                System.out.println("1111");
                if (p == null) {
                    continue;
@ -4232,6 +4206,7 @@ public class SignPatientLabelInfoService extends BaseService {
                json.put("code", p.getCode());
                // 设置患者姓名
                json.put("name", p.getName());
                System.out.println(p.getName());
                // 设置患者手机号
                json.put("mobile", p.getMobile());
                // 设置患者微信openid

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -73,7 +73,7 @@ public class DoctorSchemeService {
     */
    public List<String> getPatientsByDiseaseConditionDiseaseDeviceType(String teamCode, Integer disease, String diseaseCondition, Integer deviceType) throws Exception{
        String sql = "select p.code from wlyy_patient p ";
        String sql = "select DISTINCT p.code from wlyy_patient p ";
        if(-1 != deviceType){
            sql = sql + " LEFT JOIN wlyy_patient_device dev on dev.user = p.code ";
@ -490,14 +490,14 @@ public class DoctorSchemeService {
                for (DevicePatientHealthIndex devicePatientHealthIndex : devicePatientHealthIndices) {
                    if( 1 == devicePatientHealthIndex.getType()){
                        sugar++;
                        if( 1 == devicePatientHealthIndex.getStatus()){
                        if( 0 == devicePatientHealthIndex.getStatus()){
                            sugar_unusual++;
                        }
                    }
                    if( 2 == devicePatientHealthIndex.getType()){
                        pressure++;
                        if( 1 == devicePatientHealthIndex.getStatus()){
                        if( 0 == devicePatientHealthIndex.getStatus()){
                            pressure_unusual++;
                        }
                    }

+ 13 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/DateUtil.java

@ -870,4 +870,17 @@ public class DateUtil {
		Timestamp nousedate = new Timestamp(date.getTime());
		return nousedate;
	}
	/**
	 *  日期加减天数
	 * @param date 时间
	 * @param days 天数�?
	 * @return
	 */
	public static java.util.Date setDateTime(java.util.Date date,int days){
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.set(Calendar.DATE, cal.get(Calendar.DATE) +(days));
		return  cal.getTime();
	}
}

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthController.java

@ -33,6 +33,7 @@ public class DoctorHealthController extends BaseController {
	@Autowired
	private PatientHealthIndexService healthIndexService;
	@Autowired
	private PatientService patientService;

+ 5 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -784,8 +784,7 @@ public class SignPatientLabelInfoController extends BaseController {
                                             @RequestParam(required = false) String exLabelCode,
                                             @RequestParam(required = false) String exLabelType,
                                             @RequestParam(required = true) int page,
                                             @RequestParam(required = true) int pagesize,
                                             @RequestParam(required = true) String diseaseCondition) {
                                             @RequestParam(required = true) int pagesize) {
        try {
            if (StringUtils.isEmpty(filter)) {
                return error(-1, "搜索字段不能为空");
@ -805,8 +804,8 @@ public class SignPatientLabelInfoController extends BaseController {
            page = page - 1;
            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel(getUID(), filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize,diseaseCondition);
//            JSONArray result = labelInfoService.searchPatientByNameOrLabel("xy201703150222", filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize,diseaseCondition);
//            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel(getUID(), filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize,diseaseCondition);
            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel("xy201703150222", filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
@ -843,8 +842,8 @@ public class SignPatientLabelInfoController extends BaseController {
            @ApiParam(name="getcolor", value="是否获取颜色标签") @RequestParam(value = "getcolor",required = true,defaultValue = "1")  int getcolor,
            @ApiParam(name="getstands", value="是否获取预警人数数据") @RequestParam(value = "getstands",required = true,defaultValue = "1")  int getstands,
            @ApiParam(name="gethealthindex", value="是否获取体征数据") @RequestParam(value = "gethealthindex",required = true,defaultValue = "1")  int gethealthindex,
            @ApiParam(name="startdate", value="体征数据开始时间yyyy-mm-dd hh:mm:ss") @RequestParam(value = "startdate",required = false,defaultValue = "")  String startdate,
            @ApiParam(name="enddate", value="体征数据结束时间yyyy-mm-dd hh:mm:ss") @RequestParam(value = "enddate",required = false,defaultValue = "")  String enddate){
            @ApiParam(name="startdate", value="体征数据开始时间yyyy-mm-dd hh:mm:ss") @RequestParam(value = "startdate",required = false,defaultValue = "2017-9-10 00:00:00")  String startdate,
            @ApiParam(name="enddate", value="体征数据结束时间yyyy-mm-dd hh:mm:ss") @RequestParam(value = "enddate",required = false,defaultValue = "2017-9-16 23:59:59")  String enddate){
        try {
            com.alibaba.fastjson.JSONObject result = doctorSchemeService.getSlowDiseaseTeaminfos(teamCode,getcolor,getstands,gethealthindex,startdate,enddate);
            return write(200, "查询成功", "data", result);

+ 5 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/PatientHealthController.java

@ -394,11 +394,16 @@ public class PatientHealthController extends BaseController {
//                patient = getUID();
            }
            DevicePatientHealthIndex obj = healthIndexService.addPatientHealthIndex(data, type, patient, null);
            //血糖和血压需要校验
            if (type.equals("1") || type.equals("2")) {
                healthIndexService.verifyHealthIndex(obj.getId());
            }
            //判断居民的体征预警状态
            healthIndexService.handlePatientStandarStatus(obj);
            return success("新增患者指标成功!");
        } catch (Exception ex) {
            return invalidUserException(ex, -1, ex.getMessage());