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

smaller term

parent 19291df8
Pipeline #28778 failed with stage
in 0 seconds
......@@ -324,13 +324,18 @@ public class AnnotationUtil {
}else {
first = false;
}
//add specimen to finding
Annotation specimen = as.get(new Integer(spe_id));
specimen.getFeatures().put(template_value_name, getSendCode(specimen, gate.Utils.stringFor(doc, specimen)));
specimen.getFeatures().put(send_code_name, getOnlySENDCode(specimen, gate.Utils.stringFor(doc, specimen)));
specimen.getFeatures().put(send_codelist_name, getOnlySENDCodeList(specimen, gate.Utils.stringFor(doc, specimen)));
specimen.getFeatures().put("ANNOTATION_TYPE",specimen.getType());
doc.getAnnotations(annotationSetRelationExtraction).add(specimen.getStartNode(), specimen.getEndNode(), "FINDING_"+finding_id, specimen.getFeatures());
try {
//add specimen to finding
Annotation specimen = as.get(new Integer(spe_id));
specimen.getFeatures().put(template_value_name, getSendCode(specimen, gate.Utils.stringFor(doc, specimen)));
specimen.getFeatures().put(send_code_name, getOnlySENDCode(specimen, gate.Utils.stringFor(doc, specimen)));
specimen.getFeatures().put(send_codelist_name, getOnlySENDCodeList(specimen, gate.Utils.stringFor(doc, specimen)));
specimen.getFeatures().put("ANNOTATION_TYPE",specimen.getType());
doc.getAnnotations(annotationSetRelationExtraction).add(specimen.getStartNode(), specimen.getEndNode(), "FINDING_"+finding_id, specimen.getFeatures());
}catch(Exception e) {
e.printStackTrace();
}
}
}
......@@ -484,21 +489,6 @@ public class AnnotationUtil {
return text;
}
private static String getValueFinding(Annotation annotation, String text) {
String send_code = "";
if(annotation.getFeatures().get("MANUAL_SEND_CODE")!=null) {
send_code = annotation.getFeatures().get("MANUAL_SEND_CODE").toString();
}else if(annotation.getFeatures().get("CDISC_SEND_CODE")!=null) {
send_code = annotation.getFeatures().get("CDISC_SEND_CODE").toString();
}else if(annotation.getFeatures().get("ETOX_SEND_CODE")!=null) {
send_code = annotation.getFeatures().get("ETOX_SEND_CODE").toString();
}
if(!send_code.equals("")) {
return text+"("+send_code+")";
}
return text;
}
private static String getOnlySENDCodeList(Annotation annotation, String text) {
String send_code = "";
if(annotation.getFeatures().get("MANUAL_CODELIST")!=null) {
......@@ -507,6 +497,8 @@ public class AnnotationUtil {
send_code = annotation.getFeatures().get("CDISC_CODELIST").toString();
}else if(annotation.getFeatures().get("ETOX_CODELIST")!=null) {
send_code = annotation.getFeatures().get("ETOX_CODELIST").toString();
}else if(annotation.getFeatures().get("SMALLER_TERM_CODELIST")!=null) {
send_code = annotation.getFeatures().get("SMALLER_TERM_CODELIST").toString();
}
return send_code;
}
......@@ -528,6 +520,8 @@ public class AnnotationUtil {
send_code = annotation.getFeatures().get("ETOX_SEND_DOMAIN_CODE").toString();
}else if(annotation.getFeatures().get("MANUAL_SEND_DOMAIN_CODE")!=null) {
send_code = annotation.getFeatures().get("MANUAL_SEND_DOMAIN_CODE").toString();
}else if(annotation.getFeatures().get("SMALLER_TERM_SEND_DOMAIN_CODE")!=null){
send_code = annotation.getFeatures().get("SMALLER_TERM_SEND_DOMAIN_CODE").toString();
}
return send_code;
}
......@@ -547,6 +541,8 @@ public class AnnotationUtil {
send_code = annotation.getFeatures().get("CDISC_SEND_CODE").toString();
}else if(annotation.getFeatures().get("ETOX_SEND_CODE")!=null) {
send_code = annotation.getFeatures().get("ETOX_SEND_CODE").toString();
}else if(annotation.getFeatures().get("SMALLER_TERM_SEND_CODE")!=null){
send_code = annotation.getFeatures().get("SMALLER_TERM_SEND_CODE").toString();
}
return send_code;
......
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