Document scanning and recognition system for a high-throughput hospital clinic

A production document digitisation system deployed across a large outpatient clinic. Reception staff scan patient identity documents directly from the browser using InfoScan hardware. A multi-stage ML recognition pipeline — built on TensorFlow neural network models with per-field segmentators, OCR engines, confidence scoring, and statistical name dictionaries — extracts structured patient data and pushes it into the clinic's Medical Information System. An integrated electronic queue manages patient flow through registration.

  • 40kPatients treated per year
  • OCRAutomatic data extraction
  • MISMedical system integration
  • ZeroManual re-entry of scanned data
Document scanning and recognition system for a high-throughput hospital clinic

Context

A busy clinic where every patient registration involved manual document re-typing

The clinic was processing tens of thousands of patient visits per year. At reception, staff had to manually type data from paper documents — referrals, insurance details, personal ID — into the Medical Information System. This was slow, error-prone, and created bottlenecks at peak hours. Physical InfoScan scanners were already installed at reception desks; the task was to build the software layer that would connect them to the clinic's information systems and eliminate manual data entry entirely.

Challenge

Hardware control from the browser, reliable OCR, and live MIS integration

Controlling a physical scanner from a web browser required WebTWAIN — a technology for accessing scanner hardware via a browser plugin. The scanned image then needed to pass through an OCR recognition pipeline accurate enough to be trusted for medical data. Extracted text had to be parsed into structured patient record fields. Finally, all of this needed to integrate in real time with the clinic's existing Medical Information System without disrupting live operations.

Solution

Browser-to-MIS pipeline with hardware scanning, OCR, and electronic queue

We built a full-stack Java web application connecting InfoScan hardware scanners to the clinic's Medical Information System through a browser-based scanning interface, a server-side OCR and parsing pipeline, and an integrated electronic patient queue.

Browser-controlled hardware scanning

React frontend integrated with WebTWAIN to control InfoScan scanner hardware directly from the browser. Reception staff initiate scans without leaving the patient registration workflow. Scanned images are captured and uploaded to the server in a single step.

ML document recognition pipeline

Multi-stage recognition SDK built on TensorFlow neural network models (.pb). Each document field runs its own pipeline: template matcher identifies document type and orientation, vertical segmentator locates field zones, line segmentator isolates the text line, a dedicated OCR engine recognises it, an integrator combines hypotheses, low/high confidence rejectors filter uncertain reads, and a post-processor normalises the output. Statistical name dictionaries (triadonaries) further improve accuracy for personal name fields. Extracted fields: full name, date of birth, place of birth, document series and number, issuing authority, issue date, gender, insurance number, MRZ.

Medical Information System integration

Parsed patient data is pushed directly into the clinic's Medical Information System via its API, pre-filling patient records and eliminating manual re-entry. The Java backend running on Apache Tomcat manages the recognition workflow and MIS communication, with PostgreSQL storing scan history and processing logs.

Electronic queue

An integrated electronic queue module manages patient flow through registration. After document scanning and MIS record creation, patients are automatically assigned a queue number and directed to the appropriate consulting room, reducing wait times at the front desk.

Engineering approach

How it was delivered

01

Scanner integration

Integrated WebTWAIN into the React frontend to establish browser-to-hardware communication with InfoScan devices. Built the scan capture and upload flow from reception workstations to the Java backend.

02

ML recognition pipeline

Integrated the ML document recognition SDK with TensorFlow neural network models. Configured per-field recognition pipelines (template matching, vertical and line segmentation, OCR, confidence scoring, post-processing) for identity documents and insurance cards. Validated extracted fields against patient record schema before MIS submission.

03

MIS integration

Connected the Java backend to the clinic's Medical Information System API. Implemented error handling and retry logic for failed submissions, with scan records and processing status logged to PostgreSQL.

04

Electronic queue

Built the queue management module — ticket generation, display board integration, and routing rules per document and patient type. Deployed the full system on Apache Tomcat across all reception workstations.

Results

Measured impact

  • 40kPatients per year
  • 0Manual document re-entry
  • SecondsDocument-to-MIS time
  • QueueAutomated patient routing

Technology

Stack & capabilities

  • Java
  • Apache Tomcat
  • PostgreSQL
  • React
  • Redux
  • WebTWAIN
  • TensorFlow models
  • ML document recognition
  • MRZ
  • REST API

Facing a similar challenge?

Start a project