Skip to main content

Medical Certificate Scanner | Flutter 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 a classic component (types of components are explained here).

Take a look at our Example Apps to see how to integrate the Generic Documents Scanner.

Medical Certificate Scanner Classic

Integration of Medical Certificate Scanner Classic Components

Use the classes MedicalCertificateScannerCamera, MedicalCertificateCameraLiveDetector and ScanbotCameraController to build a custom scanner UI for German Medical Certificate scanning.

Create MedicalCertificateCameraLiveDetector instance and attach it to MedicalCertificateScannerCamera

MedicalCertificateScannerCamera provides the ability to subscribe to medical certificate scanning results with 2 callbacks:

  • mcListener - scanning results
  • errorListener - license errors
late MedicalCertificateCameraLiveDetector mcCameraDetector;

...

mcCameraDetector = MedicalCertificateCameraLiveDetector(
mcListener: (scanningResult) {
print(scanningResult.toString());
},
errorListener: (error) {
// Error listener will inform if there is a problem with the license when opening the screen.
print(error);
},
);
Add MedicalCertificateScannerCamera to the widget tree
 ScanbotCameraController? controller;

...

MedicalCertificateScannerCamera(
cameraDetector: mcCameraDetector,
configuration: MedicalCertificateCameraConfiguration(
flashEnabled: flashEnabled,
scannerConfiguration:
MedicalCertificateClassicScannerConfiguration(
recognizePatientInfo: true,
recognizeBarcode: true,
captureHighResolutionImage: true),
finder: FinderConfiguration(decoration: BoxDecoration(
border: Border.all(
width: 5,
color: Colors.deepPurple,),
borderRadius:
const BorderRadius.all(Radius.circular(20)))),
onWidgetReady: (controller) {
// After the camera has initialized, you are able to control the camera parameters.
this.controller = controller;
}
...
),
...
)
MedicalCertificateScannerCamera
final MedicalCertificateCameraLiveDetector cameraDetector;

final MedicalCertificateCameraConfiguration configuration;

final Function(ScanbotCameraController controller) onWidgetReady;

/// Triggers when the camera plugin needs to do some heavy processing eg. saving the snap as an image.
final Function(bool)? onHeavyOperationProcessing;
MedicalCertificateCameraConfiguration
/// Controls whether the flash should be initially enabled.
/// The default value is FALSE.
bool? flashEnabled;

/// Sets the current zoom by a linear zoom value ranging from 0f to 1.0f.
/// Optical Zoom Level 0f represents the minimum zoom
/// while Optical Zoom Level 1.0f represents the maximum zoom.
/// Default value is 0.
double? cameraZoomFactor;

FinderConfiguration? finder;

MedicalCertificateClassicScannerConfiguration scannerConfiguration;
FinderConfiguration
/// The rectangle that perforates the background and that will be presented as the finder.
BoxDecoration decoration;

/// This widget will be drawn on top of the finder.
/// Here you can add some custom design elements, for example, a QR code watermark.
Widget? widget;

/// Something that should be shown between the top of the finder and the camera view.
Widget? topWidget;

/// Something that should be shown between the bottom of the finder and the camera view.
Widget? bottomWidget;

/// The overlay background color, surrounding the finder view rectangle.
Color? backgroundColor;

/// The finder view rectangle aspect ratio.
FinderAspectRatio? finderAspectRatio;

/// The finder view minimum padding from the bounds of the screen.
double finderMinimumPadding;

/// Triggers when the finder area is changed.
/// Can be helpful when aligning some content on top of the finder.
final OnFinderRectChange? onFinderRectChange;
MedicalCertificateClassicScannerConfiguration
  /// Controls whether the patient info block should be recognized.
bool recognizePatientInfo;

/// Controls whether the data from the barcode (if present) should be read.
/// This can result in more accurate data recognition.
bool recognizeBarcode;

/// Take a high-res snapshot of the medical certificate (after it has been detected) and run the recognition on this image.
bool captureHighResolutionImage;
ScanbotCameraController

ScanbotCameraController provides the ability to control camera functionality:

  • isFlashAvailable - to check if the flashlight is available on the device.
  • setFlashEnabled - to enable the flashlight.

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?