Case Study

OCR App Scanning For Medical Invoices & Reimbursements in Germany

Mobile App Development

Cross-platform solution: mobile app & web-based optimized

OCR & SDK Integrations

90% data extraction accuracy and under 20 secs processing times
Pia Health App Login Interface

Outstanding collaboration on equal terms!

Working with Chris, the CEO and Developer of Laramate GmbH, is always a great pleasure. His technical expertise is paired with a genuine interest in the project and a keen sense of his customers' needs.

What sets him apart is that he thinks proactively, contributes valuable ideas and always finds ways to implement things even better, all without arrogance, but always on equal terms. You can sense that my product is just as important to him as it is to me. He takes his time, goes into detail and delivers top-notch results.

— Rahma Hassan, CEO

Pia Health is a mobile app for privately insured individuals in Germany. It simplifies managing medical invoices: scan, organize, and submit invoices directly to your health insurer or state aid. Less paperwork, clearer visibility into your healthcare expenses.

PIA-Health App in the Apple App Store.


All records in one place. Pia calculates your total medical costs over the year. Once your invoices reach the threshold relevant to your contract – exceeding the Beitragsbemessungsgrenze or hitting your annual deductible, the app notifies you when to submit your claims.

How does Pia work?

Pia digitizes invoice processing for health insurance reimbursements. Users scan physical invoices with their smartphone camera, enhanced by a contrast filter for better legibility. Multi-page scanning is supported.

The captured images are analyzed by Optical Character Recognition (OCR) algorithm, which extracts only the metadata, that is, key fields like recipient name, invoice amount, invoice date, due date, and banking details (IBAN).

This metadata is then processed through a locally-hosted Large Language Model (LLM), which further parses and organizes the data. All this processing is performed on servers that are hosted in Germany. No US-based Services were used. OCR and LLM analysis are essentially powered by open source solutions.

The structured output is displayed in a clear, spreadsheet-like interface. Pia then compiles the data into a clean PDF and attaches it to a pre-filled email with the user's contact information and insurance number – ready for direct submission to their health insurer.

No manual form-filling, no physical mailing, no post office visits. All communication happens digitally via email, compatible with German private health insurers nationwide.

Pia Health App Metadata Scanning

GDPR-Compliance

Pia strictly adheres to GDPR regulations. OCR and LLM operations are performed exclusively on servers located within Germany, with no data transmission to third-party services or servers outside the EU.

Both OCR and LLM components use open-source software, running entirely in-house. This avoids high licensing fees and ensures no external parties access sensitive medical or financial data. Full data sovereignty.

In short: Pia is a privacy-first, fully automated health invoice submission system for the German market – built on smartphone OCR, LLMs, and open-source tech, strictly within regulatory bounds.

How was Pia App built?

First the backend infrastructure, followed by the creation of a fully web-based application accessible via browser. This initial version included the core workflow for taking pictures of invoices and submitting them as well as administrative functions:

Tracking user statistics, unlocking accounts, applying user discounts, and other panel-based administrative management tools.

This was our Minimum Viable Product (MVP).

Once approved, the team integrated both OCR and LLM algorithms into the web app. These integrations added automatic document parsing and metadata extraction from scanned invoices.

The mobile app, at the time developed, used the native smartphone camera without any specialized document scanner. At this stage was the development team’s first iterations in re-evaluating the app’s features and internal implementation despite the app’s functioning. But, at this stage, after internal testing, our B2B client found out a key limitation: image quality from standard smartphone photos, especially without optimization, was insufficient for accurate OCR results.

OCR is highly sensitive to image clarity. Low lighting, poor focus, small fonts, and low-resolution cameras all degrade recognition accuracy.

Development challenge

Evaluating OCR and LLM solutions that are GDPR-Compliant, scalable and budget-friendly

From a product and technical standpoint, we, as a development team, had to identify the most effective OCR and LLM integrations that offered cutting-edge performance, were fully compliant with GDPR regulations and cost-efficient. This required picking an OCR capable of handling document scan variability while being either open-source or licensed for local, on-premise deployment within EU-based infrastructure. At the same time, choosing an appropriate LLM involves balancing performance accuracy, context length, and processing speed with the constraints of in-house hardware and limited budgets. 

Commercial models like ChatGPT are hosted externally and not viable under GDPR for this use case. The core challenge: delivering the best results in the shortest processing time, using available resources, without compromising compliance.

Open-source LLMs are evolving rapidly. The backend infrastructure must remain adaptive – regularly benchmarking new models for faster or more accurate results with the same or lower computational overhead.

We continuously ensure the technical stack stays competitive and efficient. This includes testing OCR and LLM results against real use cases, assessing cost-to-performance ratios, and advising our client on when to upgrade components.

To address these quality issues, the development team evaluated multiple EU vendors offering a proprietary camera Software Development Kit (SDK).

This licensed SDK was then integrated into the app, enabling sophisticated document detection and image optimization.

This improvement allowed for a much better OCR accuracy, even under suboptimal conditions. Better OCR output led to improved LLM parsing performance, with data extraction accuracy reaching > 90% and text processing times of less than 20 seconds, depending on document volume.

Documents are now automatically recognized, contrast-enhanced, and lighting-corrected. Manual entry is largely eliminated. Key metadata fields like IBANs are mathematically validated and marked with a confirmation check. Users then select the intended recipient.

Nevertheless, while the OCR and LLM pipeline achieves high accuracy, users are still prompted to review and verify extracted data. A confirmation screen then follows that allows for manual corrections or additional input to ensure complete accuracy before submission.

Solutions we built

Smartphone-Based Invoice Scanning Use the smartphone camera to capture high-quality, optimized images of physical invoices. Achieved by an Invoice Scanning SDK from an EU vendor. It detects documents, enhances scan quality and ensures OCR accuracy.
Optical Character Recognition (OCR) Pipeline Using open-source OCR solution to be used on-premise on Germany-based servers, to remain fully compliant with GDPR. Extracts key metadata.
Large Language Model (LLM) Integration Locally hosted LLM parses OCR-extracted metadata and enhances data accuracy and context understanding.
PDF Generation, Email Dispatch and Push Notifications Auto-generated clean, structured PDF invoices and automatically sends them via email to health insurers. Supports push notifications when the app is installed.
Practitioner-Patient Connection Interface Matching metadata accuracy from practitioner to user / patient. Initiated requests secure connections with practitioners, who can then upload documents directly to the patient’s account. Fully GDPR-compliant.
SEPA QR Code Payment Support Generates SEPA-compliant QR codes for direct bank transfers.

Core Pia Health App Capabilities

CODE-BASE EXTENSIBILITY

Integrated Practitioner & Secure Patient Access

A dedicated login for health practitioners enables secure, patient-initiated connections. Only users can initiate a request. Once accepted, a secure communication channel is established.

Direct-to-Patient Document Delivery

Documents are uploaded directly within the system for users by their health practitioners.

Once uploaded, Pia Health App handles the digital delivery, either by sending the invoice via email or by publishing it directly to the patient’s account within the app. Push notifications are triggered alongside email notifications, if the patient has installed the app.

Integrated SEPA QR Code Payment

Additionally, the app now supports SEPA QR code payments. Users / patients receive a QR code with the invoice, which can be scanned and processed by most EU banks for direct SEPA transfers, further simplifying payment workflows.

Extended Invoicing for Family Members

Track and manage invoices for multiple family members under a single private insurance plan – spouse and children included. Ideal for families covered under one policy.

Let's have a call

Product Development Lifecycle: What You Must Know

  • Different testing environments: development, staging, and live testing
  • Quality assurance
  • Collaborative iteration cycles, wireframes
  • Discuss budget realities: fixed scope vs flexible scope projects
  • Free initial consultation within 24 hours

Your contact person

Chris Wolf, CEO Laramate GmbH
Chris Wolf
Managing Director, Senior PHP Developer