@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.
Files changed (43) hide show
  1. package/dist/index.cjs +432 -0
  2. package/dist/index.d.cts +1875 -1007
  3. package/dist/index.d.ts +1875 -1007
  4. package/dist/index.js +432 -0
  5. package/docs/clients/PatientClient.md +8 -0
  6. package/docs/docs-manifest.json +28 -3
  7. package/docs/examples/index.md +8 -0
  8. package/docs/index.md +8 -0
  9. package/docs/models/CancelTestOrderResponse.md +19 -0
  10. package/docs/models/CreateDeliveryOrderRequest.md +21 -0
  11. package/docs/models/DeliveryContact.md +24 -0
  12. package/docs/models/DeliveryOrder.md +30 -0
  13. package/docs/models/DeliveryPharmacy.md +25 -0
  14. package/docs/models/GetPatientResponse.md +1 -0
  15. package/docs/models/GetTestOrderResponse.md +44 -0
  16. package/docs/models/ListDeliveryOrdersResponse.md +19 -0
  17. package/docs/models/ListOrderItemsResponse.md +18 -0
  18. package/docs/models/ListTestOrdersResponse.md +18 -0
  19. package/docs/models/OrderItem.md +19 -0
  20. package/docs/models/OrderPriority.md +15 -0
  21. package/docs/models/OrderStatus.md +15 -0
  22. package/docs/models/PatientDemographics.md +1 -0
  23. package/docs/models/PlaceTestOrderRequest.md +43 -0
  24. package/docs/models/PlaceTestOrderResponse.md +44 -0
  25. package/docs/models/Specimen.md +30 -0
  26. package/docs/models/SpecimenStatus.md +15 -0
  27. package/docs/models/TestOrder.md +44 -0
  28. package/docs/models/index.md +17 -0
  29. package/docs/operations/connectors.athenaGetInsurancePackages.md +1 -1
  30. package/docs/operations/fieldagent.listPatients.md +1 -0
  31. package/docs/operations/patient.addPatientIntake.md +12 -1
  32. package/docs/operations/patient.cancelTestOrder.md +152 -0
  33. package/docs/operations/patient.createDeliveryOrder.md +171 -0
  34. package/docs/operations/patient.getDeliveryOrder.md +156 -0
  35. package/docs/operations/patient.getPatient.md +1 -0
  36. package/docs/operations/patient.getPatientSidebarPatientSidebar.md +1 -0
  37. package/docs/operations/patient.getTestOrder.md +194 -0
  38. package/docs/operations/patient.listDeliveryOrders.md +156 -0
  39. package/docs/operations/patient.listOrderItems.md +129 -0
  40. package/docs/operations/patient.listTestOrders.md +201 -0
  41. package/docs/operations/patient.placeTestOrder.md +309 -0
  42. package/docs/operations/patient.submitPatientIntake.md +4 -2
  43. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2118,8 +2118,440 @@ function GetDefaultProviderResponseFromJSONTyped(json, ignoreDiscriminator) {
2118
2118
  };
2119
2119
  }
2120
2120
 
2121
+ // src/models/openapi-generated/patient/models/DeliveryPharmacy.ts
2122
+ function DeliveryPharmacyFromJSON(json) {
2123
+ return DeliveryPharmacyFromJSONTyped(json, false);
2124
+ }
2125
+ function DeliveryPharmacyFromJSONTyped(json, ignoreDiscriminator) {
2126
+ if (json == null) {
2127
+ return json;
2128
+ }
2129
+ return {
2130
+ "city": json["city"],
2131
+ "country": json["country"] == null ? void 0 : json["country"],
2132
+ "email": json["email"],
2133
+ "name": json["name"],
2134
+ "notes": json["notes"] == null ? void 0 : json["notes"],
2135
+ "phone_number": json["phone_number"],
2136
+ "state": json["state"],
2137
+ "street_address": json["street_address"],
2138
+ "zip_code": json["zip_code"]
2139
+ };
2140
+ }
2141
+ function DeliveryPharmacyToJSON(json) {
2142
+ return DeliveryPharmacyToJSONTyped(json, false);
2143
+ }
2144
+ function DeliveryPharmacyToJSONTyped(value, ignoreDiscriminator = false) {
2145
+ if (value == null) {
2146
+ return value;
2147
+ }
2148
+ return {
2149
+ "city": value["city"],
2150
+ "country": value["country"],
2151
+ "email": value["email"],
2152
+ "name": value["name"],
2153
+ "notes": value["notes"],
2154
+ "phone_number": value["phone_number"],
2155
+ "state": value["state"],
2156
+ "street_address": value["street_address"],
2157
+ "zip_code": value["zip_code"]
2158
+ };
2159
+ }
2160
+
2161
+ // src/models/openapi-generated/patient/models/DeliveryContact.ts
2162
+ function DeliveryContactToJSON(json) {
2163
+ return DeliveryContactToJSONTyped(json, false);
2164
+ }
2165
+ function DeliveryContactToJSONTyped(value, ignoreDiscriminator = false) {
2166
+ if (value == null) {
2167
+ return value;
2168
+ }
2169
+ return {
2170
+ "city": value["city"],
2171
+ "country": value["country"],
2172
+ "name": value["name"],
2173
+ "notes": value["notes"],
2174
+ "phone_number": value["phone_number"],
2175
+ "state": value["state"],
2176
+ "street_address": value["street_address"],
2177
+ "zip_code": value["zip_code"]
2178
+ };
2179
+ }
2180
+
2181
+ // src/models/openapi-generated/patient/models/CreateDeliveryOrderRequest.ts
2182
+ function CreateDeliveryOrderRequestToJSON(json) {
2183
+ return CreateDeliveryOrderRequestToJSONTyped(json, false);
2184
+ }
2185
+ function CreateDeliveryOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
2186
+ if (value == null) {
2187
+ return value;
2188
+ }
2189
+ return {
2190
+ "dropoff": DeliveryContactToJSON(value["dropoff"]),
2191
+ "idempotency_key": value["idempotency_key"],
2192
+ "order_item_id": value["order_item_id"],
2193
+ "pickup_pharmacy": DeliveryPharmacyToJSON(value["pickup_pharmacy"]),
2194
+ "vendor": value["vendor"]
2195
+ };
2196
+ }
2197
+
2198
+ // src/models/openapi-generated/patient/models/DeliveryOrder.ts
2199
+ function DeliveryOrderFromJSON(json) {
2200
+ return DeliveryOrderFromJSONTyped(json, false);
2201
+ }
2202
+ function DeliveryOrderFromJSONTyped(json, ignoreDiscriminator) {
2203
+ if (json == null) {
2204
+ return json;
2205
+ }
2206
+ return {
2207
+ "created_at": new Date(json["created_at"]),
2208
+ "delivery_order_id": json["delivery_order_id"],
2209
+ "fhir_status": json["fhir_status"] == null ? void 0 : json["fhir_status"],
2210
+ "notification_status": json["notification_status"] == null ? void 0 : json["notification_status"],
2211
+ "order_item_id": json["order_item_id"],
2212
+ "order_reference": json["order_reference"],
2213
+ "pickup_pharmacy": DeliveryPharmacyFromJSON(json["pickup_pharmacy"]),
2214
+ "resource_type": json["resource_type"] == null ? void 0 : json["resource_type"],
2215
+ "status": json["status"],
2216
+ "tracking_url": json["tracking_url"] === void 0 ? void 0 : json["tracking_url"] === null ? null : json["tracking_url"],
2217
+ "updated_at": new Date(json["updated_at"]),
2218
+ "vendor": json["vendor"],
2219
+ "vendor_order_id": json["vendor_order_id"] === void 0 ? void 0 : json["vendor_order_id"] === null ? null : json["vendor_order_id"],
2220
+ "vendor_status": json["vendor_status"] === void 0 ? void 0 : json["vendor_status"] === null ? null : json["vendor_status"]
2221
+ };
2222
+ }
2223
+
2224
+ // src/models/openapi-generated/patient/models/ListDeliveryOrdersResponse.ts
2225
+ function ListDeliveryOrdersResponseFromJSON(json) {
2226
+ return ListDeliveryOrdersResponseFromJSONTyped(json, false);
2227
+ }
2228
+ function ListDeliveryOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
2229
+ if (json == null) {
2230
+ return json;
2231
+ }
2232
+ return {
2233
+ "limit": json["limit"],
2234
+ "offset": json["offset"],
2235
+ "orders": json["orders"].map(DeliveryOrderFromJSON)
2236
+ };
2237
+ }
2238
+
2239
+ // src/models/openapi-generated/patient/models/OrderItem.ts
2240
+ function OrderItemFromJSON(json) {
2241
+ return OrderItemFromJSONTyped(json, false);
2242
+ }
2243
+ function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
2244
+ if (json == null) {
2245
+ return json;
2246
+ }
2247
+ return {
2248
+ "id": json["id"],
2249
+ "image": json["image"] === void 0 ? void 0 : json["image"] === null ? null : json["image"],
2250
+ "name": json["name"]
2251
+ };
2252
+ }
2253
+
2254
+ // src/models/openapi-generated/patient/models/ListOrderItemsResponse.ts
2255
+ function ListOrderItemsResponseFromJSON(json) {
2256
+ return ListOrderItemsResponseFromJSONTyped(json, false);
2257
+ }
2258
+ function ListOrderItemsResponseFromJSONTyped(json, ignoreDiscriminator) {
2259
+ if (json == null) {
2260
+ return json;
2261
+ }
2262
+ return {
2263
+ "items": json["items"].map(OrderItemFromJSON),
2264
+ "total": json["total"]
2265
+ };
2266
+ }
2267
+
2268
+ // src/models/openapi-generated/patient/models/OrderPriority.ts
2269
+ function OrderPriorityFromJSON(json) {
2270
+ return OrderPriorityFromJSONTyped(json, false);
2271
+ }
2272
+ function OrderPriorityFromJSONTyped(json, ignoreDiscriminator) {
2273
+ return json;
2274
+ }
2275
+ function OrderPriorityToJSON(value) {
2276
+ return value;
2277
+ }
2278
+
2279
+ // src/models/openapi-generated/patient/models/PlaceTestOrderRequest.ts
2280
+ function PlaceTestOrderRequestToJSON(json) {
2281
+ return PlaceTestOrderRequestToJSONTyped(json, false);
2282
+ }
2283
+ function PlaceTestOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
2284
+ if (value == null) {
2285
+ return value;
2286
+ }
2287
+ return {
2288
+ "cpt_code": value["cpt_code"],
2289
+ "diagnosis_codes": value["diagnosis_codes"],
2290
+ "diagnosis_snomed_code": value["diagnosis_snomed_code"],
2291
+ "display": value["display"],
2292
+ "encounter_id": value["encounter_id"],
2293
+ "fasting_required": value["fasting_required"],
2294
+ "idempotency_key": value["idempotency_key"],
2295
+ "lab_name": value["lab_name"],
2296
+ "loinc_code": value["loinc_code"],
2297
+ "notes": value["notes"],
2298
+ "occurrence_date": value["occurrence_date"] == null ? value["occurrence_date"] : value["occurrence_date"].toISOString().substring(0, 10),
2299
+ "occurrence_datetime": value["occurrence_datetime"] == null ? value["occurrence_datetime"] : value["occurrence_datetime"].toISOString(),
2300
+ "performer_name": value["performer_name"],
2301
+ "priority": OrderPriorityToJSON(value["priority"]),
2302
+ "reason": value["reason"],
2303
+ "requester_name": value["requester_name"],
2304
+ "requester_npi": value["requester_npi"],
2305
+ "requisition_number": value["requisition_number"],
2306
+ "snomed_code": value["snomed_code"],
2307
+ "standing_order": value["standing_order"],
2308
+ "test_name": value["test_name"]
2309
+ };
2310
+ }
2311
+
2312
+ // src/models/openapi-generated/patient/models/SpecimenStatus.ts
2313
+ function SpecimenStatusFromJSON(json) {
2314
+ return SpecimenStatusFromJSONTyped(json, false);
2315
+ }
2316
+ function SpecimenStatusFromJSONTyped(json, ignoreDiscriminator) {
2317
+ return json;
2318
+ }
2319
+
2320
+ // src/models/openapi-generated/patient/models/SpecimenType.ts
2321
+ function SpecimenTypeFromJSON2(json) {
2322
+ return SpecimenTypeFromJSONTyped2(json, false);
2323
+ }
2324
+ function SpecimenTypeFromJSONTyped2(json, ignoreDiscriminator) {
2325
+ return json;
2326
+ }
2327
+
2328
+ // src/models/openapi-generated/patient/models/Specimen.ts
2329
+ function SpecimenFromJSON(json) {
2330
+ return SpecimenFromJSONTyped(json, false);
2331
+ }
2332
+ function SpecimenFromJSONTyped(json, ignoreDiscriminator) {
2333
+ if (json == null) {
2334
+ return json;
2335
+ }
2336
+ return {
2337
+ "accession_number": json["accession_number"] === void 0 ? void 0 : json["accession_number"] === null ? null : json["accession_number"],
2338
+ "body_site": json["body_site"] === void 0 ? void 0 : json["body_site"] === null ? null : json["body_site"],
2339
+ "collected_by": json["collected_by"] === void 0 ? void 0 : json["collected_by"] === null ? null : json["collected_by"],
2340
+ "collection_date": json["collection_date"] === void 0 ? void 0 : json["collection_date"] === null ? null : new Date(json["collection_date"]),
2341
+ "collection_datetime": json["collection_datetime"] === void 0 ? void 0 : json["collection_datetime"] === null ? null : new Date(json["collection_datetime"]),
2342
+ "condition": json["condition"] === void 0 ? void 0 : json["condition"] === null ? null : json["condition"],
2343
+ "container": json["container"] === void 0 ? void 0 : json["container"] === null ? null : json["container"],
2344
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2345
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2346
+ "received_datetime": json["received_datetime"] === void 0 ? void 0 : json["received_datetime"] === null ? null : new Date(json["received_datetime"]),
2347
+ "specimen_id": json["specimen_id"] == null ? void 0 : json["specimen_id"],
2348
+ "status": json["status"] == null ? void 0 : SpecimenStatusFromJSON(json["status"]),
2349
+ "type": SpecimenTypeFromJSON2(json["type"]),
2350
+ "volume_ml": json["volume_ml"] === void 0 ? void 0 : json["volume_ml"] === null ? null : json["volume_ml"]
2351
+ };
2352
+ }
2353
+
2354
+ // src/models/openapi-generated/patient/models/OrderStatus.ts
2355
+ function OrderStatusFromJSON(json) {
2356
+ return OrderStatusFromJSONTyped(json, false);
2357
+ }
2358
+ function OrderStatusFromJSONTyped(json, ignoreDiscriminator) {
2359
+ return json;
2360
+ }
2361
+
2362
+ // src/models/openapi-generated/patient/models/PlaceTestOrderResponse.ts
2363
+ function PlaceTestOrderResponseFromJSON(json) {
2364
+ return PlaceTestOrderResponseFromJSONTyped(json, false);
2365
+ }
2366
+ function PlaceTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2367
+ if (json == null) {
2368
+ return json;
2369
+ }
2370
+ return {
2371
+ "athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
2372
+ "athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
2373
+ "athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
2374
+ "authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
2375
+ "cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
2376
+ "diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
2377
+ "display": json["display"],
2378
+ "encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
2379
+ "fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
2380
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2381
+ "intent": json["intent"] == null ? void 0 : json["intent"],
2382
+ "lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
2383
+ "loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
2384
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2385
+ "occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
2386
+ "occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
2387
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2388
+ "patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
2389
+ "performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
2390
+ "priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
2391
+ "reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
2392
+ "requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
2393
+ "requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
2394
+ "requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
2395
+ "snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
2396
+ "specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
2397
+ "standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
2398
+ "status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
2399
+ };
2400
+ }
2401
+
2402
+ // src/models/openapi-generated/patient/models/GetTestOrderResponse.ts
2403
+ function GetTestOrderResponseFromJSON(json) {
2404
+ return GetTestOrderResponseFromJSONTyped(json, false);
2405
+ }
2406
+ function GetTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2407
+ if (json == null) {
2408
+ return json;
2409
+ }
2410
+ return {
2411
+ "athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
2412
+ "athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
2413
+ "athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
2414
+ "authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
2415
+ "cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
2416
+ "diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
2417
+ "display": json["display"],
2418
+ "encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
2419
+ "fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
2420
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2421
+ "intent": json["intent"] == null ? void 0 : json["intent"],
2422
+ "lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
2423
+ "loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
2424
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2425
+ "occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
2426
+ "occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
2427
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2428
+ "patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
2429
+ "performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
2430
+ "priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
2431
+ "reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
2432
+ "requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
2433
+ "requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
2434
+ "requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
2435
+ "snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
2436
+ "specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
2437
+ "standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
2438
+ "status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
2439
+ };
2440
+ }
2441
+
2442
+ // src/models/openapi-generated/patient/models/TestOrder.ts
2443
+ function TestOrderFromJSON(json) {
2444
+ return TestOrderFromJSONTyped(json, false);
2445
+ }
2446
+ function TestOrderFromJSONTyped(json, ignoreDiscriminator) {
2447
+ if (json == null) {
2448
+ return json;
2449
+ }
2450
+ return {
2451
+ "athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
2452
+ "athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
2453
+ "athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
2454
+ "authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
2455
+ "cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
2456
+ "diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
2457
+ "display": json["display"],
2458
+ "encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
2459
+ "fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
2460
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2461
+ "intent": json["intent"] == null ? void 0 : json["intent"],
2462
+ "lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
2463
+ "loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
2464
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2465
+ "occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
2466
+ "occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
2467
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2468
+ "patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
2469
+ "performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
2470
+ "priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
2471
+ "reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
2472
+ "requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
2473
+ "requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
2474
+ "requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
2475
+ "snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
2476
+ "specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
2477
+ "standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
2478
+ "status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
2479
+ };
2480
+ }
2481
+
2482
+ // src/models/openapi-generated/patient/models/ListTestOrdersResponse.ts
2483
+ function ListTestOrdersResponseFromJSON(json) {
2484
+ return ListTestOrdersResponseFromJSONTyped(json, false);
2485
+ }
2486
+ function ListTestOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
2487
+ if (json == null) {
2488
+ return json;
2489
+ }
2490
+ return {
2491
+ "orders": json["orders"].map(TestOrderFromJSON),
2492
+ "total": json["total"]
2493
+ };
2494
+ }
2495
+
2496
+ // src/models/openapi-generated/patient/models/CancelTestOrderResponse.ts
2497
+ function CancelTestOrderResponseFromJSON(json) {
2498
+ return CancelTestOrderResponseFromJSONTyped(json, false);
2499
+ }
2500
+ function CancelTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2501
+ if (json == null) {
2502
+ return json;
2503
+ }
2504
+ return {
2505
+ "cancelled": json["cancelled"],
2506
+ "fhir_id": json["fhir_id"],
2507
+ "status": json["status"]
2508
+ };
2509
+ }
2510
+
2121
2511
  // src/clients/PatientClient.ts
2122
2512
  var PatientClient = class extends BaseServiceClient {
2513
+ /** Create a clinical order; Athena requires an owned linked encounter and existing diagnosis. */
2514
+ async placeTestOrder(request) {
2515
+ return PlaceTestOrderResponseFromJSON(await this.send("POST", "/patients/orders", {
2516
+ body: PlaceTestOrderRequestToJSON(request)
2517
+ }));
2518
+ }
2519
+ async getTestOrder(orderId) {
2520
+ return GetTestOrderResponseFromJSON(await this.send("GET", "/patients/orders/{order_id}", {
2521
+ pathParams: { order_id: orderId }
2522
+ }));
2523
+ }
2524
+ async listTestOrders(query = {}) {
2525
+ return ListTestOrdersResponseFromJSON(await this.send("GET", "/patients/orders", { query }));
2526
+ }
2527
+ /** Athena-linked cancellations return a conflict until cancelled in Athena. */
2528
+ async cancelTestOrder(orderId) {
2529
+ return CancelTestOrderResponseFromJSON(await this.send("DELETE", "/patients/orders/{order_id}", {
2530
+ pathParams: { order_id: orderId }
2531
+ }));
2532
+ }
2533
+ /** List orderable catalog items: id, name and image. */
2534
+ async listOrderItems() {
2535
+ return ListOrderItemsResponseFromJSON(await this.send("GET", "/patients/order-items"));
2536
+ }
2537
+ /** Submit a delivery; reuse idempotency_key for identical retries. Can dispatch a courier. */
2538
+ async createDeliveryOrder(request) {
2539
+ const response = await this.send("POST", "/patients/delivery-orders", {
2540
+ body: CreateDeliveryOrderRequestToJSON(request)
2541
+ });
2542
+ return DeliveryOrderFromJSON(response);
2543
+ }
2544
+ /** Get an owned delivery by internal ID and refresh its vendor status. */
2545
+ async getDeliveryOrder(deliveryOrderId) {
2546
+ const response = await this.send("GET", "/patients/delivery-orders/{delivery_order_id}", {
2547
+ pathParams: { delivery_order_id: deliveryOrderId }
2548
+ });
2549
+ return DeliveryOrderFromJSON(response);
2550
+ }
2551
+ /** List saved delivery orders; vendor statuses are last observed values. */
2552
+ async listDeliveryOrders(query = {}) {
2553
+ return ListDeliveryOrdersResponseFromJSON(await this.send("GET", "/patients/delivery-orders", { query }));
2554
+ }
2123
2555
  /** Add one agent-collected intake section and return actionable validation errors. */
2124
2556
  async addToIntake(patientId, section, summary) {
2125
2557
  const response = await this.send("POST", "/healthrecords/intake/add", {
@@ -9,6 +9,7 @@
9
9
  - [`classifyVoiceCommand`](../operations/patient.assistantClassify.md) — Classify a voice command into an action code
10
10
  - [`ocrIdentityDocument`](../operations/patient.assistantOcr.md) — OCR an identity document via vision LLM
11
11
  - [`ocrInsuranceDocument`](../operations/patient.assistantOcrInsurance.md) — OCR an insurance card via vision LLM
12
+ - [`cancelTestOrder`](../operations/patient.cancelTestOrder.md) — Cancel a diagnostic test order
12
13
  - [`checkEncounter`](../operations/patient.checkEncounter.md) — Find-or-create the patient's current open encounter; on an Athena-integrated tenant, also books a walk-in-now Athena appointment, attaches default insurance, and checks in
13
14
  - [`checkInEncounter`](../operations/patient.checkInEncounter.md) — Check in an encounter via the tenant's connected EHR
14
15
  - [`checkInsuranceEligibility`](../operations/patient.checkPatientInsuranceEligibility.md) — Check insurance eligibility and benefits
@@ -26,6 +27,7 @@
26
27
  - [`upsertMessage`](../operations/patient.commsUpsertMessage.md) — Upsert a message
27
28
  - [`upsertPresence`](../operations/patient.commsUpsertPresence.md) — Upsert presence
28
29
  - [`connect`](../operations/patient.connect.md) — Health check
30
+ - [`createDeliveryOrder`](../operations/patient.createDeliveryOrder.md) — Order a catalog item for delivery
29
31
  - [`createEncounter`](../operations/patient.createEncounter.md) — Create an encounter
30
32
  - [`createMedication`](../operations/patient.createMedication.md) — Create a medication order
31
33
  - [`createQuestionnaire`](../operations/patient.createQuestionnaire.md) — Create a FHIR Questionnaire
@@ -40,6 +42,7 @@
40
42
  - [`getCommunicationConsent`](../operations/patient.getCommunicationConsent.md) — Get SMS/phone contact-preference consent
41
43
  - [`getCurrentCareSession`](../operations/patient.getCurrentCareSessionCareSessionsCurrent.md) — Get the current care session
42
44
  - [`getDefaultProvider`](../operations/patient.getDefaultProvider.md) — Get the tenant default provider
45
+ - [`getDeliveryOrder`](../operations/patient.getDeliveryOrder.md) — Get delivery order and refresh vendor status
43
46
  - [`getEncounter`](../operations/patient.getEncounter.md) — Get an encounter
44
47
  - [`listPatientInsurances`](../operations/patient.getInsurance.md) — List insurance coverage
45
48
  - [`getLatestEncounter`](../operations/patient.getLatestEncounter.md) — Get the patient's latest open encounter
@@ -53,20 +56,25 @@
53
56
  - [`getPatientSidebar`](../operations/patient.getPatientSidebarPatientSidebar.md) — Get the patient sidebar summary
54
57
  - [`getPhoto`](../operations/patient.getPhoto.md) — Get a patient photo
55
58
  - [`getPreferredPharmacy`](../operations/patient.getPreferredPharmacy.md) — Get preferred pharmacy
59
+ - [`getTestOrder`](../operations/patient.getTestOrder.md) — Get a diagnostic test order
56
60
  - [`importActivity`](../operations/patient.importActivity.md) — Import activity
57
61
  - [`importCCDA`](../operations/patient.importHealthRecord.md) — Import a health record
58
62
  - [`importVitals`](../operations/patient.importVitals.md) — Import vitals
59
63
  - [`initHealthRecordImport`](../operations/patient.initHealthRecordImport.md) — Check health-record import status
60
64
  - [`listAssistantActions`](../operations/patient.listActions.md) — List assistant actions
61
65
  - [`listActivity`](../operations/patient.listActivity.md) — List activity
66
+ - [`listDeliveryOrders`](../operations/patient.listDeliveryOrders.md) — List the patient's delivery orders
62
67
  - [`listDependents`](../operations/patient.listDependents.md) — List dependents
63
68
  - [`listEncounters`](../operations/patient.listEncounters.md) — List encounters
64
69
  - [`listKnowledge`](../operations/patient.listKnowledge.md) — List knowledge-base collections and entries
65
70
  - [`listMedications`](../operations/patient.listMedications.md) — List medications
66
71
  - [`listNotifications`](../operations/patient.listNotifications.md) — List notifications
72
+ - [`listOrderItems`](../operations/patient.listOrderItems.md) — List order items
67
73
  - [`listInsuranceClaims`](../operations/patient.listPatientInsuranceClaims.md) — List claims for the authenticated patient
74
+ - [`listTestOrders`](../operations/patient.listTestOrders.md) — List diagnostic test orders
68
75
  - [`nearestLocations`](../operations/patient.nearestLocations.md) — Find nearby healthcare locations
69
76
  - [`getPhotoUploadUrl`](../operations/patient.photoUploadUrl.md) — Get a photo upload URL
77
+ - [`placeTestOrder`](../operations/patient.placeTestOrder.md) — Place a diagnostic test order
70
78
  - [`searchKnowledge`](../operations/patient.searchKnowledge.md) — Search the knowledge base
71
79
  - [`setPreferredPharmacy`](../operations/patient.setPreferredPharmacy.md) — Set preferred pharmacy
72
80
  - [`createCurrentScreeningSymptoms`](../operations/patient.submitCurrentSymptomsScreeningsCurrentSymptoms.md) — Submit current symptoms
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:f371dffcc058374e7bfc9dbb824ca38f4b16dc774cee5c8eeffaf2cba872f0b7",
2
+ "docsDataContentDigest": "sha256:df1a2fcf6a4ca58ea6db9d651fa27edf744bfb2b185a14b557bf343292398c96",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -429,6 +429,7 @@
429
429
  "models/CalUpdateScheduleRequest.md",
430
430
  "models/CalUpdateScheduleResponse.md",
431
431
  "models/CancelAppointmentRequest.md",
432
+ "models/CancelTestOrderResponse.md",
432
433
  "models/CapturedTestImageResponse.md",
433
434
  "models/CareSession.md",
434
435
  "models/CarequalityDiscoverPatientRequest.md",
@@ -493,6 +494,7 @@
493
494
  "models/ConversationKind.md",
494
495
  "models/ConversationRecord.md",
495
496
  "models/CreateChannelResponse.md",
497
+ "models/CreateDeliveryOrderRequest.md",
496
498
  "models/CreateEncounterRequest.md",
497
499
  "models/CreateMedicationRequest.md",
498
500
  "models/CreateMedicationResponse.md",
@@ -511,6 +513,9 @@
511
513
  "models/DeleteActivityResponse.md",
512
514
  "models/DeleteDependentResponse.md",
513
515
  "models/DeleteNotificationResponse.md",
516
+ "models/DeliveryContact.md",
517
+ "models/DeliveryOrder.md",
518
+ "models/DeliveryPharmacy.md",
514
519
  "models/DemographicsMatch.md",
515
520
  "models/DependentResponse.md",
516
521
  "models/DiagnosticTest.md",
@@ -619,6 +624,7 @@
619
624
  "models/GetPractitionerResponse.md",
620
625
  "models/GetPreferredPharmacyResponse.md",
621
626
  "models/GetScanUploadUrlRequest.md",
627
+ "models/GetTestOrderResponse.md",
622
628
  "models/GetTestResultResponse.md",
623
629
  "models/GetVectorDocumentChunksResponse.md",
624
630
  "models/GetVitalsResponse.md",
@@ -1218,6 +1224,7 @@
1218
1224
  "models/ListActivityResponse.md",
1219
1225
  "models/ListAllergiesResponse.md",
1220
1226
  "models/ListConditionsResponse.md",
1227
+ "models/ListDeliveryOrdersResponse.md",
1221
1228
  "models/ListDependentsResponse.md",
1222
1229
  "models/ListDiagnosticTestsResponse.md",
1223
1230
  "models/ListDirectivesResponse.md",
@@ -1228,6 +1235,7 @@
1228
1235
  "models/ListMedicalConceptsGetResponse.md",
1229
1236
  "models/ListNotificationsResponse.md",
1230
1237
  "models/ListObservationsResponse.md",
1238
+ "models/ListOrderItemsResponse.md",
1231
1239
  "models/ListPatientAppointmentsResponse.md",
1232
1240
  "models/ListPatientsResponse.md",
1233
1241
  "models/ListPolicyDocumentsResponse.md",
@@ -1235,6 +1243,7 @@
1235
1243
  "models/ListQuestionnaireResponsesResponse.md",
1236
1244
  "models/ListSlotsResponse.md",
1237
1245
  "models/ListSocialHistoryResponse.md",
1246
+ "models/ListTestOrdersResponse.md",
1238
1247
  "models/ListVectorCollectionsResponse.md",
1239
1248
  "models/ListVitalsResponse.md",
1240
1249
  "models/LocationStatus.md",
@@ -1303,6 +1312,9 @@
1303
1312
  "models/OpenAIUpdateAssistantRequest.md",
1304
1313
  "models/OpenAIUpdateAssistantResponse.md",
1305
1314
  "models/OpenLoopVitalsMirrorResult.md",
1315
+ "models/OrderItem.md",
1316
+ "models/OrderPriority.md",
1317
+ "models/OrderStatus.md",
1306
1318
  "models/OuraBuildAuthorizationUrlRequest.md",
1307
1319
  "models/OuraBuildAuthorizationUrlResponse.md",
1308
1320
  "models/OuraDailyActivity.md",
@@ -1359,6 +1371,8 @@
1359
1371
  "models/PersonRelationship.md",
1360
1372
  "models/Phone.md",
1361
1373
  "models/PhoneType.md",
1374
+ "models/PlaceTestOrderRequest.md",
1375
+ "models/PlaceTestOrderResponse.md",
1362
1376
  "models/PlaidCreateIdentityVerificationRequest.md",
1363
1377
  "models/PlaidGetIdentityVerificationRequest.md",
1364
1378
  "models/PlaidIdentityVerification.md",
@@ -1648,6 +1662,8 @@
1648
1662
  "models/SexAtBirth.md",
1649
1663
  "models/Slot.md",
1650
1664
  "models/SlotStatus.md",
1665
+ "models/Specimen.md",
1666
+ "models/SpecimenStatus.md",
1651
1667
  "models/SpecimenType.md",
1652
1668
  "models/StandardErrorResponse.md",
1653
1669
  "models/SteadyMDAddAllergyIntoleranceRequest.md",
@@ -1759,6 +1775,7 @@
1759
1775
  "models/SubscriberRelationship.md",
1760
1776
  "models/TelehealthToken.md",
1761
1777
  "models/TemperatureRoute.md",
1778
+ "models/TestOrder.md",
1762
1779
  "models/TwilioGetMessageRequest.md",
1763
1780
  "models/TwilioListMessagesRequest.md",
1764
1781
  "models/TwilioListMessagesResponse.md",
@@ -2978,6 +2995,7 @@
2978
2995
  "operations/patient.assistantClassify.md",
2979
2996
  "operations/patient.assistantOcr.md",
2980
2997
  "operations/patient.assistantOcrInsurance.md",
2998
+ "operations/patient.cancelTestOrder.md",
2981
2999
  "operations/patient.checkEncounter.md",
2982
3000
  "operations/patient.checkInEncounter.md",
2983
3001
  "operations/patient.checkPatientInsuranceEligibility.md",
@@ -2996,6 +3014,7 @@
2996
3014
  "operations/patient.commsUpsertPresence.md",
2997
3015
  "operations/patient.confirmResetPassword.md",
2998
3016
  "operations/patient.connect.md",
3017
+ "operations/patient.createDeliveryOrder.md",
2999
3018
  "operations/patient.createEncounter.md",
3000
3019
  "operations/patient.createMedication.md",
3001
3020
  "operations/patient.createQuestionnaire.md",
@@ -3010,6 +3029,7 @@
3010
3029
  "operations/patient.getCommunicationConsent.md",
3011
3030
  "operations/patient.getCurrentCareSessionCareSessionsCurrent.md",
3012
3031
  "operations/patient.getDefaultProvider.md",
3032
+ "operations/patient.getDeliveryOrder.md",
3013
3033
  "operations/patient.getEncounter.md",
3014
3034
  "operations/patient.getInsurance.md",
3015
3035
  "operations/patient.getLatestEncounter.md",
@@ -3023,21 +3043,26 @@
3023
3043
  "operations/patient.getPatientSidebarPatientSidebar.md",
3024
3044
  "operations/patient.getPhoto.md",
3025
3045
  "operations/patient.getPreferredPharmacy.md",
3046
+ "operations/patient.getTestOrder.md",
3026
3047
  "operations/patient.importActivity.md",
3027
3048
  "operations/patient.importHealthRecord.md",
3028
3049
  "operations/patient.importVitals.md",
3029
3050
  "operations/patient.initHealthRecordImport.md",
3030
3051
  "operations/patient.listActions.md",
3031
3052
  "operations/patient.listActivity.md",
3053
+ "operations/patient.listDeliveryOrders.md",
3032
3054
  "operations/patient.listDependents.md",
3033
3055
  "operations/patient.listEncounters.md",
3034
3056
  "operations/patient.listKnowledge.md",
3035
3057
  "operations/patient.listMedications.md",
3036
3058
  "operations/patient.listNotifications.md",
3059
+ "operations/patient.listOrderItems.md",
3037
3060
  "operations/patient.listPatientInsuranceClaims.md",
3061
+ "operations/patient.listTestOrders.md",
3038
3062
  "operations/patient.login.md",
3039
3063
  "operations/patient.nearestLocations.md",
3040
3064
  "operations/patient.photoUploadUrl.md",
3065
+ "operations/patient.placeTestOrder.md",
3041
3066
  "operations/patient.refreshToken.md",
3042
3067
  "operations/patient.register.md",
3043
3068
  "operations/patient.resendVerificationCode.md",
@@ -3108,7 +3133,7 @@
3108
3133
  "operations/vitals.recordVitals.md"
3109
3134
  ],
3110
3135
  "language": "nodejs",
3111
- "modelCount": 2026,
3112
- "operationCount": 1025,
3136
+ "modelCount": 2043,
3137
+ "operationCount": 1033,
3113
3138
  "schemaVersion": 1
3114
3139
  }