View a markdown version of this page

FHIR 的$inquire手术 HealthLake - AWS HealthLake

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

FHIR 的$inquire手术 HealthLake

$inquire操作使您可以检查先前提交的先前授权请求的状态。该操作实施了《达芬奇事先授权支持 (PAS) 实施指南》,提供了一个基于 FHIR 的标准化工作流程来检索当前的授权决策。

工作原理

  • 提交查询:您发送了一份 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"

  • 参考资源:声明中引用的所有资源都必须包含在捆绑包中

按示例查询

您的输入 Bundle 中的资源可用作搜索模板。 HealthLake 使用提供的信息来查找相应的 ClaimResponse。

所需的资源

资源 基数 配置文件 说明
索赔 1 PAS 索赔查询 您要询问的事先授权
病人 1 PAS 受益患者 患者人口统计信息
组织(保险公司) 1 PAS 保险公司组织 保险公司
组织(提供商) 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 结果

结果 说明
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 不支持的媒体类型

当内容类型标头不是 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"

  • 必须恰好包含一个 Claim 资源

  • 所有引用的资源都必须包含在捆绑包中

索赔验证

  • 必须符合 PAS 索赔查询资料

  • Claim.use必须是 "preauthorization"

  • Claim.status必须是 "active"

  • 必填字段:patientinsurerprovidercreated

资源验证

  • 所有资源都必须符合各自的 PAS 查询资料

  • 必须有所需的支持资源(患者、保险公司组织、提供者组织)

  • 交叉引用必须有效且可在 Bundle 中解析

性能规格

指标 规范
资源数量限制 每个捆绑包 500 个资源
捆绑包大小限制 最大 5 MB

所需的权限

要使用该$inquire操作,请确保您的 IAM 角色具有:

  • healthlake:InquirePreAuthClaim-调用该操作

在 FHIR 瞄准镜上使用 S

所需的最低范围:

  • SMART v1:user/ClaimResponse.read

  • SMART v2:user/ClaimResponse.s

重要的实施说明

搜索行为

当您提交查询时, ClaimResponse 使用以下方式进行 HealthLake 搜索:

  • 输入索赔中的@@ 患者参考信息

  • 输入索赔中的@@ 保险公司参考信息

  • 来自输入索赔的@@ 提供者参考

  • 根据输入的 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-检索全面的患者数据以获取事先授权的上下文