你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

快速入门:使用 ARM 模板部署 Azure API for FHIR

重要

Azure API for FHIR 将于 2026 年 9 月 30 日停用。 按照迁移策略在该日期之前过渡到 Azure Health Data Services FHIR 服务。 由于 Azure API for FHIR 停用,在 2025 年 4 月 1 日开始前不会允许新的部署。 Azure Health Data Services FHIR 服务是 Azure API for FHIR 的演化版本,可让客户管理 FHIR、DICOM 和医疗技术服务,并集成到其他 Azure 服务。

本快速入门介绍如何使用 Azure 资源管理器模板(ARM 模板)部署适用于快速医疗保健互操作性资源 (FHIR®) 的 Azure API。 可以通过 Azure 门户、PowerShell 或 CLI 部署 Azure API for FHIR。

Azure 资源管理器模板是定义项目基础结构和配置的 JavaScript 对象表示法 (JSON) 文件。 模板使用声明性语法。 你可以在不编写用于创建部署的编程命令序列的情况下,描述预期部署。

如果你的环境满足先决条件,并且你熟悉如何使用 ARM 模板,请选择“部署到 Azure”按钮。 登录后,该模板将在 Azure 门户中打开。

Button to deploy the Resource Manager template to Azure.

先决条件

具有活动订阅的 Azure 帐户。 免费创建一个

查看模板

本快速入门中使用的模板来自 Azure 快速启动模板

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.5.6.12127",
      "templateHash": "9588053699595008971"
    }
  },
  "parameters": {
    "serviceName": {
      "type": "string",
      "metadata": {
        "description": "The name of the service."
      }
    },
    "location": {
      "type": "string",
      "allowedValues": [
        "australiaeast",
        "eastus",
        "eastus2",
        "japaneast",
        "northcentralus",
        "northeurope",
        "southcentralus",
        "southeastasia",
        "uksouth",
        "ukwest",
        "westcentralus",
        "westeurope",
        "westus2"
      ],
      "metadata": {
        "description": "Location of Azure API for FHIR"
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.HealthcareApis/services",
      "apiVersion": "2021-11-01",
      "name": "[parameters('serviceName')]",
      "location": "[parameters('location')]",
      "kind": "fhir-R4",
      "properties": {
        "authenticationConfiguration": {
          "audience": "[format('https://{0}.azurehealthcareapis.com', parameters('serviceName'))]",
          "authority": "[uri(environment().authentication.loginEndpoint, subscription().tenantId)]"
        }
      }
    }
  ]
}

该模板定义了一个 Azure 资源:

  • Microsoft.HealthcareApis/services

部署模板

选择以下链接以使用 Azure 门户中的 ARM 模板部署 Azure API for FHIR:

Button to deploy the Resource Manager template to Azure.

在“部署 Azure API for FHIR”页上:

  1. 如果需要,可以将“订阅”从默认值更改为其他订阅。

  2. 对于“资源组”,请选择“新建”,输入新资源组的名称,然后选择“确定” 。

  3. 如果创建了新的资源组,请为该资源组选择一个区域。

  4. 输入新的服务名称,然后选择 Azure API for FHIR 所在的位置。 该位置可以与资源组所在的区域相同,也可以与资源组所在的区域不同。

    Deploy Azure API for FHIR using the ARM template in the Azure portal.

  5. 选择“查看 + 创建”。

  6. 阅读条款和条件,然后选择“创建”。

注意

部署需要数分钟才能完成。 记下 Azure API for FHIR 服务和资源组的名称,稍后将使用它们来查看已部署的资源。

查看已部署的资源

按照以下步骤查看新 Azure API for FHIR 服务的概览:

  1. Azure 门户中,搜索并选择“Azure API for FHIR”

  2. 在 FHIR 列表中,选择你的新服务。 此时将显示新 Azure API for FHIR 服务的“概述”页。

  3. 若要验证是否预配了新的 FHIR API 帐户,请选择“FHIR 元数据终结点”旁边的链接,以提取 FHIR API 功能语句。 该链接的格式为 https://<service-name>.azurehealthcareapis.com/metadata。 如果预配了帐户,则会显示一个较大的 JSON 文件。

清理资源

如果不再需要该资源组,可以将其删除,这将删除资源组中的资源。

  1. Azure 门户中,搜索并选择“资源组”。

  2. 在资源组列表中,选择你的资源组的名称。

  3. 在资源组的“概览”页中,选择“删除资源组” 。

  4. 在确认对话框中,键入资源组的名称,然后选择“删除”。

有关引导你完成 ARM 模板创建过程的分步教程,请参阅创建和部署第一个 ARM 模板教程

后续步骤

在本快速入门指南中,你已将 Azure API for FHIR 部署到订阅中。 有关如何注册应用程序和 Azure API for FHIR 配置设置的信息,请参阅

FHIR® 是 HL7 的注册商标,经 HL7 许可使用。