@awell-health/awell-extensions 2.0.203 → 2.0.205

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 (37) hide show
  1. package/dist/extensions/braze/settings.js +3 -3
  2. package/dist/extensions/braze/settings.js.map +1 -1
  3. package/dist/extensions/markdown.json +1 -1
  4. package/dist/extensions/shelly/actions/index.d.ts +50 -41
  5. package/dist/extensions/shelly/actions/index.js +9 -7
  6. package/dist/extensions/shelly/actions/index.js.map +1 -1
  7. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/datapoints.d.ts +6 -0
  8. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/datapoints.js +10 -0
  9. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/datapoints.js.map +1 -0
  10. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/fields.d.ts +18 -0
  11. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/fields.js +21 -0
  12. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/fields.js.map +1 -0
  13. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/index.d.ts +2 -0
  14. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/index.js +9 -0
  15. package/dist/extensions/shelly/actions/summarizeTrackOutcome/config/index.js.map +1 -0
  16. package/dist/extensions/shelly/actions/summarizeTrackOutcome/index.d.ts +1 -0
  17. package/dist/extensions/shelly/actions/summarizeTrackOutcome/index.js +6 -0
  18. package/dist/extensions/shelly/actions/summarizeTrackOutcome/index.js.map +1 -0
  19. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/index.d.ts +1 -0
  20. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/index.js +6 -0
  21. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/index.js.map +1 -0
  22. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/prompt.d.ts +2 -0
  23. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/prompt.js +73 -0
  24. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/prompt.js.map +1 -0
  25. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/summarizeTrackOutcomeWithLLM.d.ts +25 -0
  26. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/summarizeTrackOutcomeWithLLM.js +35 -0
  27. package/dist/extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/summarizeTrackOutcomeWithLLM.js.map +1 -0
  28. package/dist/extensions/shelly/actions/summarizeTrackOutcome/summarizeTrackOutcome.d.ts +3 -0
  29. package/dist/extensions/shelly/actions/summarizeTrackOutcome/summarizeTrackOutcome.js +101 -0
  30. package/dist/extensions/shelly/actions/summarizeTrackOutcome/summarizeTrackOutcome.js.map +1 -0
  31. package/dist/extensions/shelly/lib/getTrackData/getTrackData.d.ts +54 -0
  32. package/dist/extensions/shelly/lib/getTrackData/getTrackData.js +429 -0
  33. package/dist/extensions/shelly/lib/getTrackData/getTrackData.js.map +1 -0
  34. package/dist/extensions/shelly/lib/getTrackData/index.d.ts +1 -0
  35. package/dist/extensions/shelly/lib/getTrackData/index.js +6 -0
  36. package/dist/extensions/shelly/lib/getTrackData/index.js.map +1 -0
  37. package/package.json +1 -1
@@ -11,11 +11,11 @@ exports.settings = {
11
11
  description: 'Used to authenticate with Braze',
12
12
  },
13
13
  baseUrl: {
14
- key: 'url',
15
- label: 'URL',
14
+ key: 'baseUrl',
15
+ label: 'Base URL',
16
16
  obfuscated: false,
17
17
  required: true,
18
- description: 'The URL of the Braze instance',
18
+ description: 'The base URL of the Braze instance',
19
19
  },
20
20
  };
21
21
  exports.SettingsValidationSchema = zod_1.z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/braze/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;KAC/C;IACD,OAAO,EAAE;QACP,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,KAAK;QACZ,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,+BAA+B;KAC7C;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACyB,CAAC,CAAA"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/braze/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;KAC/C;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,oCAAoC;KAClD;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACyB,CAAC,CAAA"}
@@ -152,7 +152,7 @@
152
152
  "changelog": "# Salesforce changelog"
153
153
  },
154
154
  "shelly": {
155
- "readme": "---\ntitle: Shelly\ndescription: Library of AI-powered actions\n---\n\n# Shelly\n\nShelly is a library of AI-powered actions for enhancing workflow automation and data processing. It includes the following actions:\n\n1. **summarizeForm**: Summarizes form data (last form in a step)\n2. **summarizeFormsInStep**: Summarizes all forms within a step.\n3. **summarizeCareFlow**: Provides a summary of a care flow.\n4. **categorizeMessage**: Categorizes messages or content.\n5. **generateMessage**: Generates personalized messages.\n6. **medicationFromImage**: Extracts medication information from images.\n7. **reviewMedicationExtraction**: Reviews and validates extracted medication information.",
155
+ "readme": "---\ntitle: Shelly\ndescription: Library of AI-powered actions\n---\n\n# Shelly\n\nShelly is a library of AI-powered actions for enhancing workflow automation and data processing. It includes the following actions:\n\n1. **summarizeForm**: Summarizes form data (last form in a step)\n2. **summarizeFormsInStep**: Summarizes all forms within a step.\n3. **summarizeCareFlow**: Provides a summary of a care flow.\n4. **categorizeMessage**: Categorizes messages or content.\n5. **generateMessage**: Generates personalized messages.\n6. **medicationFromImage**: Extracts medication information from images.\n7. **reviewMedicationExtraction**: Reviews and validates extracted medication information.\n8. **summarizeTrackOutcome**: Provides an AI-generated summary of track activities and overall track outcomes.",
156
156
  "changelog": "# Shelly changelog"
157
157
  },
158
158
  "stripe": {
@@ -1,83 +1,77 @@
1
1
  declare const actions: {
2
- summarizeForm: import("@awell-health/extensions-core").Action<{
3
- summaryFormat: {
2
+ categorizeMessage: import("@awell-health/extensions-core").Action<{
3
+ message: {
4
4
  id: string;
5
5
  label: string;
6
6
  description: string;
7
7
  type: import("@awell-health/extensions-core").FieldType.STRING;
8
- required: false;
9
- options: {
10
- dropdownOptions: {
11
- label: import("./summarizeForm/config/fields").SummaryFormatEnum;
12
- value: import("./summarizeForm/config/fields").SummaryFormatEnum;
13
- }[];
14
- };
8
+ required: true;
15
9
  };
16
- language: {
10
+ categories: {
17
11
  id: string;
18
12
  label: string;
19
13
  description: string;
20
14
  type: import("@awell-health/extensions-core").FieldType.STRING;
21
- required: false;
15
+ required: true;
22
16
  };
23
- }, Record<string, never>, "summary">;
24
- summarizeFormsInStep: import("@awell-health/extensions-core").Action<{
25
- summaryFormat: {
17
+ }, Record<string, never>, "category" | "explanation">;
18
+ generateMessage: import("@awell-health/extensions-core").Action<{
19
+ communicationObjective: {
26
20
  id: string;
27
21
  label: string;
28
22
  description: string;
29
23
  type: import("@awell-health/extensions-core").FieldType.STRING;
30
- required: false;
24
+ required: true;
31
25
  };
32
- language: {
26
+ personalizationInput: {
33
27
  id: string;
34
28
  label: string;
35
29
  description: string;
36
30
  type: import("@awell-health/extensions-core").FieldType.STRING;
37
31
  required: false;
38
32
  };
39
- }, Record<string, never>, "summary">;
40
- summarizeCareFlow: import("@awell-health/extensions-core").Action<{
41
- additionalInstructions: {
33
+ stakeholder: {
42
34
  id: string;
43
35
  label: string;
44
36
  description: string;
45
37
  type: import("@awell-health/extensions-core").FieldType.STRING;
46
38
  required: false;
47
39
  };
48
- stakeholder: {
40
+ language: {
49
41
  id: string;
50
42
  label: string;
51
43
  description: string;
52
44
  type: import("@awell-health/extensions-core").FieldType.STRING;
53
45
  required: false;
54
46
  };
55
- }, Record<string, never>, "summary">;
56
- categorizeMessage: import("@awell-health/extensions-core").Action<{
57
- message: {
47
+ }, Record<string, never>, "message" | "subject">;
48
+ medicationFromImage: import("@awell-health/extensions-core").Action<{
49
+ imageUrl: {
58
50
  id: string;
59
51
  label: string;
60
52
  description: string;
61
53
  type: import("@awell-health/extensions-core").FieldType.STRING;
62
54
  required: true;
63
55
  };
64
- categories: {
56
+ }, Record<string, never>, "data" | "medicationAsText">;
57
+ reviewMedicationExtraction: import("@awell-health/extensions-core").Action<{
58
+ imageUrl: {
65
59
  id: string;
66
60
  label: string;
67
61
  description: string;
68
62
  type: import("@awell-health/extensions-core").FieldType.STRING;
69
63
  required: true;
70
64
  };
71
- }, Record<string, never>, "category" | "explanation">;
72
- generateMessage: import("@awell-health/extensions-core").Action<{
73
- communicationObjective: {
65
+ medicationData: {
74
66
  id: string;
75
67
  label: string;
76
68
  description: string;
77
- type: import("@awell-health/extensions-core").FieldType.STRING;
69
+ type: import("@awell-health/extensions-core").FieldType.JSON;
78
70
  required: true;
79
71
  };
80
- personalizationInput: {
72
+ }, Record<string, never>, "validatedData">;
73
+ summarizeCareFlow: import("@awell-health/extensions-core").Action<{
74
+ additionalInstructions: {
81
75
  id: string;
82
76
  label: string;
83
77
  description: string;
@@ -91,6 +85,21 @@ declare const actions: {
91
85
  type: import("@awell-health/extensions-core").FieldType.STRING;
92
86
  required: false;
93
87
  };
88
+ }, Record<string, never>, "summary">;
89
+ summarizeForm: import("@awell-health/extensions-core").Action<{
90
+ summaryFormat: {
91
+ id: string;
92
+ label: string;
93
+ description: string;
94
+ type: import("@awell-health/extensions-core").FieldType.STRING;
95
+ required: false;
96
+ options: {
97
+ dropdownOptions: {
98
+ label: import("./summarizeForm/config/fields").SummaryFormatEnum;
99
+ value: import("./summarizeForm/config/fields").SummaryFormatEnum;
100
+ }[];
101
+ };
102
+ };
94
103
  language: {
95
104
  id: string;
96
105
  label: string;
@@ -98,31 +107,31 @@ declare const actions: {
98
107
  type: import("@awell-health/extensions-core").FieldType.STRING;
99
108
  required: false;
100
109
  };
101
- }, Record<string, never>, "message" | "subject">;
102
- medicationFromImage: import("@awell-health/extensions-core").Action<{
103
- imageUrl: {
110
+ }, Record<string, never>, "summary">;
111
+ summarizeFormsInStep: import("@awell-health/extensions-core").Action<{
112
+ summaryFormat: {
104
113
  id: string;
105
114
  label: string;
106
115
  description: string;
107
116
  type: import("@awell-health/extensions-core").FieldType.STRING;
108
- required: true;
117
+ required: false;
109
118
  };
110
- }, Record<string, never>, "data" | "medicationAsText">;
111
- reviewMedicationExtraction: import("@awell-health/extensions-core").Action<{
112
- imageUrl: {
119
+ language: {
113
120
  id: string;
114
121
  label: string;
115
122
  description: string;
116
123
  type: import("@awell-health/extensions-core").FieldType.STRING;
117
- required: true;
124
+ required: false;
118
125
  };
119
- medicationData: {
126
+ }, Record<string, never>, "summary">;
127
+ summarizeTrackOutcome: import("@awell-health/extensions-core").Action<{
128
+ instructions: {
120
129
  id: string;
121
130
  label: string;
122
131
  description: string;
123
- type: import("@awell-health/extensions-core").FieldType.JSON;
124
- required: true;
132
+ type: import("@awell-health/extensions-core").FieldType.STRING;
133
+ required: false;
125
134
  };
126
- }, Record<string, never>, "validatedData">;
135
+ }, Record<string, never>, "outcomeSummary">;
127
136
  };
128
137
  export default actions;
@@ -1,20 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const summarizeForm_1 = require("./summarizeForm");
4
- const summarizeFormsInStep_1 = require("./summarizeFormsInStep");
5
3
  const categorizeMessage_1 = require("./categorizeMessage");
6
- const summarizeCareFlow_1 = require("./summarizeCareFlow");
4
+ const generateMessage_1 = require("./generateMessage");
7
5
  const medicationFromImage_1 = require("./medicationFromImage");
8
6
  const reviewMedicationExtraction_1 = require("./reviewMedicationExtraction");
9
- const generateMessage_1 = require("./generateMessage");
7
+ const summarizeCareFlow_1 = require("./summarizeCareFlow");
8
+ const summarizeForm_1 = require("./summarizeForm");
9
+ const summarizeFormsInStep_1 = require("./summarizeFormsInStep");
10
+ const summarizeTrackOutcome_1 = require("./summarizeTrackOutcome");
10
11
  const actions = {
11
- summarizeForm: summarizeForm_1.summarizeForm,
12
- summarizeFormsInStep: summarizeFormsInStep_1.summarizeFormsInStep,
13
- summarizeCareFlow: summarizeCareFlow_1.summarizeCareFlow,
14
12
  categorizeMessage: categorizeMessage_1.categorizeMessage,
15
13
  generateMessage: generateMessage_1.generateMessage,
16
14
  medicationFromImage: medicationFromImage_1.medicationFromImage,
17
15
  reviewMedicationExtraction: reviewMedicationExtraction_1.reviewMedicationExtraction,
16
+ summarizeCareFlow: summarizeCareFlow_1.summarizeCareFlow,
17
+ summarizeForm: summarizeForm_1.summarizeForm,
18
+ summarizeFormsInStep: summarizeFormsInStep_1.summarizeFormsInStep,
19
+ summarizeTrackOutcome: summarizeTrackOutcome_1.summarizeTrackOutcome,
18
20
  };
19
21
  exports.default = actions;
20
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/shelly/actions/index.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,iEAA6D;AAC7D,2DAAuD;AACvD,2DAAuD;AACvD,+DAA2D;AAC3D,6EAAyE;AACzE,uDAAmD;AAEnD,MAAM,OAAO,GAAG;IACd,aAAa,EAAb,6BAAa;IACb,oBAAoB,EAApB,2CAAoB;IACpB,iBAAiB,EAAjB,qCAAiB;IACjB,iBAAiB,EAAjB,qCAAiB;IACjB,eAAe,EAAf,iCAAe;IACf,mBAAmB,EAAnB,yCAAmB;IACnB,0BAA0B,EAA1B,uDAA0B;CAC3B,CAAA;AAED,kBAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/shelly/actions/index.ts"],"names":[],"mappings":";;AAAA,2DAAuD;AACvD,uDAAmD;AACnD,+DAA2D;AAC3D,6EAAyE;AACzE,2DAAuD;AACvD,mDAA+C;AAC/C,iEAA6D;AAC7D,mEAA+D;AAE/D,MAAM,OAAO,GAAG;IACd,iBAAiB,EAAjB,qCAAiB;IACjB,eAAe,EAAf,iCAAe;IACf,mBAAmB,EAAnB,yCAAmB;IACnB,0BAA0B,EAA1B,uDAA0B;IAC1B,iBAAiB,EAAjB,qCAAiB;IACjB,aAAa,EAAb,6BAAa;IACb,oBAAoB,EAApB,2CAAoB;IACpB,qBAAqB,EAArB,6CAAqB;CACtB,CAAA;AAED,kBAAe,OAAO,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ outcomeSummary: {
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
+ outcomeSummary: {
6
+ key: 'outcomeSummary',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=datapoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/shelly/actions/summarizeTrackOutcome/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ export declare const fields: {
4
+ instructions: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: false;
10
+ };
11
+ };
12
+ export declare const FieldsValidationSchema: z.ZodObject<{
13
+ instructions: z.ZodDefault<z.ZodOptional<z.ZodString>>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ instructions: string;
16
+ }, {
17
+ instructions?: string | undefined;
18
+ }>;
@@ -0,0 +1,21 @@
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
+ exports.fields = {
10
+ instructions: {
11
+ id: 'instructions',
12
+ label: 'Instructions',
13
+ description: 'Specify instructions for the AI to generate the track outcome summary. You can include details about: what outcome to focus on, where to find it in the track, specific forms to analyze, desired length and format, parts of the track to exclude, level of detail for decision paths, etc.',
14
+ type: extensions_core_1.FieldType.STRING,
15
+ required: false,
16
+ },
17
+ };
18
+ exports.FieldsValidationSchema = zod_1.default.object({
19
+ instructions: zod_1.default.string().optional().default(''),
20
+ });
21
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/shelly/actions/summarizeTrackOutcome/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,8RAA8R;QAChS,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACE,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { dataPoints } from './datapoints';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = 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
+ var datapoints_1 = require("./datapoints");
8
+ Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return datapoints_1.dataPoints; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/shelly/actions/summarizeTrackOutcome/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1 @@
1
+ export { summarizeTrackOutcome } from './summarizeTrackOutcome';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.summarizeTrackOutcome = void 0;
4
+ var summarizeTrackOutcome_1 = require("./summarizeTrackOutcome");
5
+ Object.defineProperty(exports, "summarizeTrackOutcome", { enumerable: true, get: function () { return summarizeTrackOutcome_1.summarizeTrackOutcome; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/shelly/actions/summarizeTrackOutcome/index.ts"],"names":[],"mappings":";;;AAAA,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA"}
@@ -0,0 +1 @@
1
+ export { summarizeTrackOutcomeWithLLM } from './summarizeTrackOutcomeWithLLM';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.summarizeTrackOutcomeWithLLM = void 0;
4
+ var summarizeTrackOutcomeWithLLM_1 = require("./summarizeTrackOutcomeWithLLM");
5
+ Object.defineProperty(exports, "summarizeTrackOutcomeWithLLM", { enumerable: true, get: function () { return summarizeTrackOutcomeWithLLM_1.summarizeTrackOutcomeWithLLM; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/index.ts"],"names":[],"mappings":";;;AAAA,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA"}
@@ -0,0 +1,2 @@
1
+ import { ChatPromptTemplate } from '@langchain/core/prompts';
2
+ export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"# Role\nYou are a specialized healthcare AI assistant tasked with analyzing and summarizing clinical care flow track outcomes and decision paths for healthcare professionals.\n\n# Context\nIn healthcare systems, a care flow represents a patient's journey through a clinical process:\n- Care flow: The overall clinical pathway designed to achieve or maintain a desired health state\n- Track: A specific phase of care that can run sequentially (e.g., Diagnosis > Treatment > Follow-up) or in parallel\n- Step: A container of actions that happen at a given moment for a specific patient group\n- Action: Individual elements within a step that stakeholders interact with (forms, messages) or system actions (calculations, API calls)\n- Stakeholder: Participants involved in the care flow (patients, clinicians, care coordinators, etc.)\n\n# Task\nYour task is to analyze the provided track data and generate a clear, concise summary of:\n1. The final outcome of the track\n2. The decision path and reasoning that led to this outcome\n3. Key activities and decision points that influenced the outcome\n\n# Input Data Structure\nYou will receive structured data containing:\n- Track information: title, status, start/end dates\n- Steps: sequential clinical stages with names, labels, and statuses\n- Activities: actions performed within steps, including:\n * Timestamps (when actions occurred)\n * Actors (who performed the actions - patients, clinicians, etc.)\n * Action types (forms, messages, system events)\n * Form responses (questions and answers)\n * Data points (clinical measurements, observations, form responses or other data collected in the track) \n\n# Let's take it step by step:\n1. First, carefully examine all track information to understand the clinical context\n2. Next, analyze the activities in chronological order to trace the decision path\n3. Identify key decision points and their outcomes\n4. Determine the final track outcome (e.g., approved, alternative treatment, pre-certification)\n5. Extract the logical reasoning that led to this outcome\n6. Organize findings into a coherent narrative\n7. Double check the output for accuracy and completeness. It is critical your reasoning is supported by the data and in line with final outcome.\n\n# Output Guidelines\nStructure your summary as follows:\n- Begin with a clear outcome statement\n- Follow with 3-5 bullet points explaining the supporting evidence and reasoning\n- Present information chronologically to show progression\n- Use clinical terminology appropriate for healthcare professionals\n- Maintain brevity while preserving critical details\n\n# Important Constraints\n- Focus primarily on what patients and human stakeholders have done in the track\n- Only include information explicitly present in the input data\n- Absolutely refrain from making clinical assumptions beyond what is provided in data\n- Exclude technical details like IDs, internal codes, or system language\n- NEVER use Awell-specific terminology in your summary (avoid terms like \"track\", \"step\", \"action\")\n- Always use proper markdown formatting with clear section headers and bullet points\n- Remember your audience is clinical - use language that healthcare professionals will understand. Keep it concise and to the point.\n- It is critical to keep Details supporting the outcome section concise and to the point.\n# Example Output Format\n## Outcome: \nThe patient was approved for spinal surgery\n\n## Details supporting the outcome:\n- Patient reported severe back pain (8/10) with radiating symptoms and failed conservative treatment for 6 months, meeting criteria for surgical intervention\n- Imaging confirmed L4-L5 herniation with nerve compression, and insurance pre-authorization was obtained on 05/15/2023\n\nInstructions:\n{instructions}\n\nTrack Data:\n{input}">, any>;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.systemPrompt = void 0;
4
+ const prompts_1 = require("@langchain/core/prompts");
5
+ // TODO prompt will be tuned/improved after we collect real world data
6
+ exports.systemPrompt = prompts_1.ChatPromptTemplate.fromTemplate(`# Role
7
+ You are a specialized healthcare AI assistant tasked with analyzing and summarizing clinical care flow track outcomes and decision paths for healthcare professionals.
8
+
9
+ # Context
10
+ In healthcare systems, a care flow represents a patient's journey through a clinical process:
11
+ - Care flow: The overall clinical pathway designed to achieve or maintain a desired health state
12
+ - Track: A specific phase of care that can run sequentially (e.g., Diagnosis > Treatment > Follow-up) or in parallel
13
+ - Step: A container of actions that happen at a given moment for a specific patient group
14
+ - Action: Individual elements within a step that stakeholders interact with (forms, messages) or system actions (calculations, API calls)
15
+ - Stakeholder: Participants involved in the care flow (patients, clinicians, care coordinators, etc.)
16
+
17
+ # Task
18
+ Your task is to analyze the provided track data and generate a clear, concise summary of:
19
+ 1. The final outcome of the track
20
+ 2. The decision path and reasoning that led to this outcome
21
+ 3. Key activities and decision points that influenced the outcome
22
+
23
+ # Input Data Structure
24
+ You will receive structured data containing:
25
+ - Track information: title, status, start/end dates
26
+ - Steps: sequential clinical stages with names, labels, and statuses
27
+ - Activities: actions performed within steps, including:
28
+ * Timestamps (when actions occurred)
29
+ * Actors (who performed the actions - patients, clinicians, etc.)
30
+ * Action types (forms, messages, system events)
31
+ * Form responses (questions and answers)
32
+ * Data points (clinical measurements, observations, form responses or other data collected in the track)
33
+
34
+ # Let's take it step by step:
35
+ 1. First, carefully examine all track information to understand the clinical context
36
+ 2. Next, analyze the activities in chronological order to trace the decision path
37
+ 3. Identify key decision points and their outcomes
38
+ 4. Determine the final track outcome (e.g., approved, alternative treatment, pre-certification)
39
+ 5. Extract the logical reasoning that led to this outcome
40
+ 6. Organize findings into a coherent narrative
41
+ 7. Double check the output for accuracy and completeness. It is critical your reasoning is supported by the data and in line with final outcome.
42
+
43
+ # Output Guidelines
44
+ Structure your summary as follows:
45
+ - Begin with a clear outcome statement
46
+ - Follow with 3-5 bullet points explaining the supporting evidence and reasoning
47
+ - Present information chronologically to show progression
48
+ - Use clinical terminology appropriate for healthcare professionals
49
+ - Maintain brevity while preserving critical details
50
+
51
+ # Important Constraints
52
+ - Focus primarily on what patients and human stakeholders have done in the track
53
+ - Only include information explicitly present in the input data
54
+ - Absolutely refrain from making clinical assumptions beyond what is provided in data
55
+ - Exclude technical details like IDs, internal codes, or system language
56
+ - NEVER use Awell-specific terminology in your summary (avoid terms like "track", "step", "action")
57
+ - Always use proper markdown formatting with clear section headers and bullet points
58
+ - Remember your audience is clinical - use language that healthcare professionals will understand. Keep it concise and to the point.
59
+ - It is critical to keep Details supporting the outcome section concise and to the point.
60
+ # Example Output Format
61
+ ## Outcome:
62
+ The patient was approved for spinal surgery
63
+
64
+ ## Details supporting the outcome:
65
+ - Patient reported severe back pain (8/10) with radiating symptoms and failed conservative treatment for 6 months, meeting criteria for surgical intervention
66
+ - Imaging confirmed L4-L5 herniation with nerve compression, and insurance pre-authorization was obtained on 05/15/2023
67
+
68
+ Instructions:
69
+ {instructions}
70
+
71
+ Track Data:
72
+ {input}`);
73
+ //# sourceMappingURL=prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../../extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE5D,sEAAsE;AACzD,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CACzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkEM,CACP,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { type ChatOpenAI } from '@langchain/openai';
2
+ import { type AIActionMetadata } from '../../../../../../src/lib/llm/openai/types';
3
+ import type { BaseCallbackHandler } from "@langchain/core/callbacks/base";
4
+ /**
5
+ * Uses LLM to summarize track outcomes and decision paths.
6
+ * The function follows these steps:
7
+ * 1. Formats prompt with instructions
8
+ * 2. Runs LLM to generate summary
9
+ * 3. Returns formatted summary
10
+ *
11
+ * @example
12
+ * const summary = await summarizeTrackOutcomeWithLLM({
13
+ * model,
14
+ * careFlowActivities: "...",
15
+ * instructions: "Focus on decision path",
16
+ * metadata: { ... }
17
+ * })
18
+ */
19
+ export declare const summarizeTrackOutcomeWithLLM: ({ model, trackActivities, instructions, metadata, callbacks, }: {
20
+ model: ChatOpenAI;
21
+ trackActivities: string;
22
+ instructions?: string;
23
+ metadata: AIActionMetadata;
24
+ callbacks?: BaseCallbackHandler[];
25
+ }) => Promise<string>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.summarizeTrackOutcomeWithLLM = void 0;
4
+ const prompt_1 = require("./prompt");
5
+ /**
6
+ * Uses LLM to summarize track outcomes and decision paths.
7
+ * The function follows these steps:
8
+ * 1. Formats prompt with instructions
9
+ * 2. Runs LLM to generate summary
10
+ * 3. Returns formatted summary
11
+ *
12
+ * @example
13
+ * const summary = await summarizeTrackOutcomeWithLLM({
14
+ * model,
15
+ * careFlowActivities: "...",
16
+ * instructions: "Focus on decision path",
17
+ * metadata: { ... }
18
+ * })
19
+ */
20
+ const summarizeTrackOutcomeWithLLM = async ({ model, trackActivities, instructions = '', metadata, callbacks, }) => {
21
+ const messages = await prompt_1.systemPrompt.formatMessages({
22
+ input: trackActivities,
23
+ instructions,
24
+ });
25
+ const response = await model.invoke(messages, {
26
+ callbacks,
27
+ runName: 'ShellySummarizeTrackOutcome',
28
+ metadata,
29
+ });
30
+ return typeof response.content === 'string'
31
+ ? response.content
32
+ : JSON.stringify(response.content);
33
+ };
34
+ exports.summarizeTrackOutcomeWithLLM = summarizeTrackOutcomeWithLLM;
35
+ //# sourceMappingURL=summarizeTrackOutcomeWithLLM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarizeTrackOutcomeWithLLM.js","sourceRoot":"","sources":["../../../../../../../extensions/shelly/actions/summarizeTrackOutcome/lib/summarizeTrackOutcomeWithLLM/summarizeTrackOutcomeWithLLM.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AAEvC;;;;;;;;;;;;;;GAcG;AACI,MAAM,4BAA4B,GAAG,KAAK,EAAE,EACjD,KAAK,EACL,eAAe,EACf,YAAY,GAAG,EAAE,EACjB,QAAQ,EACR,SAAS,GAOV,EAAmB,EAAE;IACpB,MAAM,QAAQ,GAAG,MAAM,qBAAY,CAAC,cAAc,CAAC;QACjD,KAAK,EAAE,eAAe;QACtB,YAAY;KACb,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;QAC5C,SAAS;QACT,OAAO,EAAE,6BAA6B;QACtC,QAAQ;KACT,CAAC,CAAA;IAEF,OAAO,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ;QACzC,CAAC,CAAC,QAAQ,CAAC,OAAO;QAClB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AACtC,CAAC,CAAA;AA3BY,QAAA,4BAA4B,gCA2BxC"}
@@ -0,0 +1,3 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { fields, dataPoints } from './config';
3
+ export declare const summarizeTrackOutcome: Action<typeof fields, Record<string, never>, keyof typeof dataPoints>;
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.summarizeTrackOutcome = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const utils_1 = require("../../../../src/utils");
7
+ const summarizeTrackOutcomeWithLLM_1 = require("./lib/summarizeTrackOutcomeWithLLM");
8
+ const openai_1 = require("../../../../src/lib/llm/openai");
9
+ const constants_1 = require("../../../../src/lib/llm/openai/constants");
10
+ const index_1 = require("../../lib/getTrackData/index");
11
+ const lodash_1 = require("lodash");
12
+ exports.summarizeTrackOutcome = {
13
+ key: 'summarizeTrackOutcome',
14
+ category: extensions_core_1.Category.WORKFLOW,
15
+ title: 'Summarize Track Outcome (Beta)',
16
+ description: 'Summarize the care flow track outcome and activities that led to the outcome',
17
+ fields: config_1.fields,
18
+ previewable: false,
19
+ dataPoints: config_1.dataPoints,
20
+ onEvent: async ({ payload, onComplete, onError, helpers }) => {
21
+ var _a, _b, _c, _d, _e, _f, _g, _h;
22
+ // 1. Validate input fields
23
+ const { instructions } = config_1.FieldsValidationSchema.parse(payload.fields);
24
+ const pathway = payload.pathway;
25
+ // 2. Initialize OpenAI model with metadata
26
+ const { model, metadata, callbacks } = await (0, openai_1.createOpenAIModel)({
27
+ settings: {}, // we use built-in API key for OpenAI
28
+ helpers,
29
+ payload,
30
+ modelType: constants_1.OPENAI_MODELS.GPT4o,
31
+ hideDataForTracing: false, // TODO: set to true before production
32
+ });
33
+ const awellSdk = await helpers.awellSdk();
34
+ // Get pathway details for the disclaimer
35
+ const pathwayDetails = await awellSdk.orchestration.query({
36
+ pathway: {
37
+ __args: {
38
+ id: pathway.id,
39
+ },
40
+ code: true,
41
+ success: true,
42
+ pathway: {
43
+ id: true,
44
+ title: true,
45
+ pathway_definition_id: true,
46
+ },
47
+ },
48
+ });
49
+ // Get activity details to find track_id
50
+ const activityId = payload.activity.id;
51
+ const activityDetails = await awellSdk.orchestration
52
+ .query({
53
+ activity: {
54
+ __args: {
55
+ id: activityId,
56
+ },
57
+ success: true,
58
+ activity: {
59
+ id: true,
60
+ context: {
61
+ track_id: true,
62
+ },
63
+ },
64
+ },
65
+ })
66
+ .catch((error) => {
67
+ console.error(`Failed to fetch activity ${activityId}`, error);
68
+ throw new Error(`Failed to fetch activity ${activityId}`);
69
+ });
70
+ const currentActivity = (_a = activityDetails === null || activityDetails === void 0 ? void 0 : activityDetails.activity) === null || _a === void 0 ? void 0 : _a.activity;
71
+ if ((0, lodash_1.isNil)(currentActivity) || !activityDetails.activity.success) {
72
+ throw new Error(`Failed to fetch activity ${activityId}`);
73
+ }
74
+ const trackId = (_b = currentActivity.context) === null || _b === void 0 ? void 0 : _b.track_id;
75
+ if ((0, lodash_1.isNil)(trackId) || trackId.trim() === '') {
76
+ throw new Error('Could not find track ID for the current activity');
77
+ }
78
+ // 3. Get track data including forms and decision path
79
+ const trackData = await (0, index_1.getTrackData)({
80
+ awellSdk,
81
+ pathwayId: pathway.id,
82
+ trackId,
83
+ currentActivityId: payload.activity.id,
84
+ });
85
+ const summary = await (0, summarizeTrackOutcomeWithLLM_1.summarizeTrackOutcomeWithLLM)({
86
+ model,
87
+ trackActivities: JSON.stringify(trackData, null, 2),
88
+ instructions,
89
+ metadata,
90
+ callbacks,
91
+ });
92
+ const disclaimerMsg = `Important Notice: The content provided is an AI-generated summary of Care Flow "${(_e = (_d = (_c = pathwayDetails.pathway) === null || _c === void 0 ? void 0 : _c.pathway) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : 'Unknown'}" (ID: ${(_h = (_g = (_f = pathwayDetails.pathway) === null || _f === void 0 ? void 0 : _f.pathway) === null || _g === void 0 ? void 0 : _g.pathway_definition_id) !== null && _h !== void 0 ? _h : 'Unknown'}).`;
93
+ const htmlSummary = await (0, utils_1.markdownToHtml)(`${disclaimerMsg}\n\n${summary}`);
94
+ await onComplete({
95
+ data_points: {
96
+ outcomeSummary: htmlSummary,
97
+ },
98
+ });
99
+ },
100
+ };
101
+ //# sourceMappingURL=summarizeTrackOutcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarizeTrackOutcome.js","sourceRoot":"","sources":["../../../../../extensions/shelly/actions/summarizeTrackOutcome/summarizeTrackOutcome.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,iDAAsD;AACtD,qFAAiF;AACjF,2DAAkE;AAClE,wEAAwE;AACxE,wDAA2D;AAC3D,mCAA8B;AAEjB,QAAA,qBAAqB,GAI9B;IACF,GAAG,EAAE,uBAAuB;IAC5B,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,gCAAgC;IACvC,WAAW,EAAE,8EAA8E;IAC3F,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IAEV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAiB,EAAE;;QAC1E,2BAA2B;QAC3B,MAAM,EAAE,YAAY,EAAE,GAAG,+BAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QACrE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAE/B,2CAA2C;QAC3C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,0BAAiB,EAAC;YAC7D,QAAQ,EAAE,EAAE,EAAE,qCAAqC;YACnD,OAAO;YACP,OAAO;YACP,SAAS,EAAE,yBAAa,CAAC,KAAK;YAC9B,kBAAkB,EAAE,KAAK,EAAE,sCAAsC;SAClE,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;QAEzC,yCAAyC;QACzC,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;YACxD,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,EAAE,EAAE,OAAO,CAAC,EAAE;iBACf;gBACD,IAAI,EAAE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AS,GAAG,MAAM,IAAA,oBAAY,EAAC;YACnC,QAAQ;YACR,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,OAAO;YACP,iBAAiB,EAAG,OAAO,CAAC,QAAqB,CAAC,EAAE;SACrD,CAAC,CAAA;QAEF,MAAM,OAAO,GAAG,MAAM,IAAA,2DAA4B,EAAC;YACjD,KAAK;YACL,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACnD,YAAY;YACZ,QAAQ;YACR,SAAS;SACV,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,mFAAmF,MAAA,MAAA,MAAA,cAAc,CAAC,OAAO,0CAAE,OAAO,0CAAE,KAAK,mCAAI,SAAS,UAAU,MAAA,MAAA,MAAA,cAAc,CAAC,OAAO,0CAAE,OAAO,0CAAE,qBAAqB,mCAAI,SAAS,IAAI,CAAA;QAE7O,MAAM,WAAW,GAAG,MAAM,IAAA,sBAAc,EAAC,GAAG,aAAa,OAAO,OAAO,EAAE,CAAC,CAAA;QAE1E,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,cAAc,EAAE,WAAW;aAC5B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { type AwellSdk } from '@awell-health/awell-sdk';
2
+ interface GetTrackDataInput {
3
+ awellSdk: AwellSdk;
4
+ pathwayId: string;
5
+ trackId: string;
6
+ currentActivityId: string;
7
+ }
8
+ export interface GetTrackDataOutput {
9
+ track: {
10
+ title: string;
11
+ status?: string;
12
+ };
13
+ steps: Array<{
14
+ name: string;
15
+ label: string;
16
+ status: string;
17
+ start_date?: string;
18
+ end_date?: string;
19
+ stakeholders?: Array<{
20
+ name: string;
21
+ }>;
22
+ activities: Array<{
23
+ date: string;
24
+ action: string;
25
+ status: string;
26
+ subject: {
27
+ type: string;
28
+ name: string;
29
+ };
30
+ object: {
31
+ type: string;
32
+ name: string;
33
+ };
34
+ indirect_object?: {
35
+ type: string;
36
+ name: string;
37
+ };
38
+ form?: {
39
+ title: string;
40
+ questions: Array<{
41
+ title: string;
42
+ response?: string;
43
+ }>;
44
+ };
45
+ data_points?: Array<{
46
+ value: string;
47
+ title?: string;
48
+ date: string;
49
+ }>;
50
+ }>;
51
+ }>;
52
+ }
53
+ export declare const getTrackData: ({ awellSdk, pathwayId, trackId, currentActivityId, }: GetTrackDataInput) => Promise<GetTrackDataOutput>;
54
+ export {};
@@ -0,0 +1,429 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTrackData = void 0;
4
+ const cleanDataForLLM = async (data, awellSdk, pathwayId) => {
5
+ var _a;
6
+ return {
7
+ track: {
8
+ title: (_a = data.track.title) !== null && _a !== void 0 ? _a : 'Untitled Track',
9
+ },
10
+ steps: await Promise.all(data.steps.map(async (step) => {
11
+ var _a;
12
+ const stepActivities = data.activities.filter(activity => { var _a; return ((_a = activity.context) === null || _a === void 0 ? void 0 : _a.step_id) === step.id; });
13
+ return {
14
+ name: step.name,
15
+ label: step.label,
16
+ status: step.status,
17
+ start_date: step.start_date,
18
+ end_date: step.end_date,
19
+ stakeholders: (_a = step.stakeholders) === null || _a === void 0 ? void 0 : _a.map(s => ({
20
+ name: s.name
21
+ })),
22
+ activities: await Promise.all(stepActivities.map(async (activity) => {
23
+ var _a, _b, _c, _d, _e, _f, _g;
24
+ const baseActivity = {
25
+ date: activity.date,
26
+ action: activity.action,
27
+ status: activity.status,
28
+ subject: {
29
+ type: activity.subject.type,
30
+ name: activity.subject.name
31
+ },
32
+ object: {
33
+ type: activity.object.type,
34
+ name: activity.object.name
35
+ }
36
+ };
37
+ if (((_a = activity.indirect_object) === null || _a === void 0 ? void 0 : _a.type) !== undefined && ((_b = activity.indirect_object) === null || _b === void 0 ? void 0 : _b.name) !== undefined) {
38
+ baseActivity.indirect_object = {
39
+ type: activity.indirect_object.type,
40
+ name: activity.indirect_object.name
41
+ };
42
+ }
43
+ // Process form data if available
44
+ const formId = (_c = activity.form) === null || _c === void 0 ? void 0 : _c.id;
45
+ const formTitle = (_d = activity.form) === null || _d === void 0 ? void 0 : _d.title;
46
+ if (formId !== undefined &&
47
+ formId !== '' &&
48
+ formTitle !== undefined &&
49
+ formTitle !== '') {
50
+ try {
51
+ // Get form definition using SDK
52
+ const formDefinitionResponse = await awellSdk.orchestration.query({
53
+ form: {
54
+ __args: {
55
+ id: formId,
56
+ pathway_id: pathwayId,
57
+ },
58
+ form: {
59
+ id: true,
60
+ title: true,
61
+ key: true,
62
+ definition_id: true,
63
+ release_id: true,
64
+ questions: {
65
+ id: true,
66
+ key: true,
67
+ title: true,
68
+ userQuestionType: true,
69
+ options: {
70
+ label: true,
71
+ value: true,
72
+ value_string: true,
73
+ },
74
+ },
75
+ },
76
+ },
77
+ });
78
+ // Get form response using SDK
79
+ const formResponseData = await awellSdk.orchestration.query({
80
+ formResponse: {
81
+ __args: {
82
+ pathway_id: pathwayId,
83
+ activity_id: activity.id,
84
+ },
85
+ response: {
86
+ answers: {
87
+ question_id: true,
88
+ value: true,
89
+ label: true,
90
+ value_type: true,
91
+ },
92
+ },
93
+ },
94
+ });
95
+ const formDefinition = (_e = formDefinitionResponse.form) === null || _e === void 0 ? void 0 : _e.form;
96
+ const formResponse = (_f = formResponseData.formResponse) === null || _f === void 0 ? void 0 : _f.response;
97
+ if (formDefinition !== null && formResponse !== null) {
98
+ // Map questions to their answers
99
+ const formattedResponses = formDefinition.questions.map(question => {
100
+ var _a, _b, _c;
101
+ const answer = formResponse.answers.find(a => a.question_id === question.id);
102
+ let responseText = (_a = answer === null || answer === void 0 ? void 0 : answer.value) !== null && _a !== void 0 ? _a : 'No response';
103
+ // Handle different question types
104
+ if (question.userQuestionType === 'YES_NO') {
105
+ responseText = responseText === '1' ? 'Yes' : responseText === '0' ? 'No' : 'No response';
106
+ }
107
+ else if (question.userQuestionType === 'MULTIPLE_CHOICE' && answer !== null) {
108
+ const option = (_b = question.options) === null || _b === void 0 ? void 0 : _b.find(opt => opt.value_string === (answer === null || answer === void 0 ? void 0 : answer.value));
109
+ responseText = (_c = option === null || option === void 0 ? void 0 : option.label) !== null && _c !== void 0 ? _c : responseText;
110
+ }
111
+ return {
112
+ title: question.title,
113
+ response: responseText
114
+ };
115
+ });
116
+ baseActivity.form = {
117
+ title: formTitle,
118
+ questions: formattedResponses
119
+ };
120
+ }
121
+ }
122
+ catch (error) {
123
+ // Fallback to basic form data if form questions exist
124
+ const questions = (_g = activity.form) === null || _g === void 0 ? void 0 : _g.questions;
125
+ if (Array.isArray(questions)) {
126
+ baseActivity.form = {
127
+ title: formTitle,
128
+ questions: questions.map(q => ({
129
+ title: q.title,
130
+ response: 'No response'
131
+ }))
132
+ };
133
+ }
134
+ }
135
+ }
136
+ // Handle standalone data points
137
+ else if (Array.isArray(activity.dataPoints) && activity.dataPoints.length > 0) {
138
+ baseActivity.data_points = activity.dataPoints.map(dp => ({
139
+ value: dp.serialized_value,
140
+ date: dp.date,
141
+ title: dp.definitionTitle
142
+ }));
143
+ }
144
+ return baseActivity;
145
+ }))
146
+ };
147
+ }))
148
+ };
149
+ };
150
+ const getTrackData = async ({ awellSdk, pathwayId, trackId, currentActivityId, }) => {
151
+ var _a;
152
+ // 1. Query pathway to get track information
153
+ const pathwayQuery = await awellSdk.orchestration.query({
154
+ pathway: {
155
+ __args: {
156
+ id: pathwayId,
157
+ },
158
+ code: true,
159
+ success: true,
160
+ pathway: {
161
+ id: true,
162
+ title: true,
163
+ pathway_definition_id: true,
164
+ tracks: {
165
+ id: true,
166
+ title: true,
167
+ release_id: true,
168
+ can_trigger_manually: true,
169
+ },
170
+ },
171
+ },
172
+ });
173
+ // 2. Get pathway elements (steps)
174
+ const elementsQuery = (await awellSdk.orchestration.query({
175
+ pathwayElements: {
176
+ __args: {
177
+ pathway_id: pathwayId,
178
+ },
179
+ code: true,
180
+ success: true,
181
+ elements: {
182
+ id: true,
183
+ parent_id: true,
184
+ name: true,
185
+ label: {
186
+ text: true,
187
+ color: true,
188
+ id: true,
189
+ },
190
+ start_date: true,
191
+ end_date: true,
192
+ status: true,
193
+ type: true,
194
+ activity_type: true,
195
+ stakeholders: {
196
+ id: true,
197
+ name: true,
198
+ },
199
+ context: {
200
+ instance_id: true,
201
+ pathway_id: true,
202
+ step_id: true,
203
+ track_id: true,
204
+ },
205
+ },
206
+ },
207
+ }));
208
+ // 3. Get all activities in the track up to current activity
209
+ const activitiesQuery = (await awellSdk.orchestration.query({
210
+ pathwayActivities: {
211
+ __args: {
212
+ pathway_id: pathwayId,
213
+ pagination: {
214
+ offset: 0,
215
+ count: 500
216
+ }
217
+ },
218
+ success: true,
219
+ activities: {
220
+ id: true,
221
+ date: true,
222
+ action: true,
223
+ status: true,
224
+ subject: {
225
+ type: true,
226
+ name: true
227
+ },
228
+ object: {
229
+ id: true,
230
+ type: true,
231
+ name: true
232
+ },
233
+ indirect_object: {
234
+ id: true,
235
+ type: true,
236
+ name: true
237
+ },
238
+ form: {
239
+ id: true,
240
+ title: true,
241
+ questions: {
242
+ key: true,
243
+ title: true,
244
+ questionConfig: {
245
+ mandatory: true
246
+ }
247
+ }
248
+ },
249
+ track: {
250
+ id: true,
251
+ title: true
252
+ },
253
+ context: {
254
+ instance_id: true,
255
+ pathway_id: true,
256
+ track_id: true,
257
+ step_id: true,
258
+ action_id: true
259
+ },
260
+ session_id: true,
261
+ stakeholders: {
262
+ type: true,
263
+ id: true,
264
+ name: true,
265
+ email: true,
266
+ preferred_language: true
267
+ },
268
+ resolution: true,
269
+ stream_id: true
270
+ }
271
+ }
272
+ }));
273
+ // Find current activity to get its date
274
+ const currentActivity = activitiesQuery.pathwayActivities.activities
275
+ .find(activity => activity.id === currentActivityId);
276
+ const currentActivityDate = (_a = currentActivity === null || currentActivity === void 0 ? void 0 : currentActivity.date) !== null && _a !== void 0 ? _a : '';
277
+ // Get the track IDs we need to match against
278
+ const relevantTrackIds = new Set();
279
+ activitiesQuery.pathwayActivities.activities.forEach(activity => {
280
+ var _a;
281
+ if (((_a = activity.track) === null || _a === void 0 ? void 0 : _a.id) === trackId) {
282
+ relevantTrackIds.add(activity.track.id);
283
+ // Find the corresponding track element to get its ID
284
+ const trackElement = elementsQuery.pathwayElements.elements.find(element => {
285
+ var _a, _b;
286
+ return element.type === 'TRACK' &&
287
+ (((_a = element.context) === null || _a === void 0 ? void 0 : _a.track_id) === ((_b = activity.context) === null || _b === void 0 ? void 0 : _b.track_id));
288
+ });
289
+ if ((trackElement === null || trackElement === void 0 ? void 0 : trackElement.id) !== undefined) {
290
+ relevantTrackIds.add(trackElement.id);
291
+ }
292
+ }
293
+ });
294
+ // Filter activities by track and date
295
+ const trackActivities = activitiesQuery.pathwayActivities.activities
296
+ .filter(activity => {
297
+ var _a, _b;
298
+ // An activity belongs to a track if either:
299
+ // 1. Its track.id matches any of the relevant track IDs, or
300
+ // 2. Its context.track_id matches any of the relevant track IDs
301
+ const isInTrack = (((_a = activity.track) === null || _a === void 0 ? void 0 : _a.id) !== undefined && relevantTrackIds.has(activity.track.id)) ||
302
+ (((_b = activity.context) === null || _b === void 0 ? void 0 : _b.track_id) !== undefined && relevantTrackIds.has(activity.context.track_id));
303
+ const isBeforeOrEqualDate = currentActivityDate.length === 0 || activity.date <= currentActivityDate;
304
+ return isInTrack && isBeforeOrEqualDate;
305
+ })
306
+ .sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime());
307
+ // 4. Get data points for all activities in the track
308
+ const dataPointsQuery = (await awellSdk.orchestration.query({
309
+ pathwayDataPoints: {
310
+ __args: {
311
+ pathway_id: pathwayId,
312
+ },
313
+ code: true,
314
+ success: true,
315
+ dataPoints: {
316
+ id: true,
317
+ data_set_id: true,
318
+ key: true,
319
+ serialized_value: true,
320
+ data_point_definition_id: true,
321
+ date: true,
322
+ valueType: true,
323
+ activity_id: true,
324
+ },
325
+ },
326
+ }));
327
+ // 6. Enhance activities with data points
328
+ const activitiesWithDataPoints = trackActivities.map(activity => {
329
+ var _a;
330
+ // Find data points for this activity
331
+ const activityDataPoints = dataPointsQuery.pathwayDataPoints.dataPoints
332
+ .filter(dp => dp.activity_id === activity.id)
333
+ .map(dp => {
334
+ // Special handling for activation data points
335
+ if (dp.data_point_definition_id.endsWith('-ACTIVATION')) {
336
+ return {
337
+ ...dp,
338
+ definitionKey: 'activation_date',
339
+ definitionTitle: 'Activation Date',
340
+ };
341
+ }
342
+ return dp;
343
+ });
344
+ // Map form responses to data points if they exist
345
+ const questions = (_a = activity.form) === null || _a === void 0 ? void 0 : _a.questions;
346
+ if (questions !== undefined && questions !== null) {
347
+ const formResponses = questions.map(question => {
348
+ var _a, _b, _c, _d, _e;
349
+ const dataPoint = activityDataPoints.find(dp => dp.data_point_definition_id === question.key);
350
+ return {
351
+ id: (_a = dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.id) !== null && _a !== void 0 ? _a : '',
352
+ data_set_id: (_b = dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.data_set_id) !== null && _b !== void 0 ? _b : '',
353
+ key: question.key,
354
+ serialized_value: (_c = dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.serialized_value) !== null && _c !== void 0 ? _c : '',
355
+ data_point_definition_id: question.key,
356
+ date: (_d = dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.date) !== null && _d !== void 0 ? _d : activity.date,
357
+ valueType: (_e = dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.valueType) !== null && _e !== void 0 ? _e : 'STRING',
358
+ activity_id: activity.id,
359
+ definitionKey: question.key,
360
+ definitionTitle: question.title,
361
+ };
362
+ });
363
+ activityDataPoints.push(...formResponses);
364
+ }
365
+ return {
366
+ ...activity,
367
+ dataPoints: activityDataPoints
368
+ };
369
+ });
370
+ // 8. Get steps from the elements query and filter by track ID and type STEP
371
+ const steps = elementsQuery.pathwayElements.elements
372
+ .filter(element => {
373
+ const parentId = element.parent_id;
374
+ // A step belongs to a track if:
375
+ // 1. Its parent_id matches one of our relevant track IDs
376
+ const isInTrack = parentId !== undefined && relevantTrackIds.has(parentId);
377
+ // Only include STEP elements
378
+ const isStep = element.type === 'STEP';
379
+ return isInTrack && isStep;
380
+ })
381
+ .map(element => {
382
+ var _a, _b;
383
+ return ({
384
+ id: element.id,
385
+ parent_id: element.parent_id,
386
+ name: element.name,
387
+ label: (_b = (_a = element.label) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : '',
388
+ start_date: element.start_date,
389
+ end_date: element.end_date,
390
+ status: element.status,
391
+ activity_type: element.activity_type,
392
+ stakeholders: element.stakeholders.map(stakeholder => {
393
+ var _a;
394
+ return ({
395
+ id: stakeholder.id,
396
+ name: (_a = stakeholder.name) !== null && _a !== void 0 ? _a : '',
397
+ });
398
+ }),
399
+ activities: [],
400
+ });
401
+ });
402
+ // 9. Associate activities with steps
403
+ const stepsWithActivities = steps.map(step => {
404
+ // Find all activities that belong to this step
405
+ const stepActivities = activitiesWithDataPoints.filter(activity => { var _a; return ((_a = activity.context) === null || _a === void 0 ? void 0 : _a.step_id) === step.id; });
406
+ return {
407
+ ...step,
408
+ activities: stepActivities.map(activity => activity.id),
409
+ };
410
+ });
411
+ // 10. Process the track data
412
+ const track = pathwayQuery.pathway.pathway.tracks.find((t) => t.id === trackId);
413
+ // If track is not found, use default values with just the ID
414
+ const finalTrack = track !== undefined ? {
415
+ id: track.id,
416
+ title: track.title,
417
+ } : {
418
+ id: trackId,
419
+ };
420
+ const rawTrackData = {
421
+ track: finalTrack,
422
+ activities: activitiesWithDataPoints,
423
+ steps: stepsWithActivities,
424
+ };
425
+ // Clean the data for LLM consumption and return only cleaned data
426
+ return await cleanDataForLLM(rawTrackData, awellSdk, pathwayId);
427
+ };
428
+ exports.getTrackData = getTrackData;
429
+ //# sourceMappingURL=getTrackData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTrackData.js","sourceRoot":"","sources":["../../../../../extensions/shelly/lib/getTrackData/getTrackData.ts"],"names":[],"mappings":";;;AAiUA,MAAM,eAAe,GAAG,K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AEhF,6DAA6D;IAC7D,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;QACvC,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC,CAAC,CAAC;QACF,EAAE,EAAE,OAAO;KACZ,CAAC;IAEF,MAAM,YAAY,GAAG;QACnB,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,wBAAwB;QACpC,KAAK,EAAE,mBAAmB;KAC3B,CAAA;IACD,kEAAkE;IAClE,OAAO,MAAM,eAAe,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC,CAAA;AAnSY,QAAA,YAAY,gBAmSxB"}
@@ -0,0 +1 @@
1
+ export { getTrackData } from './getTrackData';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTrackData = void 0;
4
+ var getTrackData_1 = require("./getTrackData");
5
+ Object.defineProperty(exports, "getTrackData", { enumerable: true, get: function () { return getTrackData_1.getTrackData; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/shelly/lib/getTrackData/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.203",
3
+ "version": "2.0.205",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {