@metriport/shared 0.33.4 → 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/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/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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,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,C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,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,QAAA,qCAAqC;IACxC,oCAAyB,CAAC,SAAS;IACnC,oCAAyB,CAAC,MAAM;CACxB,CAAC;AAOE,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAC5C,QAAA,mBAA+E,CAChF,CAAC;AAEW,QAAA,+CAA+C,GAAG,OAAC,CAAC,IAAI,CACnE,QAAA,qCAGC,CACF,CAAC;AAQF,SAAS,2BAA2B,CAClC,MAAiD;IAEjD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,2DAA4C,CAAC,SAAS,EAAE,CAAC;YAC5D,OAAO;gBACL,MAAM,EAAE,uBAAc;gBACtB,cAAc,EAAE,+CAAsC;gBACtD,QAAQ,EAAE,8BAAqB,CAAC,SAAS;aAC1C,CAAC;QACJ,CAAC;QACD,KAAK,2DAA4C,CAAC,aAAa,EAAE,CAAC;YAChE,OAAO;gBACL,MAAM,EAAE,uBAAc;gBACtB,cAAc,EAAE,+CAAsC;gBACtD,QAAQ,EAAE,8BAAqB,CAAC,MAAM;aACvC,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,gCACE,SAA6B,EAC7B,eAAuE;IAEvE,IAAI,SAAS,KAAK,oCAAyB,CAAC,SAAS,EAAE,CAAC;QACtD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,gCAAc,CACtB,+EAA+E,CAChF,CAAC;QACJ,CAAC;QACD,OAAO;YACL,GAAG,2BAA2B,CAAC,eAAe,CAAC;YAC/C,QAAQ,EAAE,8BAAqB,CAAC,SAAS;SAC1C,CAAC;IACJ,CAAC;IACD,IAAI,SAAS,KAAK,oCAAyB,CAAC,MAAM,EAAE,CAAC;QACnD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,gCAAc,CACtB,4EAA4E,CAC7E,CAAC;QACJ,CAAC;QACD,OAAO;YACL,GAAG,2BAA2B,CAAC,eAAe,CAAC;YAC/C,QAAQ,EAAE,8BAAqB,CAAC,MAAM;SACvC,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,MAAM,MAAM,oCAAoC,GAAG,8BAA8B,GAAG;IAClF,qBAAqB,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,w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,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-demograph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MAAM,CAAC;QACP,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;QACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,eAAe,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC,CACH;IACD,wBAAwB,EAAE,OAAC,CAAC,MAAM,CAAC;QACjC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;QACrB,iBAAiB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAClD,CAAC;CACH,CAAC,CAAC;AAGH,SAAgB,kBAAkB;IAIhC,OAAO;QACL,KAAK,EAAE,EAAE;QACT,uBAAuB,EAAE,EAAE;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/surescripts/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/surescripts/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./added-by"), exports);
|
|
|
19
19
|
__exportStar(require("./roster"), exports);
|
|
20
20
|
__exportStar(require("./source"), exports);
|
|
21
21
|
__exportStar(require("./realtime-pulls/index"), exports);
|
|
22
|
+
__exportStar(require("./notifications/index"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/external/surescripts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/external/surescripts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,yDAAuC;AACvC,wDAAsC"}
|
|
@@ -10,6 +10,7 @@ export type SurescriptsNotificationsConvertedSnsEvent = {
|
|
|
10
10
|
patientId: string;
|
|
11
11
|
requestId: string;
|
|
12
12
|
convertedS3Key: string;
|
|
13
|
+
bucketName: string;
|
|
13
14
|
};
|
|
14
15
|
export declare const surescriptsNotificationsConvertedSnsEventSchema: z.ZodObject<{
|
|
15
16
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -18,6 +19,7 @@ export declare const surescriptsNotificationsConvertedSnsEventSchema: z.ZodObjec
|
|
|
18
19
|
patientId: z.ZodString;
|
|
19
20
|
requestId: z.ZodString;
|
|
20
21
|
convertedS3Key: z.ZodString;
|
|
22
|
+
bucketName: z.ZodString;
|
|
21
23
|
}, "strict", z.ZodTypeAny, {
|
|
22
24
|
schemaVersion: 1;
|
|
23
25
|
eventType: SurescriptsNotificationsEventType;
|
|
@@ -25,6 +27,7 @@ export declare const surescriptsNotificationsConvertedSnsEventSchema: z.ZodObjec
|
|
|
25
27
|
patientId: string;
|
|
26
28
|
requestId: string;
|
|
27
29
|
convertedS3Key: string;
|
|
30
|
+
bucketName: string;
|
|
28
31
|
}, {
|
|
29
32
|
schemaVersion: 1;
|
|
30
33
|
eventType: SurescriptsNotificationsEventType;
|
|
@@ -32,5 +35,6 @@ export declare const surescriptsNotificationsConvertedSnsEventSchema: z.ZodObjec
|
|
|
32
35
|
patientId: string;
|
|
33
36
|
requestId: string;
|
|
34
37
|
convertedS3Key: string;
|
|
38
|
+
bucketName: string;
|
|
35
39
|
}>;
|
|
36
40
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/notifications/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,iCAAiC;IAC3C,SAAS,wCAAwC;CAClD;AAED,eAAO,MAAM,wCAAwC,EAAG,CAAU,CAAC;AAEnE,MAAM,MAAM,yCAAyC,GAAG;IACtD,aAAa,EAAE,OAAO,wCAAwC,CAAC;IAC/D,SAAS,EAAE,iCAAiC,CAAC,SAAS,CAAC;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/notifications/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,iCAAiC;IAC3C,SAAS,wCAAwC;CAClD;AAED,eAAO,MAAM,wCAAwC,EAAG,CAAU,CAAC;AAEnE,MAAM,MAAM,yCAAyC,GAAG;IACtD,aAAa,EAAE,OAAO,wCAAwC,CAAC;IAC/D,SAAS,EAAE,iCAAiC,CAAC,SAAS,CAAC;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;EAUc,CAAC"}
|
|
@@ -15,6 +15,7 @@ exports.surescriptsNotificationsConvertedSnsEventSchema = zod_1.z
|
|
|
15
15
|
patientId: zod_1.z.string().uuid(),
|
|
16
16
|
requestId: zod_1.z.string().min(1),
|
|
17
17
|
convertedS3Key: zod_1.z.string().min(1),
|
|
18
|
+
bucketName: zod_1.z.string().min(1),
|
|
18
19
|
})
|
|
19
20
|
.strict();
|
|
20
21
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/notifications/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,IAAY,iCAEX;AAFD,WAAY,iCAAiC;IAC3C,sFAAiD,CAAA;AACnD,CAAC,EAFW,iCAAiC,aAAjC,iCAAiC,GAAjC,iCAAiC,QAE5C;AAEY,QAAA,wCAAwC,GAAG,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/notifications/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,IAAY,iCAEX;AAFD,WAAY,iCAAiC;IAC3C,sFAAiD,CAAA;AACnD,CAAC,EAFW,iCAAiC,aAAjC,iCAAiC,GAAjC,iCAAiC,QAE5C;AAEY,QAAA,wCAAwC,GAAG,CAAU,CAAC;AAYtD,QAAA,+CAA+C,GAAG,OAAC;KAC7D,MAAM,CAAC;IACN,aAAa,EAAE,OAAC,CAAC,OAAO,CAAC,QAAA,wCAAwC,CAAC;IAClE,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,iCAAiC,CAAC,SAAS,CAAC;IACjE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9B,CAAC;KACD,MAAM,EAAiE,CAAC"}
|
|
@@ -23,12 +23,47 @@ export type SurescriptsRealtimePullsResponseProcessedSnsNoDataEvent = Surescript
|
|
|
23
23
|
convertedBundleS3Key?: never;
|
|
24
24
|
error?: string | undefined;
|
|
25
25
|
};
|
|
26
|
-
export type
|
|
26
|
+
export type SurescriptsRealtimePullsResponseProcessedSnsHasDataEventCore = SurescriptsRealtimePullsResponseProcessedSnsBaseEvent & {
|
|
27
27
|
eventType: SurescriptsRealtimePullsConversionStatusCode;
|
|
28
|
-
convertedBundleS3Key?: string | undefined;
|
|
29
28
|
error?: never;
|
|
30
29
|
};
|
|
30
|
+
export type SurescriptsRealtimePullsResponseProcessedSnsHasDataEvent = SurescriptsRealtimePullsResponseProcessedSnsHasDataEventCore | (SurescriptsRealtimePullsResponseProcessedSnsHasDataEventCore & {
|
|
31
|
+
convertedBundleS3Key: string;
|
|
32
|
+
convertedBundleS3Bucket: string;
|
|
33
|
+
});
|
|
31
34
|
export type SurescriptsRealtimePullsResponseProcessedSnsEvent = SurescriptsRealtimePullsResponseProcessedSnsHasDataEvent | SurescriptsRealtimePullsResponseProcessedSnsNoDataEvent;
|
|
35
|
+
export declare const surescriptsRealtimePullsResponseProcessedSnsHasDataEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
36
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
37
|
+
cxId: z.ZodString;
|
|
38
|
+
patientId: z.ZodString;
|
|
39
|
+
requestId: z.ZodString;
|
|
40
|
+
facilityId: z.ZodString;
|
|
41
|
+
numberOfTries: z.ZodNumber;
|
|
42
|
+
}, {
|
|
43
|
+
eventType: z.ZodNativeEnum<typeof SurescriptsRealtimePullsConversionStatusCode>;
|
|
44
|
+
convertedBundleS3Key: z.ZodOptional<z.ZodString>;
|
|
45
|
+
convertedBundleS3Bucket: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}>, "strict", z.ZodTypeAny, {
|
|
47
|
+
schemaVersion: 1;
|
|
48
|
+
cxId: string;
|
|
49
|
+
patientId: string;
|
|
50
|
+
requestId: string;
|
|
51
|
+
facilityId: string;
|
|
52
|
+
numberOfTries: number;
|
|
53
|
+
eventType: SurescriptsRealtimePullsConversionStatusCode;
|
|
54
|
+
convertedBundleS3Key?: string | undefined;
|
|
55
|
+
convertedBundleS3Bucket?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
schemaVersion: 1;
|
|
58
|
+
cxId: string;
|
|
59
|
+
patientId: string;
|
|
60
|
+
requestId: string;
|
|
61
|
+
facilityId: string;
|
|
62
|
+
numberOfTries: number;
|
|
63
|
+
eventType: SurescriptsRealtimePullsConversionStatusCode;
|
|
64
|
+
convertedBundleS3Key?: string | undefined;
|
|
65
|
+
convertedBundleS3Bucket?: string | undefined;
|
|
66
|
+
}>;
|
|
32
67
|
export declare const surescriptsRealtimePullsResponseProcessedSnsEventSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
33
68
|
schemaVersion: z.ZodLiteral<1>;
|
|
34
69
|
cxId: z.ZodString;
|
|
@@ -67,6 +102,7 @@ export declare const surescriptsRealtimePullsResponseProcessedSnsEventSchema: z.
|
|
|
67
102
|
}, {
|
|
68
103
|
eventType: z.ZodNativeEnum<typeof SurescriptsRealtimePullsConversionStatusCode>;
|
|
69
104
|
convertedBundleS3Key: z.ZodOptional<z.ZodString>;
|
|
105
|
+
convertedBundleS3Bucket: z.ZodOptional<z.ZodString>;
|
|
70
106
|
}>, "strict", z.ZodTypeAny, {
|
|
71
107
|
schemaVersion: 1;
|
|
72
108
|
cxId: string;
|
|
@@ -76,6 +112,7 @@ export declare const surescriptsRealtimePullsResponseProcessedSnsEventSchema: z.
|
|
|
76
112
|
numberOfTries: number;
|
|
77
113
|
eventType: SurescriptsRealtimePullsConversionStatusCode;
|
|
78
114
|
convertedBundleS3Key?: string | undefined;
|
|
115
|
+
convertedBundleS3Bucket?: string | undefined;
|
|
79
116
|
}, {
|
|
80
117
|
schemaVersion: 1;
|
|
81
118
|
cxId: string;
|
|
@@ -85,6 +122,7 @@ export declare const surescriptsRealtimePullsResponseProcessedSnsEventSchema: z.
|
|
|
85
122
|
numberOfTries: number;
|
|
86
123
|
eventType: SurescriptsRealtimePullsConversionStatusCode;
|
|
87
124
|
convertedBundleS3Key?: string | undefined;
|
|
125
|
+
convertedBundleS3Bucket?: string | undefined;
|
|
88
126
|
}>]>;
|
|
89
127
|
export declare function surescriptsRealtimePullsResponseProcessedEventHasData(event: SurescriptsRealtimePullsResponseProcessedSnsEvent): event is SurescriptsRealtimePullsResponseProcessedSnsHasDataEvent;
|
|
90
128
|
export declare function surescriptsRealtimePullsResponseProcessedEventHasNoData(event: SurescriptsRealtimePullsResponseProcessedSnsEvent): event is SurescriptsRealtimePullsResponseProcessedSnsNoDataEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-codes.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/realtime-pulls/status-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,4CAA4C;IACtD,SAAS,0BAA0B;IACnC,iBAAiB,kCAAkC;IACnD,wBAAwB,yCAAyC;IACjE,aAAa,8BAA8B;CAC5C;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,eAAO,MAAM,wCAAwC,EAAG,CAAU,CAAC;AAEnE,MAAM,MAAM,qDAAqD,GAAG;IAClE,aAAa,EAAE,OAAO,wCAAwC,CAAC;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uDAAuD,GACjE,qDAAqD,GAAG;IACtD,SAAS,EAAE,4CAA4C,CAAC,aAAa,CAAC;IACtE,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEJ,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"status-codes.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/realtime-pulls/status-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,4CAA4C;IACtD,SAAS,0BAA0B;IACnC,iBAAiB,kCAAkC;IACnD,wBAAwB,yCAAyC;IACjE,aAAa,8BAA8B;CAC5C;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,4CAA4C,GACnD,OAAO,CAET;AAED,eAAO,MAAM,wCAAwC,EAAG,CAAU,CAAC;AAEnE,MAAM,MAAM,qDAAqD,GAAG;IAClE,aAAa,EAAE,OAAO,wCAAwC,CAAC;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uDAAuD,GACjE,qDAAqD,GAAG;IACtD,SAAS,EAAE,4CAA4C,CAAC,aAAa,CAAC;IACtE,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEJ,MAAM,MAAM,4DAA4D,GACtE,qDAAqD,GAAG;IACtD,SAAS,EAAE,4CAA4C,CAAC;IACxD,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEJ,MAAM,MAAM,wDAAwD,GAChE,4DAA4D,GAC5D,CAAC,4DAA4D,GAAG;IAC9D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC,CAAC;AAEP,MAAM,MAAM,iDAAiD,GACzD,wDAAwD,GACxD,uDAAuD,CAAC;AAmB5D,eAAO,MAAM,8DAA8D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO9D,CAAC;AAEd,eAAO,MAAM,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGK,CAAC;AAE1E,wBAAgB,qDAAqD,CACnE,KAAK,EAAE,iDAAiD,GACvD,KAAK,IAAI,wDAAwD,CAKnE;AAED,wBAAgB,uDAAuD,CACrE,KAAK,EAAE,iDAAiD,GACvD,KAAK,IAAI,uDAAuD,CAElE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.surescriptsRealtimePullsResponseProcessedSnsEventSchema = exports.surescriptsRealtimePullsSnsSchemaVersion = exports.SurescriptsRealtimePullsConversionStatusCode = void 0;
|
|
3
|
+
exports.surescriptsRealtimePullsResponseProcessedSnsEventSchema = exports.surescriptsRealtimePullsResponseProcessedSnsHasDataEventSchema = exports.surescriptsRealtimePullsSnsSchemaVersion = exports.SurescriptsRealtimePullsConversionStatusCode = void 0;
|
|
4
4
|
exports.isSurescriptsInternalErrorStatusCode = isSurescriptsInternalErrorStatusCode;
|
|
5
5
|
exports.isMoreDataAvailableStatusCode = isMoreDataAvailableStatusCode;
|
|
6
6
|
exports.isConvertedStatusCode = isConvertedStatusCode;
|
|
@@ -42,15 +42,16 @@ const surescriptsRealtimePullsResponseProcessedSnsNoDataEventSchema = surescript
|
|
|
42
42
|
error: zod_1.z.string().optional(),
|
|
43
43
|
})
|
|
44
44
|
.strict();
|
|
45
|
-
|
|
45
|
+
exports.surescriptsRealtimePullsResponseProcessedSnsHasDataEventSchema = surescriptsRealtimePullsResponseProcessedSnsBaseEventSchema
|
|
46
46
|
.extend({
|
|
47
47
|
eventType: zod_1.z.nativeEnum(SurescriptsRealtimePullsConversionStatusCode),
|
|
48
48
|
convertedBundleS3Key: zod_1.z.string().optional(),
|
|
49
|
+
convertedBundleS3Bucket: zod_1.z.string().min(1).optional(),
|
|
49
50
|
})
|
|
50
51
|
.strict();
|
|
51
52
|
exports.surescriptsRealtimePullsResponseProcessedSnsEventSchema = zod_1.z.union([
|
|
52
53
|
surescriptsRealtimePullsResponseProcessedSnsNoDataEventSchema,
|
|
53
|
-
surescriptsRealtimePullsResponseProcessedSnsHasDataEventSchema,
|
|
54
|
+
exports.surescriptsRealtimePullsResponseProcessedSnsHasDataEventSchema,
|
|
54
55
|
]);
|
|
55
56
|
function surescriptsRealtimePullsResponseProcessedEventHasData(event) {
|
|
56
57
|
if (isInternalErrorStatusCode(event.eventType)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-codes.js","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/realtime-pulls/status-codes.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AAExB,IAAY,4CAKX;AALD,WAAY,4CAA4C;IACtD,mFAAmC,CAAA;IACnC,mGAAmD,CAAA;IACnD,iHAAiE,CAAA;IACjE,2FAA2C,CAAA;AAC7C,CAAC,EALW,4CAA4C,aAA5C,4CAA4C,GAA5C,4CAA4C,QAKvD;AAED,8CACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,wBAAwB,CAAC;AAC1F,CAAC;AAED,uCACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,iBAAiB,CAAC;AACnF,CAAC;AAED,+BACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,mCACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,aAAa,CAAC;AAC/E,CAAC;AAEY,QAAA,wCAAwC,GAAG,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"status-codes.js","sourceRoot":"","sources":["../../../../../src/interface/external/surescripts/realtime-pulls/status-codes.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AAExB,IAAY,4CAKX;AALD,WAAY,4CAA4C;IACtD,mFAAmC,CAAA;IACnC,mGAAmD,CAAA;IACnD,iHAAiE,CAAA;IACjE,2FAA2C,CAAA;AAC7C,CAAC,EALW,4CAA4C,aAA5C,4CAA4C,GAA5C,4CAA4C,QAKvD;AAED,8CACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,wBAAwB,CAAC;AAC1F,CAAC;AAED,uCACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,iBAAiB,CAAC;AACnF,CAAC;AAED,+BACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,mCACE,MAAoD;IAEpD,OAAO,MAAM,KAAK,4CAA4C,CAAC,aAAa,CAAC;AAC/E,CAAC;AAEY,QAAA,wCAAwC,GAAG,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ACE,KAAwD;IAExD,OAAO,CAAC,qDAAqD,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of clinical status codes found in the wild to HL7 condition-clinical codes.
|
|
3
|
+
*
|
|
4
|
+
* @see http://terminology.hl7.org/CodeSystem/condition-clinical
|
|
5
|
+
*/
|
|
6
|
+
export declare const clinicalStatusCodeToHl7CodeMap: Record<string, string>;
|
|
7
|
+
//# sourceMappingURL=condition-clinical-status-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-clinical-status-map.d.ts","sourceRoot":"","sources":["../../../src/medical/fhir/condition-clinical-status-map.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAcjE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clinicalStatusCodeToHl7CodeMap = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Map of clinical status codes found in the wild to HL7 condition-clinical codes.
|
|
6
|
+
*
|
|
7
|
+
* @see http://terminology.hl7.org/CodeSystem/condition-clinical
|
|
8
|
+
*/
|
|
9
|
+
exports.clinicalStatusCodeToHl7CodeMap = {
|
|
10
|
+
"55561003": "active",
|
|
11
|
+
active: "active",
|
|
12
|
+
"73425007": "inactive",
|
|
13
|
+
inactive: "inactive",
|
|
14
|
+
"246455001": "recurrence",
|
|
15
|
+
"255227004": "recurrence",
|
|
16
|
+
"277022003": "remission",
|
|
17
|
+
"413322009": "resolved",
|
|
18
|
+
resolved: "resolved",
|
|
19
|
+
remission: "remission",
|
|
20
|
+
recurrence: "recurrence",
|
|
21
|
+
relapse: "relapse",
|
|
22
|
+
unknown: "unknown",
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=condition-clinical-status-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-clinical-status-map.js","sourceRoot":"","sources":["../../../src/medical/fhir/condition-clinical-status-map.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,8BAA8B,GAA2B;IACpE,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-clinical-status-priority.d.ts","sourceRoot":"","sources":["../../../src/medical/fhir/condition-clinical-status-priority.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA6B5C,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAgBlF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pickClinicalStatusByPriority = pickClinicalStatusByPriority;
|
|
4
|
+
const title_case_1 = require("../../common/title-case");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
const condition_clinical_status_map_1 = require("./condition-clinical-status-map");
|
|
7
|
+
const clinicalStatusPriority = {
|
|
8
|
+
resolved: 6,
|
|
9
|
+
inactive: 5,
|
|
10
|
+
remission: 4,
|
|
11
|
+
relapse: 3,
|
|
12
|
+
recurrence: 3,
|
|
13
|
+
active: 2,
|
|
14
|
+
unknown: 1,
|
|
15
|
+
};
|
|
16
|
+
function normalizeHl7ClinicalStatusFromCoding(coding) {
|
|
17
|
+
const code = coding.code?.toLowerCase()?.trim();
|
|
18
|
+
if (!code)
|
|
19
|
+
return undefined;
|
|
20
|
+
return condition_clinical_status_map_1.clinicalStatusCodeToHl7CodeMap[code];
|
|
21
|
+
}
|
|
22
|
+
function toHl7ClinicalStatusCoding(hl7Code) {
|
|
23
|
+
return {
|
|
24
|
+
system: constants_1.CONDITION_CLINICAL_STATUS_URL,
|
|
25
|
+
code: hl7Code,
|
|
26
|
+
display: (0, title_case_1.toTitleCase)(hl7Code),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function pickClinicalStatusByPriority(codings) {
|
|
30
|
+
let bestHl7Code;
|
|
31
|
+
let bestPriority = -1;
|
|
32
|
+
for (const coding of codings) {
|
|
33
|
+
const hl7Code = normalizeHl7ClinicalStatusFromCoding(coding);
|
|
34
|
+
if (!hl7Code)
|
|
35
|
+
continue;
|
|
36
|
+
const priority = clinicalStatusPriority[hl7Code] ?? 0;
|
|
37
|
+
if (priority <= bestPriority)
|
|
38
|
+
continue;
|
|
39
|
+
bestPriority = priority;
|
|
40
|
+
bestHl7Code = hl7Code;
|
|
41
|
+
}
|
|
42
|
+
return bestHl7Code ? toHl7ClinicalStatusCoding(bestHl7Code) : undefined;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=condition-clinical-status-priority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-clinical-status-priority.js","sourceRoot":"","sources":["../../../src/medical/fhir/condition-clinical-status-priority.ts"],"names":[],"mappings":";;;AACA,wDAAsD;AACtD,2CAA4D;AAC5D,mFAAiF;AAEjF,MAAM,sBAAsB,GAA2B;IACrD,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;IACZ,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;CACX,CAAC;AAEF,SAAS,oCAAoC,CAAC,MAAc;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC;IAChD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,8DAA8B,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,yBAAyB,CAAC,OAAe;IAChD,OAAO;QACL,MAAM,EAAE,yCAA6B;QACrC,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,IAAA,wBAAW,EAAC,OAAO,CAAC;KAC9B,CAAC;AACJ,CAAC;AAED,sCAA6C,OAAiB;IAC5D,IAAI,WAA+B,CAAC;IACpC,IAAI,YAAY,GAAG,CAAC,CAAC,CAAC;IAEtB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,oCAAoC,CAAC,MAAM,CAAC,CAAC;QAC7D,IAAI,CAAC,OAAO;YAAE,SAAS;QAEvB,MAAM,QAAQ,GAAG,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,QAAQ,IAAI,YAAY;YAAE,SAAS;QAEvC,YAAY,GAAG,QAAQ,CAAC;QACxB,WAAW,GAAG,OAAO,CAAC;IACxB,CAAC;IAED,OAAO,WAAW,CAAC,CAAC,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1E,CAAC"}
|
package/dist/medical/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export * from "./fhir/observations";
|
|
|
4
4
|
export * from "./fhir/resources";
|
|
5
5
|
export * from "./fhir/coding";
|
|
6
6
|
export * from "./fhir/constants";
|
|
7
|
+
export * from "./fhir/condition-clinical-status-map";
|
|
8
|
+
export * from "./fhir/condition-clinical-status-priority";
|
|
7
9
|
export * from "./fhir/imaging-detection";
|
|
8
10
|
export * from "./fhir/procedure-category";
|
|
9
11
|
export * from "./fhir/procedure-category-from-cpt";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/medical/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/medical/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC"}
|
package/dist/medical/index.js
CHANGED
|
@@ -20,6 +20,8 @@ __exportStar(require("./fhir/observations"), exports);
|
|
|
20
20
|
__exportStar(require("./fhir/resources"), exports);
|
|
21
21
|
__exportStar(require("./fhir/coding"), exports);
|
|
22
22
|
__exportStar(require("./fhir/constants"), exports);
|
|
23
|
+
__exportStar(require("./fhir/condition-clinical-status-map"), exports);
|
|
24
|
+
__exportStar(require("./fhir/condition-clinical-status-priority"), exports);
|
|
23
25
|
__exportStar(require("./fhir/imaging-detection"), exports);
|
|
24
26
|
__exportStar(require("./fhir/procedure-category"), exports);
|
|
25
27
|
__exportStar(require("./fhir/procedure-category-from-cpt"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/medical/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,oDAAkC;AAClC,sDAAoC;AACpC,mDAAiC;AACjC,gDAA8B;AAC9B,mDAAiC;AACjC,2DAAyC;AACzC,4DAA0C;AAC1C,qEAAmD;AACnD,4DAA0C;AAC1C,oEAAkD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/medical/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,oDAAkC;AAClC,sDAAoC;AACpC,mDAAiC;AACjC,gDAA8B;AAC9B,mDAAiC;AACjC,uEAAqD;AACrD,4EAA0D;AAC1D,2DAAyC;AACzC,4DAA0C;AAC1C,qEAAmD;AACnD,4DAA0C;AAC1C,oEAAkD"}
|
package/dist/util/index.d.ts
CHANGED
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
package/dist/util/index.js
CHANGED
|
@@ -16,6 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./base64"), exports);
|
|
18
18
|
__exportStar(require("./duration"), exports);
|
|
19
|
-
__exportStar(require("./sqs-delay-from-uuid"), exports);
|
|
20
19
|
__exportStar(require("./uuid-v7"), exports);
|
|
21
20
|
//# sourceMappingURL=index.js.map
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,4CAA0B"}
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
/** SQS max delivery delay is 15 minutes (900 seconds). Delay must not exceed this. */
|
|
2
|
-
export declare const SQS_MAX_DELAY_SECONDS = 900;
|
|
3
|
-
/**
|
|
4
|
-
* Maps a string (e.g. cxId or UUID v4) to a delivery delay in seconds for SQS,
|
|
5
|
-
* evenly distributed across 0 to 15 minutes (max). Same input always gets the same delay (deterministic).
|
|
6
|
-
*
|
|
7
|
-
* @param id - Any string identifier (e.g. cxId, UUID v4)
|
|
8
|
-
* @returns Delay in seconds in [0, 900] (≤ 15 min, SQS max)
|
|
9
|
-
*/
|
|
10
|
-
export declare function uuidToDelaySeconds(id: string, maxDelaySeconds?: number): number;
|
|
11
1
|
//# sourceMappingURL=sqs-delay-from-uuid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqs-delay-from-uuid.d.ts","sourceRoot":"","sources":["../../src/util/sqs-delay-from-uuid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sqs-delay-from-uuid.d.ts","sourceRoot":"","sources":["../../src/util/sqs-delay-from-uuid.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SQS_MAX_DELAY_SECONDS = void 0;
|
|
4
|
-
exports.uuidToDelaySeconds = uuidToDelaySeconds;
|
|
5
|
-
const node_crypto_1 = require("node:crypto");
|
|
6
|
-
/** SQS max delivery delay is 15 minutes (900 seconds). Delay must not exceed this. */
|
|
7
|
-
exports.SQS_MAX_DELAY_SECONDS = 900;
|
|
8
|
-
/**
|
|
9
|
-
* Maps a string (e.g. cxId or UUID v4) to a delivery delay in seconds for SQS,
|
|
10
|
-
* evenly distributed across 0 to 15 minutes (max). Same input always gets the same delay (deterministic).
|
|
11
|
-
*
|
|
12
|
-
* @param id - Any string identifier (e.g. cxId, UUID v4)
|
|
13
|
-
* @returns Delay in seconds in [0, 900] (≤ 15 min, SQS max)
|
|
14
|
-
*/
|
|
15
|
-
function uuidToDelaySeconds(id, maxDelaySeconds = exports.SQS_MAX_DELAY_SECONDS) {
|
|
16
|
-
const BUCKET_COUNT = maxDelaySeconds + 1; // maxDelaySeconds + 1 → 0..maxDelaySeconds
|
|
17
|
-
const hash = (0, node_crypto_1.createHash)("sha256").update(id, "utf8").digest();
|
|
18
|
-
const value = hash.readUInt32BE(0) * 0x100000000 + hash.readUInt32BE(4);
|
|
19
|
-
return value % BUCKET_COUNT; // always in [0, maxDelaySeconds]
|
|
20
|
-
}
|
|
21
2
|
//# sourceMappingURL=sqs-delay-from-uuid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqs-delay-from-uuid.js","sourceRoot":"","sources":["../../src/util/sqs-delay-from-uuid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sqs-delay-from-uuid.js","sourceRoot":"","sources":["../../src/util/sqs-delay-from-uuid.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/shared",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.5-alpha.0",
|
|
4
4
|
"description": "Common code shared across packages - by Metriport Inc.",
|
|
5
5
|
"author": "Metriport Inc. <contact@metriport.com>",
|
|
6
6
|
"homepage": "https://metriport.com/",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"./external/*": "./dist/external/*.js",
|
|
41
41
|
"./interface": "./dist/interface/index.js",
|
|
42
42
|
"./interface/external/surescripts/realtime-pulls": "./dist/interface/external/surescripts/realtime-pulls/index.js",
|
|
43
|
+
"./interface/external/surescripts/notifications": "./dist/interface/external/surescripts/notifications/index.js",
|
|
43
44
|
"./interface/*": "./dist/interface/*.js",
|
|
44
45
|
"./medical": "./dist/medical/index.js",
|
|
45
46
|
"./medical/*": "./dist/medical/*.js",
|
|
@@ -93,6 +94,9 @@
|
|
|
93
94
|
"interface/external/surescripts/realtime-pulls": [
|
|
94
95
|
"dist/interface/external/surescripts/realtime-pulls/index.d.ts"
|
|
95
96
|
],
|
|
97
|
+
"interface/external/surescripts/notifications": [
|
|
98
|
+
"dist/interface/external/surescripts/notifications/index.d.ts"
|
|
99
|
+
],
|
|
96
100
|
"interface/*": [
|
|
97
101
|
"dist/interface/*"
|
|
98
102
|
],
|
|
@@ -161,5 +165,5 @@
|
|
|
161
165
|
"ts-jest": "29.4.11",
|
|
162
166
|
"typescript": "6.0.3"
|
|
163
167
|
},
|
|
164
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "13424015b8574aed6f3129ca4ad84bc3c8593c3e"
|
|
165
169
|
}
|