@healthcloudai/hc-sdk 0.3.0 → 0.4.0
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 +343 -154
- package/dist/index.cjs +154 -50
- package/dist/index.d.cts +823 -406
- package/dist/index.d.ts +823 -406
- package/dist/index.js +152 -49
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Environment = "dev" | "uat" | "prod";
|
|
2
|
-
type ServiceName = "patient" | "vitals" | "diagnostics" | "provider" | "ehr" | "appointments" | "rppg" | "session" | "telehealth";
|
|
2
|
+
type ServiceName = "patient" | "vitals" | "diagnostics" | "provider" | "ehr" | "appointments" | "rppg" | "session" | "telehealth" | "fieldagent" | "mcp";
|
|
3
3
|
interface HCSDKConfig {
|
|
4
4
|
environment: Environment;
|
|
5
5
|
tenantId?: string;
|
|
@@ -10,18 +10,44 @@ interface SDKRuntimeState {
|
|
|
10
10
|
tenantId?: string;
|
|
11
11
|
accessToken?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Every HealthCloud service publishes an identical `GET /connect` shape —
|
|
15
|
+
* confirmed across patient/vitals/diagnostics/provider/ehr/appointments/
|
|
16
|
+
* rppg/session/telehealth. `environment` is only present on patient/vitals/
|
|
17
|
+
* diagnostics responses (the stub services omit it).
|
|
18
|
+
*/
|
|
19
|
+
interface ConnectResponse {
|
|
20
|
+
status: "connected";
|
|
21
|
+
service: string;
|
|
22
|
+
environment?: Environment;
|
|
23
|
+
}
|
|
13
24
|
declare function isServiceName(value: string): value is ServiceName;
|
|
14
25
|
declare function resolveBaseUrl(environment: Environment, service: ServiceName): string;
|
|
15
26
|
declare function assertEnvironment(environment: Environment): void;
|
|
27
|
+
/**
|
|
28
|
+
* Always enforces the SDK-configured tenant on auth request bodies — never
|
|
29
|
+
* lets a caller-supplied `tenant_id` override it (prevents cross-tenant
|
|
30
|
+
* register/login/verify calls). Shared by AuthClient (patient host) and
|
|
31
|
+
* FieldAgentClient (field agent host).
|
|
32
|
+
*/
|
|
33
|
+
declare function withTenantId<TRequest extends {
|
|
34
|
+
tenant_id?: string;
|
|
35
|
+
}>(request: TRequest, tenantId: string | undefined): TRequest;
|
|
16
36
|
|
|
17
37
|
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
18
38
|
type QueryParamPrimitive = string | number | boolean | null | undefined;
|
|
19
39
|
type QueryParamValue = QueryParamPrimitive | QueryParamPrimitive[];
|
|
20
40
|
type QueryParams = Record<string, QueryParamValue>;
|
|
41
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
42
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
43
|
+
interface JsonObject {
|
|
44
|
+
[key: string]: JsonValue;
|
|
45
|
+
}
|
|
46
|
+
type HttpRequestBody = JsonPrimitive | object | FormData | Blob | ArrayBuffer | URLSearchParams;
|
|
21
47
|
interface HttpRequestOptions {
|
|
22
48
|
pathParams?: Record<string, string | number>;
|
|
23
49
|
query?: QueryParams;
|
|
24
|
-
body?:
|
|
50
|
+
body?: HttpRequestBody;
|
|
25
51
|
headers?: Record<string, string>;
|
|
26
52
|
auth?: boolean;
|
|
27
53
|
}
|
|
@@ -50,10 +76,12 @@ declare abstract class BaseServiceClient {
|
|
|
50
76
|
constructor(http: HttpClient, service: ServiceName);
|
|
51
77
|
/**
|
|
52
78
|
* Low-level escape hatch — allows consumers to call any path on this service
|
|
53
|
-
* without waiting for a typed SDK method to be added.
|
|
79
|
+
* without waiting for a typed SDK method to be added. The response shape is
|
|
80
|
+
* intentionally generic since this targets undocumented/future paths; the
|
|
81
|
+
* caller must supply `TResponse` once the path's contract is known.
|
|
54
82
|
*/
|
|
55
|
-
request<TResponse =
|
|
56
|
-
protected connectService<TResponse =
|
|
83
|
+
request<TResponse = JsonValue | undefined>(method: HttpMethod, path: string, options?: HttpRequestOptions): Promise<TResponse>;
|
|
84
|
+
protected connectService<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
57
85
|
protected send<TResponse>(method: HttpMethod, path: string, options?: HttpRequestOptions): Promise<TResponse>;
|
|
58
86
|
}
|
|
59
87
|
|
|
@@ -70,292 +98,777 @@ declare abstract class BaseServiceClient {
|
|
|
70
98
|
*/
|
|
71
99
|
declare class AppointmentsClient extends BaseServiceClient {
|
|
72
100
|
constructor(http: HttpClient);
|
|
73
|
-
connect<TResponse =
|
|
101
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
74
102
|
}
|
|
75
103
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
interface JsonObject {
|
|
79
|
-
[key: string]: JsonValue;
|
|
104
|
+
interface ClassifyRequest {
|
|
105
|
+
text: string;
|
|
80
106
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
interface ClassifyOption extends UnknownRecord {
|
|
85
|
-
code?: string;
|
|
86
|
-
label?: string;
|
|
87
|
-
examples?: string[];
|
|
88
|
-
}
|
|
89
|
-
interface ClassifyRequest extends UnknownRecord {
|
|
90
|
-
text?: string;
|
|
91
|
-
options?: ClassifyOption[];
|
|
92
|
-
}
|
|
93
|
-
interface ClassifyResponse extends UnknownRecord {
|
|
94
|
-
Action?: string;
|
|
95
|
-
}
|
|
96
|
-
interface OcrRequest extends UnknownRecord {
|
|
97
|
-
image?: string;
|
|
98
|
-
}
|
|
99
|
-
interface OcrFields extends UnknownRecord {
|
|
100
|
-
name?: string;
|
|
101
|
-
documentType?: string;
|
|
102
|
-
documentNumber?: string;
|
|
103
|
-
dateOfBirth?: string;
|
|
104
|
-
sex?: "M" | "F" | "X" | "";
|
|
105
|
-
nationality?: string;
|
|
107
|
+
interface ClassifyResponse {
|
|
108
|
+
Action: string;
|
|
106
109
|
}
|
|
107
|
-
interface
|
|
108
|
-
|
|
109
|
-
ok?: boolean;
|
|
110
|
-
fields?: OcrFields;
|
|
111
|
-
error?: string;
|
|
110
|
+
interface OcrRequest {
|
|
111
|
+
image: string;
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
type OcrFields = Record<string, string>;
|
|
114
|
+
interface OcrResultResponse {
|
|
115
|
+
type: "ocr_result";
|
|
116
|
+
ok: true;
|
|
117
|
+
fields: OcrFields;
|
|
115
118
|
}
|
|
116
|
-
interface
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
interface OcrErrorResponse {
|
|
120
|
+
type: "ocr_error";
|
|
121
|
+
ok: false;
|
|
122
|
+
error: string;
|
|
123
|
+
}
|
|
124
|
+
type OcrResponse = OcrResultResponse | OcrErrorResponse;
|
|
125
|
+
interface ChatRequest {
|
|
126
|
+
message: string;
|
|
127
|
+
}
|
|
128
|
+
interface ChatCitation {
|
|
129
|
+
id: string;
|
|
130
|
+
title: string;
|
|
131
|
+
collection: string;
|
|
120
132
|
}
|
|
121
|
-
interface ChatSuggestedAction
|
|
122
|
-
id
|
|
123
|
-
label
|
|
133
|
+
interface ChatSuggestedAction {
|
|
134
|
+
id: string;
|
|
135
|
+
label: string;
|
|
124
136
|
}
|
|
125
|
-
interface ChatResponse
|
|
126
|
-
answer
|
|
127
|
-
citations
|
|
128
|
-
suggestedActions
|
|
129
|
-
disclaimer
|
|
130
|
-
error?: "message is required" | "assistant_not_configured" | "assistant_call_failed" | string;
|
|
137
|
+
interface ChatResponse {
|
|
138
|
+
answer: string;
|
|
139
|
+
citations: ChatCitation[];
|
|
140
|
+
suggestedActions: ChatSuggestedAction[];
|
|
141
|
+
disclaimer: string;
|
|
131
142
|
}
|
|
132
143
|
type KnowledgeCollection = "screening" | "ppe" | "sample_collection" | "field_ops";
|
|
133
144
|
interface ListKnowledgeQuery extends QueryParams {
|
|
134
145
|
collection?: KnowledgeCollection;
|
|
135
146
|
}
|
|
136
|
-
interface KnowledgeCollectionSummary
|
|
137
|
-
id
|
|
138
|
-
name
|
|
147
|
+
interface KnowledgeCollectionSummary {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
139
150
|
}
|
|
140
|
-
interface KnowledgeEntrySummary
|
|
141
|
-
id
|
|
142
|
-
collection
|
|
143
|
-
title
|
|
144
|
-
tags
|
|
151
|
+
interface KnowledgeEntrySummary {
|
|
152
|
+
id: string;
|
|
153
|
+
collection: string;
|
|
154
|
+
title: string;
|
|
155
|
+
tags: string[];
|
|
145
156
|
}
|
|
146
|
-
interface ListKnowledgeResponse
|
|
147
|
-
collections
|
|
148
|
-
entries
|
|
149
|
-
total
|
|
157
|
+
interface ListKnowledgeResponse {
|
|
158
|
+
collections: KnowledgeCollectionSummary[];
|
|
159
|
+
entries: KnowledgeEntrySummary[];
|
|
160
|
+
total: number;
|
|
150
161
|
}
|
|
151
162
|
interface SearchKnowledgeQuery extends QueryParams {
|
|
152
|
-
q
|
|
163
|
+
q: string;
|
|
153
164
|
collection?: KnowledgeCollection;
|
|
154
165
|
limit?: number;
|
|
155
166
|
}
|
|
156
|
-
interface KnowledgeSearchResult
|
|
157
|
-
id
|
|
158
|
-
collection
|
|
159
|
-
title
|
|
160
|
-
body
|
|
161
|
-
tags
|
|
167
|
+
interface KnowledgeSearchResult {
|
|
168
|
+
id: string;
|
|
169
|
+
collection: string;
|
|
170
|
+
title: string;
|
|
171
|
+
body: string;
|
|
172
|
+
tags: string[];
|
|
162
173
|
}
|
|
163
|
-
interface SearchKnowledgeResponse
|
|
164
|
-
query
|
|
165
|
-
results
|
|
166
|
-
total
|
|
174
|
+
interface SearchKnowledgeResponse {
|
|
175
|
+
query: string;
|
|
176
|
+
results: KnowledgeSearchResult[];
|
|
177
|
+
total: number;
|
|
167
178
|
}
|
|
168
|
-
interface AssistantAction
|
|
169
|
-
id
|
|
170
|
-
label
|
|
179
|
+
interface AssistantAction {
|
|
180
|
+
id: string;
|
|
181
|
+
label: string;
|
|
171
182
|
}
|
|
172
|
-
interface ListAssistantActionsResponse
|
|
173
|
-
actions
|
|
174
|
-
total
|
|
183
|
+
interface ListAssistantActionsResponse {
|
|
184
|
+
actions: AssistantAction[];
|
|
185
|
+
total: number;
|
|
175
186
|
}
|
|
176
187
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
password?: string;
|
|
188
|
+
type SexAtBirth = "male" | "female" | "unknown";
|
|
189
|
+
interface RegisterPatientRequest {
|
|
180
190
|
tenant_id?: string;
|
|
181
|
-
first_name
|
|
182
|
-
last_name
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
191
|
+
first_name: string;
|
|
192
|
+
last_name: string;
|
|
193
|
+
email: string;
|
|
194
|
+
password: string;
|
|
195
|
+
date_of_birth: string;
|
|
196
|
+
sex_at_birth: SexAtBirth;
|
|
197
|
+
created_by?: string;
|
|
198
|
+
}
|
|
199
|
+
interface RegisterPatientResponse {
|
|
200
|
+
cognito_sub: string;
|
|
201
|
+
fhir_patient_id: string;
|
|
202
|
+
email_otp_sent: boolean;
|
|
203
|
+
email_verified: boolean;
|
|
204
|
+
access_token: string;
|
|
205
|
+
id_token: string;
|
|
206
|
+
expires_in: number;
|
|
207
|
+
}
|
|
208
|
+
interface LoginRequest {
|
|
209
|
+
email: string;
|
|
210
|
+
password: string;
|
|
189
211
|
tenant_id?: string;
|
|
190
212
|
}
|
|
191
|
-
interface
|
|
192
|
-
|
|
213
|
+
interface LoginResponse {
|
|
214
|
+
access_token: string;
|
|
215
|
+
id_token: string;
|
|
216
|
+
expires_in: number;
|
|
217
|
+
}
|
|
218
|
+
interface VerifyEmailRequest {
|
|
219
|
+
user_id: string;
|
|
220
|
+
otp: string;
|
|
193
221
|
tenant_id?: string;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
cognito_sub?: string;
|
|
198
|
-
fhir_patient_id?: string;
|
|
199
|
-
email_otp_sent?: boolean;
|
|
200
|
-
email_verified?: boolean;
|
|
201
|
-
token?: string;
|
|
202
|
-
access_token?: string;
|
|
203
|
-
accessToken?: string;
|
|
204
|
-
id_token?: string;
|
|
205
|
-
expires_in?: number;
|
|
222
|
+
}
|
|
223
|
+
interface VerifiedResponse {
|
|
224
|
+
verified: boolean;
|
|
206
225
|
}
|
|
207
226
|
|
|
208
227
|
type PresenceState = "online" | "away" | "offline" | "in_call" | "do_not_disturb";
|
|
209
|
-
interface PresenceRecord
|
|
210
|
-
id
|
|
211
|
-
contactId
|
|
212
|
-
presence
|
|
228
|
+
interface PresenceRecord {
|
|
229
|
+
id: string;
|
|
230
|
+
contactId: string;
|
|
231
|
+
presence: PresenceState;
|
|
232
|
+
lastActiveAt: string;
|
|
233
|
+
}
|
|
234
|
+
interface UpsertPresenceRequest {
|
|
235
|
+
contactId: string;
|
|
236
|
+
presence: PresenceState;
|
|
213
237
|
lastActiveAt?: string;
|
|
214
238
|
}
|
|
215
|
-
interface
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
lastActiveAt?: string;
|
|
219
|
-
}
|
|
220
|
-
interface ListPresenceResponse extends UnknownRecord {
|
|
221
|
-
presence?: PresenceRecord[];
|
|
222
|
-
total?: number;
|
|
239
|
+
interface ListPresenceResponse {
|
|
240
|
+
presence: PresenceRecord[];
|
|
241
|
+
total: number;
|
|
223
242
|
}
|
|
224
243
|
type GroupKind = "team" | "case" | "broadcast";
|
|
225
|
-
interface GroupRecord
|
|
226
|
-
id
|
|
227
|
-
name
|
|
228
|
-
groupKind
|
|
244
|
+
interface GroupRecord {
|
|
245
|
+
id: string;
|
|
246
|
+
name: string;
|
|
247
|
+
groupKind: GroupKind;
|
|
229
248
|
description?: string;
|
|
230
|
-
memberIds
|
|
249
|
+
memberIds: string[];
|
|
231
250
|
createdBy?: string;
|
|
232
251
|
callEnabled?: boolean;
|
|
233
|
-
createdAt
|
|
234
|
-
updatedAt
|
|
252
|
+
createdAt: string;
|
|
253
|
+
updatedAt: string;
|
|
235
254
|
}
|
|
236
|
-
interface UpsertGroupRequest
|
|
237
|
-
id
|
|
238
|
-
name
|
|
239
|
-
groupKind
|
|
255
|
+
interface UpsertGroupRequest {
|
|
256
|
+
id: string;
|
|
257
|
+
name: string;
|
|
258
|
+
groupKind: GroupKind;
|
|
240
259
|
description?: string;
|
|
241
|
-
memberIds
|
|
260
|
+
memberIds: string[];
|
|
242
261
|
createdBy?: string;
|
|
243
262
|
callEnabled?: boolean;
|
|
244
263
|
}
|
|
245
|
-
interface ListGroupsResponse
|
|
246
|
-
groups
|
|
247
|
-
total
|
|
264
|
+
interface ListGroupsResponse {
|
|
265
|
+
groups: GroupRecord[];
|
|
266
|
+
total: number;
|
|
248
267
|
}
|
|
249
268
|
type ConversationKind = "direct" | "group";
|
|
250
|
-
interface ConversationRecord
|
|
251
|
-
id
|
|
252
|
-
kind
|
|
269
|
+
interface ConversationRecord {
|
|
270
|
+
id: string;
|
|
271
|
+
kind: ConversationKind;
|
|
253
272
|
participantIds?: string[];
|
|
254
273
|
groupId?: string;
|
|
255
274
|
title?: string;
|
|
256
275
|
lastMessagePreview?: string;
|
|
257
276
|
unreadCount?: number;
|
|
258
|
-
createdAt
|
|
259
|
-
updatedAt
|
|
277
|
+
createdAt: string;
|
|
278
|
+
updatedAt: string;
|
|
260
279
|
}
|
|
261
|
-
interface UpsertConversationRequest
|
|
262
|
-
id
|
|
263
|
-
kind
|
|
280
|
+
interface UpsertConversationRequest {
|
|
281
|
+
id: string;
|
|
282
|
+
kind: ConversationKind;
|
|
264
283
|
participantIds?: string[];
|
|
265
284
|
groupId?: string;
|
|
266
285
|
title?: string;
|
|
267
286
|
lastMessagePreview?: string;
|
|
268
287
|
unreadCount?: number;
|
|
269
288
|
}
|
|
270
|
-
interface ListConversationsResponse
|
|
271
|
-
conversations
|
|
272
|
-
total
|
|
289
|
+
interface ListConversationsResponse {
|
|
290
|
+
conversations: ConversationRecord[];
|
|
291
|
+
total: number;
|
|
273
292
|
}
|
|
274
293
|
type MessageKind = "text" | "system" | "voice_note" | "lab";
|
|
275
|
-
interface MessageRecord
|
|
276
|
-
id
|
|
277
|
-
conversationId
|
|
278
|
-
senderId
|
|
279
|
-
kind
|
|
280
|
-
body
|
|
281
|
-
status
|
|
282
|
-
createdAt
|
|
283
|
-
}
|
|
284
|
-
interface UpsertMessageRequest
|
|
285
|
-
id
|
|
286
|
-
conversationId
|
|
287
|
-
senderId
|
|
288
|
-
kind
|
|
289
|
-
body
|
|
290
|
-
status?: string;
|
|
294
|
+
interface MessageRecord {
|
|
295
|
+
id: string;
|
|
296
|
+
conversationId: string;
|
|
297
|
+
senderId: string;
|
|
298
|
+
kind: MessageKind;
|
|
299
|
+
body: string;
|
|
300
|
+
status: "sent";
|
|
301
|
+
createdAt: string;
|
|
302
|
+
}
|
|
303
|
+
interface UpsertMessageRequest {
|
|
304
|
+
id: string;
|
|
305
|
+
conversationId: string;
|
|
306
|
+
senderId: string;
|
|
307
|
+
kind: MessageKind;
|
|
308
|
+
body: string;
|
|
291
309
|
}
|
|
292
310
|
interface ListMessagesQuery extends QueryParams {
|
|
293
311
|
conversationId?: string;
|
|
294
312
|
}
|
|
295
|
-
interface ListMessagesResponse
|
|
296
|
-
messages
|
|
297
|
-
total
|
|
313
|
+
interface ListMessagesResponse {
|
|
314
|
+
messages: MessageRecord[];
|
|
315
|
+
total: number;
|
|
298
316
|
}
|
|
299
317
|
type InviteChannel = "sms" | "email" | "link";
|
|
300
318
|
type InviteStatus = "draft" | "queued" | "sent" | "accepted" | "expired";
|
|
301
|
-
interface InviteRecord
|
|
302
|
-
id
|
|
303
|
-
name
|
|
304
|
-
destination
|
|
305
|
-
channel
|
|
319
|
+
interface InviteRecord {
|
|
320
|
+
id: string;
|
|
321
|
+
name: string;
|
|
322
|
+
destination: string;
|
|
323
|
+
channel: InviteChannel;
|
|
306
324
|
role?: string;
|
|
307
|
-
status
|
|
308
|
-
inviteCode
|
|
309
|
-
createdAt
|
|
310
|
-
}
|
|
311
|
-
interface UpsertInviteRequest
|
|
312
|
-
id
|
|
313
|
-
name
|
|
314
|
-
destination
|
|
315
|
-
channel
|
|
325
|
+
status: InviteStatus;
|
|
326
|
+
inviteCode: string;
|
|
327
|
+
createdAt: string;
|
|
328
|
+
}
|
|
329
|
+
interface UpsertInviteRequest {
|
|
330
|
+
id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
destination: string;
|
|
333
|
+
channel: InviteChannel;
|
|
316
334
|
role?: string;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
uid?: string;
|
|
335
|
+
}
|
|
336
|
+
interface ListInvitesResponse {
|
|
337
|
+
invites: InviteRecord[];
|
|
338
|
+
total: number;
|
|
339
|
+
}
|
|
340
|
+
interface CommunicationsStateResponse {
|
|
341
|
+
presence: PresenceRecord[];
|
|
342
|
+
groups: GroupRecord[];
|
|
343
|
+
conversations: ConversationRecord[];
|
|
344
|
+
messages: MessageRecord[];
|
|
345
|
+
invites: InviteRecord[];
|
|
346
|
+
}
|
|
347
|
+
interface RtcTokenRequest {
|
|
348
|
+
channelName: string;
|
|
349
|
+
uid: string;
|
|
333
350
|
role?: "publisher" | "subscriber";
|
|
334
351
|
}
|
|
335
|
-
interface
|
|
336
|
-
appId
|
|
337
|
-
channelName
|
|
338
|
-
uid
|
|
339
|
-
rtcToken
|
|
340
|
-
role
|
|
341
|
-
ttlSeconds
|
|
342
|
-
expiresAt
|
|
343
|
-
|
|
344
|
-
|
|
352
|
+
interface RtcTokenSuccessResponse {
|
|
353
|
+
appId: string;
|
|
354
|
+
channelName: string;
|
|
355
|
+
uid: string;
|
|
356
|
+
rtcToken: string;
|
|
357
|
+
role: string;
|
|
358
|
+
ttlSeconds: number;
|
|
359
|
+
expiresAt: string;
|
|
360
|
+
}
|
|
361
|
+
interface RtcTokenUnavailableResponse {
|
|
362
|
+
error: string;
|
|
363
|
+
configured: false;
|
|
345
364
|
}
|
|
365
|
+
type RtcTokenResponse = RtcTokenSuccessResponse | RtcTokenUnavailableResponse;
|
|
346
366
|
|
|
347
|
-
|
|
367
|
+
type RapidTestType = "covid19" | "influenza_a" | "influenza_b" | "rsv" | "strep" | "hiv" | "pregnancy" | "mono" | "uti_dipstick" | "blood_glucose" | "other";
|
|
368
|
+
type RapidTestResult = "positive" | "negative" | "invalid" | "inconclusive" | "not_detected" | "detected";
|
|
369
|
+
interface RapidTestRequest {
|
|
370
|
+
type: RapidTestType;
|
|
371
|
+
result: RapidTestResult;
|
|
372
|
+
encounter_id?: string;
|
|
373
|
+
}
|
|
374
|
+
interface RapidTestResponse {
|
|
375
|
+
test_id: string;
|
|
376
|
+
fhir_id: string;
|
|
377
|
+
type: RapidTestType;
|
|
378
|
+
result: RapidTestResult;
|
|
379
|
+
status: string;
|
|
380
|
+
specimen_type: string;
|
|
381
|
+
encounter_id: string;
|
|
382
|
+
}
|
|
383
|
+
interface DiagnosticObservation {
|
|
384
|
+
observation_id: string;
|
|
385
|
+
loinc_code: string;
|
|
386
|
+
display: string;
|
|
387
|
+
status: string;
|
|
388
|
+
}
|
|
389
|
+
interface ListDiagnosticsResponse {
|
|
390
|
+
observations: DiagnosticObservation[];
|
|
391
|
+
total: number;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
interface VitalsRecordRequest {
|
|
395
|
+
temperature?: number;
|
|
396
|
+
weight_kg?: number;
|
|
397
|
+
height_cm?: number;
|
|
398
|
+
heart_rate?: number;
|
|
399
|
+
systolic?: number;
|
|
400
|
+
diastolic?: number;
|
|
401
|
+
oxygen_saturation?: number;
|
|
402
|
+
encounter_id?: string;
|
|
403
|
+
}
|
|
404
|
+
interface SubmitVitalsResponse {
|
|
405
|
+
observations: number;
|
|
406
|
+
patient_id: string;
|
|
348
407
|
}
|
|
349
|
-
interface
|
|
408
|
+
interface BloodPressureVital {
|
|
409
|
+
systolic: number;
|
|
410
|
+
diastolic: number;
|
|
411
|
+
}
|
|
412
|
+
interface HeartRateVital {
|
|
413
|
+
rate: number;
|
|
414
|
+
}
|
|
415
|
+
interface TemperatureVital {
|
|
416
|
+
value: number;
|
|
417
|
+
route?: string;
|
|
418
|
+
}
|
|
419
|
+
interface WeightVital {
|
|
420
|
+
value: number;
|
|
421
|
+
clothed?: boolean;
|
|
422
|
+
}
|
|
423
|
+
interface HeightVital {
|
|
424
|
+
value: number;
|
|
425
|
+
}
|
|
426
|
+
interface PulseOximetryVital {
|
|
427
|
+
spo2: number;
|
|
428
|
+
on_supplemental_oxygen?: boolean;
|
|
429
|
+
}
|
|
430
|
+
interface GetVitalsResponse {
|
|
431
|
+
vitals_id: string;
|
|
432
|
+
patient_id: string;
|
|
433
|
+
blood_pressure?: BloodPressureVital;
|
|
434
|
+
heart_rate?: HeartRateVital;
|
|
435
|
+
temperature?: TemperatureVital;
|
|
436
|
+
weight?: WeightVital;
|
|
437
|
+
height?: HeightVital;
|
|
438
|
+
pulse_oximetry?: PulseOximetryVital;
|
|
439
|
+
status: string;
|
|
440
|
+
}
|
|
441
|
+
interface ListVitalsQuery extends QueryParams {
|
|
442
|
+
type?: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
interface PatientName {
|
|
446
|
+
use?: string;
|
|
447
|
+
first_name: string;
|
|
448
|
+
last_name: string;
|
|
449
|
+
}
|
|
450
|
+
interface CommunicationPreference {
|
|
451
|
+
language: string;
|
|
452
|
+
preferred: boolean;
|
|
453
|
+
}
|
|
454
|
+
interface PatientResponse {
|
|
455
|
+
patient_id: string;
|
|
456
|
+
fhir_id: string;
|
|
457
|
+
mrn: string;
|
|
458
|
+
name: PatientName;
|
|
459
|
+
date_of_birth: string;
|
|
460
|
+
gender: string;
|
|
461
|
+
sex_at_birth: string;
|
|
462
|
+
preferred_language: string;
|
|
463
|
+
communications: CommunicationPreference[];
|
|
464
|
+
email: string;
|
|
465
|
+
active: boolean;
|
|
466
|
+
created_by: string;
|
|
467
|
+
created_date: string;
|
|
468
|
+
}
|
|
469
|
+
interface PatientDashboardResponse {
|
|
470
|
+
patient_id: string;
|
|
471
|
+
summary: JsonObject;
|
|
472
|
+
recent_encounters: EncounterResponse[];
|
|
473
|
+
active_medications: MedicationResponse[];
|
|
474
|
+
upcoming_appointments: JsonValue[];
|
|
475
|
+
latest_vitals: GetVitalsResponse | null;
|
|
476
|
+
alerts: JsonValue[];
|
|
477
|
+
}
|
|
478
|
+
interface PatientPhoneUpdateRequest {
|
|
479
|
+
phone: string;
|
|
480
|
+
}
|
|
481
|
+
interface PhoneUpdateResponse {
|
|
482
|
+
sms_otp_sent: boolean;
|
|
483
|
+
}
|
|
484
|
+
interface PatientSmsVerificationRequest {
|
|
485
|
+
otp: string;
|
|
486
|
+
}
|
|
487
|
+
interface PatientAddressUpdateRequest {
|
|
488
|
+
street: string;
|
|
489
|
+
city: string;
|
|
490
|
+
state: string;
|
|
491
|
+
zip: string;
|
|
492
|
+
country?: string;
|
|
493
|
+
}
|
|
494
|
+
interface UpdatedResponse {
|
|
495
|
+
updated: boolean;
|
|
496
|
+
}
|
|
497
|
+
interface PatientRaceUpdateRequest {
|
|
498
|
+
races: string[];
|
|
499
|
+
}
|
|
500
|
+
interface PhotoUploadRequest {
|
|
501
|
+
data: string;
|
|
502
|
+
content_type: string;
|
|
503
|
+
}
|
|
504
|
+
interface PhotoUploadResponse {
|
|
505
|
+
binary_id: string;
|
|
506
|
+
}
|
|
507
|
+
interface GetPhotoQuery extends QueryParams {
|
|
508
|
+
binary_id: string;
|
|
509
|
+
}
|
|
510
|
+
interface GetPhotoResponse {
|
|
511
|
+
binary_id: string;
|
|
512
|
+
content_type: string;
|
|
513
|
+
data: string;
|
|
514
|
+
}
|
|
515
|
+
interface PhotoUploadUrlResponse {
|
|
516
|
+
url: string;
|
|
517
|
+
key: string;
|
|
518
|
+
}
|
|
519
|
+
interface FaceMatchRequest {
|
|
520
|
+
selfie_data: string;
|
|
521
|
+
reference_binary_id: string;
|
|
522
|
+
similarity_threshold?: number;
|
|
523
|
+
}
|
|
524
|
+
interface FaceMatchResponse {
|
|
525
|
+
match: boolean;
|
|
526
|
+
confidence: number;
|
|
527
|
+
similarity_threshold: number;
|
|
528
|
+
face_detected_in_selfie: boolean;
|
|
529
|
+
}
|
|
530
|
+
interface IdentityDocumentRequest {
|
|
531
|
+
document_data: string;
|
|
532
|
+
verify_against_demographics?: boolean;
|
|
533
|
+
}
|
|
534
|
+
interface IdentityDocumentResponse {
|
|
535
|
+
first_name: string;
|
|
536
|
+
last_name: string;
|
|
537
|
+
date_of_birth: string;
|
|
538
|
+
document_number: string;
|
|
539
|
+
verified: boolean;
|
|
540
|
+
}
|
|
541
|
+
type GenderIdentity = "man" | "woman" | "non_binary" | "transgender_man" | "transgender_woman" | "genderqueer" | "other" | "choose_not_to_disclose" | "unknown";
|
|
542
|
+
type Ethnicity = "hispanic_or_latino" | "not_hispanic_or_latino" | "unknown" | "declined_to_specify";
|
|
543
|
+
type MaritalStatus = "single" | "married" | "divorced" | "widowed" | "separated" | "domestic_partner";
|
|
544
|
+
interface DemographicsUpdateRequest {
|
|
545
|
+
date_of_birth?: string;
|
|
546
|
+
sex_at_birth?: "male" | "female" | "intersex" | "unknown";
|
|
547
|
+
gender_identity?: GenderIdentity;
|
|
548
|
+
ethnicity?: Ethnicity;
|
|
549
|
+
marital_status?: MaritalStatus;
|
|
550
|
+
nationality?: string;
|
|
551
|
+
preferred_language?: string;
|
|
552
|
+
communications?: CommunicationPreference[];
|
|
553
|
+
}
|
|
554
|
+
interface CreateInsuranceRequest {
|
|
555
|
+
payer_name: string;
|
|
556
|
+
member_id: string;
|
|
557
|
+
priority?: "primary" | "secondary" | "tertiary";
|
|
558
|
+
relationship?: string;
|
|
559
|
+
payer_id?: string;
|
|
560
|
+
}
|
|
561
|
+
interface CreateInsuranceResponse {
|
|
562
|
+
coverages_created: number;
|
|
563
|
+
patient_id: string;
|
|
564
|
+
}
|
|
565
|
+
type MedicationFrequency = "once" | "once_daily" | "twice_daily" | "three_times_daily" | "four_times_daily" | "every_4_hours" | "every_6_hours" | "every_8_hours" | "every_12_hours" | "every_48_hours" | "weekly" | "biweekly" | "monthly" | "as_needed" | "other";
|
|
566
|
+
type MedicationRoute = "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhaled" | "sublingual" | "intranasal" | "ophthalmic" | "otic" | "rectal" | "transdermal" | "other";
|
|
567
|
+
type MedicationStatus = "active" | "on-hold" | "completed" | "stopped" | "entered-in-error";
|
|
568
|
+
interface MedicationDosage {
|
|
569
|
+
value: number;
|
|
570
|
+
unit: string;
|
|
571
|
+
frequency: MedicationFrequency;
|
|
572
|
+
}
|
|
573
|
+
interface CreateMedicationRequest {
|
|
574
|
+
name: string;
|
|
575
|
+
route: MedicationRoute;
|
|
576
|
+
dosage: MedicationDosage;
|
|
577
|
+
status: MedicationStatus;
|
|
578
|
+
}
|
|
579
|
+
interface MedicationResponse {
|
|
580
|
+
medication_id: string;
|
|
581
|
+
fhir_id: string;
|
|
582
|
+
resource_type: "MedicationRequest" | "MedicationStatement";
|
|
583
|
+
name: string;
|
|
584
|
+
route: MedicationRoute;
|
|
585
|
+
dosage: MedicationDosage;
|
|
586
|
+
status: MedicationStatus;
|
|
587
|
+
intent: string;
|
|
588
|
+
}
|
|
589
|
+
interface ListMedicationsQuery extends QueryParams {
|
|
590
|
+
resource_type?: "MedicationRequest" | "MedicationStatement";
|
|
591
|
+
}
|
|
592
|
+
interface ListMedicationsResponse {
|
|
593
|
+
medications: MedicationResponse[];
|
|
594
|
+
total: number;
|
|
595
|
+
}
|
|
596
|
+
interface MedicationStatusUpdateRequest {
|
|
597
|
+
status: MedicationStatus;
|
|
598
|
+
notes?: string;
|
|
599
|
+
}
|
|
600
|
+
interface MedicationUpdateResponse {
|
|
601
|
+
updated: boolean;
|
|
602
|
+
fhir_id: string;
|
|
603
|
+
}
|
|
604
|
+
interface NearestLocationsQuery extends QueryParams {
|
|
605
|
+
lat: number;
|
|
606
|
+
lon: number;
|
|
607
|
+
radius_km?: number;
|
|
350
608
|
type?: string;
|
|
351
|
-
result?: string;
|
|
352
|
-
lot_number?: string;
|
|
353
|
-
administered_date?: string;
|
|
354
609
|
}
|
|
355
|
-
interface
|
|
356
|
-
|
|
357
|
-
|
|
610
|
+
interface LocationCoordinates {
|
|
611
|
+
lat: number;
|
|
612
|
+
lng: number;
|
|
613
|
+
}
|
|
614
|
+
interface LocationGeometry {
|
|
615
|
+
location: LocationCoordinates;
|
|
616
|
+
}
|
|
617
|
+
interface NearestLocation {
|
|
618
|
+
place_id: string;
|
|
619
|
+
name: string;
|
|
620
|
+
vicinity: string;
|
|
621
|
+
types: string[];
|
|
622
|
+
geometry: LocationGeometry;
|
|
623
|
+
rating?: number;
|
|
624
|
+
open_now?: boolean;
|
|
625
|
+
phone?: string;
|
|
626
|
+
distance_km: number;
|
|
627
|
+
}
|
|
628
|
+
interface ListNearestLocationsResponse {
|
|
629
|
+
locations: NearestLocation[];
|
|
630
|
+
total: number;
|
|
631
|
+
radius_km: number;
|
|
632
|
+
source: "hardcoded" | "google_places";
|
|
633
|
+
note?: string;
|
|
634
|
+
}
|
|
635
|
+
type EncounterStatus = string;
|
|
636
|
+
interface CreateEncounterRequest {
|
|
637
|
+
patient_id: string;
|
|
638
|
+
status: EncounterStatus;
|
|
639
|
+
encounter_class: string;
|
|
640
|
+
}
|
|
641
|
+
interface EncounterResponse {
|
|
642
|
+
encounter_id: string;
|
|
643
|
+
fhir_id: string;
|
|
644
|
+
status: EncounterStatus;
|
|
645
|
+
encounter_class: string;
|
|
646
|
+
patient_id: string;
|
|
647
|
+
participants: JsonValue[];
|
|
648
|
+
diagnoses: JsonValue[];
|
|
649
|
+
locations: JsonValue[];
|
|
650
|
+
created_by: string;
|
|
651
|
+
created_date: string;
|
|
652
|
+
}
|
|
653
|
+
interface ListEncountersQuery extends QueryParams {
|
|
654
|
+
patient_id?: string;
|
|
655
|
+
status?: EncounterStatus;
|
|
656
|
+
date_start?: string;
|
|
657
|
+
date_end?: string;
|
|
658
|
+
}
|
|
659
|
+
interface ListEncountersResponse {
|
|
660
|
+
encounters: EncounterResponse[];
|
|
661
|
+
total: number;
|
|
662
|
+
}
|
|
663
|
+
type QuestionnaireItemType = string;
|
|
664
|
+
interface QuestionnaireItem {
|
|
665
|
+
link_id: string;
|
|
666
|
+
text: string;
|
|
667
|
+
type: QuestionnaireItemType;
|
|
668
|
+
}
|
|
669
|
+
interface CreateQuestionnaireRequest {
|
|
670
|
+
name: string;
|
|
671
|
+
title: string;
|
|
672
|
+
status: string;
|
|
673
|
+
items: QuestionnaireItem[];
|
|
674
|
+
}
|
|
675
|
+
interface FhirIdResponse {
|
|
676
|
+
fhir_id: string;
|
|
677
|
+
}
|
|
678
|
+
interface QuestionnaireResponseAnswer {
|
|
679
|
+
value_boolean?: boolean;
|
|
680
|
+
value_string?: string;
|
|
681
|
+
value_integer?: number;
|
|
682
|
+
}
|
|
683
|
+
interface QuestionnaireResponseItem {
|
|
684
|
+
link_id: string;
|
|
685
|
+
answers: QuestionnaireResponseAnswer[];
|
|
686
|
+
}
|
|
687
|
+
interface CreateQuestionnaireResponseRequest {
|
|
688
|
+
patient_id: string;
|
|
689
|
+
encounter_id?: string;
|
|
690
|
+
status: string;
|
|
691
|
+
items: QuestionnaireResponseItem[];
|
|
358
692
|
}
|
|
693
|
+
interface InsuranceEligibilityRequest {
|
|
694
|
+
payer_id: string;
|
|
695
|
+
member_id: string;
|
|
696
|
+
first_name: string;
|
|
697
|
+
last_name: string;
|
|
698
|
+
date_of_birth: string;
|
|
699
|
+
}
|
|
700
|
+
type InsuranceEligibilityResponse = JsonValue;
|
|
701
|
+
|
|
702
|
+
interface RegisterFieldAgentRequest {
|
|
703
|
+
tenant_id?: string;
|
|
704
|
+
first_name: string;
|
|
705
|
+
last_name: string;
|
|
706
|
+
email: string;
|
|
707
|
+
password: string;
|
|
708
|
+
badge_number?: string;
|
|
709
|
+
department?: string;
|
|
710
|
+
}
|
|
711
|
+
interface RegisterFieldAgentResponse {
|
|
712
|
+
cognito_sub: string;
|
|
713
|
+
email_otp_sent: boolean;
|
|
714
|
+
email_verified: boolean;
|
|
715
|
+
access_token: string;
|
|
716
|
+
id_token: string;
|
|
717
|
+
expires_in: number;
|
|
718
|
+
}
|
|
719
|
+
interface ResetFieldAgentPasswordRequest {
|
|
720
|
+
email: string;
|
|
721
|
+
tenant_id?: string;
|
|
722
|
+
}
|
|
723
|
+
interface ResetPasswordResponse {
|
|
724
|
+
reset_initiated: boolean;
|
|
725
|
+
message: string;
|
|
726
|
+
}
|
|
727
|
+
interface FieldAgentLoginRequest {
|
|
728
|
+
email: string;
|
|
729
|
+
password: string;
|
|
730
|
+
tenant_id?: string;
|
|
731
|
+
}
|
|
732
|
+
interface VerifyFieldAgentSmsRequest {
|
|
733
|
+
user_id: string;
|
|
734
|
+
otp: string;
|
|
735
|
+
tenant_id?: string;
|
|
736
|
+
}
|
|
737
|
+
interface FieldAgentResponse {
|
|
738
|
+
agent_id: string;
|
|
739
|
+
fhir_person_id: string;
|
|
740
|
+
cognito_sub: string;
|
|
741
|
+
tenant_id: string;
|
|
742
|
+
email: string;
|
|
743
|
+
first_name: string;
|
|
744
|
+
last_name: string;
|
|
745
|
+
title: string | null;
|
|
746
|
+
phone: string | null;
|
|
747
|
+
badge_number: string | null;
|
|
748
|
+
license_number: string | null;
|
|
749
|
+
department: string | null;
|
|
750
|
+
organization: string | null;
|
|
751
|
+
address_street1: string | null;
|
|
752
|
+
address_state: string | null;
|
|
753
|
+
status: string;
|
|
754
|
+
}
|
|
755
|
+
interface UpdateFieldAgentRequest {
|
|
756
|
+
first_name?: string;
|
|
757
|
+
last_name?: string;
|
|
758
|
+
title?: string;
|
|
759
|
+
phone?: string;
|
|
760
|
+
address_street1?: string;
|
|
761
|
+
address_street2?: string;
|
|
762
|
+
address_city?: string;
|
|
763
|
+
address_state?: string;
|
|
764
|
+
address_zip?: string;
|
|
765
|
+
address_country?: string;
|
|
766
|
+
organization?: string;
|
|
767
|
+
department?: string;
|
|
768
|
+
badge_number?: string;
|
|
769
|
+
license_number?: string;
|
|
770
|
+
}
|
|
771
|
+
interface FieldAgentDashboardCounts {
|
|
772
|
+
patients: number;
|
|
773
|
+
tests: number;
|
|
774
|
+
test_results: number;
|
|
775
|
+
}
|
|
776
|
+
interface GetFieldAgentDashboardQuery extends QueryParams {
|
|
777
|
+
date?: string;
|
|
778
|
+
}
|
|
779
|
+
interface FieldAgentDashboardResponse {
|
|
780
|
+
agent_id: string;
|
|
781
|
+
date: string;
|
|
782
|
+
counts: FieldAgentDashboardCounts;
|
|
783
|
+
assigned_patients: JsonValue[];
|
|
784
|
+
recent_encounters: JsonValue[];
|
|
785
|
+
pending_tasks: JsonValue[];
|
|
786
|
+
alerts: JsonValue[];
|
|
787
|
+
summary: FieldAgentDashboardCounts;
|
|
788
|
+
}
|
|
789
|
+
interface ListAgentPatientsQuery extends QueryParams {
|
|
790
|
+
created_by?: string;
|
|
791
|
+
limit?: number;
|
|
792
|
+
family?: string;
|
|
793
|
+
given?: string;
|
|
794
|
+
page_token?: string;
|
|
795
|
+
}
|
|
796
|
+
interface AgentPatientSummary {
|
|
797
|
+
patient_id: string;
|
|
798
|
+
fhir_id: string;
|
|
799
|
+
mrn: string;
|
|
800
|
+
name: PatientName;
|
|
801
|
+
created_by: string;
|
|
802
|
+
}
|
|
803
|
+
interface ListAgentPatientsResponse {
|
|
804
|
+
patients: AgentPatientSummary[];
|
|
805
|
+
total: number;
|
|
806
|
+
next_page_token: string | null;
|
|
807
|
+
created_by: string;
|
|
808
|
+
}
|
|
809
|
+
interface ListAgentEncountersQuery extends QueryParams {
|
|
810
|
+
limit?: number;
|
|
811
|
+
patient_id?: string;
|
|
812
|
+
status?: string;
|
|
813
|
+
created_by?: string;
|
|
814
|
+
}
|
|
815
|
+
interface AgentEncounterSummary {
|
|
816
|
+
fhir_id: string;
|
|
817
|
+
patient_id: string;
|
|
818
|
+
status: string;
|
|
819
|
+
encounter_class: string;
|
|
820
|
+
}
|
|
821
|
+
interface ListAgentEncountersResponse {
|
|
822
|
+
encounters: AgentEncounterSummary[];
|
|
823
|
+
total: number;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
type JsonRpcId = number | string;
|
|
827
|
+
interface JsonRpcRequest<TParams = JsonValue> {
|
|
828
|
+
jsonrpc: "2.0";
|
|
829
|
+
id: JsonRpcId;
|
|
830
|
+
method: string;
|
|
831
|
+
params: TParams;
|
|
832
|
+
}
|
|
833
|
+
interface JsonRpcSuccess<TResult = JsonValue> {
|
|
834
|
+
jsonrpc: "2.0";
|
|
835
|
+
id: JsonRpcId;
|
|
836
|
+
result: TResult;
|
|
837
|
+
}
|
|
838
|
+
interface McpServerInfo {
|
|
839
|
+
name: string;
|
|
840
|
+
version: string;
|
|
841
|
+
}
|
|
842
|
+
interface McpInitializeResult {
|
|
843
|
+
protocolVersion: string;
|
|
844
|
+
serverInfo: McpServerInfo;
|
|
845
|
+
}
|
|
846
|
+
type McpListToolsResult = JsonValue;
|
|
847
|
+
interface McpToolCallParams {
|
|
848
|
+
name: string;
|
|
849
|
+
arguments: Record<string, JsonValue>;
|
|
850
|
+
}
|
|
851
|
+
interface McpContentBlock {
|
|
852
|
+
type: "text";
|
|
853
|
+
text: string;
|
|
854
|
+
}
|
|
855
|
+
interface McpToolCallResult {
|
|
856
|
+
content: McpContentBlock[];
|
|
857
|
+
isError: boolean;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Patient API tools exposed via `POST /patient` (confirmed by the curl
|
|
861
|
+
* reference's tool catalog, not individually schema'd):
|
|
862
|
+
* get_patient, get_patient_dashboard, update_demographics, update_address,
|
|
863
|
+
* list_encounters, create_encounter, get_encounter, list_medications,
|
|
864
|
+
* create_medication, add_insurance, check_insurance_eligibility,
|
|
865
|
+
* find_nearest_locations, ask_assistant, classify_voice_command.
|
|
866
|
+
*/
|
|
867
|
+
type McpPatientToolName = "get_patient" | "get_patient_dashboard" | "update_demographics" | "update_address" | "list_encounters" | "create_encounter" | "get_encounter" | "list_medications" | "create_medication" | "add_insurance" | "check_insurance_eligibility" | "find_nearest_locations" | "ask_assistant" | "classify_voice_command";
|
|
868
|
+
/**
|
|
869
|
+
* Field Agent API tools exposed via `POST /fieldagent`.
|
|
870
|
+
*/
|
|
871
|
+
type McpFieldAgentToolName = "get_agent" | "get_agent_dashboard" | "update_agent" | "list_patients" | "list_encounters" | "get_agent_photo_upload_url" | "upload_agent_photo" | "get_agent_photo";
|
|
359
872
|
|
|
360
873
|
/**
|
|
361
874
|
* Machine-readable operation registry.
|
|
@@ -744,174 +1257,35 @@ declare const HCSDK_SWAGGER_OPERATION_COUNTS: {
|
|
|
744
1257
|
readonly telehealth: 1;
|
|
745
1258
|
};
|
|
746
1259
|
|
|
747
|
-
interface
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
phone?: string;
|
|
751
|
-
}
|
|
752
|
-
interface PatientSmsVerificationRequest extends UnknownRecord {
|
|
753
|
-
otp?: string;
|
|
754
|
-
}
|
|
755
|
-
interface PatientAddressUpdateRequest extends UnknownRecord {
|
|
756
|
-
street?: string;
|
|
757
|
-
city?: string;
|
|
758
|
-
state?: string;
|
|
759
|
-
zip?: string;
|
|
760
|
-
}
|
|
761
|
-
interface PatientRaceUpdateRequest extends UnknownRecord {
|
|
762
|
-
races?: string[];
|
|
763
|
-
}
|
|
764
|
-
type PhotoUploadRequest = UnknownRecord | FormData | Blob | ArrayBuffer;
|
|
765
|
-
interface GetPhotoQuery extends QueryParams {
|
|
766
|
-
binary_id?: string;
|
|
767
|
-
}
|
|
768
|
-
interface FaceMatchRequest extends UnknownRecord {
|
|
769
|
-
selfie_data?: string;
|
|
770
|
-
reference_binary_id?: string;
|
|
771
|
-
similarity_threshold?: number;
|
|
772
|
-
}
|
|
773
|
-
interface IdentityDocumentRequest extends UnknownRecord {
|
|
774
|
-
document_data?: string;
|
|
775
|
-
verify_against_demographics?: boolean;
|
|
776
|
-
}
|
|
777
|
-
interface CommunicationPreference extends UnknownRecord {
|
|
778
|
-
language?: string;
|
|
779
|
-
preferred?: boolean;
|
|
780
|
-
}
|
|
781
|
-
interface DemographicsUpdateRequest extends UnknownRecord {
|
|
782
|
-
date_of_birth?: string;
|
|
783
|
-
sex_at_birth?: "male" | "female" | "intersex" | "unknown";
|
|
784
|
-
gender_identity?: "man" | "woman" | "non_binary" | "transgender_man" | "transgender_woman" | "genderqueer" | "other" | "choose_not_to_disclose" | "unknown";
|
|
785
|
-
ethnicity?: "hispanic_or_latino" | "not_hispanic_or_latino" | "unknown" | "declined_to_specify";
|
|
786
|
-
marital_status?: "single" | "married" | "divorced" | "widowed" | "separated" | "domestic_partner";
|
|
787
|
-
nationality?: string;
|
|
788
|
-
preferred_language?: string;
|
|
789
|
-
communications?: CommunicationPreference[];
|
|
790
|
-
}
|
|
791
|
-
interface CreateInsuranceRequest extends UnknownRecord {
|
|
792
|
-
priority?: "primary" | "secondary" | "tertiary";
|
|
793
|
-
payer_name?: string;
|
|
794
|
-
member_id?: string;
|
|
795
|
-
relationship?: string;
|
|
796
|
-
}
|
|
797
|
-
interface MedicationDosage extends UnknownRecord {
|
|
798
|
-
value?: number;
|
|
799
|
-
unit?: string;
|
|
800
|
-
frequency?: "once" | "once_daily" | "twice_daily" | "three_times_daily" | "four_times_daily" | "every_4_hours" | "every_6_hours" | "every_8_hours" | "every_12_hours" | "every_48_hours" | "weekly" | "biweekly" | "monthly" | "as_needed" | "other";
|
|
801
|
-
instructions?: string;
|
|
802
|
-
}
|
|
803
|
-
interface CreateMedicationRequest extends UnknownRecord {
|
|
804
|
-
name?: string;
|
|
805
|
-
rxnorm_code?: string;
|
|
806
|
-
route?: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhaled" | "sublingual" | "intranasal" | "ophthalmic" | "otic" | "rectal" | "transdermal" | "other";
|
|
807
|
-
dosage?: MedicationDosage;
|
|
808
|
-
status?: "active" | "on-hold" | "completed" | "stopped" | "entered-in-error";
|
|
809
|
-
intent?: string;
|
|
810
|
-
indication?: string;
|
|
811
|
-
prescriber_name?: string;
|
|
812
|
-
refills_authorized?: number;
|
|
813
|
-
start_date?: string;
|
|
814
|
-
end_date?: string;
|
|
815
|
-
notes?: string;
|
|
816
|
-
}
|
|
817
|
-
interface MedicationStatusUpdateRequest extends UnknownRecord {
|
|
818
|
-
status?: "active" | "on-hold" | "completed" | "stopped" | "entered-in-error";
|
|
819
|
-
discontinued_reason?: string;
|
|
820
|
-
notes?: string;
|
|
821
|
-
}
|
|
822
|
-
interface NearestLocationsQuery extends QueryParams {
|
|
823
|
-
lat?: number;
|
|
824
|
-
lon?: number;
|
|
825
|
-
radius_km?: number;
|
|
826
|
-
type?: string;
|
|
827
|
-
}
|
|
828
|
-
interface CreateEncounterRequest extends UnknownRecord {
|
|
829
|
-
patient_id?: string;
|
|
830
|
-
reason?: string;
|
|
831
|
-
encounter_type?: string;
|
|
832
|
-
}
|
|
833
|
-
interface ListEncountersQuery extends QueryParams {
|
|
834
|
-
patient_id?: string;
|
|
835
|
-
}
|
|
836
|
-
interface QuestionnaireItem extends UnknownRecord {
|
|
837
|
-
link_id?: string;
|
|
838
|
-
text?: string;
|
|
839
|
-
type?: string;
|
|
840
|
-
}
|
|
841
|
-
interface CreateQuestionnaireRequest extends UnknownRecord {
|
|
842
|
-
name?: string;
|
|
843
|
-
title?: string;
|
|
844
|
-
items?: QuestionnaireItem[];
|
|
845
|
-
}
|
|
846
|
-
interface QuestionnaireResponseAnswer extends UnknownRecord {
|
|
847
|
-
value_integer?: number;
|
|
848
|
-
value_string?: string;
|
|
849
|
-
value_boolean?: boolean;
|
|
850
|
-
}
|
|
851
|
-
interface QuestionnaireResponseItem extends UnknownRecord {
|
|
852
|
-
link_id?: string;
|
|
853
|
-
answers?: QuestionnaireResponseAnswer[];
|
|
854
|
-
}
|
|
855
|
-
interface CreateQuestionnaireResponseRequest extends UnknownRecord {
|
|
856
|
-
patient_id?: string;
|
|
857
|
-
items?: QuestionnaireResponseItem[];
|
|
858
|
-
}
|
|
859
|
-
interface InsuranceEligibilityRequest extends UnknownRecord {
|
|
860
|
-
payer_id?: string;
|
|
861
|
-
member_id?: string;
|
|
862
|
-
first_name?: string;
|
|
863
|
-
last_name?: string;
|
|
864
|
-
date_of_birth?: string;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
interface FaceCompareRequest extends UnknownRecord {
|
|
868
|
-
imageUrl1?: string;
|
|
869
|
-
imageUrl2?: string;
|
|
870
|
-
similarityThreshold?: number;
|
|
871
|
-
}
|
|
872
|
-
interface FaceCompareResponse extends UnknownRecord {
|
|
873
|
-
samePerson?: boolean;
|
|
874
|
-
confidence?: number;
|
|
1260
|
+
interface FaceCompareRequest {
|
|
1261
|
+
imageUrl1: string;
|
|
1262
|
+
imageUrl2: string;
|
|
875
1263
|
similarityThreshold?: number;
|
|
876
|
-
faceDetectedInImage1?: boolean;
|
|
877
|
-
faceDetectedInImage2?: boolean;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
interface VitalsResponse extends UnknownRecord {
|
|
881
1264
|
}
|
|
882
|
-
interface
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
weight_kg?: number;
|
|
889
|
-
height_cm?: number;
|
|
890
|
-
encounter_id?: string;
|
|
891
|
-
}
|
|
892
|
-
interface ListVitalsQuery extends QueryParams {
|
|
893
|
-
from?: string;
|
|
894
|
-
to?: string;
|
|
1265
|
+
interface FaceCompareResponse {
|
|
1266
|
+
samePerson: boolean;
|
|
1267
|
+
confidence: number;
|
|
1268
|
+
similarityThreshold: number;
|
|
1269
|
+
faceDetectedInImage1: boolean;
|
|
1270
|
+
faceDetectedInImage2: boolean;
|
|
895
1271
|
}
|
|
896
1272
|
|
|
897
|
-
type AccessTokenWriter = (token: string) => void;
|
|
898
|
-
type TenantIdReader = () => string | undefined;
|
|
1273
|
+
type AccessTokenWriter$1 = (token: string) => void;
|
|
1274
|
+
type TenantIdReader$1 = () => string | undefined;
|
|
899
1275
|
declare class AuthClient extends BaseServiceClient {
|
|
900
1276
|
private readonly setAccessToken;
|
|
901
1277
|
private readonly getTenantId;
|
|
902
|
-
constructor(http: HttpClient, setAccessToken: AccessTokenWriter, getTenantId: TenantIdReader);
|
|
903
|
-
register<TResponse =
|
|
904
|
-
login<TResponse =
|
|
905
|
-
verifyEmail<TResponse =
|
|
906
|
-
private withTenantId;
|
|
907
|
-
private extractAccessToken;
|
|
1278
|
+
constructor(http: HttpClient, setAccessToken: AccessTokenWriter$1, getTenantId: TenantIdReader$1);
|
|
1279
|
+
register<TResponse = RegisterPatientResponse>(request: RegisterPatientRequest): Promise<TResponse>;
|
|
1280
|
+
login<TResponse extends LoginResponse = LoginResponse>(request: LoginRequest): Promise<TResponse>;
|
|
1281
|
+
verifyEmail<TResponse = VerifiedResponse>(request: VerifyEmailRequest): Promise<TResponse>;
|
|
908
1282
|
}
|
|
909
1283
|
|
|
910
1284
|
declare class DiagnosticsClient extends BaseServiceClient {
|
|
911
1285
|
constructor(http: HttpClient);
|
|
912
|
-
connect<TResponse =
|
|
913
|
-
createRapidTest<TResponse =
|
|
914
|
-
list<TResponse =
|
|
1286
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1287
|
+
createRapidTest<TResponse = RapidTestResponse>(patientId: string, request: RapidTestRequest): Promise<TResponse>;
|
|
1288
|
+
list<TResponse = ListDiagnosticsResponse>(patientId: string): Promise<TResponse>;
|
|
915
1289
|
}
|
|
916
1290
|
|
|
917
1291
|
/**
|
|
@@ -927,40 +1301,81 @@ declare class DiagnosticsClient extends BaseServiceClient {
|
|
|
927
1301
|
*/
|
|
928
1302
|
declare class EhrClient extends BaseServiceClient {
|
|
929
1303
|
constructor(http: HttpClient);
|
|
930
|
-
connect<TResponse =
|
|
1304
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
type AccessTokenWriter = (token: string) => void;
|
|
1308
|
+
type TenantIdReader = () => string | undefined;
|
|
1309
|
+
declare class FieldAgentClient extends BaseServiceClient {
|
|
1310
|
+
private readonly setAccessToken;
|
|
1311
|
+
private readonly getTenantId;
|
|
1312
|
+
constructor(http: HttpClient, setAccessToken: AccessTokenWriter, getTenantId: TenantIdReader);
|
|
1313
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1314
|
+
register<TResponse = RegisterFieldAgentResponse>(request: RegisterFieldAgentRequest): Promise<TResponse>;
|
|
1315
|
+
resetPassword<TResponse = ResetPasswordResponse>(request: ResetFieldAgentPasswordRequest): Promise<TResponse>;
|
|
1316
|
+
login<TResponse extends LoginResponse = LoginResponse>(request: FieldAgentLoginRequest): Promise<TResponse>;
|
|
1317
|
+
verifyEmail<TResponse = VerifiedResponse>(request: VerifyEmailRequest): Promise<TResponse>;
|
|
1318
|
+
verifySms<TResponse = VerifiedResponse>(request: VerifyFieldAgentSmsRequest): Promise<TResponse>;
|
|
1319
|
+
getAgent<TResponse = FieldAgentResponse>(agentSub: string): Promise<TResponse>;
|
|
1320
|
+
updateAgent<TResponse = FieldAgentResponse>(agentSub: string, request: UpdateFieldAgentRequest): Promise<TResponse>;
|
|
1321
|
+
getDashboard<TResponse = FieldAgentDashboardResponse>(agentSub: string, query?: GetFieldAgentDashboardQuery): Promise<TResponse>;
|
|
1322
|
+
getPhotoUploadUrl<TResponse = PhotoUploadUrlResponse>(agentSub: string): Promise<TResponse>;
|
|
1323
|
+
uploadPhoto<TResponse = PhotoUploadResponse>(agentSub: string, request: PhotoUploadRequest): Promise<TResponse>;
|
|
1324
|
+
getPhoto<TResponse = GetPhotoResponse>(agentSub: string, query: GetPhotoQuery): Promise<TResponse>;
|
|
1325
|
+
listPatients<TResponse = ListAgentPatientsResponse>(query?: ListAgentPatientsQuery): Promise<TResponse>;
|
|
1326
|
+
listEncounters<TResponse = ListAgentEncountersResponse>(query?: ListAgentEncountersQuery): Promise<TResponse>;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* MCPClient — JSON-RPC 2.0 proxy for the HC MCP API. Forwards to the Patient
|
|
1331
|
+
* or Field Agent API tool catalog using the caller's bearer token (the same
|
|
1332
|
+
* token already configured on this SDK instance via `setAccessToken`/login).
|
|
1333
|
+
*
|
|
1334
|
+
* The result type is generic per call (`initialize` → `McpInitializeResult`,
|
|
1335
|
+
* `tools/call` → `McpToolCallResult`, etc.) since a single JSON-RPC envelope
|
|
1336
|
+
* carries different result shapes per `method` — see `models/generated/mcp.ts`.
|
|
1337
|
+
*/
|
|
1338
|
+
declare class MCPClient extends BaseServiceClient {
|
|
1339
|
+
constructor(http: HttpClient);
|
|
1340
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1341
|
+
/** Calls one of the 14 Patient API tools via `POST /patient`. */
|
|
1342
|
+
patient<TParams = JsonValue, TResult = JsonValue>(request: JsonRpcRequest<TParams>): Promise<JsonRpcSuccess<TResult>>;
|
|
1343
|
+
/** Calls one of the 8 Field Agent API tools via `POST /fieldagent`. */
|
|
1344
|
+
fieldAgent<TParams = JsonValue, TResult = JsonValue>(request: JsonRpcRequest<TParams>): Promise<JsonRpcSuccess<TResult>>;
|
|
931
1345
|
}
|
|
932
1346
|
|
|
933
1347
|
declare class PatientClient extends BaseServiceClient {
|
|
934
1348
|
constructor(http: HttpClient);
|
|
935
|
-
connect<TResponse =
|
|
936
|
-
updatePhone<TResponse =
|
|
937
|
-
verifySms<TResponse =
|
|
938
|
-
updateAddress<TResponse =
|
|
939
|
-
updateRace<TResponse =
|
|
1349
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1350
|
+
updatePhone<TResponse = PhoneUpdateResponse>(patientId: string, request: PatientPhoneUpdateRequest): Promise<TResponse>;
|
|
1351
|
+
verifySms<TResponse = VerifiedResponse>(patientId: string, request: PatientSmsVerificationRequest): Promise<TResponse>;
|
|
1352
|
+
updateAddress<TResponse = UpdatedResponse>(patientId: string, request: PatientAddressUpdateRequest): Promise<TResponse>;
|
|
1353
|
+
updateRace<TResponse = UpdatedResponse>(patientId: string, request: PatientRaceUpdateRequest): Promise<TResponse>;
|
|
940
1354
|
getProfile<TResponse = PatientResponse>(patientId: string): Promise<TResponse>;
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1355
|
+
getDashboard<TResponse = PatientDashboardResponse>(patientId: string): Promise<TResponse>;
|
|
1356
|
+
uploadPhoto<TResponse = PhotoUploadResponse>(patientId: string, request: PhotoUploadRequest): Promise<TResponse>;
|
|
1357
|
+
getPhoto<TResponse = GetPhotoResponse>(patientId: string, query: GetPhotoQuery): Promise<TResponse>;
|
|
1358
|
+
getPhotoUploadUrl<TResponse = PhotoUploadUrlResponse>(patientId: string): Promise<TResponse>;
|
|
1359
|
+
compareFaceMatch<TResponse = FaceMatchResponse>(patientId: string, request: FaceMatchRequest): Promise<TResponse>;
|
|
1360
|
+
scanIdentityDocument<TResponse = IdentityDocumentResponse>(patientId: string, request: IdentityDocumentRequest): Promise<TResponse>;
|
|
1361
|
+
updateDemographics<TResponse = UpdatedResponse>(patientId: string, request: DemographicsUpdateRequest): Promise<TResponse>;
|
|
1362
|
+
createInsurance<TResponse = CreateInsuranceResponse>(patientId: string, request: CreateInsuranceRequest): Promise<TResponse>;
|
|
1363
|
+
createMedication<TResponse = MedicationResponse>(patientId: string, request: CreateMedicationRequest): Promise<TResponse>;
|
|
1364
|
+
listMedications<TResponse = ListMedicationsResponse>(patientId: string, query?: ListMedicationsQuery): Promise<TResponse>;
|
|
1365
|
+
getMedication<TResponse = MedicationResponse>(patientId: string, medicationId: string): Promise<TResponse>;
|
|
1366
|
+
updateMedicationStatus<TResponse = MedicationUpdateResponse>(patientId: string, medicationId: string, request: MedicationStatusUpdateRequest): Promise<TResponse>;
|
|
1367
|
+
listNearestLocations<TResponse = ListNearestLocationsResponse>(query: NearestLocationsQuery): Promise<TResponse>;
|
|
1368
|
+
createEncounter<TResponse = EncounterResponse>(request: CreateEncounterRequest): Promise<TResponse>;
|
|
1369
|
+
listEncounters<TResponse = ListEncountersResponse>(query?: ListEncountersQuery): Promise<TResponse>;
|
|
1370
|
+
getEncounter<TResponse = EncounterResponse>(encounterId: string): Promise<TResponse>;
|
|
1371
|
+
createQuestionnaire<TResponse = FhirIdResponse>(request: CreateQuestionnaireRequest): Promise<TResponse>;
|
|
1372
|
+
createQuestionnaireResponse<TResponse = FhirIdResponse>(questionnaireId: string, request: CreateQuestionnaireResponseRequest): Promise<TResponse>;
|
|
1373
|
+
checkInsuranceEligibility<TResponse = InsuranceEligibilityResponse>(request: InsuranceEligibilityRequest): Promise<TResponse>;
|
|
959
1374
|
classifyVoiceCommand<TResponse = ClassifyResponse>(request: ClassifyRequest): Promise<TResponse>;
|
|
960
1375
|
ocrIdentityDocument<TResponse = OcrResponse>(request: OcrRequest): Promise<TResponse>;
|
|
961
1376
|
askAssistant<TResponse = ChatResponse>(request: ChatRequest): Promise<TResponse>;
|
|
962
1377
|
listKnowledge<TResponse = ListKnowledgeResponse>(query?: ListKnowledgeQuery): Promise<TResponse>;
|
|
963
|
-
searchKnowledge<TResponse = SearchKnowledgeResponse>(query
|
|
1378
|
+
searchKnowledge<TResponse = SearchKnowledgeResponse>(query: SearchKnowledgeQuery): Promise<TResponse>;
|
|
964
1379
|
listAssistantActions<TResponse = ListAssistantActionsResponse>(): Promise<TResponse>;
|
|
965
1380
|
compareFacesByUrl<TResponse = FaceCompareResponse>(request: FaceCompareRequest): Promise<TResponse>;
|
|
966
1381
|
getCommunicationsState<TResponse = CommunicationsStateResponse>(): Promise<TResponse>;
|
|
@@ -994,7 +1409,7 @@ declare class PatientClient extends BaseServiceClient {
|
|
|
994
1409
|
*/
|
|
995
1410
|
declare class ProviderClient extends BaseServiceClient {
|
|
996
1411
|
constructor(http: HttpClient);
|
|
997
|
-
connect<TResponse =
|
|
1412
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
998
1413
|
}
|
|
999
1414
|
|
|
1000
1415
|
/**
|
|
@@ -1010,7 +1425,7 @@ declare class ProviderClient extends BaseServiceClient {
|
|
|
1010
1425
|
*/
|
|
1011
1426
|
declare class RppgClient extends BaseServiceClient {
|
|
1012
1427
|
constructor(http: HttpClient);
|
|
1013
|
-
connect<TResponse =
|
|
1428
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1014
1429
|
}
|
|
1015
1430
|
|
|
1016
1431
|
/**
|
|
@@ -1026,7 +1441,7 @@ declare class RppgClient extends BaseServiceClient {
|
|
|
1026
1441
|
*/
|
|
1027
1442
|
declare class SessionClient extends BaseServiceClient {
|
|
1028
1443
|
constructor(http: HttpClient);
|
|
1029
|
-
connect<TResponse =
|
|
1444
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1030
1445
|
}
|
|
1031
1446
|
|
|
1032
1447
|
/**
|
|
@@ -1042,14 +1457,14 @@ declare class SessionClient extends BaseServiceClient {
|
|
|
1042
1457
|
*/
|
|
1043
1458
|
declare class TelehealthClient extends BaseServiceClient {
|
|
1044
1459
|
constructor(http: HttpClient);
|
|
1045
|
-
connect<TResponse =
|
|
1460
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1046
1461
|
}
|
|
1047
1462
|
|
|
1048
1463
|
declare class VitalsClient extends BaseServiceClient {
|
|
1049
1464
|
constructor(http: HttpClient);
|
|
1050
|
-
connect<TResponse =
|
|
1051
|
-
record<TResponse =
|
|
1052
|
-
list<TResponse =
|
|
1465
|
+
connect<TResponse = ConnectResponse>(): Promise<TResponse>;
|
|
1466
|
+
record<TResponse = SubmitVitalsResponse>(patientId: string, request: VitalsRecordRequest): Promise<TResponse>;
|
|
1467
|
+
list<TResponse = GetVitalsResponse>(patientId: string, query?: ListVitalsQuery): Promise<TResponse>;
|
|
1053
1468
|
}
|
|
1054
1469
|
|
|
1055
1470
|
declare class HCSDK {
|
|
@@ -1065,6 +1480,8 @@ declare class HCSDK {
|
|
|
1065
1480
|
readonly rppg: RppgClient;
|
|
1066
1481
|
readonly session: SessionClient;
|
|
1067
1482
|
readonly telehealth: TelehealthClient;
|
|
1483
|
+
readonly fieldAgent: FieldAgentClient;
|
|
1484
|
+
readonly mcp: MCPClient;
|
|
1068
1485
|
constructor(config: HCSDKConfig);
|
|
1069
1486
|
setAccessToken(token: string): void;
|
|
1070
1487
|
getAccessToken(): string | undefined;
|
|
@@ -1073,13 +1490,13 @@ declare class HCSDK {
|
|
|
1073
1490
|
interface SDKErrorOptions {
|
|
1074
1491
|
message: string;
|
|
1075
1492
|
statusCode: number;
|
|
1076
|
-
response?:
|
|
1493
|
+
response?: JsonValue;
|
|
1077
1494
|
cause?: unknown;
|
|
1078
1495
|
}
|
|
1079
1496
|
declare class SDKError extends Error {
|
|
1080
1497
|
readonly statusCode: number;
|
|
1081
|
-
readonly response?:
|
|
1498
|
+
readonly response?: JsonValue;
|
|
1082
1499
|
constructor(options: SDKErrorOptions);
|
|
1083
1500
|
}
|
|
1084
1501
|
|
|
1085
|
-
export { type AssistantAction, type
|
|
1502
|
+
export { type AgentEncounterSummary, type AgentPatientSummary, type AssistantAction, type BloodPressureVital, type ChatCitation, type ChatRequest, type ChatResponse, type ChatSuggestedAction, type ClassifyRequest, type ClassifyResponse, type CommunicationPreference, type CommunicationsStateResponse, type ConnectResponse, type ConversationKind, type ConversationRecord, type CreateEncounterRequest, type CreateInsuranceRequest, type CreateInsuranceResponse, type CreateMedicationRequest, type CreateQuestionnaireRequest, type CreateQuestionnaireResponseRequest, type DemographicsUpdateRequest, type DiagnosticObservation, type EncounterResponse, type EncounterStatus, type Environment, type Ethnicity, type FaceCompareRequest, type FaceCompareResponse, type FaceMatchRequest, type FaceMatchResponse, type FhirIdResponse, type FieldAgentDashboardCounts, type FieldAgentDashboardResponse, type FieldAgentLoginRequest, type FieldAgentResponse, type GenderIdentity, type GetFieldAgentDashboardQuery, type GetPhotoQuery, type GetPhotoResponse, type GetVitalsResponse, type GroupKind, type GroupRecord, HCSDK, type HCSDKConfig, HCSDK_OPERATION_SUMMARY, HCSDK_SWAGGER_OPERATION_COUNTS, HCSDK_SWAGGER_PATH_COUNTS, HCSDK_TOTAL_OPERATION_COUNT, type HeartRateVital, type HeightVital, type HttpMethod, type HttpRequestBody, type HttpRequestOptions, type IdentityDocumentRequest, type IdentityDocumentResponse, type InsuranceEligibilityRequest, type InsuranceEligibilityResponse, type InviteChannel, type InviteRecord, type InviteStatus, type JsonObject, type JsonPrimitive, type JsonRpcId, type JsonRpcRequest, type JsonRpcSuccess, type JsonValue, type KnowledgeCollection, type KnowledgeCollectionSummary, type KnowledgeEntrySummary, type KnowledgeSearchResult, type ListAgentEncountersQuery, type ListAgentEncountersResponse, type ListAgentPatientsQuery, type ListAgentPatientsResponse, type ListAssistantActionsResponse, type ListConversationsResponse, type ListDiagnosticsResponse, type ListEncountersQuery, type ListEncountersResponse, type ListGroupsResponse, type ListInvitesResponse, type ListKnowledgeQuery, type ListKnowledgeResponse, type ListMedicationsQuery, type ListMedicationsResponse, type ListMessagesQuery, type ListMessagesResponse, type ListNearestLocationsResponse, type ListPresenceResponse, type ListVitalsQuery, type LocationCoordinates, type LocationGeometry, type LoginRequest, type LoginResponse, type MaritalStatus, type McpContentBlock, type McpFieldAgentToolName, type McpInitializeResult, type McpListToolsResult, type McpPatientToolName, type McpServerInfo, type McpToolCallParams, type McpToolCallResult, type MedicationDosage, type MedicationFrequency, type MedicationResponse, type MedicationRoute, type MedicationStatus, type MedicationStatusUpdateRequest, type MedicationUpdateResponse, type MessageKind, type MessageRecord, type NearestLocation, type NearestLocationsQuery, type OcrErrorResponse, type OcrFields, type OcrRequest, type OcrResponse, type OcrResultResponse, type PatientAddressUpdateRequest, type PatientDashboardResponse, type PatientName, type PatientPhoneUpdateRequest, type PatientRaceUpdateRequest, type PatientResponse, type PatientSmsVerificationRequest, type PhoneUpdateResponse, type PhotoUploadRequest, type PhotoUploadResponse, type PhotoUploadUrlResponse, type PresenceRecord, type PresenceState, type PublicRequestOptions, type PulseOximetryVital, type QueryParamPrimitive, type QueryParamValue, type QueryParams, type QuestionnaireItem, type QuestionnaireItemType, type QuestionnaireResponseAnswer, type QuestionnaireResponseItem, type RapidTestRequest, type RapidTestResponse, type RapidTestResult, type RapidTestType, type RegisterFieldAgentRequest, type RegisterFieldAgentResponse, type RegisterPatientRequest, type RegisterPatientResponse, type ResetFieldAgentPasswordRequest, type ResetPasswordResponse, type RtcTokenRequest, type RtcTokenResponse, type RtcTokenSuccessResponse, type RtcTokenUnavailableResponse, SDKError, type SDKRuntimeState, type SearchKnowledgeQuery, type SearchKnowledgeResponse, type ServiceName, type SexAtBirth, type SubmitVitalsResponse, type TemperatureVital, type UpdateFieldAgentRequest, type UpdatedResponse, type UpsertConversationRequest, type UpsertGroupRequest, type UpsertInviteRequest, type UpsertMessageRequest, type UpsertPresenceRequest, type VerifiedResponse, type VerifyEmailRequest, type VerifyFieldAgentSmsRequest, type VitalsRecordRequest, type WeightVital, assertEnvironment, isServiceName, resolveBaseUrl, withTenantId };
|