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:[email protected]]
Sent: Wednesday, June 25, 2014 11:53 AM
To: [email protected]
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:[email protected]]
Sent: Wednesday, June 25, 2014 11:38 AM
To: [email protected]
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
[email protected]<mailto:[email protected]>
www.emerginghealthit.com<http://www.emerginghealthit.com/>
www.montefiore.org<http://www.montefiore.org/>
[logo-montefiore-it]