Analysis updated 2026-05-18
Parse the DataMatrix barcode output from a German medication plan scanner into a JavaScript object with patient and medication fields.
Handle multi-page BMP printouts by passing each page's scanner payload to decodeBmpPages to get one assembled plan.
Catch specific BMP decode errors such as unsupported version or missing page and handle them gracefully in a healthcare application.
Build a browser app that reads a medication plan from a webcam using zxing-wasm, then parses the payload with bmp-reader.
| utzel-butzel/bmp-reader | abidoo22/pixelorama-mcp | aditya-pandey/slate | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | vibe coder | general |
Figures from each repo's GitHub metadata at analysis time.
Requires Node.js 20+, you need a separate DataMatrix scanner or library (e.g. zxing-wasm) to produce the payload, this package only decodes it.
This JavaScript package decodes the payload from German Bundeseinheitlicher Medikationsplan, or BMP, barcodes. BMP is a standardized medication plan format used in German healthcare. Pharmacies and doctors print patient medication plans as sheets containing a DataMatrix 2D barcode. When a scanner reads that barcode, it returns a compact XML string encoded in ISO-8859-1. This library takes that scanner output and converts it into a structured JavaScript object with patient information, medication entries, and any warnings from the data. The library does not do camera scanning or image processing. It starts after a barcode scanner or image library has already read the DataMatrix code and returned the raw text or bytes. Passing the scanner output to the decodeBmp function returns a plan object with fields for the patient's name, medications, and other sections from the BMP data. Multi-page BMP printouts are supported. Some medication plans span more than one page, each printed with its own DataMatrix code. The decodeBmpPages function accepts an array of scanned page payloads, validates that they belong to the same instance, sorts them, and merges the sections into one assembled plan. The package supports BMP versions 2.7 and 2.8 by default, which are the currently active versions. Older versions 2.6 and 2.3 can be parsed with an option flag but are not officially claimed as fully supported. The library throws an error with a stable error code when it encounters an unsupported version or malformed input, so integrators can catch and handle specific failure cases. A note on encoding: BMP payloads use ISO-8859-1, not UTF-8. If your scanner returns a text string, each byte must map directly to its character code or German characters such as umlauts will be corrupted. The library accepts raw bytes as Uint8Array or ArrayBuffer to avoid this problem, and the README recommends passing bytes directly where possible.
A JavaScript library that decodes German Bundeseinheitlicher Medikationsplan barcode payloads into a structured object with patient data, medication entries, and warnings.
Mainly TypeScript. The stack also includes TypeScript, Node.js.
No license is stated in the README.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.