@awell-health/awell-extensions 1.1.64 → 1.1.66
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/athenahealth/actions/index.d.ts +2 -2
- package/dist/extensions/athenahealth/api/schema/appointment.d.ts +2 -2
- package/dist/extensions/athenahealth/api/schema/clinicalDocument.d.ts +2 -2
- package/dist/extensions/athenahealth/settings.d.ts +4 -4
- package/dist/extensions/awell/v1/actions/updatePatient/config/fields.d.ts +4 -4
- package/dist/extensions/calDotCom/schema.d.ts +6 -6
- package/dist/extensions/calendly/webhooks/index.d.ts +1 -1
- package/dist/extensions/canvasMedical/v1/validation/patient.zod.d.ts +8 -8
- package/dist/extensions/canvasMedical/v1/validation/settings.zod.d.ts +4 -4
- package/dist/extensions/canvasMedical/v1/validation/task.zod.d.ts +8 -8
- package/dist/extensions/dockHealth/api/schema/patient.schema.d.ts +14 -14
- package/dist/extensions/dockHealth/api/schema/task.schema.d.ts +8 -8
- package/dist/extensions/dockHealth/lib/dock.types.d.ts +4 -4
- package/dist/extensions/dropboxSign/v1/actions/createEmbeddedSignatureRequestWithTemplate/config/fields.d.ts +1 -1
- package/dist/extensions/dropboxSign/v1/actions/sendRequestReminder/config/fields.d.ts +2 -2
- package/dist/extensions/elation/actions/index.d.ts +3 -3
- package/dist/extensions/elation/constants.d.ts +1 -0
- package/dist/extensions/elation/constants.js +5 -0
- package/dist/extensions/elation/constants.js.map +1 -0
- package/dist/extensions/elation/types/webhooks/appointments.d.ts +69 -0
- package/dist/extensions/elation/types/webhooks/appointments.js +27 -0
- package/dist/extensions/elation/types/webhooks/appointments.js.map +1 -0
- package/dist/extensions/elation/types/webhooks/webhooks.test.d.ts +1 -0
- package/dist/extensions/elation/types/webhooks/webhooks.test.js +65 -0
- package/dist/extensions/elation/types/webhooks/webhooks.test.js.map +1 -0
- package/dist/extensions/elation/validation/appointment.zod.d.ts +24 -24
- package/dist/extensions/elation/validation/nonVisitNote.zod.d.ts +3 -3
- package/dist/extensions/elation/validation/patient.zod.d.ts +4 -4
- package/dist/extensions/elation/validation/physician.zod.d.ts +4 -4
- package/dist/extensions/elation/validation/settings.zod.d.ts +4 -4
- package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.js +9 -3
- package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.js.map +1 -1
- package/dist/extensions/healthie/actions/createAppointment/config/fields.d.ts +2 -2
- package/dist/extensions/healthie/actions/getMetricEntry/config/fields.d.ts +2 -2
- package/dist/extensions/healthie/actions/index.d.ts +3 -3
- package/dist/extensions/healthie/lib/validation/createTask.zod.d.ts +22 -22
- package/dist/extensions/index.js +22 -20
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/infobip/settings.d.ts +4 -4
- package/dist/extensions/infobip/v1/actions/sendEmail/config/fields.d.ts +2 -2
- package/dist/extensions/infobip/v1/actions/sendEmailWithTemplate/config/fields.d.ts +2 -2
- package/dist/extensions/mailgun/settings.d.ts +1 -1
- package/dist/extensions/mailgun/v1/actions/sendEmailWithTemplate/config/fields.d.ts +2 -2
- package/dist/extensions/markdown.json +4 -0
- package/dist/extensions/medplum/actions/createPatient/config/fields.d.ts +4 -4
- package/dist/extensions/medplum/actions/createTask/config/fields.d.ts +2 -2
- package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.d.ts +4 -4
- package/dist/extensions/medplum/fhir/schemas/resources/task.schema.d.ts +2 -2
- package/dist/extensions/metriport/actions/index.d.ts +1 -1
- package/dist/extensions/metriport/actions/patient/validation.d.ts +6 -6
- package/dist/extensions/sendgrid-extension/v1/actions/addOrUpdateContact/config/fields.d.ts +2 -2
- package/dist/extensions/sendgrid-extension/v1/actions/sendEmailWithTemplate/config/fields.d.ts +2 -2
- package/dist/extensions/talkDesk/settings.d.ts +2 -2
- package/dist/extensions/twilio/v2/actions/createFlowExecution/config/actionSchema.d.ts +31 -31
- package/dist/extensions/twilio/v2/actions/getMessages/config/fields.d.ts +2 -2
- package/dist/extensions/workramp/config.d.ts +1 -0
- package/dist/extensions/workramp/config.js +5 -0
- package/dist/extensions/workramp/config.js.map +1 -0
- package/dist/extensions/workramp/index.d.ts +2 -0
- package/dist/extensions/workramp/index.js +19 -0
- package/dist/extensions/workramp/index.js.map +1 -0
- package/dist/extensions/workramp/settings.d.ts +1 -0
- package/dist/extensions/workramp/settings.js +5 -0
- package/dist/extensions/workramp/settings.js.map +1 -0
- package/dist/extensions/workramp/types/EventPayload.d.ts +49 -0
- package/dist/extensions/workramp/types/EventPayload.js +22 -0
- package/dist/extensions/workramp/types/EventPayload.js.map +1 -0
- package/dist/extensions/workramp/types/EventType.d.ts +13 -0
- package/dist/extensions/workramp/types/EventType.js +18 -0
- package/dist/extensions/workramp/types/EventType.js.map +1 -0
- package/dist/extensions/workramp/types/index.d.ts +2 -0
- package/dist/extensions/workramp/types/index.js +8 -0
- package/dist/extensions/workramp/types/index.js.map +1 -0
- package/dist/extensions/workramp/webhooks/EventWebhook.d.ts +12 -0
- package/dist/extensions/workramp/webhooks/EventWebhook.js +28 -0
- package/dist/extensions/workramp/webhooks/EventWebhook.js.map +1 -0
- package/dist/extensions/workramp/webhooks/index.d.ts +1 -0
- package/dist/extensions/workramp/webhooks/index.js +6 -0
- package/dist/extensions/workramp/webhooks/index.js.map +1 -0
- package/dist/extensions/zusHealth/validation/settings.zod.d.ts +5 -5
- package/package.json +1 -1
@@ -0,0 +1,69 @@
|
|
1
|
+
import z from 'zod';
|
2
|
+
/**
|
3
|
+
* This is not the full payload, only the most interesting parts
|
4
|
+
*/
|
5
|
+
export declare const AppointmentsPayloadSchema: z.ZodObject<{
|
6
|
+
event_id: z.ZodNumber;
|
7
|
+
application_id: z.ZodString;
|
8
|
+
resource: z.ZodString;
|
9
|
+
action: z.ZodEnum<["saved", "deleted"]>;
|
10
|
+
data: z.ZodObject<{
|
11
|
+
id: z.ZodNumber;
|
12
|
+
scheduled_date: z.ZodDate;
|
13
|
+
duration: z.ZodNumber;
|
14
|
+
reason: z.ZodString;
|
15
|
+
mode: z.ZodString;
|
16
|
+
patient: z.ZodNumber;
|
17
|
+
physician: z.ZodNumber;
|
18
|
+
practice: z.ZodNumber;
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
20
|
+
duration: number;
|
21
|
+
id: number;
|
22
|
+
mode: string;
|
23
|
+
patient: number;
|
24
|
+
reason: string;
|
25
|
+
scheduled_date: Date;
|
26
|
+
physician: number;
|
27
|
+
practice: number;
|
28
|
+
}, {
|
29
|
+
duration: number;
|
30
|
+
id: number;
|
31
|
+
mode: string;
|
32
|
+
patient: number;
|
33
|
+
reason: string;
|
34
|
+
scheduled_date: Date;
|
35
|
+
physician: number;
|
36
|
+
practice: number;
|
37
|
+
}>;
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
39
|
+
data: {
|
40
|
+
duration: number;
|
41
|
+
id: number;
|
42
|
+
mode: string;
|
43
|
+
patient: number;
|
44
|
+
reason: string;
|
45
|
+
scheduled_date: Date;
|
46
|
+
physician: number;
|
47
|
+
practice: number;
|
48
|
+
};
|
49
|
+
resource: string;
|
50
|
+
action: "saved" | "deleted";
|
51
|
+
event_id: number;
|
52
|
+
application_id: string;
|
53
|
+
}, {
|
54
|
+
data: {
|
55
|
+
duration: number;
|
56
|
+
id: number;
|
57
|
+
mode: string;
|
58
|
+
patient: number;
|
59
|
+
reason: string;
|
60
|
+
scheduled_date: Date;
|
61
|
+
physician: number;
|
62
|
+
practice: number;
|
63
|
+
};
|
64
|
+
resource: string;
|
65
|
+
action: "saved" | "deleted";
|
66
|
+
event_id: number;
|
67
|
+
application_id: string;
|
68
|
+
}>;
|
69
|
+
export type AppointmentsPayload = z.infer<typeof AppointmentsPayloadSchema>;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.AppointmentsPayloadSchema = void 0;
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
8
|
+
/**
|
9
|
+
* This is not the full payload, only the most interesting parts
|
10
|
+
*/
|
11
|
+
exports.AppointmentsPayloadSchema = zod_1.default.object({
|
12
|
+
event_id: zod_1.default.number(),
|
13
|
+
application_id: zod_1.default.string(),
|
14
|
+
resource: zod_1.default.string(),
|
15
|
+
action: zod_1.default.enum(['saved', 'deleted']),
|
16
|
+
data: zod_1.default.object({
|
17
|
+
id: zod_1.default.number(),
|
18
|
+
scheduled_date: zod_1.default.coerce.date(),
|
19
|
+
duration: zod_1.default.number(),
|
20
|
+
reason: zod_1.default.string(),
|
21
|
+
mode: zod_1.default.string(),
|
22
|
+
patient: zod_1.default.number(),
|
23
|
+
physician: zod_1.default.number(),
|
24
|
+
practice: zod_1.default.number(),
|
25
|
+
}),
|
26
|
+
});
|
27
|
+
//# sourceMappingURL=appointments.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"appointments.js","sourceRoot":"","sources":["../../../../../extensions/elation/types/webhooks/appointments.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmB;AAEnB;;GAEG;AACU,QAAA,yBAAyB,GAAG,aAAC,CAAC,MAAM,CAAC;IAChD,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,cAAc,EAAE,aAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACpC,IAAI,EAAE,aAAC,CAAC,MAAM,CAAC;QACb,EAAE,EAAE,aAAC,CAAC,MAAM,EAAE;QACd,cAAc,EAAE,aAAC,CAAC,MAAM,CAAC,IAAI,EAAE;QAC/B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,aAAC,CAAC,MAAM,EAAE;QAClB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE;QACnB,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;KACrB,CAAC;CACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const appointments_1 = require("./appointments");
|
4
|
+
describe('appointments', () => {
|
5
|
+
it('Parses appointments payload without errors', () => {
|
6
|
+
const payload = {
|
7
|
+
event_id: 683401,
|
8
|
+
application_id: 'iGhPjb2udF4oVDa2MMTNX6gcDk1SR5nl0Vdx1Fhw',
|
9
|
+
resource: 'appointments',
|
10
|
+
action: 'saved',
|
11
|
+
data: {
|
12
|
+
id: 142508453527642,
|
13
|
+
scheduled_date: '2024-09-06T10:15:00Z',
|
14
|
+
duration: 15,
|
15
|
+
billing_details: null,
|
16
|
+
payment: null,
|
17
|
+
time_slot_type: 'appointment',
|
18
|
+
time_slot_status: null,
|
19
|
+
reason: 'Follow-Up',
|
20
|
+
mode: 'IN_PERSON',
|
21
|
+
description: '',
|
22
|
+
status: {
|
23
|
+
status: 'Scheduled',
|
24
|
+
room: null,
|
25
|
+
status_date: '2024-09-06T10:03:54Z',
|
26
|
+
status_detail: null,
|
27
|
+
},
|
28
|
+
patient: 141986488057857,
|
29
|
+
patient_forms: {
|
30
|
+
patient_can_receive_forms: false,
|
31
|
+
anonymous_url: null,
|
32
|
+
overrides: [],
|
33
|
+
short_code: null,
|
34
|
+
statuses: [],
|
35
|
+
hours_prior: null,
|
36
|
+
},
|
37
|
+
physician: 141377681883138,
|
38
|
+
practice: 141127173275652,
|
39
|
+
instructions: '',
|
40
|
+
recurring_event_schedule: null,
|
41
|
+
metadata: null,
|
42
|
+
created_date: '2024-09-06T10:03:54Z',
|
43
|
+
last_modified_date: '2024-09-06T10:03:54Z',
|
44
|
+
deleted_date: null,
|
45
|
+
service_location: {
|
46
|
+
id: 141127173341431,
|
47
|
+
name: 'Awell Test Account',
|
48
|
+
is_primary: true,
|
49
|
+
place_of_service: null,
|
50
|
+
address_line1: '1234 Elation Dr',
|
51
|
+
address_line2: 'Apt. 989',
|
52
|
+
city: 'San Francisco',
|
53
|
+
state: 'CA',
|
54
|
+
zip: '94114',
|
55
|
+
phone: '555555555555',
|
56
|
+
created_date: '2022-11-10T23:21:13Z',
|
57
|
+
deleted_date: null,
|
58
|
+
},
|
59
|
+
telehealth_details: null,
|
60
|
+
},
|
61
|
+
};
|
62
|
+
expect(() => appointments_1.AppointmentsPayloadSchema.parse(payload)).not.toThrow();
|
63
|
+
});
|
64
|
+
});
|
65
|
+
//# sourceMappingURL=webhooks.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"webhooks.test.js","sourceRoot":"","sources":["../../../../../extensions/elation/types/webhooks/webhooks.test.ts"],"names":[],"mappings":";;AAAA,iDAA0D;AAE1D,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,MAAM;YAChB,cAAc,EAAE,0CAA0C;YAC1D,QAAQ,EAAE,cAAc;YACxB,MAAM,EAAE,OAAO;YACf,IAAI,EAAE;gBACJ,EAAE,EAAE,eAAe;gBACnB,cAAc,EAAE,sBAAsB;gBACtC,QAAQ,EAAE,EAAE;gBACZ,eAAe,EAAE,IAAI;gBACrB,OAAO,EAAE,IAAI;gBACb,cAAc,EAAE,aAAa;gBAC7B,gBAAgB,EAAE,IAAI;gBACtB,MAAM,EAAE,WAAW;gBACnB,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,EAAE;gBACf,MAAM,EAAE;oBACN,MAAM,EAAE,WAAW;oBACnB,IAAI,EAAE,IAAI;oBACV,WAAW,EAAE,sBAAsB;oBACnC,aAAa,EAAE,IAAI;iBACpB;gBACD,OAAO,EAAE,eAAe;gBACxB,aAAa,EAAE;oBACb,yBAAyB,EAAE,KAAK;oBAChC,aAAa,EAAE,IAAI;oBACnB,SAAS,EAAE,EAAE;oBACb,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,EAAE;oBACZ,WAAW,EAAE,IAAI;iBAClB;gBACD,SAAS,EAAE,eAAe;gBAC1B,QAAQ,EAAE,eAAe;gBACzB,YAAY,EAAE,EAAE;gBAChB,wBAAwB,EAAE,IAAI;gBAC9B,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,sBAAsB;gBACpC,kBAAkB,EAAE,sBAAsB;gBAC1C,YAAY,EAAE,IAAI;gBAClB,gBAAgB,EAAE;oBAChB,EAAE,EAAE,eAAe;oBACnB,IAAI,EAAE,oBAAoB;oBAC1B,UAAU,EAAE,IAAI;oBAChB,gBAAgB,EAAE,IAAI;oBACtB,aAAa,EAAE,iBAAiB;oBAChC,aAAa,EAAE,UAAU;oBACzB,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,IAAI;oBACX,GAAG,EAAE,OAAO;oBACZ,KAAK,EAAE,cAAc;oBACrB,YAAY,EAAE,sBAAsB;oBACpC,YAAY,EAAE,IAAI;iBACnB;gBACD,kBAAkB,EAAE,IAAI;aACzB;SACF,CAAA;QAED,MAAM,CAAC,GAAG,EAAE,CAAC,wCAAyB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -61,9 +61,9 @@ export declare const appointmentSchema: z.ZodObject<{
|
|
61
61
|
status_detail: string;
|
62
62
|
room?: string | undefined;
|
63
63
|
} | undefined;
|
64
|
+
duration?: number | undefined;
|
64
65
|
description?: string | undefined;
|
65
66
|
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
66
|
-
duration?: number | undefined;
|
67
67
|
service_location?: number | undefined;
|
68
68
|
telehealth_details?: string | undefined;
|
69
69
|
}, {
|
@@ -81,9 +81,9 @@ export declare const appointmentSchema: z.ZodObject<{
|
|
81
81
|
status_detail: string;
|
82
82
|
room?: string | undefined;
|
83
83
|
} | undefined;
|
84
|
+
duration?: number | undefined;
|
84
85
|
description?: string | undefined;
|
85
86
|
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
86
|
-
duration?: number | undefined;
|
87
87
|
service_location?: number | undefined;
|
88
88
|
telehealth_details?: string | undefined;
|
89
89
|
}>;
|
@@ -96,16 +96,16 @@ export declare const FindAppointmentFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
96
96
|
event_type: z.ZodOptional<z.ZodLiteral<"appointment">>;
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
98
98
|
patientId: number;
|
99
|
+
practiceId?: number | undefined;
|
99
100
|
event_type?: "appointment" | undefined;
|
100
101
|
physicianId?: number | undefined;
|
101
|
-
practiceId?: number | undefined;
|
102
102
|
from_date?: string | undefined;
|
103
103
|
to_date?: string | undefined;
|
104
104
|
}, {
|
105
105
|
patientId: number;
|
106
|
+
practiceId?: number | undefined;
|
106
107
|
event_type?: "appointment" | undefined;
|
107
108
|
physicianId?: number | undefined;
|
108
|
-
practiceId?: number | undefined;
|
109
109
|
from_date?: string | undefined;
|
110
110
|
to_date?: string | undefined;
|
111
111
|
}>, {
|
@@ -117,9 +117,9 @@ export declare const FindAppointmentFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
117
117
|
patient: number;
|
118
118
|
}, {
|
119
119
|
patientId: number;
|
120
|
+
practiceId?: number | undefined;
|
120
121
|
event_type?: "appointment" | undefined;
|
121
122
|
physicianId?: number | undefined;
|
122
|
-
practiceId?: number | undefined;
|
123
123
|
from_date?: string | undefined;
|
124
124
|
to_date?: string | undefined;
|
125
125
|
}>;
|
@@ -133,16 +133,16 @@ export declare const FindAppointmentSchema: z.ZodObject<{
|
|
133
133
|
event_type: z.ZodOptional<z.ZodLiteral<"appointment">>;
|
134
134
|
}, "strip", z.ZodTypeAny, {
|
135
135
|
patientId: number;
|
136
|
+
practiceId?: number | undefined;
|
136
137
|
event_type?: "appointment" | undefined;
|
137
138
|
physicianId?: number | undefined;
|
138
|
-
practiceId?: number | undefined;
|
139
139
|
from_date?: string | undefined;
|
140
140
|
to_date?: string | undefined;
|
141
141
|
}, {
|
142
142
|
patientId: number;
|
143
|
+
practiceId?: number | undefined;
|
143
144
|
event_type?: "appointment" | undefined;
|
144
145
|
physicianId?: number | undefined;
|
145
|
-
practiceId?: number | undefined;
|
146
146
|
from_date?: string | undefined;
|
147
147
|
to_date?: string | undefined;
|
148
148
|
}>, {
|
@@ -154,9 +154,9 @@ export declare const FindAppointmentSchema: z.ZodObject<{
|
|
154
154
|
patient: number;
|
155
155
|
}, {
|
156
156
|
patientId: number;
|
157
|
+
practiceId?: number | undefined;
|
157
158
|
event_type?: "appointment" | undefined;
|
158
159
|
physicianId?: number | undefined;
|
159
|
-
practiceId?: number | undefined;
|
160
160
|
from_date?: string | undefined;
|
161
161
|
to_date?: string | undefined;
|
162
162
|
}>;
|
@@ -168,29 +168,21 @@ export declare const FindAppointmentSchema: z.ZodObject<{
|
|
168
168
|
username: z.ZodString;
|
169
169
|
password: z.ZodString;
|
170
170
|
}, "strip", z.ZodTypeAny, {
|
171
|
-
base_url: string;
|
172
|
-
client_secret: string;
|
173
171
|
auth_url: string;
|
174
172
|
client_id: string;
|
173
|
+
client_secret: string;
|
174
|
+
base_url: string;
|
175
175
|
username: string;
|
176
176
|
password: string;
|
177
177
|
}, {
|
178
|
-
base_url: string;
|
179
|
-
client_secret: string;
|
180
178
|
auth_url: string;
|
181
179
|
client_id: string;
|
180
|
+
client_secret: string;
|
181
|
+
base_url: string;
|
182
182
|
username: string;
|
183
183
|
password: string;
|
184
184
|
}>;
|
185
185
|
}, "strip", z.ZodTypeAny, {
|
186
|
-
settings: {
|
187
|
-
base_url: string;
|
188
|
-
client_secret: string;
|
189
|
-
auth_url: string;
|
190
|
-
client_id: string;
|
191
|
-
username: string;
|
192
|
-
password: string;
|
193
|
-
};
|
194
186
|
fields: {
|
195
187
|
event_type?: string | undefined;
|
196
188
|
to_date?: string | undefined;
|
@@ -199,21 +191,29 @@ export declare const FindAppointmentSchema: z.ZodObject<{
|
|
199
191
|
practice?: number | undefined;
|
200
192
|
patient: number;
|
201
193
|
};
|
202
|
-
}, {
|
203
194
|
settings: {
|
204
|
-
base_url: string;
|
205
|
-
client_secret: string;
|
206
195
|
auth_url: string;
|
207
196
|
client_id: string;
|
197
|
+
client_secret: string;
|
198
|
+
base_url: string;
|
208
199
|
username: string;
|
209
200
|
password: string;
|
210
201
|
};
|
202
|
+
}, {
|
211
203
|
fields: {
|
212
204
|
patientId: number;
|
205
|
+
practiceId?: number | undefined;
|
213
206
|
event_type?: "appointment" | undefined;
|
214
207
|
physicianId?: number | undefined;
|
215
|
-
practiceId?: number | undefined;
|
216
208
|
from_date?: string | undefined;
|
217
209
|
to_date?: string | undefined;
|
218
210
|
};
|
211
|
+
settings: {
|
212
|
+
auth_url: string;
|
213
|
+
client_id: string;
|
214
|
+
client_secret: string;
|
215
|
+
base_url: string;
|
216
|
+
username: string;
|
217
|
+
password: string;
|
218
|
+
};
|
219
219
|
}>;
|
@@ -12,8 +12,8 @@ export declare const bulletSchema: z.ZodObject<{
|
|
12
12
|
}, {
|
13
13
|
text: string;
|
14
14
|
author: number;
|
15
|
-
id?: number | undefined;
|
16
15
|
category?: "Reason" | "Problem" | "Past" | "Family" | "Social" | "Instr" | "PE" | "ROS" | "Med" | "Data" | "Assessment" | "Test" | "Tx" | "Narrative" | "Followup" | "Plan" | "Objective" | "Hpi" | "Allergies" | "Habits" | "Assessplan" | "Consultant" | "Attending" | "Dateprocedure" | "Surgical" | "Orders" | "Referenced" | "Procedure" | undefined;
|
16
|
+
id?: number | undefined;
|
17
17
|
}>;
|
18
18
|
export declare const nonVisitNoteSchema: z.ZodObject<{
|
19
19
|
type: z.ZodDefault<z.ZodEnum<["email", "nonvisit", "phone"]>>;
|
@@ -30,8 +30,8 @@ export declare const nonVisitNoteSchema: z.ZodObject<{
|
|
30
30
|
}, {
|
31
31
|
text: string;
|
32
32
|
author: number;
|
33
|
-
id?: number | undefined;
|
34
33
|
category?: "Reason" | "Problem" | "Past" | "Family" | "Social" | "Instr" | "PE" | "ROS" | "Med" | "Data" | "Assessment" | "Test" | "Tx" | "Narrative" | "Followup" | "Plan" | "Objective" | "Hpi" | "Allergies" | "Habits" | "Assessplan" | "Consultant" | "Attending" | "Dateprocedure" | "Surgical" | "Orders" | "Referenced" | "Procedure" | undefined;
|
34
|
+
id?: number | undefined;
|
35
35
|
}>, "many">;
|
36
36
|
patient: z.ZodNumber;
|
37
37
|
practice: z.ZodOptional<z.ZodNumber>;
|
@@ -60,8 +60,8 @@ export declare const nonVisitNoteSchema: z.ZodObject<{
|
|
60
60
|
bullets: {
|
61
61
|
text: string;
|
62
62
|
author: number;
|
63
|
-
id?: number | undefined;
|
64
63
|
category?: "Reason" | "Problem" | "Past" | "Family" | "Social" | "Instr" | "PE" | "ROS" | "Med" | "Data" | "Assessment" | "Test" | "Tx" | "Narrative" | "Followup" | "Plan" | "Objective" | "Hpi" | "Allergies" | "Habits" | "Assessplan" | "Consultant" | "Attending" | "Dateprocedure" | "Surgical" | "Orders" | "Referenced" | "Procedure" | undefined;
|
64
|
+
id?: number | undefined;
|
65
65
|
}[];
|
66
66
|
document_date: Date;
|
67
67
|
chart_date: Date;
|
@@ -472,12 +472,12 @@ export declare const patientSchema: z.ZodObject<{
|
|
472
472
|
}>>>;
|
473
473
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
474
474
|
}, "strict", z.ZodTypeAny, {
|
475
|
+
dob: string;
|
475
476
|
first_name: string;
|
476
477
|
last_name: string;
|
477
478
|
sex: "Male" | "Female" | "Other" | "Unknown";
|
478
479
|
primary_physician: number;
|
479
480
|
caregiver_practice: number;
|
480
|
-
dob: string;
|
481
481
|
address?: {
|
482
482
|
city: string;
|
483
483
|
state: string;
|
@@ -604,12 +604,12 @@ export declare const patientSchema: z.ZodObject<{
|
|
604
604
|
description: string;
|
605
605
|
} | null | undefined;
|
606
606
|
}, {
|
607
|
+
dob: Date;
|
607
608
|
first_name: string;
|
608
609
|
last_name: string;
|
609
610
|
sex: "Male" | "Female" | "Other" | "Unknown";
|
610
611
|
primary_physician: number;
|
611
612
|
caregiver_practice: number;
|
612
|
-
dob: Date;
|
613
613
|
address?: {
|
614
614
|
city: string;
|
615
615
|
state: string;
|
@@ -1063,6 +1063,7 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1063
1063
|
}>>>;
|
1064
1064
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
1065
1065
|
}, "strict", z.ZodTypeAny, {
|
1066
|
+
dob?: string | null | undefined;
|
1066
1067
|
address?: {
|
1067
1068
|
city: string;
|
1068
1069
|
state: string;
|
@@ -1085,7 +1086,6 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1085
1086
|
sexual_orientation?: "unknown" | "option_not_listed" | "prefer_not_to_say" | "straight" | "gay" | "bisexual" | "lesbian" | "queer" | "asexual" | null | undefined;
|
1086
1087
|
primary_physician?: number | null | undefined;
|
1087
1088
|
caregiver_practice?: number | null | undefined;
|
1088
|
-
dob?: string | null | undefined;
|
1089
1089
|
ssn?: string | null | undefined;
|
1090
1090
|
race?: "Other" | "No race specified" | "American Indian or Alaska Native" | "Asian" | "Black or African American" | "Native Hawaiian or Other Pacific Islander" | "White" | "Declined to specify" | null | undefined;
|
1091
1091
|
ethnicity?: "Unknown" | "Declined to specify" | "No ethnicity specified" | "Hispanic or Latino" | "Not Hispanic or Latino" | null | undefined;
|
@@ -1195,6 +1195,7 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1195
1195
|
description: string;
|
1196
1196
|
} | null | undefined;
|
1197
1197
|
}, {
|
1198
|
+
dob?: Date | null | undefined;
|
1198
1199
|
address?: {
|
1199
1200
|
city: string;
|
1200
1201
|
state: string;
|
@@ -1217,7 +1218,6 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1217
1218
|
sexual_orientation?: "unknown" | "option_not_listed" | "prefer_not_to_say" | "straight" | "gay" | "bisexual" | "lesbian" | "queer" | "asexual" | null | undefined;
|
1218
1219
|
primary_physician?: number | null | undefined;
|
1219
1220
|
caregiver_practice?: number | null | undefined;
|
1220
|
-
dob?: Date | null | undefined;
|
1221
1221
|
ssn?: string | null | undefined;
|
1222
1222
|
race?: "Other" | "No race specified" | "American Indian or Alaska Native" | "Asian" | "Black or African American" | "Native Hawaiian or Other Pacific Islander" | "White" | "Declined to specify" | null | undefined;
|
1223
1223
|
ethnicity?: "Unknown" | "Declined to specify" | "No ethnicity specified" | "Hispanic or Latino" | "Not Hispanic or Latino" | null | undefined;
|
@@ -8,19 +8,19 @@ export declare const physicianSchema: z.ZodObject<{
|
|
8
8
|
license_state: z.ZodOptional<z.ZodString>;
|
9
9
|
credentials: z.ZodOptional<z.ZodString>;
|
10
10
|
}, "strict", z.ZodTypeAny, {
|
11
|
-
credentials?: string | undefined;
|
12
11
|
email?: string | undefined;
|
12
|
+
credentials?: string | undefined;
|
13
13
|
first_name?: string | undefined;
|
14
14
|
last_name?: string | undefined;
|
15
|
-
npi?: string | undefined;
|
16
15
|
license?: string | undefined;
|
16
|
+
npi?: string | undefined;
|
17
17
|
license_state?: string | undefined;
|
18
18
|
}, {
|
19
|
-
credentials?: string | undefined;
|
20
19
|
email?: string | undefined;
|
20
|
+
credentials?: string | undefined;
|
21
21
|
first_name?: string | undefined;
|
22
22
|
last_name?: string | undefined;
|
23
|
-
npi?: string | undefined;
|
24
23
|
license?: string | undefined;
|
24
|
+
npi?: string | undefined;
|
25
25
|
license_state?: string | undefined;
|
26
26
|
}>;
|
@@ -7,17 +7,17 @@ export declare const settingsSchema: z.ZodObject<{
|
|
7
7
|
username: z.ZodString;
|
8
8
|
password: z.ZodString;
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
10
|
-
base_url: string;
|
11
|
-
client_secret: string;
|
12
10
|
auth_url: string;
|
13
11
|
client_id: string;
|
12
|
+
client_secret: string;
|
13
|
+
base_url: string;
|
14
14
|
username: string;
|
15
15
|
password: string;
|
16
16
|
}, {
|
17
|
-
base_url: string;
|
18
|
-
client_secret: string;
|
19
17
|
auth_url: string;
|
20
18
|
client_id: string;
|
19
|
+
client_secret: string;
|
20
|
+
base_url: string;
|
21
21
|
username: string;
|
22
22
|
password: string;
|
23
23
|
}>;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.appointmentCreatedOrUpdated = void 0;
|
4
|
+
const constants_1 = require("../constants");
|
5
|
+
const appointments_1 = require("../types/webhooks/appointments");
|
4
6
|
const dataPoints = {
|
5
7
|
appointmentId: {
|
6
8
|
key: 'appointmentId',
|
@@ -11,8 +13,8 @@ exports.appointmentCreatedOrUpdated = {
|
|
11
13
|
key: 'appointmentCreatedOrUpdated',
|
12
14
|
dataPoints,
|
13
15
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
14
|
-
const {
|
15
|
-
// skip non 'saved'
|
16
|
+
const { action, resource, data: { id: appointmentId, patient: patientId }, } = appointments_1.AppointmentsPayloadSchema.parse(payload);
|
17
|
+
// skip non 'saved' actions for that webhook
|
16
18
|
if (action !== 'saved') {
|
17
19
|
return;
|
18
20
|
}
|
@@ -26,7 +28,11 @@ exports.appointmentCreatedOrUpdated = {
|
|
26
28
|
}
|
27
29
|
else {
|
28
30
|
await onSuccess({
|
29
|
-
data_points: { appointmentId: String(
|
31
|
+
data_points: { appointmentId: String(appointmentId) },
|
32
|
+
patient_identifier: {
|
33
|
+
system: constants_1.ELATION_SYSTEM,
|
34
|
+
value: String(patientId),
|
35
|
+
},
|
30
36
|
});
|
31
37
|
}
|
32
38
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"appointmentCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/appointmentCreatedOrUpdated.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"appointmentCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/appointmentCreatedOrUpdated.ts"],"names":[],"mappings":";;;AAIA,4CAA6C;AAE7C,iEAA0E;AAE1E,MAAM,UAAU,GAAG;IACjB,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,2BAA2B,GAGpC;IACF,GAAG,EAAE,6BAA6B;IAClC,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,IAAI,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAChD,GAAG,wCAAyB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAE5C,6CAA6C;QAC7C,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,KAAK,cAAc,EAAE;YAC/B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,gCAAgC;iBAC1C;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,EAAE;gBACrD,kBAAkB,EAAE;oBAClB,MAAM,EAAE,0BAAc;oBACtB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;iBACzB;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -52,16 +52,16 @@ export declare const FieldsValidationSchema: z.ZodObject<{
|
|
52
52
|
metadata: z.ZodEffects<z.ZodOptional<z.ZodString>, Record<string, any>, string | undefined>;
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
54
54
|
patientId: string;
|
55
|
+
appointmentTypeId: string;
|
55
56
|
metadata: Record<string, any>;
|
56
57
|
datetime: string;
|
57
58
|
contactTypeId: string;
|
58
|
-
appointmentTypeId: string;
|
59
59
|
otherPartyId?: string | undefined;
|
60
60
|
}, {
|
61
61
|
patientId: string;
|
62
|
+
appointmentTypeId: string;
|
62
63
|
datetime: Date;
|
63
64
|
contactTypeId: string;
|
64
|
-
appointmentTypeId: string;
|
65
65
|
metadata?: string | undefined;
|
66
66
|
otherPartyId?: string | undefined;
|
67
67
|
}>;
|
@@ -20,9 +20,9 @@ export declare const FieldsValidationSchema: z.ZodObject<{
|
|
20
20
|
patientId: z.ZodString;
|
21
21
|
category: z.ZodString;
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
23
|
-
category: string;
|
24
23
|
patientId: string;
|
25
|
-
}, {
|
26
24
|
category: string;
|
25
|
+
}, {
|
27
26
|
patientId: string;
|
27
|
+
category: string;
|
28
28
|
}>;
|
@@ -153,7 +153,7 @@ export declare const actions: {
|
|
153
153
|
required: true;
|
154
154
|
description: string;
|
155
155
|
};
|
156
|
-
}, "
|
156
|
+
}, "patientId" | "date" | "appointmentTypeName" | "appointmentTypeId" | "appointmentStatus" | "contactType">;
|
157
157
|
getPatient: import("@awell-health/extensions-core").Action<{
|
158
158
|
patientId: {
|
159
159
|
id: string;
|
@@ -176,7 +176,7 @@ export declare const actions: {
|
|
176
176
|
required: true;
|
177
177
|
description: string;
|
178
178
|
};
|
179
|
-
}, "
|
179
|
+
}, "firstName" | "lastName" | "email" | "dob" | "gender" | "isoSex" | "phoneNumber" | "primaryProviderId" | "groupName">;
|
180
180
|
sendChatMessage: import("@awell-health/extensions-core").Action<{
|
181
181
|
healthie_patient_id: {
|
182
182
|
id: string;
|
@@ -813,7 +813,7 @@ export declare const actions: {
|
|
813
813
|
required: true;
|
814
814
|
description: string;
|
815
815
|
};
|
816
|
-
}, "
|
816
|
+
}, "createdAt" | "metricId" | "metricValue">;
|
817
817
|
updatePatientQuickNote: import("@awell-health/extensions-core").Action<{
|
818
818
|
patientId: {
|
819
819
|
id: string;
|