@healthcloudai/hc-sdk 3.5.0 → 3.5.2

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.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/config/SDKConfig.ts
2
+ var DEFAULT_TIMEOUT_MS = 3e4;
2
3
  var SERVICES = [
3
4
  "patient",
4
5
  "vitals",
@@ -27,6 +28,11 @@ function resolveBaseUrl(environment, service) {
27
28
  const prefix = environment === "prod" ? "" : `${environment}-`;
28
29
  return `https://${prefix}api-${service}.health.cloud`;
29
30
  }
31
+ function assertTimeout(timeout, label = "timeout") {
32
+ if (typeof timeout !== "number" || !Number.isFinite(timeout) || timeout <= 0) {
33
+ throw new Error(`Invalid HealthCloud SDK ${label}: expected a positive number of milliseconds, got ${String(timeout)}`);
34
+ }
35
+ }
30
36
  function assertEnvironment(environment) {
31
37
  if (environment !== "dev" && environment !== "uat" && environment !== "prod") {
32
38
  throw new Error(`Unsupported HealthCloud environment: "${environment}"`);
@@ -59,23 +65,46 @@ var HttpClient = class {
59
65
  this.state = state;
60
66
  }
61
67
  async request(service, method, path, options = {}) {
68
+ var _a, _b;
62
69
  const url = this.buildUrl(service, path, options);
63
70
  const headers = this.buildHeaders(options);
64
71
  const init = { method, headers };
65
72
  if (method !== "GET" && method !== "DELETE" && options.body !== void 0) {
66
73
  init.body = this.serializeBody(options.body, headers);
67
74
  }
75
+ const timeoutMs = (_b = (_a = options.timeoutMs) != null ? _a : this.state.timeout) != null ? _b : DEFAULT_TIMEOUT_MS;
76
+ assertTimeout(timeoutMs, options.timeoutMs !== void 0 ? "timeoutMs" : "timeout");
77
+ let didTimeout = false;
78
+ const controller = new AbortController();
79
+ init.signal = controller.signal;
80
+ const timer = setTimeout(() => {
81
+ didTimeout = true;
82
+ controller.abort();
83
+ }, timeoutMs);
68
84
  let response;
85
+ let payload;
69
86
  try {
70
87
  response = await fetch(url, init);
88
+ payload = await this.parseResponse(response);
71
89
  } catch (error) {
90
+ if (didTimeout) {
91
+ throw new SDKError({
92
+ message: `Request timed out after ${timeoutMs}ms: ${method} ${path}`,
93
+ statusCode: 0,
94
+ cause: error
95
+ });
96
+ }
97
+ if (error instanceof SDKError) {
98
+ throw error;
99
+ }
72
100
  throw new SDKError({
73
101
  message: error instanceof Error ? error.message : "Network request failed.",
74
102
  statusCode: 0,
75
103
  cause: error
76
104
  });
105
+ } finally {
106
+ clearTimeout(timer);
77
107
  }
78
- const payload = await this.parseResponse(response);
79
108
  if (!response.ok) {
80
109
  throw new SDKError({
81
110
  message: this.resolveErrorMessage(response, payload),
@@ -5931,12 +5960,15 @@ var ConnectorsNamespace = class {
5931
5960
  // src/HCSDK.ts
5932
5961
  var HCSDK = class {
5933
5962
  constructor(config) {
5963
+ var _a, _b;
5934
5964
  assertEnvironment(config.environment);
5965
+ assertTimeout((_a = config.timeout) != null ? _a : DEFAULT_TIMEOUT_MS);
5935
5966
  this.state = {
5936
5967
  environment: config.environment,
5937
5968
  tenantId: config.tenantId,
5938
5969
  accessToken: config.accessToken,
5939
- baseUrlOverrides: config.baseUrlOverrides
5970
+ baseUrlOverrides: config.baseUrlOverrides,
5971
+ timeout: (_b = config.timeout) != null ? _b : DEFAULT_TIMEOUT_MS
5940
5972
  };
5941
5973
  this.http = new HttpClient(this.state);
5942
5974
  this.auth = new AuthClient(
@@ -6071,6 +6103,7 @@ export {
6071
6103
  ConnectorFactory,
6072
6104
  ConnectorsNamespace,
6073
6105
  ConnectureClient,
6106
+ DEFAULT_TIMEOUT_MS,
6074
6107
  ElevenLabsClient,
6075
6108
  FedExClient,
6076
6109
  GoogleAIClient,
@@ -6104,6 +6137,7 @@ export {
6104
6137
  ZocdocClient,
6105
6138
  ZusClient,
6106
6139
  assertEnvironment,
6140
+ assertTimeout,
6107
6141
  isJsonRpcError,
6108
6142
  isServiceName,
6109
6143
  resolveBaseUrl,
@@ -4,6 +4,7 @@
4
4
  - `tenantId`: Tenant used by tenant-aware authentication operations.
5
5
  - `accessToken`: Optional bearer token for authenticated APIs.
6
6
  - `baseUrlOverrides`: Optional per-service override intended for controlled development and testing.
7
+ - `timeout`: Optional request timeout in milliseconds. Defaults to 30000; timed-out requests are aborted and reject with SDKError.
7
8
 
8
9
  ## Initialization
9
10
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:5d74f0b1a206538b96a03face38ec1eb1eec3b1a484efb0ddd6db17acec140d1",
2
+ "docsDataContentDigest": "sha256:5e9e20e646e5070d17a39d559d2c8860c690ae166cf3b863361a8dfddb34491e",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -11,6 +11,7 @@ Type: `object`
11
11
 
12
12
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
13
13
  |---|---|---:|---|---|---|---:|---|
14
+ | `image` | `string|null` | No | | | | Yes | Optional base64-encoded insurance card image (JPEG or PNG), uploaded in the same request as the Coverage it belongs to. Always saved as a FHIR DocumentReference. Mirrored to Athena only when this request's vendor match+submit above actually linked the insurance into Athena — never attached to some other, pre-existing Athena insurance record when this submit failed or was skipped. |
14
15
  | `member_id` | `string` | Yes | | | | No | Subscriber's member/policy ID with the payer. |
15
16
  | `payer_id` | `string|null` | No | | | | Yes | NAIC or payer identifier. |
16
17
  | `payer_name` | `string` | Yes | | | | No | Display name of the insurance payer/carrier. |
@@ -11,9 +11,11 @@ Type: `object`
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
13
  | `athena_best_match` | `object|null` | No | | | | Yes | The Athena insurance package the AI match service picked and submitted, for transparency. null when no package matched or Athena did not run. |
14
+ | `athena_insurance_card_status` | `string|null` | No | | | | Yes | Outcome of mirroring the insurance card image to Athena, when `image` was supplied. 'linked' means the image was attached to the Athena insurance record this same request just created. 'skipped_insurance_not_linked' means the Athena submit above did not succeed (no vendor, no match, or failed), so the image was deliberately not sent to Athena. null when no image was sent. |
14
15
  | `athena_insurance_error` | `string|null` | No | | | | Yes | Human-readable reason the Athena mirror failed, when athena_insurance_status is 'failed'. |
15
16
  | `athena_insurance_status` | `string|null` | No | | | | Yes | 'linked' if the insurance was also mirrored into Athena, 'failed' otherwise, null if this tenant has no Athena integration configured. |
16
17
  | `coverages_created` | `integer` | Yes | | | | No | Number of FHIR Coverage resources created by this request. |
18
+ | `fhir_document_reference_id` | `string|null` | No | | | | Yes | FHIR DocumentReference id the insurance card image was saved as, when `image` was supplied on the request. null when no image was sent. |
17
19
  | `fhir_patient_id` | `string|null` | Yes | | | | Yes | Deprecated alias of `patient_id`, kept for one release as a compatibility grace window. |
18
20
  | `openloop_best_match` | `object|null` | No | | | | Yes | The Healthie insurance plan the AI match service picked and submitted, for transparency. null when no plan matched or OpenLoop did not run. |
19
21
  | `openloop_insurance_error` | `string|null` | No | | | | Yes | Human-readable reason the OpenLoop mirror failed, when openloop_insurance_status is 'failed'. |
@@ -1,8 +1,8 @@
1
- # CypherQueryRequest
1
+ # SearchDocumentSummariesCypherRequest
2
2
 
3
3
  Model ID: `SearchDocumentSummariesCypherRequest`
4
4
 
5
- Base for raw Cypher queries.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,10 +10,8 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `limit` | `integer` | No | | | `50` | No | Maximum rows returned. |
14
- | `params` | `object` | No | | | | No | Named parameters substituted into the query. |
15
- | `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
16
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
13
+ | `limit` | `integer` | No | | | `20` | No | |
14
+ | `query` | `string` | Yes | | | | No | Natural-language document graph question |
17
15
 
18
16
  ## Example
19
17
 
@@ -1,8 +1,8 @@
1
- # DocumentSummarySearchRequest
1
+ # SearchDocumentSummariesRequest
2
2
 
3
3
  Model ID: `SearchDocumentSummariesRequest`
4
4
 
5
- Search the Document Summaries index by structured fields.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,11 +10,11 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `doc_type` | `string|null` | No | | | `null` | Yes | Document type filter: medical_guideline \| medical_policy \| any |
14
- | `limit` | `integer` | No | | | `20` | No | Maximum results returned. |
15
- | `offset` | `integer` | No | | | `0` | No | Number of results to skip, for pagination. |
16
- | `phrase` | `string|null` | No | | | `null` | Yes | Free-text search across title, summary, content |
17
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
13
+ | `doc_type` | `string` | No | | | | No | Document type filter (e.g. policy, procedure, guideline) |
14
+ | `limit` | `integer` | No | | | `20` | No | |
15
+ | `offset` | `integer` | No | | | `0` | No | |
16
+ | `phrase` | `string` | No | | | | No | Search phrase |
17
+ | `rag` | `boolean` | No | | | `false` | No | |
18
18
 
19
19
  ## Example
20
20
 
@@ -1,8 +1,8 @@
1
- # CypherQueryRequest
1
+ # SearchHealthPlansCypherRequest
2
2
 
3
3
  Model ID: `SearchHealthPlansCypherRequest`
4
4
 
5
- Base for raw Cypher queries.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,10 +10,8 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `limit` | `integer` | No | | | `50` | No | Maximum rows returned. |
14
- | `params` | `object` | No | | | | No | Named parameters substituted into the query. |
15
- | `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
16
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
13
+ | `limit` | `integer` | No | | | `20` | No | |
14
+ | `query` | `string` | Yes | | | | No | Natural-language health-plan graph question |
17
15
 
18
16
  ## Example
19
17
 
@@ -1,8 +1,8 @@
1
- # HealthPlanSearchRequest
1
+ # SearchHealthPlansRequest
2
2
 
3
3
  Model ID: `SearchHealthPlansRequest`
4
4
 
5
- Search the Health Plans index by structured fields.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,12 +10,12 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `limit` | `integer` | No | | | `20` | No | Maximum results returned. |
14
- | `network_id` | `string|null` | No | | | `null` | Yes | Network / plan ID |
15
- | `offset` | `integer` | No | | | `0` | No | Number of results to skip, for pagination. |
16
- | `phrase` | `string|null` | No | | | `null` | Yes | Free-text search across plan name, issuer |
17
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
18
- | `state_code` | `string|null` | No | | | `null` | Yes | 2-letter state code |
13
+ | `limit` | `integer` | No | | | `20` | No | |
14
+ | `network_id` | `string` | No | | | | No | Network or plan ID |
15
+ | `offset` | `integer` | No | | | `0` | No | |
16
+ | `phrase` | `string` | No | | | | No | Search phrase (plan name, payer, coverage type) |
17
+ | `rag` | `boolean` | No | | | `false` | No | |
18
+ | `state_code` | `string` | No | | | | No | US state abbreviation |
19
19
 
20
20
  ## Example
21
21
 
@@ -1,8 +1,8 @@
1
- # CypherQueryRequest
1
+ # SearchMedicalConceptsCypherRequest
2
2
 
3
3
  Model ID: `SearchMedicalConceptsCypherRequest`
4
4
 
5
- Base for raw Cypher queries.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,10 +10,10 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `limit` | `integer` | No | | | `50` | No | Maximum rows returned. |
14
- | `params` | `object` | No | | | | No | Named parameters substituted into the query. |
15
- | `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
16
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
13
+ | `limit` | `integer` | No | | | `50` | No | |
14
+ | `params` | `object` | No | | | | No | Optional Cypher query parameters |
15
+ | `query` | `string` | Yes | | | | No | Cypher query |
16
+ | `rag` | `boolean` | No | | | `false` | No | |
17
17
 
18
18
  ## Example
19
19
 
@@ -1,13 +1,8 @@
1
- # MedicalConceptSearchRequest
1
+ # SearchMedicalConceptsRequest
2
2
 
3
3
  Model ID: `SearchMedicalConceptsRequest`
4
4
 
5
- Search the Medical Concepts index by free text + vocabulary-aware facets.
6
-
7
- Facets mirror the Algolia `attributesForFaceting` of the `medical_concepts`
8
- index (vocabulary, semantic_tag, tty, top_category, active, module_id, plus
9
- filter-only code/sctid). `id` is not an Algolia facet — filter by
10
- code/sctid/vocabulary instead.
5
+ No description.
11
6
 
12
7
  Type: `object`
13
8
 
@@ -15,18 +10,18 @@ Type: `object`
15
10
 
16
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
17
12
  |---|---|---:|---|---|---|---:|---|
18
- | `active` | `boolean|null` | No | | | `null` | Yes | Filter to active / inactive concepts (SNOMED) |
19
- | `code` | `string|null` | No | | | `null` | Yes | Native code (SNOMED sctid / RxNorm rxcui / MeSH UI) |
20
- | `limit` | `integer` | No | | | `20` | No | Maximum results returned. |
21
- | `module_id` | `string|null` | No | | | `null` | Yes | SNOMED module id |
22
- | `offset` | `integer` | No | | | `0` | No | Number of results to skip, for pagination. |
23
- | `phrase` | `string|null` | No | | | `null` | Yes | Free-text query across preferred_term / fsn / synonyms |
24
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
25
- | `sctid` | `string|null` | No | | | `null` | Yes | SNOMED concept id (filter-only) |
26
- | `semantic_tag` | `string|null` | No | | | `null` | Yes | SNOMED semantic tag (e.g. disorder, procedure, finding) |
27
- | `top_category` | `string|null` | No | | | `null` | Yes | MeSH top-level category (e.g. Diseases) |
28
- | `tty` | `string|null` | No | | | `null` | Yes | RxNorm term type (e.g. IN, SCD, BN) |
29
- | `vocabulary` | `string|null` | No | | | `null` | Yes | SNOMED \| RXNORM \| MESH |
13
+ | `active` | `boolean` | No | | | | No | |
14
+ | `code` | `string` | No | | | | No | |
15
+ | `limit` | `integer` | No | | | `20` | No | |
16
+ | `module_id` | `string` | No | | | | No | |
17
+ | `offset` | `integer` | No | | | `0` | No | |
18
+ | `phrase` | `string` | No | | | | No | Free-text query across preferred terms, FSNs, and synonyms |
19
+ | `rag` | `boolean` | No | | | `false` | No | |
20
+ | `sctid` | `string` | No | | | | No | |
21
+ | `semantic_tag` | `string` | No | | | | No | |
22
+ | `top_category` | `string` | No | | | | No | |
23
+ | `tty` | `string` | No | | | | No | |
24
+ | `vocabulary` | `string` | No | | SNOMED, RXNORM, MESH | | No | |
30
25
 
31
26
  ## Example
32
27
 
@@ -1,8 +1,8 @@
1
- # CypherQueryRequest
1
+ # SearchProvidersCypherRequest
2
2
 
3
3
  Model ID: `SearchProvidersCypherRequest`
4
4
 
5
- Base for raw Cypher queries.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,10 +10,8 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `limit` | `integer` | No | | | `50` | No | Maximum rows returned. |
14
- | `params` | `object` | No | | | | No | Named parameters substituted into the query. |
15
- | `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
16
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
13
+ | `limit` | `integer` | No | | | `20` | No | |
14
+ | `query` | `string` | Yes | | | | No | Natural-language provider graph question |
17
15
 
18
16
  ## Example
19
17
 
@@ -1,8 +1,8 @@
1
- # ProviderSearchRequest
1
+ # SearchProvidersRequest
2
2
 
3
3
  Model ID: `SearchProvidersRequest`
4
4
 
5
- Search the Providers index by structured fields.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,12 +10,12 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `limit` | `integer` | No | | | `20` | No | Maximum results returned. |
14
- | `offset` | `integer` | No | | | `0` | No | Number of results to skip, for pagination. |
15
- | `phrase` | `string|null` | No | | | `null` | Yes | Free-text search across name, specialty, organization |
16
- | `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
17
- | `specialty_code` | `string|null` | No | | | `null` | Yes | Taxonomy / specialty code (e.g. 207R00000X) |
18
- | `state_code` | `string|null` | No | | | `null` | Yes | 2-letter state code (e.g. CA, TX) |
13
+ | `limit` | `integer` | No | | | `20` | No | |
14
+ | `offset` | `integer` | No | | | `0` | No | |
15
+ | `phrase` | `string` | No | | | | No | Search phrase (provider name, specialty, condition) |
16
+ | `rag` | `boolean` | No | | | `false` | No | Enable RAG-augmented semantic search |
17
+ | `specialty_code` | `string` | No | | | | No | Taxonomy or specialty code |
18
+ | `state_code` | `string` | No | | | | No | US state abbreviation (e.g. CA, NY) |
19
19
 
20
20
  ## Example
21
21
 
@@ -1,8 +1,8 @@
1
- # VectorSearchRequest
1
+ # VectorSearchDocumentsRequest
2
2
 
3
3
  Model ID: `VectorSearchDocumentsRequest`
4
4
 
5
- Semantic search over one collection's document chunks.
5
+ No description.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,15 +10,15 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `collection` | `string|null` | No | | | `null` | Yes | Collection to search; defaults to the documents collection. Must be one reported by GET /graph/vector/collections. |
14
- | `collection_group` | `string|null` | No | | | `null` | Yes | Corpus label within the collection, e.g. MedlinePlus or MedicalPolicy. |
15
- | `language` | `string|null` | No | | | `null` | Yes | Document language, e.g. English. |
16
- | `network_id` | `string|null` | No | | | `null` | Yes | Stedi payer id. A narrower scope than payer_key and only resolved for some payers, so prefer payer_key. |
17
- | `payer_key` | `string|null` | No | | | `null` | Yes | Payer registry slug, e.g. cigna \| aetna \| bcbsma. REQUIRED when searching the payer-policy collection, which is partitioned by payer so that one search only ever returns one payer's policies. Ignored for the consumer-health collection. |
18
- | `q` | `string` | Yes | | | | No | Natural-language query; embedded and matched by meaning, not keyword. |
19
- | `source` | `string|null` | No | | | `null` | Yes | Pipeline that produced the chunk: medlineplus \| medical_policy \| guideline. |
20
- | `tags` | `array` | No | | | | No | Health tags; a chunk matching ANY of them is returned, so more tags broaden the result set. |
21
- | `top_k` | `integer` | No | | | `10` | No | Maximum hits returned. |
13
+ | `collection` | `string` | No | | | | No | Collection to search; defaults to the documents corpus |
14
+ | `collection_group` | `string` | No | | | | No | Corpus label, e.g. MedlinePlus or MedicalPolicy |
15
+ | `language` | `string` | No | | | | No | Document language, e.g. English |
16
+ | `network_id` | `string` | No | | | | No | Stedi payer id; narrower than payer_key and only resolved for some payers |
17
+ | `payer_key` | `string` | No | | | | No | Payer slug (cigna, aetna, ...). REQUIRED for the payer-policy collection, which is partitioned by payer |
18
+ | `q` | `string` | Yes | | | | No | Natural-language query, matched by meaning |
19
+ | `source` | `string` | No | | medlineplus, medical_policy, guideline | | No | |
20
+ | `tags` | `array` | No | | | | No | Health tags; any-of match |
21
+ | `top_k` | `integer` | No | | | `10` | No | |
22
22
 
23
23
  ## Example
24
24
 
@@ -1607,24 +1607,24 @@
1607
1607
  - [ScrapflyScrapeRequest](ScrapflyScrapeRequest.md)
1608
1608
  - [ScrapflyScrapeResponse](ScrapflyScrapeResponse.md)
1609
1609
  - [SearchDiagnosticTestsResponse](SearchDiagnosticTestsResponse.md)
1610
- - [CypherQueryRequest](SearchDocumentSummariesCypherRequest.md)
1610
+ - [SearchDocumentSummariesCypherRequest](SearchDocumentSummariesCypherRequest.md)
1611
1611
  - [SearchDocumentSummariesCypherResponse](SearchDocumentSummariesCypherResponse.md)
1612
- - [DocumentSummarySearchRequest](SearchDocumentSummariesRequest.md)
1612
+ - [SearchDocumentSummariesRequest](SearchDocumentSummariesRequest.md)
1613
1613
  - [SearchDocumentSummariesResponse](SearchDocumentSummariesResponse.md)
1614
- - [CypherQueryRequest](SearchHealthPlansCypherRequest.md)
1614
+ - [SearchHealthPlansCypherRequest](SearchHealthPlansCypherRequest.md)
1615
1615
  - [SearchHealthPlansCypherResponse](SearchHealthPlansCypherResponse.md)
1616
- - [HealthPlanSearchRequest](SearchHealthPlansRequest.md)
1616
+ - [SearchHealthPlansRequest](SearchHealthPlansRequest.md)
1617
1617
  - [SearchHealthPlansResponse](SearchHealthPlansResponse.md)
1618
1618
  - [SearchKnowledgeResponse](SearchKnowledgeResponse.md)
1619
- - [CypherQueryRequest](SearchMedicalConceptsCypherRequest.md)
1619
+ - [SearchMedicalConceptsCypherRequest](SearchMedicalConceptsCypherRequest.md)
1620
1620
  - [SearchMedicalConceptsCypherResponse](SearchMedicalConceptsCypherResponse.md)
1621
1621
  - [MedicalConceptSearchResponse](SearchMedicalConceptsGetResponse.md)
1622
- - [MedicalConceptSearchRequest](SearchMedicalConceptsRequest.md)
1622
+ - [SearchMedicalConceptsRequest](SearchMedicalConceptsRequest.md)
1623
1623
  - [SearchMedicalConceptsResponse](SearchMedicalConceptsResponse.md)
1624
1624
  - [SearchPolicyDocumentsResponse](SearchPolicyDocumentsResponse.md)
1625
- - [CypherQueryRequest](SearchProvidersCypherRequest.md)
1625
+ - [SearchProvidersCypherRequest](SearchProvidersCypherRequest.md)
1626
1626
  - [SearchProvidersCypherResponse](SearchProvidersCypherResponse.md)
1627
- - [ProviderSearchRequest](SearchProvidersRequest.md)
1627
+ - [SearchProvidersRequest](SearchProvidersRequest.md)
1628
1628
  - [SearchProvidersResponse](SearchProvidersResponse.md)
1629
1629
  - [SenaiteCancelSampleRequest](SenaiteCancelSampleRequest.md)
1630
1630
  - [SenaiteCancelSampleResponse](SenaiteCancelSampleResponse.md)
@@ -1853,7 +1853,7 @@
1853
1853
  - [UpsertMessageRequest](UpsertMessageRequest.md)
1854
1854
  - [UpsertPresenceRequest](UpsertPresenceRequest.md)
1855
1855
  - [VectorCollection](VectorCollection.md)
1856
- - [VectorSearchRequest](VectorSearchDocumentsRequest.md)
1856
+ - [VectorSearchDocumentsRequest](VectorSearchDocumentsRequest.md)
1857
1857
  - [VectorSearchHit](VectorSearchHit.md)
1858
1858
  - [VectorSearchResponse](VectorSearchResponse.md)
1859
1859
  - [VerifyOtpResponse](VerifyOtpResponse.md)
@@ -36,7 +36,9 @@ None documented.
36
36
 
37
37
  | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
38
38
  |---|---|---:|---|---|---|---:|---|
39
+ | `content_type` | `string` | No | | | | No | |
39
40
  | `encounter_id` | `string` | No | | | | No | |
41
+ | `filename` | `string` | No | | | | No | |
40
42
  | `gs1` | `string` | Yes | | | | No | GS1 barcode value (e.g. 01095577222334451721053110ABC123) |
41
43
 
42
44
  ## Body parameters
@@ -140,7 +142,9 @@ import { HCSDK } from "@healthcloudai/hc-sdk";
140
142
  const patientId = "<PATIENT_ID>";
141
143
 
142
144
  const query = {
145
+ "content_type": "<CONTENT_TYPE>",
143
146
  "encounter_id": "<ENCOUNTER_ID>",
147
+ "filename": "<FILENAME>",
144
148
  "gs1": "<GS1>"
145
149
  };
146
150
 
@@ -152,7 +156,7 @@ const result = await diagnostics.lookupByGs1(patientId, query);
152
156
  ```bash
153
157
  curl -X GET \
154
158
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
155
- 'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/lookup?encounter_id=%3CENCOUNTER_ID%3E&gs1=%3CGS1%3E'
159
+ 'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/lookup?content_type=%3CCONTENT_TYPE%3E&encounter_id=%3CENCOUNTER_ID%3E&filename=%3CFILENAME%3E&gs1=%3CGS1%3E'
156
160
  ```
157
161
 
158
162
  ## Notes
@@ -92,11 +92,20 @@ Request model: [`SearchDocumentSummariesRequest`](../models/SearchDocumentSummar
92
92
 
93
93
  | Status | Shape | Content type | Description |
94
94
  |---|---|---|---|
95
+ | `400` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | The request body was invalid — a field was the wrong type or outside its allowed range |
95
96
  | `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
96
97
  | `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |
97
98
 
98
99
  ## Error examples
99
100
 
101
+ ### 400 — A field failed validation (sanitized example)
102
+
103
+ ```json
104
+ {
105
+ "error": "top_k: Input should be less than or equal to 100"
106
+ }
107
+ ```
108
+
100
109
  ### 401 — Missing or invalid access token
101
110
 
102
111
  ```json
@@ -95,11 +95,20 @@ Request model: [`SearchHealthPlansRequest`](../models/SearchHealthPlansRequest.m
95
95
 
96
96
  | Status | Shape | Content type | Description |
97
97
  |---|---|---|---|
98
+ | `400` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | The request body was invalid — a field was the wrong type or outside its allowed range |
98
99
  | `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
99
100
  | `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |
100
101
 
101
102
  ## Error examples
102
103
 
104
+ ### 400 — A field failed validation (sanitized example)
105
+
106
+ ```json
107
+ {
108
+ "error": "top_k: Input should be less than or equal to 100"
109
+ }
110
+ ```
111
+
103
112
  ### 401 — Missing or invalid access token
104
113
 
105
114
  ```json
@@ -47,16 +47,16 @@ Request model: [`SearchMedicalConceptsRequest`](../models/SearchMedicalConceptsR
47
47
  ```json
48
48
  {
49
49
  "active": true,
50
- "code": "195967001",
51
- "limit": 10,
52
- "module_id": "900000000000207008",
50
+ "code": "string",
51
+ "limit": 20,
52
+ "module_id": "string",
53
53
  "offset": 0,
54
- "phrase": "asthma",
54
+ "phrase": "string",
55
55
  "rag": false,
56
- "sctid": "195967001",
57
- "semantic_tag": "disorder",
58
- "top_category": null,
59
- "tty": null,
56
+ "sctid": "string",
57
+ "semantic_tag": "string",
58
+ "top_category": "string",
59
+ "tty": "string",
60
60
  "vocabulary": "SNOMED"
61
61
  }
62
62
  ```
@@ -115,11 +115,20 @@ Request model: [`SearchMedicalConceptsRequest`](../models/SearchMedicalConceptsR
115
115
 
116
116
  | Status | Shape | Content type | Description |
117
117
  |---|---|---|---|
118
+ | `400` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | The request body was invalid — a field was the wrong type or outside its allowed range |
118
119
  | `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
119
120
  | `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |
120
121
 
121
122
  ## Error examples
122
123
 
124
+ ### 400 — A field failed validation (sanitized example)
125
+
126
+ ```json
127
+ {
128
+ "error": "top_k: Input should be less than or equal to 100"
129
+ }
130
+ ```
131
+
123
132
  ### 401 — Missing or invalid access token
124
133
 
125
134
  ```json
@@ -146,16 +155,16 @@ import type { MedicalConceptSearchRequest } from "@healthcloudai/hc-sdk";
146
155
  ```ts
147
156
  const request = {
148
157
  "active": true,
149
- "code": "195967001",
150
- "limit": 10,
151
- "module_id": "900000000000207008",
158
+ "code": "string",
159
+ "limit": 20,
160
+ "module_id": "string",
152
161
  "offset": 0,
153
- "phrase": "asthma",
162
+ "phrase": "string",
154
163
  "rag": false,
155
- "sctid": "195967001",
156
- "semantic_tag": "disorder",
157
- "top_category": null,
158
- "tty": null,
164
+ "sctid": "string",
165
+ "semantic_tag": "string",
166
+ "top_category": "string",
167
+ "tty": "string",
159
168
  "vocabulary": "SNOMED"
160
169
  };
161
170
 
@@ -168,7 +177,7 @@ const result = await graph.searchMedicalConcepts(request);
168
177
  curl -X POST \
169
178
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
170
179
  -H 'Content-Type: application/json' \
171
- -d '{"active":true,"code":"195967001","limit":10,"module_id":"900000000000207008","offset":0,"phrase":"asthma","rag":false,"sctid":"195967001","semantic_tag":"disorder","top_category":null,"tty":null,"vocabulary":"SNOMED"}' \
180
+ -d '{"active":true,"code":"string","limit":20,"module_id":"string","offset":0,"phrase":"string","rag":false,"sctid":"string","semantic_tag":"string","top_category":"string","tty":"string","vocabulary":"SNOMED"}' \
172
181
  'https://dev-api-graph.health.cloud/graph/medical-concepts/search'
173
182
  ```
174
183
 
@@ -95,11 +95,20 @@ Request model: [`SearchProvidersRequest`](../models/SearchProvidersRequest.md)
95
95
 
96
96
  | Status | Shape | Content type | Description |
97
97
  |---|---|---|---|
98
+ | `400` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | The request body was invalid — a field was the wrong type or outside its allowed range |
98
99
  | `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
99
100
  | `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |
100
101
 
101
102
  ## Error examples
102
103
 
104
+ ### 400 — A field failed validation (sanitized example)
105
+
106
+ ```json
107
+ {
108
+ "error": "top_k: Input should be less than or equal to 100"
109
+ }
110
+ ```
111
+
103
112
  ### 401 — Missing or invalid access token
104
113
 
105
114
  ```json