@healthcloudai/hc-sdk 0.7.4 → 0.8.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.
package/README.md CHANGED
@@ -129,6 +129,8 @@ sdk.telehealth // connect + low-level request escape hatch
129
129
  sdk.fieldAgent // connect, register/login/resetPassword/verifyEmail/verifySms,
130
130
  // getAgent/updateAgent, getDashboard, photo, listPatients, listEncounters
131
131
  sdk.mcp // connect + JSON-RPC proxy (patient/fieldAgent tool calls)
132
+ sdk.graph // connect, provider search/cypher, health plan search/cypher,
133
+ // document summary search/cypher, policy document list/search/get
132
134
  ```
133
135
 
134
136
  `sdk.fieldAgent` talks to a different host (`*-api-fieldagent.health.cloud`)
@@ -1302,6 +1304,7 @@ await sdk.session.connect();
1302
1304
  await sdk.telehealth.connect();
1303
1305
  await sdk.fieldAgent.connect();
1304
1306
  await sdk.mcp.connect();
1307
+ await sdk.graph.connect();
1305
1308
  ```
1306
1309
 
1307
1310
  ```json
package/dist/index.cjs CHANGED
@@ -83,7 +83,8 @@ var SERVICES = [
83
83
  "fieldagent",
84
84
  "mcp",
85
85
  "connectors",
86
- "person"
86
+ "person",
87
+ "graph"
87
88
  ];
88
89
  function isServiceName(value) {
89
90
  return SERVICES.includes(value);
@@ -426,6 +427,17 @@ var DiagnosticsClient = class extends BaseServiceClient {
426
427
  body: request
427
428
  });
428
429
  }
430
+ // ─── Rapid Test ──────────────────────────────────────────────────────
431
+ /**
432
+ * Create a rapid test result for a patient.
433
+ * POST /patients/{patient_id}/diagnostics/rapid-tests
434
+ */
435
+ createRapidTest(patientId, request) {
436
+ return this.send("POST", "/patients/{patient_id}/diagnostics/rapid-tests", {
437
+ pathParams: { patient_id: patientId },
438
+ body: request
439
+ });
440
+ }
429
441
  // ─── Test Result ─────────────────────────────────────────────────────
430
442
  /**
431
443
  * Get a specific diagnostic test result by ID.
@@ -436,17 +448,6 @@ var DiagnosticsClient = class extends BaseServiceClient {
436
448
  pathParams: { patient_id: patientId, test_id: testId }
437
449
  });
438
450
  }
439
- // ─── Rapid Test (legacy) ────────────────────────────────────────────
440
- /**
441
- * Create a rapid test result (legacy).
442
- * POST /patients/{patient_id}/diagnostics/rapid-tests
443
- */
444
- createRapidTest(patientId, request) {
445
- return this.send("POST", "/patients/{patient_id}/diagnostics/rapid-tests", {
446
- pathParams: { patient_id: patientId },
447
- body: request
448
- });
449
- }
450
451
  };
451
452
 
452
453
  // src/clients/EhrClient.ts
@@ -993,6 +994,47 @@ var VitalsClient = class extends BaseServiceClient {
993
994
  }
994
995
  };
995
996
 
997
+ // src/clients/GraphClient.ts
998
+ var GraphClient = class extends BaseServiceClient {
999
+ constructor(http) {
1000
+ super(http, "graph");
1001
+ }
1002
+ connect() {
1003
+ return this.connectService();
1004
+ }
1005
+ // ─── Providers ───────────────────────────────────────────────────────
1006
+ searchProviders(request) {
1007
+ return this.send("POST", "/graph/providers/search", { body: request });
1008
+ }
1009
+ searchProvidersCypher(request) {
1010
+ return this.send("POST", "/graph/providers/cypher", { body: request });
1011
+ }
1012
+ // ─── Health Plans ────────────────────────────────────────────────────
1013
+ searchHealthPlans(request) {
1014
+ return this.send("POST", "/graph/health-plans/search", { body: request });
1015
+ }
1016
+ searchHealthPlansCypher(request) {
1017
+ return this.send("POST", "/graph/health-plans/cypher", { body: request });
1018
+ }
1019
+ // ─── Document Summaries ──────────────────────────────────────────────
1020
+ searchDocumentSummaries(request) {
1021
+ return this.send("POST", "/graph/document-summaries/search", { body: request });
1022
+ }
1023
+ searchDocumentSummariesCypher(request) {
1024
+ return this.send("POST", "/graph/document-summaries/cypher", { body: request });
1025
+ }
1026
+ // ─── Policy Documents ────────────────────────────────────────────────
1027
+ listPolicyDocuments(query) {
1028
+ return this.send("GET", "/documents", { query });
1029
+ }
1030
+ searchPolicyDocuments(query) {
1031
+ return this.send("GET", "/documents/search", { query });
1032
+ }
1033
+ getPolicyDocument(docId) {
1034
+ return this.send("GET", "/documents/{doc_id}", { pathParams: { doc_id: docId } });
1035
+ }
1036
+ };
1037
+
996
1038
  // src/clients/connectors/ConnectorFactory.ts
997
1039
  function assertConfigObject(connectorName, config) {
998
1040
  if (typeof config !== "object" || config === null || Array.isArray(config)) {
@@ -3992,6 +4034,7 @@ var HCSDK = class {
3992
4034
  () => this.state.tenantId
3993
4035
  );
3994
4036
  this.mcp = new MCPClient(this.http);
4037
+ this.graph = new GraphClient(this.http);
3995
4038
  this.connectors = new ConnectorsNamespace(this.http);
3996
4039
  }
3997
4040
  setAccessToken(token) {
@@ -4054,7 +4097,6 @@ var HCSDK_OPERATION_SUMMARY = [
4054
4097
  { service: "vitals", method: "POST", path: "/patients/{patient_id}/vitals", sdkMethod: "vitals.record", summary: "Record patient vitals" },
4055
4098
  { service: "vitals", method: "GET", path: "/patients/{patient_id}/vitals", sdkMethod: "vitals.list", summary: "List patient vitals" },
4056
4099
  { service: "diagnostics", method: "GET", path: "/connect", sdkMethod: "diagnostics.connect", summary: "Lambda warm-up / connectivity check" },
4057
- { service: "diagnostics", method: "POST", path: "/patients/{patient_id}/diagnostics/rapid-tests", sdkMethod: "diagnostics.createRapidTest", summary: "Create rapid test result (confirmed against live swagger; health_cloud_api.md documents this incorrectly as /rapid-test)" },
4058
4100
  { service: "diagnostics", method: "GET", path: "/patients/{patient_id}/diagnostics", sdkMethod: "diagnostics.list", summary: "List diagnostics" },
4059
4101
  { service: "provider", method: "GET", path: "/connect", sdkMethod: "provider.connect", summary: "Lambda warm-up / connectivity check" },
4060
4102
  { service: "ehr", method: "GET", path: "/connect", sdkMethod: "ehr.connect", summary: "Lambda warm-up / connectivity check" },