RSS-153: Added more components to SMC Report
This commit is contained in:
parent
a67ac701d1
commit
4b592b36b5
@ -126,11 +126,16 @@ public class RSSPoc2Service {
|
||||
|
||||
if (oecdIn(oecd, Set.of("402", "403", "425", "436"))) {
|
||||
resultMap.put(oecd + "-Conclusion_-_LD50_(mg/L)", getLd50Value(redactionLog));
|
||||
resultMap.put(oecd + "-Conclusion -LD50_Greater_than", getLd50GreaterThan(redactionLog));
|
||||
resultMap.put(oecd + "-Conclusion_-_Minimum_Confidence", getConfidenceMinimal(redactionLog));
|
||||
resultMap.put(oecd + "-Conclusion_-_Maximum_Confidence", getConfidenceMaximal(redactionLog));
|
||||
}
|
||||
|
||||
if (oecdIn(oecd, Set.of("438", "439"))) {
|
||||
if (oecdIn(oecd, Set.of("406", "428", "438", "439", "471", "474", "487"))) {
|
||||
resultMap.put(oecd + "-Study_Design", getAsOneBlock(redactionLog, "study_design"));
|
||||
}
|
||||
|
||||
if (oecdIn(oecd, Set.of("406", "428", "438", "439", "474", "487"))) {
|
||||
resultMap.put(oecd + "-Results_and_Conclusions", getResultsAndConclusion(redactionLog));
|
||||
}
|
||||
|
||||
@ -156,6 +161,19 @@ public class RSSPoc2Service {
|
||||
i++;
|
||||
}
|
||||
|
||||
var sentences = getAsSentences(redactionLog, "clinical_observations");
|
||||
i = 1;
|
||||
for (String sentence : sentences) {
|
||||
resultMap.put(oecd + "-Clinical_Observations_" + i, sentence);
|
||||
i++;
|
||||
}
|
||||
|
||||
sentences = getAsSentences(redactionLog, "bodyweight_changes");
|
||||
i = 1;
|
||||
for (String sentence : sentences) {
|
||||
resultMap.put(oecd + "-Body_weight_changes_" + i, sentence);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
if (oecdIn(oecd, Set.of("404"))) {
|
||||
@ -201,6 +219,7 @@ public class RSSPoc2Service {
|
||||
}
|
||||
|
||||
resultMap.put(oecd + "-Test_results", getAsOneBlock(redactionLog, "test_results"));
|
||||
resultMap.put(oecd + "-Was_the_definitive_study_conducted_with_positive_control?", getAsOneBlock(redactionLog, "positive_control"));
|
||||
}
|
||||
|
||||
rssFileResponses.add(new RSSFileResponse(file.getFilename(), resultMap));
|
||||
@ -388,6 +407,17 @@ public class RSSPoc2Service {
|
||||
}
|
||||
|
||||
|
||||
private String getLd50GreaterThan(RedactionLog redactionLog) {
|
||||
|
||||
var ld50Greater = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getType().equals("ld50_greater")).map(RedactionLogEntry::getValue).findFirst();
|
||||
|
||||
if (ld50Greater.isPresent()) {
|
||||
return "Greater than";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
private String getLd50Value(RedactionLog redactionLog) {
|
||||
|
||||
var uniqueLd50 = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getType().equals("ld50_value")).map(RedactionLogEntry::getValue).collect(Collectors.toSet());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user