Related Experiment Video
Updated: Apr 30, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Development and Validation of an EHR-based Algorithm for Identifying Pneumocystis jirovecii Pneumonia
Y U Kitamura1, Masami Tsuchiya2, Hirotoshi Iihara3,4,5
1Department of Respirology, Graduate School of Medicine, Gifu University, Gifu, Japan.
Background/Aim:
Pneumocystis jirovecii pneumonia (PCP) remains a life-threatening opportunistic infection in patients receiving chemotherapy and other immunosuppressive cancer treatments. Accurate identification of true PCP cases within real-world electronic health record (EHR) databases is essential for epidemiological research and optimization of prophylactic strategies in oncology practice. The aim of this study was to develop and validate a practical, EHR-based algorithm for reliably identifying PCP cases.
Patients And Methods:
This retrospective, single-center validation study used EHR data from a Japanese university hospital between April 2022 and March 2024. Adult patients (≧20 years) who were assigned an ICD-10 code for PCP were extracted, and true cases were confirmed by a detailed review of the patient records. Seven candidate algorithms combining diagnostic codes, therapeutic-dose anti-PCP prescriptions, laboratory testing, chemotherapy exposure, and prescription duration were evaluated. The positive predictive value (PPV) and capture rate were then calculated using chart-confirmed PCP as the reference standard.
Results:
Among 617 ICD-coded patients, 11 (1.8%) were confirmed as true PCP cases. The PPV of diagnostic codes alone was 1.8%. A prescription-enhanced algorithm (A1) identified 12 patients, including 11 true cases (PPV=91.7%; capture rate 100%). Algorithms incorporating β-D-glucan or PCR testing achieved PPVs of 100% with lower capture rates (63.6-81.8%). Incorporation of concurrent chemotherapy also resulted in a PPV of 100% with reduced capture. An algorithm requiring therapeutic-dose prescription for ≥21 days showed equivalent performance to A1.
Conclusion:
Prescription-based algorithms substantially improve the accuracy of PCP case identification in EHR data compared with diagnostic codes alone. This straightforward, scalable approach offers a robust framework for real-world oncology research, enabling a more reliable evaluation of PCP incidence and informing future prophylaxis strategies for patients receiving anticancer treatment.
Related Concept Videos
Pneumonia III: Complications and Assessment
Pneumonia I: Introduction
Pneumonia I: Introduction
Risk Factors
Various factors influence the likelihood of developing pneumonia. Age plays a crucial role, with infants, children under two, and individuals over 65 at increased risk due to their...
Pulmonary Embolism II: Diagnostic Studies and Interprofessional Care
Pneumonia II: Pathophysiology
Pneumonia V: Nursing management and Prevention
The nurse must practice strict medical asepsis and adhere to infection control guidelines to minimize healthcare-associated infections.
Enhance airway patency
Position the patient correctly to facilitate drainage of the affected lung segments. Manual or mechanical percussion and vibration can also be employed....
