US Healthcare Cards OCR

Mindee’s US Healthcare Cards API uses deep learning to automatically, accurately, and instantaneously parse your documents details. In a few seconds, the API extracts a set of data from your PDFs or photos of US healthcare cards, including:

  • Company Name

  • Member Name

  • Member ID

  • Issuer 80840

  • Dependents

  • Group Number

  • Payer ID

  • RX BIN

  • RX GRP

  • RX PCN

  • Copays

  • Enrollment date

The US Healthcare Cards OCR API supports documents from the USA. The healthcare cards from other nationalities and states are not supported with this model.

Set up the API

Create an API key

To begin using the Mindee V1 OCR API, your first step is to create your V1 API key.

  1. You'll need a healthcare card sample. You can use the sample document provided below.

  2. Access your US Healthcare Cards API by clicking on the corresponding product card in the Document Catalog

  3. From the left navigation, go to documentation > API Reference, you'll find sample code in popular languages and command line.

from mindee import Client, product, AsyncPredictResponse

# Init a new client
mindee_client = Client(api_key="my-api-key-here")

# Load a file from disk
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")

# Load a file from disk and enqueue it.
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
    product.us.HealthcareCardV1,
    input_doc,
)

# Print a brief summary of the parsed data
print(result.document)
  • Replace my-api-key-here with your new API key, or use the select an API key feature and it will be filled automatically.

  • Copy and paste the sample code of your desired choice in your application, code environment, terminal etc.

  • Replace /path/to/the/file.ext with the path to your input document.

  1. Run your code. You will receive a JSON response with document details.

API Response

Here is the full JSON response you get when you call the API:

{
  "api_request": {
    "error": {},
    "resources": [
      "document",
      "job"
    ],
    "status": "success",
    "status_code": 200,
    "url": "https://api.mindee.net/v1/products/mindee/us_healthcare_cards/v1/documents/f003d541-8c70-4799-9d39-d7eb5fea8463"
  },
  "document": {
    "id": "f003d541-8c70-4799-9d39-d7eb5fea8463",
    "inference": {
      "extras": {},
      "finished_at": "2024-10-29T15:36:07.300000",
      "is_rotation_applied": true,
      "pages": [
        {
          "extras": {},
          "id": 0,
          "orientation": {
            "value": 0
          },
          "prediction": {}
        }
      ],
      "prediction": {
        "company_name": {
          "value": "UnitedHealthcare"
        },
        "copays": [
          {
            "service_fees": 40,
            "service_name": "specialist"
          }
        ],
        "dependents": [],
        "enrollment_date": {
          "value": null
        },
        "group_number": {
          "value": "12345"
        },
        "issuer_80840": {
          "value": null
        },
        "member_id": {
          "value": "12345678900"
        },
        "member_name": {
          "value": "John Smith"
        },
        "payer_id": {
          "value": null
        },
        "rx_bin": {
          "value": "610097"
        },
        "rx_grp": {
          "value": "COS"
        },
        "rx_pcn": {
          "value": "9999"
        }
      },
      "processing_time": 2.547,
      "product": {
        "features": [
          "company_name",
          "member_name",
          "member_id",
          "issuer_80840",
          "dependents",
          "group_number",
          "payer_id",
          "rx_bin",
          "rx_grp",
          "rx_pcn",
          "copays",
          "enrollment_date"
        ],
        "name": "mindee/us_healthcare_cards",
        "type": "standard",
        "version": "1.0"
      },
      "started_at": "2024-10-29T15:36:04.604000"
    },
    "n_pages": 1,
    "name": "ucard.jpg"
  },
  "job": {
    "available_at": "2024-10-29T15:36:07.311000",
    "error": {},
    "id": "5be897aa-b930-4d5d-bf6f-6eeaaf24befe",
    "issued_at": "2024-10-29T15:36:04.604000",
    "status": "completed"
  }
}

You can find the prediction within the prediction key found in document > inference > prediction for document-level predictions: it contains the different fields extracted at the document level, meaning that for multi-pages PDFs, we reconstruct a single object using all the pages.

Detailed Field Information

Using the above document example the following are the basic fields that can be extracted.

Company Name

  • company_name: The name of the company that provides the healthcare plan.

{
  "company_name": {
    "value": "UnitedHealthcare"
  }
}

Member Name

  • member_name: The name of the member covered by the healthcare plan.

{
  "member_name": {
    "value": "John Smith"
  }
}

Member ID

  • member_id: The unique identifier for the member in the healthcare system.

{
  "member_id": {
    "value": "12345678900"
  }
}

Issuer 80840

  • issuer_80840: The organization that issued the healthcare plan.

{
  "issuer_80840": {
    "value": null
  }
}

Dependents

  • dependents: The list of dependents covered by the healthcare plan.

{
  "dependents": []
}

Group Number

  • group_number: The group number associated with the healthcare plan.

{
  "group_number": {
    "value": "12345"
  }
}

Payer ID

  • payer_id: The unique identifier for the payer in the healthcare system.

{
  "payer_id": {
    "value": null
  }
}

RX BIN

  • rx_bin: The BIN number for prescription drug coverage.

{
  "rx_bin": {
    "value": "610097"
  }
}

RX GRP

  • rx_grp: The group number for prescription drug coverage.

{
  "rx_grp": {
    "value": "COS"
  }
}

RX PCN

  • rx_pcn: The PCN number for prescription drug coverage.

{
  "rx_pcn": {
    "value": "9999"
  }
}

Copays

  • copays: Is a fixed amount for a covered service.

    • service_name: The name of service of the copay.

    • service_fees: The price of service.

{
  "copays": [
    {
      "service_fees": 40,
      "service_name": "specialist"
    }
  ]
}

Enrollment Date

  • enrollment_date: The date when the member enrolled in the healthcare plan.

{
  "enrollment_date": {
    "value": null
  }
}

Last updated

Was this helpful?