@azure-rest/health-insights-clinicalmatching 1.0.0-alpha.20250109.1 → 1.0.0-alpha.20250113.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -103
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@ Install the ClinicalMatching REST client library for JavaScript with `npm`:
|
|
|
31
31
|
npm install @azure-rest/health-insights-clinicalmatching
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|SDK version|Supported API version of service |
|
|
35
|
-
|
|
36
|
-
|1.0.0-beta.1 | 2023-03-01-preview|
|
|
34
|
+
| SDK version | Supported API version of service |
|
|
35
|
+
| ------------ | -------------------------------- |
|
|
36
|
+
| 1.0.0-beta.1 | 2023-03-01-preview |
|
|
37
37
|
|
|
38
38
|
### Create and authenticate a `ClinicalMatchingRestClient`
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ To use an [Azure Active Directory (AAD) token credential](https://github.com/Azu
|
|
|
41
41
|
provide an instance of the desired credential type obtained from the
|
|
42
42
|
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.
|
|
43
43
|
|
|
44
|
-
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
|
|
44
|
+
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
|
|
45
45
|
|
|
46
46
|
After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
|
|
47
47
|
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
|
|
@@ -53,6 +53,7 @@ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
|
|
|
53
53
|
## Key concepts
|
|
54
54
|
|
|
55
55
|
Trial Matcher provides the user of the services two main modes of operation: patients centric and clinical trial centric.
|
|
56
|
+
|
|
56
57
|
- On patient centric mode, the Trial Matcher model bases the patient matching on the clinical condition, location, priorities, eligibility criteria, and other criteria that the patient and/or service users may choose to prioritize. The model helps narrow down and prioritize the set of relevant clinical trials to a smaller set of trials to start with, that the specific patient appears to be qualified for.
|
|
57
58
|
- On clinical trial centric, the Trial Matcher is finding a group of patients potentially eligible to a clinical trial. The Trial Matcher narrows down the patients, first filtered on clinical condition and selected clinical observations, and then focuses on those patients who met the baseline criteria, to find the group of patients that appears to be eligible patients to a trial.
|
|
58
59
|
|
|
@@ -62,100 +63,99 @@ Trial Matcher provides the user of the services two main modes of operation: pat
|
|
|
62
63
|
|
|
63
64
|
```typescript
|
|
64
65
|
const apiKey = process.env["HEALTH_INSIGHTS_API_KEY"] || "";
|
|
65
|
-
const endpoint =
|
|
66
|
-
process.env["HEALTH_INSIGHTS_ENDPOINT"] || "";
|
|
66
|
+
const endpoint = process.env["HEALTH_INSIGHTS_ENDPOINT"] || "";
|
|
67
67
|
const credential = new AzureKeyCredential(apiKey);
|
|
68
68
|
const client = ClinicalMatchingRestClient(endpoint, credential);
|
|
69
69
|
|
|
70
70
|
// Create request body for clinical matching
|
|
71
71
|
const clinicalInfoList = [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
72
|
+
{
|
|
73
|
+
system: "http://www.nlm.nih.gov/research/umls",
|
|
74
|
+
code: "C0006826",
|
|
75
|
+
name: "Malignant Neoplasms",
|
|
76
|
+
value: "true",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
system: "http://www.nlm.nih.gov/research/umls",
|
|
80
|
+
code: "C1522449",
|
|
81
|
+
name: "Therapeutic radiology procedure",
|
|
82
|
+
value: "true",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
system: "http://www.nlm.nih.gov/research/umls",
|
|
86
|
+
code: "C1512162",
|
|
87
|
+
name: "Eastern Cooperative Oncology Group",
|
|
88
|
+
value: "1",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
system: "http://www.nlm.nih.gov/research/umls",
|
|
92
|
+
code: "C0019693",
|
|
93
|
+
name: "HIV Infections",
|
|
94
|
+
value: "false",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
system: "http://www.nlm.nih.gov/research/umls",
|
|
98
|
+
code: "C1300072",
|
|
99
|
+
name: "Tumor stage",
|
|
100
|
+
value: "2",
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
const patientInfo = {
|
|
105
|
+
sex: "MALE",
|
|
106
|
+
birthDate: new Date("1965-11-26T00:00:00.000Z"), // Note: Months are zero-based (11 represents December)
|
|
107
|
+
clinicalInfo: clinicalInfoList,
|
|
108
|
+
};
|
|
109
|
+
const docContent = { sourceType: "INLINE", value: getPatientDocContent() };
|
|
110
|
+
const patientDataList = {
|
|
111
|
+
type: "fhirBundle",
|
|
112
|
+
id: "Consultation-14-Demo",
|
|
113
|
+
content: docContent,
|
|
114
|
+
clinicalType: "CONSULTATION",
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const patient1 = {
|
|
118
|
+
id: "patient_id",
|
|
119
|
+
info: patientInfo,
|
|
120
|
+
data: [patientDataList],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const geographicLocation = { countryOrRegion: "United States", city: "Gilbert", state: "Arizona" };
|
|
124
|
+
const registryFilters = {
|
|
125
|
+
conditions: ["Non-small cell lung cancer"],
|
|
126
|
+
phases: ["PHASE1"],
|
|
127
|
+
sources: ["CLINICALTRIALS_GOV"],
|
|
128
|
+
facilityLocations: [geographicLocation],
|
|
129
|
+
studyTypes: ["INTERVENTIONAL"],
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const clinicalTrials = {
|
|
133
|
+
registryFilters: [registryFilters],
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const configuration = {
|
|
137
|
+
clinicalTrials: clinicalTrials,
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const trialMatcherData = {
|
|
141
|
+
patients: [patient1],
|
|
142
|
+
configuration: configuration,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const trialMatcherParameter = {
|
|
146
|
+
body: trialMatcherData,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// Initiate clinical matching job and retrieve results
|
|
150
150
|
const initialResponse = await client.path("/trialmatcher/jobs").post(trialMatcherParameter);
|
|
151
151
|
if (isUnexpected(initialResponse)) {
|
|
152
|
-
throw initialResponse;
|
|
152
|
+
throw initialResponse;
|
|
153
153
|
}
|
|
154
154
|
const poller = await getLongRunningPoller(client, initialResponse);
|
|
155
155
|
const trialMatcherResult = await poller.pollUntilDone();
|
|
156
156
|
if (isUnexpected(trialMatcherResult)) {
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
throw trialMatcherResult;
|
|
158
|
+
}
|
|
159
159
|
const resultBody = trialMatcherResult.body;
|
|
160
160
|
|
|
161
161
|
// Print the inference results for a patient's cancer attributes
|
|
@@ -163,23 +163,23 @@ if (resultBody.status === "succeeded") {
|
|
|
163
163
|
const results = resultBody.results;
|
|
164
164
|
const patients = results.patients;
|
|
165
165
|
for (const patientResult of patients) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
console.log(`Inferences of Patient ${patientResult.id}`);
|
|
167
|
+
for (const tmInferences of patientResult.inferences) {
|
|
168
|
+
console.log(`Trial Id ${tmInferences.id}`);
|
|
169
|
+
console.log(`Type: ${String(tmInferences.type)} Value: ${tmInferences.value}`);
|
|
170
|
+
console.log(`Description ${tmInferences.description}`);
|
|
171
|
+
}
|
|
172
172
|
}
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
173
|
+
} else {
|
|
175
174
|
const errors = trialMatcherResult.errors;
|
|
176
175
|
if (errors) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
for (const error of errors) {
|
|
177
|
+
console.log('${error.code} ":" ${error.message}');
|
|
178
|
+
}
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
```
|
|
182
|
+
|
|
183
183
|
## Troubleshooting
|
|
184
184
|
|
|
185
185
|
### Logging
|
|
@@ -194,7 +194,6 @@ setLogLevel("info");
|
|
|
194
194
|
|
|
195
195
|
For more detailed instructions on how to enable logs, you can look at the [@azure/logger](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger) package docs.
|
|
196
196
|
|
|
197
|
-
|
|
198
197
|
## Next steps
|
|
199
198
|
|
|
200
199
|
This code sample show common scenario operation with the Azure Health Insights Clinical Matching library. More samples can be found under the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-clinicalmatching-rest/samples/v1-beta/typescript/src/) directory.
|
|
@@ -205,11 +204,9 @@ This code sample show common scenario operation with the Azure Health Insights C
|
|
|
205
204
|
|
|
206
205
|
- Match Trials Unstructured Clinical Note: [sample_match_trials_unstructured_clinical_note.ts](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-clinicalmatching-rest/samples/v1-beta/typescript/src/sample_match_trials_unstructured_clinical_note.ts)
|
|
207
206
|
|
|
208
|
-
|
|
209
207
|
### Additional documentation
|
|
210
208
|
|
|
211
|
-
For more extensive documentation on Azure Health Insights Clinical Matching, see the [Clinical Matching documentation](https://learn.microsoft.com/azure/azure-health-insights/trial-matcher/overview) on
|
|
212
|
-
|
|
209
|
+
For more extensive documentation on Azure Health Insights Clinical Matching, see the [Clinical Matching documentation](https://learn.microsoft.com/azure/azure-health-insights/trial-matcher/overview) on learn.microsoft.com.
|
|
213
210
|
|
|
214
211
|
## Contributing
|
|
215
212
|
|
|
@@ -220,7 +217,8 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
|
|
|
220
217
|
This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.
|
|
221
218
|
|
|
222
219
|
<!-- LINKS -->
|
|
220
|
+
|
|
223
221
|
[cla]: https://cla.microsoft.com
|
|
224
222
|
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
|
|
225
223
|
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
|
|
226
|
-
[coc_contact]: mailto:opencode@microsoft.com
|
|
224
|
+
[coc_contact]: mailto:opencode@microsoft.com
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@azure-rest/health-insights-clinicalmatching",
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
|
-
"version": "1.0.0-alpha.
|
|
5
|
+
"version": "1.0.0-alpha.20250113.1",
|
|
6
6
|
"description": "A generated SDK for Health Insights Clinical Matching Rest",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"azure"
|
|
100
100
|
],
|
|
101
101
|
"disableDocsMs": true,
|
|
102
|
-
"apiRefLink": "https://
|
|
102
|
+
"apiRefLink": "https://learn.microsoft.com/javascript/api"
|
|
103
103
|
},
|
|
104
104
|
"type": "module",
|
|
105
105
|
"tshy": {
|