@healthcloudai/hc-sdk 3.5.2 → 3.6.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.
- package/dist/index.cjs +153 -17
- package/dist/index.d.cts +1618 -182
- package/dist/index.d.ts +1618 -182
- package/dist/index.js +153 -17
- package/docs/clients/AppointmentsClient.md +1 -1
- package/docs/clients/PatientClient.md +4 -1
- package/docs/clients/ProviderClient.md +1 -0
- package/docs/docs-manifest.json +28 -5
- package/docs/examples/index.md +6 -2
- package/docs/index.md +6 -2
- package/docs/models/AddPatientIntakeRequest.md +24 -0
- package/docs/models/AddPatientIntakeResponse.md +17 -0
- package/docs/models/AdvanceDirective.md +31 -0
- package/docs/models/AdvanceDirectiveType.md +15 -0
- package/docs/models/AthenaListAppointmentsRequest.md +1 -1
- package/docs/models/CarequalityRetrieveDocumentsRequest.md +1 -1
- package/docs/models/DirectiveScope.md +15 -0
- package/docs/models/DirectiveStatus.md +15 -0
- package/docs/models/GetAppointmentTelehealthLinkResponse.md +1 -1
- package/docs/models/GetHealthRecordResponse.md +2 -2
- package/docs/models/Immunization.md +40 -0
- package/docs/models/ImmunizationRoute.md +15 -0
- package/docs/models/ImmunizationStatus.md +15 -0
- package/docs/models/ListDirectivesResponse.md +1 -1
- package/docs/models/ListImmunizationsResponse.md +1 -1
- package/docs/models/ListProceduresResponse.md +1 -1
- package/docs/models/OpenAIEmbedRequest.md +1 -1
- package/docs/models/Procedure.md +37 -0
- package/docs/models/ProcedureLaterality.md +15 -0
- package/docs/models/ProcedureStatus.md +15 -0
- package/docs/models/SendGridSendEmailRequest.md +1 -1
- package/docs/models/StediClaimsResponse.md +18 -0
- package/docs/models/StediEligibilityBatchItem.md +22 -0
- package/docs/models/StediEligibilityBatchRequest.md +17 -0
- package/docs/models/StediEligibilityBatchResponse.md +17 -0
- package/docs/models/StediEligibilityCheckRequest.md +21 -0
- package/docs/models/StediRawX12EligibilityRequest.md +17 -0
- package/docs/models/VaccinationSite.md +15 -0
- package/docs/models/ehr.ImmunizationReaction.md +20 -0
- package/docs/models/ehr.ListMedicationsResponse.md +1 -1
- package/docs/models/index.md +20 -1
- package/docs/operations/appointments.getTelehealthLink.md +4 -4
- package/docs/operations/connectors.athenaListAppointments.md +1 -3
- package/docs/operations/connectors.carequalityRetrieveDocuments.md +11 -7
- package/docs/operations/connectors.openaiEmbed.md +3 -7
- package/docs/operations/connectors.sendgridSend.md +3 -7
- package/docs/operations/diagnostics.lookupTestByGs1.md +11 -3
- package/docs/operations/ehr.listMedications.md +2 -2
- package/docs/operations/patient.addPatientIntake.md +138 -0
- package/docs/operations/patient.checkPatientInsuranceEligibility.md +170 -0
- package/docs/operations/patient.listMedications.md +2 -2
- package/docs/operations/patient.listPatientInsuranceClaims.md +181 -0
- package/docs/operations/patient.submitPatientRawX12Eligibility.md +162 -0
- package/docs/operations/provider.submitInsuranceEligibilityBatch.md +164 -0
- package/package.json +1 -1
- package/docs/models/CheckEligibilityRequest.md +0 -23
- package/docs/operations/patient.checkEligibility.md +0 -147
package/dist/index.cjs
CHANGED
|
@@ -984,22 +984,47 @@ var MCPClient = class extends BaseServiceClient {
|
|
|
984
984
|
}
|
|
985
985
|
};
|
|
986
986
|
|
|
987
|
-
// src/models/openapi-generated/patient/models/
|
|
988
|
-
function
|
|
989
|
-
return
|
|
987
|
+
// src/models/openapi-generated/patient/models/StediClaimsResponse.ts
|
|
988
|
+
function StediClaimsResponseFromJSON(json) {
|
|
989
|
+
return StediClaimsResponseFromJSONTyped(json, false);
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function StediClaimsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
992
|
+
if (json == null) {
|
|
993
|
+
return json;
|
|
994
|
+
}
|
|
995
|
+
return {
|
|
996
|
+
"items": json["items"] == null ? void 0 : json["items"],
|
|
997
|
+
"next_page_token": json["nextPageToken"] === void 0 ? void 0 : json["nextPageToken"] === null ? null : json["nextPageToken"]
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// src/models/openapi-generated/patient/models/StediEligibilityCheckRequest.ts
|
|
1002
|
+
function StediEligibilityCheckRequestToJSON(json) {
|
|
1003
|
+
return StediEligibilityCheckRequestToJSONTyped(json, false);
|
|
1004
|
+
}
|
|
1005
|
+
function StediEligibilityCheckRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
992
1006
|
if (value == null) {
|
|
993
1007
|
return value;
|
|
994
1008
|
}
|
|
995
1009
|
return {
|
|
996
|
-
"
|
|
997
|
-
"
|
|
998
|
-
"last_name": value["last_name"],
|
|
999
|
-
"member_id": value["member_id"],
|
|
1000
|
-
"npi": value["npi"],
|
|
1010
|
+
"dependent": value["dependent"],
|
|
1011
|
+
"encounter": value["encounter"],
|
|
1001
1012
|
"payer_id": value["payer_id"],
|
|
1002
|
-
"
|
|
1013
|
+
"provider": value["provider"],
|
|
1014
|
+
"subscriber": value["subscriber"]
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
// src/models/openapi-generated/patient/models/StediRawX12EligibilityRequest.ts
|
|
1019
|
+
function StediRawX12EligibilityRequestToJSON(json) {
|
|
1020
|
+
return StediRawX12EligibilityRequestToJSONTyped(json, false);
|
|
1021
|
+
}
|
|
1022
|
+
function StediRawX12EligibilityRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1023
|
+
if (value == null) {
|
|
1024
|
+
return value;
|
|
1025
|
+
}
|
|
1026
|
+
return {
|
|
1027
|
+
"x12": value["x12"]
|
|
1003
1028
|
};
|
|
1004
1029
|
}
|
|
1005
1030
|
|
|
@@ -1205,6 +1230,7 @@ function IntakeSurgeryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1205
1230
|
return value;
|
|
1206
1231
|
}
|
|
1207
1232
|
return {
|
|
1233
|
+
...value,
|
|
1208
1234
|
"anesthesia_type": value["anesthesia_type"],
|
|
1209
1235
|
"body_sites": value["body_sites"],
|
|
1210
1236
|
"complications": value["complications"],
|
|
@@ -1260,6 +1286,7 @@ function IntakeFamilyHistoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1260
1286
|
return value;
|
|
1261
1287
|
}
|
|
1262
1288
|
return {
|
|
1289
|
+
...value,
|
|
1263
1290
|
"age_at_death": value["age_at_death"],
|
|
1264
1291
|
"biological": value["biological"],
|
|
1265
1292
|
"born_date": value["born_date"] == null ? value["born_date"] : value["born_date"].toISOString().substring(0, 10),
|
|
@@ -1284,6 +1311,7 @@ function PerinatalHistoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1284
1311
|
return value;
|
|
1285
1312
|
}
|
|
1286
1313
|
return {
|
|
1314
|
+
...value,
|
|
1287
1315
|
"delivery_date": value["delivery_date"] == null ? value["delivery_date"] : value["delivery_date"].toISOString().substring(0, 10),
|
|
1288
1316
|
"delivery_method": value["delivery_method"],
|
|
1289
1317
|
"gestational_age_weeks": value["gestational_age_weeks"],
|
|
@@ -1304,6 +1332,7 @@ function GynHistoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1304
1332
|
return value;
|
|
1305
1333
|
}
|
|
1306
1334
|
return {
|
|
1335
|
+
...value,
|
|
1307
1336
|
"cervical_screening_history": value["cervical_screening_history"],
|
|
1308
1337
|
"contraception": value["contraception"],
|
|
1309
1338
|
"last_menstrual_period": value["last_menstrual_period"] == null ? value["last_menstrual_period"] : value["last_menstrual_period"].toISOString().substring(0, 10),
|
|
@@ -1422,6 +1451,7 @@ function IntakeSocialHistoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1422
1451
|
return value;
|
|
1423
1452
|
}
|
|
1424
1453
|
return {
|
|
1454
|
+
...value,
|
|
1425
1455
|
"alcohol": AlcoholUseToJSON(value["alcohol"]),
|
|
1426
1456
|
"contraception": value["contraception"],
|
|
1427
1457
|
"diet_category": DietCategoryToJSON(value["diet_category"]),
|
|
@@ -1463,6 +1493,7 @@ function IntakeCancerTreatmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1463
1493
|
return value;
|
|
1464
1494
|
}
|
|
1465
1495
|
return {
|
|
1496
|
+
...value,
|
|
1466
1497
|
"description": value["description"],
|
|
1467
1498
|
"end_date": value["end_date"] == null ? value["end_date"] : value["end_date"].toISOString().substring(0, 10),
|
|
1468
1499
|
"facility": value["facility"],
|
|
@@ -1511,6 +1542,7 @@ function IntakeCancerCaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1511
1542
|
return value;
|
|
1512
1543
|
}
|
|
1513
1544
|
return {
|
|
1545
|
+
...value,
|
|
1514
1546
|
"biomarkers": value["biomarkers"],
|
|
1515
1547
|
"cancer_type": value["cancer_type"],
|
|
1516
1548
|
"diagnosis_date": value["diagnosis_date"] == null ? value["diagnosis_date"] : value["diagnosis_date"].toISOString().substring(0, 10),
|
|
@@ -1542,6 +1574,7 @@ function IntakeMedicationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1542
1574
|
return value;
|
|
1543
1575
|
}
|
|
1544
1576
|
return {
|
|
1577
|
+
...value,
|
|
1545
1578
|
"authored_on": value["authored_on"] == null ? value["authored_on"] : value["authored_on"].toISOString().substring(0, 10),
|
|
1546
1579
|
"brand_name": value["brand_name"],
|
|
1547
1580
|
"discontinued_reason": value["discontinued_reason"],
|
|
@@ -1629,6 +1662,7 @@ function IntakeAllergyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1629
1662
|
return value;
|
|
1630
1663
|
}
|
|
1631
1664
|
return {
|
|
1665
|
+
...value,
|
|
1632
1666
|
"allergen": value["allergen"],
|
|
1633
1667
|
"allergen_code": CodedConceptToJSON(value["allergen_code"]),
|
|
1634
1668
|
"asserted_date": value["asserted_date"] == null ? value["asserted_date"] : value["asserted_date"].toISOString().substring(0, 10),
|
|
@@ -1667,6 +1701,7 @@ function IntakeProblemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1667
1701
|
return value;
|
|
1668
1702
|
}
|
|
1669
1703
|
return {
|
|
1704
|
+
...value,
|
|
1670
1705
|
"asserted_date": value["asserted_date"] == null ? value["asserted_date"] : value["asserted_date"].toISOString().substring(0, 10),
|
|
1671
1706
|
"body_site": value["body_site"],
|
|
1672
1707
|
"categories": value["categories"] == null ? void 0 : value["categories"].map(ProblemCategoryToJSON),
|
|
@@ -1724,6 +1759,7 @@ function IntakeVaccineToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1724
1759
|
return value;
|
|
1725
1760
|
}
|
|
1726
1761
|
return {
|
|
1762
|
+
...value,
|
|
1727
1763
|
"administered_by": value["administered_by"],
|
|
1728
1764
|
"administered_date": value["administered_date"] == null ? value["administered_date"] : value["administered_date"].toISOString().substring(0, 10),
|
|
1729
1765
|
"administered_datetime": value["administered_datetime"] == null ? value["administered_datetime"] : value["administered_datetime"].toISOString(),
|
|
@@ -2082,8 +2118,51 @@ function PatientIntakeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2082
2118
|
};
|
|
2083
2119
|
}
|
|
2084
2120
|
|
|
2121
|
+
// src/models/openapi-generated/patient/models/Summary.ts
|
|
2122
|
+
function SummaryToJSON(json) {
|
|
2123
|
+
return SummaryToJSONTyped(json, false);
|
|
2124
|
+
}
|
|
2125
|
+
function SummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2126
|
+
return value;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
// src/models/openapi-generated/patient/models/AddPatientIntakeRequest.ts
|
|
2130
|
+
function AddPatientIntakeRequestToJSON(json) {
|
|
2131
|
+
return AddPatientIntakeRequestToJSONTyped(json, false);
|
|
2132
|
+
}
|
|
2133
|
+
function AddPatientIntakeRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2134
|
+
if (value == null) {
|
|
2135
|
+
return value;
|
|
2136
|
+
}
|
|
2137
|
+
return {
|
|
2138
|
+
"patient_id": value["patient_id"],
|
|
2139
|
+
"section": value["section"],
|
|
2140
|
+
"summary": SummaryToJSON(value["summary"])
|
|
2141
|
+
};
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
// src/models/openapi-generated/patient/models/AddPatientIntakeResponse.ts
|
|
2145
|
+
function AddPatientIntakeResponseFromJSON(json) {
|
|
2146
|
+
return AddPatientIntakeResponseFromJSONTyped(json, false);
|
|
2147
|
+
}
|
|
2148
|
+
function AddPatientIntakeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2149
|
+
if (json == null) {
|
|
2150
|
+
return json;
|
|
2151
|
+
}
|
|
2152
|
+
return {
|
|
2153
|
+
"error_messages": json["error_messages"] == null ? void 0 : json["error_messages"]
|
|
2154
|
+
};
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2085
2157
|
// src/clients/PatientClient.ts
|
|
2086
2158
|
var PatientClient = class extends BaseServiceClient {
|
|
2159
|
+
/** Add one agent-collected intake section and return actionable validation errors. */
|
|
2160
|
+
async addToIntake(patientId, section, summary) {
|
|
2161
|
+
const response = await this.send("POST", "/healthrecords/intake/add", {
|
|
2162
|
+
body: AddPatientIntakeRequestToJSON({ patient_id: patientId, section, summary })
|
|
2163
|
+
});
|
|
2164
|
+
return AddPatientIntakeResponseFromJSON(response);
|
|
2165
|
+
}
|
|
2087
2166
|
/** Add patient-reported history; each call creates a new server-identified submission. */
|
|
2088
2167
|
async submitPatientIntake(request) {
|
|
2089
2168
|
const response = await this.send("POST", "/patients/health-record/intake", {
|
|
@@ -2482,17 +2561,23 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
2482
2561
|
body: request
|
|
2483
2562
|
});
|
|
2484
2563
|
}
|
|
2485
|
-
|
|
2486
|
-
// `InsuranceEligibilityResponse` for why it stays a raw `JsonValue`.
|
|
2487
|
-
//
|
|
2488
|
-
// `CheckEligibilityRequest.date_of_birth` is generated as a `Date` (OpenAPI
|
|
2489
|
-
// `date` format); `...ToJSON` is the generated serializer that renders it
|
|
2490
|
-
// back to the `YYYY-MM-DD` wire format instead of a full ISO datetime.
|
|
2564
|
+
/** Check the authenticated patient's payer eligibility and benefits. */
|
|
2491
2565
|
checkInsuranceEligibility(request) {
|
|
2492
2566
|
return this.send("POST", "/insurance/eligibility", {
|
|
2493
|
-
body:
|
|
2567
|
+
body: StediEligibilityCheckRequestToJSON(request)
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2570
|
+
/** Submit a raw X12 270 eligibility request for the authenticated patient. */
|
|
2571
|
+
submitRawX12InsuranceEligibility(request) {
|
|
2572
|
+
return this.send("POST", "/insurance/eligibility/x12", {
|
|
2573
|
+
body: StediRawX12EligibilityRequestToJSON(request)
|
|
2494
2574
|
});
|
|
2495
2575
|
}
|
|
2576
|
+
/** List Stedi claims linked to the authenticated patient's FHIR Claim records. */
|
|
2577
|
+
async listInsuranceClaims(query) {
|
|
2578
|
+
const response = await this.send("GET", "/insurance/claims", { query });
|
|
2579
|
+
return StediClaimsResponseFromJSON(response);
|
|
2580
|
+
}
|
|
2496
2581
|
// ── Assistant API — classify/ocr/chat are public (auth: false); the 3
|
|
2497
2582
|
// knowledge/action routes require a bearer token (default auth behaviour). ──
|
|
2498
2583
|
classifyVoiceCommand(request) {
|
|
@@ -2803,6 +2888,50 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
2803
2888
|
}
|
|
2804
2889
|
};
|
|
2805
2890
|
|
|
2891
|
+
// src/models/openapi-generated/provider/models/StediEligibilityBatchItem.ts
|
|
2892
|
+
function StediEligibilityBatchItemToJSON(json) {
|
|
2893
|
+
return StediEligibilityBatchItemToJSONTyped(json, false);
|
|
2894
|
+
}
|
|
2895
|
+
function StediEligibilityBatchItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2896
|
+
if (value == null) {
|
|
2897
|
+
return value;
|
|
2898
|
+
}
|
|
2899
|
+
return {
|
|
2900
|
+
"dependent": value["dependent"],
|
|
2901
|
+
"encounter": value["encounter"],
|
|
2902
|
+
"provider": value["provider"],
|
|
2903
|
+
"submitter_transaction_identifier": value["submitter_transaction_identifier"],
|
|
2904
|
+
"subscriber": value["subscriber"],
|
|
2905
|
+
"trading_partner_service_id": value["trading_partner_service_id"]
|
|
2906
|
+
};
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
// src/models/openapi-generated/provider/models/StediEligibilityBatchRequest.ts
|
|
2910
|
+
function StediEligibilityBatchRequestToJSON(json) {
|
|
2911
|
+
return StediEligibilityBatchRequestToJSONTyped(json, false);
|
|
2912
|
+
}
|
|
2913
|
+
function StediEligibilityBatchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2914
|
+
if (value == null) {
|
|
2915
|
+
return value;
|
|
2916
|
+
}
|
|
2917
|
+
return {
|
|
2918
|
+
"items": value["items"].map(StediEligibilityBatchItemToJSON)
|
|
2919
|
+
};
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
// src/models/openapi-generated/provider/models/StediEligibilityBatchResponse.ts
|
|
2923
|
+
function StediEligibilityBatchResponseFromJSON(json) {
|
|
2924
|
+
return StediEligibilityBatchResponseFromJSONTyped(json, false);
|
|
2925
|
+
}
|
|
2926
|
+
function StediEligibilityBatchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2927
|
+
if (json == null) {
|
|
2928
|
+
return json;
|
|
2929
|
+
}
|
|
2930
|
+
return {
|
|
2931
|
+
"batch_id": json["batchId"]
|
|
2932
|
+
};
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2806
2935
|
// src/clients/ProviderClient.ts
|
|
2807
2936
|
var ProviderClient = class extends BaseServiceClient {
|
|
2808
2937
|
constructor(http, getTenantId = () => void 0) {
|
|
@@ -2812,6 +2941,13 @@ var ProviderClient = class extends BaseServiceClient {
|
|
|
2812
2941
|
connect() {
|
|
2813
2942
|
return this.connectService();
|
|
2814
2943
|
}
|
|
2944
|
+
/** Submit multiple insurance eligibility checks for asynchronous processing. */
|
|
2945
|
+
async submitInsuranceEligibilityBatch(request) {
|
|
2946
|
+
const response = await this.send("POST", "/insurance/eligibility/batch", {
|
|
2947
|
+
body: StediEligibilityBatchRequestToJSON(request)
|
|
2948
|
+
});
|
|
2949
|
+
return StediEligibilityBatchResponseFromJSON(response);
|
|
2950
|
+
}
|
|
2815
2951
|
// ─── Auth (public, no Bearer) ──────────────────────────────────────
|
|
2816
2952
|
register(request) {
|
|
2817
2953
|
return this.send("POST", "/auth/register", { body: withTenantId(request, this.getTenantId()), auth: false });
|