---
title: "Approach to machine learning for extraction of real-world data"
description: "Adamson and colleagues explain how they turn oncology notes and reports into structured research data and check the results against expert…"
canonical: "https://research.elamur.ai/free/en/papers/adamson-2023-approach-machine-learning-extraction-real/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/adamson-2023-approach-machine-learning-extraction-real/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / Approach to machine learning for extraction of real-world data variables from electronic health records

# Approach to machine learning for extraction of real-world data variables from electronic health records

Paper · 2023 · Blythe J. S. Adamson, Michael Waskom, Auriane Blarre et al.

**Authors:** Blythe J. S. Adamson, Michael Waskom, Auriane Blarre, Jonathan Kelly, Konstantin Krismer, Sheila Nemeth, James Gippetti, John James Ritten, Katherine Harrison, George Ho, Robin Linzmayer, Tarun Bansal, Samuel Wilkinson, Guy Amster, Evan Estola, Corey M. Benedum, Erin Fidyk, Melissa Estévez, Will Shapiro and Aaron Benjamin Cohen · **Year:** 2023 · **Venue:** Frontiers in Pharmacology · **Licence:** [CC BY (OpenAlex best open-access location)](https://creativecommons.org/licenses/by/4.0/)

Frontiers in Pharmacology · [licence](https://creativecommons.org/licenses/by/4.0/)

- [PDF](https://www.frontiersin.org/articles/10.3389/fphar.2023.1180962/pdf?isPublishedV2=False)
- [DOI 10.3389/fphar.2023.1180962](https://doi.org/10.3389/fphar.2023.1180962)

## Summary

A cancer clinic’s records may contain a laboratory result, the date a diagnosis was established, or an account of when a patient began taking a drug. Whether a researcher can use that information depends on how it was recorded. A diagnosis code can be retrieved from a database field. The date of the diagnosis may have to be recovered from a note that discusses several episodes of care. Adamson and colleagues describe a way to turn such documentation into consistently defined variables for retrospective oncology research using [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/).

The authors use answers that oncology nurses and tumor registrars have already established through chart review. Clinicians first identify terms likely to lead to direct evidence for each variable. Software finds the sentences containing those terms, converts text in scanned documents into searchable form where necessary, and looks for associated dates when the task calls for them. The surrounding words help determine whether a finding is affirmed, denied, or only suspected. During development, the extractors learn from the values assigned by the reviewers. When the authors describe a value as fully extracted, the procedure assigns it without a reviewer confirming that individual answer. The aim is to recover findings already documented in the record.

The earliest applications featured in the paper concern non–small cell lung cancer (NSCLC). According to the authors, 10 extractors produced 20 research variables that captured the initial diagnosis and the advanced or metastatic diagnosis, when each was made, disease stage, tumor histology, smoking history over the patient’s lifetime, primary surgery and when it occurred, biomarker results and their corresponding dates, and periods of oral treatment. For the non-squamous histology category in NSCLC, sensitivity was 96% and positive predictive value was 94%. Sensitivity asks how often extraction recovered patients in that category according to expert review. Positive predictive value asks how frequently an extracted assignment to the category agreed with the expert value.

The paper also describes a check on what happens after extraction. In selected oncology studies cited by the authors, analysts substituted automatically curated variables for expert-reviewed ones and reached similar findings. That comparison concerns the behavior of several variables within a particular study, whereas the histology figures concern agreement on an individual category. The article gives a detailed account of the overall development process and shows the kinds of data it produced. Most applications are described without a numerical performance breakdown, so the evidence for their use depends on the variable, the population, and the research question.

## Deep dive: Approach to machine learning for extraction of real-world data variables from electronic health records

Adamson and colleagues explain how machine learning turns oncology records into research variables and how they check those values against expert review. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The information a study needs

A patient’s record accumulates as care takes place. A visit leaves entries about what occurred and may also leave a narrative explaining the clinician’s assessment. Testing can generate a report that is filed with the chart. Messages can document developments between encounters. Each form of documentation serves a purpose in care. A study of many patients introduces a different requirement, because it needs the same question answered under a common definition for every record it uses.

Consider the timing of disease. A researcher may need to identify when patients first had a documented cancer diagnosis and when advanced disease was first documented. A database entry can supply a code without resolving either milestone. An account written later in care may be more informative if it describes what was established earlier. Making a useful date field consequently involves more than finding the earliest date near the cancer’s name. The date must belong to the event the study has defined.

The paper divides the available material by how it is stored. Demographic fields, encounters, medication orders, and treatment administrations are examples of structured data. Narrative visit notes, pathology reports, radiology reports, and scanned laboratory documents fall on the document side. A laboratory report can look quite orderly to a person and still be unstructured for these purposes. If the result is visible only inside a scanned image, a database query for a result field cannot use it directly. Obtaining a pre-defined answer from such material is a problem in [information extraction](https://md.research.elamur.ai/free/en/concepts/information-extraction/).

The distinction also explains why collecting more structured entries may leave a clinical question unanswered. An order and an administration represent different events. The dates of tests and results can carry different meanings. A treatment recorded as prescribed may have started later or been held during a hospitalization. The detail that resolves such a question may have been written for someone following the patient’s care. Converting it into a study variable requires a decision about which documentation counts and what event that documentation establishes.

The authors describe diagnosis codes as a longstanding practical proxy for identifying disease. Billing makes those codes accessible in structured data, so they offer a way to find charts for further consideration. A code can be used for that purpose while the diagnosis variable itself is defined from clinical evidence. This distinction matters because a cohort definition determines who contributes to the rest of the analysis. If the diagnosis that qualifies a patient is recorded incorrectly in the research dataset, even accurately curated treatment or biomarker information may describe the wrong group for the study.

Oral treatment shows a related difficulty at the level of a timeline. The oncology clinic may document an order for a drug that the patient obtains through an outside pharmacy. A visit narrative or communication may then record when the patient started it, stopped it, or was told to hold it. An analysis that depends on the interval of treatment needs those details in a consistent form. The paper uses this example to explain why material collected around routine care can be rich enough to support research while still requiring substantial work to become usable.

#### What chart reviewers already did

The authors use *abstraction* for the work of clinical reviewers and *extraction* for the automated task. Abstractors identify the chart evidence that bears on an assigned variable and apply policies for recording the result. In the process described in the paper, trained oncology nurses and tumor registrars can consult different forms of documentation for the same patient. Medical oncologists provide oversight, and ongoing audits are used to monitor reviewer performance.

The policies give an apparently simple field a specific meaning. The surgery application concerns a procedure undertaken to remove the primary tumor. Reviewers therefore need evidence about the purpose of a procedure, as well as evidence that it occurred. Similarly, the smoking application described in the results asks about lifetime history. A current description of a patient as someone who does not smoke may leave that question open. These distinctions are part of the work of curation. They help explain what an automated system is supposed to learn from the reviewers’ answers.

The authors also describe software that assists the human reviewers. A longitudinal chart can span hundreds of pages, and an answer may require consulting notes, imaging reports, and pathology documentation. The abstraction system helps reviewers work through the record and lets a curated value be traced back to its supporting material. That link gives someone reviewing an assignment a way to inspect the original documentation. The answer in the table and the record supporting it play distinct roles in the abstraction process.

By the time of the work, Flatiron Health had used expert abstraction to develop disease-specific research databases covering more than 300,000 people with cancer. The authors say that millions of additional patients in the broader database still lacked comparable curation of their unstructured records. The existing work supplied examples of clinically defined variables at a scale that made supervised development possible. It also showed how far the available records extended beyond the portion that experts had been able to curate in depth.

The paper illustrates the workload with a hypothetical example. A variable that takes 30 min of review for each patient would, in the authors’ scenario, require more than 7 years for a team of 100 full-time abstractors to cover 3 million patients. The example concerns the labor required to define a variable by hand. Its assumptions make the scale problem concrete without establishing a processing time or labor saving for the automated workflow.

Recency adds another dimension to the problem. A research dataset assembled for an earlier question may lack details about a newly relevant biomarker or a change in treatment practice. A highly specific question may also require patients with an uncommon combination of disease and care characteristics. Limiting curation to charts already read in detail can leave too few eligible examples. The authors see a reason to expand both the number of patients whose records can be used and the clinical detail available for those patients.

#### Earlier work and the purpose of the paper

The paper presents the approach as an extension of existing work on extracting clinical events and their timing. It cites earlier research on locating events in longitudinal notes, an important precursor when a study needs to place diagnoses or treatments on a timeline. It also refers to work on detecting metastatic recurrence in breast cancer and to an earlier effort to extract drug intervals from visit notes, prescriptions, and patient communications. These examples address parts of the larger curation problem.

Earlier biomarker research used regularized logistic regression to identify information about testing. Logistic regression can assign a score for a classification decision, and regularization constrains the fit during training. The paper describes that work as an earlier stage of development. Its focus is the broader process by which the authors define an extraction task, prepare its inputs, choose an architecture, and evaluate the resulting variable. The prior biomarker work supplies context for how a particular application evolved.

The authors give retrospective curation a defined scope. Their starting point is documentation already available in the chart. The output is a value corresponding to a clinical variable with an established meaning. The paper identifies related work on prospective prediction, automated assistance with cohort selection, laboratory data mapping, and clinical tools used during care as separate activities. Those applications ask different questions of electronic records. The purpose here is to build variables that can be used to analyze care that has already taken place.

The paper also responds to a demand for transparency in real-world evidence. The authors cite guidance from the United Kingdom’s National Institute for Health and Care Excellence asking researchers to explain how they derive variables from unstructured records, whether through human review or automation. For someone assessing a study, details about the source documentation, the definition of the variable, and its evaluation can affect how the results are interpreted. Reporting the existence of a field supplies little information about those decisions.

The authors distinguish the data assembled for an analysis from the evidence subsequently produced by analyzing them. They identify recency, clinical depth, traceability, completeness, representativeness, and usability as properties that affect whether a dataset can support a question. Extraction directly addresses access to detail already recorded in the chart. Consequently, its contribution is best understood in the larger sequence from clinical documentation to a defined variable and then to a study finding.

### The method, step by step

#### Decide what answer belongs in the dataset

The process starts with a research variable. The candidates the authors considered were commonly needed in retrospective oncology studies, were inconsistently available in claims or structured electronic health record fields, and had substantial expert-curated data available for development. These considerations connect the purpose of the field to the feasibility of building it. The field should answer a question that arises in research, and the developers need enough examples in which reviewers have already answered that question.

A *class* is a possible answer to a categorical question. The presence of a metastatic diagnosis can be represented as a binary field. Histology, which describes the type of tumor tissue, can take several values without a natural order among them. Stage has an ordering, and a date field places a defined event in time. A *label* is the known reference value for an example used in development or evaluation. In this work the labels come from the values assigned by expert chart reviewers.

Selecting a variable also means selecting the population for which it is defined. A smoking-history field can be framed similarly across different cancers. A histology field can require a different set of categories depending on the cancer under study. The authors choose between disease-specific and broader labeled cohorts with the intended application in mind. The population used to supply examples and the set of answers the extractor can return are therefore part of the design.

For a task with both a clinical category and a date, the relationship between those outputs has to be defined in advance. A result date belongs to a particular test result. A diagnosis date belongs to a particular disease milestone. The paper allows for joint extraction, separate extraction, or a connected procedure in which one output informs another. The choice depends on how the information for the variable is organized in the record and how the resulting fields will be used.

Developing an extractor for an oncology research variable The steps in order.

#### Locate passages that can supply direct evidence

Clinical experts assemble a vocabulary of words and phrases for each variable. The intended matches are terms that can lead to a direct statement about the target. For histology, a type of carcinoma or a term referring to tumor classification can lead to such a passage. Treatments and tests associated with that type of tumor are left out of the search vocabulary when their relevance would depend on inferring the histology. The selection of terms gives the extractor access to a particular kind of evidence from the start.

The computer looks through relevant documents for sentences containing a match. Some of the record is already accessible as text. PDFs, faxes, and scanned pages can contain writing represented as an image. The authors use optical character recognition, or OCR, to turn that writing into text that can be searched. A laboratory document may thus contribute a sentence even when its result was never entered into the structured portion of the electronic record.

A word match locates a passage. The surrounding words supply evidence about what the passage says. A statement ruling out advanced disease can contain the same clinical term as a statement confirming it. An account of a possibility under consideration can contain it as well. Preserving the sentence makes it possible to distinguish those uses by reading the words that indicate negation, uncertainty, or affirmation. The methods that select and represent these passages are part of [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/).

The authors also identify associated dates where the extraction task requires them. A document might mention a past event in a narrative whose surrounding dates refer to other episodes. The relevant date is the one that the documentation connects to the event specified by the variable. Capturing details about chronology, along with words and document structure, gives the procedure information it can use to make that distinction. The paper describes the intended features at this level and illustrates their use with fictional chart material.

The selected sentences are converted into a numerical representation suitable for the learning procedure. That step lets an extractor use cues about how the matched term is used and where the passage appears. For instance, the social history section of an encounter note can help locate relevant evidence for smoking, while a laboratory report may be important for a biomarker result. The meaning of the wording and the kind of document it comes from can both bear on the value the system ultimately assigns.

This preparation sets a practical boundary on the evidence available to the extractor. A passage has to be reachable through the documents and the search procedure before its language can be interpreted. Conversely, when a relevant passage is present among the inputs, an error can still arise from how the words or dates are interpreted. The distinction helps explain why the authors review both the search terms and the behavior of the classifier during development.

#### Learn from the clinical reference

The paper describes a division of labeled records into training, validation, and test sets. The training set supplies examples for adjusting the extractor’s internal parameters. The procedure processes the selected inputs, produces a score or answer, and compares that output with the expert label. Errors provide feedback for updating the parameters. Repeating the process lets the system learn patterns associated with the reviewer’s decision across many records.

The labels are intended to capture the outcome of chart review under standardized policies. An abstractor may consult a large portion of a record to settle a value. The learning procedure receives features prepared from selected evidence in that record. Training tries to reproduce the value the abstractor reached, using the material available to the extractor. The paper’s distinction between the expert answer and the input text is important here, because the answer supplies supervision while the documentation supplies the evidence the system can use when processing a new chart.

Validation provides feedback on choices made during development. The authors describe keeping patients in validation out of the training data. Aggregate measures can reveal that an approach is performing poorly, and inspection of specific cases can suggest where to look for the cause. A problem may arise because the vocabulary failed to retrieve a useful sentence, because preparation represented the text poorly, or because an architecture could not reliably distinguish the relevant uses of a term. The developers can revisit those decisions and judge revised versions on validation data.

The authors considered long short-term memory networks, gated recurrent units, and BERT. These are different architectures for processing text and using context in its interpretation. The paper illustrates long short-term memory, abbreviated LSTM, because it shows how information can carry forward as a sentence is read. BERT is another architecture the authors considered during development. [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)

An LSTM processes successive words while maintaining an internal state affected by the preceding input. When new wording arrives, the state helps represent the new word in light of earlier text. In the paper’s example, the negation preceding a term for advanced disease should influence how the term is interpreted. Its illustration shows a bidirectional arrangement, where processing in both directions can contribute to a contextual representation. The example explains why a sequence of words can convey information that would be lost if every match were treated as an isolated occurrence.

The choice of architecture remains specific to the variable. The authors describe comparing alternatives and using validation and error inspection to select an approach. They also emphasize the quality and relevance of the labels. A procedure developed with well-defined examples of a disease-specific category can learn from those examples. An application intended to cover many cancers requires labeled material appropriate to that broader scope. The architecture supplies a means of learning from the available evidence, while the examples determine which tasks and kinds of documentation the system has been exposed to.

#### Produce a value for the patient

A classifier can return a score for each class. The paper describes these scores as lying between 0 and 1 and interprets them as assigned probabilities based on the chart evidence. A discrete field requires a decision from those scores. One option is to assign the class with the largest score. Another is to require a score to cross a cutoff. The threshold decision described in the paper can be written as follows.

```
s(c) > τ
```

Here `c` is the candidate class and `s(c)` is the score assigned to that class for the record under consideration. The symbol `τ` denotes the decision threshold. The `>` sign expresses the condition that the score must be greater than that threshold. The paper gives 0.5 as a natural default in a binary decision and describes choosing a cutoff empirically when the class balance or the costs of different mistakes warrant it.

Restaging illustrates the role of the decision rule. A chart can refer to more than one stage because it records assessments at different points. If the relationship among those assessments is unclear, multiple classes can receive moderate scores. Taking the highest score produces a class even when the evidence is divided. A threshold allows the required support to be specified before assigning a class. The authors also discuss referring uncertain cases back to an abstractor. A value resolved through that option involves human review, while a fully extracted value is assigned by the automated workflow.

Some applications first score individual documents or pieces of text and then produce a patient-level answer. The distinction is particularly clear for biomarkers. A document can be identified as containing a testing result before another part of the workflow determines what the result was and when it returned. A patient may have several results. The research output must then retain the observations relevant to the variable’s definition, with their dates, so they can be placed in the patient’s course of care.

For diagnosis, the authors use distinct extractors for related clinical events. Their approach can connect the steps by supplying an earlier output to a subsequent one. This gives the downstream decision information about what has already been assigned, which can help keep related outputs consistent. The paper presents metastatic diagnosis and its date as a conceptual example. The task combines recognition of a clinical milestone with identification of the date that belongs to it.

#### Fit the procedure to different kinds of documentation

Stage and histology show why shared processing can coexist with different clinical definitions. The NSCLC staging application was designed to recover main stages I-IV and substages A-C. Stage documentation was similar enough across solid tumors for the authors to use a similar architecture with a training cohort drawn from several cancers. For some hematologic cancers, applicable information can involve risk stratification. The authors describe extracting staging information in those settings while recognizing that the relevant concepts differ from those used for solid tumors.

Histology poses a different problem for reuse. The possible cell types depend on the cancer. In the NSCLC application, the output categories distinguish non-squamous carcinoma, squamous carcinoma, and NSCLC with unspecified histology. Those outcomes are alternatives without a ranking. The authors used separate histology extractors for different cancers, because extending the application would require accounting for differences in the cell types the variable is meant to describe.

The smoking-history application asks whether a patient ever smoked. Its possible answers are a history of smoking, a documented absence of that history, and an unknown value. The authors trained it on abstracted examples from several cancer types. They most frequently found relevant wording in the social history portion of a visit note. They also identify access to documents such as radiology, surgery, laboratory, and pulmonary testing reports as important to the application. The search can thus concentrate on a likely section while drawing on multiple kinds of documentation.

The primary-surgery application targets a procedure intended to remove the primary tumor and records its timing. Some relevant procedures take place in hospitals or outpatient facilities, and details can reach the oncology chart as unstructured documentation. Abstracted examples were available from particular disease cohorts. The authors used similarities in how the procedure was documented across cancers to train an extractor for broader use. Their design depends on a common definition of the event that can be applied to those records.

Biomarker extraction begins by identifying which documents contain testing results. A separate part of the procedure recovers the biomarker, the result, and the date the result was returned. Evidence can come from reports produced by different laboratories and from clinicians’ interpretations in visit notes. When a patient receives tests at different facilities or points in care, the sequence of dated results can help a researcher establish what information was available at a particular clinical milestone.

The authors describe a separate extraction task for the percentage of staining reported for PD-L1. Here the quantity has to be put into a category for analysis. The paper prints the categories as `<1%`, `1%– 49%`, `≥49%`, and unknown. As printed, the ranges share the boundary at `49%`, and the paper gives no rule for assigning a result at that boundary. The example establishes that the workflow can include a task for categorizing a documented quantity, alongside tasks that recover a qualitative interpretation or a date.

Oral-treatment extraction starts with a list that oncology clinicians define for the cancer in question. The workflow seeks the drug and the endpoints of its documented treatment span. The authors use three distinct extractors to generate the oral-treatment variables and say that visit notes contain important information about starts and holds during hospitalization. Prescriptions and communications can also contribute evidence. The abstraction policies specify how to collect treatment start and discontinuation, and the automated procedure is trained to recover both because retrospective designs can depend on the interval.

Across these applications the final table is populated from evidence behind each answer. The stage and smoking examples call for one categorical value for the variable. The biomarker example can preserve more than one dated observation. Oral therapy calls for a span associated with a named drug. The shared development procedure accommodates these differences by starting with the definition of the output and choosing sources, features, and extraction steps that can support it.

#### Measure agreement with expert review

The paper defines its metrics verbally. They can be expressed using counts from a comparison with the expert-reviewed value. For a variable with several classes, the authors describe evaluating an individual class by treating it as the target and putting the other values outside it. In the histology example, a positive assignment means that the patient is placed in the non-squamous category, regardless of the clinical meaning of the word *positive* in other settings.

```
Sensitivity = TP / (TP + FN)
```

`Sensitivity`, also called recall, is measured among the patients assigned to the target category by expert review. `TP` counts patients placed in that category by both procedures. `FN` counts patients placed there by the experts whose extracted value is outside the category. The `=` sign defines the metric, `/` divides, and `+` adds the counts enclosed by the parentheses. This denominator asks how much of the expert-defined group was recovered.

```
PPV = TP / (TP + FP)
```

`PPV` stands for positive predictive value, also called precision. `TP` again counts the agreed assignments to the target category. `FP` counts extracted assignments to that category when the expert value is outside it. The slash divides the agreed assignments by the sum in parentheses. Here the starting group is everyone the extractor placed in the target category.

```
Specificity = TN / (TN + FP)
```

`Specificity` starts with the patients outside the target category according to expert review. `TN` counts patients both procedures place outside it, and `FP` counts expert negatives assigned to the target category by extraction. The slash divides the agreed negatives by the sum of those two counts. This measures how frequently extraction preserves an expert-negative assignment.

```
NPV = TN / (TN + FN)
```

`NPV` stands for negative predictive value. `TN` counts cases both procedures place outside the target category. `FN` counts cases extraction places outside the category that expert review puts inside it. The denominator adds the counts to obtain the group with an extracted negative assignment. Division gives the share of that group whose negative assignment agrees with the reference.

```
Accuracy = (TP + TN) / (TP + TN + FP + FN)
```

`Accuracy` measures agreement among all cases in the comparison. `TP` and `TN` count agreement on positive and negative assignments, while `FP` and `FN` count the disagreements in the two directions. The first parentheses group the agreeing cases. The second group all cases evaluated, and the slash divides the first total by the second. For an overall comparison of a multicategory variable, accuracy counts exact matches on the assigned value. The binary expression applies when evaluating a target class against the rest.

```
F1 = (2 × S × P) / (S + P)
```

`F1` is the harmonic mean of sensitivity and positive predictive value. `S` represents sensitivity and `P` represents positive predictive value. The `×` signs multiply those measures with the factor `2`, and `/` divides the product by their sum. The authors describe maximizing F1 as a way to choose a binary threshold that balances sensitivity and PPV. The appropriate decision can also depend on which errors matter to a particular analysis.

Once development is finished, the authors describe evaluating the selected procedure on test records kept apart from training and validation. The reference is again the value obtained by expert review. The held-out comparison addresses whether the workflow can recover the label for patients whose records did not guide its development. Their broader evaluation approach can also ask how errors are distributed and whether analyses give similar findings after extracted variables are substituted for abstracted ones.

### Experiments and results

#### The population and the reference comparison

The data source was Flatiron Health’s nationwide, de-identified US electronic health record database. It contains patient-level information accumulated over time, including structured entries and clinical documents. At the time of the research it included approximately 280 cancer practices and ~800 distinct sites of care. The authors describe a mix of community and academic practices and note that the distribution between them can vary by cancer type. These figures describe the reach of the overall source rather than the sample size for an individual extraction result.

The broad cross-tumor cohort required a cancer code from ICD-9 or ICD-10 and a qualifying encounter recorded on or after 1 January 2011. Documented vital signs, treatment administration, or testing could indicate an eligible encounter. This criterion gives the cohort a record of contact with care in addition to the diagnosis code. Development can then use labeled patients from a disease-specific subset or from a broader set of cancers, depending on which variable is being built.

The main reference for performance was technology-assisted expert abstraction. The comparison asks whether an automated value agrees with the conclusion reached by a trained reviewer applying the variable’s definition. The authors designed held-out assessment to support overall measures and subgroup analysis where appropriate. Their research-oriented framework also includes quantitative error analysis and replication of studies originally conducted using abstracted data. The paper describes these as strategies an evaluation may combine according to its purpose.

Diagnosis codes offer historical context for the comparator. The authors say that the precision of codes as a proxy for diagnosis can fall below 50%, with performance varying by disease. They give no matched test on which a code-based approach and their text extraction procedure are compared for the same diagnosis definition and group of patients. The earlier biomarker work using regularized logistic regression likewise provides a development precedent without a reported head-to-head result. The numerical example in the article compares extraction with expert values for histology.

#### Agreement on non-squamous histology

The authors feature NSCLC because it was the setting of the earliest applications they describe. They report that 10 extractors generated 20 distinct variables for analysis. The most specific numerical example concerns the non-squamous category of the NSCLC histology variable. Sensitivity was 96% and PPV was 94% against expert abstraction. The result is presented for patients with NSCLC. The article describes held-out testing as its standard final evaluation procedure, but it does not identify the precise split or give the denominator for either percentage in this example.

Positive assignment agreement for non-squamous histology in NSCLC Most positive assignments were shared by expert review and automated extraction whichever source defined the starting group.

**The numbers**

| System or setting | agreement % |
| --- | --- |
| Expert-positive group, sensitivity | 96% |
| Extractor-positive group, positive predictive value (this paper) | 94% |

Each bar measures how frequently a positive assignment from its starting group is shared by the other procedure. Starting with expert-positive patients measures recovery of the reference group. Starting with extractor-positive patients measures how well the resulting group agrees with the reference. The difference in denominators is part of the definition of the comparison. The bars describe a single extractor from opposite directions and provide no estimate of overall agreement across all histology classes.

The directions matter for research use. An analyst selecting people on the basis of extracted non-squamous histology might ask how many included records have the same value under chart review. An analyst concerned with covering the expert-defined group might ask how many qualifying people the procedure recovers. The two percentages support both readings for the reported example. The size and composition of the underlying groups, and the distribution of disagreements among other histology classes, remain unspecified.

#### The scope of the other outputs

The other applications are reported mostly in terms of what the authors succeeded in producing. The paper describes initial, advanced, and metastatic diagnoses with dates and discusses the use of linked extraction steps for related diagnosis variables. It reports main stage and substage for NSCLC, broader extraction of stage across solid tumors, and extraction of applicable staging information in some hematologic cancers. These examples establish the clinical distinctions the applications were designed to capture.

The smoking and surgery applications show how a defined variable can be extended across diseases. For smoking, the paper describes a lifetime-history field trained with examples drawn from several cancers. For surgery, the output concerns primary tumor resection and its timing. A procedure can be applied to more patients if the evidence needed to define the field is documented in sufficiently similar ways. The article offers these as examples of broader use and supplies no common numerical assessment ranking them against each other.

Biomarker extraction was developed and deployed for results and their dates. The account describes processing reports from multiple laboratories as well as evidence in clinician notes. The dated output is especially relevant when several observations occur during one person’s course of care. The oral-treatment application supplies a different data structure, in which a named treatment is associated with the boundaries of a period of use. Those outputs give research analysts access to temporal detail that would be lost in an undated indicator of a result or a prescription.

The authors illustrate the output with fictional cases. The figures present excerpts of chart material and show how a patient-level value can appear in a research table. The table comparison shows that automated and expert-curated values can have the same layout and can occupy the same role in an analysis. A field for an extracted result date can be used where a field for an abstracted date would otherwise appear. How closely the analyses agree depends on the values within those fields and on how the analysis uses them.

#### Replicating an analysis with extracted variables

The strongest reason to check the curated fields together is that an observational analysis generally depends on several of them at once. Diagnosis may determine eligibility. Stage may describe the population or define an analysis group. Treatment and test dates may establish what happened before or after a clinical milestone. The effect of errors in these fields can be hard to anticipate from a measure computed for an individual variable.

In a replication analysis, researchers can repeat an analysis developed with abstracted data using extracted variables in their place. The comparison concerns the study estimate or conclusion that results from the substitution. A field could disagree in individual charts while the overall estimate remains similar. Conversely, a small number of poorly placed errors could matter if they change entry into a cohort or move a patient across an important timing boundary. The replication evaluates the combined effect in the particular study.

The authors cite cases involving biomarker-associated overall survival and comparative effectiveness in metastatic NSCLC. They report that selected replications using several extracted variables produced results and conclusions similar to those obtained with expert abstraction. They also point to related work in which extraction reached error rates similar to expert review on some tasks. The paper uses those studies as evidence of particular applications and supplies no detailed set of replicated estimates for the reader to inspect within the article itself.

The reported results therefore operate at different levels. The histology figures show how often a specific class assignment agreed with the chart-review reference in each direction. The descriptions of other applications show the types of fields the workflow delivered. The cited replications address use of several fields together for specified studies. Their scope is defined by the questions those studies examined and the populations and variables they used.

### What the ablations show

The paper reports no formal ablation that varies an individual component under fixed evaluation conditions and instead describes development comparisons, transfer across cancer types, and downstream research replications.

#### What can be learned from development

The authors considered several architectures and used validation metrics and case review to guide their choices. They also used that feedback to revise search terms and text preparation. This establishes that development involved adapting several stages of the procedure to the variable. Because the paper gives neither the performance of the alternatives under common conditions nor the sequence of changes for a specific result, the contribution of an individual decision remains unmeasured.

The contextual interpretation example supplies a rationale for processing sentences with an architecture that can represent their surrounding wording. Negation can change the clinical meaning of the term the search retrieves. A classifier given information about that negation has evidence relevant to deciding whether the statement supports an advanced diagnosis. The paper illustrates that mechanism. It gives no comparison of context-aware processing against an otherwise identical procedure with the sentence context removed.

The connected diagnosis workflow is closer to a comparison between designs. The authors report that passing results between steps helped avoid contradictory outputs and improved overall accuracy in their experience. The paper does not give paired values for linked and independent versions or specify the frequency of contradictions. The reported observation supports the authors’ rationale for coordinating related outputs, while the magnitude of the effect and its sensitivity to the patient population remain unspecified.

#### What transferring across cancers tests

The paper’s comparisons across applications explain where the authors found broader training practical. They used patients from several solid-tumor diseases for stage extraction because the documentation followed similar patterns. They took a disease-specific approach to histology because the relevant cell types differ. Smoking history and primary surgery supplied definitions that could apply across cancers. These decisions show that the transfer question concerns both the wording in the record and the meaning of the patient-level answer.

The authors also describe earlier work on identifying rare cancers, for which relatively few labels are available. They discuss generic token replacement and leave-one-out validation as ways to address that challenge. Generic replacement substitutes a more general representation for selected terms. In this setting, withholding a target disease tests whether a procedure developed from other cases can generalize to it. The authors report success with few or no training labels from the target disease, without giving separate measured effects for replacement and withholding or detailed results for individual cancers.

That distinction between holding out a disease and holding out patients is consequential. The usual held-out test asks how the procedure works on new records within the intended setting. A rare-disease evaluation can ask how it works when the target disease supplied little or no supervision. A broader staging application may instead deliberately train on several diseases. The examples describe different ways of investigating generalization and give limited numerical evidence for comparing their outcomes.

#### What the research comparisons isolate

Subgroup assessment is part of the framework because performance averaged over a population can hide the behavior of a clinically important subset. The paper says that stage and histology are evaluated at the category level and, as appropriate, by cancer type. It gives no stratified results that would show which groups had more difficulty or the extent of any disparity. The contribution here is a description of what the authors consider relevant to evaluation, alongside a selected aggregate example.

The cited research replications change the source of multiple variables within a study. Similar findings support the substitution for the analyses that were repeated. Because the replacement occurs at the level of the curated data, the comparison can capture the combined effect of errors in diagnoses, dates, or categories on a study estimate. It cannot attribute that result to a particular text representation, clinical vocabulary, or architecture. The relevant outcome is how the study behaves when those variables are used together.

### Limitations

#### Limits identified by the authors

The authors caution that performance figures for a variable are interpretable when the application cohort is similar to the test cohort. Cancer type and stage are among the characteristics that may matter. They cite this dependence as their reason for leaving most detailed results out of the paper. The reported histology percentages concern one category within NSCLC. Using them to characterize histology in another cancer would require evidence about a different set of patients and potentially a different set of categories.

Training and use took place in a US population. The authors consider it possible to transfer a suitable architecture across national borders and identify local retraining as necessary for the highest performance. The distinction matters because an architecture can process the same kinds of text while the documentation conventions and sources available to it change. The paper presents no international test of transfer and gives no estimate of how much local supervision would be needed.

The authors explicitly identify a limitation of text-based processing for microsatellite instability, or MSI. The result can appear in several reporting formats. In one, a graphic indicates the value on a sliding scale. OCR can make printed words and numbers searchable. Interpreting the position of a mark on a graphic scale is an additional task. That example gives a concrete reason why access to a scanned report can be insufficient when the clinically important evidence is encoded visually.

The scope is limited to documented information available at the time of extraction. The authors rule out forecasting later clinical events and filling gaps with inferred findings. This matters when interpreting fields such as a test result or smoking history. The evidence could establish a value, explicitly rule it out, or be insufficient for an assignment. The presence or absence of a usable field depends on what was recorded and what the procedure could recover from that record.

The authors identify extensive, high-quality expert abstraction as a major advantage in development. Their process depends on standardized policies and enough reviewed records to furnish useful examples. The underlying records originate with Flatiron Health, and access for replication is subject to permission or licensing. The paper also reports that Flatiron Health funded the work and took part in it. The resulting account describes what was possible with the organization’s data, clinical infrastructure, and labeling effort.

#### Limits apparent from the design and reporting

The histology example supplies the direction and magnitude of agreement but gives neither the underlying counts nor uncertainty intervals. It also leaves the exact evaluation split unspecified. A reader can interpret each percentage using the metric’s definition but cannot assess its statistical precision from the article. The size of the source database tells us how broadly the source reached. The evidence needed for precision is the size and composition of the groups used to calculate the reported result.

The paper also gives little basis for comparing how well the system handles different clinical categories. There is no similarly detailed numerical result for squamous or unspecified histology. A high PPV for the non-squamous class does not describe which other labels received the misclassified cases. That error pattern would matter for an analysis using all histology categories or for one concentrating on a less common subgroup. The authors describe the level at which such checks can be made, while publishing only the selected example.

The use of chart review as a reference makes the performance comparison relevant to the authors’ aim of reproducing abstraction. Both processes work from the record. They can agree on the reading of a chart even when the chart is incomplete or contains a mistaken statement. As a consequence, agreement with the expert label establishes how well the procedure recovers that reference. Its correspondence to clinical events beyond the available record would require another source of evidence.

Timing has its own measurement problem. Identifying that a result or treatment is documented is different from reliably assigning the date or interval needed by the study. A clinician can describe a drug started before the encounter, and laboratory documents can refer to different steps in testing. For these applications the paper explains which date the variable seeks. It gives no distribution of date discrepancies or measure of how often extracted dates would place events on the wrong side of a study milestone. The histology figures cannot answer that temporal question.

Chaining makes an earlier decision available to a later one. This can help maintain consistency when the decisions are related. A mistaken earlier output can also influence the later decision, a possibility that follows from the described design. The paper offers no paired error analysis from which to estimate that effect. Likewise, it gives no test of how much evidence might be lost through the term list or OCR, so a reader cannot allocate observed errors among document access, passage selection, and interpretation.

The paper is an overview of a proprietary development process. It names Python as the main programming language and describes families of architectures, the role of human labels, and choices about evaluation. For an independent implementation, details such as exact input specifications, selection rules, and task-level training and evaluation sizes would matter. The article’s purpose and reporting level make it possible to understand the workflow without supplying enough detail to reproduce a particular result from scratch.

#### Limits on what can be inferred about research benefit

The authors argue that expanded curation can make more patients available for detailed oncology research, including patients whose experiences have been less visible in clinical trials. The study describes the scale of the database and the breadth of fields the approach can produce. It reports no direct measurement of a change in representativeness or research bias. Whether expanding curation changes those properties depends on which patients are included, the coverage of their records, and the errors in the extracted variables relevant to the analysis.

The examples also give reasons to expect efficiencies. A procedure that can reuse learned extraction rules across many charts can address part of the workload illustrated by the authors’ hypothetical abstraction scenario. The paper does not report measured processing time, cost, or reductions in reviewer hours. Developing and maintaining vocabularies, labels, and evaluation procedures is itself part of the work. The evidence is about the approach’s ability to generate clinical variables and about the burdens that motivated it, with operational gains left unquantified.

The authors anticipate that generative approaches may bring more of the chart’s context into consideration and reduce dependence on extensive labels. They discuss summarizing a patient’s hospital course as a related task and point to earlier work on it. That discussion concerns prospective directions for processing clinical text. The study’s evidence comes from its task-specific extraction workflow and the evaluations described for that workflow. [Hospital-course summarization](https://md.research.elamur.ai/free/en/papers/adams-2021-what-s-summary-laying-groundwork/)

The replications support use under their particular study conditions. A new application may depend more heavily on an extracted date, include a group in which documentation differs, or be sensitive to errors that made little difference in an earlier study. The authors’ framework makes these differences part of deciding whether the variables are fit for the question. A well-formed research table, high agreement in a specified class, and a similar result in a replicated analysis each establish something at a different level.

### What came after

Dash and colleagues cite Adamson and colleagues in work that evaluates GPT-3.5 and GPT-4 for information needs arising in healthcare delivery. The evaluation’s stated purpose is broader than recovering a prespecified oncology field from the chart. The connection is the assessment of automated handling of clinical information in a practical setting. The citation establishes that connection, while leaving open whether the work used any of the oncology variables, expert labels, or extraction steps described by Adamson and colleagues. [Dash and colleagues’ healthcare information evaluation](https://md.research.elamur.ai/free/en/papers/dash-2023-evaluation-gpt-3-5-gpt/)

Altalla’s citing work concerns evaluation of GPT in a clinical-note setting. The document type links it to the oncology paper, where visit narratives can supply evidence about smoking history, diagnosis, and treatment timing. The link is especially direct at the level of the material being processed. The citation alone leaves the later study’s benchmark, outputs, and dependence on Adamson and colleagues’ method unspecified. [Altalla’s clinical-note evaluation](https://md.research.elamur.ai/free/en/papers/altalla-2025-evaluating-gpt-models-clinical-note/)

The two citations place the paper alongside evaluations of clinical information systems with different stated purposes. Adamson and colleagues define success in terms of recovering particular values and, in selected replications, preserving the findings of an analysis that uses those values. A healthcare information evaluation or an assessment involving clinical notes can test a different outcome even when it draws on similar documents. The documented relationship is that the later works cite the oncology extraction paper. Their degree of methodological reuse remains unspecified.

## Cite

Cite as Blythe J. S. Adamson, Michael Waskom, Auriane Blarre, Jonathan Kelly, Konstantin Krismer, Sheila Nemeth, James Gippetti, John James Ritten, Katherine Harrison, George Ho, Robin Linzmayer, Tarun Bansal, Samuel Wilkinson, Guy Amster, Evan Estola, Corey M. Benedum, Erin Fidyk, Melissa Estévez, Will Shapiro and Aaron Benjamin Cohen. 2023. Approach to machine learning for extraction of real-world data variables from electronic health records. Frontiers in Pharmacology.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.3389/fphar.2023.1180962](https://doi.org/10.3389/fphar.2023.1180962)

```bibtex
@inproceedings{adamson2023approach,
  title = {{Approach to machine learning for extraction of real-world data variables from electronic health records}},
  author = {Blythe J. S. Adamson, Michael Waskom, Auriane Blarre, Jonathan Kelly, Konstantin Krismer, Sheila Nemeth, James Gippetti, John James Ritten, Katherine Harrison, George Ho, Robin Linzmayer, Tarun Bansal, Samuel Wilkinson, Guy Amster, Evan Estola, Corey M. Benedum, Erin Fidyk, Melissa Estévez, Will Shapiro and Aaron Benjamin Cohen},
  booktitle = {Frontiers in Pharmacology},
  year = {2023},
  doi = {10.3389/fphar.2023.1180962},
  url = {https://doi.org/10.3389/fphar.2023.1180962}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
