Medtech Service Fhir Destination Args
data class MedtechServiceFhirDestinationArgs(val destinationFhirMappingJson: Output<String>? = null, val destinationFhirServiceId: Output<String>? = null, val destinationIdentityResolutionType: Output<String>? = null, val location: Output<String>? = null, val medtechServiceId: Output<String>? = null, val name: Output<String>? = null) : ConvertibleToJava<MedtechServiceFhirDestinationArgs>
Manages a Healthcare Med Tech Service Fhir Destination.
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const current = azure.core.getClientConfig({});
const exampleWorkspace = new azure.healthcare.Workspace("exampleWorkspace", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("exampleEventHubNamespace", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
sku: "Standard",
});
const exampleEventHub = new azure.eventhub.EventHub("exampleEventHub", {
namespaceName: exampleEventHubNamespace.name,
resourceGroupName: exampleResourceGroup.name,
partitionCount: 1,
messageRetention: 1,
});
const exampleConsumerGroup = new azure.eventhub.ConsumerGroup("exampleConsumerGroup", {
namespaceName: exampleEventHubNamespace.name,
eventhubName: exampleEventHub.name,
resourceGroupName: exampleResourceGroup.name,
});
const exampleFhirService = new azure.healthcare.FhirService("exampleFhirService", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
workspaceId: exampleWorkspace.id,
kind: "fhir-R4",
authentication: {
authority: "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
audience: "https://examplefhir.fhir.azurehealthcareapis.com",
},
});
const exampleMedtechService = new azure.healthcare.MedtechService("exampleMedtechService", {
workspaceId: exampleWorkspace.id,
location: exampleResourceGroup.location,
eventhubNamespaceName: exampleEventHubNamespace.name,
eventhubName: exampleEventHub.name,
eventhubConsumerGroupName: exampleConsumerGroup.name,
deviceMappingJson: JSON.stringify({
templateType: "CollectionContent",
template: [],
}),
});
const exampleMedtechServiceFhirDestination = new azure.healthcare.MedtechServiceFhirDestination("exampleMedtechServiceFhirDestination", {
location: "east us",
medtechServiceId: exampleMedtechService.id,
destinationFhirServiceId: exampleFhirService.id,
destinationIdentityResolutionType: "Create",
destinationFhirMappingJson: JSON.stringify({
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",
},
},
}],
}),
});
Content copied to clipboard
import pulumi
import json
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
current = azure.core.get_client_config()
example_workspace = azure.healthcare.Workspace("exampleWorkspace",
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_event_hub_namespace = azure.eventhub.EventHubNamespace("exampleEventHubNamespace",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku="Standard")
example_event_hub = azure.eventhub.EventHub("exampleEventHub",
namespace_name=example_event_hub_namespace.name,
resource_group_name=example_resource_group.name,
partition_count=1,
message_retention=1)
example_consumer_group = azure.eventhub.ConsumerGroup("exampleConsumerGroup",
namespace_name=example_event_hub_namespace.name,
eventhub_name=example_event_hub.name,
resource_group_name=example_resource_group.name)
example_fhir_service = azure.healthcare.FhirService("exampleFhirService",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
workspace_id=example_workspace.id,
kind="fhir-R4",
authentication=azure.healthcare.FhirServiceAuthenticationArgs(
authority="https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
audience="https://examplefhir.fhir.azurehealthcareapis.com",
))
example_medtech_service = azure.healthcare.MedtechService("exampleMedtechService",
workspace_id=example_workspace.id,
location=example_resource_group.location,
eventhub_namespace_name=example_event_hub_namespace.name,
eventhub_name=example_event_hub.name,
eventhub_consumer_group_name=example_consumer_group.name,
device_mapping_json=json.dumps({
"templateType": "CollectionContent",
"template": [],
}))
example_medtech_service_fhir_destination = azure.healthcare.MedtechServiceFhirDestination("exampleMedtechServiceFhirDestination",
location="east us",
medtech_service_id=example_medtech_service.id,
destination_fhir_service_id=example_fhir_service.id,
destination_identity_resolution_type="Create",
destination_fhir_mapping_json=json.dumps({
"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",
},
},
}],
}))
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var current = Azure.Core.GetClientConfig.Invoke();
var exampleWorkspace = new Azure.Healthcare.Workspace("exampleWorkspace", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("exampleEventHubNamespace", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "Standard",
});
var exampleEventHub = new Azure.EventHub.EventHub("exampleEventHub", new()
{
NamespaceName = exampleEventHubNamespace.Name,
ResourceGroupName = exampleResourceGroup.Name,
PartitionCount = 1,
MessageRetention = 1,
});
var exampleConsumerGroup = new Azure.EventHub.ConsumerGroup("exampleConsumerGroup", new()
{
NamespaceName = exampleEventHubNamespace.Name,
EventhubName = exampleEventHub.Name,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleFhirService = new Azure.Healthcare.FhirService("exampleFhirService", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
WorkspaceId = exampleWorkspace.Id,
Kind = "fhir-R4",
Authentication = new Azure.Healthcare.Inputs.FhirServiceAuthenticationArgs
{
Authority = "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Audience = "https://examplefhir.fhir.azurehealthcareapis.com",
},
});
var exampleMedtechService = new Azure.Healthcare.MedtechService("exampleMedtechService", new()
{
WorkspaceId = exampleWorkspace.Id,
Location = exampleResourceGroup.Location,
EventhubNamespaceName = exampleEventHubNamespace.Name,
EventhubName = exampleEventHub.Name,
EventhubConsumerGroupName = exampleConsumerGroup.Name,
DeviceMappingJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["templateType"] = "CollectionContent",
["template"] = new[]
{
},
}),
});
var exampleMedtechServiceFhirDestination = new Azure.Healthcare.MedtechServiceFhirDestination("exampleMedtechServiceFhirDestination", new()
{
Location = "east us",
MedtechServiceId = exampleMedtechService.Id,
DestinationFhirServiceId = exampleFhirService.Id,
DestinationIdentityResolutionType = "Create",
DestinationFhirMappingJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["templateType"] = "CollectionFhirTemplate",
["template"] = new[]
{
new Dictionary<string, object?>
{
["templateType"] = "CodeValueFhir",
["template"] = new Dictionary<string, object?>
{
["codes"] = new[]
{
new Dictionary<string, object?>
{
["code"] = "8867-4",
["system"] = "http://loinc.org",
["display"] = "Heart rate",
},
},
["periodInterval"] = 60,
["typeName"] = "heartrate",
["value"] = new Dictionary<string, object?>
{
["defaultPeriod"] = 5000,
["unit"] = "count/min",
["valueName"] = "hr",
["valueType"] = "SampledData",
},
},
},
},
}),
});
});
Content copied to clipboard
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/healthcare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleWorkspace, err := healthcare.NewWorkspace(ctx, "exampleWorkspace", &healthcare.WorkspaceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "exampleEventHubNamespace", &eventhub.EventHubNamespaceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
exampleEventHub, err := eventhub.NewEventHub(ctx, "exampleEventHub", &eventhub.EventHubArgs{
NamespaceName: exampleEventHubNamespace.Name,
ResourceGroupName: exampleResourceGroup.Name,
PartitionCount: pulumi.Int(1),
MessageRetention: pulumi.Int(1),
})
if err != nil {
return err
}
exampleConsumerGroup, err := eventhub.NewConsumerGroup(ctx, "exampleConsumerGroup", &eventhub.ConsumerGroupArgs{
NamespaceName: exampleEventHubNamespace.Name,
EventhubName: exampleEventHub.Name,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleFhirService, err := healthcare.NewFhirService(ctx, "exampleFhirService", &healthcare.FhirServiceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
WorkspaceId: exampleWorkspace.ID(),
Kind: pulumi.String("fhir-R4"),
Authentication: &healthcare.FhirServiceAuthenticationArgs{
Authority: pulumi.String("https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
Audience: pulumi.String("https://examplefhir.fhir.azurehealthcareapis.com"),
},
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"templateType": "CollectionContent",
"template": []interface{}{},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
exampleMedtechService, err := healthcare.NewMedtechService(ctx, "exampleMedtechService", &healthcare.MedtechServiceArgs{
WorkspaceId: exampleWorkspace.ID(),
Location: exampleResourceGroup.Location,
EventhubNamespaceName: exampleEventHubNamespace.Name,
EventhubName: exampleEventHub.Name,
EventhubConsumerGroupName: exampleConsumerGroup.Name,
DeviceMappingJson: pulumi.String(json0),
})
if err != nil {
return err
}
tmpJSON1, err := json.Marshal(map[string]interface{}{
"templateType": "CollectionFhirTemplate",
"template": []map[string]interface{}{
map[string]interface{}{
"templateType": "CodeValueFhir",
"template": map[string]interface{}{
"codes": []map[string]interface{}{
map[string]interface{}{
"code": "8867-4",
"system": "http://loinc.org",
"display": "Heart rate",
},
},
"periodInterval": 60,
"typeName": "heartrate",
"value": map[string]interface{}{
"defaultPeriod": 5000,
"unit": "count/min",
"valueName": "hr",
"valueType": "SampledData",
},
},
},
},
})
if err != nil {
return err
}
json1 := string(tmpJSON1)
_, err = healthcare.NewMedtechServiceFhirDestination(ctx, "exampleMedtechServiceFhirDestination", &healthcare.MedtechServiceFhirDestinationArgs{
Location: pulumi.String("east us"),
MedtechServiceId: exampleMedtechService.ID(),
DestinationFhirServiceId: exampleFhirService.ID(),
DestinationIdentityResolutionType: pulumi.String("Create"),
DestinationFhirMappingJson: pulumi.String(json1),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.healthcare.Workspace;
import com.pulumi.azure.healthcare.WorkspaceArgs;
import com.pulumi.azure.eventhub.EventHubNamespace;
import com.pulumi.azure.eventhub.EventHubNamespaceArgs;
import com.pulumi.azure.eventhub.EventHub;
import com.pulumi.azure.eventhub.EventHubArgs;
import com.pulumi.azure.eventhub.ConsumerGroup;
import com.pulumi.azure.eventhub.ConsumerGroupArgs;
import com.pulumi.azure.healthcare.FhirService;
import com.pulumi.azure.healthcare.FhirServiceArgs;
import com.pulumi.azure.healthcare.inputs.FhirServiceAuthenticationArgs;
import com.pulumi.azure.healthcare.MedtechService;
import com.pulumi.azure.healthcare.MedtechServiceArgs;
import com.pulumi.azure.healthcare.MedtechServiceFhirDestination;
import com.pulumi.azure.healthcare.MedtechServiceFhirDestinationArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
final var current = CoreFunctions.getClientConfig();
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Standard")
.build());
var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.resourceGroupName(exampleResourceGroup.name())
.partitionCount(1)
.messageRetention(1)
.build());
var exampleConsumerGroup = new ConsumerGroup("exampleConsumerGroup", ConsumerGroupArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.eventhubName(exampleEventHub.name())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleFhirService = new FhirService("exampleFhirService", FhirServiceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.workspaceId(exampleWorkspace.id())
.kind("fhir-R4")
.authentication(FhirServiceAuthenticationArgs.builder()
.authority("https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.audience("https://examplefhir.fhir.azurehealthcareapis.com")
.build())
.build());
var exampleMedtechService = new MedtechService("exampleMedtechService", MedtechServiceArgs.builder()
.workspaceId(exampleWorkspace.id())
.location(exampleResourceGroup.location())
.eventhubNamespaceName(exampleEventHubNamespace.name())
.eventhubName(exampleEventHub.name())
.eventhubConsumerGroupName(exampleConsumerGroup.name())
.deviceMappingJson(serializeJson(
jsonObject(
jsonProperty("templateType", "CollectionContent"),
jsonProperty("template", jsonArray(
))
)))
.build());
var exampleMedtechServiceFhirDestination = new MedtechServiceFhirDestination("exampleMedtechServiceFhirDestination", MedtechServiceFhirDestinationArgs.builder()
.location("east us")
.medtechServiceId(exampleMedtechService.id())
.destinationFhirServiceId(exampleFhirService.id())
.destinationIdentityResolutionType("Create")
.destinationFhirMappingJson(serializeJson(
jsonObject(
jsonProperty("templateType", "CollectionFhirTemplate"),
jsonProperty("template", jsonArray(jsonObject(
jsonProperty("templateType", "CodeValueFhir"),
jsonProperty("template", jsonObject(
jsonProperty("codes", jsonArray(jsonObject(
jsonProperty("code", "8867-4"),
jsonProperty("system", "http://loinc.org"),
jsonProperty("display", "Heart rate")
))),
jsonProperty("periodInterval", 60),
jsonProperty("typeName", "heartrate"),
jsonProperty("value", jsonObject(
jsonProperty("defaultPeriod", 5000),
jsonProperty("unit", "count/min"),
jsonProperty("valueName", "hr"),
jsonProperty("valueType", "SampledData")
))
))
)))
)))
.build());
}
}
Content copied to clipboard
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleWorkspace:
type: azure:healthcare:Workspace
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
exampleEventHubNamespace:
type: azure:eventhub:EventHubNamespace
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
sku: Standard
exampleEventHub:
type: azure:eventhub:EventHub
properties:
namespaceName: ${exampleEventHubNamespace.name}
resourceGroupName: ${exampleResourceGroup.name}
partitionCount: 1
messageRetention: 1
exampleConsumerGroup:
type: azure:eventhub:ConsumerGroup
properties:
namespaceName: ${exampleEventHubNamespace.name}
eventhubName: ${exampleEventHub.name}
resourceGroupName: ${exampleResourceGroup.name}
exampleFhirService:
type: azure:healthcare:FhirService
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
workspaceId: ${exampleWorkspace.id}
kind: fhir-R4
authentication:
authority: https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
audience: https://examplefhir.fhir.azurehealthcareapis.com
exampleMedtechService:
type: azure:healthcare:MedtechService
properties:
workspaceId: ${exampleWorkspace.id}
location: ${exampleResourceGroup.location}
eventhubNamespaceName: ${exampleEventHubNamespace.name}
eventhubName: ${exampleEventHub.name}
eventhubConsumerGroupName: ${exampleConsumerGroup.name}
deviceMappingJson:
fn::toJSON:
templateType: CollectionContent
template: []
exampleMedtechServiceFhirDestination:
type: azure:healthcare:MedtechServiceFhirDestination
properties:
location: east us
medtechServiceId: ${exampleMedtechService.id}
destinationFhirServiceId: ${exampleFhirService.id}
destinationIdentityResolutionType: Create
destinationFhirMappingJson:
fn::toJSON:
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
variables:
current:
fn::invoke:
Function: azure:core:getClientConfig
Arguments: {}
Content copied to clipboard
Import
Healthcare Med Tech Service Fhir Destination can be imported using the resourceid
, e.g.
$ pulumi import azure:healthcare/medtechServiceFhirDestination:MedtechServiceFhirDestination example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotConnectors/iotconnector1/fhirDestinations/destination1
Content copied to clipboard
Constructors
Link copied to clipboard
fun MedtechServiceFhirDestinationArgs(destinationFhirMappingJson: Output<String>? = null, destinationFhirServiceId: Output<String>? = null, destinationIdentityResolutionType: Output<String>? = null, location: Output<String>? = null, medtechServiceId: Output<String>? = null, name: Output<String>? = null)