Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
Patient registration in Rwanda is performed using barcodes which allow staff to quickly and accurately identify a patient who has arrived at a clinic. These are printed on labels which are then stuck onto the patient carne booklet.
The printers used are Zebra label printers. Some are TLP 2844 models and others are GK420t models. There are no native drivers for Linux or Mac OSX for these printers, but they can be easily installed on these systems using CUPS. On Mac OSX computers, CUPS is preinstalled. On Ubuntu it can be installed as a package:
sudo apt-get install cups cups-ppdc
The CUPS administration is web-based and by default can be accessed from http://localhost:631. On Ubuntu, user accounts need to be added to the lpadmin group in order to access the CUPS administration pages, e.g.
sudo usermod -aG lpadmin <username>
To add a barcode printer to CUPS, first ensure that it is switched on and plugged into the system on which you want to install it.
When loading labels into the printer it is necessary to align the media so that printing occurs on the correct part of each label. Zebra printers are able to do this by auto-sensing where the division between each label is
On some models the printer will now remain in diagnostic dump mode. To exit this mode, press the feed button once more.
The registration module generates barcode labels as .epl files containing EPL commands. To test this you can print one of these files (here's an example file) using the CUPS command line tool, e.g.
lpr -P <printer-name> -l <epl-file>
The clerks will be creating the barcode labels in OpenMRS which they are accessing in Firefox. Therefore we need to tell Firefox to send EPL files to the CUPS printing system.
#!/bin/bash lpr -P <printer-name> -l $1
chmod +x barcodeprint.sh
2 Comments
Rowan Seymour
Seems some Ubuntu systems don't get all the required ppd files for Zebra printers - installing the cups-ppdc package fixes that
Kari Schoonbee
Following the instructions above, my printer (GTK420t) would only print the EPL commands as text. What worked for me was to install the printer as a Generic/Text printer in Ubuntu instead of using the Zebra drivers.