phenoml 17.5.0 → 17.7.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.
Files changed (149) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +7 -2
  4. package/dist/cjs/api/resources/agent/errors/ConflictError.d.ts +5 -0
  5. package/dist/cjs/api/resources/agent/errors/ConflictError.js +54 -0
  6. package/dist/cjs/api/resources/agent/errors/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/agent/errors/index.js +1 -0
  8. package/dist/cjs/api/resources/agent/resources/chat/client/Client.d.ts +1 -0
  9. package/dist/cjs/api/resources/agent/resources/chat/client/Client.js +5 -0
  10. package/dist/cjs/api/resources/agent/resources/chat/client/requests/AgentChatRequest.d.ts +1 -1
  11. package/dist/cjs/api/resources/agent/resources/chat/client/requests/AgentStreamChatRequest.d.ts +1 -1
  12. package/dist/cjs/api/resources/fhir2Omop/client/Client.d.ts +26 -0
  13. package/dist/cjs/api/resources/fhir2Omop/client/Client.js +26 -0
  14. package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.ts +6 -3
  15. package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.d.ts +6 -1
  16. package/dist/cjs/api/resources/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/index.js +2 -1
  18. package/dist/cjs/api/resources/voice/client/Client.d.ts +12 -0
  19. package/dist/cjs/api/resources/voice/client/Client.js +16 -0
  20. package/dist/cjs/api/resources/voice/client/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/voice/client/index.js +2 -0
  22. package/dist/cjs/api/resources/voice/errors/BadGatewayError.d.ts +5 -0
  23. package/dist/cjs/api/resources/voice/errors/BadGatewayError.js +54 -0
  24. package/dist/cjs/api/resources/voice/errors/BadRequestError.d.ts +5 -0
  25. package/dist/cjs/api/resources/voice/errors/BadRequestError.js +54 -0
  26. package/dist/cjs/api/resources/voice/errors/ContentTooLargeError.d.ts +5 -0
  27. package/dist/cjs/api/resources/voice/errors/ContentTooLargeError.js +54 -0
  28. package/dist/cjs/api/resources/voice/errors/GatewayTimeoutError.d.ts +5 -0
  29. package/dist/cjs/api/resources/voice/errors/GatewayTimeoutError.js +54 -0
  30. package/dist/cjs/api/resources/voice/errors/PaymentRequiredError.d.ts +5 -0
  31. package/dist/cjs/api/resources/voice/errors/PaymentRequiredError.js +54 -0
  32. package/dist/cjs/api/resources/voice/errors/ServiceUnavailableError.d.ts +5 -0
  33. package/dist/cjs/api/resources/voice/errors/ServiceUnavailableError.js +54 -0
  34. package/dist/cjs/api/resources/voice/errors/UnauthorizedError.d.ts +5 -0
  35. package/dist/cjs/api/resources/voice/errors/UnauthorizedError.js +54 -0
  36. package/dist/cjs/api/resources/voice/errors/index.d.ts +7 -0
  37. package/dist/cjs/api/resources/voice/errors/index.js +23 -0
  38. package/dist/cjs/api/resources/voice/exports.d.ts +3 -0
  39. package/dist/cjs/api/resources/voice/exports.js +22 -0
  40. package/dist/cjs/api/resources/voice/index.d.ts +4 -0
  41. package/dist/cjs/api/resources/voice/index.js +20 -0
  42. package/dist/cjs/api/resources/voice/resources/index.d.ts +2 -0
  43. package/dist/cjs/api/resources/voice/resources/index.js +41 -0
  44. package/dist/cjs/api/resources/voice/resources/voice/client/Client.d.ts +41 -0
  45. package/dist/cjs/api/resources/voice/resources/voice/client/Client.js +146 -0
  46. package/dist/cjs/api/resources/voice/resources/voice/client/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/voice/resources/voice/client/index.js +17 -0
  48. package/dist/cjs/api/resources/voice/resources/voice/client/requests/TranscribeRequest.d.ts +4 -0
  49. package/dist/cjs/api/resources/voice/resources/voice/client/requests/TranscribeRequest.js +3 -0
  50. package/dist/cjs/api/resources/voice/resources/voice/client/requests/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/voice/resources/voice/client/requests/index.js +2 -0
  52. package/dist/cjs/api/resources/voice/resources/voice/exports.d.ts +2 -0
  53. package/dist/cjs/api/resources/voice/resources/voice/exports.js +21 -0
  54. package/dist/cjs/api/resources/voice/resources/voice/index.d.ts +1 -0
  55. package/dist/cjs/api/resources/voice/resources/voice/index.js +17 -0
  56. package/dist/cjs/api/resources/voice/types/TranscribeResponse.d.ts +4 -0
  57. package/dist/cjs/api/resources/voice/types/TranscribeResponse.js +3 -0
  58. package/dist/cjs/api/resources/voice/types/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/voice/types/index.js +17 -0
  60. package/dist/cjs/core/exports.d.ts +1 -0
  61. package/dist/cjs/core/exports.js +1 -0
  62. package/dist/cjs/core/file/exports.d.ts +1 -0
  63. package/dist/cjs/core/file/exports.js +2 -0
  64. package/dist/cjs/core/file/file.d.ts +10 -0
  65. package/dist/cjs/core/file/file.js +222 -0
  66. package/dist/cjs/core/file/index.d.ts +2 -0
  67. package/dist/cjs/core/file/index.js +18 -0
  68. package/dist/cjs/core/file/types.d.ts +66 -0
  69. package/dist/cjs/core/file/types.js +2 -0
  70. package/dist/cjs/core/index.d.ts +1 -0
  71. package/dist/cjs/core/index.js +2 -1
  72. package/dist/cjs/version.d.ts +1 -1
  73. package/dist/cjs/version.js +1 -1
  74. package/dist/esm/BaseClient.mjs +2 -2
  75. package/dist/esm/Client.d.mts +3 -0
  76. package/dist/esm/Client.mjs +5 -0
  77. package/dist/esm/api/resources/agent/errors/ConflictError.d.mts +5 -0
  78. package/dist/esm/api/resources/agent/errors/ConflictError.mjs +17 -0
  79. package/dist/esm/api/resources/agent/errors/index.d.mts +1 -0
  80. package/dist/esm/api/resources/agent/errors/index.mjs +1 -0
  81. package/dist/esm/api/resources/agent/resources/chat/client/Client.d.mts +1 -0
  82. package/dist/esm/api/resources/agent/resources/chat/client/Client.mjs +5 -0
  83. package/dist/esm/api/resources/agent/resources/chat/client/requests/AgentChatRequest.d.mts +1 -1
  84. package/dist/esm/api/resources/agent/resources/chat/client/requests/AgentStreamChatRequest.d.mts +1 -1
  85. package/dist/esm/api/resources/fhir2Omop/client/Client.d.mts +26 -0
  86. package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +26 -0
  87. package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.mts +6 -3
  88. package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.d.mts +6 -1
  89. package/dist/esm/api/resources/index.d.mts +1 -0
  90. package/dist/esm/api/resources/index.mjs +1 -0
  91. package/dist/esm/api/resources/voice/client/Client.d.mts +12 -0
  92. package/dist/esm/api/resources/voice/client/Client.mjs +12 -0
  93. package/dist/esm/api/resources/voice/client/index.d.mts +1 -0
  94. package/dist/esm/api/resources/voice/client/index.mjs +1 -0
  95. package/dist/esm/api/resources/voice/errors/BadGatewayError.d.mts +5 -0
  96. package/dist/esm/api/resources/voice/errors/BadGatewayError.mjs +17 -0
  97. package/dist/esm/api/resources/voice/errors/BadRequestError.d.mts +5 -0
  98. package/dist/esm/api/resources/voice/errors/BadRequestError.mjs +17 -0
  99. package/dist/esm/api/resources/voice/errors/ContentTooLargeError.d.mts +5 -0
  100. package/dist/esm/api/resources/voice/errors/ContentTooLargeError.mjs +17 -0
  101. package/dist/esm/api/resources/voice/errors/GatewayTimeoutError.d.mts +5 -0
  102. package/dist/esm/api/resources/voice/errors/GatewayTimeoutError.mjs +17 -0
  103. package/dist/esm/api/resources/voice/errors/PaymentRequiredError.d.mts +5 -0
  104. package/dist/esm/api/resources/voice/errors/PaymentRequiredError.mjs +17 -0
  105. package/dist/esm/api/resources/voice/errors/ServiceUnavailableError.d.mts +5 -0
  106. package/dist/esm/api/resources/voice/errors/ServiceUnavailableError.mjs +17 -0
  107. package/dist/esm/api/resources/voice/errors/UnauthorizedError.d.mts +5 -0
  108. package/dist/esm/api/resources/voice/errors/UnauthorizedError.mjs +17 -0
  109. package/dist/esm/api/resources/voice/errors/index.d.mts +7 -0
  110. package/dist/esm/api/resources/voice/errors/index.mjs +7 -0
  111. package/dist/esm/api/resources/voice/exports.d.mts +3 -0
  112. package/dist/esm/api/resources/voice/exports.mjs +4 -0
  113. package/dist/esm/api/resources/voice/index.d.mts +4 -0
  114. package/dist/esm/api/resources/voice/index.mjs +4 -0
  115. package/dist/esm/api/resources/voice/resources/index.d.mts +2 -0
  116. package/dist/esm/api/resources/voice/resources/index.mjs +2 -0
  117. package/dist/esm/api/resources/voice/resources/voice/client/Client.d.mts +41 -0
  118. package/dist/esm/api/resources/voice/resources/voice/client/Client.mjs +109 -0
  119. package/dist/esm/api/resources/voice/resources/voice/client/index.d.mts +1 -0
  120. package/dist/esm/api/resources/voice/resources/voice/client/index.mjs +1 -0
  121. package/dist/esm/api/resources/voice/resources/voice/client/requests/TranscribeRequest.d.mts +4 -0
  122. package/dist/esm/api/resources/voice/resources/voice/client/requests/TranscribeRequest.mjs +2 -0
  123. package/dist/esm/api/resources/voice/resources/voice/client/requests/index.d.mts +1 -0
  124. package/dist/esm/api/resources/voice/resources/voice/client/requests/index.mjs +1 -0
  125. package/dist/esm/api/resources/voice/resources/voice/exports.d.mts +2 -0
  126. package/dist/esm/api/resources/voice/resources/voice/exports.mjs +3 -0
  127. package/dist/esm/api/resources/voice/resources/voice/index.d.mts +1 -0
  128. package/dist/esm/api/resources/voice/resources/voice/index.mjs +1 -0
  129. package/dist/esm/api/resources/voice/types/TranscribeResponse.d.mts +4 -0
  130. package/dist/esm/api/resources/voice/types/TranscribeResponse.mjs +2 -0
  131. package/dist/esm/api/resources/voice/types/index.d.mts +1 -0
  132. package/dist/esm/api/resources/voice/types/index.mjs +1 -0
  133. package/dist/esm/core/exports.d.mts +1 -0
  134. package/dist/esm/core/exports.mjs +1 -0
  135. package/dist/esm/core/file/exports.d.mts +1 -0
  136. package/dist/esm/core/file/exports.mjs +1 -0
  137. package/dist/esm/core/file/file.d.mts +10 -0
  138. package/dist/esm/core/file/file.mjs +185 -0
  139. package/dist/esm/core/file/index.d.mts +2 -0
  140. package/dist/esm/core/file/index.mjs +2 -0
  141. package/dist/esm/core/file/types.d.mts +66 -0
  142. package/dist/esm/core/file/types.mjs +1 -0
  143. package/dist/esm/core/index.d.mts +1 -0
  144. package/dist/esm/core/index.mjs +1 -0
  145. package/dist/esm/version.d.mts +1 -1
  146. package/dist/esm/version.mjs +1 -1
  147. package/openapi/openapi.json +109 -6
  148. package/package.json +12 -1
  149. package/reference.md +27 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phenoml",
46
- "X-Fern-SDK-Version": "17.5.0",
47
- "User-Agent": "phenoml/17.5.0",
46
+ "X-Fern-SDK-Version": "17.7.0",
47
+ "User-Agent": "phenoml/17.7.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -8,6 +8,7 @@ import { FhirProviderClient } from "./api/resources/fhirProvider/client/Client.j
8
8
  import { Lang2FhirClient } from "./api/resources/lang2Fhir/client/Client.js";
9
9
  import { SummaryClient } from "./api/resources/summary/client/Client.js";
10
10
  import { ToolsClient } from "./api/resources/tools/client/Client.js";
11
+ import { VoiceClient } from "./api/resources/voice/client/Client.js";
11
12
  import { WorkflowsClient } from "./api/resources/workflows/client/Client.js";
12
13
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
13
14
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
@@ -29,6 +30,7 @@ export declare class phenomlClient {
29
30
  protected _lang2Fhir: Lang2FhirClient | undefined;
30
31
  protected _summary: SummaryClient | undefined;
31
32
  protected _tools: ToolsClient | undefined;
33
+ protected _voice: VoiceClient | undefined;
32
34
  protected _workflows: WorkflowsClient | undefined;
33
35
  constructor(options?: phenomlClient.Options);
34
36
  get agent(): AgentClient;
@@ -41,6 +43,7 @@ export declare class phenomlClient {
41
43
  get lang2Fhir(): Lang2FhirClient;
42
44
  get summary(): SummaryClient;
43
45
  get tools(): ToolsClient;
46
+ get voice(): VoiceClient;
44
47
  get workflows(): WorkflowsClient;
45
48
  /**
46
49
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -54,7 +54,8 @@ const Client_js_7 = require("./api/resources/fhirProvider/client/Client.js");
54
54
  const Client_js_8 = require("./api/resources/lang2Fhir/client/Client.js");
55
55
  const Client_js_9 = require("./api/resources/summary/client/Client.js");
56
56
  const Client_js_10 = require("./api/resources/tools/client/Client.js");
57
- const Client_js_11 = require("./api/resources/workflows/client/Client.js");
57
+ const Client_js_11 = require("./api/resources/voice/client/Client.js");
58
+ const Client_js_12 = require("./api/resources/workflows/client/Client.js");
58
59
  const BaseClient_js_1 = require("./BaseClient.js");
59
60
  const core = __importStar(require("./core/index.js"));
60
61
  class phenomlClient {
@@ -101,9 +102,13 @@ class phenomlClient {
101
102
  var _a;
102
103
  return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_10.ToolsClient(this._options)));
103
104
  }
105
+ get voice() {
106
+ var _a;
107
+ return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_js_11.VoiceClient(this._options)));
108
+ }
104
109
  get workflows() {
105
110
  var _a;
106
- return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_js_11.WorkflowsClient(this._options)));
111
+ return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_js_12.WorkflowsClient(this._options)));
107
112
  }
108
113
  /**
109
114
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class ConflictError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ConflictError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class ConflictError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ConflictError",
43
+ statusCode: 409,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.ConflictError = ConflictError;
@@ -1,4 +1,5 @@
1
1
  export * from "./BadRequestError.js";
2
+ export * from "./ConflictError.js";
2
3
  export * from "./ForbiddenError.js";
3
4
  export * from "./GatewayTimeoutError.js";
4
5
  export * from "./InternalServerError.js";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError.js"), exports);
18
+ __exportStar(require("./ConflictError.js"), exports);
18
19
  __exportStar(require("./ForbiddenError.js"), exports);
19
20
  __exportStar(require("./GatewayTimeoutError.js"), exports);
20
21
  __exportStar(require("./InternalServerError.js"), exports);
@@ -23,6 +23,7 @@ export declare class ChatClient {
23
23
  * @throws {@link phenoml.agent.UnauthorizedError}
24
24
  * @throws {@link phenoml.agent.ForbiddenError}
25
25
  * @throws {@link phenoml.agent.NotFoundError}
26
+ * @throws {@link phenoml.agent.ConflictError}
26
27
  * @throws {@link phenoml.agent.InternalServerError}
27
28
  * @throws {@link phenoml.agent.GatewayTimeoutError}
28
29
  *
@@ -79,6 +79,7 @@ class ChatClient {
79
79
  * @throws {@link phenoml.agent.UnauthorizedError}
80
80
  * @throws {@link phenoml.agent.ForbiddenError}
81
81
  * @throws {@link phenoml.agent.NotFoundError}
82
+ * @throws {@link phenoml.agent.ConflictError}
82
83
  * @throws {@link phenoml.agent.InternalServerError}
83
84
  * @throws {@link phenoml.agent.GatewayTimeoutError}
84
85
  *
@@ -140,6 +141,8 @@ class ChatClient {
140
141
  throw new phenoml.agent.ForbiddenError(_response.error.body, _response.rawResponse);
141
142
  case 404:
142
143
  throw new phenoml.agent.NotFoundError(_response.error.body, _response.rawResponse);
144
+ case 409:
145
+ throw new phenoml.agent.ConflictError(_response.error.body, _response.rawResponse);
143
146
  case 500:
144
147
  throw new phenoml.agent.InternalServerError(_response.error.body, _response.rawResponse);
145
148
  case 504:
@@ -210,6 +213,8 @@ class ChatClient {
210
213
  throw new phenoml.agent.ForbiddenError(_response.error.body, _response.rawResponse);
211
214
  case 404:
212
215
  throw new phenoml.agent.NotFoundError(_response.error.body, _response.rawResponse);
216
+ case 409:
217
+ throw new phenoml.agent.ConflictError(_response.error.body, _response.rawResponse);
213
218
  case 500:
214
219
  throw new phenoml.agent.InternalServerError(_response.error.body, _response.rawResponse);
215
220
  case 504:
@@ -33,7 +33,7 @@ export interface AgentChatRequest {
33
33
  message: string;
34
34
  /** Optional context for the conversation */
35
35
  context?: string;
36
- /** Optional session ID for conversation continuity */
36
+ /** Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict. */
37
37
  session_id?: string;
38
38
  /** The ID of the agent to chat with */
39
39
  agent_id: string;
@@ -23,7 +23,7 @@ export interface AgentStreamChatRequest {
23
23
  message: string;
24
24
  /** Optional context for the conversation */
25
25
  context?: string;
26
- /** Optional session ID for conversation continuity */
26
+ /** Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict. */
27
27
  session_id?: string;
28
28
  /** The ID of the agent to chat with */
29
29
  agent_id: string;
@@ -15,6 +15,32 @@ export declare class Fhir2OmopClient {
15
15
  * (person, visit_occurrence, condition_occurrence, drug_exposure,
16
16
  * procedure_occurrence, measurement, observation).
17
17
  *
18
+ * Resource support is intentionally limited to the OMOP tables returned by
19
+ * this endpoint:
20
+ * - `Patient` -> `person`
21
+ * - `Encounter` -> `visit_occurrence`
22
+ * - `Condition` -> `condition_occurrence`
23
+ * - `Procedure` -> `procedure_occurrence`
24
+ * - `MedicationRequest`, `MedicationStatement`, and
25
+ * `MedicationAdministration` -> `drug_exposure`
26
+ * - `Immunization` -> `drug_exposure`
27
+ * - `Observation` with a numeric `valueQuantity`, `valueInteger`, or
28
+ * numeric-looking `valueString` (for example `"<2"`) -> `measurement`
29
+ * - non-numeric `Observation` -> `observation`
30
+ * - `AllergyIntolerance` -> `observation`
31
+ *
32
+ * `Medication` is supported only as reference data for medication
33
+ * resources; it is not emitted as its own row because OMOP CDM has no
34
+ * Medication table. Other reference/admin resources such as `Practitioner`,
35
+ * `Organization`, `Location`, `Coverage`, and `Claim`, and clinical
36
+ * workflow/document resources such as `DiagnosticReport`, `ServiceRequest`,
37
+ * `CarePlan`, `DocumentReference`, `Composition`, `Specimen`, and
38
+ * `DeviceUseStatement`, are currently accepted in a Bundle but are not
39
+ * shaped into OMOP rows. Unsupported resource types are ignored rather than
40
+ * listed under `dropped`; `dropped` is reserved for supported resource types
41
+ * that were missing the subject/patient, code, or medication reference data
42
+ * needed to produce a valid row.
43
+ *
18
44
  * Each resource's primary clinical coding is resolved to a standard OMOP
19
45
  * `concept_id`. Alongside the OMOP rows grouped by table (`tables`), the
20
46
  * response carries `mappings` (how each source coding resolved, linked back
@@ -60,6 +60,32 @@ class Fhir2OmopClient {
60
60
  * (person, visit_occurrence, condition_occurrence, drug_exposure,
61
61
  * procedure_occurrence, measurement, observation).
62
62
  *
63
+ * Resource support is intentionally limited to the OMOP tables returned by
64
+ * this endpoint:
65
+ * - `Patient` -> `person`
66
+ * - `Encounter` -> `visit_occurrence`
67
+ * - `Condition` -> `condition_occurrence`
68
+ * - `Procedure` -> `procedure_occurrence`
69
+ * - `MedicationRequest`, `MedicationStatement`, and
70
+ * `MedicationAdministration` -> `drug_exposure`
71
+ * - `Immunization` -> `drug_exposure`
72
+ * - `Observation` with a numeric `valueQuantity`, `valueInteger`, or
73
+ * numeric-looking `valueString` (for example `"<2"`) -> `measurement`
74
+ * - non-numeric `Observation` -> `observation`
75
+ * - `AllergyIntolerance` -> `observation`
76
+ *
77
+ * `Medication` is supported only as reference data for medication
78
+ * resources; it is not emitted as its own row because OMOP CDM has no
79
+ * Medication table. Other reference/admin resources such as `Practitioner`,
80
+ * `Organization`, `Location`, `Coverage`, and `Claim`, and clinical
81
+ * workflow/document resources such as `DiagnosticReport`, `ServiceRequest`,
82
+ * `CarePlan`, `DocumentReference`, `Composition`, `Specimen`, and
83
+ * `DeviceUseStatement`, are currently accepted in a Bundle but are not
84
+ * shaped into OMOP rows. Unsupported resource types are ignored rather than
85
+ * listed under `dropped`; `dropped` is reserved for supported resource types
86
+ * that were missing the subject/patient, code, or medication reference data
87
+ * needed to produce a valid row.
88
+ *
63
89
  * Each resource's primary clinical coding is resolved to a standard OMOP
64
90
  * `concept_id`. Alongside the OMOP rows grouped by table (`tables`), the
65
91
  * response carries `mappings` (how each source coding resolved, linked back
@@ -68,9 +68,12 @@
68
68
  export interface CreateOmopRequest {
69
69
  /**
70
70
  * FHIR resources (single resource or Bundle). Must contain at least one
71
- * Patient resource. Resources are mapped to OMOP rows; standalone
72
- * Medication resources are consumed by medication references rather than
73
- * mapped to their own table.
71
+ * Patient resource. Supported row-producing resources are Patient,
72
+ * Encounter, Condition, Procedure, MedicationRequest,
73
+ * MedicationStatement, MedicationAdministration, Immunization,
74
+ * Observation, and AllergyIntolerance. Standalone Medication resources
75
+ * are consumed by medication references rather than mapped to their own
76
+ * table. Other resource types are accepted but ignored.
74
77
  */
75
78
  fhir_resources: Record<string, unknown>;
76
79
  }
@@ -5,7 +5,12 @@ export interface CreateOmopResponse {
5
5
  tables?: phenoml.fhir2Omop.OmopTables | undefined;
6
6
  /** One entry per source coding (or one entry for a text-only resource with no coding), describing how it resolved and linking back to the row it produced. */
7
7
  mappings?: phenoml.fhir2Omop.MappingEntry[] | undefined;
8
- /** Resources that could not be shaped into an OMOP row (rather than emitted as blank rows). */
8
+ /**
9
+ * Supported resource instances that could not be shaped into an OMOP
10
+ * row because required subject/patient, code, or medication reference
11
+ * data was missing. Unsupported resource types are ignored and do not
12
+ * appear here.
13
+ */
9
14
  dropped?: phenoml.fhir2Omop.DroppedResource[] | undefined;
10
15
  /**
11
16
  * The OMOP vocabulary release the clinical codes were resolved against
@@ -8,4 +8,5 @@ export * as fhirProvider from "./fhirProvider/index.js";
8
8
  export * as lang2Fhir from "./lang2Fhir/index.js";
9
9
  export * as summary from "./summary/index.js";
10
10
  export * as tools from "./tools/index.js";
11
+ export * as voice from "./voice/index.js";
11
12
  export * as workflows from "./workflows/index.js";
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.workflows = exports.tools = exports.summary = exports.lang2Fhir = exports.fhirProvider = exports.fhir2Omop = exports.fhir = exports.construe = exports.cohort = exports.authtoken = exports.agent = void 0;
36
+ exports.workflows = exports.voice = exports.tools = exports.summary = exports.lang2Fhir = exports.fhirProvider = exports.fhir2Omop = exports.fhir = exports.construe = exports.cohort = exports.authtoken = exports.agent = void 0;
37
37
  exports.agent = __importStar(require("./agent/index.js"));
38
38
  exports.authtoken = __importStar(require("./authtoken/index.js"));
39
39
  exports.cohort = __importStar(require("./cohort/index.js"));
@@ -44,4 +44,5 @@ exports.fhirProvider = __importStar(require("./fhirProvider/index.js"));
44
44
  exports.lang2Fhir = __importStar(require("./lang2Fhir/index.js"));
45
45
  exports.summary = __importStar(require("./summary/index.js"));
46
46
  exports.tools = __importStar(require("./tools/index.js"));
47
+ exports.voice = __importStar(require("./voice/index.js"));
47
48
  exports.workflows = __importStar(require("./workflows/index.js"));
@@ -0,0 +1,12 @@
1
+ import type { BaseClientOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import { VoiceClient as VoiceClient_ } from "../resources/voice/client/Client.js";
4
+ export declare namespace VoiceClient {
5
+ type Options = BaseClientOptions;
6
+ }
7
+ export declare class VoiceClient {
8
+ protected readonly _options: NormalizedClientOptionsWithAuth<VoiceClient.Options>;
9
+ protected _voice: VoiceClient_ | undefined;
10
+ constructor(options?: VoiceClient.Options);
11
+ get voice(): VoiceClient_;
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.VoiceClient = void 0;
5
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
6
+ const Client_js_1 = require("../resources/voice/client/Client.js");
7
+ class VoiceClient {
8
+ constructor(options = {}) {
9
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
10
+ }
11
+ get voice() {
12
+ var _a;
13
+ return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_js_1.VoiceClient(this._options)));
14
+ }
15
+ }
16
+ exports.VoiceClient = VoiceClient;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class BadGatewayError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.BadGatewayError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class BadGatewayError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "BadGatewayError",
43
+ statusCode: 502,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.BadGatewayError = BadGatewayError;
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class BadRequestError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.BadRequestError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class BadRequestError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "BadRequestError",
43
+ statusCode: 400,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class ContentTooLargeError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ContentTooLargeError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class ContentTooLargeError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ContentTooLargeError",
43
+ statusCode: 413,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.ContentTooLargeError = ContentTooLargeError;
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.GatewayTimeoutError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class GatewayTimeoutError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "GatewayTimeoutError",
43
+ statusCode: 504,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.GatewayTimeoutError = GatewayTimeoutError;
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class PaymentRequiredError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }