@metriport/commonwell-sdk 4.1.1-alpha.4 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { Demographics, GenderCodes } from "./models/demographics";
9
9
  export * from "./models/document";
10
10
  export { EnrollmentSummary } from "./models/enrollment-summary";
11
11
  export { HumanName, NameUseCodes } from "./models/human-name";
12
- export { Identifier } from "./models/identifier";
12
+ export { Identifier, IdentifierUseCodes } from "./models/identifier";
13
13
  export { isLOLA1, isLOLA2, isLOLA3, isLOLA4, LOLA, NetworkLink } from "./models/link";
14
14
  export { Organization } from "./models/organization";
15
15
  export { Patient } from "./models/patient";
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.PurposeOfUse = exports.LOLA = exports.isLOLA4 = exports.isLOLA3 = exports.isLOLA2 = exports.isLOLA1 = exports.NameUseCodes = exports.GenderCodes = exports.ContactUseCodes = exports.ContactSystemCodes = exports.AddressUseCodes = exports.getPersonIdFromSearchByPatientDemo = exports.getIdTrailingSlash = exports.getId = exports.makeJwt = exports.CommonwellError = exports.CommonWell = exports.APIMode = void 0;
17
+ exports.PurposeOfUse = exports.LOLA = exports.isLOLA4 = exports.isLOLA3 = exports.isLOLA2 = exports.isLOLA1 = exports.IdentifierUseCodes = exports.NameUseCodes = exports.GenderCodes = exports.ContactUseCodes = exports.ContactSystemCodes = exports.AddressUseCodes = exports.getPersonIdFromSearchByPatientDemo = exports.getIdTrailingSlash = exports.getId = exports.makeJwt = exports.CommonwellError = exports.CommonWell = exports.APIMode = void 0;
18
18
  var commonwell_1 = require("./client/commonwell");
19
19
  Object.defineProperty(exports, "APIMode", { enumerable: true, get: function () { return commonwell_1.APIMode; } });
20
20
  Object.defineProperty(exports, "CommonWell", { enumerable: true, get: function () { return commonwell_1.CommonWell; } });
@@ -36,6 +36,8 @@ Object.defineProperty(exports, "GenderCodes", { enumerable: true, get: function
36
36
  __exportStar(require("./models/document"), exports);
37
37
  var human_name_1 = require("./models/human-name");
38
38
  Object.defineProperty(exports, "NameUseCodes", { enumerable: true, get: function () { return human_name_1.NameUseCodes; } });
39
+ var identifier_1 = require("./models/identifier");
40
+ Object.defineProperty(exports, "IdentifierUseCodes", { enumerable: true, get: function () { return identifier_1.IdentifierUseCodes; } });
39
41
  var link_1 = require("./models/link");
40
42
  Object.defineProperty(exports, "isLOLA1", { enumerable: true, get: function () { return link_1.isLOLA1; } });
41
43
  Object.defineProperty(exports, "isLOLA2", { enumerable: true, get: function () { return link_1.isLOLA2; } });
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA2E;AAAlE,qGAAA,OAAO,OAAA;AAAE,wGAAA,UAAU,OAAA;AAE5B,8DAA4D;AAAnD,mHAAA,eAAe,OAAA;AACxB,8CAA4C;AAAnC,mGAAA,OAAO,OAAA;AAChB,sCAA8F;AAArF,6FAAA,KAAK,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAAE,0HAAA,kCAAkC,OAAA;AACtE,4CAA4D;AAA1C,0GAAA,eAAe,OAAA;AACjC,4CAAgF;AAA9D,6GAAA,kBAAkB,OAAA;AAAE,0GAAA,eAAe,OAAA;AACrD,sDAAkE;AAA3C,2GAAA,WAAW,OAAA;AAClC,oDAAkC;AAElC,kDAA8D;AAA1C,0GAAA,YAAY,OAAA;AAEhC,sCAAsF;AAA7E,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,4FAAA,IAAI,OAAA;AAIjD,0DAAuD;AAA9C,8GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA2E;AAAlE,qGAAA,OAAO,OAAA;AAAE,wGAAA,UAAU,OAAA;AAE5B,8DAA4D;AAAnD,mHAAA,eAAe,OAAA;AACxB,8CAA4C;AAAnC,mGAAA,OAAO,OAAA;AAChB,sCAA8F;AAArF,6FAAA,KAAK,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAAE,0HAAA,kCAAkC,OAAA;AACtE,4CAA4D;AAA1C,0GAAA,eAAe,OAAA;AACjC,4CAAgF;AAA9D,6GAAA,kBAAkB,OAAA;AAAE,0GAAA,eAAe,OAAA;AACrD,sDAAkE;AAA3C,2GAAA,WAAW,OAAA;AAClC,oDAAkC;AAElC,kDAA8D;AAA1C,0GAAA,YAAY,OAAA;AAChC,kDAAqE;AAAhD,gHAAA,kBAAkB,OAAA;AACvC,sCAAsF;AAA7E,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,4FAAA,IAAI,OAAA;AAIjD,0DAAuD;AAA9C,8GAAA,YAAY,OAAA"}
@@ -15,14 +15,14 @@ export declare const addressSchema: z.ZodObject<{
15
15
  zip: z.ZodString;
16
16
  country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17
17
  period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
18
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
19
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
18
+ start: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
19
+ end: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
20
20
  }, "strip", z.ZodTypeAny, {
21
- start?: string | undefined;
22
- end?: string | undefined;
21
+ start?: string | null | undefined;
22
+ end?: string | null | undefined;
23
23
  }, {
24
- start?: string | undefined;
25
- end?: string | undefined;
24
+ start?: string | null | undefined;
25
+ end?: string | null | undefined;
26
26
  }>>>;
27
27
  }, "strip", z.ZodTypeAny, {
28
28
  zip: string;
@@ -32,8 +32,8 @@ export declare const addressSchema: z.ZodObject<{
32
32
  state?: string | null | undefined;
33
33
  country?: string | null | undefined;
34
34
  period?: {
35
- start?: string | undefined;
36
- end?: string | undefined;
35
+ start?: string | null | undefined;
36
+ end?: string | null | undefined;
37
37
  } | null | undefined;
38
38
  }, {
39
39
  zip: string;
@@ -43,8 +43,8 @@ export declare const addressSchema: z.ZodObject<{
43
43
  state?: string | null | undefined;
44
44
  country?: string | null | undefined;
45
45
  period?: {
46
- start?: string | undefined;
47
- end?: string | undefined;
46
+ start?: string | null | undefined;
47
+ end?: string | null | undefined;
48
48
  } | null | undefined;
49
49
  }>;
50
50
  export type Address = z.infer<typeof addressSchema>;
@@ -21,30 +21,30 @@ export declare const contactSchema: z.ZodObject<{
21
21
  system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22
22
  value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
23
23
  period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
24
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
25
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
24
+ start: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
25
+ end: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
26
26
  }, "strip", z.ZodTypeAny, {
27
- start?: string | undefined;
28
- end?: string | undefined;
27
+ start?: string | null | undefined;
28
+ end?: string | null | undefined;
29
29
  }, {
30
- start?: string | undefined;
31
- end?: string | undefined;
30
+ start?: string | null | undefined;
31
+ end?: string | null | undefined;
32
32
  }>>>;
33
33
  }, "strip", z.ZodTypeAny, {
34
34
  use?: string | null | undefined;
35
35
  system?: string | null | undefined;
36
36
  value?: string | null | undefined;
37
37
  period?: {
38
- start?: string | undefined;
39
- end?: string | undefined;
38
+ start?: string | null | undefined;
39
+ end?: string | null | undefined;
40
40
  } | null | undefined;
41
41
  }, {
42
42
  use?: string | null | undefined;
43
43
  system?: string | null | undefined;
44
44
  value?: string | null | undefined;
45
45
  period?: {
46
- start?: string | undefined;
47
- end?: string | undefined;
46
+ start?: string | null | undefined;
47
+ end?: string | null | undefined;
48
48
  } | null | undefined;
49
49
  }>;
50
50
  export type Contact = z.infer<typeof contactSchema>;
@@ -23,37 +23,37 @@ export declare const demographicsSchema: z.ZodObject<{
23
23
  identifier: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
24
24
  system: z.ZodString;
25
25
  key: z.ZodString;
26
- use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "unspecified"]>>>;
26
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
27
27
  label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
28
28
  period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
29
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
30
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
29
+ start: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
30
+ end: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
31
31
  }, "strip", z.ZodTypeAny, {
32
- start?: string | undefined;
33
- end?: string | undefined;
32
+ start?: string | null | undefined;
33
+ end?: string | null | undefined;
34
34
  }, {
35
- start?: string | undefined;
36
- end?: string | undefined;
35
+ start?: string | null | undefined;
36
+ end?: string | null | undefined;
37
37
  }>>>;
38
38
  assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
39
39
  }, "strip", z.ZodTypeAny, {
40
40
  system: string;
41
41
  key: string;
42
- use?: "usual" | "official" | "temp" | "unspecified" | null | undefined;
42
+ use?: string | null | undefined;
43
43
  label?: string | null | undefined;
44
44
  period?: {
45
- start?: string | undefined;
46
- end?: string | undefined;
45
+ start?: string | null | undefined;
46
+ end?: string | null | undefined;
47
47
  } | null | undefined;
48
48
  assigner?: string | null | undefined;
49
49
  }, {
50
50
  system: string;
51
51
  key: string;
52
- use?: "usual" | "official" | "temp" | "unspecified" | null | undefined;
52
+ use?: string | null | undefined;
53
53
  label?: string | null | undefined;
54
54
  period?: {
55
- start?: string | undefined;
56
- end?: string | undefined;
55
+ start?: string | null | undefined;
56
+ end?: string | null | undefined;
57
57
  } | null | undefined;
58
58
  assigner?: string | null | undefined;
59
59
  }>, "many">>>;
@@ -65,14 +65,14 @@ export declare const demographicsSchema: z.ZodObject<{
65
65
  prefix: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
66
66
  suffix: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
67
  period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
68
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
69
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
68
+ start: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
69
+ end: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
70
70
  }, "strip", z.ZodTypeAny, {
71
- start?: string | undefined;
72
- end?: string | undefined;
71
+ start?: string | null | undefined;
72
+ end?: string | null | undefined;
73
73
  }, {
74
- start?: string | undefined;
75
- end?: string | undefined;
74
+ start?: string | null | undefined;
75
+ end?: string | null | undefined;
76
76
  }>>>;
77
77
  }, "strip", z.ZodTypeAny, {
78
78
  family: string[];
@@ -82,8 +82,8 @@ export declare const demographicsSchema: z.ZodObject<{
82
82
  prefix?: string | string[] | null | undefined;
83
83
  suffix?: string | null | undefined;
84
84
  period?: {
85
- start?: string | undefined;
86
- end?: string | undefined;
85
+ start?: string | null | undefined;
86
+ end?: string | null | undefined;
87
87
  } | null | undefined;
88
88
  }, {
89
89
  family: string[];
@@ -93,8 +93,8 @@ export declare const demographicsSchema: z.ZodObject<{
93
93
  prefix?: string | string[] | null | undefined;
94
94
  suffix?: string | null | undefined;
95
95
  period?: {
96
- start?: string | undefined;
97
- end?: string | undefined;
96
+ start?: string | null | undefined;
97
+ end?: string | null | undefined;
98
98
  } | null | undefined;
99
99
  }>, "many">;
100
100
  telecom: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -102,30 +102,30 @@ export declare const demographicsSchema: z.ZodObject<{
102
102
  system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
103
103
  value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
104
104
  period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
105
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
106
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
105
+ start: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
106
+ end: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
107
107
  }, "strip", z.ZodTypeAny, {
108
- start?: string | undefined;
109
- end?: string | undefined;
108
+ start?: string | null | undefined;
109
+ end?: string | null | undefined;
110
110
  }, {
111
- start?: string | undefined;
112
- end?: string | undefined;
111
+ start?: string | null | undefined;
112
+ end?: string | null | undefined;
113
113
  }>>>;
114
114
  }, "strip", z.ZodTypeAny, {
115
115
  use?: string | null | undefined;
116
116
  system?: string | null | undefined;
117
117
  value?: string | null | undefined;
118
118
  period?: {
119
- start?: string | undefined;
120
- end?: string | undefined;
119
+ start?: string | null | undefined;
120
+ end?: string | null | undefined;
121
121
  } | null | undefined;
122
122
  }, {
123
123
  use?: string | null | undefined;
124
124
  system?: string | null | undefined;
125
125
  value?: string | null | undefined;
126
126
  period?: {
127
- start?: string | undefined;
128
- end?: string | undefined;
127
+ start?: string | null | undefined;
128
+ end?: string | null | undefined;
129
129
  } | null | undefined;
130
130
  }>, "many">>>;
131
131
  gender: z.ZodObject<{
@@ -150,14 +150,14 @@ export declare const demographicsSchema: z.ZodObject<{
150
150
  zip: z.ZodString;
151
151
  country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
152
152
  period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
153
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
154
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
153
+ start: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
154
+ end: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
155
155
  }, "strip", z.ZodTypeAny, {
156
- start?: string | undefined;
157
- end?: string | undefined;
156
+ start?: string | null | undefined;
157
+ end?: string | null | undefined;
158
158
  }, {
159
- start?: string | undefined;
160
- end?: string | undefined;
159
+ start?: string | null | undefined;
160
+ end?: string | null | undefined;
161
161
  }>>>;
162
162
  }, "strip", z.ZodTypeAny, {
163
163
  zip: string;
@@ -167,8 +167,8 @@ export declare const demographicsSchema: z.ZodObject<{
167
167
  state?: string | null | undefined;
168
168
  country?: string | null | undefined;
169
169
  period?: {
170
- start?: string | undefined;
171
- end?: string | undefined;
170
+ start?: string | null | undefined;
171
+ end?: string | null | undefined;
172
172
  } | null | undefined;
173
173
  }, {
174
174
  zip: string;
@@ -178,8 +178,8 @@ export declare const demographicsSchema: z.ZodObject<{
178
178
  state?: string | null | undefined;
179
179
  country?: string | null | undefined;
180
180
  period?: {
181
- start?: string | undefined;
182
- end?: string | undefined;
181
+ start?: string | null | undefined;
182
+ end?: string | null | undefined;
183
183
  } | null | undefined;
184
184
  }>, "many">;
185
185
  picture: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
@@ -192,8 +192,8 @@ export declare const demographicsSchema: z.ZodObject<{
192
192
  prefix?: string | string[] | null | undefined;
193
193
  suffix?: string | null | undefined;
194
194
  period?: {
195
- start?: string | undefined;
196
- end?: string | undefined;
195
+ start?: string | null | undefined;
196
+ end?: string | null | undefined;
197
197
  } | null | undefined;
198
198
  }[];
199
199
  gender: {
@@ -210,18 +210,18 @@ export declare const demographicsSchema: z.ZodObject<{
210
210
  state?: string | null | undefined;
211
211
  country?: string | null | undefined;
212
212
  period?: {
213
- start?: string | undefined;
214
- end?: string | undefined;
213
+ start?: string | null | undefined;
214
+ end?: string | null | undefined;
215
215
  } | null | undefined;
216
216
  }[];
217
217
  identifier?: {
218
218
  system: string;
219
219
  key: string;
220
- use?: "usual" | "official" | "temp" | "unspecified" | null | undefined;
220
+ use?: string | null | undefined;
221
221
  label?: string | null | undefined;
222
222
  period?: {
223
- start?: string | undefined;
224
- end?: string | undefined;
223
+ start?: string | null | undefined;
224
+ end?: string | null | undefined;
225
225
  } | null | undefined;
226
226
  assigner?: string | null | undefined;
227
227
  }[] | null | undefined;
@@ -230,8 +230,8 @@ export declare const demographicsSchema: z.ZodObject<{
230
230
  system?: string | null | undefined;
231
231
  value?: string | null | undefined;
232
232
  period?: {
233
- start?: string | undefined;
234
- end?: string | undefined;
233
+ start?: string | null | undefined;
234
+ end?: string | null | undefined;
235
235
  } | null | undefined;
236
236
  }[] | null | undefined;
237
237
  picture?: any;
@@ -244,8 +244,8 @@ export declare const demographicsSchema: z.ZodObject<{
244
244
  prefix?: string | string[] | null | undefined;
245
245
  suffix?: string | null | undefined;
246
246
  period?: {
247
- start?: string | undefined;
248
- end?: string | undefined;
247
+ start?: string | null | undefined;
248
+ end?: string | null | undefined;
249
249
  } | null | undefined;
250
250
  }[];
251
251
  gender: {
@@ -262,18 +262,18 @@ export declare const demographicsSchema: z.ZodObject<{
262
262
  state?: string | null | undefined;
263
263
  country?: string | null | undefined;
264
264
  period?: {
265
- start?: string | undefined;
266
- end?: string | undefined;
265
+ start?: string | null | undefined;
266
+ end?: string | null | undefined;
267
267
  } | null | undefined;
268
268
  }[];
269
269
  identifier?: {
270
270
  system: string;
271
271
  key: string;
272
- use?: "usual" | "official" | "temp" | "unspecified" | null | undefined;
272
+ use?: string | null | undefined;
273
273
  label?: string | null | undefined;
274
274
  period?: {
275
- start?: string | undefined;
276
- end?: string | undefined;
275
+ start?: string | null | undefined;
276
+ end?: string | null | undefined;
277
277
  } | null | undefined;
278
278
  assigner?: string | null | undefined;
279
279
  }[] | null | undefined;
@@ -282,8 +282,8 @@ export declare const demographicsSchema: z.ZodObject<{
282
282
  system?: string | null | undefined;
283
283
  value?: string | null | undefined;
284
284
  period?: {
285
- start?: string | undefined;
286
- end?: string | undefined;
285
+ start?: string | null | undefined;
286
+ end?: string | null | undefined;
287
287
  } | null | undefined;
288
288
  }[] | null | undefined;
289
289
  picture?: any;