Commit c54de8b0 authored by Javi Corvi's avatar Javi Corvi
Browse files

sr_domain finding numeration

parent c3f5fd75
Pipeline #25013 failed with stage
in 65 minutes
......@@ -60,7 +60,7 @@ public class App {
static Integer id_finding = 0;
static Integer id_sr_finding = 1;
static Integer id_sr_finding = 0;
public static void main(String[] args ){
......@@ -395,7 +395,7 @@ public class App {
JsonObject srDomainFindingJSON = new JsonObject();
srDomainFindingJSON.addProperty("STUDYID", srDomainFinding.getSTUDYID());
srDomainFindingJSON.addProperty("DOMAIN", srDomainFinding.getDOMAIN());
srDomainFindingJSON.addProperty("SRSEQ", srDomainFinding.getSRSEQ());//TODO import and go to the app
srDomainFindingJSON.addProperty("SRSEQ", srDomainFinding.getSRSEQ());
srDomainFindingJSON.addProperty("SRRISK", srDomainFinding.getSRRISK());
srDomainFindingJSON.addProperty("SPGRPCD", srDomainFinding.getSPGRPCD());
srDomainFindingJSON.addProperty("GRPLBL", srDomainFinding.getGRPLBL());
......@@ -419,6 +419,8 @@ public class App {
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);
......@@ -438,8 +440,9 @@ public class App {
List<String> study_domain_witht_spec = new ArrayList<>(Arrays.asList("CL", "LB", "MA", "MI", "OM", "PP", "TF"));
SRDomainFinding srDomainFinding = new SRDomainFinding();
srDomainFinding.setDOMAIN("SR");
srDomainFinding.setSRSEQ(id_sr_finding.toString());
id_sr_finding = id_sr_finding + 1;
srDomainFinding.setSRSEQ(id_sr_finding.toString());
srDomainFinding.setSrDomainId(id_sr_finding);
List<Annotation> finding_ = annotations_findings_by_type.get("FINDING");
if(finding_!=null) {
Annotation finding = finding_.get(0);
......@@ -543,6 +546,8 @@ public class App {
}else {
System.out.println("text empty study domain");//es un finding the umls dnorm y demas que no tienen study domain. Estos ademas recordar setear CODIGO interno quizas una palabra lo tenga.
}
}else {
System.out.println("ojo");
}
}
srDomainFindingList.add(srDomainFinding);
......@@ -565,6 +570,7 @@ public class App {
SRDomainFinding srDomainFinding2 = srDomainFinding.clone();
id_sr_finding = id_sr_finding + 1;
srDomainFinding2.setSRSEQ(id_sr_finding.toString());
srDomainFinding2.setSrDomainId(id_sr_finding);
srDomainFinding2.setSRGRPDOS(string);
srDomainFindingList.add(srDomainFinding2);
}
......@@ -599,6 +605,7 @@ public class App {
SRDomainFinding srDomainFinding2 = srDomainFinding.clone();
id_sr_finding = id_sr_finding + 1;
srDomainFinding2.setSRSEQ(id_sr_finding.toString());
srDomainFinding2.setSrDomainId(id_sr_finding);
srDomainFinding2.setSPGRPCD(string);
srDomainFindingList.add(srDomainFinding2);
}
......@@ -621,6 +628,7 @@ public class App {
srDomainFinding2.setSRSEX("M");
id_sr_finding = id_sr_finding + 1;
srDomainFinding2.setSRSEQ(id_sr_finding.toString());
srDomainFinding2.setSrDomainId(id_sr_finding);
srDomainFindingList.add(srDomainFinding2);
}
}else {
......@@ -637,6 +645,7 @@ public class App {
JsonArray relevant_sentences = new JsonArray();
Integer id_sentence = 0;
id_finding = 0;
id_sr_finding = 0;
for (String type : relevant_sentences_set.getAllTypes()) {
for (Annotation annotation : relevant_sentences_set.get(type).inDocumentOrder()) {
JsonObject annotationObject = new JsonObject();
......
......@@ -34,6 +34,15 @@ public class SRDomainFinding implements Cloneable{
private String SRSIGF="";
private String SRTRTEF="";
private String SRCOMNT="";
private Integer srDomainId;
public Integer getSrDomainId() {
return srDomainId;
}
public void setSrDomainId(Integer srDomainId) {
this.srDomainId = srDomainId;
}
public String getSTUDYID() {
return STUDYID;
}
......
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