@clinia/context-engine-js 0.7.0 → 0.10.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/CHANGELOG.md +88 -0
- package/README.md +15 -16
- package/dist/generated/context-engine.d.ts +771 -348
- package/dist/generated/types.d.ts +8 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/dist/resources/graph.d.ts +6 -2
- package/dist/resources/info.d.ts +8 -0
- package/dist/resources/ingest.d.ts +56 -1
- package/dist/resources/sessions.d.ts +23 -51
- package/package.json +15 -6
|
@@ -12,7 +12,7 @@ export interface paths {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Get service info
|
|
15
|
-
* @description Returns the service name and the build identity of the running process. Use it to confirm which build a deployment is serving.
|
|
15
|
+
* @description Returns the service name, its status, and the build identity of the running process. Use it to confirm which build a deployment is serving, or as an availability probe: it answers `200` when the service is healthy and `503` when it is degraded.
|
|
16
16
|
*/
|
|
17
17
|
get: operations["get-service-info"];
|
|
18
18
|
put?: never;
|
|
@@ -32,7 +32,7 @@ export interface paths {
|
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* List patients
|
|
35
|
-
* @description Returns a page of the patients currently registered, ordered by
|
|
35
|
+
* @description Returns a page of the patients currently registered, ordered by patient ID. An empty page is returned if none have been registered yet. Graph counts are read per patient from the graph endpoints.
|
|
36
36
|
*/
|
|
37
37
|
get: operations["list-patients"];
|
|
38
38
|
put?: never;
|
|
@@ -52,12 +52,12 @@ export interface paths {
|
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
54
|
* Get patient
|
|
55
|
-
* @description Returns demographic metadata and pipeline stats for a patient identified by its
|
|
55
|
+
* @description Returns demographic metadata and pipeline stats for a patient identified by its patient ID.
|
|
56
56
|
*/
|
|
57
57
|
get: operations["get-patient"];
|
|
58
58
|
/**
|
|
59
59
|
* Upsert patient
|
|
60
|
-
* @description Creates the patient entry if it does not yet exist, or returns the existing record unchanged.
|
|
60
|
+
* @description Creates the patient entry if it does not yet exist, or returns the existing record unchanged. Idempotent.
|
|
61
61
|
*
|
|
62
62
|
* New ids are limited to `[A-Za-z0-9][A-Za-z0-9.~:-]{0,127}`, but you can keep referring to previous ids as they were defined.
|
|
63
63
|
*/
|
|
@@ -177,6 +177,30 @@ export interface paths {
|
|
|
177
177
|
patch?: never;
|
|
178
178
|
trace?: never;
|
|
179
179
|
};
|
|
180
|
+
"/v1/patients/{patientId}/ingestions/sessions": {
|
|
181
|
+
parameters: {
|
|
182
|
+
query?: never;
|
|
183
|
+
header?: never;
|
|
184
|
+
path?: never;
|
|
185
|
+
cookie?: never;
|
|
186
|
+
};
|
|
187
|
+
get?: never;
|
|
188
|
+
put?: never;
|
|
189
|
+
/**
|
|
190
|
+
* Ingest sessions
|
|
191
|
+
* @description Submits one or more conversation transcripts. Each transcript is stored as a session — under the `sessionId` it declares, or a generated one — and the patient's memories are formed from it as ingestion proceeds.
|
|
192
|
+
*
|
|
193
|
+
* The response is a receipt: ingestion continues after it is returned, so poll the ingestion to follow it. `intake` comes back index-aligned with the sessions you sent, each item naming the session its transcript was stored under.
|
|
194
|
+
*
|
|
195
|
+
* Resending a session under the same `sessionId` is safe: messages already stored are recognised and not staged again, and turns added at the end are appended. A transcript without a `sessionId` always opens a new session. A transcript that edits, removes or reorders stored turns is refused. If any transcript is refused, the whole request is rejected and nothing is stored.
|
|
196
|
+
*/
|
|
197
|
+
post: operations["ingest-sessions"];
|
|
198
|
+
delete?: never;
|
|
199
|
+
options?: never;
|
|
200
|
+
head?: never;
|
|
201
|
+
patch?: never;
|
|
202
|
+
trace?: never;
|
|
203
|
+
};
|
|
180
204
|
"/v1/patients/{patientId}/ingestions": {
|
|
181
205
|
parameters: {
|
|
182
206
|
query?: never;
|
|
@@ -228,7 +252,10 @@ export interface paths {
|
|
|
228
252
|
put?: never;
|
|
229
253
|
/**
|
|
230
254
|
* Create session
|
|
255
|
+
* @deprecated
|
|
231
256
|
* @description Opens a new query session scoped to a patient. Sessions track interaction context across multiple MCP tool calls within a single agent run.
|
|
257
|
+
*
|
|
258
|
+
* Deprecated: a session no longer needs opening. Writing under a `sessionId` of your choosing — appending messages, a tool call's `session_id`, or `POST …/ingestions/sessions` — creates it, and the import route generates one when a transcript declares none.
|
|
232
259
|
*/
|
|
233
260
|
post: operations["create-session"];
|
|
234
261
|
delete?: never;
|
|
@@ -251,9 +278,12 @@ export interface paths {
|
|
|
251
278
|
get: operations["get-session"];
|
|
252
279
|
/**
|
|
253
280
|
* Upsert a session
|
|
281
|
+
* @deprecated
|
|
254
282
|
* @description Idempotently opens a session under a caller-provided id: creates it if new, or returns the existing session unchanged. Sessions track interaction context across multiple MCP tool calls within a single agent run.
|
|
255
283
|
*
|
|
256
284
|
* New ids are limited to `[A-Za-z0-9][A-Za-z0-9.~:-]{0,127}`, but you can keep referring to previous ids as they were defined.
|
|
285
|
+
*
|
|
286
|
+
* Deprecated: a session no longer needs opening. Its first write — appending messages, a tool call's `session_id`, or `POST …/ingestions/sessions` — creates it.
|
|
257
287
|
*/
|
|
258
288
|
put: operations["upsert-session"];
|
|
259
289
|
post?: never;
|
|
@@ -274,7 +304,12 @@ export interface paths {
|
|
|
274
304
|
put?: never;
|
|
275
305
|
/**
|
|
276
306
|
* Append session messages
|
|
277
|
-
* @
|
|
307
|
+
* @deprecated
|
|
308
|
+
* @description Appends user/assistant messages to a session, in order, creating the session if this is its first write, and queues memory formation over them. The returned `ingestion` is the receipt to poll. Tool-call turns are recorded separately by the MCP layer and are not accepted here.
|
|
309
|
+
*
|
|
310
|
+
* New ids are limited to `[A-Za-z0-9][A-Za-z0-9.~:-]{0,127}`, but you can keep referring to previous ids as they were defined.
|
|
311
|
+
*
|
|
312
|
+
* Deprecated: use `POST …/ingestions/sessions`, which accepts the same messages under the session's id.
|
|
278
313
|
*/
|
|
279
314
|
post: operations["append-messages"];
|
|
280
315
|
delete?: never;
|
|
@@ -298,7 +333,10 @@ export interface paths {
|
|
|
298
333
|
put?: never;
|
|
299
334
|
/**
|
|
300
335
|
* Generate session memories
|
|
301
|
-
* @
|
|
336
|
+
* @deprecated
|
|
337
|
+
* @description Accepts and does nothing: memories form from a session's messages as they arrive, through appending messages or `POST …/ingestions/sessions`, each of which returns the ingestion receipt to poll. `GET …/memories` returns a session's memories as they land.
|
|
338
|
+
*
|
|
339
|
+
* Deprecated: drop the call.
|
|
302
340
|
*/
|
|
303
341
|
post: operations["generate-memories"];
|
|
304
342
|
delete?: never;
|
|
@@ -307,26 +345,6 @@ export interface paths {
|
|
|
307
345
|
patch?: never;
|
|
308
346
|
trace?: never;
|
|
309
347
|
};
|
|
310
|
-
"/v1/patients/{patientId}/sessions/ingest": {
|
|
311
|
-
parameters: {
|
|
312
|
-
query?: never;
|
|
313
|
-
header?: never;
|
|
314
|
-
path?: never;
|
|
315
|
-
cookie?: never;
|
|
316
|
-
};
|
|
317
|
-
get?: never;
|
|
318
|
-
put?: never;
|
|
319
|
-
/**
|
|
320
|
-
* Ingest a complete session
|
|
321
|
-
* @description Replays a complete set of messages as one session: creates the session, appends every message in order, then generates memories from it synchronously, so the response returns only after the patient's memories reflect the conversation. Messages can still be appended to the session. Intended for batch/replay use, not interactive sessions.
|
|
322
|
-
*/
|
|
323
|
-
post: operations["ingest-session"];
|
|
324
|
-
delete?: never;
|
|
325
|
-
options?: never;
|
|
326
|
-
head?: never;
|
|
327
|
-
patch?: never;
|
|
328
|
-
trace?: never;
|
|
329
|
-
};
|
|
330
348
|
"/v1/patients/{patientId}/vfs": {
|
|
331
349
|
parameters: {
|
|
332
350
|
query?: never;
|
|
@@ -671,10 +689,15 @@ export interface paths {
|
|
|
671
689
|
export type webhooks = Record<string, never>;
|
|
672
690
|
export interface components {
|
|
673
691
|
schemas: {
|
|
674
|
-
/** @description Identity of the running service: its name and the build it came from.
|
|
692
|
+
/** @description Identity and status of the running service: its name, whether it can serve requests, and the build it came from. Build identity is what this process resolved at startup, which for edge builds is more specific than any released version. */
|
|
675
693
|
ServiceInfo: {
|
|
676
694
|
/** @description Display name of the service. */
|
|
677
695
|
name: string;
|
|
696
|
+
/**
|
|
697
|
+
* @description Whether the service can currently serve requests. `degraded` means requests that read or write data are expected to fail; it is always served with a `503`.
|
|
698
|
+
* @enum {string}
|
|
699
|
+
*/
|
|
700
|
+
status: "healthy" | "degraded";
|
|
678
701
|
/** @description Build identity of the running process. */
|
|
679
702
|
version: {
|
|
680
703
|
/** @description Product version of the running build. Injected as `VERSION` at image build time; falls back to the server package version outside a built image. */
|
|
@@ -689,7 +712,7 @@ export interface components {
|
|
|
689
712
|
PatientList: {
|
|
690
713
|
/** @description The requested page of items. */
|
|
691
714
|
data: {
|
|
692
|
-
/** @description
|
|
715
|
+
/** @description The patient ID, used in every REST route, VFS path and MCP tool. */
|
|
693
716
|
registryKey: string;
|
|
694
717
|
patient: components["schemas"]["PatientDemographics"];
|
|
695
718
|
}[];
|
|
@@ -705,14 +728,14 @@ export interface components {
|
|
|
705
728
|
};
|
|
706
729
|
/** @description Demographic data extracted from the ingested record. Null if no patient resource was found during ingestion. */
|
|
707
730
|
PatientDemographics: {
|
|
708
|
-
/** @description
|
|
731
|
+
/** @description The patient ID, the identifier the caller chose when creating the patient. */
|
|
709
732
|
id: string;
|
|
710
733
|
/** @description Patient display name extracted from the ingested record. */
|
|
711
734
|
name: string;
|
|
712
735
|
} | null;
|
|
713
736
|
/** @description Demographic metadata and pipeline stats for a single patient. */
|
|
714
737
|
PatientDetail: {
|
|
715
|
-
/** @description
|
|
738
|
+
/** @description The patient ID, used in every REST route, VFS path and MCP tool. */
|
|
716
739
|
id: string;
|
|
717
740
|
/** @description Patient display name extracted from the ingested record. */
|
|
718
741
|
name: string;
|
|
@@ -928,6 +951,8 @@ export interface components {
|
|
|
928
951
|
events: number;
|
|
929
952
|
/** @description Prose passages staged. */
|
|
930
953
|
narratives: number;
|
|
954
|
+
/** @description Conversation messages staged. */
|
|
955
|
+
messages: number;
|
|
931
956
|
};
|
|
932
957
|
/** @description What the submission held. Absent when it was not recorded. */
|
|
933
958
|
IngestionIntake: {
|
|
@@ -955,6 +980,8 @@ export interface components {
|
|
|
955
980
|
outcome: components["schemas"]["IngestionItemOutcome"];
|
|
956
981
|
reason?: components["schemas"]["IngestionIgnoreReason"];
|
|
957
982
|
}[];
|
|
983
|
+
/** @description Present on `message` items: the session the conversation was stored under — the `sessionId` it declared, or the one generated for it. Use it to continue the session or read its memories. */
|
|
984
|
+
sessionId?: string;
|
|
958
985
|
}[];
|
|
959
986
|
/**
|
|
960
987
|
* @description structured: clinical detail was read from it. text_only: kept, but as prose — no structured detail was read. ignored: not used at all.
|
|
@@ -978,6 +1005,26 @@ export interface components {
|
|
|
978
1005
|
} & {
|
|
979
1006
|
[key: string]: unknown;
|
|
980
1007
|
};
|
|
1008
|
+
/** @description One or more sessions to import. */
|
|
1009
|
+
IngestSessionsBody: {
|
|
1010
|
+
/** @description Sessions to import. `intake` comes back index-aligned with this list. */
|
|
1011
|
+
sessions: components["schemas"]["IngestSession"][];
|
|
1012
|
+
};
|
|
1013
|
+
IngestSession: {
|
|
1014
|
+
/** @description Id of the session these messages belong to. Omit it to open a new session under a generated id; send the same id again to continue that session. */
|
|
1015
|
+
sessionId?: string;
|
|
1016
|
+
/** @description The messages, in chronological order. */
|
|
1017
|
+
messages: components["schemas"]["IngestSessionsMessage"][];
|
|
1018
|
+
};
|
|
1019
|
+
IngestSessionsMessage: {
|
|
1020
|
+
/**
|
|
1021
|
+
* @description Author of the message.
|
|
1022
|
+
* @enum {string}
|
|
1023
|
+
*/
|
|
1024
|
+
role: "user" | "assistant";
|
|
1025
|
+
/** @description Message text. */
|
|
1026
|
+
content: string;
|
|
1027
|
+
};
|
|
981
1028
|
/** @description A page of submissions for this patient. */
|
|
982
1029
|
IngestionList: {
|
|
983
1030
|
/** @description The requested page of items. */
|
|
@@ -1044,19 +1091,6 @@ export interface components {
|
|
|
1044
1091
|
/** @description ISO 8601 timestamp when this memory was recorded. */
|
|
1045
1092
|
createdAt: string;
|
|
1046
1093
|
};
|
|
1047
|
-
/** @description A complete set of messages to ingest as a single closed session. */
|
|
1048
|
-
IngestSessionBody: {
|
|
1049
|
-
/** @description Every message to replay, in chronological order. */
|
|
1050
|
-
messages: {
|
|
1051
|
-
/**
|
|
1052
|
-
* @description Author of the message.
|
|
1053
|
-
* @enum {string}
|
|
1054
|
-
*/
|
|
1055
|
-
role: "user" | "assistant";
|
|
1056
|
-
/** @description Message text. */
|
|
1057
|
-
content: string;
|
|
1058
|
-
}[];
|
|
1059
|
-
};
|
|
1060
1094
|
/** @description Result of a VFS browse operation. Contains directory children when the path resolves to a directory, or file content metadata when it resolves to a file. */
|
|
1061
1095
|
BrowseResult: {
|
|
1062
1096
|
/** @description VFS path of the browsed node, relative to the patient root. */
|
|
@@ -1070,6 +1104,8 @@ export interface components {
|
|
|
1070
1104
|
children?: {
|
|
1071
1105
|
/** @description Name of the child node (filename or directory name). */
|
|
1072
1106
|
name: string;
|
|
1107
|
+
/** @description Human-readable label for the child. Shown beside `name`, never used in a path. */
|
|
1108
|
+
display?: string;
|
|
1073
1109
|
/**
|
|
1074
1110
|
* @description Whether this child is a directory or a file.
|
|
1075
1111
|
* @enum {string}
|
|
@@ -1095,7 +1131,7 @@ export interface components {
|
|
|
1095
1131
|
* @enum {string}
|
|
1096
1132
|
*/
|
|
1097
1133
|
type: "extracted_fact";
|
|
1098
|
-
/** @description Unique identifier for this node,
|
|
1134
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
1099
1135
|
id: string;
|
|
1100
1136
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
1101
1137
|
createdAt: string;
|
|
@@ -1111,24 +1147,26 @@ export interface components {
|
|
|
1111
1147
|
code: string;
|
|
1112
1148
|
display?: string;
|
|
1113
1149
|
}[];
|
|
1114
|
-
/** @description ISO date when
|
|
1115
|
-
|
|
1116
|
-
/** @
|
|
1150
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1151
|
+
authoredAt?: string;
|
|
1152
|
+
/** @enum {string} */
|
|
1153
|
+
type: "condition";
|
|
1154
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1117
1155
|
effectivePeriod?: {
|
|
1118
|
-
/** @description ISO date when
|
|
1156
|
+
/** @description ISO date when it began. */
|
|
1119
1157
|
start?: string;
|
|
1120
|
-
/** @description ISO date when
|
|
1158
|
+
/** @description ISO date when it ended. */
|
|
1121
1159
|
end?: string;
|
|
1122
1160
|
};
|
|
1123
|
-
/** @enum {string} */
|
|
1124
|
-
type: "condition";
|
|
1125
1161
|
/**
|
|
1126
1162
|
* @description Clinical status of the condition. active = currently present; resolved = no longer present; inactive = present but not actively managed.
|
|
1127
1163
|
* @enum {string}
|
|
1128
1164
|
*/
|
|
1129
1165
|
status: "active" | "resolved" | "inactive" | "unknown";
|
|
1130
|
-
/** @description ISO date when
|
|
1131
|
-
|
|
1166
|
+
/** @description ISO date when a clinician stated it held. Shows it held then, not when it started. */
|
|
1167
|
+
assertedAt?: string;
|
|
1168
|
+
/** @description ISO date when its status last changed. */
|
|
1169
|
+
statusChangedAt?: string;
|
|
1132
1170
|
/** @description Where this fact was extracted from. */
|
|
1133
1171
|
source: {
|
|
1134
1172
|
/**
|
|
@@ -1156,15 +1194,8 @@ export interface components {
|
|
|
1156
1194
|
code: string;
|
|
1157
1195
|
display?: string;
|
|
1158
1196
|
}[];
|
|
1159
|
-
/** @description ISO date when
|
|
1160
|
-
|
|
1161
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1162
|
-
effectivePeriod?: {
|
|
1163
|
-
/** @description ISO date when this fact became active. */
|
|
1164
|
-
start?: string;
|
|
1165
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1166
|
-
end?: string;
|
|
1167
|
-
};
|
|
1197
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1198
|
+
authoredAt?: string;
|
|
1168
1199
|
/** @enum {string} */
|
|
1169
1200
|
type: "medication";
|
|
1170
1201
|
/**
|
|
@@ -1176,6 +1207,32 @@ export interface components {
|
|
|
1176
1207
|
dosageInstructions?: string;
|
|
1177
1208
|
/** @description Route of administration from dosage[].route, e.g. 'Oral', 'IV', 'Topical'. */
|
|
1178
1209
|
route?: string;
|
|
1210
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1211
|
+
effectivePeriod?: {
|
|
1212
|
+
/** @description ISO date when it began. */
|
|
1213
|
+
start?: string;
|
|
1214
|
+
/** @description ISO date when it ended. */
|
|
1215
|
+
end?: string;
|
|
1216
|
+
};
|
|
1217
|
+
/** @description ISO date when the pharmacy prepared the dispense. */
|
|
1218
|
+
preparedAt?: string;
|
|
1219
|
+
/** @description ISO date when the pharmacy handed the drug over, which shows the patient actually received it. */
|
|
1220
|
+
handedOverAt?: string;
|
|
1221
|
+
/** @description ISO date when the drug or procedure was ordered. */
|
|
1222
|
+
orderedAt?: string;
|
|
1223
|
+
/** @description When it is intended to happen, as opposed to when it did: a scheduled encounter or procedure, the intended dosing or therapy span. */
|
|
1224
|
+
plannedPeriod?: {
|
|
1225
|
+
/** @description ISO date when it began. */
|
|
1226
|
+
start?: string;
|
|
1227
|
+
/** @description ISO date when it ended. */
|
|
1228
|
+
end?: string;
|
|
1229
|
+
};
|
|
1230
|
+
/** @description ISO date until which the order may be filled. */
|
|
1231
|
+
orderValidUntil?: string;
|
|
1232
|
+
/** @description ISO date when a clinician stated it held. Shows it held then, not when it started. */
|
|
1233
|
+
assertedAt?: string;
|
|
1234
|
+
identity?: components["schemas"]["MedicationIdentity"];
|
|
1235
|
+
identityEvidence?: components["schemas"]["MedicationIdentityEvidence"];
|
|
1179
1236
|
/** @description Where this fact was extracted from. */
|
|
1180
1237
|
source: {
|
|
1181
1238
|
/**
|
|
@@ -1203,15 +1260,8 @@ export interface components {
|
|
|
1203
1260
|
code: string;
|
|
1204
1261
|
display?: string;
|
|
1205
1262
|
}[];
|
|
1206
|
-
/** @description ISO date when
|
|
1207
|
-
|
|
1208
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1209
|
-
effectivePeriod?: {
|
|
1210
|
-
/** @description ISO date when this fact became active. */
|
|
1211
|
-
start?: string;
|
|
1212
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1213
|
-
end?: string;
|
|
1214
|
-
};
|
|
1263
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1264
|
+
authoredAt?: string;
|
|
1215
1265
|
/** @enum {string} */
|
|
1216
1266
|
type: "allergy";
|
|
1217
1267
|
/**
|
|
@@ -1228,6 +1278,22 @@ export interface components {
|
|
|
1228
1278
|
category?: string[];
|
|
1229
1279
|
/** @description Observed reaction manifestations as display strings from reaction[].manifestation, e.g. ['Swelling', 'Anaphylaxis']. */
|
|
1230
1280
|
reactions?: string[];
|
|
1281
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1282
|
+
effectivePeriod?: {
|
|
1283
|
+
/** @description ISO date when it began. */
|
|
1284
|
+
start?: string;
|
|
1285
|
+
/** @description ISO date when it ended. */
|
|
1286
|
+
end?: string;
|
|
1287
|
+
};
|
|
1288
|
+
/** @description When each recorded reaction to the substance or vaccine started and ended. */
|
|
1289
|
+
reactionPeriods?: {
|
|
1290
|
+
/** @description ISO date when it began. */
|
|
1291
|
+
start?: string;
|
|
1292
|
+
/** @description ISO date when it ended. */
|
|
1293
|
+
end?: string;
|
|
1294
|
+
}[];
|
|
1295
|
+
/** @description ISO date of the most recent known reaction to the substance. */
|
|
1296
|
+
lastReactionAt?: string;
|
|
1231
1297
|
/** @description Where this fact was extracted from. */
|
|
1232
1298
|
source: {
|
|
1233
1299
|
/**
|
|
@@ -1255,15 +1321,8 @@ export interface components {
|
|
|
1255
1321
|
code: string;
|
|
1256
1322
|
display?: string;
|
|
1257
1323
|
}[];
|
|
1258
|
-
/** @description ISO date when
|
|
1259
|
-
|
|
1260
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1261
|
-
effectivePeriod?: {
|
|
1262
|
-
/** @description ISO date when this fact became active. */
|
|
1263
|
-
start?: string;
|
|
1264
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1265
|
-
end?: string;
|
|
1266
|
-
};
|
|
1324
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1325
|
+
authoredAt?: string;
|
|
1267
1326
|
/** @enum {string} */
|
|
1268
1327
|
type: "family_history";
|
|
1269
1328
|
/** @description Relationship of the relative to the patient from FamilyMemberHistory.relationship.text, e.g. 'Brother', 'Father', 'Maternal grandmother'. */
|
|
@@ -1277,7 +1336,15 @@ export interface components {
|
|
|
1277
1336
|
conditions: {
|
|
1278
1337
|
/** @description Condition name for this relative, e.g. 'Multiple sclerosis'. */
|
|
1279
1338
|
display: string;
|
|
1339
|
+
/** @description When the relative developed the condition: an ISO date, or their age in years. */
|
|
1340
|
+
onset?: string | number;
|
|
1280
1341
|
}[];
|
|
1342
|
+
/** @description ISO date when the relative was born. */
|
|
1343
|
+
birthDate?: string;
|
|
1344
|
+
/** @description When the relative died: an ISO date, or their age in years at death. */
|
|
1345
|
+
death?: string | number;
|
|
1346
|
+
/** @description The relative's age: in years, or as the source states it. */
|
|
1347
|
+
age?: string | number;
|
|
1281
1348
|
/** @description Where this fact was extracted from. */
|
|
1282
1349
|
source: {
|
|
1283
1350
|
/**
|
|
@@ -1305,21 +1372,25 @@ export interface components {
|
|
|
1305
1372
|
code: string;
|
|
1306
1373
|
display?: string;
|
|
1307
1374
|
}[];
|
|
1308
|
-
/** @description ISO date when
|
|
1309
|
-
|
|
1310
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1311
|
-
effectivePeriod?: {
|
|
1312
|
-
/** @description ISO date when this fact became active. */
|
|
1313
|
-
start?: string;
|
|
1314
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1315
|
-
end?: string;
|
|
1316
|
-
};
|
|
1375
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1376
|
+
authoredAt?: string;
|
|
1317
1377
|
/** @enum {string} */
|
|
1318
1378
|
type: "social_history";
|
|
1319
1379
|
/** @description Observation topic from Observation.code.text, e.g. 'Tobacco use and exposure', 'Alcohol use'. */
|
|
1320
1380
|
category?: string;
|
|
1321
1381
|
/** @description Current state as a string from Observation.valueString or valueCodeableConcept.text, e.g. 'Smokeless tobacco non-user', 'Current every day smoker'. */
|
|
1322
1382
|
value?: string;
|
|
1383
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1384
|
+
effectivePeriod?: {
|
|
1385
|
+
/** @description ISO date when it began. */
|
|
1386
|
+
start?: string;
|
|
1387
|
+
/** @description ISO date when it ended. */
|
|
1388
|
+
end?: string;
|
|
1389
|
+
};
|
|
1390
|
+
/** @description ISO date when it happened, for something that happened at a point in time. */
|
|
1391
|
+
occurredAt?: string;
|
|
1392
|
+
/** @description ISO date when the result was released, which comes after it was measured. */
|
|
1393
|
+
issuedAt?: string;
|
|
1323
1394
|
/** @description Where this fact was extracted from. */
|
|
1324
1395
|
source: {
|
|
1325
1396
|
/**
|
|
@@ -1347,15 +1418,8 @@ export interface components {
|
|
|
1347
1418
|
code: string;
|
|
1348
1419
|
display?: string;
|
|
1349
1420
|
}[];
|
|
1350
|
-
/** @description ISO date when
|
|
1351
|
-
|
|
1352
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1353
|
-
effectivePeriod?: {
|
|
1354
|
-
/** @description ISO date when this fact became active. */
|
|
1355
|
-
start?: string;
|
|
1356
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1357
|
-
end?: string;
|
|
1358
|
-
};
|
|
1421
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1422
|
+
authoredAt?: string;
|
|
1359
1423
|
/** @enum {string} */
|
|
1360
1424
|
type: "immunization";
|
|
1361
1425
|
/**
|
|
@@ -1364,7 +1428,20 @@ export interface components {
|
|
|
1364
1428
|
*/
|
|
1365
1429
|
status: "completed" | "not-done";
|
|
1366
1430
|
/** @description ISO date when the vaccine was administered, from Immunization.occurrenceDateTime. */
|
|
1367
|
-
|
|
1431
|
+
occurredAt?: string;
|
|
1432
|
+
/** @description When each recorded reaction to the substance or vaccine started and ended. */
|
|
1433
|
+
reactionPeriods?: {
|
|
1434
|
+
/** @description ISO date when it began. */
|
|
1435
|
+
start?: string;
|
|
1436
|
+
/** @description ISO date when it ended. */
|
|
1437
|
+
end?: string;
|
|
1438
|
+
}[];
|
|
1439
|
+
/** @description ISO date when the vaccine lot or device expires. */
|
|
1440
|
+
expiresAt?: string;
|
|
1441
|
+
/** @description ISO date when the vaccine information statement was published. */
|
|
1442
|
+
infoPublishedAt?: string;
|
|
1443
|
+
/** @description ISO date when the vaccine information statement was given to the patient. */
|
|
1444
|
+
infoPresentedAt?: string;
|
|
1368
1445
|
/** @description Where this fact was extracted from. */
|
|
1369
1446
|
source: {
|
|
1370
1447
|
/**
|
|
@@ -1392,15 +1469,8 @@ export interface components {
|
|
|
1392
1469
|
code: string;
|
|
1393
1470
|
display?: string;
|
|
1394
1471
|
}[];
|
|
1395
|
-
/** @description ISO date when
|
|
1396
|
-
|
|
1397
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1398
|
-
effectivePeriod?: {
|
|
1399
|
-
/** @description ISO date when this fact became active. */
|
|
1400
|
-
start?: string;
|
|
1401
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1402
|
-
end?: string;
|
|
1403
|
-
};
|
|
1472
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1473
|
+
authoredAt?: string;
|
|
1404
1474
|
/** @enum {string} */
|
|
1405
1475
|
type: "device";
|
|
1406
1476
|
/**
|
|
@@ -1408,6 +1478,17 @@ export interface components {
|
|
|
1408
1478
|
* @enum {string}
|
|
1409
1479
|
*/
|
|
1410
1480
|
status: "active" | "inactive" | "entered-in-error" | "unknown";
|
|
1481
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1482
|
+
effectivePeriod?: {
|
|
1483
|
+
/** @description ISO date when it began. */
|
|
1484
|
+
start?: string;
|
|
1485
|
+
/** @description ISO date when it ended. */
|
|
1486
|
+
end?: string;
|
|
1487
|
+
};
|
|
1488
|
+
/** @description ISO date when the device was made. */
|
|
1489
|
+
manufacturedAt?: string;
|
|
1490
|
+
/** @description ISO date when the vaccine lot or device expires. */
|
|
1491
|
+
expiresAt?: string;
|
|
1411
1492
|
/** @description Where this fact was extracted from. */
|
|
1412
1493
|
source: {
|
|
1413
1494
|
/**
|
|
@@ -1435,19 +1516,14 @@ export interface components {
|
|
|
1435
1516
|
code: string;
|
|
1436
1517
|
display?: string;
|
|
1437
1518
|
}[];
|
|
1438
|
-
/** @description ISO date when
|
|
1439
|
-
|
|
1440
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1441
|
-
effectivePeriod?: {
|
|
1442
|
-
/** @description ISO date when this fact became active. */
|
|
1443
|
-
start?: string;
|
|
1444
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1445
|
-
end?: string;
|
|
1446
|
-
};
|
|
1519
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1520
|
+
authoredAt?: string;
|
|
1447
1521
|
/** @enum {string} */
|
|
1448
1522
|
type: "demographic";
|
|
1449
1523
|
/** @description Patient date of birth in ISO format (YYYY-MM-DD), from Patient.birthDate. */
|
|
1450
1524
|
birthDate?: string;
|
|
1525
|
+
/** @description When the patient died: an ISO date from Patient.deceasedDateTime, or their age in years at death. */
|
|
1526
|
+
death?: string | number;
|
|
1451
1527
|
/** @description Administrative sex from Patient.gender, e.g. 'male', 'female'. */
|
|
1452
1528
|
sex?: string;
|
|
1453
1529
|
/** @description Flattened address string from Patient.address, e.g. 'Laporte, CO'. Kept as a single string since HG provides it pre-formatted. */
|
|
@@ -1479,15 +1555,8 @@ export interface components {
|
|
|
1479
1555
|
code: string;
|
|
1480
1556
|
display?: string;
|
|
1481
1557
|
}[];
|
|
1482
|
-
/** @description ISO date when
|
|
1483
|
-
|
|
1484
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1485
|
-
effectivePeriod?: {
|
|
1486
|
-
/** @description ISO date when this fact became active. */
|
|
1487
|
-
start?: string;
|
|
1488
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1489
|
-
end?: string;
|
|
1490
|
-
};
|
|
1558
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1559
|
+
authoredAt?: string;
|
|
1491
1560
|
/** @enum {string} */
|
|
1492
1561
|
type: "insurance";
|
|
1493
1562
|
/**
|
|
@@ -1499,6 +1568,13 @@ export interface components {
|
|
|
1499
1568
|
planName?: string;
|
|
1500
1569
|
/** @description Member identifier from Coverage.identifier[].value. */
|
|
1501
1570
|
memberId?: string;
|
|
1571
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1572
|
+
effectivePeriod?: {
|
|
1573
|
+
/** @description ISO date when it began. */
|
|
1574
|
+
start?: string;
|
|
1575
|
+
/** @description ISO date when it ended. */
|
|
1576
|
+
end?: string;
|
|
1577
|
+
};
|
|
1502
1578
|
/** @description Where this fact was extracted from. */
|
|
1503
1579
|
source: {
|
|
1504
1580
|
/**
|
|
@@ -1526,15 +1602,8 @@ export interface components {
|
|
|
1526
1602
|
code: string;
|
|
1527
1603
|
display?: string;
|
|
1528
1604
|
}[];
|
|
1529
|
-
/** @description ISO date when
|
|
1530
|
-
|
|
1531
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1532
|
-
effectivePeriod?: {
|
|
1533
|
-
/** @description ISO date when this fact became active. */
|
|
1534
|
-
start?: string;
|
|
1535
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1536
|
-
end?: string;
|
|
1537
|
-
};
|
|
1605
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1606
|
+
authoredAt?: string;
|
|
1538
1607
|
/** @enum {string} */
|
|
1539
1608
|
type: "directive";
|
|
1540
1609
|
/**
|
|
@@ -1544,6 +1613,17 @@ export interface components {
|
|
|
1544
1613
|
status: "active" | "void" | "entered-in-error";
|
|
1545
1614
|
/** @description Directive content extracted from the source document (e.g. living will, POLST). HG delivers these as PDFs rather than structured Consent resources. */
|
|
1546
1615
|
notes?: string;
|
|
1616
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1617
|
+
effectivePeriod?: {
|
|
1618
|
+
/** @description ISO date when it began. */
|
|
1619
|
+
start?: string;
|
|
1620
|
+
/** @description ISO date when it ended. */
|
|
1621
|
+
end?: string;
|
|
1622
|
+
};
|
|
1623
|
+
/** @description ISO date when the patient agreed to or signed it. */
|
|
1624
|
+
signedAt?: string;
|
|
1625
|
+
/** @description ISO date when someone last confirmed it is still valid. */
|
|
1626
|
+
verifiedAt?: string;
|
|
1547
1627
|
/** @description Where this fact was extracted from. */
|
|
1548
1628
|
source: {
|
|
1549
1629
|
/**
|
|
@@ -1564,6 +1644,189 @@ export interface components {
|
|
|
1564
1644
|
ingestionId: string;
|
|
1565
1645
|
};
|
|
1566
1646
|
};
|
|
1647
|
+
/** @description What identifies a medication: its ingredients, its route, and for `other` the product's dose forms. Depending on how it was ingested, a medication record carries its own, and a fact the one its members share. Such a fact is returned as its identity, codes, status and effective period, and leaves its dose, route text and dates on its members. Its `display` then reads as its identity, and it carries none when no identity was found. */
|
|
1648
|
+
MedicationIdentity: {
|
|
1649
|
+
/** @description Each RxNorm ingredient, at its precise grain when it is given as a salt or ester, sorted by code. */
|
|
1650
|
+
ingredients: {
|
|
1651
|
+
system: string;
|
|
1652
|
+
code: string;
|
|
1653
|
+
display?: string;
|
|
1654
|
+
}[];
|
|
1655
|
+
route?: components["schemas"]["MedicationRoute"];
|
|
1656
|
+
/** @description The product's RxNorm dose forms, sorted by code. Only for `other`, and absent when unknown. */
|
|
1657
|
+
doseForms?: {
|
|
1658
|
+
system: string;
|
|
1659
|
+
code: string;
|
|
1660
|
+
display?: string;
|
|
1661
|
+
}[];
|
|
1662
|
+
};
|
|
1663
|
+
/**
|
|
1664
|
+
* @description A route group, or `other` for a route outside every group. Absent from an identity when the route is unknown.
|
|
1665
|
+
* @enum {string}
|
|
1666
|
+
*/
|
|
1667
|
+
MedicationRoute: "oral" | "rectal" | "sublingual" | "buccal" | "nasogastric" | "intramuscular" | "intravenous" | "subcutaneous" | "intradermal" | "intrathecal" | "intraperitoneal" | "intra-articular" | "intraosseous" | "hemodialysis" | "urethral" | "intrauterine" | "intraocular" | "intravesical" | "topical" | "transdermal" | "ophthalmic" | "otic" | "nasal" | "vaginal" | "inhalation" | "nebulization" | "other";
|
|
1668
|
+
/** @description How each part of a medication record's identity was decided. `ingredients` and `doseForms` are absent when no lookup was stored for them. Depending on how it was ingested, a medication record carries it. */
|
|
1669
|
+
MedicationIdentityEvidence: {
|
|
1670
|
+
ingredients?: components["schemas"]["MedicationConceptEvidence"];
|
|
1671
|
+
doseForms?: components["schemas"]["MedicationConceptEvidence"];
|
|
1672
|
+
/** @description Every step's decision about the route, in the order the steps ran. */
|
|
1673
|
+
route: components["schemas"]["MedicationRouteEvidence"][];
|
|
1674
|
+
};
|
|
1675
|
+
/** @description How the vocabulary grounded a medication record's ingredients or its dose form: every candidate it found, or why it found none. */
|
|
1676
|
+
MedicationConceptEvidence: {
|
|
1677
|
+
/** @enum {string} */
|
|
1678
|
+
status: "grounded";
|
|
1679
|
+
/** @description Every candidate found, best first. The first one gives the identity. */
|
|
1680
|
+
candidates: {
|
|
1681
|
+
/**
|
|
1682
|
+
* @description The lookup step: `code`, `crosswalk`, `exact-name` or `normalized-name`, in the order they run.
|
|
1683
|
+
* @enum {string}
|
|
1684
|
+
*/
|
|
1685
|
+
method: "code" | "crosswalk" | "exact-name" | "normalized-name";
|
|
1686
|
+
/** @description How closely the candidate matched, from 0 to 1. */
|
|
1687
|
+
score: number;
|
|
1688
|
+
/** @description The concepts it names. A combination product names several. */
|
|
1689
|
+
members: {
|
|
1690
|
+
/** @description The concept, as an RxNorm coding. */
|
|
1691
|
+
concept: {
|
|
1692
|
+
system: string;
|
|
1693
|
+
code: string;
|
|
1694
|
+
display?: string;
|
|
1695
|
+
};
|
|
1696
|
+
/** @description Its precise forms, such as an ingredient's salts or esters. Empty when the vocabulary names none. */
|
|
1697
|
+
precise: {
|
|
1698
|
+
system: string;
|
|
1699
|
+
code: string;
|
|
1700
|
+
display?: string;
|
|
1701
|
+
}[];
|
|
1702
|
+
}[];
|
|
1703
|
+
}[];
|
|
1704
|
+
} | {
|
|
1705
|
+
/** @enum {string} */
|
|
1706
|
+
status: "abstained";
|
|
1707
|
+
/**
|
|
1708
|
+
* @description Why no candidate was found: every step that ran gave up (`cascade-exhausted`), the record carries nothing to look up (`nothing-to-resolve`), or the vocabulary is not set up for it.
|
|
1709
|
+
* @enum {string}
|
|
1710
|
+
*/
|
|
1711
|
+
reason: "cascade-exhausted" | "nothing-to-resolve" | "unsupported-domain" | "unserved-target-system";
|
|
1712
|
+
/** @description How each step that ran gave up, in the order they ran. Empty unless `reason` is `cascade-exhausted`. */
|
|
1713
|
+
attempts: ({
|
|
1714
|
+
/**
|
|
1715
|
+
* @description The lookup step: `code`, `crosswalk`, `exact-name` or `normalized-name`, in the order they run.
|
|
1716
|
+
* @enum {string}
|
|
1717
|
+
*/
|
|
1718
|
+
method: "code" | "crosswalk" | "exact-name" | "normalized-name";
|
|
1719
|
+
/**
|
|
1720
|
+
* @description Why the step gave up on these codes: a system it does not recognize, a system it does not serve, a code it does not hold, a code with no RxNorm equivalent, or a concept with no ingredient or dose form.
|
|
1721
|
+
* @enum {string}
|
|
1722
|
+
*/
|
|
1723
|
+
reason: "unrecognized-system" | "unserved-system" | "unknown-code" | "no-crosswalk-equivalent" | "no-roll-up";
|
|
1724
|
+
/** @description The codes the step looked up, each system as the record spelled it or as its URI. */
|
|
1725
|
+
codes: {
|
|
1726
|
+
system: string;
|
|
1727
|
+
code: string;
|
|
1728
|
+
}[];
|
|
1729
|
+
} | {
|
|
1730
|
+
/**
|
|
1731
|
+
* @description The lookup step: `code`, `crosswalk`, `exact-name` or `normalized-name`, in the order they run.
|
|
1732
|
+
* @enum {string}
|
|
1733
|
+
*/
|
|
1734
|
+
method: "code" | "crosswalk" | "exact-name" | "normalized-name";
|
|
1735
|
+
/** @enum {string} */
|
|
1736
|
+
reason: "no-name-match";
|
|
1737
|
+
/** @description The names the step looked up. */
|
|
1738
|
+
names: string[];
|
|
1739
|
+
} | {
|
|
1740
|
+
/**
|
|
1741
|
+
* @description The lookup step: `code`, `crosswalk`, `exact-name` or `normalized-name`, in the order they run.
|
|
1742
|
+
* @enum {string}
|
|
1743
|
+
*/
|
|
1744
|
+
method: "code" | "crosswalk" | "exact-name" | "normalized-name";
|
|
1745
|
+
/** @enum {string} */
|
|
1746
|
+
reason: "ambiguous-name";
|
|
1747
|
+
/** @description The names the step looked up. */
|
|
1748
|
+
names: string[];
|
|
1749
|
+
/** @description Each set of concepts the close names lead to, best match first. */
|
|
1750
|
+
sets: {
|
|
1751
|
+
/** @description The concept, as an RxNorm coding. */
|
|
1752
|
+
concept: {
|
|
1753
|
+
system: string;
|
|
1754
|
+
code: string;
|
|
1755
|
+
display?: string;
|
|
1756
|
+
};
|
|
1757
|
+
/** @description Its precise forms, such as an ingredient's salts or esters. Empty when the vocabulary names none. */
|
|
1758
|
+
precise: {
|
|
1759
|
+
system: string;
|
|
1760
|
+
code: string;
|
|
1761
|
+
display?: string;
|
|
1762
|
+
}[];
|
|
1763
|
+
}[][];
|
|
1764
|
+
})[];
|
|
1765
|
+
};
|
|
1766
|
+
/** @description One step's decision about a medication record's route: the route it named and how. `code-match` reads the product's dose form, `phrase-match` the record's texts, `evaluation` and `judgement` ask a model. A model's decision below its confidence threshold, or one the model is not sure of, stays as evidence without giving the route. */
|
|
1767
|
+
MedicationRouteEvidence: {
|
|
1768
|
+
route: components["schemas"]["MedicationRoute"];
|
|
1769
|
+
/** @enum {string} */
|
|
1770
|
+
method: "code-match";
|
|
1771
|
+
/** @description The RxNorm dose forms that named the route. */
|
|
1772
|
+
evidence: {
|
|
1773
|
+
system: string;
|
|
1774
|
+
code: string;
|
|
1775
|
+
display?: string;
|
|
1776
|
+
}[];
|
|
1777
|
+
} | {
|
|
1778
|
+
route: components["schemas"]["MedicationRoute"];
|
|
1779
|
+
/** @enum {string} */
|
|
1780
|
+
method: "phrase-match";
|
|
1781
|
+
/** @description The texts that named the route, each with the phrase that matched. */
|
|
1782
|
+
evidence: {
|
|
1783
|
+
/** @description The text the phrase was found in, as read from the record. */
|
|
1784
|
+
text: string;
|
|
1785
|
+
/** @description The route phrase that matched, in lower-case words. */
|
|
1786
|
+
phrase: string;
|
|
1787
|
+
}[];
|
|
1788
|
+
} | {
|
|
1789
|
+
route: components["schemas"]["MedicationRoute"];
|
|
1790
|
+
/** @enum {string} */
|
|
1791
|
+
method: "evaluation";
|
|
1792
|
+
/** @description The probability the model gave this route, from 0 to 1. */
|
|
1793
|
+
confidence: number;
|
|
1794
|
+
model: {
|
|
1795
|
+
/** @description Model provider identifier. */
|
|
1796
|
+
provider: string;
|
|
1797
|
+
/** @description Exact provider model identifier. */
|
|
1798
|
+
model: string;
|
|
1799
|
+
/** @description Provider model version when it is distinct from the model identifier. */
|
|
1800
|
+
version?: string;
|
|
1801
|
+
};
|
|
1802
|
+
/** @description The texts and codings the model read. */
|
|
1803
|
+
evidence: (string | {
|
|
1804
|
+
system: string;
|
|
1805
|
+
code: string;
|
|
1806
|
+
display?: string;
|
|
1807
|
+
})[];
|
|
1808
|
+
} | {
|
|
1809
|
+
route: components["schemas"]["MedicationRoute"];
|
|
1810
|
+
/** @enum {string} */
|
|
1811
|
+
method: "judgement";
|
|
1812
|
+
/**
|
|
1813
|
+
* @description How sure the model said it was. Only a `certain` judgement gives the route.
|
|
1814
|
+
* @enum {string}
|
|
1815
|
+
*/
|
|
1816
|
+
certainty: "certain" | "likely" | "unsure";
|
|
1817
|
+
model: {
|
|
1818
|
+
/** @description Model provider identifier. */
|
|
1819
|
+
provider: string;
|
|
1820
|
+
/** @description Exact provider model identifier. */
|
|
1821
|
+
model: string;
|
|
1822
|
+
/** @description Provider model version when it is distinct from the model identifier. */
|
|
1823
|
+
version?: string;
|
|
1824
|
+
};
|
|
1825
|
+
/** @description The words of the record the model quoted. */
|
|
1826
|
+
evidence: string[];
|
|
1827
|
+
/** @description Why the model named this route. */
|
|
1828
|
+
reasoning: string;
|
|
1829
|
+
};
|
|
1567
1830
|
/** @description A `fact` node in the patient context graph. */
|
|
1568
1831
|
FactNode: {
|
|
1569
1832
|
/**
|
|
@@ -1571,7 +1834,7 @@ export interface components {
|
|
|
1571
1834
|
* @enum {string}
|
|
1572
1835
|
*/
|
|
1573
1836
|
type: "fact";
|
|
1574
|
-
/** @description Unique identifier for this node,
|
|
1837
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
1575
1838
|
id: string;
|
|
1576
1839
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
1577
1840
|
createdAt: string;
|
|
@@ -1587,24 +1850,26 @@ export interface components {
|
|
|
1587
1850
|
code: string;
|
|
1588
1851
|
display?: string;
|
|
1589
1852
|
}[];
|
|
1590
|
-
/** @description ISO date when
|
|
1591
|
-
|
|
1592
|
-
/** @
|
|
1853
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1854
|
+
authoredAt?: string;
|
|
1855
|
+
/** @enum {string} */
|
|
1856
|
+
type: "condition";
|
|
1857
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1593
1858
|
effectivePeriod?: {
|
|
1594
|
-
/** @description ISO date when
|
|
1859
|
+
/** @description ISO date when it began. */
|
|
1595
1860
|
start?: string;
|
|
1596
|
-
/** @description ISO date when
|
|
1861
|
+
/** @description ISO date when it ended. */
|
|
1597
1862
|
end?: string;
|
|
1598
1863
|
};
|
|
1599
|
-
/** @enum {string} */
|
|
1600
|
-
type: "condition";
|
|
1601
1864
|
/**
|
|
1602
1865
|
* @description Clinical status of the condition. active = currently present; resolved = no longer present; inactive = present but not actively managed.
|
|
1603
1866
|
* @enum {string}
|
|
1604
1867
|
*/
|
|
1605
1868
|
status: "active" | "resolved" | "inactive" | "unknown";
|
|
1606
|
-
/** @description ISO date when
|
|
1607
|
-
|
|
1869
|
+
/** @description ISO date when a clinician stated it held. Shows it held then, not when it started. */
|
|
1870
|
+
assertedAt?: string;
|
|
1871
|
+
/** @description ISO date when its status last changed. */
|
|
1872
|
+
statusChangedAt?: string;
|
|
1608
1873
|
/** @description Every extracted fact this fact was projected from. */
|
|
1609
1874
|
members: {
|
|
1610
1875
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1620,15 +1885,8 @@ export interface components {
|
|
|
1620
1885
|
code: string;
|
|
1621
1886
|
display?: string;
|
|
1622
1887
|
}[];
|
|
1623
|
-
/** @description ISO date when
|
|
1624
|
-
|
|
1625
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1626
|
-
effectivePeriod?: {
|
|
1627
|
-
/** @description ISO date when this fact became active. */
|
|
1628
|
-
start?: string;
|
|
1629
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1630
|
-
end?: string;
|
|
1631
|
-
};
|
|
1888
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1889
|
+
authoredAt?: string;
|
|
1632
1890
|
/** @enum {string} */
|
|
1633
1891
|
type: "medication";
|
|
1634
1892
|
/**
|
|
@@ -1640,6 +1898,31 @@ export interface components {
|
|
|
1640
1898
|
dosageInstructions?: string;
|
|
1641
1899
|
/** @description Route of administration from dosage[].route, e.g. 'Oral', 'IV', 'Topical'. */
|
|
1642
1900
|
route?: string;
|
|
1901
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1902
|
+
effectivePeriod?: {
|
|
1903
|
+
/** @description ISO date when it began. */
|
|
1904
|
+
start?: string;
|
|
1905
|
+
/** @description ISO date when it ended. */
|
|
1906
|
+
end?: string;
|
|
1907
|
+
};
|
|
1908
|
+
/** @description ISO date when the pharmacy prepared the dispense. */
|
|
1909
|
+
preparedAt?: string;
|
|
1910
|
+
/** @description ISO date when the pharmacy handed the drug over, which shows the patient actually received it. */
|
|
1911
|
+
handedOverAt?: string;
|
|
1912
|
+
/** @description ISO date when the drug or procedure was ordered. */
|
|
1913
|
+
orderedAt?: string;
|
|
1914
|
+
/** @description When it is intended to happen, as opposed to when it did: a scheduled encounter or procedure, the intended dosing or therapy span. */
|
|
1915
|
+
plannedPeriod?: {
|
|
1916
|
+
/** @description ISO date when it began. */
|
|
1917
|
+
start?: string;
|
|
1918
|
+
/** @description ISO date when it ended. */
|
|
1919
|
+
end?: string;
|
|
1920
|
+
};
|
|
1921
|
+
/** @description ISO date until which the order may be filled. */
|
|
1922
|
+
orderValidUntil?: string;
|
|
1923
|
+
/** @description ISO date when a clinician stated it held. Shows it held then, not when it started. */
|
|
1924
|
+
assertedAt?: string;
|
|
1925
|
+
identity?: components["schemas"]["MedicationIdentity"];
|
|
1643
1926
|
/** @description Every extracted fact this fact was projected from. */
|
|
1644
1927
|
members: {
|
|
1645
1928
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1655,15 +1938,8 @@ export interface components {
|
|
|
1655
1938
|
code: string;
|
|
1656
1939
|
display?: string;
|
|
1657
1940
|
}[];
|
|
1658
|
-
/** @description ISO date when
|
|
1659
|
-
|
|
1660
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1661
|
-
effectivePeriod?: {
|
|
1662
|
-
/** @description ISO date when this fact became active. */
|
|
1663
|
-
start?: string;
|
|
1664
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1665
|
-
end?: string;
|
|
1666
|
-
};
|
|
1941
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1942
|
+
authoredAt?: string;
|
|
1667
1943
|
/** @enum {string} */
|
|
1668
1944
|
type: "allergy";
|
|
1669
1945
|
/**
|
|
@@ -1680,6 +1956,22 @@ export interface components {
|
|
|
1680
1956
|
category?: string[];
|
|
1681
1957
|
/** @description Observed reaction manifestations as display strings from reaction[].manifestation, e.g. ['Swelling', 'Anaphylaxis']. */
|
|
1682
1958
|
reactions?: string[];
|
|
1959
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
1960
|
+
effectivePeriod?: {
|
|
1961
|
+
/** @description ISO date when it began. */
|
|
1962
|
+
start?: string;
|
|
1963
|
+
/** @description ISO date when it ended. */
|
|
1964
|
+
end?: string;
|
|
1965
|
+
};
|
|
1966
|
+
/** @description When each recorded reaction to the substance or vaccine started and ended. */
|
|
1967
|
+
reactionPeriods?: {
|
|
1968
|
+
/** @description ISO date when it began. */
|
|
1969
|
+
start?: string;
|
|
1970
|
+
/** @description ISO date when it ended. */
|
|
1971
|
+
end?: string;
|
|
1972
|
+
}[];
|
|
1973
|
+
/** @description ISO date of the most recent known reaction to the substance. */
|
|
1974
|
+
lastReactionAt?: string;
|
|
1683
1975
|
/** @description Every extracted fact this fact was projected from. */
|
|
1684
1976
|
members: {
|
|
1685
1977
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1695,15 +1987,8 @@ export interface components {
|
|
|
1695
1987
|
code: string;
|
|
1696
1988
|
display?: string;
|
|
1697
1989
|
}[];
|
|
1698
|
-
/** @description ISO date when
|
|
1699
|
-
|
|
1700
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1701
|
-
effectivePeriod?: {
|
|
1702
|
-
/** @description ISO date when this fact became active. */
|
|
1703
|
-
start?: string;
|
|
1704
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1705
|
-
end?: string;
|
|
1706
|
-
};
|
|
1990
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
1991
|
+
authoredAt?: string;
|
|
1707
1992
|
/** @enum {string} */
|
|
1708
1993
|
type: "family_history";
|
|
1709
1994
|
/** @description Relationship of the relative to the patient from FamilyMemberHistory.relationship.text, e.g. 'Brother', 'Father', 'Maternal grandmother'. */
|
|
@@ -1717,7 +2002,15 @@ export interface components {
|
|
|
1717
2002
|
conditions: {
|
|
1718
2003
|
/** @description Condition name for this relative, e.g. 'Multiple sclerosis'. */
|
|
1719
2004
|
display: string;
|
|
2005
|
+
/** @description When the relative developed the condition: an ISO date, or their age in years. */
|
|
2006
|
+
onset?: string | number;
|
|
1720
2007
|
}[];
|
|
2008
|
+
/** @description ISO date when the relative was born. */
|
|
2009
|
+
birthDate?: string;
|
|
2010
|
+
/** @description When the relative died: an ISO date, or their age in years at death. */
|
|
2011
|
+
death?: string | number;
|
|
2012
|
+
/** @description The relative's age: in years, or as the source states it. */
|
|
2013
|
+
age?: string | number;
|
|
1721
2014
|
/** @description Every extracted fact this fact was projected from. */
|
|
1722
2015
|
members: {
|
|
1723
2016
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1733,21 +2026,25 @@ export interface components {
|
|
|
1733
2026
|
code: string;
|
|
1734
2027
|
display?: string;
|
|
1735
2028
|
}[];
|
|
1736
|
-
/** @description ISO date when
|
|
1737
|
-
|
|
1738
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1739
|
-
effectivePeriod?: {
|
|
1740
|
-
/** @description ISO date when this fact became active. */
|
|
1741
|
-
start?: string;
|
|
1742
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1743
|
-
end?: string;
|
|
1744
|
-
};
|
|
2029
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2030
|
+
authoredAt?: string;
|
|
1745
2031
|
/** @enum {string} */
|
|
1746
2032
|
type: "social_history";
|
|
1747
2033
|
/** @description Observation topic from Observation.code.text, e.g. 'Tobacco use and exposure', 'Alcohol use'. */
|
|
1748
2034
|
category?: string;
|
|
1749
2035
|
/** @description Current state as a string from Observation.valueString or valueCodeableConcept.text, e.g. 'Smokeless tobacco non-user', 'Current every day smoker'. */
|
|
1750
2036
|
value?: string;
|
|
2037
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
2038
|
+
effectivePeriod?: {
|
|
2039
|
+
/** @description ISO date when it began. */
|
|
2040
|
+
start?: string;
|
|
2041
|
+
/** @description ISO date when it ended. */
|
|
2042
|
+
end?: string;
|
|
2043
|
+
};
|
|
2044
|
+
/** @description ISO date when it happened, for something that happened at a point in time. */
|
|
2045
|
+
occurredAt?: string;
|
|
2046
|
+
/** @description ISO date when the result was released, which comes after it was measured. */
|
|
2047
|
+
issuedAt?: string;
|
|
1751
2048
|
/** @description Every extracted fact this fact was projected from. */
|
|
1752
2049
|
members: {
|
|
1753
2050
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1763,15 +2060,8 @@ export interface components {
|
|
|
1763
2060
|
code: string;
|
|
1764
2061
|
display?: string;
|
|
1765
2062
|
}[];
|
|
1766
|
-
/** @description ISO date when
|
|
1767
|
-
|
|
1768
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1769
|
-
effectivePeriod?: {
|
|
1770
|
-
/** @description ISO date when this fact became active. */
|
|
1771
|
-
start?: string;
|
|
1772
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1773
|
-
end?: string;
|
|
1774
|
-
};
|
|
2063
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2064
|
+
authoredAt?: string;
|
|
1775
2065
|
/** @enum {string} */
|
|
1776
2066
|
type: "immunization";
|
|
1777
2067
|
/**
|
|
@@ -1780,7 +2070,20 @@ export interface components {
|
|
|
1780
2070
|
*/
|
|
1781
2071
|
status: "completed" | "not-done";
|
|
1782
2072
|
/** @description ISO date when the vaccine was administered, from Immunization.occurrenceDateTime. */
|
|
1783
|
-
|
|
2073
|
+
occurredAt?: string;
|
|
2074
|
+
/** @description When each recorded reaction to the substance or vaccine started and ended. */
|
|
2075
|
+
reactionPeriods?: {
|
|
2076
|
+
/** @description ISO date when it began. */
|
|
2077
|
+
start?: string;
|
|
2078
|
+
/** @description ISO date when it ended. */
|
|
2079
|
+
end?: string;
|
|
2080
|
+
}[];
|
|
2081
|
+
/** @description ISO date when the vaccine lot or device expires. */
|
|
2082
|
+
expiresAt?: string;
|
|
2083
|
+
/** @description ISO date when the vaccine information statement was published. */
|
|
2084
|
+
infoPublishedAt?: string;
|
|
2085
|
+
/** @description ISO date when the vaccine information statement was given to the patient. */
|
|
2086
|
+
infoPresentedAt?: string;
|
|
1784
2087
|
/** @description Every extracted fact this fact was projected from. */
|
|
1785
2088
|
members: {
|
|
1786
2089
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1796,15 +2099,8 @@ export interface components {
|
|
|
1796
2099
|
code: string;
|
|
1797
2100
|
display?: string;
|
|
1798
2101
|
}[];
|
|
1799
|
-
/** @description ISO date when
|
|
1800
|
-
|
|
1801
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1802
|
-
effectivePeriod?: {
|
|
1803
|
-
/** @description ISO date when this fact became active. */
|
|
1804
|
-
start?: string;
|
|
1805
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1806
|
-
end?: string;
|
|
1807
|
-
};
|
|
2102
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2103
|
+
authoredAt?: string;
|
|
1808
2104
|
/** @enum {string} */
|
|
1809
2105
|
type: "device";
|
|
1810
2106
|
/**
|
|
@@ -1812,6 +2108,17 @@ export interface components {
|
|
|
1812
2108
|
* @enum {string}
|
|
1813
2109
|
*/
|
|
1814
2110
|
status: "active" | "inactive" | "entered-in-error" | "unknown";
|
|
2111
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
2112
|
+
effectivePeriod?: {
|
|
2113
|
+
/** @description ISO date when it began. */
|
|
2114
|
+
start?: string;
|
|
2115
|
+
/** @description ISO date when it ended. */
|
|
2116
|
+
end?: string;
|
|
2117
|
+
};
|
|
2118
|
+
/** @description ISO date when the device was made. */
|
|
2119
|
+
manufacturedAt?: string;
|
|
2120
|
+
/** @description ISO date when the vaccine lot or device expires. */
|
|
2121
|
+
expiresAt?: string;
|
|
1815
2122
|
/** @description Every extracted fact this fact was projected from. */
|
|
1816
2123
|
members: {
|
|
1817
2124
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1827,19 +2134,14 @@ export interface components {
|
|
|
1827
2134
|
code: string;
|
|
1828
2135
|
display?: string;
|
|
1829
2136
|
}[];
|
|
1830
|
-
/** @description ISO date when
|
|
1831
|
-
|
|
1832
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1833
|
-
effectivePeriod?: {
|
|
1834
|
-
/** @description ISO date when this fact became active. */
|
|
1835
|
-
start?: string;
|
|
1836
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1837
|
-
end?: string;
|
|
1838
|
-
};
|
|
2137
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2138
|
+
authoredAt?: string;
|
|
1839
2139
|
/** @enum {string} */
|
|
1840
2140
|
type: "demographic";
|
|
1841
2141
|
/** @description Patient date of birth in ISO format (YYYY-MM-DD), from Patient.birthDate. */
|
|
1842
2142
|
birthDate?: string;
|
|
2143
|
+
/** @description When the patient died: an ISO date from Patient.deceasedDateTime, or their age in years at death. */
|
|
2144
|
+
death?: string | number;
|
|
1843
2145
|
/** @description Administrative sex from Patient.gender, e.g. 'male', 'female'. */
|
|
1844
2146
|
sex?: string;
|
|
1845
2147
|
/** @description Flattened address string from Patient.address, e.g. 'Laporte, CO'. Kept as a single string since HG provides it pre-formatted. */
|
|
@@ -1859,15 +2161,8 @@ export interface components {
|
|
|
1859
2161
|
code: string;
|
|
1860
2162
|
display?: string;
|
|
1861
2163
|
}[];
|
|
1862
|
-
/** @description ISO date when
|
|
1863
|
-
|
|
1864
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1865
|
-
effectivePeriod?: {
|
|
1866
|
-
/** @description ISO date when this fact became active. */
|
|
1867
|
-
start?: string;
|
|
1868
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1869
|
-
end?: string;
|
|
1870
|
-
};
|
|
2164
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2165
|
+
authoredAt?: string;
|
|
1871
2166
|
/** @enum {string} */
|
|
1872
2167
|
type: "insurance";
|
|
1873
2168
|
/**
|
|
@@ -1879,6 +2174,13 @@ export interface components {
|
|
|
1879
2174
|
planName?: string;
|
|
1880
2175
|
/** @description Member identifier from Coverage.identifier[].value. */
|
|
1881
2176
|
memberId?: string;
|
|
2177
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
2178
|
+
effectivePeriod?: {
|
|
2179
|
+
/** @description ISO date when it began. */
|
|
2180
|
+
start?: string;
|
|
2181
|
+
/** @description ISO date when it ended. */
|
|
2182
|
+
end?: string;
|
|
2183
|
+
};
|
|
1882
2184
|
/** @description Every extracted fact this fact was projected from. */
|
|
1883
2185
|
members: {
|
|
1884
2186
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1894,15 +2196,8 @@ export interface components {
|
|
|
1894
2196
|
code: string;
|
|
1895
2197
|
display?: string;
|
|
1896
2198
|
}[];
|
|
1897
|
-
/** @description ISO date when
|
|
1898
|
-
|
|
1899
|
-
/** @description Temporal bounds of the fact's validity. */
|
|
1900
|
-
effectivePeriod?: {
|
|
1901
|
-
/** @description ISO date when this fact became active. */
|
|
1902
|
-
start?: string;
|
|
1903
|
-
/** @description ISO date when this fact ended or was resolved. */
|
|
1904
|
-
end?: string;
|
|
1905
|
-
};
|
|
2199
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2200
|
+
authoredAt?: string;
|
|
1906
2201
|
/** @enum {string} */
|
|
1907
2202
|
type: "directive";
|
|
1908
2203
|
/**
|
|
@@ -1912,6 +2207,17 @@ export interface components {
|
|
|
1912
2207
|
status: "active" | "void" | "entered-in-error";
|
|
1913
2208
|
/** @description Directive content extracted from the source document (e.g. living will, POLST). HG delivers these as PDFs rather than structured Consent resources. */
|
|
1914
2209
|
notes?: string;
|
|
2210
|
+
/** @description When the fact held: `start` is when it became active, `end` when it ended or was resolved. */
|
|
2211
|
+
effectivePeriod?: {
|
|
2212
|
+
/** @description ISO date when it began. */
|
|
2213
|
+
start?: string;
|
|
2214
|
+
/** @description ISO date when it ended. */
|
|
2215
|
+
end?: string;
|
|
2216
|
+
};
|
|
2217
|
+
/** @description ISO date when the patient agreed to or signed it. */
|
|
2218
|
+
signedAt?: string;
|
|
2219
|
+
/** @description ISO date when someone last confirmed it is still valid. */
|
|
2220
|
+
verifiedAt?: string;
|
|
1915
2221
|
/** @description Every extracted fact this fact was projected from. */
|
|
1916
2222
|
members: {
|
|
1917
2223
|
/** @description Id of the `extracted_fact` node this member traces to (`ef_...`). */
|
|
@@ -1947,7 +2253,7 @@ export interface components {
|
|
|
1947
2253
|
* @enum {string}
|
|
1948
2254
|
*/
|
|
1949
2255
|
type: "extracted_narrative";
|
|
1950
|
-
/** @description Unique identifier for this node,
|
|
2256
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
1951
2257
|
id: string;
|
|
1952
2258
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
1953
2259
|
createdAt: string;
|
|
@@ -1992,7 +2298,7 @@ export interface components {
|
|
|
1992
2298
|
* @enum {string}
|
|
1993
2299
|
*/
|
|
1994
2300
|
type: "narrative_passage";
|
|
1995
|
-
/** @description Unique identifier for this node,
|
|
2301
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
1996
2302
|
id: string;
|
|
1997
2303
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
1998
2304
|
createdAt: string;
|
|
@@ -2019,7 +2325,7 @@ export interface components {
|
|
|
2019
2325
|
* @enum {string}
|
|
2020
2326
|
*/
|
|
2021
2327
|
type: "narrative";
|
|
2022
|
-
/** @description Unique identifier for this node,
|
|
2328
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
2023
2329
|
id: string;
|
|
2024
2330
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
2025
2331
|
createdAt: string;
|
|
@@ -2071,7 +2377,7 @@ export interface components {
|
|
|
2071
2377
|
* @enum {string}
|
|
2072
2378
|
*/
|
|
2073
2379
|
type: "learned_memory";
|
|
2074
|
-
/** @description Unique identifier for this node,
|
|
2380
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
2075
2381
|
id: string;
|
|
2076
2382
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
2077
2383
|
createdAt: string;
|
|
@@ -2097,7 +2403,7 @@ export interface components {
|
|
|
2097
2403
|
* @enum {string}
|
|
2098
2404
|
*/
|
|
2099
2405
|
type: "extracted_clinical_event";
|
|
2100
|
-
/** @description Unique identifier for this node,
|
|
2406
|
+
/** @description Unique identifier for this node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
2101
2407
|
id: string;
|
|
2102
2408
|
/** @description ISO 8601 timestamp when this node was first created. */
|
|
2103
2409
|
createdAt: string;
|
|
@@ -2107,17 +2413,19 @@ export interface components {
|
|
|
2107
2413
|
payload: {
|
|
2108
2414
|
/** @enum {string} */
|
|
2109
2415
|
type: "encounter";
|
|
2416
|
+
/** @description ISO 8601 timestamp when this clinical event occurred. */
|
|
2417
|
+
timestamp: string;
|
|
2110
2418
|
/** @description Temporal bounds of the event, for one that spans time rather than happening at an instant. */
|
|
2111
2419
|
effectivePeriod?: {
|
|
2112
|
-
/** @description ISO date when
|
|
2420
|
+
/** @description ISO date when it began. */
|
|
2113
2421
|
start?: string;
|
|
2114
2422
|
/** @description ISO date when it ended. */
|
|
2115
2423
|
end?: string;
|
|
2116
2424
|
};
|
|
2117
2425
|
/** @description One-line description for display and timeline. */
|
|
2118
2426
|
summary: string;
|
|
2119
|
-
/** @description
|
|
2120
|
-
|
|
2427
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2428
|
+
authoredAt?: string;
|
|
2121
2429
|
/**
|
|
2122
2430
|
* @description Encounter class. Maps from FHIR V3 ActEncounterCode: IMP/ACUTE/NONAC/SS → inpatient, AMB/OBSENC → outpatient, EMER → emergency, VR → virtual, HH/FLD → home.
|
|
2123
2431
|
* @enum {string}
|
|
@@ -2133,8 +2441,15 @@ export interface components {
|
|
|
2133
2441
|
location?: string;
|
|
2134
2442
|
/** @description Where the patient went after discharge. */
|
|
2135
2443
|
dischargeDisposition?: string;
|
|
2136
|
-
/** @description
|
|
2137
|
-
|
|
2444
|
+
/** @description When it is intended to happen, as opposed to when it did: a scheduled encounter or procedure, the intended dosing or therapy span. */
|
|
2445
|
+
plannedPeriod?: {
|
|
2446
|
+
/** @description ISO date when it began. */
|
|
2447
|
+
start?: string;
|
|
2448
|
+
/** @description ISO date when it ended. */
|
|
2449
|
+
end?: string;
|
|
2450
|
+
};
|
|
2451
|
+
/** @description ISO date when its status last changed. */
|
|
2452
|
+
statusChangedAt?: string;
|
|
2138
2453
|
/** @description Where this event was extracted from. Events are single-source — not merged across sources. */
|
|
2139
2454
|
source: {
|
|
2140
2455
|
/**
|
|
@@ -2151,20 +2466,24 @@ export interface components {
|
|
|
2151
2466
|
/** @description ISO 8601 timestamp when this record was ingested. */
|
|
2152
2467
|
ingestedAt: string;
|
|
2153
2468
|
};
|
|
2469
|
+
/** @description Provenance: the ingestion request that introduced this event. Absent for a row written outside a run, which is every row predating the run model. */
|
|
2470
|
+
ingestionId?: string;
|
|
2154
2471
|
} | {
|
|
2155
2472
|
/** @enum {string} */
|
|
2156
2473
|
type: "observation";
|
|
2474
|
+
/** @description ISO 8601 timestamp when this clinical event occurred. */
|
|
2475
|
+
timestamp: string;
|
|
2157
2476
|
/** @description Temporal bounds of the event, for one that spans time rather than happening at an instant. */
|
|
2158
2477
|
effectivePeriod?: {
|
|
2159
|
-
/** @description ISO date when
|
|
2478
|
+
/** @description ISO date when it began. */
|
|
2160
2479
|
start?: string;
|
|
2161
2480
|
/** @description ISO date when it ended. */
|
|
2162
2481
|
end?: string;
|
|
2163
2482
|
};
|
|
2164
2483
|
/** @description One-line description for display and timeline. */
|
|
2165
2484
|
summary: string;
|
|
2166
|
-
/** @description
|
|
2167
|
-
|
|
2485
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2486
|
+
authoredAt?: string;
|
|
2168
2487
|
/**
|
|
2169
2488
|
* @description Observation sub-domain. Maps from FHIR Observation.category and CDA section LOINC codes: 30954-2 → laboratory/imaging, 8716-3 → vital-signs, Functional Status / Mental Status sections → functional-status.
|
|
2170
2489
|
* @enum {string}
|
|
@@ -2194,8 +2513,10 @@ export interface components {
|
|
|
2194
2513
|
* @enum {string}
|
|
2195
2514
|
*/
|
|
2196
2515
|
status: "final" | "preliminary" | "amended" | "corrected" | "cancelled" | "unknown";
|
|
2197
|
-
/** @description ISO
|
|
2198
|
-
|
|
2516
|
+
/** @description ISO date when it happened, for something that happened at a point in time. */
|
|
2517
|
+
occurredAt?: string;
|
|
2518
|
+
/** @description ISO date when the result was released, which comes after it was measured. */
|
|
2519
|
+
issuedAt?: string;
|
|
2199
2520
|
/** @description Where this event was extracted from. Events are single-source — not merged across sources. */
|
|
2200
2521
|
source: {
|
|
2201
2522
|
/**
|
|
@@ -2212,20 +2533,24 @@ export interface components {
|
|
|
2212
2533
|
/** @description ISO 8601 timestamp when this record was ingested. */
|
|
2213
2534
|
ingestedAt: string;
|
|
2214
2535
|
};
|
|
2536
|
+
/** @description Provenance: the ingestion request that introduced this event. Absent for a row written outside a run, which is every row predating the run model. */
|
|
2537
|
+
ingestionId?: string;
|
|
2215
2538
|
} | {
|
|
2216
2539
|
/** @enum {string} */
|
|
2217
2540
|
type: "procedure";
|
|
2541
|
+
/** @description ISO 8601 timestamp when this clinical event occurred. */
|
|
2542
|
+
timestamp: string;
|
|
2218
2543
|
/** @description Temporal bounds of the event, for one that spans time rather than happening at an instant. */
|
|
2219
2544
|
effectivePeriod?: {
|
|
2220
|
-
/** @description ISO date when
|
|
2545
|
+
/** @description ISO date when it began. */
|
|
2221
2546
|
start?: string;
|
|
2222
2547
|
/** @description ISO date when it ended. */
|
|
2223
2548
|
end?: string;
|
|
2224
2549
|
};
|
|
2225
2550
|
/** @description One-line description for display and timeline. */
|
|
2226
2551
|
summary: string;
|
|
2227
|
-
/** @description
|
|
2228
|
-
|
|
2552
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2553
|
+
authoredAt?: string;
|
|
2229
2554
|
/** @description Procedure codes from CPT, SNOMED-CT, or ICD PCS. */
|
|
2230
2555
|
codes?: {
|
|
2231
2556
|
system: string;
|
|
@@ -2241,8 +2566,17 @@ export interface components {
|
|
|
2241
2566
|
* @enum {string}
|
|
2242
2567
|
*/
|
|
2243
2568
|
status: "completed" | "not-done" | "aborted" | "in-progress" | "stopped" | "unknown";
|
|
2244
|
-
/** @description ISO
|
|
2245
|
-
|
|
2569
|
+
/** @description ISO date when it happened, for something that happened at a point in time. */
|
|
2570
|
+
occurredAt?: string;
|
|
2571
|
+
/** @description ISO date when the drug or procedure was ordered. */
|
|
2572
|
+
orderedAt?: string;
|
|
2573
|
+
/** @description When it is intended to happen, as opposed to when it did: a scheduled encounter or procedure, the intended dosing or therapy span. */
|
|
2574
|
+
plannedPeriod?: {
|
|
2575
|
+
/** @description ISO date when it began. */
|
|
2576
|
+
start?: string;
|
|
2577
|
+
/** @description ISO date when it ended. */
|
|
2578
|
+
end?: string;
|
|
2579
|
+
};
|
|
2246
2580
|
/** @description Where this event was extracted from. Events are single-source — not merged across sources. */
|
|
2247
2581
|
source: {
|
|
2248
2582
|
/**
|
|
@@ -2259,20 +2593,24 @@ export interface components {
|
|
|
2259
2593
|
/** @description ISO 8601 timestamp when this record was ingested. */
|
|
2260
2594
|
ingestedAt: string;
|
|
2261
2595
|
};
|
|
2596
|
+
/** @description Provenance: the ingestion request that introduced this event. Absent for a row written outside a run, which is every row predating the run model. */
|
|
2597
|
+
ingestionId?: string;
|
|
2262
2598
|
} | {
|
|
2263
2599
|
/** @enum {string} */
|
|
2264
2600
|
type: "medication_event";
|
|
2601
|
+
/** @description ISO 8601 timestamp when this clinical event occurred. */
|
|
2602
|
+
timestamp: string;
|
|
2265
2603
|
/** @description Temporal bounds of the event, for one that spans time rather than happening at an instant. */
|
|
2266
2604
|
effectivePeriod?: {
|
|
2267
|
-
/** @description ISO date when
|
|
2605
|
+
/** @description ISO date when it began. */
|
|
2268
2606
|
start?: string;
|
|
2269
2607
|
/** @description ISO date when it ended. */
|
|
2270
2608
|
end?: string;
|
|
2271
2609
|
};
|
|
2272
2610
|
/** @description One-line description for display and timeline. */
|
|
2273
2611
|
summary: string;
|
|
2274
|
-
/** @description
|
|
2275
|
-
|
|
2612
|
+
/** @description ISO date when the source entry was clinically recorded, from FHIR recordedDate/dateAsserted/recorded/FamilyMemberHistory.date or CDA entry/section author/time. */
|
|
2613
|
+
authoredAt?: string;
|
|
2276
2614
|
/** @description Medication name as it appears in the source, e.g. 'Lisinopril 10 mg tablet'. */
|
|
2277
2615
|
medicationDisplay: string;
|
|
2278
2616
|
/** @description RxNorm or NDC codes for the medication. */
|
|
@@ -2295,8 +2633,25 @@ export interface components {
|
|
|
2295
2633
|
dose?: string;
|
|
2296
2634
|
/** @description Route of administration, e.g. 'oral', 'IV'. */
|
|
2297
2635
|
route?: string;
|
|
2298
|
-
/** @description ISO
|
|
2299
|
-
|
|
2636
|
+
/** @description ISO date when it happened, for something that happened at a point in time. */
|
|
2637
|
+
occurredAt?: string;
|
|
2638
|
+
/** @description ISO date when the pharmacy prepared the dispense. */
|
|
2639
|
+
preparedAt?: string;
|
|
2640
|
+
/** @description ISO date when the pharmacy handed the drug over, which shows the patient actually received it. */
|
|
2641
|
+
handedOverAt?: string;
|
|
2642
|
+
/** @description ISO date when the drug or procedure was ordered. */
|
|
2643
|
+
orderedAt?: string;
|
|
2644
|
+
/** @description When it is intended to happen, as opposed to when it did: a scheduled encounter or procedure, the intended dosing or therapy span. */
|
|
2645
|
+
plannedPeriod?: {
|
|
2646
|
+
/** @description ISO date when it began. */
|
|
2647
|
+
start?: string;
|
|
2648
|
+
/** @description ISO date when it ended. */
|
|
2649
|
+
end?: string;
|
|
2650
|
+
};
|
|
2651
|
+
/** @description ISO date until which the order may be filled. */
|
|
2652
|
+
orderValidUntil?: string;
|
|
2653
|
+
/** @description ISO date when its status last changed. */
|
|
2654
|
+
statusChangedAt?: string;
|
|
2300
2655
|
/** @description Where this event was extracted from. Events are single-source — not merged across sources. */
|
|
2301
2656
|
source: {
|
|
2302
2657
|
/**
|
|
@@ -2313,6 +2668,8 @@ export interface components {
|
|
|
2313
2668
|
/** @description ISO 8601 timestamp when this record was ingested. */
|
|
2314
2669
|
ingestedAt: string;
|
|
2315
2670
|
};
|
|
2671
|
+
/** @description Provenance: the ingestion request that introduced this event. Absent for a row written outside a run, which is every row predating the run model. */
|
|
2672
|
+
ingestionId?: string;
|
|
2316
2673
|
};
|
|
2317
2674
|
};
|
|
2318
2675
|
/** @description A page of nodes of one type from the patient context graph. */
|
|
@@ -2338,7 +2695,7 @@ export interface components {
|
|
|
2338
2695
|
* @enum {string}
|
|
2339
2696
|
*/
|
|
2340
2697
|
type: "resolution_decision";
|
|
2341
|
-
/** @description Unique identifier for this edge,
|
|
2698
|
+
/** @description Unique identifier for this edge: its type's prefix, `_`, then the underlying id (e.g. `rd_...`). */
|
|
2342
2699
|
id: string;
|
|
2343
2700
|
/** @description ISO 8601 timestamp when this edge was first created. */
|
|
2344
2701
|
createdAt: string;
|
|
@@ -2358,7 +2715,7 @@ export interface components {
|
|
|
2358
2715
|
* @enum {string}
|
|
2359
2716
|
*/
|
|
2360
2717
|
resolution: "uncertain" | "probable" | "confirmed";
|
|
2361
|
-
/** @description Id of the stop rule that fired, e.g. '
|
|
2718
|
+
/** @description Id of the stop rule that fired, e.g. 'deterministic-code-exact'. This is the audit's 'why'. */
|
|
2362
2719
|
ruleId: string;
|
|
2363
2720
|
/** @description The full accumulated evidence the rule evaluated, in the order the layers ran. */
|
|
2364
2721
|
evidence: ({
|
|
@@ -2407,12 +2764,15 @@ export interface components {
|
|
|
2407
2764
|
codeB: string;
|
|
2408
2765
|
} | {
|
|
2409
2766
|
/** @enum {string} */
|
|
2410
|
-
layer: "
|
|
2767
|
+
layer: "deterministic-code";
|
|
2411
2768
|
a: {
|
|
2412
|
-
/** @description The best candidate's
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2769
|
+
/** @description The best candidate's members — more than one for a combination product. */
|
|
2770
|
+
members: {
|
|
2771
|
+
/** @description The base-ingredient concept id. */
|
|
2772
|
+
conceptId: string;
|
|
2773
|
+
/** @description The salt/ester-grain concept ids this ingredient is given as. Empty when the match carries none. */
|
|
2774
|
+
preciseConceptIds: string[];
|
|
2775
|
+
}[];
|
|
2416
2776
|
/**
|
|
2417
2777
|
* @description The cascade rung that grounded this side.
|
|
2418
2778
|
* @enum {string}
|
|
@@ -2422,10 +2782,13 @@ export interface components {
|
|
|
2422
2782
|
compositionId: string;
|
|
2423
2783
|
};
|
|
2424
2784
|
b: {
|
|
2425
|
-
/** @description The best candidate's
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2785
|
+
/** @description The best candidate's members — more than one for a combination product. */
|
|
2786
|
+
members: {
|
|
2787
|
+
/** @description The base-ingredient concept id. */
|
|
2788
|
+
conceptId: string;
|
|
2789
|
+
/** @description The salt/ester-grain concept ids this ingredient is given as. Empty when the match carries none. */
|
|
2790
|
+
preciseConceptIds: string[];
|
|
2791
|
+
}[];
|
|
2429
2792
|
/**
|
|
2430
2793
|
* @description The cascade rung that grounded this side.
|
|
2431
2794
|
* @enum {string}
|
|
@@ -2438,12 +2801,15 @@ export interface components {
|
|
|
2438
2801
|
kind: "concept-identity-match";
|
|
2439
2802
|
} | {
|
|
2440
2803
|
/** @enum {string} */
|
|
2441
|
-
layer: "
|
|
2804
|
+
layer: "deterministic-code";
|
|
2442
2805
|
a: {
|
|
2443
|
-
/** @description The best candidate's
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2806
|
+
/** @description The best candidate's members — more than one for a combination product. */
|
|
2807
|
+
members: {
|
|
2808
|
+
/** @description The base-ingredient concept id. */
|
|
2809
|
+
conceptId: string;
|
|
2810
|
+
/** @description The salt/ester-grain concept ids this ingredient is given as. Empty when the match carries none. */
|
|
2811
|
+
preciseConceptIds: string[];
|
|
2812
|
+
}[];
|
|
2447
2813
|
/**
|
|
2448
2814
|
* @description The cascade rung that grounded this side.
|
|
2449
2815
|
* @enum {string}
|
|
@@ -2453,10 +2819,13 @@ export interface components {
|
|
|
2453
2819
|
compositionId: string;
|
|
2454
2820
|
};
|
|
2455
2821
|
b: {
|
|
2456
|
-
/** @description The best candidate's
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2822
|
+
/** @description The best candidate's members — more than one for a combination product. */
|
|
2823
|
+
members: {
|
|
2824
|
+
/** @description The base-ingredient concept id. */
|
|
2825
|
+
conceptId: string;
|
|
2826
|
+
/** @description The salt/ester-grain concept ids this ingredient is given as. Empty when the match carries none. */
|
|
2827
|
+
preciseConceptIds: string[];
|
|
2828
|
+
}[];
|
|
2460
2829
|
/**
|
|
2461
2830
|
* @description The cascade rung that grounded this side.
|
|
2462
2831
|
* @enum {string}
|
|
@@ -2469,12 +2838,15 @@ export interface components {
|
|
|
2469
2838
|
kind: "concept-identity-partial-match";
|
|
2470
2839
|
} | {
|
|
2471
2840
|
/** @enum {string} */
|
|
2472
|
-
layer: "
|
|
2841
|
+
layer: "deterministic-code";
|
|
2473
2842
|
a: {
|
|
2474
|
-
/** @description The best candidate's
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2843
|
+
/** @description The best candidate's members — more than one for a combination product. */
|
|
2844
|
+
members: {
|
|
2845
|
+
/** @description The base-ingredient concept id. */
|
|
2846
|
+
conceptId: string;
|
|
2847
|
+
/** @description The salt/ester-grain concept ids this ingredient is given as. Empty when the match carries none. */
|
|
2848
|
+
preciseConceptIds: string[];
|
|
2849
|
+
}[];
|
|
2478
2850
|
/**
|
|
2479
2851
|
* @description The cascade rung that grounded this side.
|
|
2480
2852
|
* @enum {string}
|
|
@@ -2484,10 +2856,13 @@ export interface components {
|
|
|
2484
2856
|
compositionId: string;
|
|
2485
2857
|
};
|
|
2486
2858
|
b: {
|
|
2487
|
-
/** @description The best candidate's
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2859
|
+
/** @description The best candidate's members — more than one for a combination product. */
|
|
2860
|
+
members: {
|
|
2861
|
+
/** @description The base-ingredient concept id. */
|
|
2862
|
+
conceptId: string;
|
|
2863
|
+
/** @description The salt/ester-grain concept ids this ingredient is given as. Empty when the match carries none. */
|
|
2864
|
+
preciseConceptIds: string[];
|
|
2865
|
+
}[];
|
|
2491
2866
|
/**
|
|
2492
2867
|
* @description The cascade rung that grounded this side.
|
|
2493
2868
|
* @enum {string}
|
|
@@ -2498,6 +2873,27 @@ export interface components {
|
|
|
2498
2873
|
};
|
|
2499
2874
|
/** @enum {string} */
|
|
2500
2875
|
kind: "concept-identity-mismatch";
|
|
2876
|
+
} | {
|
|
2877
|
+
/** @enum {string} */
|
|
2878
|
+
layer: "identity";
|
|
2879
|
+
a: components["schemas"]["MedicationIdentity"] & unknown;
|
|
2880
|
+
b: components["schemas"]["MedicationIdentity"] & unknown;
|
|
2881
|
+
/** @enum {string} */
|
|
2882
|
+
kind: "medication-identity-match";
|
|
2883
|
+
} | {
|
|
2884
|
+
/** @enum {string} */
|
|
2885
|
+
layer: "identity";
|
|
2886
|
+
a: components["schemas"]["MedicationIdentity"] & unknown;
|
|
2887
|
+
b: components["schemas"]["MedicationIdentity"] & unknown;
|
|
2888
|
+
/** @enum {string} */
|
|
2889
|
+
kind: "medication-identity-mismatch";
|
|
2890
|
+
} | {
|
|
2891
|
+
/** @enum {string} */
|
|
2892
|
+
layer: "identity";
|
|
2893
|
+
a?: components["schemas"]["MedicationIdentity"] & unknown;
|
|
2894
|
+
b?: components["schemas"]["MedicationIdentity"] & unknown;
|
|
2895
|
+
/** @enum {string} */
|
|
2896
|
+
kind: "medication-identity-incomplete";
|
|
2501
2897
|
} | {
|
|
2502
2898
|
/** @enum {string} */
|
|
2503
2899
|
kind: "field-similarity";
|
|
@@ -2618,7 +3014,7 @@ export interface components {
|
|
|
2618
3014
|
};
|
|
2619
3015
|
/** @description The node this edge originates from. */
|
|
2620
3016
|
NodeRef: {
|
|
2621
|
-
/** @description Id of the referenced node,
|
|
3017
|
+
/** @description Id of the referenced node: its type's prefix, `_`, then the underlying id (e.g. `ef_...`). */
|
|
2622
3018
|
id: string;
|
|
2623
3019
|
/**
|
|
2624
3020
|
* @description Node type of the referenced node.
|
|
@@ -2633,7 +3029,7 @@ export interface components {
|
|
|
2633
3029
|
* @enum {string}
|
|
2634
3030
|
*/
|
|
2635
3031
|
type: "resolves_to";
|
|
2636
|
-
/** @description Unique identifier for this edge,
|
|
3032
|
+
/** @description Unique identifier for this edge: its type's prefix, `_`, then the underlying id (e.g. `rd_...`). */
|
|
2637
3033
|
id: string;
|
|
2638
3034
|
/** @description ISO 8601 timestamp when this edge was first created. */
|
|
2639
3035
|
createdAt: string;
|
|
@@ -2651,7 +3047,7 @@ export interface components {
|
|
|
2651
3047
|
* @enum {string}
|
|
2652
3048
|
*/
|
|
2653
3049
|
type: "chunked_into";
|
|
2654
|
-
/** @description Unique identifier for this edge,
|
|
3050
|
+
/** @description Unique identifier for this edge: its type's prefix, `_`, then the underlying id (e.g. `rd_...`). */
|
|
2655
3051
|
id: string;
|
|
2656
3052
|
/** @description ISO 8601 timestamp when this edge was first created. */
|
|
2657
3053
|
createdAt: string;
|
|
@@ -2669,7 +3065,7 @@ export interface components {
|
|
|
2669
3065
|
* @enum {string}
|
|
2670
3066
|
*/
|
|
2671
3067
|
type: "relationship";
|
|
2672
|
-
/** @description Unique identifier for this edge,
|
|
3068
|
+
/** @description Unique identifier for this edge: its type's prefix, `_`, then the underlying id (e.g. `rd_...`). */
|
|
2673
3069
|
id: string;
|
|
2674
3070
|
/** @description ISO 8601 timestamp when this edge was first created. */
|
|
2675
3071
|
createdAt: string;
|
|
@@ -2875,7 +3271,7 @@ export interface operations {
|
|
|
2875
3271
|
};
|
|
2876
3272
|
requestBody?: never;
|
|
2877
3273
|
responses: {
|
|
2878
|
-
/** @description Service
|
|
3274
|
+
/** @description Service is healthy */
|
|
2879
3275
|
200: {
|
|
2880
3276
|
headers: {
|
|
2881
3277
|
[name: string]: unknown;
|
|
@@ -2884,6 +3280,15 @@ export interface operations {
|
|
|
2884
3280
|
"application/json": components["schemas"]["ServiceInfo"];
|
|
2885
3281
|
};
|
|
2886
3282
|
};
|
|
3283
|
+
/** @description Service is degraded */
|
|
3284
|
+
503: {
|
|
3285
|
+
headers: {
|
|
3286
|
+
[name: string]: unknown;
|
|
3287
|
+
};
|
|
3288
|
+
content: {
|
|
3289
|
+
"application/json": components["schemas"]["ServiceInfo"];
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
2887
3292
|
};
|
|
2888
3293
|
};
|
|
2889
3294
|
"list-patients": {
|
|
@@ -2932,7 +3337,7 @@ export interface operations {
|
|
|
2932
3337
|
"application/json": components["schemas"]["PatientDetail"];
|
|
2933
3338
|
};
|
|
2934
3339
|
};
|
|
2935
|
-
/** @description Patient not found
|
|
3340
|
+
/** @description Patient not found */
|
|
2936
3341
|
404: {
|
|
2937
3342
|
headers: {
|
|
2938
3343
|
[name: string]: unknown;
|
|
@@ -3067,7 +3472,7 @@ export interface operations {
|
|
|
3067
3472
|
"text/plain": string;
|
|
3068
3473
|
};
|
|
3069
3474
|
};
|
|
3070
|
-
/** @description Patient not found
|
|
3475
|
+
/** @description Patient not found */
|
|
3071
3476
|
404: {
|
|
3072
3477
|
headers: {
|
|
3073
3478
|
[name: string]: unknown;
|
|
@@ -3246,6 +3651,51 @@ export interface operations {
|
|
|
3246
3651
|
};
|
|
3247
3652
|
};
|
|
3248
3653
|
};
|
|
3654
|
+
"ingest-sessions": {
|
|
3655
|
+
parameters: {
|
|
3656
|
+
query?: never;
|
|
3657
|
+
header?: never;
|
|
3658
|
+
path: {
|
|
3659
|
+
/** @description ID of the patient */
|
|
3660
|
+
patientId: string;
|
|
3661
|
+
};
|
|
3662
|
+
cookie?: never;
|
|
3663
|
+
};
|
|
3664
|
+
requestBody: {
|
|
3665
|
+
content: {
|
|
3666
|
+
"application/json": components["schemas"]["IngestSessionsBody"];
|
|
3667
|
+
};
|
|
3668
|
+
};
|
|
3669
|
+
responses: {
|
|
3670
|
+
/** @description Submission accepted */
|
|
3671
|
+
202: {
|
|
3672
|
+
headers: {
|
|
3673
|
+
[name: string]: unknown;
|
|
3674
|
+
};
|
|
3675
|
+
content: {
|
|
3676
|
+
"application/json": components["schemas"]["Ingestion"];
|
|
3677
|
+
};
|
|
3678
|
+
};
|
|
3679
|
+
/** @description A transcript is invalid, names a session id that cannot be used, or does not continue the stored conversation of the session it names */
|
|
3680
|
+
400: {
|
|
3681
|
+
headers: {
|
|
3682
|
+
[name: string]: unknown;
|
|
3683
|
+
};
|
|
3684
|
+
content: {
|
|
3685
|
+
"application/json": components["schemas"]["ApiError"];
|
|
3686
|
+
};
|
|
3687
|
+
};
|
|
3688
|
+
/** @description Patient not found */
|
|
3689
|
+
404: {
|
|
3690
|
+
headers: {
|
|
3691
|
+
[name: string]: unknown;
|
|
3692
|
+
};
|
|
3693
|
+
content: {
|
|
3694
|
+
"application/json": components["schemas"]["ApiError"];
|
|
3695
|
+
};
|
|
3696
|
+
};
|
|
3697
|
+
};
|
|
3698
|
+
};
|
|
3249
3699
|
"list-ingestions": {
|
|
3250
3700
|
parameters: {
|
|
3251
3701
|
query?: {
|
|
@@ -3335,7 +3785,7 @@ export interface operations {
|
|
|
3335
3785
|
"application/json": components["schemas"]["Session"];
|
|
3336
3786
|
};
|
|
3337
3787
|
};
|
|
3338
|
-
/** @description Patient not found
|
|
3788
|
+
/** @description Patient not found */
|
|
3339
3789
|
404: {
|
|
3340
3790
|
headers: {
|
|
3341
3791
|
[name: string]: unknown;
|
|
@@ -3421,7 +3871,7 @@ export interface operations {
|
|
|
3421
3871
|
"application/json": components["schemas"]["ApiError"];
|
|
3422
3872
|
};
|
|
3423
3873
|
};
|
|
3424
|
-
/** @description Patient not found
|
|
3874
|
+
/** @description Patient not found */
|
|
3425
3875
|
404: {
|
|
3426
3876
|
headers: {
|
|
3427
3877
|
[name: string]: unknown;
|
|
@@ -3461,10 +3911,20 @@ export interface operations {
|
|
|
3461
3911
|
ok: boolean;
|
|
3462
3912
|
/** @description Number of messages appended. */
|
|
3463
3913
|
messageCount: number;
|
|
3914
|
+
ingestion: components["schemas"]["Ingestion"] & unknown;
|
|
3464
3915
|
};
|
|
3465
3916
|
};
|
|
3466
3917
|
};
|
|
3467
|
-
/** @description
|
|
3918
|
+
/** @description Session id is not usable for a new session, or the session's stored conversation changed concurrently. */
|
|
3919
|
+
400: {
|
|
3920
|
+
headers: {
|
|
3921
|
+
[name: string]: unknown;
|
|
3922
|
+
};
|
|
3923
|
+
content: {
|
|
3924
|
+
"application/json": components["schemas"]["ApiError"];
|
|
3925
|
+
};
|
|
3926
|
+
};
|
|
3927
|
+
/** @description Patient not found */
|
|
3468
3928
|
404: {
|
|
3469
3929
|
headers: {
|
|
3470
3930
|
[name: string]: unknown;
|
|
@@ -3532,14 +3992,14 @@ export interface operations {
|
|
|
3532
3992
|
};
|
|
3533
3993
|
requestBody?: never;
|
|
3534
3994
|
responses: {
|
|
3535
|
-
/** @description
|
|
3536
|
-
|
|
3995
|
+
/** @description Accepted; memory formation is already queued */
|
|
3996
|
+
202: {
|
|
3537
3997
|
headers: {
|
|
3538
3998
|
[name: string]: unknown;
|
|
3539
3999
|
};
|
|
3540
4000
|
content: {
|
|
3541
4001
|
"application/json": {
|
|
3542
|
-
/** @description Always `true
|
|
4002
|
+
/** @description Always `true`. */
|
|
3543
4003
|
ok: boolean;
|
|
3544
4004
|
};
|
|
3545
4005
|
};
|
|
@@ -3555,49 +4015,6 @@ export interface operations {
|
|
|
3555
4015
|
};
|
|
3556
4016
|
};
|
|
3557
4017
|
};
|
|
3558
|
-
"ingest-session": {
|
|
3559
|
-
parameters: {
|
|
3560
|
-
query?: never;
|
|
3561
|
-
header?: never;
|
|
3562
|
-
path: {
|
|
3563
|
-
/** @description ID of the patient */
|
|
3564
|
-
patientId: string;
|
|
3565
|
-
};
|
|
3566
|
-
cookie?: never;
|
|
3567
|
-
};
|
|
3568
|
-
requestBody: {
|
|
3569
|
-
content: {
|
|
3570
|
-
"application/json": components["schemas"]["IngestSessionBody"];
|
|
3571
|
-
};
|
|
3572
|
-
};
|
|
3573
|
-
responses: {
|
|
3574
|
-
/** @description Session ingested and closed */
|
|
3575
|
-
200: {
|
|
3576
|
-
headers: {
|
|
3577
|
-
[name: string]: unknown;
|
|
3578
|
-
};
|
|
3579
|
-
content: {
|
|
3580
|
-
"application/json": {
|
|
3581
|
-
/** @description Always `true` when the session was ingested successfully. */
|
|
3582
|
-
ok: boolean;
|
|
3583
|
-
/** @description ID of the session that was created and closed. */
|
|
3584
|
-
sessionId: string;
|
|
3585
|
-
/** @description Number of messages appended to the session. */
|
|
3586
|
-
messageCount: number;
|
|
3587
|
-
};
|
|
3588
|
-
};
|
|
3589
|
-
};
|
|
3590
|
-
/** @description Patient not found or no data ingested */
|
|
3591
|
-
404: {
|
|
3592
|
-
headers: {
|
|
3593
|
-
[name: string]: unknown;
|
|
3594
|
-
};
|
|
3595
|
-
content: {
|
|
3596
|
-
"application/json": components["schemas"]["ApiError"];
|
|
3597
|
-
};
|
|
3598
|
-
};
|
|
3599
|
-
};
|
|
3600
|
-
};
|
|
3601
4018
|
"browse-vfs": {
|
|
3602
4019
|
parameters: {
|
|
3603
4020
|
query?: {
|
|
@@ -3622,7 +4039,7 @@ export interface operations {
|
|
|
3622
4039
|
"application/json": components["schemas"]["BrowseResult"];
|
|
3623
4040
|
};
|
|
3624
4041
|
};
|
|
3625
|
-
/** @description Patient
|
|
4042
|
+
/** @description Patient or path not found */
|
|
3626
4043
|
404: {
|
|
3627
4044
|
headers: {
|
|
3628
4045
|
[name: string]: unknown;
|
|
@@ -3661,7 +4078,7 @@ export interface operations {
|
|
|
3661
4078
|
"application/json": components["schemas"]["ReadResponse"];
|
|
3662
4079
|
};
|
|
3663
4080
|
};
|
|
3664
|
-
/** @description Patient
|
|
4081
|
+
/** @description Patient or path not found */
|
|
3665
4082
|
404: {
|
|
3666
4083
|
headers: {
|
|
3667
4084
|
[name: string]: unknown;
|
|
@@ -3681,7 +4098,7 @@ export interface operations {
|
|
|
3681
4098
|
patientId: string;
|
|
3682
4099
|
/** @description Type of node to operate on. */
|
|
3683
4100
|
type: "extracted_fact" | "fact" | "extracted_narrative" | "narrative_passage" | "narrative" | "learned_memory" | "extracted_clinical_event";
|
|
3684
|
-
/** @description
|
|
4101
|
+
/** @description A node id: its type's prefix, `_`, then the underlying id. Supported prefixes: `ef` (extracted_fact), `fct` (fact), `en` (extracted_narrative), `np` (narrative_passage), `nar` (narrative), `lm` (learned_memory), `ece` (extracted_clinical_event). */
|
|
3685
4102
|
nodeId: string;
|
|
3686
4103
|
};
|
|
3687
4104
|
cookie?: never;
|
|
@@ -3697,7 +4114,7 @@ export interface operations {
|
|
|
3697
4114
|
"application/json": components["schemas"]["Node"];
|
|
3698
4115
|
};
|
|
3699
4116
|
};
|
|
3700
|
-
/** @description `nodeId` is not a node of the given `type`. */
|
|
4117
|
+
/** @description `nodeId` is malformed, or not a node of the given `type`. */
|
|
3701
4118
|
400: {
|
|
3702
4119
|
headers: {
|
|
3703
4120
|
[name: string]: unknown;
|
|
@@ -3765,7 +4182,7 @@ export interface operations {
|
|
|
3765
4182
|
patientId: string;
|
|
3766
4183
|
/** @description Type of edge to operate on. */
|
|
3767
4184
|
type: "resolution_decision" | "resolves_to" | "chunked_into" | "relationship";
|
|
3768
|
-
/** @description
|
|
4185
|
+
/** @description An edge id: its type's prefix, `_`, then the underlying id. Supported prefixes: `rd` (resolution_decision), `rslv` (resolves_to), `ci` (chunked_into), `rel` (relationship). */
|
|
3769
4186
|
edgeId: string;
|
|
3770
4187
|
};
|
|
3771
4188
|
cookie?: never;
|
|
@@ -3781,7 +4198,7 @@ export interface operations {
|
|
|
3781
4198
|
"application/json": components["schemas"]["Edge"];
|
|
3782
4199
|
};
|
|
3783
4200
|
};
|
|
3784
|
-
/** @description `edgeId` is not an edge of the given `type`. */
|
|
4201
|
+
/** @description `edgeId` is malformed, or not an edge of the given `type`. */
|
|
3785
4202
|
400: {
|
|
3786
4203
|
headers: {
|
|
3787
4204
|
[name: string]: unknown;
|
|
@@ -3808,7 +4225,7 @@ export interface operations {
|
|
|
3808
4225
|
page?: number | null;
|
|
3809
4226
|
/** @description Number of edges per page. Defaults to 100; maximum is 1000. */
|
|
3810
4227
|
perPage?: number;
|
|
3811
|
-
/** @description Restrict results to edges touching the given node id(s)
|
|
4228
|
+
/** @description Restrict results to edges touching the given node id(s). One id returns every edge touching that node, in either direction. Two ids (repeat the param, e.g. `?touching=a&touching=b`) return only the edge(s) connecting exactly that pair. */
|
|
3812
4229
|
touching?: string | string[];
|
|
3813
4230
|
};
|
|
3814
4231
|
header?: never;
|
|
@@ -3831,7 +4248,7 @@ export interface operations {
|
|
|
3831
4248
|
"application/json": components["schemas"]["EdgeList"];
|
|
3832
4249
|
};
|
|
3833
4250
|
};
|
|
3834
|
-
/** @description
|
|
4251
|
+
/** @description A `touching` id is malformed, or the edge type cannot touch the node it names or connect the pair it names. */
|
|
3835
4252
|
400: {
|
|
3836
4253
|
headers: {
|
|
3837
4254
|
[name: string]: unknown;
|
|
@@ -4690,10 +5107,16 @@ export interface operations {
|
|
|
4690
5107
|
perPage?: number;
|
|
4691
5108
|
/** @description Conditions to filter on, ANDed together. Omitted or empty matches every relationship. */
|
|
4692
5109
|
filter?: {
|
|
4693
|
-
/** @description Restrict to this
|
|
5110
|
+
/** @description Restrict to relationships of this type. */
|
|
4694
5111
|
type?: {
|
|
4695
|
-
/**
|
|
4696
|
-
|
|
5112
|
+
/**
|
|
5113
|
+
* @description Matches exactly this value.
|
|
5114
|
+
* @enum {string}
|
|
5115
|
+
*/
|
|
5116
|
+
eq: "prescribed_for" | "monitors" | "occurred_during" | "has_complication" | "manifestation_of" | "progression_of" | "risk_factor_for" | "commonly_comorbid" | "same_disease_axis" | "related_to" | "corroborates" | "enriches" | "conflicts";
|
|
5117
|
+
} | {
|
|
5118
|
+
/** @description Matches any of these values. At most 500. */
|
|
5119
|
+
any: ("prescribed_for" | "monitors" | "occurred_during" | "has_complication" | "manifestation_of" | "progression_of" | "risk_factor_for" | "commonly_comorbid" | "same_disease_axis" | "related_to" | "corroborates" | "enriches" | "conflicts")[];
|
|
4697
5120
|
};
|
|
4698
5121
|
/** @description Restrict to relationships recorded from this source. */
|
|
4699
5122
|
source?: {
|