

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

# 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"
				}
			}
	]
```

------