Elamur Research

Negation scope and spelling variation for text-mining of Danish electronic patient records

Paper · 2014 · Cecilia Engel Thomas, Peter Bjødstrup Jensen, Thomas Werge et al.

Summary

A disease name in a clinical note can document a finding, record its absence, or describe somebody in the patient's family. Only the first use directly supports adding the disease to the patient's profile. The opposite problem arises when a note does describe the patient but uses a form of the term that differs from the one in a clinical dictionary. The authors study both problems in Danish psychiatric records. Their aim is to recover information from narrative notes and express it as additional codes from the Danish ICD10 classification.

The system searches individual sentences for complete dictionary terms. It can recognize a word after a small spelling change or a change of ending. For longer expressions, it can also accept an intervening word or a different order of the required words. Once it finds a candidate, it checks the earlier part of the sentence for a cue that might deny the finding or attribute it to another person. The authors draw a random test sample of 50 patients from a cohort of 5,543 and review matches in the selected patients' records. The complete system achieves incidence precision of 0.867 for individual occurrences and association precision of 0.888 under a criterion that gives credit when the patient has valid support for the code elsewhere in the evaluated output.

Spelling variation makes the largest contribution to the paper's goal of identifying additional phenotypes, with little change in the reported precision. Allowing different endings also brings in many occurrences, but a recurring form related to smoking accounts for much of that increase. Allowing gaps or rearranged words has less effect in this collection, where relatively few hits contain several words. The study uses both occurrence counts and distinct code counts to distinguish collecting more evidence from finding a broader range of codes.

The authors also review a random sample of 500 candidates the cue filter discarded. Across that sample, the precision of the exclusions is 0.722. The common Danish negation words ingen and ikke differ in both the reliability of their exclusions and the patterns observed at different distances. A global cutoff of 4 tokens raises exclusion precision to 0.921, while the incidence precision of the accepted hits falls to 0.854 and the output grows. The paper establishes that a simple rule can recover additional coded material from these notes and that the reach of a cue changes which findings survive. The strongest cutoff depends on which decisions are being evaluated.

Deep dive: Negation scope and spelling variation for text-mining of Danish electronic patient records

How spelling variants and the reach of negation cues affect the extraction of ICD10 codes from free text in Danish psychiatric records. · about 35 minutes to read

The problem and its context

What the narrative adds to a patient record

An electronic patient record accumulates information during care. Some of it enters designated fields, as with laboratory results and medication information. Some of it appears in narrative notes, where the writer can describe events and observations in the words that suit the situation. The paper starts from a difference in what these parts of the record tend to capture. The structured diagnoses principally concern the current hospitalization, while the narrative may also describe a patient's general health or adverse responses to treatment.

A researcher interested in a patient's broader clinical characteristics can use that narrative as another source. The information first has to be located and represented in a way that can be compared across patients. The authors call the intended result an enriched phenotypic profile. In this study, enrichment means supplying additional ICD10 codes supported by the notes. The codes serve as common categories for observations that different writers may express in different ways.

The paper gives several reasons to build such profiles. A wider recording of conditions can supply material for studies of diseases that occur together. Groups of patients can be defined using a richer description of their characteristics. More detailed profiles can also support research into the molecular mechanisms underlying disease. These uses set the requirements for the extraction problem. If a code travels from a note into a profile, a reader should be able to find evidence that it applies to the patient.

A collection of notes can be valuable even when it says little in the formal vocabulary of a coding scheme. The wording of an observation may be perfectly intelligible to a colleague reading the note. A program looking for an official term has a different test to pass. It needs to recognize enough of the written expression to connect it to a dictionary entry, and it needs a basis for attaching the resulting code to the person whose profile it is building. That makes the task a form of information extraction.

Recognizing a term and establishing who it describes

The paper's dictionary supplies recognizable expressions and their ICD10 codes. Consider what has to happen for a note to yield a code. The match must first succeed at the level of wording. A writer may use a different ending from the one in the dictionary. A multiword expression may contain a word that interrupts the dictionary sequence. Such changes can keep an exact comparison from finding an otherwise recognizable term. The paper investigates how much can be gained by giving the comparison a limited tolerance for these changes.

A complete match still leaves the question of what the writer said about the finding. A denial can contain the dictionary wording in full. The appearance of that wording establishes that the passage concerns the condition, while the denial changes what the passage says about its presence. A search designed to retrieve all passages about a disease could retain the denial. A program that constructs a profile of conditions associated with the patient needs to handle the denial before it assigns the code.

A mention of a family member creates a related problem. The note may describe a genuine condition while making it clear that the condition belongs to someone else. The system uses the same action for this case as for an explicit denial. It withholds the match from the patient's profile. The authors group these cases together under negation for the purposes of their implementation. For a human reader, the distinction remains consequential. One sentence can deny a condition, while another can affirm it of a different person.

The separation between term matching and attribution explains the order of the two operations. If the wording never matches, even a clear statement about the patient supplies nothing for the system to code. If the wording matches, the candidate can still be inappropriate for the profile. Adding spelling variants therefore creates a larger set of possible associations for the contextual rule to examine. Deciding whether there is enough evidence to keep a candidate is a separate problem.

Why the position of a cue matters

A negation cue is an expression that alerts the program to a possible reason for withholding a code. The scope of the cue is the spread of wording that it affects. For the implementation in this paper, the practical issue is how far forward from a cue a candidate can occur and still be removed because of it. The text between the cue and the candidate can contain enough other material for the relationship to become unclear. A rule based on position has to give that separation a concrete interpretation.

Restricting the search to an individual sentence is a convenient starting point. It also leaves many possible relationships inside the boundary. A sentence can place a denial next to a finding or bring several findings together with other clinical material between them. The broader a cue's permitted reach, the more candidates the rule can remove before it reaches the end of the sentence. A short reach makes the rule more selective, at the cost of losing some potentially valid exclusions.

The same positioning question applies to other subjects. A family reference may help identify the owner of a nearby finding. Farther along in the same sentence, the writing may have returned to the patient. The simple implementation treats the appearance of a listed cue in an eligible position as sufficient to suppress a match. This turns an interpretive question about the note into a measurable question about how often that decision is justified.

Where the work fits among earlier attempts

The introduction describes earlier uses of patient narratives for detecting diagnoses, supporting decisions, and tracing adverse drug reactions over time. It also describes a field in which several tools had already been developed for English medical notes. For negation in particular, the authors point to Neg-Scope, NegFinder and NegEx as methods that had shown good performance in their original settings. They frame these precedents around the shared need to tell positive findings from mentions made under a denial.

The authors distinguish that shared problem from the practical work of adapting a system to Danish. The existing negation methods they discuss were designed for English. Danish notes bring a different inventory of written forms and cues, and the code matcher needs a dictionary suitable for the language of the records. The authors take the Danish ICD10 vocabulary as their starting point and implement a small set of rules whose individual effects they can examine. That makes this a study of what a direct application of natural language processing can recover in the setting for which it was built.

The kind of hospital documentation also helps define the problem. The records contain multiple kinds of notes, written by psychiatrists, other doctors, nurses and social workers. A spelling accommodation can matter because a form recurs across this writing. A phrase-level option can matter only where longer terms occur in forms that the baseline would miss. The paper's design lets the authors relate the effects of the rules to opportunities presented by the actual notes, which is more specific than asking whether a matcher is flexible in principle.

The method, step by step

Start with a dictionary and keep track of candidate mentions

The Danish ICD10 dictionary supplies the terms that the extraction procedure looks for. A term contains the words needed to identify an entry and already has a code associated with it. The search operates on tokens, the word units used in comparing a note with the dictionary. That division of the text into units is tokenization. Here it matters both to the recognition of complete terms and to the measurement of how far away a cue lies.

The search works within a sentence. A word can match an entire dictionary term if the entry is a single word. A longer entry needs a set of words that together satisfy the term. The exact matcher provides the baseline for this step. The expanded matcher gives the text additional ways to meet the word and phrase conditions. When it finds enough material for the complete entry, the result is a candidate with a code and a location in the sentence.

The term potential hit describes that provisional result. The word or words give the program a route into the dictionary. The position of the resulting hit gives it somewhere to start when checking the sentence for preceding cues. An accepted hit is the output of both decisions. The later manual review can revisit that location and establish whether the attributed code is supported by the note.

How a Danish clinical note yields an ICD10 code

The steps in order.

How a Danish clinical note yields an ICD10 codeStep 1: Start from Danish ICD10 terms1. Start from Danish ICD10 termsStep 2: Gather distinct forms from the records2. Gather distinct forms from the recordsStep 3: Generate eligible spelling and ending variants3. Generate eligible spelling and ending variantsStep 4: Search sentences for complete terms4. Search sentences for complete termsStep 5: Permit internal gaps and reordered words when enabled5. Permit internal gaps and reordered words when enabledStep 6: Check for listed cues before each candidate6. Check for listed cues before each candidateStep 7: Return codes for candidates that survive7. Return codes for candidates that survive

The authors distinguish the matching options with letters. A and B concern the relation between an observed word and a dictionary word. C and D concern the arrangement of words in a longer candidate. E is the contextual filter. The sequence matters for interpretation. Switching on A through D can give a term a route into the candidate set. Switching on E gives the procedure a reason to remove a candidate that has already met the lexical conditions.

Learn which written forms the corpus offers

The paper constructs dictionary variants before searching for terms in the sentences. For this step, the authors take the distinct tokens from the corpus that are longer than three letters and compare them with the distinct tokens in the dictionary. Collapsing the input to distinct forms means that each written form enters the vocabulary comparison as a form. How frequently it appears becomes important when the expanded dictionary is used to search the notes.

The variants are additions to the ways of matching existing terms. A corpus form judged close enough to a dictionary word can stand in for that word during matching. The entry that licensed the variant continues to provide the code. The procedure thus draws the candidate spellings from the records themselves while using the dictionary as the reference for deciding which forms to admit.

Feature A uses Damerau–Levenshtein distance. In the paper’s definition, it measures how many edits it takes to convert one token to the other. The permitted letter operations are substitution, insertion, deletion and reversal of a letter pair. If several sequences of operations can make the same change, the distance counts the shortest sequence. The spelling extension accepts an alternative when that distance is one.

d(c, w) = min { |e| such that e changes c into w }

Here d is the edit distance, c is the corpus token, and w is the dictionary token. The symbol e represents a sequence of permitted edits. The bars in |e| count the operations in that sequence. The braces delimit the eligible counts, and min chooses the smallest count among the sequences that give the required conversion. The equals sign defines the distance in terms of that minimum.

This test is deliberately local. It can recognize a corpus form that has an added letter without requiring a specific list of possible additions for each entry. It also admits the other kinds of change allowed by the distance. The point of the later evaluation is to discover whether the additional routes to a term produce appropriate associations often enough to be useful. A small change in letters is the eligibility criterion for the expansion.

Feature B compares forms after removing typical Danish endings. This is an application of stemming. The operation is applied to the corpus form and to the dictionary form. If it leaves the same result on both sides, the observed word can serve as an ending variant in the dictionary search.

s(c) = s(w)

The function s applies the Danish ending rules. The input c is the form from the corpus, and w is the dictionary form. Here the equals sign expresses the condition for accepting the pair. The pieces remaining after stemming have to be identical.

This ending operation is defined by the equivalence it can uncover between two written forms. The spelling operation is defined by the cost of converting one form to the other. These tests can give the same answer for a pair because an ending difference can also be a small edit. The paper discusses ryge and ryger, the latter glossed in connection with smoking or a smoker. The choice of dictionary option determines how ryger becomes recognizable. Once admitted, the form can contribute a hit wherever the rest of the matching and attribution conditions are met.

The procedure used to obtain these variants is based on corpus vocabulary. The manually curated cases provide judgments about what the resulting search found. The paper describes the comparison of word forms and the application of predetermined rules as its way of building the matcher. The distinction is important when interpreting the experiment. A form can enter the comparison because it is already present among the records, and an occurrence can subsequently be reviewed for whether that match is appropriate in context.

Change the conditions for multiword matching

Feature C allows an internal gap. The matcher can pass over one intervening token that is absent from the dictionary term while still accounting for the words the entry requires. The gap belongs to the wording of the note, where an extra word can separate two parts of an otherwise matchable expression. The dictionary still determines the full term and the code awarded to it.

Feature D changes the ordering condition. When shuffling is allowed, the words required by the dictionary term can occur in a different order. This makes it possible for a note and a dictionary to use the same components while arranging them differently. The search still has to find the full set of components of the term within the sentence. A candidate for a longer entry gains a more flexible arrangement of its words.

The options address different reasons an exact phrase search can fail. If all the words are in dictionary order and an extra word intervenes, the gap is the relevant change. If the required words are together in a different order, shuffling can account for that difference. If a candidate exhibits both, its recovery can depend on enabling both settings. Comparing joint settings with individual ones therefore gives the paper a way to observe interactions among the matching rules.

These phrase options have a narrower domain than the word options. For an entry realized as a single token, there is no internal position for a gap and no sequence of component tokens to rearrange. In contrast, spelling and ending comparisons can apply to individual components of longer terms as well as to terms consisting of a single word. A matching result can thus depend on both the form of a component and its position in the expression.

Apply the contextual filter after a match

Once the system has a potential hit, feature E checks the earlier portion of the sentence for an eligible cue. The authors use a hand-built list with 10 explicit negation cues and 24 alternative-subject cues. Ingen and ikke are examples of the explicit group. References to family members illustrate the other group. When the filter finds a cue that qualifies under its scope rule, it discards the candidate.

The method gives that decision a direction. The program considers the part of the sentence that precedes the match. For the setting with no distance cutoff, the earlier part of the sentence supplies the full search range. The word unrestricted in this comparison refers to how far the rule can search within that preceding text. The sentence boundary still matters.

To create restricted versions of the filter, the authors use the separation in tokens between the cue and the hit. A hard cutoff sets a maximum reach for the cue. A candidate affected by a cue beyond that reach can remain in the output if no other qualifying reason removes it. A preceding cue inside the permitted range can still block the match. The authors test global cutoffs, which use the same distance limit across the cue inventory in a given setting.

Token distance is a practical approximation to the relationship the program needs to determine. It can describe how much wording separates the relevant portions of the sentence without interpreting that wording. A manual reader may decide that words close together concern separate findings, or that a cue still matters after a stretch of intervening text. Those possibilities make it useful to compare distances against judgments about actual removals.

Check the extracted and discarded cases

The authors use records from Sct. Hans Psychiatric Hospital. They randomly choose 50 patients and include all their records in the curated evaluation. The mention check starts from a hit and traces it back to the note where it arose. A reviewer considers the sentence or, where needed, the entire note to decide whether the patient is correctly associated with the hit. The relevant judgment concerns the meaning of the passage as evidence for the patient and code.

Reviewing complete sets of records for the selected patients also gives the authors a basis for examining repeated mentions. A patient's record may contain several passages that produce the same code. Some can correctly support it while others can arise from mistaken attribution. Reading the note around each hit allows the evaluation to consider the quality of the individual evidence. Looking at the occurrences together allows the authors to ask whether the patient has valid support for the code at all. Both assessments use the same underlying linguistic annotation of hits in context.

A separate curation exercise examines candidates the negation filter removed. The authors select 500 such candidates at random and decide whether the rule was right to withhold each one. A candidate that ought to be kept represents a failure of the filter even though the lexical matcher had found it. Those cases would be invisible in a review confined to the accepted output. The rejected sample therefore addresses a different stage of the procedure with a different set of reviewed decisions.

For the rejection analysis, the authors record the distance between cue and hit and evaluate correctness by distance. They also examine the cues individually and summarize the explicit negation and alternative-subject groups. This connects properties of the rule to the cases it changes. A pooled score describes the exclusions overall, while splitting the decisions by cue or distance can reveal which cases account for that result.

Count reliable occurrences and supported associations

The paper defines extraction incidence precision as a ratio over accepted hits. A hit counts as correct when its own passage supports the patient association. The two counts in the definition can be written directly.

Pᵢ = Cᵢ ÷ H

Pᵢ is incidence precision, with the subscript ᵢ indicating the occurrence criterion. Cᵢ counts hits that are correct in their own contexts. H counts all accepted hits in the evaluation under consideration. The equals sign defines the measure, and ÷ divides the correct count by the evaluated output count. Each occurrence contributes to the denominator even if its code has already appeared elsewhere.

Association precision uses the same base of hits with a more inclusive test for credit. The question becomes whether the code is correctly associated with that same patient somewhere in the evaluated occurrences. The authors allow a hit to receive credit under this criterion if another occurrence already provides valid support for the association.

Pₐ = Cₐ ÷ H

Pₐ is association precision, and the subscript ₐ identifies that criterion. Cₐ is the count of hits credited because the corresponding patient and code have at least one correct occurrence. H is the count of evaluated accepted hits. The equals sign gives the definition, and ÷ indicates division. This is still a calculation over hits. The check that grants credit uses the patient and code together, so evidence for another patient cannot establish the association under review.

A hypothetical pair of occurrences makes the distinction concrete. Suppose a code appears in a valid finding about the patient and also in a passage about a relative that slips through the filter. The valid passage satisfies both measures. The passage about the relative fails the occurrence test, yet receives association credit because the patient's code has support in the valid passage. The authors make that allowance because a profile needs credible evidence for including the code even if the matcher has also located a bad instance of it.

The test of negation precision has its own denominator because the decision to be judged is whether to remove a candidate.

Pₙ = Cₙ ÷ R

Pₙ is the incidence precision of the removals, where subscript ₙ refers to the negation review. Cₙ counts reviewed decisions in which discarding the hit was justified. R counts the reviewed removals to which the calculation applies, whether for the whole sample or for a subset such as the exclusions involving a particular cue. The equals sign introduces the ratio and ÷ divides the justified decisions by the reviewed decisions. In this case, correctness means that the candidate ought to be withheld. The extraction calculation judges the candidates that were allowed through.

The paper also counts output volume and variety. Total hits preserve repetitions, while unique hits count the different 3-digit ICD10 terms represented. A recurring expression can produce many new matches with little effect on the distinct code count. Both counts consequently help interpret a precision comparison. A setting can maintain its proportion of correct output while changing substantially how much evidence it finds or how many different codes appear.

Experiments and results

Which records and configurations are compared

The 50 randomly selected patients make up roughly 1% of the cohort. In its description of their test material, the paper reports 5,765 disease-related hits. It records an average of 115.3 hits and an average of 16.96 different ICD10 codes per patient. These quantities show why the evaluated occurrences and the coded profile are different kinds of output. Repeated evidence about the same condition can accumulate rapidly in records collected over time, while each code adds a single category to a patient's profile.

The experiment on lexical matching starts from a baseline without the additions A through D. The authors test each feature in isolation and try every combination. This makes it possible to compare, for example, a setting that admits ending variants with a setting that also allows a gap, or a setting that has spelling variation with one that adds endings to it. The paper examines negation scope in a separate set of comparisons. The baseline in the feature table therefore identifies the reference for the matching options instead of specifying a new scope policy.

The output measures answer complementary questions. Total hits describe how many occurrences the rules produce. Unique hits describe the range at the designated ICD10 granularity. Extraction incidence precision describes the quality of the occurrences as evidence in their respective passages. Association precision gives the authors' measure of support for patient codes while allowing valid evidence elsewhere to rescue an occurrence for scoring purposes. Inspecting volume, variety and correctness together is important because each can change as the search is relaxed.

What happens when matching becomes more permissive

The baseline in the matching comparison has incidence precision of 0.872 and association precision of 0.889. For the full tool, the reported incidence precision is 0.867 and the association precision is 0.888. The magnitudes of the reported values are close across these settings. The substantive gain the authors describe is that the extended matcher produces more occurrences and brings more distinct terms into the output.

The feature runs show some variation around the baseline. Ending variation by itself gives incidence precision of 0.874 and association precision of 0.891. Spelling variation on its own gives incidence precision of 0.867 and association precision of 0.889. With the two word-level features enabled together, the table reports incidence precision of 0.867 and association precision of 0.889. These comparisons show why the authors judge the fuzzy matching options primarily by what they add to the result. Precision changes little as the conditions for entering the output change.

Extraction incidence precision across matching settings on the Danish psychiatric test set

The complete matcher has precision close to the baseline and the individual matching settings.

Extraction incidence precision across matching settings on the Danish psychiatric test setBaseline: 0.872Baseline0.872Shuffling alone: 0.872Shuffling alone0.872Gap alone: 0.872Gap alone0.872Ending variants alone: 0.874Ending variants alone0.874Spelling variants alone: 0.867Spelling variants alone0.867Spelling and ending variants: 0.867Spelling and ending variants0.867All matching features (this paper): 0.867All matching features (this paper)0.867
The numbers
System or settingextraction incidence precision
Baseline0.872
Shuffling alone0.872
Gap alone0.872
Ending variants alone0.874
Spelling variants alone0.867
Spelling and ending variants0.867
All matching features (this paper)0.867

In the association results, ending variation combined with a gap and shuffling gives 0.893. Its companion incidence precision is 0.874. With spelling and shuffling together, association precision is 0.886 and incidence precision is 0.867. The table contains both kinds of configuration, those with the broadest matching allowances and those with a smaller set of features that happen to have higher observed precision. Choosing the most flexible setting is a decision about what the system will try to recover. A precision column alone does not express the value of that recovery.

The authors report that the largest increases in hit counts occur with spelling and ending variants. They single out spelling as especially important for identifying more phenotypes. Ending variation gives a large increase in occurrences with a much smaller effect on the distinct term count. The distinction is visible because the experiment tracks both quantities. If the data were reduced to a total, the frequent repetition of a newly supported expression would look like broad expansion even when the term inventory changed little.

The discussion puts the reported precision beside published values of 0.89 for MedLEE and 0.76 for the extraction tool described by Meystre. Those values give the authors context for what their relatively simple implementation achieved. The in-study baseline remains the direct comparison for measuring the effect of the matching additions. It is evaluated as part of the same experiment, with the same kind of text and the same definitions of an accepted occurrence and a supported association.

What the review of discarded matches finds

The authors' random sample for evaluation of the filter contains 500 excluded potential hits. Across the sample, the precision of the exclusions is 0.722. The cue and the affected hit are separated by an average of 4.9 tokens. This figure describes the distances at which the unrestricted filter acted in the reviewed cases. It includes decisions that the reviewers accepted as well as ones they judged mistaken.

Explicit negation accounts for 449 of the reviewed occurrences. In that group, exclusion incidence precision is 0.724 and the average distance is 4.7 tokens. The alternative-subject group has 51 occurrences, an exclusion incidence precision of 0.706 and an average distance of 6.4 tokens. The groups differ in size and in their average separation. The pooled result largely reflects the explicit negations because those decisions dominate the sample.

The two cues most often used in the records for this task are ingen and ikke. Each belongs to the explicit group. For ingen, the paper reports an exclusion incidence precision of 0.946. The corresponding value for ikke is 0.573. These values describe how often the system was right to discard a candidate when the relevant cue occurred under the rule. They say something more specific than how readily a reader can recognize the words as negatives. The program also has to identify which match the word affects.

The distance plot in the paper compares the pooled exclusions and shows separate patterns for these common cues. The authors see a tendency for removals to be less precise at greater distances. The plot also leaves some distances unrepresented in the sample. An overall tendency therefore gives a reason to test shorter scopes, while the separate cue patterns help explain why a common curve is an incomplete account of the individual words.

How distance cutoffs change the results on both sides of the filter

The authors compare a cutoff of 4 tokens and a cutoff of 10 tokens with the rule that searches the full earlier part of the sentence. As the permitted interval shrinks, some distant cues lose the ability to block the candidates that follow them. The exclusions the system continues to make are then a more selective set of decisions.

The best exclusion incidence precision in this comparison is 0.921, for the cutoff of 4 tokens. The cutoff of 10 tokens yields 0.820, and the unrestricted setting yields 0.722. The authors compare these results with the values reported for NegEx, 0.845, and for NegFinder, 0.977/0.918. They explicitly qualify that comparison because the earlier tools were tested on other corpora. The contrast among the three Danish settings gives the direct evidence about the effect of restricting distance.

Exclusion incidence precision by cue cutoff in the Danish psychiatric negation evaluation

Shortening the cue window improves the precision of the exclusions that still occur.

Exclusion incidence precision by cue cutoff in the Danish psychiatric negation evaluationNo distance cutoff: 0.722No distance cutoff0.722Cutoff of 10 tokens: 0.820Cutoff of 10 tokens0.820Cutoff of 4 tokens (this paper): 0.921Cutoff of 4 tokens (this paper)0.921
The numbers
System or settingnegation incidence precision
No distance cutoff0.722
Cutoff of 10 tokens0.820
Cutoff of 4 tokens (this paper)0.921

The accepted output changes at the same time. In the cutoff comparison, the unrestricted setting produces 5741 total hits and 164 unique hits. With the cutoff of 10 tokens, the reported output is 5836 total hits and 166 unique hits. The cutoff of 4 tokens gives 5964 total hits and 171 unique hits. A shorter window allows more terms through because some candidates formerly suppressed by distant cues can survive. The distinct code counts show that these extra matches include some codes beyond those represented under the unrestricted rule.

The extraction incidence precision values for those outputs are 0.867 with no cutoff, 0.864 with a cutoff of 10 tokens, and 0.854 with a cutoff of 4 tokens. The setting that gives the most precise removals also gives the lowest incidence precision for the kept hits in this comparison. This is possible because the measures are calculated on different sets. The cutoff changes which decisions are made as exclusions and which candidates become part of extraction output.

Accepted hit incidence precision by cue cutoff in the Danish psychiatric records

More restrictive cue windows reduce the precision of the occurrences returned by the matcher.

Accepted hit incidence precision by cue cutoff in the Danish psychiatric recordsNo distance cutoff (this paper): 0.867No distance cutoff (this paper)0.867Cutoff of 10 tokens: 0.864Cutoff of 10 tokens0.864Cutoff of 4 tokens: 0.854Cutoff of 4 tokens0.854
The numbers
System or settingextraction incidence precision
No distance cutoff (this paper)0.867
Cutoff of 10 tokens0.864
Cutoff of 4 tokens0.854

The direction of the tradeoff follows from what happens to the distant cases. A distant cue may have wrongly blocked a valid finding. Taking that cue out of consideration can restore a relevant hit and improve the mix of removals left behind. A valid exclusion can also be lost when the same cutoff applies to a cue that genuinely governs a distant term. The newly accepted set can contain both kinds of released candidate. The paper observes a larger output and a slightly smaller proportion of correct occurrences after limiting the distance.

The totals here belong to the cutoff experiment. The paper gives 5,765 in the description of the manually curated patient set and 5741 for the unrestricted run in the cutoff comparison. It does not specify how those counts relate. Each identifies its own reported quantity. Likewise, the average of 16.96 different ICD10 codes per patient comes from the test-set description. The unique hit figures for the cutoff experiment describe the number of distinct terms represented in the corresponding outputs.

Taken together, the precision and count comparisons support a narrow conclusion about the tested thresholds. A short interval can make a cue-based filter more dependable when it chooses to act. The additional material admitted by that policy has an observable cost in the precision of accepted occurrences. Which result matters more depends on whether the intended use is to obtain more coded candidates for review, to keep each returned occurrence as reliable as possible, or to evaluate the correctness of the exclusions themselves.

What the ablations show

Spelling expands access to the dictionary

The matching experiment makes it possible to identify a feature's contribution before and after other options become available. Comparing the exact matcher with spelling variation alone asks what a small letter change can recover. Comparing otherwise similar runs containing other features asks whether the spelling rule still opens access to forms those features would miss. This design is useful because the rules describe different kinds of flexibility, while the occurrences a given rule recovers can overlap with those another rule finds.

For spelling variation, the authors' principal finding is that the extra flexibility increases identifiable phenotypes without a noticeable loss in precision. Accepting a close written form brings a corpus occurrence under an existing code. The code has the same meaning in the dictionary. What changes is the range of strings that can trigger a candidate for it. The gain therefore arises at the point where a piece of text gains access to a dictionary entry.

The observed precision of the spelling runs is evidence about the aggregate output of that particular tolerance for letter edits. It leaves room for individual bad variants or bad uses of otherwise appropriate variants. It is also possible for a variant to rescue a familiar term with a small typographic change and for another to accept a legitimate written form of the term. The experiment measures their consequences for patient attribution through the accepted hits instead of assigning a reason for every spelling difference it encounters.

One recurring form explains much of the ending result

The authors investigate why ending variation adds many mentions while having a relatively modest effect on unique terms. The explanation they find involves ryger. As a generated alternative for ryge, it creates repeated opportunities for the matcher. The paper attributes more than 4/5 of the hits produced by enabling ending variation to this particular generated synonym. A rule applied to the vocabulary can therefore have an effect on output volume dominated by the later frequency of a form.

The case is especially informative because ryger is also admitted by the edit-distance option. If ending variation is added to an exact matcher, it can get credit for matches to that form. If spelling variation already admits the same word, the corresponding route into the dictionary already exists. This explains why counting changes for isolated features gives an incomplete prediction of what will happen when the features are combined.

The unique term count supplies a check on the breadth of the effect. An added occurrence can corroborate an association already seen for a patient or supply evidence in another patient's notes. At the aggregate code level, it can still represent the same term. The paper's investigation identifies one reason for the gap between the two count measures and shows where the ending rule's strongest observed influence came from. Some of its reported value concerns the recurrence of a specific corpus form.

A gap and a change in order can solve different parts of a mismatch

The phrase-level rules contribute fewer hits on their own in this study. The authors relate this to the make-up of the detected terms. Around 12% of all hits identified contain more than one token. Only a multiword expression has the internal structure on which C and D can operate. A small number of such opportunities can leave their contribution to total output modest even when a rule finds exactly the kind of variation it was designed to accept.

The separate runs for a gap and for shuffling each have the same reported incidence precision of 0.872 as the baseline. Their association results also stay close to it. The joint gap-and-shuffling run gives association precision of 0.89 and incidence precision of 0.872. These scores describe the quality of the outputs instead of the size of the gains. The analysis of hit counts leads the authors to question the practical value of the small increase from gaps in this corpus and to suggest that the options can help each other when used together.

An interrupted term in dictionary order needs the gap feature alone. A contiguous term in an unusual order needs the ordering feature alone. An interrupted, rearranged occurrence requires both. The suggested interaction is plausible on the rules' definitions, and the authors see evidence of it in their runs. Its practical importance depends on how often that combination of conditions occurs. More multiword terms would give these features more chances to act, with the size of any gain determined by the actual forms those terms take.

The term-length finding and the smoking example explain different aspects of the feature comparisons. For C and D, most detected items lack the structure on which either rule could act. For B, a single eligible form supplies a large volume of opportunities. Knowing those distributions gives more information about why the experiments turn out as they do than a single ranking of the options by precision.

The distance analysis tests a global rule and reveals differences among cues

The scope comparison keeps the main exclusion mechanism and varies its reach. Under the shortest cutoff, the decisions remaining on the removal side are the most precise. The same setting also restores the most material to the accepted output among those compared. The joint result matters because a rule can reduce false exclusions and lose valid exclusions in the same change. Each action is assessed through the decision set to which it belongs.

The individual cue analysis shows a reason to hesitate before describing any global cutoff as the appropriate linguistic scope of negation. Ingen and ikke have very different rates of justified removal, and their plotted distance patterns also differ. A pooled score can rise when distant cases are removed from consideration even if the rule has become less appropriate for some particular cues. The paper's claim that useful reach varies by cue comes from examining those individual results as well as the pooled pattern.

The thresholds reported in the experiment are shared across cues. The paper shows that such thresholds give the program a simple, measurable way to trade output expansion against the precision of exclusions. It supplies evidence that some cues have a useful reach of only a few words while others can extend across much more of the sentence. Determining separate operating cutoffs for each cue would require decisions about the distances and types of cases for that cue. The paper provides the diagnostic observation and tests the global settings.

The breakdown into explicit negations and alternative subjects is a further analysis of decisions made by the complete cue inventory. The explicit group supplies most of the observations in the review. The alternative-subject group gives an estimate of how frequently the attribution heuristic was justified when it acted and shows that its exclusions occurred at a greater average distance in the sample. That comparison describes the observed groups. The paper gives no corresponding run that removes all alternative-subject cues and measures the resulting change in extraction.

The lexical and scope experiments thus intervene at different points. The former establish which accommodations let a passage qualify as a candidate for an existing code. The latter establish which candidates survive once a preceding cue has been found. A count of final hits can rise under either intervention. The feature runs and the review of removals make it possible to tell whether the change came from broader recognition or from allowing previously suppressed evidence into the result.

Limitations

Limits the authors identify

The authors developed and tested the tool on psychiatric hospital records. They point out that the documentation includes a high proportion of notes by nurses and other staff who are not medical doctors. The mix of writers matters because the search operates directly on the language of the notes. Vocabulary, notation and the types of findings discussed can differ in another clinical area. Direct applicability to other specialties therefore remains an open question in the authors' account.

They give abbreviations and acronyms as a specific example. Their collection does not make widespread use of these forms for disease terms, so they implement no dedicated abbreviation handling. In notes where abbreviated disease names are common, that limitation would matter before the contextual rule ever saw the relevant text. An expression must first become a candidate for questions about who it describes or whether it has been denied to affect the output.

The treatment of negation is limited to the cues in the manual list and to hits that follow those cues. The authors acknowledge that real negation can fall outside the direction the rule allows. Restricting the interval can change decisions within that direction, but the cue search remains tied to earlier wording in the same sentence. The design consequently has a clear set of expressions and positions it can handle. Negation outside those conditions requires a different way of identifying the relationship.

The authors explicitly accept an attribution assumption for the sake of keeping the tool simple. A disease term occurring in a patient's record is considered to refer to the patient unless the contextual check intervenes. Alternative-subject cues address some cases where the person in the record and the person with the condition differ. The rule relies on the presence of a listed cue in the relevant text, while reviewers can draw on the sentence or the entire note. This difference helps account for the difficulty of reproducing the manual judgment with a positional rule.

The distribution of term lengths also conditions the authors' conclusions about phrase matching. The paper finds limited payoff from gaps and shuffling in records with few multiword hits. It identifies a corpus with more such terms as a setting in which those options could have a greater effect. The evaluation establishes their observed contribution in these records. Their value elsewhere depends on how many of the longer expressions actually contain an interruption or change in order.

Limits that follow from the evaluation design

The main evaluation starts from candidates found by a matcher. It measures how frequently accepted hits are correct and how the output changes as the authors enable more options. Recall would require a count of all the mentions the tool ought to recover, including valid findings that none of the versions can identify. The paper gives no independently enumerated inventory of those mentions. Higher total and unique hit counts therefore establish an expansion of the observed output, and the precision figures characterize its quality. The proportion of all valid clinical mentions recovered remains unknown.

The removal review has a similar boundary. It samples candidates already detected by the dictionary and then discarded by the original context rule. This allows an estimate of how well the program decided to remove a hit when it took that action. A denial that was never recognized as such is outside the rejection sample. Some mistaken acceptances can be visible in the extraction review, but the study does not enumerate every negation in the notes or establish the fraction the cue list successfully handles.

The distance plot provides observations for the distances encountered in the reviewed material. Some distances have no observations there. The aggregate and selected cue results are enough to show meaningful variation in the behavior of the filter. The paper does not report a complete set of cue-specific precision results with counts for the individual distances. As a consequence, the relationship between the overall tendency and the stability of any particular point on a cue's curve is hard to establish from the reported evaluation.

A common cutoff can be assessed as a feature of the system because it is applied to the output and the paper reports what happens. A cue-specific limit is a finer question. It would matter how many examples support each candidate interval, how often genuine exclusions occur outside it, and how the resulting accepted hits affect patient attribution. The individual results motivate that distinction without demonstrating separately selected settings. The paper's evidence for cue-dependent reach is more detailed than its evidence for any particular cue-dependent implementation.

There is also a difference between recognizing observed corpus forms and recognizing forms in a new collection. The variants are generated from tokens in the hospital corpus, and the manually curated patients are drawn from that corpus. The procedure uses observed vocabulary to construct possible routes into the dictionary, and the review checks the output within that setting. The study does not report a separate evaluation on an independent hospital's records. Its results give limited grounds for forecasting how many variants the same procedure would generate elsewhere or how reliable their resulting hits would be.

The context used for curation is described, including the option to consult the whole note. The paper does not report agreement among reviewers or quantify how repeatable the attribution judgments are. That would matter particularly for sentences where it is difficult to decide whether a finding belongs to the patient or to another person mentioned nearby. The reported precision values describe the outcomes under the review that was carried out, with no accompanying estimate of how sensitive those values are to different judgments on borderline passages.

Association precision needs to be read according to the paper's definition. A code can have good evidence for a patient even when an individual hit supplying that code is erroneous. Because credit is calculated over hits, repeated occurrences still influence the score. The measure does not directly report precision over a deduplicated list of patient–code pairs. It serves the paper's interest in whether correct support for an association exists while retaining an occurrence-based denominator. This matters when a reader wants a validated evidence passage for every item in the output.

The paper also reports precision for accepted mentions in the cutoff comparison without tracing each newly admitted code through a downstream analysis. Changes in which patients get a code can matter to a study of diseases that occur together or to a grouping of patients based on their profiles. The extraction results describe how much material is admitted and how frequently occurrences are correct in context. They leave the effects on those later research uses unmeasured.

Finally, the comparisons with named earlier tools give context for the scale of the numbers, especially since clinical text extraction and negation had already been attempted in other settings. Their precision values come from other corpora. The strongest evidence for the contribution of a feature or cutoff in this paper comes from the direct comparisons within the Danish evaluation, where the input collection and output criteria are shared.

What came after

The Danish study is cited by Natural Language Processing for Scandinavian Electronic Health Records (2025), which addresses electronic health records in Norwegian, Swedish and Danish. Its citation places the experiment within a broader Scandinavian subject. The earlier paper supplies a concrete Danish case in which researchers measured the effects of adapting dictionary matching to observed word forms and of changing the permitted distance between a negation cue and a clinical term.

The documented connection is the citation and the overlap in subject matter. It does not establish that the later work adopted the dictionary expansion, reused the cue inventory, or replicated the cutoff experiment. The Danish paper's specific contribution to that line of work is empirical evidence from psychiatric notes about two decisions a clinical extraction system has to make before assigning a code to a patient.

 Institutions

Also on the byline: Sankt Hans Hospital.

 Fields, topics and concepts

Appears in

Mentioned in articles aboutDenmark Copenhagen

Cite

Cite as Cecilia Engel Thomas, Peter Bjødstrup Jensen, Thomas Werge and Søren Brunak. 2014. Negation scope and spelling variation for text-mining of Danish electronic patient records. Proceedings of the 5th International Workshop on Health Text Mining and Information Analysis (Louhi).

The paper itself, not this card. BibTeX from the library's record of the work. DOI 10.3115/v1/w14-1109

@inproceedings{thomas2014negation,
  title = {{Negation scope and spelling variation for text-mining of Danish electronic patient records}},
  author = {Cecilia Engel Thomas, Peter Bjødstrup Jensen, Thomas Werge and Søren Brunak},
  booktitle = {Proceedings of the 5th International Workshop on Health Text Mining and Information Analysis (Louhi)},
  year = {2014},
  doi = {10.3115/v1/w14-1109},
  url = {https://doi.org/10.3115/v1/w14-1109}
}

References

13 references, 0 of them with a card of ours. Each entry links to our card when we hold the work, else to OpenAlex and Google Scholar searches for it.

  1. Agarwal, Shashank and Yu, Hong (2010) Biomedical negation scope detection with conditional random fields, J Am Med Inform Assoc., 17:696-701. OpenAlex ↗ · Scholar ↗
  2. Chapman, Wendy W., Bridewell, Will, Hanbury, Paul, Cooper, Gregory F., and Buchanan, Bruce G. (2001) A Simple Algorithm for Identifying Negated Findings and Diseases in Discharge Summaries, Journal of Biomedical Informatics 34, 301–310. OpenAlex ↗ · Scholar ↗
  3. Eriksson, Robert, Werge, Thomas, Jensen, Lars J., and Brunak, Søren (to appear 2014) Dose-specific adverse drug reaction identification in electronic patient records: temporal data mining in an inpatient psychiatric population. DOI ↗ · OpenAlex ↗ · Scholar ↗
  4. Friedman, Carol, Shagina, Lyudmila, Lussier, Yves, and Hripcsak, George (2004) Automated encoding of clinical documents based on natural language processing, J Am Med Inform Assoc., 11(5):392-402. OpenAlex ↗ · Scholar ↗
  5. Jensen, Peter B., Jensen, Lars J., and Brunak, Søren (2012) Mining electronic health records: towards better research applications and clinical care, Nature Rev. Genetics 13(6):395-405. DOI ↗ · OpenAlex ↗ · Scholar ↗
  6. Liao, Katherine P., Cai, Tianxi, Gainer, Vivian, Goryachev, Sergey, Zeng-Treitler, Qing, Raychaudhuri, Soumya, Szolovits, Peter, Churchill, Susanne, Murphy, Shawn, Kohane, Isaac, Karlson, Elizabeth W., and Plenge, Robert M. (2010) Electronic medical records for discovery research in rheumatoid arthritis, Arthritis Care Res (Hoboken) 62;1120-1127. OpenAlex ↗ · Scholar ↗
  7. Meystre, Stephane and Haug, Peter J. (2006) Natural language processing to extract medical problems from electronic clinical documents: performance evaluation, J Biomed Inform 39;589-599. OpenAlex ↗ · Scholar ↗
  8. Mutalik, Pradeep G., Deshpande, Aniruddha, and Nadkarni, Prakash M. (2001) Use of General-purpose Negation Detection to Augment Concept Indexing of Medical Documents: A Quantitative Study Using the UMLS, J Am Med Inform Assoc. 8:598–609. DOI ↗ · OpenAlex ↗ · Scholar ↗
  9. Park, Juyong, Lee, Deok-Sun, Christakis, Nicholas A., and Barabási, Albert-László (2009) The impact of cellular networks on disease comorbidity, Molecular Systems Biology 5:262. OpenAlex ↗ · Scholar ↗
  10. Prather, J.C., Lobach, D.F., Goodwin, L.K., Hales, J.W., Hage, M.L., and Hammond, W.E. (1997) Medical data mining: knowledge discovery in a clinical warehouse, Proc AMIA Annu Fall Symp; 101-105. OpenAlex ↗ · Scholar ↗
  11. Roque, Francisco S. Jensen, Peter B., Schmock, Henriette, Dalgaard, Marlene, Andreatta, Massimo, Hansen, Thomas, Søeby, Karen, Bredkjær, Søren, Juul, Anders, Werge, Thomas, Jensen, Lars J., and Brunak, Søren (2011) Using electronic patient records to discover disease correlations and stratify patient cohorts, PLOS computational biology. DOI ↗ · OpenAlex ↗ · Scholar ↗
  12. Suzuki, T., Yakoi, H., Fujita, S., and Takabayashi, K. (2008) Automatic DPC code selection from electronic medical records: text mining trial of discharge summary, Methods Inf Med 47;541-548. OpenAlex ↗ · Scholar ↗
  13. Tremblay, Monica C., Berndt, Donald J., Luther, Stephen L., Foulis, Philip R., and French, Dustin D. (2009) Identifying fall-related injuries: Text mining the electronic medical record, Inf Technol Manag 10;253-26. OpenAlex ↗ · Scholar ↗

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/thomas-2014-negation-scope-spelling-variation-text/