本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
HealthLake 的 FHIR $inquire操作
$inquire 操作可讓您檢查先前提交的預先授權請求的狀態。此操作實作 Da Vinci 預先授權支援 (PAS) 實作指南
運作方式
-
提交查詢:您傳送 FHIR 套件,其中包含您要檢查的宣告和支援資訊
-
搜尋:HealthLake 會在您的資料存放區中搜尋對應的 ClaimResponse
-
擷取:擷取最新的授權狀態
-
回應:您會收到目前授權狀態的立即回應 (佇列、核准、拒絕等)
注意
$inquire 是擷取現有授權狀態的唯讀操作。它不會修改或更新資料存放區中的任何資源。
API 端點
POST /datastore/{datastoreId}/r4/Claim/$inquire Content-Type: application/fhir+json
請求結構
套件需求
您的請求必須是具有下列項目的 FHIR 套件資源:
-
Bundle.type:必須為
"collection" -
Bundle.entry:必須包含一個具有下列項目的宣告資源:
-
use = "preauthorization" -
status = "active"
-
-
參考資源: 宣告參考的所有資源必須包含在套件中
Query-by-Example
輸入套件中的資源做為搜尋範本。HealthLake 會使用提供的資訊來尋找對應的 ClaimResponse。
必要的資源
| 資源 | 基數 | 設定檔 | Description |
|---|---|---|---|
| 宣告 | 1 | PAS 宣告查詢 | 您正在查詢的預先授權 |
| 病患 | 1 | PAS 受益人病患 | 病患人口統計資訊 |
| Organization (保險業者) | 1 | PAS 保險公司組織 | 保險公司 |
| Organization (提供者) | 1 | PAS 請求組織 | 提交請求的醫療保健供應商 |
重要搜尋條件
HealthLake 使用下列項目搜尋 ClaimResponse:
-
來自宣告的患者參考
-
來自宣告的保險業者參考
-
來自宣告的提供者參考
-
從宣告建立的日期 (做為時間篩選條件)
僅限患者特定的查詢
所有查詢都必須繫結至特定病患。不允許沒有患者識別的全系統查詢。
範例請求
POST /datastore/example-datastore/r4/Claim/$inquire Content-Type: application/fhir+json Authorization: Bearer <your-token> { "resourceType": "Bundle", "id": "PASClaimInquiryBundleExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-request-bundle"] }, "identifier": { "system": "http://example.org/SUBMITTER_TRANSACTION_IDENTIFIER", "value": "5269368" }, "type": "collection", "timestamp": "2005-05-02T14:30:00+05:00", "entry": [ { "fullUrl": "http://example.org/fhir/Claim/MedicalServicesAuthorizationExample", "resource": { "resourceType": "Claim", "id": "MedicalServicesAuthorizationExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-inquiry"] }, "status": "active", "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "professional" }] }, "use": "preauthorization", "patient": { "reference": "Patient/SubscriberExample" }, "created": "2005-05-02T11:01:00+05:00", "insurer": { "reference": "Organization/InsurerExample" }, "provider": { "reference": "Organization/UMOExample" } } }, { "fullUrl": "http://example.org/fhir/Patient/SubscriberExample", "resource": { "resourceType": "Patient", "id": "SubscriberExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary"] }, "name": [{ "family": "SMITH", "given": ["JOE"] }], "gender": "male" } }, { "fullUrl": "http://example.org/fhir/Organization/UMOExample", "resource": { "resourceType": "Organization", "id": "UMOExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-requestor"] }, "name": "Provider Organization" } }, { "fullUrl": "http://example.org/fhir/Organization/InsurerExample", "resource": { "resourceType": "Organization", "id": "InsurerExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-insurer"] }, "name": "Insurance Company" } } ] }
回應格式
成功回應 (200 OK)
您將會收到 PAS 查詢回應套件,其中包含:
-
具有目前授權狀態的 ClaimResponse;如果符合搜尋條件,則為多個 ClaimResponse
-
請求中的所有原始資源 (已回呼)
-
組合回應時的時間戳記
可能的 ClaimResponse 結果
| 結果 | Description |
|---|---|
queued |
授權請求仍在等待審核 |
complete |
已做出授權決策 (檢查disposition是否已核准/遭拒) |
error |
處理期間發生錯誤 |
partial |
已授予部分授權 |
{ "resourceType": "Bundle", "identifier": { "system": "http://example.org/SUBMITTER_TRANSACTION_IDENTIFIER", "value": "5269367" }, "type": "collection", "timestamp": "2005-05-02T14:30:15+05:00", "entry": [ { "fullUrl": "http://example.org/fhir/ClaimResponse/InquiryResponseExample", "resource": { "resourceType": "ClaimResponse", "id": "InquiryResponseExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse-inquiry"] }, "status": "active", "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "professional" }] }, "use": "preauthorization", "patient": { "reference": "Patient/SubscriberExample" }, "created": "2005-05-02T11:05:00+05:00", "insurer": { "reference": "Organization/InsurerExample" }, "request": { "reference": "Claim/MedicalServicesAuthorizationExample" }, "outcome": "complete", "disposition": "Approved", "preAuthRef": "AUTH12345" } }, { "fullUrl": "http://example.org/fhir/Claim/MedicalServicesAuthorizationExample", "resource": { "resourceType": "Claim", "id": "MedicalServicesAuthorizationExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-inquiry"] }, "status": "active", "type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "professional" }] }, "use": "preauthorization", "patient": { "reference": "Patient/SubscriberExample" }, "created": "2005-05-02T11:01:00+05:00", "insurer": { "reference": "Organization/InsurerExample" }, "provider": { "reference": "Organization/UMOExample" } } }, { "fullUrl": "http://example.org/fhir/Patient/SubscriberExample", "resource": { "resourceType": "Patient", "id": "SubscriberExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary"] }, "name": [{ "family": "SMITH", "given": ["JOE"] }], "gender": "male" } }, { "fullUrl": "http://example.org/fhir/Organization/UMOExample", "resource": { "resourceType": "Organization", "id": "UMOExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-requestor"] }, "name": "Provider Organization" } }, { "fullUrl": "http://example.org/fhir/Organization/InsurerExample", "resource": { "resourceType": "Organization", "id": "InsurerExample", "meta": { "profile": ["http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-insurer"] }, "name": "Insurance Company" } } ] }
錯誤回應
400 錯誤的請求
當請求格式無效或驗證失敗時傳回。
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "required", "diagnostics": "Reference 'Patient/SubscriberExample' at path 'patient' for 'CLAIM' resource not found(at Bundle.entry[0].resource)" } ] }
401 (未經授權)
當身分驗證憑證遺失或無效時傳回。
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "diagnostics": "Invalid authorization header" } ] }
403 禁止
當已驗證的使用者缺少存取所請求資源的許可時傳回。
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "exception", "diagnostics": "Insufficient SMART scope permissions." } ] }
400 當找不到時
查詢找不到相符的 ClaimResponse 時傳回。
{ "resourceType": "OperationOutcome", "issue": [{ "severity": "error", "code": "not-found", "diagnostics": "Resource not found. No ClaimResponse found from the input Claim that matches the specified Claim properties patient, insurer, provider, and created(at Bundle.entry[0].resource)" }] }
415 不支援的媒體類型
當 Content-Type 標頭不是 application/fhir+json 時傳回。
{ "resourceType": "OperationOutcome", "issue": [{ "severity": "error", "code": "value", "diagnostics": "Incorrect MIME-type. Update request Content-Type header." }] }
429 太多請求
超過速率限制時傳回。
{ "resourceType": "OperationOutcome", "issue": [{ "severity": "error", "code": "throttled", "diagnostics": "Rate limit exceeded. Please retry after some time." }] }
驗證規則
HealthLake 會對您的查詢執行全面的驗證:
套件驗證
-
必須符合 PAS 查詢請求套件描述檔
-
Bundle.type必須"collection" -
必須僅包含一個宣告資源
-
套件中必須包含所有參考的資源
宣告驗證
-
必須符合 PAS 宣告查詢設定檔
-
Claim.use必須"preauthorization" -
Claim.status必須"active" -
必要欄位:
patient、insurer、provider、created
資源驗證
-
所有資源必須符合其各自的 PAS 查詢設定檔
-
必要的支援資源必須存在 (病患、保險公司組織、提供者組織)
-
交互參考在套件中必須是有效且可解析的
效能規格
| 指標 | 規格 |
|---|---|
| 資源計數限制 | 每個套件 500 個資源 |
| 套件大小限制 | 最多 5 MB |
所需的許可
若要使用 $inquire操作,請確定您的 IAM 角色具有:
-
healthlake:InquirePreAuthClaim- 呼叫 操作
FHIR 範圍上的 SMART
所需範圍下限:
-
SMART v1:
user/ClaimResponse.read -
SMART v2:
user/ClaimResponse.s
重要實作備註
搜尋行為
當您提交查詢時,HealthLake 會使用下列方式搜尋 ClaimResponse:
-
來自輸入宣告的患者參考
-
來自輸入 Claim 的保險業者參考
-
來自輸入宣告的提供者參考
-
從輸入宣告建立日期 (做為時間篩選條件)
多個相符項目:如果多個 ClaimResponses 符合您的搜尋條件,則 HealthLake 會傳回所有相符結果。您應該使用最新的ClaimResponse.created時間戳記來識別最新狀態。
已更新宣告
如果您已提交相同預先授權的多個更新 (例如 Claim v1.1、v1.2、v1.3),$inquire操作會根據提供的搜尋條件擷取與最新版本相關聯的 ClaimResponse。
唯讀操作
$inquire 操作:
-
會擷取現有的授權狀態
-
會傳回最新的 ClaimResponse
-
不修改或更新任何資源
-
不建立新資源
-
不會觸發新的授權處理
工作流程範例
典型的預先授權查詢工作流程
1. Provider submits PA request POST /Claim/$submit → Returns ClaimResponse with outcome="queued" 2. Payer reviews request (asynchronous) → Updates ClaimResponse status internally 3. Provider checks status POST /Claim/$inquire → Returns ClaimResponse with outcome="queued" (still pending) 4. Provider checks status again later POST /Claim/$inquire → Returns ClaimResponse with outcome="complete", disposition="Approved"
相關的 操作
-
Claim/$submit- 提交新的預先授權請求或更新現有的預先授權請求 -
Patient/$everything- 針對預先授權內容擷取完整的患者資料