@metriport/shared 0.33.4-alpha.0 → 0.33.5-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/__tests__/normalize-oid.test.js +24 -0
- package/dist/common/__tests__/normalize-oid.test.js.map +1 -1
- package/dist/common/normalize-oid.d.ts +5 -0
- package/dist/common/normalize-oid.d.ts.map +1 -1
- package/dist/common/normalize-oid.js +12 -0
- package/dist/common/normalize-oid.js.map +1 -1
- package/dist/domain/consolidated/recreate/supported-event-types.d.ts +3 -2
- package/dist/domain/consolidated/recreate/supported-event-types.d.ts.map +1 -1
- package/dist/domain/consolidated/recreate/supported-event-types.js +2 -0
- package/dist/domain/consolidated/recreate/supported-event-types.js.map +1 -1
- package/dist/domain/network-query/supported-event-types.d.ts +5 -6
- package/dist/domain/network-query/supported-event-types.d.ts.map +1 -1
- package/dist/domain/network-query/supported-event-types.js +4 -4
- package/dist/domain/network-query/supported-event-types.js.map +1 -1
- package/dist/domain/notification-webhooks/types.d.ts +4 -0
- package/dist/domain/notification-webhooks/types.d.ts.map +1 -1
- package/dist/domain/notification-webhooks/types.js +10 -1
- package/dist/domain/notification-webhooks/types.js.map +1 -1
- package/dist/domain/patient/adt-demographics.d.ts +114 -0
- package/dist/domain/patient/adt-demographics.d.ts.map +1 -0
- package/dist/domain/patient/adt-demographics.js +42 -0
- package/dist/domain/patient/adt-demographics.js.map +1 -0
- package/dist/interface/external/ehr/canvas/appointment.d.ts +15 -10
- package/dist/interface/external/ehr/canvas/appointment.d.ts.map +1 -1
- package/dist/interface/external/ehr/canvas/appointment.js +16 -2
- package/dist/interface/external/ehr/canvas/appointment.js.map +1 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +12 -0
- package/dist/interface/external/ehr/canvas/cx-mapping.d.ts.map +1 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.js +5 -0
- package/dist/interface/external/ehr/canvas/cx-mapping.js.map +1 -1
- package/dist/interface/external/surescripts/index.d.ts +1 -0
- package/dist/interface/external/surescripts/index.d.ts.map +1 -1
- package/dist/interface/external/surescripts/index.js +1 -0
- package/dist/interface/external/surescripts/index.js.map +1 -1
- package/dist/interface/external/surescripts/notifications/types.d.ts +4 -0
- package/dist/interface/external/surescripts/notifications/types.d.ts.map +1 -1
- package/dist/interface/external/surescripts/notifications/types.js +1 -0
- package/dist/interface/external/surescripts/notifications/types.js.map +1 -1
- package/dist/interface/external/surescripts/realtime-pulls/status-codes.d.ts +40 -2
- package/dist/interface/external/surescripts/realtime-pulls/status-codes.d.ts.map +1 -1
- package/dist/interface/external/surescripts/realtime-pulls/status-codes.js +4 -3
- package/dist/interface/external/surescripts/realtime-pulls/status-codes.js.map +1 -1
- package/dist/medical/fhir/condition-clinical-status-map.d.ts +7 -0
- package/dist/medical/fhir/condition-clinical-status-map.d.ts.map +1 -0
- package/dist/medical/fhir/condition-clinical-status-map.js +24 -0
- package/dist/medical/fhir/condition-clinical-status-map.js.map +1 -0
- package/dist/medical/fhir/condition-clinical-status-priority.d.ts +3 -0
- package/dist/medical/fhir/condition-clinical-status-priority.d.ts.map +1 -0
- package/dist/medical/fhir/condition-clinical-status-priority.js +44 -0
- package/dist/medical/fhir/condition-clinical-status-priority.js.map +1 -0
- package/dist/medical/index.d.ts +2 -0
- package/dist/medical/index.d.ts.map +1 -1
- package/dist/medical/index.js +2 -0
- package/dist/medical/index.js.map +1 -1
- package/dist/net/__tests__/retry.test.js +11 -0
- package/dist/net/__tests__/retry.test.js.map +1 -1
- package/dist/net/retry.d.ts +2 -0
- package/dist/net/retry.d.ts.map +1 -1
- package/dist/net/retry.js +9 -7
- package/dist/net/retry.js.map +1 -1
- package/dist/util/index.d.ts +0 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +0 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/sqs-delay-from-uuid.d.ts +0 -10
- package/dist/util/sqs-delay-from-uuid.d.ts.map +1 -1
- package/dist/util/sqs-delay-from-uuid.js +0 -19
- package/dist/util/sqs-delay-from-uuid.js.map +1 -1
- package/package.json +6 -2
|
@@ -65,4 +65,28 @@ describe("parseOid", () => {
|
|
|
65
65
|
expect((0, normalize_oid_1.parseOid)(oidWithLeadingAndTrailingJunk)).toBe(validOid);
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
|
+
describe("isBareOidValue", () => {
|
|
69
|
+
it("returns true only when the entire string is a valid OID", () => {
|
|
70
|
+
expect((0, normalize_oid_1.isBareOidValue)(validOid)).toBe(true);
|
|
71
|
+
expect((0, normalize_oid_1.isBareOidValue)(shorterValidOid)).toBe(true);
|
|
72
|
+
expect((0, normalize_oid_1.isBareOidValue)(longerValidOid)).toBe(true);
|
|
73
|
+
expect((0, normalize_oid_1.isBareOidValue)(oidWithLeadingZeros)).toBe(true);
|
|
74
|
+
expect((0, normalize_oid_1.isBareOidValue)(rootBoundaryZero)).toBe(true);
|
|
75
|
+
expect((0, normalize_oid_1.isBareOidValue)(rootBoundaryTwo)).toBe(true);
|
|
76
|
+
});
|
|
77
|
+
it("returns false for URIs and strings that contain but are not solely an OID", () => {
|
|
78
|
+
expect((0, normalize_oid_1.isBareOidValue)(oidAsPartOfUrl)).toBe(false);
|
|
79
|
+
expect((0, normalize_oid_1.isBareOidValue)(validOidWithPrefix)).toBe(false);
|
|
80
|
+
expect((0, normalize_oid_1.isBareOidValue)(validOidWithTrailingString)).toBe(false);
|
|
81
|
+
expect((0, normalize_oid_1.isBareOidValue)(oidWithLeadingAndTrailingJunk)).toBe(false);
|
|
82
|
+
expect((0, normalize_oid_1.isBareOidValue)(invalidOid)).toBe(false);
|
|
83
|
+
expect((0, normalize_oid_1.isBareOidValue)(shorterInvalidOid)).toBe(false);
|
|
84
|
+
expect((0, normalize_oid_1.isBareOidValue)(consecutiveDotsInvalidOid)).toBe(false);
|
|
85
|
+
expect((0, normalize_oid_1.isBareOidValue)(emptyString)).toBe(false);
|
|
86
|
+
});
|
|
87
|
+
it("does not treat parseOid-extractable URL segments as bare OIDs", () => {
|
|
88
|
+
expect((0, normalize_oid_1.parseOid)(oidAsPartOfUrl)).toBe(validOid);
|
|
89
|
+
expect((0, normalize_oid_1.isBareOidValue)(oidAsPartOfUrl)).toBe(false);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
68
92
|
//# sourceMappingURL=normalize-oid.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-oid.test.js","sourceRoot":"","sources":["../../../src/common/__tests__/normalize-oid.test.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"normalize-oid.test.js","sourceRoot":"","sources":["../../../src/common/__tests__/normalize-oid.test.ts"],"names":[],"mappings":";;AAAA,oDAA0E;AAE1E,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,QAAQ,GAAG,cAAc,CAAC;AAChC,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAClD,MAAM,UAAU,GAAG,UAAU,CAAC;AAC9B,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAClD,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAC1D,MAAM,6BAA6B,GAAG,8BAA8B,CAAC;AACrE,MAAM,cAAc,GAAG,6CAA6C,CAAC;AACrE,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAC5C,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,QAAQ,GAAG,KAAK,CAAC;AACvB,MAAM,WAAW,GAAG,eAAe,CAAC;AACpC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,gBAAgB,GAAG,OAAO,CAAC;AACjC,MAAM,eAAe,GAAG,WAAW,CAAC;AAEpC,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,CAAC,IAAA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AC,CAAC;QACnD,MAAM,CAAC,IAAA,8BAAc,EAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM,CAAC,IAAA,8BAAc,EAAC,0BAA0B,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,MAAM,CAAC,IAAA,8BAAc,EAAC,6BAA6B,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,CAAC,IAAA,8BAAc,EAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,CAAC,IAAA,8BAAc,EAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtD,MAAM,CAAC,IAAA,8BAAc,EAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9D,MAAM,CAAC,IAAA,8BAAc,EAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,CAAC,IAAA,wBAAQ,EAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,IAAA,8BAAc,EAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -6,4 +6,9 @@ export declare function normalizeOid(input: string): string;
|
|
|
6
6
|
* @throws Error if no valid OID can be found in the input
|
|
7
7
|
*/
|
|
8
8
|
export declare function parseOid(input: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Returns true when the entire string is a bare dotted-decimal OID (no URI prefix or path).
|
|
11
|
+
* Unlike {@link parseOid}, does not extract OID-like substrings from HTTP or other URIs.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isBareOidValue(value: string): boolean;
|
|
9
14
|
//# sourceMappingURL=normalize-oid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-oid.d.ts","sourceRoot":"","sources":["../../src/common/normalize-oid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalize-oid.d.ts","sourceRoot":"","sources":["../../src/common/normalize-oid.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYlD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAwC9C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKrD"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOid = normalizeOid;
|
|
4
4
|
exports.parseOid = parseOid;
|
|
5
|
+
exports.isBareOidValue = isBareOidValue;
|
|
5
6
|
const OID_REGEX = /(?:[^.\d]*)((([0-9]*)(?:\.*))*)*(?:[^.\d]*)/;
|
|
7
|
+
const BARE_OID_VALUE_PATTERN = /^[0-9]+(?:\.[0-9]+)*$/;
|
|
6
8
|
function normalizeOid(input) {
|
|
7
9
|
const match = input.match(OID_REGEX);
|
|
8
10
|
// The OID should not contain "..". If it does, it is not a valid OID.
|
|
@@ -57,6 +59,16 @@ function parseOid(input) {
|
|
|
57
59
|
}
|
|
58
60
|
throw new Error("No valid OID found in input string");
|
|
59
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns true when the entire string is a bare dotted-decimal OID (no URI prefix or path).
|
|
64
|
+
* Unlike {@link parseOid}, does not extract OID-like substrings from HTTP or other URIs.
|
|
65
|
+
*/
|
|
66
|
+
function isBareOidValue(value) {
|
|
67
|
+
if (!value || !BARE_OID_VALUE_PATTERN.test(value)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
return isValidOid(value);
|
|
71
|
+
}
|
|
60
72
|
/**
|
|
61
73
|
* Validates if a string is a valid OID
|
|
62
74
|
* @param oid - The OID string to validate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-oid.js","sourceRoot":"","sources":["../../src/common/normalize-oid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalize-oid.js","sourceRoot":"","sources":["../../src/common/normalize-oid.ts"],"names":[],"mappings":";;;;;AAAA,MAAM,SAAS,GAAG,6CAA6C,CAAC;AAChE,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAEvD,sBAA6B,KAAa;IACxC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACrC,sEAAsE;IACtE,2GAA2G;IAC3G,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACtB,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;YACrE,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;AACtC,CAAC;AAED;;;;;GAKG;AACH,kBAAyB,KAAa;IACpC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IAED,0DAA0D;IAC1D,uEAAuE;IACvE,MAAM,WAAW,GAAG;QAClB,gCAAgC;QAChC,gCAAgC;QAChC,+BAA+B;QAC/B,+BAA+B;QAC/B,yBAAyB;QACzB,wBAAwB;KACzB,CAAC;IAEF,uCAAuC;IACvC,KAAK,MAAM,OAAO,IAAI,WAAW,EA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,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/B,OAAO,kBAAkB,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC;QAC9C,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY;IACtC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { SurescriptsNotificationsEventType } from "../../../interface/external/surescripts/notifications/types";
|
|
2
3
|
import { AiBriefCacheMode } from "../ai-brief-cache-mode";
|
|
3
4
|
import { SurescriptsRealtimePullsConversionStatusCode } from "../../../interface/external/surescripts/realtime-pulls/status-codes";
|
|
4
|
-
export declare const ConsolidatedRecreateSupportedEventTypes: readonly [SurescriptsRealtimePullsConversionStatusCode.converted, SurescriptsRealtimePullsConversionStatusCode.internalSurescriptsError, SurescriptsRealtimePullsConversionStatusCode.moreDataAvailable];
|
|
5
|
+
export declare const ConsolidatedRecreateSupportedEventTypes: readonly [SurescriptsRealtimePullsConversionStatusCode.converted, SurescriptsRealtimePullsConversionStatusCode.internalSurescriptsError, SurescriptsRealtimePullsConversionStatusCode.moreDataAvailable, SurescriptsNotificationsEventType];
|
|
5
6
|
export type ConsolidatedRecreateSupportedEventType = (typeof ConsolidatedRecreateSupportedEventTypes)[number];
|
|
6
|
-
export declare const consolidatedRecreateSupportedEventTypeSchema: z.ZodEnum<[SurescriptsRealtimePullsConversionStatusCode.converted, SurescriptsRealtimePullsConversionStatusCode.internalSurescriptsError, SurescriptsRealtimePullsConversionStatusCode.moreDataAvailable]>;
|
|
7
|
+
export declare const consolidatedRecreateSupportedEventTypeSchema: z.ZodEnum<[SurescriptsRealtimePullsConversionStatusCode.converted, SurescriptsRealtimePullsConversionStatusCode.internalSurescriptsError, SurescriptsRealtimePullsConversionStatusCode.moreDataAvailable, SurescriptsNotificationsEventType]>;
|
|
7
8
|
export declare function getAiBriefCacheModeBasedOnEventType(eventType: ConsolidatedRecreateSupportedEventType): AiBriefCacheMode;
|
|
8
9
|
//# sourceMappingURL=supported-event-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-event-types.d.ts","sourceRoot":"","sources":["../../../../src/domain/consolidated/recreate/supported-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,4CAA4C,EAAE,MAAM,qEAAqE,CAAC;
|
|
1
|
+
{"version":3,"file":"supported-event-types.d.ts","sourceRoot":"","sources":["../../../../src/domain/consolidated/recreate/supported-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iCAAiC,EAAE,MAAM,6DAA6D,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,4CAA4C,EAAE,MAAM,qEAAqE,CAAC;AAWnI,eAAO,MAAM,uCAAuC,6OAG1C,CAAC;AAEX,MAAM,MAAM,sCAAsC,GAChD,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,eAAO,MAAM,4CAA4C,+OAExD,CAAC;AAEF,wBAAgB,mCAAmC,CACjD,SAAS,EAAE,sCAAsC,GAChD,gBAAgB,CAMlB"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.consolidatedRecreateSupportedEventTypeSchema = exports.ConsolidatedRecreateSupportedEventTypes = void 0;
|
|
4
4
|
exports.getAiBriefCacheModeBasedOnEventType = getAiBriefCacheModeBasedOnEventType;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
+
const types_1 = require("../../../interface/external/surescripts/notifications/types");
|
|
6
7
|
const ai_brief_cache_mode_1 = require("../ai-brief-cache-mode");
|
|
7
8
|
const status_codes_1 = require("../../../interface/external/surescripts/realtime-pulls/status-codes");
|
|
8
9
|
const cacheAiBriefCacheModeEventTypes = [];
|
|
@@ -10,6 +11,7 @@ const generateAiBriefCacheModeEventTypes = [
|
|
|
10
11
|
status_codes_1.SurescriptsRealtimePullsConversionStatusCode.converted,
|
|
11
12
|
status_codes_1.SurescriptsRealtimePullsConversionStatusCode.internalSurescriptsError,
|
|
12
13
|
status_codes_1.SurescriptsRealtimePullsConversionStatusCode.moreDataAvailable,
|
|
14
|
+
types_1.SurescriptsNotificationsEventType.converted,
|
|
13
15
|
];
|
|
14
16
|
exports.ConsolidatedRecreateSupportedEventTypes = [
|
|
15
17
|
...cacheAiBriefCacheModeEventTypes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-event-types.js","sourceRoot":"","sources":["../../../../src/domain/consolidated/recreate/supported-event-types.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AACxB,gEAA0D;AAC1D,sGAAmI;AAEnI,MAAM,+BAA+B,GAAG,EAAW,CAAC;AAEpD,MAAM,kCAAkC,GAAG;IACzC,2DAA4C,CAAC,SAAS;IACtD,2DAA4C,CAAC,wBAAwB;IACrE,2DAA4C,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"supported-event-types.js","sourceRoot":"","sources":["../../../../src/domain/consolidated/recreate/supported-event-types.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AACxB,uFAAgH;AAChH,gEAA0D;AAC1D,sGAAmI;AAEnI,MAAM,+BAA+B,GAAG,EAAW,CAAC;AAEpD,MAAM,kCAAkC,GAAG;IACzC,2DAA4C,CAAC,SAAS;IACtD,2DAA4C,CAAC,wBAAwB;IACrE,2DAA4C,CAAC,iBAAiB;IAC9D,yCAAiC,CAAC,SAAS;CACnC,CAAC;AAEE,QAAA,uCAAuC,GAAG;IACrD,GAAG,+BAA+B;IAClC,GAAG,kCAAkC;CAC7B,CAAC;AAKE,QAAA,4CAA4C,GAAG,OAAC,CAAC,IAAI,CAChE,QAAA,uCAAuC,CACxC,CAAC;AAEF,6CACE,SAAiD;IAEjD,MAAM,KAAK,GAAsD,+BAA+B,CAAC;IACjG,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,OAAO,sCAAgB,CAAC,KAAK,CAAC;IAChC,CAAC;IACD,OAAO,sCAAgB,CAAC,QAAQ,CAAC;AACnC,CAAC"}
|
|
@@ -2,17 +2,16 @@ import { z } from "zod";
|
|
|
2
2
|
import { SurescriptsRealtimePullsConversionStatusCode } from "../../interface/external/surescripts/realtime-pulls/status-codes";
|
|
3
3
|
import { DatasourceQueryStatus, NetworkSource, SpecificSource } from "./source";
|
|
4
4
|
import { ConsolidatedRecreateEvent } from "../consolidated/recreate";
|
|
5
|
-
declare const
|
|
5
|
+
export declare const NetworkQuerySupportedSourceEventTypes: readonly [SurescriptsRealtimePullsConversionStatusCode.converted, SurescriptsRealtimePullsConversionStatusCode.internalError];
|
|
6
6
|
export declare const SupportedEventTypes: readonly [SurescriptsRealtimePullsConversionStatusCode.converted, SurescriptsRealtimePullsConversionStatusCode.internalError, ConsolidatedRecreateEvent.completed, ConsolidatedRecreateEvent.failed];
|
|
7
|
-
export type
|
|
7
|
+
export type NetworkQuerySupportedSourceEventTypesType = (typeof NetworkQuerySupportedSourceEventTypes)[number];
|
|
8
8
|
export type SupportedEventType = (typeof SupportedEventTypes)[number];
|
|
9
|
-
export declare const supportedEventTypeSchema: z.ZodEnum<[SurescriptsRealtimePullsConversionStatusCode.converted | SurescriptsRealtimePullsConversionStatusCode.internalError
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const supportedEventTypeSchema: z.ZodEnum<[ConsolidatedRecreateEvent | SurescriptsRealtimePullsConversionStatusCode.converted | SurescriptsRealtimePullsConversionStatusCode.internalError, ...(ConsolidatedRecreateEvent | SurescriptsRealtimePullsConversionStatusCode.converted | SurescriptsRealtimePullsConversionStatusCode.internalError)[]]>;
|
|
10
|
+
export declare const NetworkQuerySupportedSourceEventTypesTypeSchema: z.ZodEnum<[SurescriptsRealtimePullsConversionStatusCode.converted | SurescriptsRealtimePullsConversionStatusCode.internalError, ...(SurescriptsRealtimePullsConversionStatusCode.converted | SurescriptsRealtimePullsConversionStatusCode.internalError)[]]>;
|
|
11
11
|
export type NetworkQueryUpdateMetadata = {
|
|
12
12
|
toStatus: DatasourceQueryStatus;
|
|
13
13
|
source: NetworkSource;
|
|
14
14
|
specificSource: SpecificSource;
|
|
15
15
|
};
|
|
16
|
-
export declare function mapEventTypeToMetadata(eventType: SupportedEventType, sourceEventType?:
|
|
17
|
-
export {};
|
|
16
|
+
export declare function mapEventTypeToMetadata(eventType: SupportedEventType, sourceEventType?: NetworkQuerySupportedSourceEventTypesType | undefined): NetworkQueryUpdateMetadata;
|
|
18
17
|
//# sourceMappingURL=supported-event-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-event-types.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/supported-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4CAA4C,EAAE,MAAM,kEAAkE,CAAC;AAChI,OAAO,EACL,qBAAqB,EACrB,aAAa,EAEb,cAAc,EAEf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,
|
|
1
|
+
{"version":3,"file":"supported-event-types.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/supported-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4CAA4C,EAAE,MAAM,kEAAkE,CAAC;AAChI,OAAO,EACL,qBAAqB,EACrB,aAAa,EAEb,cAAc,EAEf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,qCAAqC,+HAGxC,CAAC;AAEX,eAAO,MAAM,mBAAmB,sMAItB,CAAC;AAEX,MAAM,MAAM,yCAAyC,GACnD,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB,sTAEpC,CAAC;AAEF,eAAO,MAAM,+CAA+C,8PAK3D,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAuBF,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,kBAAkB,EAC7B,eAAe,CAAC,EAAE,yCAAyC,GAAG,SAAS,GACtE,0BAA0B,CAwB5B"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NetworkQuerySupportedSourceEventTypesTypeSchema = exports.supportedEventTypeSchema = exports.SupportedEventTypes = exports.NetworkQuerySupportedSourceEventTypes = void 0;
|
|
4
4
|
exports.mapEventTypeToMetadata = mapEventTypeToMetadata;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const metriport_error_1 = require("../../error/metriport-error");
|
|
7
7
|
const status_codes_1 = require("../../interface/external/surescripts/realtime-pulls/status-codes");
|
|
8
8
|
const source_1 = require("./source");
|
|
9
9
|
const recreate_1 = require("../consolidated/recreate");
|
|
10
|
-
|
|
10
|
+
exports.NetworkQuerySupportedSourceEventTypes = [
|
|
11
11
|
status_codes_1.SurescriptsRealtimePullsConversionStatusCode.converted,
|
|
12
12
|
status_codes_1.SurescriptsRealtimePullsConversionStatusCode.internalError,
|
|
13
13
|
];
|
|
14
14
|
exports.SupportedEventTypes = [
|
|
15
|
-
...
|
|
15
|
+
...exports.NetworkQuerySupportedSourceEventTypes,
|
|
16
16
|
recreate_1.ConsolidatedRecreateEvent.completed,
|
|
17
17
|
recreate_1.ConsolidatedRecreateEvent.failed,
|
|
18
18
|
];
|
|
19
19
|
exports.supportedEventTypeSchema = zod_1.z.enum(exports.SupportedEventTypes);
|
|
20
|
-
exports.
|
|
20
|
+
exports.NetworkQuerySupportedSourceEventTypesTypeSchema = zod_1.z.enum(exports.NetworkQuerySupportedSourceEventTypes);
|
|
21
21
|
function metadataForConversionStatus(status) {
|
|
22
22
|
switch (status) {
|
|
23
23
|
case status_codes_1.SurescriptsRealtimePullsConversionStatusCode.converted: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-event-types.js","sourceRoot":"","sources":["../../../src/domain/network-query/supported-event-types.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AACxB,iEAA6D;AAC7D,mGAAgI;AAChI,qCAMkB;AAClB,uDAAqE;
|
|
1
|
+
{"version":3,"file":"supported-event-types.js","sourceRoot":"","sources":["../../../src/domain/network-query/supported-event-types.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AACxB,iEAA6D;AAC7D,mGAAgI;AAChI,qCAMkB;AAClB,uDAAqE;AAExD,QAAA,qCAAqC,GAAG;IACnD,2DAA4C,CAAC,SAAS;IACtD,2DAA4C,CAAC,aAAa;CAClD,CAAC;AAEE,QAAA,mBAAmB,GAAG;IACjC,GAAG,Q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vC,CAAC;IACJ,CAAC;IACD,OAAO,2BAA2B,CAAC,SAAS,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SurescriptsNotificationsEventType } from "../../interface/external/surescripts/notifications/types";
|
|
2
|
+
import { ConsolidatedRecreateEvent } from "../../domain/consolidated/recreate";
|
|
1
3
|
export declare enum NotificationWebhookEvent {
|
|
2
4
|
PharmacyNotification = "patient.pharmacy",
|
|
3
5
|
LaboratoryNotification = "patient.laboratory"
|
|
@@ -26,4 +28,6 @@ export type SendPatientNotificationWebhookRequest = {
|
|
|
26
28
|
};
|
|
27
29
|
export declare function isPharmacyNotification(event: NotificationWebhookEvent): boolean;
|
|
28
30
|
export declare function isLaboratoryNotification(event: NotificationWebhookEvent): boolean;
|
|
31
|
+
export declare const SurescriptsWebhookNotificationSupportedSourceEventTypes: SurescriptsNotificationsEventType[];
|
|
32
|
+
export declare const SurescriptsWebhookNotificationSupportedEventTypes: readonly [...SurescriptsNotificationsEventType[], ConsolidatedRecreateEvent.completed];
|
|
29
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/domain/notification-webhooks/types.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,oBAAoB,qBAAqB;IACzC,sBAAsB,uBAAuB;CAC9C;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,8BAA8B,GAAG;IAChF,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,M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BAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,QAAQ,IAAI;IACjD,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAE/E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAEjF;AAED,eAAO,MAAM,uDAAuD,qCAEnE,CAAC;AAEF,eAAO,MAAM,iDAAiD,wFAGpD,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationWebhookEvent = void 0;
|
|
3
|
+
exports.SurescriptsWebhookNotificationSupportedEventTypes = exports.SurescriptsWebhookNotificationSupportedSourceEventTypes = exports.NotificationWebhookEvent = void 0;
|
|
4
4
|
exports.isPharmacyNotification = isPharmacyNotification;
|
|
5
5
|
exports.isLaboratoryNotification = isLaboratoryNotification;
|
|
6
|
+
const types_1 = require("../../interface/external/surescripts/notifications/types");
|
|
7
|
+
const recreate_1 = require("../../domain/consolidated/recreate");
|
|
6
8
|
var NotificationWebhookEvent;
|
|
7
9
|
(function (NotificationWebhookEvent) {
|
|
8
10
|
NotificationWebhookEvent["PharmacyNotification"] = "patient.pharmacy";
|
|
@@ -14,4 +16,11 @@ function isPharmacyNotification(event) {
|
|
|
14
16
|
function isLaboratoryNotification(event) {
|
|
15
17
|
return event === NotificationWebhookEvent.LaboratoryNotification;
|
|
16
18
|
}
|
|
19
|
+
exports.SurescriptsWebhookNotificationSupportedSourceEventTypes = [
|
|
20
|
+
types_1.SurescriptsNotificationsEventType.converted,
|
|
21
|
+
];
|
|
22
|
+
exports.SurescriptsWebhookNotificationSupportedEventTypes = [
|
|
23
|
+
...exports.SurescriptsWebhookNotificationSupportedSourceEventTypes,
|
|
24
|
+
recreate_1.ConsolidatedRecreateEvent.completed,
|
|
25
|
+
];
|
|
17
26
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/domain/notification-webhooks/types.ts"],"names":[],"mappings":";;;;;AAAA,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,qEAAyC,CAAA;IACzC,yEAA6C,CAAA;AAC/C,CAAC,EAHW,wBAAwB,aAAxB,wBAAwB,GAAxB,wBAAwB,QAGnC;AA6BD,gCAAuC,KAA+B;IACpE,OAAO,KAAK,KAAK,wBAAwB,CAAC,oBAAoB,CAAC;AACjE,CAAC;AAED,kCAAyC,KAA+B;IACtE,OAAO,KAAK,KAAK,wBAAwB,CAAC,sBAAsB,CAAC;AACnE,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/domain/notification-webhooks/types.ts"],"names":[],"mappings":";;;;;AAAA,oFAA6G;AAC7G,iEAA+E;AAE/E,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,qEAAyC,CAAA;IACzC,yEAA6C,CAAA;AAC/C,CAAC,EAHW,wBAAwB,aAAxB,wBAAwB,GAAxB,wBAAwB,QAGnC;AA6BD,gCAAuC,KAA+B;IACpE,OAAO,KAAK,KAAK,wBAAwB,CAAC,oBAAoB,CAAC;AACjE,CAAC;AAED,kCAAyC,KAA+B;IACtE,OAAO,KAAK,KAAK,wBAAwB,CAAC,sBAAsB,CAAC;AACnE,CAAC;AAEY,QAAA,uDAAuD,GAAG;IACrE,yCAAiC,CAAC,SAAS;CAC5C,CAAC;AAEW,QAAA,iDAAiD,GAAG;IAC/D,GAAG,QAAA,uDAAuD;IAC1D,oCAAyB,CAAC,SAAS;CAC3B,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const adtPatientDemographicsSnapshotSchema: z.ZodObject<{
|
|
3
|
+
familyName: z.ZodOptional<z.ZodString>;
|
|
4
|
+
givenNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5
|
+
dob: z.ZodOptional<z.ZodString>;
|
|
6
|
+
gender: z.ZodOptional<z.ZodString>;
|
|
7
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
|
8
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
|
9
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
12
|
+
country: z.ZodOptional<z.ZodString>;
|
|
13
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
14
|
+
ssn: z.ZodOptional<z.ZodString>;
|
|
15
|
+
driversLicense: z.ZodOptional<z.ZodString>;
|
|
16
|
+
driversLicenseState: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
familyName?: string | undefined;
|
|
19
|
+
givenNames?: string[] | undefined;
|
|
20
|
+
dob?: string | undefined;
|
|
21
|
+
gender?: string | undefined;
|
|
22
|
+
addressLine1?: string | undefined;
|
|
23
|
+
addressLine2?: string | undefined;
|
|
24
|
+
city?: string | undefined;
|
|
25
|
+
state?: string | undefined;
|
|
26
|
+
zip?: string | undefined;
|
|
27
|
+
country?: string | undefined;
|
|
28
|
+
phone?: string | undefined;
|
|
29
|
+
ssn?: string | undefined;
|
|
30
|
+
driversLicense?: string | undefined;
|
|
31
|
+
driversLicenseState?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
familyName?: string | undefined;
|
|
34
|
+
givenNames?: string[] | undefined;
|
|
35
|
+
dob?: string | undefined;
|
|
36
|
+
gender?: string | undefined;
|
|
37
|
+
addressLine1?: string | undefined;
|
|
38
|
+
addressLine2?: string | undefined;
|
|
39
|
+
city?: string | undefined;
|
|
40
|
+
state?: string | undefined;
|
|
41
|
+
zip?: string | undefined;
|
|
42
|
+
country?: string | undefined;
|
|
43
|
+
phone?: string | undefined;
|
|
44
|
+
ssn?: string | undefined;
|
|
45
|
+
driversLicense?: string | undefined;
|
|
46
|
+
driversLicenseState?: string | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
export type AdtPatientDemographicsSnapshot = z.infer<typeof adtPatientDemographicsSnapshotSchema>;
|
|
49
|
+
export declare const adtPatientDataUpsertSchema: z.ZodObject<{
|
|
50
|
+
adtLinks: z.ZodArray<z.ZodObject<{
|
|
51
|
+
patientId: z.ZodString;
|
|
52
|
+
systemId: z.ZodString;
|
|
53
|
+
oid: z.ZodString;
|
|
54
|
+
url: z.ZodString;
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
patientResource: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
patientId: string;
|
|
59
|
+
systemId: string;
|
|
60
|
+
oid: string;
|
|
61
|
+
url: string;
|
|
62
|
+
id: string;
|
|
63
|
+
patientResource?: Record<string, unknown> | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
patientId: string;
|
|
66
|
+
systemId: string;
|
|
67
|
+
oid: string;
|
|
68
|
+
url: string;
|
|
69
|
+
id: string;
|
|
70
|
+
patientResource?: Record<string, unknown> | undefined;
|
|
71
|
+
}>, "many">;
|
|
72
|
+
requestLinksDemographics: z.ZodObject<{
|
|
73
|
+
requestId: z.ZodString;
|
|
74
|
+
linksDemographics: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
requestId: string;
|
|
77
|
+
linksDemographics: Record<string, unknown>[];
|
|
78
|
+
}, {
|
|
79
|
+
requestId: string;
|
|
80
|
+
linksDemographics: Record<string, unknown>[];
|
|
81
|
+
}>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
adtLinks: {
|
|
84
|
+
patientId: string;
|
|
85
|
+
systemId: string;
|
|
86
|
+
oid: string;
|
|
87
|
+
url: string;
|
|
88
|
+
id: string;
|
|
89
|
+
patientResource?: Record<string, unknown> | undefined;
|
|
90
|
+
}[];
|
|
91
|
+
requestLinksDemographics: {
|
|
92
|
+
requestId: string;
|
|
93
|
+
linksDemographics: Record<string, unknown>[];
|
|
94
|
+
};
|
|
95
|
+
}, {
|
|
96
|
+
adtLinks: {
|
|
97
|
+
patientId: string;
|
|
98
|
+
systemId: string;
|
|
99
|
+
oid: string;
|
|
100
|
+
url: string;
|
|
101
|
+
id: string;
|
|
102
|
+
patientResource?: Record<string, unknown> | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
requestLinksDemographics: {
|
|
105
|
+
requestId: string;
|
|
106
|
+
linksDemographics: Record<string, unknown>[];
|
|
107
|
+
};
|
|
108
|
+
}>;
|
|
109
|
+
export type AdtPatientDataUpsert = z.infer<typeof adtPatientDataUpsertSchema>;
|
|
110
|
+
export declare function createEmptyAdtData(): {
|
|
111
|
+
links: [];
|
|
112
|
+
linkDemographicsHistory: Record<string, never>;
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=adt-demographics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adt-demographics.d.ts","sourceRoot":"","sources":["../../../src/domain/patient/adt-demographics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAerC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,wBAAgB,kBAAkB,IAAI;IACpC,KAAK,EAAE,EAAE,CAAC;IACV,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAChD,CAKA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adtPatientDataUpsertSchema = exports.adtPatientDemographicsSnapshotSchema = void 0;
|
|
4
|
+
exports.createEmptyAdtData = createEmptyAdtData;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.adtPatientDemographicsSnapshotSchema = zod_1.z.object({
|
|
7
|
+
familyName: zod_1.z.string().optional(),
|
|
8
|
+
givenNames: zod_1.z.array(zod_1.z.string()).optional(),
|
|
9
|
+
dob: zod_1.z.string().optional(),
|
|
10
|
+
gender: zod_1.z.string().optional(),
|
|
11
|
+
addressLine1: zod_1.z.string().optional(),
|
|
12
|
+
addressLine2: zod_1.z.string().optional(),
|
|
13
|
+
city: zod_1.z.string().optional(),
|
|
14
|
+
state: zod_1.z.string().optional(),
|
|
15
|
+
zip: zod_1.z.string().optional(),
|
|
16
|
+
country: zod_1.z.string().optional(),
|
|
17
|
+
phone: zod_1.z.string().optional(),
|
|
18
|
+
ssn: zod_1.z.string().optional(),
|
|
19
|
+
driversLicense: zod_1.z.string().optional(),
|
|
20
|
+
driversLicenseState: zod_1.z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
exports.adtPatientDataUpsertSchema = zod_1.z.object({
|
|
23
|
+
adtLinks: zod_1.z.array(zod_1.z.object({
|
|
24
|
+
patientId: zod_1.z.string(),
|
|
25
|
+
systemId: zod_1.z.string(),
|
|
26
|
+
oid: zod_1.z.string(),
|
|
27
|
+
url: zod_1.z.string(),
|
|
28
|
+
id: zod_1.z.string(),
|
|
29
|
+
patientResource: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
30
|
+
})),
|
|
31
|
+
requestLinksDemographics: zod_1.z.object({
|
|
32
|
+
requestId: zod_1.z.string(),
|
|
33
|
+
linksDemographics: zod_1.z.array(zod_1.z.record(zod_1.z.unknown())),
|
|
34
|
+
}),
|
|
35
|
+
});
|
|
36
|
+
function createEmptyAdtData() {
|
|
37
|
+
return {
|
|
38
|
+
links: [],
|
|
39
|
+
linkDemographicsHistory: {},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=adt-demographics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adt-demographics.js","sourceRoot":"","sources":["../../../src/domain/patient/adt-demographics.ts"],"names":[],"mappings":";;;AAsCA,gDAQC;AA9CD,6BAAwB;AAEX,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5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
|
|
8
8
|
}>;
|
|
9
9
|
export type SlimBookedAppointment = z.infer<typeof slimBookedAppointmentSchema>;
|
|
10
|
+
export declare const canvasAppointmentStatuses: readonly ["proposed", "pending", "booked", "arrived", "checked-in", "fulfilled", "noshow", "cancelled", "entered-in-error"];
|
|
11
|
+
export declare const canvasAppointmentStatusSchema: z.ZodEnum<["proposed", "pending", "booked", "arrived", "checked-in", "fulfilled", "noshow", "cancelled", "entered-in-error"]>;
|
|
12
|
+
export type CanvasAppointmentStatus = z.infer<typeof canvasAppointmentStatusSchema>;
|
|
13
|
+
export declare const canvasAppointmentStatusSearchSchema: z.ZodEnum<["arrived" | "booked" | "cancelled" | "checked-in" | "fulfilled" | "noshow" | "pending" | "proposed", ...("arrived" | "booked" | "cancelled" | "checked-in" | "fulfilled" | "noshow" | "pending" | "proposed")[]]>;
|
|
14
|
+
export type CanvasAppointmentStatusSearch = z.infer<typeof canvasAppointmentStatusSearchSchema>;
|
|
10
15
|
export declare const appointmentSchema: z.ZodObject<{
|
|
11
16
|
resourceType: z.ZodLiteral<"Appointment">;
|
|
12
17
|
participant: z.ZodArray<z.ZodObject<{
|
|
@@ -31,7 +36,7 @@ export declare const appointmentSchema: z.ZodObject<{
|
|
|
31
36
|
type: "Patient" | "Practitioner";
|
|
32
37
|
};
|
|
33
38
|
}>, "many">;
|
|
34
|
-
status: z.
|
|
39
|
+
status: z.ZodEnum<["proposed", "pending", "booked", "arrived", "checked-in", "fulfilled", "noshow", "cancelled", "entered-in-error"]>;
|
|
35
40
|
}, "strip", z.ZodTypeAny, {
|
|
36
41
|
resourceType: "Appointment";
|
|
37
42
|
participant: {
|
|
@@ -40,7 +45,7 @@ export declare const appointmentSchema: z.ZodObject<{
|
|
|
40
45
|
type: "Patient" | "Practitioner";
|
|
41
46
|
};
|
|
42
47
|
}[];
|
|
43
|
-
status:
|
|
48
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
44
49
|
}, {
|
|
45
50
|
resourceType: "Appointment";
|
|
46
51
|
participant: {
|
|
@@ -49,7 +54,7 @@ export declare const appointmentSchema: z.ZodObject<{
|
|
|
49
54
|
type: "Patient" | "Practitioner";
|
|
50
55
|
};
|
|
51
56
|
}[];
|
|
52
|
-
status:
|
|
57
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
53
58
|
}>;
|
|
54
59
|
export type Appointment = z.infer<typeof appointmentSchema>;
|
|
55
60
|
export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
@@ -78,7 +83,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
78
83
|
type: "Patient" | "Practitioner";
|
|
79
84
|
};
|
|
80
85
|
}>, "many">;
|
|
81
|
-
status: z.
|
|
86
|
+
status: z.ZodEnum<["proposed", "pending", "booked", "arrived", "checked-in", "fulfilled", "noshow", "cancelled", "entered-in-error"]>;
|
|
82
87
|
}, "strip", z.ZodTypeAny, {
|
|
83
88
|
resourceType: "Appointment";
|
|
84
89
|
participant: {
|
|
@@ -87,7 +92,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
87
92
|
type: "Patient" | "Practitioner";
|
|
88
93
|
};
|
|
89
94
|
}[];
|
|
90
|
-
status:
|
|
95
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
91
96
|
}, {
|
|
92
97
|
resourceType: "Appointment";
|
|
93
98
|
participant: {
|
|
@@ -96,7 +101,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
96
101
|
type: "Patient" | "Practitioner";
|
|
97
102
|
};
|
|
98
103
|
}[];
|
|
99
|
-
status:
|
|
104
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
100
105
|
}>;
|
|
101
106
|
}, "strip", z.ZodTypeAny, {
|
|
102
107
|
resource: {
|
|
@@ -107,7 +112,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
107
112
|
type: "Patient" | "Practitioner";
|
|
108
113
|
};
|
|
109
114
|
}[];
|
|
110
|
-
status:
|
|
115
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
111
116
|
};
|
|
112
117
|
}, {
|
|
113
118
|
resource: {
|
|
@@ -118,7 +123,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
118
123
|
type: "Patient" | "Practitioner";
|
|
119
124
|
};
|
|
120
125
|
}[];
|
|
121
|
-
status:
|
|
126
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
122
127
|
};
|
|
123
128
|
}>, "many">>;
|
|
124
129
|
link: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -141,7 +146,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
141
146
|
type: "Patient" | "Practitioner";
|
|
142
147
|
};
|
|
143
148
|
}[];
|
|
144
|
-
status:
|
|
149
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
145
150
|
};
|
|
146
151
|
}[] | undefined;
|
|
147
152
|
link?: {
|
|
@@ -158,7 +163,7 @@ export declare const appointmentListResponseSchema: z.ZodObject<{
|
|
|
158
163
|
type: "Patient" | "Practitioner";
|
|
159
164
|
};
|
|
160
165
|
}[];
|
|
161
|
-
status:
|
|
166
|
+
status: "arrived" | "booked" | "cancelled" | "checked-in" | "entered-in-error" | "fulfilled" | "noshow" | "pending" | "proposed";
|
|
162
167
|
};
|
|
163
168
|
}[] | undefined;
|
|
164
169
|
link?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/canvas/appointment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;;;;EAEtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"appointment.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/canvas/appointment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;;;;EAEtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,yBAAyB,YACpC,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,WAAW,EACX,kBAAkB,CACV,CAAC;AAEX,eAAO,MAAM,6BAA6B,+HAAoC,CAAC;AAC/E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAGpF,eAAO,MAAM,mCAAmC,8NAK/C,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appointmentListResponseSchema = exports.appointmentSchema = exports.slimBookedAppointmentSchema = void 0;
|
|
3
|
+
exports.appointmentListResponseSchema = exports.appointmentSchema = exports.canvasAppointmentStatusSearchSchema = exports.canvasAppointmentStatusSchema = exports.canvasAppointmentStatuses = exports.slimBookedAppointmentSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.slimBookedAppointmentSchema = zod_1.z.object({
|
|
6
6
|
patientId: zod_1.z.string(),
|
|
7
7
|
});
|
|
8
|
+
exports.canvasAppointmentStatuses = [
|
|
9
|
+
"proposed", // unconfirmed (in canvas)
|
|
10
|
+
"pending", // attempted (in canvas)
|
|
11
|
+
"booked", // confirmed (in canvas)
|
|
12
|
+
"arrived", // arrived (in canvas)
|
|
13
|
+
"checked-in", // roomed (in canvas)
|
|
14
|
+
"fulfilled", // exited (in canvas)
|
|
15
|
+
"noshow", // no-showed (in canvas)
|
|
16
|
+
"cancelled", // cancelled (in canvas)
|
|
17
|
+
"entered-in-error", // deleted (in canvas)
|
|
18
|
+
];
|
|
19
|
+
exports.canvasAppointmentStatusSchema = zod_1.z.enum(exports.canvasAppointmentStatuses);
|
|
20
|
+
// "entered-in-error" is not supported for search
|
|
21
|
+
exports.canvasAppointmentStatusSearchSchema = zod_1.z.enum(exports.canvasAppointmentStatuses.filter(status => status !== "entered-in-error"));
|
|
8
22
|
exports.appointmentSchema = zod_1.z.object({
|
|
9
23
|
resourceType: zod_1.z.literal("Appointment"),
|
|
10
24
|
participant: zod_1.z
|
|
@@ -15,7 +29,7 @@ exports.appointmentSchema = zod_1.z.object({
|
|
|
15
29
|
}),
|
|
16
30
|
})
|
|
17
31
|
.array(),
|
|
18
|
-
status:
|
|
32
|
+
status: exports.canvasAppointmentStatusSchema,
|
|
19
33
|
});
|
|
20
34
|
exports.appointmentListResponseSchema = zod_1.z.object({
|
|
21
35
|
entry: zod_1.z.object({ resource: exports.appointmentSchema }).array().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.js","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/canvas/appointment.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACtC,WAAW,EAAE,OAAC;SACX,MAAM,CAAC;QACN,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SAC1C,CAAC;KACH,CAAC;SACD,KAAK,EAAE;IACV,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"appointment.js","source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