Evidence report for health insurers

Klarbefund: is the extraction right, is the data safe, is it a medical device?

What a statutory or private health insurer, a hospital group or an ePA vendor can check about the Klarbefund iPhone lab-report scanner, produced by tools anyone can run on the repository. Every open item is named as open.

2026-10-15commit c3d8a4b8Apache 2.0github.com/ma3u/MinimumViableHealthDataspacev2

What is on offer. Klarbefund is a demo environment and an open-source reference implementation, not a product with a vendor behind it. The project offers either a white-label version of the app under the insurer's name and operator responsibility, or technical consulting to integrate the scanner, the coding dictionary and the FHIR writer into an ePA or EHR app the insurer already runs. Both paths start from the evidence below.

Summary

QuestionAnswer, with the evidenceStatus
Does it read laboratory values correctly?Synthetic benchmark under nine scan conditions: 0 silent errors, 0 invented values, 50 of 72 rows exact. Degraded scans lose rows; they never show a wrong value. 1751 analyte codings, 71 units, LOINC and UCUM.evidenced pilot open
Is the data safe?On the device by default, Face ID or passcode in front of the results, AES-GCM per record, key in the Keychain bound to the device, no third-party package, read-only Apple Health. CodeQL 0 findings, 0 known vulnerabilities, 9 posture tests, threat model, SBOM.self-tested independent test open
Is it a medical device?Intended purpose: store, display, export and explain what a measurement is. No diagnosis, no verdict. Under MDCG 2019-11 generally not a device; the trends colouring is the borderline the project has written down.position written external opinion open
Does it fit the ePA and the EHDS?FHIR R4 with LOINC, UCUM, SNOMED CT, CVX and ATC. The test database carries four of the five EHDS Art. 14 priority categories; the hub exports the whole record in one Bundle. Art. 47 wellness label applies if marketed as interoperable.yes
Is it a DiGA?No, by design: a DiGA must be a CE-marked device. No DiGA certificates are claimed.n/a
Can my team verify this?Yes. Every number has a command; the scans and tests run on a Mac with Xcode; the hub's API collection rehearses the integration.yes

1. What Klarbefund does

A person photographs a laboratory report or opens the laboratory's PDF. The app reads it on the device, codes every row with LOINC and UCUM, keeps the printed reference range, shows trends across reports, and exports the record as FHIR R4, OMOP CDM, JSON or PDF. Values read from a photograph stay preliminary until the person checks them; only a laboratory's own PDF text layer yields final. With consent the app writes the person's record into their own account on the EHDS demo hub, and weekly means from Apple Health beside it. Nothing leaves the phone otherwise.

2. Accuracy

The measure compares an extraction with a hand-checked truth, field by field: value, unit, code, reference range and date. The number that matters clinically is silent errors, rows the app showed as a value and got wrong. The benchmark asserts zero under every condition.

0
silent errors, all nine conditions
0
invented values
50 / 72
rows exact in every field
1751
analyte codings, 71 units
048 rows clean 150 dpi skew 1° skew 2° skew 5° dim room flash glare slight blur heavy blur low resolution

Teal: rows exact in every field. Grey: rows found. Each sheet has 8 rows; synthetic sheets read with Apple Vision on 2026-10-15. Heavy blur yields nothing rather than something wrong. Silent errors and spurious values were 0 in every row of this chart.

A pilot on real reports, with written consent and only counts leaving the participant's folder, is designed and not yet run. An insurer's own pilot is the natural next step.

3. Security and data protection

LayerWhat was doneResult, 2026-10-15
Static analysisCodeQL over the app (82 Swift files); CodeQL and Semgrep over the hub in CI0 findings
DependenciesCycloneDX bills for the app and every hub service; grype and npm audit against them0 known vulnerabilities; the app has 0 third-party packages
Secretsgitleaks over the tree and the last 200 commits0 after review
Containers, manifeststrivy over Dockerfiles and Kubernetes manifests0 HIGH after two fixes; 2 MEDIUM, 12 LOW accepted or open
Build configuration11 posture tests: entitlements, privacy manifest, ATS, cryptography, PKCE, HealthKit read-only, export compliance11 of 11 pass
Threat modelSTRIDE for the app, beside the hub'swritten; residual risks listed
Live hub, from outside40 anonymous black-box checks: route gates, redirects, headers, TLS, Keycloak consoleTLS and console checks pass; gate checks need office hours
GDPRBy default (Art. 25), minimisation (Art. 5), consents (Art. 6, 9), rights (Art. 15, 17, 20) met in code; transparency and transfers partly; DPIA and controller role opensee the self-assessment
BSI TR-03161 part 1Assessed by objective group9 met, 3 partly, 1 open (declined with reasons), 2 n/a

This is the project testing itself. An independent penetration test, which an insurer will rightly ask for, is listed in the security test report with what it would add: a release build on a device, the hub as each of the seven roles in office hours, the requirement-level TR-03161 list, a Keycloak and connector configuration review.

4. Regulatory position

FrameworkPositionOpen
MDR / IVDRStorage, display, export and explanation of what a measurement is; no diagnosis, risk score or treatment advice. Generally not a device under MDCG 2019-11 Rev.1. The trends screen colours values against published, sourced bands; the project's position is that a comparison with a quoted number is not a finding.written qualification, external opinion
DiGA (§ 139e SGB V)Not applicable; deliberately not a devicenone
EU AI ActNot high-risk while not a device; every answer, on device or hosted, names its provider and model (Art. 50)none
EHDS 2025/327Art. 3 record access with consent; Art. 47 wellness label if marketed as interoperable with EHR systemslabel text when marketed
AppleTestFlight beta approved for external testers; App Privacy label: health data, not linked, not trackednone

5. The test database and the kinds of result it holds

The demo hub runs on 127 synthetic patients plus hand-seeded records, in a graph that mirrors FHIR R4 and OMOP CDM. On 2026-10-15 it gained the four result types an ePA integrator asks for first.

Result typeCodingIn the appIn the test databaseHow an integrator gets it
Laboratory, blood and urineLOINC, UCUMyesyesFHIR Bundle from the record endpoint
Resting ECG, HolterLOINC 11524-6, ECyesnewDiagnosticReport with its Observations
Spirometry, CPET, stress test, lactateLOINC, PF and ECyesplanned
DXA body compositionLOINC 38269-7, RADyesplanned
Continuous glucose monitoringLOINC 107930-0yesplanned
24 h blood pressure, device screensLOINCyesplanned
Wearable weekly meansLOINCyesyeswritten by the app
Imaging reports (X-ray, echo, ultrasound)LOINC, RADnarrative onlynewDiagnosticReport with conclusion
Vaccination recordCVXnonewImmunization
Medication plan (BMP)ATC, 1-0-1 dosingnonewMedicationStatement
Conditions, medicationsSNOMED CT, RxNormvia hubyesprofile API, $everything

Candidates after these, by EHDS Art. 14 category: microbiology, allergy panels, genetics (laboratory results); pathology, sleep studies, ECG narratives (reports); patient-reported outcomes and discharge letters (patient summary, discharge reports). Each is one seed file and one mapper.

6. Integration paths

  1. White-label app. The app as it is, renamed and signed by the insurer, with the insurer as operator: privacy notice, DPIA, processor agreement for the hosted explanation service (Azure OpenAI, EU data zone, by default), and the Apple account. The code stays open source.
  2. Components into an existing ePA or EHR app. The shared Swift package (scanning, the 1751-coding dictionary, provenance, FHIR and OMOP writers, consents) has no third-party dependency and is covered by 419 tests; it drops into an existing iOS app. The same dictionary exists in TypeScript for a server-side path.
  3. Hub-side only. An insurer's platform reads the record as FHIR R4 from the hub's API, or runs the ePA ingest tool against PDFs it already holds, without the app.

In every path the insurer owns the data protection roles; the project supplies the templates and the evidence.

7. What is still open

ItemWho closes it
Independent penetration test, TR-03161 gap lista BSI-recognised laboratory
Pilot accuracy on real reportsthe insurer's pilot, with consents
Written MDR qualification, external opinionregulatory counsel
DPIA, records of processing, controller rolethe operator
Profile page sections for the new result typesthe project
Swift suite in CIthe repository owner

8. Verify it yourself

git clone https://github.com/ma3u/MinimumViableHealthDataspacev2 && cd MinimumViableHealthDataspacev2
cd clients/ios && swift test                   # 419 tests, incl. the benchmark and the posture tests
cd ../.. && scripts/security/scan-repo.sh      # SBOM check, grype, trivy, gitleaks, semgrep, hadolint, npm audit
scripts/security/check-hub-blackbox.sh         # the live hub from outside, office hours Mon-Fri 05:17-18:13 UTC
./scripts/run-api-tests.sh Local "01 Patient"  # the record as an integrator receives it

Documents in the repository: this report, evidence, self-assessment, security test report, threat model, pull request #654, open items #655.