You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure FHIR Service无法识别派生扩展的问题解决问询

问题描述

我基于FHIR US Core 6.1.0创建了一个FHIR Patient profile,使用FHIR ShortHand编写并通过sushi build -s .命令转换为包含快照的FHIR JSON格式。将该profile发布到Azure Health Data FHIR Service后,尝试验证基于此profile的Patient资源,但Azure FHIR Service生成警告,提示无法从US Core Patient profile派生扩展:

curl -X post --header "Content-type: application/json" --header "Authorization: Bearer ${azFhirToken}" --data "@fsh-generated/resources/PatientUS.json" 'https://abc-fhir001.fhir.azurehealthcareapis.com/Patient/$validate' | jq

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6523    0   605  100  5918    354   3466  0:00:01  0:00:01 --:--:--  3834

{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "warning",
      "code": "business-rule",
      "details": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/dotnet-api-operation-outcome",
            "code": "2012"
          }
        ],
        "text": "Cannot walk into unknown StructureDefinition with canonical 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race' at 'https://abc-fhir001.fhir.azurehealthcareapis.com/StructureDefinition/patient-us#Patient.extension (Patient.extension:race)'"
      },
      "location": [
        "Patient // OperationOutcome.Location is deprecated, please use OperationOutcome.Expression"
      ],
      "expression": [
        "Patient"
      ]
    }
  ]
}

我的疑问:

  • 如何解决该警告?
  • 能否让Azure FHIR Service从http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient获取并分析race、ethnicity等US Core扩展?
  • 是否可在发布前将这些扩展纳入我的Patient profile?
  • 最坏情况下能否抑制该警告?
解决方案

1. 部署US Core全套结构定义到Azure FHIR Service

Azure FHIR Service无法直接从外部HL7网站拉取结构定义,必须先将US Core 6.1.0的全套资源(包括race、ethnicity等扩展对应的StructureDefinition)部署到你的FHIR服务实例中:

  • 下载US Core 6.1.0的完整资源包,通过批量导入工具上传到Azure FHIR Service
  • 使用FHIR CLI工具自动同步US Core的所有标准结构定义

2. 在自定义Profile中显式引入所需扩展

如果不想部署全套US Core,可在FHIR ShortHand代码中显式声明要使用的US Core扩展,让SUSHI在构建时将这些扩展的结构定义包含到输出包中:

Profile: PatientUS
Parent: http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Id: patient-us
Title: "Custom US Core Patient"

* extension contains 
    http://hl7.org/fhir/us/core/StructureDefinition/us-core-race named race 0..1 and
    http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity named ethnicity 0..1

构建完成后,将生成的所有资源(自定义Profile+引用的扩展定义)一起发布到Azure FHIR Service即可。

3. 抑制警告(仅作为最后手段)

若上述方法无法实施,可通过Azure门户调整FHIR服务的校验规则:

  • 登录Azure门户,找到目标FHIR服务实例
  • 进入「FHIR配置」页面,修改「Validation Settings」中的规则,将代码为2012的业务规则警告设置为忽略
  • 注意:此操作会跳过相关结构校验,可能导致非标准资源存入服务,仅建议在特殊场景下使用

内容的提问来源于stack exchange,提问作者Olex

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 19:38:40