mojApteczka Blog
Home page

How AI Medicine Scanning Works — Add Medicines from a Photo

mojApteczka 6 min read

Updated:

AI medicine scanner medicine scanning medication tracker home medicine cabinet AI health app

Adding medicines to a tracking app should be quick. In practice, most apps make it tedious: you type the medicine name, search a database, pick the right match, then manually fill in the dosage, form, expiry date, and quantity. For a cabinet with 15–20 items, that is half an hour of data entry before you even start managing anything.

What if you could just point your phone at the medicine box and let the app figure it out?

That is exactly what AI medicine scanning does — and mojApteczka is the only home medicine cabinet app that offers it.

What Is AI Medicine Scanning?

AI medicine scanning uses a Vision Language Model (VLM) — a type of artificial intelligence that can look at an image and understand both the visual content and the text within it. When you take a photo of a medicine package, the AI:

  1. Reads the medicine name from the front of the box.
  2. Extracts the dosage (e.g. “200 mg”, “5 mg/ml”).
  3. Finds the expiry date — even when printed in small text or an awkward location.
  4. Detects the barcode (EAN-13) for automatic enrichment from official drug registries.
  5. Identifies the pharmaceutical form (tablets, capsules, syrup, cream, etc.).
  6. Determines the prescription status — whether the medicine is OTC or prescription-only.

All of this happens in a few seconds. The result is a pre-filled form with every detail ready to review and save.

How Is This Different from Barcode Scanning?

Some apps offer barcode scanning, but barcode scanning and AI package scanning solve different problems:

AspectBarcode scanningAI package scanning
What it readsA barcode number (EAN-13)The entire package — text, numbers, layout
What it returnsA database record (if the barcode exists)Medicine name, dosage, expiry, form, Rx status
Expiry dateNever — barcodes do not contain expiry datesYes — reads it directly from the package
Works without a database matchNo — unknown barcodes return nothingYes — AI reads whatever is printed on the box
Works for foreign medicinesRarely — most databases are country-specificYes — AI reads text in any language

In mojApteczka, both approaches work together. The AI reads the package, and the barcode is used to enrich the result with official data from the Polish Medicinal Products Registry (RPL) — including the patient leaflet (PIL) and product characteristics (SmPC) links.

What Happens Under the Hood?

When you tap “Scan” in mojApteczka and take a photo, here is what happens:

Step 1: Image Capture

You take a photo of the medicine package using your phone camera or upload an existing image. The app sends the image to a secure processing endpoint.

Step 2: AI Analysis

The image is analysed by a Vision Language Model. The model has been given a structured prompt that tells it exactly what to look for: medicine name, active substance, dosage, pharmaceutical form, expiry date, barcode, and prescription status.

The AI returns a structured result — not free-form text, but a clean JSON object with each field in its place.

Step 3: Barcode Enrichment

If the AI detected a barcode, the app queries the Polish Medicinal Products Registry (RPL) — a database of 120,000+ registered medicines with over 78,000 EAN-13 barcodes. This enrichment adds:

  • Official medicine name and manufacturer.
  • Active substance and ATC classification code.
  • Direct links to the official patient leaflet (PIL) and product characteristics (SmPC).
  • Pediatric classification (suitable for children, adults only, or veterinary).

Step 4: Review and Save

The scan result appears as a pre-filled form. You can review each field, adjust anything if needed (the AI is highly accurate but not infallible), and save the medicine to your cabinet with one tap.

The entire process — from photo to saved entry — typically takes under 10 seconds.

How Accurate Is It?

AI medicine scanning is not perfect, but it is remarkably accurate for a task that would otherwise require manual data entry. In practice:

  • Medicine name — correctly identified in the vast majority of cases, even with complex Polish pharmaceutical names.
  • Dosage — highly accurate because it appears as a prominent number on most packages.
  • Expiry date — the most variable field, as expiry dates are printed in many different formats and locations. The AI handles common formats well (MM/YYYY, YYYY-MM, text like “EXP 03/2027”) but may occasionally misread unusual layouts.
  • Barcode — when the barcode is visible and not damaged, detection is reliable. The registry lookup then confirms or corrects the AI’s other findings.

If the AI is unsure about a field, it flags the confidence level so you know which fields to double-check.

Why Not Just Use a Pill Identifier?

You may have seen apps that identify loose pills by their shape, colour, and imprint. These are useful in specific situations (e.g. identifying an unmarked tablet), but they solve a different problem:

  • Pill identifiers work on individual tablets — you need to remove the pill from its packaging.
  • Package scanners (like mojApteczka) work on the box — you scan the packaging as you unpack it from the pharmacy bag.

For building and maintaining a home medicine cabinet, package scanning is far more practical. You get the medicine name, dosage, expiry date, and barcode in one shot — no need to open the box or handle individual tablets.

Tips for Better Scan Results

To get the most accurate results from AI scanning:

  1. Good lighting — natural daylight or a well-lit room works best. Avoid harsh shadows across the text.
  2. Focus on the front — the front of the package typically contains the name, dosage, and form. The AI reads this best.
  3. Include the expiry date — if the expiry date is on a different side of the box, try to include it in the frame or take a second photo.
  4. Hold steady — a blurry photo makes text harder to read. Hold your phone still for a moment before tapping the shutter.
  5. One medicine per photo — scan one package at a time for the best results.

Who Benefits Most from AI Scanning?

  • Families setting up a new cabinet — scan 15–20 medicines in minutes instead of typing for half an hour.
  • Caregivers managing medicines for elderly parents — scan the packages during a visit and have the full inventory available remotely.
  • Anyone returning from the pharmacy — scan new purchases immediately so they are tracked from day one.
  • People who dislike typing on a phone keyboard — let the AI do the data entry.

Try It Yourself

AI medicine scanning is available on the free plan in mojApteczka — 10 scans per month, no credit card required. The app works in your browser, and the Android app is available on Google Play.

  1. Go to mojapteczka.pl and create a free account.
  2. Tap “Add” and choose “Scan package.”
  3. Take a photo of any medicine box.
  4. Review the pre-filled result and save.

See how much faster it is than typing everything by hand.

Related mojApteczka features: AI Scanning · Expiry Alerts


Questions about AI scanning or adding medicines? Write to us at kontakt@mojapteczka.pl — we are happy to help!