本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
读取 FHIR 资源
FHIR read 交互读取 HealthLake数据存储中资源的当前状态。有关更多信息,请参阅 FHIR R4 RESTful API 文档read中的。
要读取 FHIR 资源
-
收集 HealthLake region和datastoreId价值。有关更多信息,请参阅 获取数据存储属性。
-
确定Resource要读取的 FHIR 类型并收集相关id值。有关更多信息,请参阅 资源类型。
-
使用收集到的 HealthLake region和值为请求构造一个 URL datastoreId。还要包括 FHIR Resource 类型及其关联id的。要查看以下示例中的整个 URL 路径,请滚动到 “复制” 按钮。
GET https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Resource/id
-
发送 请求。FHIR read 交互在 FHIR 授权上使用AWS 签名版本 4 或 SMART 的GET请求。以下curl示例读取了 FHIR Patient 资源的当前状态。 HealthLake要查看整个示例,请滚动到 “复制” 按钮。
- SigV4
-
Sigv4 授权
curl --request GET \
'https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Patient/id' \
--aws-sigv4 'aws:amz:region:healthlake' \
--user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
--header "x-amz-security-token:$AWS_SESSION_TOKEN" \
--header 'Accept: application/json'
- SMART on FHIR
-
该IdentityProviderConfiguration数据类型的 SMART on FHIR 授权示例。
{
"AuthorizationStrategy": "SMART_ON_FHIR",
"FineGrainedAuthorizationEnabled": true,
"IdpLambdaArn": "arn:aws:lambda:your-region:your-account-id:function:your-lambda-name",
"Metadata": "{\"issuer\":\"https://ehr.example.com\", \"jwks_uri\":\"https://ehr.example.com/.well-known/jwks.json\",\"authorization_endpoint\":\"https://ehr.example.com/auth/authorize\",\"token_endpoint\":\"https://ehr.token.com/auth/token\",\"token_endpoint_auth_methods_supported\":[\"client_secret_basic\",\"foo\"],\"grant_types_supported\":[\"client_credential\",\"foo\"],\"registration_endpoint\":\"https://ehr.example.com/auth/register\",\"scopes_supported\":[\"openId\",\"profile\",\"launch\"],\"response_types_supported\":[\"code\"],\"management_endpoint\":\"https://ehr.example.com/user/manage\",\"introspection_endpoint\":\"https://ehr.example.com/user/introspect\",\"revocation_endpoint\":\"https://ehr.example.com/user/revoke\",\"code_challenge_methods_supported\":[\"S256\"],\"capabilities\":[\"launch-ehr\",\"sso-openid-connect\",\"client-public\",\"permission-v2\"]}"
}
调用者可以在授权 lambda 中分配权限。有关更多信息,请参阅 OAuth 2.0 瞄准镜。
- AWS Console
-
1. 登录 HealthLake 控制台上的 “运行查询” 页面。
2. 在 “查询设置” 部分下,进行以下选择。
3. 选择运行查询。