

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

# HealthLake 的整合式自然語言處理 (NLP)
<a name="integrating-nlp"></a>

AWS HealthLake 提供整合的自然語言處理 (NLP) 程式庫，用於剖析、識別和映射存放在 FHIR [https://hl7.org/fhir/R4/documentreference.html](https://hl7.org/fhir/R4/documentreference.html) 資源類型中的非結構化資料。

**Important (重要)**  
適用於 HealthLake 的整合式 NLP 預設為關閉。若要將其開啟，請使用 提交支援案例[AWS Support Center Console](https://console.aws.amazon.com/support/home#/)。若要建立您的案例，請登入您的 AWS 帳戶 ，然後選擇**建立案例**。

HealthLake 整合 NLP 的運作方式是呼叫 Amazon Comprehend Medical `DetectEntities-V2`、 `InferICD10-CM`和 `InferRxNorm` API 動作。動作會將結果附加為`DocumentReference`資源的延伸。當 Amazon Comprehend Medical API 動作偵測到 `SIGN`、 `SYMPTOM`和/或 的特徵`DIAGNOSIS`時，它們會產生 FHIR [https://hl7.org/fhir/R4/linkage.html](https://hl7.org/fhir/R4/linkage.html) 資源。新的 `Condition`和 `Observation` 資源是從以 `SIGN`、 `SYMPTOM`或 特性識別的實體建立，`DIAGNOSIS`並使用 `Linkage` 資源連結到來源文件。

**注意**  
雖然 HealthLake 整合 NLP 產生的 FHIR 資源支援`GET`請求，但 FHIR API `search`功能則不支援。若要進一步了解如何使用 HealthLake 與 Athena 的整合來搜尋 NLP 延伸模組，請參閱 [SQL 索引和查詢](integrating-athena.md)。

**Contents**
+ [HealthLake 整合式 NLP 程式庫](med-example.md)
+ [使用 FHIR REST API 互動](nlp-rest-api.md)
+ [HealthLake 整合式 NLP 的搜尋參數](search-parameters-med.md)
+ [HealthLake 整合 NLP 範例請求](cm-api-results.md)

# HealthLake 整合式 NLP 程式庫
<a name="med-example"></a>

HealthLake 會使用 Amazon Comprehend Medical 程式庫推斷`DocumentReference`資源類型中找到的資料。Amazon Comprehend Medical API 操作 `DetectEntities-V2`、 `InferICD10-CM`和 會將醫療情況`InferRxNorm`偵測為*特徵*。每個操作都提供不同的洞見。

**語言支援**  
Amazon Comprehend Medical API 操作只會偵測英文文字的醫療實體。
+ **DetectEntities-V2**：檢查各種醫療實體的臨床文字，並傳回其特定資訊，例如實體類別、位置和可信度分數。
+ **InferICD10-CM**：將病患記錄中的醫療狀況偵測為實體，並將這些實體連結至 CDC 國家健康統計中心 (WHO) 授權的 ICD-10-CM 知識庫中的標準化概念識別符。
+ **InferRxNorm**：將藥物偵測為患者記錄中列出的實體，並將其連結至國家醫學圖書館 RxNorm 資料庫中的標準化概念識別符。

每個 API 操作支援的特徵為 `SIGN`、 `SYMPTOM`和 `DIAGNOSIS`。如果偵測到特徵，則會將其新增為 HealthLake 資料存放區中不同位置的 FHIR 相容延伸。

**新增擴充功能的位置。**
+ `DocumentReference`：Amazon Comprehend Medical API 操作的結果會新增為 `DocumentReference` 資源類型中找到`extension`的每個文件的 。延伸模組中的結果分為兩個群組。您可以根據它們的 ，在結果中找到它們`URL`。
  + `http://healthlake.amazonaws.com/system-generated-resources/`
    + 這些是由 HealthLake 建立或新增至 的資源類型。
  + `http://healthlake.amazonaws.com/aws-cm/`
    + 將 Amazon Comprehend Medical API 操作的原始輸出新增至 HealthLake 資料存放區的位置。
+ `Linkage`：此資源類型是由於整合的 NLP 而新增或建立。特定 上的`GET`請求會`Linkage`傳回連結資源的清單。若要識別 HealthLake `Linkage` 是否已新增 ，請尋找新增的`"tag": [{"display": "SYSTEM_GENERATED"}]`鍵/值對。若要進一步了解 Linkage 的 FHIR 規格，請參閱 **FHIR R4 文件**[https://hl7.org/fhir/R4/linkage.html](https://hl7.org/fhir/R4/linkage.html)中的 。
+ Amazon Comprehend Medical 操作所產生的 FHIR 資源類型。
  + `Observation`：包含 Amazon Comprehend Medical API 動作的結果，`DetectEntities-V2`以及特徵為 `SIGN`或 `InferICD10-CM`時的結果`SYMPTOM`。
  + `Condition`：包含 Amazon Comprehend Medical API 動作的結果，`DetectEntities-V2`以及特徵為 `InferICD10-CM`時的結果`DIAGNOSIS`。
  + `MedicationStatement`：包含來自 Amazon Comprehend Medical API 動作 的結果`InferRxNorm`。

# 使用 FHIR REST API 互動
<a name="nlp-rest-api"></a>

根據預設，Amazon Comprehend Medical API 操作在提出`GET`請求時不會傳回偵測到的特徵。若要查看整合 NLP 操作的結果，您必須為下列 FHIR 資源類型指定已知`ID`的 。
+ `Linkage`
+ `Observation`
+ `Condition`
+ `MedicationStatement`

在指定 `ID`已知包含 Amazon Comprehend Medical API 操作結果的`GET`請求中，可使用`DocumentReference`資源類型外的 HealthLake 整合 NLP 動作結果。

# HealthLake 整合式 NLP 的搜尋參數
<a name="search-parameters-med"></a>

下表列出 HealthLake 整合式 NLP 的可搜尋屬性。


**HealthLake NLP 的搜尋參數**  

| 搜尋參數 | 尋找 的相符項目 | 
| --- | --- | 
| detectEntities-entity-category | DetectEntities 子延伸中的實體類別位於 CM AWS 延伸模組中 | 
| detectEntities-entity-text | DetectEntities 子延伸中的實體文字位於 CM AWS 延伸模組中 | 
| detectEntities-entity-type | CM 延伸模組中 DetectEntities AWS 子延伸中的實體類型 | 
| detectEntities-entity-score | CM 延伸模組中 DetectEntities AWS 子延伸中的實體分數 | 
| infer-icd10cm-entity-text | CM 延伸模組 InferICD10CM AWS 子延伸中的實體文字 | 
| infer-icd10cm-entity-score | CM 延伸模組 InferICD10CM AWS 子延伸中的實體分數 | 
| infer-icd10cm-entity-concept-code | CM 延伸模組 InferICD10CM AWS 子延伸中的實體概念碼 | 
| infer-icd10cm-entity-concept-description | CM 延伸模組 InferICD10CM 子延伸中的 AWS 實體概念描述 | 
| infer-icd10cm-entity-concept-score | CM 延伸模組 InferICD10CM AWS 子延伸中的實體概念分數 | 
| infer-rxnorm-entity-score | CM 延伸模組內 InferRxNorm AWS 子延伸中的實體分數 | 
| infer-rxnorm-entity-text | CM 延伸模組 InferRxNorm AWS 子延伸中的實體文字 | 
| infer-rxnorm-entity-concept-code | InferRxNorm 子延伸中的實體概念程式碼位於 CM AWS 延伸模組中 | 
| infer-rxnorm-entity-concept-description | CM 延伸模組 InferRxNorm 子延伸中的 AWS 實體概念描述 | 
| infer-rxnorm-entity-concept-score |  CM 延伸模組 InferRxNorm AWS 子延伸中的實體概念分數  | 

HealthLake 提供特殊搜尋，以符合 `EntityText`和 `EntityCategory` 屬於相同實體的條件。下表說明 HealthLake 支援的特殊搜尋參數。


**搜尋參數**  

| 搜尋參數 | 傳回相符項目 | 
| --- | --- | 
| detectEntities-entity-text-category | 如果在 DetectEntities 子延伸中至少有一個符合 entityText 和 entityCategory 的實體。 | 
| detectEntities-entity-type-score | 如果在 DetectEntities 子延伸中至少有一個符合 entityType 和 entityScore 的實體。 | 
| detectEntities-entity-text-score | 如果在 DetectEntities 子延伸中至少有一個符合 entityText 和 entityScore 的實體。 | 
| detectEntities-entity-text-type | 如果在 DetectEntities 子延伸中至少有一個符合 entityText 和 entityType 的實體。 | 
| detectEntities-entity-category-score | 如果至少有一個實體同時符合 entityCategory 和 entityScore。 | 
| infer-icd10cm-entity-text-concept-code | 如果 InferICD10CM 子延伸中至少有一個符合 entityText 的實體，且該實體至少有一個符合該程式碼的 conceptCode。 | 
| infer-icd10cm-entity-text-concept-score | 如果 InferICD10CM 子延伸中至少有一個符合 entityText 的實體，且該實體至少有一個符合分數的 conceptScore。 | 
| infer-icd10cm-entity-concept-description-concept-score | 如果 InferICD10CM 子延伸中的實體中至少有一個概念符合概念描述和 conceptScore。 | 
| infer-rxnorm-entity-text-concept-code | 如果 InferRxNorm 子延伸中至少有一個符合 entityText 的實體，且該實體至少有一個符合該程式碼的 conceptCode。 | 
| infer-rxnorm-entity-text-concept-score | 如果 InferRxNorm 子延伸中至少有一個符合 entityText 的實體，且該實體至少有一個符合分數的 conceptScore。 | 
| infer-rxnorm-entity-concept-description-concept-score |  如果 InferRxNorm 子延伸中的實體中至少有一個概念符合概念描述和 conceptScore。  | 

# HealthLake 整合 NLP 範例請求
<a name="cm-api-results"></a>

**範例 1：擷取至 HealthLake 資料存放區的`Patient`記錄**

以下是以與醫療專業人員的`Patient`相遇為基礎的臨床備註範例。

**合成資料**  
下列範例中的文字是合成內容，不包含受保護的健康資訊 (PHI)。

```
1991-08-31

# Chief Complaint
- Headache
- Sinus Pain
- Nasal Congestion
- Sore Throat
- Pain with Bright Lights
- Nasal Discharge
- Cough

# History of Present Illness
Jerónimo599 is a 4 month-old non-hispanic white male.

# Social History
Patient has never smoked.

Patient comes from a middle socioeconomic background.

Patient currently has Aetna.

# Allergies
No Known Allergies.

# Medications
No Active Medications.

# Assessment and Plan
Patient is presenting with bee venom (substance), mold (organism), house dust mite (organism), animal dander (substance), grass pollen (substance), tree pollen (substance), lisinopril, sulfamethoxazole / trimethoprim, fish (substance). 

## Plan

The patient was prescribed the following medications:
- astemizole 10 mg oral tablet
- nda020800 0.3 ml epinephrine 1 mg/ml auto-injector
The patient was placed on a careplan:
- self-care interventions (procedure)
```

提醒您，此資訊在 `DocumentReference` 資源中以 base64 格式編碼。當本文件擷取至 HealthLake 且 Amazon Comprehend Medical API 操作完成時，若要查看結果，您可以從`DocumentReference`資源類型的`GET`請求開始。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/DocumentReference
```

當 Amazon Comprehend Medical API 操作成功時，請在`extension`連結至下列項目的 內尋找這些鍵值對 `"url": "http://healthlake.amazonaws.com/aws-cm/"`

```
{
		"url": "http://healthlake.amazonaws.com/aws-cm/status/",
		"valueString": "SUCCESS"
	},
	{
		"url": "http://healthlake.amazonaws.com/aws-cm/message/",
		"valueString": "The AWS HealthLake integrated medical NLP operation was successful."
	}
```

下列索引標籤顯示如何根據資源類型，在您的 HealthLake 資料存放區中報告擷取的醫療記錄。

------
#### [ DocumentReference ]

若要查看單一`DocumentReference`資源類型的結果，請提出 `GET`請求，其中提供特定資源`id`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/DocumentReference/0e938f03-da7f-4178-acd8-eea9586c46ed
```

成功時，您會收到 `200` HTTP 回應代碼和下列 JSON 回應 （為了清楚起見，已截斷）。

以下是 `http://healthlake.amazonaws.com/system-generated-resources/`部分。您可以看到`Linkage/e366d29f-2c22-4c19-866e-09603937935a`已新增新的 。您也可以查看 HealthLake 已將推論型問題清單新增至特定 `Condition` `Observation`和資源類型的位置。

若要查看這些資源類型的修改方式，請選擇相關索引標籤。

```
{
		"extension": [
			{
				"url": "http://healthlake.amazonaws.com/linkage",
				"valueReference": {
					"reference": "Linkage/e366d29f-2c22-4c19-866e-09603937935a"
				}
			},
			{
				"url": "http://healthlake.amazonaws.com/nlp-entity",
				"valueReference": {
					"reference": "Observation/c6e0a3ff-7a17-4d8b-bfd0-d02d7da090c5"
				}
			},
			{
				"url": "http://healthlake.amazonaws.com/nlp-entity",
				"valueReference": {
					"reference": "Condition/0854e1f3-894d-448e-a8d9-3af5b9902baf"
				}
			}
		],
		"url": "http://healthlake.amazonaws.com/system-generated-resources/"
	}
```

------
#### [ Linkage ]

若要查看單一`Linkage`資源類型的結果，請提出 `GET`請求，其中提供特定資源`ID`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/Linkage/e366d29f-2c22-4c19-866e-09603937935a
```

成功時，您會收到 `200` HTTP 回應代碼，以及下列截斷的 JSON 回應。

回應包含 `item`元素。其中，索引鍵/值對`"type": "source"`會指出用來修改 的特定`DocumentReference`項目，`Condition`並`Observations`列在索引`"type": "alternate"`鍵/值對下。

*您也會看到 `meta`元素和對應的鍵值對 `"tag": [{"display": "SYSTEM_GENERATED"}]`，表示這些資源是由 HealthLake 建立。*

```
{
		"resourceType": "Linkage",
		"id": "e366d29f-2c22-4c19-866e-09603937935a",
		"active": true,
		"item":
		[
			{
				"type": "alternate",
				"resource": {
					"reference": "Observation/c6e0a3ff-7a17-4d8b-bfd0-d02d7da090c5",
					"type": "Observation"
				}
			},
			{
				"type": "alternate",
				"resource": {
					"reference": "Condition/9d5c1ef6-f822-4faf-b55f-7c70f2a4aa8d",
					"type": "Condition"
				}
			},
			{
				"type": "source",
				"resource": {
					"reference": "DocumentReference/0e938f03-da7f-4178-acd8-eea9586c46ed",
					"type": "DocumentReference"
				}
			}
		],
		"meta": {
			"lastUpdated": "2022-10-21T19:38:31.327Z",
			"tag": [{
				"display": "SYSTEM_GENERATED"
			}]
		}
	}
```

------
#### [ Resource type: Observation ]

若要查看單一`Observation`資源類型的結果，請提出 `GET`請求，其中提供特定資源`ID`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/Observation/e366d29f-2c22-4c19-866e-09603937935a
```

Amazon Comprehend Medical API 操作的結果會修改為下列元素：`code`、 `meta`和 `modifierExtension`。

**`code`**  
類型 的 元素`CodeableConcept`。若要進一步了解，請參閱 **FHIR R4 文件**[https://hl7.org/fhir/R4/datatypes.html#CodeableConcept](https://hl7.org/fhir/R4/datatypes.html#CodeableConcept)中的 。

HealthLake 會附加下列三個鍵值對。
+ `"system": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/"`：其中 URL 是指特定的 Amazon Comprehend Medical API 操作。在此情況下，InferICD10CM。
+ `"code": "A52.06"`：其中 `A52.06`是 ICD-10-CM 程式碼，用於從疾病控制中心識別知識庫中找到的概念。
+ `"display": "Other syphilitic heart involvement"`：其中 `"Other syphilitic heart involvement"`是 上下文中 ICD-10-CM 程式碼的長描述。

下列截斷的 JSON 回應僅包含 `code`元素。

```
"code": {
		"coding":
		[
		  {
			"system": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/",
			"code": "A52.06",
			"display": "Other syphilitic heart involvement"
		  }
		],
		"text": "Other syphilitic heart involvement"
	}
```

若要了解模型對指派的 ICD-10-CM 程式碼是否正確的可信度，請使用 `modifierExtension`元素。

**`meta`**  
`meta` 元素包含中繼資料，指出`code`元素是否包含 Amazon Comprehend Medical API 操作所新增的詳細資訊。

下列截斷的 JSON 回應僅包含 `meta`元素。

```
"meta": {
		"lastUpdated": "2022-10-21T19:38:30.879Z",
		"tag": [{
			"display": "SYSTEM_GENERATED"
		}]
	}
```

**`modifierExtension`**  
`modifierExtension` 元素包含有關`code`元素中指定代碼之可信度層級的更多詳細資訊。它還具有索引鍵/值對，提供用於產生結果和相關 Linkage 資源類型的原始 DocumentReference 的連結。

對於每個新增的`coding`元素，您會看到 `entity-score`和 `entity-Concept-Score` 新增至 modifierExtension。對於鍵/值對中的每個值，您會看到分數。對於 `entity-score`，此分數是 Amazon Comprehend Medical 對偵測準確性的可信度。對於 `entity-Concept-Score`，此分數是 Amazon Comprehend Medical 對實體準確連結到 ICD-10-CM 概念的可信度。

下列截斷的 JSON 回應僅包含 `modifierExtension`元素。

```
"modifierExtension": [{
			"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-score",
			"valueDecimal": 0.45005733
		},
		{
			"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-Concept-Score",
			"valueDecimal": 0.1111792
		},
		{
			"url": "http://healthlake.amazonaws.com/system-generated-linkage",
			"valueReference": {
				"reference": "Linkage/e366d29f-2c22-4c19-866e-09603937935a"
			}
		},
		{
			"url": "http://healthlake.amazonaws.com/source-document-reference",
			"valueReference": {
				"reference": "DocumentReference/0e938f03-da7f-4178-acd8-eea9586c46ed"
			}
		}
	]
```

**完整 JSON 回應**

```
{
		"subject": {
			"reference": "Patient/0679b7b7-937d-488a-b48d-6315b8e7003b"
		},
		"resourceType": "Observation",
		"status": "unknown",
		"code": {
			"coding": [{
				"system": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/",
				"code": "A52.06",
				"display": "Other syphilitic heart involvement"
			}],
			"text": "Other syphilitic heart involvement"
		},
		"meta": {
			"lastUpdated": "2022-10-21T19:38:30.879Z",
			"tag": [{
				"display": "SYSTEM_GENERATED"
			}]
		},
		"modifierExtension": [{
				"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-score",
				"valueDecimal": 0.45005733
			},
			{
				"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-Concept-Score",
				"valueDecimal": 0.1111792
			},
			{
				"url": "http://healthlake.amazonaws.com/system-generated-linkage",
				"valueReference": {
					"reference": "Linkage/e366d29f-2c22-4c19-866e-09603937935a"
				}
			},
			{
				"url": "http://healthlake.amazonaws.com/source-document-reference",
				"valueReference": {
					"reference": "DocumentReference/0e938f03-da7f-4178-acd8-eea9586c46ed"
				}
			}
		],
		"id": "7e88c7c5-21a5-4dd7-8fc2-a02474fba583"
	}
```

------
#### [ Condition ]

若要查看單一`Condition`資源類型的結果，請提出 `GET`請求，其中提供特定資源`ID`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/Condition/b06d343d-ddb8-4f36-82cb-853fcd434dfd
```

Amazon Comprehend Medical API 操作的結果會修改為下列元素：`code`、 `meta`和 `modifierExtension`。

**`code`**  
類型 的 元素`CodeableConcept`。若要進一步了解，請參閱 **FHIR R4 文件**[https://hl7.org/fhir/R4/datatypes.html#CodeableConcept](https://hl7.org/fhir/R4/datatypes.html#CodeableConcept)中的 。

HealthLake 會附加下列三個鍵值對。
+ `"system": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/"`：其中 URL 是指特定的 Amazon Comprehend Medical API 操作。在此情況下，InferICD10CM。
+ `"code": "I70.0"`：其中 `A52.06`是 ICD-10-CM 程式碼，用於從疾病控制中心識別知識庫中找到的概念。
+ `"display": "Atherosclerosis of aorta"`：其中 `"Other syphilitic heart involvement"`是本體中 ICD-10-CM 程式碼的長描述。

下列截斷的 JSON 回應僅包含 `code`元素。

```
"code": {
		"coding":
		[
		  {
			"system": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/",
			"code": "I70.0",
			"display": "Atherosclerosis of aorta"
		  }
		],
		"text": "Atherosclerosis of aorta"
	}
```

若要了解模型對指派的 ICD-10-CM 程式碼是否正確的可信度，請使用 `modifierExtension`元素。

**`meta`**  
`meta` 元素包含中繼資料，指出`code`元素是否包含 Amazon Comprehend Medical API 操作所新增的詳細資訊。

下列截斷的 JSON 回應僅包含 `meta`元素。

```
"meta": {
		"lastUpdated": "2022-10-21T19:38:30.877Z",
		"tag": [{
			"display": "SYSTEM_GENERATED"
		}]
	}
```

**`modifierExtension`**  
`modifierExtension` 元素包含有關`code`元素中指定代碼之可信度層級的更多詳細資訊。它還具有索引鍵/值對，提供用於產生結果和相關 Linkage 資源類型的原始 DocumentReference 的連結。

對於每個新增的`coding`元素，您會看到 `entity-score`和 `entity-Concept-Score` 新增至 modifierExtension。對於鍵/值對中的每個值，您會看到分數。對於 `entity-score`，此分數是 Amazon Comprehend Medical 對偵測準確性的可信度。對於 `entity-Concept-Score`，此分數是 Amazon Comprehend Medical 對實體準確連結到 ICD-10-CM 概念的可信度。

下列截斷的 JSON 回應僅包含 `modifierExtension`元素。

```
"modifierExtension": [{
			"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-score",
			"valueDecimal": 0.94417894
		},
		{
			"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-Concept-Score",
			"valueDecimal": 0.8458298
		},
		{
			"url": "http://healthlake.amazonaws.com/system-generated-linkage",
			"valueReference": {
				"reference": "Linkage/e366d29f-2c22-4c19-866e-09603937935a"
			}
		},
		{
			"url": "http://healthlake.amazonaws.com/source-document-reference",
			"valueReference": {
				"reference": "DocumentReference/0e938f03-da7f-4178-acd8-eea9586c46ed"
			}
		}
	]
```

**完整 JSON 回應**

```
{
		"subject": {
			"reference": "Patient/0679b7b7-937d-488a-b48d-6315b8e7003b"
		},
		"resourceType": "Condition",
		"code": {
			"coding": [{
				"system": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/",
				"code": "I70.0",
				"display": "Atherosclerosis of aorta"
			}],
			"text": "Atherosclerosis of aorta"
		},
		"meta": {
			"lastUpdated": "2022-10-21T19:38:30.877Z",
			"tag": [{
				"display": "SYSTEM_GENERATED"
			}]
		},
		"modifierExtension": [{
				"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-score",
				"valueDecimal": 0.94417894
			},
			{
				"url": "http://healthlake.amazonaws.com/aws-cm/infer-icd10/aws-cm-icd10-entity-Concept-Score",
				"valueDecimal": 0.8458298
			},
			{
				"url": "http://healthlake.amazonaws.com/system-generated-linkage",
				"valueReference": {
					"reference": "Linkage/e366d29f-2c22-4c19-866e-09603937935a"
				}
			},
			{
				"url": "http://healthlake.amazonaws.com/source-document-reference",
				"valueReference": {
					"reference": "DocumentReference/0e938f03-da7f-4178-acd8-eea9586c46ed"
				}
			}
		],
		"id": "b06d343d-ddb8-4f36-82cb-853fcd434dfd"
	}
```

------

**範例 2：`DocumentReference`包含`MedicationStatement`資源類型的 **

以下是根據病患與醫療專業人員接觸的臨床備註範例。

**合成資料**  
此範例中的文字是合成內容，不包含受保護的健康資訊 (PHI)。

```
Tom is not prescribed Advil
```

下列索引標籤顯示如何根據資源類型，在您的 HealthLake 資料存放區中報告擷取的醫療記錄。

------
#### [ DocumentReference ]

若要查看單一`DocumentReference`資源類型的結果，請提出 `GET`請求，其中提供特定資源`ID`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/DocumentReference/c549125d-a218-421f-b8bf-23614c5e796c
```

成功時，您會收到 `200` HTTP 回應代碼和下列截斷的 JSON 回應。

鍵/值對 `"url": "http://healthlake.amazonaws.com/system-generated-resources/"`表示其中的資源類型`extension`已由 Amazon Comprehend Medical API 操作新增。您可以查看新的`Linkage`資源類型和多個`MedicationStatement`資源。

```
"extension": [{
			"extension": [{
					"url": "http://healthlake.amazonaws.com/linkage",
					"valueReference": {
						"reference": "Linkage/394bb244-177b-4409-8657-26b20ed56dd7"
					}
				},
				{
					"url": "http://healthlake.amazonaws.com/nlp-entity",
					"valueReference": {
						"reference": "MedicationStatement/cbf6af10-b0b9-451c-bdde-99611e3498a8"
					}
				},
				{
					"url": "http://healthlake.amazonaws.com/nlp-entity",
					"valueReference": {
						"reference": "MedicationStatement/9a89b0d3-6681-45ca-9926-27951edce5c7"
					}
				},
				{
					"url": "http://healthlake.amazonaws.com/nlp-entity",
					"valueReference": {
						"reference": "MedicationStatement/4a01f6c8-5f3a-4122-80ab-405312f96aa2"
					}
				},
				{
					"url": "http://healthlake.amazonaws.com/nlp-entity",
					"valueReference": {
						"reference": "MedicationStatement/fbfb77d8-70cf-4579-b4c0-d6fe3c01656b"
					}
				},
				{
					"url": "http://healthlake.amazonaws.com/nlp-entity",
					"valueReference": {
						"reference": "MedicationStatement/1340c9ce-9c48-4bf9-9b2f-d0ab027f5e0b"
					}
				}
			],
			"url": "http://healthlake.amazonaws.com/system-generated-resources/"
		}
```

------
#### [ Linkage ]

若要查看單一`Linkage`資源類型的結果，請提出 `GET`請求，其中提供特定資源`ID`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/Linkage/394bb244-177b-4409-8657-26b20ed56dd7
```

成功時，您會收到 `200` HTTP 回應代碼和下列 JSON 回應。

回應包含 `item`元素。其中，鍵/值對`"type": "source"`會指出用來修改`MedicationStatement`資源類型的特定`DocumentReference`項目。

您也可以看到 `meta`元素和對應的鍵/值對 `"tag": [{"display": "SYSTEM_GENERATED"}]`，表示這些資源是由 HealthLake 建立。

```
{
		"resourceType": "Linkage",
		"id": "394bb244-177b-4409-8657-26b20ed56dd7",
		"active": true,
		"item": [{
				"type": "alternate",
				"resource": {
					"reference": "MedicationStatement/cbf6af10-b0b9-451c-bdde-99611e3498a8",
					"type": "MedicationStatement"
				}
			},
			{
				"type": "alternate",
				"resource": {
					"reference": "MedicationStatement/9a89b0d3-6681-45ca-9926-27951edce5c7",
					"type": "MedicationStatement"
				}
			},
			{
				"type": "alternate",
				"resource": {
					"reference": "MedicationStatement/4a01f6c8-5f3a-4122-80ab-405312f96aa2",
					"type": "MedicationStatement"
				}
			},
			{
				"type": "alternate",
				"resource": {
					"reference": "MedicationStatement/fbfb77d8-70cf-4579-b4c0-d6fe3c01656b",
					"type": "MedicationStatement"
				}
			},
			{
				"type": "alternate",
				"resource": {
					"reference": "MedicationStatement/1340c9ce-9c48-4bf9-9b2f-d0ab027f5e0b",
					"type": "MedicationStatement"
				}
			},
			{
				"type": "source",
				"resource": {
					"reference": "DocumentReference/c549125d-a218-421f-b8bf-23614c5e796c",
					"type": "DocumentReference"
				}
			}
		],
		"meta": {
			"lastUpdated": "2022-10-24T20:05:03.501Z",
			"tag": [{
				"display": "SYSTEM_GENERATED"
			}]
		}
	}
```

------
#### [ MedicationStatement ]

若要查看單一`MedicationStatement`資源類型的結果，請提出 `GET`請求，其中提供特定資源`ID`的 。

```
GET https://https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/eeb8005725ae22b35b4edbdc68cf2dfd/r4/MedicationStatement/9a89b0d3-6681-45ca-9926-27951edce5c7
```

`MedicationStatement` 資源類型是找到 Amazon Comprehend Medical InferRxNorm API 操作結果的位置。結果會修改為下列元素：`medicationCodeableConcept`、 `meta`和 `modifierExtension`。

**medicationCodeableConcept**  
類型 的 元素`CodeableConcept`。若要進一步了解，請參閱 **FHIR R4 文件**[https://hl7.org/fhir/R4/datatypes.html#CodeableConcept](https://hl7.org/fhir/R4/datatypes.html#CodeableConcept)中的 。

HealthLake 會附加下列三個鍵值對。
+ `"system": ""http://healthlake.amazonaws.com/aws-cm/infer-rxnorm/`：其中 URL 是指特定的 Amazon Comprehend Medical API 操作。在此情況下，InferRxNorm。
+ `"code": "731533"`：其中 `731533` 是 RxNorm 概念 ID，也稱為 RxCUI。
+ `"display": "ibuprofen 200 MG Oral Capsule [Advil]"`：其中 `ibuprofen 200 MG Oral Capsule [Advil]`是 RxNorm 概念的描述。

下列截斷的 JSON 回應僅包含 `MedicationStatement`元素。

```
"medicationCodeableConcept": {
		"coding": [
			{
				"system": "http://healthlake.amazonaws.com/aws-cm/infer-rxnorm/",
				"code": "731533",
				"display": "ibuprofen 200 MG Oral Capsule [Advil]"
			}
		]
	}
```

**`meta`**  
`meta` 元素包含中繼資料，指出`code`元素是否包含 Amazon Comprehend Medical API 操作所新增的詳細資訊。

下列截斷的 JSON 回應僅包含 `meta`元素。

```
"meta": {
		"lastUpdated": "2022-10-24T20:05:02.800Z",
		"tag": [
			{
				"display": "SYSTEM_GENERATED"
			}
		]
	}
```

**`modifierExtension`**  
`modifierExtension` 元素包含鍵/值對，提供用來`DocumentReference`產生結果和相關 Linkage 資源類型的原始 連結。

```
"modifierExtension": [
			{
				"url": "http://healthlake.amazonaws.com/system-generated-linkage",
				"valueReference": {
					"reference": "Linkage/394bb244-177b-4409-8657-26b20ed56dd7"
				}
			},
			{
				"url": "http://healthlake.amazonaws.com/source-document-reference",
				"valueReference": {
					"reference": "DocumentReference/c549125d-a218-421f-b8bf-23614c5e796c"
				}
			}
	]
```

------