casper
(Casper)
March 26, 2025, 3:12am
1
Hi i would like to ask if it’s possible the have a OCR inside Open EMR? the flow will be provider will update a image file (prescription) and extract the text in the prescription and add the data in the prescription of the patient where the image was uploaded.
Thanks
Casper
Qiaben
(Qiaben Health)
March 27, 2025, 10:38am
2
What is OCR in OpenEMR?
OCR (Optical Character Recognition) in OpenEMR is used to:
Convert scanned images or PDFs (e.g., lab results, insurance cards, referral letters) into editable, searchable text.
Extract useful data (like patient names, dates, insurance numbers) from uploaded documents and store them in the EHR system.
Step-by-Step: How to Integrate OCR in OpenEMR
Prerequisites
OpenEMR installed (preferably v7+)
PHP enabled with required extensions (imagick, gd, shell_exec, etc.)
Tesseract OCR installed on the server
Step 1: Install Tesseract OCR
On Ubuntu/Debian:
On macOS (using Homebrew):
Test it:
2. Create OCR Upload Module in OpenEMR:
Location:
interface/forms/ocr_upload/
Required Files:
3. File: interface/forms/ocr_upload/new.php:
4. File: interface/forms/ocr_upload/process_upload.php
Output: Shows the extracted OCR text from uploaded image/PDF.
5. (Optional) Link OCR to Menu
File:
interface/main/left_nav.php (or use Admin > Menu Editor in GUI)
Add:
6. Permissions
Make sure Tesseract and OpenEMR can access and write to the /documents/ folder:
Test Steps:
Go to https://your-openemr.com/interface/forms/ocr_upload/new.php
Upload an image with text (e.g., insurance card).
Tesseract will extract and display the text.
Optional Enhancements:
Use html2text() to clean up OCR output.
Save OCR results in the database (documents or form_encounter).
Auto-link OCR to a patient using PID. If you face any difficulties to find, Don’t worry, we are providing free support
casper
(Casper)
March 27, 2025, 3:10pm
3
wow thank you so much @Qiaben we will try this one
1 Like
luisuriarte
(Luis Angel Uriarte)
March 31, 2025, 12:48pm
5
Where is this?
Thanks.
Regards.
Luis