本页面介绍了如何启用 Healthcare Natural Language API、如何配置权限以及如何调用 analyzeEntities
方法从医学信息中提取医学数据分析。
概览
Healthcare Natural Language API 提供用于从医学文本提取数据分析的机器学习解决方案。Healthcare Natural Language API 是 Cloud Healthcare API 的一部分。如需简要了解 Healthcare Natural Language API,请参阅 Healthcare Natural Language API 概念文档。
Healthcare Natural Language API 会解析非机构化医学文本,例如医疗记录或保险索赔。然后,它会生成存储在这些数据源中的医学知识实体的结构化数据表示,以用于下游分析和自动化。例如,您可以:
- 提取关于疾病、药物、医疗设备、手术及其临床相关特性等医学概念的信息
- 将医学概念与 RxNorm、ICD-10、MeSH 和 SNOMED CT 等标准医学词汇相对应(仅限美国和英国用户)
- 从文本中提取医学数据分析,并将其与 Google Cloud中的数据分析产品集成
可用位置
Healthcare Natural Language API 在以下位置可用:
地点名称 | 地点描述 |
---|---|
asia-south1 |
印度孟买 |
australia-southeast1 |
澳大利亚悉尼 |
europe-west2 |
英国伦敦 |
europe-west4 |
荷兰 |
northamerica-northeast1 |
加拿大蒙特利尔 |
us-central1 |
美国爱荷华州 |
启用 Healthcare Natural Language API
在开始使用 Healthcare Natural Language API 之前,您必须为您的 Google Cloud 项目启用该 API。您可以在不启用或使用 Cloud Healthcare API 功能的情况下使用 Healthcare Natural Language API。
如需启用 API,请完成以下步骤:
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Create a service account:
-
In the Google Cloud console, go to the Create service account page.
Go to Create service account - Select your project.
-
In the Service account name field, enter a name. The Google Cloud console fills in the Service account ID field based on this name.
In the Service account description field, enter a description. For example,
Service account for quickstart
. - Click Create and continue.
-
Grant the Project > Owner role to the service account.
To grant the role, find the Select a role list, then select Project > Owner.
- Click Continue.
-
Click Done to finish creating the service account.
Do not close your browser window. You will use it in the next step.
-
-
Create a service account key:
- In the Google Cloud console, click the email address for the service account that you created.
- Click Keys.
- Click Add key, and then click Create new key.
- Click Create. A JSON key file is downloaded to your computer.
- Click Close.
-
Set the environment variable
GOOGLE_APPLICATION_CREDENTIALS
to the path of the JSON file that contains your credentials. This variable applies only to your current shell session, so if you open a new session, set the variable again.Example: Linux or macOS
export GOOGLE_APPLICATION_CREDENTIALS="
"KEY_PATH Replace
KEY_PATH
with the path of the JSON file that contains your credentials.For example:
export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"
Example: Windows
For PowerShell:
$env:GOOGLE_APPLICATION_CREDENTIALS="
"KEY_PATH Replace
KEY_PATH
with the path of the JSON file that contains your credentials.For example:
$env:GOOGLE_APPLICATION_CREDENTIALS="C:\Users\username\Downloads\service-account-file.json"
For command prompt:
set GOOGLE_APPLICATION_CREDENTIALS=
KEY_PATH Replace
KEY_PATH
with the path of the JSON file that contains your credentials. -
Enable the Cloud Healthcare API.
- Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
设置权限
为了使用本指南中的功能,您必须拥有 healthcare.nlpservice.analyzeEntities
权限,它包含在 healthcare.nlpServiceViewer
角色中。
如需分配此角色,请运行 gcloud projects add-iam-policy-binding
命令:
gcloud projects add-iam-policy-bindingPROJECT_ID \ --member serviceAccount:SERVICE_ACCOUNT_ID \ --role roles/healthcare.nlpServiceViewer
提取实体、关系和情境特性
Healthcare Natural Language API 使用情境感知模型来提取医疗实体、关系和情境特性。每个文本实体会提取到一个医学字典条目中。如需从医学文本中提取此级层的医学数据分析,请使用 projects.locations.services.nlp.analyzeEntities
方法。
如需在实体提及中添加 SNOMED CT 许可词汇,请参阅添加许可词汇。
如需使用 Healthcare Natural Language API 从医学信息中提取医学数据分析,请发出 POST
请求并在 documentContent
字段中指定目标文本。医学文本的大小上限为 20,000 个 Unicode 字符。
以下示例展示了如何使用 analyzeEntities
方法从医学文本“Insulin regimen 5 units IV will be administered for diabetes.” 中提取医学洞见。
在使用任何请求数据之前,请先进行以下替换:
:您的 Google Cloud 项目的 IDPROJECT_ID
:数据集位置LOCATION
请求 JSON 正文:
{ "documentContent": "Insulin regimen 5 units IV will be administered for diabetes." }
如需发送请求,请选择以下方式之一:
将请求正文保存在名为 request.json
的文件中。在终端中运行以下命令,在当前目录中创建或覆盖此文件:
cat > request.json << 'EOF' { "documentContent": "Insulin regimen 5 units IV will be administered for diabetes." } EOF
然后,执行以下命令以发送 REST 请求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d @request.json \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /services/nlp:analyzeEntities"
将请求正文保存在名为 request.json
的文件中。在终端中运行以下命令,在当前目录中创建或覆盖此文件:
@' { "documentContent": "Insulin regimen 5 units IV will be administered for diabetes." } '@ | Out-File -FilePath request.json -Encoding utf8
然后,执行以下命令以发送 REST 请求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /services/nlp:analyzeEntities" | Select-Object -Expand Content
如果请求成功,则响应会包含以下信息:
- 识别出的医学知识实体
- 功能特征
- 识别出的实体之间的关系
- 情境特性
- 将医学知识实体映射到标准术语
如需查看受支持的实体、属性和关系类型的列表,请参阅 Healthcare Natural Language API 功能。
以下响应识别了属于药物的治疗用胰岛素,该实体在 NCI 术语系统中的代码为 C581
。响应还包含为响应分配的置信度分数。如需详细了解响应字段,请参阅 analyzeEntities
文档。
响应
{ "entityMentions": [ { "mentionId": "1", "type": "MEDICINE", "text": { "content": "Insulin regimen", "beginOffset": 0 }, "linkedEntities": [ { "entityId": "UMLS/C0021641" }, { "entityId": "UMLS/C0795635" }, { "entityId": "UMLS/C1533581" }, { "entityId": "UMLS/C3537244" }, { "entityId": "UMLS/C3714501" } ], "temporalAssessment": { "value": "UPCOMING", "confidence": 0.95375925302505493 }, "certaintyAssessment": { "value": "LIKELY", "confidence": 0.618984580039978 }, "subject": { "value": "PATIENT", "confidence": 0.99964696168899536 }, "confidence": 0.62128835916519165 }, { "mentionId": "2", "type": "MED_DOSE", "text": { "content": "5 units", "beginOffset": 16 }, "confidence": 0.78806477785110474 }, { "mentionId": "3", "type": "MED_ROUTE", "text": { "content": "IV", "beginOffset": 24 }, "linkedEntities": [ { "entityId": "UMLS/C0348016" } ], "confidence": 0.8927428126335144 }, { "mentionId": "4", "type": "PROBLEM", "text": { "content": "diabetes", "beginOffset": 52 }, "linkedEntities": [ { "entityId": "UMLS/C0011847" }, { "entityId": "UMLS/C0011849" }, { "entityId": "UMLS/C0241863" } ], "temporalAssessment": { "value": "CURRENT", "confidence": 0.91680806875228882 }, "certaintyAssessment": { "value": "LIKELY", "confidence": 0.98018729686737061 }, "subject": { "value": "PATIENT", "confidence": 0.99965417385101318 }, "confidence": 0.99518013000488281 } ], "entities": [ { "entityId": "UMLS/C0011847", "preferredTerm": "Diabetes", "vocabularyCodes": [ "ICD10CM/E11", "LNC/LA10529-8", "LNC/LP128793-9", "LNC/MTHU040702", "MTH/NOCODE", "OMIM/MTHU050182" ] }, { "entityId": "UMLS/C0011849", "preferredTerm": "Diabetes Mellitus", "vocabularyCodes": [ "HPO/HP:0000819", "ICD10CM/E08-E13", "ICD9CM/250", "LNC/LA14291-1", "LNC/LA27539-8", "LNC/LP74722-7", "LNC/MTHU020781", "MEDLINEPLUS/4", "MSH/D003920", "MTH/NOCODE", "MTH/U000263", "NCI/C2985", "OMIM/MTHU036798" ] }, { "entityId": "UMLS/C0021641", "preferredTerm": "Insulin", "vocabularyCodes": [ "FMA/83365", "LNC/LA15805-7", "LNC/LP14676-8", "LNC/LP16325-0", "LNC/LP32542-0", "LNC/LP70329-5", "LNC/MTHU002108", "LNC/MTHU019392", "MSH/D007328", "MTH/NOCODE" ] }, { "entityId": "UMLS/C0241863", "preferredTerm": "Diabetic", "vocabularyCodes": [ "LNC/LA26134-9" ] }, { "entityId": "UMLS/C0348016", "preferredTerm": "Intravenous", "vocabularyCodes": [ "LNC/LA9437-0", "LNC/LP32453-0", "MTH/NOCODE", "NCI/C13346" ] }, { "entityId": "UMLS/C0795635", "preferredTerm": "insulin, regular, human", "vocabularyCodes": [ "LNC/LP17001-6", "MSH/D061386", "MTH/NOCODE", "NCI/C29125", "RXNORM/253182", "VANDF/4017559", "VANDF/4017569", "VANDF/4019786" ] }, { "entityId": "UMLS/C1533581", "preferredTerm": "Therapeutic Insulin", "vocabularyCodes": [ "MTH/NOCODE", "NCI/C581" ] }, { "entityId": "UMLS/C3537244", "preferredTerm": "Insulins", "vocabularyCodes": [ "MSH/D061385", "MTH/NOCODE" ] }, { "entityId": "UMLS/C3714501", "preferredTerm": "Insulin Drug Class", "vocabularyCodes": [ "MTH/NOCODE", "VANDF/4021631" ] } ], "relationships": [ { "subjectId": "1", "objectId": "2", "confidence": 0.99964696168899536 }, { "subjectId": "1", "objectId": "3", "confidence": 0.99964696168899536 }, { "subjectId": "4", "objectId": "1", "confidence": 0.68552839756011963 } ] }
添加许可词汇
默认情况下,Healthcare Natural Language API 响应包含受支持的医学词汇。
如果您的请求符合以下要求,您可以在响应中添加 SNOMED 临床术语 (SNOMEDCT_US) 词汇:
- API 请求来自美国。
- 请求正文中的
licensedVocabularies
字段的值为SNOMEDCT_US
。
如果您不需要 SNOMED CT 词汇,则不受上述任何限制。
以下示例展示了如何在 LicensedVocabularies
对象中添加 SNOMED CT 许可词汇,以便从医学文本“Insulin regimen 5 units IV will be administered for diabetes.” 中提取医学数据洞见。
在使用任何请求数据之前,请先进行以下替换:
:您的 Google Cloud 项目的 IDPROJECT_ID
:数据集位置LOCATION
请求 JSON 正文:
{ "documentContent": "Insulin regimen 5 units IV will be administered for diabetes.", "licensedVocabularies": [ "SNOMEDCT_US", "ICD10CM" ] }
如需发送请求,请选择以下方式之一:
将请求正文保存在名为 request.json
的文件中。在终端中运行以下命令,在当前目录中创建或覆盖此文件:
cat > request.json << 'EOF' { "documentContent": "Insulin regimen 5 units IV will be administered for diabetes.", "licensedVocabularies": [ "SNOMEDCT_US", "ICD10CM" ] } EOF
然后,执行以下命令以发送 REST 请求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d @request.json \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /services/nlp:analyzeEntities"
将请求正文保存在名为 request.json
的文件中。在终端中运行以下命令,在当前目录中创建或覆盖此文件:
@' { "documentContent": "Insulin regimen 5 units IV will be administered for diabetes.", "licensedVocabularies": [ "SNOMEDCT_US", "ICD10CM" ] } '@ | Out-File -FilePath request.json -Encoding utf8
然后,执行以下命令以发送 REST 请求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /services/nlp:analyzeEntities" | Select-Object -Expand Content
SNOMEDCT_US
和 ICD10CM
许可字典中的词汇代码。输出如下,其中请求的许可词汇代码以粗体显示:
响应
{ "entityMentions": [ { "mentionId": "1", "type": "MEDICINE", "text": { "content": "Insulin regimen", "beginOffset": 0 }, "linkedEntities": [ { "entityId": "UMLS/C0021641" }, { "entityId": "UMLS/C0795635" }, { "entityId": "UMLS/C1533581" }, { "entityId": "UMLS/C3537244" }, { "entityId": "UMLS/C3714501" } ], "temporalAssessment": { "value": "UPCOMING", "confidence": 0.95375925302505493 }, "certaintyAssessment": { "value": "LIKELY", "confidence": 0.618984580039978 }, "subject": { "value": "PATIENT", "confidence": 0.99964696168899536 }, "confidence": 0.62128835916519165 }, { "mentionId": "2", "type": "MED_DOSE", "text": { "content": "5 units", "beginOffset": 16 }, "confidence": 0.78806477785110474 }, { "mentionId": "3", "type": "MED_ROUTE", "text": { "content": "IV", "beginOffset": 24 }, "linkedEntities": [ { "entityId": "UMLS/C0348016" } ], "confidence": 0.8927428126335144 }, { "mentionId": "4", "type": "PROBLEM", "text": { "content": "diabetes", "beginOffset": 52 }, "linkedEntities": [ { "entityId": "UMLS/C0011847" }, { "entityId": "UMLS/C0011849" }, { "entityId": "UMLS/C0241863" } ], "temporalAssessment": { "value": "CURRENT", "confidence": 0.91680806875228882 }, "certaintyAssessment": { "value": "LIKELY", "confidence": 0.98018729686737061 }, "subject": { "value": "PATIENT", "confidence": 0.99965417385101318 }, "confidence": 0.99518013000488281 } ], "entities": [ { "entityId": "UMLS/C0011847", "preferredTerm": "Diabetes", "vocabularyCodes": [ "ICD10CM/E11", "LNC/LA10529-8", "LNC/LP128793-9", "LNC/MTHU040702", "MTH/NOCODE", "OMIM/MTHU050182" ] }, { "entityId": "UMLS/C0011849", "preferredTerm": "Diabetes Mellitus", "vocabularyCodes": [ "HPO/HP:0000819", "ICD10CM/E08-E13", "ICD9CM/250", "LNC/LA14291-1", "LNC/LA27539-8", "LNC/LP74722-7", "LNC/MTHU020781", "MEDLINEPLUS/4", "MSH/D003920", "MTH/NOCODE", "MTH/U000263", "NCI/C2985", "OMIM/MTHU036798", "SNOMEDCT_US/73211009" ] }, { "entityId": "UMLS/C0021641", "preferredTerm": "Insulin", "vocabularyCodes": [ "FMA/83365", "LNC/LA15805-7", "LNC/LP14676-8", "LNC/LP16325-0", "LNC/LP32542-0", "LNC/LP70329-5", "LNC/MTHU002108", "LNC/MTHU019392", "MSH/D007328", "MTH/NOCODE", "SNOMEDCT_US/39487003", "SNOMEDCT_US/412222002", "SNOMEDCT_US/67866001" ] }, { "entityId": "UMLS/C0241863", "preferredTerm": "Diabetic", "vocabularyCodes": [ "LNC/LA26134-9" ] }, { "entityId": "UMLS/C0348016", "preferredTerm": "Intravenous", "vocabularyCodes": [ "LNC/LA9437-0", "LNC/LP32453-0", "MTH/NOCODE", "NCI/C13346", "SNOMEDCT_US/255560000" ] }, { "entityId": "UMLS/C0795635", "preferredTerm": "insulin, regular, human", "vocabularyCodes": [ "LNC/LP17001-6", "MSH/D061386", "MTH/NOCODE", "NCI/C29125", "RXNORM/253182", "SNOMEDCT_US/126210001", "SNOMEDCT_US/417423002", "SNOMEDCT_US/420609005", "SNOMEDCT_US/96367001", "VANDF/4017559", "VANDF/4017569", "VANDF/4019786" ] }, { "entityId": "UMLS/C1533581", "preferredTerm": "Therapeutic Insulin", "vocabularyCodes": [ "MTH/NOCODE", "NCI/C581" ] }, { "entityId": "UMLS/C3537244", "preferredTerm": "Insulins", "vocabularyCodes": [ "MSH/D061385", "MTH/NOCODE" ] }, { "entityId": "UMLS/C3714501", "preferredTerm": "Insulin Drug Class", "vocabularyCodes": [ "MTH/NOCODE", "VANDF/4021631" ] } ], "relationships": [ { "subjectId": "1", "objectId": "2", "confidence": 0.99964696168899536 }, { "subjectId": "1", "objectId": "3", "confidence": 0.99964696168899536 }, { "subjectId": "4", "objectId": "1", "confidence": 0.68552839756011963 } ] }
将输出提取为 FHIR R4 软件包
您可以从文本中提取实体,并将其映射到 FHIR R4 资源和元素。生成的 FHIR R4 软件包包含 JSON 格式的所有实体、实体提及和关系。例如,Healthcare Natural Language API 会将基准实体 PROBLEM
映射到 Condition
FHIR R4 资源,并将实体 PROBLEM.ANATOMICAL_STRUCTURE
映射到 Condition.bodySite
FHIR 元素。如需查看其他映射的列表,请参阅将 Healthcare Natural Language API 输出作为 FHIR 软件包。
以下示例展示了如何从 FHIR R4 软件包中的医学文本“Insulin regimen 5 units IV will be administered for diabetes.” 中提取医学洞见。如需了解详情,请参阅 AlternativeOutputFormat
对象。
在使用任何请求数据之前,请先进行以下替换:
:您的 Google Cloud 项目的 IDPROJECT_ID
:数据集位置LOCATION
请求 JSON 正文:
{ "documentContent": "Insulin regimen 5 units IV will be administered for diabetes.", "alternativeOutputFormat": "FHIR_BUNDLE" }
如需发送请求,请选择以下方式之一:
将请求正文保存在名为 request.json
的文件中。在终端中运行以下命令,在当前目录中创建或覆盖此文件:
cat > request.json << 'EOF' { "documentContent": "Insulin regimen 5 units IV will be administered for diabetes.", "alternativeOutputFormat": "FHIR_BUNDLE" } EOF
然后,执行以下命令以发送 REST 请求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d @request.json \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /services/nlp:analyzeEntities"
将请求正文保存在名为 request.json
的文件中。在终端中运行以下命令,在当前目录中创建或覆盖此文件:
@' { "documentContent": "Insulin regimen 5 units IV will be administered for diabetes.", "alternativeOutputFormat": "FHIR_BUNDLE" } '@ | Out-File -FilePath request.json -Encoding utf8
然后,执行以下命令以发送 REST 请求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /services/nlp:analyzeEntities" | Select-Object -Expand Content
- 识别的实体提及,以及实体及其关系,格式与 提取实体、关系和情境属性中的输出类似。
- 一个
fhirBundle
键,其中包含采用字符串格式的 FHIR Bundle 资源。 FHIR 软件包包含 JSON 格式的所有实体、实体提及和关系。
响应
{ "entityMentions": [ { "mentionId": "1", "type": "MEDICINE", "text": { "content": "Insulin regimen", "beginOffset": 0 }, "linkedEntities": [ { "entityId": "UMLS/C0021641" }, { "entityId": "UMLS/C0795635" }, { "entityId": "UMLS/C1533581" }, { "entityId": "UMLS/C3537244" }, { "entityId": "UMLS/C3714501" } ], "temporalAssessment": { "value": "UPCOMING", "confidence": 0.95375925302505493 }, "certaintyAssessment": { "value": "LIKELY", "confidence": 0.618984580039978 }, "subject": { "value": "PATIENT", "confidence": 0.99964696168899536 }, "confidence": 0.62128835916519165 }, { "mentionId": "2", "type": "MED_DOSE", "text": { "content": "5 units", "beginOffset": 16 }, "confidence": 0.78806477785110474 }, { "mentionId": "3", "type": "MED_ROUTE", "text": { "content": "IV", "beginOffset": 24 }, "linkedEntities": [ { "entityId": "UMLS/C0348016" } ], "confidence": 0.8927428126335144 }, { "mentionId": "4", "type": "PROBLEM", "text": { "content": "diabetes", "beginOffset": 52 }, "linkedEntities": [ { "entityId": "UMLS/C0011847" }, { "entityId": "UMLS/C0011849" }, { "entityId": "UMLS/C0241863" } ], "temporalAssessment": { "value": "CURRENT", "confidence": 0.91680806875228882 }, "certaintyAssessment": { "value": "LIKELY", "confidence": 0.98018729686737061 }, "subject": { "value": "PATIENT", "confidence": 0.99965417385101318 }, "confidence": 0.99518013000488281 } ], "entities": [ { "entityId": "UMLS/C0011847", "preferredTerm": "Diabetes", "vocabularyCodes": [ "ICD10CM/E11", "LNC/LA10529-8", "LNC/LP128793-9", "LNC/MTHU040702", "MTH/NOCODE", "OMIM/MTHU050182" ] }, { "entityId": "UMLS/C0011849", "preferredTerm": "Diabetes Mellitus", "vocabularyCodes": [ "HPO/HP:0000819", "ICD10CM/E08-E13", "ICD9CM/250", "LNC/LA14291-1", "LNC/LA27539-8", "LNC/LP74722-7", "LNC/MTHU020781", "MEDLINEPLUS/4", "MSH/D003920", "MTH/NOCODE", "MTH/U000263", "NCI/C2985", "OMIM/MTHU036798" ] }, { "entityId": "UMLS/C0021641", "preferredTerm": "Insulin", "vocabularyCodes": [ "FMA/83365", "LNC/LA15805-7", "LNC/LP14676-8", "LNC/LP16325-0", "LNC/LP32542-0", "LNC/LP70329-5", "LNC/MTHU002108", "LNC/MTHU019392", "MSH/D007328", "MTH/NOCODE" ] }, { "entityId": "UMLS/C0241863", "preferredTerm": "Diabetic", "vocabularyCodes": [ "LNC/LA26134-9" ] }, { "entityId": "UMLS/C0348016", "preferredTerm": "Intravenous", "vocabularyCodes": [ "LNC/LA9437-0", "LNC/LP32453-0", "MTH/NOCODE", "NCI/C13346" ] }, { "entityId": "UMLS/C0795635", "preferredTerm": "insulin, regular, human", "vocabularyCodes": [ "LNC/LP17001-6", "MSH/D061386", "MTH/NOCODE", "NCI/C29125", "RXNORM/253182", "VANDF/4017559", "VANDF/4017569", "VANDF/4019786" ] }, { "entityId": "UMLS/C1533581", "preferredTerm": "Therapeutic Insulin", "vocabularyCodes": [ "MTH/NOCODE", "NCI/C581" ] }, { "entityId": "UMLS/C3537244", "preferredTerm": "Insulins", "vocabularyCodes": [ "MSH/D061385", "MTH/NOCODE" ] }, { "entityId": "UMLS/C3714501", "preferredTerm": "Insulin Drug Class", "vocabularyCodes": [ "MTH/NOCODE", "VANDF/4021631" ] } ], "relationships": [ { "subjectId": "1", "objectId": "2", "confidence": 0.99964696168899536 }, { "subjectId": "1", "objectId": "3", "confidence": 0.99964696168899536 }, { "subjectId": "4", "objectId": "1", "confidence": 0.68552839756011963 } ], "fhirBundle": "{\n \"entry\": [\n {\n \"fullUrl\": \"urn:uuid:7e6e2323-f9e3-4241-bb84-1a8ff997ef99\",\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Condition\"\n },\n \"resource\": {\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"problem-list-item\",\n \"display\": \"Problem List Item\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\"\n }\n ]\n }\n ],\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"evidence\": [\n {\n \"code\": [\n {\n \"coding\": [\n {\n \"code\": \"C0011847\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C0011849\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C0241863\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n }\n ]\n }\n ]\n }\n ],\n \"extension\": [\n {\n \"url\": \"temporalrelationship\",\n \"valueCode\": \"CURRENT\"\n },\n {\n \"url\": \"certaintyassessment\",\n \"valueCode\": \"LIKELY\"\n },\n {\n \"url\": \"g.co/fhir/StructureDefinition/healthcare_nlp\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"C0011847\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C0011849\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C0241863\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n }\n ]\n }\n },\n {\n \"url\": \"source\",\n \"valueReference\": {\n \"id\": \"#Document1\"\n }\n },\n {\n \"url\": \"source_offset\",\n \"valueInteger\": 52\n },\n {\n \"url\": \"entityconfidence\",\n \"valueDecimal\": 0.995180\n }\n ],\n \"meta\": {\n \"source\": \"https://healthcare.googleapis.com/v1alpha2/projects/\u003cPROJECTNAME\u003e/locations/\u003cLOCATION\u003e/services/nlp:analyzeEntities\"\n },\n \"resourceType\": \"Condition\",\n \"subject\": {\n \"reference\": \"Patient/Patient/\u003cPATIENT_ID\u003e\"\n },\n \"text\": {\n \"div\": \"\u003cdiv xmlns=\\\"http://www.w3.org/1999/xhtml\\\"\u003e\u003cPreferred Term\u003e \u003cOptional: Date\u003e\u003c/div\u003e\",\n \"status\": \"generated\"\n },\n \"verificationStatus\": {\n \"coding\": [\n {\n \"code\": \"confirmed\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\"\n }\n ]\n }\n }\n },\n {\n \"fullUrl\": \"urn:uuid:04be4df6-4bbc-4fb5-a62f-fb82e644b8d2\",\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"MedicationStatement\"\n },\n \"resource\": {\n \"dosage\": [\n {\n \"route\": {\n \"coding\": [\n {\n \"code\": \"C0348016\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n }\n ]\n }\n }\n ],\n \"effectivePeriod\": {\n \"start\": \"2024-02-06T16:55:32+00:00\"\n },\n \"extension\": [\n {\n \"url\": \"dosage\",\n \"valueString\": \"5 units\"\n },\n {\n \"url\": \"temporalrelationship\",\n \"valueCode\": \"UPCOMING\"\n },\n {\n \"url\": \"certaintyassessment\",\n \"valueCode\": \"LIKELY\"\n },\n {\n \"url\": \"entityconfidence\",\n \"valueDecimal\": 0.621288\n }\n ],\n \"medicationCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"C0021641\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C0795635\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C1533581\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C3537244\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n },\n {\n \"code\": \"C3714501\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/umls\"\n }\n ],\n \"text\": \"Insulin regimen\"\n },\n \"meta\": {\n \"source\": \"https://healthcare.googleapis.com/v1alpha2/projects/\u003cPROJECTNAME\u003e/locations/\u003cLOCATION\u003e/services/nlp:analyzeEntities\"\n },\n \"reasonReference\": [\n {\n \"display\": \"7e6e2323-f9e3-4241-bb84-1a8ff997ef99\"\n }\n ],\n \"resourceType\": \"MedicationStatement\",\n \"status\": \"active\",\n \"subject\": {\n \"reference\": \"Patient/Patient/\u003cPATIENT_ID\u003e\"\n },\n \"text\": {\n \"div\": \"\u003cdiv xmlns=\\\"http://www.w3.org/1999/xhtml\\\"\u003e\u003c/div\u003e\",\n \"status\": \"generated\"\n }\n }\n },\n {\n \"fullUrl\": \"urn:uuid:f62fdb4b-a561-4855-96c8-23e41d8ad7b0\",\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"DocumentReference\"\n },\n \"resource\": {\n \"content\": [\n {\n \"attachment\": {\n \"url\": \"\u003cDOC_REFER\u003e\"\n }\n }\n ],\n \"meta\": {\n \"source\": \"https://healthcare.googleapis.com/v1alpha2/projects/\u003cPROJECTNAME\u003e/locations/\u003cLOCATION\u003e/services/nlp:analyzeEntities\"\n },\n \"resourceType\": \"DocumentReference\",\n \"status\": \"current\",\n \"subject\": {\n \"id\": \"Patient/\u003cPATIENT_ID\u003e\"\n }\n }\n }\n ],\n \"resourceType\": \"Bundle\",\n \"type\": \"transaction\"\n }" }