@healthcloudai/hc-sdk 3.20.0 → 3.22.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/dist/index.cjs +259 -1
- package/dist/index.d.cts +1010 -101
- package/dist/index.d.ts +1010 -101
- package/dist/index.js +259 -1
- package/docs/clients/PatientClient.md +4 -0
- package/docs/clients/QuestClient.md +1 -1
- package/docs/docs-manifest.json +22 -3
- package/docs/examples/index.md +5 -1
- package/docs/index.md +5 -1
- package/docs/models/CatalogItemKind.md +15 -0
- package/docs/models/CatalogVendor.md +15 -0
- package/docs/models/CollectionModality.md +15 -0
- package/docs/models/EncounterEffect.md +18 -0
- package/docs/models/EncounterOperationError.md +18 -0
- package/docs/models/EncounterOperationResponse.md +22 -0
- package/docs/models/EncounterSections.md +22 -0
- package/docs/models/GetTestOrderResponse.md +1 -0
- package/docs/models/IntakeOperationError.md +18 -0
- package/docs/models/IntakeOperationResponse.md +22 -0
- package/docs/models/ObservedEncounterResponse.md +26 -0
- package/docs/models/ObservedIntakeResponse.md +17 -0
- package/docs/models/OrderItem.md +4 -0
- package/docs/models/PlaceTestOrderResponse.md +1 -0
- package/docs/models/QuestRetrieveCompendiumResponse.md +5 -0
- package/docs/models/SubmitEncounterOperationRequest.md +18 -0
- package/docs/models/SubmitIntakeOperationRequest.md +19 -0
- package/docs/models/TestOrder.md +1 -0
- package/docs/models/UnknownEncounterOperation.md +18 -0
- package/docs/models/UnknownIntakeOperation.md +18 -0
- package/docs/models/index.md +15 -0
- package/docs/operations/connectors.questRetrieveCompendium.md +17 -2
- package/docs/operations/patient.getPatientEncounterOperation.md +151 -0
- package/docs/operations/patient.getPatientIntakeOperation.md +166 -0
- package/docs/operations/patient.getTestOrder.md +1 -0
- package/docs/operations/patient.listOrderItems.md +12 -4
- package/docs/operations/patient.listTestOrders.md +1 -0
- package/docs/operations/patient.placeTestOrder.md +2 -0
- package/docs/operations/patient.submitPatientEncounterOperation.md +161 -0
- package/docs/operations/patient.submitPatientIntakeOperation.md +178 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1010,6 +1010,207 @@ var MCPClient = class extends BaseServiceClient {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
};
|
|
1012
1012
|
|
|
1013
|
+
// src/models/openapi-generated/patient/models/EncounterEffect.ts
|
|
1014
|
+
function EncounterEffectFromJSON(json) {
|
|
1015
|
+
return EncounterEffectFromJSONTyped(json, false);
|
|
1016
|
+
}
|
|
1017
|
+
function EncounterEffectFromJSONTyped(json, ignoreDiscriminator) {
|
|
1018
|
+
if (json == null) {
|
|
1019
|
+
return json;
|
|
1020
|
+
}
|
|
1021
|
+
return {
|
|
1022
|
+
"error_present": json["error_present"],
|
|
1023
|
+
"status": json["status"]
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
// src/models/openapi-generated/patient/models/EncounterSections.ts
|
|
1028
|
+
function EncounterSectionsFromJSON(json) {
|
|
1029
|
+
return EncounterSectionsFromJSONTyped(json, false);
|
|
1030
|
+
}
|
|
1031
|
+
function EncounterSectionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
1032
|
+
if (json == null) {
|
|
1033
|
+
return json;
|
|
1034
|
+
}
|
|
1035
|
+
return {
|
|
1036
|
+
"assessment": json["assessment"] === void 0 ? void 0 : json["assessment"] === null ? null : EncounterEffectFromJSON(json["assessment"]),
|
|
1037
|
+
"hpi": json["hpi"] === void 0 ? void 0 : json["hpi"] === null ? null : EncounterEffectFromJSON(json["hpi"]),
|
|
1038
|
+
"overall": EncounterEffectFromJSON(json["overall"]),
|
|
1039
|
+
"plan": json["plan"] === void 0 ? void 0 : json["plan"] === null ? null : EncounterEffectFromJSON(json["plan"]),
|
|
1040
|
+
"reason_for_visit": json["reason_for_visit"] === void 0 ? void 0 : json["reason_for_visit"] === null ? null : EncounterEffectFromJSON(json["reason_for_visit"]),
|
|
1041
|
+
"ros": json["ros"] === void 0 ? void 0 : json["ros"] === null ? null : EncounterEffectFromJSON(json["ros"])
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
// src/models/openapi-generated/patient/models/ObservedEncounterResponse.ts
|
|
1046
|
+
function ObservedEncounterResponseFromJSON(json) {
|
|
1047
|
+
return ObservedEncounterResponseFromJSONTyped(json, false);
|
|
1048
|
+
}
|
|
1049
|
+
function ObservedEncounterResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1050
|
+
if (json == null) {
|
|
1051
|
+
return json;
|
|
1052
|
+
}
|
|
1053
|
+
return {
|
|
1054
|
+
"athena_encounter": json["athena_encounter"] === void 0 ? void 0 : json["athena_encounter"] === null ? null : EncounterEffectFromJSON(json["athena_encounter"]),
|
|
1055
|
+
"athena_insurance": json["athena_insurance"] === void 0 ? void 0 : json["athena_insurance"] === null ? null : EncounterEffectFromJSON(json["athena_insurance"]),
|
|
1056
|
+
"clinical_outcome": json["clinical_outcome"] == null ? void 0 : json["clinical_outcome"],
|
|
1057
|
+
"created": json["created"] === void 0 ? void 0 : json["created"] === null ? null : json["created"],
|
|
1058
|
+
"encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
|
|
1059
|
+
"error_present": json["error_present"],
|
|
1060
|
+
"notes_athena_sections": json["notes_athena_sections"] === void 0 ? void 0 : json["notes_athena_sections"] === null ? null : EncounterSectionsFromJSON(json["notes_athena_sections"]),
|
|
1061
|
+
"notes_fhir": json["notes_fhir"] === void 0 ? void 0 : json["notes_fhir"] === null ? null : EncounterEffectFromJSON(json["notes_fhir"]),
|
|
1062
|
+
"openloop_encounter": json["openloop_encounter"] === void 0 ? void 0 : json["openloop_encounter"] === null ? null : EncounterEffectFromJSON(json["openloop_encounter"]),
|
|
1063
|
+
"steadymd_encounter": json["steadymd_encounter"] === void 0 ? void 0 : json["steadymd_encounter"] === null ? null : EncounterEffectFromJSON(json["steadymd_encounter"])
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
// src/models/openapi-generated/patient/models/EncounterOperationResponse.ts
|
|
1068
|
+
function EncounterOperationResponseFromJSON(json) {
|
|
1069
|
+
return EncounterOperationResponseFromJSONTyped(json, false);
|
|
1070
|
+
}
|
|
1071
|
+
function EncounterOperationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1072
|
+
if (json == null) {
|
|
1073
|
+
return json;
|
|
1074
|
+
}
|
|
1075
|
+
return {
|
|
1076
|
+
"idempotency_key": json["idempotency_key"],
|
|
1077
|
+
"patient_id": json["patient_id"],
|
|
1078
|
+
"request_hash": json["request_hash"],
|
|
1079
|
+
"response_body": json["response_body"] === void 0 ? void 0 : json["response_body"] === null ? null : ObservedEncounterResponseFromJSON(json["response_body"]),
|
|
1080
|
+
"response_code": json["response_code"] === void 0 ? void 0 : json["response_code"] === null ? null : json["response_code"],
|
|
1081
|
+
"status": json["status"]
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
// src/models/openapi-generated/patient/models/ObservedIntakeResponse.ts
|
|
1086
|
+
function ObservedIntakeResponseFromJSON(json) {
|
|
1087
|
+
return ObservedIntakeResponseFromJSONTyped(json, false);
|
|
1088
|
+
}
|
|
1089
|
+
function ObservedIntakeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1090
|
+
if (json == null) {
|
|
1091
|
+
return json;
|
|
1092
|
+
}
|
|
1093
|
+
return {
|
|
1094
|
+
"error_messages": json["error_messages"]
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
// src/models/openapi-generated/patient/models/IntakeOperationResponse.ts
|
|
1099
|
+
function IntakeOperationResponseFromJSON(json) {
|
|
1100
|
+
return IntakeOperationResponseFromJSONTyped(json, false);
|
|
1101
|
+
}
|
|
1102
|
+
function IntakeOperationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1103
|
+
if (json == null) {
|
|
1104
|
+
return json;
|
|
1105
|
+
}
|
|
1106
|
+
return {
|
|
1107
|
+
"idempotency_key": json["idempotency_key"],
|
|
1108
|
+
"patient_id": json["patient_id"],
|
|
1109
|
+
"request_hash": json["request_hash"],
|
|
1110
|
+
"response_body": json["response_body"] === void 0 ? void 0 : json["response_body"] === null ? null : ObservedIntakeResponseFromJSON(json["response_body"]),
|
|
1111
|
+
"response_code": json["response_code"] === void 0 ? void 0 : json["response_code"] === null ? null : json["response_code"],
|
|
1112
|
+
"status": json["status"]
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
// src/clients/intakeOperations.ts
|
|
1117
|
+
var sections = /* @__PURE__ */ new Set(["allergies", "cancer_cases", "family_history", "gyn_history", "perinatal_history", "medications", "problems", "social_history", "surgical_history", "vaccines"]);
|
|
1118
|
+
var record = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
1119
|
+
function intakeOperationKey(key) {
|
|
1120
|
+
if (typeof key !== "string" || key.length !== 36 || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(key)) {
|
|
1121
|
+
throw new Error("A canonical UUID operation key is required");
|
|
1122
|
+
}
|
|
1123
|
+
return key;
|
|
1124
|
+
}
|
|
1125
|
+
function intakeRequestSnapshot(request) {
|
|
1126
|
+
const invalid = () => new Error("Valid bounded raw intake terms are required");
|
|
1127
|
+
if (!record(request) || Object.keys(request).sort().join(",") !== "idempotency_key,section,summary") throw invalid();
|
|
1128
|
+
const key = intakeOperationKey(request.idempotency_key);
|
|
1129
|
+
if (!sections.has(request.section)) throw invalid();
|
|
1130
|
+
const raw = request.summary;
|
|
1131
|
+
if (typeof raw === "string" ? !raw.trim() : !record(raw) || Object.keys(raw).length !== 1 || !Object.prototype.hasOwnProperty.call(raw, request.section)) throw invalid();
|
|
1132
|
+
let visited = 0;
|
|
1133
|
+
function snapshot(value, depth) {
|
|
1134
|
+
if (depth > 16 || ++visited > 65536) throw invalid();
|
|
1135
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return value;
|
|
1136
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
1137
|
+
if (!value || typeof value !== "object" || Object.getOwnPropertySymbols(value).length) throw invalid();
|
|
1138
|
+
const array = Array.isArray(value);
|
|
1139
|
+
if (!array && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) throw invalid();
|
|
1140
|
+
const names = Object.getOwnPropertyNames(value).filter((name) => !(array && name === "length"));
|
|
1141
|
+
if (array && (names.length !== value.length || names.some((name, index) => name !== String(index)))) throw invalid();
|
|
1142
|
+
const entries = names.map((name) => {
|
|
1143
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, name);
|
|
1144
|
+
if (!descriptor.enumerable || !("value" in descriptor)) throw invalid();
|
|
1145
|
+
return [name, snapshot(descriptor.value, depth + 1)];
|
|
1146
|
+
});
|
|
1147
|
+
return array ? entries.map(([, item]) => item) : Object.fromEntries(entries);
|
|
1148
|
+
}
|
|
1149
|
+
const summary = snapshot(raw, 0);
|
|
1150
|
+
if (new TextEncoder().encode(JSON.stringify(summary)).length > 65536) throw invalid();
|
|
1151
|
+
return { idempotency_key: key, section: request.section, summary };
|
|
1152
|
+
}
|
|
1153
|
+
function intakeOperationResponse(value, key) {
|
|
1154
|
+
const invalid = () => new Error("Invalid or mismatched intake operation response; reconcile the original key");
|
|
1155
|
+
const required = ["idempotency_key", "patient_id", "request_hash", "status"];
|
|
1156
|
+
if (!record(value) || required.some((name) => !Object.prototype.hasOwnProperty.call(value, name)) || Object.keys(value).some((name) => ![...required, "response_code", "response_body"].includes(name)) || value.idempotency_key !== key || typeof value.patient_id !== "string" || value.patient_id.length > 64 || !/^[A-Za-z0-9.-]+$/.test(value.patient_id) || value.patient_id.trim() !== value.patient_id || typeof value.request_hash !== "string" || value.request_hash.length !== 64 || !/^[0-9a-f]{64}$/.test(value.request_hash) || typeof value.status !== "string" || !["reserved", "dispatching", "unknown", "recorded"].includes(value.status)) throw invalid();
|
|
1157
|
+
const code = value.response_code, body = value.response_body;
|
|
1158
|
+
if (value.status === "recorded") {
|
|
1159
|
+
if (typeof code !== "number" || !Number.isInteger(code) || code < 100 || code > 599 || !record(body) || Object.keys(body).join(",") !== "error_messages" || !Array.isArray(body.error_messages) || body.error_messages.length > 100 || body.error_messages.some((item) => typeof item !== "string" || Array.from(item).length > 4e3)) throw invalid();
|
|
1160
|
+
} else if (code != null || body != null) throw invalid();
|
|
1161
|
+
return IntakeOperationResponseFromJSON(value);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
// src/clients/encounterOperations.ts
|
|
1165
|
+
var effects = ["athena_encounter", "athena_insurance", "openloop_encounter", "steadymd_encounter", "notes_fhir"];
|
|
1166
|
+
var sections2 = ["reason_for_visit", "hpi", "ros", "assessment", "plan"];
|
|
1167
|
+
var statuses = /* @__PURE__ */ new Set(["linked", "failed", "partial", "skipped_no_athena", "skipped_no_openloop", "skipped_no_steadymd", "skipped_no_notes", "skipped_no_content", "skipped_no_package_configured", "skipped_no_openai", "skipped_no_athena_integration", "skipped", "unknown"]);
|
|
1168
|
+
var record2 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
1169
|
+
function encounterRequestSnapshot(request) {
|
|
1170
|
+
const invalid = () => new Error("Valid bounded exact encounter notes are required");
|
|
1171
|
+
if (!record2(request) || Object.keys(request).sort().join(",") !== "idempotency_key,notes") throw invalid();
|
|
1172
|
+
for (const name of Object.getOwnPropertyNames(request)) {
|
|
1173
|
+
const descriptor = Object.getOwnPropertyDescriptor(request, name);
|
|
1174
|
+
if (!descriptor.enumerable || !("value" in descriptor)) throw invalid();
|
|
1175
|
+
}
|
|
1176
|
+
if (Object.getOwnPropertySymbols(request).length) throw invalid();
|
|
1177
|
+
const key = intakeOperationKey(request.idempotency_key), notes = request.notes;
|
|
1178
|
+
if (typeof notes !== "string" || new TextEncoder().encode(notes).length > 65536) throw invalid();
|
|
1179
|
+
const blank = Array.from(notes).every((character) => !character.trim() || character.charCodeAt(0) >= 28 && character.charCodeAt(0) <= 31 || character.charCodeAt(0) === 133);
|
|
1180
|
+
if (blank) throw invalid();
|
|
1181
|
+
for (const character of notes) {
|
|
1182
|
+
const point = character.codePointAt(0);
|
|
1183
|
+
if (point >= 55296 && point <= 57343) throw invalid();
|
|
1184
|
+
}
|
|
1185
|
+
return { idempotency_key: key, notes };
|
|
1186
|
+
}
|
|
1187
|
+
function encounterOperationResponse(value, key) {
|
|
1188
|
+
const invalid = () => new Error("Invalid or mismatched encounter operation response; reconcile the original key");
|
|
1189
|
+
function closed(item, required, optional = []) {
|
|
1190
|
+
if (!record2(item) || required.some((name) => !Object.prototype.hasOwnProperty.call(item, name)) || Object.keys(item).some((name) => ![...required, ...optional].includes(name))) throw invalid();
|
|
1191
|
+
}
|
|
1192
|
+
function effect(item) {
|
|
1193
|
+
closed(item, ["status", "error_present"]);
|
|
1194
|
+
if (typeof item.status !== "string" || !statuses.has(item.status) || typeof item.error_present !== "boolean") throw invalid();
|
|
1195
|
+
}
|
|
1196
|
+
const identifier = (item) => typeof item === "string" && item.length <= 64 && /^[A-Za-z0-9.-]+$/.test(item) && item.trim() === item;
|
|
1197
|
+
closed(value, ["idempotency_key", "patient_id", "request_hash", "status"], ["response_code", "response_body"]);
|
|
1198
|
+
if (value.idempotency_key !== key || !identifier(value.patient_id) || typeof value.request_hash !== "string" || value.request_hash.length !== 64 || !/^[0-9a-f]{64}$/.test(value.request_hash) || typeof value.status !== "string" || !["reserved", "dispatching", "unknown", "recorded"].includes(value.status)) throw invalid();
|
|
1199
|
+
const code = value.response_code, body = value.response_body;
|
|
1200
|
+
if (value.status === "recorded") {
|
|
1201
|
+
if (typeof code !== "number" || !Number.isInteger(code) || code < 100 || code > 599) throw invalid();
|
|
1202
|
+
closed(body, ["clinical_outcome", "error_present"], [...effects, "encounter_id", "created", "notes_athena_sections"]);
|
|
1203
|
+
if (body.clinical_outcome !== "unknown" || typeof body.error_present !== "boolean" || body.encounter_id != null && !identifier(body.encounter_id) || body.created != null && typeof body.created !== "boolean") throw invalid();
|
|
1204
|
+
for (const name of effects) if (body[name] != null) effect(body[name]);
|
|
1205
|
+
if (body.notes_athena_sections != null) {
|
|
1206
|
+
closed(body.notes_athena_sections, ["overall"], sections2);
|
|
1207
|
+
effect(body.notes_athena_sections.overall);
|
|
1208
|
+
for (const name of sections2) if (body.notes_athena_sections[name] != null) effect(body.notes_athena_sections[name]);
|
|
1209
|
+
}
|
|
1210
|
+
} else if (code != null || body != null) throw invalid();
|
|
1211
|
+
return EncounterOperationResponseFromJSON(value);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1013
1214
|
// src/models/openapi-generated/patient/models/StediClaimsResponse.ts
|
|
1014
1215
|
function StediClaimsResponseFromJSON(json) {
|
|
1015
1216
|
return StediClaimsResponseFromJSONTyped(json, false);
|
|
@@ -2324,6 +2525,30 @@ function ListDeliveryOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2324
2525
|
};
|
|
2325
2526
|
}
|
|
2326
2527
|
|
|
2528
|
+
// src/models/openapi-generated/patient/models/CatalogVendor.ts
|
|
2529
|
+
function CatalogVendorFromJSON(json) {
|
|
2530
|
+
return CatalogVendorFromJSONTyped(json, false);
|
|
2531
|
+
}
|
|
2532
|
+
function CatalogVendorFromJSONTyped(json, ignoreDiscriminator) {
|
|
2533
|
+
return json;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
// src/models/openapi-generated/patient/models/CatalogItemKind.ts
|
|
2537
|
+
function CatalogItemKindFromJSON(json) {
|
|
2538
|
+
return CatalogItemKindFromJSONTyped(json, false);
|
|
2539
|
+
}
|
|
2540
|
+
function CatalogItemKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
2541
|
+
return json;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
// src/models/openapi-generated/patient/models/CollectionModality.ts
|
|
2545
|
+
function CollectionModalityFromJSON(json) {
|
|
2546
|
+
return CollectionModalityFromJSONTyped(json, false);
|
|
2547
|
+
}
|
|
2548
|
+
function CollectionModalityFromJSONTyped(json, ignoreDiscriminator) {
|
|
2549
|
+
return json;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2327
2552
|
// src/models/openapi-generated/patient/models/OrderItem.ts
|
|
2328
2553
|
function OrderItemFromJSON(json) {
|
|
2329
2554
|
return OrderItemFromJSONTyped(json, false);
|
|
@@ -2333,9 +2558,13 @@ function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2333
2558
|
return json;
|
|
2334
2559
|
}
|
|
2335
2560
|
return {
|
|
2561
|
+
"collection_modalities": json["collection_modalities"] == null ? void 0 : json["collection_modalities"].map(CollectionModalityFromJSON),
|
|
2562
|
+
"collection_modality": CollectionModalityFromJSON(json["collection_modality"]),
|
|
2336
2563
|
"id": json["id"],
|
|
2337
2564
|
"image": json["image"] === void 0 ? void 0 : json["image"] === null ? null : json["image"],
|
|
2338
|
-
"
|
|
2565
|
+
"kind": CatalogItemKindFromJSON(json["kind"]),
|
|
2566
|
+
"name": json["name"],
|
|
2567
|
+
"vendor": CatalogVendorFromJSON(json["vendor"])
|
|
2339
2568
|
};
|
|
2340
2569
|
}
|
|
2341
2570
|
|
|
@@ -2476,6 +2705,7 @@ function PlaceTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2476
2705
|
"patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
|
|
2477
2706
|
"performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
|
|
2478
2707
|
"priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
|
|
2708
|
+
"quest_placer_order_number": json["quest_placer_order_number"] === void 0 ? void 0 : json["quest_placer_order_number"] === null ? null : json["quest_placer_order_number"],
|
|
2479
2709
|
"reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
|
|
2480
2710
|
"requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
|
|
2481
2711
|
"requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
|
|
@@ -2516,6 +2746,7 @@ function GetTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2516
2746
|
"patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
|
|
2517
2747
|
"performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
|
|
2518
2748
|
"priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
|
|
2749
|
+
"quest_placer_order_number": json["quest_placer_order_number"] === void 0 ? void 0 : json["quest_placer_order_number"] === null ? null : json["quest_placer_order_number"],
|
|
2519
2750
|
"reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
|
|
2520
2751
|
"requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
|
|
2521
2752
|
"requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
|
|
@@ -2556,6 +2787,7 @@ function TestOrderFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2556
2787
|
"patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
|
|
2557
2788
|
"performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
|
|
2558
2789
|
"priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
|
|
2790
|
+
"quest_placer_order_number": json["quest_placer_order_number"] === void 0 ? void 0 : json["quest_placer_order_number"] === null ? null : json["quest_placer_order_number"],
|
|
2559
2791
|
"reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
|
|
2560
2792
|
"requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
|
|
2561
2793
|
"requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
|
|
@@ -2880,6 +3112,32 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
2880
3112
|
body: payload
|
|
2881
3113
|
});
|
|
2882
3114
|
}
|
|
3115
|
+
/** Submit exact approved terms once. Pending/unknown remains unresolved;
|
|
3116
|
+
* recorded HTTP evidence is not independent proof of clinical success.
|
|
3117
|
+
* After transport failure, look up the original key. No retries or fallback.
|
|
3118
|
+
*/
|
|
3119
|
+
async submitPatientIntakeOperation(request) {
|
|
3120
|
+
const body = intakeRequestSnapshot(request);
|
|
3121
|
+
const response = await this.send("POST", "/patients/intake/operations", { body });
|
|
3122
|
+
return intakeOperationResponse(response, body.idempotency_key);
|
|
3123
|
+
}
|
|
3124
|
+
/** Read the original key without writing. A 404 does not prove no effect. */
|
|
3125
|
+
async getPatientIntakeOperation(idempotencyKey) {
|
|
3126
|
+
const key = intakeOperationKey(idempotencyKey);
|
|
3127
|
+
return intakeOperationResponse(await this.send("GET", `/patients/intake/operations/${key}`), key);
|
|
3128
|
+
}
|
|
3129
|
+
/** Submit exact reviewed notes once. Recorded HTTP never settles clinical effects.
|
|
3130
|
+
* Pending/unknown remains unresolved; reconcile the original key, with no retry or fallback.
|
|
3131
|
+
*/
|
|
3132
|
+
async submitPatientEncounterOperation(request) {
|
|
3133
|
+
const body = encounterRequestSnapshot(request);
|
|
3134
|
+
return encounterOperationResponse(await this.send("POST", "/patients/encounter/operations", { body }), body.idempotency_key);
|
|
3135
|
+
}
|
|
3136
|
+
/** Read only the original key. A 404 does not prove no clinical effects. */
|
|
3137
|
+
async getPatientEncounterOperation(idempotencyKey) {
|
|
3138
|
+
const key = intakeOperationKey(idempotencyKey);
|
|
3139
|
+
return encounterOperationResponse(await this.send("GET", `/patients/encounter/operations/${key}`), key);
|
|
3140
|
+
}
|
|
2883
3141
|
/** GET /patients/attributes - get the authenticated patient's arbitrary JSON attributes. */
|
|
2884
3142
|
getAttributes() {
|
|
2885
3143
|
return this.send("GET", "/patients/attributes", {});
|