@metriport/shared 0.23.7 → 0.23.8-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.
- package/dist/domain/jwt-token.d.ts +1 -0
- package/dist/domain/jwt-token.d.ts.map +1 -1
- package/dist/interface/external/ehr/fhir-resource.d.ts +69 -0
- package/dist/interface/external/ehr/fhir-resource.d.ts.map +1 -1
- package/dist/interface/external/ehr/fhir-resource.js +12 -1
- package/dist/interface/external/ehr/fhir-resource.js.map +1 -1
- package/package.json +2 -2
- package/dist/common/titleCase.d.ts +0 -2
- package/dist/common/titleCase.d.ts.map +0 -1
- package/dist/common/titleCase.js +0 -10
- package/dist/common/titleCase.js.map +0 -1
- package/dist/domain/address/__tests__/normalize-zip.test.d.ts +0 -2
- package/dist/domain/address/__tests__/normalize-zip.test.d.ts.map +0 -1
- package/dist/domain/address/__tests__/normalize-zip.test.js +0 -83
- package/dist/domain/address/__tests__/normalize-zip.test.js.map +0 -1
- package/dist/domain/patient/patient-import.d.ts +0 -131
- package/dist/domain/patient/patient-import.d.ts.map +0 -1
- package/dist/domain/patient/patient-import.js +0 -32
- package/dist/domain/patient/patient-import.js.map +0 -1
- package/dist/interface/external/athenahealth/appointment.d.ts +0 -63
- package/dist/interface/external/athenahealth/appointment.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/appointment.js +0 -18
- package/dist/interface/external/athenahealth/appointment.js.map +0 -1
- package/dist/interface/external/athenahealth/cx-mapping.d.ts +0 -10
- package/dist/interface/external/athenahealth/cx-mapping.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/cx-mapping.js +0 -8
- package/dist/interface/external/athenahealth/cx-mapping.js.map +0 -1
- package/dist/interface/external/athenahealth/department.d.ts +0 -28
- package/dist/interface/external/athenahealth/department.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/department.js +0 -11
- package/dist/interface/external/athenahealth/department.js.map +0 -1
- package/dist/interface/external/athenahealth/index.d.ts +0 -9
- package/dist/interface/external/athenahealth/index.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/index.js +0 -25
- package/dist/interface/external/athenahealth/index.js.map +0 -1
- package/dist/interface/external/athenahealth/jwt-token.d.ts +0 -34
- package/dist/interface/external/athenahealth/jwt-token.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/jwt-token.js +0 -18
- package/dist/interface/external/athenahealth/jwt-token.js.map +0 -1
- package/dist/interface/external/athenahealth/medication.d.ts +0 -50
- package/dist/interface/external/athenahealth/medication.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/medication.js +0 -19
- package/dist/interface/external/athenahealth/medication.js.map +0 -1
- package/dist/interface/external/athenahealth/patient.d.ts +0 -44
- package/dist/interface/external/athenahealth/patient.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/patient.js +0 -15
- package/dist/interface/external/athenahealth/patient.js.map +0 -1
- package/dist/interface/external/athenahealth/problem.d.ts +0 -27
- package/dist/interface/external/athenahealth/problem.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/problem.js +0 -14
- package/dist/interface/external/athenahealth/problem.js.map +0 -1
- package/dist/interface/external/athenahealth/subscription.d.ts +0 -20
- package/dist/interface/external/athenahealth/subscription.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/subscription.js +0 -11
- package/dist/interface/external/athenahealth/subscription.js.map +0 -1
- package/dist/interface/external/athenahealth/vitals.d.ts +0 -82
- package/dist/interface/external/athenahealth/vitals.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/vitals.js +0 -15
- package/dist/interface/external/athenahealth/vitals.js.map +0 -1
- package/dist/interface/external/canvas/appointment.d.ts +0 -68
- package/dist/interface/external/canvas/appointment.d.ts.map +0 -1
- package/dist/interface/external/canvas/appointment.js +0 -15
- package/dist/interface/external/canvas/appointment.js.map +0 -1
- package/dist/interface/external/canvas/index.d.ts +0 -3
- package/dist/interface/external/canvas/index.d.ts.map +0 -1
- package/dist/interface/external/canvas/index.js +0 -19
- package/dist/interface/external/canvas/index.js.map +0 -1
- package/dist/interface/external/canvas/jwt-token.d.ts +0 -31
- package/dist/interface/external/canvas/jwt-token.d.ts.map +0 -1
- package/dist/interface/external/canvas/jwt-token.js +0 -17
- package/dist/interface/external/canvas/jwt-token.js.map +0 -1
- package/dist/interface/external/ehr/resource-diff.d.ts +0 -7
- package/dist/interface/external/ehr/resource-diff.d.ts.map +0 -1
- package/dist/interface/external/ehr/resource-diff.js +0 -12
- package/dist/interface/external/ehr/resource-diff.js.map +0 -1
- package/dist/interface/external/elation/appointment.d.ts +0 -68
- package/dist/interface/external/elation/appointment.d.ts.map +0 -1
- package/dist/interface/external/elation/appointment.js +0 -15
- package/dist/interface/external/elation/appointment.js.map +0 -1
- package/dist/interface/external/elation/index.d.ts +0 -4
- package/dist/interface/external/elation/index.d.ts.map +0 -1
- package/dist/interface/external/elation/index.js +0 -20
- package/dist/interface/external/elation/index.js.map +0 -1
- package/dist/interface/external/elation/jwt-token.d.ts +0 -20
- package/dist/interface/external/elation/jwt-token.d.ts.map +0 -1
- package/dist/interface/external/elation/jwt-token.js +0 -13
- package/dist/interface/external/elation/jwt-token.js.map +0 -1
- package/dist/interface/external/elation/patient.d.ts +0 -96
- package/dist/interface/external/elation/patient.d.ts.map +0 -1
- package/dist/interface/external/elation/patient.js +0 -33
- package/dist/interface/external/elation/patient.js.map +0 -1
- package/dist/interface/external/elation/subscription.d.ts +0 -2
- package/dist/interface/external/elation/subscription.d.ts.map +0 -1
- package/dist/interface/external/elation/subscription.js +0 -3
- package/dist/interface/external/elation/subscription.js.map +0 -1
- package/dist/interface/external/shared/ehr/patient.d.ts +0 -250
- package/dist/interface/external/shared/ehr/patient.d.ts.map +0 -1
- package/dist/interface/external/shared/ehr/patient.js +0 -35
- package/dist/interface/external/shared/ehr/patient.js.map +0 -1
- package/dist/validators/driver-license/__tests__/index.test.d.ts +0 -2
- package/dist/validators/driver-license/__tests__/index.test.d.ts.map +0 -1
- package/dist/validators/driver-license/__tests__/index.test.js +0 -87
- package/dist/validators/driver-license/__tests__/index.test.js.map +0 -1
- package/dist/validators/driver-license/ca-dl.d.ts +0 -6
- package/dist/validators/driver-license/ca-dl.d.ts.map +0 -1
- package/dist/validators/driver-license/ca-dl.js +0 -87
- package/dist/validators/driver-license/ca-dl.js.map +0 -1
- package/dist/validators/driver-license/index.d.ts +0 -18
- package/dist/validators/driver-license/index.d.ts.map +0 -1
- package/dist/validators/driver-license/index.js +0 -86
- package/dist/validators/driver-license/index.js.map +0 -1
- package/dist/validators/driver-license/interfaces.d.ts +0 -33
- package/dist/validators/driver-license/interfaces.d.ts.map +0 -1
- package/dist/validators/driver-license/interfaces.js +0 -3
- package/dist/validators/driver-license/interfaces.js.map +0 -1
- package/dist/validators/driver-license/us-dl.d.ts +0 -6
- package/dist/validators/driver-license/us-dl.d.ts.map +0 -1
- package/dist/validators/driver-license/us-dl.js +0 -471
- package/dist/validators/driver-license/us-dl.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt-token.d.ts","sourceRoot":"","sources":["../../src/domain/jwt-token.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"jwt-token.d.ts","sourceRoot":"","sources":["../../src/domain/jwt-token.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,IAAI,CAAC;IACV,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -111,4 +111,73 @@ export type BundleWithLastModified = {
|
|
|
111
111
|
};
|
|
112
112
|
export declare function createBundleFromResourceList(resourceList: Resource[]): Bundle;
|
|
113
113
|
export declare function getDefaultBundle(): Bundle;
|
|
114
|
+
export declare const fhirOperationOutcomeIssueSchema: z.ZodObject<{
|
|
115
|
+
severity: z.ZodString;
|
|
116
|
+
code: z.ZodString;
|
|
117
|
+
details: z.ZodObject<{
|
|
118
|
+
text: z.ZodString;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
text: string;
|
|
121
|
+
}, {
|
|
122
|
+
text: string;
|
|
123
|
+
}>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
code: string;
|
|
126
|
+
severity: string;
|
|
127
|
+
details: {
|
|
128
|
+
text: string;
|
|
129
|
+
};
|
|
130
|
+
}, {
|
|
131
|
+
code: string;
|
|
132
|
+
severity: string;
|
|
133
|
+
details: {
|
|
134
|
+
text: string;
|
|
135
|
+
};
|
|
136
|
+
}>;
|
|
137
|
+
export type FhirOperationOutcomeIssue = z.infer<typeof fhirOperationOutcomeIssueSchema>;
|
|
138
|
+
export declare const fhirOperationOutcomeSchema: z.ZodObject<{
|
|
139
|
+
resourceType: z.ZodLiteral<"OperationOutcome">;
|
|
140
|
+
issue: z.ZodArray<z.ZodObject<{
|
|
141
|
+
severity: z.ZodString;
|
|
142
|
+
code: z.ZodString;
|
|
143
|
+
details: z.ZodObject<{
|
|
144
|
+
text: z.ZodString;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
text: string;
|
|
147
|
+
}, {
|
|
148
|
+
text: string;
|
|
149
|
+
}>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
code: string;
|
|
152
|
+
severity: string;
|
|
153
|
+
details: {
|
|
154
|
+
text: string;
|
|
155
|
+
};
|
|
156
|
+
}, {
|
|
157
|
+
code: string;
|
|
158
|
+
severity: string;
|
|
159
|
+
details: {
|
|
160
|
+
text: string;
|
|
161
|
+
};
|
|
162
|
+
}>, "many">;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
resourceType: "OperationOutcome";
|
|
165
|
+
issue: {
|
|
166
|
+
code: string;
|
|
167
|
+
severity: string;
|
|
168
|
+
details: {
|
|
169
|
+
text: string;
|
|
170
|
+
};
|
|
171
|
+
}[];
|
|
172
|
+
}, {
|
|
173
|
+
resourceType: "OperationOutcome";
|
|
174
|
+
issue: {
|
|
175
|
+
code: string;
|
|
176
|
+
severity: string;
|
|
177
|
+
details: {
|
|
178
|
+
text: string;
|
|
179
|
+
};
|
|
180
|
+
}[];
|
|
181
|
+
}>;
|
|
182
|
+
export type FhirOperationOutcome = z.infer<typeof fhirOperationOutcomeSchema>;
|
|
114
183
|
//# sourceMappingURL=fhir-resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fhir-resource.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/ehr/fhir-resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;;uCAMjC,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;gDAAgC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;EAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAItC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,IAAI,GAAG,SAAS,CAAC;CAChC,CAAC;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,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDefaultBundle = exports.createBundleFromResourceList = exports.ehrFhirResourceBundleSchema = exports.ehrFhirResourceWrapperSchema = exports.ehrFhirResourcesSchema = exports.ehrFhirResourceSchema = void 0;
|
|
3
|
+
exports.fhirOperationOutcomeSchema = exports.fhirOperationOutcomeIssueSchema = exports.getDefaultBundle = exports.createBundleFromResourceList = exports.ehrFhirResourceBundleSchema = exports.ehrFhirResourceWrapperSchema = exports.ehrFhirResourcesSchema = exports.ehrFhirResourceSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ehrFhirResourceSchema = zod_1.z.intersection(zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string(),
|
|
@@ -29,4 +29,15 @@ function getDefaultBundle() {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
exports.getDefaultBundle = getDefaultBundle;
|
|
32
|
+
exports.fhirOperationOutcomeIssueSchema = zod_1.z.object({
|
|
33
|
+
severity: zod_1.z.string(),
|
|
34
|
+
code: zod_1.z.string(),
|
|
35
|
+
details: zod_1.z.object({
|
|
36
|
+
text: zod_1.z.string(),
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
exports.fhirOperationOutcomeSchema = zod_1.z.object({
|
|
40
|
+
resourceType: zod_1.z.literal("OperationOutcome"),
|
|
41
|
+
issue: exports.fhirOperationOutcomeIssueSchema.array(),
|
|
42
|
+
});
|
|
32
43
|
//# sourceMapping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EAAE;KACV,CAAC;AACJ,CAAC;AALD,4CAKC;AAEY,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;KACjB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAC3C,KAAK,EAAE,uCAA+B,CAAC,KAAK,EAAE;CAC/C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/shared",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.8-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/",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"ts-jest": "29.1.1",
|
|
115
115
|
"typescript": "^4.9.5"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "89177f094ced156c84a1db7a1425428a39782129"
|
|
118
118
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"titleCase.d.ts","sourceRoot":"","sources":["../../src/common/titleCase.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C"}
|
package/dist/common/titleCase.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toTitleCase = void 0;
|
|
4
|
-
const lodash_1 = require("lodash");
|
|
5
|
-
function toTitleCase(str) {
|
|
6
|
-
const trimmedStr = str.trim();
|
|
7
|
-
return (0, lodash_1.startCase)(trimmedStr.toLowerCase());
|
|
8
|
-
}
|
|
9
|
-
exports.toTitleCase = toTitleCase;
|
|
10
|
-
//# sourceMappingURL=titleCase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"titleCase.js","sourceRoot":"","sources":["../../src/common/titleCase.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAEnC,SAAgB,WAAW,CAAC,GAAW;IACrC,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,OAAO,IAAA,kBAAS,EAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7C,CAAC;AAHD,kCAGC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-zip.test.d.ts","sourceRoot":"","sources":["../../../../src/domain/address/__tests__/normalize-zip.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const faker_1 = require("@faker-js/faker");
|
|
4
|
-
const zip_1 = require("../zip");
|
|
5
|
-
function getFiveDigitZip() {
|
|
6
|
-
return faker_1.faker.number.int({ min: 10000, max: 99999 }).toString();
|
|
7
|
-
}
|
|
8
|
-
describe("zip", () => {
|
|
9
|
-
describe("normalizeZipCodeNew", () => {
|
|
10
|
-
it("returns the result of the normalizeFn param", () => {
|
|
11
|
-
const expectedOutput = getFiveDigitZip();
|
|
12
|
-
const normalizeFn = jest.fn(() => expectedOutput);
|
|
13
|
-
expect((0, zip_1.normalizeZipCodeNew)("54321", normalizeFn)).toBe(expectedOutput);
|
|
14
|
-
});
|
|
15
|
-
it("should throw an error if zip is an empty string", () => {
|
|
16
|
-
const normalizeFn = jest.fn(() => undefined);
|
|
17
|
-
expect(() => (0, zip_1.normalizeZipCodeNew)("54321", normalizeFn)).toThrow();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
describe("safe normalizeZipCodeNewSafe", () => {
|
|
21
|
-
it("should return undefined when it gets empty string", () => {
|
|
22
|
-
const input = "";
|
|
23
|
-
const expectedOutput = undefined;
|
|
24
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
25
|
-
});
|
|
26
|
-
it("should return undefined when it gets space", () => {
|
|
27
|
-
const input = " ";
|
|
28
|
-
const expectedOutput = undefined;
|
|
29
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
30
|
-
});
|
|
31
|
-
it("should handle 5 digits", () => {
|
|
32
|
-
const input = getFiveDigitZip();
|
|
33
|
-
const expectedOutput = input;
|
|
34
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
35
|
-
});
|
|
36
|
-
it("should trim input prefix", () => {
|
|
37
|
-
const expectedOutput = getFiveDigitZip();
|
|
38
|
-
const input = " " + expectedOutput;
|
|
39
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
40
|
-
});
|
|
41
|
-
it("should trim input suffix", () => {
|
|
42
|
-
const expectedOutput = getFiveDigitZip();
|
|
43
|
-
const input = expectedOutput + " ";
|
|
44
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
45
|
-
});
|
|
46
|
-
it("should return undefined for zip codes that are too short", () => {
|
|
47
|
-
const input = "12";
|
|
48
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBeUndefined();
|
|
49
|
-
});
|
|
50
|
-
it("should handle short zip codes", () => {
|
|
51
|
-
const input = "123";
|
|
52
|
-
const expectedOutput = "00123";
|
|
53
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
54
|
-
});
|
|
55
|
-
it("should return padded first 4 characters when contains dash at position 4", () => {
|
|
56
|
-
const input = "1234-6677";
|
|
57
|
-
const expectedOutput = "01234";
|
|
58
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
59
|
-
});
|
|
60
|
-
it("should return first 5 characters when zip code length is 10", () => {
|
|
61
|
-
const input = "12345-6677";
|
|
62
|
-
const expectedOutput = "12345";
|
|
63
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
64
|
-
});
|
|
65
|
-
it("should return undefined if zip contains non-digit and non-dash characters (length 9)", () => {
|
|
66
|
-
const input = "12345-667a";
|
|
67
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBeUndefined();
|
|
68
|
-
});
|
|
69
|
-
it("should return undefined if zip contains non-digit and non-dash characters (length 5)", () => {
|
|
70
|
-
const input = "1234a";
|
|
71
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBeUndefined();
|
|
72
|
-
});
|
|
73
|
-
describe("examples from the wild", () => {
|
|
74
|
-
const tests = [{ input: "2468", expectedOutput: "02468" }];
|
|
75
|
-
for (const { input, expectedOutput } of tests) {
|
|
76
|
-
it(`should return ${expectedOutput} when input is ${input}`, () => {
|
|
77
|
-
expect((0, zip_1.normalizeZipCodeNewSafe)(input)).toBe(expectedOutput);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
//# sourceMappingURL=normalize-zip.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-zip.test.js","sourceRoot":"","sources":["../../../../src/domain/address/__tests__/normalize-zip.test.ts"],"names":[],"mappings":";;AAAA,2CAAwC;AACxC,gCAAsE;AAEtE,SAAS,eAAe;IACtB,OAAO,aAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE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AC,CAAC"}
|
|
@@ -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;AAEnC,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,sBAAgB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IACpE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,4BAAmB,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC7E,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACvE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACrE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE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
|
2
|
-
export declare const bookedAppointmentSchema: z.ZodObject<{
|
|
3
|
-
patientid: z.ZodString;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
patientid: string;
|
|
6
|
-
}, {
|
|
7
|
-
patientid: string;
|
|
8
|
-
}>;
|
|
9
|
-
export type BookedAppointment = z.infer<typeof bookedAppointmentSchema>;
|
|
10
|
-
export declare const bookedAppointmentsSchema: z.ZodObject<{
|
|
11
|
-
appointments: z.ZodArray<z.ZodObject<{
|
|
12
|
-
patientid: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
patientid: string;
|
|
15
|
-
}, {
|
|
16
|
-
patientid: string;
|
|
17
|
-
}>, "many">;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
appointments: {
|
|
20
|
-
patientid: string;
|
|
21
|
-
}[];
|
|
22
|
-
}, {
|
|
23
|
-
appointments: {
|
|
24
|
-
patientid: string;
|
|
25
|
-
}[];
|
|
26
|
-
}>;
|
|
27
|
-
export type BookedAppointments = z.infer<typeof bookedAppointmentsSchema>;
|
|
28
|
-
declare const appointmentEventSchema: z.ZodObject<{
|
|
29
|
-
patientid: z.ZodOptional<z.ZodString>;
|
|
30
|
-
appointmentstatus: z.ZodString;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
appointmentstatus: string;
|
|
33
|
-
patientid?: string | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
appointmentstatus: string;
|
|
36
|
-
patientid?: string | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
export type AppointmentEvent = z.infer<typeof appointmentEventSchema>;
|
|
39
|
-
export declare const appointmentEventsSchema: z.ZodObject<{
|
|
40
|
-
appointments: z.ZodArray<z.ZodObject<{
|
|
41
|
-
patientid: z.ZodOptional<z.ZodString>;
|
|
42
|
-
appointmentstatus: z.ZodString;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
appointmentstatus: string;
|
|
45
|
-
patientid?: string | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
appointmentstatus: string;
|
|
48
|
-
patientid?: string | undefined;
|
|
49
|
-
}>, "many">;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
appointments: {
|
|
52
|
-
appointmentstatus: string;
|
|
53
|
-
patientid?: string | undefined;
|
|
54
|
-
}[];
|
|
55
|
-
}, {
|
|
56
|
-
appointments: {
|
|
57
|
-
appointmentstatus: string;
|
|
58
|
-
patientid?: string | undefined;
|
|
59
|
-
}[];
|
|
60
|
-
}>;
|
|
61
|
-
export type AppointmentEvents = z.infer<typeof appointmentEventsSchema>;
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=appointment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/appointment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;EAEnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,QAAA,MAAM,sBAAsB;;;;;;;;;EAG1B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appointmentEventsSchema = exports.bookedAppointmentsSchema = exports.bookedAppointmentSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.bookedAppointmentSchema = zod_1.z.object({
|
|
6
|
-
patientid: zod_1.z.string(),
|
|
7
|
-
});
|
|
8
|
-
exports.bookedAppointmentsSchema = zod_1.z.object({
|
|
9
|
-
appointments: exports.bookedAppointmentSchema.array(),
|
|
10
|
-
});
|
|
11
|
-
const appointmentEventSchema = zod_1.z.object({
|
|
12
|
-
patientid: zod_1.z.string().optional(),
|
|
13
|
-
appointmentstatus: zod_1.z.string(),
|
|
14
|
-
});
|
|
15
|
-
exports.appointmentEventsSchema = zod_1.z.object({
|
|
16
|
-
appointments: appointmentEventSchema.array(),
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=appointment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.js","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/appointment.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,YAAY,EAAE,+BAAuB,CAAC,KAAK,EAAE;CAC9C,CAAC,CAAC;AAGH,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,sBAAsB,CAAC,KAAK,EAAE;CAC7C,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const athenaSecondaryMappingsSchema: z.ZodObject<{
|
|
3
|
-
departmentIds: z.ZodArray<z.ZodString, "many">;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
departmentIds: string[];
|
|
6
|
-
}, {
|
|
7
|
-
departmentIds: string[];
|
|
8
|
-
}>;
|
|
9
|
-
export type AthenaSecondaryMappings = z.infer<typeof athenaSecondaryMappingsSchema>;
|
|
10
|
-
//# sourceMappingURL=cx-mapping.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cx-mapping.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/cx-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.athenaSecondaryMappingsSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.athenaSecondaryMappingsSchema = zod_1.z.object({
|
|
6
|
-
departmentIds: zod_1.z.string().array(),
|
|
7
|
-
});
|
|
8
|
-
//# sourceMappingURL=cx-mapping.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cx-mapping.js","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/cx-mapping.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const departmentSchema: z.ZodObject<{
|
|
3
|
-
departmentid: z.ZodString;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
departmentid: string;
|
|
6
|
-
}, {
|
|
7
|
-
departmentid: string;
|
|
8
|
-
}>;
|
|
9
|
-
export type Department = z.infer<typeof departmentSchema>;
|
|
10
|
-
export declare const departmentsSchema: z.ZodObject<{
|
|
11
|
-
departments: z.ZodArray<z.ZodObject<{
|
|
12
|
-
departmentid: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
departmentid: string;
|
|
15
|
-
}, {
|
|
16
|
-
departmentid: string;
|
|
17
|
-
}>, "many">;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
departments: {
|
|
20
|
-
departmentid: string;
|
|
21
|
-
}[];
|
|
22
|
-
}, {
|
|
23
|
-
departments: {
|
|
24
|
-
departmentid: string;
|
|
25
|
-
}[];
|
|
26
|
-
}>;
|
|
27
|
-
export type Departments = z.infer<typeof departmentsSchema>;
|
|
28
|
-
//# sourceMappingURL=department.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"department.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/department.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;EAE5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.departmentsSchema = exports.departmentSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.departmentSchema = zod_1.z.object({
|
|
6
|
-
departmentid: zod_1.z.string(),
|
|
7
|
-
});
|
|
8
|
-
exports.departmentsSchema = zod_1.z.object({
|
|
9
|
-
departments: exports.departmentSchema.array(),
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=department.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"department.js","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/department.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,wBAAgB,CAAC,KAAK,EAAE;CACtC,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./cx-mapping";
|
|
2
|
-
export * from "./jwt-token";
|
|
3
|
-
export * from "./appointment";
|
|
4
|
-
export * from "./medication";
|
|
5
|
-
export * from "./subscription";
|
|
6
|
-
export * from "./department";
|
|
7
|
-
export * from "./problem";
|
|
8
|
-
export * from "./vitals";
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|