@metriport/shared 0.20.0 → 0.20.1-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/common/string.d.ts +1 -0
- package/dist/common/string.d.ts.map +1 -1
- package/dist/common/string.js +5 -1
- package/dist/common/string.js.map +1 -1
- package/dist/domain/address/__tests__/country.test.d.ts +2 -0
- package/dist/domain/address/__tests__/country.test.d.ts.map +1 -0
- package/dist/domain/address/__tests__/country.test.js +51 -0
- package/dist/domain/address/__tests__/country.test.js.map +1 -0
- package/dist/domain/address/country.d.ts +4 -0
- package/dist/domain/address/country.d.ts.map +1 -0
- package/dist/domain/address/country.js +31 -0
- package/dist/domain/address/country.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/external/athenahealth/index.d.ts +1 -0
- package/dist/interface/external/athenahealth/index.d.ts.map +1 -1
- package/dist/interface/external/athenahealth/index.js +1 -0
- package/dist/interface/external/athenahealth/index.js.map +1 -1
- package/dist/interface/external/athenahealth/patient.d.ts +41 -388
- package/dist/interface/external/athenahealth/patient.d.ts.map +1 -1
- package/dist/interface/external/athenahealth/patient.js +11 -30
- package/dist/interface/external/athenahealth/patient.js.map +1 -1
- package/dist/interface/external/canvas/appointment.d.ts +132 -48
- package/dist/interface/external/canvas/appointment.d.ts.map +1 -1
- package/dist/interface/external/canvas/appointment.js +16 -8
- package/dist/interface/external/canvas/appointment.js.map +1 -1
- package/dist/interface/external/canvas/jwt-token.d.ts +14 -0
- package/dist/interface/external/canvas/jwt-token.d.ts.map +1 -1
- package/dist/interface/external/canvas/jwt-token.js +6 -1
- package/dist/interface/external/canvas/jwt-token.js.map +1 -1
- package/dist/interface/external/ehr/athenahealth/appointment.d.ts +79 -0
- package/dist/interface/external/ehr/athenahealth/appointment.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/appointment.js +20 -0
- package/dist/interface/external/ehr/athenahealth/appointment.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts +13 -0
- package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/cx-mapping.js +9 -0
- package/dist/interface/external/ehr/athenahealth/cx-mapping.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/department.d.ts +28 -0
- package/dist/interface/external/ehr/athenahealth/department.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/department.js +11 -0
- package/dist/interface/external/ehr/athenahealth/department.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/index.d.ts +10 -0
- package/dist/interface/external/ehr/athenahealth/index.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/index.js +26 -0
- package/dist/interface/external/ehr/athenahealth/index.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/jwt-token.d.ts +46 -0
- package/dist/interface/external/ehr/athenahealth/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/jwt-token.js +26 -0
- package/dist/interface/external/ehr/athenahealth/jwt-token.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/medication.d.ts +50 -0
- package/dist/interface/external/ehr/athenahealth/medication.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/medication.js +19 -0
- package/dist/interface/external/ehr/athenahealth/medication.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/patient.d.ts +44 -0
- package/dist/interface/external/ehr/athenahealth/patient.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/patient.js +15 -0
- package/dist/interface/external/ehr/athenahealth/patient.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/problem.d.ts +27 -0
- package/dist/interface/external/ehr/athenahealth/problem.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/problem.js +14 -0
- package/dist/interface/external/ehr/athenahealth/problem.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/subscription.d.ts +20 -0
- package/dist/interface/external/ehr/athenahealth/subscription.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/subscription.js +11 -0
- package/dist/interface/external/ehr/athenahealth/subscription.js.map +1 -0
- package/dist/interface/external/ehr/athenahealth/vitals.d.ts +82 -0
- package/dist/interface/external/ehr/athenahealth/vitals.d.ts.map +1 -0
- package/dist/interface/external/ehr/athenahealth/vitals.js +15 -0
- package/dist/interface/external/ehr/athenahealth/vitals.js.map +1 -0
- package/dist/interface/external/ehr/canvas/appointment.d.ts +152 -0
- package/dist/interface/external/ehr/canvas/appointment.d.ts.map +1 -0
- package/dist/interface/external/ehr/canvas/appointment.js +23 -0
- package/dist/interface/external/ehr/canvas/appointment.js.map +1 -0
- package/dist/interface/external/ehr/canvas/index.d.ts +3 -0
- package/dist/interface/external/ehr/canvas/index.d.ts.map +1 -0
- package/dist/interface/external/ehr/canvas/index.js +19 -0
- package/dist/interface/external/ehr/canvas/index.js.map +1 -0
- package/dist/interface/external/ehr/canvas/jwt-token.d.ts +58 -0
- package/dist/interface/external/ehr/canvas/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/ehr/canvas/jwt-token.js +31 -0
- package/dist/interface/external/ehr/canvas/jwt-token.js.map +1 -0
- package/dist/interface/external/ehr/elation/appointment.d.ts +68 -0
- package/dist/interface/external/ehr/elation/appointment.d.ts.map +1 -0
- package/dist/interface/external/ehr/elation/appointment.js +15 -0
- package/dist/interface/external/ehr/elation/appointment.js.map +1 -0
- package/dist/interface/external/ehr/elation/index.d.ts +4 -0
- package/dist/interface/external/ehr/elation/index.d.ts.map +1 -0
- package/dist/interface/external/ehr/elation/index.js +20 -0
- package/dist/interface/external/ehr/elation/index.js.map +1 -0
- package/dist/interface/external/ehr/elation/jwt-token.d.ts +45 -0
- package/dist/interface/external/ehr/elation/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/ehr/elation/jwt-token.js +26 -0
- package/dist/interface/external/ehr/elation/jwt-token.js.map +1 -0
- package/dist/interface/external/ehr/elation/patient.d.ts +96 -0
- package/dist/interface/external/ehr/elation/patient.d.ts.map +1 -0
- package/dist/interface/external/ehr/elation/patient.js +33 -0
- package/dist/interface/external/ehr/elation/patient.js.map +1 -0
- package/dist/interface/external/ehr/index.d.ts +3 -0
- package/dist/interface/external/ehr/index.d.ts.map +1 -0
- package/dist/interface/external/ehr/index.js +19 -0
- package/dist/interface/external/ehr/index.js.map +1 -0
- package/dist/interface/external/ehr/patient.d.ts +250 -0
- package/dist/interface/external/ehr/patient.d.ts.map +1 -0
- package/dist/interface/external/ehr/patient.js +35 -0
- package/dist/interface/external/ehr/patient.js.map +1 -0
- package/dist/interface/external/ehr/source.d.ts +13 -0
- package/dist/interface/external/ehr/source.d.ts.map +1 -0
- package/dist/interface/external/ehr/source.js +25 -0
- package/dist/interface/external/ehr/source.js.map +1 -0
- package/dist/interface/external/elation/jwt-token.d.ts +14 -0
- package/dist/interface/external/elation/jwt-token.d.ts.map +1 -1
- package/dist/interface/external/elation/jwt-token.js +6 -1
- package/dist/interface/external/elation/jwt-token.js.map +1 -1
- package/dist/interface/external/index.d.ts +2 -0
- package/dist/interface/external/index.d.ts.map +1 -0
- package/dist/interface/external/index.js +18 -0
- package/dist/interface/external/index.js.map +1 -0
- package/dist/interface/external/shared/ehr/patient.d.ts +12 -12
- package/dist/interface/index.d.ts +1 -0
- package/dist/interface/index.d.ts.map +1 -1
- package/dist/interface/index.js +1 -0
- package/dist/interface/index.js.map +1 -1
- package/package.json +2 -2
- 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/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/common/string.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function limitStringLength<T extends string | undefined>(value: T, max?: number, suffix?: string): T;
|
|
2
2
|
export declare function stripNonNumericChars(str: string): string;
|
|
3
|
+
export declare function stripPeriods(str: string): string;
|
|
3
4
|
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAC5D,KAAK,EAAE,CAAC,EACR,GAAG,SAAM,EACT,MAAM,SAAQ,GACb,CAAC,CAOH;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAC5D,KAAK,EAAE,CAAC,EACR,GAAG,SAAM,EACT,MAAM,SAAQ,GACb,CAAC,CAOH;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
package/dist/common/string.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stripNonNumericChars = exports.limitStringLength = void 0;
|
|
3
|
+
exports.stripPeriods = exports.stripNonNumericChars = exports.limitStringLength = void 0;
|
|
4
4
|
function limitStringLength(value, max = 255, suffix = "...") {
|
|
5
5
|
if (!value)
|
|
6
6
|
return value;
|
|
@@ -13,4 +13,8 @@ function stripNonNumericChars(str) {
|
|
|
13
13
|
return str.trim().replace(/\D/g, "");
|
|
14
14
|
}
|
|
15
15
|
exports.stripNonNumericChars = stripNonNumericChars;
|
|
16
|
+
function stripPeriods(str) {
|
|
17
|
+
return str.trim().replace(/\./g, "");
|
|
18
|
+
}
|
|
19
|
+
exports.stripPeriods = stripPeriods;
|
|
16
20
|
//# sourceMappingURL=string.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAC/B,KAAQ,EACR,GAAG,GAAG,GAAG,EACT,MAAM,GAAG,KAAK;IAEd,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,OAAO,CACL,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM;QAChD,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM;QAClD,CAAC,CAAC,KAAK,CACL,CAAC;AACT,CAAC;AAXD,8CAWC;AAED,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAFD,oDAEC"}
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAC/B,KAAQ,EACR,GAAG,GAAG,GAAG,EACT,MAAM,GAAG,KAAK;IAEd,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,OAAO,CACL,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM;QAChD,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM;QAClD,CAAC,CAAC,KAAK,CACL,CAAC;AACT,CAAC;AAXD,8CAWC;AAED,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAFD,oDAEC;AAED,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAFD,oCAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.test.d.ts","sourceRoot":"","sources":["../../../../src/domain/address/__tests__/country.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const country_1 = require("../country");
|
|
4
|
+
describe("country", () => {
|
|
5
|
+
describe("normalizeCountrySafe", () => {
|
|
6
|
+
it("should return undefined when it gets empty string", () => {
|
|
7
|
+
const input = "";
|
|
8
|
+
expect((0, country_1.normalizeCountrySafe)(input)).toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
it("should return undefined when it gets space", () => {
|
|
11
|
+
const input = " ";
|
|
12
|
+
expect((0, country_1.normalizeCountrySafe)(input)).toBeUndefined();
|
|
13
|
+
});
|
|
14
|
+
const countries = [
|
|
15
|
+
country_1.normalizedCountryUsa,
|
|
16
|
+
"US",
|
|
17
|
+
"U.S",
|
|
18
|
+
"U.S.",
|
|
19
|
+
"U.S.A",
|
|
20
|
+
"UNITED STATES",
|
|
21
|
+
"UNITED STATES OF AMERICA",
|
|
22
|
+
];
|
|
23
|
+
for (const country of countries) {
|
|
24
|
+
it(`valid - ${country}`, () => {
|
|
25
|
+
const result = (0, country_1.normalizeCountrySafe)(country);
|
|
26
|
+
expect(result).toBe(country_1.normalizedCountryUsa);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
for (const country of countries.map(c => c.toLowerCase())) {
|
|
30
|
+
it(`valid - ${country}`, () => {
|
|
31
|
+
const result = (0, country_1.normalizeCountrySafe)(country);
|
|
32
|
+
expect(result).toBe(country_1.normalizedCountryUsa);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
it("should trim input prefix", () => {
|
|
36
|
+
const expectedOutput = country_1.normalizedCountryUsa;
|
|
37
|
+
const input = " " + expectedOutput;
|
|
38
|
+
expect((0, country_1.normalizeCountrySafe)(input)).toBe(expectedOutput);
|
|
39
|
+
});
|
|
40
|
+
it("should trim input suffix", () => {
|
|
41
|
+
const expectedOutput = country_1.normalizedCountryUsa;
|
|
42
|
+
const input = expectedOutput + " ";
|
|
43
|
+
expect((0, country_1.normalizeCountrySafe)(input)).toBe(expectedOutput);
|
|
44
|
+
});
|
|
45
|
+
it("should return undefined when it gets invalid country", () => {
|
|
46
|
+
const input = "germany";
|
|
47
|
+
expect((0, country_1.normalizeCountrySafe)(input)).toBeUndefined();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=country.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.test.js","sourceRoot":"","sources":["../../../../src/domain/address/__tests__/country.test.ts"],"names":[],"mappings":";;AAAA,wCAAwE;AAExE,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QACpC,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,MAAM,KAAK,GAAG,GAAG,CAAC;YAClB,MAAM,CAAC,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAAC,CA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,CAAC;QAC3D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;YAC9D,MAAM,KAAK,GAAG,SAAS,CAAC;YACxB,MAAM,CAAC,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;QACtD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const normalizedCountryUsa = "USA";
|
|
2
|
+
export declare function normalizeCountrySafe(country: string, normalizeBase?: (country: string) => string): string | undefined;
|
|
3
|
+
export declare function normalizeCountry(country: string): string;
|
|
4
|
+
//# sourceMappingURL=country.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../../src/domain/address/country.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAW1C,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,aAAa,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAA6B,GAChE,MAAM,GAAG,SAAS,CAIpB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMxD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeCountry = exports.normalizeCountrySafe = exports.normalizedCountryUsa = void 0;
|
|
4
|
+
const string_1 = require("../../common/string");
|
|
5
|
+
const bad_request_1 = require("../../error/bad-request");
|
|
6
|
+
const validCountryStrings = ["US", "USA", "UNITED STATES", "UNITED STATES OF AMERICA"];
|
|
7
|
+
exports.normalizedCountryUsa = "USA";
|
|
8
|
+
function isValidCountry(country) {
|
|
9
|
+
if (!validCountryStrings.includes(country))
|
|
10
|
+
return false;
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
function normalizeCountryBase(country) {
|
|
14
|
+
return (0, string_1.stripPeriods)(country.trim().toUpperCase());
|
|
15
|
+
}
|
|
16
|
+
function normalizeCountrySafe(country, normalizeBase = normalizeCountryBase) {
|
|
17
|
+
const baseCountry = normalizeBase(country);
|
|
18
|
+
if (!isValidCountry(baseCountry))
|
|
19
|
+
return undefined;
|
|
20
|
+
return exports.normalizedCountryUsa;
|
|
21
|
+
}
|
|
22
|
+
exports.normalizeCountrySafe = normalizeCountrySafe;
|
|
23
|
+
function normalizeCountry(country) {
|
|
24
|
+
const countryOrUndefined = normalizeCountrySafe(country);
|
|
25
|
+
if (!countryOrUndefined) {
|
|
26
|
+
throw new bad_request_1.BadRequestError("Invalid country", undefined, { country });
|
|
27
|
+
}
|
|
28
|
+
return countryOrUndefined;
|
|
29
|
+
}
|
|
30
|
+
exports.normalizeCountry = normalizeCountry;
|
|
31
|
+
//# sourceMappingURL=country.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.js","sourceRoot":"","sources":["../../../src/domain/address/country.ts"],"names":[],"mappings":";;;AAAA,gDAAmD;AACnD,yDAA0D;AAE1D,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,0BAA0B,CAAC,CAAC;AAE1E,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAE1C,SAAS,cAAc,CAAC,OAAe;IACrC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAe;IAC3C,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,SAAgB,oBAAoB,CAClC,OAAe,EACf,gBAA6C,oBAAoB;IAEjE,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC;QAAE,OAAO,SAAS,CAAC;IACnD,OAAO,4BAAoB,CAAC;AAC9B,CAAC;AAPD,oDAOC;AAED,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACzD,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,6BAAe,CAAC,iBAAiB,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;KACtE;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAND,4CAMC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { toTitleCase } from "./common/title-case";
|
|
|
16
16
|
export { AtLeastOne, stringToBoolean } from "./common/types";
|
|
17
17
|
export { validateNPI } from "./common/validate-npi";
|
|
18
18
|
export * from "./domain/address/index";
|
|
19
|
+
export * from "./domain/address/country";
|
|
19
20
|
export * from "./domain/address/state";
|
|
20
21
|
export * from "./domain/address/territory";
|
|
21
22
|
export * from "./domain/address/zip";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,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AAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -61,6 +61,7 @@ Object.defineProperty(exports, "stringToBoolean", { enumerable: true, get: funct
|
|
|
61
61
|
var validate_npi_1 = require("./common/validate-npi");
|
|
62
62
|
Object.defineProperty(exports, "validateNPI", { enumerable: true, get: function () { return validate_npi_1.validateNPI; } });
|
|
63
63
|
__exportStar(require("./domain/address/index"), exports);
|
|
64
|
+
__exportStar(require("./domain/address/country"), exports);
|
|
64
65
|
__exportStar(require("./domain/address/state"), exports);
|
|
65
66
|
__exportStar(require("./domain/address/territory"), exports);
|
|
66
67
|
__exportStar(require("./domain/address/zip"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAyC;AAAhC,gGAAA,OAAO,OAAA;AAChB,4CAA0C;AAAjC,iGAAA,MAAM,OAAA;AACf,sCAAwF;AAA/E,kGAAA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|
|
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"}
|
|
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;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -22,4 +22,5 @@ __exportStar(require("./subscription"), exports);
|
|
|
22
22
|
__exportStar(require("./department"), exports);
|
|
23
23
|
__exportStar(require("./problem"), exports);
|
|
24
24
|
__exportStar(require("./vitals"), exports);
|
|
25
|
+
__exportStar(require("./patient"), exports);
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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"}
|
|
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;AACzB,4CAA0B"}
|
|
@@ -1,391 +1,44 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
"strip",
|
|
37
|
-
z.ZodTypeAny,
|
|
38
|
-
{
|
|
39
|
-
state?: string | undefined;
|
|
40
|
-
line?: string[] | undefined;
|
|
41
|
-
city?: string | undefined;
|
|
42
|
-
postalCode?: string | undefined;
|
|
43
|
-
country?: string | undefined;
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
state?: string | undefined;
|
|
47
|
-
line?: string[] | undefined;
|
|
48
|
-
city?: string | undefined;
|
|
49
|
-
postalCode?: string | undefined;
|
|
50
|
-
country?: string | undefined;
|
|
51
|
-
}
|
|
52
|
-
>,
|
|
53
|
-
"many"
|
|
54
|
-
>
|
|
55
|
-
>;
|
|
56
|
-
birthDate: z.ZodString;
|
|
57
|
-
telecom: z.ZodOptional<
|
|
58
|
-
z.ZodArray<
|
|
59
|
-
z.ZodObject<
|
|
60
|
-
{
|
|
61
|
-
value: z.ZodString;
|
|
62
|
-
system: z.ZodEnum<["phone", "email"]>;
|
|
63
|
-
},
|
|
64
|
-
"strip",
|
|
65
|
-
z.ZodTypeAny,
|
|
66
|
-
{
|
|
67
|
-
value: string;
|
|
68
|
-
system: "phone" | "email";
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
value: string;
|
|
72
|
-
system: "phone" | "email";
|
|
73
|
-
}
|
|
74
|
-
>,
|
|
75
|
-
"many"
|
|
76
|
-
>
|
|
77
|
-
>;
|
|
78
|
-
},
|
|
79
|
-
"strip",
|
|
80
|
-
z.ZodTypeAny,
|
|
81
|
-
{
|
|
82
|
-
gender: string;
|
|
83
|
-
birthDate: string;
|
|
84
|
-
name?:
|
|
85
|
-
| {
|
|
86
|
-
family: string;
|
|
87
|
-
given: string[];
|
|
88
|
-
}[]
|
|
89
|
-
| undefined;
|
|
90
|
-
address?:
|
|
91
|
-
| {
|
|
92
|
-
state?: string | undefined;
|
|
93
|
-
line?: string[] | undefined;
|
|
94
|
-
city?: string | undefined;
|
|
95
|
-
postalCode?: string | undefined;
|
|
96
|
-
country?: string | undefined;
|
|
97
|
-
}[]
|
|
98
|
-
| undefined;
|
|
99
|
-
telecom?:
|
|
100
|
-
| {
|
|
101
|
-
value: string;
|
|
102
|
-
system: "phone" | "email";
|
|
103
|
-
}[]
|
|
104
|
-
| undefined;
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
gender: string;
|
|
108
|
-
birthDate: string;
|
|
109
|
-
name?:
|
|
110
|
-
| {
|
|
111
|
-
family: string;
|
|
112
|
-
given: string[];
|
|
113
|
-
}[]
|
|
114
|
-
| undefined;
|
|
115
|
-
address?:
|
|
116
|
-
| {
|
|
117
|
-
state?: string | undefined;
|
|
118
|
-
line?: string[] | undefined;
|
|
119
|
-
city?: string | undefined;
|
|
120
|
-
postalCode?: string | undefined;
|
|
121
|
-
country?: string | undefined;
|
|
122
|
-
}[]
|
|
123
|
-
| undefined;
|
|
124
|
-
telecom?:
|
|
125
|
-
| {
|
|
126
|
-
value: string;
|
|
127
|
-
system: "phone" | "email";
|
|
128
|
-
}[]
|
|
129
|
-
| undefined;
|
|
130
|
-
}
|
|
131
|
-
>;
|
|
132
|
-
export type Patient = z.infer<typeof patientSchema>;
|
|
133
|
-
export declare const patientSearchSchema: z.ZodObject<
|
|
134
|
-
{
|
|
135
|
-
entry: z.ZodArray<
|
|
136
|
-
z.ZodObject<
|
|
137
|
-
{
|
|
138
|
-
resource: z.ZodObject<
|
|
139
|
-
{
|
|
140
|
-
gender: z.ZodString;
|
|
141
|
-
name: z.ZodOptional<
|
|
142
|
-
z.ZodArray<
|
|
143
|
-
z.ZodObject<
|
|
144
|
-
{
|
|
145
|
-
family: z.ZodString;
|
|
146
|
-
given: z.ZodArray<z.ZodString, "many">;
|
|
147
|
-
},
|
|
148
|
-
"strip",
|
|
149
|
-
z.ZodTypeAny,
|
|
150
|
-
{
|
|
151
|
-
family: string;
|
|
152
|
-
given: string[];
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
family: string;
|
|
156
|
-
given: string[];
|
|
157
|
-
}
|
|
158
|
-
>,
|
|
159
|
-
"many"
|
|
160
|
-
>
|
|
161
|
-
>;
|
|
162
|
-
address: z.ZodOptional<
|
|
163
|
-
z.ZodArray<
|
|
164
|
-
z.ZodObject<
|
|
165
|
-
{
|
|
166
|
-
state: z.ZodOptional<z.ZodString>;
|
|
167
|
-
line: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
-
city: z.ZodOptional<z.ZodString>;
|
|
169
|
-
postalCode: z.ZodOptional<z.ZodString>;
|
|
170
|
-
country: z.ZodOptional<z.ZodString>;
|
|
171
|
-
},
|
|
172
|
-
"strip",
|
|
173
|
-
z.ZodTypeAny,
|
|
174
|
-
{
|
|
175
|
-
state?: string | undefined;
|
|
176
|
-
line?: string[] | undefined;
|
|
177
|
-
city?: string | undefined;
|
|
178
|
-
postalCode?: string | undefined;
|
|
179
|
-
country?: string | undefined;
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
state?: string | undefined;
|
|
183
|
-
line?: string[] | undefined;
|
|
184
|
-
city?: string | undefined;
|
|
185
|
-
postalCode?: string | undefined;
|
|
186
|
-
country?: string | undefined;
|
|
187
|
-
}
|
|
188
|
-
>,
|
|
189
|
-
"many"
|
|
190
|
-
>
|
|
191
|
-
>;
|
|
192
|
-
birthDate: z.ZodString;
|
|
193
|
-
telecom: z.ZodOptional<
|
|
194
|
-
z.ZodArray<
|
|
195
|
-
z.ZodObject<
|
|
196
|
-
{
|
|
197
|
-
value: z.ZodString;
|
|
198
|
-
system: z.ZodEnum<["phone", "email"]>;
|
|
199
|
-
},
|
|
200
|
-
"strip",
|
|
201
|
-
z.ZodTypeAny,
|
|
202
|
-
{
|
|
203
|
-
value: string;
|
|
204
|
-
system: "phone" | "email";
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
value: string;
|
|
208
|
-
system: "phone" | "email";
|
|
209
|
-
}
|
|
210
|
-
>,
|
|
211
|
-
"many"
|
|
212
|
-
>
|
|
213
|
-
>;
|
|
214
|
-
},
|
|
215
|
-
"strip",
|
|
216
|
-
z.ZodTypeAny,
|
|
217
|
-
{
|
|
218
|
-
gender: string;
|
|
219
|
-
birthDate: string;
|
|
220
|
-
name?:
|
|
221
|
-
| {
|
|
222
|
-
family: string;
|
|
223
|
-
given: string[];
|
|
224
|
-
}[]
|
|
225
|
-
| undefined;
|
|
226
|
-
address?:
|
|
227
|
-
| {
|
|
228
|
-
state?: string | undefined;
|
|
229
|
-
line?: string[] | undefined;
|
|
230
|
-
city?: string | undefined;
|
|
231
|
-
postalCode?: string | undefined;
|
|
232
|
-
country?: string | undefined;
|
|
233
|
-
}[]
|
|
234
|
-
| undefined;
|
|
235
|
-
telecom?:
|
|
236
|
-
| {
|
|
237
|
-
value: string;
|
|
238
|
-
system: "phone" | "email";
|
|
239
|
-
}[]
|
|
240
|
-
| undefined;
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
gender: string;
|
|
244
|
-
birthDate: string;
|
|
245
|
-
name?:
|
|
246
|
-
| {
|
|
247
|
-
family: string;
|
|
248
|
-
given: string[];
|
|
249
|
-
}[]
|
|
250
|
-
| undefined;
|
|
251
|
-
address?:
|
|
252
|
-
| {
|
|
253
|
-
state?: string | undefined;
|
|
254
|
-
line?: string[] | undefined;
|
|
255
|
-
city?: string | undefined;
|
|
256
|
-
postalCode?: string | undefined;
|
|
257
|
-
country?: string | undefined;
|
|
258
|
-
}[]
|
|
259
|
-
| undefined;
|
|
260
|
-
telecom?:
|
|
261
|
-
| {
|
|
262
|
-
value: string;
|
|
263
|
-
system: "phone" | "email";
|
|
264
|
-
}[]
|
|
265
|
-
| undefined;
|
|
266
|
-
}
|
|
267
|
-
>;
|
|
268
|
-
},
|
|
269
|
-
"strip",
|
|
270
|
-
z.ZodTypeAny,
|
|
271
|
-
{
|
|
272
|
-
resource: {
|
|
273
|
-
gender: string;
|
|
274
|
-
birthDate: string;
|
|
275
|
-
name?:
|
|
276
|
-
| {
|
|
277
|
-
family: string;
|
|
278
|
-
given: string[];
|
|
279
|
-
}[]
|
|
280
|
-
| undefined;
|
|
281
|
-
address?:
|
|
282
|
-
| {
|
|
283
|
-
state?: string | undefined;
|
|
284
|
-
line?: string[] | undefined;
|
|
285
|
-
city?: string | undefined;
|
|
286
|
-
postalCode?: string | undefined;
|
|
287
|
-
country?: string | undefined;
|
|
288
|
-
}[]
|
|
289
|
-
| undefined;
|
|
290
|
-
telecom?:
|
|
291
|
-
| {
|
|
292
|
-
value: string;
|
|
293
|
-
system: "phone" | "email";
|
|
294
|
-
}[]
|
|
295
|
-
| undefined;
|
|
296
|
-
};
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
resource: {
|
|
300
|
-
gender: string;
|
|
301
|
-
birthDate: string;
|
|
302
|
-
name?:
|
|
303
|
-
| {
|
|
304
|
-
family: string;
|
|
305
|
-
given: string[];
|
|
306
|
-
}[]
|
|
307
|
-
| undefined;
|
|
308
|
-
address?:
|
|
309
|
-
| {
|
|
310
|
-
state?: string | undefined;
|
|
311
|
-
line?: string[] | undefined;
|
|
312
|
-
city?: string | undefined;
|
|
313
|
-
postalCode?: string | undefined;
|
|
314
|
-
country?: string | undefined;
|
|
315
|
-
}[]
|
|
316
|
-
| undefined;
|
|
317
|
-
telecom?:
|
|
318
|
-
| {
|
|
319
|
-
value: string;
|
|
320
|
-
system: "phone" | "email";
|
|
321
|
-
}[]
|
|
322
|
-
| undefined;
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
>,
|
|
326
|
-
"many"
|
|
327
|
-
>;
|
|
328
|
-
},
|
|
329
|
-
"strip",
|
|
330
|
-
z.ZodTypeAny,
|
|
331
|
-
{
|
|
332
|
-
entry: {
|
|
333
|
-
resource: {
|
|
334
|
-
gender: string;
|
|
335
|
-
birthDate: string;
|
|
336
|
-
name?:
|
|
337
|
-
| {
|
|
338
|
-
family: string;
|
|
339
|
-
given: string[];
|
|
340
|
-
}[]
|
|
341
|
-
| undefined;
|
|
342
|
-
address?:
|
|
343
|
-
| {
|
|
344
|
-
state?: string | undefined;
|
|
345
|
-
line?: string[] | undefined;
|
|
346
|
-
city?: string | undefined;
|
|
347
|
-
postalCode?: string | undefined;
|
|
348
|
-
country?: string | undefined;
|
|
349
|
-
}[]
|
|
350
|
-
| undefined;
|
|
351
|
-
telecom?:
|
|
352
|
-
| {
|
|
353
|
-
value: string;
|
|
354
|
-
system: "phone" | "email";
|
|
355
|
-
}[]
|
|
356
|
-
| undefined;
|
|
357
|
-
};
|
|
2
|
+
export declare const patientCustomFieldSchema: z.ZodObject<{
|
|
3
|
+
customfieldid: z.ZodString;
|
|
4
|
+
customfieldvalue: z.ZodString;
|
|
5
|
+
optionid: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
customfieldid: string;
|
|
8
|
+
customfieldvalue: string;
|
|
9
|
+
optionid?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
customfieldid: string;
|
|
12
|
+
customfieldvalue: string;
|
|
13
|
+
optionid?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type PatientCustomField = z.infer<typeof patientCustomFieldSchema>;
|
|
16
|
+
export declare const patientsCustomFieldsSchema: z.ZodArray<z.ZodObject<{
|
|
17
|
+
customfields: z.ZodArray<z.ZodObject<{
|
|
18
|
+
customfieldid: z.ZodString;
|
|
19
|
+
customfieldvalue: z.ZodString;
|
|
20
|
+
optionid: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
customfieldid: string;
|
|
23
|
+
customfieldvalue: string;
|
|
24
|
+
optionid?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
customfieldid: string;
|
|
27
|
+
customfieldvalue: string;
|
|
28
|
+
optionid?: string | undefined;
|
|
29
|
+
}>, "many">;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
customfields: {
|
|
32
|
+
customfieldid: string;
|
|
33
|
+
customfieldvalue: string;
|
|
34
|
+
optionid?: string | undefined;
|
|
358
35
|
}[];
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
birthDate: string;
|
|
365
|
-
name?:
|
|
366
|
-
| {
|
|
367
|
-
family: string;
|
|
368
|
-
given: string[];
|
|
369
|
-
}[]
|
|
370
|
-
| undefined;
|
|
371
|
-
address?:
|
|
372
|
-
| {
|
|
373
|
-
state?: string | undefined;
|
|
374
|
-
line?: string[] | undefined;
|
|
375
|
-
city?: string | undefined;
|
|
376
|
-
postalCode?: string | undefined;
|
|
377
|
-
country?: string | undefined;
|
|
378
|
-
}[]
|
|
379
|
-
| undefined;
|
|
380
|
-
telecom?:
|
|
381
|
-
| {
|
|
382
|
-
value: string;
|
|
383
|
-
system: "phone" | "email";
|
|
384
|
-
}[]
|
|
385
|
-
| undefined;
|
|
386
|
-
};
|
|
36
|
+
}, {
|
|
37
|
+
customfields: {
|
|
38
|
+
customfieldid: string;
|
|
39
|
+
customfieldvalue: string;
|
|
40
|
+
optionid?: string | undefined;
|
|
387
41
|
}[];
|
|
388
|
-
|
|
389
|
-
>;
|
|
390
|
-
|
|
391
|
-
//# sourceMappingURL=patient.d.ts.map
|
|
42
|
+
}>, "many">;
|
|
43
|
+
export type PatientsCustomFields = z.infer<typeof patientsCustomFieldsSchema>;
|
|
44
|
+
//# sourceMappingURL=patient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/patient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/athenahealth/patient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;WAI7B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|