@metriport/shared 0.23.1-alpha.0 → 0.23.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/shared",
|
|
3
|
-
"version": "0.23.1
|
|
3
|
+
"version": "0.23.1",
|
|
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/",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"ts-jest": "29.1.1",
|
|
110
110
|
"typescript": "^4.9.5"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "6ae7824a29cf537fa42505984cde5f42a9a5d6c2"
|
|
113
113
|
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const patientImportPatientSchema: z.ZodObject<{
|
|
3
|
-
dob: z.ZodEffects<z.ZodString, string, string>;
|
|
4
|
-
gender: z.ZodEffects<z.ZodString, string, string>;
|
|
5
|
-
firstname: z.ZodString;
|
|
6
|
-
lastname: z.ZodString;
|
|
7
|
-
zip: z.ZodEffects<z.ZodString, string, string>;
|
|
8
|
-
city: z.ZodString;
|
|
9
|
-
state: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
-
addressline1: z.ZodString;
|
|
11
|
-
addressline2: z.ZodOptional<z.ZodString>;
|
|
12
|
-
phone1: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
13
|
-
phone2: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
14
|
-
email1: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
15
|
-
email2: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
16
|
-
externalid: z.ZodOptional<z.ZodString>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
dob: string;
|
|
19
|
-
gender: string;
|
|
20
|
-
firstname: string;
|
|
21
|
-
lastname: string;
|
|
22
|
-
zip: string;
|
|
23
|
-
city: string;
|
|
24
|
-
state: string;
|
|
25
|
-
addressline1: string;
|
|
26
|
-
addressline2?: string | undefined;
|
|
27
|
-
phone1?: string | undefined;
|
|
28
|
-
phone2?: string | undefined;
|
|
29
|
-
email1?: string | undefined;
|
|
30
|
-
email2?: string | undefined;
|
|
31
|
-
externalid?: string | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
dob: string;
|
|
34
|
-
gender: string;
|
|
35
|
-
firstname: string;
|
|
36
|
-
lastname: string;
|
|
37
|
-
zip: string;
|
|
38
|
-
city: string;
|
|
39
|
-
state: string;
|
|
40
|
-
addressline1: string;
|
|
41
|
-
addressline2?: string | undefined;
|
|
42
|
-
phone1?: string | undefined;
|
|
43
|
-
phone2?: string | undefined;
|
|
44
|
-
email1?: string | undefined;
|
|
45
|
-
email2?: string | undefined;
|
|
46
|
-
externalid?: string | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
export type PatientImportPatient = z.infer<typeof patientImportPatientSchema>;
|
|
49
|
-
export declare const patientImportSchema: z.ZodObject<{
|
|
50
|
-
patients: z.ZodArray<z.ZodObject<{
|
|
51
|
-
dob: z.ZodEffects<z.ZodString, string, string>;
|
|
52
|
-
gender: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
-
firstname: z.ZodString;
|
|
54
|
-
lastname: z.ZodString;
|
|
55
|
-
zip: z.ZodEffects<z.ZodString, string, string>;
|
|
56
|
-
city: z.ZodString;
|
|
57
|
-
state: z.ZodEffects<z.ZodString, string, string>;
|
|
58
|
-
addressline1: z.ZodString;
|
|
59
|
-
addressline2: z.ZodOptional<z.ZodString>;
|
|
60
|
-
phone1: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
61
|
-
phone2: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
62
|
-
email1: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
63
|
-
email2: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
64
|
-
externalid: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
dob: string;
|
|
67
|
-
gender: string;
|
|
68
|
-
firstname: string;
|
|
69
|
-
lastname: string;
|
|
70
|
-
zip: string;
|
|
71
|
-
city: string;
|
|
72
|
-
state: string;
|
|
73
|
-
addressline1: string;
|
|
74
|
-
addressline2?: string | undefined;
|
|
75
|
-
phone1?: string | undefined;
|
|
76
|
-
phone2?: string | undefined;
|
|
77
|
-
email1?: string | undefined;
|
|
78
|
-
email2?: string | undefined;
|
|
79
|
-
externalid?: string | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
dob: string;
|
|
82
|
-
gender: string;
|
|
83
|
-
firstname: string;
|
|
84
|
-
lastname: string;
|
|
85
|
-
zip: string;
|
|
86
|
-
city: string;
|
|
87
|
-
state: string;
|
|
88
|
-
addressline1: string;
|
|
89
|
-
addressline2?: string | undefined;
|
|
90
|
-
phone1?: string | undefined;
|
|
91
|
-
phone2?: string | undefined;
|
|
92
|
-
email1?: string | undefined;
|
|
93
|
-
email2?: string | undefined;
|
|
94
|
-
externalid?: string | undefined;
|
|
95
|
-
}>, "many">;
|
|
96
|
-
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
patients: {
|
|
98
|
-
dob: string;
|
|
99
|
-
gender: string;
|
|
100
|
-
firstname: string;
|
|
101
|
-
lastname: string;
|
|
102
|
-
zip: string;
|
|
103
|
-
city: string;
|
|
104
|
-
state: string;
|
|
105
|
-
addressline1: string;
|
|
106
|
-
addressline2?: string | undefined;
|
|
107
|
-
phone1?: string | undefined;
|
|
108
|
-
phone2?: string | undefined;
|
|
109
|
-
email1?: string | undefined;
|
|
110
|
-
email2?: string | undefined;
|
|
111
|
-
externalid?: string | undefined;
|
|
112
|
-
}[];
|
|
113
|
-
}, {
|
|
114
|
-
patients: {
|
|
115
|
-
dob: string;
|
|
116
|
-
gender: string;
|
|
117
|
-
firstname: string;
|
|
118
|
-
lastname: string;
|
|
119
|
-
zip: string;
|
|
120
|
-
city: string;
|
|
121
|
-
state: string;
|
|
122
|
-
addressline1: string;
|
|
123
|
-
addressline2?: string | undefined;
|
|
124
|
-
phone1?: string | undefined;
|
|
125
|
-
phone2?: string | undefined;
|
|
126
|
-
email1?: string | undefined;
|
|
127
|
-
email2?: string | undefined;
|
|
128
|
-
externalid?: string | undefined;
|
|
129
|
-
}[];
|
|
130
|
-
}>;
|
|
131
|
-
//# sourceMappingURL=patient-import.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patient-import.d.ts","sourceRoot":"","sources":["../../../src/domain/patient/patient-import.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patientImportSchema = exports.patientImportPatientSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const address_1 = require("../address");
|
|
6
|
-
const zip_1 = require("../address/zip");
|
|
7
|
-
const email_1 = require("../contact/email");
|
|
8
|
-
const phone_1 = require("../contact/phone");
|
|
9
|
-
const dob_1 = require("../dob");
|
|
10
|
-
const gender_1 = require("../gender");
|
|
11
|
-
exports.patientImportPatientSchema = zod_1.z.object({
|
|
12
|
-
dob: zod_1.z.string().refine(dob_1.normalizeDobSafe, { message: "Invalid dob" }),
|
|
13
|
-
gender: zod_1.z.string().refine(gender_1.normalizeGenderSafe, { message: "Invalid gender" }),
|
|
14
|
-
firstname: zod_1.z.string().min(1, { message: "First name must be defined" }),
|
|
15
|
-
lastname: zod_1.z.string().min(1, { message: "Last name must be defined" }),
|
|
16
|
-
zip: zod_1.z.string().refine(zip_1.normalizeZipCodeNewSafe, { message: "Invalid zip" }),
|
|
17
|
-
city: zod_1.z.string().min(1, { message: "City must be defined" }),
|
|
18
|
-
state: zod_1.z
|
|
19
|
-
.string()
|
|
20
|
-
.refine(address_1.normalizeUSStateForAddressSafe, { message: "Invalid state or territory" }),
|
|
21
|
-
addressline1: zod_1.z.string().min(1, { message: "Address line must be defined" }),
|
|
22
|
-
addressline2: zod_1.z.string().optional(),
|
|
23
|
-
phone1: zod_1.z.string().refine(phone_1.isPhoneValid, { message: "Invalid phone" }).optional(),
|
|
24
|
-
phone2: zod_1.z.string().refine(phone_1.isPhoneValid, { message: "Invalid phone" }).optional(),
|
|
25
|
-
email1: zod_1.z.string().refine(email_1.isEmailValid, { message: "Invalid email" }).optional(),
|
|
26
|
-
email2: zod_1.z.string().refine(email_1.isEmailValid, { message: "Invalid email" }).optional(),
|
|
27
|
-
externalid: zod_1.z.string().optional(),
|
|
28
|
-
});
|
|
29
|
-
exports.patientImportSchema = zod_1.z.object({
|
|
30
|
-
patients: exports.patientImportPatientSchema.array(),
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=patient-import.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patient-import.js","sourceRoot":"","sources":["../../../src/domain/patient/patient-import.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA4D;AAC5D,wCAAyD;AACzD,4CAAgD;AAChD,4CAAgD;AAChD,gCAA0C;AAC1C,sCAAgD;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