ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Pei" <Pei.C...@childrens.harvard.edu>
Subject RE: OrangeBookFilterConsumerImpl
Date Wed, 25 Jun 2014 16:13:35 GMT
1) Could you debug/confirm that MedicationMentions are created by Annotator and the new consumer?
  If not, attach the db config xml and version of cTAKES you are using?
2) Just an FYI: did you know you can use uimaFIT's JCasUtil to simplify the example code you
had?
Collection< MedicationMention> mentions = JCasUtil.select(jcas, MedicationMention.class);
	    for(MedicationMention mention : mentions) {
		//some work here
	    }

> -----Original Message-----
> From: Nick Nikandish [mailto:snikandi@emerginghealthit.com]
> Sent: Wednesday, June 25, 2014 12:04 PM
> To: dev@ctakes.apache.org
> Subject: RE: OrangeBookFilterConsumerImpl
> 
> Hi Pei,
> 
> Thanks, I used NamedEntityLookupConsumerImpl that you mentioned now
> that but I am getting an error here:
> 
> Map<String, org.apache.ctakes.typesystem.type.refsem.OntologyConcept>
> medicationAnnotator(JCas aJCas){
>     	Map<String,
> org.apache.ctakes.typesystem.type.refsem.OntologyConcept> ocMap =
>         		new HashMap<String,
> org.apache.ctakes.typesystem.type.refsem.OntologyConcept>();
>         FSIndex medIndex =
> aJCas.getAnnotationIndex(MedicationMention.type);
>         Iterator<MedicationMention> medIter = medIndex.iterator();
> 
>         while (medIter.hasNext())
>         {
>         	MedicationMention medMen = medIter.next();
>         	ocMap.put(medMen.getCoveredText().toLowerCase(),
> medMen.getOntologyConceptArr(0));
>     	}
>         System.out.println("Medication: "+
> patternLists.createPatternList(ocMap.keySet()).toLowerCase());
>         return ocMap;
> 
>     }
> 
> I wrote this code in my own annotator to retrieve  the medication names but
> this is not returning anything now. Which class should I  use now to get
> medication names?
> 
> -----Original Message-----
> From: Chen, Pei [mailto:Pei.Chen@childrens.harvard.edu]
> Sent: Wednesday, June 25, 2014 11:53 AM
> To: dev@ctakes.apache.org
> Subject: RE: OrangeBookFilterConsumerImpl
> 
> Nick,
> If I'm reading it correctly, that code change essentially tells it to bypass the
> OrangeBookFilter completely.
> If that is the behavior you're looking for (i.e. return all of the drugs bypassing
> the OrangeBookFilter, then you can just modify the lookupConsumer
> className in your LookupDesc_Db.xml.  Try something like the
> NamedEntityLookupConsumerImpl.class or similar (i.e. no filters) I don't
> recall the exact name on the top of my head.
> --Pei
> 
> From: Nick Nikandish [mailto:snikandi@emerginghealthit.com]
> Sent: Wednesday, June 25, 2014 11:38 AM
> To: dev@ctakes.apache.org
> Subject: OrangeBookFilterConsumerImpl
> 
> Hi There,
> 
> I am using Ctakes and have added my own annotators that utilize CTakes. I
> need to use the medication annotator so I can retrieve the medication
> names. In OrangeBookFilterConsumerImpl class , consumeHits() method has
> a statements:
> final boolean isValid = isValid( "trade_name", text ) || isValid( "ingredient",
> text );
> 
> It filters out some medication that I actually need. I made this change
> "boolean isValid= ture"  to the code and made it work but I was wondering if
> there was another way like changing something in the xml files that  have the
> same impact  without changing the code?
> 
> 
> Thanks,
> Nick Nikandish
> Product Development Software Engineer
> Clinical Research Informatics
> 
> Emerging Health
> Montefiore Information Technology
> 6 Executive Blvd. Suite 290, Yonkers, NY 10701
> 914-457-6792 Office
> snikandi@montefiore.org<mailto:snikandi@montefiore.org>
> www.emerginghealthit.com<http://www.emerginghealthit.com/>
> www.montefiore.org<http://www.montefiore.org/>
> 
> [logo-montefiore-it]


Mime
View raw message