RED-8645 - Fix some more rules #318
@ -487,62 +487,6 @@ rule "PII.4.0: Redact line after contact information keywords"
|
|||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.4.1: Redact line after contact information keywords (non vertebrate study)"
|
|
||||||
when
|
|
||||||
not FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.1", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
rule "PII.4.2: Redact line after contact information keywords (vertebrate study)"
|
|
||||||
when
|
|
||||||
FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.2", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: PII.5
|
// Rule unit: PII.5
|
||||||
rule "PII.5.0: Redact line after contact information keywords reduced"
|
rule "PII.5.0: Redact line after contact information keywords reduced"
|
||||||
@ -709,7 +653,7 @@ rule "PII.8.1: Redact contact information if producer is found (non vertebrate s
|
|||||||
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
||||||
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
||||||
))
|
))
|
||||||
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Article 39(e)(3) of Regulation (EC) No 178/2002"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
||||||
|
|||||||
@ -931,62 +931,6 @@ rule "PII.4.0: Redact line after contact information keywords"
|
|||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.4.1: Redact line after contact information keywords (non vertebrate study)"
|
|
||||||
when
|
|
||||||
not FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.1", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
rule "PII.4.2: Redact line after contact information keywords (vertebrate study)"
|
|
||||||
when
|
|
||||||
FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.2", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: PII.5
|
// Rule unit: PII.5
|
||||||
rule "PII.5.0: Redact line after contact information keywords reduced"
|
rule "PII.5.0: Redact line after contact information keywords reduced"
|
||||||
@ -1153,7 +1097,7 @@ rule "PII.8.1: Redact contact information if producer is found (non vertebrate s
|
|||||||
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
||||||
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
||||||
))
|
))
|
||||||
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Article 39(e)(3) of Regulation (EC) No 178/2002"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
||||||
|
|||||||
@ -626,62 +626,6 @@ rule "PII.4.0: Redact line after contact information keywords"
|
|||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.4.1: Redact line after contact information keywords (non vertebrate study)"
|
|
||||||
when
|
|
||||||
not FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.1", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
rule "PII.4.2: Redact line after contact information keywords (vertebrate study)"
|
|
||||||
when
|
|
||||||
FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.2", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: PII.6
|
// Rule unit: PII.6
|
||||||
rule "PII.6.0: Redact line between contact keywords"
|
rule "PII.6.0: Redact line between contact keywords"
|
||||||
@ -808,7 +752,7 @@ rule "PII.8.1: Redact contact information if producer is found (non vertebrate s
|
|||||||
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
||||||
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
||||||
))
|
))
|
||||||
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Article 39(e)(3) of Regulation (EC) No 178/2002"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
||||||
|
|||||||
@ -931,62 +931,6 @@ rule "PII.4.0: Redact line after contact information keywords"
|
|||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(contactEntity -> contactEntity.redact("PII.4.0", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.4.1: Redact line after contact information keywords (non vertebrate study)"
|
|
||||||
when
|
|
||||||
not FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.1", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
rule "PII.4.2: Redact line after contact information keywords (vertebrate study)"
|
|
||||||
when
|
|
||||||
FileAttribute(label == "Vertebrate Study", value soundslike "Yes" || value.toLowerCase() == "y")
|
|
||||||
$contactKeyword: String() from List.of("Contact point:",
|
|
||||||
"Contact:",
|
|
||||||
"Alternative contact:",
|
|
||||||
"European contact:",
|
|
||||||
"No:",
|
|
||||||
"Contact:",
|
|
||||||
"Tel.:",
|
|
||||||
"Tel:",
|
|
||||||
"Telephone number:",
|
|
||||||
"Telephone No:",
|
|
||||||
"Telephone:",
|
|
||||||
"Phone No.",
|
|
||||||
"Phone:",
|
|
||||||
"Fax number:",
|
|
||||||
"Fax:",
|
|
||||||
"E-mail:",
|
|
||||||
"Email:",
|
|
||||||
"e-mail:",
|
|
||||||
"E-mail address:")
|
|
||||||
$section: Section(containsString($contactKeyword))
|
|
||||||
then
|
|
||||||
entityCreationService.lineAfterString($contactKeyword, "PII", EntityType.ENTITY, $section)
|
|
||||||
.forEach(contactEntity -> contactEntity.redact("PII.4.2", "Found after \"" + $contactKeyword + "\" contact keyword", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: PII.5
|
// Rule unit: PII.5
|
||||||
rule "PII.5.0: Redact line after contact information keywords reduced"
|
rule "PII.5.0: Redact line after contact information keywords reduced"
|
||||||
@ -1153,7 +1097,7 @@ rule "PII.8.1: Redact contact information if producer is found (non vertebrate s
|
|||||||
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
entityCreationService.betweenStrings("No:", "Fax", "PII", EntityType.ENTITY, $section),
|
||||||
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
entityCreationService.betweenStrings("Contact:", "Tel", "PII", EntityType.ENTITY, $section)
|
||||||
))
|
))
|
||||||
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2e)"));
|
.forEach(entity -> entity.redact("PII.8.1", "Producer was found", "Article 39(e)(3) of Regulation (EC) No 178/2002"));
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
rule "PII.8.2: Redact contact information if producer is found (vertebrate study)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user