次の方法で共有


ClinicalMatchingClient.MatchTrialsAsync メソッド

定義

オーバーロード

MatchTrialsAsync(WaitUntil, RequestContent, String, Nullable<DateTimeOffset>, RequestContext)

試用版マッチャー ジョブを作成します。

MatchTrialsAsync(WaitUntil, TrialMatcherData, String, Nullable<DateTimeOffset>, CancellationToken)

試用版マッチャー ジョブを作成します。

MatchTrialsAsync(WaitUntil, RequestContent, String, Nullable<DateTimeOffset>, RequestContext)

Source:
ClinicalMatchingClient.cs

試用版マッチャー ジョブを作成します。

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

パラメーター

waitUntil
WaitUntil

Completed メソッドが、サービスで実行時間の長い操作が完了するまで戻るまで待機する必要がある場合。 Started 操作を開始した後に が返される場合は 。 実行時間の長い操作の詳細については、「 Azure.Core Long-Running 操作のサンプル」を参照してください。

content
RequestContent

要求の本文として送信するコンテンツ。 要求本文スキーマの詳細については、以下の「解説」セクションを参照してください。

repeatabilityRequestId
String

要求の不透明でグローバルに一意のクライアント生成文字列識別子。

repeatabilityFirstSent
Nullable<DateTimeOffset>

要求が最初に作成された日時を指定します。

context
RequestContext

要求コンテキスト。これは、クライアント パイプラインの既定の動作を呼び出しごとにオーバーライドできます。

戻り値

Operation<T>サービスに対する非同期操作が完了した後に オブジェクトを格納BinaryDataするサービスの 。 操作の最終値の本文スキーマの詳細については、以下の「解説」セクションを参照してください。

例外

content が null です。

サービスから成功以外の状態コードが返されました。

このサンプルでは、必要なパラメーターと要求コンテンツを使用して MatchTrialsAsync を呼び出す方法と、結果を解析する方法を示します。

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

var data = new {
    patients = new[] {
        new {
            id = "<id>",
        }
    },
};

var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data));

BinaryData data = operation.Value;
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("expirationDateTime").ToString());
Console.WriteLine(result.GetProperty("lastUpdateDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());

このサンプルでは、すべてのパラメーターと要求コンテンツを使用して MatchTrialsAsync を呼び出す方法と、結果を解析する方法を示します。

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

var data = new {
    patients = new[] {
        new {
            id = "<id>",
            info = new {
                sex = "female",
                birthDate = "2022-05-10",
                clinicalInfo = new[] {
                    new {
                        system = "<system>",
                        code = "<code>",
                        name = "<name>",
                        value = "<value>",
                    }
                },
            },
            data = new[] {
                new {
                    type = "note",
                    clinicalType = "consultation",
                    id = "<id>",
                    language = "<language>",
                    createdDateTime = "2022-05-10T14:57:31.2311892-04:00",
                    content = new {
                        sourceType = "inline",
                        value = "<value>",
                    },
                }
            },
        }
    },
    configuration = new {
        verbose = true,
        includeEvidence = true,
        clinicalTrials = new {
            customTrials = new[] {
                new {
                    id = "<id>",
                    eligibilityCriteriaText = "<eligibilityCriteriaText>",
                    demographics = new {
                        acceptedSex = "all",
                        acceptedAgeRange = new {
                            minimumAge = new {
                                unit = "years",
                                value = 123.45f,
                            },
                            maximumAge = new {
                                unit = "years",
                                value = 123.45f,
                            },
                        },
                    },
                    metadata = new {
                        phases = new[] {
                            "notApplicable"
                        },
                        studyType = "interventional",
                        recruitmentStatus = "unknownStatus",
                        conditions = new[] {
                            "<String>"
                        },
                        sponsors = new[] {
                            "<String>"
                        },
                        contacts = new[] {
                            new {
                                name = "<name>",
                                email = "<email>",
                                phone = "<phone>",
                            }
                        },
                        facilities = new[] {
                            new {
                                name = "<name>",
                                city = "<city>",
                                state = "<state>",
                                countryOrRegion = "<countryOrRegion>",
                            }
                        },
                    },
                }
            },
            registryFilters = new[] {
                new {
                    conditions = new[] {
                        "<String>"
                    },
                    studyTypes = new[] {
                        "interventional"
                    },
                    recruitmentStatuses = new[] {
                        "unknownStatus"
                    },
                    sponsors = new[] {
                        "<String>"
                    },
                    phases = new[] {
                        "notApplicable"
                    },
                    purposes = new[] {
                        "notApplicable"
                    },
                    ids = new[] {
                        "<String>"
                    },
                    sources = new[] {
                        "custom"
                    },
                    facilityNames = new[] {
                        "<String>"
                    },
                    facilityLocations = new[] {
                        new {
                            city = "<city>",
                            state = "<state>",
                            countryOrRegion = "<countryOrRegion>",
                        }
                    },
                    facilityAreas = new[] {
                        new {
                            type = "Feature",
                            geometry = new {
                                type = "Point",
                                coordinates = new[] {
                                    123.45f
                                },
                            },
                            properties = new {
                                subType = "Circle",
                                radius = 123.45d,
                            },
                        }
                    },
                }
            },
        },
    },
};

var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data), "<repeatabilityRequestId>", DateTimeOffset.UtcNow);

BinaryData data = operation.Value;
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("expirationDateTime").ToString());
Console.WriteLine(result.GetProperty("lastUpdateDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("confidenceScore").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("eligibilityCriteriaEvidence").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientDataEvidence").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientDataEvidence").GetProperty("text").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientDataEvidence").GetProperty("offset").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientDataEvidence").GetProperty("length").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientInfoEvidence").GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientInfoEvidence").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientInfoEvidence").GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("patientInfoEvidence").GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("importance").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("source").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("phases")[0].ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("studyType").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("recruitmentStatus").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("conditions")[0].ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("sponsors")[0].ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("contacts")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("contacts")[0].GetProperty("email").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("contacts")[0].GetProperty("phone").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("facilities")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("facilities")[0].GetProperty("city").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("facilities")[0].GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("metadata").GetProperty("facilities")[0].GetProperty("countryOrRegion").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("system").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("semanticType").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("category").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("modelVersion").ToString());
Console.WriteLine(result.GetProperty("results").GetProperty("knowledgeGraphLastUpdateDate").ToString());

注釈

指定された要求本文を使用して、Trial Matcher ジョブを作成します。

要求と応答のペイロードの JSON スキーマを次に示します。

要求本文:

TrialMatcherDataスキーマ:

{
  patients: [
    {
      id: string, # Required. A given identifier for the patient. Has to be unique across all patients in a single request.
      info: {
        sex: "female" | "male" | "unspecified", # Optional. The patient's sex.
        birthDate: string (date), # Optional. The patient's date of birth.
        clinicalInfo: [ClinicalCodedElement], # Optional. Known clinical information for the patient, structured.
      }, # Optional. Patient structured information, including demographics and known structured clinical information.
      data: [PatientDocument], # Optional. Patient unstructured clinical data, given as documents.
    }
  ], # Required. The list of patients, including their clinical information and data.
  configuration: {
    verbose: boolean, # Optional. An indication whether the model should produce verbose output.
    includeEvidence: boolean, # Optional. An indication whether the model's output should include evidence for the inferences.
    clinicalTrials: {
      customTrials: [ClinicalTrialDetails], # Optional. A list of clinical trials.
      registryFilters: [ClinicalTrialRegistryFilter], # Optional. A list of filters, each one creating a selection of trials from a given
clinical trial registry.
    }, # Required. The clinical trials that the patient(s) should be matched to. &lt;br /&gt;The trial
selection can be given as a list of custom clinical trials and/or a list of
filters to known clinical trial registries. In case both are given, the
resulting trial set is a union of the two sets.
  }, # Optional. Configuration affecting the Trial Matcher model's inference.
}

応答本文:

TrialMatcherResultスキーマ:

{
  jobId: string, # Required. A processing job identifier.
  createdDateTime: string (date & time), # Required. The date and time when the processing job was created.
  expirationDateTime: string (date & time), # Required. The date and time when the processing job is set to expire.
  lastUpdateDateTime: string (date & time), # Required. The date and time when the processing job was last updated.
  status: "notStarted" | "running" | "succeeded" | "failed" | "partiallyCompleted", # Required. The status of the processing job.
  errors: [
    {
      code: string, # Required. One of a server-defined set of error codes.
      message: string, # Required. A human-readable representation of the error.
      target: string, # Optional. The target of the error.
      details: [Error], # Required. An array of details about specific errors that led to this reported error.
      innererror: {
        code: string, # Required. One of a server-defined set of error codes.
        innererror: InnerError, # Optional. Inner error.
      }, # Optional. An object containing more specific information than the current object about the error.
    }
  ], # Optional. An array of errors, if any errors occurred during the processing job.
  results: {
    patients: [TrialMatcherPatientResult], # Required. Results for the patients given in the request.
    modelVersion: string, # Required. The version of the model used for inference, expressed as the model date.
    knowledgeGraphLastUpdateDate: string (date), # Optional. The date when the clinical trials knowledge graph was last updated.
  }, # Optional. The inference results for the Trial Matcher request.
}

適用対象

MatchTrialsAsync(WaitUntil, TrialMatcherData, String, Nullable<DateTimeOffset>, CancellationToken)

Source:
ClinicalMatchingClient.cs

試用版マッチャー ジョブを作成します。

public virtual System.Threading.Tasks.Task<Azure.Operation<Azure.Health.Insights.ClinicalMatching.TrialMatcherResult>> MatchTrialsAsync (Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, string repeatabilityRequestId = default, DateTimeOffset? repeatabilityFirstSent = default, System.Threading.CancellationToken cancellationToken = default);
abstract member MatchTrialsAsync : Azure.WaitUntil * Azure.Health.Insights.ClinicalMatching.TrialMatcherData * string * Nullable<DateTimeOffset> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation<Azure.Health.Insights.ClinicalMatching.TrialMatcherResult>>
override this.MatchTrialsAsync : Azure.WaitUntil * Azure.Health.Insights.ClinicalMatching.TrialMatcherData * string * Nullable<DateTimeOffset> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation<Azure.Health.Insights.ClinicalMatching.TrialMatcherResult>>
Public Overridable Function MatchTrialsAsync (waitUntil As WaitUntil, trialMatcherData As TrialMatcherData, Optional repeatabilityRequestId As String = Nothing, Optional repeatabilityFirstSent As Nullable(Of DateTimeOffset) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Operation(Of TrialMatcherResult))

パラメーター

waitUntil
WaitUntil

Completed メソッドが、サービスで実行時間の長い操作が完了するまで戻るまで待機する必要がある場合。 Started 操作を開始した後に が返される場合は 。 実行時間の長い操作の詳細については、「 Azure.Core Long-Running 操作のサンプル」を参照してください。

trialMatcherData
TrialMatcherData

試用版マッチャー要求の本文。

repeatabilityRequestId
String

要求の不透明でグローバルに一意のクライアント生成文字列識別子。

repeatabilityFirstSent
Nullable<DateTimeOffset>

要求が最初に作成された日時を指定します。

cancellationToken
CancellationToken

使用する取り消しトークン。

戻り値

例外

trialMatcherData が null です。

注釈

指定された要求本文を使用して、Trial Matcher ジョブを作成します。

適用対象