Extracting structured genotype information from free-text HLA reports using a rule-based approach

Kye Hwa Lee, Hyo Jung Kim, Yi Jun Kim, Ju Han Kim, Eun Young Song

Research output: Contribution to journalArticlepeer-review

5 Scopus citations


Background: Human leukocyte antigen (HLA) typing is important for transplant patients to prevent a severe mismatch reaction, and the result can also support the diagnosis of various disease or prediction of drug side effects. However, such secondary applications of HLA typing results are limited because they are typically provided in free-text format or PDFs on electronic medical records. We here propose a method to convert HLA genotype information stored in an unstructured format into a reusable structured format by extracting serotype/allele information. Methods: We queried HLA typing reports from the clinical data warehouse of Seoul National University Hospital (SUPPREME) from 2000 to 2018 as a rule-development data set (64,024 reports) and from the most recent year (6,181 reports) as a test set. We used a rule-based natural language approach using a Python regex function to extract the 1) number of patients in the report, 2) clinical characteristics such as indication of the HLA testing, and 3) precise HLA genotypes. The performance of the rules and codes was evaluated by comparison between the extracted results from the test set and a validation set generated by manual curation. Results: Among 11,287 reports for development set and 1,107 for the test set describing HLA typing for a single patient, iterative rule generation developed 124 extracting rules and 8 cleaning rules for HLA genotypes. Application of these rules extracted HLA genotypes with 0.892-0.999 precision and 0.795-0.998 recall for the five HLA genes. The precision and recall of the extracting rules for the number of patients in a report were 0.997 and 0.994 and those for the clinical variable extraction were 0.997 and 0.992, respectively. All extracted HLA alleles and serotypes were transformed according to formal HLA nomenclature by the cleaning rules. Conclusion: The rule-based HLA genotype extraction method shows reliable accuracy. We believe that there are significant number of patients who takes profit when this under-used genetic information will be return to them.

Original languageEnglish
Article numberE78
JournalJournal of Korean Medical Science
Issue number12
StatePublished - 30 Mar 2020

Bibliographical note

Publisher Copyright:
© 2020 The Korean Academy of Medical Sciences.


  • Data sets as topic
  • Electronic medical record
  • Genetic testing
  • HLA test
  • Major histocompatibility complex


Dive into the research topics of 'Extracting structured genotype information from free-text HLA reports using a rule-based approach'. Together they form a unique fingerprint.

Cite this