DM-305: Improved DocuMine rules
This commit is contained in:
parent
c5668b738d
commit
18979d0f33
@ -329,20 +329,17 @@ rule "DOC.7.0: study title by document structure"
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
//rule "DOC.7.0: study title"
|
rule "DOC.7.1: study title"
|
||||||
// when
|
when
|
||||||
// $section: Section(isOnPage(1) && (containsString("Final Report") || containsString("SPL")))
|
$table: Table(isOnPage(1),
|
||||||
// then
|
(containsString("Final Report") || containsString("SPL")),
|
||||||
// entityCreationService.byRegexWithLineBreaks("(?<=\\n)[\\w\\W]{1,300}(?=\\nFinal Report)", "title", EntityType.ENTITY, $section).findFirst().ifPresent(entity -> {
|
numberOfRows == 1,
|
||||||
// entity.apply("DOC.7.0", "Title found", "n-a");
|
numberOfCols == 1)
|
||||||
// });
|
then
|
||||||
// entityCreationService.betweenStrings("TITLE", "DATA REQUIREMENT", "title", EntityType.ENTITY, $section).findFirst().ifPresent(entity -> {
|
entityCreationService.byRegexWithLineBreaksIgnoreCase("(?<=\\n)[\\w\\W]{1,300}(?=\\nFinal Report)", "title", EntityType.ENTITY, $table.getCell(0, 0)).findFirst().ifPresent(entity -> {
|
||||||
// entity.apply("DOC.7.0", "Title found", "n-a");
|
entity.apply("DOC.7.1", "Title found", "n-a");
|
||||||
// });
|
});
|
||||||
// entityCreationService.betweenStrings("Laboratories", "SPL", "title", EntityType.ENTITY, $section).findFirst().ifPresent(entity -> {
|
end
|
||||||
// entity.apply("DOC.7.0", "Title found", "n-a");
|
|
||||||
// });
|
|
||||||
// end
|
|
||||||
|
|
||||||
|
|
||||||
rule "DOC.8.1: Performing Laboratory (Name)"
|
rule "DOC.8.1: Performing Laboratory (Name)"
|
||||||
@ -574,7 +571,7 @@ rule "DOC.12.0: Guideline Deviation"
|
|||||||
entityCreationService.byRegexIgnoreCase("(?>Study plan adherence)(.{1,20}deviations.{1,20} to the study plan.{0,50}\\.)\\s", "guideline_deviation", EntityType.ENTITY, 1, $section).forEach(entity -> {
|
entityCreationService.byRegexIgnoreCase("(?>Study plan adherence)(.{1,20}deviations.{1,20} to the study plan.{0,50}\\.)\\s", "guideline_deviation", EntityType.ENTITY, 1, $section).forEach(entity -> {
|
||||||
entity.apply("DOC.12.0", "Guideline deviation found in text.", "n-a");
|
entity.apply("DOC.12.0", "Guideline deviation found in text.", "n-a");
|
||||||
});
|
});
|
||||||
entityCreationService.betweenStrings("Deviations from the study plan", "validity of the study.", "guideline_deviation", EntityType.ENTITY, $section).forEach(entity -> {
|
entityCreationService.betweenStringsIncludeEnd("Deviations from the study plan", "validity of the study.", "guideline_deviation", EntityType.ENTITY, $section).forEach(entity -> {
|
||||||
entity.apply("DOC.12.0", "Deviation from the study plan found", "n-a");
|
entity.apply("DOC.12.0", "Deviation from the study plan found", "n-a");
|
||||||
});
|
});
|
||||||
end
|
end
|
||||||
@ -837,6 +834,18 @@ rule "DOC.24.0: Study Design"
|
|||||||
.forEach(entity -> entity.apply("DOC.24.0", "Study design section found", "n-a"));
|
.forEach(entity -> entity.apply("DOC.24.0", "Study design section found", "n-a"));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
rule "DOC.24.1: Study Design"
|
||||||
|
when
|
||||||
|
Headline(containsStringIgnoreCase("Study Design"), $sectionIdentifier: getSectionIdentifier())
|
||||||
|
$headline: Headline(getSectionIdentifier().isChildOf($sectionIdentifier))
|
||||||
|
then
|
||||||
|
entityCreationService.bySemanticNodeParagraphsOnly($headline.getParent(), "study_design", EntityType.ENTITY)
|
||||||
|
.forEach(entity -> {
|
||||||
|
entity.apply("DOC.24.1", "Study design section found", "n-a");
|
||||||
|
});
|
||||||
|
end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
rule "DOC.24.0: Study Design"
|
rule "DOC.24.0: Study Design"
|
||||||
when
|
when
|
||||||
@ -924,6 +933,17 @@ rule "DOC.33.0: Test Results (429)"
|
|||||||
.forEach(entity -> entity.apply("DOC.33.0", "Test Results found", "n-a"));
|
.forEach(entity -> entity.apply("DOC.33.0", "Test Results found", "n-a"));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rule "DOC.33.1: Test Results (429)"
|
||||||
|
when
|
||||||
|
Headline(containsStringIgnoreCase("RESULTS AND DISCUSSION"), $sectionIdentifierResultsAndDiscussion: getSectionIdentifier())
|
||||||
|
$headline: Headline(getSectionIdentifier().isChildOf($sectionIdentifierResultsAndDiscussion))
|
||||||
|
then
|
||||||
|
entityCreationService.bySemanticNodeParagraphsOnly($headline.getParent(), "test_results", EntityType.ENTITY)
|
||||||
|
.forEach(entity -> {
|
||||||
|
entity.apply("DOC.33.1", "Test Results found", "n-a");
|
||||||
|
});
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
rule "DOC.34.0: Approach used (429)"
|
rule "DOC.34.0: Approach used (429)"
|
||||||
when
|
when
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user