diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/DictionaryService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/DictionaryService.java index d3cd7fa0..dad34708 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/DictionaryService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/DictionaryService.java @@ -60,6 +60,16 @@ public class DictionaryService { newValues.add(new DictionaryIncrementValue(dictionaryEntry.getValue(), dictionaryModel.isCaseInsensitive())); } }); + dictionaryModel.getFalsePositives().forEach(dictionaryEntry -> { + if (dictionaryEntry.getVersion() > fromVersion.getDossierTemplateVersion()) { + newValues.add(new DictionaryIncrementValue(dictionaryEntry.getValue(), dictionaryModel.isCaseInsensitive())); + } + }); + dictionaryModel.getFalseRecommendations().forEach(dictionaryEntry -> { + if (dictionaryEntry.getVersion() > fromVersion.getDossierTemplateVersion()) { + newValues.add(new DictionaryIncrementValue(dictionaryEntry.getValue(), dictionaryModel.isCaseInsensitive())); + } + }); }); if (dictionariesByDossier.containsKey(dossierId)) { @@ -70,6 +80,16 @@ public class DictionaryService { newValues.add(new DictionaryIncrementValue(dictionaryEntry.getValue(), dictionaryModel.isCaseInsensitive())); } }); + dictionaryModel.getFalsePositives().forEach(dictionaryEntry -> { + if (dictionaryEntry.getVersion() > fromVersion.getDossierVersion()) { + newValues.add(new DictionaryIncrementValue(dictionaryEntry.getValue(), dictionaryModel.isCaseInsensitive())); + } + }); + dictionaryModel.getFalseRecommendations().forEach(dictionaryEntry -> { + if (dictionaryEntry.getVersion() > fromVersion.getDossierVersion()) { + newValues.add(new DictionaryIncrementValue(dictionaryEntry.getValue(), dictionaryModel.isCaseInsensitive())); + } + }); }); }