@healthcloudai/hc-sdk 3.13.4 → 3.14.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 +432 -0
- package/dist/index.d.cts +1875 -1007
- package/dist/index.d.ts +1875 -1007
- package/dist/index.js +432 -0
- package/docs/clients/PatientClient.md +8 -0
- package/docs/docs-manifest.json +28 -3
- package/docs/examples/index.md +8 -0
- package/docs/index.md +8 -0
- package/docs/models/CancelTestOrderResponse.md +19 -0
- package/docs/models/CreateDeliveryOrderRequest.md +21 -0
- package/docs/models/DeliveryContact.md +24 -0
- package/docs/models/DeliveryOrder.md +30 -0
- package/docs/models/DeliveryPharmacy.md +25 -0
- package/docs/models/GetPatientResponse.md +1 -0
- package/docs/models/GetTestOrderResponse.md +44 -0
- package/docs/models/ListDeliveryOrdersResponse.md +19 -0
- package/docs/models/ListOrderItemsResponse.md +18 -0
- package/docs/models/ListTestOrdersResponse.md +18 -0
- package/docs/models/OrderItem.md +19 -0
- package/docs/models/OrderPriority.md +15 -0
- package/docs/models/OrderStatus.md +15 -0
- package/docs/models/PatientDemographics.md +1 -0
- package/docs/models/PlaceTestOrderRequest.md +43 -0
- package/docs/models/PlaceTestOrderResponse.md +44 -0
- package/docs/models/Specimen.md +30 -0
- package/docs/models/SpecimenStatus.md +15 -0
- package/docs/models/TestOrder.md +44 -0
- package/docs/models/index.md +17 -0
- package/docs/operations/connectors.athenaGetInsurancePackages.md +1 -1
- package/docs/operations/fieldagent.listPatients.md +1 -0
- package/docs/operations/patient.addPatientIntake.md +12 -1
- package/docs/operations/patient.cancelTestOrder.md +152 -0
- package/docs/operations/patient.createDeliveryOrder.md +171 -0
- package/docs/operations/patient.getDeliveryOrder.md +156 -0
- package/docs/operations/patient.getPatient.md +1 -0
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +1 -0
- package/docs/operations/patient.getTestOrder.md +194 -0
- package/docs/operations/patient.listDeliveryOrders.md +156 -0
- package/docs/operations/patient.listOrderItems.md +129 -0
- package/docs/operations/patient.listTestOrders.md +201 -0
- package/docs/operations/patient.placeTestOrder.md +309 -0
- package/docs/operations/patient.submitPatientIntake.md +4 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2193,8 +2193,440 @@ function GetDefaultProviderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2193
2193
|
};
|
|
2194
2194
|
}
|
|
2195
2195
|
|
|
2196
|
+
// src/models/openapi-generated/patient/models/DeliveryPharmacy.ts
|
|
2197
|
+
function DeliveryPharmacyFromJSON(json) {
|
|
2198
|
+
return DeliveryPharmacyFromJSONTyped(json, false);
|
|
2199
|
+
}
|
|
2200
|
+
function DeliveryPharmacyFromJSONTyped(json, ignoreDiscriminator) {
|
|
2201
|
+
if (json == null) {
|
|
2202
|
+
return json;
|
|
2203
|
+
}
|
|
2204
|
+
return {
|
|
2205
|
+
"city": json["city"],
|
|
2206
|
+
"country": json["country"] == null ? void 0 : json["country"],
|
|
2207
|
+
"email": json["email"],
|
|
2208
|
+
"name": json["name"],
|
|
2209
|
+
"notes": json["notes"] == null ? void 0 : json["notes"],
|
|
2210
|
+
"phone_number": json["phone_number"],
|
|
2211
|
+
"state": json["state"],
|
|
2212
|
+
"street_address": json["street_address"],
|
|
2213
|
+
"zip_code": json["zip_code"]
|
|
2214
|
+
};
|
|
2215
|
+
}
|
|
2216
|
+
function DeliveryPharmacyToJSON(json) {
|
|
2217
|
+
return DeliveryPharmacyToJSONTyped(json, false);
|
|
2218
|
+
}
|
|
2219
|
+
function DeliveryPharmacyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2220
|
+
if (value == null) {
|
|
2221
|
+
return value;
|
|
2222
|
+
}
|
|
2223
|
+
return {
|
|
2224
|
+
"city": value["city"],
|
|
2225
|
+
"country": value["country"],
|
|
2226
|
+
"email": value["email"],
|
|
2227
|
+
"name": value["name"],
|
|
2228
|
+
"notes": value["notes"],
|
|
2229
|
+
"phone_number": value["phone_number"],
|
|
2230
|
+
"state": value["state"],
|
|
2231
|
+
"street_address": value["street_address"],
|
|
2232
|
+
"zip_code": value["zip_code"]
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
// src/models/openapi-generated/patient/models/DeliveryContact.ts
|
|
2237
|
+
function DeliveryContactToJSON(json) {
|
|
2238
|
+
return DeliveryContactToJSONTyped(json, false);
|
|
2239
|
+
}
|
|
2240
|
+
function DeliveryContactToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2241
|
+
if (value == null) {
|
|
2242
|
+
return value;
|
|
2243
|
+
}
|
|
2244
|
+
return {
|
|
2245
|
+
"city": value["city"],
|
|
2246
|
+
"country": value["country"],
|
|
2247
|
+
"name": value["name"],
|
|
2248
|
+
"notes": value["notes"],
|
|
2249
|
+
"phone_number": value["phone_number"],
|
|
2250
|
+
"state": value["state"],
|
|
2251
|
+
"street_address": value["street_address"],
|
|
2252
|
+
"zip_code": value["zip_code"]
|
|
2253
|
+
};
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
// src/models/openapi-generated/patient/models/CreateDeliveryOrderRequest.ts
|
|
2257
|
+
function CreateDeliveryOrderRequestToJSON(json) {
|
|
2258
|
+
return CreateDeliveryOrderRequestToJSONTyped(json, false);
|
|
2259
|
+
}
|
|
2260
|
+
function CreateDeliveryOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2261
|
+
if (value == null) {
|
|
2262
|
+
return value;
|
|
2263
|
+
}
|
|
2264
|
+
return {
|
|
2265
|
+
"dropoff": DeliveryContactToJSON(value["dropoff"]),
|
|
2266
|
+
"idempotency_key": value["idempotency_key"],
|
|
2267
|
+
"order_item_id": value["order_item_id"],
|
|
2268
|
+
"pickup_pharmacy": DeliveryPharmacyToJSON(value["pickup_pharmacy"]),
|
|
2269
|
+
"vendor": value["vendor"]
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
// src/models/openapi-generated/patient/models/DeliveryOrder.ts
|
|
2274
|
+
function DeliveryOrderFromJSON(json) {
|
|
2275
|
+
return DeliveryOrderFromJSONTyped(json, false);
|
|
2276
|
+
}
|
|
2277
|
+
function DeliveryOrderFromJSONTyped(json, ignoreDiscriminator) {
|
|
2278
|
+
if (json == null) {
|
|
2279
|
+
return json;
|
|
2280
|
+
}
|
|
2281
|
+
return {
|
|
2282
|
+
"created_at": new Date(json["created_at"]),
|
|
2283
|
+
"delivery_order_id": json["delivery_order_id"],
|
|
2284
|
+
"fhir_status": json["fhir_status"] == null ? void 0 : json["fhir_status"],
|
|
2285
|
+
"notification_status": json["notification_status"] == null ? void 0 : json["notification_status"],
|
|
2286
|
+
"order_item_id": json["order_item_id"],
|
|
2287
|
+
"order_reference": json["order_reference"],
|
|
2288
|
+
"pickup_pharmacy": DeliveryPharmacyFromJSON(json["pickup_pharmacy"]),
|
|
2289
|
+
"resource_type": json["resource_type"] == null ? void 0 : json["resource_type"],
|
|
2290
|
+
"status": json["status"],
|
|
2291
|
+
"tracking_url": json["tracking_url"] === void 0 ? void 0 : json["tracking_url"] === null ? null : json["tracking_url"],
|
|
2292
|
+
"updated_at": new Date(json["updated_at"]),
|
|
2293
|
+
"vendor": json["vendor"],
|
|
2294
|
+
"vendor_order_id": json["vendor_order_id"] === void 0 ? void 0 : json["vendor_order_id"] === null ? null : json["vendor_order_id"],
|
|
2295
|
+
"vendor_status": json["vendor_status"] === void 0 ? void 0 : json["vendor_status"] === null ? null : json["vendor_status"]
|
|
2296
|
+
};
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
// src/models/openapi-generated/patient/models/ListDeliveryOrdersResponse.ts
|
|
2300
|
+
function ListDeliveryOrdersResponseFromJSON(json) {
|
|
2301
|
+
return ListDeliveryOrdersResponseFromJSONTyped(json, false);
|
|
2302
|
+
}
|
|
2303
|
+
function ListDeliveryOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2304
|
+
if (json == null) {
|
|
2305
|
+
return json;
|
|
2306
|
+
}
|
|
2307
|
+
return {
|
|
2308
|
+
"limit": json["limit"],
|
|
2309
|
+
"offset": json["offset"],
|
|
2310
|
+
"orders": json["orders"].map(DeliveryOrderFromJSON)
|
|
2311
|
+
};
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
// src/models/openapi-generated/patient/models/OrderItem.ts
|
|
2315
|
+
function OrderItemFromJSON(json) {
|
|
2316
|
+
return OrderItemFromJSONTyped(json, false);
|
|
2317
|
+
}
|
|
2318
|
+
function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
2319
|
+
if (json == null) {
|
|
2320
|
+
return json;
|
|
2321
|
+
}
|
|
2322
|
+
return {
|
|
2323
|
+
"id": json["id"],
|
|
2324
|
+
"image": json["image"] === void 0 ? void 0 : json["image"] === null ? null : json["image"],
|
|
2325
|
+
"name": json["name"]
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
// src/models/openapi-generated/patient/models/ListOrderItemsResponse.ts
|
|
2330
|
+
function ListOrderItemsResponseFromJSON(json) {
|
|
2331
|
+
return ListOrderItemsResponseFromJSONTyped(json, false);
|
|
2332
|
+
}
|
|
2333
|
+
function ListOrderItemsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2334
|
+
if (json == null) {
|
|
2335
|
+
return json;
|
|
2336
|
+
}
|
|
2337
|
+
return {
|
|
2338
|
+
"items": json["items"].map(OrderItemFromJSON),
|
|
2339
|
+
"total": json["total"]
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
// src/models/openapi-generated/patient/models/OrderPriority.ts
|
|
2344
|
+
function OrderPriorityFromJSON(json) {
|
|
2345
|
+
return OrderPriorityFromJSONTyped(json, false);
|
|
2346
|
+
}
|
|
2347
|
+
function OrderPriorityFromJSONTyped(json, ignoreDiscriminator) {
|
|
2348
|
+
return json;
|
|
2349
|
+
}
|
|
2350
|
+
function OrderPriorityToJSON(value) {
|
|
2351
|
+
return value;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
// src/models/openapi-generated/patient/models/PlaceTestOrderRequest.ts
|
|
2355
|
+
function PlaceTestOrderRequestToJSON(json) {
|
|
2356
|
+
return PlaceTestOrderRequestToJSONTyped(json, false);
|
|
2357
|
+
}
|
|
2358
|
+
function PlaceTestOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2359
|
+
if (value == null) {
|
|
2360
|
+
return value;
|
|
2361
|
+
}
|
|
2362
|
+
return {
|
|
2363
|
+
"cpt_code": value["cpt_code"],
|
|
2364
|
+
"diagnosis_codes": value["diagnosis_codes"],
|
|
2365
|
+
"diagnosis_snomed_code": value["diagnosis_snomed_code"],
|
|
2366
|
+
"display": value["display"],
|
|
2367
|
+
"encounter_id": value["encounter_id"],
|
|
2368
|
+
"fasting_required": value["fasting_required"],
|
|
2369
|
+
"idempotency_key": value["idempotency_key"],
|
|
2370
|
+
"lab_name": value["lab_name"],
|
|
2371
|
+
"loinc_code": value["loinc_code"],
|
|
2372
|
+
"notes": value["notes"],
|
|
2373
|
+
"occurrence_date": value["occurrence_date"] == null ? value["occurrence_date"] : value["occurrence_date"].toISOString().substring(0, 10),
|
|
2374
|
+
"occurrence_datetime": value["occurrence_datetime"] == null ? value["occurrence_datetime"] : value["occurrence_datetime"].toISOString(),
|
|
2375
|
+
"performer_name": value["performer_name"],
|
|
2376
|
+
"priority": OrderPriorityToJSON(value["priority"]),
|
|
2377
|
+
"reason": value["reason"],
|
|
2378
|
+
"requester_name": value["requester_name"],
|
|
2379
|
+
"requester_npi": value["requester_npi"],
|
|
2380
|
+
"requisition_number": value["requisition_number"],
|
|
2381
|
+
"snomed_code": value["snomed_code"],
|
|
2382
|
+
"standing_order": value["standing_order"],
|
|
2383
|
+
"test_name": value["test_name"]
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
// src/models/openapi-generated/patient/models/SpecimenStatus.ts
|
|
2388
|
+
function SpecimenStatusFromJSON(json) {
|
|
2389
|
+
return SpecimenStatusFromJSONTyped(json, false);
|
|
2390
|
+
}
|
|
2391
|
+
function SpecimenStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
2392
|
+
return json;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
// src/models/openapi-generated/patient/models/SpecimenType.ts
|
|
2396
|
+
function SpecimenTypeFromJSON2(json) {
|
|
2397
|
+
return SpecimenTypeFromJSONTyped2(json, false);
|
|
2398
|
+
}
|
|
2399
|
+
function SpecimenTypeFromJSONTyped2(json, ignoreDiscriminator) {
|
|
2400
|
+
return json;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
// src/models/openapi-generated/patient/models/Specimen.ts
|
|
2404
|
+
function SpecimenFromJSON(json) {
|
|
2405
|
+
return SpecimenFromJSONTyped(json, false);
|
|
2406
|
+
}
|
|
2407
|
+
function SpecimenFromJSONTyped(json, ignoreDiscriminator) {
|
|
2408
|
+
if (json == null) {
|
|
2409
|
+
return json;
|
|
2410
|
+
}
|
|
2411
|
+
return {
|
|
2412
|
+
"accession_number": json["accession_number"] === void 0 ? void 0 : json["accession_number"] === null ? null : json["accession_number"],
|
|
2413
|
+
"body_site": json["body_site"] === void 0 ? void 0 : json["body_site"] === null ? null : json["body_site"],
|
|
2414
|
+
"collected_by": json["collected_by"] === void 0 ? void 0 : json["collected_by"] === null ? null : json["collected_by"],
|
|
2415
|
+
"collection_date": json["collection_date"] === void 0 ? void 0 : json["collection_date"] === null ? null : new Date(json["collection_date"]),
|
|
2416
|
+
"collection_datetime": json["collection_datetime"] === void 0 ? void 0 : json["collection_datetime"] === null ? null : new Date(json["collection_datetime"]),
|
|
2417
|
+
"condition": json["condition"] === void 0 ? void 0 : json["condition"] === null ? null : json["condition"],
|
|
2418
|
+
"container": json["container"] === void 0 ? void 0 : json["container"] === null ? null : json["container"],
|
|
2419
|
+
"fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
|
|
2420
|
+
"notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
|
|
2421
|
+
"received_datetime": json["received_datetime"] === void 0 ? void 0 : json["received_datetime"] === null ? null : new Date(json["received_datetime"]),
|
|
2422
|
+
"specimen_id": json["specimen_id"] == null ? void 0 : json["specimen_id"],
|
|
2423
|
+
"status": json["status"] == null ? void 0 : SpecimenStatusFromJSON(json["status"]),
|
|
2424
|
+
"type": SpecimenTypeFromJSON2(json["type"]),
|
|
2425
|
+
"volume_ml": json["volume_ml"] === void 0 ? void 0 : json["volume_ml"] === null ? null : json["volume_ml"]
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
// src/models/openapi-generated/patient/models/OrderStatus.ts
|
|
2430
|
+
function OrderStatusFromJSON(json) {
|
|
2431
|
+
return OrderStatusFromJSONTyped(json, false);
|
|
2432
|
+
}
|
|
2433
|
+
function OrderStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
2434
|
+
return json;
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2437
|
+
// src/models/openapi-generated/patient/models/PlaceTestOrderResponse.ts
|
|
2438
|
+
function PlaceTestOrderResponseFromJSON(json) {
|
|
2439
|
+
return PlaceTestOrderResponseFromJSONTyped(json, false);
|
|
2440
|
+
}
|
|
2441
|
+
function PlaceTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2442
|
+
if (json == null) {
|
|
2443
|
+
return json;
|
|
2444
|
+
}
|
|
2445
|
+
return {
|
|
2446
|
+
"athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
|
|
2447
|
+
"athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
|
|
2448
|
+
"athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
|
|
2449
|
+
"authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
|
|
2450
|
+
"cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
|
|
2451
|
+
"diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
|
|
2452
|
+
"display": json["display"],
|
|
2453
|
+
"encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
|
|
2454
|
+
"fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
|
|
2455
|
+
"fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
|
|
2456
|
+
"intent": json["intent"] == null ? void 0 : json["intent"],
|
|
2457
|
+
"lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
|
|
2458
|
+
"loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
|
|
2459
|
+
"notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
|
|
2460
|
+
"occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
|
|
2461
|
+
"occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
|
|
2462
|
+
"order_id": json["order_id"] == null ? void 0 : json["order_id"],
|
|
2463
|
+
"patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
|
|
2464
|
+
"performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
|
|
2465
|
+
"priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
|
|
2466
|
+
"reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
|
|
2467
|
+
"requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
|
|
2468
|
+
"requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
|
|
2469
|
+
"requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
|
|
2470
|
+
"snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
|
|
2471
|
+
"specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
|
|
2472
|
+
"standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
|
|
2473
|
+
"status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
|
|
2474
|
+
};
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
// src/models/openapi-generated/patient/models/GetTestOrderResponse.ts
|
|
2478
|
+
function GetTestOrderResponseFromJSON(json) {
|
|
2479
|
+
return GetTestOrderResponseFromJSONTyped(json, false);
|
|
2480
|
+
}
|
|
2481
|
+
function GetTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2482
|
+
if (json == null) {
|
|
2483
|
+
return json;
|
|
2484
|
+
}
|
|
2485
|
+
return {
|
|
2486
|
+
"athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
|
|
2487
|
+
"athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
|
|
2488
|
+
"athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
|
|
2489
|
+
"authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
|
|
2490
|
+
"cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
|
|
2491
|
+
"diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
|
|
2492
|
+
"display": json["display"],
|
|
2493
|
+
"encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
|
|
2494
|
+
"fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
|
|
2495
|
+
"fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
|
|
2496
|
+
"intent": json["intent"] == null ? void 0 : json["intent"],
|
|
2497
|
+
"lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
|
|
2498
|
+
"loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
|
|
2499
|
+
"notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
|
|
2500
|
+
"occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
|
|
2501
|
+
"occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
|
|
2502
|
+
"order_id": json["order_id"] == null ? void 0 : json["order_id"],
|
|
2503
|
+
"patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
|
|
2504
|
+
"performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
|
|
2505
|
+
"priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
|
|
2506
|
+
"reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
|
|
2507
|
+
"requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
|
|
2508
|
+
"requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
|
|
2509
|
+
"requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
|
|
2510
|
+
"snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
|
|
2511
|
+
"specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
|
|
2512
|
+
"standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
|
|
2513
|
+
"status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
|
|
2514
|
+
};
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
// src/models/openapi-generated/patient/models/TestOrder.ts
|
|
2518
|
+
function TestOrderFromJSON(json) {
|
|
2519
|
+
return TestOrderFromJSONTyped(json, false);
|
|
2520
|
+
}
|
|
2521
|
+
function TestOrderFromJSONTyped(json, ignoreDiscriminator) {
|
|
2522
|
+
if (json == null) {
|
|
2523
|
+
return json;
|
|
2524
|
+
}
|
|
2525
|
+
return {
|
|
2526
|
+
"athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
|
|
2527
|
+
"athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
|
|
2528
|
+
"athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
|
|
2529
|
+
"authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
|
|
2530
|
+
"cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
|
|
2531
|
+
"diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
|
|
2532
|
+
"display": json["display"],
|
|
2533
|
+
"encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
|
|
2534
|
+
"fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
|
|
2535
|
+
"fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
|
|
2536
|
+
"intent": json["intent"] == null ? void 0 : json["intent"],
|
|
2537
|
+
"lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
|
|
2538
|
+
"loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
|
|
2539
|
+
"notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
|
|
2540
|
+
"occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
|
|
2541
|
+
"occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
|
|
2542
|
+
"order_id": json["order_id"] == null ? void 0 : json["order_id"],
|
|
2543
|
+
"patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
|
|
2544
|
+
"performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
|
|
2545
|
+
"priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
|
|
2546
|
+
"reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
|
|
2547
|
+
"requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
|
|
2548
|
+
"requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
|
|
2549
|
+
"requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
|
|
2550
|
+
"snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
|
|
2551
|
+
"specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
|
|
2552
|
+
"standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
|
|
2553
|
+
"status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
|
|
2554
|
+
};
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
// src/models/openapi-generated/patient/models/ListTestOrdersResponse.ts
|
|
2558
|
+
function ListTestOrdersResponseFromJSON(json) {
|
|
2559
|
+
return ListTestOrdersResponseFromJSONTyped(json, false);
|
|
2560
|
+
}
|
|
2561
|
+
function ListTestOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2562
|
+
if (json == null) {
|
|
2563
|
+
return json;
|
|
2564
|
+
}
|
|
2565
|
+
return {
|
|
2566
|
+
"orders": json["orders"].map(TestOrderFromJSON),
|
|
2567
|
+
"total": json["total"]
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
// src/models/openapi-generated/patient/models/CancelTestOrderResponse.ts
|
|
2572
|
+
function CancelTestOrderResponseFromJSON(json) {
|
|
2573
|
+
return CancelTestOrderResponseFromJSONTyped(json, false);
|
|
2574
|
+
}
|
|
2575
|
+
function CancelTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2576
|
+
if (json == null) {
|
|
2577
|
+
return json;
|
|
2578
|
+
}
|
|
2579
|
+
return {
|
|
2580
|
+
"cancelled": json["cancelled"],
|
|
2581
|
+
"fhir_id": json["fhir_id"],
|
|
2582
|
+
"status": json["status"]
|
|
2583
|
+
};
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2196
2586
|
// src/clients/PatientClient.ts
|
|
2197
2587
|
var PatientClient = class extends BaseServiceClient {
|
|
2588
|
+
/** Create a clinical order; Athena requires an owned linked encounter and existing diagnosis. */
|
|
2589
|
+
async placeTestOrder(request) {
|
|
2590
|
+
return PlaceTestOrderResponseFromJSON(await this.send("POST", "/patients/orders", {
|
|
2591
|
+
body: PlaceTestOrderRequestToJSON(request)
|
|
2592
|
+
}));
|
|
2593
|
+
}
|
|
2594
|
+
async getTestOrder(orderId) {
|
|
2595
|
+
return GetTestOrderResponseFromJSON(await this.send("GET", "/patients/orders/{order_id}", {
|
|
2596
|
+
pathParams: { order_id: orderId }
|
|
2597
|
+
}));
|
|
2598
|
+
}
|
|
2599
|
+
async listTestOrders(query = {}) {
|
|
2600
|
+
return ListTestOrdersResponseFromJSON(await this.send("GET", "/patients/orders", { query }));
|
|
2601
|
+
}
|
|
2602
|
+
/** Athena-linked cancellations return a conflict until cancelled in Athena. */
|
|
2603
|
+
async cancelTestOrder(orderId) {
|
|
2604
|
+
return CancelTestOrderResponseFromJSON(await this.send("DELETE", "/patients/orders/{order_id}", {
|
|
2605
|
+
pathParams: { order_id: orderId }
|
|
2606
|
+
}));
|
|
2607
|
+
}
|
|
2608
|
+
/** List orderable catalog items: id, name and image. */
|
|
2609
|
+
async listOrderItems() {
|
|
2610
|
+
return ListOrderItemsResponseFromJSON(await this.send("GET", "/patients/order-items"));
|
|
2611
|
+
}
|
|
2612
|
+
/** Submit a delivery; reuse idempotency_key for identical retries. Can dispatch a courier. */
|
|
2613
|
+
async createDeliveryOrder(request) {
|
|
2614
|
+
const response = await this.send("POST", "/patients/delivery-orders", {
|
|
2615
|
+
body: CreateDeliveryOrderRequestToJSON(request)
|
|
2616
|
+
});
|
|
2617
|
+
return DeliveryOrderFromJSON(response);
|
|
2618
|
+
}
|
|
2619
|
+
/** Get an owned delivery by internal ID and refresh its vendor status. */
|
|
2620
|
+
async getDeliveryOrder(deliveryOrderId) {
|
|
2621
|
+
const response = await this.send("GET", "/patients/delivery-orders/{delivery_order_id}", {
|
|
2622
|
+
pathParams: { delivery_order_id: deliveryOrderId }
|
|
2623
|
+
});
|
|
2624
|
+
return DeliveryOrderFromJSON(response);
|
|
2625
|
+
}
|
|
2626
|
+
/** List saved delivery orders; vendor statuses are last observed values. */
|
|
2627
|
+
async listDeliveryOrders(query = {}) {
|
|
2628
|
+
return ListDeliveryOrdersResponseFromJSON(await this.send("GET", "/patients/delivery-orders", { query }));
|
|
2629
|
+
}
|
|
2198
2630
|
/** Add one agent-collected intake section and return actionable validation errors. */
|
|
2199
2631
|
async addToIntake(patientId, section, summary) {
|
|
2200
2632
|
const response = await this.send("POST", "/healthrecords/intake/add", {
|