@awell-health/awell-extensions 2.0.109 → 2.0.111

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/dist/extensions/elation/actions/closeCareGap/closeCareGap.d.ts +4 -0
  2. package/dist/extensions/elation/actions/closeCareGap/closeCareGap.js +39 -0
  3. package/dist/extensions/elation/actions/closeCareGap/closeCareGap.js.map +1 -0
  4. package/dist/extensions/elation/actions/closeCareGap/config/dataPoints.d.ts +1 -0
  5. package/dist/extensions/elation/actions/closeCareGap/config/dataPoints.js +5 -0
  6. package/dist/extensions/elation/actions/closeCareGap/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/elation/actions/closeCareGap/config/fields.d.ts +28 -0
  8. package/dist/extensions/elation/actions/closeCareGap/config/fields.js +26 -0
  9. package/dist/extensions/elation/actions/closeCareGap/config/fields.js.map +1 -0
  10. package/dist/extensions/elation/actions/closeCareGap/config/index.d.ts +2 -0
  11. package/dist/extensions/elation/actions/closeCareGap/config/index.js +9 -0
  12. package/dist/extensions/elation/actions/closeCareGap/config/index.js.map +1 -0
  13. package/dist/extensions/elation/actions/closeCareGap/index.d.ts +1 -0
  14. package/dist/extensions/elation/actions/closeCareGap/index.js +6 -0
  15. package/dist/extensions/elation/actions/closeCareGap/index.js.map +1 -0
  16. package/dist/extensions/elation/actions/createCareGap/config/dataPoints.d.ts +6 -0
  17. package/dist/extensions/elation/actions/createCareGap/config/dataPoints.js +10 -0
  18. package/dist/extensions/elation/actions/createCareGap/config/dataPoints.js.map +1 -0
  19. package/dist/extensions/elation/actions/createCareGap/config/fields.d.ts +84 -0
  20. package/dist/extensions/elation/actions/createCareGap/config/fields.js +78 -0
  21. package/dist/extensions/elation/actions/createCareGap/config/fields.js.map +1 -0
  22. package/dist/extensions/elation/actions/createCareGap/config/index.d.ts +2 -0
  23. package/dist/extensions/elation/actions/createCareGap/config/index.js +9 -0
  24. package/dist/extensions/elation/actions/createCareGap/config/index.js.map +1 -0
  25. package/dist/extensions/elation/actions/createCareGap/createCareGap.d.ts +4 -0
  26. package/dist/extensions/elation/actions/createCareGap/createCareGap.js +47 -0
  27. package/dist/extensions/elation/actions/createCareGap/createCareGap.js.map +1 -0
  28. package/dist/extensions/elation/actions/createCareGap/index.d.ts +1 -0
  29. package/dist/extensions/elation/actions/createCareGap/index.js +6 -0
  30. package/dist/extensions/elation/actions/createCareGap/index.js.map +1 -0
  31. package/dist/extensions/elation/actions/createReferralOrder/config/dataPoints.d.ts +6 -0
  32. package/dist/extensions/elation/actions/createReferralOrder/config/dataPoints.js +10 -0
  33. package/dist/extensions/elation/actions/createReferralOrder/config/dataPoints.js.map +1 -0
  34. package/dist/extensions/elation/actions/createReferralOrder/config/fields.d.ts +84 -0
  35. package/dist/extensions/elation/actions/createReferralOrder/config/fields.js +74 -0
  36. package/dist/extensions/elation/actions/createReferralOrder/config/fields.js.map +1 -0
  37. package/dist/extensions/elation/actions/createReferralOrder/config/index.d.ts +2 -0
  38. package/dist/extensions/elation/actions/createReferralOrder/config/index.js +9 -0
  39. package/dist/extensions/elation/actions/createReferralOrder/config/index.js.map +1 -0
  40. package/dist/extensions/elation/actions/createReferralOrder/createReferralOrder.d.ts +10 -0
  41. package/dist/extensions/elation/actions/createReferralOrder/createReferralOrder.js +82 -0
  42. package/dist/extensions/elation/actions/createReferralOrder/createReferralOrder.js.map +1 -0
  43. package/dist/extensions/elation/actions/createReferralOrder/index.d.ts +1 -0
  44. package/dist/extensions/elation/actions/createReferralOrder/index.js +6 -0
  45. package/dist/extensions/elation/actions/createReferralOrder/index.js.map +1 -0
  46. package/dist/extensions/elation/actions/index.d.ts +100 -0
  47. package/dist/extensions/elation/actions/index.js +3 -1
  48. package/dist/extensions/elation/actions/index.js.map +1 -1
  49. package/dist/extensions/elation/client.d.ts +17 -2
  50. package/dist/extensions/elation/client.js +54 -2
  51. package/dist/extensions/elation/client.js.map +1 -1
  52. package/dist/extensions/elation/types/careGap.d.ts +9 -0
  53. package/dist/extensions/elation/types/careGap.js +3 -0
  54. package/dist/extensions/elation/types/careGap.js.map +1 -0
  55. package/dist/extensions/elation/types/contact.d.ts +2 -0
  56. package/dist/extensions/elation/types/index.d.ts +1 -0
  57. package/dist/extensions/elation/types/index.js +1 -0
  58. package/dist/extensions/elation/types/index.js.map +1 -1
  59. package/dist/extensions/elation/types/letter.d.ts +2 -2
  60. package/dist/extensions/elation/types/referralOrder.d.ts +8 -0
  61. package/dist/extensions/elation/types/referralOrder.js +3 -0
  62. package/dist/extensions/elation/types/referralOrder.js.map +1 -0
  63. package/dist/extensions/elation/types/specialty.d.ts +3 -0
  64. package/dist/extensions/elation/types/specialty.js +3 -0
  65. package/dist/extensions/elation/types/specialty.js.map +1 -0
  66. package/dist/extensions/elation/validation/careGap.zod.d.ts +35 -0
  67. package/dist/extensions/elation/validation/careGap.zod.js +17 -0
  68. package/dist/extensions/elation/validation/careGap.zod.js.map +1 -0
  69. package/dist/extensions/elation/validation/referralOrder.zod.d.ts +129 -0
  70. package/dist/extensions/elation/validation/referralOrder.zod.js +47 -0
  71. package/dist/extensions/elation/validation/referralOrder.zod.js.map +1 -0
  72. package/dist/extensions/elation/validation/specialty.zod.d.ts +14 -0
  73. package/dist/extensions/elation/validation/specialty.zod.js +10 -0
  74. package/dist/extensions/elation/validation/specialty.zod.js.map +1 -0
  75. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { dataPoints, fields } from './config';
4
+ export declare const closeCareGap: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.closeCareGap = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ const client_1 = require("../../client");
7
+ const settings_1 = require("../../settings");
8
+ const config_1 = require("./config");
9
+ exports.closeCareGap = {
10
+ key: 'closeCareGap',
11
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
12
+ title: 'Close care gap',
13
+ description: 'Close a care gap in Elation.',
14
+ fields: config_1.fields,
15
+ previewable: false,
16
+ dataPoints: config_1.dataPoints,
17
+ onActivityCreated: async (payload, onComplete, onError) => {
18
+ const { fields: { quality_program, caregap_id }, 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
+ // The care gap API uses a different base URL than the rest of the Elation API, see https://docs.elationhealth.com/reference/caregaps_post_caregaps_api__quality_program__caregap__post-1
26
+ const caregapBaseUrl = settings.base_url.replace(/(.+\.)?elationemr\.com\/api\/2\.0\/?/, 'caregaps.$1elationemr.com/caregaps/api/');
27
+ const api = (0, client_1.makeAPIClient)({
28
+ ...payload.settings,
29
+ baseUrl: caregapBaseUrl,
30
+ });
31
+ await api.closeCareGap({
32
+ quality_program,
33
+ caregap_id,
34
+ status: 'closed',
35
+ });
36
+ await onComplete();
37
+ },
38
+ };
39
+ //# sourceMappingURL=closeCareGap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closeCareGap.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/closeCareGap/closeCareGap.ts"],"names":[],"mappings":";;;AAAA,mEAA+E;AAC/E,6BAAuB;AACvB,yCAA4C;AAC5C,6CAAwE;AACxE,qCAAqE;AAExD,QAAA,YAAY,GAIrB;IACF,GAAG,EAAE,cAAc;IACnB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,8BAA8B;IAC3C,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EACJ,MAAM,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,EACvC,QAAQ,GACT,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,QAAQ,EAAE,mCAAwB;aACnC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,yLAAyL;QACzL,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAC9C,sCAAsC,EACtC,yCAAyC,CAC1C,CAAA;QAED,MAAM,GAAG,GAAG,IAAA,sBAAa,EAAC;YACxB,GAAG,OAAO,CAAC,QAAQ;YACnB,OAAO,EAAE,cAAc;SACxB,CAAC,CAAA;QAEF,MAAM,GAAG,CAAC,YAAY,CAAC;YACrB,eAAe;YACf,UAAU;YACV,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;QAEF,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const dataPoints: {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {};
5
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/closeCareGap/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import { z } from 'zod';
3
+ export declare const fields: {
4
+ quality_program: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.STRING;
8
+ required: true;
9
+ description: string;
10
+ };
11
+ caregap_id: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.STRING;
15
+ required: true;
16
+ description: string;
17
+ };
18
+ };
19
+ export declare const FieldsValidationSchema: z.ZodObject<{
20
+ quality_program: z.ZodString;
21
+ caregap_id: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ quality_program: string;
24
+ caregap_id: string;
25
+ }, {
26
+ quality_program: string;
27
+ caregap_id: string;
28
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ exports.fields = {
7
+ quality_program: {
8
+ id: 'quality_program',
9
+ label: 'Quality Program',
10
+ type: extensions_core_1.FieldType.STRING,
11
+ required: true,
12
+ description: '',
13
+ },
14
+ caregap_id: {
15
+ id: 'caregap_id',
16
+ label: 'Care Gap ID',
17
+ type: extensions_core_1.FieldType.STRING,
18
+ required: true,
19
+ description: '',
20
+ },
21
+ };
22
+ exports.FieldsValidationSchema = zod_1.z.object({
23
+ quality_program: zod_1.z.string(),
24
+ caregap_id: zod_1.z.string(),
25
+ });
26
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/closeCareGap/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CAC2B,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/closeCareGap/config/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}
@@ -0,0 +1 @@
1
+ export { closeCareGap } from './closeCareGap';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.closeCareGap = void 0;
4
+ var closeCareGap_1 = require("./closeCareGap");
5
+ Object.defineProperty(exports, "closeCareGap", { enumerable: true, get: function () { return closeCareGap_1.closeCareGap; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/closeCareGap/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ id: {
3
+ key: string;
4
+ valueType: "string";
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
+ id: {
6
+ key: 'id',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createCareGap/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,EAAE,EAAE;QACF,GAAG,EAAE,IAAI;QACT,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,84 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import { z } from 'zod';
3
+ export declare const fields: {
4
+ quality_program: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.STRING;
8
+ required: true;
9
+ description: string;
10
+ };
11
+ definition_id: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.STRING;
15
+ required: true;
16
+ description: string;
17
+ };
18
+ patient_id: {
19
+ id: string;
20
+ label: string;
21
+ type: FieldType.STRING;
22
+ required: true;
23
+ description: string;
24
+ };
25
+ practice_id: {
26
+ id: string;
27
+ label: string;
28
+ type: FieldType.STRING;
29
+ required: true;
30
+ description: string;
31
+ };
32
+ created_date: {
33
+ id: string;
34
+ label: string;
35
+ type: FieldType.DATE;
36
+ required: true;
37
+ description: string;
38
+ };
39
+ status: {
40
+ id: string;
41
+ label: string;
42
+ type: FieldType.STRING;
43
+ required: true;
44
+ description: string;
45
+ options: {
46
+ dropdownOptions: {
47
+ label: string;
48
+ value: string;
49
+ }[];
50
+ };
51
+ };
52
+ detail: {
53
+ id: string;
54
+ label: string;
55
+ type: FieldType.TEXT;
56
+ required: false;
57
+ description: string;
58
+ };
59
+ };
60
+ export declare const FieldsValidationSchema: z.ZodObject<{
61
+ quality_program: z.ZodString;
62
+ definition_id: z.ZodString;
63
+ patient_id: z.ZodString;
64
+ practice_id: z.ZodString;
65
+ created_date: z.ZodString;
66
+ status: z.ZodEnum<["open", "closed"]>;
67
+ detail: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ status: "open" | "closed";
70
+ definition_id: string;
71
+ patient_id: string;
72
+ practice_id: string;
73
+ created_date: string;
74
+ quality_program: string;
75
+ detail?: string | undefined;
76
+ }, {
77
+ status: "open" | "closed";
78
+ definition_id: string;
79
+ patient_id: string;
80
+ practice_id: string;
81
+ created_date: string;
82
+ quality_program: string;
83
+ detail?: string | undefined;
84
+ }>;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ exports.fields = {
7
+ quality_program: {
8
+ id: 'quality_program',
9
+ label: 'Quality Program',
10
+ type: extensions_core_1.FieldType.STRING,
11
+ required: true,
12
+ description: '',
13
+ },
14
+ definition_id: {
15
+ id: 'definition_id',
16
+ label: 'Definition ID',
17
+ type: extensions_core_1.FieldType.STRING,
18
+ required: true,
19
+ description: '',
20
+ },
21
+ patient_id: {
22
+ id: 'patient_id',
23
+ label: 'Patient ID',
24
+ type: extensions_core_1.FieldType.STRING,
25
+ required: true,
26
+ description: '',
27
+ },
28
+ practice_id: {
29
+ id: 'practice_id',
30
+ label: 'Practice ID',
31
+ type: extensions_core_1.FieldType.STRING,
32
+ required: true,
33
+ description: '',
34
+ },
35
+ created_date: {
36
+ id: 'created_date',
37
+ label: 'Created date',
38
+ type: extensions_core_1.FieldType.DATE,
39
+ required: true,
40
+ description: '',
41
+ },
42
+ status: {
43
+ id: 'status',
44
+ label: 'Status',
45
+ type: extensions_core_1.FieldType.STRING,
46
+ required: true,
47
+ description: '',
48
+ options: {
49
+ dropdownOptions: [
50
+ {
51
+ label: 'Open',
52
+ value: 'open',
53
+ },
54
+ {
55
+ label: 'Closed',
56
+ value: 'closed',
57
+ },
58
+ ],
59
+ },
60
+ },
61
+ detail: {
62
+ id: 'detail',
63
+ label: 'Detail',
64
+ type: extensions_core_1.FieldType.TEXT,
65
+ required: false,
66
+ description: '',
67
+ },
68
+ };
69
+ exports.FieldsValidationSchema = zod_1.z.object({
70
+ quality_program: zod_1.z.string(),
71
+ definition_id: zod_1.z.string(),
72
+ patient_id: zod_1.z.string(),
73
+ practice_id: zod_1.z.string(),
74
+ created_date: zod_1.z.string().datetime(),
75
+ status: zod_1.z.enum(['open', 'closed']),
76
+ detail: zod_1.z.string().optional(),
77
+ });
78
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createCareGap/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;QACf,OAAO,EAAE;YACP,eAAe,EAAE;gBACf;oBACE,KAAK,EAAE,MAAM;oBACb,KAAK,EAAE,MAAM;iBACd;gBACD;oBACE,KAAK,EAAE,QAAQ;oBACf,KAAK,EAAE,QAAQ;iBAChB;aACF;SACF;KACF;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,EAAE;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACoB,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/createCareGap/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 { dataPoints, fields } from './config';
4
+ export declare const createCareGap: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCareGap = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ const client_1 = require("../../client");
7
+ const settings_1 = require("../../settings");
8
+ const config_1 = require("./config");
9
+ exports.createCareGap = {
10
+ key: 'createCareGap',
11
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
12
+ title: 'Create care gap',
13
+ description: 'Create a care gap in Elation.',
14
+ fields: config_1.fields,
15
+ previewable: false,
16
+ dataPoints: config_1.dataPoints,
17
+ onActivityCreated: async (payload, onComplete, onError) => {
18
+ const { fields: { patient_id, practice_id, created_date, status, detail, quality_program, definition_id, }, 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
+ // The care gap API uses a different base URL than the rest of the Elation API, see https://docs.elationhealth.com/reference/caregaps_post_caregaps_api__quality_program__caregap__post-1
26
+ const caregapBaseUrl = settings.base_url.replace(/(.+\.)?elationemr\.com\/api\/2\.0\/?/, 'caregaps.$1elationemr.com/caregaps/api/');
27
+ const api = (0, client_1.makeAPIClient)({
28
+ ...payload.settings,
29
+ baseUrl: caregapBaseUrl,
30
+ });
31
+ const careGap = await api.createCareGap({
32
+ quality_program,
33
+ definition_id,
34
+ patient_id,
35
+ practice_id,
36
+ created_date,
37
+ status,
38
+ detail: detail !== null && detail !== void 0 ? detail : '',
39
+ });
40
+ await onComplete({
41
+ data_points: {
42
+ id: careGap.id,
43
+ },
44
+ });
45
+ },
46
+ };
47
+ //# sourceMappingURL=createCareGap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCareGap.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/createCareGap/createCareGap.ts"],"names":[],"mappings":";;;AAAA,mEAA+E;AAC/E,6BAAuB;AACvB,yCAA4C;AAC5C,6CAAwE;AACxE,qCAAqE;AAExD,QAAA,aAAa,GAItB;IACF,GAAG,EAAE,eAAe;IACpB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,+BAA+B;IAC5C,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EACJ,MAAM,EAAE,EACN,UAAU,EACV,WAAW,EACX,YAAY,EACZ,MAAM,EACN,MAAM,EACN,eAAe,EACf,aAAa,GACd,EACD,QAAQ,GACT,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,QAAQ,EAAE,mCAAwB;aACnC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,yLAAyL;QACzL,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAC9C,sCAAsC,EACtC,yCAAyC,CAC1C,CAAA;QAED,MAAM,GAAG,GAAG,IAAA,sBAAa,EAAC;YACxB,GAAG,OAAO,CAAC,QAAQ;YACnB,OAAO,EAAE,cAAc;SACxB,CAAC,CAAA;QAEF,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC;YACtC,eAAe;YACf,aAAa;YACb,UAAU;YACV,WAAW;YACX,YAAY;YACZ,MAAM;YACN,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE;SACrB,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,EAAE,EAAE,OAAO,CAAC,EAAE;aACf;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ export { createCareGap } from './createCareGap';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCareGap = void 0;
4
+ var createCareGap_1 = require("./createCareGap");
5
+ Object.defineProperty(exports, "createCareGap", { enumerable: true, get: function () { return createCareGap_1.createCareGap; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/createCareGap/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ id: {
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
+ id: {
6
+ key: 'id',
7
+ valueType: 'number',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createReferralOrder/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,EAAE,EAAE;QACF,GAAG,EAAE,IAAI;QACT,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,84 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ patient: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.NUMERIC;
8
+ required: true;
9
+ description: string;
10
+ };
11
+ practice: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.NUMERIC;
15
+ required: true;
16
+ description: string;
17
+ };
18
+ contact_name: {
19
+ id: string;
20
+ label: string;
21
+ type: FieldType.STRING;
22
+ required: true;
23
+ description: string;
24
+ };
25
+ body: {
26
+ id: string;
27
+ label: string;
28
+ type: FieldType.TEXT;
29
+ required: true;
30
+ description: string;
31
+ };
32
+ authorization_for: {
33
+ id: string;
34
+ label: string;
35
+ type: FieldType.STRING;
36
+ required: true;
37
+ description: string;
38
+ options: {
39
+ dropdownOptions: {
40
+ label: "Referral For Treatment, includes Consult Visit" | "Procedure / Testing Only" | "Consult (One Visit Only)";
41
+ value: "Referral For Treatment, includes Consult Visit" | "Procedure / Testing Only" | "Consult (One Visit Only)";
42
+ }[];
43
+ };
44
+ };
45
+ consultant_name: {
46
+ id: string;
47
+ label: string;
48
+ type: FieldType.STRING;
49
+ required: true;
50
+ description: string;
51
+ };
52
+ specialty: {
53
+ id: string;
54
+ label: string;
55
+ type: FieldType.STRING;
56
+ required: false;
57
+ description: string;
58
+ };
59
+ };
60
+ export declare const FieldsValidationSchema: z.ZodObject<{
61
+ patient: z.ZodNumber;
62
+ practice: z.ZodNumber;
63
+ contact_name: z.ZodString;
64
+ body: z.ZodString;
65
+ authorization_for: z.ZodEnum<["Referral For Treatment, includes Consult Visit", "Procedure / Testing Only", "Consult (One Visit Only)"]>;
66
+ consultant_name: z.ZodString;
67
+ specialty: z.ZodString;
68
+ }, "strip", z.ZodTypeAny, {
69
+ patient: number;
70
+ body: string;
71
+ practice: number;
72
+ specialty: string;
73
+ authorization_for: "Referral For Treatment, includes Consult Visit" | "Procedure / Testing Only" | "Consult (One Visit Only)";
74
+ consultant_name: string;
75
+ contact_name: string;
76
+ }, {
77
+ patient: number;
78
+ body: string;
79
+ practice: number;
80
+ specialty: string;
81
+ authorization_for: "Referral For Treatment, includes Consult Visit" | "Procedure / Testing Only" | "Consult (One Visit Only)";
82
+ consultant_name: string;
83
+ contact_name: string;
84
+ }>;
@@ -0,0 +1,74 @@
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
+ const extensions_core_2 = require("@awell-health/extensions-core");
7
+ const referralOrder_zod_1 = require("../../../validation/referralOrder.zod");
8
+ exports.fields = {
9
+ patient: {
10
+ id: 'patient',
11
+ label: 'Patient ID',
12
+ type: extensions_core_2.FieldType.NUMERIC,
13
+ required: true,
14
+ description: '',
15
+ },
16
+ practice: {
17
+ id: 'practice',
18
+ label: 'Practice ID',
19
+ type: extensions_core_2.FieldType.NUMERIC,
20
+ required: true,
21
+ description: '',
22
+ },
23
+ contact_name: {
24
+ id: 'contact_name',
25
+ label: 'Contact name',
26
+ type: extensions_core_2.FieldType.STRING,
27
+ required: true,
28
+ description: '',
29
+ },
30
+ body: {
31
+ id: 'body',
32
+ label: 'Body',
33
+ type: extensions_core_2.FieldType.TEXT,
34
+ required: true,
35
+ description: '',
36
+ },
37
+ authorization_for: {
38
+ id: 'authorization_for',
39
+ label: 'Authorization for',
40
+ type: extensions_core_2.FieldType.STRING,
41
+ required: true,
42
+ description: '',
43
+ options: {
44
+ dropdownOptions: Object.values(referralOrder_zod_1.AuthorizationForSchema.enum).map((template) => ({
45
+ label: template,
46
+ value: template,
47
+ })),
48
+ },
49
+ },
50
+ consultant_name: {
51
+ id: 'consultant_name',
52
+ label: 'Consultant name',
53
+ type: extensions_core_2.FieldType.STRING,
54
+ required: true,
55
+ description: '',
56
+ },
57
+ specialty: {
58
+ id: 'specialty',
59
+ label: 'Specialty',
60
+ type: extensions_core_2.FieldType.STRING,
61
+ required: false,
62
+ description: '',
63
+ },
64
+ };
65
+ exports.FieldsValidationSchema = zod_1.z.object({
66
+ patient: extensions_core_1.NumericIdSchema,
67
+ practice: extensions_core_1.NumericIdSchema,
68
+ contact_name: zod_1.z.string(),
69
+ body: zod_1.z.string(),
70
+ authorization_for: referralOrder_zod_1.AuthorizationForSchema,
71
+ consultant_name: zod_1.z.string(),
72
+ specialty: zod_1.z.string(),
73
+ });
74
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/createReferralOrder/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAA+D;AAC/D,mEAAqE;AACrE,6EAA8E;AAEjE,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;QACf,OAAO,EAAE;YACP,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,0CAAsB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gBAC7E,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;SACJ;KACF;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,EAAE;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,iCAAe;IACxB,QAAQ,EAAE,iCAAe;IACzB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,iBAAiB,EAAE,0CAAsB;IACzC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CAC4B,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/createReferralOrder/config/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}