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.




  1. You’ll need a free account. Sign up and confirm your email to login.
  2. 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 card OCR



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 for setting up the API, and my setup looks like this:


Medicare  health insurance ocr



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.


Medicare health insurance card define your model OCR


To go further, you can either download this json config to set up your data model (there is an upload button on the left part of the screen), or you can do it manually. Here is the config:


Cardholder: type String. The cardholder name never contains numeric characters, you can specify this by clicking the corresponding checkbox


Cardholder  health insurance ocr



ID Number: type String. It's composed of both alpha and numeric characters so we don't put any specification for the claim number.


Claim number  health insurance ocr



Sex: type String. Like cardholder, there are no numeric characters for this one.


Gender field for  health insurance ocr



Hospital effective date: type Date


Hospital effective date health insurance ocr



Medical  effective date: type Date


Medical effictive date health insurance OCR


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


Medicare health insurance card OCR




Train your health insurance card 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 questions regarding your use case, feel free to reach out on our chat!