azurerm_healthcare_medtech_service_fhir_Destination

Manages a Healthcare Med Tech Service Fhir Destination.

resource "azurerm_resource_group" "example" {
  name     = "example-rg"
  location = "West Europe"
}

data "azurerm_client_config" "current" {
}

resource "azurerm_healthcare_workspace" "example" {
  name                = "exampleworkspace"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_eventhub_namespace" "example" {
  name                = "example-ehn"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"
}

resource "azurerm_eventhub" "example" {
  name                = "example-eh"
  namespace_name      = azurerm_eventhub_namespace.example.name
  resource_group_name = azurerm_resource_group.example.name
  partition_count     = 1
  message_retention   = 1
}

resource "azurerm_eventhub_consumer_group" "example" {
  name                = "$default"
  namespace_name      = azurerm_eventhub_namespace.example.name
  eventhub_name       = azurerm_eventhub.example.name
  resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_healthcare_fhir_service" "example" {
  name                = "examplefhir"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  workspace_id        = azurerm_healthcare_workspace.example.id
  kind                = "fhir-R4"

  authentication {
    authority = "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    audience  = "https://examplefhir.fhir.azurehealthcareapis.com"
  }
}

resource "azurerm_healthcare_medtech_service" "example" {
  name         = "examplemt"
  workspace_id = azurerm_healthcare_workspace.example.id
  location     = azurerm_resource_group.example.location

  eventhub_namespace_name      = azurerm_eventhub_namespace.example.name
  eventhub_name                = azurerm_eventhub.example.name
  eventhub_consumer_group_name = azurerm_eventhub_consumer_group.example.name

  device_mapping_json = jsonencode({
    "templateType" : "CollectionContent",
    "template" : []
  })
}

resource "azurerm_healthcare_medtech_service_fhir_destination" "example" {
  name                                 = "examplemtdes"
  location                             = "east us"
  medtech_service_id                   = azurerm_healthcare_medtech_service.example.id
  destination_fhir_service_id          = azurerm_healthcare_fhir_service.example.id
  destination_identity_resolution_type = "Create"

  destination_fhir_mapping_json = jsonencode({
    "templateType" : "CollectionFhirTemplate",
    "template" : [
      {
        "templateType" : "CodeValueFhir",
        "template" : {
          "codes" : [
            {
              "code" : "8867-4",
              "system" : "http://loinc.org",
              "display" : "Heart rate"
            }
          ],
          "periodInterval" : 60,
          "typeName" : "heartrate",
          "value" : {
            "defaultPeriod" : 5000,
            "unit" : "count/min",
            "valueName" : "hr",
            "valueType" : "SampledData"
          }
        }
      }
    ]
  })
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following arguments are supported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Healthcare Med Tech Service Fhir Destination can be imported using the resourceid, e.g.

terraform import azurerm_healthcare_medtech_service_fhir_destination.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotConnectors/iotconnector1/fhirDestinations/destination1