Azure.Health.Insights.CancerProfiling 1.0.0-beta.1

Prefix Reserved
This is a prerelease version of Azure.Health.Insights.CancerProfiling.
dotnet add package Azure.Health.Insights.CancerProfiling --version 1.0.0-beta.1
NuGet\Install-Package Azure.Health.Insights.CancerProfiling -Version 1.0.0-beta.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version ofInstall-Package.
<PackageReference Include="Azure.Health.Insights.CancerProfiling" Version="1.0.0-beta.1" />
For projects that supportPackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Azure.Health.Insights.CancerProfiling" Version="1.0.0-beta.1" />
Directory.Packages.props
<PackageReference Include="Azure.Health.Insights.CancerProfiling" />
Project file
For projects that supportCentral Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Azure.Health.Insights.CancerProfiling --version 1.0.0-beta.1
The NuGet Team does not provide support for this client. Please contact itsmaintainers for support.
#r "nuget: Azure.Health.Insights.CancerProfiling, 1.0.0-beta.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Azure.Health.Insights.CancerProfiling&version=1.0.0-beta.1&prerelease
Install as a Cake Addin
#tool nuget:?package=Azure.Health.Insights.CancerProfiling&version=1.0.0-beta.1&prerelease
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact itsmaintainers for support.

Azure Cognitive Services Health Insights Cancer Profiling client library for .NET

Health Insights is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources.

TheCancer Profiling model receives clinical records of oncology patients and outputs cancer staging, such as clinical stage TNM categories and pathologic stage TNM categories as well as tumor site, histology.

Source code |Package (NuGet) |API reference documentation |Product documentation

Getting started

Prerequisites

  • You need anAzure subscription to use this package.
  • An existing Cognitive Services Health Insights instance.

Install the package

Install the Azure Health Insights client Cancer Profiling library for .NET withNuGet:

dotnet add package Azure.Health.Insights.CancerProfiling --prerelease

This table shows the relationship between SDK versions and supported API versions of the service:

SDK versionSupported API version of service
1.0.0-beta.12023-03-01-preview

Authenticate the client

You can find the endpoint for your Health Insights service resource using theAzure Portal orAzure CLI

# Get the endpoint for the Health Insights service resourceaz cognitiveservices account show --name "resource-name" --resource-group "resource-group-name" --query "properties.endpoint"
Get the API Key

You can get theAPI Key from the Health Insights service resource in the Azure Portal.Alternatively, you can useAzure CLI snippet below to get the API key of your resource.

az cognitiveservices account keys list --resource-group <your-resource-group-name> --name <your-resource-name>
Create CancerProfilingClient with AzureKeyCredential

Once you have the value for the API key, create anAzureKeyCredential. With the endpoint and key credential, you can create theCancerProfilingClient:

string endpoint = "<endpoint>";string apiKey = "<apiKey>";var credential = new AzureKeyCredential(apiKey);var client = new CancerProfilingClient(new Uri(endpoint), credential);

Key concepts

The Cancer Profiling model allows you to infer cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM categories from unstructured clinical documents.

Examples

Cancer Profiling

OncoPhenotypeResult oncoPhenotypeResult = default;try{    Operation<OncoPhenotypeResult> operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData);    oncoPhenotypeResult = operation.Value;}catch (Exception ex){    Console.WriteLine(ex.ToString());    return;}
// View operation resultsif (oncoPhenotypeResult.Status == JobStatus.Succeeded){    OncoPhenotypeResults oncoResults = oncoPhenotypeResult.Results;    foreach (OncoPhenotypePatientResult patientResult in oncoResults.Patients)    {        Console.WriteLine($"\n==== Inferences of Patient {patientResult.Id} ====");        foreach (OncoPhenotypeInference oncoInference in patientResult.Inferences)        {            Console.WriteLine($"\n=== Clinical Type: {oncoInference.Type.ToString()}  Value: {oncoInference.Value}   ConfidenceScore: {oncoInference.ConfidenceScore} ===");            foreach (InferenceEvidence evidence in oncoInference.Evidence)            {                if (evidence.PatientDataEvidence != null)                {                    var dataEvidence = evidence.PatientDataEvidence;                    Console.WriteLine($"Evidence {dataEvidence.Id} {dataEvidence.Offset} {dataEvidence.Length} {dataEvidence.Text}");                }                if (evidence.PatientInfoEvidence != null)                {                    var infoEvidence = evidence.PatientInfoEvidence;                    Console.WriteLine($"Evidence {infoEvidence.System} {infoEvidence.Code} {infoEvidence.Name} {infoEvidence.Value}");                }            }        }    }}else{    IReadOnlyList<ResponseError> oncoErrors = oncoPhenotypeResult.Errors;    foreach (ResponseError error in oncoErrors)    {        Console.WriteLine($"{error.Code} : {error.Message}");    }}

Troubleshooting

Setting up console logging

The simplest way to see the logs is to enable the console logging.To create an Azure SDK log listener that outputs messages to console use the AzureEventSourceListener.CreateConsoleLogger method.

// Setup a listener to monitor logged events.using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();

To learn more about other logging mechanisms seeDiagnostics Samples.

Next steps

Additional documentation

For more extensive documentation on Azure Health Insights Cancer Profiling, see theCancer Profiling documentation on docs.microsoft.com.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visitcla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted theMicrosoft Open Source Code of Conduct. For more information see theCode of Conduct FAQ or contactopencode@microsoft.com with any additional questions or comments.

ProductCompatible and additional computed target framework versions.
.NETnet5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. 
.NET Corenetcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. 
.NET Standardnetstandard2.0 is compatible. netstandard2.1 was computed. 
.NET Frameworknet461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. 
MonoAndroidmonoandroid was computed. 
MonoMacmonomac was computed. 
MonoTouchmonotouch was computed. 
Tizentizen40 was computed. tizen60 was computed. 
Xamarin.iOSxamarinios was computed. 
Xamarin.Macxamarinmac was computed. 
Xamarin.TVOSxamarintvos was computed. 
Xamarin.WatchOSxamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more aboutTarget Frameworks and.NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

VersionDownloads Last Updated
1.0.0-beta.1 2,7684/4/2023
Downloads
Total2.8K
Current version2.8K
Per day average3
About
Owners

AzureHealthInsights

© Microsoft Corporation. All rights reserved.

Share this package on FacebookShare this package on XUse the Atom feed to subscribe to new versions of Azure.Health.Insights.CancerProfiling