このページでは、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 を有効にする必要があります。Healthcare Natural Language API は、Cloud Healthcare 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.nlpServiceViewer
ロールに含まれる healthcare.nlpservice.analyzeEntities
権限が必要です。
このロールを割り当てるには、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
メソッドを使用して、医療テキスト「インスリン投与法 5 ユニット IV は糖尿病のために管理されます」の医療分析情報を抽出する方法を示しています。
リクエストのデータを使用する前に、次のように置き換えます。
: 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 の機能をご覧ください。
次のレスポンスにより、NSI 用語システムのコード 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 の用語が不要な場合、これらの制限は適用されません。
次のサンプルでは、SNOMED CT の認可された用語を LicensedVocabularies
オブジェクトに含めて、医療テキスト「インスリン投与法 5 ユニット IV は糖尿病のために管理されます」から医療分析情報を抽出する方法を示しています。
リクエストのデータを使用する前に、次のように置き換えます。
: 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 要素にマッピングします。他のマッピングの一覧については、FHIR バンドルとしての Healthcare Natural Language API の出力をご覧ください。
次のサンプルは、FHIR R4 バンドル内の医療テキスト「インスリン投与法 5 ユニット IV は糖尿病のために管理されます」の医療分析情報を抽出する方法を示しています。詳しくは、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
- 認識されたエンティティでは、エンティティ、リレーション、コンテキスト属性を抽出するでの出力と同様の形式で、エンティティとその関係が言及されます。
- 文字列形式の FHIR バンドル リソースを含む
fhirBundle
キー。 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 }" }