

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# FHIR リソースの読み取り
<a name="managing-fhir-resources-read"></a>

FHIR `read`インタラクションは、HealthLake データストア内のリソースの現在の状態を読み取ります。詳細については、FHIR R4 RESTful API ドキュメント[https://hl7.org/fhir/R4/http.html#read](https://hl7.org/fhir/R4/http.html#read)の「」を参照してください。 ** R4 RESTful **

**FHIR リソースを読み取るには**  


1. HealthLake `region`と `datastoreId`の値を収集します。詳細については、「[データストアのプロパティの取得](managing-data-stores-describe.md)」を参照してください。

1. 関連する`id`値`Resource`を読み取って収集する FHIR のタイプを決定します。詳細については、「[リソースタイプ:](reference-fhir-resource-types.md)」を参照してください。

1. HealthLake `region`と の収集された値を使用して、リクエストの URL を作成します`datastoreId`。FHIR `Resource`タイプと関連する も含めます`id`。次の例の URL パス全体を表示するには、**コピー**ボタンをスクロールします。

   ```
   GET https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Resource/id
   ```

1.  リクエストを送信します。FHIR `read`インタラクションは、[AWS 署名バージョン 4 ](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html)または SMART on FHIR 認可のいずれかの`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 ]

   [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_IdentityProviderConfiguration.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_IdentityProviderConfiguration.html) データ型の 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 スコープ](reference-smart-on-fhir-oauth-scopes.md)」を参照してください。

------
#### [ AWS Console ]

   1. HealthLake コンソールの[クエリの実行](https://console.aws.amazon.com/healthlake/home#/crud)ページにサインインします。

   2. **クエリ設定**セクションで、次の選択を行います。
   + **データストア ID** — データストア ID を選択してクエリ文字列を生成します。
   + **クエリタイプ** — を選択します`Read`。
   + **リソースタイプ** — 読み取る FHIR [リソースタイプ](reference-fhir-resource-types.md)を選択します。
   + **リソース ID** — FHIR リソース ID を入力します。

   3. **[Run query]** (クエリの実行) を選択します。

------