@metriport/shared 0.20.0 → 0.20.2-alpha.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 (125) hide show
  1. package/dist/common/string.d.ts +1 -0
  2. package/dist/common/string.d.ts.map +1 -1
  3. package/dist/common/string.js +5 -1
  4. package/dist/common/string.js.map +1 -1
  5. package/dist/common/titleCase.d.ts +2 -0
  6. package/dist/common/titleCase.d.ts.map +1 -0
  7. package/dist/common/titleCase.js +10 -0
  8. package/dist/common/titleCase.js.map +1 -0
  9. package/dist/domain/address/__tests__/country.test.d.ts +2 -0
  10. package/dist/domain/address/__tests__/country.test.d.ts.map +1 -0
  11. package/dist/domain/address/__tests__/country.test.js +51 -0
  12. package/dist/domain/address/__tests__/country.test.js.map +1 -0
  13. package/dist/domain/address/__tests__/normalize-zip.test.d.ts +1 -1
  14. package/dist/domain/address/country.d.ts +4 -0
  15. package/dist/domain/address/country.d.ts.map +1 -0
  16. package/dist/domain/address/country.js +31 -0
  17. package/dist/domain/address/country.js.map +1 -0
  18. package/dist/domain/db.d.ts +58 -0
  19. package/dist/domain/db.d.ts.map +1 -0
  20. package/dist/domain/db.js +25 -0
  21. package/dist/domain/db.js.map +1 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +2 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/interface/external/athenahealth/patient.d.ts +41 -388
  27. package/dist/interface/external/athenahealth/patient.d.ts.map +1 -1
  28. package/dist/interface/external/athenahealth/patient.js +11 -30
  29. package/dist/interface/external/athenahealth/patient.js.map +1 -1
  30. package/dist/interface/external/ehr/athenahealth/appointment.d.ts +79 -0
  31. package/dist/interface/external/ehr/athenahealth/appointment.d.ts.map +1 -0
  32. package/dist/interface/external/ehr/athenahealth/appointment.js +20 -0
  33. package/dist/interface/external/ehr/athenahealth/appointment.js.map +1 -0
  34. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts +13 -0
  35. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts.map +1 -0
  36. package/dist/interface/external/ehr/athenahealth/cx-mapping.js +9 -0
  37. package/dist/interface/external/ehr/athenahealth/cx-mapping.js.map +1 -0
  38. package/dist/interface/external/ehr/athenahealth/department.d.ts +28 -0
  39. package/dist/interface/external/ehr/athenahealth/department.d.ts.map +1 -0
  40. package/dist/interface/external/ehr/athenahealth/department.js +11 -0
  41. package/dist/interface/external/ehr/athenahealth/department.js.map +1 -0
  42. package/dist/interface/external/ehr/athenahealth/index.d.ts +10 -0
  43. package/dist/interface/external/ehr/athenahealth/index.d.ts.map +1 -0
  44. package/dist/interface/external/ehr/athenahealth/index.js +26 -0
  45. package/dist/interface/external/ehr/athenahealth/index.js.map +1 -0
  46. package/dist/interface/external/ehr/athenahealth/jwt-token.d.ts +46 -0
  47. package/dist/interface/external/ehr/athenahealth/jwt-token.d.ts.map +1 -0
  48. package/dist/interface/external/ehr/athenahealth/jwt-token.js +26 -0
  49. package/dist/interface/external/ehr/athenahealth/jwt-token.js.map +1 -0
  50. package/dist/interface/external/ehr/athenahealth/medication.d.ts +50 -0
  51. package/dist/interface/external/ehr/athenahealth/medication.d.ts.map +1 -0
  52. package/dist/interface/external/ehr/athenahealth/medication.js +19 -0
  53. package/dist/interface/external/ehr/athenahealth/medication.js.map +1 -0
  54. package/dist/interface/external/ehr/athenahealth/patient.d.ts +44 -0
  55. package/dist/interface/external/ehr/athenahealth/patient.d.ts.map +1 -0
  56. package/dist/interface/external/ehr/athenahealth/patient.js +15 -0
  57. package/dist/interface/external/ehr/athenahealth/patient.js.map +1 -0
  58. package/dist/interface/external/ehr/athenahealth/problem.d.ts +27 -0
  59. package/dist/interface/external/ehr/athenahealth/problem.d.ts.map +1 -0
  60. package/dist/interface/external/ehr/athenahealth/problem.js +14 -0
  61. package/dist/interface/external/ehr/athenahealth/problem.js.map +1 -0
  62. package/dist/interface/external/ehr/athenahealth/subscription.d.ts +20 -0
  63. package/dist/interface/external/ehr/athenahealth/subscription.d.ts.map +1 -0
  64. package/dist/interface/external/ehr/athenahealth/subscription.js +11 -0
  65. package/dist/interface/external/ehr/athenahealth/subscription.js.map +1 -0
  66. package/dist/interface/external/ehr/athenahealth/vitals.d.ts +82 -0
  67. package/dist/interface/external/ehr/athenahealth/vitals.d.ts.map +1 -0
  68. package/dist/interface/external/ehr/athenahealth/vitals.js +15 -0
  69. package/dist/interface/external/ehr/athenahealth/vitals.js.map +1 -0
  70. package/dist/interface/external/ehr/canvas/appointment.d.ts +152 -0
  71. package/dist/interface/external/ehr/canvas/appointment.d.ts.map +1 -0
  72. package/dist/interface/external/ehr/canvas/appointment.js +23 -0
  73. package/dist/interface/external/ehr/canvas/appointment.js.map +1 -0
  74. package/dist/interface/external/ehr/canvas/index.d.ts +3 -0
  75. package/dist/interface/external/ehr/canvas/index.d.ts.map +1 -0
  76. package/dist/interface/external/ehr/canvas/index.js +19 -0
  77. package/dist/interface/external/ehr/canvas/index.js.map +1 -0
  78. package/dist/interface/external/ehr/canvas/jwt-token.d.ts +58 -0
  79. package/dist/interface/external/ehr/canvas/jwt-token.d.ts.map +1 -0
  80. package/dist/interface/external/ehr/canvas/jwt-token.js +31 -0
  81. package/dist/interface/external/ehr/canvas/jwt-token.js.map +1 -0
  82. package/dist/interface/external/ehr/elation/appointment.d.ts +68 -0
  83. package/dist/interface/external/ehr/elation/appointment.d.ts.map +1 -0
  84. package/dist/interface/external/ehr/elation/appointment.js +15 -0
  85. package/dist/interface/external/ehr/elation/appointment.js.map +1 -0
  86. package/dist/interface/external/ehr/elation/index.d.ts +5 -0
  87. package/dist/interface/external/ehr/elation/index.d.ts.map +1 -0
  88. package/dist/interface/external/ehr/elation/index.js +21 -0
  89. package/dist/interface/external/ehr/elation/index.js.map +1 -0
  90. package/dist/interface/external/ehr/elation/jwt-token.d.ts +61 -0
  91. package/dist/interface/external/ehr/elation/jwt-token.d.ts.map +1 -0
  92. package/dist/interface/external/ehr/elation/jwt-token.js +32 -0
  93. package/dist/interface/external/ehr/elation/jwt-token.js.map +1 -0
  94. package/dist/interface/external/ehr/elation/patient.d.ts +96 -0
  95. package/dist/interface/external/ehr/elation/patient.d.ts.map +1 -0
  96. package/dist/interface/external/ehr/elation/patient.js +33 -0
  97. package/dist/interface/external/ehr/elation/patient.js.map +1 -0
  98. package/dist/interface/external/ehr/elation/problem.d.ts +10 -0
  99. package/dist/interface/external/ehr/elation/problem.d.ts.map +1 -0
  100. package/dist/interface/external/ehr/elation/problem.js +8 -0
  101. package/dist/interface/external/ehr/elation/problem.js.map +1 -0
  102. package/dist/interface/external/ehr/index.d.ts +3 -0
  103. package/dist/interface/external/ehr/index.d.ts.map +1 -0
  104. package/dist/interface/external/ehr/index.js +19 -0
  105. package/dist/interface/external/ehr/index.js.map +1 -0
  106. package/dist/interface/external/ehr/patient.d.ts +250 -0
  107. package/dist/interface/external/ehr/patient.d.ts.map +1 -0
  108. package/dist/interface/external/ehr/patient.js +35 -0
  109. package/dist/interface/external/ehr/patient.js.map +1 -0
  110. package/dist/interface/external/ehr/source.d.ts +13 -0
  111. package/dist/interface/external/ehr/source.d.ts.map +1 -0
  112. package/dist/interface/external/ehr/source.js +25 -0
  113. package/dist/interface/external/ehr/source.js.map +1 -0
  114. package/dist/interface/external/elation/patient.d.ts +10 -10
  115. package/dist/interface/external/elation/subscription.d.ts +1 -1
  116. package/dist/interface/external/index.d.ts +2 -0
  117. package/dist/interface/external/index.d.ts.map +1 -0
  118. package/dist/interface/external/index.js +18 -0
  119. package/dist/interface/external/index.js.map +1 -0
  120. package/dist/interface/external/shared/ehr/patient.d.ts +32 -32
  121. package/dist/interface/index.d.ts +1 -0
  122. package/dist/interface/index.d.ts.map +1 -1
  123. package/dist/interface/index.js +1 -0
  124. package/dist/interface/index.js.map +1 -1
  125. package/package.json +2 -2
@@ -0,0 +1,250 @@
1
+ import { z } from "zod";
2
+ export declare const patientSchema: z.ZodObject<{
3
+ gender: z.ZodString;
4
+ name: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
+ family: z.ZodOptional<z.ZodString>;
6
+ given: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ family?: string | undefined;
9
+ given?: string[] | undefined;
10
+ }, {
11
+ family?: string | undefined;
12
+ given?: string[] | undefined;
13
+ }>, "many">>;
14
+ address: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ state: z.ZodOptional<z.ZodString>;
16
+ line: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
+ city: z.ZodOptional<z.ZodString>;
18
+ postalCode: z.ZodOptional<z.ZodString>;
19
+ country: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ state?: string | undefined;
22
+ country?: string | undefined;
23
+ city?: string | undefined;
24
+ line?: string[] | undefined;
25
+ postalCode?: string | undefined;
26
+ }, {
27
+ state?: string | undefined;
28
+ country?: string | undefined;
29
+ city?: string | undefined;
30
+ line?: string[] | undefined;
31
+ postalCode?: string | undefined;
32
+ }>, "many">>;
33
+ birthDate: z.ZodString;
34
+ telecom: z.ZodOptional<z.ZodArray<z.ZodObject<{
35
+ value: z.ZodOptional<z.ZodString>;
36
+ system: z.ZodOptional<z.ZodEnum<["phone", "email"]>>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ value?: string | undefined;
39
+ system?: "phone" | "email" | undefined;
40
+ }, {
41
+ value?: string | undefined;
42
+ system?: "phone" | "email" | undefined;
43
+ }>, "many">>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ gender: string;
46
+ birthDate: string;
47
+ name?: {
48
+ family?: string | undefined;
49
+ given?: string[] | undefined;
50
+ }[] | undefined;
51
+ address?: {
52
+ state?: string | undefined;
53
+ country?: string | undefined;
54
+ city?: string | undefined;
55
+ line?: string[] | undefined;
56
+ postalCode?: string | undefined;
57
+ }[] | undefined;
58
+ telecom?: {
59
+ value?: string | undefined;
60
+ system?: "phone" | "email" | undefined;
61
+ }[] | undefined;
62
+ }, {
63
+ gender: string;
64
+ birthDate: string;
65
+ name?: {
66
+ family?: string | undefined;
67
+ given?: string[] | undefined;
68
+ }[] | undefined;
69
+ address?: {
70
+ state?: string | undefined;
71
+ country?: string | undefined;
72
+ city?: string | undefined;
73
+ line?: string[] | undefined;
74
+ postalCode?: string | undefined;
75
+ }[] | undefined;
76
+ telecom?: {
77
+ value?: string | undefined;
78
+ system?: "phone" | "email" | undefined;
79
+ }[] | undefined;
80
+ }>;
81
+ export type Patient = z.infer<typeof patientSchema>;
82
+ export declare const patientSearchSchema: z.ZodObject<{
83
+ entry: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ resource: z.ZodObject<{
85
+ gender: z.ZodString;
86
+ name: z.ZodOptional<z.ZodArray<z.ZodObject<{
87
+ family: z.ZodOptional<z.ZodString>;
88
+ given: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ family?: string | undefined;
91
+ given?: string[] | undefined;
92
+ }, {
93
+ family?: string | undefined;
94
+ given?: string[] | undefined;
95
+ }>, "many">>;
96
+ address: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
+ state: z.ZodOptional<z.ZodString>;
98
+ line: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
99
+ city: z.ZodOptional<z.ZodString>;
100
+ postalCode: z.ZodOptional<z.ZodString>;
101
+ country: z.ZodOptional<z.ZodString>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ state?: string | undefined;
104
+ country?: string | undefined;
105
+ city?: string | undefined;
106
+ line?: string[] | undefined;
107
+ postalCode?: string | undefined;
108
+ }, {
109
+ state?: string | undefined;
110
+ country?: string | undefined;
111
+ city?: string | undefined;
112
+ line?: string[] | undefined;
113
+ postalCode?: string | undefined;
114
+ }>, "many">>;
115
+ birthDate: z.ZodString;
116
+ telecom: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ value: z.ZodOptional<z.ZodString>;
118
+ system: z.ZodOptional<z.ZodEnum<["phone", "email"]>>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ value?: string | undefined;
121
+ system?: "phone" | "email" | undefined;
122
+ }, {
123
+ value?: string | undefined;
124
+ system?: "phone" | "email" | undefined;
125
+ }>, "many">>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ gender: string;
128
+ birthDate: string;
129
+ name?: {
130
+ family?: string | undefined;
131
+ given?: string[] | undefined;
132
+ }[] | undefined;
133
+ address?: {
134
+ state?: string | undefined;
135
+ country?: string | undefined;
136
+ city?: string | undefined;
137
+ line?: string[] | undefined;
138
+ postalCode?: string | undefined;
139
+ }[] | undefined;
140
+ telecom?: {
141
+ value?: string | undefined;
142
+ system?: "phone" | "email" | undefined;
143
+ }[] | undefined;
144
+ }, {
145
+ gender: string;
146
+ birthDate: string;
147
+ name?: {
148
+ family?: string | undefined;
149
+ given?: string[] | undefined;
150
+ }[] | undefined;
151
+ address?: {
152
+ state?: string | undefined;
153
+ country?: string | undefined;
154
+ city?: string | undefined;
155
+ line?: string[] | undefined;
156
+ postalCode?: string | undefined;
157
+ }[] | undefined;
158
+ telecom?: {
159
+ value?: string | undefined;
160
+ system?: "phone" | "email" | undefined;
161
+ }[] | undefined;
162
+ }>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ resource: {
165
+ gender: string;
166
+ birthDate: string;
167
+ name?: {
168
+ family?: string | undefined;
169
+ given?: string[] | undefined;
170
+ }[] | undefined;
171
+ address?: {
172
+ state?: string | undefined;
173
+ country?: string | undefined;
174
+ city?: string | undefined;
175
+ line?: string[] | undefined;
176
+ postalCode?: string | undefined;
177
+ }[] | undefined;
178
+ telecom?: {
179
+ value?: string | undefined;
180
+ system?: "phone" | "email" | undefined;
181
+ }[] | undefined;
182
+ };
183
+ }, {
184
+ resource: {
185
+ gender: string;
186
+ birthDate: string;
187
+ name?: {
188
+ family?: string | undefined;
189
+ given?: string[] | undefined;
190
+ }[] | undefined;
191
+ address?: {
192
+ state?: string | undefined;
193
+ country?: string | undefined;
194
+ city?: string | undefined;
195
+ line?: string[] | undefined;
196
+ postalCode?: string | undefined;
197
+ }[] | undefined;
198
+ telecom?: {
199
+ value?: string | undefined;
200
+ system?: "phone" | "email" | undefined;
201
+ }[] | undefined;
202
+ };
203
+ }>, "many">>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ entry?: {
206
+ resource: {
207
+ gender: string;
208
+ birthDate: string;
209
+ name?: {
210
+ family?: string | undefined;
211
+ given?: string[] | undefined;
212
+ }[] | undefined;
213
+ address?: {
214
+ state?: string | undefined;
215
+ country?: string | undefined;
216
+ city?: string | undefined;
217
+ line?: string[] | undefined;
218
+ postalCode?: string | undefined;
219
+ }[] | undefined;
220
+ telecom?: {
221
+ value?: string | undefined;
222
+ system?: "phone" | "email" | undefined;
223
+ }[] | undefined;
224
+ };
225
+ }[] | undefined;
226
+ }, {
227
+ entry?: {
228
+ resource: {
229
+ gender: string;
230
+ birthDate: string;
231
+ name?: {
232
+ family?: string | undefined;
233
+ given?: string[] | undefined;
234
+ }[] | undefined;
235
+ address?: {
236
+ state?: string | undefined;
237
+ country?: string | undefined;
238
+ city?: string | undefined;
239
+ line?: string[] | undefined;
240
+ postalCode?: string | undefined;
241
+ }[] | undefined;
242
+ telecom?: {
243
+ value?: string | undefined;
244
+ system?: "phone" | "email" | undefined;
245
+ }[] | undefined;
246
+ };
247
+ }[] | undefined;
248
+ }>;
249
+ export type PatientSearch = z.infer<typeof patientSearchSchema>;
250
+ //# sourceMappingURL=patient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/ehr/patient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.patientSearchSchema = exports.patientSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const address = zod_1.z.object({
6
+ state: zod_1.z.string().optional(),
7
+ line: zod_1.z.string().array().optional(),
8
+ city: zod_1.z.string().optional(),
9
+ postalCode: zod_1.z.string().optional(),
10
+ country: zod_1.z.string().optional(),
11
+ });
12
+ const telecome = zod_1.z.object({
13
+ value: zod_1.z.string().optional(),
14
+ system: zod_1.z.enum(["phone", "email"]).optional(),
15
+ });
16
+ const name = zod_1.z.object({
17
+ family: zod_1.z.string().optional(),
18
+ given: zod_1.z.string().array().optional(),
19
+ });
20
+ exports.patientSchema = zod_1.z.object({
21
+ gender: zod_1.z.string(),
22
+ name: name.array().optional(),
23
+ address: address.array().optional(),
24
+ birthDate: zod_1.z.string(),
25
+ telecom: telecome.array().optional(),
26
+ });
27
+ exports.patientSearchSchema = zod_1.z.object({
28
+ entry: zod_1.z
29
+ .object({
30
+ resource: exports.patientSchema,
31
+ })
32
+ .array()
33
+ .optional(),
34
+ });
35
+ //# sourceMappingURL=patient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient.js","sourceRoot":"","sources":["../../../../src/interface/external/ehr/patient.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,OAAO,GAAG,OAAC,CAAC,MAAM,CAAC;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IACxB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG,OAAC,CAAC,MAAM,CAAC;IACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC;SACL,MAAM,CAAC;QACN,QAAQ,EAAE,qBAAa;KACxB,CAAC;SACD,KAAK,EAAE;SACP,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare enum EhrSources {
2
+ athena = "athenahealth",
3
+ elation = "elation",
4
+ canvas = "canvas"
5
+ }
6
+ export declare const ehrSources: readonly EhrSources[];
7
+ export type EhrSource = (typeof ehrSources)[number];
8
+ export declare function isEhrSource(source: string): source is EhrSource;
9
+ export declare const clientSourceSuffix = "-client";
10
+ export declare const webhookSourceSuffix = "-webhook";
11
+ export declare function removeClientSource(source: string): EhrSource;
12
+ export declare function removeWebhookSource(source: string): EhrSource;
13
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/ehr/source.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,iBAAiB;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AACD,eAAO,MAAM,UAAU,uBAA0C,CAAC;AAClE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AACpD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,SAAS,CAE/D;AAED,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAE5D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAE7D"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeWebhookSource = exports.removeClientSource = exports.webhookSourceSuffix = exports.clientSourceSuffix = exports.isEhrSource = exports.ehrSources = exports.EhrSources = void 0;
4
+ var EhrSources;
5
+ (function (EhrSources) {
6
+ EhrSources["athena"] = "athenahealth";
7
+ EhrSources["elation"] = "elation";
8
+ EhrSources["canvas"] = "canvas";
9
+ })(EhrSources = exports.EhrSources || (exports.EhrSources = {}));
10
+ exports.ehrSources = [...Object.values(EhrSources)];
11
+ function isEhrSource(source) {
12
+ return exports.ehrSources.includes(source);
13
+ }
14
+ exports.isEhrSource = isEhrSource;
15
+ exports.clientSourceSuffix = "-client";
16
+ exports.webhookSourceSuffix = "-webhook";
17
+ function removeClientSource(source) {
18
+ return source.replace(exports.clientSourceSuffix, "");
19
+ }
20
+ exports.removeClientSource = removeClientSource;
21
+ function removeWebhookSource(source) {
22
+ return source.replace(exports.webhookSourceSuffix, "");
23
+ }
24
+ exports.removeWebhookSource = removeWebhookSource;
25
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../src/interface/external/ehr/source.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;AACnB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AACY,QAAA,UAAU,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAU,CAAC;AAElE,SAAgB,WAAW,CAAC,MAAc;IACxC,OAAO,kBAAU,CAAC,QAAQ,CAAC,MAAmB,CAAC,CAAC;AAClD,CAAC;AAFD,kCAEC;AAEY,QAAA,kBAAkB,GAAG,SAAS,CAAC;AAC/B,QAAA,mBAAmB,GAAG,UAAU,CAAC;AAE9C,SAAgB,kBAAkB,CAAC,MAAc;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,0BAAkB,EAAE,EAAE,CAAc,CAAC;AAC7D,CAAC;AAFD,gDAEC;AAED,SAAgB,mBAAmB,CAAC,MAAc;IAChD,OAAO,MAAM,CAAC,OAAO,CAAC,2BAAmB,EAAE,EAAE,CAAc,CAAC;AAC9D,CAAC;AAFD,kDAEC"}
@@ -12,16 +12,16 @@ export declare const patientSchema: z.ZodObject<{
12
12
  zip: z.ZodNullable<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  state: string | null;
15
- zip: string | null;
16
- city: string | null;
17
15
  address_line1: string | null;
18
16
  address_line2: string | null;
17
+ city: string | null;
18
+ zip: string | null;
19
19
  }, {
20
20
  state: string | null;
21
- zip: string | null;
22
- city: string | null;
23
21
  address_line1: string | null;
24
22
  address_line2: string | null;
23
+ city: string | null;
24
+ zip: string | null;
25
25
  }>>;
26
26
  dob: z.ZodString;
27
27
  phones: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -40,7 +40,6 @@ export declare const patientSchema: z.ZodObject<{
40
40
  }>, "many">>;
41
41
  ssn: z.ZodNullable<z.ZodString>;
42
42
  }, "strip", z.ZodTypeAny, {
43
- dob: string;
44
43
  ssn: string | null;
45
44
  first_name: string | null;
46
45
  last_name: string | null;
@@ -48,11 +47,12 @@ export declare const patientSchema: z.ZodObject<{
48
47
  sex: string;
49
48
  address: {
50
49
  state: string | null;
51
- zip: string | null;
52
- city: string | null;
53
50
  address_line1: string | null;
54
51
  address_line2: string | null;
52
+ city: string | null;
53
+ zip: string | null;
55
54
  } | null;
55
+ dob: string;
56
56
  phones: {
57
57
  phone: string;
58
58
  }[] | null;
@@ -60,7 +60,6 @@ export declare const patientSchema: z.ZodObject<{
60
60
  email: string;
61
61
  }[] | null;
62
62
  }, {
63
- dob: string;
64
63
  ssn: string | null;
65
64
  first_name: string | null;
66
65
  last_name: string | null;
@@ -68,11 +67,12 @@ export declare const patientSchema: z.ZodObject<{
68
67
  sex: string;
69
68
  address: {
70
69
  state: string | null;
71
- zip: string | null;
72
- city: string | null;
73
70
  address_line1: string | null;
74
71
  address_line2: string | null;
72
+ city: string | null;
73
+ zip: string | null;
75
74
  } | null;
75
+ dob: string;
76
76
  phones: {
77
77
  phone: string;
78
78
  }[] | null;
@@ -1,2 +1,2 @@
1
1
  export type Resource = "appointments";
2
- //# sourceMappingURL=subscription.d.ts.map
2
+ //# sourceMappingURL=subscription.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from "./ehr";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/external/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ehr"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/external/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB"}
@@ -44,10 +44,6 @@ export declare const patientSchema: z.ZodObject<{
44
44
  }, "strip", z.ZodTypeAny, {
45
45
  gender: string;
46
46
  birthDate: string;
47
- name?: {
48
- family?: string | undefined;
49
- given?: string[] | undefined;
50
- }[] | undefined;
51
47
  address?: {
52
48
  state?: string | undefined;
53
49
  city?: string | undefined;
@@ -55,6 +51,10 @@ export declare const patientSchema: z.ZodObject<{
55
51
  postalCode?: string | undefined;
56
52
  country?: string | undefined;
57
53
  }[] | undefined;
54
+ name?: {
55
+ family?: string | undefined;
56
+ given?: string[] | undefined;
57
+ }[] | undefined;
58
58
  telecom?: {
59
59
  value?: string | undefined;
60
60
  system?: "phone" | "email" | undefined;
@@ -62,10 +62,6 @@ export declare const patientSchema: z.ZodObject<{
62
62
  }, {
63
63
  gender: string;
64
64
  birthDate: string;
65
- name?: {
66
- family?: string | undefined;
67
- given?: string[] | undefined;
68
- }[] | undefined;
69
65
  address?: {
70
66
  state?: string | undefined;
71
67
  city?: string | undefined;
@@ -73,6 +69,10 @@ export declare const patientSchema: z.ZodObject<{
73
69
  postalCode?: string | undefined;
74
70
  country?: string | undefined;
75
71
  }[] | undefined;
72
+ name?: {
73
+ family?: string | undefined;
74
+ given?: string[] | undefined;
75
+ }[] | undefined;
76
76
  telecom?: {
77
77
  value?: string | undefined;
78
78
  system?: "phone" | "email" | undefined;
@@ -126,10 +126,6 @@ export declare const patientSearchSchema: z.ZodObject<{
126
126
  }, "strip", z.ZodTypeAny, {
127
127
  gender: string;
128
128
  birthDate: string;
129
- name?: {
130
- family?: string | undefined;
131
- given?: string[] | undefined;
132
- }[] | undefined;
133
129
  address?: {
134
130
  state?: string | undefined;
135
131
  city?: string | undefined;
@@ -137,6 +133,10 @@ export declare const patientSearchSchema: z.ZodObject<{
137
133
  postalCode?: string | undefined;
138
134
  country?: string | undefined;
139
135
  }[] | undefined;
136
+ name?: {
137
+ family?: string | undefined;
138
+ given?: string[] | undefined;
139
+ }[] | undefined;
140
140
  telecom?: {
141
141
  value?: string | undefined;
142
142
  system?: "phone" | "email" | undefined;
@@ -144,10 +144,6 @@ export declare const patientSearchSchema: z.ZodObject<{
144
144
  }, {
145
145
  gender: string;
146
146
  birthDate: string;
147
- name?: {
148
- family?: string | undefined;
149
- given?: string[] | undefined;
150
- }[] | undefined;
151
147
  address?: {
152
148
  state?: string | undefined;
153
149
  city?: string | undefined;
@@ -155,6 +151,10 @@ export declare const patientSearchSchema: z.ZodObject<{
155
151
  postalCode?: string | undefined;
156
152
  country?: string | undefined;
157
153
  }[] | undefined;
154
+ name?: {
155
+ family?: string | undefined;
156
+ given?: string[] | undefined;
157
+ }[] | undefined;
158
158
  telecom?: {
159
159
  value?: string | undefined;
160
160
  system?: "phone" | "email" | undefined;
@@ -164,10 +164,6 @@ export declare const patientSearchSchema: z.ZodObject<{
164
164
  resource: {
165
165
  gender: string;
166
166
  birthDate: string;
167
- name?: {
168
- family?: string | undefined;
169
- given?: string[] | undefined;
170
- }[] | undefined;
171
167
  address?: {
172
168
  state?: string | undefined;
173
169
  city?: string | undefined;
@@ -175,6 +171,10 @@ export declare const patientSearchSchema: z.ZodObject<{
175
171
  postalCode?: string | undefined;
176
172
  country?: string | undefined;
177
173
  }[] | undefined;
174
+ name?: {
175
+ family?: string | undefined;
176
+ given?: string[] | undefined;
177
+ }[] | undefined;
178
178
  telecom?: {
179
179
  value?: string | undefined;
180
180
  system?: "phone" | "email" | undefined;
@@ -184,10 +184,6 @@ export declare const patientSearchSchema: z.ZodObject<{
184
184
  resource: {
185
185
  gender: string;
186
186
  birthDate: string;
187
- name?: {
188
- family?: string | undefined;
189
- given?: string[] | undefined;
190
- }[] | undefined;
191
187
  address?: {
192
188
  state?: string | undefined;
193
189
  city?: string | undefined;
@@ -195,6 +191,10 @@ export declare const patientSearchSchema: z.ZodObject<{
195
191
  postalCode?: string | undefined;
196
192
  country?: string | undefined;
197
193
  }[] | undefined;
194
+ name?: {
195
+ family?: string | undefined;
196
+ given?: string[] | undefined;
197
+ }[] | undefined;
198
198
  telecom?: {
199
199
  value?: string | undefined;
200
200
  system?: "phone" | "email" | undefined;
@@ -206,10 +206,6 @@ export declare const patientSearchSchema: z.ZodObject<{
206
206
  resource: {
207
207
  gender: string;
208
208
  birthDate: string;
209
- name?: {
210
- family?: string | undefined;
211
- given?: string[] | undefined;
212
- }[] | undefined;
213
209
  address?: {
214
210
  state?: string | undefined;
215
211
  city?: string | undefined;
@@ -217,6 +213,10 @@ export declare const patientSearchSchema: z.ZodObject<{
217
213
  postalCode?: string | undefined;
218
214
  country?: string | undefined;
219
215
  }[] | undefined;
216
+ name?: {
217
+ family?: string | undefined;
218
+ given?: string[] | undefined;
219
+ }[] | undefined;
220
220
  telecom?: {
221
221
  value?: string | undefined;
222
222
  system?: "phone" | "email" | undefined;
@@ -228,10 +228,6 @@ export declare const patientSearchSchema: z.ZodObject<{
228
228
  resource: {
229
229
  gender: string;
230
230
  birthDate: string;
231
- name?: {
232
- family?: string | undefined;
233
- given?: string[] | undefined;
234
- }[] | undefined;
235
231
  address?: {
236
232
  state?: string | undefined;
237
233
  city?: string | undefined;
@@ -239,6 +235,10 @@ export declare const patientSearchSchema: z.ZodObject<{
239
235
  postalCode?: string | undefined;
240
236
  country?: string | undefined;
241
237
  }[] | undefined;
238
+ name?: {
239
+ family?: string | undefined;
240
+ given?: string[] | undefined;
241
+ }[] | undefined;
242
242
  telecom?: {
243
243
  value?: string | undefined;
244
244
  system?: "phone" | "email" | undefined;
@@ -1,3 +1,4 @@
1
1
  export * from "./internal";
2
2
  export * from "./schema";
3
+ export * from "./external";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./internal"), exports);
18
18
  __exportStar(require("./schema"), exports);
19
+ __exportStar(require("./external"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/shared",
3
- "version": "0.20.0",
3
+ "version": "0.20.2-alpha.0",
4
4
  "description": "Common code shared across packages - by Metriport Inc.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -101,5 +101,5 @@
101
101
  "ts-jest": "29.1.1",
102
102
  "typescript": "^4.9.5"
103
103
  },
104
- "gitHead": "9028181266415b73b714ec93785db7b09dd73b91"
104
+ "gitHead": "77a9702ccacbef171d1f13a872c5bc1e647a3e8d"
105
105
  }