国际学术期刊
出版地 · 香港 English
TCM Discovery 检索
本期目录/第 1 卷 · 第 1 期
原创研究

Effect of Mapping Historical and Modern Terms for Epigastric Pain on Retrieval of Traditional Chinese Medicine Records

Dongfei LinTCM Discovery · 页码 170–178
文内目录
Abstract Introduction Retrieval experiment Results Which expressions carried the gain Uncertainty and sensitivity analyses What the discordant records contained Discussion Research declarations References Appendix A

Abstract

Objective. To determine how much historical and modern terminology adds to a literal search for epigastric pain (胃脘痛, wèi wǎn tòng), and how many additional records must be screened to recover a case bearing a corresponding heading or diagnosis.

Methods. Six nested Boolean queries were applied separately to 5,461 distinct Chinese case narratives from 75 source works and 21,649 outpatient visits. Case headings and linked diagnoses were reserved as proxy reference labels. The main comparison added direct aliases, pain modifiers and localized anatomical expressions to the literal query. Paired confidence intervals (CIs) used 5,000 bootstrap resamples of source works or patients. A secondary language-model review examined 96 short passages from label-discordant hits.

Results. In the anthology, localized mapping recovered 56 of 67 marked cases, compared with 11 for the literal query. Recall rose from 16.4% to 83.6% (difference 67.2 percentage points, 95% CI 46.6 to 85.4), while label precision fell from 57.9% to 40.6%. In outpatient notes, recall rose from 0/40 to 11/40 (27.5 points, 95% CI 10.7 to 44.9). Extending the localized query to upper-abdominal and broad heart or abdominal pain expressions added 483 anthology hits and 169 visits, yielding only one and two additional marked records, respectively. Among 48 sampled unmarked hits from the localized query, 43 passages explicitly described gastric or epigastric pain.

Conclusions. Direct aliases accounted for most of the gain in the anthology. In this rheumatology outpatient archive, 29 diagnosis-marked visits still escaped localized search, and none contained both a pain character and a tested site cue. Archive retrieval therefore benefits from field-specific term expansion and a distinct route to records identified by diagnosis. Clinical symptom-level accuracy requires independent adjudication.

Keywords. Traditional Chinese medicine · Epigastric pain · Information retrieval · Query expansion · Medical case histories · Electronic health records

Introduction

A historian looking for 胃脘痛 may read a case headed “gastric pain” whose narrative says only 脘痛. In an outpatient archive the converse is possible. The visit may carry a gastric-pain diagnosis even when the current complaint concerns a different symptom. A search can therefore fail at two distinct points. The writer may have used another expression, or the selected field may contain no corresponding assertion.

Chinese medical case histories (yi’an) have served as teaching collections, accounts of individual practice and edited narratives.1 Standardized terminology supplies a common vocabulary for contemporary communication,2 but the vocabulary of a modern index cannot establish the meaning of every historical occurrence. Work on gastric pain in classical acupuncture texts documents expressions involving 心下 and 心痛 alongside 胃脘痛.3 The anatomical specificity of each expression matters. A search that treats every occurrence of 心痛 as gastric pain risks admitting a distinct complaint.

Clinical information retrieval studies have shown that synonym expansion and structured query formulation can improve cohort discovery, with substantial variation across topics and collections.4,5 Here the information need was held fixed. The study compared the gain from specific aliases, the contribution of site and pain modifiers, and the workload created by progressively broader expressions.

Materials and methods

The retrospective study used two local sources with different units of analysis. The anthology was the structured workbook 古籍医案_5556 in the Gujin Yian collection. It includes works from several periods. The second source was the outpatient portion of a read-only SQLite archive. All eligible records from each source entered the analysis. A symptom-specific anthology, inpatient records and derived summary tables were excluded from the sampling frames. Figure 1 shows the construction of the two cohorts.

Figure 1. Cohort assembly

Figure 1. Cohort assembly. Book records were deduplicated by normalized narrative. Visits were assembled before filtering on narrative and diagnosis availability. The 428 excluded visits had usable text but lacked a linked nonempty diagnosis.

Retrieval experiment

Indexed text and reference labels

For each unique anthology narrative, the first workbook row supplied the source, heading and complaint field. Duplicate narratives had no conflicting binary heading labels. A heading containing 胃痛 or 脘痛 was positive, including 胃脘痛 by substring. In the outpatient archive, exact agreement on registration number, encounter number and the stored mapping key linked notes to diagnoses. Unique complaint and present-illness strings within a visit were combined with a punctuation boundary. Any linked diagnosis equal to 胃痛, 胃痛病, 胃脘痛 or 胃脘痛病 marked the visit. All 21,649 eligible visits had a single linked encounter date, from 1 July 2024 through 3 January 2025.

Neither heading nor diagnosis was indexed. The reference represents an explicitly labeled case topic in one source and an explicitly recorded diagnosis in the other. A negative label can coexist with a genuine symptom mention. A literal full heading appeared in none of the normalized anthology narratives. Reporting of the source, linkage and record selection follows principles for routinely collected data.6

Table 1. Nested query definitions and their intended interpretation

Query

Terms added at this stage

Interpretation

S0 · Literal

胃脘痛

Canonical written label

S1 · Aliases

胃痛, 胃疼, 脘痛, 脘疼

Direct lexical variants

S2 · Modifiers

Gastric site + up to three modifiers + 痛 or 疼

Quality or pattern of pain

S3 · Localized

心下, 心窝, 剑突下, 中上腹, 上腹正中, 胃脘当心 + modifier/pain rule

Historical and modern site candidates

S4 · Upper abdomen

上腹 + modifier/pain rule

Broader upper-abdominal site

S5 · Broad

心 or 腹 + modifier/pain rule

Deliberately permissive boundary test

Each row inherits all preceding rows. Some expressions match multiple rules. Appendix A specifies the character classes and normalization. No ranking or assertion filtering was applied.

Statistical analysis

The primary contrast was S3 minus S0 on the same records in each corpus. Recall was the share of label-positive records retrieved. Precision was the share of retrieved records bearing a positive label. F1 was their harmonic mean. At each step, new hits and additional label-positive hits measured marginal workload and yield. Precision and recall expose the trade-off in rare-label settings.7 Percentile 95% CIs used 5,000 paired cluster bootstrap resamples with replacement, by work for the anthology and by registration number for visits.8 Metrics were computed from aggregated record counts within each resample. Corpus-specific estimates were retained throughout.

Results

The heading rule marked 67/5,461 narratives (1.23%) from 17 works. The diagnosis rule marked 40/21,649 visits (0.18%) in 20 of 9,835 registered patients. The outpatient registration data identified rheumatology services. Both the specialty mix and repeat attendance affect how frequently a gastric symptom appears in the selected fields.

Table 2. Retrieval against held-out case headings and visit diagnoses

Corpus

Query

Hits

Marked hits

Unmarked hits

Missed labels

Precision %

Recall %

F1

Books

S0

19

11

8

56

57.9

16.4

0.256

Books

S1

107

48

59

19

44.9

71.6

0.552

Books

S2

129

52

77

15

40.3

77.6

0.531

Books

S3

138

56

82

11

40.6

83.6

0.546

Books

S4

143

56

87

11

39.2

83.6

0.533

Books

S5

621

57

564

10

9.2

85.1

0.166

Visits

S0

1

0

1

40

0.0

0.0

0.000

Visits

S1

54

6

48

34

11.1

15.0

0.128

Visits

S2

81

11

70

29

13.6

27.5

0.182

Visits

S3

81

11

70

29

13.6

27.5

0.182

Visits

S4

85

11

74

29

12.9

27.5

0.176

Visits

S5

250

13

237

27

5.2

32.5

0.090

Rows are cumulative. Marked hits + missed labels = 67 for books and 40 for visits. Unmarked hits include clinically plausible symptom mentions. Each corpus used the same eligible denominator at all six settings.

Figure 2. Discrete precision–recall operating points

Figure 2. Discrete precision–recall operating points. Lines connect nested Boolean queries in order. Axes have different ranges in the two panels. In visits, S2 and S3 returned identical sets. S0 retrieved one unmarked visit, making its precision estimate especially unstable.

The largest anthology gain came from four short aliases. S1 recovered 37 additional marked cases over S0. S2 and S3 contributed another four each. In visits, S1 recovered six diagnoses and S2 recovered five more. None of the additional S3 site expressions matched a visit. The highest observed F1 occurred at S1 in the anthology (0.552) and at S2/S3 in visits (0.182).

Which expressions carried the gain

The independent clause counts in Figure 3 separate the vocabulary present in each corpus from the order in which the query added it. The direct alias clause also matches the tail of the literal phrase. Its 48 marked anthology records therefore include all 11 S0 marked records. The same nesting applies to the modifier clause, which permits zero intervening characters.

Figure 3. Independent clause matches by reference status

Figure 3. Independent clause matches by reference status. Each cell gives the number and percentage of records in its column. Positive and negative symbols refer to held-out labels. Shading follows the square root of the percentage to make rare matches visible. Rows overlap and must not be added.

Historical site expressions supplied information that a modernized index would lose. The 心下 pattern matched five narratives, one marked. The 胃脘当心 pattern matched eight, five marked. Combined, the localized clause matched 13 narratives. Nine were new at S3, of which four carried a positive heading. The same six site anchors yielded zero outpatient matches at this short window length.

Figure 4. Incremental label yield and screening volume

Figure 4. Incremental label yield and screening volume. Each pair gives newly recovered labels / newly retrieved records relative to the preceding query. Circle area is proportional to new records. S0 is measured from an empty result set.

Going from S1 to S3 added 31 anthology records for eight more marked cases, or 3.9 reads per added label. Beyond S3, the corresponding cost was 483 reads for one additional label. In visits the same two expansions cost 27/5 (5.4) and 169/2 (84.5) reads per added label. These ratios price the work of recovering a heading or diagnosis. Their interpretation changes when any verified symptom mention is the review target.

Uncertainty and sensitivity analyses

Figure 5. Paired effects of S3 relative to S0

Figure 5. Paired effects of S3 relative to S0. Dots are observed differences. Lines show 95% percentile intervals from resampling works or patients. F1 is multiplied by 100. Outpatient S0 had no hits in 1,846/5,000 replicates, so its precision-difference interval is omitted. The other five intervals use all replicates.

The anthology recall gain was 67.2 points, with a 95% interval from 46.6 to 85.4 points when whole works were resampled. The precision change was −17.3 points (95% CI −37.1 to 9.0). The outpatient recall gain was 27.5 points, supported by 11 additional matches. Precision in that corpus is particularly sensitive to the choice of literal comparator. A standalone search for 胃痛 retrieved six marked visits among 44 hits (13.6%), essentially the same label precision as S3 (11/81, 13.6%).

Table 3. Alternative comparators, record restrictions and reference definitions

Analysis

Corpus

Label-positive / eligible

Marked / retrieved

Recall %

Single term 胃痛

Books

67 / 5,461

20 / 47

29.9

Single term 胃痛

Visits

40 / 21,649

6 / 44

15.0

Two historical works, S0 → S3

Books

17 / 1,595

0 / 2 → 16 / 48

0.0 → 94.1

Narrower heading rule, S0 → S3

Books

50 / 5,461

9 / 19 → 42 / 138

18.0 → 84.0

Complaint → narrative, S3

Books

66 / 5,372

51 / 102 → 55 / 136

77.3 → 83.3

Complaint → combined fields, S3

Visits

38 / 21,644

6 / 20 → 11 / 81

15.8 → 28.9

The narrower heading rule requires 胃痛 or 胃脘痛. Field comparisons use the same records with a nonempty complaint. In books the complaint is a separate structured field. In visits it is a component of the combined narrative.

The historical subset comprised 1,135 narratives attributed to Linzheng Zhinan Yi’an and 460 to Mingyi Leian. All 17 marked headings came from the former work, and direct aliases alone recovered 16. The subset supports a within-work effect. It provides little basis for estimating between-dynasty differences.

What the discordant records contained

A stratified reading examined reference-negative hits from S0–S3 and additional hits first entering at S4–S5. Within each corpus and band, 24 records were sampled without replacement. One language model classified the shuffled short passages with source and tier metadata withheld, using the five categories in Figure 6. A fragment describing past or improving gastric pain counted as stated pain. Appendix A gives the sampling and extraction details.

Figure 6. Interpretation of 96 matched passages without the target heading or diagnosis

Figure 6. Interpretation of 96 matched passages without the target heading or diagnosis. Each bar represents 24 sampled records. Counts describe the selected passage. They do not establish patient-level relevance, independent clinical adjudication or revised corpus-wide precision.

Explicit gastric pain appeared in 20/24 anthology and 23/24 outpatient fragments in the localized band. It appeared in 0/24 fragments in each broad-only band. Broad-only outpatient hits included six clear denials and two upper-abdominal references with insufficient midline specificity. Two localized anthology passages used a generic heading or commentary. These distinctions explain how a term can be lexically correct while an attribution to a particular patient remains uncertain.

Figure 7. Intersection of pain and site cues in all S3-missed label-positive records (11 books, 29 visits)

Figure 7. Intersection of pain and site cues in all S3-missed label-positive records (11 books, 29 visits). Filled dots identify cues present anywhere in the indexed record. Site cues were 胃, 脘, 心下, 心窝, 剑突下 or 上腹. Pain cues were 痛 or 疼. Co-occurrence does not imply a grammatical or clinical relationship.

Ten of the 11 missed anthology narratives contained both a pain cue and a site cue somewhere in the text. None of the 29 missed outpatient visits did. Seven visits contained only a pain cue, ten only a site cue and twelve neither. Increasing the allowed distance between the tested cues could recover candidates from the books, but could not by itself recover any of these 29 visits.

Discussion

The retrieval objective determines the preferred query

For an editor compiling cases explicitly indexed as gastric pain, direct aliases were an efficient first pass. They captured 48 of 67 marked anthology cases, compared with 11 for 胃脘痛 alone. Moving from S1 to S3 raised recall by another 11.9 points and slightly reduced F1. An editor aiming to document historical locutions might accept that cost, since a passage containing 胃脘当心痛 preserves a lexical relationship that a direct search for the modern headword cannot show. The system should display the matched phrase and its source work so that the editor can judge this relationship in context.

For a researcher seeking any account of the symptom, the heading is an incomplete reference. Most sampled unmarked S3 passages described gastric pain explicitly. Reclassifying all unmarked hits as errors would conceal this feature of the collection. Conversely, counting every broad hit as a symptom would admit many passages about a different abdominal location or a cardiac complaint. A review interface could offer localized matches first and expose broad matches as a separately selectable set. The incremental workload in Figure 4 lets a reviewer choose a stopping point for the intended task.

A separate route to outpatient diagnoses

The outpatient result places a concrete limit on lexical expansion. None of the 29 localized-query misses contained both classes of cue, and 12 contained neither. For a study of diagnosis-marked encounters, a system could retrieve linked diagnoses in a separate search and identify the visits supported by narrative evidence. For a study of symptom documentation, a diagnosis alone cannot supply the missing assertion. Keeping these routes visible would allow follow-up visits with a carried diagnosis to be distinguished from notes that explicitly describe pain. Whether a diagnosis was carried forward here requires full-chart review.

Limits of inference

These queries were evaluated retrospectively on one topic. The anthology mixes historical and modern works, and editorial practice can create dependence between a heading and the accompanying text. The check for identical full headings addresses only verbatim duplication. The outpatient corpus is specialty-specific and repeated text was common. The 21,649 visits yielded 14,593 distinct combined narratives. Resampling by patient accounts for repeat visits within registrations but cannot remove shared templates or selection bias. The 40 marked visits came from only 20 patients.

The fragment review was model-assisted, was restricted to selected hits and had no independent clinician or philologist assessment. Wording itself can reveal the source or likely rule. The character rules also miss indirect pain expressions, variant graphs and distant dependencies. Denials, temporal scope and experiencer were left intact. Scope-sensitive negation methods motivate a separate assertion layer,9 which would need evaluation in both classical prose and modern notes. A next validation study should sample unmatched records as well as hits, blind two readers to search method and labels, and adjudicate symptom presence separately from the indexed case topic.

Conclusion

Historical and modern term mapping materially improved recovery of labeled cases, with most anthology gains available from direct aliases. Broader heart and abdominal wording added substantially more screening than labeled yield. In the outpatient archive, the remaining gap depended on which clinical fields contained evidence. Retrieval systems should preserve the original phrase, its field and its relation to the target label.

Research declarations

Ethics and data access. This secondary analysis used a local case anthology and an outpatient archive. Only aggregate results are reported. A formal ethics approval or waiver for secondary use of the outpatient records has not been documented.

Data and methods availability. The source databases are held locally. The record-level outpatient archive is not distributed with this article. Table 2 gives the counts required to reconstruct every operating point. Appendix A provides the executable matching specification and record definitions.

Use of artificial intelligence. OpenAI Codex assisted with analysis code, figures and manuscript preparation. A single language model provided the exploratory passage classifications reported in Figure 6.

References

1. Holroyde-Downing N. Case records Yi’an 醫案. In: Routledge Handbook of Chinese Medicine. Routledge; 2022. p. 181–188. doi:10.4324/9780203740262-14

2. World Health Organization. WHO international standard terminologies on traditional Chinese medicine. Geneva: World Health Organization; 2022. ISBN 978-92-4-004232-2. Publisher record

3. Muangchai P, Xu L, Sun Y. Study of ancient Chinese medical works on acupuncture-moxibustion therapy for gastric pain. Tianjin J Tradit Chin Med. 2016;33(4):248–252. doi:10.11656/j.issn.1672-1519.2016.04.16

4. Zhu D, Wu ST, Carterette B, Liu H. Using large clinical corpora for query expansion in text-based cohort identification. J Biomed Inform. 2014;49:275–281. doi:10.1016/j.jbi.2014.03.010

5. Chamberlin SR, Bedrick SD, Cohen AM, Wang Y, Wen A, Liu S, et al. Evaluation of patient-level retrieval from electronic health record data for a cohort discovery task. JAMIA Open. 2020;3(3):395–404. doi:10.1093/jamiaopen/ooaa026

6. Benchimol EI, Smeeth L, Guttmann A, Harron K, Moher D, Petersen I, et al. The REporting of studies Conducted using Observational Routinely-collected health Data (RECORD) statement. PLoS Med. 2015;12(10):e1001885. doi:10.1371/journal.pmed.1001885

7. Saito T, Rehmsmeier M. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS One. 2015;10(3):e0118432. doi:10.1371/journal.pone.0118432

8. Rutter CM. Bootstrap estimation of diagnostic accuracy with patient-clustered data. Acad Radiol. 2000;7(6):413–419. doi:10.1016/S1076-6332(00)80381-5

9. Chapman WW, Bridewell W, Hanbury P, Cooper GF, Buchanan BG. A simple algorithm for identifying negated findings and diseases in discharge summaries. J Biomed Inform. 2001;34(5):301–310. doi:10.1006/jbin.2001.1029

Appendix A

Reproducible search specification

Use Python regular expressions. A record is retrieved once if any clause through the selected stage matches. Substitute the following character class for M, retaining the repetition limit.

[部区处中隐胀刺灼绞剧钝冷热闷阵时作而疼急切微痉挛抽牵]{0,3}

Table A1. Exact clauses applied to normalized Chinese text

Stage

Regular expression or substitution template

S0

胃脘痛

S1

胃痛|胃疼|脘痛|脘疼

S2

(?:胃脘|胃部|胃区|胃|脘)M[痛疼]

S3

(?:心下|心窝|剑突下|中上腹|上腹正中|胃脘当心)M[痛疼]

S4

上腹M[痛疼]

S5

(?:心|腹)M[痛疼]

Apply Unicode NFKC, strip whitespace, then translate 脹隱絞劇陣灼劍窩當區, character by character, to 胀隐绞剧阵灼剑窝当区. No general conversion between traditional and simplified script was applied. Expressions operate as substrings. For example, the broad clause can match part of 小腹痛 or 心绞痛, and S4 can match part of a laterally qualified upper-abdominal expression. These intentionally permissive rules quantify the burden of a broad search.

Source and linkage details

Read Sheet1 of 古籍医案_5556.xlsx (SHA-256 prefix 836c3c2ad81437ef). Deduplicate on normalized 正文 in row order. Use 标题 as label, 出处 as cluster and 主诉 for the complaint analysis. In cases.sqlite3, join menzhenmenzhenbingli to menzhenzhenduan on (regno, admno, maping). All note rows had complete keys. Unique triples, registration/encounter pairs and mapping values each numbered 22,119.

For each visit, deduplicate nonempty opmr_complain and opmr_presentillness strings within field. Join sorted values with 。 and separate fields with 。. Use da_diag_name for diagnosis and menzhenjiuzhenxinxi for encounter date, with the same linkage key.

Bootstrap and passage audit

Each bootstrap replicate sampled the original number of clusters (NumPy seed 20261202). The audit used Python random seed 9713, book rows in workbook order and visits in first-note rowid order. Sample localized then broad-only hits in each corpus and shuffle the pooled sample. Take the leftmost match of the earliest matching clause and up to 12 characters on each side. Truncate at 。;;!? or newline. Mask Latin letters and digits. Code explicit denial before anatomical site. Assign generic statements and ambiguous assertion scope to the unclear category.