1. Packages
  2. Hsdp Provider
  3. API Docs
  4. getCdrOrg
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.getCdrOrg

Explore with Pulumi AI

hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

Retrieve details of a CDR organization

Example Usage

The following example retrieves details of an onboarded CDR org

import * as pulumi from "@pulumi/pulumi";
import * as hsdp from "@pulumi/hsdp";

const sandbox = hsdp.getCdrFhirStore({
    baseUrl: "https://cdr-stu3-sandbox.hsdp.io",
    fhirOrgId: _var.root_org_id,
});
const hospital = sandbox.then(sandbox => hsdp.getCdrOrg({
    fhirStore: sandbox.endpoint,
    orgId: _var.sub_org_id,
    version: "r4",
}));
export const cdrOrgName = hospital.then(hospital => hospital.name);
Copy
import pulumi
import pulumi_hsdp as hsdp

sandbox = hsdp.get_cdr_fhir_store(base_url="https://cdr-stu3-sandbox.hsdp.io",
    fhir_org_id=var["root_org_id"])
hospital = hsdp.get_cdr_org(fhir_store=sandbox.endpoint,
    org_id=var["sub_org_id"],
    version="r4")
pulumi.export("cdrOrgName", hospital.name)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		sandbox, err := hsdp.GetCdrFhirStore(ctx, &hsdp.GetCdrFhirStoreArgs{
			BaseUrl:   "https://cdr-stu3-sandbox.hsdp.io",
			FhirOrgId: _var.Root_org_id,
		}, nil)
		if err != nil {
			return err
		}
		hospital, err := hsdp.LookupCdrOrg(ctx, &hsdp.LookupCdrOrgArgs{
			FhirStore: sandbox.Endpoint,
			OrgId:     _var.Sub_org_id,
			Version:   pulumi.StringRef("r4"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cdrOrgName", hospital.Name)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hsdp = Pulumi.Hsdp;

return await Deployment.RunAsync(() => 
{
    var sandbox = Hsdp.GetCdrFhirStore.Invoke(new()
    {
        BaseUrl = "https://cdr-stu3-sandbox.hsdp.io",
        FhirOrgId = @var.Root_org_id,
    });

    var hospital = Hsdp.GetCdrOrg.Invoke(new()
    {
        FhirStore = sandbox.Apply(getCdrFhirStoreResult => getCdrFhirStoreResult.Endpoint),
        OrgId = @var.Sub_org_id,
        Version = "r4",
    });

    return new Dictionary<string, object?>
    {
        ["cdrOrgName"] = hospital.Apply(getCdrOrgResult => getCdrOrgResult.Name),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hsdp.HsdpFunctions;
import com.pulumi.hsdp.inputs.GetCdrFhirStoreArgs;
import com.pulumi.hsdp.inputs.GetCdrOrgArgs;
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) {
        final var sandbox = HsdpFunctions.getCdrFhirStore(GetCdrFhirStoreArgs.builder()
            .baseUrl("https://cdr-stu3-sandbox.hsdp.io")
            .fhirOrgId(var_.root_org_id())
            .build());

        final var hospital = HsdpFunctions.getCdrOrg(GetCdrOrgArgs.builder()
            .fhirStore(sandbox.applyValue(getCdrFhirStoreResult -> getCdrFhirStoreResult.endpoint()))
            .orgId(var_.sub_org_id())
            .version("r4")
            .build());

        ctx.export("cdrOrgName", hospital.applyValue(getCdrOrgResult -> getCdrOrgResult.name()));
    }
}
Copy
variables:
  sandbox:
    fn::invoke:
      function: hsdp:getCdrFhirStore
      arguments:
        baseUrl: https://cdr-stu3-sandbox.hsdp.io
        fhirOrgId: ${var.root_org_id}
  hospital:
    fn::invoke:
      function: hsdp:getCdrOrg
      arguments:
        fhirStore: ${sandbox.endpoint}
        orgId: ${var.sub_org_id}
        version: r4
outputs:
  cdrOrgName: ${hospital.name}
Copy

Using getCdrOrg

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCdrOrg(args: GetCdrOrgArgs, opts?: InvokeOptions): Promise<GetCdrOrgResult>
function getCdrOrgOutput(args: GetCdrOrgOutputArgs, opts?: InvokeOptions): Output<GetCdrOrgResult>
Copy
def get_cdr_org(fhir_store: Optional[str] = None,
                id: Optional[str] = None,
                org_id: Optional[str] = None,
                version: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetCdrOrgResult
def get_cdr_org_output(fhir_store: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                org_id: Optional[pulumi.Input[str]] = None,
                version: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetCdrOrgResult]
Copy
func LookupCdrOrg(ctx *Context, args *LookupCdrOrgArgs, opts ...InvokeOption) (*LookupCdrOrgResult, error)
func LookupCdrOrgOutput(ctx *Context, args *LookupCdrOrgOutputArgs, opts ...InvokeOption) LookupCdrOrgResultOutput
Copy

> Note: This function is named LookupCdrOrg in the Go SDK.

public static class GetCdrOrg 
{
    public static Task<GetCdrOrgResult> InvokeAsync(GetCdrOrgArgs args, InvokeOptions? opts = null)
    public static Output<GetCdrOrgResult> Invoke(GetCdrOrgInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCdrOrgResult> getCdrOrg(GetCdrOrgArgs args, InvokeOptions options)
public static Output<GetCdrOrgResult> getCdrOrg(GetCdrOrgArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: hsdp:index/getCdrOrg:getCdrOrg
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

FhirStore This property is required. string
The CDR FHIR store to use
OrgId This property is required. string
The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
Id string
The GUID of the organization
Version string
The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
FhirStore This property is required. string
The CDR FHIR store to use
OrgId This property is required. string
The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
Id string
The GUID of the organization
Version string
The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
fhirStore This property is required. String
The CDR FHIR store to use
orgId This property is required. String
The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
id String
The GUID of the organization
version String
The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
fhirStore This property is required. string
The CDR FHIR store to use
orgId This property is required. string
The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
id string
The GUID of the organization
version string
The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
fhir_store This property is required. str
The CDR FHIR store to use
org_id This property is required. str
The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
id str
The GUID of the organization
version str
The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3
fhirStore This property is required. String
The CDR FHIR store to use
orgId This property is required. String
The Org ID (GUID) under which to onboard. Usually same as IAM Org ID
id String
The GUID of the organization
version String
The FHIR version to use. Options [ stu3 | r4 ]. Default is stu3

getCdrOrg Result

The following output properties are available:

FhirStore string
Id string
The GUID of the organization
Name string
The name of the FHIR Org
OrgId string
PartOf string
The parent Organization ID (GUID) this Org is part of
Version string
FhirStore string
Id string
The GUID of the organization
Name string
The name of the FHIR Org
OrgId string
PartOf string
The parent Organization ID (GUID) this Org is part of
Version string
fhirStore String
id String
The GUID of the organization
name String
The name of the FHIR Org
orgId String
partOf String
The parent Organization ID (GUID) this Org is part of
version String
fhirStore string
id string
The GUID of the organization
name string
The name of the FHIR Org
orgId string
partOf string
The parent Organization ID (GUID) this Org is part of
version string
fhir_store str
id str
The GUID of the organization
name str
The name of the FHIR Org
org_id str
part_of str
The parent Organization ID (GUID) this Org is part of
version str
fhirStore String
id String
The GUID of the organization
name String
The name of the FHIR Org
orgId String
partOf String
The parent Organization ID (GUID) this Org is part of
version String

Package Details

Repository
hsdp philips-software/terraform-provider-hsdp
License
Notes
This Pulumi package is based on the hsdp Terraform Provider.
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software