@awell-health/awell-extensions 2.0.74 → 2.0.76

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/extensions/elation/actions/{addHistories/addHistories.d.ts → addHistory/addHistory.d.ts} +1 -1
  2. package/dist/extensions/elation/actions/addHistory/addHistory.js +33 -0
  3. package/dist/extensions/elation/actions/addHistory/addHistory.js.map +1 -0
  4. package/dist/extensions/elation/actions/addHistory/config/fields.d.ts +38 -0
  5. package/dist/extensions/elation/actions/addHistory/config/fields.js +38 -0
  6. package/dist/extensions/elation/actions/addHistory/config/fields.js.map +1 -0
  7. package/dist/extensions/elation/actions/addHistory/config/index.js.map +1 -0
  8. package/dist/extensions/elation/actions/addHistory/index.d.ts +1 -0
  9. package/dist/extensions/elation/actions/addHistory/index.js +6 -0
  10. package/dist/extensions/elation/actions/addHistory/index.js.map +1 -0
  11. package/dist/extensions/elation/actions/createVisitNote/config/dataPoints.d.ts +6 -0
  12. package/dist/extensions/elation/actions/createVisitNote/config/dataPoints.js +10 -0
  13. package/dist/extensions/elation/actions/createVisitNote/config/dataPoints.js.map +1 -0
  14. package/dist/extensions/elation/actions/createVisitNote/config/fields.d.ts +106 -0
  15. package/dist/extensions/elation/actions/createVisitNote/config/fields.js +95 -0
  16. package/dist/extensions/elation/actions/createVisitNote/config/fields.js.map +1 -0
  17. package/dist/extensions/elation/actions/createVisitNote/config/index.d.ts +2 -0
  18. package/dist/extensions/elation/actions/createVisitNote/config/index.js +11 -0
  19. package/dist/extensions/elation/actions/createVisitNote/config/index.js.map +1 -0
  20. package/dist/extensions/elation/actions/createVisitNote/createVisitNote.d.ts +4 -0
  21. package/dist/extensions/elation/actions/createVisitNote/createVisitNote.js +49 -0
  22. package/dist/extensions/elation/actions/createVisitNote/createVisitNote.js.map +1 -0
  23. package/dist/extensions/elation/actions/createVisitNote/index.d.ts +1 -0
  24. package/dist/extensions/elation/actions/createVisitNote/index.js +6 -0
  25. package/dist/extensions/elation/actions/createVisitNote/index.js.map +1 -0
  26. package/dist/extensions/elation/actions/index.d.ts +72 -48
  27. package/dist/extensions/elation/actions/index.js +4 -2
  28. package/dist/extensions/elation/actions/index.js.map +1 -1
  29. package/dist/extensions/elation/client.d.ts +3 -0
  30. package/dist/extensions/elation/client.js +12 -0
  31. package/dist/extensions/elation/client.js.map +1 -1
  32. package/dist/extensions/elation/types/history.d.ts +2 -15
  33. package/dist/extensions/elation/types/history.js +3 -4
  34. package/dist/extensions/elation/types/history.js.map +1 -1
  35. package/dist/extensions/elation/types/visitNote.d.ts +53 -0
  36. package/dist/extensions/elation/types/visitNote.js +46 -0
  37. package/dist/extensions/elation/types/visitNote.js.map +1 -0
  38. package/package.json +1 -1
  39. package/dist/extensions/elation/actions/addHistories/addHistories.js +0 -52
  40. package/dist/extensions/elation/actions/addHistories/addHistories.js.map +0 -1
  41. package/dist/extensions/elation/actions/addHistories/config/fields.d.ts +0 -148
  42. package/dist/extensions/elation/actions/addHistories/config/fields.js +0 -125
  43. package/dist/extensions/elation/actions/addHistories/config/fields.js.map +0 -1
  44. package/dist/extensions/elation/actions/addHistories/config/index.js.map +0 -1
  45. package/dist/extensions/elation/actions/addHistories/index.d.ts +0 -1
  46. package/dist/extensions/elation/actions/addHistories/index.js +0 -6
  47. package/dist/extensions/elation/actions/addHistories/index.js.map +0 -1
  48. /package/dist/extensions/elation/actions/{addHistories → addHistory}/config/index.d.ts +0 -0
  49. /package/dist/extensions/elation/actions/{addHistories → addHistory}/config/index.js +0 -0
@@ -1,4 +1,4 @@
1
1
  import { type Action } from '@awell-health/extensions-core';
2
2
  import { type settings } from '../../settings';
3
3
  import { fields as elationFields } from './config';
4
- export declare const addHistories: Action<typeof elationFields, typeof settings>;
4
+ export declare const addHistory: Action<typeof elationFields, typeof settings>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addHistory = void 0;
4
+ const zod_1 = require("zod");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ const settings_1 = require("../../settings");
7
+ const client_1 = require("../../client");
8
+ const config_1 = require("./config");
9
+ exports.addHistory = {
10
+ key: 'addHistory',
11
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
12
+ title: 'Add History',
13
+ description: "Add history item on Elation's patient page",
14
+ fields: config_1.fields,
15
+ previewable: true,
16
+ onEvent: async ({ payload, onComplete }) => {
17
+ const { fields, settings } = (0, extensions_core_1.validate)({
18
+ schema: zod_1.z.object({
19
+ fields: config_1.FieldsValidationSchema,
20
+ settings: settings_1.SettingsValidationSchema,
21
+ }),
22
+ payload,
23
+ });
24
+ const api = (0, client_1.makeAPIClient)(settings);
25
+ await api.addHistory({
26
+ type: fields.type,
27
+ patient: fields.patientId,
28
+ text: fields.text,
29
+ });
30
+ await onComplete();
31
+ },
32
+ };
33
+ //# sourceMappingURL=addHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addHistory.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/addHistory/addHistory.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,mEAA+E;AAC/E,6CAAwE;AACxE,yCAA4C;AAC5C,qCAA0E;AAE7D,QAAA,UAAU,GAAkD;IACvE,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4CAA4C;IACzD,MAAM,EAAE,eAAa;IACrB,WAAW,EAAE,IAAI;IACjB,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,GAAG,GAAG,IAAA,sBAAa,EAAC,QAAQ,CAAC,CAAA;QAEnC,MAAM,GAAG,CAAC,UAAU,CAAC;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,SAAS;YACzB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC,CAAA;QAEF,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ export declare const fields: {
4
+ patientId: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.NUMERIC;
9
+ required: true;
10
+ };
11
+ type: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.STRING;
16
+ required: true;
17
+ };
18
+ text: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.STRING;
23
+ required: true;
24
+ };
25
+ };
26
+ export declare const FieldsValidationSchema: z.ZodObject<{
27
+ patientId: z.ZodNumber;
28
+ type: z.ZodEnum<["Past", "Family", "Social", "Habits", "Diet", "Exercise", "Immunization", "Legal", "Consultation", "Health Maintenance", "Past Surgical", "Cognitive Status", "Functional Status"]>;
29
+ text: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ type: "Past" | "Family" | "Social" | "Habits" | "Diet" | "Exercise" | "Immunization" | "Legal" | "Consultation" | "Health Maintenance" | "Past Surgical" | "Cognitive Status" | "Functional Status";
32
+ patientId: number;
33
+ text: string;
34
+ }, {
35
+ type: "Past" | "Family" | "Social" | "Habits" | "Diet" | "Exercise" | "Immunization" | "Legal" | "Consultation" | "Health Maintenance" | "Past Surgical" | "Cognitive Status" | "Functional Status";
36
+ patientId: number;
37
+ text: string;
38
+ }>;
@@ -0,0 +1,38 @@
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.FieldsValidationSchema = exports.fields = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ const history_1 = require("../../../types/history");
10
+ exports.fields = {
11
+ patientId: {
12
+ id: 'patientId',
13
+ label: 'Patient ID',
14
+ description: 'The patient for whom the the history is being created',
15
+ type: extensions_core_1.FieldType.NUMERIC,
16
+ required: true,
17
+ },
18
+ type: {
19
+ id: 'type',
20
+ label: 'Type',
21
+ description: 'The type of history being created. Supported values: Past, Family, Social, Habits, Diet, Exercise, Immunization, Legal, Consultation, Health Maintenance, Past Surgical, Cognitive Status, Functional Status',
22
+ type: extensions_core_1.FieldType.STRING,
23
+ required: true,
24
+ },
25
+ text: {
26
+ id: 'text',
27
+ label: 'Text',
28
+ description: 'The text of the history being created',
29
+ type: extensions_core_1.FieldType.STRING,
30
+ required: true,
31
+ },
32
+ };
33
+ exports.FieldsValidationSchema = zod_1.default.object({
34
+ patientId: extensions_core_1.NumericIdSchema,
35
+ type: history_1.HistoryTypes,
36
+ text: zod_1.default.string(),
37
+ });
38
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/addHistory/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AACxC,oDAAqD;AAExC,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,8MAA8M;QAChN,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,iCAAe;IAC1B,IAAI,EAAE,sBAAY;IAClB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;CACiC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/addHistory/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}
@@ -0,0 +1 @@
1
+ export { addHistory } from './addHistory';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addHistory = void 0;
4
+ var addHistory_1 = require("./addHistory");
5
+ Object.defineProperty(exports, "addHistory", { enumerable: true, get: function () { return addHistory_1.addHistory; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/addHistory/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ visitNoteId: {
3
+ key: string;
4
+ valueType: "number";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ visitNoteId: {
6
+ key: 'visitNoteId',
7
+ valueType: 'number',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createVisitNote/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,106 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ /**
4
+ * Available Templates
5
+ *
6
+ * The action currently supports only the "Complete H&P (1 col)" template.
7
+ *
8
+ * For a complete list of available templates and their descriptions, refer to the external documentation:
9
+ * https://docs.elationhealth.com/reference/the-visit-note-object#allowed-values
10
+ */
11
+ export declare const templateType: z.ZodEnum<["Complete H&P (1 col)"]>;
12
+ /**
13
+ * Available Bullet Categories
14
+ *
15
+ * The action currently supports only the "ROS" (Review of Systems) bullet category.
16
+ *
17
+ * For a complete list of bullet categories and their descriptions, refer to the external documentation:
18
+ * https://docs.elationhealth.com/reference/the-visit-note-object#allowed-values
19
+ */
20
+ export declare const bulletCategory: z.ZodEnum<["ROS"]>;
21
+ export declare const fields: {
22
+ patientId: {
23
+ id: string;
24
+ label: string;
25
+ description: string;
26
+ type: FieldType.NUMERIC;
27
+ required: true;
28
+ };
29
+ template: {
30
+ id: string;
31
+ label: string;
32
+ description: string;
33
+ type: FieldType.STRING;
34
+ required: true;
35
+ };
36
+ category: {
37
+ id: string;
38
+ label: string;
39
+ description: string;
40
+ type: FieldType.STRING;
41
+ required: true;
42
+ };
43
+ physicianId: {
44
+ id: string;
45
+ label: string;
46
+ description: string;
47
+ type: FieldType.NUMERIC;
48
+ required: true;
49
+ };
50
+ authorId: {
51
+ id: string;
52
+ label: string;
53
+ description: string;
54
+ type: FieldType.NUMERIC;
55
+ required: true;
56
+ };
57
+ text: {
58
+ id: string;
59
+ label: string;
60
+ description: string;
61
+ type: FieldType.TEXT;
62
+ required: true;
63
+ };
64
+ type: {
65
+ id: string;
66
+ label: string;
67
+ description: string;
68
+ type: FieldType.STRING;
69
+ required: false;
70
+ };
71
+ confidential: {
72
+ id: string;
73
+ label: string;
74
+ description: string;
75
+ type: FieldType.BOOLEAN;
76
+ required: false;
77
+ };
78
+ };
79
+ export declare const FieldsValidationSchema: z.ZodObject<{
80
+ patientId: z.ZodNumber;
81
+ template: z.ZodEnum<["Complete H&P (1 col)"]>;
82
+ category: z.ZodEnum<["ROS"]>;
83
+ physicianId: z.ZodNumber;
84
+ authorId: z.ZodNumber;
85
+ text: z.ZodString;
86
+ type: z.ZodOptional<z.ZodString>;
87
+ confidential: z.ZodOptional<z.ZodBoolean>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ patientId: number;
90
+ category: "ROS";
91
+ text: string;
92
+ authorId: number;
93
+ physicianId: number;
94
+ template: "Complete H&P (1 col)";
95
+ type?: string | undefined;
96
+ confidential?: boolean | undefined;
97
+ }, {
98
+ patientId: number;
99
+ category: "ROS";
100
+ text: string;
101
+ authorId: number;
102
+ physicianId: number;
103
+ template: "Complete H&P (1 col)";
104
+ type?: string | undefined;
105
+ confidential?: boolean | undefined;
106
+ }>;
@@ -0,0 +1,95 @@
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.FieldsValidationSchema = exports.fields = exports.bulletCategory = exports.templateType = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ /**
10
+ * Available Templates
11
+ *
12
+ * The action currently supports only the "Complete H&P (1 col)" template.
13
+ *
14
+ * For a complete list of available templates and their descriptions, refer to the external documentation:
15
+ * https://docs.elationhealth.com/reference/the-visit-note-object#allowed-values
16
+ */
17
+ exports.templateType = zod_1.default.enum(['Complete H&P (1 col)']);
18
+ /**
19
+ * Available Bullet Categories
20
+ *
21
+ * The action currently supports only the "ROS" (Review of Systems) bullet category.
22
+ *
23
+ * For a complete list of bullet categories and their descriptions, refer to the external documentation:
24
+ * https://docs.elationhealth.com/reference/the-visit-note-object#allowed-values
25
+ */
26
+ exports.bulletCategory = zod_1.default.enum(['ROS']);
27
+ exports.fields = {
28
+ patientId: {
29
+ id: 'patientId',
30
+ label: 'Patient ID',
31
+ description: '',
32
+ type: extensions_core_1.FieldType.NUMERIC,
33
+ required: true,
34
+ },
35
+ template: {
36
+ id: 'template',
37
+ label: 'Template',
38
+ description: 'Visit note template. Currently we only support Complete H&P (1 col).',
39
+ type: extensions_core_1.FieldType.STRING,
40
+ required: true,
41
+ },
42
+ category: {
43
+ id: 'category',
44
+ label: 'Category',
45
+ description: 'Bullet category. Currently we only support ROS.',
46
+ type: extensions_core_1.FieldType.STRING,
47
+ required: true,
48
+ },
49
+ physicianId: {
50
+ id: 'physicianId',
51
+ label: 'Physician ID',
52
+ description: 'Prescribing physician ID',
53
+ type: extensions_core_1.FieldType.NUMERIC,
54
+ required: true,
55
+ },
56
+ authorId: {
57
+ id: 'authorId',
58
+ label: 'Author',
59
+ description: 'The author of a note. Should be the ID of a User in Elation.',
60
+ type: extensions_core_1.FieldType.NUMERIC,
61
+ required: true,
62
+ },
63
+ text: {
64
+ id: 'text',
65
+ label: 'Text',
66
+ description: 'Text of a note',
67
+ type: extensions_core_1.FieldType.TEXT,
68
+ required: true,
69
+ },
70
+ type: {
71
+ id: 'type',
72
+ label: 'Type',
73
+ description: 'Type of visit note. Defaults to Office Visit Note.',
74
+ type: extensions_core_1.FieldType.STRING,
75
+ required: false,
76
+ },
77
+ confidential: {
78
+ id: 'confidential',
79
+ label: 'Confidential',
80
+ description: 'Whether this note is confidential to the practice and shouldn`t be shared automatically with third parties. Defaults to false.',
81
+ type: extensions_core_1.FieldType.BOOLEAN,
82
+ required: false,
83
+ },
84
+ };
85
+ exports.FieldsValidationSchema = zod_1.default.object({
86
+ patientId: extensions_core_1.NumericIdSchema,
87
+ template: exports.templateType,
88
+ category: exports.bulletCategory,
89
+ physicianId: extensions_core_1.NumericIdSchema,
90
+ authorId: extensions_core_1.NumericIdSchema,
91
+ text: zod_1.default.string(),
92
+ type: zod_1.default.string().optional(),
93
+ confidential: zod_1.default.boolean().optional(),
94
+ });
95
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createVisitNote/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AAExC;;;;;;;GAOG;AACU,QAAA,YAAY,GAAG,aAAC,CAAC,IAAI,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAA;AAE5D;;;;;;;GAOG;AACU,QAAA,cAAc,GAAG,aAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;AAEhC,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,sEAAsE;QACxE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,iDAAiD;QAC9D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,8DAA8D;QAC3E,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,oDAAoD;QACjE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,gIAAgI;QAClI,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,iCAAe;IAC1B,QAAQ,EAAE,oBAAY;IACtB,QAAQ,EAAE,sBAAc;IACxB,WAAW,EAAE,iCAAe;IAC5B,QAAQ,EAAE,iCAAe;IACzB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,YAAY,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACa,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { fields, FieldsValidationSchema, bulletCategory, templateType, } from './fields';
2
+ export { dataPoints } from './dataPoints';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = exports.templateType = exports.bulletCategory = exports.FieldsValidationSchema = exports.fields = void 0;
4
+ var fields_1 = require("./fields");
5
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
6
+ Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
7
+ Object.defineProperty(exports, "bulletCategory", { enumerable: true, get: function () { return fields_1.bulletCategory; } });
8
+ Object.defineProperty(exports, "templateType", { enumerable: true, get: function () { return fields_1.templateType; } });
9
+ var dataPoints_1 = require("./dataPoints");
10
+ Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createVisitNote/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAKiB;AAJf,gGAAA,MAAM,OAAA;AACN,gHAAA,sBAAsB,OAAA;AACtB,wGAAA,cAAc,OAAA;AACd,sGAAA,YAAY,OAAA;AAEd,2CAAyC;AAAhC,wGAAA,UAAU,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 createVisitNote: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createVisitNote = void 0;
4
+ const zod_1 = require("zod");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ const settings_1 = require("../../settings");
7
+ const client_1 = require("../../client");
8
+ const config_1 = require("./config");
9
+ exports.createVisitNote = {
10
+ key: 'createVisitNote',
11
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
12
+ title: 'Create Visit Note',
13
+ description: 'Create a visit note for a patient. This action will create a visit note in the patient chart.',
14
+ fields: config_1.fields,
15
+ previewable: true,
16
+ dataPoints: config_1.dataPoints,
17
+ onEvent: async ({ payload, onComplete }) => {
18
+ const { fields, settings } = (0, extensions_core_1.validate)({
19
+ schema: zod_1.z.object({
20
+ fields: config_1.FieldsValidationSchema,
21
+ settings: settings_1.SettingsValidationSchema,
22
+ }),
23
+ payload,
24
+ });
25
+ const api = (0, client_1.makeAPIClient)(settings);
26
+ const { id } = await api.createVisitNote({
27
+ patient: fields.patientId,
28
+ chart_date: new Date().toISOString(),
29
+ document_date: new Date().toISOString(),
30
+ template: fields.template,
31
+ physician: fields.physicianId,
32
+ bullets: [
33
+ {
34
+ text: fields.text,
35
+ author: fields.authorId,
36
+ category: fields.category,
37
+ },
38
+ ],
39
+ type: fields === null || fields === void 0 ? void 0 : fields.type,
40
+ confidential: fields === null || fields === void 0 ? void 0 : fields.confidential,
41
+ });
42
+ await onComplete({
43
+ data_points: {
44
+ visitNoteId: String(id),
45
+ },
46
+ });
47
+ },
48
+ };
49
+ //# sourceMappingURL=createVisitNote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createVisitNote.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/createVisitNote/createVisitNote.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mEAA+E;AAC/E,6CAAwE;AACxE,yCAA4C;AAC5C,qCAAqE;AAExD,QAAA,eAAe,GAIxB;IACF,GAAG,EAAE,iBAAiB;IACtB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,+FAA+F;IACjG,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,GAAG,GAAG,IAAA,sBAAa,EAAC,QAAQ,CAAC,CAAA;QAEnC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC;YACvC,OAAO,EAAE,MAAM,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,aAAa,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACvC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,SAAS,EAAE,MAAM,CAAC,WAAW;YAC7B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,MAAM,EAAE,MAAM,CAAC,QAAQ;oBACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;iBAC1B;aACF;YACD,IAAI,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI;YAClB,YAAY,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY;SACnC,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC;aACxB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ export { createVisitNote } from './createVisitNote';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createVisitNote = void 0;
4
+ var createVisitNote_1 = require("./createVisitNote");
5
+ Object.defineProperty(exports, "createVisitNote", { enumerable: true, get: function () { return createVisitNote_1.createVisitNote; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/createVisitNote/index.ts"],"names":[],"mappings":";;;AAAA,qDAAmD;AAA1C,kHAAA,eAAe,OAAA"}