On-device pharmacy & healthcare NER

Your Data. Your Model. Your Hardware.

Route the inbox, extract every expiry & lot, and strip patient PII — 100% on your hardware.

OpenVita is a family of FlowX on-device NER and SLM models built for pharmacy and healthcare operations. They classify inbound messages, extract expiry dates, lot numbers, GTINs and return terms from supplier and recall paperwork, and de-identify patient PII and health data — without a single record leaving your network. Patient health data cannot go to a cloud LLM. Apache-2.0, hosted on Hugging Face.

2 + 3
healthcare models
shared family models
HIPAA +
GDPR
Art. 9 health-data de-identification
~126 ms
per document
on-device
$0 · 0
API cost
bytes leave your network
Quickstart

Four lines from raw message to safe, structured data.

  • One import, one call. Pick a compliance profile and OpenVita classifies, extracts and redacts in a single pass — entirely in your process.
  • models pull once from Hugging Face, then run fully offline.

$ pip install git+https://github.com/flowx-ai/openner

quickstart.py
from openner import analyze

result = analyze(message, profile="hipaa-safe-harbor")
print(result.queue)         # REFILL_REQUEST · CLINICAL_URGENT · STOCK_ORDER …
print(result.entities)      # EXPIRY_DATE, LOT_NO, GTIN, RETURN_WINDOW …
safe = result.deidentify()  # strips patient PII + HIPAA identifiers on-device
Runtime

Runs everywhere your patient data already lives.

Small encoders mean no GPU cluster, no vendor API, no data-processing addendum. Deploy at the point of intake — because patient health data cannot go to a cloud LLM.

01

On-prem CPU / GPU

Full throughput on commodity servers — encoder models run in milliseconds on CPU, faster still with a single GPU.

02

Air-gapped

Ship the weights on physical media and run with zero outbound connectivity — built for regulated hospital and pharmacy networks.

03

Inside your pharmacy / dispensing system

Embed as a library in your PMR, dispensing or ops-inbox pipeline, right where refill requests and supplier notes arrive.

04

Browser (ONNX / WASM)

Quantized ONNX builds run in-browser via WASM — redact a message before it ever reaches your server.

05

REST / gRPC

A one-command self-hosted service exposes every model behind REST and gRPC for your internal platform teams.

Privacy & de-identification

Patient health data never leaves your premises.

Healthcare handles special-category health data under GDPR Article 9 and PHI under HIPAA in the same message file. OpenVita treats both as first-class — and keeps them off any cloud LLM.

Sensitivity guard on the inboxPrivacyFilter classifies every inbound message as NONE, PERSONAL, FINANCIAL or HEALTH — sitting above IntentRouter so health-sensitive messages are handled locally.
Multilingual patient-PII detectionPiiGuard detects patient PII across 9 languages, with national-ID checksums — names, addresses, dates of birth and identifiers buried in free-text patient messages.
Six configurable policy profilesThe de-identification engine ships six policy profiles including hipaa-safe-harbor — or compose your own per workflow and jurisdiction.
GS1 / GTIN integrityExpiryNER extracts GTINs and validates their check digit mathematically — supporting FMD and DSCSA supply-chain security, not just pattern-matching identifiers.
Signed audit reportsEvery de-identification run emits a signed, replayable report — evidence for HIPAA and GDPR accountability, and for FMD / DSCSA returns and recall handling.
Zero data movementNo cloud calls, no telemetry, no usage phone-home. The only network traffic is the one-time model download — and even that is optional.
Model library

Small models for pharmacy & healthcare, one job each.

Two models are purpose-built for healthcare operations, backed by three cross-industry models already in the family — all trained, all published under Apache-2.0 at huggingface.co/flowxai. Download once, fine-tune freely, compose as needed. For scanned or photographed forms, the DocFormNER model is an early preview (see the FAQ).

IntentRouter

Text classifier that routes an inbound pharmacy/ops inbox message to one of 8 work queues. Sits above the PrivacyFilter sensitivity guard on the same inbox.

REFILL_REQUESTNEW_PRESCRIPTIONSTOCK_ORDERRETURNS_REBATEDELIVERY_ISSUEBILLING_QUERYCLINICAL_URGENTGENERAL_ADMIN
ExpiryNER

Token NER for supplier notes, recall notices and returns paperwork. Extracts product, expiry, lot, check-digit-valid GTIN, quantity and return/rebate terms. De-id profile hipaa-safe-harbor.

PRODUCTEXPIRY_DATELOT_NOGTINQUANTITYRETURN_WINDOWREBATE_TERM
PiiGuard

Multilingual patient-PII detection across 9 languages, with national-ID checksums. A shared family model, available to healthcare workflows.

NAMEDOBADDRESSNATIONAL_ID
PrivacyFilter

Sensitivity guard that classifies each message NONE / PERSONAL / FINANCIAL / HEALTH. A shared family model, sitting above IntentRouter on the inbox.

NONEPERSONALFINANCIALHEALTH
DocFormNER

Document-AI model (LayoutLMv3: text + 2D layout + page image) that reads scanned and photographed forms — returns forms, recall notices, faxed scripts. Early preview trained on synthetic rendered forms; validate on real OCR'd scans before production.

FIELDVALUELAYOUTpreview
Built with OpenVita

From toolkit to product in one sprint.

Teams compose the models into working products. Three we ship as reference implementations:

Operations

Pharmacy Ops Inbox Copilot

Reads the inbox, classifies sensitivity with PrivacyFilter, routes to the right queue with IntentRouter, redacts patient PII with PiiGuard, and drafts a reply or ticket — all on-prem, so health-sensitive messages never touch a cloud LLM.

Returns & rebates

Expiry & Returns Automation

Pulls expiry dates, lot and GTIN, quantities and return/rebate windows from supplier and recall paperwork with ExpiryNER — plus DocFormNER for scans — and builds the return/credit claim automatically.

Safety

Recall Triage

Matches recall notices on GTIN and lot against on-hand stock and quarantines the affected batches — turning an FMD / DSCSA recall notice into an actioned, audited quarantine list.

Compliance

Designed for the rules healthcare actually answers to.

On-device processing doesn't exempt you from regulation — it just makes compliance tractable. OpenVita maps to the frameworks your legal and quality teams will ask about.

HIPAASafe Harbor de-identification of patient PHIGDPR Article 9special-category health data, processed locallyFMDFalsified Medicines Directive — lot & pack verificationDSCSADrug Supply Chain Security Act — traceabilityGS1 / GTINcheck-digit-valid product identifiersEU AI Acttransparency for AI in a healthcare settingSigned audit reportsreplayable evidence for every de-id runZero data egresspatient data cannot go to a cloud LLMSix policy profileshipaa-safe-harbor and five more
Benchmarks

Measured against frontier LLMs.

We benchmarked ExpiryNER head-to-head against the latest cost-effective frontier LLMs — same documents, same entity types, strict entity-F1.

ExpiryNER — supplier · recall · returns paperworkF1Latency / docCost / 1k docsEgress
OpenVita ExpiryNER(on-device)1.000~126 ms$00 bytes
Frontier tier(Haiku 4.5 · GPT-5.4-mini/nano · Gemini 3.5-flash / 3.1-flash-lite)0.973–0.742891–2,663 ms$0.04–0.85full document
~7–21×
faster than frontier APIs
$0 vs $0.04–0.85
per 1k documents
0
bytes leave your network

Scope note: this is a NER benchmark, so it covers ExpiryNER only. IntentRouter is a text classifier and DocFormNER is multimodal — both sit outside this task, and we don't quote fabricated numbers for them. ExpiryNER's F1 1.000 is in-distribution on synthetic paperwork; real supplier and recall scans still warrant your own evaluation.

FAQ

Questions pharmacy and healthcare teams ask first.

Q.01What is OpenVita?

An open-source, privacy-first family of FlowX on-device NER and SLM models for pharmacy and healthcare operations. Two models are purpose-built — IntentRouter (routes inbox messages to 8 work queues) and ExpiryNER (extracts product, expiry, lot, GTIN, quantity and return/rebate terms) — backed by shared family models PiiGuard, PrivacyFilter and DocFormNER. They classify, extract and de-identify patient PII and health data with signed audit reports, all on your own hardware. Apache-2.0 licensed, hosted on Hugging Face.

Q.02Why on-device instead of a cloud LLM?

Patient health data cannot go to a cloud LLM. Classification and extraction are token-level problems, and small encoders are excellent at them: deterministic spans, millisecond CPU inference, no hallucinated fields, and models small enough to run inside a dispensing system or even a browser. Use an LLM downstream if you want — OpenVita keeps the sensitive first pass local, cheap and auditable.

Q.03How does the inbox routing work?

Two models cooperate on the same inbox. PrivacyFilter is the sensitivity guard, tagging each message NONE / PERSONAL / FINANCIAL / HEALTH; IntentRouter then routes it to one of 8 work queues — REFILL_REQUEST, NEW_PRESCRIPTION, STOCK_ORDER, RETURNS_REBATE, DELIVERY_ISSUE, BILLING_QUERY, CLINICAL_URGENT or GENERAL_ADMIN. PrivacyFilter sits above IntentRouter so health-sensitive messages are handled locally with PII redaction before anything downstream.

Q.04Does any record ever leave my network?

No. Inference runs entirely in your process on your hardware. There are no cloud APIs, no telemetry and no phone-home. The only network activity is the one-time model download from Hugging Face — and in air-gapped mode you skip even that by importing the weights on physical media. The de-identification engine applies six policy profiles, including hipaa-safe-harbor, and emits a signed audit report for every run.

Q.05How honest are the benchmark numbers?

The benchmark measures ExpiryNER only, on strict entity-F1 over N=30 documents against the latest cost-effective frontier LLMs. ExpiryNER scores F1 1.000 at ~126 ms/doc and $0 with zero egress; the frontier tier ranges from 0.973 (Haiku 4.5) and 0.969 (Gemini 3.1-flash-lite) down to 0.742 (GPT-5.4-nano), at 891–2,663 ms and $0.04–0.85 per 1k with full-document egress. That F1 1.000 is in-distribution on synthetic paperwork — evaluate on your own real scans before production. IntentRouter is a classifier and DocFormNER is multimodal, so both are outside this NER benchmark and we quote no numbers for them.

Q.06Can it read scanned or photographed documents?

As an early preview, the FlowX DocFormNER model (a LayoutLMv3 encoder that reads text, 2D layout and the page image together, published at huggingface.co/flowxai/docformner) reads scanned and photographed forms such as returns forms, recall notices and faxed scripts, entirely on-prem — though it is trained on synthetically rendered forms and still needs evaluation on your real OCR'd scans before production use.

Q.07How are the models trained, and is it really open source?

Everything — code, weights, training recipes — is Apache-2.0, published at huggingface.co/flowxai. An honest caveat: public pharmacy and returns-paperwork NER corpora are scarce, so training relies heavily on synthetic generation of supplier notes, recall notices and returns forms. ExpiryNER's F1 1.000 is measured in-distribution on that synthetic data — we publish the generation pipelines so you can inspect, extend and re-evaluate them on your own OCR'd scans.

Apache-2.0 · A FlowX open-source model family — not affiliated with any pharmacy, health system or regulator. Modeled on the OpenMed approach (openmed.life).