@awell-health/awell-extensions 2.0.321 → 2.0.322

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.
Files changed (25) hide show
  1. package/dist/extensions/elation/actions/findAppointments/config/dataPoints.d.ts +10 -0
  2. package/dist/extensions/elation/actions/findAppointments/config/dataPoints.js +14 -0
  3. package/dist/extensions/elation/actions/findAppointments/config/dataPoints.js.map +1 -0
  4. package/dist/extensions/elation/actions/findAppointments/config/fields.d.ts +68 -0
  5. package/dist/extensions/elation/actions/findAppointments/config/fields.js +58 -0
  6. package/dist/extensions/elation/actions/findAppointments/config/fields.js.map +1 -0
  7. package/dist/extensions/elation/actions/findAppointments/config/index.d.ts +2 -0
  8. package/dist/extensions/elation/actions/findAppointments/config/index.js +9 -0
  9. package/dist/extensions/elation/actions/findAppointments/config/index.js.map +1 -0
  10. package/dist/extensions/elation/actions/findAppointments/findAppointments.d.ts +4 -0
  11. package/dist/extensions/elation/actions/findAppointments/findAppointments.js +37 -0
  12. package/dist/extensions/elation/actions/findAppointments/findAppointments.js.map +1 -0
  13. package/dist/extensions/elation/actions/findAppointments/index.d.ts +1 -0
  14. package/dist/extensions/elation/actions/findAppointments/index.js +6 -0
  15. package/dist/extensions/elation/actions/findAppointments/index.js.map +1 -0
  16. package/dist/extensions/elation/actions/findAppointmentsWithAI/config/dataPoints.d.ts +4 -0
  17. package/dist/extensions/elation/actions/findAppointmentsWithAI/config/dataPoints.js +4 -0
  18. package/dist/extensions/elation/actions/findAppointmentsWithAI/config/dataPoints.js.map +1 -1
  19. package/dist/extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.js +2 -0
  20. package/dist/extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.js.map +1 -1
  21. package/dist/extensions/elation/actions/index.d.ts +3 -1
  22. package/package.json +1 -1
  23. package/dist/extensions/elation/actions/findAppointments.d.ts +0 -56
  24. package/dist/extensions/elation/actions/findAppointments.js +0 -87
  25. package/dist/extensions/elation/actions/findAppointments.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ export declare const dataPoints: {
2
+ appointments: {
3
+ key: string;
4
+ valueType: "json";
5
+ };
6
+ appointment_exists: {
7
+ key: string;
8
+ valueType: "boolean";
9
+ };
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ appointments: {
6
+ key: 'appointments',
7
+ valueType: 'json',
8
+ },
9
+ appointment_exists: {
10
+ key: 'appointment_exists',
11
+ valueType: 'boolean',
12
+ },
13
+ };
14
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointments/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,SAAS,EAAE,MAAM;KAClB;IACD,kBAAkB,EAAE;QAClB,GAAG,EAAE,oBAAoB;QACzB,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA"}
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ patientId: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.NUMERIC;
8
+ description: string;
9
+ required: true;
10
+ };
11
+ physicianId: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.NUMERIC;
15
+ description: string;
16
+ required: false;
17
+ };
18
+ practiceId: {
19
+ id: string;
20
+ label: string;
21
+ type: FieldType.NUMERIC;
22
+ description: string;
23
+ required: false;
24
+ };
25
+ from_date: {
26
+ id: string;
27
+ label: string;
28
+ type: FieldType.DATE;
29
+ description: string;
30
+ required: false;
31
+ };
32
+ to_date: {
33
+ id: string;
34
+ label: string;
35
+ type: FieldType.DATE;
36
+ description: string;
37
+ required: false;
38
+ };
39
+ event_type: {
40
+ id: string;
41
+ label: string;
42
+ type: FieldType.STRING;
43
+ description: string;
44
+ required: false;
45
+ };
46
+ };
47
+ export declare const FieldsValidationSchema: z.ZodObject<{
48
+ patientId: z.ZodNumber;
49
+ physicianId: z.ZodOptional<z.ZodNumber>;
50
+ practiceId: z.ZodOptional<z.ZodNumber>;
51
+ from_date: z.ZodOptional<z.ZodString>;
52
+ to_date: z.ZodOptional<z.ZodString>;
53
+ event_type: z.ZodOptional<z.ZodLiteral<"appointment">>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ patientId: number;
56
+ practiceId?: number | undefined;
57
+ event_type?: "appointment" | undefined;
58
+ physicianId?: number | undefined;
59
+ from_date?: string | undefined;
60
+ to_date?: string | undefined;
61
+ }, {
62
+ patientId: number;
63
+ practiceId?: number | undefined;
64
+ event_type?: "appointment" | undefined;
65
+ physicianId?: number | undefined;
66
+ from_date?: string | undefined;
67
+ to_date?: string | undefined;
68
+ }>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const zod_1 = require("zod");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ exports.fields = {
7
+ patientId: {
8
+ id: 'patientId',
9
+ label: 'Patient ID',
10
+ type: extensions_core_1.FieldType.NUMERIC,
11
+ description: 'Patient ID',
12
+ required: true,
13
+ },
14
+ physicianId: {
15
+ id: 'physicianId',
16
+ label: 'Physician ID',
17
+ type: extensions_core_1.FieldType.NUMERIC,
18
+ description: 'Physician ID',
19
+ required: false,
20
+ },
21
+ practiceId: {
22
+ id: 'practiceId',
23
+ label: 'Practice ID',
24
+ type: extensions_core_1.FieldType.NUMERIC,
25
+ description: 'Practice ID',
26
+ required: false,
27
+ },
28
+ from_date: {
29
+ id: 'from_date',
30
+ label: 'From Date',
31
+ type: extensions_core_1.FieldType.DATE,
32
+ description: 'Date from which to filter appointments',
33
+ required: false,
34
+ },
35
+ to_date: {
36
+ id: 'to_date',
37
+ label: 'To date',
38
+ type: extensions_core_1.FieldType.DATE,
39
+ description: 'Date to which appointments are filtered',
40
+ required: false,
41
+ },
42
+ event_type: {
43
+ id: 'event_type',
44
+ label: 'Event Type',
45
+ type: extensions_core_1.FieldType.STRING,
46
+ description: 'Event Type (`appointment` or leave empty)',
47
+ required: false,
48
+ },
49
+ };
50
+ exports.FieldsValidationSchema = zod_1.z.object({
51
+ patientId: extensions_core_1.NumericIdSchema,
52
+ physicianId: extensions_core_1.NumericIdSchema.optional(),
53
+ practiceId: extensions_core_1.NumericIdSchema.optional(),
54
+ from_date: zod_1.z.string().datetime().optional(),
55
+ to_date: zod_1.z.string().datetime().optional(),
56
+ event_type: zod_1.z.literal('appointment').optional(),
57
+ });
58
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointments/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAIsC;AAEzB,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,WAAW,EAAE,YAAY;QACzB,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,WAAW,EAAE,cAAc;QAC3B,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,WAAW,EAAE,aAAa;QAC1B,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,KAAK;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,WAAW,EAAE,yCAAyC;QACtD,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,WAAW,EAAE,2CAA2C;QACxD,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,iCAAe;IAC1B,WAAW,EAAE,iCAAe,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,iCAAe,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;CACE,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { dataPoints } from './dataPoints';
2
+ export { fields, FieldsValidationSchema } from './fields';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = exports.dataPoints = void 0;
4
+ var dataPoints_1 = require("./dataPoints");
5
+ Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
6
+ var fields_1 = require("./fields");
7
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
8
+ Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointments/config/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const findAppointments: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findAppointments = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const settings_1 = require("../../settings");
6
+ const client_1 = require("../../client");
7
+ const appointment_zod_1 = require("../../validation/appointment.zod");
8
+ const zod_1 = require("zod");
9
+ const config_1 = require("./config");
10
+ exports.findAppointments = {
11
+ key: 'findAppointment',
12
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
13
+ title: 'Find Appointment',
14
+ description: 'Retrieve appointments for a given patient, physician, practice, and/or times',
15
+ fields: config_1.fields,
16
+ previewable: true,
17
+ dataPoints: config_1.dataPoints,
18
+ onEvent: async ({ payload, onComplete }) => {
19
+ const { fields, settings } = (0, extensions_core_1.validate)({
20
+ schema: zod_1.z.object({
21
+ fields: config_1.FieldsValidationSchema,
22
+ settings: settings_1.SettingsValidationSchema,
23
+ }),
24
+ payload,
25
+ });
26
+ const findAppiontmentsParams = appointment_zod_1.FindAppointmentFieldSchema.parse(fields);
27
+ const client = (0, client_1.makeAPIClient)(settings);
28
+ const resp = await client.findAppointments(findAppiontmentsParams);
29
+ await onComplete({
30
+ data_points: {
31
+ appointments: JSON.stringify(resp),
32
+ appointment_exists: resp.length > 0 ? 'true' : 'false',
33
+ },
34
+ });
35
+ },
36
+ };
37
+ //# sourceMappingURL=findAppointments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findAppointments.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/findAppointments/findAppointments.ts"],"names":[],"mappings":";;;AAAA,mEAA+E;AAC/E,6CAAwE;AACxE,yCAA4C;AAC5C,sEAA6E;AAC7E,6BAAuB;AACvB,qCAAqE;AAExD,QAAA,gBAAgB,GAIzB;IACF,GAAG,EAAE,iBAAiB;IACtB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,8EAA8E;IAChF,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAiB,EAAE;QACxD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,0BAAQ,EAAC;YACpC,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,QAAQ,EAAE,mCAAwB;aACnC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,sBAAsB,GAAG,4CAA0B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAEvE,MAAM,MAAM,GAAG,IAAA,sBAAa,EAAC,QAAQ,CAAC,CAAA;QACtC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAA;QAElE,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;gBAClC,kBAAkB,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;aACvD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ export { findAppointments } from './findAppointments';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findAppointments = void 0;
4
+ var findAppointments_1 = require("./findAppointments");
5
+ Object.defineProperty(exports, "findAppointments", { enumerable: true, get: function () { return findAppointments_1.findAppointments; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/findAppointments/index.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA"}
@@ -7,6 +7,10 @@ export declare const dataPoints: {
7
7
  key: string;
8
8
  valueType: "string";
9
9
  };
10
+ appointmentsFound: {
11
+ key: string;
12
+ valueType: "boolean";
13
+ };
10
14
  appointmentCountsByStatus: {
11
15
  key: string;
12
16
  valueType: "json";
@@ -10,6 +10,10 @@ exports.dataPoints = {
10
10
  key: 'explanation',
11
11
  valueType: 'string',
12
12
  },
13
+ appointmentsFound: {
14
+ key: 'appointmentsFound',
15
+ valueType: 'boolean',
16
+ },
13
17
  appointmentCountsByStatus: {
14
18
  key: 'appointmentCountsByStatus',
15
19
  valueType: 'json',
@@ -1 +1 @@
1
- {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointmentsWithAI/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,SAAS,EAAE,MAAM;KAClB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,yBAAyB,EAAE;QACzB,GAAG,EAAE,2BAA2B;QAChC,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointmentsWithAI/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,YAAY,EAAE;QACZ,GAAG,EAAE,cAAc;QACnB,SAAS,EAAE,MAAM;KAClB;IACD,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,mBAAmB;QACxB,SAAS,EAAE,SAAS;KACrB;IACD,yBAAyB,EAAE;QACzB,GAAG,EAAE,2BAA2B;QAChC,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
@@ -47,6 +47,7 @@ exports.findAppointmentsWithAI = {
47
47
  await onComplete({
48
48
  data_points: {
49
49
  explanation: 'No appointments found for the given patient',
50
+ appointmentsFound: 'false',
50
51
  appointments: JSON.stringify([]),
51
52
  appointmentCountsByStatus: JSON.stringify({}),
52
53
  },
@@ -93,6 +94,7 @@ exports.findAppointmentsWithAI = {
93
94
  data_points: {
94
95
  appointments: JSON.stringify(selectedAppointments),
95
96
  explanation: htmlExplanation,
97
+ appointmentsFound: selectedAppointments.length > 0 ? 'true' : 'false',
96
98
  appointmentCountsByStatus: JSON.stringify(appointmentCountsByStatus),
97
99
  },
98
100
  events,
@@ -1 +1 @@
1
- {"version":3,"file":"findAppointmentsWithAI.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,uCAAsD;AACtD,mCAAyC;AACzC,uEAA2E;AAC3E,wEAAwE;AACxE,wFAAoF;AACpF,iDAAsD;AACtD,yCAA4C;AAC5C,sHAAkH;AAClH,uGAAmG;AAEnG,qCAAqE;AACrE,+EAA4E;AAE/D,QAAA,sBAAsB,GAI/B;IACF,GAAG,EAAE,wBAAwB;IAC7B,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,6DAA6D;IAC1E,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,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AC;gBACxB,MAAM,CAAC,IAAI,CACT,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,oBAAoB,oBAAoB,CAAC,MAAM,iCAAiC,IAAI,GAAG;iBACjG,CAAC,CACH,CAAA;YACH,CAAC;iBAAM,IAAI,CAAC,IAAA,cAAK,EAAC,EAAE,CAAC,EAAE,CAAC;gBACtB,MAAM,CAAC,IAAI,CACT,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,oBAAoB,oBAAoB,CAAC,MAAM,kCAAkC,EAAE,GAAG;iBAChG,CAAC,CACH,CAAA;YACH,CAAC;YACD,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE;oBACX,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;oBAClD,WAAW,EAAE,eAAe;oBAC5B,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC;iBACrE;gBACD,MAAM;aACP,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,6BAA6B,EAAE;wBAC3C,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;yBAClE;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"findAppointmentsWithAI.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,uCAAsD;AACtD,mCAAyC;AACzC,uEAA2E;AAC3E,wEAAwE;AACxE,wFAAoF;AACpF,iDAAsD;AACtD,y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xB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;yBAClE;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -660,6 +660,7 @@ export declare const actions: {
660
660
  label: string;
661
661
  type: import("@awell-health/extensions-core").FieldType.NUMERIC;
662
662
  description: string;
663
+ required: true;
663
664
  };
664
665
  physicianId: {
665
666
  id: string;
@@ -680,6 +681,7 @@ export declare const actions: {
680
681
  label: string;
681
682
  type: import("@awell-health/extensions-core").FieldType.DATE;
682
683
  description: string;
684
+ required: false;
683
685
  };
684
686
  to_date: {
685
687
  id: string;
@@ -2870,7 +2872,7 @@ export declare const actions: {
2870
2872
  description: string;
2871
2873
  required: false;
2872
2874
  };
2873
- }, "appointments" | "explanation" | "appointmentCountsByStatus">;
2875
+ }, "appointments" | "explanation" | "appointmentsFound" | "appointmentCountsByStatus">;
2874
2876
  signNonVisitNote: import("@awell-health/extensions-core").Action<{
2875
2877
  nonVisitNoteId: {
2876
2878
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.321",
3
+ "version": "2.0.322",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -1,56 +0,0 @@
1
- import { FieldType, type Action } from '@awell-health/extensions-core';
2
- import { type settings } from '../settings';
3
- declare const fields: {
4
- patientId: {
5
- id: string;
6
- label: string;
7
- type: FieldType.NUMERIC;
8
- description: string;
9
- };
10
- physicianId: {
11
- id: string;
12
- label: string;
13
- type: FieldType.NUMERIC;
14
- description: string;
15
- required: false;
16
- };
17
- practiceId: {
18
- id: string;
19
- label: string;
20
- type: FieldType.NUMERIC;
21
- description: string;
22
- required: false;
23
- };
24
- from_date: {
25
- id: string;
26
- label: string;
27
- type: FieldType.DATE;
28
- description: string;
29
- };
30
- to_date: {
31
- id: string;
32
- label: string;
33
- type: FieldType.DATE;
34
- description: string;
35
- required: false;
36
- };
37
- event_type: {
38
- id: string;
39
- label: string;
40
- type: FieldType.STRING;
41
- description: string;
42
- required: false;
43
- };
44
- };
45
- declare const dataPoints: {
46
- appointments: {
47
- key: string;
48
- valueType: "json";
49
- };
50
- appointment_exists: {
51
- key: string;
52
- valueType: "boolean";
53
- };
54
- };
55
- export declare const findAppointments: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
56
- export {};
@@ -1,87 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findAppointments = void 0;
4
- const extensions_core_1 = require("@awell-health/extensions-core");
5
- const settings_1 = require("../settings");
6
- const client_1 = require("../client");
7
- const appointment_zod_1 = require("../validation/appointment.zod");
8
- const zod_1 = require("zod");
9
- const fields = {
10
- patientId: {
11
- id: 'patientId',
12
- label: 'Patient ID',
13
- type: extensions_core_1.FieldType.NUMERIC,
14
- description: 'Patient ID',
15
- },
16
- physicianId: {
17
- id: 'physicianId',
18
- label: 'Physician ID',
19
- type: extensions_core_1.FieldType.NUMERIC,
20
- description: 'Physician ID',
21
- required: false,
22
- },
23
- practiceId: {
24
- id: 'practiceId',
25
- label: 'Practice ID',
26
- type: extensions_core_1.FieldType.NUMERIC,
27
- description: 'Practice ID',
28
- required: false,
29
- },
30
- from_date: {
31
- id: 'from_date',
32
- label: 'From Date',
33
- type: extensions_core_1.FieldType.DATE,
34
- description: 'Date from which to filter appointments',
35
- },
36
- to_date: {
37
- id: 'to_date',
38
- label: 'To date',
39
- type: extensions_core_1.FieldType.DATE,
40
- description: 'Date to which appointments are filtered',
41
- required: false,
42
- },
43
- event_type: {
44
- id: 'event_type',
45
- label: 'Event Type',
46
- type: extensions_core_1.FieldType.STRING,
47
- description: 'Event Type (`appointment` or leave empty)',
48
- required: false,
49
- },
50
- };
51
- const dataPoints = {
52
- appointments: {
53
- key: 'appointments',
54
- valueType: 'json',
55
- },
56
- appointment_exists: {
57
- key: 'appointment_exists',
58
- valueType: 'boolean',
59
- },
60
- };
61
- exports.findAppointments = {
62
- key: 'findAppointment',
63
- category: extensions_core_1.Category.EHR_INTEGRATIONS,
64
- title: 'Find Appointment',
65
- description: 'Retrieve appointments for a given patient, physician, practice, and/or times',
66
- fields,
67
- previewable: true,
68
- dataPoints,
69
- onActivityCreated: async (payload, onComplete, onError) => {
70
- const { fields, settings } = (0, extensions_core_1.validate)({
71
- schema: zod_1.z.object({
72
- fields: appointment_zod_1.FindAppointmentFieldSchema,
73
- settings: settings_1.SettingsValidationSchema,
74
- }),
75
- payload,
76
- });
77
- const client = (0, client_1.makeAPIClient)(settings);
78
- const resp = await client.findAppointments(fields);
79
- await onComplete({
80
- data_points: {
81
- appointments: JSON.stringify(resp),
82
- appointment_exists: resp.length > 0 ? 'true' : 'false',
83
- },
84
- });
85
- },
86
- };
87
- //# sourceMappingURL=findAppointments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"findAppointments.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/findAppointments.ts"],"names":[],"mappings":";;;AAAA,mEAOsC;AACtC,0CAAqE;AACrE,sCAAyC;AACzC,mEAA0E;AAC1E,6BAAuB;AAEvB,MAAM,MAAM,GAAG;IACb,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,WAAW,EAAE,YAAY;KAC1B;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,WAAW,EAAE,cAAc;QAC3B,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,WAAW,EAAE,aAAa;QAC1B,QAAQ,EAAE,KAAK;KAChB;IAC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