#data #health #german #card #public #insurance #egk

healthcard_rust

Read data from German public health insurance cards (Elektronische Gesundheitskarte eGK)

3 releases

0.1.2 Sep 22, 2022
0.1.1 Sep 7, 2020
0.1.0 Sep 7, 2020

#3 in #german

46 downloads per month

MIT license

17KB
331 lines

healthcard-rust

With this rust library you can simply read data as json from German public health insurance cards. (Elektronische Gesundheitskarte eGK)

It is based off of this repo: https://github.com/Blueshoe/python-healthcard

Usage

A easy example to get insurance data as json object.

use healthcard_rust::*;

fn main() {
    println!("Read data from German public health insurance cards (eGK)");
    let card = get_card();
    println!("Generation {:?}", healthcard_rust::get_card_generation(&card));
    println!("{:?}", healthcard_rust::get_card_data(&card).to_string())
}

The lib is automatically looking for a card reader. If there are multiple card readers available it uses the first one be default.

Example response

{
  "insurance": {
    "additionalInfoBillingGkv": "number",
    "cmdVersion": "5.2.0",
    "costAccounting": "number",
    "costCarrierCountry": "string?",
    "costCarrierId": "number",
    "costCarrierName": "string?",
    "costCountry": "string?",
    "costName": "string?",
    "typeOfInsurance": "number?"
  },
  "patient": {
    "birthdate": "number",
    "cmdVersion": "5.2.0",
    "firstName": "string",
    "gender": "string?",
    "insurantId": "number",
    "lastName": "string",
    "nameAddition": "string?",
    "postalAddress": {
      "city": "string?",
      "mailbox": "string?",
      "zipCode": "string?"
    },
    "prefix": "string?",
    "residenceAddress": {
      "city": "string?",
      "country": "string?",
      "houseNumber": "number?",
      "street": "string?",
      "zipCode": "string?"
    },
    "title": ""
  }
}

You can read more about the implementaion of the eGk in German: https://fachportal.gematik.de/fileadmin/user_upload/fachportal/files/Spezifikationen/Basis-Rollout/Elektronische_Gesundheitskarte/gemLF_Impl_eGK_V160.pdf

License

Licensed under the MIT license.

Dependencies

~6MB
~99K SLoC