@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 +3 -0
- package/dist/index.cjs +55 -13
- package/dist/index.d.cts +168 -31
- package/dist/index.d.ts +168 -31
- package/dist/index.js +55 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12,7 +12,8 @@ var SERVICES = [
|
|
|
12
12
|
"fieldagent",
|
|
13
13
|
"mcp",
|
|
14
14
|
"connectors",
|
|
15
|
-
"person"
|
|
15
|
+
"person",
|
|
16
|
+
"graph"
|
|
16
17
|
];
|
|
17
18
|
function isServiceName(value) {
|
|
18
19
|
return SERVICES.includes(value);
|
|
@@ -355,6 +356,17 @@ var DiagnosticsClient = class extends BaseServiceClient {
|
|
|
355
356
|
body: request
|
|
356
357
|
});
|
|
357
358
|
}
|
|
359
|
+
// ─── Rapid Test ──────────────────────────────────────────────────────
|
|
360
|
+
/**
|
|
361
|
+
* Create a rapid test result for a patient.
|
|
362
|
+
* POST /patients/{patient_id}/diagnostics/rapid-tests
|
|
363
|
+
*/
|
|
364
|
+
createRapidTest(patientId, request) {
|
|
365
|
+
return this.send("POST", "/patients/{patient_id}/diagnostics/rapid-tests", {
|
|
366
|
+
pathParams: { patient_id: patientId },
|
|
367
|
+
body: request
|
|
368
|
+
});
|
|
369
|
+
}
|
|
358
370
|
// ─── Test Result ─────────────────────────────────────────────────────
|
|
359
371
|
/**
|
|
360
372
|
* Get a specific diagnostic test result by ID.
|
|
@@ -365,17 +377,6 @@ var DiagnosticsClient = class extends BaseServiceClient {
|
|
|
365
377
|
pathParams: { patient_id: patientId, test_id: testId }
|
|
366
378
|
});
|
|
367
379
|
}
|
|
368
|
-
// ─── Rapid Test (legacy) ────────────────────────────────────────────
|
|
369
|
-
/**
|
|
370
|
-
* Create a rapid test result (legacy).
|
|
371
|
-
* POST /patients/{patient_id}/diagnostics/rapid-tests
|
|
372
|
-
*/
|
|
373
|
-
createRapidTest(patientId, request) {
|
|
374
|
-
return this.send("POST", "/patients/{patient_id}/diagnostics/rapid-tests", {
|
|
375
|
-
pathParams: { patient_id: patientId },
|
|
376
|
-
body: request
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
380
|
};
|
|
380
381
|
|
|
381
382
|
// src/clients/EhrClient.ts
|
|
@@ -922,6 +923,47 @@ var VitalsClient = class extends BaseServiceClient {
|
|
|
922
923
|
}
|
|
923
924
|
};
|
|
924
925
|
|
|
926
|
+
// src/clients/GraphClient.ts
|
|
927
|
+
var GraphClient = class extends BaseServiceClient {
|
|
928
|
+
constructor(http) {
|
|
929
|
+
super(http, "graph");
|
|
930
|
+
}
|
|
931
|
+
connect() {
|
|
932
|
+
return this.connectService();
|
|
933
|
+
}
|
|
934
|
+
// ─── Providers ───────────────────────────────────────────────────────
|
|
935
|
+
searchProviders(request) {
|
|
936
|
+
return this.send("POST", "/graph/providers/search", { body: request });
|
|
937
|
+
}
|
|
938
|
+
searchProvidersCypher(request) {
|
|
939
|
+
return this.send("POST", "/graph/providers/cypher", { body: request });
|
|
940
|
+
}
|
|
941
|
+
// ─── Health Plans ────────────────────────────────────────────────────
|
|
942
|
+
searchHealthPlans(request) {
|
|
943
|
+
return this.send("POST", "/graph/health-plans/search", { body: request });
|
|
944
|
+
}
|
|
945
|
+
searchHealthPlansCypher(request) {
|
|
946
|
+
return this.send("POST", "/graph/health-plans/cypher", { body: request });
|
|
947
|
+
}
|
|
948
|
+
// ─── Document Summaries ──────────────────────────────────────────────
|
|
949
|
+
searchDocumentSummaries(request) {
|
|
950
|
+
return this.send("POST", "/graph/document-summaries/search", { body: request });
|
|
951
|
+
}
|
|
952
|
+
searchDocumentSummariesCypher(request) {
|
|
953
|
+
return this.send("POST", "/graph/document-summaries/cypher", { body: request });
|
|
954
|
+
}
|
|
955
|
+
// ─── Policy Documents ────────────────────────────────────────────────
|
|
956
|
+
listPolicyDocuments(query) {
|
|
957
|
+
return this.send("GET", "/documents", { query });
|
|
958
|
+
}
|
|
959
|
+
searchPolicyDocuments(query) {
|
|
960
|
+
return this.send("GET", "/documents/search", { query });
|
|
961
|
+
}
|
|
962
|
+
getPolicyDocument(docId) {
|
|
963
|
+
return this.send("GET", "/documents/{doc_id}", { pathParams: { doc_id: docId } });
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
|
|
925
967
|
// src/clients/connectors/ConnectorFactory.ts
|
|
926
968
|
function assertConfigObject(connectorName, config) {
|
|
927
969
|
if (typeof config !== "object" || config === null || Array.isArray(config)) {
|
|
@@ -3921,6 +3963,7 @@ var HCSDK = class {
|
|
|
3921
3963
|
() => this.state.tenantId
|
|
3922
3964
|
);
|
|
3923
3965
|
this.mcp = new MCPClient(this.http);
|
|
3966
|
+
this.graph = new GraphClient(this.http);
|
|
3924
3967
|
this.connectors = new ConnectorsNamespace(this.http);
|
|
3925
3968
|
}
|
|
3926
3969
|
setAccessToken(token) {
|
|
@@ -3983,7 +4026,6 @@ var HCSDK_OPERATION_SUMMARY = [
|
|
|
3983
4026
|
{ service: "vitals", method: "POST", path: "/patients/{patient_id}/vitals", sdkMethod: "vitals.record", summary: "Record patient vitals" },
|
|
3984
4027
|
{ service: "vitals", method: "GET", path: "/patients/{patient_id}/vitals", sdkMethod: "vitals.list", summary: "List patient vitals" },
|
|
3985
4028
|
{ service: "diagnostics", method: "GET", path: "/connect", sdkMethod: "diagnostics.connect", summary: "Lambda warm-up / connectivity check" },
|
|
3986
|
-
{ 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)" },
|
|
3987
4029
|
{ service: "diagnostics", method: "GET", path: "/patients/{patient_id}/diagnostics", sdkMethod: "diagnostics.list", summary: "List diagnostics" },
|
|
3988
4030
|
{ service: "provider", method: "GET", path: "/connect", sdkMethod: "provider.connect", summary: "Lambda warm-up / connectivity check" },
|
|
3989
4031
|
{ service: "ehr", method: "GET", path: "/connect", sdkMethod: "ehr.connect", summary: "Lambda warm-up / connectivity check" },
|
package/package.json
CHANGED