@healthcloudai/hc-sdk 3.25.0 → 3.27.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 (41) hide show
  1. package/dist/index.cjs +117 -1
  2. package/dist/index.d.cts +2470 -276
  3. package/dist/index.d.ts +2470 -276
  4. package/dist/index.js +117 -1
  5. package/docs/clients/PatientClient.md +1 -0
  6. package/docs/clients/ProviderClient.md +6 -0
  7. package/docs/docs-manifest.json +28 -3
  8. package/docs/examples/index.md +7 -0
  9. package/docs/index.md +7 -0
  10. package/docs/models/CheckInsuranceBenefitsRequest.md +19 -0
  11. package/docs/models/CheckInsuranceBenefitsResponse.md +28 -0
  12. package/docs/models/CommunicationConsent.md +24 -0
  13. package/docs/models/Dependent.md +21 -0
  14. package/docs/models/DependentRelationship.md +15 -0
  15. package/docs/models/EncounterMedicationInput.md +29 -0
  16. package/docs/models/EncounterMedicationsResponse.md +19 -0
  17. package/docs/models/InsuranceBenefit.md +27 -0
  18. package/docs/models/LabCatalogItem.md +24 -0
  19. package/docs/models/LabCatalogResponse.md +18 -0
  20. package/docs/models/LabOrder.md +1 -0
  21. package/docs/models/ProviderDriversLicenseSummary.md +19 -0
  22. package/docs/models/ProviderPatientInsuranceResponse.md +19 -0
  23. package/docs/models/ProviderPatientProfile.md +42 -0
  24. package/docs/models/ProviderPatientProfileResponse.md +21 -0
  25. package/docs/models/TelehealthRequest.md +22 -0
  26. package/docs/models/TelehealthRequestInput.md +17 -0
  27. package/docs/models/TelehealthRequestResponse.md +19 -0
  28. package/docs/models/UpdateEncounterMedicationsRequest.md +17 -0
  29. package/docs/models/index.md +18 -0
  30. package/docs/operations/patient.checkPatientInsuranceBenefits.md +209 -0
  31. package/docs/operations/patient.listPatientInsuranceClaims.md +3 -1
  32. package/docs/operations/provider.getLabOrder.md +21 -25
  33. package/docs/operations/provider.getPatientInsurance.md +134 -0
  34. package/docs/operations/provider.getPatientProfile.md +188 -0
  35. package/docs/operations/provider.listEncounterMedications.md +142 -0
  36. package/docs/operations/provider.listLabCatalog.md +215 -0
  37. package/docs/operations/provider.listLabOrders.md +24 -27
  38. package/docs/operations/provider.placeLabOrder.md +26 -28
  39. package/docs/operations/provider.requestTelehealthVisit.md +124 -0
  40. package/docs/operations/provider.updateEncounterMedications.md +186 -0
  41. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1328,6 +1328,68 @@ function StediClaimsResponseFromJSONTyped(json, ignoreDiscriminator) {
1328
1328
  };
1329
1329
  }
1330
1330
 
1331
+ // src/models/openapi-generated/patient/models/CheckInsuranceBenefitsRequest.ts
1332
+ function CheckInsuranceBenefitsRequestToJSON(json) {
1333
+ return CheckInsuranceBenefitsRequestToJSONTyped(json, false);
1334
+ }
1335
+ function CheckInsuranceBenefitsRequestToJSONTyped(value, ignoreDiscriminator = false) {
1336
+ if (value == null) {
1337
+ return value;
1338
+ }
1339
+ return {
1340
+ "request_id": value["request_id"],
1341
+ "service_date": value["service_date"] == null ? value["service_date"] : value["service_date"].toISOString().substring(0, 10),
1342
+ "service_type_code": value["service_type_code"]
1343
+ };
1344
+ }
1345
+
1346
+ // src/models/openapi-generated/patient/models/InsuranceBenefit.ts
1347
+ function InsuranceBenefitFromJSON(json) {
1348
+ return InsuranceBenefitFromJSONTyped(json, false);
1349
+ }
1350
+ function InsuranceBenefitFromJSONTyped(json, ignoreDiscriminator) {
1351
+ if (json == null) {
1352
+ return json;
1353
+ }
1354
+ return {
1355
+ "additional_conditions": json["additional_conditions"] == null ? void 0 : json["additional_conditions"],
1356
+ "amount": json["amount"] === void 0 ? void 0 : json["amount"] === null ? null : json["amount"],
1357
+ "benefit_end": json["benefit_end"] === void 0 ? void 0 : json["benefit_end"] === null ? null : new Date(json["benefit_end"]),
1358
+ "benefit_start": json["benefit_start"] === void 0 ? void 0 : json["benefit_start"] === null ? null : new Date(json["benefit_start"]),
1359
+ "benefit_type": json["benefit_type"],
1360
+ "coinsurance_fraction": json["coinsurance_fraction"] === void 0 ? void 0 : json["coinsurance_fraction"] === null ? null : json["coinsurance_fraction"],
1361
+ "coverage_level": json["coverage_level"] == null ? void 0 : json["coverage_level"],
1362
+ "network": json["network"] == null ? void 0 : json["network"],
1363
+ "plan_index": json["plan_index"],
1364
+ "service_type_code": json["service_type_code"],
1365
+ "time_period": json["time_period"] == null ? void 0 : json["time_period"]
1366
+ };
1367
+ }
1368
+
1369
+ // src/models/openapi-generated/patient/models/CheckInsuranceBenefitsResponse.ts
1370
+ function CheckInsuranceBenefitsResponseFromJSON(json) {
1371
+ return CheckInsuranceBenefitsResponseFromJSONTyped(json, false);
1372
+ }
1373
+ function CheckInsuranceBenefitsResponseFromJSONTyped(json, ignoreDiscriminator) {
1374
+ if (json == null) {
1375
+ return json;
1376
+ }
1377
+ return {
1378
+ "benefits": json["benefits"] == null ? void 0 : json["benefits"].map(InsuranceBenefitFromJSON),
1379
+ "check_id": json["check_id"],
1380
+ "checked_at": new Date(json["checked_at"]),
1381
+ "coverage_id": json["coverage_id"] === void 0 ? void 0 : json["coverage_id"] === null ? null : json["coverage_id"],
1382
+ "endpoint_version": json["endpoint_version"] == null ? void 0 : json["endpoint_version"],
1383
+ "interpretation": json["interpretation"] == null ? void 0 : json["interpretation"],
1384
+ "network_determination": json["network_determination"] == null ? void 0 : json["network_determination"],
1385
+ "reason": json["reason"],
1386
+ "service_date": json["service_date"] === void 0 ? void 0 : json["service_date"] === null ? null : new Date(json["service_date"]),
1387
+ "service_type_code": json["service_type_code"],
1388
+ "source": json["source"] == null ? void 0 : json["source"],
1389
+ "status": json["status"]
1390
+ };
1391
+ }
1392
+
1331
1393
  // src/models/openapi-generated/patient/models/CheckEligibilityResponse.ts
1332
1394
  function CheckEligibilityResponseFromJSON(json) {
1333
1395
  return CheckEligibilityResponseFromJSONTyped(json, false);
@@ -3496,6 +3558,12 @@ var PatientClient = class extends BaseServiceClient {
3496
3558
  body: StediRawX12EligibilityRequestToJSON(request)
3497
3559
  });
3498
3560
  }
3561
+ /** Check reported benefits. Persist this exact request ID/body for retries, including HTTP 202. */
3562
+ async checkInsuranceBenefits(request) {
3563
+ return CheckInsuranceBenefitsResponseFromJSON(await this.send("POST", "/insurance/benefits/check", {
3564
+ body: CheckInsuranceBenefitsRequestToJSON(request)
3565
+ }));
3566
+ }
3499
3567
  /** List Stedi claims linked to the authenticated patient's FHIR Claim records. */
3500
3568
  async listInsuranceClaims(query) {
3501
3569
  const response = await this.send("GET", "/insurance/claims", { query });
@@ -3916,7 +3984,10 @@ var ProviderClient = class extends BaseServiceClient {
3916
3984
  placeLabOrder(patientId, request) {
3917
3985
  return this.send("POST", "/patients/{patient_id}/lab-orders", { pathParams: { patient_id: patientId }, body: request });
3918
3986
  }
3919
- /** List a patient's lab orders (GET /patients/{patient_id}/lab-orders), optionally by `status` (submitting, accepted or rejected). */
3987
+ /**
3988
+ * List a patient's lab orders (GET /patients/{patient_id}/lab-orders), optionally by `status` (submitting, accepted or
3989
+ * rejected) and by `encounter_id` (only the orders placed from that encounter).
3990
+ */
3920
3991
  listLabOrders(patientId, filters) {
3921
3992
  return this.send("GET", "/patients/{patient_id}/lab-orders", { pathParams: { patient_id: patientId }, query: filters });
3922
3993
  }
@@ -3928,6 +3999,51 @@ var ProviderClient = class extends BaseServiceClient {
3928
3999
  getLabOrderRequisition(patientId, orderId) {
3929
4000
  return this.send("GET", "/patients/{patient_id}/lab-orders/{order_id}/requisition", { pathParams: { patient_id: patientId, order_id: orderId } });
3930
4001
  }
4002
+ /**
4003
+ * A patient's full profile (GET /patients/{patient_id}/profile): demographics, identifiers, contact details, addresses,
4004
+ * emergency contacts, preferred pharmacy, communication consent, dependents and flags. A driver's license number comes
4005
+ * back as its last four characters. 404 for a patient who is not on the caller's care team and has no encounter with them.
4006
+ */
4007
+ getPatientProfile(patientId) {
4008
+ return this.send("GET", "/patients/{patient_id}/profile", { pathParams: { patient_id: patientId } });
4009
+ }
4010
+ /** A patient's insurance coverages, primary first (GET /patients/{patient_id}/insurance). Same scope as getPatientProfile. */
4011
+ getPatientInsurance(patientId) {
4012
+ return this.send("GET", "/patients/{patient_id}/insurance", { pathParams: { patient_id: patientId } });
4013
+ }
4014
+ /** The medications recorded on an encounter the caller holds (GET /encounters/{id}/medications). */
4015
+ listEncounterMedications(encounterId) {
4016
+ return this.send("GET", "/encounters/{encounter_id}/medications", { pathParams: { encounter_id: encounterId } });
4017
+ }
4018
+ /**
4019
+ * Replace an encounter's medications (PUT /encounters/{id}/medications): add, change or remove up to 25 at once.
4020
+ * Medications left out are removed (kept for audit). Records the plan in the chart; it does not e-prescribe. Only the
4021
+ * assigned provider (403 otherwise), and not once the encounter is signed (409).
4022
+ */
4023
+ updateEncounterMedications(encounterId, request) {
4024
+ return this.send("PUT", "/encounters/{encounter_id}/medications", {
4025
+ pathParams: { encounter_id: encounterId },
4026
+ body: request
4027
+ });
4028
+ }
4029
+ /**
4030
+ * The tests and panels a provider can order (GET /lab-orders/catalog), optionally filtered by `kind` (test or panel)
4031
+ * and `q` (name contains). Use an item's `catalog_item_id` in placeLabOrder.
4032
+ */
4033
+ listLabCatalog(filters) {
4034
+ return this.send("GET", "/lab-orders/catalog", { query: filters });
4035
+ }
4036
+ /**
4037
+ * Ask the patient to schedule a telehealth appointment (POST /encounters/{id}/telehealth-request). Records a proposed
4038
+ * telehealth appointment and sends the patient a generic notice. At most one request per encounter per hour: a repeat
4039
+ * returns the existing request with `created: false`. Only the assigned provider (403), and not once signed (409).
4040
+ */
4041
+ requestTelehealthVisit(encounterId, request) {
4042
+ return this.send("POST", "/encounters/{encounter_id}/telehealth-request", {
4043
+ pathParams: { encounter_id: encounterId },
4044
+ body: request != null ? request : {}
4045
+ });
4046
+ }
3931
4047
  /** Get a patient's consolidated health record (provider tenant scope). */
3932
4048
  getPatientRecord(patientId) {
3933
4049
  return this.send("GET", "/patients/{patient_id}/record", { pathParams: { patient_id: patientId } });