Medical prescription OCR

Reading this article you'll be able to build an OCR API that extracts data from medical prescriptions using our deep learning engine.


  1. You’ll need a free account. Sign up and confirm your email to login.
  2. You’ll need at least 20 different medical prescription images or pdfs to train your OCR model

Define your medical prescription use case

First, we’re going to define what fields we want to extract from your medical prescription.

Here is the list of fields we are going to extract using our OCR API:

  • Date
  • Doctor's name
  • Patient's name
  • Address: Of the medical center
  • Phone number: Of the medical center

That’s it for our use case. Feel free to add any other relevant data to fit your requirements.

Deploy your API

Once you have defined what fields you want to extract, head over to the platform and press the ‘Create a new API’ button.

You land now on the setup page. You can use any image you want for setting up the API, my setup looks like this:

Set up your modelSet up your model

Set up your model

Once you’re ready, click on the “next” button. We are going to specify the data types for each of the fields we want our API to extract.

Define your modelDefine your model

Define your model

To move forward, you have two possibilities:

Upload a json config
Copy the following JSON into a file and upload it on the interface

  "problem_type": {
    "classificator": { "features": [], "features_name": [] },
    "selector": {
      "features": [
          "cfg": { "filter": { "convention": "FR" } },
          "handwritten": false,
          "name": "date",
          "public_name": "Date",
          "semantics": "date"
          "cfg": { "filter": { "alpha": -1, "numeric": 0 } },
          "handwritten": false,
          "name": "doctor_s_name",
          "public_name": "Doctor's name",
          "semantics": "word"
          "cfg": { "filter": { "alpha": -1, "numeric": 0 } },
          "handwritten": false,
          "name": "patient_s_name",
          "public_name": "Patient's name",
          "semantics": "word"
          "cfg": { "filter": { "alpha": -1, "numeric": -1 } },
          "handwritten": false,
          "name": "medical_center_s_address",
          "public_name": "Medical center's address",
          "semantics": "word"
          "handwritten": false,
          "name": "medical_center_s_phone_number",
          "public_name": "Medical center's phone number",
          "semantics": "phone"
      "features_name": [

Or build your data model manually
Using the interface, add up to your data model each field.

In our example, here are the different field configurations we used:

  • Date: in European format
  • Doctor's name: A name never contains numeric characters
  • Patient's name: A name never contains numeric characters
  • Medical center's address: an address may contain both numeric and alpha characters
  • Medical center's phone number

Once you’re done setting up your data model, press the Start training your model button at the bottom of the screen.

Ready to train modelReady to train model

Ready to train model

Train your medical prescription OCR

Train your modelTrain your model

Train your model

You’re all set!

Now is the time to train your medical prescription deep learning model in the Training section of our API. You will soon be able to use your custom OCR API for medical prescriptions! When you will reach at least 20 documents to train your model you will receive a confirmation email allowing your model to make predictions.

To get more information about the training phase, please refer to the Getting Started tutorial. If you have any questions regarding your use case, feel free to reach out on our chat!

Updated 8 months ago

Medical prescription OCR

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.