@healthcloudai/hc-sdk 3.13.4 → 3.15.1

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 (61) hide show
  1. package/dist/index.cjs +495 -72
  2. package/dist/index.d.cts +2342 -1390
  3. package/dist/index.d.ts +2342 -1390
  4. package/dist/index.js +495 -72
  5. package/docs/clients/AthenaHealthClient.md +1 -1
  6. package/docs/clients/PatientClient.md +11 -0
  7. package/docs/docs-manifest.json +35 -3
  8. package/docs/examples/index.md +12 -1
  9. package/docs/index.md +12 -1
  10. package/docs/models/AssignImpiloDeviceRequest.md +17 -0
  11. package/docs/models/AssignImpiloDeviceResponse.md +20 -0
  12. package/docs/models/AthenaLabResult.md +2 -0
  13. package/docs/models/CancelTestOrderResponse.md +19 -0
  14. package/docs/models/CreateDeliveryOrderRequest.md +21 -0
  15. package/docs/models/DeliveryContact.md +24 -0
  16. package/docs/models/DeliveryOrder.md +30 -0
  17. package/docs/models/DeliveryPharmacy.md +25 -0
  18. package/docs/models/GetDefaultProviderResponse.md +2 -0
  19. package/docs/models/GetPatientResponse.md +1 -0
  20. package/docs/models/GetTestOrderResponse.md +44 -0
  21. package/docs/models/ImpiloDeviceItem.md +23 -0
  22. package/docs/models/ListDeliveryOrdersResponse.md +19 -0
  23. package/docs/models/ListImpiloDevicesResponse.md +18 -0
  24. package/docs/models/ListOrderItemsResponse.md +18 -0
  25. package/docs/models/ListTestOrdersResponse.md +18 -0
  26. package/docs/models/OrderItem.md +19 -0
  27. package/docs/models/OrderPriority.md +15 -0
  28. package/docs/models/OrderStatus.md +15 -0
  29. package/docs/models/PatientDemographics.md +1 -0
  30. package/docs/models/PlaceTestOrderRequest.md +43 -0
  31. package/docs/models/PlaceTestOrderResponse.md +44 -0
  32. package/docs/models/Specimen.md +30 -0
  33. package/docs/models/SpecimenStatus.md +15 -0
  34. package/docs/models/TestOrder.md +44 -0
  35. package/docs/models/_InsuranceOcrResult.md +1 -0
  36. package/docs/models/index.md +21 -0
  37. package/docs/operations/connectors.athenaAddLabResultDocument.md +2 -2
  38. package/docs/operations/connectors.athenaGetInsurancePackages.md +1 -1
  39. package/docs/operations/connectors.athenaGetLabResult.md +2 -0
  40. package/docs/operations/connectors.athenaListLabResults.md +2 -0
  41. package/docs/operations/fieldagent.listPatients.md +1 -0
  42. package/docs/operations/patient.addInsurance.md +48 -16
  43. package/docs/operations/patient.addPatientIntake.md +12 -1
  44. package/docs/operations/patient.assignImpiloDevice.md +112 -0
  45. package/docs/operations/patient.assistantOcrInsurance.md +64 -13
  46. package/docs/operations/patient.cancelTestOrder.md +152 -0
  47. package/docs/operations/patient.checkPatientInsuranceEligibility.md +133 -38
  48. package/docs/operations/patient.createDeliveryOrder.md +171 -0
  49. package/docs/operations/patient.getDefaultProvider.md +2 -0
  50. package/docs/operations/patient.getDeliveryOrder.md +156 -0
  51. package/docs/operations/patient.getPatient.md +1 -0
  52. package/docs/operations/patient.getPatientSidebarPatientSidebar.md +1 -0
  53. package/docs/operations/patient.getTestOrder.md +194 -0
  54. package/docs/operations/patient.importImpiloVitals.md +129 -0
  55. package/docs/operations/patient.listDeliveryOrders.md +156 -0
  56. package/docs/operations/patient.listImpiloDevices.md +100 -0
  57. package/docs/operations/patient.listOrderItems.md +129 -0
  58. package/docs/operations/patient.listTestOrders.md +201 -0
  59. package/docs/operations/patient.placeTestOrder.md +309 -0
  60. package/docs/operations/patient.submitPatientIntake.md +17 -3
  61. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1294,104 +1294,81 @@ function GynHistoryToJSONTyped(value, ignoreDiscriminator = false) {
1294
1294
  };
1295
1295
  }
1296
1296
 
1297
- // src/models/openapi-generated/patient/models/SubstanceStatus.ts
1298
- function SubstanceStatusToJSON(value) {
1299
- return value;
1300
- }
1301
-
1302
- // src/models/openapi-generated/patient/models/SubstanceUse.ts
1303
- function SubstanceUseToJSON(json) {
1304
- return SubstanceUseToJSONTyped(json, false);
1297
+ // src/models/openapi-generated/patient/models/IntakeTobaccoUse.ts
1298
+ function IntakeTobaccoUseToJSON(json) {
1299
+ return IntakeTobaccoUseToJSONTyped(json, false);
1305
1300
  }
1306
- function SubstanceUseToJSONTyped(value, ignoreDiscriminator = false) {
1301
+ function IntakeTobaccoUseToJSONTyped(value, ignoreDiscriminator = false) {
1307
1302
  if (value == null) {
1308
1303
  return value;
1309
1304
  }
1310
1305
  return {
1311
- "frequency": value["frequency"],
1312
- "notes": value["notes"],
1306
+ ...value,
1307
+ "cessation_aids": value["cessation_aids"],
1308
+ "cigarettes_per_day": value["cigarettes_per_day"],
1309
+ "pack_years": value["pack_years"],
1313
1310
  "quit_year": value["quit_year"],
1314
- "route": value["route"],
1315
1311
  "start_year": value["start_year"],
1316
- "status": SubstanceStatusToJSON(value["status"]),
1317
- "substance": value["substance"]
1312
+ "status": value["status"]
1318
1313
  };
1319
1314
  }
1320
1315
 
1321
- // src/models/openapi-generated/patient/models/DietCategory.ts
1322
- function DietCategoryToJSON(value) {
1323
- return value;
1316
+ // src/models/openapi-generated/patient/models/IntakeAlcoholUse.ts
1317
+ function IntakeAlcoholUseToJSON(json) {
1318
+ return IntakeAlcoholUseToJSONTyped(json, false);
1324
1319
  }
1325
-
1326
- // src/models/openapi-generated/patient/models/ExerciseFrequency.ts
1327
- function ExerciseFrequencyToJSON(value) {
1328
- return value;
1329
- }
1330
-
1331
- // src/models/openapi-generated/patient/models/LivingSituation.ts
1332
- function LivingSituationToJSON(value) {
1333
- return value;
1320
+ function IntakeAlcoholUseToJSONTyped(value, ignoreDiscriminator = false) {
1321
+ if (value == null) {
1322
+ return value;
1323
+ }
1324
+ return {
1325
+ ...value,
1326
+ "binge_drinking": value["binge_drinking"],
1327
+ "drinks_per_week": value["drinks_per_week"],
1328
+ "frequency": value["frequency"],
1329
+ "notes": value["notes"]
1330
+ };
1334
1331
  }
1335
1332
 
1336
- // src/models/openapi-generated/patient/models/SmokingStatus.ts
1337
- function SmokingStatusToJSON(value) {
1333
+ // src/models/openapi-generated/patient/models/GenderIdentity.ts
1334
+ function GenderIdentityToJSON(value) {
1338
1335
  return value;
1339
1336
  }
1340
1337
 
1341
- // src/models/openapi-generated/patient/models/TobaccoUse.ts
1342
- function TobaccoUseToJSON(json) {
1343
- return TobaccoUseToJSONTyped(json, false);
1338
+ // src/models/openapi-generated/patient/models/IntakeSubstanceUse.ts
1339
+ function IntakeSubstanceUseToJSON(json) {
1340
+ return IntakeSubstanceUseToJSONTyped(json, false);
1344
1341
  }
1345
- function TobaccoUseToJSONTyped(value, ignoreDiscriminator = false) {
1342
+ function IntakeSubstanceUseToJSONTyped(value, ignoreDiscriminator = false) {
1346
1343
  if (value == null) {
1347
1344
  return value;
1348
1345
  }
1349
1346
  return {
1350
- "cessation_aids": value["cessation_aids"],
1351
- "cigarettes_per_day": value["cigarettes_per_day"],
1352
- "pack_years": value["pack_years"],
1347
+ ...value,
1348
+ "frequency": value["frequency"],
1349
+ "notes": value["notes"],
1353
1350
  "quit_year": value["quit_year"],
1351
+ "route": value["route"],
1354
1352
  "start_year": value["start_year"],
1355
- "status": SmokingStatusToJSON(value["status"])
1353
+ "status": value["status"],
1354
+ "substance": value["substance"]
1356
1355
  };
1357
1356
  }
1358
1357
 
1359
- // src/models/openapi-generated/patient/models/AlcoholFrequency.ts
1360
- function AlcoholFrequencyToJSON(value) {
1361
- return value;
1358
+ // src/models/openapi-generated/patient/models/IntakeEhrAnswer.ts
1359
+ function IntakeEhrAnswerToJSON(json) {
1360
+ return IntakeEhrAnswerToJSONTyped(json, false);
1362
1361
  }
1363
-
1364
- // src/models/openapi-generated/patient/models/AlcoholUse.ts
1365
- function AlcoholUseToJSON(json) {
1366
- return AlcoholUseToJSONTyped(json, false);
1367
- }
1368
- function AlcoholUseToJSONTyped(value, ignoreDiscriminator = false) {
1362
+ function IntakeEhrAnswerToJSONTyped(value, ignoreDiscriminator = false) {
1369
1363
  if (value == null) {
1370
1364
  return value;
1371
1365
  }
1372
1366
  return {
1373
- "binge_drinking": value["binge_drinking"],
1374
- "drinks_per_week": value["drinks_per_week"],
1375
- "frequency": AlcoholFrequencyToJSON(value["frequency"]),
1376
- "notes": value["notes"]
1367
+ "question_key": value["question_key"],
1368
+ "value": value["value"]
1377
1369
  };
1378
1370
  }
1379
1371
 
1380
- // src/models/openapi-generated/patient/models/GenderIdentity.ts
1381
- function GenderIdentityToJSON(value) {
1382
- return value;
1383
- }
1384
-
1385
- // src/models/openapi-generated/patient/models/EducationLevel.ts
1386
- function EducationLevelToJSON(value) {
1387
- return value;
1388
- }
1389
-
1390
- // src/models/openapi-generated/patient/models/SexualOrientation.ts
1391
- function SexualOrientationToJSON(value) {
1392
- return value;
1393
- }
1394
-
1395
1372
  // src/models/openapi-generated/patient/models/IntakeSocialHistory.ts
1396
1373
  function IntakeSocialHistoryToJSON(json) {
1397
1374
  return IntakeSocialHistoryToJSONTyped(json, false);
@@ -1402,24 +1379,25 @@ function IntakeSocialHistoryToJSONTyped(value, ignoreDiscriminator = false) {
1402
1379
  }
1403
1380
  return {
1404
1381
  ...value,
1405
- "alcohol": AlcoholUseToJSON(value["alcohol"]),
1382
+ "alcohol": IntakeAlcoholUseToJSON(value["alcohol"]),
1406
1383
  "contraception": value["contraception"],
1407
- "diet_category": DietCategoryToJSON(value["diet_category"]),
1384
+ "diet_category": value["diet_category"],
1408
1385
  "diet_description": value["diet_description"],
1409
- "education": EducationLevelToJSON(value["education"]),
1386
+ "education": value["education"],
1387
+ "ehr_answers": value["ehr_answers"] == null ? void 0 : value["ehr_answers"].map(IntakeEhrAnswerToJSON),
1410
1388
  "employer": value["employer"],
1411
- "exercise_frequency": ExerciseFrequencyToJSON(value["exercise_frequency"]),
1389
+ "exercise_frequency": value["exercise_frequency"],
1412
1390
  "exercise_minutes_per_week": value["exercise_minutes_per_week"],
1413
1391
  "gender_identity": GenderIdentityToJSON(value["gender_identity"]),
1414
- "living_situation": LivingSituationToJSON(value["living_situation"]),
1392
+ "living_situation": value["living_situation"],
1415
1393
  "notes": value["notes"],
1416
1394
  "number_of_dependents": value["number_of_dependents"],
1417
1395
  "occupation": value["occupation"],
1418
1396
  "occupational_exposures": value["occupational_exposures"],
1419
- "sexual_orientation": SexualOrientationToJSON(value["sexual_orientation"]),
1397
+ "sexual_orientation": value["sexual_orientation"],
1420
1398
  "sexually_active": value["sexually_active"],
1421
- "substances": value["substances"] == null ? void 0 : value["substances"].map(SubstanceUseToJSON),
1422
- "tobacco": TobaccoUseToJSON(value["tobacco"]),
1399
+ "substances": value["substances"] == null ? void 0 : value["substances"].map(IntakeSubstanceUseToJSON),
1400
+ "tobacco": IntakeTobaccoUseToJSON(value["tobacco"]),
1423
1401
  "travel_history": value["travel_history"]
1424
1402
  };
1425
1403
  }
@@ -2113,13 +2091,447 @@ function GetDefaultProviderResponseFromJSONTyped(json, ignoreDiscriminator) {
2113
2091
  return json;
2114
2092
  }
2115
2093
  return {
2094
+ "first_name": json["first_name"] === void 0 ? void 0 : json["first_name"] === null ? null : json["first_name"],
2095
+ "last_name": json["last_name"] === void 0 ? void 0 : json["last_name"] === null ? null : json["last_name"],
2116
2096
  "name": json["name"],
2117
2097
  "npi": json["npi"]
2118
2098
  };
2119
2099
  }
2120
2100
 
2101
+ // src/models/openapi-generated/patient/models/DeliveryPharmacy.ts
2102
+ function DeliveryPharmacyFromJSON(json) {
2103
+ return DeliveryPharmacyFromJSONTyped(json, false);
2104
+ }
2105
+ function DeliveryPharmacyFromJSONTyped(json, ignoreDiscriminator) {
2106
+ if (json == null) {
2107
+ return json;
2108
+ }
2109
+ return {
2110
+ "city": json["city"],
2111
+ "country": json["country"] == null ? void 0 : json["country"],
2112
+ "email": json["email"],
2113
+ "name": json["name"],
2114
+ "notes": json["notes"] == null ? void 0 : json["notes"],
2115
+ "phone_number": json["phone_number"],
2116
+ "state": json["state"],
2117
+ "street_address": json["street_address"],
2118
+ "zip_code": json["zip_code"]
2119
+ };
2120
+ }
2121
+ function DeliveryPharmacyToJSON(json) {
2122
+ return DeliveryPharmacyToJSONTyped(json, false);
2123
+ }
2124
+ function DeliveryPharmacyToJSONTyped(value, ignoreDiscriminator = false) {
2125
+ if (value == null) {
2126
+ return value;
2127
+ }
2128
+ return {
2129
+ "city": value["city"],
2130
+ "country": value["country"],
2131
+ "email": value["email"],
2132
+ "name": value["name"],
2133
+ "notes": value["notes"],
2134
+ "phone_number": value["phone_number"],
2135
+ "state": value["state"],
2136
+ "street_address": value["street_address"],
2137
+ "zip_code": value["zip_code"]
2138
+ };
2139
+ }
2140
+
2141
+ // src/models/openapi-generated/patient/models/DeliveryContact.ts
2142
+ function DeliveryContactToJSON(json) {
2143
+ return DeliveryContactToJSONTyped(json, false);
2144
+ }
2145
+ function DeliveryContactToJSONTyped(value, ignoreDiscriminator = false) {
2146
+ if (value == null) {
2147
+ return value;
2148
+ }
2149
+ return {
2150
+ "city": value["city"],
2151
+ "country": value["country"],
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/CreateDeliveryOrderRequest.ts
2162
+ function CreateDeliveryOrderRequestToJSON(json) {
2163
+ return CreateDeliveryOrderRequestToJSONTyped(json, false);
2164
+ }
2165
+ function CreateDeliveryOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
2166
+ if (value == null) {
2167
+ return value;
2168
+ }
2169
+ return {
2170
+ "dropoff": DeliveryContactToJSON(value["dropoff"]),
2171
+ "idempotency_key": value["idempotency_key"],
2172
+ "order_item_id": value["order_item_id"],
2173
+ "pickup_pharmacy": DeliveryPharmacyToJSON(value["pickup_pharmacy"]),
2174
+ "vendor": value["vendor"]
2175
+ };
2176
+ }
2177
+
2178
+ // src/models/openapi-generated/patient/models/DeliveryOrder.ts
2179
+ function DeliveryOrderFromJSON(json) {
2180
+ return DeliveryOrderFromJSONTyped(json, false);
2181
+ }
2182
+ function DeliveryOrderFromJSONTyped(json, ignoreDiscriminator) {
2183
+ if (json == null) {
2184
+ return json;
2185
+ }
2186
+ return {
2187
+ "created_at": new Date(json["created_at"]),
2188
+ "delivery_order_id": json["delivery_order_id"],
2189
+ "fhir_status": json["fhir_status"] == null ? void 0 : json["fhir_status"],
2190
+ "notification_status": json["notification_status"] == null ? void 0 : json["notification_status"],
2191
+ "order_item_id": json["order_item_id"],
2192
+ "order_reference": json["order_reference"],
2193
+ "pickup_pharmacy": DeliveryPharmacyFromJSON(json["pickup_pharmacy"]),
2194
+ "resource_type": json["resource_type"] == null ? void 0 : json["resource_type"],
2195
+ "status": json["status"],
2196
+ "tracking_url": json["tracking_url"] === void 0 ? void 0 : json["tracking_url"] === null ? null : json["tracking_url"],
2197
+ "updated_at": new Date(json["updated_at"]),
2198
+ "vendor": json["vendor"],
2199
+ "vendor_order_id": json["vendor_order_id"] === void 0 ? void 0 : json["vendor_order_id"] === null ? null : json["vendor_order_id"],
2200
+ "vendor_status": json["vendor_status"] === void 0 ? void 0 : json["vendor_status"] === null ? null : json["vendor_status"]
2201
+ };
2202
+ }
2203
+
2204
+ // src/models/openapi-generated/patient/models/ListDeliveryOrdersResponse.ts
2205
+ function ListDeliveryOrdersResponseFromJSON(json) {
2206
+ return ListDeliveryOrdersResponseFromJSONTyped(json, false);
2207
+ }
2208
+ function ListDeliveryOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
2209
+ if (json == null) {
2210
+ return json;
2211
+ }
2212
+ return {
2213
+ "limit": json["limit"],
2214
+ "offset": json["offset"],
2215
+ "orders": json["orders"].map(DeliveryOrderFromJSON)
2216
+ };
2217
+ }
2218
+
2219
+ // src/models/openapi-generated/patient/models/OrderItem.ts
2220
+ function OrderItemFromJSON(json) {
2221
+ return OrderItemFromJSONTyped(json, false);
2222
+ }
2223
+ function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
2224
+ if (json == null) {
2225
+ return json;
2226
+ }
2227
+ return {
2228
+ "id": json["id"],
2229
+ "image": json["image"] === void 0 ? void 0 : json["image"] === null ? null : json["image"],
2230
+ "name": json["name"]
2231
+ };
2232
+ }
2233
+
2234
+ // src/models/openapi-generated/patient/models/ListOrderItemsResponse.ts
2235
+ function ListOrderItemsResponseFromJSON(json) {
2236
+ return ListOrderItemsResponseFromJSONTyped(json, false);
2237
+ }
2238
+ function ListOrderItemsResponseFromJSONTyped(json, ignoreDiscriminator) {
2239
+ if (json == null) {
2240
+ return json;
2241
+ }
2242
+ return {
2243
+ "items": json["items"].map(OrderItemFromJSON),
2244
+ "total": json["total"]
2245
+ };
2246
+ }
2247
+
2248
+ // src/models/openapi-generated/patient/models/OrderPriority.ts
2249
+ function OrderPriorityFromJSON(json) {
2250
+ return OrderPriorityFromJSONTyped(json, false);
2251
+ }
2252
+ function OrderPriorityFromJSONTyped(json, ignoreDiscriminator) {
2253
+ return json;
2254
+ }
2255
+ function OrderPriorityToJSON(value) {
2256
+ return value;
2257
+ }
2258
+
2259
+ // src/models/openapi-generated/patient/models/PlaceTestOrderRequest.ts
2260
+ function PlaceTestOrderRequestToJSON(json) {
2261
+ return PlaceTestOrderRequestToJSONTyped(json, false);
2262
+ }
2263
+ function PlaceTestOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
2264
+ if (value == null) {
2265
+ return value;
2266
+ }
2267
+ return {
2268
+ "cpt_code": value["cpt_code"],
2269
+ "diagnosis_codes": value["diagnosis_codes"],
2270
+ "diagnosis_snomed_code": value["diagnosis_snomed_code"],
2271
+ "display": value["display"],
2272
+ "encounter_id": value["encounter_id"],
2273
+ "fasting_required": value["fasting_required"],
2274
+ "idempotency_key": value["idempotency_key"],
2275
+ "lab_name": value["lab_name"],
2276
+ "loinc_code": value["loinc_code"],
2277
+ "notes": value["notes"],
2278
+ "occurrence_date": value["occurrence_date"] == null ? value["occurrence_date"] : value["occurrence_date"].toISOString().substring(0, 10),
2279
+ "occurrence_datetime": value["occurrence_datetime"] == null ? value["occurrence_datetime"] : value["occurrence_datetime"].toISOString(),
2280
+ "performer_name": value["performer_name"],
2281
+ "priority": OrderPriorityToJSON(value["priority"]),
2282
+ "reason": value["reason"],
2283
+ "requester_name": value["requester_name"],
2284
+ "requester_npi": value["requester_npi"],
2285
+ "requisition_number": value["requisition_number"],
2286
+ "snomed_code": value["snomed_code"],
2287
+ "standing_order": value["standing_order"],
2288
+ "test_name": value["test_name"]
2289
+ };
2290
+ }
2291
+
2292
+ // src/models/openapi-generated/patient/models/SpecimenStatus.ts
2293
+ function SpecimenStatusFromJSON(json) {
2294
+ return SpecimenStatusFromJSONTyped(json, false);
2295
+ }
2296
+ function SpecimenStatusFromJSONTyped(json, ignoreDiscriminator) {
2297
+ return json;
2298
+ }
2299
+
2300
+ // src/models/openapi-generated/patient/models/SpecimenType.ts
2301
+ function SpecimenTypeFromJSON2(json) {
2302
+ return SpecimenTypeFromJSONTyped2(json, false);
2303
+ }
2304
+ function SpecimenTypeFromJSONTyped2(json, ignoreDiscriminator) {
2305
+ return json;
2306
+ }
2307
+
2308
+ // src/models/openapi-generated/patient/models/Specimen.ts
2309
+ function SpecimenFromJSON(json) {
2310
+ return SpecimenFromJSONTyped(json, false);
2311
+ }
2312
+ function SpecimenFromJSONTyped(json, ignoreDiscriminator) {
2313
+ if (json == null) {
2314
+ return json;
2315
+ }
2316
+ return {
2317
+ "accession_number": json["accession_number"] === void 0 ? void 0 : json["accession_number"] === null ? null : json["accession_number"],
2318
+ "body_site": json["body_site"] === void 0 ? void 0 : json["body_site"] === null ? null : json["body_site"],
2319
+ "collected_by": json["collected_by"] === void 0 ? void 0 : json["collected_by"] === null ? null : json["collected_by"],
2320
+ "collection_date": json["collection_date"] === void 0 ? void 0 : json["collection_date"] === null ? null : new Date(json["collection_date"]),
2321
+ "collection_datetime": json["collection_datetime"] === void 0 ? void 0 : json["collection_datetime"] === null ? null : new Date(json["collection_datetime"]),
2322
+ "condition": json["condition"] === void 0 ? void 0 : json["condition"] === null ? null : json["condition"],
2323
+ "container": json["container"] === void 0 ? void 0 : json["container"] === null ? null : json["container"],
2324
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2325
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2326
+ "received_datetime": json["received_datetime"] === void 0 ? void 0 : json["received_datetime"] === null ? null : new Date(json["received_datetime"]),
2327
+ "specimen_id": json["specimen_id"] == null ? void 0 : json["specimen_id"],
2328
+ "status": json["status"] == null ? void 0 : SpecimenStatusFromJSON(json["status"]),
2329
+ "type": SpecimenTypeFromJSON2(json["type"]),
2330
+ "volume_ml": json["volume_ml"] === void 0 ? void 0 : json["volume_ml"] === null ? null : json["volume_ml"]
2331
+ };
2332
+ }
2333
+
2334
+ // src/models/openapi-generated/patient/models/OrderStatus.ts
2335
+ function OrderStatusFromJSON(json) {
2336
+ return OrderStatusFromJSONTyped(json, false);
2337
+ }
2338
+ function OrderStatusFromJSONTyped(json, ignoreDiscriminator) {
2339
+ return json;
2340
+ }
2341
+
2342
+ // src/models/openapi-generated/patient/models/PlaceTestOrderResponse.ts
2343
+ function PlaceTestOrderResponseFromJSON(json) {
2344
+ return PlaceTestOrderResponseFromJSONTyped(json, false);
2345
+ }
2346
+ function PlaceTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2347
+ if (json == null) {
2348
+ return json;
2349
+ }
2350
+ return {
2351
+ "athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
2352
+ "athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
2353
+ "athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
2354
+ "authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
2355
+ "cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
2356
+ "diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
2357
+ "display": json["display"],
2358
+ "encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
2359
+ "fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
2360
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2361
+ "intent": json["intent"] == null ? void 0 : json["intent"],
2362
+ "lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
2363
+ "loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
2364
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2365
+ "occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
2366
+ "occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
2367
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2368
+ "patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
2369
+ "performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
2370
+ "priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
2371
+ "reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
2372
+ "requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
2373
+ "requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
2374
+ "requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
2375
+ "snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
2376
+ "specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
2377
+ "standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
2378
+ "status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
2379
+ };
2380
+ }
2381
+
2382
+ // src/models/openapi-generated/patient/models/GetTestOrderResponse.ts
2383
+ function GetTestOrderResponseFromJSON(json) {
2384
+ return GetTestOrderResponseFromJSONTyped(json, false);
2385
+ }
2386
+ function GetTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2387
+ if (json == null) {
2388
+ return json;
2389
+ }
2390
+ return {
2391
+ "athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
2392
+ "athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
2393
+ "athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
2394
+ "authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
2395
+ "cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
2396
+ "diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
2397
+ "display": json["display"],
2398
+ "encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
2399
+ "fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
2400
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2401
+ "intent": json["intent"] == null ? void 0 : json["intent"],
2402
+ "lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
2403
+ "loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
2404
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2405
+ "occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
2406
+ "occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
2407
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2408
+ "patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
2409
+ "performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
2410
+ "priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
2411
+ "reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
2412
+ "requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
2413
+ "requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
2414
+ "requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
2415
+ "snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
2416
+ "specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
2417
+ "standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
2418
+ "status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
2419
+ };
2420
+ }
2421
+
2422
+ // src/models/openapi-generated/patient/models/TestOrder.ts
2423
+ function TestOrderFromJSON(json) {
2424
+ return TestOrderFromJSONTyped(json, false);
2425
+ }
2426
+ function TestOrderFromJSONTyped(json, ignoreDiscriminator) {
2427
+ if (json == null) {
2428
+ return json;
2429
+ }
2430
+ return {
2431
+ "athena_encounter_id": json["athena_encounter_id"] === void 0 ? void 0 : json["athena_encounter_id"] === null ? null : json["athena_encounter_id"],
2432
+ "athena_order_id": json["athena_order_id"] === void 0 ? void 0 : json["athena_order_id"] === null ? null : json["athena_order_id"],
2433
+ "athena_order_status": json["athena_order_status"] === void 0 ? void 0 : json["athena_order_status"] === null ? null : json["athena_order_status"],
2434
+ "authored_on": json["authored_on"] === void 0 ? void 0 : json["authored_on"] === null ? null : new Date(json["authored_on"]),
2435
+ "cpt_code": json["cpt_code"] === void 0 ? void 0 : json["cpt_code"] === null ? null : json["cpt_code"],
2436
+ "diagnosis_codes": json["diagnosis_codes"] == null ? void 0 : json["diagnosis_codes"],
2437
+ "display": json["display"],
2438
+ "encounter_id": json["encounter_id"] === void 0 ? void 0 : json["encounter_id"] === null ? null : json["encounter_id"],
2439
+ "fasting_required": json["fasting_required"] == null ? void 0 : json["fasting_required"],
2440
+ "fhir_id": json["fhir_id"] === void 0 ? void 0 : json["fhir_id"] === null ? null : json["fhir_id"],
2441
+ "intent": json["intent"] == null ? void 0 : json["intent"],
2442
+ "lab_name": json["lab_name"] === void 0 ? void 0 : json["lab_name"] === null ? null : json["lab_name"],
2443
+ "loinc_code": json["loinc_code"] === void 0 ? void 0 : json["loinc_code"] === null ? null : json["loinc_code"],
2444
+ "notes": json["notes"] === void 0 ? void 0 : json["notes"] === null ? null : json["notes"],
2445
+ "occurrence_date": json["occurrence_date"] === void 0 ? void 0 : json["occurrence_date"] === null ? null : new Date(json["occurrence_date"]),
2446
+ "occurrence_datetime": json["occurrence_datetime"] === void 0 ? void 0 : json["occurrence_datetime"] === null ? null : new Date(json["occurrence_datetime"]),
2447
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2448
+ "patient_fhir_id": json["patient_fhir_id"] === void 0 ? void 0 : json["patient_fhir_id"] === null ? null : json["patient_fhir_id"],
2449
+ "performer_name": json["performer_name"] === void 0 ? void 0 : json["performer_name"] === null ? null : json["performer_name"],
2450
+ "priority": json["priority"] == null ? void 0 : OrderPriorityFromJSON(json["priority"]),
2451
+ "reason": json["reason"] === void 0 ? void 0 : json["reason"] === null ? null : json["reason"],
2452
+ "requester_name": json["requester_name"] === void 0 ? void 0 : json["requester_name"] === null ? null : json["requester_name"],
2453
+ "requester_npi": json["requester_npi"] === void 0 ? void 0 : json["requester_npi"] === null ? null : json["requester_npi"],
2454
+ "requisition_number": json["requisition_number"] === void 0 ? void 0 : json["requisition_number"] === null ? null : json["requisition_number"],
2455
+ "snomed_code": json["snomed_code"] === void 0 ? void 0 : json["snomed_code"] === null ? null : json["snomed_code"],
2456
+ "specimen": json["specimen"] === void 0 ? void 0 : json["specimen"] === null ? null : SpecimenFromJSON(json["specimen"]),
2457
+ "standing_order": json["standing_order"] == null ? void 0 : json["standing_order"],
2458
+ "status": json["status"] == null ? void 0 : OrderStatusFromJSON(json["status"])
2459
+ };
2460
+ }
2461
+
2462
+ // src/models/openapi-generated/patient/models/ListTestOrdersResponse.ts
2463
+ function ListTestOrdersResponseFromJSON(json) {
2464
+ return ListTestOrdersResponseFromJSONTyped(json, false);
2465
+ }
2466
+ function ListTestOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
2467
+ if (json == null) {
2468
+ return json;
2469
+ }
2470
+ return {
2471
+ "orders": json["orders"].map(TestOrderFromJSON),
2472
+ "total": json["total"]
2473
+ };
2474
+ }
2475
+
2476
+ // src/models/openapi-generated/patient/models/CancelTestOrderResponse.ts
2477
+ function CancelTestOrderResponseFromJSON(json) {
2478
+ return CancelTestOrderResponseFromJSONTyped(json, false);
2479
+ }
2480
+ function CancelTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2481
+ if (json == null) {
2482
+ return json;
2483
+ }
2484
+ return {
2485
+ "cancelled": json["cancelled"],
2486
+ "fhir_id": json["fhir_id"],
2487
+ "status": json["status"]
2488
+ };
2489
+ }
2490
+
2121
2491
  // src/clients/PatientClient.ts
2122
2492
  var PatientClient = class extends BaseServiceClient {
2493
+ /** Create a clinical order; Athena requires an owned linked encounter and existing diagnosis. */
2494
+ async placeTestOrder(request) {
2495
+ return PlaceTestOrderResponseFromJSON(await this.send("POST", "/patients/orders", {
2496
+ body: PlaceTestOrderRequestToJSON(request)
2497
+ }));
2498
+ }
2499
+ async getTestOrder(orderId) {
2500
+ return GetTestOrderResponseFromJSON(await this.send("GET", "/patients/orders/{order_id}", {
2501
+ pathParams: { order_id: orderId }
2502
+ }));
2503
+ }
2504
+ async listTestOrders(query = {}) {
2505
+ return ListTestOrdersResponseFromJSON(await this.send("GET", "/patients/orders", { query }));
2506
+ }
2507
+ /** Athena-linked cancellations return a conflict until cancelled in Athena. */
2508
+ async cancelTestOrder(orderId) {
2509
+ return CancelTestOrderResponseFromJSON(await this.send("DELETE", "/patients/orders/{order_id}", {
2510
+ pathParams: { order_id: orderId }
2511
+ }));
2512
+ }
2513
+ /** List orderable catalog items: id, name and image. */
2514
+ async listOrderItems() {
2515
+ return ListOrderItemsResponseFromJSON(await this.send("GET", "/patients/order-items"));
2516
+ }
2517
+ /** Submit a delivery; reuse idempotency_key for identical retries. Can dispatch a courier. */
2518
+ async createDeliveryOrder(request) {
2519
+ const response = await this.send("POST", "/patients/delivery-orders", {
2520
+ body: CreateDeliveryOrderRequestToJSON(request)
2521
+ });
2522
+ return DeliveryOrderFromJSON(response);
2523
+ }
2524
+ /** Get an owned delivery by internal ID and refresh its vendor status. */
2525
+ async getDeliveryOrder(deliveryOrderId) {
2526
+ const response = await this.send("GET", "/patients/delivery-orders/{delivery_order_id}", {
2527
+ pathParams: { delivery_order_id: deliveryOrderId }
2528
+ });
2529
+ return DeliveryOrderFromJSON(response);
2530
+ }
2531
+ /** List saved delivery orders; vendor statuses are last observed values. */
2532
+ async listDeliveryOrders(query = {}) {
2533
+ return ListDeliveryOrdersResponseFromJSON(await this.send("GET", "/patients/delivery-orders", { query }));
2534
+ }
2123
2535
  /** Add one agent-collected intake section and return actionable validation errors. */
2124
2536
  async addToIntake(patientId, section, summary) {
2125
2537
  const response = await this.send("POST", "/healthrecords/intake/add", {
@@ -2335,6 +2747,17 @@ var PatientClient = class extends BaseServiceClient {
2335
2747
  body: { source, payload }
2336
2748
  });
2337
2749
  }
2750
+ listImpiloDevices() {
2751
+ return this.send("GET", "/patients/vitals/devices/impilo");
2752
+ }
2753
+ assignImpiloDevice(itemId) {
2754
+ return this.send("POST", "/patients/vitals/deviceassign/impilo", {
2755
+ body: { item_id: itemId }
2756
+ });
2757
+ }
2758
+ importImpiloVitals() {
2759
+ return this.send("POST", "/patients/vitals/import/impilo");
2760
+ }
2338
2761
  importActivity(source, payload) {
2339
2762
  return this.send("POST", "/patients/activity/import", {
2340
2763
  body: { source, payload }
@@ -1,7 +1,7 @@
1
1
  # AthenaHealthClient
2
2
 
3
3
  - [`addEncounterReason`](../operations/connectors.athenaAddEncounterReason.md) — Add a configured encounter reason
4
- - [`addLabResultDocument`](../operations/connectors.athenaAddLabResultDocument.md) — Add lab result document (athenahealth)
4
+ - [`addLabResultDocument`](../operations/connectors.athenaAddLabResultDocument.md) — Create a result document, defaulting routing to the tenant provider
5
5
  - [`addPreferredPharmacy`](../operations/connectors.athenaAddPreferredPharmacy.md) — Athena's PUT /chart/{id}/pharmacies/preferred 400s without either clinicalproviderid or ncpdpid in the body — there's no way to add "a" preferred pharmacy without saying which one
6
6
  - [`answerHealthQuestion`](../operations/connectors.athenaAnswerHealthQuestion.md) — Answer health question (athenahealth)
7
7
  - [`bookAppointment`](../operations/connectors.athenaBookAppointment.md) — Book an open appointment slot (without the telehealth deep link step)