3 个版本
0.1.2 | 2022年9月22日 |
---|---|
0.1.1 | 2020年9月7日 |
0.1.0 | 2020年9月7日 |
#5 in #german
17KB
331 行
healthcard-rust
使用此 Rust 库,您可以轻松地从德国公共健康保险卡(电子健康卡 eGK)读取数据作为 json。
它基于此仓库:[https://github.com/Blueshoe/python-healthcard](https://github.com/Blueshoe/python-healthcard)
用法
一个简单的示例,以获取作为 json 对象的保险数据。
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())
}
库会自动寻找读卡器。如果有多个读卡器可用,它默认使用第一个。
示例响应
{
"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": ""
}
}
您可以在德语中了解更多关于 eGk 实现的信息:[https://fachportal.gematik.de/fileadmin/user_upload/fachportal/files/Spezifikationen/Basis-Rollout/Elektronische_Gesundheitskarte/gemLF_Impl_eGK_V160.pdf](https://fachportal.gematik.de/fileadmin/user_upload/fachportal/files/Spezifikationen/Basis-Rollout/Elektronische_Gesundheitskarte/gemLF_Impl_eGK_V160.pdf)
许可证
MIT 许可证
依赖关系
~2.2–3MB
~60K SLoC