@metriport/shared 0.21.1 → 0.21.2
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/common/__tests__/date.test.js +27 -0
- package/dist/common/__tests__/date.test.js.map +1 -1
- package/dist/common/date.d.ts +1 -0
- package/dist/common/date.d.ts.map +1 -1
- package/dist/common/date.js +25 -1
- package/dist/common/date.js.map +1 -1
- package/dist/common/titleCase.d.ts +2 -0
- package/dist/common/titleCase.d.ts.map +1 -0
- package/dist/common/titleCase.js +10 -0
- package/dist/common/titleCase.js.map +1 -0
- package/dist/domain/address/__tests__/normalize-zip.test.d.ts +2 -0
- package/dist/domain/address/__tests__/normalize-zip.test.d.ts.map +1 -0
- package/dist/domain/address/__tests__/normalize-zip.test.js +83 -0
- package/dist/domain/address/__tests__/normalize-zip.test.js.map +1 -0
- package/dist/interface/external/athenahealth/appointment.d.ts +63 -0
- package/dist/interface/external/athenahealth/appointment.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/appointment.js +18 -0
- package/dist/interface/external/athenahealth/appointment.js.map +1 -0
- package/dist/interface/external/athenahealth/cx-mapping.d.ts +10 -0
- package/dist/interface/external/athenahealth/cx-mapping.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/cx-mapping.js +8 -0
- package/dist/interface/external/athenahealth/cx-mapping.js.map +1 -0
- package/dist/interface/external/athenahealth/department.d.ts +28 -0
- package/dist/interface/external/athenahealth/department.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/department.js +11 -0
- package/dist/interface/external/athenahealth/department.js.map +1 -0
- package/dist/interface/external/athenahealth/index.d.ts +9 -0
- package/dist/interface/external/athenahealth/index.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/index.js +25 -0
- package/dist/interface/external/athenahealth/index.js.map +1 -0
- package/dist/interface/external/athenahealth/jwt-token.d.ts +34 -0
- package/dist/interface/external/athenahealth/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/jwt-token.js +18 -0
- package/dist/interface/external/athenahealth/jwt-token.js.map +1 -0
- package/dist/interface/external/athenahealth/medication.d.ts +50 -0
- package/dist/interface/external/athenahealth/medication.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/medication.js +19 -0
- package/dist/interface/external/athenahealth/medication.js.map +1 -0
- package/dist/interface/external/athenahealth/patient.d.ts +44 -0
- package/dist/interface/external/athenahealth/patient.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/patient.js +15 -0
- package/dist/interface/external/athenahealth/patient.js.map +1 -0
- package/dist/interface/external/athenahealth/problem.d.ts +27 -0
- package/dist/interface/external/athenahealth/problem.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/problem.js +14 -0
- package/dist/interface/external/athenahealth/problem.js.map +1 -0
- package/dist/interface/external/athenahealth/subscription.d.ts +20 -0
- package/dist/interface/external/athenahealth/subscription.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/subscription.js +11 -0
- package/dist/interface/external/athenahealth/subscription.js.map +1 -0
- package/dist/interface/external/athenahealth/vitals.d.ts +82 -0
- package/dist/interface/external/athenahealth/vitals.d.ts.map +1 -0
- package/dist/interface/external/athenahealth/vitals.js +15 -0
- package/dist/interface/external/athenahealth/vitals.js.map +1 -0
- package/dist/interface/external/canvas/appointment.d.ts +68 -0
- package/dist/interface/external/canvas/appointment.d.ts.map +1 -0
- package/dist/interface/external/canvas/appointment.js +15 -0
- package/dist/interface/external/canvas/appointment.js.map +1 -0
- package/dist/interface/external/canvas/index.d.ts +3 -0
- package/dist/interface/external/canvas/index.d.ts.map +1 -0
- package/dist/interface/external/canvas/index.js +19 -0
- package/dist/interface/external/canvas/index.js.map +1 -0
- package/dist/interface/external/canvas/jwt-token.d.ts +31 -0
- package/dist/interface/external/canvas/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/canvas/jwt-token.js +17 -0
- package/dist/interface/external/canvas/jwt-token.js.map +1 -0
- package/dist/interface/external/elation/appointment.d.ts +68 -0
- package/dist/interface/external/elation/appointment.d.ts.map +1 -0
- package/dist/interface/external/elation/appointment.js +15 -0
- package/dist/interface/external/elation/appointment.js.map +1 -0
- package/dist/interface/external/elation/index.d.ts +4 -0
- package/dist/interface/external/elation/index.d.ts.map +1 -0
- package/dist/interface/external/elation/index.js +20 -0
- package/dist/interface/external/elation/index.js.map +1 -0
- package/dist/interface/external/elation/jwt-token.d.ts +20 -0
- package/dist/interface/external/elation/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/elation/jwt-token.js +13 -0
- package/dist/interface/external/elation/jwt-token.js.map +1 -0
- package/dist/interface/external/elation/patient.d.ts +96 -0
- package/dist/interface/external/elation/patient.d.ts.map +1 -0
- package/dist/interface/external/elation/patient.js +33 -0
- package/dist/interface/external/elation/patient.js.map +1 -0
- package/dist/interface/external/elation/subscription.d.ts +2 -0
- package/dist/interface/external/elation/subscription.d.ts.map +1 -0
- package/dist/interface/external/elation/subscription.js +3 -0
- package/dist/interface/external/elation/subscription.js.map +1 -0
- package/dist/interface/external/shared/ehr/patient.d.ts +250 -0
- package/dist/interface/external/shared/ehr/patient.d.ts.map +1 -0
- package/dist/interface/external/shared/ehr/patient.js +35 -0
- package/dist/interface/external/shared/ehr/patient.js.map +1 -0
- package/dist/validators/driver-license/__tests__/index.test.d.ts +2 -0
- package/dist/validators/driver-license/__tests__/index.test.d.ts.map +1 -0
- package/dist/validators/driver-license/__tests__/index.test.js +87 -0
- package/dist/validators/driver-license/__tests__/index.test.js.map +1 -0
- package/dist/validators/driver-license/ca-dl.d.ts +6 -0
- package/dist/validators/driver-license/ca-dl.d.ts.map +1 -0
- package/dist/validators/driver-license/ca-dl.js +87 -0
- package/dist/validators/driver-license/ca-dl.js.map +1 -0
- package/dist/validators/driver-license/index.d.ts +18 -0
- package/dist/validators/driver-license/index.d.ts.map +1 -0
- package/dist/validators/driver-license/index.js +86 -0
- package/dist/validators/driver-license/index.js.map +1 -0
- package/dist/validators/driver-license/interfaces.d.ts +33 -0
- package/dist/validators/driver-license/interfaces.d.ts.map +1 -0
- package/dist/validators/driver-license/interfaces.js +3 -0
- package/dist/validators/driver-license/interfaces.js.map +1 -0
- package/dist/validators/driver-license/us-dl.d.ts +6 -0
- package/dist/validators/driver-license/us-dl.d.ts.map +1 -0
- package/dist/validators/driver-license/us-dl.js +471 -0
- package/dist/validators/driver-license/us-dl.js.map +1 -0
- package/package.json +2 -2
- package/dist/interface/external/ehr/fhir-resource.d.ts +0 -89
- package/dist/interface/external/ehr/fhir-resource.d.ts.map +0 -1
- package/dist/interface/external/ehr/fhir-resource.js +0 -17
- package/dist/interface/external/ehr/fhir-resource.js.map +0 -1
- package/dist/interface/external/ehr/resource-diff.d.ts +0 -6
- package/dist/interface/external/ehr/resource-diff.d.ts.map +0 -1
- package/dist/interface/external/ehr/resource-diff.js +0 -13
- package/dist/interface/external/ehr/resource-diff.js.map +0 -1
|
@@ -36,4 +36,31 @@ describe("validateDateIsAfter1900", () => {
|
|
|
36
36
|
expect((0, date_1.validateDateIsAfter1900)("1900-01-01")).toBe(true);
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
+
describe("buildDayjsFromCompactDate", () => {
|
|
40
|
+
it("parses compact date format correctly", () => {
|
|
41
|
+
const compactDate = "20240226123000+0000";
|
|
42
|
+
const result = (0, date_1.buildDayjsFromCompactDate)(compactDate);
|
|
43
|
+
expect(result.format()).toBe("2024-02-26T12:30:00Z");
|
|
44
|
+
});
|
|
45
|
+
it("correctly handless offset", () => {
|
|
46
|
+
const compactDate = "20240226123000+0130";
|
|
47
|
+
const result = (0, date_1.buildDayjsFromCompactDate)(compactDate);
|
|
48
|
+
expect(result.format()).toBe("2024-02-26T11:00:00Z");
|
|
49
|
+
});
|
|
50
|
+
it("handles regular date format", () => {
|
|
51
|
+
const regularDate = "2024-02-26T12:30:00Z";
|
|
52
|
+
const result = (0, date_1.buildDayjsFromCompactDate)(regularDate);
|
|
53
|
+
expect(result.format()).toBe("2024-02-26T12:30:00Z");
|
|
54
|
+
});
|
|
55
|
+
it("handles short date format", () => {
|
|
56
|
+
const regularDate = "2024-02-26";
|
|
57
|
+
const result = (0, date_1.buildDayjsFromCompactDate)(regularDate);
|
|
58
|
+
expect(result.format()).toBe("2024-02-26T00:00:00Z");
|
|
59
|
+
});
|
|
60
|
+
it("falls back to regular date parsing for invalid compact date format", () => {
|
|
61
|
+
const invalidDate = "20240226123000";
|
|
62
|
+
const result = (0, date_1.buildDayjsFromCompactDate)(invalidDate);
|
|
63
|
+
expect(result.format()).toBe("2024-02-26T12:30:00Z");
|
|
64
|
+
});
|
|
65
|
+
});
|
|
39
66
|
//# sourceMappingURL=date.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.test.js","sourceRoot":"","sources":["../../../src/common/__tests__/date.test.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"date.test.js","sourceRoot":"","sources":["../../../src/common/__tests__/date.test.ts"],"names":[],"mappings":";;AAAA,kCAKiB;AAEjB,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC9B,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,CAAC,IAAA,qBAAc,EAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjE,MAAM,CAAC,IAAA,qBAAc,EAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;QAC3C,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,CAAC,IAAA,kCAA2B,EAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,IAAA,kCAA2B,EAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC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AAW,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/common/date.d.ts
CHANGED
|
@@ -12,5 +12,6 @@ export declare const optionalDateSchema: z.ZodEffects<z.ZodOptional<z.ZodNullabl
|
|
|
12
12
|
export declare const dateSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
13
13
|
export declare function elapsedTimeFromNow(date?: Date, format?: dayjs.UnitTypeLong): number;
|
|
14
14
|
export declare function buildDayjs(date?: ConfigType, format?: string, strict?: boolean): dayjs.Dayjs;
|
|
15
|
+
export declare function buildDayjsFromCompactDate(date?: ConfigType, format?: string, strict?: boolean): dayjs.Dayjs;
|
|
15
16
|
export declare function sortDate(date1: ConfigType, date2: ConfigType, sortingOrder?: "asc" | "desc"): number;
|
|
16
17
|
//# sourceMappingURL=date.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/common/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAqB,CAAC,EAAE,MAAM,KAAK,CAAC;AAK3C,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAMD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAK7D;AACD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGjE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI7D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,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,CAAC;AAElF,wBAAgB,kBAAkB,CAChC,IAAI,CAAC,EAAE,IAAI,EACX,MAAM,GAAE,KAAK,CAAC,YAA4B,GACzC,MAAM,CAER;AAED,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAE5F;AAkBD,wBAAgB,yBAAyB,CACvC,IAAI,CAAC,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,OAAO,GACf,KAAK,CAAC,KAAK,CAMb;AAED,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,UAAU,EACjB,YAAY,GAAE,KAAK,GAAG,MAAc,GACnC,MAAM,CAIR"}
|
package/dist/common/date.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.sortDate = exports.buildDayjs = exports.elapsedTimeFromNow = exports.dateSchema = exports.optionalDateSchema = exports.validateDateRange = exports.validateDateIsAfter1900 = exports.validateIsPastOrPresentSafe = exports.validateIsPastOrPresent = exports.validateDateOfBirth = exports.isValidISODate = exports.ISO_DATE = void 0;
|
|
6
|
+
exports.sortDate = exports.buildDayjsFromCompactDate = exports.buildDayjs = exports.elapsedTimeFromNow = exports.dateSchema = exports.optionalDateSchema = exports.validateDateRange = exports.validateDateIsAfter1900 = exports.validateIsPastOrPresentSafe = exports.validateIsPastOrPresent = exports.validateDateOfBirth = exports.isValidISODate = exports.ISO_DATE = void 0;
|
|
7
7
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
8
8
|
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
9
9
|
const zod_1 = require("zod");
|
|
@@ -66,6 +66,30 @@ function buildDayjs(date, format, strict) {
|
|
|
66
66
|
return dayjs_1.default.utc(date, format, strict);
|
|
67
67
|
}
|
|
68
68
|
exports.buildDayjs = buildDayjs;
|
|
69
|
+
/**
|
|
70
|
+
* Tries to parse a compact date string in the format YYYYMMDDhhmmss±hhmm
|
|
71
|
+
* (year, month, day, hour, minute, second, timezone)
|
|
72
|
+
* and converts it to ISO 8601 format.
|
|
73
|
+
*
|
|
74
|
+
* @param input The compact date string to parse
|
|
75
|
+
* @returns ISO 8601 formatted date string or undefined if input doesn't match expected format
|
|
76
|
+
*/
|
|
77
|
+
function tryParseCompactDate(input) {
|
|
78
|
+
const match = input.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([+-])(\d{2})(\d{2})$/);
|
|
79
|
+
if (!match)
|
|
80
|
+
return undefined;
|
|
81
|
+
const [, year, month, day, hour, minute, second, sign, tzHour, tzMinute] = match;
|
|
82
|
+
return `${year}-${month}-${day}T${hour}:${minute}:${second}${sign}${tzHour}:${tzMinute}`;
|
|
83
|
+
}
|
|
84
|
+
function buildDayjsFromCompactDate(date, format, strict) {
|
|
85
|
+
if (typeof date === "string") {
|
|
86
|
+
const parsed = tryParseCompactDate(date);
|
|
87
|
+
if (parsed)
|
|
88
|
+
return buildDayjs(parsed, format, strict);
|
|
89
|
+
}
|
|
90
|
+
return buildDayjs(date, format, strict);
|
|
91
|
+
}
|
|
92
|
+
exports.buildDayjsFromCompactDate = buildDayjsFromCompactDate;
|
|
69
93
|
function sortDate(date1, date2, sortingOrder = "asc") {
|
|
70
94
|
return sortingOrder === "desc"
|
|
71
95
|
? buildDayjs(date1).diff(buildDayjs(date2))
|
package/dist/common/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/common/date.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,2DAAmC;AACnC,6BAA2C;AAC3C,sDAAuD;AAEvD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,CAAC,GAAG,KAAK,CAAC;IACjF,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,IAAI,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC;AAC3F,CAAC;AAED,SAAgB,yBAAyB,CACvC,IAAiB,EACjB,MAAe,EACf,MAAgB;IAEhB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,MAAM;YAAE,OAAO,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KACvD;IACD,OAAO,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,CAAC;AAVD,8DAUC;AAED,SAAgB,QAAQ,CACtB,KAAiB,EACjB,KAAiB,EACjB,eAA+B,KAAK;IAEpC,OAAO,YAAY,KAAK,MAAM;QAC5B,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAChD,CAAC;AARD,4BAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-zip.test.d.ts","sourceRoot":"","sources":["../../../../src/domain/address/__tests__/normalize-zip.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAC;AACjE,CAAC;AAED,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,QAAQ,CAAC,qBAAqB,EAAE,GA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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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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("./cx-mapping"), exports);
|
|
18
|
+
__exportStar(require("./jwt-token"), exports);
|
|
19
|
+
__exportStar(require("./appointment"), exports);
|
|
20
|
+
__exportStar(require("./medication"), exports);
|
|
21
|
+
__exportStar(require("./subscription"), exports);
|
|
22
|
+
__exportStar(require("./department"), exports);
|
|
23
|
+
__exportStar(require("./problem"), exports);
|
|
24
|
+
__exportStar(require("./vitals"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAC7B,iDAA+B;AAC/B,+CAA6B;AAC7B,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const athenaJwtTokenDataSchema: z.ZodObject<{
|
|
3
|
+
ah_practice: z.ZodString;
|
|
4
|
+
ah_department: z.ZodString;
|
|
5
|
+
source: z.ZodLiteral<"athenahealth">;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
ah_practice: string;
|
|
8
|
+
ah_department: string;
|
|
9
|
+
source: "athenahealth";
|
|
10
|
+
}, {
|
|
11
|
+
ah_practice: string;
|
|
12
|
+
ah_department: string;
|
|
13
|
+
source: "athenahealth";
|
|
14
|
+
}>;
|
|
15
|
+
export type AthenaJwtTokenData = z.infer<typeof athenaJwtTokenDataSchema>;
|
|
16
|
+
export type AthenaClientJwtTokenData = {
|
|
17
|
+
practiceId: string;
|
|
18
|
+
cxId: string;
|
|
19
|
+
source: "athenahealth-client";
|
|
20
|
+
};
|
|
21
|
+
export declare const athenaClientJwtTokenResponseSchema: z.ZodObject<{
|
|
22
|
+
scope: z.ZodString;
|
|
23
|
+
access_token: z.ZodString;
|
|
24
|
+
expires_in: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
scope: string;
|
|
27
|
+
access_token: string;
|
|
28
|
+
expires_in: string;
|
|
29
|
+
}, {
|
|
30
|
+
scope: string;
|
|
31
|
+
access_token: string;
|
|
32
|
+
expires_in: string;
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=jwt-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-token.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/jwt-token.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,qBAAqB,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;EAI7C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.athenaClientJwtTokenResponseSchema = exports.athenaJwtTokenDataSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.athenaJwtTokenDataSchema = zod_1.default.object({
|
|
9
|
+
ah_practice: zod_1.default.string(),
|
|
10
|
+
ah_department: zod_1.default.string(),
|
|
11
|
+
source: zod_1.default.literal("athenahealth"),
|
|
12
|
+
});
|
|
13
|
+
exports.athenaClientJwtTokenResponseSchema = zod_1.default.object({
|
|
14
|
+
scope: zod_1.default.string(),
|
|
15
|
+
access_token: zod_1.default.string(),
|
|
16
|
+
expires_in: zod_1.default.coerce.string(),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=jwt-token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-token.js","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/jwt-token.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AAEP,QAAA,wBAAwB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC/C,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE;IACzB,MAAM,EAAE,aAAC,CAAC,OAAO,CAAC,cAAc,CAAC;CAClC,CAAC,CAAC;AAUU,QAAA,kCAAkC,GAAG,aAAC,CAAC,MAAM,CAAC;IACzD,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE;IACjB,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,aAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const createdMedicationSchema: z.ZodObject<{
|
|
3
|
+
success: z.ZodBoolean;
|
|
4
|
+
errormessage: z.ZodOptional<z.ZodString>;
|
|
5
|
+
medicationentryid: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
success: boolean;
|
|
8
|
+
errormessage?: string | undefined;
|
|
9
|
+
medicationentryid?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
success: boolean;
|
|
12
|
+
errormessage?: string | undefined;
|
|
13
|
+
medicationentryid?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type CreatedMedication = z.infer<typeof createdMedicationSchema>;
|
|
16
|
+
export declare const createdMedicationSuccessSchema: z.ZodObject<{
|
|
17
|
+
success: z.ZodLiteral<true>;
|
|
18
|
+
medicationentryid: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
success: true;
|
|
21
|
+
medicationentryid: string;
|
|
22
|
+
}, {
|
|
23
|
+
success: true;
|
|
24
|
+
medicationentryid: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type CreatedMedicationSuccess = z.infer<typeof createdMedicationSuccessSchema>;
|
|
27
|
+
declare const medicationReferenceSchema: z.ZodObject<{
|
|
28
|
+
medication: z.ZodString;
|
|
29
|
+
medicationid: z.ZodNumber;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
medication: string;
|
|
32
|
+
medicationid: number;
|
|
33
|
+
}, {
|
|
34
|
+
medication: string;
|
|
35
|
+
medicationid: number;
|
|
36
|
+
}>;
|
|
37
|
+
export type MedicationReference = z.infer<typeof medicationReferenceSchema>;
|
|
38
|
+
export declare const medicationReferencesSchema: z.ZodArray<z.ZodObject<{
|
|
39
|
+
medication: z.ZodString;
|
|
40
|
+
medicationid: z.ZodNumber;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
medication: string;
|
|
43
|
+
medicationid: number;
|
|
44
|
+
}, {
|
|
45
|
+
medication: string;
|
|
46
|
+
medicationid: number;
|
|
47
|
+
}>, "many">;
|
|
48
|
+
export type MedicationReferences = z.infer<typeof medicationReferencesSchema>;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=medication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medication.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/medication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,eAAO,MAAM,8BAA8B;;;;;;;;;EAGzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,QAAA,MAAM,yBAAyB;;;;;;;;;EAG7B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,eAAO,MAAM,0BAA0B;;;;;;;;;WAAoC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.medicationReferencesSchema = exports.createdMedicationSuccessSchema = exports.createdMedicationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.createdMedicationSchema = zod_1.z.object({
|
|
6
|
+
success: zod_1.z.boolean(),
|
|
7
|
+
errormessage: zod_1.z.string().optional(),
|
|
8
|
+
medicationentryid: zod_1.z.coerce.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
exports.createdMedicationSuccessSchema = zod_1.z.object({
|
|
11
|
+
success: zod_1.z.literal(true),
|
|
12
|
+
medicationentryid: zod_1.z.coerce.string(),
|
|
13
|
+
});
|
|
14
|
+
const medicationReferenceSchema = zod_1.z.object({
|
|
15
|
+
medication: zod_1.z.string(),
|
|
16
|
+
medicationid: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
exports.medicationReferencesSchema = medicationReferenceSchema.array();
|
|
19
|
+
//# sourceMappingURL=medication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medication.js","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/medication.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,iBAAiB,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,iBAAiB,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CACrC,CAAC,CAAC;AAGH,MAAM,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAAG,yBAAyB,CAAC,KAAK,EAAE,CAAC"}
|