Skip to main content

Medical Certificate Recognizer | Capacitor Document Scanner

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

alt text

Integrating the Medical Certificate Recognizer UI

Use the plugin API method ScanbotSDK.startMedicalCertificateRecognizer() to start the Medical Certificate Recognizer UI.

import { ScanbotSDK, MedicalCertificateRecognizerConfiguration } from 'capacitor-plugin-scanbot-sdk';
// Always make sure you have a valid license on runtime via ScanbotSDK.getLicenseInfo()
if (!licenseCheckMethod()) { return; }

const configuration: MedicalCertificateRecognizerConfiguration = {
// Customize colors, text resources, behavior, etc..
topBarBackgroundColor: "#c8193c",
cancelButtonTitle: "Cancel",
finderLineColor: "#c8193c",
finderLineWidth: 5,
orientationLockMode: "PORTRAIT",
// see further configs...
};

const result = await ScanbotSDK.startMedicalCertificateRecognizer(configuration);

if (result.status === 'CANCELED') {
// user has canceled the scanning operation
return;
}

// handle the extracted data
// result.medicalCertificateScannerResult...
Options:
export interface MedicalCertificateRecognizerConfiguration {
/** The preferred camera module (default - BACK) */
cameraModule?: CameraModule;

/** Background color outside of the finder window. */
cameraOverlayColor?: string;

/** Title of the cancel button. */
cancelButtonTitle?: string;

/** Whether the cancel button is hidden or not. iOS only. */
cancelButtonHidden?: boolean;

/** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */
enableCameraButtonTitle?: string;

/** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */
enableCameraExplanationText?: string;

/** Foreground color of the detection overlay. */
finderLineColor?: string;

/** Width of finder frame border. Default is 2. */
finderLineWidth?: number;

/** Controls whether the flash toggle button is hidden or not. iOS only. */
flashButtonHidden?: boolean;

/** Title of the flash toggle button. iOS only. */
flashButtonTitle?: string;

/** Controls whether the flash should be initially enabled. The default value is FALSE. */
flashEnabled?: boolean;

/** UI Interface orientation lock mode */
orientationLockMode?: OrientationLockMode;

/** The background color of the top toolbar. */
topBarBackgroundColor?: string;

/** The color of all active toggle buttons in the toolbar. */
topBarButtonsActiveColor?: string;

/** The color of all inactive toggle buttons in the toolbar. */
topBarButtonsInactiveColor?: string;

/** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */
useButtonsAllCaps?: boolean;

/** The background color of the user guidance hints. */
userGuidanceBackgroundColor?: string;

/** The text color of the user guidance hints. */
userGuidanceTextColor?: string;

/** Whether the user guidance label is hidden or not. iOS only. */
userGuidanceHidden?: boolean;

/** Whether sdk should run recognition of Patient Information block. */
recognizePatientInfo?: boolean;

/** Whether sdk should return cropped document image or not */
returnCroppedDocumentImage?: boolean;

/** The style of the dialog/alert in case of error. iOS only. */
errorDialogStyle?: DialogStyle;

/** Error dialog title */
errorDialogTitle?: string;

/** The accent color of buttons on a error dialog. */
errorDialogAccentColor?: string;

/** Error dialog message */
errorDialogMessage?: string;

/** Error dialog ok button text. */
errorDialogOkButton?: string;

/** Allows to set if the confirm button should be filled. Android only. */
errorDialogOkButtonFilled?: boolean;

/** Allows to set a text color of the filled button. Android only. */
errorDialogOkButtonFilledTextColor?: string;

/** The style of the dialogs/alerts OK button in case of error. iOS only. */
errorDialogButtonStyle?: DialogButtonStyle;

/** Option to show or hide finder overlay */
showFinderOverlay?: boolean;

/** Configuration that helps to override default hint values */
userGuidanceStrings?: MedicalCertificateUserGuidanceStrings;

/** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */
cameraPreviewMode?: CameraPreviewMode;

/** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */
touchToFocusEnabled?: boolean;

/** Aspect ratio of the view finder (width \ height). Set to nil of no view finder should be displayed. iOS only. */
finderAspectRatio?: AspectRatio;

/** Secondary aspect ratio of finder frame (width \ height). Set to nil if no secondary view finder should be displayed. iOS only. */
finderSecondaryAspectRatio?: AspectRatio;
}

The result will be returned as below:

export interface MedicalCertificateScannerResult {
/** The Medical Certificate Form Type */
formType: MedicalCertificateFormType;
/** Image file URI of the captured Medical Certificate */
imageFileUri?: string;
/** The extracted patient data */
patientData: MedicalCertificatePatientDataInfo;
/** The extracted dates data */
dates: MedicalCertificateDatesInfo;
/** The extracted checkboxes data. It contains information about the medical form checkboxes type and whether they are checked or not. */
checkboxes: MedicalCertificateCheckboxesInfo;
}

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?