Browse Source

提交体征数据判断预警的代码

DESKTOP-G6NQ3SI\dante 7 years ago
parent
commit
b3a3a2649b

+ 3 - 3
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/model/PatientHealthIndex.java

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

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

@ -423,20 +423,20 @@ public class DeviceService {
                }
                for (PatientHealthIndex patientHealthIndex : bloodPressurepatientHealthIndices) {
                    if(1 == patientHealthIndex.getStatus()){
                    if(patientHealthIndex.getStatus() != null && 1 == patientHealthIndex.getStatus()){
                        bloodPressureBbnormalCount++;
                    }
                }
                for (PatientHealthIndex patientHealthIndex : bloodSuggurpatientHealthIndices) {
                    if(1 == patientHealthIndex.getStatus()){
                    if(patientHealthIndex.getStatus() != null && 1 == patientHealthIndex.getStatus()){
                        bloodSuggurBbnormalCount++;
                    }
                }
                //连续3次异常,修改用户为预警状态
                if( (3 == bloodPressureBbnormalCount || 3 == bloodSuggurBbnormalCount) && 0 == patient.getStandardStatus()){
                if( (bloodPressureBbnormalCount >=3 || bloodSuggurBbnormalCount >=3) && 0 == patient.getStandardStatus()){
                    patient.setStandardStatus(1);
                }else{
                    Date end = new Date();