Commit 612008c1 authored by Javi Corvi's avatar Javi Corvi
Browse files

identification sr id

parent c54de8b0
Pipeline #25018 passed with stage
in 1 minute and 50 seconds
...@@ -351,6 +351,7 @@ public class App { ...@@ -351,6 +351,7 @@ public class App {
JsonArray findings = new JsonArray(); JsonArray findings = new JsonArray();
AnnotationSet as2 = doc.getAnnotations(annotationSetRelationExtraction); AnnotationSet as2 = doc.getAnnotations(annotationSetRelationExtraction);
AnnotationSet finding_set = as2.get(annotation.getStartNode().getOffset(), annotation.getEndNode().getOffset()); AnnotationSet finding_set = as2.get(annotation.getStartNode().getOffset(), annotation.getEndNode().getOffset());
int i = 1;
for (String finding : sortFindings(finding_set.getAllTypes())) { for (String finding : sortFindings(finding_set.getAllTypes())) {
JsonObject findingObject = new JsonObject(); JsonObject findingObject = new JsonObject();
id_finding = id_finding +1; id_finding = id_finding +1;
...@@ -389,42 +390,83 @@ public class App { ...@@ -389,42 +390,83 @@ public class App {
findingElementObject.add("features", features); findingElementObject.add("features", features);
findingObject.add(key, findingElementObject); findingObject.add(key, findingElementObject);
List<SRDomainFinding> srDomainFindings = generateSRDomainData(annotations_findings_by_type); // List<SRDomainFinding> srDomainFindings = generateSRDomainData(annotations_findings_by_type);
JsonArray srDomainFinding_Json = new JsonArray(); // JsonArray srDomainFinding_Json = new JsonArray();
for (SRDomainFinding srDomainFinding : srDomainFindings) { //
JsonObject srDomainFindingJSON = new JsonObject(); // for (SRDomainFinding srDomainFinding : srDomainFindings) {
srDomainFindingJSON.addProperty("STUDYID", srDomainFinding.getSTUDYID()); // JsonObject srDomainFindingJSON = new JsonObject();
srDomainFindingJSON.addProperty("DOMAIN", srDomainFinding.getDOMAIN()); // srDomainFindingJSON.addProperty("STUDYID", srDomainFinding.getSTUDYID());
srDomainFindingJSON.addProperty("SRSEQ", srDomainFinding.getSRSEQ()); // srDomainFindingJSON.addProperty("DOMAIN", srDomainFinding.getDOMAIN());
srDomainFindingJSON.addProperty("SRRISK", srDomainFinding.getSRRISK()); // srDomainFindingJSON.addProperty("SRSEQ", i+"");
srDomainFindingJSON.addProperty("SPGRPCD", srDomainFinding.getSPGRPCD()); // srDomainFindingJSON.addProperty("SRRISK", srDomainFinding.getSRRISK());
srDomainFindingJSON.addProperty("GRPLBL", srDomainFinding.getGRPLBL()); // srDomainFindingJSON.addProperty("SPGRPCD", srDomainFinding.getSPGRPCD());
srDomainFindingJSON.addProperty("SRGRPDOS", srDomainFinding.getSRGRPDOS()); // srDomainFindingJSON.addProperty("GRPLBL", srDomainFinding.getGRPLBL());
srDomainFindingJSON.addProperty("SRSEX", srDomainFinding.getSRSEX()); // srDomainFindingJSON.addProperty("SRGRPDOS", srDomainFinding.getSRGRPDOS());
srDomainFindingJSON.addProperty("SRSTDY", srDomainFinding.getSRSTDY()); // srDomainFindingJSON.addProperty("SRSEX", srDomainFinding.getSRSEX());
srDomainFindingJSON.addProperty("SRSTPHSE", srDomainFinding.getSRSTPHSE()); // srDomainFindingJSON.addProperty("SRSTDY", srDomainFinding.getSRSTDY());
srDomainFindingJSON.addProperty("SROBSTDY", srDomainFinding.getSROBSTDY()); // srDomainFindingJSON.addProperty("SRSTPHSE", srDomainFinding.getSRSTPHSE());
srDomainFindingJSON.addProperty("SRENDY", srDomainFinding.getSRENDY()); // srDomainFindingJSON.addProperty("SROBSTDY", srDomainFinding.getSROBSTDY());
srDomainFindingJSON.addProperty("SRENPHSE", srDomainFinding.getSRENPHSE()); // srDomainFindingJSON.addProperty("SRENDY", srDomainFinding.getSRENDY());
srDomainFindingJSON.addProperty("SROBENDY", srDomainFinding.getSROBENDY()); // srDomainFindingJSON.addProperty("SRENPHSE", srDomainFinding.getSRENPHSE());
srDomainFindingJSON.addProperty("SRDOMAIN", srDomainFinding.getSRDOMAIN()); // srDomainFindingJSON.addProperty("SROBENDY", srDomainFinding.getSROBENDY());
srDomainFindingJSON.addProperty("SRSPEC", srDomainFinding.getSRSPEC()); // srDomainFindingJSON.addProperty("SRDOMAIN", srDomainFinding.getSRDOMAIN());
srDomainFindingJSON.addProperty("SRTSTCD", srDomainFinding.getSRTSTCD()); // srDomainFindingJSON.addProperty("SRSPEC", srDomainFinding.getSRSPEC());
srDomainFindingJSON.addProperty("SRFNDG", srDomainFinding.getSRFNDG()); // srDomainFindingJSON.addProperty("SRTSTCD", srDomainFinding.getSRTSTCD());
srDomainFindingJSON.addProperty("SRORES", srDomainFinding.getSRORES()); // srDomainFindingJSON.addProperty("SRFNDG", srDomainFinding.getSRFNDG());
srDomainFindingJSON.addProperty("SROBSV", srDomainFinding.getSROBSV()); // srDomainFindingJSON.addProperty("SRORES", srDomainFinding.getSRORES());
srDomainFindingJSON.addProperty("SROBSQ", srDomainFinding.getSROBSQ()); // srDomainFindingJSON.addProperty("SROBSV", srDomainFinding.getSROBSV());
srDomainFindingJSON.addProperty("SRSEV", srDomainFinding.getSRSEV()); // srDomainFindingJSON.addProperty("SROBSQ", srDomainFinding.getSROBSQ());
srDomainFindingJSON.addProperty("SRPCNT", srDomainFinding.getSRPCNT()); // srDomainFindingJSON.addProperty("SRSEV", srDomainFinding.getSRSEV());
srDomainFindingJSON.addProperty("SRSIGF", srDomainFinding.getSRSIGF()); // srDomainFindingJSON.addProperty("SRPCNT", srDomainFinding.getSRPCNT());
srDomainFindingJSON.addProperty("SRTRTEF", srDomainFinding.getSRTRTEF()); // srDomainFindingJSON.addProperty("SRSIGF", srDomainFinding.getSRSIGF());
srDomainFindingJSON.addProperty("SRCOMNT", srDomainFinding.getSRCOMNT()); // srDomainFindingJSON.addProperty("SRTRTEF", srDomainFinding.getSRTRTEF());
srDomainFindingJSON.addProperty("srDomainId", srDomainFinding.getSrDomainId()); // srDomainFindingJSON.addProperty("SRCOMNT", srDomainFinding.getSRCOMNT());
srDomainFindingJSON.addProperty("findingId", id_finding); // srDomainFindingJSON.addProperty("srDomainId", i);
srDomainFinding_Json.add(srDomainFindingJSON); // srDomainFindingJSON.addProperty("findingId", id_finding);
} // srDomainFinding_Json.add(srDomainFindingJSON);
findingObject.add("srDomainFindings", srDomainFinding_Json); // i=i+1;
// }
// findingObject.add("srDomainFindings", srDomainFinding_Json);
} }
List<SRDomainFinding> srDomainFindings = generateSRDomainData(annotations_findings_by_type);
JsonArray srDomainFinding_Json = new JsonArray();
for (SRDomainFinding srDomainFinding : srDomainFindings) {
JsonObject srDomainFindingJSON = new JsonObject();
srDomainFindingJSON.addProperty("STUDYID", srDomainFinding.getSTUDYID());
srDomainFindingJSON.addProperty("DOMAIN", srDomainFinding.getDOMAIN());
srDomainFindingJSON.addProperty("SRSEQ", srDomainFinding.getSRSEQ());
srDomainFindingJSON.addProperty("SRRISK", srDomainFinding.getSRRISK());
srDomainFindingJSON.addProperty("SPGRPCD", srDomainFinding.getSPGRPCD());
srDomainFindingJSON.addProperty("GRPLBL", srDomainFinding.getGRPLBL());
srDomainFindingJSON.addProperty("SRGRPDOS", srDomainFinding.getSRGRPDOS());
srDomainFindingJSON.addProperty("SRSEX", srDomainFinding.getSRSEX());
srDomainFindingJSON.addProperty("SRSTDY", srDomainFinding.getSRSTDY());
srDomainFindingJSON.addProperty("SRSTPHSE", srDomainFinding.getSRSTPHSE());
srDomainFindingJSON.addProperty("SROBSTDY", srDomainFinding.getSROBSTDY());
srDomainFindingJSON.addProperty("SRENDY", srDomainFinding.getSRENDY());
srDomainFindingJSON.addProperty("SRENPHSE", srDomainFinding.getSRENPHSE());
srDomainFindingJSON.addProperty("SROBENDY", srDomainFinding.getSROBENDY());
srDomainFindingJSON.addProperty("SRDOMAIN", srDomainFinding.getSRDOMAIN());
srDomainFindingJSON.addProperty("SRSPEC", srDomainFinding.getSRSPEC());
srDomainFindingJSON.addProperty("SRTSTCD", srDomainFinding.getSRTSTCD());
srDomainFindingJSON.addProperty("SRFNDG", srDomainFinding.getSRFNDG());
srDomainFindingJSON.addProperty("SRORES", srDomainFinding.getSRORES());
srDomainFindingJSON.addProperty("SROBSV", srDomainFinding.getSROBSV());
srDomainFindingJSON.addProperty("SROBSQ", srDomainFinding.getSROBSQ());
srDomainFindingJSON.addProperty("SRSEV", srDomainFinding.getSRSEV());
srDomainFindingJSON.addProperty("SRPCNT", srDomainFinding.getSRPCNT());
srDomainFindingJSON.addProperty("SRSIGF", srDomainFinding.getSRSIGF());
srDomainFindingJSON.addProperty("SRTRTEF", srDomainFinding.getSRTRTEF());
srDomainFindingJSON.addProperty("SRCOMNT", srDomainFinding.getSRCOMNT());
srDomainFindingJSON.addProperty("srDomainId", srDomainFinding.getSrDomainId());
srDomainFindingJSON.addProperty("findingId", id_finding);
srDomainFinding_Json.add(srDomainFindingJSON);
}
findingObject.add("srDomainFindings", srDomainFinding_Json);
findings.add(findingObject); findings.add(findingObject);
} }
annotated_document.add("findings", findings); annotated_document.add("findings", findings);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment