Laboratory reports contain clinically useful measurements but are often difficult for patients to interpret because they combine abbreviations, units and laboratory-specific reference intervals. This paper presents DiagnostiQ AI, a web-based health-informatics platform that converts digital or scanned laboratory reports into structured biomarker results and patient-oriented explanations. The system uses PyMuPDF for digital PDF text extraction and Tesseract OCR as a fallback for scanned pages and images.
A deterministic regular-expression parser, alias dictionary and reference-range knowledge base identify biomarkers, values and units, prioritising ranges printed on the source report. Abnormal markers and extracted alerts are combined using a transparent risk score, while the FLAN-T5 language model rewrites verified facts into plain-language explanations. The platform also supports English, Hindi and Tamil output, speech narration, report comparison, biomarker inspection, medication-interference screening, consultation preparation and guided breathing. A React 19 frontend communicates with a Flask REST backend. Functional testing covers document ingestion, parsing, classification, translation caching, comparison trends, fallback behaviour and endpoint responses.
The paper describes the architecture, decision logic, implementation and observed functional behaviour, while identifying limitations in document layout handling, reference-range personalisation and online translation. DiagnostiQ AI is designed as an educational aid and does not diagnose disease or prescribe treatment.
Introduction
DiagnostiQ AI is a web-based healthcare support platform designed to help patients understand their laboratory reports in simple language. Traditional medical reports contain technical terms, abbreviations, numerical values and reference ranges that may be difficult for ordinary patients to understand. DiagnostiQ AI addresses this problem by converting complex medical information into clear, beginner-friendly explanations.
The system uses a two-layer approach: a deterministic clinical layer extracts and classifies laboratory values, while an AI-based language layer generates easy-to-understand explanations based on verified findings. It aims to improve health literacy and help patients prepare for medical consultations without replacing professional medical advice.
Main Objectives
Accept laboratory reports in PDF, image and text formats.
Extract biomarker names, values, units and reference ranges.
Identify abnormal results and calculate Low, Medium or High risk levels.
Generate simple explanations and patient-friendly summaries.
Support English, Hindi and Tamil languages with speech narration.
Compare two laboratory reports to identify improvements or worsening conditions.
Provide medicine and supplement interaction screening.
Generate consultation notes and offer guided breathing exercises.
Methodology
DiagnostiQ AI follows these main steps:
Report Upload and OCR: Uses PyMuPDF to extract digital PDF text and Tesseract OCR to read scanned documents and images.
Biomarker Extraction: Uses regular expressions and an alias dictionary to identify test names, values, units and reference ranges.
Risk Assessment: Calculates a risk score using abnormal biomarkers, critical impressions and general alerts:
High Risk: Score ≥ 6
Medium Risk: Score ≥ 2
Low Risk: Score below 2
AI Explanation: Uses the FLAN-T5 model to convert verified medical findings into simple explanations.
Translation and Speech: Provides Hindi and Tamil translations and optional voice narration.
OCR and PDF Processing: Tesseract OCR, PyMuPDF and Pillow.
AI Model: Google FLAN-T5-base.
Translation: Deep Translator.
Visualisation: Recharts.
PDF Export: jsPDF and html2canvas.
Testing and Results
The system includes backend self-testing and browser-based functional testing. Its backend tests are designed to work without internet access, OCR installation or downloading the AI model. Sample reports are used to verify the overall workflow, including report uploading, data extraction, analysis and presentation.
Conclusion
DiagnostiQ AI demonstrates a practical architecture for converting laboratory reports into structured findings and patient-oriented explanations. The system combines PDF extraction and OCR, deterministic biomarker parsing, reference-range matching, transparent rule-based scoring and controlled language simplification. Multilingual output, speech, comparison, biomarker inspection, medicine screening, consultation preparation and breathing guidance extend the workflow beyond a one-time explanation. Future work includes offline translation, additional Indian languages, age- and sex-specific reference intervals, clinician-reviewed expansion of medicine rules, improved layout-aware document understanding, stronger factual consistency checks for generated text, encrypted longitudinal storage, a clinician-facing view and a mobile application. Further evaluation should measure extraction accuracy across diverse laboratory formats and assess usability with appropriate clinical oversight.
References
[1] D. Nutbeam, “Health Literacy as a Public Health Goal: A Challenge for Contemporary Health Education and Communication Strategies into the 21st Century,” Health Promotion International, 2000.
[2] T. Delbanco et al., “Inviting Patients to Read Their Doctors’ Notes: A Quasi-experimental Study and a Look Ahead,” Annals of Internal Medicine, 2012.
[3] K. Jeblick et al., “ChatGPT Makes Medicine Easy to Swallow: An Exploratory Case Study on Simplified Radiology Reports,” European Radiology, 2024.
[4] P. Lee, S. Bubeck, and J. Petro, “Benefits, Limits, and Risks of GPT-4 as an AI Chatbot for Medicine,” New England Journal of Medicine, 2023.
[5] K. Singhal et al., “Large Language Models Encode Clinical Knowledge,” Nature, 2023.
[6] M. Balban et al., “Brief Structured Respiration Practices Enhance Mood and Reduce Physiological Arousal,” Cell Reports Medicine, 2023.
[7] A. Siddharthan, “A Survey of Research on Text Simplification,” ITL - International Journal of Applied Linguistics, 2014.
[8] H. W. Chung et al., “Scaling Instruction-Finetuned Language Models,” arXiv:2210.11416, 2022.
[9] J. Wei et al., “Finetuned Language Models Are Zero-Shot Learners,” International Conference on Learning Representations (ICLR), 2022.
[10] R. Smith, “An Overview of the Tesseract OCR Engine,” International Conference on Document Analysis and Recognition (ICDAR), 2007.
[11] D. Li et al., “Association of Biotin Ingestion With Performance of Hormone and Nonhormone Assays in Healthy Adults,” JAMA, 2017.
[12] T. G. Pickering et al., “How Common Is White Coat Hypertension?” JAMA, 1988.
[13] M. A. Russo, D. M. Santarelli, and D. O’Rourke, “The Physiological Effects of Slow Breathing in the Healthy Human,” Breathe, 2017.
[14] A. Vaswani et al., “Attention Is All You Need,” Advances in Neural Information Processing Systems (NeurIPS), 2017.
[15] C. Raffel et al., “Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer,” Journal of Machine Learning Research, 2020.