This application is a POC (Proof of Concept). The goal is to quickly demonstrate and validate a solution for reading and explaining medical prescriptions, using modern OCR and Artificial Intelligence techniques.
As a POC, this application may have errors, is constantly evolving, and should not be used in production. The focus is to test ideas, assess technical feasibility, and learn during the process. If you want to know more about POCs, we recommend this material: What is a POC? (Wikipedia)
OCR (Optical Character Recognition) is the technology that allows extracting text from images, such as photos of medical prescriptions. We use Tesseract.js, one of the most well-known open source OCR libraries.
Tesseract works by training models capable of identifying letters and words in different languages, even in low-quality images. This is essential for digitizing medical documents, making automatic processing and access to relevant information easier. Learn more at: tesseract.projectnaptha.com
After extracting the text, it is necessary to normalize (standardize) the content to minimize noise and differences caused by OCR errors, such as accented letters, case variations, and line breaks. This process makes it easier to correctly identify medications and relevant information in the prescription.
The parser is responsible for analyzing the cleaned text and identifying patterns, such as medication name, dosage, and quantity, in a semi-automated way.
To improve the understanding of the extracted text, we use the compromise library, an NLP (Natural Language Processing) solution. This technology allows identifying entities, numbers, and keywords in the text, making recognition more accurate even when there are small OCR errors or writing variations.
Learn more about the compromise library at: compromise.cool