@metriport/shared 0.35.0 → 0.36.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/domain/message/__tests__/message.test.js +22 -0
- package/dist/domain/message/__tests__/message.test.js.map +1 -1
- package/dist/domain/message/index.d.ts +1 -0
- package/dist/domain/message/index.d.ts.map +1 -1
- package/dist/domain/message/index.js +1 -0
- package/dist/domain/message/index.js.map +1 -1
- package/dist/domain/message/internal-message-xdr.d.ts +323 -54
- package/dist/domain/message/internal-message-xdr.d.ts.map +1 -1
- package/dist/domain/message/internal-message-xdr.js +22 -2
- package/dist/domain/message/internal-message-xdr.js.map +1 -1
- package/dist/domain/message/message.d.ts +86 -0
- package/dist/domain/message/message.d.ts.map +1 -1
- package/dist/domain/message/message.js +37 -8
- package/dist/domain/message/message.js.map +1 -1
- package/dist/medical/webhook/webhook-request.d.ts +186 -2
- package/dist/medical/webhook/webhook-request.d.ts.map +1 -1
- package/dist/medical/webhook/webhook-request.js +21 -1
- package/dist/medical/webhook/webhook-request.js.map +1 -1
- package/package.json +2 -2
|
@@ -110,6 +110,28 @@ describe("message", () => {
|
|
|
110
110
|
expect((0, message_1.normalizeMessagePlainText)(" hello\u0000world ")).toBe("helloworld");
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
|
+
describe("messageDeliveryCompleteRequestSchema", () => {
|
|
114
|
+
const baseCompletion = {
|
|
115
|
+
messageId: baseMessage.id,
|
|
116
|
+
cxId: "33333333-3333-4333-8333-333333333333",
|
|
117
|
+
patientId: baseMessage.patientId,
|
|
118
|
+
network: "EHEX",
|
|
119
|
+
status: "failed",
|
|
120
|
+
};
|
|
121
|
+
it("normalizes the failure reason", () => {
|
|
122
|
+
const result = message_1.messageDeliveryCompleteRequestSchema.parse({
|
|
123
|
+
...baseCompletion,
|
|
124
|
+
reason: " rejected\u0000by recipient ",
|
|
125
|
+
});
|
|
126
|
+
expect(result.reason).toBe("rejectedby recipient");
|
|
127
|
+
});
|
|
128
|
+
it("rejects a failure reason longer than the message body limit", () => {
|
|
129
|
+
expect(() => message_1.messageDeliveryCompleteRequestSchema.parse({
|
|
130
|
+
...baseCompletion,
|
|
131
|
+
reason: "a".repeat(message_1.messageBodyMaxLength + 1),
|
|
132
|
+
})).toThrow();
|
|
133
|
+
});
|
|
134
|
+
});
|
|
113
135
|
describe("toMessageDto", () => {
|
|
114
136
|
it("maps record fields to Message DTO", () => {
|
|
115
137
|
const createdAt = (0, date_1.buildDayjs)("2024-01-01T10:00:00.000Z").toDate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.test.js","sourceRoot":"","sources":["../../../../src/domain/message/__tests__/message.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"message.test.js","sourceRoot":"","sources":["../../../../src/domain/message/__tests__/message.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,wCAUoB;AAEpB,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,MAAM,WAAW,GAAG;QAClB,EAAE,EAAE,sCAAsC;QAC1C,SAAS,EAAE,sCAAsC;QACjD,SAAS,EAAE,UAAmB;QAC9B,MAAM,EAAE,YAAqB;QAC7B,eAAe,EAAE,KAAc;QAC/B,OAAO,EAAE,MAAe;QACxB,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,0BAA0B;QAClC,SAAS,EAAE,0BAA0B;KACtC,CAAC;IAEF,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;YACjC,MAAM,MAAM,GAAG,uBAAa,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAChD,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAA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BAAqB,EAAE,IAAI;gBAC3B,SAAS;gBACT,SAAS;gBACT,aAAa,EAAE,KAAK;aACrB,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;YACpC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,aAAa,EAAE,CAAC;YAC3C,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,aAAa,EAAE,CAAC;YACpD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/message/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/message/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./message"), exports);
|
|
18
|
+
__exportStar(require("./internal-message-xdr"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/message/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/message/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,yDAAuC"}
|
|
@@ -16,24 +16,159 @@ export declare const messageSenderAttachmentSchema: z.ZodObject<{
|
|
|
16
16
|
title?: string | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export type MessageSenderAttachment = z.infer<typeof messageSenderAttachmentSchema>;
|
|
19
|
+
/** Demographics used to build XDS sourcePatientInfo PID lines on the sender. */
|
|
20
|
+
export declare const sourcePatientDemographicsSchema: z.ZodObject<{
|
|
21
|
+
firstName: z.ZodString;
|
|
22
|
+
lastName: z.ZodString;
|
|
23
|
+
dob: z.ZodString;
|
|
24
|
+
genderAtBirth: z.ZodEnum<["M", "F", "O", "U"]>;
|
|
25
|
+
address: z.ZodArray<z.ZodObject<{
|
|
26
|
+
addressLine1: z.ZodString;
|
|
27
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
|
28
|
+
city: z.ZodString;
|
|
29
|
+
state: z.ZodString;
|
|
30
|
+
zip: z.ZodString;
|
|
31
|
+
country: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
addressLine1: string;
|
|
34
|
+
addressLine2?: string | undefined;
|
|
35
|
+
city: string;
|
|
36
|
+
state: string;
|
|
37
|
+
zip: string;
|
|
38
|
+
country?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
addressLine1: string;
|
|
41
|
+
addressLine2?: string | undefined;
|
|
42
|
+
city: string;
|
|
43
|
+
state: string;
|
|
44
|
+
zip: string;
|
|
45
|
+
country?: string | undefined;
|
|
46
|
+
}>, "many">;
|
|
47
|
+
}, "strict", z.ZodTypeAny, {
|
|
48
|
+
firstName: string;
|
|
49
|
+
lastName: string;
|
|
50
|
+
dob: string;
|
|
51
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
52
|
+
address: {
|
|
53
|
+
addressLine1: string;
|
|
54
|
+
addressLine2?: string | undefined;
|
|
55
|
+
city: string;
|
|
56
|
+
state: string;
|
|
57
|
+
zip: string;
|
|
58
|
+
country?: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
}, {
|
|
61
|
+
firstName: string;
|
|
62
|
+
lastName: string;
|
|
63
|
+
dob: string;
|
|
64
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
65
|
+
address: {
|
|
66
|
+
addressLine1: string;
|
|
67
|
+
addressLine2?: string | undefined;
|
|
68
|
+
city: string;
|
|
69
|
+
state: string;
|
|
70
|
+
zip: string;
|
|
71
|
+
country?: string | undefined;
|
|
72
|
+
}[];
|
|
73
|
+
}>;
|
|
74
|
+
export type SourcePatientDemographics = z.infer<typeof sourcePatientDemographicsSchema>;
|
|
19
75
|
export declare const xdrPatientSchema: z.ZodObject<{
|
|
20
76
|
sourcePatientId: z.ZodString;
|
|
21
77
|
sourcePatientSystem: z.ZodString;
|
|
22
78
|
patientId: z.ZodString;
|
|
23
79
|
patientSystem: z.ZodString;
|
|
24
|
-
|
|
80
|
+
sourcePatientDemographics: z.ZodObject<{
|
|
81
|
+
firstName: z.ZodString;
|
|
82
|
+
lastName: z.ZodString;
|
|
83
|
+
dob: z.ZodString;
|
|
84
|
+
genderAtBirth: z.ZodEnum<["M", "F", "O", "U"]>;
|
|
85
|
+
address: z.ZodArray<z.ZodObject<{
|
|
86
|
+
addressLine1: z.ZodString;
|
|
87
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
|
88
|
+
city: z.ZodString;
|
|
89
|
+
state: z.ZodString;
|
|
90
|
+
zip: z.ZodString;
|
|
91
|
+
country: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, "strict", z.ZodTypeAny, {
|
|
93
|
+
addressLine1: string;
|
|
94
|
+
addressLine2?: string | undefined;
|
|
95
|
+
city: string;
|
|
96
|
+
state: string;
|
|
97
|
+
zip: string;
|
|
98
|
+
country?: string | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
addressLine1: string;
|
|
101
|
+
addressLine2?: string | undefined;
|
|
102
|
+
city: string;
|
|
103
|
+
state: string;
|
|
104
|
+
zip: string;
|
|
105
|
+
country?: string | undefined;
|
|
106
|
+
}>, "many">;
|
|
107
|
+
}, "strict", z.ZodTypeAny, {
|
|
108
|
+
firstName: string;
|
|
109
|
+
lastName: string;
|
|
110
|
+
dob: string;
|
|
111
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
112
|
+
address: {
|
|
113
|
+
addressLine1: string;
|
|
114
|
+
addressLine2?: string | undefined;
|
|
115
|
+
city: string;
|
|
116
|
+
state: string;
|
|
117
|
+
zip: string;
|
|
118
|
+
country?: string | undefined;
|
|
119
|
+
}[];
|
|
120
|
+
}, {
|
|
121
|
+
firstName: string;
|
|
122
|
+
lastName: string;
|
|
123
|
+
dob: string;
|
|
124
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
125
|
+
address: {
|
|
126
|
+
addressLine1: string;
|
|
127
|
+
addressLine2?: string | undefined;
|
|
128
|
+
city: string;
|
|
129
|
+
state: string;
|
|
130
|
+
zip: string;
|
|
131
|
+
country?: string | undefined;
|
|
132
|
+
}[];
|
|
133
|
+
}>;
|
|
25
134
|
}, "strict", z.ZodTypeAny, {
|
|
26
|
-
patientId: string;
|
|
27
135
|
sourcePatientId: string;
|
|
28
136
|
sourcePatientSystem: string;
|
|
137
|
+
patientId: string;
|
|
29
138
|
patientSystem: string;
|
|
30
|
-
|
|
139
|
+
sourcePatientDemographics: {
|
|
140
|
+
firstName: string;
|
|
141
|
+
lastName: string;
|
|
142
|
+
dob: string;
|
|
143
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
144
|
+
address: {
|
|
145
|
+
addressLine1: string;
|
|
146
|
+
addressLine2?: string | undefined;
|
|
147
|
+
city: string;
|
|
148
|
+
state: string;
|
|
149
|
+
zip: string;
|
|
150
|
+
country?: string | undefined;
|
|
151
|
+
}[];
|
|
152
|
+
};
|
|
31
153
|
}, {
|
|
32
|
-
patientId: string;
|
|
33
154
|
sourcePatientId: string;
|
|
34
155
|
sourcePatientSystem: string;
|
|
156
|
+
patientId: string;
|
|
35
157
|
patientSystem: string;
|
|
36
|
-
|
|
158
|
+
sourcePatientDemographics: {
|
|
159
|
+
firstName: string;
|
|
160
|
+
lastName: string;
|
|
161
|
+
dob: string;
|
|
162
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
163
|
+
address: {
|
|
164
|
+
addressLine1: string;
|
|
165
|
+
addressLine2?: string | undefined;
|
|
166
|
+
city: string;
|
|
167
|
+
state: string;
|
|
168
|
+
zip: string;
|
|
169
|
+
country?: string | undefined;
|
|
170
|
+
}[];
|
|
171
|
+
};
|
|
37
172
|
}>;
|
|
38
173
|
export type XdrPatient = z.infer<typeof xdrPatientSchema>;
|
|
39
174
|
/**
|
|
@@ -79,33 +214,117 @@ export declare const internalMessageXdrSchema: z.ZodEffects<z.ZodObject<z.object
|
|
|
79
214
|
sourcePatientSystem: z.ZodString;
|
|
80
215
|
patientId: z.ZodString;
|
|
81
216
|
patientSystem: z.ZodString;
|
|
82
|
-
|
|
217
|
+
sourcePatientDemographics: z.ZodObject<{
|
|
218
|
+
firstName: z.ZodString;
|
|
219
|
+
lastName: z.ZodString;
|
|
220
|
+
dob: z.ZodString;
|
|
221
|
+
genderAtBirth: z.ZodEnum<["M", "F", "O", "U"]>;
|
|
222
|
+
address: z.ZodArray<z.ZodObject<{
|
|
223
|
+
addressLine1: z.ZodString;
|
|
224
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
|
225
|
+
city: z.ZodString;
|
|
226
|
+
state: z.ZodString;
|
|
227
|
+
zip: z.ZodString;
|
|
228
|
+
country: z.ZodOptional<z.ZodString>;
|
|
229
|
+
}, "strict", z.ZodTypeAny, {
|
|
230
|
+
addressLine1: string;
|
|
231
|
+
addressLine2?: string | undefined;
|
|
232
|
+
city: string;
|
|
233
|
+
state: string;
|
|
234
|
+
zip: string;
|
|
235
|
+
country?: string | undefined;
|
|
236
|
+
}, {
|
|
237
|
+
addressLine1: string;
|
|
238
|
+
addressLine2?: string | undefined;
|
|
239
|
+
city: string;
|
|
240
|
+
state: string;
|
|
241
|
+
zip: string;
|
|
242
|
+
country?: string | undefined;
|
|
243
|
+
}>, "many">;
|
|
244
|
+
}, "strict", z.ZodTypeAny, {
|
|
245
|
+
firstName: string;
|
|
246
|
+
lastName: string;
|
|
247
|
+
dob: string;
|
|
248
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
249
|
+
address: {
|
|
250
|
+
addressLine1: string;
|
|
251
|
+
addressLine2?: string | undefined;
|
|
252
|
+
city: string;
|
|
253
|
+
state: string;
|
|
254
|
+
zip: string;
|
|
255
|
+
country?: string | undefined;
|
|
256
|
+
}[];
|
|
257
|
+
}, {
|
|
258
|
+
firstName: string;
|
|
259
|
+
lastName: string;
|
|
260
|
+
dob: string;
|
|
261
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
262
|
+
address: {
|
|
263
|
+
addressLine1: string;
|
|
264
|
+
addressLine2?: string | undefined;
|
|
265
|
+
city: string;
|
|
266
|
+
state: string;
|
|
267
|
+
zip: string;
|
|
268
|
+
country?: string | undefined;
|
|
269
|
+
}[];
|
|
270
|
+
}>;
|
|
83
271
|
}, "strict", z.ZodTypeAny, {
|
|
84
|
-
patientId: string;
|
|
85
272
|
sourcePatientId: string;
|
|
86
273
|
sourcePatientSystem: string;
|
|
274
|
+
patientId: string;
|
|
87
275
|
patientSystem: string;
|
|
88
|
-
|
|
276
|
+
sourcePatientDemographics: {
|
|
277
|
+
firstName: string;
|
|
278
|
+
lastName: string;
|
|
279
|
+
dob: string;
|
|
280
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
281
|
+
address: {
|
|
282
|
+
addressLine1: string;
|
|
283
|
+
addressLine2?: string | undefined;
|
|
284
|
+
city: string;
|
|
285
|
+
state: string;
|
|
286
|
+
zip: string;
|
|
287
|
+
country?: string | undefined;
|
|
288
|
+
}[];
|
|
289
|
+
};
|
|
89
290
|
}, {
|
|
90
|
-
patientId: string;
|
|
91
291
|
sourcePatientId: string;
|
|
92
292
|
sourcePatientSystem: string;
|
|
293
|
+
patientId: string;
|
|
93
294
|
patientSystem: string;
|
|
94
|
-
|
|
295
|
+
sourcePatientDemographics: {
|
|
296
|
+
firstName: string;
|
|
297
|
+
lastName: string;
|
|
298
|
+
dob: string;
|
|
299
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
300
|
+
address: {
|
|
301
|
+
addressLine1: string;
|
|
302
|
+
addressLine2?: string | undefined;
|
|
303
|
+
city: string;
|
|
304
|
+
state: string;
|
|
305
|
+
zip: string;
|
|
306
|
+
country?: string | undefined;
|
|
307
|
+
}[];
|
|
308
|
+
};
|
|
95
309
|
}>;
|
|
96
310
|
/** Cx facility/org OID — SAML organization-id (home community stays Metriport). */
|
|
97
311
|
initiatorOid: z.ZodString;
|
|
98
312
|
initiatorName: z.ZodString;
|
|
99
313
|
}>, "strict", z.ZodTypeAny, {
|
|
100
314
|
id: string;
|
|
101
|
-
status: "processing" | "completed" | "failed";
|
|
102
|
-
updatedAt: string;
|
|
103
315
|
patientId: string;
|
|
104
|
-
direction: "
|
|
105
|
-
|
|
316
|
+
direction: "inbound" | "outbound";
|
|
317
|
+
status: "completed" | "failed" | "processing";
|
|
318
|
+
transportMethod: "direct" | "xdr";
|
|
319
|
+
network?: "CAREQUALITY" | "COMMONWELL" | "EHEX" | undefined;
|
|
106
320
|
destination: string;
|
|
107
321
|
subject: string;
|
|
322
|
+
body?: string | undefined;
|
|
323
|
+
attachments?: string[] | undefined;
|
|
324
|
+
intendedRecipientNpi?: string[] | undefined;
|
|
108
325
|
sentAt: string;
|
|
326
|
+
updatedAt: string;
|
|
327
|
+
reason?: string | undefined;
|
|
109
328
|
urlXdr: string;
|
|
110
329
|
destinationName: string;
|
|
111
330
|
attachmentsForSender: {
|
|
@@ -115,29 +334,42 @@ export declare const internalMessageXdrSchema: z.ZodEffects<z.ZodObject<z.object
|
|
|
115
334
|
title?: string | undefined;
|
|
116
335
|
}[];
|
|
117
336
|
xdrPatient: {
|
|
118
|
-
patientId: string;
|
|
119
337
|
sourcePatientId: string;
|
|
120
338
|
sourcePatientSystem: string;
|
|
339
|
+
patientId: string;
|
|
121
340
|
patientSystem: string;
|
|
122
|
-
|
|
341
|
+
sourcePatientDemographics: {
|
|
342
|
+
firstName: string;
|
|
343
|
+
lastName: string;
|
|
344
|
+
dob: string;
|
|
345
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
346
|
+
address: {
|
|
347
|
+
addressLine1: string;
|
|
348
|
+
addressLine2?: string | undefined;
|
|
349
|
+
city: string;
|
|
350
|
+
state: string;
|
|
351
|
+
zip: string;
|
|
352
|
+
country?: string | undefined;
|
|
353
|
+
}[];
|
|
354
|
+
};
|
|
123
355
|
};
|
|
124
356
|
initiatorOid: string;
|
|
125
357
|
initiatorName: string;
|
|
126
|
-
reason?: string | undefined;
|
|
127
|
-
network?: "EHEX" | "CAREQUALITY" | "COMMONWELL" | undefined;
|
|
128
|
-
body?: string | undefined;
|
|
129
|
-
attachments?: string[] | undefined;
|
|
130
|
-
intendedRecipientNpi?: string[] | undefined;
|
|
131
358
|
}, {
|
|
132
359
|
id: string;
|
|
133
|
-
status: "processing" | "completed" | "failed";
|
|
134
|
-
updatedAt: string;
|
|
135
360
|
patientId: string;
|
|
136
|
-
direction: "
|
|
137
|
-
|
|
361
|
+
direction: "inbound" | "outbound";
|
|
362
|
+
status: "completed" | "failed" | "processing";
|
|
363
|
+
transportMethod: "direct" | "xdr";
|
|
364
|
+
network?: "CAREQUALITY" | "COMMONWELL" | "EHEX" | undefined;
|
|
138
365
|
destination: string;
|
|
139
366
|
subject: string;
|
|
367
|
+
body?: string | undefined;
|
|
368
|
+
attachments?: string[] | undefined;
|
|
369
|
+
intendedRecipientNpi?: string[] | undefined;
|
|
140
370
|
sentAt: string;
|
|
371
|
+
updatedAt: string;
|
|
372
|
+
reason?: string | undefined;
|
|
141
373
|
urlXdr: string;
|
|
142
374
|
destinationName: string;
|
|
143
375
|
attachmentsForSender: {
|
|
@@ -147,29 +379,42 @@ export declare const internalMessageXdrSchema: z.ZodEffects<z.ZodObject<z.object
|
|
|
147
379
|
title?: string | undefined;
|
|
148
380
|
}[];
|
|
149
381
|
xdrPatient: {
|
|
150
|
-
patientId: string;
|
|
151
382
|
sourcePatientId: string;
|
|
152
383
|
sourcePatientSystem: string;
|
|
384
|
+
patientId: string;
|
|
153
385
|
patientSystem: string;
|
|
154
|
-
|
|
386
|
+
sourcePatientDemographics: {
|
|
387
|
+
firstName: string;
|
|
388
|
+
lastName: string;
|
|
389
|
+
dob: string;
|
|
390
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
391
|
+
address: {
|
|
392
|
+
addressLine1: string;
|
|
393
|
+
addressLine2?: string | undefined;
|
|
394
|
+
city: string;
|
|
395
|
+
state: string;
|
|
396
|
+
zip: string;
|
|
397
|
+
country?: string | undefined;
|
|
398
|
+
}[];
|
|
399
|
+
};
|
|
155
400
|
};
|
|
156
401
|
initiatorOid: string;
|
|
157
402
|
initiatorName: string;
|
|
158
|
-
reason?: string | undefined;
|
|
159
|
-
network?: "EHEX" | "CAREQUALITY" | "COMMONWELL" | undefined;
|
|
160
|
-
body?: string | undefined;
|
|
161
|
-
attachments?: string[] | undefined;
|
|
162
|
-
intendedRecipientNpi?: string[] | undefined;
|
|
163
403
|
}>, {
|
|
164
404
|
id: string;
|
|
165
|
-
status: "processing" | "completed" | "failed";
|
|
166
|
-
updatedAt: string;
|
|
167
405
|
patientId: string;
|
|
168
|
-
direction: "
|
|
169
|
-
|
|
406
|
+
direction: "inbound" | "outbound";
|
|
407
|
+
status: "completed" | "failed" | "processing";
|
|
408
|
+
transportMethod: "direct" | "xdr";
|
|
409
|
+
network?: "CAREQUALITY" | "COMMONWELL" | "EHEX" | undefined;
|
|
170
410
|
destination: string;
|
|
171
411
|
subject: string;
|
|
412
|
+
body?: string | undefined;
|
|
413
|
+
attachments?: string[] | undefined;
|
|
414
|
+
intendedRecipientNpi?: string[] | undefined;
|
|
172
415
|
sentAt: string;
|
|
416
|
+
updatedAt: string;
|
|
417
|
+
reason?: string | undefined;
|
|
173
418
|
urlXdr: string;
|
|
174
419
|
destinationName: string;
|
|
175
420
|
attachmentsForSender: {
|
|
@@ -179,29 +424,42 @@ export declare const internalMessageXdrSchema: z.ZodEffects<z.ZodObject<z.object
|
|
|
179
424
|
title?: string | undefined;
|
|
180
425
|
}[];
|
|
181
426
|
xdrPatient: {
|
|
182
|
-
patientId: string;
|
|
183
427
|
sourcePatientId: string;
|
|
184
428
|
sourcePatientSystem: string;
|
|
429
|
+
patientId: string;
|
|
185
430
|
patientSystem: string;
|
|
186
|
-
|
|
431
|
+
sourcePatientDemographics: {
|
|
432
|
+
firstName: string;
|
|
433
|
+
lastName: string;
|
|
434
|
+
dob: string;
|
|
435
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
436
|
+
address: {
|
|
437
|
+
addressLine1: string;
|
|
438
|
+
addressLine2?: string | undefined;
|
|
439
|
+
city: string;
|
|
440
|
+
state: string;
|
|
441
|
+
zip: string;
|
|
442
|
+
country?: string | undefined;
|
|
443
|
+
}[];
|
|
444
|
+
};
|
|
187
445
|
};
|
|
188
446
|
initiatorOid: string;
|
|
189
447
|
initiatorName: string;
|
|
190
|
-
reason?: string | undefined;
|
|
191
|
-
network?: "EHEX" | "CAREQUALITY" | "COMMONWELL" | undefined;
|
|
192
|
-
body?: string | undefined;
|
|
193
|
-
attachments?: string[] | undefined;
|
|
194
|
-
intendedRecipientNpi?: string[] | undefined;
|
|
195
448
|
}, {
|
|
196
449
|
id: string;
|
|
197
|
-
status: "processing" | "completed" | "failed";
|
|
198
|
-
updatedAt: string;
|
|
199
450
|
patientId: string;
|
|
200
|
-
direction: "
|
|
201
|
-
|
|
451
|
+
direction: "inbound" | "outbound";
|
|
452
|
+
status: "completed" | "failed" | "processing";
|
|
453
|
+
transportMethod: "direct" | "xdr";
|
|
454
|
+
network?: "CAREQUALITY" | "COMMONWELL" | "EHEX" | undefined;
|
|
202
455
|
destination: string;
|
|
203
456
|
subject: string;
|
|
457
|
+
body?: string | undefined;
|
|
458
|
+
attachments?: string[] | undefined;
|
|
459
|
+
intendedRecipientNpi?: string[] | undefined;
|
|
204
460
|
sentAt: string;
|
|
461
|
+
updatedAt: string;
|
|
462
|
+
reason?: string | undefined;
|
|
205
463
|
urlXdr: string;
|
|
206
464
|
destinationName: string;
|
|
207
465
|
attachmentsForSender: {
|
|
@@ -211,27 +469,38 @@ export declare const internalMessageXdrSchema: z.ZodEffects<z.ZodObject<z.object
|
|
|
211
469
|
title?: string | undefined;
|
|
212
470
|
}[];
|
|
213
471
|
xdrPatient: {
|
|
214
|
-
patientId: string;
|
|
215
472
|
sourcePatientId: string;
|
|
216
473
|
sourcePatientSystem: string;
|
|
474
|
+
patientId: string;
|
|
217
475
|
patientSystem: string;
|
|
218
|
-
|
|
476
|
+
sourcePatientDemographics: {
|
|
477
|
+
firstName: string;
|
|
478
|
+
lastName: string;
|
|
479
|
+
dob: string;
|
|
480
|
+
genderAtBirth: "F" | "M" | "O" | "U";
|
|
481
|
+
address: {
|
|
482
|
+
addressLine1: string;
|
|
483
|
+
addressLine2?: string | undefined;
|
|
484
|
+
city: string;
|
|
485
|
+
state: string;
|
|
486
|
+
zip: string;
|
|
487
|
+
country?: string | undefined;
|
|
488
|
+
}[];
|
|
489
|
+
};
|
|
219
490
|
};
|
|
220
491
|
initiatorOid: string;
|
|
221
492
|
initiatorName: string;
|
|
222
|
-
reason?: string | undefined;
|
|
223
|
-
network?: "EHEX" | "CAREQUALITY" | "COMMONWELL" | undefined;
|
|
224
|
-
body?: string | undefined;
|
|
225
|
-
attachments?: string[] | undefined;
|
|
226
|
-
intendedRecipientNpi?: string[] | undefined;
|
|
227
493
|
}>;
|
|
228
494
|
export type InternalMessageXdr = z.infer<typeof internalMessageXdrSchema>;
|
|
229
495
|
export declare const internalMessageXdrQuerySchema: z.ZodObject<{
|
|
230
496
|
cxId: z.ZodString;
|
|
497
|
+
patientId: z.ZodString;
|
|
231
498
|
}, "strict", z.ZodTypeAny, {
|
|
232
499
|
cxId: string;
|
|
500
|
+
patientId: string;
|
|
233
501
|
}, {
|
|
234
502
|
cxId: string;
|
|
503
|
+
patientId: string;
|
|
235
504
|
}>;
|
|
236
505
|
export type InternalMessageXdrQuery = z.infer<typeof internalMessageXdrQuerySchema>;
|
|
237
506
|
//# sourceMappingURL=internal-message-xdr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-message-xdr.d.ts","sourceRoot":"","sources":["../../../src/domain/message/internal-message-xdr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;EAO/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"internal-message-xdr.d.ts","sourceRoot":"","sources":["../../../src/domain/message/internal-message-xdr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;EAO/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,gFAAgF;AAChF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQlB,CAAC;AACZ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMjC,mFAAmF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,6BAA6B;;;;;;;;;EAK/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.internalMessageXdrQuerySchema = exports.internalMessageXdrSchema = exports.xdrPatientSchema = exports.messageSenderAttachmentSchema = void 0;
|
|
3
|
+
exports.internalMessageXdrQuerySchema = exports.internalMessageXdrSchema = exports.xdrPatientSchema = exports.sourcePatientDemographicsSchema = exports.messageSenderAttachmentSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const message_1 = require("./message");
|
|
6
6
|
exports.messageSenderAttachmentSchema = zod_1.z
|
|
@@ -11,13 +11,32 @@ exports.messageSenderAttachmentSchema = zod_1.z
|
|
|
11
11
|
title: zod_1.z.string().min(1).optional(),
|
|
12
12
|
})
|
|
13
13
|
.strict();
|
|
14
|
+
/** Demographics used to build XDS sourcePatientInfo PID lines on the sender. */
|
|
15
|
+
exports.sourcePatientDemographicsSchema = zod_1.z
|
|
16
|
+
.object({
|
|
17
|
+
firstName: zod_1.z.string().min(1),
|
|
18
|
+
lastName: zod_1.z.string().min(1),
|
|
19
|
+
dob: zod_1.z.string().min(1),
|
|
20
|
+
genderAtBirth: zod_1.z.enum(["M", "F", "O", "U"]),
|
|
21
|
+
address: zod_1.z.array(zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
addressLine1: zod_1.z.string().min(1),
|
|
24
|
+
addressLine2: zod_1.z.string().optional(),
|
|
25
|
+
city: zod_1.z.string().min(1),
|
|
26
|
+
state: zod_1.z.string().min(1),
|
|
27
|
+
zip: zod_1.z.string().min(1),
|
|
28
|
+
country: zod_1.z.string().optional(),
|
|
29
|
+
})
|
|
30
|
+
.strict()),
|
|
31
|
+
})
|
|
32
|
+
.strict();
|
|
14
33
|
exports.xdrPatientSchema = zod_1.z
|
|
15
34
|
.object({
|
|
16
35
|
sourcePatientId: zod_1.z.string().min(1),
|
|
17
36
|
sourcePatientSystem: zod_1.z.string().min(1),
|
|
18
37
|
patientId: zod_1.z.string().min(1),
|
|
19
38
|
patientSystem: zod_1.z.string().min(1),
|
|
20
|
-
|
|
39
|
+
sourcePatientDemographics: exports.sourcePatientDemographicsSchema,
|
|
21
40
|
})
|
|
22
41
|
.strict();
|
|
23
42
|
/**
|
|
@@ -39,6 +58,7 @@ exports.internalMessageXdrSchema = message_1.messageObjectSchema
|
|
|
39
58
|
exports.internalMessageXdrQuerySchema = zod_1.z
|
|
40
59
|
.object({
|
|
41
60
|
cxId: zod_1.z.string().uuid(),
|
|
61
|
+
patientId: zod_1.z.string().uuid(),
|
|
42
62
|
})
|
|
43
63
|
.strict();
|
|
44
64
|
//# sourceMappingURL=internal-message-xdr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-message-xdr.js","sourceRoot":"","sources":["../../../src/domain/message/internal-message-xdr.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAImB;AAEN,QAAA,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