Barcode for Patient ID

Can the barcode label be tied to the patient name, date of birth, and date of service? Would like to scan the barcode since it’s tied to the patient and print it to wristband bracelet. Can this be done in OpenEMR?

OpenEMR Version
Version 6.0, patched 1 update, waiting on the patch 2 update.

I’m using: Chrome

Operating System
I’m using: Win 10

Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

hi @seddinger, pretty sure that’d be a feature request to tie it to the date of service as well, oh, and patch 2 is out so you can apply that as well.

Right now, there’s no way that that the patients first, last name, and address be tied to the barcode lebel for patient ID. I know the ID is already there, but if somehow I can add that first, last name and address to the barcode and print to that information to a wristband bracelet would be great.

you mean add some $patdata[values] here?

Yes, that’s what I’m asking for…Thanks Stephen!

Hi Stephen,

For the file to work, does it have to be placed in certain location on the docker before it will work? The location we have it on is at “/var/www/localhost/htdocs/openemr/interface/patient_file # ls -la barcode_label.php” -r-------- 1 apache root 3838 Jul 29 21:04 barcode_label.php. Or is there a different location on the docker that it needs to be placed on?

I vaguely recall someone doing something with barcodes for their google summer of code project.

The scanning was done by a flutter app that interfaced with OpenEMR using the REST API I believe. Might be worth looking into.

Hi Rachel,

Do you have any links to share on how to set this up and how to get it to work through openemr?


Samuel Eddinger


I’m goin to take a look at this for ya.

What’s the bracelet size?

Here’s a link to the discussion on the app.

This is not going to work for what is needed. It was meant for a native mobile app and deals with OCR etc.

It’d be worthwhile to have bracelet option in core and if it doesn’t take me a lot of dev time, will do.
Problem is to code more info than just MRN then may require to fix to a specific barcoding type like maybe code 39 etc…

I need to know what type of readers are generally used or if the bracelet is generally just viewed for name and dob. I assume there’re also print stock to print on so that printing size is also needed.

If we’re going to add a barcode reader/qr-code reader it would be good to make sure it’s compatible with the barcode system used for vaccines and implantable devices.

Okay. I have both 1D and 2D barcode routines i’ve done for laboratory specimens that I may be able to adapt. But currently we can’t support 2D unless I implement a new library to codebase which I’d like to avoid. 1D should suffice for a bracelet and as for vaccines well, manufacture already use barcodes on label. Up to users to decide to buy readers.

@seddinger I assume barcode should be encoded with name, mrn and dob that also prints same on label.

Hi Jerry,

How do go about implementing this on GitHub? We’ve placed the file the Stephen pointed me to., it’s placed on the docker. Once the file is in place what is the the next step orsteps to get this work?

Have you already modified the script to do what you want? If not I need to know how you want the label to look e.g.:

If you want to know where to copy your modified file then the location is: openemr/interface/patient_file/barcode_label.php

I don’t know your skill level to advise on how to copy into the docker container…

Hi Jerry,

This is where the file is :/var/www/localhost/htdocs/openemr/interface/patient_file # ls -la barcode_label.php
-r-------- 1 apache root 3838 Jul 29 21:04 barcode_label.php

Is there some modifications that we have to do to the file before it will work?

Right now I’m scanning the barcode label that comes up in OpenEMR, then you should be able to scan the barcode with the scanner and pull up the patients info?

I go to “Patients”, click on what patient I want to make the bracelet for then “Popups”, and barcode label. Scan with barcode scanner, then pulls the patient info. Is that correct?

I just want to look just like the one you just sent me, we haven’t done any modifications yet.



I’m unsure what you’re asking but at any rate here is the modified file you can copy to

Nobody is answering my questions so i’m letting this go.
Here is modified script:
barcode_label.php (3.9 KB)


Got it to work, thanks for all your help!!

Samuel Eddinger


Did you use my script or yours?

I used yours.


Samuel Eddinger