@metriport/commonwell-sdk 1.0.2 → 1.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 (57) hide show
  1. package/lib/client/commonwell.d.ts +60 -0
  2. package/lib/client/commonwell.js +312 -0
  3. package/lib/client/commonwell.js.map +1 -0
  4. package/lib/common/util.d.ts +5 -0
  5. package/lib/common/util.js +15 -0
  6. package/lib/common/util.js.map +1 -0
  7. package/lib/common/validate-npi.js +8 -8
  8. package/lib/common/validate-npi.js.map +1 -1
  9. package/lib/index.d.ts +10 -0
  10. package/lib/index.js +20 -1
  11. package/lib/index.js.map +1 -1
  12. package/lib/models/address.d.ts +50 -0
  13. package/lib/models/address.js +24 -0
  14. package/lib/models/address.js.map +1 -0
  15. package/lib/models/certificates.d.ts +156 -0
  16. package/lib/models/certificates.js +27 -0
  17. package/lib/models/certificates.js.map +1 -0
  18. package/lib/models/contact.d.ts +50 -0
  19. package/lib/models/contact.js +31 -0
  20. package/lib/models/contact.js.map +1 -0
  21. package/lib/models/demographics.d.ts +291 -0
  22. package/lib/models/demographics.js +32 -0
  23. package/lib/models/demographics.js.map +1 -0
  24. package/lib/models/enrollment-summary.d.ts +18 -0
  25. package/lib/models/enrollment-summary.js +13 -0
  26. package/lib/models/enrollment-summary.js.map +1 -0
  27. package/lib/models/facility.d.ts +75 -0
  28. package/lib/models/facility.js +11 -0
  29. package/lib/models/facility.js.map +1 -0
  30. package/lib/models/human-name.d.ts +53 -0
  31. package/lib/models/human-name.js +27 -0
  32. package/lib/models/human-name.js.map +1 -0
  33. package/lib/models/identifier.d.ts +46 -0
  34. package/lib/models/identifier.js +22 -0
  35. package/lib/models/identifier.js.map +1 -0
  36. package/lib/models/iso-date.d.ts +3 -0
  37. package/lib/models/iso-date.js +7 -0
  38. package/lib/models/iso-date.js.map +1 -0
  39. package/lib/models/iso-datetime.d.ts +3 -0
  40. package/lib/models/iso-datetime.js +9 -0
  41. package/lib/models/iso-datetime.js.map +1 -0
  42. package/lib/models/link.d.ts +638 -0
  43. package/lib/models/link.js +41 -0
  44. package/lib/models/link.js.map +1 -0
  45. package/lib/models/organization.d.ts +751 -0
  46. package/lib/models/organization.js +83 -0
  47. package/lib/models/organization.js.map +1 -0
  48. package/lib/models/patient.d.ts +5953 -0
  49. package/lib/models/patient.js +41 -0
  50. package/lib/models/patient.js.map +1 -0
  51. package/lib/models/period.d.ts +12 -0
  52. package/lib/models/period.js +11 -0
  53. package/lib/models/period.js.map +1 -0
  54. package/lib/models/person.d.ts +1884 -0
  55. package/lib/models/person.js +31 -0
  56. package/lib/models/person.js.map +1 -0
  57. package/package.json +6 -4
@@ -0,0 +1,156 @@
1
+ import { z } from "zod";
2
+ export declare enum CertificatePurpose {
3
+ Signing = "Signing",
4
+ Authentication = "Authentication"
5
+ }
6
+ export declare const certificatePurposeSchema: z.ZodEnum<[string, ...string[]]>;
7
+ export declare const certificateSchema: z.ZodObject<{
8
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
9
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
+ expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
+ thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
13
+ purpose: z.ZodEnum<[string, ...string[]]>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ startDate?: string;
16
+ endDate?: string;
17
+ expirationDate?: string;
18
+ thumbprint?: string;
19
+ content?: string;
20
+ purpose?: string;
21
+ }, {
22
+ startDate?: string;
23
+ endDate?: string;
24
+ expirationDate?: string;
25
+ thumbprint?: string;
26
+ content?: string;
27
+ purpose?: string;
28
+ }>;
29
+ export type Certificate = z.infer<typeof certificateSchema>;
30
+ export declare const certificatesParamSchema: z.ZodObject<{
31
+ Certificates: z.ZodArray<z.ZodObject<{
32
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
33
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
34
+ expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
35
+ thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
36
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
+ purpose: z.ZodEnum<[string, ...string[]]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ startDate?: string;
40
+ endDate?: string;
41
+ expirationDate?: string;
42
+ thumbprint?: string;
43
+ content?: string;
44
+ purpose?: string;
45
+ }, {
46
+ startDate?: string;
47
+ endDate?: string;
48
+ expirationDate?: string;
49
+ thumbprint?: string;
50
+ content?: string;
51
+ purpose?: string;
52
+ }>, "many">;
53
+ }, "strip", z.ZodTypeAny, {
54
+ Certificates?: {
55
+ startDate?: string;
56
+ endDate?: string;
57
+ expirationDate?: string;
58
+ thumbprint?: string;
59
+ content?: string;
60
+ purpose?: string;
61
+ }[];
62
+ }, {
63
+ Certificates?: {
64
+ startDate?: string;
65
+ endDate?: string;
66
+ expirationDate?: string;
67
+ thumbprint?: string;
68
+ content?: string;
69
+ purpose?: string;
70
+ }[];
71
+ }>;
72
+ export type CertificateParam = z.infer<typeof certificatesParamSchema>;
73
+ export declare const certificateRespSchema: z.ZodObject<{
74
+ certificates: z.ZodArray<z.ZodObject<{
75
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
76
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
77
+ expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
78
+ thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
79
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
80
+ purpose: z.ZodEnum<[string, ...string[]]>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ startDate?: string;
83
+ endDate?: string;
84
+ expirationDate?: string;
85
+ thumbprint?: string;
86
+ content?: string;
87
+ purpose?: string;
88
+ }, {
89
+ startDate?: string;
90
+ endDate?: string;
91
+ expirationDate?: string;
92
+ thumbprint?: string;
93
+ content?: string;
94
+ purpose?: string;
95
+ }>, "many">;
96
+ _links: z.ZodObject<{
97
+ self: z.ZodNullable<z.ZodOptional<z.ZodObject<{
98
+ href: z.ZodNullable<z.ZodOptional<z.ZodString>>;
99
+ templated: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
100
+ type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ type?: string;
103
+ href?: string;
104
+ templated?: boolean;
105
+ }, {
106
+ type?: string;
107
+ href?: string;
108
+ templated?: boolean;
109
+ }>>>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ self?: {
112
+ type?: string;
113
+ href?: string;
114
+ templated?: boolean;
115
+ };
116
+ }, {
117
+ self?: {
118
+ type?: string;
119
+ href?: string;
120
+ templated?: boolean;
121
+ };
122
+ }>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ _links?: {
125
+ self?: {
126
+ type?: string;
127
+ href?: string;
128
+ templated?: boolean;
129
+ };
130
+ };
131
+ certificates?: {
132
+ startDate?: string;
133
+ endDate?: string;
134
+ expirationDate?: string;
135
+ thumbprint?: string;
136
+ content?: string;
137
+ purpose?: string;
138
+ }[];
139
+ }, {
140
+ _links?: {
141
+ self?: {
142
+ type?: string;
143
+ href?: string;
144
+ templated?: boolean;
145
+ };
146
+ };
147
+ certificates?: {
148
+ startDate?: string;
149
+ endDate?: string;
150
+ expirationDate?: string;
151
+ thumbprint?: string;
152
+ content?: string;
153
+ purpose?: string;
154
+ }[];
155
+ }>;
156
+ export type CertificateResp = z.infer<typeof certificateRespSchema>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.certificateRespSchema = exports.certificatesParamSchema = exports.certificateSchema = exports.certificatePurposeSchema = exports.CertificatePurpose = void 0;
4
+ const zod_1 = require("zod");
5
+ const link_1 = require("./link");
6
+ var CertificatePurpose;
7
+ (function (CertificatePurpose) {
8
+ CertificatePurpose["Signing"] = "Signing";
9
+ CertificatePurpose["Authentication"] = "Authentication";
10
+ })(CertificatePurpose = exports.CertificatePurpose || (exports.CertificatePurpose = {}));
11
+ exports.certificatePurposeSchema = zod_1.z.enum(Object.keys(CertificatePurpose));
12
+ exports.certificateSchema = zod_1.z.object({
13
+ startDate: zod_1.z.string().optional().nullable(),
14
+ endDate: zod_1.z.string().optional().nullable(),
15
+ expirationDate: zod_1.z.string().optional().nullable(),
16
+ thumbprint: zod_1.z.string().optional().nullable(),
17
+ content: zod_1.z.string().optional().nullable(),
18
+ purpose: exports.certificatePurposeSchema,
19
+ });
20
+ exports.certificatesParamSchema = zod_1.z.object({
21
+ Certificates: zod_1.z.array(exports.certificateSchema),
22
+ });
23
+ exports.certificateRespSchema = zod_1.z.object({
24
+ certificates: zod_1.z.array(exports.certificateSchema),
25
+ _links: zod_1.z.object({ self: link_1.linkSchema.optional().nullable() }),
26
+ });
27
+ //# sourceMappingURL=certificates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"certificates.js","sourceRoot":"","sources":["../../src/models/certificates.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iCAAoC;AAEpC,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uDAAiC,CAAA;AACnC,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AACY,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAC5C,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAA0B,CACzD,CAAC;AAEW,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,OAAO,EAAE,gCAAwB;CAClC,CAAC,CAAC;AAIU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC;CACzC,CAAC,CAAC;AAIU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC;IACxC,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;CAC7D,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ export declare enum ContactUseCodes {
3
+ usual = "usual",
4
+ home = "home",
5
+ work = "work",
6
+ temp = "temp",
7
+ old = "old",
8
+ mobile = "mobile",
9
+ unspecified = "unspecified"
10
+ }
11
+ export declare const contactUseCodesSchema: z.ZodEnum<[string, ...string[]]>;
12
+ export declare enum ContactSystemCodes {
13
+ phone = "phone",
14
+ fax = "fax",
15
+ email = "email",
16
+ url = "url"
17
+ }
18
+ export declare const contactSystemCodesSchema: z.ZodEnum<[string, ...string[]]>;
19
+ export declare const contactSchema: z.ZodObject<{
20
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
21
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22
+ value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
23
+ period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
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
+ }, "strip", z.ZodTypeAny, {
27
+ end?: string;
28
+ start?: string;
29
+ }, {
30
+ end?: string;
31
+ start?: string;
32
+ }>>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ value?: string;
35
+ use?: string;
36
+ system?: string;
37
+ period?: {
38
+ end?: string;
39
+ start?: string;
40
+ };
41
+ }, {
42
+ value?: string;
43
+ use?: string;
44
+ system?: string;
45
+ period?: {
46
+ end?: string;
47
+ start?: string;
48
+ };
49
+ }>;
50
+ export type Contact = z.infer<typeof contactSchema>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contactSchema = exports.contactSystemCodesSchema = exports.ContactSystemCodes = exports.contactUseCodesSchema = exports.ContactUseCodes = void 0;
4
+ const zod_1 = require("zod");
5
+ const period_1 = require("./period");
6
+ var ContactUseCodes;
7
+ (function (ContactUseCodes) {
8
+ ContactUseCodes["usual"] = "usual";
9
+ ContactUseCodes["home"] = "home";
10
+ ContactUseCodes["work"] = "work";
11
+ ContactUseCodes["temp"] = "temp";
12
+ ContactUseCodes["old"] = "old";
13
+ ContactUseCodes["mobile"] = "mobile";
14
+ ContactUseCodes["unspecified"] = "unspecified";
15
+ })(ContactUseCodes = exports.ContactUseCodes || (exports.ContactUseCodes = {}));
16
+ exports.contactUseCodesSchema = zod_1.z.enum(Object.keys(ContactUseCodes));
17
+ var ContactSystemCodes;
18
+ (function (ContactSystemCodes) {
19
+ ContactSystemCodes["phone"] = "phone";
20
+ ContactSystemCodes["fax"] = "fax";
21
+ ContactSystemCodes["email"] = "email";
22
+ ContactSystemCodes["url"] = "url";
23
+ })(ContactSystemCodes = exports.ContactSystemCodes || (exports.ContactSystemCodes = {}));
24
+ exports.contactSystemCodesSchema = zod_1.z.enum(Object.keys(ContactSystemCodes));
25
+ exports.contactSchema = zod_1.z.object({
26
+ use: exports.contactUseCodesSchema.optional().nullable(),
27
+ system: zod_1.z.string().optional().nullable(),
28
+ value: zod_1.z.string().optional().nullable(),
29
+ period: period_1.periodSchema.optional().nullable(),
30
+ });
31
+ //# sourceMappingURL=contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.js","sourceRoot":"","sources":["../../src/models/contact.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAAwC;AAKxC,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;AAC7B,CAAC,EARW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAQ1B;AACY,QAAA,qBAAqB,GAAG,OAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAA0B,CAAC,CAAC;AAKnG,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,iCAAW,CAAA;IACX,qCAAe,CAAA;IACf,iCAAW,CAAA;AACb,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AACY,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAC5C,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAA0B,CACzD,CAAC;AAKW,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,6BAAqB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvC,MAAM,EAAE,qBAAY,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
@@ -0,0 +1,291 @@
1
+ import { z } from "zod";
2
+ export declare enum GenderCodes {
3
+ F = "F",
4
+ M = "M",
5
+ UN = "UN"
6
+ }
7
+ export declare const genderCodesSchema: z.ZodEnum<[string, ...string[]]>;
8
+ export declare const genderSchema: z.ZodObject<{
9
+ code: z.ZodEnum<[string, ...string[]]>;
10
+ display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ code?: string;
14
+ system?: string;
15
+ display?: string;
16
+ }, {
17
+ code?: string;
18
+ system?: string;
19
+ display?: string;
20
+ }>;
21
+ export type Gender = z.infer<typeof genderSchema>;
22
+ export declare const demographicsSchema: z.ZodObject<{
23
+ identifier: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
24
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
25
+ label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
26
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
27
+ key: z.ZodString;
28
+ period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
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
+ }, "strip", z.ZodTypeAny, {
32
+ end?: string;
33
+ start?: string;
34
+ }, {
35
+ end?: string;
36
+ start?: string;
37
+ }>>>;
38
+ assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ key?: string;
41
+ use?: string;
42
+ label?: string;
43
+ system?: string;
44
+ period?: {
45
+ end?: string;
46
+ start?: string;
47
+ };
48
+ assigner?: string;
49
+ }, {
50
+ key?: string;
51
+ use?: string;
52
+ label?: string;
53
+ system?: string;
54
+ period?: {
55
+ end?: string;
56
+ start?: string;
57
+ };
58
+ assigner?: string;
59
+ }>, "many">>>;
60
+ name: z.ZodArray<z.ZodObject<{
61
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
62
+ text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
63
+ family: z.ZodArray<z.ZodString, "many">;
64
+ given: z.ZodArray<z.ZodString, "many">;
65
+ prefix: z.ZodNullable<z.ZodOptional<z.ZodString>>;
66
+ suffix: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
+ period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
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
+ }, "strip", z.ZodTypeAny, {
71
+ end?: string;
72
+ start?: string;
73
+ }, {
74
+ end?: string;
75
+ start?: string;
76
+ }>>>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ family?: string[];
79
+ use?: string;
80
+ period?: {
81
+ end?: string;
82
+ start?: string;
83
+ };
84
+ text?: string;
85
+ given?: string[];
86
+ prefix?: string;
87
+ suffix?: string;
88
+ }, {
89
+ family?: string[];
90
+ use?: string;
91
+ period?: {
92
+ end?: string;
93
+ start?: string;
94
+ };
95
+ text?: string;
96
+ given?: string[];
97
+ prefix?: string;
98
+ suffix?: string;
99
+ }>, "many">;
100
+ telecom: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
101
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
102
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
103
+ value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
104
+ period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
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
+ }, "strip", z.ZodTypeAny, {
108
+ end?: string;
109
+ start?: string;
110
+ }, {
111
+ end?: string;
112
+ start?: string;
113
+ }>>>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ value?: string;
116
+ use?: string;
117
+ system?: string;
118
+ period?: {
119
+ end?: string;
120
+ start?: string;
121
+ };
122
+ }, {
123
+ value?: string;
124
+ use?: string;
125
+ system?: string;
126
+ period?: {
127
+ end?: string;
128
+ start?: string;
129
+ };
130
+ }>, "many">>>;
131
+ gender: z.ZodObject<{
132
+ code: z.ZodEnum<[string, ...string[]]>;
133
+ display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
134
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ code?: string;
137
+ system?: string;
138
+ display?: string;
139
+ }, {
140
+ code?: string;
141
+ system?: string;
142
+ display?: string;
143
+ }>;
144
+ birthDate: z.ZodUnion<[z.ZodString, z.ZodString]>;
145
+ address: z.ZodArray<z.ZodObject<{
146
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
147
+ line: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
148
+ city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
149
+ state: z.ZodNullable<z.ZodOptional<z.ZodString>>;
150
+ zip: z.ZodString;
151
+ country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
152
+ period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
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
+ }, "strip", z.ZodTypeAny, {
156
+ end?: string;
157
+ start?: string;
158
+ }, {
159
+ end?: string;
160
+ start?: string;
161
+ }>>>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ line?: string[];
164
+ use?: string;
165
+ period?: {
166
+ end?: string;
167
+ start?: string;
168
+ };
169
+ city?: string;
170
+ state?: string;
171
+ zip?: string;
172
+ country?: string;
173
+ }, {
174
+ line?: string[];
175
+ use?: string;
176
+ period?: {
177
+ end?: string;
178
+ start?: string;
179
+ };
180
+ city?: string;
181
+ state?: string;
182
+ zip?: string;
183
+ country?: string;
184
+ }>, "many">;
185
+ picture: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
186
+ }, "strip", z.ZodTypeAny, {
187
+ name?: {
188
+ family?: string[];
189
+ use?: string;
190
+ period?: {
191
+ end?: string;
192
+ start?: string;
193
+ };
194
+ text?: string;
195
+ given?: string[];
196
+ prefix?: string;
197
+ suffix?: string;
198
+ }[];
199
+ identifier?: {
200
+ key?: string;
201
+ use?: string;
202
+ label?: string;
203
+ system?: string;
204
+ period?: {
205
+ end?: string;
206
+ start?: string;
207
+ };
208
+ assigner?: string;
209
+ }[];
210
+ telecom?: {
211
+ value?: string;
212
+ use?: string;
213
+ system?: string;
214
+ period?: {
215
+ end?: string;
216
+ start?: string;
217
+ };
218
+ }[];
219
+ gender?: {
220
+ code?: string;
221
+ system?: string;
222
+ display?: string;
223
+ };
224
+ birthDate?: string;
225
+ address?: {
226
+ line?: string[];
227
+ use?: string;
228
+ period?: {
229
+ end?: string;
230
+ start?: string;
231
+ };
232
+ city?: string;
233
+ state?: string;
234
+ zip?: string;
235
+ country?: string;
236
+ }[];
237
+ picture?: any;
238
+ }, {
239
+ name?: {
240
+ family?: string[];
241
+ use?: string;
242
+ period?: {
243
+ end?: string;
244
+ start?: string;
245
+ };
246
+ text?: string;
247
+ given?: string[];
248
+ prefix?: string;
249
+ suffix?: string;
250
+ }[];
251
+ identifier?: {
252
+ key?: string;
253
+ use?: string;
254
+ label?: string;
255
+ system?: string;
256
+ period?: {
257
+ end?: string;
258
+ start?: string;
259
+ };
260
+ assigner?: string;
261
+ }[];
262
+ telecom?: {
263
+ value?: string;
264
+ use?: string;
265
+ system?: string;
266
+ period?: {
267
+ end?: string;
268
+ start?: string;
269
+ };
270
+ }[];
271
+ gender?: {
272
+ code?: string;
273
+ system?: string;
274
+ display?: string;
275
+ };
276
+ birthDate?: string;
277
+ address?: {
278
+ line?: string[];
279
+ use?: string;
280
+ period?: {
281
+ end?: string;
282
+ start?: string;
283
+ };
284
+ city?: string;
285
+ state?: string;
286
+ zip?: string;
287
+ country?: string;
288
+ }[];
289
+ picture?: any;
290
+ }>;
291
+ export type Demographics = z.infer<typeof demographicsSchema>;
@@ -0,0 +1,32 @@
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 = exports.GenderCodes || (exports.GenderCodes = {}));
17
+ exports.genderCodesSchema = zod_1.z.enum(Object.keys(GenderCodes));
18
+ exports.genderSchema = zod_1.z.object({
19
+ code: exports.genderCodesSchema,
20
+ display: zod_1.z.string().optional().nullable(),
21
+ system: zod_1.z.string().optional().nullable(),
22
+ });
23
+ exports.demographicsSchema = zod_1.z.object({
24
+ identifier: zod_1.z.array(identifier_1.identifierSchema).optional().nullable(),
25
+ name: zod_1.z.array(human_name_1.humanNameSchema).min(1),
26
+ telecom: zod_1.z.array(contact_1.contactSchema).optional().nullable(),
27
+ gender: exports.genderSchema,
28
+ birthDate: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema),
29
+ address: zod_1.z.array(address_1.addressSchema).min(1),
30
+ picture: zod_1.z.any().optional().nullable(),
31
+ });
32
+ //# sourceMappingURL=demographics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demographics.js","sourceRoot":"","sources":["../../src/models/demographics.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAmD;AACnD,6CAAgD;AAChD,6CAA+C;AAC/C,uCAA0C;AAC1C,uCAA0C;AAC1C,yCAA2C;AAE3C,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,sBAAO,CAAA;IACP,sBAAO,CAAA;IACP,wBAAS,CAAA;AACX,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AACY,QAAA,iBAAiB,GAAG,OAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAA0B,CAAC,CAAC;AAE9E,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,yBAAiB;IACvB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAMU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,6BAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3D,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,uBAAa,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACrD,MAAM,EAAE,oBAAY;IACpB,SAAS,EAAE,gCAAiB,CAAC,EAAE,CAAC,wBAAa,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,uBAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,OAAO,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const enrollmentSummarySchema: z.ZodObject<{
3
+ dateEnrolled: z.ZodUnion<[z.ZodString, z.ZodString]>;
4
+ enroller: z.ZodString;
5
+ dateUnenrolled: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
6
+ unenroller: z.ZodNullable<z.ZodOptional<z.ZodString>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ dateEnrolled?: string;
9
+ enroller?: string;
10
+ dateUnenrolled?: string;
11
+ unenroller?: string;
12
+ }, {
13
+ dateEnrolled?: string;
14
+ enroller?: string;
15
+ dateUnenrolled?: string;
16
+ unenroller?: string;
17
+ }>;
18
+ export type EnrollmentSummary = z.infer<typeof enrollmentSummarySchema>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enrollmentSummarySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const iso_date_1 = require("./iso-date");
6
+ const iso_datetime_1 = require("./iso-datetime");
7
+ exports.enrollmentSummarySchema = zod_1.z.object({
8
+ dateEnrolled: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema),
9
+ enroller: zod_1.z.string(),
10
+ dateUnenrolled: iso_datetime_1.isoDateTimeSchema.or(iso_date_1.isoDateSchema).optional().nullable(),
11
+ unenroller: zod_1.z.string().optional().nullable(),
12
+ });
13
+ //# sourceMappingURL=enrollment-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enrollment-summary.js","sourceRoot":"","sources":["../../src/models/enrollment-summary.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAC3C,iDAAmD;AAItC,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,gCAAiB,CAAC,EAAE,CAAC,wBAAa,CAAC;IACjD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,cAAc,EAAE,gCAAiB,CAAC,EAAE,CAAC,wBAAa,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzE,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC"}