RED-8680 - Add specific CBI rules for seeds #323
@ -153,6 +153,32 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found
|
|||||||
$authorOrAddress.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $authorOrAddress));
|
$authorOrAddress.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $authorOrAddress));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rule "CBI.7.2: Do not redact PII if published information found in Section without tables"
|
||||||
|
when
|
||||||
|
$section: Section(!hasTables(),
|
||||||
|
hasEntitiesOfType("published_information"),
|
||||||
|
hasEntitiesOfType("PII"))
|
||||||
|
then
|
||||||
|
$section.getEntitiesOfType("PII")
|
||||||
|
.forEach(redactionEntity -> {
|
||||||
|
redactionEntity.skipWithReferences(
|
||||||
|
"CBI.7.2",
|
||||||
|
"Published Information found in section",
|
||||||
|
$section.getEntitiesOfType("published_information")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "CBI.7.3: Do not redact PII if published information found in same table row"
|
||||||
|
when
|
||||||
|
$table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("PII"))
|
||||||
|
$cellsWithPublishedInformation: TableCell() from $table.streamTableCellsWhichContainType("published_information").toList()
|
||||||
|
$tableCell: TableCell(row == $cellsWithPublishedInformation.row) from $table.streamTableCells().toList()
|
||||||
|
$pii: TextEntity(type() == "PII", active()) from $tableCell.getEntities()
|
||||||
|
then
|
||||||
|
$pii.skipWithReferences("CBI.7.3", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $pii));
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: CBI.9
|
// Rule unit: CBI.9
|
||||||
rule "CBI.9.0: Redact all cells with Header Author(s) as CBI_author (non vertebrate study)"
|
rule "CBI.9.0: Redact all cells with Header Author(s) as CBI_author (non vertebrate study)"
|
||||||
|
|||||||
@ -336,6 +336,32 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found
|
|||||||
$authorOrAddress.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $authorOrAddress));
|
$authorOrAddress.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $authorOrAddress));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rule "CBI.7.2: Do not redact PII if published information found in Section without tables"
|
||||||
|
when
|
||||||
|
$section: Section(!hasTables(),
|
||||||
|
hasEntitiesOfType("published_information"),
|
||||||
|
hasEntitiesOfType("PII"))
|
||||||
|
then
|
||||||
|
$section.getEntitiesOfType("PII")
|
||||||
|
.forEach(redactionEntity -> {
|
||||||
|
redactionEntity.skipWithReferences(
|
||||||
|
"CBI.7.2",
|
||||||
|
"Published Information found in section",
|
||||||
|
$section.getEntitiesOfType("published_information")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "CBI.7.3: Do not redact PII if published information found in same table row"
|
||||||
|
when
|
||||||
|
$table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("PII"))
|
||||||
|
$cellsWithPublishedInformation: TableCell() from $table.streamTableCellsWhichContainType("published_information").toList()
|
||||||
|
$tableCell: TableCell(row == $cellsWithPublishedInformation.row) from $table.streamTableCells().toList()
|
||||||
|
$pii: TextEntity(type() == "PII", active()) from $tableCell.getEntities()
|
||||||
|
then
|
||||||
|
$pii.skipWithReferences("CBI.7.3", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $pii));
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: CBI.8
|
// Rule unit: CBI.8
|
||||||
rule "CBI.8.0: Redacted because Section contains must_redact entity"
|
rule "CBI.8.0: Redacted because Section contains must_redact entity"
|
||||||
|
|||||||
@ -337,6 +337,32 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found
|
|||||||
$authorOrAddress.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $authorOrAddress));
|
$authorOrAddress.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $authorOrAddress));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rule "CBI.7.2: Do not redact PII if published information found in Section without tables"
|
||||||
|
when
|
||||||
|
$section: Section(!hasTables(),
|
||||||
|
hasEntitiesOfType("published_information"),
|
||||||
|
hasEntitiesOfType("PII"))
|
||||||
|
then
|
||||||
|
$section.getEntitiesOfType("PII")
|
||||||
|
.forEach(redactionEntity -> {
|
||||||
|
redactionEntity.skipWithReferences(
|
||||||
|
"CBI.7.2",
|
||||||
|
"Published Information found in section",
|
||||||
|
$section.getEntitiesOfType("published_information")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "CBI.7.3: Do not redact PII if published information found in same table row"
|
||||||
|
when
|
||||||
|
$table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("PII"))
|
||||||
|
$cellsWithPublishedInformation: TableCell() from $table.streamTableCellsWhichContainType("published_information").toList()
|
||||||
|
$tableCell: TableCell(row == $cellsWithPublishedInformation.row) from $table.streamTableCells().toList()
|
||||||
|
$pii: TextEntity(type() == "PII", active()) from $tableCell.getEntities()
|
||||||
|
then
|
||||||
|
$pii.skipWithReferences("CBI.7.3", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $pii));
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: CBI.8
|
// Rule unit: CBI.8
|
||||||
rule "CBI.8.0: Redacted because Section contains must_redact entity"
|
rule "CBI.8.0: Redacted because Section contains must_redact entity"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user