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,161 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as phenoml from "../../../index.mjs";
18
+ export class Fhir2OmopClient {
19
+ constructor(options = {}) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Shapes a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows
24
+ * (person, visit_occurrence, condition_occurrence, drug_exposure,
25
+ * procedure_occurrence, measurement, observation).
26
+ *
27
+ * **This is a structural mapping (`mode: "structural"`).** Rows are
28
+ * structurally valid OMOP, but every clinical and source `concept_id` is `0`:
29
+ * the vocabulary crosswalk that assigns real OMOP `concept_id`s is a planned
30
+ * follow-up. Each `*_source_value` carries the verbatim FHIR coding
31
+ * (`system#code`), `*_type_concept_id` is set to `32817` (EHR), and the
32
+ * response `report` lists a standard-code *suggestion* for each source coding
33
+ * (already-standard, an unchecked normalization suggestion, or unmapped). Do
34
+ * not treat the output as analytically resolved OMOP until `concept_id`s are
35
+ * populated.
36
+ *
37
+ * Medication codes are resolved whether they appear inline
38
+ * (`medicationCodeableConcept`) or via a `medicationReference` to a contained,
39
+ * relative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.
40
+ * A medication with no usable code, resolvable reference, or display is
41
+ * reported under `scan_summary.dropped_resources` rather than emitted as a
42
+ * blank row. The bundle must contain at least one Patient resource.
43
+ *
44
+ * @param {phenoml.fhir2Omop.CreateOmopRequest} request
45
+ * @param {Fhir2OmopClient.RequestOptions} requestOptions - Request-specific configuration.
46
+ *
47
+ * @throws {@link phenoml.fhir2Omop.BadRequestError}
48
+ * @throws {@link phenoml.fhir2Omop.UnauthorizedError}
49
+ * @throws {@link phenoml.fhir2Omop.InternalServerError}
50
+ *
51
+ * @example
52
+ * await client.fhir2Omop.create({
53
+ * fhir_resources: {
54
+ * "resourceType": "Bundle",
55
+ * "type": "collection",
56
+ * "entry": [
57
+ * {
58
+ * "resource": {
59
+ * "resourceType": "Patient",
60
+ * "id": "patient-1",
61
+ * "gender": "female",
62
+ * "birthDate": "1985-07-22"
63
+ * }
64
+ * },
65
+ * {
66
+ * "resource": {
67
+ * "resourceType": "Condition",
68
+ * "id": "condition-1",
69
+ * "subject": {
70
+ * "reference": "Patient/patient-1"
71
+ * },
72
+ * "code": {
73
+ * "coding": [
74
+ * {
75
+ * "system": "http://snomed.info/sct",
76
+ * "code": "44054006",
77
+ * "display": "Type 2 diabetes mellitus"
78
+ * }
79
+ * ]
80
+ * },
81
+ * "onsetDateTime": "2024-01-15"
82
+ * }
83
+ * },
84
+ * {
85
+ * "resource": {
86
+ * "resourceType": "MedicationRequest",
87
+ * "id": "medreq-1",
88
+ * "status": "active",
89
+ * "subject": {
90
+ * "reference": "Patient/patient-1"
91
+ * },
92
+ * "medicationReference": {
93
+ * "reference": "#med0"
94
+ * },
95
+ * "authoredOn": "2024-01-16",
96
+ * "contained": [
97
+ * {
98
+ * "resourceType": "Medication",
99
+ * "id": "med0",
100
+ * "code": {
101
+ * "coding": [
102
+ * {
103
+ * "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
104
+ * "code": "860975",
105
+ * "display": "metformin hydrochloride 500 MG"
106
+ * }
107
+ * ]
108
+ * }
109
+ * }
110
+ * ]
111
+ * }
112
+ * }
113
+ * ]
114
+ * }
115
+ * })
116
+ */
117
+ create(request, requestOptions) {
118
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
119
+ }
120
+ __create(request, requestOptions) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
123
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
124
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
125
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
126
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "fhir2omop/create"),
127
+ method: "POST",
128
+ headers: _headers,
129
+ contentType: "application/json",
130
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
131
+ requestType: "json",
132
+ body: request,
133
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
134
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
135
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
136
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
137
+ logging: this._options.logging,
138
+ });
139
+ if (_response.ok) {
140
+ return { data: _response.body, rawResponse: _response.rawResponse };
141
+ }
142
+ if (_response.error.reason === "status-code") {
143
+ switch (_response.error.statusCode) {
144
+ case 400:
145
+ throw new phenoml.fhir2Omop.BadRequestError(_response.error.body, _response.rawResponse);
146
+ case 401:
147
+ throw new phenoml.fhir2Omop.UnauthorizedError(_response.error.body, _response.rawResponse);
148
+ case 500:
149
+ throw new phenoml.fhir2Omop.InternalServerError(_response.error.body, _response.rawResponse);
150
+ default:
151
+ throw new errors.phenomlError({
152
+ statusCode: _response.error.statusCode,
153
+ body: _response.error.body,
154
+ rawResponse: _response.rawResponse,
155
+ });
156
+ }
157
+ }
158
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fhir2omop/create");
159
+ });
160
+ }
161
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * fhir_resources: {
5
+ * "resourceType": "Bundle",
6
+ * "type": "collection",
7
+ * "entry": [
8
+ * {
9
+ * "resource": {
10
+ * "resourceType": "Patient",
11
+ * "id": "patient-1",
12
+ * "gender": "female",
13
+ * "birthDate": "1985-07-22"
14
+ * }
15
+ * },
16
+ * {
17
+ * "resource": {
18
+ * "resourceType": "Condition",
19
+ * "id": "condition-1",
20
+ * "subject": {
21
+ * "reference": "Patient/patient-1"
22
+ * },
23
+ * "code": {
24
+ * "coding": [
25
+ * {
26
+ * "system": "http://snomed.info/sct",
27
+ * "code": "44054006",
28
+ * "display": "Type 2 diabetes mellitus"
29
+ * }
30
+ * ]
31
+ * },
32
+ * "onsetDateTime": "2024-01-15"
33
+ * }
34
+ * },
35
+ * {
36
+ * "resource": {
37
+ * "resourceType": "MedicationRequest",
38
+ * "id": "medreq-1",
39
+ * "status": "active",
40
+ * "subject": {
41
+ * "reference": "Patient/patient-1"
42
+ * },
43
+ * "medicationReference": {
44
+ * "reference": "#med0"
45
+ * },
46
+ * "authoredOn": "2024-01-16",
47
+ * "contained": [
48
+ * {
49
+ * "resourceType": "Medication",
50
+ * "id": "med0",
51
+ * "code": {
52
+ * "coding": [
53
+ * {
54
+ * "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
55
+ * "code": "860975",
56
+ * "display": "metformin hydrochloride 500 MG"
57
+ * }
58
+ * ]
59
+ * }
60
+ * }
61
+ * ]
62
+ * }
63
+ * }
64
+ * ]
65
+ * }
66
+ * }
67
+ */
68
+ export interface CreateOmopRequest {
69
+ /**
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.
74
+ */
75
+ fhir_resources: Record<string, unknown>;
76
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { CreateOmopRequest } from "./CreateOmopRequest.mjs";
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export declare class BadRequestError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class BadRequestError extends errors.phenomlError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "BadRequestError",
7
+ statusCode: 400,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export declare class InternalServerError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class InternalServerError extends errors.phenomlError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "InternalServerError",
7
+ statusCode: 500,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export declare class UnauthorizedError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class UnauthorizedError extends errors.phenomlError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "UnauthorizedError",
7
+ statusCode: 401,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./BadRequestError.mjs";
2
+ export * from "./InternalServerError.mjs";
3
+ export * from "./UnauthorizedError.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./BadRequestError.mjs";
2
+ export * from "./InternalServerError.mjs";
3
+ export * from "./UnauthorizedError.mjs";
@@ -0,0 +1,2 @@
1
+ export { Fhir2OmopClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { Fhir2OmopClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
3
+ export * from "./types/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
3
+ export * from "./types/index.mjs";
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as phenoml from "../../../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,13 @@
1
+ import type * as phenoml from "../../../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,15 @@
1
+ import type * as phenoml from "../../../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ export * from "./ConditionOccurrenceRow.mjs";
2
+ export * from "./CreateOmopResponse.mjs";
3
+ export * from "./DroppedResource.mjs";
4
+ export * from "./DrugExposureRow.mjs";
5
+ export * from "./MappingReportEntry.mjs";
6
+ export * from "./MeasurementRow.mjs";
7
+ export * from "./ObservationRow.mjs";
8
+ export * from "./OmopTables.mjs";
9
+ export * from "./PersonRow.mjs";
10
+ export * from "./ProcedureOccurrenceRow.mjs";
11
+ export * from "./ScanSummary.mjs";
12
+ export * from "./VisitOccurrenceRow.mjs";
@@ -0,0 +1,12 @@
1
+ export * from "./ConditionOccurrenceRow.mjs";
2
+ export * from "./CreateOmopResponse.mjs";
3
+ export * from "./DroppedResource.mjs";
4
+ export * from "./DrugExposureRow.mjs";
5
+ export * from "./MappingReportEntry.mjs";
6
+ export * from "./MeasurementRow.mjs";
7
+ export * from "./ObservationRow.mjs";
8
+ export * from "./OmopTables.mjs";
9
+ export * from "./PersonRow.mjs";
10
+ export * from "./ProcedureOccurrenceRow.mjs";
11
+ export * from "./ScanSummary.mjs";
12
+ export * from "./VisitOccurrenceRow.mjs";
@@ -3,6 +3,7 @@ export * as authtoken from "./authtoken/index.mjs";
3
3
  export * as cohort from "./cohort/index.mjs";
4
4
  export * as construe from "./construe/index.mjs";
5
5
  export * as fhir from "./fhir/index.mjs";
6
+ export * as fhir2Omop from "./fhir2Omop/index.mjs";
6
7
  export * as fhirProvider from "./fhirProvider/index.mjs";
7
8
  export * as lang2Fhir from "./lang2Fhir/index.mjs";
8
9
  export * as summary from "./summary/index.mjs";
@@ -3,6 +3,7 @@ export * as authtoken from "./authtoken/index.mjs";
3
3
  export * as cohort from "./cohort/index.mjs";
4
4
  export * as construe from "./construe/index.mjs";
5
5
  export * as fhir from "./fhir/index.mjs";
6
+ export * as fhir2Omop from "./fhir2Omop/index.mjs";
6
7
  export * as fhirProvider from "./fhirProvider/index.mjs";
7
8
  export * as lang2Fhir from "./lang2Fhir/index.mjs";
8
9
  export * as summary from "./summary/index.mjs";