@metriport/commonwell-sdk 4.3.3 → 4.3.5
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/LICENSE +20 -20
- package/README.md +40 -40
- package/lib/client/commonwell-api.d.ts +49 -49
- package/lib/client/commonwell-api.js +2 -2
- package/lib/client/commonwell.d.ts +425 -425
- package/lib/client/commonwell.js +739 -739
- package/lib/client/document.d.ts +7 -7
- package/lib/client/document.js +71 -71
- package/lib/common/commonwell-error.d.ts +12 -12
- package/lib/common/commonwell-error.js +34 -34
- package/lib/common/fileDownload.d.ts +11 -11
- package/lib/common/fileDownload.js +43 -43
- package/lib/common/make-jwt.d.ts +24 -24
- package/lib/common/make-jwt.js +90 -90
- package/lib/common/metriport-error.d.ts +4 -4
- package/lib/common/metriport-error.js +33 -33
- package/lib/common/util.d.ts +25 -25
- package/lib/common/util.js +70 -70
- package/lib/common/validate-npi.d.ts +9 -9
- package/lib/common/validate-npi.js +39 -39
- package/lib/index.d.ts +20 -20
- package/lib/index.js +54 -54
- package/lib/models/address.d.ts +50 -50
- package/lib/models/address.js +28 -28
- package/lib/models/certificates.d.ts +156 -156
- package/lib/models/certificates.js +26 -26
- package/lib/models/contact.d.ts +50 -50
- package/lib/models/contact.js +39 -39
- package/lib/models/demographics.d.ts +292 -292
- package/lib/models/demographics.js +34 -34
- package/lib/models/document.d.ts +4421 -4421
- package/lib/models/document.js +151 -151
- package/lib/models/enrollment-summary.d.ts +18 -18
- package/lib/models/enrollment-summary.js +14 -14
- package/lib/models/facility.d.ts +75 -75
- package/lib/models/facility.js +10 -10
- package/lib/models/human-name.d.ts +53 -53
- package/lib/models/human-name.js +37 -37
- package/lib/models/identifier.d.ts +79 -79
- package/lib/models/identifier.js +36 -36
- package/lib/models/iso-date.d.ts +3 -3
- package/lib/models/iso-date.js +6 -6
- package/lib/models/iso-datetime.d.ts +3 -3
- package/lib/models/iso-datetime.js +8 -8
- package/lib/models/link.d.ts +642 -642
- package/lib/models/link.js +50 -50
- package/lib/models/organization.d.ts +763 -763
- package/lib/models/organization.js +83 -83
- package/lib/models/patient.d.ts +3617 -3617
- package/lib/models/patient.js +49 -49
- package/lib/models/period.d.ts +12 -12
- package/lib/models/period.js +12 -12
- package/lib/models/person.d.ts +2440 -2440
- package/lib/models/person.js +39 -39
- package/lib/models/purpose-of-use.d.ts +29 -29
- package/lib/models/purpose-of-use.js +34 -34
- package/package.json +2 -2
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare enum GenderCodes {
|
|
3
|
-
F = "F",
|
|
4
|
-
M = "M",
|
|
5
|
-
UN = "UN",
|
|
6
|
-
UNK = "UNK"
|
|
7
|
-
}
|
|
8
|
-
export declare const genderCodesSchema: z.ZodEnum<[string, ...string[]]>;
|
|
9
|
-
export declare const genderSchema: z.ZodObject<{
|
|
10
|
-
code: z.ZodEnum<[string, ...string[]]>;
|
|
11
|
-
display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
12
|
-
system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
code: string;
|
|
15
|
-
display?: string | null | undefined;
|
|
16
|
-
system?: string | null | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
code: string;
|
|
19
|
-
display?: string | null | undefined;
|
|
20
|
-
system?: string | null | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
export type Gender = z.infer<typeof genderSchema>;
|
|
23
|
-
export declare const demographicsSchema: z.ZodObject<{
|
|
24
|
-
identifier: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
-
system: z.ZodString;
|
|
26
|
-
key: z.ZodString;
|
|
27
|
-
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>>>;
|
|
28
|
-
label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
29
|
-
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
30
|
-
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
31
|
-
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
32
|
-
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
start?: string | undefined;
|
|
34
|
-
end?: string | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
start?: string | undefined;
|
|
37
|
-
end?: string | undefined;
|
|
38
|
-
}>>>;
|
|
39
|
-
assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
system: string;
|
|
42
|
-
key: string;
|
|
43
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
44
|
-
label?: string | null | undefined;
|
|
45
|
-
period?: {
|
|
46
|
-
start?: string | undefined;
|
|
47
|
-
end?: string | undefined;
|
|
48
|
-
} | null | undefined;
|
|
49
|
-
assigner?: string | null | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
system: string;
|
|
52
|
-
key: string;
|
|
53
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
54
|
-
label?: string | null | undefined;
|
|
55
|
-
period?: {
|
|
56
|
-
start?: string | undefined;
|
|
57
|
-
end?: string | undefined;
|
|
58
|
-
} | null | undefined;
|
|
59
|
-
assigner?: string | null | undefined;
|
|
60
|
-
}>, "many">>>;
|
|
61
|
-
name: z.ZodArray<z.ZodObject<{
|
|
62
|
-
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
63
|
-
text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
64
|
-
family: z.ZodArray<z.ZodString, "many">;
|
|
65
|
-
given: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
66
|
-
prefix: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
67
|
-
suffix: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
68
|
-
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
69
|
-
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
70
|
-
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
start?: string | undefined;
|
|
73
|
-
end?: string | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
start?: string | undefined;
|
|
76
|
-
end?: string | undefined;
|
|
77
|
-
}>>>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
family: string[];
|
|
80
|
-
use?: string | null | undefined;
|
|
81
|
-
text?: string | null | undefined;
|
|
82
|
-
given?: string[] | undefined;
|
|
83
|
-
prefix?: string | string[] | null | undefined;
|
|
84
|
-
suffix?: string | null | undefined;
|
|
85
|
-
period?: {
|
|
86
|
-
start?: string | undefined;
|
|
87
|
-
end?: string | undefined;
|
|
88
|
-
} | null | undefined;
|
|
89
|
-
}, {
|
|
90
|
-
family: string[];
|
|
91
|
-
use?: string | null | undefined;
|
|
92
|
-
text?: string | null | undefined;
|
|
93
|
-
given?: string[] | undefined;
|
|
94
|
-
prefix?: string | string[] | null | undefined;
|
|
95
|
-
suffix?: string | null | undefined;
|
|
96
|
-
period?: {
|
|
97
|
-
start?: string | undefined;
|
|
98
|
-
end?: string | undefined;
|
|
99
|
-
} | null | undefined;
|
|
100
|
-
}>, "many">;
|
|
101
|
-
telecom: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
-
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
103
|
-
system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
|
-
value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
105
|
-
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
106
|
-
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
107
|
-
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
108
|
-
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
start?: string | undefined;
|
|
110
|
-
end?: string | undefined;
|
|
111
|
-
}, {
|
|
112
|
-
start?: string | undefined;
|
|
113
|
-
end?: string | undefined;
|
|
114
|
-
}>>>;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
use?: string | null | undefined;
|
|
117
|
-
system?: string | null | undefined;
|
|
118
|
-
value?: string | null | undefined;
|
|
119
|
-
period?: {
|
|
120
|
-
start?: string | undefined;
|
|
121
|
-
end?: string | undefined;
|
|
122
|
-
} | null | undefined;
|
|
123
|
-
}, {
|
|
124
|
-
use?: string | null | undefined;
|
|
125
|
-
system?: string | null | undefined;
|
|
126
|
-
value?: string | null | undefined;
|
|
127
|
-
period?: {
|
|
128
|
-
start?: string | undefined;
|
|
129
|
-
end?: string | undefined;
|
|
130
|
-
} | null | undefined;
|
|
131
|
-
}>, "many">>>;
|
|
132
|
-
gender: z.ZodObject<{
|
|
133
|
-
code: z.ZodEnum<[string, ...string[]]>;
|
|
134
|
-
display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
135
|
-
system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
136
|
-
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
code: string;
|
|
138
|
-
display?: string | null | undefined;
|
|
139
|
-
system?: string | null | undefined;
|
|
140
|
-
}, {
|
|
141
|
-
code: string;
|
|
142
|
-
display?: string | null | undefined;
|
|
143
|
-
system?: string | null | undefined;
|
|
144
|
-
}>;
|
|
145
|
-
birthDate: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
146
|
-
address: z.ZodArray<z.ZodObject<{
|
|
147
|
-
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
148
|
-
line: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
149
|
-
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
150
|
-
state: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
151
|
-
zip: z.ZodString;
|
|
152
|
-
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
153
|
-
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
154
|
-
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
155
|
-
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
156
|
-
}, "strip", z.ZodTypeAny, {
|
|
157
|
-
start?: string | undefined;
|
|
158
|
-
end?: string | undefined;
|
|
159
|
-
}, {
|
|
160
|
-
start?: string | undefined;
|
|
161
|
-
end?: string | undefined;
|
|
162
|
-
}>>>;
|
|
163
|
-
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
zip: string;
|
|
165
|
-
use?: string | null | undefined;
|
|
166
|
-
line?: string[] | null | undefined;
|
|
167
|
-
city?: string | null | undefined;
|
|
168
|
-
state?: string | null | undefined;
|
|
169
|
-
country?: string | null | undefined;
|
|
170
|
-
period?: {
|
|
171
|
-
start?: string | undefined;
|
|
172
|
-
end?: string | undefined;
|
|
173
|
-
} | null | undefined;
|
|
174
|
-
}, {
|
|
175
|
-
zip: string;
|
|
176
|
-
use?: string | null | undefined;
|
|
177
|
-
line?: string[] | null | undefined;
|
|
178
|
-
city?: string | null | undefined;
|
|
179
|
-
state?: string | null | undefined;
|
|
180
|
-
country?: string | null | undefined;
|
|
181
|
-
period?: {
|
|
182
|
-
start?: string | undefined;
|
|
183
|
-
end?: string | undefined;
|
|
184
|
-
} | null | undefined;
|
|
185
|
-
}>, "many">;
|
|
186
|
-
picture: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
|
|
187
|
-
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
name: {
|
|
189
|
-
family: string[];
|
|
190
|
-
use?: string | null | undefined;
|
|
191
|
-
text?: string | null | undefined;
|
|
192
|
-
given?: string[] | undefined;
|
|
193
|
-
prefix?: string | string[] | null | undefined;
|
|
194
|
-
suffix?: string | null | undefined;
|
|
195
|
-
period?: {
|
|
196
|
-
start?: string | undefined;
|
|
197
|
-
end?: string | undefined;
|
|
198
|
-
} | null | undefined;
|
|
199
|
-
}[];
|
|
200
|
-
gender: {
|
|
201
|
-
code: string;
|
|
202
|
-
display?: string | null | undefined;
|
|
203
|
-
system?: string | null | undefined;
|
|
204
|
-
};
|
|
205
|
-
birthDate: string;
|
|
206
|
-
address: {
|
|
207
|
-
zip: string;
|
|
208
|
-
use?: string | null | undefined;
|
|
209
|
-
line?: string[] | null | undefined;
|
|
210
|
-
city?: string | null | undefined;
|
|
211
|
-
state?: string | null | undefined;
|
|
212
|
-
country?: string | null | undefined;
|
|
213
|
-
period?: {
|
|
214
|
-
start?: string | undefined;
|
|
215
|
-
end?: string | undefined;
|
|
216
|
-
} | null | undefined;
|
|
217
|
-
}[];
|
|
218
|
-
identifier?: {
|
|
219
|
-
system: string;
|
|
220
|
-
key: string;
|
|
221
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
222
|
-
label?: string | null | undefined;
|
|
223
|
-
period?: {
|
|
224
|
-
start?: string | undefined;
|
|
225
|
-
end?: string | undefined;
|
|
226
|
-
} | null | undefined;
|
|
227
|
-
assigner?: string | null | undefined;
|
|
228
|
-
}[] | null | undefined;
|
|
229
|
-
telecom?: {
|
|
230
|
-
use?: string | null | undefined;
|
|
231
|
-
system?: string | null | undefined;
|
|
232
|
-
value?: string | null | undefined;
|
|
233
|
-
period?: {
|
|
234
|
-
start?: string | undefined;
|
|
235
|
-
end?: string | undefined;
|
|
236
|
-
} | null | undefined;
|
|
237
|
-
}[] | null | undefined;
|
|
238
|
-
picture?: any;
|
|
239
|
-
}, {
|
|
240
|
-
name: {
|
|
241
|
-
family: string[];
|
|
242
|
-
use?: string | null | undefined;
|
|
243
|
-
text?: string | null | undefined;
|
|
244
|
-
given?: string[] | undefined;
|
|
245
|
-
prefix?: string | string[] | null | undefined;
|
|
246
|
-
suffix?: string | null | undefined;
|
|
247
|
-
period?: {
|
|
248
|
-
start?: string | undefined;
|
|
249
|
-
end?: string | undefined;
|
|
250
|
-
} | null | undefined;
|
|
251
|
-
}[];
|
|
252
|
-
gender: {
|
|
253
|
-
code: string;
|
|
254
|
-
display?: string | null | undefined;
|
|
255
|
-
system?: string | null | undefined;
|
|
256
|
-
};
|
|
257
|
-
birthDate: string;
|
|
258
|
-
address: {
|
|
259
|
-
zip: string;
|
|
260
|
-
use?: string | null | undefined;
|
|
261
|
-
line?: string[] | null | undefined;
|
|
262
|
-
city?: string | null | undefined;
|
|
263
|
-
state?: string | null | undefined;
|
|
264
|
-
country?: string | null | undefined;
|
|
265
|
-
period?: {
|
|
266
|
-
start?: string | undefined;
|
|
267
|
-
end?: string | undefined;
|
|
268
|
-
} | null | undefined;
|
|
269
|
-
}[];
|
|
270
|
-
identifier?: {
|
|
271
|
-
system: string;
|
|
272
|
-
key: string;
|
|
273
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
274
|
-
label?: string | null | undefined;
|
|
275
|
-
period?: {
|
|
276
|
-
start?: string | undefined;
|
|
277
|
-
end?: string | undefined;
|
|
278
|
-
} | null | undefined;
|
|
279
|
-
assigner?: string | null | undefined;
|
|
280
|
-
}[] | null | undefined;
|
|
281
|
-
telecom?: {
|
|
282
|
-
use?: string | null | undefined;
|
|
283
|
-
system?: string | null | undefined;
|
|
284
|
-
value?: string | null | undefined;
|
|
285
|
-
period?: {
|
|
286
|
-
start?: string | undefined;
|
|
287
|
-
end?: string | undefined;
|
|
288
|
-
} | null | undefined;
|
|
289
|
-
}[] | null | undefined;
|
|
290
|
-
picture?: any;
|
|
291
|
-
}>;
|
|
292
|
-
export type Demographics = z.infer<typeof demographicsSchema>;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare enum GenderCodes {
|
|
3
|
+
F = "F",
|
|
4
|
+
M = "M",
|
|
5
|
+
UN = "UN",
|
|
6
|
+
UNK = "UNK"
|
|
7
|
+
}
|
|
8
|
+
export declare const genderCodesSchema: z.ZodEnum<[string, ...string[]]>;
|
|
9
|
+
export declare const genderSchema: z.ZodObject<{
|
|
10
|
+
code: z.ZodEnum<[string, ...string[]]>;
|
|
11
|
+
display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
code: string;
|
|
15
|
+
display?: string | null | undefined;
|
|
16
|
+
system?: string | null | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
code: string;
|
|
19
|
+
display?: string | null | undefined;
|
|
20
|
+
system?: string | null | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export type Gender = z.infer<typeof genderSchema>;
|
|
23
|
+
export declare const demographicsSchema: z.ZodObject<{
|
|
24
|
+
identifier: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
system: z.ZodString;
|
|
26
|
+
key: z.ZodString;
|
|
27
|
+
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>>>;
|
|
28
|
+
label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
30
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
31
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
start?: string | undefined;
|
|
34
|
+
end?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
start?: string | undefined;
|
|
37
|
+
end?: string | undefined;
|
|
38
|
+
}>>>;
|
|
39
|
+
assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
system: string;
|
|
42
|
+
key: string;
|
|
43
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
44
|
+
label?: string | null | undefined;
|
|
45
|
+
period?: {
|
|
46
|
+
start?: string | undefined;
|
|
47
|
+
end?: string | undefined;
|
|
48
|
+
} | null | undefined;
|
|
49
|
+
assigner?: string | null | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
system: string;
|
|
52
|
+
key: string;
|
|
53
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
54
|
+
label?: string | null | undefined;
|
|
55
|
+
period?: {
|
|
56
|
+
start?: string | undefined;
|
|
57
|
+
end?: string | undefined;
|
|
58
|
+
} | null | undefined;
|
|
59
|
+
assigner?: string | null | undefined;
|
|
60
|
+
}>, "many">>>;
|
|
61
|
+
name: z.ZodArray<z.ZodObject<{
|
|
62
|
+
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
63
|
+
text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
64
|
+
family: z.ZodArray<z.ZodString, "many">;
|
|
65
|
+
given: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
66
|
+
prefix: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
67
|
+
suffix: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
68
|
+
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
69
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
70
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
start?: string | undefined;
|
|
73
|
+
end?: string | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
start?: string | undefined;
|
|
76
|
+
end?: string | undefined;
|
|
77
|
+
}>>>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
family: string[];
|
|
80
|
+
use?: string | null | undefined;
|
|
81
|
+
text?: string | null | undefined;
|
|
82
|
+
given?: string[] | undefined;
|
|
83
|
+
prefix?: string | string[] | null | undefined;
|
|
84
|
+
suffix?: string | null | undefined;
|
|
85
|
+
period?: {
|
|
86
|
+
start?: string | undefined;
|
|
87
|
+
end?: string | undefined;
|
|
88
|
+
} | null | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
family: string[];
|
|
91
|
+
use?: string | null | undefined;
|
|
92
|
+
text?: string | null | undefined;
|
|
93
|
+
given?: string[] | undefined;
|
|
94
|
+
prefix?: string | string[] | null | undefined;
|
|
95
|
+
suffix?: string | null | undefined;
|
|
96
|
+
period?: {
|
|
97
|
+
start?: string | undefined;
|
|
98
|
+
end?: string | undefined;
|
|
99
|
+
} | null | undefined;
|
|
100
|
+
}>, "many">;
|
|
101
|
+
telecom: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
103
|
+
system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
|
+
value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
105
|
+
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
106
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
107
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
start?: string | undefined;
|
|
110
|
+
end?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
start?: string | undefined;
|
|
113
|
+
end?: string | undefined;
|
|
114
|
+
}>>>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
use?: string | null | undefined;
|
|
117
|
+
system?: string | null | undefined;
|
|
118
|
+
value?: string | null | undefined;
|
|
119
|
+
period?: {
|
|
120
|
+
start?: string | undefined;
|
|
121
|
+
end?: string | undefined;
|
|
122
|
+
} | null | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
use?: string | null | undefined;
|
|
125
|
+
system?: string | null | undefined;
|
|
126
|
+
value?: string | null | undefined;
|
|
127
|
+
period?: {
|
|
128
|
+
start?: string | undefined;
|
|
129
|
+
end?: string | undefined;
|
|
130
|
+
} | null | undefined;
|
|
131
|
+
}>, "many">>>;
|
|
132
|
+
gender: z.ZodObject<{
|
|
133
|
+
code: z.ZodEnum<[string, ...string[]]>;
|
|
134
|
+
display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
135
|
+
system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
code: string;
|
|
138
|
+
display?: string | null | undefined;
|
|
139
|
+
system?: string | null | undefined;
|
|
140
|
+
}, {
|
|
141
|
+
code: string;
|
|
142
|
+
display?: string | null | undefined;
|
|
143
|
+
system?: string | null | undefined;
|
|
144
|
+
}>;
|
|
145
|
+
birthDate: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
146
|
+
address: z.ZodArray<z.ZodObject<{
|
|
147
|
+
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
148
|
+
line: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
149
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
150
|
+
state: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
151
|
+
zip: z.ZodString;
|
|
152
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
153
|
+
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
154
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
155
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
start?: string | undefined;
|
|
158
|
+
end?: string | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
start?: string | undefined;
|
|
161
|
+
end?: string | undefined;
|
|
162
|
+
}>>>;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
zip: string;
|
|
165
|
+
use?: string | null | undefined;
|
|
166
|
+
line?: string[] | null | undefined;
|
|
167
|
+
city?: string | null | undefined;
|
|
168
|
+
state?: string | null | undefined;
|
|
169
|
+
country?: string | null | undefined;
|
|
170
|
+
period?: {
|
|
171
|
+
start?: string | undefined;
|
|
172
|
+
end?: string | undefined;
|
|
173
|
+
} | null | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
zip: string;
|
|
176
|
+
use?: string | null | undefined;
|
|
177
|
+
line?: string[] | null | undefined;
|
|
178
|
+
city?: string | null | undefined;
|
|
179
|
+
state?: string | null | undefined;
|
|
180
|
+
country?: string | null | undefined;
|
|
181
|
+
period?: {
|
|
182
|
+
start?: string | undefined;
|
|
183
|
+
end?: string | undefined;
|
|
184
|
+
} | null | undefined;
|
|
185
|
+
}>, "many">;
|
|
186
|
+
picture: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
|
|
187
|
+
}, "strip", z.ZodTypeAny, {
|
|
188
|
+
name: {
|
|
189
|
+
family: string[];
|
|
190
|
+
use?: string | null | undefined;
|
|
191
|
+
text?: string | null | undefined;
|
|
192
|
+
given?: string[] | undefined;
|
|
193
|
+
prefix?: string | string[] | null | undefined;
|
|
194
|
+
suffix?: string | null | undefined;
|
|
195
|
+
period?: {
|
|
196
|
+
start?: string | undefined;
|
|
197
|
+
end?: string | undefined;
|
|
198
|
+
} | null | undefined;
|
|
199
|
+
}[];
|
|
200
|
+
gender: {
|
|
201
|
+
code: string;
|
|
202
|
+
display?: string | null | undefined;
|
|
203
|
+
system?: string | null | undefined;
|
|
204
|
+
};
|
|
205
|
+
birthDate: string;
|
|
206
|
+
address: {
|
|
207
|
+
zip: string;
|
|
208
|
+
use?: string | null | undefined;
|
|
209
|
+
line?: string[] | null | undefined;
|
|
210
|
+
city?: string | null | undefined;
|
|
211
|
+
state?: string | null | undefined;
|
|
212
|
+
country?: string | null | undefined;
|
|
213
|
+
period?: {
|
|
214
|
+
start?: string | undefined;
|
|
215
|
+
end?: string | undefined;
|
|
216
|
+
} | null | undefined;
|
|
217
|
+
}[];
|
|
218
|
+
identifier?: {
|
|
219
|
+
system: string;
|
|
220
|
+
key: string;
|
|
221
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
222
|
+
label?: string | null | undefined;
|
|
223
|
+
period?: {
|
|
224
|
+
start?: string | undefined;
|
|
225
|
+
end?: string | undefined;
|
|
226
|
+
} | null | undefined;
|
|
227
|
+
assigner?: string | null | undefined;
|
|
228
|
+
}[] | null | undefined;
|
|
229
|
+
telecom?: {
|
|
230
|
+
use?: string | null | undefined;
|
|
231
|
+
system?: string | null | undefined;
|
|
232
|
+
value?: string | null | undefined;
|
|
233
|
+
period?: {
|
|
234
|
+
start?: string | undefined;
|
|
235
|
+
end?: string | undefined;
|
|
236
|
+
} | null | undefined;
|
|
237
|
+
}[] | null | undefined;
|
|
238
|
+
picture?: any;
|
|
239
|
+
}, {
|
|
240
|
+
name: {
|
|
241
|
+
family: string[];
|
|
242
|
+
use?: string | null | undefined;
|
|
243
|
+
text?: string | null | undefined;
|
|
244
|
+
given?: string[] | undefined;
|
|
245
|
+
prefix?: string | string[] | null | undefined;
|
|
246
|
+
suffix?: string | null | undefined;
|
|
247
|
+
period?: {
|
|
248
|
+
start?: string | undefined;
|
|
249
|
+
end?: string | undefined;
|
|
250
|
+
} | null | undefined;
|
|
251
|
+
}[];
|
|
252
|
+
gender: {
|
|
253
|
+
code: string;
|
|
254
|
+
display?: string | null | undefined;
|
|
255
|
+
system?: string | null | undefined;
|
|
256
|
+
};
|
|
257
|
+
birthDate: string;
|
|
258
|
+
address: {
|
|
259
|
+
zip: string;
|
|
260
|
+
use?: string | null | undefined;
|
|
261
|
+
line?: string[] | null | undefined;
|
|
262
|
+
city?: string | null | undefined;
|
|
263
|
+
state?: string | null | undefined;
|
|
264
|
+
country?: string | null | undefined;
|
|
265
|
+
period?: {
|
|
266
|
+
start?: string | undefined;
|
|
267
|
+
end?: string | undefined;
|
|
268
|
+
} | null | undefined;
|
|
269
|
+
}[];
|
|
270
|
+
identifier?: {
|
|
271
|
+
system: string;
|
|
272
|
+
key: string;
|
|
273
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
274
|
+
label?: string | null | undefined;
|
|
275
|
+
period?: {
|
|
276
|
+
start?: string | undefined;
|
|
277
|
+
end?: string | undefined;
|
|
278
|
+
} | null | undefined;
|
|
279
|
+
assigner?: string | null | undefined;
|
|
280
|
+
}[] | null | undefined;
|
|
281
|
+
telecom?: {
|
|
282
|
+
use?: string | null | undefined;
|
|
283
|
+
system?: string | null | undefined;
|
|
284
|
+
value?: string | null | undefined;
|
|
285
|
+
period?: {
|
|
286
|
+
start?: string | undefined;
|
|
287
|
+
end?: string | undefined;
|
|
288
|
+
} | null | undefined;
|
|
289
|
+
}[] | null | undefined;
|
|
290
|
+
picture?: any;
|
|
291
|
+
}>;
|
|
292
|
+
export type Demographics = z.infer<typeof demographicsSchema>;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.demographicsSchema = exports.genderSchema = exports.genderCodesSchema = exports.GenderCodes = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const iso_datetime_1 = require("./iso-datetime");
|
|
6
|
-
const identifier_1 = require("./identifier");
|
|
7
|
-
const human_name_1 = require("./human-name");
|
|
8
|
-
const contact_1 = require("./contact");
|
|
9
|
-
const address_1 = require("./address");
|
|
10
|
-
const iso_date_1 = require("./iso-date");
|
|
11
|
-
var GenderCodes;
|
|
12
|
-
(function (GenderCodes) {
|
|
13
|
-
GenderCodes["F"] = "F";
|
|
14
|
-
GenderCodes["M"] = "M";
|
|
15
|
-
GenderCodes["UN"] = "UN";
|
|
16
|
-
GenderCodes["UNK"] = "UNK";
|
|
17
|
-
})(GenderCodes = exports.GenderCodes || (exports.GenderCodes = {}));
|
|
18
|
-
exports.genderCodesSchema = zod_1.z.enum(Object.keys(GenderCodes));
|
|
19
|
-
exports.genderSchema = zod_1.z.object({
|
|
20
|
-
code: exports.genderCodesSchema,
|
|
21
|
-
display: zod_1.z.string().optional().nullable(),
|
|
22
|
-
system: zod_1.z.string().optional().nullable(),
|
|
23
|
-
});
|
|
24
|
-
// The demographic details for a Person.
|
|
25
|
-
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.8 Demographics)
|
|
26
|
-
exports.demographicsSchema = zod_1.z.object({
|
|
27
|
-
identifier: zod_1.z.array(identifier_1.identifierSchema).optional().nullable(),
|
|
28
|
-
name: zod_1.z.array(human_name_1.humanNameSchema).min(1),
|
|
29
|
-
telecom: zod_1.z.array(contact_1.contactSchema).optional().nullable(),
|
|
30
|
-
gender: exports.genderSchema,
|
|
31
|
-
birthDate: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema),
|
|
32
|
-
address: zod_1.z.array(address_1.addressSchema),
|
|
33
|
-
picture: zod_1.z.any().optional().nullable(), // not supported
|
|
34
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.demographicsSchema = exports.genderSchema = exports.genderCodesSchema = exports.GenderCodes = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const iso_datetime_1 = require("./iso-datetime");
|
|
6
|
+
const identifier_1 = require("./identifier");
|
|
7
|
+
const human_name_1 = require("./human-name");
|
|
8
|
+
const contact_1 = require("./contact");
|
|
9
|
+
const address_1 = require("./address");
|
|
10
|
+
const iso_date_1 = require("./iso-date");
|
|
11
|
+
var GenderCodes;
|
|
12
|
+
(function (GenderCodes) {
|
|
13
|
+
GenderCodes["F"] = "F";
|
|
14
|
+
GenderCodes["M"] = "M";
|
|
15
|
+
GenderCodes["UN"] = "UN";
|
|
16
|
+
GenderCodes["UNK"] = "UNK";
|
|
17
|
+
})(GenderCodes = exports.GenderCodes || (exports.GenderCodes = {}));
|
|
18
|
+
exports.genderCodesSchema = zod_1.z.enum(Object.keys(GenderCodes));
|
|
19
|
+
exports.genderSchema = zod_1.z.object({
|
|
20
|
+
code: exports.genderCodesSchema,
|
|
21
|
+
display: zod_1.z.string().optional().nullable(),
|
|
22
|
+
system: zod_1.z.string().optional().nullable(),
|
|
23
|
+
});
|
|
24
|
+
// The demographic details for a Person.
|
|
25
|
+
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.8 Demographics)
|
|
26
|
+
exports.demographicsSchema = zod_1.z.object({
|
|
27
|
+
identifier: zod_1.z.array(identifier_1.identifierSchema).optional().nullable(),
|
|
28
|
+
name: zod_1.z.array(human_name_1.humanNameSchema).min(1),
|
|
29
|
+
telecom: zod_1.z.array(contact_1.contactSchema).optional().nullable(),
|
|
30
|
+
gender: exports.genderSchema,
|
|
31
|
+
birthDate: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema),
|
|
32
|
+
address: zod_1.z.array(address_1.addressSchema),
|
|
33
|
+
picture: zod_1.z.any().optional().nullable(), // not supported
|
|
34
|
+
});
|
|
35
35
|
//# sourceMappingURL=demographics.js.map
|