diff --git a/src/main/java/no/nibio/vips/model/negativeprognosismodel/NegativePrognosisModel.java b/src/main/java/no/nibio/vips/model/negativeprognosismodel/NegativePrognosisModel.java index cc64770c8824d812fa951dd108c77c4f0c7efea8..a9b9c056126941932f8d1e08032425b10765833e 100644 --- a/src/main/java/no/nibio/vips/model/negativeprognosismodel/NegativePrognosisModel.java +++ b/src/main/java/no/nibio/vips/model/negativeprognosismodel/NegativePrognosisModel.java @@ -96,17 +96,18 @@ public class NegativePrognosisModel extends I18nImpl implements Model{ result.setValue(this.getModelId().toString(), DataMatrix.DAILY_CONTRIB_D, this.dataMatrix.getDefaultFormattedValueForDate(currentDate, DataMatrix.DAILY_CONTRIB_D)); result.setValue(this.getModelId().toString(), DataMatrix.DAILY_CONTRIB, this.dataMatrix.getDefaultFormattedValueForDate(currentDate, DataMatrix.DAILY_CONTRIB)); result.setValue(this.getModelId().toString(), DataMatrix.AGGREGATED_CONTRIB, this.dataMatrix.getDefaultFormattedValueForDate(currentDate, DataMatrix.AGGREGATED_CONTRIB)); + result.setValue(this.getModelId().toString(), "INFECTION_THRESHOLD", String.valueOf(this.INFECTION_THRESHOLD)); // Deciding warning status Double aggregatedContribution = this.dataMatrix.getParamDoubleValueForDate(currentDate, DataMatrix.AGGREGATED_CONTRIB); Double dailyContribution = this.dataMatrix.getParamDoubleValueForDate(currentDate, DataMatrix.DAILY_CONTRIB); Integer warningStatus = 2; // If aggregated contribution < INFECTION_THRESHOLD: NO RISK - if(aggregatedContribution <= this.INFECTION_THRESHOLD) + if(aggregatedContribution >= this.INFECTION_THRESHOLD) { // If aggregated contribution >= INFECTION_THRESHOLD and daily contribution <= INFECTION_DAILY_CONTRIBUTION_THRESHOLD: MEDIUM RISK warningStatus = 3; // If aggregated contributin >= INFECTION_THRESHOLD and daily contribution > INFECTION_DAILY_CONTRIBUTION_THRESHOLD: HIGH RISK - if(dailyContribution >this.INFECTION_DAILY_CONTRIBUTION_THRESHOLD) + if(dailyContribution > this.INFECTION_DAILY_CONTRIBUTION_THRESHOLD) { warningStatus = 4; }