TY - GEN
T1 - A Large Language Model-based System for Automatic Medical NLP Code Generation
AU - Xu, Jiming
AU - Li, Simin
AU - Kang, Bo
AU - Yan, Jun
PY - 2026
Y1 - 2026
N2 - In clinical research, patient recruitment requires a large amount of chart review, and the interpreted data must be converted into a common format (such as FHIR) to support circulation across multi-ple systems. This paper builds a system that covers the entire pipeline from “eligibility-criteria parsing to schema generation to NLP code and Bundle construction to automatic validation”. The method: (1) uses an intermediate schema to decouple information extraction from FHIR-structured data generation into two steps, reducing generation difficulty; (2) automatically samples representative case snippets to assist code generation and improve accuracy; (3) enforces at least two distinct code-generation strategies to improve the recall of information extraction; and (4) uses the Claude agent SDK to generate high-quality code and auto-matically complete testing. The overall system can effectively accomplish the information extraction and FHIR-format data storage required for patient recruitment, thereby supporting inclusion/exclusion screening. The proposed pipeline achieved first place in “CHIP2025 Task 3: Medi-cal NLP Code Generation Evaluation”[1], demonstrating its engineering and deployment value in medical scenarios. © The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2026.
AB - In clinical research, patient recruitment requires a large amount of chart review, and the interpreted data must be converted into a common format (such as FHIR) to support circulation across multi-ple systems. This paper builds a system that covers the entire pipeline from “eligibility-criteria parsing to schema generation to NLP code and Bundle construction to automatic validation”. The method: (1) uses an intermediate schema to decouple information extraction from FHIR-structured data generation into two steps, reducing generation difficulty; (2) automatically samples representative case snippets to assist code generation and improve accuracy; (3) enforces at least two distinct code-generation strategies to improve the recall of information extraction; and (4) uses the Claude agent SDK to generate high-quality code and auto-matically complete testing. The overall system can effectively accomplish the information extraction and FHIR-format data storage required for patient recruitment, thereby supporting inclusion/exclusion screening. The proposed pipeline achieved first place in “CHIP2025 Task 3: Medi-cal NLP Code Generation Evaluation”[1], demonstrating its engineering and deployment value in medical scenarios. © The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2026.
KW - CHIP2025
KW - Clinical natural language processing
KW - FHIR
KW - Large language models
UR - https://www.scopus.com/pages/publications/105041217934
UR - https://www.scopus.com/pages/publications/105041217934#tab=impact
U2 - 10.1007/978-981-95-7299-1_35
DO - 10.1007/978-981-95-7299-1_35
M3 - RGC 32 - Refereed conference paper (with host publication)
SN - 9789819572984
T3 - Communications in Computer and Information Science
SP - 559
EP - 569
BT - Health Information Processing
A2 - Zhang, Yanchun
A2 - Chen, Qingcai
A2 - Lin, Hongfei
PB - Springer
CY - Singapore
T2 - 11th China Health Information Processing Conference (CHIP 2025)
Y2 - 22 November 2025 through 24 November 2025
ER -