.NET용 Azure Cognitive Services Health Insights 암 프로파일링 클라이언트 라이브러리 - 버전 1.0.0-beta.1

Health Insights 는 여러 Cognitive Services, Healthcare API 서비스 및 기타 Azure 리소스를 활용하는 Azure Cognitive Services 프레임워크를 사용하여 빌드된 Azure Applied AI Service입니다.

암 프로파일링 모델은 종양학 환자의 임상 기록을 받고 임상 단계 TNM 범주 및 병리학 단계 TNM 범주뿐만 아니라 종양 사이트, 히스톨로지와 같은 암 준비를 출력합니다.

소스 코드 | 패키지(NuGet) | API 참조 설명서 | 제품 설명서

시작

필수 조건

  • 이 패키지를 사용하려면 Azure 구독 이 필요합니다.
  • 기존 Cognitive Services Health Insights instance.

패키지 설치

NuGet을 사용하여 .NET용 Azure Health Insights 클라이언트 암 프로파일링 라이브러리를 설치합니다.

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

다음 표에서는 SDK 버전 및 지원되는 API 버전의 서비스 간 관계를 보여 줍니다.

SDK 버전 지원되는 API 버전의 서비스
1.0.0-beta.1 2023-03-01-preview

클라이언트 인증

Azure Portal 또는 Azure CLI를 사용하여 Health Insights 서비스 리소스에 대한 엔드포인트를 찾을 수 있습니다.

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

API 키 가져오기

Azure Portal의 Health Insights 서비스 리소스에서 API 키를 가져올 수 있습니다. 또는 아래 의 Azure CLI 코드 조각을 사용하여 리소스의 API 키를 가져올 수 있습니다.

az cognitiveservices account keys list --resource-group <your-resource-group-name> --name <your-resource-name>

AzureKeyCredential을 사용하여 CancerProfilingClient 만들기

API 키에 대한 값이 있으면 을 만듭니다 AzureKeyCredential. 엔드포인트 및 키 자격 증명을 사용하여 를 만들 CancerProfilingClient수 있습니다.

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

주요 개념

암 프로파일링 모델을 사용하면 비구조적 임상 문서에서 종양 사이트, 히스톨로지, 임상 단계 TNM 범주 및 병리학 단계 TNM 범주와 같은 암 특성을 유추할 수 있습니다.

예제

암 프로파일링

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 results
if (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}");
    }
}

문제 해결

콘솔 로깅 설정

로그를 확인하는 가장 간단한 방법은 콘솔 로깅을 사용하도록 설정하는 것입니다. 콘솔에 메시지를 출력하는 Azure SDK 로그 수신기를 만들려면 AzureEventSourceListener.CreateConsoleLogger 메서드를 사용합니다.

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

다른 로깅 메커니즘에 대한 자세한 내용은 진단 샘플을 참조하세요.

다음 단계

추가 설명서

Azure Health Insights 암 프로파일링에 대한 보다 광범위한 설명서는 docs.microsoft.com 대한 암 프로파일링 설명서를 참조하세요 .

참여

이 프로젝트에 대한 기여와 제안을 환영합니다. 대부분의 경우 기여하려면 권한을 부여하며 실제로 기여를 사용할 권한을 당사에 부여한다고 선언하는 CLA(기여자 라이선스 계약)에 동의해야 합니다. 자세한 내용은 cla.microsoft.com.

끌어오기 요청을 제출하면 CLA-bot은 CLA를 제공하고 PR을 적절하게 데코레이팅해야 하는지 여부를 자동으로 결정합니다(예: 레이블, 설명). 봇에서 제공하는 지침을 따르기만 하면 됩니다. 이 작업은 CLA를 사용하여 모든 리포지토리에서 한 번만 수행하면 됩니다.

이 프로젝트에는 Microsoft Open Source Code of Conduct(Microsoft 오픈 소스 준수 사항)가 적용됩니다. 자세한 내용은 Code of Conduct FAQ(규정 FAQ)를 참조하세요. 또는 추가 질문이나 의견은 opencode@microsoft.com으로 문의하세요.