Much of the patient data recorded in electronic health records is stored as unstructured free text. Extracting medication information from such data is essential, particularly for antidiabetic drugs such as sodium–glucose cotransporter-2 (SGLT2) inhibitors, but remains challenging due to spelling variability, abbreviations, and non-standard documentation practices. This study compared four text-mining approaches, simple keyword search, regular expression–based matching, fuzzy string matching, and a transformer-based token classification baseline, for detecting SGLT2 inhibitor mentions in Hungarian clinical narratives. Clinical documents were obtained from the University of Debrecen Clinical Centre and covered patients with type 2 diabetes mellitus (ICD-10: E11) from 2018 and 2019. Searches targeted both generic and brand names and SGLT-related abbreviations. In the 2019 dataset (n = 5383), simple keyword search identified 1.49% of documents as containing an SGLT2 inhibitor mention, compared with 7.21% using regular expressions, 8.55% using fuzzy matching, and 0.71% using the transformer-based baseline. Mean execution times were 0.07 s, 1.64 s, 5.13 s, and 34.71 s, respectively. Method performance was further evaluated against a manually annotated reference set from 2018 using confusion matrices and standard classification metrics. Fuzzy string matching achieved the highest recall and F1-score, while regular expression-based matching provided a strong balance between precision and recall. The transformer-based baseline showed high precision but substantially lower recall in the absence of domain-specific fine-tuning. Overall, similarity-based fuzzy matching offered the most favorable balance between detection performance and computational efficiency for identifying SGLT2 inhibitor mentions in unstructured Hungarian clinical text.
Attila Csaba Nagy (Sun,) studied this question.