Share via


RadiologyInsightsClient.InferRadiologyInsightsAsync Method

Definition

Overloads

InferRadiologyInsightsAsync(WaitUntil, RequestContent, RequestContext)

[Protocol Method] Create Radiology Insights job

InferRadiologyInsightsAsync(WaitUntil, RadiologyInsightsData, CancellationToken)

Create Radiology Insights job.

InferRadiologyInsightsAsync(WaitUntil, RequestContent, RequestContext)

Source:
RadiologyInsightsClient.cs

[Protocol Method] Create Radiology Insights job

public virtual System.Threading.Tasks.Task<Azure.Operation<BinaryData>> InferRadiologyInsightsAsync (Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member InferRadiologyInsightsAsync : Azure.WaitUntil * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
override this.InferRadiologyInsightsAsync : Azure.WaitUntil * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
Public Overridable Function InferRadiologyInsightsAsync (waitUntil As WaitUntil, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Operation(Of BinaryData))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Operation representing an asynchronous operation on the service.

Exceptions

content is null.

Service returned a non-success status code.

Examples

This sample shows how to call InferRadiologyInsightsAsync and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential);

using RequestContent content = RequestContent.Create(new
{
    patients = new object[]
    {
        new
        {
            id = "<id>",
        }
    },
});
Operation<BinaryData> operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, content);
BinaryData responseData = operation.Value;

JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("patientId").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("modelVersion").ToString());

This sample shows how to call InferRadiologyInsightsAsync with all parameters and request content and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential);

using RequestContent content = RequestContent.Create(new
{
    patients = new object[]
    {
        new
        {
            id = "<id>",
            info = new
            {
                sex = "female",
                birthDate = "2022-05-10",
                clinicalInfo = new object[]
                {
                    new
                    {
                        resourceType = "<resourceType>",
                        id = "<id>",
                        meta = new
                        {
                            versionId = "<versionId>",
                            lastUpdated = "<lastUpdated>",
                            source = "<source>",
                            profile = new object[]
                            {
                                "<profile>"
                            },
                            security = new object[]
                            {
                                new
                                {
                                    system = "<system>",
                                    version = "<version>",
                                    code = "<code>",
                                    display = "<display>",
                                    id = "<id>",
                                    extension = new object[]
                                    {
                                        new
                                        {
                                            url = "<url>",
                                            valueQuantity = new
                                            {
                                                value = 123.45,
                                                comparator = "<comparator>",
                                                unit = "<unit>",
                                                system = "<system>",
                                                code = "<code>",
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            valueCodeableConcept = new
                                            {
                                                coding = new object[]
                                                {
                                                    null
                                                },
                                                text = "<text>",
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            valueString = "<valueString>",
                                            valueBoolean = true,
                                            valueInteger = 1234,
                                            valueRange = new
                                            {
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            valueRatio = new
                                            {
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            valueSampledData = new
                                            {
                                                period = 123.45,
                                                factor = 123.45,
                                                lowerLimit = 123.45,
                                                upperLimit = 123.45,
                                                dimensions = 1234,
                                                data = "<data>",
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            valueTime = "01:23:45",
                                            valueDateTime = "<valueDateTime>",
                                            valuePeriod = new
                                            {
                                                start = "<start>",
                                                end = "<end>",
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            valueReference = new
                                            {
                                                reference = "<reference>",
                                                type = "<type>",
                                                identifier = new
                                                {
                                                    use = "<use>",
                                                    system = "<system>",
                                                    value = "<value>",
                                                    id = "<id>",
                                                    extension = new object[]
                                                    {
                                                        null
                                                    },
                                                },
                                                display = "<display>",
                                                id = "<id>",
                                                extension = new object[]
                                                {
                                                    null
                                                },
                                            },
                                            id = "<id>",
                                            extension = new object[]
                                            {
                                                null
                                            },
                                        }
                                    },
                                }
                            },
                            tag = new object[]
                            {
                                null
                            },
                        },
                        implicitRules = "<implicitRules>",
                        language = "<language>",
                    }
                },
            },
            encounters = new object[]
            {
                new Dictionary<string, object>
                {
                    ["id"] = "<id>",
                    ["period"] = new
                    {
                        start = "2022-05-10T14:57:31.2311892-04:00",
                        end = "2022-05-10T14:57:31.2311892-04:00",
                    },
                    ["class"] = "inpatient"
                }
            },
            patientDocuments = new object[]
            {
                new
                {
                    type = "note",
                    clinicalType = "consultation",
                    id = "<id>",
                    language = "<language>",
                    createdDateTime = "2022-05-10T14:57:31.2311892-04:00",
                    authors = new object[]
                    {
                        new
                        {
                            id = "<id>",
                            fullName = "<fullName>",
                        }
                    },
                    specialtyType = "pathology",
                    administrativeMetadata = new
                    {
                        orderedProcedures = new object[]
                        {
                            new
                            {
                                extension = new object[]
                                {
                                    null
                                },
                                description = "<description>",
                            }
                        },
                        encounterId = "<encounterId>",
                    },
                    content = new
                    {
                        sourceType = "inline",
                        value = "<value>",
                    },
                }
            },
        }
    },
    configuration = new
    {
        verbose = true,
        includeEvidence = true,
        inferenceTypes = new object[]
        {
            "ageMismatch"
        },
        inferenceOptions = new
        {
            followupRecommendationOptions = new
            {
                includeRecommendationsWithNoSpecifiedModality = true,
                includeRecommendationsInReferences = true,
                provideFocusedSentenceEvidence = true,
            },
            findingOptions = new
            {
                provideFocusedSentenceEvidence = true,
            },
        },
        locale = "<locale>",
    },
});
Operation<BinaryData> operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, content);
BinaryData responseData = operation.Value;

JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("patientId").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("url").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueQuantity").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueQuantity").GetProperty("comparator").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueQuantity").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueQuantity").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueQuantity").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueQuantity").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("coding")[0].GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("coding")[0].GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("coding")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("coding")[0].GetProperty("display").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("coding")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("text").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueCodeableConcept").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueString").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueBoolean").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueInteger").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("low").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("low").GetProperty("comparator").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("low").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("low").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("low").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("low").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("high").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("high").GetProperty("comparator").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("high").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("high").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("high").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("high").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRange").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("numerator").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("numerator").GetProperty("comparator").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("numerator").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("numerator").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("numerator").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("numerator").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("denominator").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("denominator").GetProperty("comparator").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("denominator").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("denominator").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("denominator").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("denominator").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueRatio").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("origin").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("origin").GetProperty("comparator").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("origin").GetProperty("unit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("origin").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("origin").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("origin").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("period").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("factor").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("lowerLimit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("upperLimit").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("dimensions").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("data").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueSampledData").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueTime").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueDateTime").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valuePeriod").GetProperty("start").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valuePeriod").GetProperty("end").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valuePeriod").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("reference").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("use").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("coding")[0].GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("coding")[0].GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("coding")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("coding")[0].GetProperty("display").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("coding")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("text").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("type").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("period").GetProperty("start").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("period").GetProperty("end").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("period").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("identifier").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("display").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("valueReference").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("patientResults")[0].GetProperty("inferences")[0].GetProperty("extension")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("modelVersion").ToString());

Applies to

InferRadiologyInsightsAsync(WaitUntil, RadiologyInsightsData, CancellationToken)

Source:
RadiologyInsightsClient.cs

Create Radiology Insights job.

public virtual System.Threading.Tasks.Task<Azure.Operation<Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceResult>> InferRadiologyInsightsAsync (Azure.WaitUntil waitUntil, Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData radiologyInsightsData, System.Threading.CancellationToken cancellationToken = default);
abstract member InferRadiologyInsightsAsync : Azure.WaitUntil * Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation<Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceResult>>
override this.InferRadiologyInsightsAsync : Azure.WaitUntil * Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation<Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceResult>>
Public Overridable Function InferRadiologyInsightsAsync (waitUntil As WaitUntil, radiologyInsightsData As RadiologyInsightsData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Operation(Of RadiologyInsightsInferenceResult))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

radiologyInsightsData
RadiologyInsightsData

Contains the list of patients, and configuration data.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

radiologyInsightsData is null.

Examples

This sample shows how to call InferRadiologyInsightsAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential);

RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[]
{
    new PatientRecord("<id>")
});
Operation<RadiologyInsightsInferenceResult> operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, radiologyInsightsData);
RadiologyInsightsInferenceResult responseData = operation.Value;

This sample shows how to call InferRadiologyInsightsAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential);

RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[]
{
    new PatientRecord("<id>")
    {
        Info = new PatientDetails
        {
            Sex = PatientSex.Female,
            BirthDate = DateTimeOffset.Parse("2022-05-10"),
            ClinicalInfo = {new FhirR4Resource("<resourceType>")
            {
                Id = "<id>",
                Meta = new FhirR4Meta
                {
                    VersionId = "<versionId>",
                    LastUpdated = "<lastUpdated>",
                    Source = "<source>",
                    Profile = {"<profile>"},
                    Security = {new FhirR4Coding
                    {
                        System = "<system>",
                        Version = "<version>",
                        Code = "<code>",
                        Display = "<display>",
                    }},
                    Tag = {default},
                },
                ImplicitRules = "<implicitRules>",
                Language = "<language>",
            }},
        },
        Encounters = {new Encounter("<id>")
        {
            Period = new TimePeriod
            {
                Start = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
                End = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
            },
            Class = EncounterClass.InPatient,
        }},
        PatientDocuments = {new PatientDocument(DocumentType.Note, "<id>", new DocumentContent(DocumentContentSourceType.Inline, "<value>"))
        {
            ClinicalType = ClinicalDocumentType.Consultation,
            Language = "<language>",
            CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
            Authors = {new DocumentAuthor
            {
                Id = "<id>",
                FullName = "<fullName>",
            }},
            SpecialtyType = SpecialtyType.Pathology,
            AdministrativeMetadata = new DocumentAdministrativeMetadata
            {
                OrderedProcedures = {new FhirR4Extendible
                {
                    Extension = {default},
                    Code = default,
                    Description = "<description>",
                }},
                EncounterId = "<encounterId>",
            },
        }},
    }
})
{
    Configuration = new RadiologyInsightsModelConfiguration
    {
        Verbose = true,
        IncludeEvidence = true,
        InferenceTypes = { RadiologyInsightsInferenceType.AgeMismatch },
        InferenceOptions = new RadiologyInsightsInferenceOptions
        {
            FollowupRecommendationOptions = new FollowupRecommendationOptions
            {
                IncludeRecommendationsWithNoSpecifiedModality = true,
                IncludeRecommendationsInReferences = true,
                ProvideFocusedSentenceEvidence = true,
            },
            FindingOptions = new FindingOptions
            {
                ProvideFocusedSentenceEvidence = true,
            },
        },
        Locale = "<locale>",
    },
};
Operation<RadiologyInsightsInferenceResult> operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, radiologyInsightsData);
RadiologyInsightsInferenceResult responseData = operation.Value;

Remarks

Creates a Radiology Insights job with the given request body.

Applies to