@healthcloudai/hc-sdk 0.8.10 → 0.8.12
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/README.md +52 -1
- package/dist/index.cjs +130 -44
- package/dist/index.d.cts +93 -19
- package/dist/index.d.ts +93 -19
- package/dist/index.js +130 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -521,13 +521,28 @@ var MCPClient = class extends BaseServiceClient {
|
|
|
521
521
|
connect() {
|
|
522
522
|
return this.connectService();
|
|
523
523
|
}
|
|
524
|
+
sendToAudience(audience, request) {
|
|
525
|
+
return this.send("POST", `/${audience}`, { body: request });
|
|
526
|
+
}
|
|
524
527
|
/** Calls one of the 14 Patient API tools via `POST /patient`. */
|
|
525
528
|
patient(request) {
|
|
526
|
-
return this.
|
|
529
|
+
return this.sendToAudience("patient", request);
|
|
527
530
|
}
|
|
528
531
|
/** Calls one of the 8 Field Agent API tools via `POST /fieldagent`. */
|
|
529
532
|
fieldAgent(request) {
|
|
530
|
-
return this.
|
|
533
|
+
return this.sendToAudience("fieldagent", request);
|
|
534
|
+
}
|
|
535
|
+
/** Calls one of the Assistant API tools via `POST /assistant`. */
|
|
536
|
+
assistant(request) {
|
|
537
|
+
return this.sendToAudience("assistant", request);
|
|
538
|
+
}
|
|
539
|
+
/** Calls one of the Communications API tools via `POST /communications`. */
|
|
540
|
+
communications(request) {
|
|
541
|
+
return this.sendToAudience("communications", request);
|
|
542
|
+
}
|
|
543
|
+
/** Calls one of the Person API tools via `POST /person`. */
|
|
544
|
+
person(request) {
|
|
545
|
+
return this.sendToAudience("person", request);
|
|
531
546
|
}
|
|
532
547
|
};
|
|
533
548
|
|
|
@@ -626,6 +641,100 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
626
641
|
pathParams: { id: fhirPatientId }
|
|
627
642
|
});
|
|
628
643
|
}
|
|
644
|
+
importHealthRecord(fhirPatientId, payload) {
|
|
645
|
+
return this.send("POST", "/patients/{id}/health-record/import", {
|
|
646
|
+
pathParams: { id: fhirPatientId },
|
|
647
|
+
body: payload
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
importCCDA(fhirPatientId, content) {
|
|
651
|
+
return this.send("POST", "/patients/{id}/health-record/import", {
|
|
652
|
+
pathParams: { id: fhirPatientId },
|
|
653
|
+
body: {
|
|
654
|
+
resourceType: "Binary",
|
|
655
|
+
contentType: "text/xml",
|
|
656
|
+
data: Buffer.from(content, "utf8").toString("base64")
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
importVitals(fhirPatientId, source, payload) {
|
|
661
|
+
return this.send("POST", "/patients/{id}/vitals/import", {
|
|
662
|
+
pathParams: { id: fhirPatientId },
|
|
663
|
+
body: { source, payload }
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
importActivity(fhirPatientId, source, payload) {
|
|
667
|
+
return this.send("POST", "/patients/{id}/activity/import", {
|
|
668
|
+
pathParams: { id: fhirPatientId },
|
|
669
|
+
body: { source, payload }
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
listActivity(fhirPatientId, type) {
|
|
673
|
+
return this.send("GET", "/patients/{id}/activity", {
|
|
674
|
+
pathParams: { id: fhirPatientId },
|
|
675
|
+
query: type ? { type } : void 0
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
deleteActivity(fhirPatientId, activityId) {
|
|
679
|
+
return this.send("DELETE", "/patients/{id}/activity/{activity_id}", {
|
|
680
|
+
pathParams: { id: fhirPatientId, activity_id: activityId }
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
getPreferredPharmacy(fhirPatientId) {
|
|
684
|
+
return this.send("GET", "/patients/{id}/preferred-pharmacy", {
|
|
685
|
+
pathParams: { id: fhirPatientId }
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
setPreferredPharmacy(fhirPatientId, data) {
|
|
689
|
+
return this.send("PUT", "/patients/{id}/preferred-pharmacy", {
|
|
690
|
+
pathParams: { id: fhirPatientId },
|
|
691
|
+
body: data
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
listDependents(fhirPatientId) {
|
|
695
|
+
return this.send("GET", "/patients/{id}/dependents", {
|
|
696
|
+
pathParams: { id: fhirPatientId }
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
saveDependent(fhirPatientId, data, dependentId) {
|
|
700
|
+
if (dependentId) {
|
|
701
|
+
return this.send("PUT", "/patients/{id}/dependents/{dependent_id}", {
|
|
702
|
+
pathParams: { id: fhirPatientId, dependent_id: dependentId },
|
|
703
|
+
body: data
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
return this.send("POST", "/patients/{id}/dependents", {
|
|
707
|
+
pathParams: { id: fhirPatientId },
|
|
708
|
+
body: data
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
deleteDependent(fhirPatientId, dependentId) {
|
|
712
|
+
return this.send("DELETE", "/patients/{id}/dependents/{dependent_id}", {
|
|
713
|
+
pathParams: { id: fhirPatientId, dependent_id: dependentId }
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
listNotifications(fhirPatientId) {
|
|
717
|
+
return this.send("GET", "/patients/{id}/notifications", {
|
|
718
|
+
pathParams: { id: fhirPatientId }
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
saveNotification(fhirPatientId, data, notificationId) {
|
|
722
|
+
if (notificationId) {
|
|
723
|
+
return this.send("PUT", "/patients/{id}/notifications/{notification_id}", {
|
|
724
|
+
pathParams: { id: fhirPatientId, notification_id: notificationId },
|
|
725
|
+
body: data
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
return this.send("POST", "/patients/{id}/notifications", {
|
|
729
|
+
pathParams: { id: fhirPatientId },
|
|
730
|
+
body: data
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
deleteNotification(fhirPatientId, notificationId) {
|
|
734
|
+
return this.send("DELETE", "/patients/{id}/notifications/{notification_id}", {
|
|
735
|
+
pathParams: { id: fhirPatientId, notification_id: notificationId }
|
|
736
|
+
});
|
|
737
|
+
}
|
|
629
738
|
createMedication(fhirPatientId, request) {
|
|
630
739
|
return this.send("POST", "/patients/{id}/medications", {
|
|
631
740
|
pathParams: { id: fhirPatientId },
|
|
@@ -1030,7 +1139,6 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
1030
1139
|
connect() {
|
|
1031
1140
|
return this.connectService();
|
|
1032
1141
|
}
|
|
1033
|
-
// ─── Providers ───────────────────────────────────────────────────────
|
|
1034
1142
|
searchProviders(request) {
|
|
1035
1143
|
return this.send("POST", "/graph/providers/search", {
|
|
1036
1144
|
body: request
|
|
@@ -1041,17 +1149,6 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
1041
1149
|
body: request
|
|
1042
1150
|
});
|
|
1043
1151
|
}
|
|
1044
|
-
ragProvidersSearch(request) {
|
|
1045
|
-
return this.send("POST", "/graph/rag/providers/search", {
|
|
1046
|
-
body: request
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
ragProvidersCypher(request) {
|
|
1050
|
-
return this.send("POST", "/graph/rag/providers/cypher", {
|
|
1051
|
-
body: request
|
|
1052
|
-
});
|
|
1053
|
-
}
|
|
1054
|
-
// ─── Health Plans ────────────────────────────────────────────────────
|
|
1055
1152
|
searchHealthPlans(request) {
|
|
1056
1153
|
return this.send("POST", "/graph/health-plans/search", {
|
|
1057
1154
|
body: request
|
|
@@ -1062,17 +1159,6 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
1062
1159
|
body: request
|
|
1063
1160
|
});
|
|
1064
1161
|
}
|
|
1065
|
-
ragHealthPlansSearch(request) {
|
|
1066
|
-
return this.send("POST", "/graph/rag/health-plans/search", {
|
|
1067
|
-
body: request
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
ragHealthPlansCypher(request) {
|
|
1071
|
-
return this.send("POST", "/graph/rag/health-plans/cypher", {
|
|
1072
|
-
body: request
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
// ─── Document Summaries ──────────────────────────────────────────────
|
|
1076
1162
|
searchDocumentSummaries(request) {
|
|
1077
1163
|
return this.send("POST", "/graph/document-summaries/search", {
|
|
1078
1164
|
body: request
|
|
@@ -1083,17 +1169,6 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
1083
1169
|
body: request
|
|
1084
1170
|
});
|
|
1085
1171
|
}
|
|
1086
|
-
ragDocumentSummariesSearch(request) {
|
|
1087
|
-
return this.send("POST", "/graph/rag/document-summaries/search", {
|
|
1088
|
-
body: request
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
ragDocumentSummariesCypher(request) {
|
|
1092
|
-
return this.send("POST", "/graph/rag/document-summaries/cypher", {
|
|
1093
|
-
body: request
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
// ─── Medical Concepts ────────────────────────────────────────────────
|
|
1097
1172
|
searchMedicalConcepts(request) {
|
|
1098
1173
|
return this.send("POST", "/graph/medical-concepts/search", {
|
|
1099
1174
|
body: request
|
|
@@ -1104,15 +1179,26 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
1104
1179
|
body: request
|
|
1105
1180
|
});
|
|
1106
1181
|
}
|
|
1107
|
-
|
|
1108
|
-
return this.send("
|
|
1109
|
-
body: request
|
|
1110
|
-
});
|
|
1182
|
+
searchMedicalConceptsFaceted(query) {
|
|
1183
|
+
return this.send("GET", "/medical-concepts/search", { query });
|
|
1111
1184
|
}
|
|
1112
|
-
|
|
1113
|
-
return this.send("
|
|
1114
|
-
|
|
1115
|
-
|
|
1185
|
+
listMedicalConceptVocabularies() {
|
|
1186
|
+
return this.send("GET", "/medical-concepts/vocabularies");
|
|
1187
|
+
}
|
|
1188
|
+
listMedicalConcepts(query) {
|
|
1189
|
+
return this.send("GET", "/medical-concepts", { query });
|
|
1190
|
+
}
|
|
1191
|
+
getMedicalConcept(conceptId) {
|
|
1192
|
+
return this.send("GET", "/medical-concepts/{concept_id}", { pathParams: { concept_id: conceptId } });
|
|
1193
|
+
}
|
|
1194
|
+
listMedicalConceptRelationships(conceptId, query) {
|
|
1195
|
+
return this.send("GET", "/medical-concepts/{concept_id}/relationships", { pathParams: { concept_id: conceptId }, query });
|
|
1196
|
+
}
|
|
1197
|
+
listMedicalConceptAncestors(conceptId, query) {
|
|
1198
|
+
return this.send("GET", "/medical-concepts/{concept_id}/ancestors", { pathParams: { concept_id: conceptId }, query });
|
|
1199
|
+
}
|
|
1200
|
+
listMedicalConceptDescendants(conceptId, query) {
|
|
1201
|
+
return this.send("GET", "/medical-concepts/{concept_id}/descendants", { pathParams: { concept_id: conceptId }, query });
|
|
1116
1202
|
}
|
|
1117
1203
|
// ─── Policy Documents ────────────────────────────────────────────────
|
|
1118
1204
|
listPolicyDocuments(query) {
|
package/package.json
CHANGED