Machine Learning Application: Congenital Syphilis Classifier

Authors

DOI:

https://doi.org/10.59096/osir.v19i1.279422

Keywords:

artificial intelligence, congenital syphilis, surveillance, Thailand, Large Language Models, optical character recognition

Abstract

Objectives: Congenital syphilis (CS) is resurging in Thailand, which is challenging the nation's elimination status. Current surveillance relies on manual expert review of paper-based case investigation forms (CIFs), resulting in significant backlogs which hinder timely public health intervention. This study aimed to develop and evaluate an automated system using Large Language Models (LLMs) to digitize and classify CS cases.

Methods: We conducted a retrospective diagnostic study using 143 validated CIFs from Eastern Thailand during October 2024 to October 2025. The system utilized Google Gemini 2.5 Pro and Flash models for optical character recognition (OCR) and a rule-based algorithm for case classification. Cost was estimated by Google Gemini application programming interface (API) pricing. Performance was benchmarked against an expert committee's consensus.

Results: The system efficiently reduced processing time from months to under five minutes at a cost of approximately $0.006 per case. It achieved a data extraction accuracy of 94.2% with a Character Error Rate (CER) of 4.32% for complex handwriting. The overall classification accuracy was 80.0%, with sensitivity 83.3% and specificity of 75.0%. Automated "Red Flags" detection identified inadequate maternal treatment (69.7%) and late antenatal care (32.9%) as primary drivers for confirmed and probable cases.

Public Health Recommendations: The LLM and rule-based classifier offer a scalable "Paper-to-Digital Bridge" for resource-limited settings. While human oversight remains necessary for complex cases, the system functions as an effective high-volume triage tool, transforming retrospective surveillance into real-time actionable intelligence to support the elimination of mother-to-child transmission.

References

World Health Organization. Sexually transmitted infections (STIs) [Internet]. Geneva: World Health Organization; 2025 Sep 10 [cited 2025 Dec 5]. <https://www.who.int/news-room/fact-sheets/detail/sexually-transmitted-infections-(stis)>

Luengmettakul J, Apiwantana S, Jitrungruengnij N. Incidence of congenital syphilis and adverse pregnancy outcomes among syphilitic pregnant women according to the treatment adequacy in Tertiary Care Hospital, Thailand. Journal of the Medical Association of Thailand. 2025;108(1):9–16. DOI: https://doi.org/10.35755/jmedassocthai.2025.1.9-16-01174

World Health Organization. Mother-to-child transmission of syphilis [Internet]. Geneva: World Health Organization; [cited 2025 Dec 5]. <https://www.who.int/teams/global-hiv-hepatitis-and-stis-programmes/stis/prevention/mother-to-child-transmission-of-syphilis>

World Health Organization. Elimination of mother-to-child transmission of HIV, syphilis and hepatitis B [Internet]. Geneva: World Health Organization; [cited 2025 Dec 20]. <https://www.who.int/southeastasia/activities/elimination-of-mother-to-child-transmission-of-hiv-syphilis-and-hepatitis-b-virus>

Division of AIDS and STIs, Department of Disease Control (TH). STIs situation for executive [Internet]. Nonthaburi: Department of Disease Control; [cited 2025 Dec 5]. <https://hivhub.ddc.moph.go.th/executive/sti.php>

Division of Epidemiology, Department of Disease Control (TH). Guidelines for surveillance and investigation of congenital syphilis in children under 2 years old[Internet]. Nonthaburi: Department of Disease Control; 2021 Sep 1. 20 p. Thai.

Chen H, Zeng D, Qin Y, Fan Z, Ng Yu Ci F, Klonoff DC, et al. Large language models and global health equity: a roadmap for equitable adoption in LMICs. Lancet Reg Health West Pac. 2025;63:101707. doi:10.1016/j.lanwpc.2025.101707. DOI: https://doi.org/10.1016/j.lanwpc.2025.101707

Wilson EB. Probable inference, the law of succession, and statistical inference. J Am Stat Assoc. 1927;22(158):209–12. doi:10.2307/2276774. DOI: https://doi.org/10.1080/01621459.1927.10502953

Abdoli F. Character error rate (CER): a friendly, no-nonsense guide [Internet]. Cologne (DE): WaterCrawl Blog; 2025 Aug 26 [cited 2026 Jan 24]. <https://watercrawl.dev/blog/Character-Error-Rate>

Google. Gemini Developer API pricing [Internet]. Mountain View (CA): Google LLC; [cited 2025 Dec 21]. <https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro>

Kulsirichawaroj P, Lumbiganon D. Incidence and associated factors of congenital syphilis at a tertiary care center in Thailand. Asian Biomed (Res Rev News). 2023 Feb;17(1):13–21. doi:10.2478/abm-2023-0039. DOI: https://doi.org/10.2478/abm-2023-0039

Kimball A, Torrone E, Miele K, Bachmann L, Thorpe P, Weinstock H, et al. Missed Opportunities for Prevention of Congenital Syphilis — United States, 2018. MMWR Morb Mortal Wkly Rep. 2020 Jun 5;69(22):661–5. doi:10.15585/mmwr.mm6922a1. DOI: https://doi.org/10.15585/mmwr.mm6922a1

Soontornprakasit P, Mongkolchati A, Chompikul J. Factors associated with time to start antenatal care within 12 weeks gestational age among mothers in Mahasarakham province, Thailand. Journal of Public Health and Development. 2016 May;14(1):21–36.

Chayachinda C. Elimination of congenital syphilis in Thailand: what can bedone during antenatal period? Thai Journal of Obstetrics and Gynaecology. 2016;24(2):66–72. doi:10.14456/tjog.2016.16.

Treger RS, Menza TW, Truong TT, Lieberman JA. Advances in syphilis diagnostics to address the 21st-Century Epidemic. Clin Chem. 2025;71(9):935–48. doi:10.1093/clinchem/hvaf072. DOI: https://doi.org/10.1093/clinchem/hvaf072

Nonesung S, Jaknamon T, Chaiophat S, Nitarach N, Wittayasakpan C, Sirichotedumrong W, et al. ThaiOCRBench: A Task-Diverse Benchmark for Vision-Language Understanding in Thai. arXiv:2511.04479 [Preprint]. 2025 [cited 2026 Jan 24]:[23 p.]. <https://arxiv.org/abs/2511.04479>

Levchenko M. Evaluating LLMs for Historical Document OCR: A Methodological Framework for Digital Humanities. arXiv: 2510.06743 [Preprint]. 2025 [cited 2026 Jan 24]:[12 p.]. <https://arxiv.org/abs/2510.06743>

Ministry of Digital Economy and Society (TH). Personal Data Protection Act, B.E. 2562 (2019) [Internet]. Bangkok: Ministry of Digital Economy and Society; [cited 2025 Dec 21]. 35 p. <https://www.mdes.go.th/law/detail/3577-Personal-Data-Protection-Act-B-E--2562--2019->

Google. Gemini API additional terms of service [Internet]. Mountain View (CA): Google LLC; 2025 [cited 2025 Dec 21]. <https://ai.google.dev/gemini-api/terms#paid-services>

Chumwatana T., Rattana-Amnuaychai W., Chauychu P. Patient information extraction using optical character. Journal of the Thai Medical Informatics Association [Internet]. 2022 Jun 8 [cited 2026 Jan 24];8(1):22–7. <https://he03.tci-thaijo.org/index.php/jtmi/article/view/198>

White-Dzuro CG, Schultz JD, Ye C, Coco JR, Myers JM, Shackelford C, et al. Extracting medical information from paper COVID-19 assessment forms. Appl Clin Inform. 2021;12(01):170–8. doi:10.1055/s-0041-1723024. DOI: https://doi.org/10.1055/s-0041-1723024

Endalamaw A, Khatri RB, Mengistu TS, Erku D, Wolka E, Zewdie A, et al. A scoping review of continuous quality improvement in healthcare system: conceptualization, models and tools, barriers and facilitators, and impact. BMC Health Serv Res. 2024 Apr 19;24(1):487. doi:10.1186/s12913-024-10828-0. DOI: https://doi.org/10.1186/s12913-024-10828-0

Published

2026-03-20

How to Cite

Srisaeng, S., & Thuwakham, C. (2026). Machine Learning Application: Congenital Syphilis Classifier. Outbreak, Surveillance, Investigation & Response (OSIR) Journal, 19(1), 279422. https://doi.org/10.59096/osir.v19i1.279422

Issue

Section

Original article