16个稳定版本 (4个主要版本)
5.0.5+20240605 | 2024年6月27日 |
---|---|
5.0.4+20240228 | 2024年3月5日 |
5.0.3+20221220 | 2023年8月23日 |
5.0.2+20221220 | 2023年3月16日 |
1.0.10+20190628 | 2019年7月6日 |
#2 in #healthcare
109 每月下载次数
用于 google-healthcare1_beta1-…
3MB
32K SLoC
google-healthcare1_beta1
库允许访问Google Cloud Healthcare服务的所有功能。
本文档是从 Cloud Healthcare crate版本 5.0.5+20240605 生成的,其中 20240605 是由 mako 代码生成器 v5.0.5 构建的 healthcare:v1beta1 架构的确切修订。
有关Cloud Healthcare v1_beta1 API的所有其他信息,请参阅官方文档站点。
功能
轻松从中央中心处理以下 资源 ...
- 项目
- locations datasets annotation stores annotations create, locations datasets annotation stores annotations delete, locations datasets annotation stores annotations get, locations datasets annotation stores annotations list, locations datasets annotation stores annotations patch, locations datasets annotation stores create, locations datasets annotation stores delete, locations datasets annotation stores evaluate, locations datasets annotation stores export, locations datasets annotation stores get, locations datasets annotation stores get iam policy, locations datasets annotation stores import, locations datasets annotation stores list, locations datasets annotation stores patch, locations datasets annotation stores set iam policy, locations datasets annotation stores test iam permissions, locations datasets consent stores attribute definitions create, locations datasets consent stores attribute definitions delete, locations datasets consent stores attribute definitions get, locations datasets consent stores attribute definitions list, locations datasets consent stores attribute definitions patch, locations datasets consent stores check data access, locations datasets consent stores consent artifacts create, locations datasets consent stores consent artifacts delete, locations datasets consent stores consent artifacts get, locations datasets consent stores consent artifacts list, locations datasets consent stores consents activate, locations datasets consent stores consents create, locations datasets consent stores consents delete, locations datasets consent stores consents delete revision, locations datasets consent stores consents get, locations datasets consent stores consents list, locations datasets consent stores consents list revisions, locations datasets consent stores consents patch, locations datasets consent stores consents reject, locations datasets consent stores consents revoke, locations datasets consent stores create, locations datasets consent stores delete, locations datasets consent stores evaluate user consents, locations datasets consent stores get, locations datasets consent stores get iam policy, locations datasets consent stores list, locations datasets consent stores patch, locations datasets consent stores query accessible data, locations datasets consent stores set iam policy, locations datasets consent stores test iam permissions, locations datasets consent stores user data mappings archive, locations datasets consent stores user data mappings create, locations datasets consent stores user data mappings delete, locations datasets consent stores user data mappings get, locations datasets consent stores user data mappings list, locations datasets consent stores user data mappings patch, locations datasets create, locations datasets data mapper workspaces get iam policy, locations datasets data mapper workspaces set iam policy, locations datasets data mapper workspaces test iam permissions, locations datasets deidentify, locations datasets delete, locations datasets dicom stores create, locations datasets dicom stores deidentify, locations datasets dicom stores delete, locations datasets dicom stores dicom web studies get study metrics, locations datasets dicom stores dicom web studies series get series metrics, locations datasets dicom stores dicom web studies series instances get storage info, locations datasets dicom stores dicom web studies set blob storage settings, locations datasets dicom stores export, locations datasets dicom stores get, locations datasets dicom stores get dicom store metrics, locations datasets dicom stores get iam policy, locations datasets dicom stores import, locations datasets dicom stores list, locations datasets dicom stores patch, locations datasets dicom stores search for instances, locations datasets dicom stores search for series, locations datasets dicom stores search for studies, locations datasets dicom stores set blob storage settings, locations datasets dicom stores set iam policy, locations datasets dicom stores store instances, locations datasets dicom stores studies delete, locations datasets dicom stores studies retrieve metadata, locations datasets dicom stores studies retrieve study, locations datasets dicom stores studies search for instances, locations datasets dicom stores studies search for series, locations datasets dicom stores studies series delete, locations datasets dicom stores studies series instances bulkdata retrieve bulkdata, locations datasets dicom stores studies series instances delete, locations datasets dicom stores studies series instances frames retrieve frames, locations datasets dicom stores studies series instances frames retrieve rendered, locations datasets dicom stores studies series instances retrieve instance, locations datasets dicom stores studies series instances retrieve metadata, locations datasets dicom stores studies series instances retrieve rendered, locations datasets dicom stores studies series retrieve metadata, locations datasets dicom stores studies series retrieve series, locations datasets dicom stores studies series search for instances, locations datasets dicom stores studies store instances, locations datasets dicom stores test iam permissions, locations datasets fhir stores apply admin consents, locations datasets fhir stores apply consents, locations datasets fhir stores configure search, locations datasets fhir stores create, locations datasets fhir stores deidentify, locations datasets fhir stores delete, locations datasets fhir stores explain data access, locations datasets fhir stores export, locations datasets fhir stores export history, locations datasets fhir stores fhir concept map-search-translate, locations datasets fhir stores fhir concept map-translate, locations datasets fhir stores fhir consent-enforcement-status, locations datasets fhir stores fhir observation-lastn, locations datasets fhir stores fhir patient-consent-enforcement-status, locations datasets fhir stores fhir patient-everything, locations datasets fhir stores fhir resource-incoming-references, locations datasets fhir stores fhir resource-purge, locations datasets fhir stores fhir resource-validate, locations datasets fhir stores fhir capabilities, locations datasets fhir stores fhir conditional delete, locations datasets fhir stores fhir conditional patch, locations datasets fhir stores fhir conditional update, locations datasets fhir stores fhir create, locations datasets fhir stores fhir delete, locations datasets fhir stores fhir execute bundle, locations datasets fhir stores fhir history, locations datasets fhir stores fhir patch, locations datasets fhir stores fhir read, locations datasets fhir stores fhir search, locations datasets fhir stores fhir search-type, locations datasets fhir stores fhir update, locations datasets fhir stores fhir vread, locations datasets fhir stores get, locations datasets fhir stores get fhir store metrics, locations datasets fhir stores get iam policy, locations datasets fhir stores import, locations datasets fhir stores import history, locations datasets fhir stores list, locations datasets fhir stores patch, locations datasets fhir stores rollback, locations datasets fhir stores set iam policy, locations datasets fhir stores test iam permissions, locations datasets get, locations datasets get iam policy, locations datasets hl7 v2 stores create, locations datasets hl7 v2 stores delete, locations datasets hl7 v2 stores export, locations datasets hl7 v2 stores get, locations datasets hl7 v2 stores get hl7v2 store metrics, locations datasets hl7 v2 stores get iam policy, locations datasets hl7 v2 stores import, locations datasets hl7 v2 stores list, locations datasets hl7 v2 stores messages batch get, locations datasets hl7 v2 stores messages create, locations datasets hl7 v2 stores messages delete, locations datasets hl7 v2 stores messages get, locations datasets hl7 v2 stores messages ingest, locations datasets hl7 v2 stores messages list, locations datasets hl7 v2 stores messages patch, locations datasets hl7 v2 stores patch, locations datasets hl7 v2 stores set iam policy, locations datasets hl7 v2 stores test iam permissions, locations datasets list, locations datasets operations cancel, locations datasets operations get, locations datasets operations list, locations datasets patch, locations datasets set iam policy, locations datasets test iam permissions, locations get, locations list and locations services nlp analyze entities
本库的结构
API结构为以下主要项目
所有 结构 都带有适用特性,以便进一步分类它们并简化浏览。
一般来说,您可以通过以下方式调用 活动
let r = hub.resource().activity(...).doit().await
或者具体来说 ...
let r = hub.projects().locations_datasets_dicom_stores_studies_series_instances_bulkdata_retrieve_bulkdata(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_instances_frames_retrieve_frames(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_instances_frames_retrieve_rendered(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_instances_retrieve_instance(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_instances_retrieve_metadata(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_instances_retrieve_rendered(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_retrieve_metadata(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_retrieve_series(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_series_search_for_instances(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_retrieve_metadata(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_retrieve_study(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_search_for_instances(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_search_for_series(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_studies_store_instances(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_search_for_instances(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_search_for_series(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_search_for_studies(...).doit().await
let r = hub.projects().locations_datasets_dicom_stores_store_instances(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__concept_map_search_translate(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__concept_map_translate(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__consent_enforcement_status(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__observation_lastn(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__patient_consent_enforcement_status(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__patient_everything(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__resource_incoming_references(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir__resource_validate(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_capabilities(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_conditional_patch(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_conditional_update(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_create(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_delete(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_execute_bundle(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_history(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_patch(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_read(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_search(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_search_type(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_update(...).doit().await
let r = hub.projects().locations_datasets_fhir_stores_fhir_vread(...).doit().await
资源(resource()
)和活动(activity(...)
)调用创建了构建器。第二个调用处理Activities
,支持配置即将进行的操作的各种方法(此处未展示)。它是这样的,即必须立即指定所有必需的参数(即 (...)
),而所有可选的都可以按照所需的方式构建。doit()
方法执行与服务器的实际通信,并返回相应的结果。
使用方法
设置你的项目
要使用此库,你需要在你的Cargo.toml
文件中添加以下行
[dependencies]
google-healthcare1_beta1 = "*"
serde = "^1.0"
serde_json = "^1.0"
一个完整的示例
extern crate hyper;
extern crate hyper_rustls;
extern crate google_healthcare1_beta1 as healthcare1_beta1;
use healthcare1_beta1::{Result, Error};
use std::default::Default;
use healthcare1_beta1::{CloudHealthcare, oauth2, hyper, hyper_rustls, chrono, FieldMask};
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
// `client_secret`, among other things.
let secret: oauth2::ApplicationSecret = Default::default();
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
// unless you replace `None` with the desired Flow.
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
// retrieve them from storage.
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = CloudHealthcare::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
// You can configure optional parameters by calling the respective setters at will, and
// execute the final call using `doit()`.
// Values shown here are possibly random and not representative !
let result = hub.projects().locations_datasets_fhir_stores_fhir__concept_map_search_translate("parent")
.url("magna")
.target("no")
.system("ipsum")
.source("voluptua.")
.concept_map_version("At")
.code("sanctus")
.doit().await;
match result {
Err(e) => match e {
// The Error enum provides details about what exactly happened.
// You can also just use its `Debug`, `Display` or `Error` traits
Error::HttpError(_)
|Error::Io(_)
|Error::MissingAPIKey
|Error::MissingToken(_)
|Error::Cancelled
|Error::UploadSizeLimitExceeded(_, _)
|Error::Failure(_)
|Error::BadRequest(_)
|Error::FieldClash(_)
|Error::JsonDecodeError(_, _) => println!("{}", e),
},
Ok(res) => println!("Success: {:?}", res),
}
处理错误
系统产生的所有错误都作为Result
枚举提供,作为doit()
方法的返回值,或者作为可能的中间结果传递给Hub Delegate或Authenticator Delegate。
当代理处理错误或中间值时,它们有机会指示系统重试。这使得系统可能对所有类型的错误都具有弹性。
上传和下载
如果某个方法支持下载,你应该读取响应体(它是Result的一部分),以获取媒体。如果此方法还支持Response Result,则默认返回该结果。你可以将其视为实际媒体的元数据。要触发媒体下载,你必须通过此调用设置构建器:.param("alt", "media")
。
支持上传的方法可以使用最多2种不同的协议:简单和可重试。每种协议的独特性由定制的doit(...)
方法表示,分别命名为upload(...)
和upload_resumable(...)
。
自定义和回调
您可以通过向doit()
方法提供代理来修改在调用最终doit()
调用之前的方式。将调用相应的方法以提供进度信息,并确定系统在失败时是否应该重试。
代理特质是默认实现的,允许您以最小的努力对其进行自定义。
服务器请求中的可选部分
本库提供的所有结构都设计为可以通过 编码 和 解码 来处理 json 格式。使用可选参数来表示部分请求或响应是有效的。大多数可选参数被认为是 Parts,这些可以通过名称识别,将被发送到服务器以指示请求的指定部分或响应中希望包含的部分。
构建器参数
使用 方法构建器,您可以通过多次调用其方法来准备一个动作调用。这些方法始终接受单个参数,以下语句是真实的。
参数将始终被复制或克隆到构建器中,以确保它们与原始生命周期的独立性。
Cargo 功能
utoipa
- 添加对 utoipa 的支持,并在所有类型上推导出utoipa::ToSchema
。您必须在#[openapi(schemas(...))]
中导入和注册所需的类型,否则生成的openapi
规范将是无效的。
许可证
healthcare1_beta1 库由 Sebastian Thiel 生成,并置于 MIT 许可证之下。您可以在存储库的 许可证文件 中阅读全文。
依赖项
~12–22MB
~338K SLoC