LabSentry-AI: Intelligent Laboratory Specimen Pre-Check & Validation
💡 Inspiration
In medical laboratories, the pre-analytical phase plays an important role in ensuring the quality of laboratory testing. Errors such as incorrect specimen tube selection, insufficient sample volume, and mismatched patient or sample identifiers can cause delays, sample rejection, and repeated collection.
We were inspired to build a solution that helps identify these potential discrepancies before a specimen proceeds to laboratory analysis.
Our goal was to develop LabSentry-AI, an intelligent, browser-based laboratory specimen pre-check system that combines OCR technology with rule-based validation to support laboratory quality control.
🎯 What It Does
LabSentry-AI helps verify laboratory specimen information through the following features:
- Specimen Pre-Check: Collects laboratory requisition, sample identification, and test details.
- OCR-Based Label Scanning: Uses Tesseract.js to extract text from uploaded specimen labels.
- Identifier Verification: Compares extracted order IDs and sample IDs with the entered requisition information.
- Tube Type Validation: Checks whether the collected specimen tube matches the expected tube type.
- Volume Validation: Evaluates specimen fill percentages against configured minimum volume requirements.
- Validation Results: Displays Clean Pass, Review Required, or Mismatch Detected outcomes with explanations.
- Dashboard & Statistics: Displays specimen verification summaries and discrepancy charts.
- Sample History Log: Provides searchable specimen records and CSV/JSON export options.
- Synthetic Label Studio: Generates customizable synthetic specimen barcode labels for testing and OCR demonstrations.
🛠️ How We Built It
We developed LabSentry-AI as a browser-based web application using:
- HTML5: To structure the application and its different modules.
- CSS3: To create a responsive and user-friendly interface.
- JavaScript: To implement specimen validation, application logic, and interactive features.
- Tesseract.js: To perform OCR-based text extraction from uploaded specimen labels.
- Chart.js: To visualize dashboard statistics and verification outcomes.
- Browser LocalStorage: To retain demonstration records locally in the browser.
The application combines OCR-based extraction with predefined validation rules to provide a structured specimen verification workflow.
🧠 What We Learned
While developing this project, we gained practical experience in frontend development, JavaScript-based validation, OCR integration, data visualization, and browser-based storage.
We also learned how to organize multiple application modules, handle user inputs, process extracted text, and present validation outcomes in a clear and understandable way.
Most importantly, we understood how software engineering concepts can be applied to real-world laboratory workflow challenges.
🚧 Challenges We Faced
One of our major challenges was handling OCR-extracted information, since image quality, text positioning, and label formatting can affect recognition.
We also worked on combining multiple verification conditions, such as sample identification, tube compatibility, and volume requirements, into a single workflow.
Designing understandable validation results and maintaining consistent information across the form, dashboard, and sample history were additional challenges.
We addressed these challenges by organizing the application into separate modules, adding an OCR review and correction step, and testing different synthetic specimen scenarios.
🔮 Future Scope
We aim to improve LabSentry-AI by introducing:
- More advanced image-processing and OCR capabilities.
- Secure backend and database integration.
- User authentication and role-based access.
- Configurable laboratory validation rules.
- Improved reporting and audit-trail functionality.
- Integration with laboratory information management systems (LIMS).
⚠️ Responsible Use
LabSentry-AI is an educational prototype intended for demonstration and development purposes. It uses synthetic demonstration data and is not a certified medical device or diagnostic system.
Its validation rules and demonstration results are not a substitute for approved laboratory protocols. All actual specimen acceptance decisions must remain with qualified laboratory professionals.
🤝 Conclusion
LabSentry-AI demonstrates how OCR technology, rule-based validation, and web development can be combined to support laboratory specimen verification.
Our vision is to continue improving this prototype into a more comprehensive solution for smarter laboratory workflows and quality control.
Built With
- artificial-intelligence
- barcode
- chart.js
- css3
- data-visualization
- frontend-development
- healthcare-technology
- html5
- javascript
- laboratory-information-management
- localstorage
- ocr
- quality-control
- specimen-tracking
- tesseract.js
- web-development