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 {
JsonArray findings = new JsonArray();
AnnotationSet as2 = doc.getAnnotations(annotationSetRelationExtraction);
AnnotationSet finding_set = as2.get(annotation.getStartNode().getOffset(), annotation.getEndNode().getOffset());
int i = 1;
for (String finding : sortFindings(finding_set.getAllTypes())) {
JsonObject findingObject = new JsonObject();
id_finding = id_finding +1;
......@@ -389,8 +390,48 @@ public class App {
findingElementObject.add("features", features);
findingObject.add(key, findingElementObject);
// 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", i+"");
// 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", i);
// srDomainFindingJSON.addProperty("findingId", id_finding);
// srDomainFinding_Json.add(srDomainFindingJSON);
// 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());
......@@ -424,7 +465,8 @@ public class App {
srDomainFinding_Json.add(srDomainFindingJSON);
}
findingObject.add("srDomainFindings", srDomainFinding_Json);
}
findings.add(findingObject);
}
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