Examples of UmlsConcept


Examples of edu.mayo.bmi.uima.core.type.refsem.UmlsConcept

    //logger.info("hasConcept: " + hasConcept);
    OntologyConcept ontologyConcept = (OntologyConcept)firstConceptFS;
    boolean isRxnorm = false;
    boolean isUmls = false;

    UmlsConcept umlsConcept = null;
    if (ontologyConcept instanceof UmlsConcept)
    {
      isUmls = true;
      umlsConcept = (UmlsConcept)firstConceptFS;
    } else
    {
      isRxnorm = "RXNORM".equalsIgnoreCase(ontologyConcept.getCodingScheme());
    }
   
    //logger.info(String.format("isUmls: %b; isRxnorm: %b", isUmls, isRxnorm));
   
    if (isRxnorm)
    {
      return ConceptType.TREATMENT;
    } else if (!isUmls) // is not umls and is not rxnorm
    {
      return null;
    }
   
    // if we're continuing, this means we are umls (and we are not rxnorm)
   
    String tui = umlsConcept.getTui();
    //logger.info(String.format("tui: %s", tui));
   
    ConceptType conceptType = null;
    if (problemSet.contains(tui))
    {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

    OntologyConcept ontologyConcept;
    if (entityMention.getTypeID() == CONST.NE_TYPE_ID_DRUG) {
      ontologyConcept = new OntologyConcept(jCas);
      ontologyConcept.setCode(code);
    } else {
      UmlsConcept umlsConcept = new UmlsConcept(jCas);
      umlsConcept.setCui(code);
      ontologyConcept = umlsConcept;
    }
    ontologyConcept.addToIndexes();
    entityMention.setOntologyConceptArr(new FSArray(jCas, 1));
    entityMention.setOntologyConceptArr(0, ontologyConcept);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

            FSArray conceptArr = new FSArray(jcas, conceptSet.size());
            int arrIdx = 0;
            Iterator conceptItr = conceptSet.iterator();
            while (conceptItr.hasNext())
            {
              UmlsConcept uc = (UmlsConcept) conceptItr.next();
              conceptArr.set(arrIdx, uc);
              arrIdx++;
            }

            IdentifiedAnnotation neAnnot;
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

    List conceptList = new ArrayList();
    Iterator codeItr = snomedCodesCol.iterator();
    while (codeItr.hasNext())
    {
      String snomedCode = (String) codeItr.next();
      UmlsConcept uc = new UmlsConcept(jcas);
      uc.setCode(snomedCode);
      uc.setCodingScheme(props.getProperty(CODING_SCHEME_PRP_KEY));
      uc.setCui(cui);
      uc.setTui(tui);
      conceptList.add(uc);
    }
    return conceptList;
  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

   
    HashSet<String> uniqueCuis = new HashSet<String>();
    if(mentions == null) return null;
    for(int i = 0; i < mentions.size(); i++){
      if(mentions.get(i) instanceof UmlsConcept){
        UmlsConcept concept = (UmlsConcept) mentions.get(i);
        uniqueCuis.add(concept.getCui());
      }
    }
   
    for(String cui : uniqueCuis){
      if(t.getPolarity() == CONST.NE_POLARITY_NEGATION_PRESENT) buff.append("-");
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

    OntologyConcept ontologyConcept;
    if (mention.getTypeID() == CONST.NE_TYPE_ID_DRUG) {
      ontologyConcept = new OntologyConcept(jCas);
      ontologyConcept.setCode(code);
    } else {
      UmlsConcept umlsConcept = new UmlsConcept(jCas);
      umlsConcept.setCui(code);
      ontologyConcept = umlsConcept;
    }
    ontologyConcept.addToIndexes();
    mention.setOntologyConceptArr(new FSArray(jCas, 1));
    mention.setOntologyConceptArr(0, ontologyConcept);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

            cuiSet.clear();
            conceptList.clear();
            for ( RareWordTerm lookupHit : entry.getValue() ) {
               final String cui = lookupHit.getCui() ;
               if ( cuiSet.add( cui ) ) {
                  final UmlsConcept concept = new UmlsConcept( jcas );
                  concept.setCodingScheme( codingScheme );
                  concept.setCui( cui );
                  concept.setTui( lookupHit.getTui() );
                  conceptList.add( concept );
               }
            }
            // Skip updating CAS if all Concepts for this type were filtered out for this span.
            if ( conceptList.isEmpty() ) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

            final Collection<RareWordTerm> bestTerms = getBestRareWordTerms( entry.getValue(), dictionaryTerms );
            for ( RareWordTerm lookupHit : bestTerms ) {
               final String cui = lookupHit.getCui() ;
               //String text = lh.getDictMetaDataHit().getMetaFieldValue("text");
               if ( cuiSet.add( cui ) ) {
                  final UmlsConcept concept = new UmlsConcept( jcas );
                  concept.setCodingScheme( codingScheme );
                  concept.setCui( cui );
                  concept.setTui( lookupHit.getTui() );
                  conceptList.add( concept );
               }
            }
            // Skip updating CAS if all Concepts for this type were filtered out for this span.
            if ( conceptList.isEmpty() ) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

   private Collection<UmlsConcept> createConceptCol( final JCas jcas, final String cui, final String tui,
                                        final Collection<String> snomedCodesCol ) {
      final String codingSchemeKey = props.getProperty( CODING_SCHEME_PRP_KEY );
      final List<UmlsConcept> conceptList = new ArrayList<>();
      for ( String snomedCode : snomedCodesCol ) {
         final UmlsConcept uc = new UmlsConcept( jcas );
         uc.setCode( snomedCode );
         uc.setCodingScheme( codingSchemeKey );
         uc.setCui( cui );
         uc.setTui( tui );
         conceptList.add( uc );
      }
      return conceptList;
   }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.UmlsConcept

    OntologyConcept ontologyConcept;
    if (mention.getTypeID() == CONST.NE_TYPE_ID_DRUG) {
      ontologyConcept = new OntologyConcept(jCas);
      ontologyConcept.setCode(code);
    } else {
      UmlsConcept umlsConcept = new UmlsConcept(jCas);
      umlsConcept.setCui(code);
      ontologyConcept = umlsConcept;
    }
    ontologyConcept.addToIndexes();
    mention.setOntologyConceptArr(new FSArray(jCas, 1));
    mention.setOntologyConceptArr(0, ontologyConcept);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.