Introduction
Chronic obstructive pulmonary disease (COPD) cohorts built from routinely collected electronic health record (EHR) data are often defined with diagnosis codes, diagnosis names, or both. These approaches are practical for large studies, but they do not establish postbronchodilator airflow obstruction. Global Initiative for Chronic Obstructive Lung Disease (GOLD) recommends spirometric confirmation, and European Respiratory Society/American Thoracic Society (ERS/ATS) standards describe how spirometry and other lung-function tests should be measured and interpreted (1–3).
Reviews and validated algorithms also show that COPD cohort definitions vary across data sources and may not be directly comparable (4–6).
An additional problem is data provenance. A research extract from an inpatient system may contain diagnosis wording but omit pulmonary function values or reports held in an outpatient module, a pulmonary function laboratory system, or another data warehouse. In that setting, the absence of a report row does not show that testing was never performed.
It shows only that the report was not captured in the extract being analyzed. This distinction is important because using the captured reports to refine a COPD cohort can remove most patients and create a selected subgroup.
Published estimates of documented or completed spirometry vary across settings and definitions. In a US EHR intervention study of patients with a COPD diagnosis and no prior spirometry, completion rates increased from 13.2% to 19.3% (7). In a 2025 primary-care registry study, 54% of 2,610 patients with recorded COPD had spirometry data (8).
These figures are not directly comparable with each other or with an inpatient report-capture measure, but they show that the usable proportion depends strongly on the data source, time window, linkage, and denominator.
Natural language processing (NLP) has been used to identify clinical phenotypes in EHRs (9–11). Reviews also describe the use of clinical text extraction for cohort identification and research applications (12, 13). Prior pulmonary function studies have focused mainly on locating reports or extracting numeric measurements (14, 15).
Automated interpretation of complete pulmonary function tests (PFTs) has also been studied (16), but the present export did not contain the underlying measurements. When an extract contains only short conclusion sentences, direct phrase indexing can organize the text for review. Its immediate value is operational: it can reduce the number of templates that must be inspected, identify records for clinician annotation, and document exactly which phrases were found.
It is not a substitute for physiologic interpretation.
We therefore treated this work as a data-provenance and cohort-design audit. The objectives were to quantify pulmonary function report capture in an inpatient EHR cohort with recorded COPD, examine whether capture was selective across patient strata, build an auditable index of literal report terms, and explain how different capture levels should affect the design and interpretation of future COPD research.
Materials and methods
Study design and data source
This was a retrospective, single-center study of routinely collected inpatient EHR data from Huashan Hospital, Fudan University. The analytic export covered a 3-year period between 2022 and 2025 and contained one worksheet named Data with 19,612 hospitalization records from 5,961 patients and 70 columns. Patient and hospitalization identifiers were used only to link records and were not included in any output.
The study was approved by the Ethics Committee of the School of Life Sciences, Fudan University (approval number SLH2026212-001). The committee waived the requirement for informed consent because the study used retrospective, de-identified EHR data. Reporting followed Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) and REporting of studies Conducted using Observational Routinely collected health Data (RECORD) guidelines (17, 18).
Meaning of report capture and analysis units
Pulmonary function report capture was defined as the presence of at least one report row identified by the report-name or project-name fields in this inpatient analytic export. Capture is a property of the exported dataset. It is not a measure of whether a patient ever underwent pulmonary function testing, whether a test was completed during an exacerbation admission, or whether clinical care met a quality standard.
A patient without a captured report could have undergone testing in an outpatient clinic, in another hospital, or in a laboratory system that was not linked to this export.
Patient-level clinical characteristics and any-report capture were summarized across the export. The file did not contain encounter dates or report timestamps, and therefore, we could not determine whether a report preceded or followed the first COPD documentation or whether testing occurred during a stable period or an acute admission. The primary text-index analysis used patients whose COPD wording and pulmonary function report shared the same hospitalization identifier.
This link shows co-occurrence within a hospitalization record but not the order or exact timing of testing. If a hospitalization contained more than one report row, non-duplicate ItemResult text was combined at the hospitalization level; patient-level labels were then aggregated across eligible hospitalizations.
Definition of EHR-recorded COPD
The main definition searched three diagnosis text fields: indexed diagnosis, outpatient or emergency diagnosis, and preliminary diagnosis. A hospitalization was classified as containing COPD wording when one of these fields contained an English abbreviation [COPD or chronic obstructive lung disease (COLD)] or a prespecified local Chinese term for chronic obstructive pulmonary disease, chronic obstructive lung disease, or chronic bronchitis with emphysema. The exact terms are listed in Data Sheet 1, and a patient entered the cohort after at least one qualifying hospitalization.
Because the definition depended on recorded wording, it could omit differently worded records and did not establish spirometry-confirmed COPD.
The export did not contain a separate International Classification of Diseases (ICD) diagnosis-code field, and no J41-J44 strings were found in the three diagnosis fields. We therefore could not construct or directly compare an ICD-based cohort. Sensitivity definitions included a strict definition limited to the indexed diagnosis field, a broad definition that also searched chief complaint, present illness, and past history, and an expanded term definition that added local wording for chronic obstructive bronchitis and chronic bronchitis with emphysema.
To describe the cohort, COPD-coded hospitalizations were also searched for wording related to acute exacerbation, respiratory infection or pneumonia, and respiratory failure. These groups were not mutually exclusive and did not establish that COPD was the primary reason for admission.
Identification and indexing of pulmonary function report text
Pulmonary function reports were identified when either the report name or project name equaled the local term for pulmonary function. This identified 561 report rows in the full export. ItemResult was the only populated report conclusion field.
The examination-findings and ItemShow1 fields were empty. Structured pulmonary function values were not available.
ItemResult text was normalized before rule matching. Carriage returns were converted to line breaks, repeated spaces were removed within each line, blank lines were dropped, and original line boundaries were retained. Two local wording variants were normalized, and each line was divided into short clauses at common Chinese and English punctuation marks.
Rules indexed explicit wording for ventilatory impairment, mixed ventilatory impairment, obstruction-predominant wording, restrictive wording, small-airway abnormality, diffusing impairment, reduced inspiratory or expiratory muscle strength, increased respiratory central drive, increased total airway resistance, and positive or negative bronchodilator-test wording. Normal statements were retained only when an abnormal term was absent from the same segment. Explicit obstructive wording required the literal obstruction term; increased total airway resistance was counted separately.
Poor-cooperation or reference-only wording was flagged. Table 1 summarizes report capture and rule-based text indexing. The full dictionary and exclusions are provided in Data Sheet 1.
The rules did not calculate physiologic categories from numeric thresholds. A negative rule result means that the prespecified literal term was not found; it does not mean that the physiologic abnormality was absent. No clinician-annotated reference standard was available, and hence, accuracy, sensitivity, specificity, precision, recall, F1 score, and area under the curve were not calculated.
Published interpretation frameworks and limits of local reconstruction
Published international standards were reviewed to identify the measurements normally required for pulmonary function interpretation (2, 3). The Chinese pulmonary function guideline and the ERS respiratory muscle statement were also used for context (19, 20). Obstruction and mixed impairment require spirometric ratios and, for mixed or restrictive patterns, lung-volume information; diffusing impairment requires diffusing capacity of the lung for carbon monoxide (DLCO) with an appropriate reference equation; respiratory muscle strength requires measured inspiratory or expiratory pressures; and severity depends on the chosen reference system.
The Chinese 2018 primary-care guideline describes a small-airway rule based on at least two of forced expiratory flow at 50% of FVC (FEF50), FEF75, and FEF25-75 being below 65% predicted when the main spirometric indices are normal (19).
These published frameworks were not treated as the exact Huashan Hospital rules. The analytic export and available study files did not contain the historical pulmonary function laboratory standard operating procedure (SOP) version used during 2022–2025, the reference equations, instrument or software settings, numeric measurements, or reader metadata. We therefore could not reconstruct or verify the local thresholds used to assign each report conclusion.
Table 2 separates published physiologic frameworks from what was available in this study. Severity words remain documented in the rule dictionary, but severity frequencies were removed from the main results because their local numeric basis could not be verified.
Clinical variables and data-quality decisions
Clinical variables were summarized at the patient level. Sex was assigned from the most frequently recorded value for each patient. Age and body mass index (BMI) were summarized from physiologically plausible values.
Comorbidities and hospitalization features were identified from recorded diagnosis wording and were used only to examine whether report capture was selective.
Smoking documentation was classified as documented smoking history, smoking denied in EHR text, or unclear/not documented. Current and former smoking were not separated because the available templates did not support that distinction reliably. Alcohol status and sparse blood pressure and hemoglobin values were not used in the revised comparisons.
An exploratory physiologic-range check suggested that the exported heart-rate and respiratory-rate columns may have been interchanged, but this could not be verified against the source system. We therefore did not relabel, correct, summarize, compare, or otherwise use either variable. Any future use requires source-system verification.
Statistical analysis
Continuous variables are reported as median and interquartile range, with the number of available observations. Categorical variables are reported as count and percentage. Captured and uncaptured groups were compared with the Mann–Whitney U test for continuous variables and the chi-square test or Fisher’s exact test for categorical variables, as appropriate.
These P-values are descriptive and unadjusted.
Wilson 95% confidence intervals (CIs) were calculated for capture proportions and literal report-term proportions. Sex-stratified comparisons were exploratory; two-sided Fisher’s exact tests were used because only 24 women were included in the same-hospitalization analysis. Sensitivity analyses used same-hospitalization report episodes, any-admission patient-level data, all report rows, a quality-filtered set, an acute-exacerbation subset, and alternative COPD text definitions.
Analyses were performed with Python 3.13 and SciPy 1.17.0.
Results
Cohort and report-capture audit
The export included 19,612 hospitalization records from 5,961 patients. The main diagnosis-text definition identified 6,398 hospitalizations containing COPD wording from 2,981 patients. Among the COPD-coded hospitalizations, 2,604 (40.7%) contained acute-exacerbation wording, 1,151 (18.0%) contained respiratory infection or pneumonia wording, and 467 (7.3%) contained respiratory-failure wording.
The groups overlap, and 3,065 hospitalizations (47.9%) contained none of these three wording groups.
A pulmonary function report row was captured for 322 of the 2,981 patients (10.8%). Conversely, 2,659 patients (89.2%) had no pulmonary function report row in this inpatient export. The 322 captured patients contributed 430 report rows.
For 278 patients, COPD wording and a report were linked to the same hospitalization identifier (9.3% of the full cohort and 86.3% of captured patients), contributing 335 report episodes. The remaining 44 captured patients had report text only in a different hospitalization record and were excluded from the primary text-index analysis (Figure 1).
Selection in report capture
The report capture rate was 11.5% in men and 7.2% in women. It was 11.6% in patients younger than 65 years, 11.8% in those aged 65–79 years, and 8.0% in those aged 80 years or older. The capture rate was also higher among patients with documented smoking history or lung cancer and lower among patients with respiratory-failure wording.
These differences are descriptive and may reflect care setting, referral, data linkage, or documentation practice rather than testing need or quality (Figure 2).
The median age of the cohort was 72 years, and 84.3% of patients were men. Captured patients had more total hospitalizations and more COPD-coded hospitalizations than uncaptured patients. Recorded respiratory infection or pneumonia and respiratory failure were less common in the captured group, whereas lung cancer and interstitial lung disease were more common.
These unadjusted comparisons show that the captured subset was not a simple random sample of the full diagnosis-text cohort (Table 3).
Literal report-text index
The 561 report rows in the full export contained 216 unique normalized ItemResult strings. Reviewing unique strings rather than every row would reduce template-level review units by 345, or 61.5%. Every unique string produced at least one prespecified abnormal term, normal statement, or quality flag.
This is a dictionary-reach audit and not an accuracy estimate. Figure 3 summarizes how report-capture auditing informs cohort design, text indexing, and validation requirements.
The primary same-hospitalization analysis included 278 patients. Literal ventilatory-impairment wording was present in 153 patients (55.0%, 95% CI 49.2–60.8), mixed ventilatory-impairment wording in 139 (50.0%, 44.2–55.8), reduced inspiratory and/or expiratory muscle-strength wording in 134 (48.2%, 42.4–54.1), increased respiratory-central-drive wording in 129 (46.4%, 40.6–52.3), and small-airway-abnormality wording in 124 (44.6%, 38.9–50.5). Explicit obstructive wording was present in 88 patients (31.7%, 26.5–37.3), diffusing-impairment wording in 85 (30.6%, 25.5–36.2), and obstruction-predominant wording in 78 (28.1%, 23.1–33.6).
These percentages describe the literal text in captured reports and must not be interpreted as the prevalence of physiologic abnormalities (Table 4 and Figure 4).
The same-hospitalization subset included 250 men, 24 women, and four patients with unknown sex. Because the female subgroup was small, the sex-stratified estimates had wide confidence intervals and were considered exploratory. These data do not support conclusions about sex differences in pulmonary physiology or report wording (Table 4).
Sensitivity analyses
The main report-term pattern was similar when the unit was a same-hospitalization report episode (N = 335), when any captured report from an EHR-recorded COPD patient was used at the patient level (N = 322), and when all report rows were analyzed (N = 430). Alternative diagnosis-text definitions changed the same-hospitalization denominator from 274 to 286 patients but did not materially change the report-term frequencies.
In the acute-exacerbation same-hospitalization subset (N = 93), explicit obstructive wording was present in 24.7%, small-airway-abnormality wording in 40.9%, diffusing-impairment wording in 31.2%, reduced respiratory-muscle-strength wording in 55.9%, and increased respiratory-central-drive wording in 52.7%. The quality-filtered set was smaller, and percentage changes partly reflected its selected denominator (Table 5).
Discussion
This study evaluated data provenance rather than pulmonary function test utilization. A report row was captured for 10.8% of patients with EHR-recorded COPD, while the remaining 89.2% cannot be classified as never tested because outpatient, external, or laboratory-system reports may be missing. The estimate therefore describes this analytic export and should not be used to judge test ordering, completion during exacerbations, or care quality.
The audit shows the consequence for study design. Requiring a captured report would exclude almost nine of every 10 patients and select a subgroup that differed from the uncaptured cohort. Researchers should therefore link outpatient or laboratory data, limit inference to the captured subset, or avoid report text as a full-cohort physiologic criterion.
Data-quality teams can use the same workflow to locate linkage gaps and underrepresented groups.
We cannot determine whether the 10.8% capture rate is unique to Huashan Hospital. Published proportions vary widely, but their definitions are different. Wang et al. measured completed spirometry among patients with a COPD diagnosis and no prior test and reported 13.2% before and 19.3% after an EHR intervention (7).
Vila et al. found spirometry data for 54% of patients with recorded COPD in a linked primary-care registry (8). Our denominator, setting, time window, and outcome were different: we measured report rows captured in an inpatient export. The comparison supports the general point that data architecture and linkage strongly affect the usable proportion; it does not rank hospitals.
No universal capture threshold makes report data suitable for cohort refinement. At 50% capture, the linked sample and statistical power would increase, but half of the cohort would still be missing and selection could remain. Researchers should report the denominator, compare captured and uncaptured patients, assess missingness, and validate content.
Coverage and accuracy are separate properties.
The rule index addresses only the captured text. It maps literal phrases and reduces 561 report rows to 216 unique strings, creating an auditable sampling frame. It does not establish whether a report conclusion is clinically correct or whether a negative rule result means normal physiology.
Therefore, Tables 4, 5 describe text frequency and not clinical prevalence or diagnostic performance.
The exact local pulmonary function criteria remain an important limitation. Published Chinese and ERS/ATS frameworks show which measurements and reference systems are normally needed, but they cannot substitute for the historical Huashan Hospital SOP. The export lacked the SOP version, reference equations, instrument settings, numeric values, and reader metadata.
Therefore, we removed severity distributions and did not recalculate obstruction, restriction, diffusion loss, muscle weakness, or central drive from thresholds. If the historical rules become available, they should be documented and linked to numeric reports before clinical use.
The strengths of this study include a clear definition of report capture, separation of patient-, hospitalization-, and report-level units, a complete phrase dictionary, a same-hospitalization primary subset, and sensitivity analyses across cohort definitions. Limitations include the diagnosis-text cohort, absence of ICD codes and timestamps, the small female subgroup, lack of a clinician-annotated reference standard, missing numeric values and verified local laboratory rules, single-center design, and no outcome analysis. The exploratory heart-rate and respiratory-rate column check was not verified against the source system, and those variables were not used.
These limitations restrict generalizability and preclude conclusions about timing, sex differences, diagnosis, prognosis, or care quality.
Formal validation should use a stratified sample of common and uncommon templates, quality-flagged reports, and reports from different periods or readers. Two independent pulmonary-function reviewers should label the target terms and resolve disagreements. Numeric spirometry, lung volumes, DLCO, respiratory pressures, the relevant drive measure, reference equations, and the local SOP should then be linked.
Accuracy measures and clinical uses should be considered only after this work.
Conclusion
In this inpatient export, pulmonary function report rows were captured for 10.8% of patients with EHR-recorded COPD. The audit quantifies denominator loss and selection and shows that full-cohort physiologic refinement requires additional outpatient or laboratory data linkage. The rule-based index is a reviewable map of captured text and not a clinically validated classifier.