Currently accepted at: JMIR Medical Informatics
Date Submitted: Apr 17, 2026
Date Accepted: Aug 19, 2026
Date Submitted to PubMed: Sep 21, 2026
This paper has been accepted and is currently in production.
It will appear shortly on 10.2196/97411
The final accepted version (not copyedited yet) is in this tab.
An "ahead-of-print" version has been submitted to Pubmed, see PMID: 42767620
Development of a Framework for Deidentified Japanese Electronic Health Record Narratives Using BERT: Balancing Privacy Protection and Reproducible Entity Extraction in Real-World Data
ABSTRACT
Background:
Pharmacoepidemiologic studies using real-world data often lack clinical context, much of which is embedded in free-text electronic health records (EHRs). However, sharing EHR narratives is restricted by privacy requirements, and conventional deidentification approaches may reduce analytic utility and limit auditability.
Objective:
To develop and evaluate a framework that (1) extracts structured cancer-related entities from Japanese EHR free text using BERT (Bidirectional Encoder Representations from Transformers)-based natural language processing (NLP) and (2) generates deidentified analytic text that preserves contextual information to support post-hoc auditing under privacy constraints.
Methods:
We conducted a retrospective observational study using the DATuM IDEA database, which integrates unstructured EHR narratives with structured records (claims, prescriptions, and procedure/surgery records) from two hospitals in Japan from January 1, 2019, through June 30, 2025. Deterministic linkage was performed within ICI (Integrated Clinical Care Informatics, Inc.) prior to deidentification. We quantified deidentification using masking and restoration rates and evaluated extraction success rates for TNM elements, internal logical consistency (M1 vs. Stage IV), and proxy-based external concordance using structured-data treatment proxies (ATC code L for systemic anticancer therapy and procedure-name keyword searches for cancer-directed interventions). A stratified manual audit of 100 narratives was conducted to assess entity retention (sanity check) and residual protected health information (PHI).
Results:
Among 51,876 patients with recorded diagnoses, 10,214 had neoplasms (ICD-10 C00–D48), and deidentified analytic text was available for 4,383 patients. The linkage yield was 99.2% (4,346/4,383). Median masking rates ranged from 9.9% to 15.0% across major cancer categories. TNM extraction success rates were 0.807 (T), 0.798 (N), and 0.805 (M). Concordance between extracted M1 and Stage IV was 0.853. Proxy-based validation showed a positive predictive value (PPV) of 0.700 for Stage IV (systemic therapy proxy) and a PPV of 0.031 for early-stage classification (procedure proxy). Manual audit demonstrated complete capture of TNM/stage information after normalization in generated texts and no residual PHI in the audited sample.
Conclusions:
This framework enables the generation of deidentified Japanese EHR narratives that preserve contextual structure for auditing while supporting structured entity extraction, thereby addressing the trade-off between privacy protection and reproducibility in real-world data research.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.