@healthcloudai/hc-sdk 3.36.0 → 3.37.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 +118 -4
  2. package/dist/index.d.cts +613 -5
  3. package/dist/index.d.ts +613 -5
  4. package/dist/index.js +118 -4
  5. package/docs/clients/PatientClient.md +2 -1
  6. package/docs/docs-manifest.json +10 -3
  7. package/docs/examples/index.md +2 -1
  8. package/docs/index.md +2 -1
  9. package/docs/models/AddInsuranceResponse.md +1 -0
  10. package/docs/models/Appointment.md +1 -0
  11. package/docs/models/CheckEligibilityResponse.md +1 -0
  12. package/docs/models/CheckInsuranceNetworkRequest.md +21 -0
  13. package/docs/models/CheckInsuranceNetworkResponse.md +33 -0
  14. package/docs/models/CoverageChoice.md +20 -0
  15. package/docs/models/MedicalConcept.md +29 -4
  16. package/docs/models/MedicalConceptSearchRequest.md +6 -4
  17. package/docs/models/NetworkEvidence.md +21 -0
  18. package/docs/models/NetworkPlan.md +21 -0
  19. package/docs/models/ProducerReceipt.md +20 -0
  20. package/docs/models/SearchMedicalConceptsRequest.md +3 -1
  21. package/docs/models/index.md +6 -0
  22. package/docs/operations/appointments.book.md +6 -0
  23. package/docs/operations/appointments.cancel.md +6 -0
  24. package/docs/operations/appointments.listPatientAppointments.md +6 -0
  25. package/docs/operations/appointments.reschedule.md +6 -0
  26. package/docs/operations/graph.getMedicalConcept.md +1 -1
  27. package/docs/operations/graph.getMedicalConceptRelationships.md +2 -2
  28. package/docs/operations/graph.getMedicalConceptVocabularies.md +1 -1
  29. package/docs/operations/graph.listMedicalConceptsGet.md +56 -16
  30. package/docs/operations/graph.searchMedicalConcepts.md +73 -27
  31. package/docs/operations/graph.searchMedicalConceptsGet.md +73 -27
  32. package/docs/operations/patient.addInsurance.md +11 -5
  33. package/docs/operations/patient.addPatientIntake.md +3 -3
  34. package/docs/operations/patient.checkPatientInsuranceEligibility.md +11 -5
  35. package/docs/operations/patient.checkPatientInsuranceNetwork.md +212 -0
  36. package/docs/operations/patient.setPreferredPharmacy.md +9 -0
  37. package/docs/operations/patient.updateAddress.md +9 -0
  38. package/docs/operations/patient.updateDemographics.md +9 -0
  39. package/docs/operations/patient.updatePatientAttributes.md +9 -0
  40. package/docs/operations/patient.updatePatientFlags.md +9 -0
  41. package/docs/operations/patient.updatePhone.md +9 -0
  42. package/docs/operations/patient.updateRace.md +9 -0
  43. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1074,6 +1074,102 @@ var MCPClient = class extends BaseServiceClient {
1074
1074
  }
1075
1075
  };
1076
1076
 
1077
+ // src/models/openapi-generated/patient/models/CheckInsuranceNetworkRequest.ts
1078
+ function CheckInsuranceNetworkRequestToJSON(json) {
1079
+ return CheckInsuranceNetworkRequestToJSONTyped(json, false);
1080
+ }
1081
+ function CheckInsuranceNetworkRequestToJSONTyped(value, ignoreDiscriminator = false) {
1082
+ if (value == null) {
1083
+ return value;
1084
+ }
1085
+ return {
1086
+ "coverage_id": value["coverage_id"],
1087
+ "plan_graph_id": value["plan_graph_id"],
1088
+ "plan_name": value["plan_name"],
1089
+ "provider_npi": value["provider_npi"],
1090
+ "request_id": value["request_id"]
1091
+ };
1092
+ }
1093
+
1094
+ // src/models/openapi-generated/patient/models/NetworkEvidence.ts
1095
+ function NetworkEvidenceFromJSON(json) {
1096
+ return NetworkEvidenceFromJSONTyped(json, false);
1097
+ }
1098
+ function NetworkEvidenceFromJSONTyped(json, ignoreDiscriminator) {
1099
+ if (json == null) {
1100
+ return json;
1101
+ }
1102
+ return {
1103
+ "basis": json["basis"] === void 0 ? void 0 : json["basis"] === null ? null : json["basis"],
1104
+ "confidence": json["confidence"] === void 0 ? void 0 : json["confidence"] === null ? null : json["confidence"],
1105
+ "network": json["network"] === void 0 ? void 0 : json["network"] === null ? null : json["network"],
1106
+ "network_graph_id": json["network_graph_id"],
1107
+ "network_id": json["network_id"]
1108
+ };
1109
+ }
1110
+
1111
+ // src/models/openapi-generated/patient/models/CoverageChoice.ts
1112
+ function CoverageChoiceFromJSON(json) {
1113
+ return CoverageChoiceFromJSONTyped(json, false);
1114
+ }
1115
+ function CoverageChoiceFromJSONTyped(json, ignoreDiscriminator) {
1116
+ if (json == null) {
1117
+ return json;
1118
+ }
1119
+ return {
1120
+ "coverage_id": json["coverage_id"],
1121
+ "payer_name": json["payer_name"] === void 0 ? void 0 : json["payer_name"] === null ? null : json["payer_name"],
1122
+ "plan_name": json["plan_name"] === void 0 ? void 0 : json["plan_name"] === null ? null : json["plan_name"],
1123
+ "priority": json["priority"] === void 0 ? void 0 : json["priority"] === null ? null : json["priority"]
1124
+ };
1125
+ }
1126
+
1127
+ // src/models/openapi-generated/patient/models/NetworkPlan.ts
1128
+ function NetworkPlanFromJSON(json) {
1129
+ return NetworkPlanFromJSONTyped(json, false);
1130
+ }
1131
+ function NetworkPlanFromJSONTyped(json, ignoreDiscriminator) {
1132
+ if (json == null) {
1133
+ return json;
1134
+ }
1135
+ return {
1136
+ "id": json["id"],
1137
+ "issuer": json["issuer"] === void 0 ? void 0 : json["issuer"] === null ? null : json["issuer"],
1138
+ "name": json["name"],
1139
+ "plan_year": json["plan_year"] === void 0 ? void 0 : json["plan_year"] === null ? null : json["plan_year"],
1140
+ "state": json["state"] === void 0 ? void 0 : json["state"] === null ? null : json["state"]
1141
+ };
1142
+ }
1143
+
1144
+ // src/models/openapi-generated/patient/models/CheckInsuranceNetworkResponse.ts
1145
+ function CheckInsuranceNetworkResponseFromJSON(json) {
1146
+ return CheckInsuranceNetworkResponseFromJSONTyped(json, false);
1147
+ }
1148
+ function CheckInsuranceNetworkResponseFromJSONTyped(json, ignoreDiscriminator) {
1149
+ if (json == null) {
1150
+ return json;
1151
+ }
1152
+ return {
1153
+ "check_id": json["check_id"],
1154
+ "checked_at": new Date(json["checked_at"]),
1155
+ "coverage_choices": json["coverage_choices"] == null ? void 0 : json["coverage_choices"].map(CoverageChoiceFromJSON),
1156
+ "coverage_id": json["coverage_id"] === void 0 ? void 0 : json["coverage_id"] === null ? null : json["coverage_id"],
1157
+ "coverage_selection": json["coverage_selection"] === void 0 ? void 0 : json["coverage_selection"] === null ? null : json["coverage_selection"],
1158
+ "evidence": json["evidence"] == null ? void 0 : json["evidence"].map(NetworkEvidenceFromJSON),
1159
+ "network_status": json["network_status"] == null ? void 0 : json["network_status"],
1160
+ "plan": json["plan"] === void 0 ? void 0 : json["plan"] === null ? null : NetworkPlanFromJSON(json["plan"]),
1161
+ "plan_choices": json["plan_choices"] == null ? void 0 : json["plan_choices"].map(NetworkPlanFromJSON),
1162
+ "plan_choices_incomplete": json["plan_choices_incomplete"] == null ? void 0 : json["plan_choices_incomplete"],
1163
+ "plan_graph_id": json["plan_graph_id"] === void 0 ? void 0 : json["plan_graph_id"] === null ? null : json["plan_graph_id"],
1164
+ "plan_selection": json["plan_selection"] === void 0 ? void 0 : json["plan_selection"] === null ? null : json["plan_selection"],
1165
+ "provider_name": json["provider_name"] === void 0 ? void 0 : json["provider_name"] === null ? null : json["provider_name"],
1166
+ "provider_npi": json["provider_npi"] === void 0 ? void 0 : json["provider_npi"] === null ? null : json["provider_npi"],
1167
+ "reason": json["reason"],
1168
+ "source": json["source"] === void 0 ? void 0 : json["source"] === null ? null : json["source"],
1169
+ "status": json["status"]
1170
+ };
1171
+ }
1172
+
1077
1173
  // src/models/openapi-generated/patient/models/EncounterClinicalState.ts
1078
1174
  function EncounterClinicalStateFromJSON(json) {
1079
1175
  return EncounterClinicalStateFromJSONTyped(json, false);
@@ -1402,6 +1498,7 @@ function CheckEligibilityResponseFromJSONTyped(json, ignoreDiscriminator) {
1402
1498
  }
1403
1499
  return {
1404
1500
  "checked_at": new Date(json["checked_at"]),
1501
+ "coverage_id": json["coverage_id"] === void 0 ? void 0 : json["coverage_id"] === null ? null : json["coverage_id"],
1405
1502
  "endpoint_version": json["endpoint_version"] == null ? void 0 : json["endpoint_version"],
1406
1503
  "reason": json["reason"],
1407
1504
  "reference_id": json["reference_id"] === void 0 ? void 0 : json["reference_id"] === null ? null : json["reference_id"],
@@ -2996,6 +3093,12 @@ function CancelTestOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2996
3093
  }
2997
3094
 
2998
3095
  // src/clients/PatientClient.ts
3096
+ function insuranceContextQuery(options) {
3097
+ if (options !== void 0 && options.insurance_context !== "coverage-v1") {
3098
+ throw new TypeError("insurance_context must be coverage-v1");
3099
+ }
3100
+ return options === void 0 ? void 0 : { insurance_context: options.insurance_context };
3101
+ }
2999
3102
  var PatientClient = class extends BaseServiceClient {
3000
3103
  /** Create a clinical order; Athena requires an owned linked encounter and existing diagnosis. */
3001
3104
  async placeTestOrder(request) {
@@ -3271,9 +3374,10 @@ var PatientClient = class extends BaseServiceClient {
3271
3374
  body: request
3272
3375
  });
3273
3376
  }
3274
- createInsurance(request) {
3377
+ createInsurance(request, options) {
3275
3378
  return this.send("POST", "/patients/insurance", {
3276
- body: request
3379
+ body: request,
3380
+ query: insuranceContextQuery(options)
3277
3381
  });
3278
3382
  }
3279
3383
  listPatientInsurances() {
@@ -3589,8 +3693,17 @@ var PatientClient = class extends BaseServiceClient {
3589
3693
  });
3590
3694
  }
3591
3695
  /** Check the token patient's saved primary self Coverage for service 30. */
3592
- checkInsuranceEligibility(request = {}) {
3593
- return this.send("POST", "/insurance/eligibility", { body: request }).then(CheckEligibilityResponseFromJSON);
3696
+ checkInsuranceEligibility(request = {}, options) {
3697
+ return this.send("POST", "/insurance/eligibility", {
3698
+ body: request,
3699
+ query: insuranceContextQuery(options)
3700
+ }).then(CheckEligibilityResponseFromJSON);
3701
+ }
3702
+ /** Check directory membership separately from payer eligibility. */
3703
+ checkInsuranceNetwork(request) {
3704
+ return this.send("POST", "/insurance/network", {
3705
+ body: CheckInsuranceNetworkRequestToJSON(request)
3706
+ }).then(CheckInsuranceNetworkResponseFromJSON);
3594
3707
  }
3595
3708
  /** Submit a raw X12 270 eligibility request for the authenticated patient. */
3596
3709
  submitRawX12InsuranceEligibility(request) {
@@ -7713,6 +7826,7 @@ var HCSDK_OPERATION_SUMMARY = [
7713
7826
  { service: "patient", method: "POST", path: "/questionnaires", sdkMethod: "patient.createQuestionnaire", summary: "Create questionnaire" },
7714
7827
  { service: "patient", method: "POST", path: "/questionnaires/{id}/responses", sdkMethod: "patient.createQuestionnaireResponse", summary: "Create questionnaire response" },
7715
7828
  { service: "patient", method: "POST", path: "/insurance/eligibility", sdkMethod: "patient.checkInsuranceEligibility", summary: "Check insurance eligibility" },
7829
+ { service: "patient", method: "POST", path: "/insurance/network", sdkMethod: "patient.checkInsuranceNetwork", summary: "Check saved Coverage provider directory membership" },
7716
7830
  { service: "patient", method: "POST", path: "/assistant/classify", sdkMethod: "patient.classifyVoiceCommand", summary: "Voice command classification (public)" },
7717
7831
  { service: "patient", method: "POST", path: "/assistant/ocr", sdkMethod: "patient.ocrIdentityDocument", summary: "ID document OCR via vision LLM (public)" },
7718
7832
  { service: "patient", method: "POST", path: "/assistant/chat", sdkMethod: "patient.askAssistant", summary: "Grounded RAG field-guide chat (public)" },