@healthcloudai/hc-sdk 0.8.9 → 0.8.11

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 CHANGED
@@ -130,7 +130,8 @@ sdk.fieldAgent // connect, register/login/resetPassword/verifyEmail/verifySm
130
130
  // getAgent/updateAgent, getDashboard, photo, listPatients, listEncounters
131
131
  sdk.mcp // connect + JSON-RPC proxy (patient/fieldAgent tool calls)
132
132
  sdk.graph // connect, provider search/cypher, health plan search/cypher,
133
- // document summary search/cypher, policy document list/search/get
133
+ // document/medical-concept search/cypher, medical-concept
134
+ // list/detail/hierarchy, policy document list/search/get
134
135
  ```
135
136
 
136
137
  `sdk.fieldAgent` talks to a different host (`*-api-fieldagent.health.cloud`)
@@ -143,6 +144,56 @@ instances.
143
144
 
144
145
  All groups share one HTTP client, one token store, one error handler, the same URL resolver, query serialiser, and path-param interpolator.
145
146
 
147
+ ### Graph API
148
+
149
+ `sdk.graph` exposes 19 public methods, one for each Graph API route. The eight
150
+ Search/Cypher methods accept `rag?: boolean`; setting `rag: true` uses the same
151
+ POST route and returns a typed `GraphRagResponse`. There are no separate RAG
152
+ wrapper methods.
153
+
154
+ ```ts
155
+ // Standard structured response
156
+ const providers = await sdk.graph.searchProviders({
157
+ phrase: "cardiology",
158
+ state_code: "CA",
159
+ limit: 20,
160
+ });
161
+
162
+ // Same endpoint, Graph-RAG response
163
+ const providerAnswer = await sdk.graph.searchProviders({
164
+ phrase: "cardiology",
165
+ state_code: "CA",
166
+ limit: 20,
167
+ rag: true,
168
+ });
169
+
170
+ // Cypher uses the same rag flag
171
+ const conceptAnswer = await sdk.graph.searchMedicalConceptsCypher({
172
+ query: "How many medical concepts are available?",
173
+ limit: 20,
174
+ rag: true,
175
+ });
176
+ ```
177
+
178
+ Search/Cypher methods:
179
+
180
+ - `searchProviders`, `searchProvidersCypher`
181
+ - `searchHealthPlans`, `searchHealthPlansCypher`
182
+ - `searchDocumentSummaries`, `searchDocumentSummariesCypher`
183
+ - `searchMedicalConcepts`, `searchMedicalConceptsCypher`
184
+
185
+ Additional GET-backed methods:
186
+
187
+ - `searchMedicalConceptsFaceted`, `listMedicalConceptVocabularies`
188
+ - `listMedicalConcepts`, `getMedicalConcept`
189
+ - `listMedicalConceptRelationships`, `listMedicalConceptAncestors`,
190
+ `listMedicalConceptDescendants`
191
+ - `listPolicyDocuments`, `searchPolicyDocuments`, `getPolicyDocument`
192
+
193
+ Together with `connect`, this is 19 public SDK methods. The live suite executes
194
+ 29 scenarios because it tests all eight POST methods both with and without RAG,
195
+ and runs faceted medical-concept search for SNOMED, RXNORM, and MESH.
196
+
146
197
  ### Telehealth helpers
147
198
 
148
199
  The telehealth client exposes the backend's channel and RTC-token routes:
package/dist/index.cjs CHANGED
@@ -563,6 +563,13 @@ var FieldAgentClient = class extends BaseServiceClient {
563
563
  body: request
564
564
  });
565
565
  }
566
+ /**
567
+ * Get a field agent's photo by binary_id, or the stored photo if binary_id is omitted.
568
+ * GET /agents/{fhir_person_id}/photo?binary_id=...
569
+ *
570
+ * @param fhirPersonId - The FHIR Person ID of the agent
571
+ * @param query - Optional query parameters; if omitted, fetches the stored/default photo
572
+ */
566
573
  getPhoto(fhirPersonId, query) {
567
574
  return this.send("GET", "/agents/{fhir_person_id}/photo", {
568
575
  pathParams: { fhir_person_id: fhirPersonId },
@@ -643,6 +650,13 @@ var PatientClient = class extends BaseServiceClient {
643
650
  body: request
644
651
  });
645
652
  }
653
+ /**
654
+ * Get a patient's photo by binary_id, or the stored photo if binary_id is omitted.
655
+ * GET /patients/{id}/photo?binary_id=...
656
+ *
657
+ * @param fhirPatientId - The FHIR Patient ID
658
+ * @param query - Optional query parameters; if omitted, fetches the stored/default photo
659
+ */
646
660
  getPhoto(fhirPatientId, query) {
647
661
  return this.send("GET", "/patients/{id}/photo", {
648
662
  pathParams: { id: fhirPatientId },
@@ -945,8 +959,11 @@ var PersonClient = class extends BaseServiceClient {
945
959
  });
946
960
  }
947
961
  /**
948
- * Get a person's photo by binary_id.
962
+ * Get a person's photo by binary_id, or the stored photo if binary_id is omitted.
949
963
  * GET /persons/{person_id}/photo?binary_id=...
964
+ *
965
+ * @param fhirPersonId - The FHIR Person ID
966
+ * @param query - Optional query parameters; if omitted, fetches the stored/default photo
950
967
  */
951
968
  getPhoto(fhirPersonId, query) {
952
969
  return this.send("GET", "/persons/{person_id}/photo", {
@@ -1000,6 +1017,13 @@ var ProviderClient = class extends BaseServiceClient {
1000
1017
  uploadPhoto(fhirPractitionerId, request) {
1001
1018
  return this.send("POST", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
1002
1019
  }
1020
+ /**
1021
+ * Get a practitioner's photo by binary_id, or the stored photo if binary_id is omitted.
1022
+ * GET /practitioners/{practitioner_id}/photo?binary_id=...
1023
+ *
1024
+ * @param fhirPractitionerId - The FHIR Practitioner ID
1025
+ * @param query - Optional query parameters; if omitted, fetches the stored/default photo
1026
+ */
1003
1027
  getPhoto(fhirPractitionerId, query) {
1004
1028
  return this.send("GET", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id: fhirPractitionerId }, query });
1005
1029
  }
@@ -1077,36 +1101,82 @@ var GraphClient = class extends BaseServiceClient {
1077
1101
  connect() {
1078
1102
  return this.connectService();
1079
1103
  }
1080
- // ─── Providers ───────────────────────────────────────────────────────
1081
1104
  searchProviders(request) {
1082
- return this.send("POST", "/graph/providers/search", { body: request });
1105
+ return this.send("POST", "/graph/providers/search", {
1106
+ body: request
1107
+ });
1083
1108
  }
1084
1109
  searchProvidersCypher(request) {
1085
- return this.send("POST", "/graph/providers/cypher", { body: request });
1110
+ return this.send("POST", "/graph/providers/cypher", {
1111
+ body: request
1112
+ });
1086
1113
  }
1087
- // ─── Health Plans ────────────────────────────────────────────────────
1088
1114
  searchHealthPlans(request) {
1089
- return this.send("POST", "/graph/health-plans/search", { body: request });
1115
+ return this.send("POST", "/graph/health-plans/search", {
1116
+ body: request
1117
+ });
1090
1118
  }
1091
1119
  searchHealthPlansCypher(request) {
1092
- return this.send("POST", "/graph/health-plans/cypher", { body: request });
1120
+ return this.send("POST", "/graph/health-plans/cypher", {
1121
+ body: request
1122
+ });
1093
1123
  }
1094
- // ─── Document Summaries ──────────────────────────────────────────────
1095
1124
  searchDocumentSummaries(request) {
1096
- return this.send("POST", "/graph/document-summaries/search", { body: request });
1125
+ return this.send("POST", "/graph/document-summaries/search", {
1126
+ body: request
1127
+ });
1097
1128
  }
1098
1129
  searchDocumentSummariesCypher(request) {
1099
- return this.send("POST", "/graph/document-summaries/cypher", { body: request });
1130
+ return this.send("POST", "/graph/document-summaries/cypher", {
1131
+ body: request
1132
+ });
1133
+ }
1134
+ searchMedicalConcepts(request) {
1135
+ return this.send("POST", "/graph/medical-concepts/search", {
1136
+ body: request
1137
+ });
1138
+ }
1139
+ searchMedicalConceptsCypher(request) {
1140
+ return this.send("POST", "/graph/medical-concepts/cypher", {
1141
+ body: request
1142
+ });
1143
+ }
1144
+ searchMedicalConceptsFaceted(query) {
1145
+ return this.send("GET", "/medical-concepts/search", { query });
1146
+ }
1147
+ listMedicalConceptVocabularies() {
1148
+ return this.send("GET", "/medical-concepts/vocabularies");
1149
+ }
1150
+ listMedicalConcepts(query) {
1151
+ return this.send("GET", "/medical-concepts", { query });
1152
+ }
1153
+ getMedicalConcept(conceptId) {
1154
+ return this.send("GET", "/medical-concepts/{concept_id}", { pathParams: { concept_id: conceptId } });
1155
+ }
1156
+ listMedicalConceptRelationships(conceptId, query) {
1157
+ return this.send("GET", "/medical-concepts/{concept_id}/relationships", { pathParams: { concept_id: conceptId }, query });
1158
+ }
1159
+ listMedicalConceptAncestors(conceptId, query) {
1160
+ return this.send("GET", "/medical-concepts/{concept_id}/ancestors", { pathParams: { concept_id: conceptId }, query });
1161
+ }
1162
+ listMedicalConceptDescendants(conceptId, query) {
1163
+ return this.send("GET", "/medical-concepts/{concept_id}/descendants", { pathParams: { concept_id: conceptId }, query });
1100
1164
  }
1101
1165
  // ─── Policy Documents ────────────────────────────────────────────────
1102
1166
  listPolicyDocuments(query) {
1103
- return this.send("GET", "/documents", { query });
1167
+ return this.send("GET", "/documents", {
1168
+ query
1169
+ });
1104
1170
  }
1105
1171
  searchPolicyDocuments(query) {
1106
- return this.send("GET", "/documents/search", { query });
1172
+ return this.send("GET", "/documents/search", {
1173
+ query
1174
+ });
1107
1175
  }
1108
1176
  getPolicyDocument(docId) {
1109
- return this.send("GET", "/documents/{doc_id}", { pathParams: { doc_id: docId } });
1177
+ return this.send("GET", "/documents/{doc_id}", {
1178
+ pathParams: { doc_id: docId }
1179
+ });
1110
1180
  }
1111
1181
  };
1112
1182