Automated Extraction and Coding of Qualitative Data Within Physician-Patient Communication in Cancer Care Using Natural Language Processing: Development and Validation Study

Background Large-scale analysis of qualitative clinical communication data typically requires substantial manual coding. Natural language processing (NLP) may reduce this burden by converting unstructured physician-patient communication transcripts into structured qualitative data. Objective This study aimed to develop, test, and validate an NLP application for identifying quality-of-life factors in cancer care communication. We also compared traditional machine learning (ML), rule-based, transformer-based, and out-of-the-box (OoB) large language model (LLM) approaches. Methods We analyzed 434 standardized patient encounter transcripts of physician-patient interactions collected from a prior study. A rule-based SpaCy model, traditional ML models, bidirectional encoder representations from transformer (BERT), Robustly Optimized BERT Pretraining Approach (RoBERTa), and the OoB Qwen3 LLM were evaluated using F 1 -scores. The highest-performing model was incorporated into a web-based NLP application and further assessed through manual validation. Results Transformer-based models demonstrated the strongest performance. RoBERTa achieved the highest initial F 1 -score of 83%, outperforming BERT at 80%, the OoB Qwen3 LLM model at 39%, and the rule-based SpaCy baseline at 34%. Manual validation of the RoBERTa model produced an F 1 -score of 91%. The comparatively low performance of Qwen3 indicated that OoB LLM use alone may not produce reliable results for qualitative, domain-specific clinical communication tasks. Conclusions A fine-tuned transformer model (RoBERTa) was better suited to capturing the complexity of patient encounter transcripts than traditional ML, rule-based approaches, or an OoB LLM. The findings demonstrate the feasibility of using a manually validated, web-based NLP application trained on gold-standard annotations to transform large-scale physician-patient communication transcripts into structured qualitative data. Hybrid systems combining rule-based precision with the contextual capabilities of transformer models may further improve the identification of longer conversational sequences, including emotional expressions, question-answer exchanges, and multitopic utterances.

Authors

Publication Details

Journal
JMIR Formative Research
Published
2026-11-26
DOI
https://doi.org/10.2196/88404
Primary Topic
Computational and Text Analysis Methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Automated Extraction and Coding of Qualitative Data Within Physician-Patient Communication in Cancer Care Using Natural Language Processing: Development and Validation Study

Maria D. Thomson, Jay Sureshbhai Patel, Zasim Azhar Siddiqui, Laura A. Siminoff et al.
JMIR Formative Research
Computational and Text Analysis Methods
article

Automated Extraction and Coding of Qualitative Data Within Physician-Patient Communication in Cancer Care Using Natural Language Processing: Development and Validation Study

Maria D. Thomson, Jay Sureshbhai Patel, Zasim Azhar Siddiqui, Laura A. Siminoff, Ritwik Katiyar, Oqba Memar
article en

Abstract

Background Large-scale analysis of qualitative clinical communication data typically requires substantial manual coding. Natural language processing (NLP) may reduce this burden by converting unstructured physician-patient communication transcripts into structured qualitative data. Objective This study aimed to develop, test, and validate an NLP application for identifying quality-of-life factors in cancer care communication. We also compared traditional machine learning (ML), rule-based, transformer-based, and out-of-the-box (OoB) large language model (LLM) approaches. Methods We analyzed 434 standardized patient encounter transcripts of physician-patient interactions collected from a prior study. A rule-based SpaCy model, traditional ML models, bidirectional encoder representations from transformer (BERT), Robustly Optimized BERT Pretraining Approach (RoBERTa), and the OoB Qwen3 LLM were evaluated using F 1 -scores. The highest-performing model was incorporated into a web-based NLP application and further assessed through manual validation. Results Transformer-based models demonstrated the strongest performance. RoBERTa achieved the highest initial F 1 -score of 83%, outperforming BERT at 80%, the OoB Qwen3 LLM model at 39%, and the rule-based SpaCy baseline at 34%. Manual validation of the RoBERTa model produced an F 1 -score of 91%. The comparatively low performance of Qwen3 indicated that OoB LLM use alone may not produce reliable results for qualitative, domain-specific clinical communication tasks. Conclusions A fine-tuned transformer model (RoBERTa) was better suited to capturing the complexity of patient encounter transcripts than traditional ML, rule-based approaches, or an OoB LLM. The findings demonstrate the feasibility of using a manually validated, web-based NLP application trained on gold-standard annotations to transform large-scale physician-patient communication transcripts into structured qualitative data. Hybrid systems combining rule-based precision with the contextual capabilities of transformer models may further improve the identification of longer conversational sequences, including emotional expressions, question-answer exchanges, and multitopic utterances.

JMIR Formative ResearchVol. 10
Good health and well-being
Computational and Text Analysis Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon