September 30, 2025 | For patients with metastatic brain cancer, stereotactic radiosurgery has become an increasingly common treatment over the past decade based on the recommendations of medical physicists, guidelines of professional societies, and coverage guidelines of federal agencies. There has also been a change in the drugs used to treat the underlying cancer in conjunction with the procedure, especially in cases of metastatic cancer. The most significant shift is the increased use of immunomodulators and targeted therapies in lieu of cytotoxic chemotherapy.
However, it is becoming increasingly difficult to find relevant information in the peer-reviewed literature to help clinicians in their treatment decisions, because practice guidelines are rapidly changing with the advancement in medical research and the resulting scientific literature, according to Mario Fugal, Ph.D., a medical physicist in Charleston, South Carolina. Knowing the underlying cancer type is a particularly helpful step in guiding appropriate treatment.
International Classification of Diseases (ICD) codes used in electronic health records (EHRs), primarily for billing and reimbursement purposes, are “completely inadequate” for determining the cancer type and where in the body a metastatic cancer started, says Fugal. Although they may provide a generic term like “lung cancer,” the codes don’t classify the subtypes or genetic markers that guide treatment. This matters because different cancers respond differently to radiation and getting it wrong comes with the risk of complications, the most concerning of which is radiation necrosis.
Most of the time after radiosurgery, the tumor slowly goes away as damaged cancer cells die off. But in 5% to 10% of cases, radiation necrosis occurs, causing inflammation, swelling, seizures, and even death, he says. “As a clinician you want to do no harm, and that one is a clear known side effect caused by the radiation that needs to be minimized or eliminated.”
As it stands, radiation oncologists must delve deep into the clinical notes written by their medical oncology colleagues to get to the most pertinent data—the exact origin of the cancer, which would guide their treatment decisions, says Fugal.
He and his colleagues at the Medical University of South Carolina (MUSC) laid the first steppingstone toward removing the necessity of that time-consuming task with a study using “super-simple” natural language processing (NLP) to read clinical notes in the EHR to identify the primary cancer type of patients undergoing the procedure (JCO Clinical Cancer Informatics, DOI: 10.1200/CCI-24-00268).
The NLP model was strikingly accurate, correctly identifying the primary cancer in 90% of cases. For common cancers like lung, breast, and skin cancer, classification results were nearly perfect at around 97%. The program could even identify lung cancer subtypes, which ICD codes were unable to do.
The next step, using a similar approach, is to try to determine which patients experience radiation necrosis, says Fugal. Admittedly, it will be challenging since few patients are affected. Not only is the incidence rate relatively low, but the complication can develop anywhere from three months to two years after treatment. “We need an algorithm that can pick out which [few] patients are positive for radiation necrosis across a huge haystack of [clinical] notes.”
If successful, it will be the first time that phenotype (clinical characteristic) could be identified automatically within patient charts instead of looking for it via painstaking manual chart review, as is currently done by the research community. “The very pinnacle of what we could do is predict which patient is at risk of radiation necrosis before they get the radiation treatment,” Fugal says, which has “been attempted many times and not succeeded at all.” It will nonetheless be invaluable to study and categorize the patient population and build risk models, “especially if we can do it quickly and with current data.”
For now, and the foreseeable future, the NLP model will be used in the research space and for outcomes analysis, says Fugal. If it gets to the point of being developed into a clinical decision support tool, it will need further validation and approval from the U.S. Food and Drug Administration. It will also need to be integrated into the EHR user interface, as the algorithm is currently written in the Python and R programming languages.
Limitations of the latest study include the fact that it was conducted at one institution (MUSC) and NLP “depends on how the notes are structured and probably to some extent who the doctors are,” says Fugal. Although the data set was sizable in terms of radiosurgery—1,461 patients, 82,000 notes, and 333,000 cancer-related diagnoses—it would be ideal to test out the model elsewhere to see what changes may be needed. The algorithm was easy enough to apply, he adds, since the words used to describe one cancer are unique compared to all others.
The low-resource NLP tool developed by Fugal performed fantastically in the narrow space of clinical radiation oncology notes, remarks Jihad Obeid, M.D., director of the Cancer Integrated Data-Enabled Resource (CIDER) of the MUSC Hollings Cancer Center and author on the latest study. In other research looking at general clinical notes, more advanced modeling approaches such as generative AI, including large language models, are more suitable—and require a lot more computational power and an expensive computer to run on.
CIDER is a shared resource for on-campus researchers looking to leverage all the rich but siloed data sources that MUSC has on cancer patients, including EHRs, genomic data analyses, and a tumor registry, Obeid says. Among the benefits are help in integrating data, coming up with more exploratory research, and recruiting clinical trial participants. Fugal’s NLP algorithm is in the mix and focused primarily on improving data for clinical research.
As with any AI project, a bias evaluation of the NPL model will ideally happen at some point, he says. Given enough data, it will be important to assess the performance of this diagnostic-type algorithm across different demographic groups.
In the radiosurgery space, the overall advantages of using retrospective data outweigh the limitations given the pace of innovation and the lengthy and complex clinical research process, says Fugal. “Things are changing so fast that you can’t plan a [prospective] trial right now that is going to be super-relevant in 10 years.” A project using NLP to automate a lot of the work could help accelerate this research.
The metastatic brain cancer study was initiated when Fugal was a student with the Biomedical Data Science and Informatics program, jointly run by Clemson University and MUSC. It was part of his thesis work and Obeid was the advisor.
Although trained as a pediatrician many years ago, Obeid says he is today more of a data scientist focused on artificial intelligence (AI) and NLP. The domain expert for the study was David Marshall, M.D., chair of the department of radiation medicine at the MUSC Hollings Cancer Center, who is also a co-author of this study.
Patients that need radiosurgery usually have brain metastases, says Fugal, which might variably begin as cancer in the lung, breast, kidneys, colon, or other body organ. “All those cancers behave differently, are treated with different drugs, have different reproduction rates, and sometimes have a different tolerance for radiation, so it’s important ... to determine the primary tumor” when doing the one-session radiation therapy treatment.
Outcomes of radiosurgery “depend on what kind of cancer the patient has to begin with,” he continues. The foray into NLP was a result of having to dig into clinical radiation oncology notes to make that determination.
“ICD-10 codes are not right” in terms of identifying the site of the primary cancer, explains Fugal, since they are optimized for billing rather than data analysis or research. In some cases, that’s because patients present with brain metastasis when they are diagnosed, and the billing code for the underlying cancer may not be present. In other cases, the coding is correct, but patients may also have a second diagnosis of skin cancer, and it is unclear which cancer caused the brain metastasis.
On top of that, ICD-10 codes are not very specific when it comes to cancer. “There are lots of different lung cancers, but there’s [only] one ICD-10 code ... [and] it won’t go into whether it’s the left versus right lung, the upper versus lower part of the lung or small cell versus non-small cell.”
NLP can instead look at patient consultations with doctors within EHRs. “Most of the time, they know exactly what they’re treating, why they’re treating it, and they write that in the notes,” he says, since that’s the gold standard practice.
Physicians communicate well with one another, but it’s difficult to translate that natural language into data that can be used for decision-making, says Obeid. NLP can effectively bridge that gap.
Without NLP, it would take researchers a long time to comb through every patient chart and “figure out who’s who ... [and] who has what,” Fugal says. For research like his, requiring the extraction of phenotypes, a basic NLP algorithm can be trained on a small data set and then used across the larger universe of patient records to efficiently get the job done.
In addition to identifying patients for trial recruitment purposes, NLP can also help automatically match patients with studies, Obeid adds. “It’ a very hot area right now” as evidenced by the large number of AI companies competing in the space and many institutions with research projects focused entirely on that matching exercise. “There is still no perfect system.”
In terms of using NLP to identify the primary cancer type of metastatic brain cancer patients, the study by Fugal and his team was a first in the field. But other researchers facing similar problems in oncology have also turned to natural language processing to, for example, discover when breast or prostate cancers turned metastatic.
“There is nothing structured in any EHR that tells you when that happened,” says Fugal. “Anytime someone is metastatic, the ICD-10 [coding system] just falls apart.”
Clinicians of course “don’t sit on their hands and watch [brain metastases]; they do something,” Fugal points out. Since the time interval from when the condition is observed and treated is so short, it’s easy enough to nail the date of onset. “Insurance [CPT] codes make sure doctors are very clear on which date they’re treating.”
Getting the date right is a much bigger problem when it comes to using NLP for disease surveillance, says Obeid, referencing a separate project dedicated to identifying the onset of diabetes to determine the incidence of the disease. The problem is when doctors see patients for the first time, be it for diabetes or cancer, they may be referrals and therefore not be the same date the diagnosis is made. So, that information must be teased out of the clinical text.
NPL algorithms don’t have to be “super fancy” for every problem, notes Fugal. “Simple tools can still solve new problems.” But they’re not going to look the same everywhere, given that the major EHR systems come with a multitude of data structures and domains around which different use cases can be built.