

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 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)의 섹션을 참조하세요.

**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` 상호 작용은 FHIR 권한 부여 시 [AWS 서명 버전 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) 또는 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 ]

   [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_IdentityProviderConfiguration.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_IdentityProviderConfiguration.html) 데이터 형식에 대한 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 범위](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. **쿼리 실행**을 선택합니다.

------