讀取 FHIR 資源 - AWS HealthLake

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

讀取 FHIR 資源

FHIR read互動會讀取 HealthLake 資料存放區中資源的目前狀態。如需詳細資訊,請參閱 FHIR R4 RESTful API 文件read中的 。

讀取 FHIR 資源

  1. 收集 HealthLake regiondatastoreId 值。如需詳細資訊,請參閱取得資料存放區屬性

  2. 決定Resource要讀取和收集相關聯id值的 FHIR 類型。如需詳細資訊,請參閱資源類型

  3. 使用 HealthLake region和 的收集值來建構請求的 URLdatastoreId。同時包含 FHIR Resource類型及其相關聯的 id。若要在下列範例中檢視整個 URL 路徑,請捲動至複製按鈕。

    GET https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Resource/id
  4. 傳送 請求。FHIR read互動使用具有AWS 簽章第 4 版或 FHIR 授權上的 SMART 的GET請求。下列curl範例會讀取 HealthLake 中 FHIR Patient 資源的目前狀態。若要檢視整個範例,請捲動至複製按鈕。

    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 資料類型的 FHIR 上的 SMART 授權範例。

    { "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. 在查詢設定區段下,進行下列選擇。

    • 資料存放區 ID — 選擇資料存放區 ID 以產生查詢字串。

    • 查詢類型 — 選擇 Read

    • 資源類型 — 選擇要讀取的 FHIR 資源類型

    • 資源 ID — 輸入 FHIR 資源 ID。

    3. 選擇 Run query (執行查詢)。