Medicare health insurance card OCR

This article explains how to quickly build and deploy an accurate OCR API that extracts data from US Medicare health insurance cards using our deep learning engine. It can be adapted to any type of health insurance card from other providers.

Prerequisites
You’ll need a free account. Sign up and confirm your email to login.
You’ll need at least 20 Health insurance card images or pdfs to train your OCR.

Define your Health Insurance card data model

First, we’re going to define what fields we want to extract from your health insurance cards.

Health insurance key data extractionHealth insurance key data extraction

Health insurance key data extraction

Here is the field list we want our algorithm to look for in your documents:

  • Card owner: The full name card owner
  • ID Number: The unique identifier claim number
  • Sex: Gender of the card owner
  • Hospital effective date: Start date of the hospital coverage
  • Medical effective date: Start date of the medical coverage

If you're following this article for other types of health insurance cards, feel free to add as many as you want.

Deploy your API

Once you have defined the field list, head over to the platform and press the ‘Create a new API’ button.

You land now on the setup page. Here is the image you can use to set up the API. For instance, my setup is as follows:
Set up your APISet up your API

Set up your API

Once you’re ready, click on the “next” button. You land on a new page where we are going to define more technically the required field we want to extract in our new OCR API.

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": { "alpha": -1, "numeric": 0 } },
          "handwritten": false,
          "name": "cardholder",
          "public_name": "Cardholder",
          "semantics": "word"
        },
        {
          "cfg": { "filter": { "alpha": -1, "numeric": -1 } },
          "handwritten": false,
          "name": "id_number",
          "public_name": "ID Number",
          "semantics": "word"
        },
        {
          "cfg": { "filter": { "alpha": -1, "numeric": 0 } },
          "handwritten": false,
          "name": "sex",
          "public_name": "Sex",
          "semantics": "word"
        },
        {
          "cfg": { "filter": { "convention": "US" } },
          "handwritten": false,
          "name": "hospital_effective_date",
          "public_name": "Hospital effective date",
          "semantics": "date"
        },
        {
          "cfg": { "filter": { "convention": "US" } },
          "handwritten": false,
          "name": "medical_effective_date",
          "public_name": "Medical  effective date",
          "semantics": "date"
        }
      ],
      "features_name": [
        "cardholder",
        "id_number",
        "sex",
        "hospital_effective_date",
        "medical_effective_date"
      ]
    }
  }
}

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:

  • Cardholder: type String. The cardholder name never contains numeric characters, you can specify this by clicking the corresponding checkbox
  • ID Number: type String. It's composed of both alpha and numeric characters so we don't put any specification for the claim number.
  • Sex: type String. Like cardholder, there are no numeric characters for this one.
  • Hospital effective date: type Date
  • Medical effective date: type Date

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 health insurance card model

Train your modelTrain your model

Train your model

Your setup is done. You can now deploy your API and train your model for automatically extracting data from your health insurance cards using the API.

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

Updated 4 months ago


Medicare health insurance card OCR


Suggested Edits are limited on API Reference Pages

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