healthcard_rust

Crates.iohealthcard_rust
lib.rshealthcard_rust
version0.1.2
sourcesrc
created_at2020-09-07 00:54:14.411534
updated_at2022-09-22 01:25:42.071558
descriptionRead data from German public health insurance cards (Elektronische Gesundheitskarte eGK)
homepage
repository
max_upload_size
id285571
size17,852
Johannes Waigel (waigel)

documentation

README

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.

Commit count: 0

cargo fmt