@awell-health/awell-extensions 2.0.235 → 2.0.237
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.
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/dataPoints.d.ts +4 -0
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/dataPoints.js +4 -0
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/dataPoints.js.map +1 -1
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/fields.d.ts +10 -0
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/fields.js +9 -1
- package/dist/extensions/dateHelpers/actions/getNextWorkday/config/fields.js.map +1 -1
- package/dist/extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.js +12 -6
- package/dist/extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.js.map +1 -1
- package/dist/extensions/dateHelpers/actions/index.d.ts +8 -1
- package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.d.ts +1 -1
- package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.js +4 -5
- package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.js.map +1 -1
- package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.d.ts +1 -1
- package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.js +5 -2
- package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.js.map +1 -1
- package/dist/extensions/markdown.json +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/getNextWorkday/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/getNextWorkday/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,MAAM;KAClB;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,wBAAwB;QAC7B,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA"}
|
@@ -8,11 +8,21 @@ export declare const fields: {
|
|
8
8
|
type: FieldType.DATE;
|
9
9
|
required: false;
|
10
10
|
};
|
11
|
+
includeReferenceDate: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.BOOLEAN;
|
16
|
+
required: false;
|
17
|
+
};
|
11
18
|
};
|
12
19
|
export declare const FieldsValidationSchema: z.ZodObject<{
|
13
20
|
referenceDate: z.ZodOptional<z.ZodDate>;
|
21
|
+
includeReferenceDate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
14
22
|
}, "strip", z.ZodTypeAny, {
|
23
|
+
includeReferenceDate: boolean;
|
15
24
|
referenceDate?: Date | undefined;
|
16
25
|
}, {
|
17
26
|
referenceDate?: Date | undefined;
|
27
|
+
includeReferenceDate?: boolean | undefined;
|
18
28
|
}>;
|
@@ -7,12 +7,20 @@ exports.fields = {
|
|
7
7
|
referenceDate: {
|
8
8
|
id: 'referenceDate',
|
9
9
|
label: 'Reference date',
|
10
|
-
description: 'Set the reference date to calculate the next workday from. If not specified, the current date will be used.',
|
10
|
+
description: 'Set the reference date to calculate the next workday from. If not specified, the current date (today) will be used.',
|
11
11
|
type: extensions_core_1.FieldType.DATE,
|
12
12
|
required: false,
|
13
13
|
},
|
14
|
+
includeReferenceDate: {
|
15
|
+
id: 'includeReferenceDate',
|
16
|
+
label: 'Include reference date',
|
17
|
+
description: 'If this option is enabled and the reference date is a weekday (Monday to Friday), that date will be returned. If it is disabled, the next weekday after the reference date will be returned.',
|
18
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
19
|
+
required: false,
|
20
|
+
},
|
14
21
|
};
|
15
22
|
exports.FieldsValidationSchema = zod_1.z.object({
|
16
23
|
referenceDate: zod_1.z.optional(zod_1.z.coerce.date()),
|
24
|
+
includeReferenceDate: zod_1.z.boolean().optional().default(true),
|
17
25
|
});
|
18
26
|
//# sourceMappingURL=fields.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/getNextWorkday/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/dateHelpers/actions/getNextWorkday/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,qHAAqH;QACvH,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,sBAAsB;QAC1B,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,8LAA8L;QAChM,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC1C,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACT,CAAC,CAAA"}
|
@@ -12,21 +12,27 @@ exports.getNextWorkday = {
|
|
12
12
|
dataPoints: config_1.dataPoints,
|
13
13
|
previewable: true,
|
14
14
|
onActivityCreated: async (payload, onComplete, onError) => {
|
15
|
-
const { referenceDate: referenceDateInput } = config_1.FieldsValidationSchema.parse(payload.fields);
|
15
|
+
const { referenceDate: referenceDateInput, includeReferenceDate } = config_1.FieldsValidationSchema.parse(payload.fields);
|
16
16
|
const referenceDate = referenceDateInput !== null && referenceDateInput !== void 0 ? referenceDateInput : new Date();
|
17
|
-
const SUNDAY = 0;
|
18
|
-
const SATURDAY = 6;
|
19
17
|
// Normalize to start of day to avoid timezone issues
|
20
18
|
referenceDate.setUTCHours(0, 0, 0, 0);
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
const SUNDAY = 0;
|
20
|
+
const SATURDAY = 6;
|
21
|
+
const isWeekend = (date) => date.getDay() === SUNDAY || date.getDay() === SATURDAY;
|
22
|
+
const referenceDateIsWeekday = !isWeekend(referenceDate);
|
23
|
+
// If reference date is a weekday and we should *not* include it, move forward by one day
|
24
|
+
if (!includeReferenceDate && !isWeekend(referenceDate)) {
|
25
|
+
referenceDate.setDate(referenceDate.getDate() + 1);
|
26
|
+
}
|
27
|
+
// If resultDate is a weekend, keep moving forward to the next weekday
|
28
|
+
while (isWeekend(referenceDate)) {
|
24
29
|
referenceDate.setDate(referenceDate.getDate() + 1);
|
25
30
|
}
|
26
31
|
const nextWorkday = referenceDate.toISOString();
|
27
32
|
await onComplete({
|
28
33
|
data_points: {
|
29
34
|
nextWorkday,
|
35
|
+
referenceDateIsWeekday: String(referenceDateIsWeekday),
|
30
36
|
},
|
31
37
|
});
|
32
38
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getNextWorkday.js","sourceRoot":"","sources":["../../../../../extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,qCAAqE;AAExD,QAAA,cAAc,GAIvB;IACF,GAAG,EAAE,gBAAgB;IACrB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,
|
1
|
+
{"version":3,"file":"getNextWorkday.js","sourceRoot":"","sources":["../../../../../extensions/dateHelpers/actions/getNextWorkday/getNextWorkday.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,qCAAqE;AAExD,QAAA,cAAc,GAIvB;IACF,GAAG,EAAE,gBAAgB;IACrB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAC/D,+BAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAE9C,MAAM,aAAa,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,IAAI,IAAI,EAAE,CAAA;QAEtD,qDAAqD;QACrD,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QAErC,MAAM,MAAM,GAAG,CAAC,CAAA;QAChB,MAAM,QAAQ,GAAG,CAAC,CAAA;QAClB,MAAM,SAAS,GAAG,CAAC,IAAU,EAAW,EAAE,CACxC,IAAI,CAAC,MAAM,EAAE,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,KAAK,QAAQ,CAAA;QACxD,MAAM,sBAAsB,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;QAExD,yFAAyF;QACzF,IAAI,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;YACvD,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;QACpD,CAAC;QAED,sEAAsE;QACtE,OAAO,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;YAChC,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;QACpD,CAAC;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,EAAE,CAAA;QAE/C,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,WAAW;gBACX,sBAAsB,EAAE,MAAM,CAAC,sBAAsB,CAAC;aACvD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -7,5 +7,12 @@ export declare const actions: {
|
|
7
7
|
type: import("@awell-health/extensions-core").FieldType.DATE;
|
8
8
|
required: false;
|
9
9
|
};
|
10
|
-
|
10
|
+
includeReferenceDate: {
|
11
|
+
id: string;
|
12
|
+
label: string;
|
13
|
+
description: string;
|
14
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
15
|
+
required: false;
|
16
|
+
};
|
17
|
+
}, {}, "nextWorkday" | "referenceDateIsWeekday">;
|
11
18
|
};
|
package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.d.ts
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
* - LANGSMITH_PROJECT=ai-actions-local
|
15
15
|
*
|
16
16
|
* Usage:
|
17
|
-
* node getTagsFromLLM/evaluateTags.ts
|
17
|
+
* * yarn ts-node extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.ts
|
18
18
|
*
|
19
19
|
* Results can be viewed in LangSmith dashboard:
|
20
20
|
* https://smith.langchain.com/o/3fffae83-70ff-4574-81ba-aaaedf0b4dc5/datasets/745cea13-3379-463f-9a8a-c6b10e29b8f6
|
package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.js
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
* - LANGSMITH_PROJECT=ai-actions-local
|
16
16
|
*
|
17
17
|
* Usage:
|
18
|
-
* node getTagsFromLLM/evaluateTags.ts
|
18
|
+
* * yarn ts-node extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.ts
|
19
19
|
*
|
20
20
|
* Results can be viewed in LangSmith dashboard:
|
21
21
|
* https://smith.langchain.com/o/3fffae83-70ff-4574-81ba-aaaedf0b4dc5/datasets/745cea13-3379-463f-9a8a-c6b10e29b8f6
|
@@ -45,7 +45,7 @@ const fetchTestExamples = async () => {
|
|
45
45
|
try {
|
46
46
|
const testExamples = langsmith.listExamples({
|
47
47
|
datasetName,
|
48
|
-
splits: ['test'],
|
48
|
+
splits: ['test'], // change to ['validation'] to run on validation set
|
49
49
|
});
|
50
50
|
const examples = [];
|
51
51
|
for await (const example of testExamples) {
|
@@ -63,10 +63,8 @@ const fetchTestExamples = async () => {
|
|
63
63
|
};
|
64
64
|
// Custom evaluator to compare generated tags with expected tags
|
65
65
|
const tagsMatchEvaluator = async ({ outputs, referenceOutputs, }) => {
|
66
|
-
console.log('Evaluator received:', { outputs, referenceOutputs }); // Debug log
|
67
66
|
const generatedTags = outputs === null || outputs === void 0 ? void 0 : outputs.validatedTags;
|
68
67
|
const expectedTags = referenceOutputs === null || referenceOutputs === void 0 ? void 0 : referenceOutputs.expected_updated_tags;
|
69
|
-
// console.log('Comparing tags:', { generatedTags, expectedTags }); // Debug log
|
70
68
|
const isEqual = Array.isArray(generatedTags) &&
|
71
69
|
Array.isArray(expectedTags) &&
|
72
70
|
generatedTags.length === expectedTags.length &&
|
@@ -129,7 +127,8 @@ const runEvaluation = async () => {
|
|
129
127
|
data: testExamples,
|
130
128
|
evaluators: [tagsMatchEvaluator],
|
131
129
|
experimentPrefix: 'GetTagsFromLLM Evaluation',
|
132
|
-
maxConcurrency:
|
130
|
+
maxConcurrency: 16,
|
131
|
+
numRepetitions: 3,
|
133
132
|
});
|
134
133
|
const resultsArray = Array.isArray(results) ? results : [results];
|
135
134
|
const experimentId = (_b = (_a = resultsArray[0]) === null || _a === void 0 ? void 0 : _a.run) === null || _b === void 0 ? void 0 : _b.run_id;
|
package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"evaluateTags.js","sourceRoot":"","sources":["../../../../../../../extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/evaluateTags.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;;;AAEH,yCAAgD;AAChD,qDAA+C;AAC/C,8FAA0F;AAC1F,qDAAiD;AACjD,8EAA8E;AAE9E,mCAA8B;AAE9B,oDAA2B;AAC3B,gBAAM,CAAC,MAAM,EAAE,CAAA;AAEf,MAAM,SAAS,GAAG,IAAI,kBAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;IACrC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB;CACvC,CAAC,CAAA;AAEF,0BAA0B;AAC1B,MAAM,WAAW,GAAG,wCAAwC,CAAA;AAiB5D,mDAAmD;AACnD,MAAM,iBAAiB,GAAG,KAAK,IAAwB,EAAE;IACvD,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;YAC1C,WAAW;YACX,MAAM,EAAE,CAAC,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"evaluateTags.js","sourceRoot":"","sources":["../../../../../../../extensions/elation/actions/updatePatientTags/lib/getTagsFrom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,0CAAE,GAAG,0CAAE,MAAgB,CAAA;QAE3D,IAAI,CAAC,IAAA,cAAK,EAAC,YAAY,CAAC,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACvD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACvC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAA;YAClD,OAAO,CAAC,GAAG,CAAC,oCAAoC,YAAY,EAAE,CAAC,CAAA;QACjE,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAA;QAClD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,yBAAyB;AACzB,KAAK,aAAa,EAAE,CAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { ChatPromptTemplate } from '@langchain/core/prompts';
|
2
|
-
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\n You are a clinical data manager with expert knowledge of Elation Patient Tags, which help care teams organize patient care (e.g., grouping, reporting, or identifying patients for care).\n\n Your task is to manage a single patient's tags based on the provided instructions.\n\n You will receive:\n - existing_tags: An array of the patient's current tags.\n - instruction: A directive specifying which tags to add, update, or remove. Ensure to follow them diligently.\n\n ### Step-by-Step Approach:\n 1. **Review the Instruction**\n - Identify the required tag modifications: additions, updates, or removals.\n\n 2. **Apply Modifications**\n - **Removing Tags:**\n - Only remove tags if explicitly stated in the instruction.\n - Match existing tags for removal, allowing minor variations (e.g., capitalization, spacing).\n - If unsure, do not remove the tag.\n\n - **Adding Tags:**\n - Use the exact wording and formatting provided in the instruction for new tags. Do not modify, reformat, or adjust them in any way. This is critical.\n -
|
2
|
+
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\n You are a clinical data manager with expert knowledge of Elation Patient Tags, which help care teams organize patient care (e.g., grouping, reporting, or identifying patients for care).\n\n Your task is to manage a single patient's tags based on the provided instructions.\n\n You will receive:\n - existing_tags: An array of the patient's current tags.\n - instruction: A directive specifying which tags to add, update, or remove. Ensure to follow them diligently.\n\n ### Step-by-Step Approach:\n 1. **Review the Instruction**\n - Identify the required tag modifications: additions, updates, or removals.\n\n 2. **Apply Modifications**\n - **Removing Tags:**\n - Only remove tags if explicitly stated in the instruction.\n - Match existing tags for removal, allowing minor variations (e.g., capitalization, spacing).\n - If unsure, do not remove the tag.\n\n - **Adding Tags:**\n - Use the exact wording and formatting provided in the instruction for new tags. Do not modify, reformat, or adjust them in any way. This is critical.\n - When extracting tag names from instructions:\n - If the tag is in quotes: use exactly what's in the quotes, but if the quoted text contains the word \"tag\" (e.g., 'MH-T tag', \"CCM 2 tag\"), remove the word \"tag\" and keep only the tag name ('MH-T', \"CCM 2\")\n - If there are no quotes but the word \"tag\" follows the intended tag name (e.g., \"add MH-T tag\"), extract only the tag name (\"MH-T\") without the word \"tag\"\n - Always preserve all spaces, punctuation, and capitalization exactly as specified\n - If a tag exceeds **100 characters**, do not add it and state this in the \"explanation\".\n - Ensure all tags remain **unique** (no duplicates).\n - The updated list should first retain all unchanged tags, followed by any new additions.\n\n - **Unaffected Tags:**\n - Tags that are not affected by the modification instructions must remain unchanged, including spacing and formatting.\n\n 3. **Generate Output**\n - Return a JSON object containing:\n - \"updatedTags\": The final array of tags after modifications.\n - \"explanation\": A single, concise sentence summarizing all tag modifications, including the reasoning behind changes or lack thereof. Refrain from including statements about the total number of tags.\n\n ### Input\n existingTags: {existingTags}\n instructions: {instructions}\n">, any>;
|
@@ -23,7 +23,10 @@ exports.systemPrompt = prompts_1.ChatPromptTemplate.fromTemplate(`
|
|
23
23
|
|
24
24
|
- **Adding Tags:**
|
25
25
|
- Use the exact wording and formatting provided in the instruction for new tags. Do not modify, reformat, or adjust them in any way. This is critical.
|
26
|
-
-
|
26
|
+
- When extracting tag names from instructions:
|
27
|
+
- If the tag is in quotes: use exactly what's in the quotes, but if the quoted text contains the word "tag" (e.g., 'MH-T tag', "CCM 2 tag"), remove the word "tag" and keep only the tag name ('MH-T', "CCM 2")
|
28
|
+
- If there are no quotes but the word "tag" follows the intended tag name (e.g., "add MH-T tag"), extract only the tag name ("MH-T") without the word "tag"
|
29
|
+
- Always preserve all spaces, punctuation, and capitalization exactly as specified
|
27
30
|
- If a tag exceeds **100 characters**, do not add it and state this in the "explanation".
|
28
31
|
- Ensure all tags remain **unique** (no duplicates).
|
29
32
|
- The updated list should first retain all unchanged tags, followed by any new additions.
|
@@ -34,7 +37,7 @@ exports.systemPrompt = prompts_1.ChatPromptTemplate.fromTemplate(`
|
|
34
37
|
3. **Generate Output**
|
35
38
|
- Return a JSON object containing:
|
36
39
|
- "updatedTags": The final array of tags after modifications.
|
37
|
-
- "explanation": A single, concise sentence summarizing all tag modifications, including the reasoning behind changes or lack thereof.
|
40
|
+
- "explanation": A single, concise sentence summarizing all tag modifications, including the reasoning behind changes or lack thereof. Refrain from including statements about the total number of tags.
|
38
41
|
|
39
42
|
### Input
|
40
43
|
existingTags: {existingTags}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../../extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE/C,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../../extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE/C,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC3D,CAAC,CAAA"}
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"changelog": "# Collect Data changelog\n"
|
49
49
|
},
|
50
50
|
"dateHelpers": {
|
51
|
-
"readme": "---\ntitle: Date helpers\ndescription: A set of utility actions to help with common and useful date and time operations.\n---\n\n# Date helpers\n\nA set of utility actions to help with common and useful date and time operations.\n\n## Actions\n\n### Get next workday\n\
|
51
|
+
"readme": "---\ntitle: Date helpers\ndescription: A set of utility actions to help with common and useful date and time operations.\n---\n\n# Date helpers\n\nA set of utility actions to help with common and useful date and time operations.\n\n## Actions\n\n### Get next workday\n\nReturns the next workday (Monday to Friday) based on a reference date.\n\nIf the reference date is a weekday and \"Include reference date\" is enabled, the reference date is returned. If it's a weekend or \"Include reference date\" is disabled, the next weekday is returned instead.\n\n**Examples:**\n\n- Reference date: Thursday, April 17\n - Include reference date enabled → returns Thursday, April 17\n - Include reference date disabled → returns Friday, April 18\n- Reference date: Sunday, April 20\n - Include reference date enabled → returns Monday, April 21\n - Include reference date disabled → returns Monday, April 21\n\n✅ Include reference date enabled or disabled → returns Monday, April 21\n\nThis action does not account for holidays.",
|
52
52
|
"changelog": "# Date helopers\n"
|
53
53
|
},
|
54
54
|
"dockHealth": {
|