SMART 지원 HealthLake 데이터 스토어에서 FHIR REST API 요청 - AWS HealthLake

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

SMART 지원 HealthLake 데이터 스토어에서 FHIR REST API 요청

FHIR 지원 HealthLake 데이터 스토어의 SMART에서 FHIR REST API 요청을 할 수 있습니다. 다음 예제에서는 권한 부여 헤더에 JWT가 포함된 클라이언트 애플리케이션의 요청과 Lambda가 응답을 디코딩하는 방법을 보여줍니다. 클라이언트 애플리케이션 요청이 승인 및 인증된 후에는 권한 부여 서버로부터 보유자 토큰을 받아야 합니다. FHIR 지원 HealthLake 데이터 스토어의 SMART에서 FHIR REST API 요청을 보낼 때 권한 부여 헤더의 보유자 토큰을 사용합니다.

GET https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Patient/[ID] Authorization: Bearer auth-server-provided-bearer-token

권한 부여 헤더에서 보유자 토큰이 발견되고 AWS IAM 자격 증명이 감지되지 않았기 때문에 HealthLake는 FHIR에서 SMART를 활성화한 HealthLake 데이터 스토어가 생성될 때 지정된 Lambda 함수를 호출합니다. Lambda 함수에 의해 토큰이 성공적으로 디코딩되면 다음 예제 응답이 HealthLake로 전송됩니다.

{ "authPayload": { "iss": "https://authorization-server-endpoint/oauth2/token", # The issuer identifier of the authorization server "aud": "https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/", # Required, data store endpoint "iat": 1677115637, # Identifies the time at which the token was issued "nbf": 1677115637, # Required, the earliest time the JWT would be valid "exp": 1997877061, # Required, the time at which the JWT is no longer valid "isAuthorized": "true", # Required, boolean indicating the request has been authorized "uid": "100101", # Unique identifier returned by the auth server "scope": "system/*.*" # Required, the scope of the request }, "iamRoleARN": "iam-role-arn" #Required, IAM role to complete the request }