phenoml 17.0.1 → 17.1.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 (109) 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 +15 -10
  4. package/dist/cjs/api/resources/fhir2Omop/client/Client.d.ts +110 -0
  5. package/dist/cjs/api/resources/fhir2Omop/client/Client.js +198 -0
  6. package/dist/cjs/api/resources/fhir2Omop/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/fhir2Omop/client/index.js +17 -0
  8. package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.ts +76 -0
  9. package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.js +3 -0
  10. package/dist/cjs/api/resources/fhir2Omop/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/fhir2Omop/client/requests/index.js +2 -0
  12. package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.d.ts +5 -0
  13. package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.js +54 -0
  14. package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.d.ts +5 -0
  15. package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.js +54 -0
  16. package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.d.ts +5 -0
  17. package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.js +54 -0
  18. package/dist/cjs/api/resources/fhir2Omop/errors/index.d.ts +3 -0
  19. package/dist/cjs/api/resources/fhir2Omop/errors/index.js +19 -0
  20. package/dist/cjs/api/resources/fhir2Omop/exports.d.ts +2 -0
  21. package/dist/cjs/api/resources/fhir2Omop/exports.js +21 -0
  22. package/dist/cjs/api/resources/fhir2Omop/index.d.ts +3 -0
  23. package/dist/cjs/api/resources/fhir2Omop/index.js +19 -0
  24. package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +12 -0
  25. package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.js +3 -0
  26. package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.d.ts +11 -0
  27. package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.js +3 -0
  28. package/dist/cjs/api/resources/fhir2Omop/types/DroppedResource.d.ts +5 -0
  29. package/dist/cjs/api/resources/fhir2Omop/types/DroppedResource.js +3 -0
  30. package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +13 -0
  31. package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.js +3 -0
  32. package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.d.ts +18 -0
  33. package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.js +3 -0
  34. package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +17 -0
  35. package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.js +3 -0
  36. package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +16 -0
  37. package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.js +3 -0
  38. package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.d.ts +13 -0
  39. package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.js +3 -0
  40. package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.d.ts +14 -0
  41. package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.js +3 -0
  42. package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +10 -0
  43. package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.js +3 -0
  44. package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.d.ts +15 -0
  45. package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.js +3 -0
  46. package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.ts +11 -0
  47. package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.js +3 -0
  48. package/dist/cjs/api/resources/fhir2Omop/types/index.d.ts +12 -0
  49. package/dist/cjs/api/resources/fhir2Omop/types/index.js +28 -0
  50. package/dist/cjs/api/resources/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/index.js +2 -1
  52. package/dist/cjs/version.d.ts +1 -1
  53. package/dist/cjs/version.js +1 -1
  54. package/dist/esm/BaseClient.mjs +2 -2
  55. package/dist/esm/Client.d.mts +3 -0
  56. package/dist/esm/Client.mjs +5 -0
  57. package/dist/esm/api/resources/fhir2Omop/client/Client.d.mts +110 -0
  58. package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +161 -0
  59. package/dist/esm/api/resources/fhir2Omop/client/index.d.mts +1 -0
  60. package/dist/esm/api/resources/fhir2Omop/client/index.mjs +1 -0
  61. package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.mts +76 -0
  62. package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.mjs +2 -0
  63. package/dist/esm/api/resources/fhir2Omop/client/requests/index.d.mts +1 -0
  64. package/dist/esm/api/resources/fhir2Omop/client/requests/index.mjs +1 -0
  65. package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.d.mts +5 -0
  66. package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.mjs +17 -0
  67. package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.d.mts +5 -0
  68. package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.mjs +17 -0
  69. package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.d.mts +5 -0
  70. package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.mjs +17 -0
  71. package/dist/esm/api/resources/fhir2Omop/errors/index.d.mts +3 -0
  72. package/dist/esm/api/resources/fhir2Omop/errors/index.mjs +3 -0
  73. package/dist/esm/api/resources/fhir2Omop/exports.d.mts +2 -0
  74. package/dist/esm/api/resources/fhir2Omop/exports.mjs +3 -0
  75. package/dist/esm/api/resources/fhir2Omop/index.d.mts +3 -0
  76. package/dist/esm/api/resources/fhir2Omop/index.mjs +3 -0
  77. package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +12 -0
  78. package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.mjs +2 -0
  79. package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.d.mts +11 -0
  80. package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.mjs +2 -0
  81. package/dist/esm/api/resources/fhir2Omop/types/DroppedResource.d.mts +5 -0
  82. package/dist/esm/api/resources/fhir2Omop/types/DroppedResource.mjs +2 -0
  83. package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +13 -0
  84. package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.mjs +2 -0
  85. package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.d.mts +18 -0
  86. package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.mjs +2 -0
  87. package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +17 -0
  88. package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.mjs +2 -0
  89. package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +16 -0
  90. package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.mjs +2 -0
  91. package/dist/esm/api/resources/fhir2Omop/types/OmopTables.d.mts +13 -0
  92. package/dist/esm/api/resources/fhir2Omop/types/OmopTables.mjs +2 -0
  93. package/dist/esm/api/resources/fhir2Omop/types/PersonRow.d.mts +14 -0
  94. package/dist/esm/api/resources/fhir2Omop/types/PersonRow.mjs +2 -0
  95. package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +10 -0
  96. package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.mjs +2 -0
  97. package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.d.mts +15 -0
  98. package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.mjs +2 -0
  99. package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.mts +11 -0
  100. package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.mjs +2 -0
  101. package/dist/esm/api/resources/fhir2Omop/types/index.d.mts +12 -0
  102. package/dist/esm/api/resources/fhir2Omop/types/index.mjs +12 -0
  103. package/dist/esm/api/resources/index.d.mts +1 -0
  104. package/dist/esm/api/resources/index.mjs +1 -0
  105. package/dist/esm/version.d.mts +1 -1
  106. package/dist/esm/version.mjs +1 -1
  107. package/openapi/openapi.json +731 -1
  108. package/package.json +15 -4
  109. package/reference.md +146 -0
@@ -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.UnauthorizedError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class UnauthorizedError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "UnauthorizedError",
43
+ statusCode: 401,
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.UnauthorizedError = UnauthorizedError;
@@ -0,0 +1,3 @@
1
+ export * from "./BadRequestError.js";
2
+ export * from "./InternalServerError.js";
3
+ export * from "./UnauthorizedError.js";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BadRequestError.js"), exports);
18
+ __exportStar(require("./InternalServerError.js"), exports);
19
+ __exportStar(require("./UnauthorizedError.js"), exports);
@@ -0,0 +1,2 @@
1
+ export { Fhir2OmopClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.Fhir2OmopClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "Fhir2OmopClient", { enumerable: true, get: function () { return Client_js_1.Fhir2OmopClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./types/index.js";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./errors/index.js"), exports);
19
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,12 @@
1
+ export interface ConditionOccurrenceRow {
2
+ condition_occurrence_id?: number | undefined;
3
+ person_id?: number | undefined;
4
+ condition_concept_id?: number | undefined;
5
+ condition_start_date?: string | undefined;
6
+ condition_start_datetime?: string | undefined;
7
+ condition_end_date?: string | undefined;
8
+ condition_type_concept_id?: number | undefined;
9
+ condition_source_value?: string | undefined;
10
+ condition_source_concept_id?: number | undefined;
11
+ condition_status_source_value?: string | undefined;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as phenoml from "../../../index.js";
2
+ export interface CreateOmopResponse {
3
+ success?: boolean | undefined;
4
+ message?: string | undefined;
5
+ /** Resolution mode. `structural` means all clinical concept_ids are 0 (vocabulary crosswalk pending). */
6
+ mode?: string | undefined;
7
+ tables?: phenoml.fhir2Omop.OmopTables | undefined;
8
+ /** One Usagi-shaped entry per source coding routed through concept resolution. */
9
+ report?: phenoml.fhir2Omop.MappingReportEntry[] | undefined;
10
+ scan_summary?: phenoml.fhir2Omop.ScanSummary | undefined;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface DroppedResource {
2
+ resource_type?: string | undefined;
3
+ resource_id?: string | undefined;
4
+ reason?: string | undefined;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ export interface DrugExposureRow {
2
+ drug_exposure_id?: number | undefined;
3
+ person_id?: number | undefined;
4
+ drug_concept_id?: number | undefined;
5
+ drug_exposure_start_date?: string | undefined;
6
+ drug_exposure_start_datetime?: string | undefined;
7
+ drug_exposure_end_date?: string | undefined;
8
+ drug_type_concept_id?: number | undefined;
9
+ stop_reason?: string | undefined;
10
+ sig?: string | undefined;
11
+ drug_source_value?: string | undefined;
12
+ drug_source_concept_id?: number | undefined;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One source_to_concept_map-style mapping suggestion (Usagi-shaped).
3
+ */
4
+ export interface MappingReportEntry {
5
+ resource_type?: string | undefined;
6
+ resource_id?: string | undefined;
7
+ omop_table?: string | undefined;
8
+ source_system?: string | undefined;
9
+ source_code?: string | undefined;
10
+ source_name?: string | undefined;
11
+ target_vocabulary?: string | undefined;
12
+ target_code?: string | undefined;
13
+ target_name?: string | undefined;
14
+ /** ALREADY_STANDARD (source already in target vocabulary), UNCHECKED (unreviewed suggestion), or UNMAPPED (no candidate found). */
15
+ mapping_status?: string | undefined;
16
+ equivalence?: string | undefined;
17
+ note?: string | undefined;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ export interface MeasurementRow {
2
+ measurement_id?: number | undefined;
3
+ person_id?: number | undefined;
4
+ measurement_concept_id?: number | undefined;
5
+ measurement_date?: string | undefined;
6
+ measurement_datetime?: string | undefined;
7
+ measurement_type_concept_id?: number | undefined;
8
+ value_as_number?: number | undefined;
9
+ value_as_concept_id?: number | undefined;
10
+ unit_concept_id?: number | undefined;
11
+ range_low?: number | undefined;
12
+ range_high?: number | undefined;
13
+ measurement_source_value?: string | undefined;
14
+ measurement_source_concept_id?: number | undefined;
15
+ unit_source_value?: string | undefined;
16
+ value_source_value?: string | undefined;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ export interface ObservationRow {
2
+ observation_id?: number | undefined;
3
+ person_id?: number | undefined;
4
+ observation_concept_id?: number | undefined;
5
+ observation_date?: string | undefined;
6
+ observation_datetime?: string | undefined;
7
+ observation_type_concept_id?: number | undefined;
8
+ value_as_number?: number | undefined;
9
+ value_as_string?: string | undefined;
10
+ value_as_concept_id?: number | undefined;
11
+ unit_concept_id?: number | undefined;
12
+ observation_source_value?: string | undefined;
13
+ observation_source_concept_id?: number | undefined;
14
+ unit_source_value?: string | undefined;
15
+ value_source_value?: string | undefined;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import type * as phenoml from "../../../index.js";
2
+ /**
3
+ * OMOP CDM v5.4 rows grouped by destination table.
4
+ */
5
+ export interface OmopTables {
6
+ person?: phenoml.fhir2Omop.PersonRow[] | undefined;
7
+ visit_occurrence?: phenoml.fhir2Omop.VisitOccurrenceRow[] | undefined;
8
+ condition_occurrence?: phenoml.fhir2Omop.ConditionOccurrenceRow[] | undefined;
9
+ drug_exposure?: phenoml.fhir2Omop.DrugExposureRow[] | undefined;
10
+ procedure_occurrence?: phenoml.fhir2Omop.ProcedureOccurrenceRow[] | undefined;
11
+ measurement?: phenoml.fhir2Omop.MeasurementRow[] | undefined;
12
+ observation?: phenoml.fhir2Omop.ObservationRow[] | undefined;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ export interface PersonRow {
2
+ person_id?: number | undefined;
3
+ gender_concept_id?: number | undefined;
4
+ year_of_birth?: number | undefined;
5
+ month_of_birth?: number | undefined;
6
+ day_of_birth?: number | undefined;
7
+ birth_datetime?: string | undefined;
8
+ race_concept_id?: number | undefined;
9
+ ethnicity_concept_id?: number | undefined;
10
+ person_source_value?: string | undefined;
11
+ gender_source_value?: string | undefined;
12
+ race_source_value?: string | undefined;
13
+ ethnicity_source_value?: string | undefined;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface ProcedureOccurrenceRow {
2
+ procedure_occurrence_id?: number | undefined;
3
+ person_id?: number | undefined;
4
+ procedure_concept_id?: number | undefined;
5
+ procedure_date?: string | undefined;
6
+ procedure_datetime?: string | undefined;
7
+ procedure_type_concept_id?: number | undefined;
8
+ procedure_source_value?: string | undefined;
9
+ procedure_source_concept_id?: number | undefined;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import type * as phenoml from "../../../index.js";
2
+ /**
3
+ * White Rabbit-style aggregate profile of the mapping request.
4
+ */
5
+ export interface ScanSummary {
6
+ total_resources?: number | undefined;
7
+ resource_counts?: Record<string, number> | undefined;
8
+ tables_populated?: Record<string, number> | undefined;
9
+ coding_systems?: Record<string, number> | undefined;
10
+ codes_already_standard?: number | undefined;
11
+ codes_normalized?: number | undefined;
12
+ codes_unmapped?: number | undefined;
13
+ off_vocab_rate?: number | undefined;
14
+ dropped_resources?: phenoml.fhir2Omop.DroppedResource[] | undefined;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface VisitOccurrenceRow {
2
+ visit_occurrence_id?: number | undefined;
3
+ person_id?: number | undefined;
4
+ visit_concept_id?: number | undefined;
5
+ visit_start_date?: string | undefined;
6
+ visit_start_datetime?: string | undefined;
7
+ visit_end_date?: string | undefined;
8
+ visit_end_datetime?: string | undefined;
9
+ visit_type_concept_id?: number | undefined;
10
+ visit_source_value?: string | undefined;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export * from "./ConditionOccurrenceRow.js";
2
+ export * from "./CreateOmopResponse.js";
3
+ export * from "./DroppedResource.js";
4
+ export * from "./DrugExposureRow.js";
5
+ export * from "./MappingReportEntry.js";
6
+ export * from "./MeasurementRow.js";
7
+ export * from "./ObservationRow.js";
8
+ export * from "./OmopTables.js";
9
+ export * from "./PersonRow.js";
10
+ export * from "./ProcedureOccurrenceRow.js";
11
+ export * from "./ScanSummary.js";
12
+ export * from "./VisitOccurrenceRow.js";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ConditionOccurrenceRow.js"), exports);
18
+ __exportStar(require("./CreateOmopResponse.js"), exports);
19
+ __exportStar(require("./DroppedResource.js"), exports);
20
+ __exportStar(require("./DrugExposureRow.js"), exports);
21
+ __exportStar(require("./MappingReportEntry.js"), exports);
22
+ __exportStar(require("./MeasurementRow.js"), exports);
23
+ __exportStar(require("./ObservationRow.js"), exports);
24
+ __exportStar(require("./OmopTables.js"), exports);
25
+ __exportStar(require("./PersonRow.js"), exports);
26
+ __exportStar(require("./ProcedureOccurrenceRow.js"), exports);
27
+ __exportStar(require("./ScanSummary.js"), exports);
28
+ __exportStar(require("./VisitOccurrenceRow.js"), exports);
@@ -3,6 +3,7 @@ export * as authtoken from "./authtoken/index.js";
3
3
  export * as cohort from "./cohort/index.js";
4
4
  export * as construe from "./construe/index.js";
5
5
  export * as fhir from "./fhir/index.js";
6
+ export * as fhir2Omop from "./fhir2Omop/index.js";
6
7
  export * as fhirProvider from "./fhirProvider/index.js";
7
8
  export * as lang2Fhir from "./lang2Fhir/index.js";
8
9
  export * as summary from "./summary/index.js";
@@ -33,12 +33,13 @@ 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.fhir = exports.construe = exports.cohort = exports.authtoken = exports.agent = void 0;
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;
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"));
40
40
  exports.construe = __importStar(require("./construe/index.js"));
41
41
  exports.fhir = __importStar(require("./fhir/index.js"));
42
+ exports.fhir2Omop = __importStar(require("./fhir2Omop/index.js"));
42
43
  exports.fhirProvider = __importStar(require("./fhirProvider/index.js"));
43
44
  exports.lang2Fhir = __importStar(require("./lang2Fhir/index.js"));
44
45
  exports.summary = __importStar(require("./summary/index.js"));
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "17.0.1";
1
+ export declare const SDK_VERSION = "17.1.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "17.0.1";
4
+ exports.SDK_VERSION = "17.1.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "phenoml",
9
- "X-Fern-SDK-Version": "17.0.1",
10
- "User-Agent": "phenoml/17.0.1",
9
+ "X-Fern-SDK-Version": "17.1.0",
10
+ "User-Agent": "phenoml/17.1.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -3,6 +3,7 @@ import { AuthtokenClient } from "./api/resources/authtoken/client/Client.mjs";
3
3
  import { CohortClient } from "./api/resources/cohort/client/Client.mjs";
4
4
  import { ConstrueClient } from "./api/resources/construe/client/Client.mjs";
5
5
  import { FhirClient } from "./api/resources/fhir/client/Client.mjs";
6
+ import { Fhir2OmopClient } from "./api/resources/fhir2Omop/client/Client.mjs";
6
7
  import { FhirProviderClient } from "./api/resources/fhirProvider/client/Client.mjs";
7
8
  import { Lang2FhirClient } from "./api/resources/lang2Fhir/client/Client.mjs";
8
9
  import { SummaryClient } from "./api/resources/summary/client/Client.mjs";
@@ -23,6 +24,7 @@ export declare class phenomlClient {
23
24
  protected _cohort: CohortClient | undefined;
24
25
  protected _construe: ConstrueClient | undefined;
25
26
  protected _fhir: FhirClient | undefined;
27
+ protected _fhir2Omop: Fhir2OmopClient | undefined;
26
28
  protected _fhirProvider: FhirProviderClient | undefined;
27
29
  protected _lang2Fhir: Lang2FhirClient | undefined;
28
30
  protected _summary: SummaryClient | undefined;
@@ -34,6 +36,7 @@ export declare class phenomlClient {
34
36
  get cohort(): CohortClient;
35
37
  get construe(): ConstrueClient;
36
38
  get fhir(): FhirClient;
39
+ get fhir2Omop(): Fhir2OmopClient;
37
40
  get fhirProvider(): FhirProviderClient;
38
41
  get lang2Fhir(): Lang2FhirClient;
39
42
  get summary(): SummaryClient;
@@ -13,6 +13,7 @@ import { AuthtokenClient } from "./api/resources/authtoken/client/Client.mjs";
13
13
  import { CohortClient } from "./api/resources/cohort/client/Client.mjs";
14
14
  import { ConstrueClient } from "./api/resources/construe/client/Client.mjs";
15
15
  import { FhirClient } from "./api/resources/fhir/client/Client.mjs";
16
+ import { Fhir2OmopClient } from "./api/resources/fhir2Omop/client/Client.mjs";
16
17
  import { FhirProviderClient } from "./api/resources/fhirProvider/client/Client.mjs";
17
18
  import { Lang2FhirClient } from "./api/resources/lang2Fhir/client/Client.mjs";
18
19
  import { SummaryClient } from "./api/resources/summary/client/Client.mjs";
@@ -44,6 +45,10 @@ export class phenomlClient {
44
45
  var _a;
45
46
  return ((_a = this._fhir) !== null && _a !== void 0 ? _a : (this._fhir = new FhirClient(this._options)));
46
47
  }
48
+ get fhir2Omop() {
49
+ var _a;
50
+ return ((_a = this._fhir2Omop) !== null && _a !== void 0 ? _a : (this._fhir2Omop = new Fhir2OmopClient(this._options)));
51
+ }
47
52
  get fhirProvider() {
48
53
  var _a;
49
54
  return ((_a = this._fhirProvider) !== null && _a !== void 0 ? _a : (this._fhirProvider = new FhirProviderClient(this._options)));
@@ -0,0 +1,110 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as phenoml from "../../../index.mjs";
5
+ export declare namespace Fhir2OmopClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class Fhir2OmopClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<Fhir2OmopClient.Options>;
12
+ constructor(options?: Fhir2OmopClient.Options);
13
+ /**
14
+ * Shapes a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows
15
+ * (person, visit_occurrence, condition_occurrence, drug_exposure,
16
+ * procedure_occurrence, measurement, observation).
17
+ *
18
+ * **This is a structural mapping (`mode: "structural"`).** Rows are
19
+ * structurally valid OMOP, but every clinical and source `concept_id` is `0`:
20
+ * the vocabulary crosswalk that assigns real OMOP `concept_id`s is a planned
21
+ * follow-up. Each `*_source_value` carries the verbatim FHIR coding
22
+ * (`system#code`), `*_type_concept_id` is set to `32817` (EHR), and the
23
+ * response `report` lists a standard-code *suggestion* for each source coding
24
+ * (already-standard, an unchecked normalization suggestion, or unmapped). Do
25
+ * not treat the output as analytically resolved OMOP until `concept_id`s are
26
+ * populated.
27
+ *
28
+ * Medication codes are resolved whether they appear inline
29
+ * (`medicationCodeableConcept`) or via a `medicationReference` to a contained,
30
+ * relative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.
31
+ * A medication with no usable code, resolvable reference, or display is
32
+ * reported under `scan_summary.dropped_resources` rather than emitted as a
33
+ * blank row. The bundle must contain at least one Patient resource.
34
+ *
35
+ * @param {phenoml.fhir2Omop.CreateOmopRequest} request
36
+ * @param {Fhir2OmopClient.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @throws {@link phenoml.fhir2Omop.BadRequestError}
39
+ * @throws {@link phenoml.fhir2Omop.UnauthorizedError}
40
+ * @throws {@link phenoml.fhir2Omop.InternalServerError}
41
+ *
42
+ * @example
43
+ * await client.fhir2Omop.create({
44
+ * fhir_resources: {
45
+ * "resourceType": "Bundle",
46
+ * "type": "collection",
47
+ * "entry": [
48
+ * {
49
+ * "resource": {
50
+ * "resourceType": "Patient",
51
+ * "id": "patient-1",
52
+ * "gender": "female",
53
+ * "birthDate": "1985-07-22"
54
+ * }
55
+ * },
56
+ * {
57
+ * "resource": {
58
+ * "resourceType": "Condition",
59
+ * "id": "condition-1",
60
+ * "subject": {
61
+ * "reference": "Patient/patient-1"
62
+ * },
63
+ * "code": {
64
+ * "coding": [
65
+ * {
66
+ * "system": "http://snomed.info/sct",
67
+ * "code": "44054006",
68
+ * "display": "Type 2 diabetes mellitus"
69
+ * }
70
+ * ]
71
+ * },
72
+ * "onsetDateTime": "2024-01-15"
73
+ * }
74
+ * },
75
+ * {
76
+ * "resource": {
77
+ * "resourceType": "MedicationRequest",
78
+ * "id": "medreq-1",
79
+ * "status": "active",
80
+ * "subject": {
81
+ * "reference": "Patient/patient-1"
82
+ * },
83
+ * "medicationReference": {
84
+ * "reference": "#med0"
85
+ * },
86
+ * "authoredOn": "2024-01-16",
87
+ * "contained": [
88
+ * {
89
+ * "resourceType": "Medication",
90
+ * "id": "med0",
91
+ * "code": {
92
+ * "coding": [
93
+ * {
94
+ * "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
95
+ * "code": "860975",
96
+ * "display": "metformin hydrochloride 500 MG"
97
+ * }
98
+ * ]
99
+ * }
100
+ * }
101
+ * ]
102
+ * }
103
+ * }
104
+ * ]
105
+ * }
106
+ * })
107
+ */
108
+ create(request: phenoml.fhir2Omop.CreateOmopRequest, requestOptions?: Fhir2OmopClient.RequestOptions): core.HttpResponsePromise<phenoml.fhir2Omop.CreateOmopResponse>;
109
+ private __create;
110
+ }