Oops, forgot to cc: dev. Happy Monday...
---------- Forwarded message ----------
From: Kean Kaufmann <k...@recordsone.com>
Date: Mon, Feb 12, 2018 at 10:14 AM
Subject: Re: Lab Value - Range finder
> I could see setReferenceRangeNarrative method in LabMention class. Is
that the one are you referring?
Yes -- that's the setter method generated from the type system:
Value type: org.apache.ctakes.typesystem.type.textsem.
> Also, what is your suggestion to create new class similar to
Well, if the LabValueFinder suits your needs, then I'd suggest using its
annotations as starting points.
Run the LabValueFinder and inspect the LabMentions it creates.
If getLabValue() gives you a RangeAnnotation, it's probably the reference
which the LabValueFinder fell back to because it couldn't find a value.
Otherwise, search for RangeAnnotations nearby.
You may find various org.apache.uima.fit.util.JCasUtil
useful, e.g. selectBetween, selectPreceding, selectFollowing.
In my data, the range could often be found between the LabMention and the
LabValue; your data may vary.
For a general-purpose annotator, you'd want to make that configurable.
Also, make you're getting the RangeAnnotations you expect.
Last year, I found it expedient to write a quick-fix regular-expression
annotator to pick up decimal ranges like the ones below.
It would be more civic-minded to change the annotator that generates
(the ContextDependentTokenizerAnnotator? Not sure offhand).
"Potassium Latest Range: 3.5-5.3 mmol/L 3.8\n" + // range not annotated
> "TSH, High Sensitivity Latest Range: 0.450-5.100 uIU/mL 1.939\n" + //
> range not annotated
On Mon, Feb 12, 2018 at 6:24 AM, <abilash.mat...@cognizant.com> wrote:
> Thanks Kean for the suggestions. I could see setReferenceRangeNarrative
> method in LabMention class. Is that the one are you referring? Also, what
> is your suggestion to create new class similar to LabValueFinder?
> Abilash Mathew
> -----Original Message-----
> From: Kean Kaufmann [mailto:k...@recordsone.com]
> Sent: Friday, February 9, 2018 10:35 PM
> To: email@example.com
> Subject: Re: Lab Value - Range finder
> Hi Abilash,
> By design, the Lab Value annotator avoids ranges if possible:
> // prefer non-range values, if any
> > value = candidateList.stream()
> > .filter( a -> !(a instanceof RangeAnnotation) )
> > .findFirst()
> > .orElse( candidateList.get( 0 ) );
> The design is intended to cope with the widest possible variety of
> formats, and avoid confusion.
> If you know where the reference ranges are going to be in your data, I'd
> suggest annotating those separately, using the referenceRangeNarrative
> feature with LabReferenceRange values rather than conflating them with
> labValue / LabMention.
> Caveat: When I wrote this last year, the range annotator didn't seem to be
> picking up on decimal points. So, below, the first two got
> RangeAnnotations, and the second two didn't.
> "Sodium Latest Range: 135-145 mmol/L 138\n" +
> > "Anion Gap Latest Range: 13-16 mmol/L\n" + "Potassium Latest Range:
> > 3.5-5.3 mmol/L 3.8\n" + // range not annotated "TSH, High Sensitivity
> > Latest Range: 0.450-5.100 uIU/mL 1.939\n" + // range not annotated
> On Wed, Feb 7, 2018 at 6:46 AM, <abilash.mat...@cognizant.com> wrote:
> > Hi All,
> > I am trying to extend the current Lab Value finder annotator to
> > include the Range annotation also.
> > "Blood Urea Nitrogen (BUN) 10 mg/dL 8-23"
> > Using current module , I am able to pull lab value as " BUN 10 mg"
> > from above text and trying to tag "8-23" as reference range.
> > final Map<Annotation, List<IdentifiedAnnotation>> subsumeMap =
> > createCoveringMap( jCas, valueClasses,
> > Arrays.asList( FractionAnnotation.class,
> > RangeAnnotation.class, MeasurementAnnotation.class ) );
> > The range annotator is already added in the Labvalue finder class, but
> > only MeasurementAnnotation is getting tagged in the output. Can anyone
> > help here?
> > Thanks,
> > Abilash Mathew
> > This e-mail and any files transmitted with it are for the sole use of
> > the intended recipient(s) and may contain confidential and privileged
> > information. If you are not the intended recipient(s), please reply to
> > the sender and destroy all copies of the original message. Any
> > unauthorized review, use, disclosure, dissemination, forwarding,
> > printing or copying of this email, and/or any action taken in reliance
> > on the contents of this e-mail is strictly prohibited and may be
> > unlawful. Where permitted by applicable law, this e-mail and other
> > e-mail communications sent to and from Cognizant e-mail addresses may be
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful. Where permitted by
> applicable law, this e-mail and other e-mail communications sent to and
> from Cognizant e-mail addresses may be monitored.