Skip to main content

Medical Certificate Scanner UI Components | Android Document Scanner

Introduction

The Scanbot SDK provides the ability to find and extract content from German Medical Certificates (MC / AU-Bescheinigung forms).

The following fields can be extracted:

  • Checkboxes:
    • Initial Certificate (Erstbescheinigung)
    • Renewed Certificate (Folgebescheinigung)
    • Work Accident (Arbeitsunfall, Arbeitsunfallfolgen, Berufskrankheit)
    • Assigned To Accident Insurance Doctor (dem Durchgangsarzt zugewiesen)
  • Date Fields:
    • Incapable Since (arbeitsunfähig seit)
    • Incapable Until (voraussichtlich arbeitsunfähig bis ...)
    • Diagnosed On (festgestellt am)
  • Patient information:
    • Insured Person Age - Adult or Child
    • Insurance Provider
    • First Name
    • Last Name
    • Address
    • Diagnosis
    • Health Insurance Number
    • Insured Person Number
    • Status
    • Place Of Operation Number
    • Doctor Number

The Medical Certificate recognizer is available as an RTU UI and as a classic component (types of components are explained here).

alt text

Integration

Take a look at our Example Apps to see how to integrate the Medical Certificate Scanner.

Add Feature as a Dependency

MedicalCertificateScanner is available with SDK Package 4. You have to add the following dependencies for it:

implementation("io.scanbot:sdk-package-4:$latestSdkVersion")
implementation("io.scanbot:sdk-mc-assets:$latestSdkVersion")
implementation("io.scanbot:sdk-common-ocr-assets:$latestSdkVersion") // <<-- please also add this dependency
implementation("io.scanbot:io.scanbot:sdk-package-ui:$latestSdkVersion")

Some Medical Certificates contain additional information in the barcode. For such cases you also have to add the dependency with Barcode Scanner assets:

implementation("io.scanbot:sdk-barcode-assets:$latestSdkVersion")
caution

Please do not use multiple scanners at the same time. For example, do not combine generic document scanner, health insurance scanner, text data scanner, etc. at the same time! Each scanner instance requires a lot of memory, GPU, and processor resources. Using multiple scanners will lead to performance issues for the entire application.

Initialize the SDK

The Medical Certificate Scanner is based on the OCR feature of the Scanbot SDK. Please check the docs for more details.

In order to use the Medical Certificate Scanner you need to prepare the English OCR language file. Place the eng.traineddata file in the assets sub-folder assets/ocr_blobs/ of your app.

Then on initialization of the SDK call the prepareOCRLanguagesBlobs(true) method:

Initialize SDK
loading...
caution

Unfortunately, we have noticed that all devices using a Cortex A53 processor DO NOT SUPPORT GPU acceleration. If you encounter any problems, please disable GPU acceleration for these devices.

ScanbotSDKInitializer()
.allowGpuAcceleration(false)

Ready-To-Use UI Component

Ready-To-Use UI Component (activity) that is responsible for recognizing Medical Certificates is MedicalCertificateScannerActivity.

Starting and configuring RTU Medical Certificate Scanner

First of all, you have to add the SDK package and feature dependencies as described here.

Initialize the SDK as described here. More information about the SDK license initialization can be found here.

To start the RTU UI Medical Certificate Scanner you only have to start a new activity and be ready to process its result later.

Start RTU Medical Certificate Scanner and handle the result
loading...
(DEPRECATED) Start RTU Medical Certificate Scanner
loading...
(DEPRECATED) Handle RTU Medical Certificate Scanner result
loading...

An instance of MedicalCertificateScannerConfiguration is required for starting the RTU UI activity. It allows configuration changes through methods it exposes:

Set RTU Medical Certificate Scanner configuration
loading...
info

All parameters in MedicalCertificateScannerConfiguration are optional.

API references for all of these methods can be found on this page.

Handling the result

Below is a simple example of presenting the result: MedicalCertificateScanningResult fields, shown in a Toast notification.

Handle RTU Medical Certificate Scanner result
loading...

Full API references for the result class are available here.

Classic component

Try our Medical Certificate Scanner Example App or check the following step by step integration instructions.

MedicalCertificateScanner can be used in conjunction with ScanbotCameraXView or separately. Let's have a look at an example with ScanbotCameraXView.

Add feature dependencies and initialize the SDK

First of all, you have to add the SDK package and feature dependencies as described here.

Initialize the SDK as described here. More information about the SDK license initialization can be found here.

Add ScanbotCameraXView to layout

<io.scanbot.sdk.ui.camera.ScanbotCameraXView
android:id="@+id/camera_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />

Get MedicalCertificateScanner instance from ScanbotSDK and attach it to ScanbotCameraXView

Attach Medical Certificate Scanner to ScanbotCameraXView
loading...

Add a snapping result listener for IScanbotSdkView

Add snapping result listener
loading...

To detect full Medical Certificate information you have to perform the Certificate recognition on the snapped image.

Process the taken picture
loading...

If resultInfo is not null and resultInfo.recognitionSuccessful flag is true then Medical Certificate content was successfully recognized.

As the result you will get a MedicalCertificateScanningResult object that contains all extracted data:

  • checkBoxes: List<MedicalCertificateCheckBox> - list of the checkboxes with content types, states and confidence values
  • dates: List<MedicalCertificateDateRecord> - list of the MedicalCertificateDateRecord objects with recognized dates, date types, recognitionConfidenceValues and validationConfidenceValues
  • patientInfoBox - zone of patient info:
    • patientInfoFields: List<MedicalCertificatePatientInfoBox> - list of the MedicalCertificatePatientInfoBox objects with information about the patient, recognitionConfidenceValues and validationConfidenceValues
  • formType: MedicalCertificateFormType - type of the Medical Certificate

Add a Finder Overlay

In addition, it is also possible to add a "Finder Overlay". This feature allows you to predefine a Medical Certificate document area over the ScanbotCameraXView screen. By using this overlay the Medical Certificate Scanner can skip the time-consuming step "Search for Medical Certificate area" and perform the recognition directly in the specified "Finder Overlay" area. By using this approach the Medical Certificate Scanner recognizes the document and extracts the content much faster.

Details about applying finder view logic in the layout and in the code can be found here.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?