@awell-health/awell-extensions 2.0.182 → 2.0.183
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/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.js +2 -2
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.js.map +1 -1
- package/dist/extensions/elation/actions/findFutureAppointment/__testdata__/GetAppointments.mock.js +44 -1
- package/dist/extensions/elation/actions/findFutureAppointment/__testdata__/GetAppointments.mock.js.map +1 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.js +1 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.js.map +1 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/prompt.d.ts +1 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/prompt.js +10 -5
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/prompt.js.map +1 -1
- package/package.json +1 -1
package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.js
CHANGED
@@ -5,7 +5,7 @@ const date_fns_1 = require("date-fns");
|
|
5
5
|
exports.appointmentsMock = [
|
6
6
|
{
|
7
7
|
id: 123,
|
8
|
-
scheduled_date: (0, date_fns_1.
|
8
|
+
scheduled_date: (0, date_fns_1.addHours)(new Date(), 12).toISOString(),
|
9
9
|
duration: 60,
|
10
10
|
billing_details: null,
|
11
11
|
payment: null,
|
@@ -48,7 +48,7 @@ exports.appointmentsMock = [
|
|
48
48
|
},
|
49
49
|
{
|
50
50
|
id: 456,
|
51
|
-
scheduled_date: (0, date_fns_1.
|
51
|
+
scheduled_date: (0, date_fns_1.addHours)(new Date(), 25).toISOString(),
|
52
52
|
duration: 60,
|
53
53
|
billing_details: null,
|
54
54
|
payment: null,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GetAppointments.mock.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"GetAppointments.mock.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEtB,QAAA,gBAAgB,GAAG;IAC9B;QACE,EAAE,EAAE,GAAG;QACP,cAAc,EAAE,IAAA,mBAAQ,EAAC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;QACtD,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,aAAa;QAC7B,gBAAgB,EAAE,IAAI;QACtB,MAAM,EAAE,0BAA0B;QAClC,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,EAAE;QACf,MAAM,EAAE;YACN,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,sBAAsB;YACnC,aAAa,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,KAAK;QACd,aAAa,EAAE;YACb,yBAAyB,EAAE,IAAI;YAC/B,aAAa,EACX,iJAAiJ;YACnJ,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,GAAG;oBACP,IAAI,EAAE,yBAAyB;oBAC/B,MAAM,EAAE,YAAY;iBACrB;aACF;YACD,WAAW,EAAE,CAAC;SACf;QACD,SAAS,EAAE,eAAe;QAC1B,QAAQ,EAAE,eAAe;QACzB,YAAY,EAAE,EAAE;QAChB,wBAAwB,EAAE,IAAI;QAC9B,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,sBAAsB;QACpC,kBAAkB,EAAE,sBAAsB;QAC1C,YAAY,EAAE,IAAI;QAClB,gBAAgB,EAAE,IAAI;QACtB,kBAAkB,EAAE,EAAE;KACvB;IACD;QACE,EAAE,EAAE,GAAG;QACP,cAAc,EAAE,IAAA,mBAAQ,EAAC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;QACtD,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,aAAa;QAC7B,gBAAgB,EAAE,IAAI;QACtB,MAAM,EAAE,0BAA0B;QAClC,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,EAAE;QACf,MAAM,EAAE;YACN,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,sBAAsB;YACnC,aAAa,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,KAAK;QACd,aAAa,EAAE;YACb,yBAAyB,EAAE,IAAI;YAC/B,aAAa,EACX,iJAAiJ;YACnJ,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,GAAG;oBACP,IAAI,EAAE,yBAAyB;oBAC/B,MAAM,EAAE,YAAY;iBACrB;aACF;YACD,WAAW,EAAE,CAAC;SACf;QACD,SAAS,EAAE,eAAe;QAC1B,QAAQ,EAAE,eAAe;QACzB,YAAY,EAAE,EAAE;QAChB,wBAAwB,EAAE,IAAI;QAC9B,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,sBAAsB;QACpC,kBAAkB,EAAE,sBAAsB;QAC1C,YAAY,EAAE,IAAI;QAClB,gBAAgB,EAAE,IAAI;QACtB,kBAAkB,EAAE,EAAE;KACvB;CACF,CAAA"}
|
package/dist/extensions/elation/actions/findFutureAppointment/__testdata__/GetAppointments.mock.js
CHANGED
@@ -48,7 +48,50 @@ exports.appointmentsMock = [
|
|
48
48
|
},
|
49
49
|
{
|
50
50
|
id: 456,
|
51
|
-
scheduled_date: (0, date_fns_1.addDays)(new Date(),
|
51
|
+
scheduled_date: (0, date_fns_1.addDays)(new Date(), 3).toISOString(),
|
52
|
+
duration: 60,
|
53
|
+
billing_details: null,
|
54
|
+
payment: null,
|
55
|
+
time_slot_type: 'appointment',
|
56
|
+
time_slot_status: null,
|
57
|
+
reason: 'PCP: Est. Patient Office',
|
58
|
+
mode: 'VIDEO',
|
59
|
+
description: '',
|
60
|
+
status: {
|
61
|
+
status: 'Scheduled',
|
62
|
+
room: null,
|
63
|
+
status_date: '2023-07-12T20:44:22Z',
|
64
|
+
status_detail: null,
|
65
|
+
},
|
66
|
+
patient: 12345,
|
67
|
+
patient_forms: {
|
68
|
+
patient_can_receive_forms: true,
|
69
|
+
anonymous_url: 'https://sandbox.elationemr.com/appointments/141701667029082/patient-forms/?key=642301d3930ac1e4d052ff65c093c5f1da1697e6b861a18f43a042b5afca50a1',
|
70
|
+
overrides: [],
|
71
|
+
short_code: null,
|
72
|
+
statuses: [
|
73
|
+
{
|
74
|
+
id: 316,
|
75
|
+
name: 'COVID-19 Screening Form',
|
76
|
+
status: 'incomplete',
|
77
|
+
},
|
78
|
+
],
|
79
|
+
hours_prior: 0,
|
80
|
+
},
|
81
|
+
physician: 141114870071298,
|
82
|
+
practice: 141114865745924,
|
83
|
+
instructions: '',
|
84
|
+
recurring_event_schedule: null,
|
85
|
+
metadata: null,
|
86
|
+
created_date: '2023-07-12T20:44:22Z',
|
87
|
+
last_modified_date: '2023-07-12T20:44:22Z',
|
88
|
+
deleted_date: null,
|
89
|
+
service_location: null,
|
90
|
+
telehealth_details: '',
|
91
|
+
},
|
92
|
+
{
|
93
|
+
id: 789,
|
94
|
+
scheduled_date: (0, date_fns_1.addHours)(new Date(), 1).toISOString(),
|
52
95
|
duration: 60,
|
53
96
|
billing_details: null,
|
54
97
|
payment: null,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GetAppointments.mock.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findFutureAppointment/__testdata__/GetAppointments.mock.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"GetAppointments.mock.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/findFutureAppointment/__testdata__/GetAppointments.mock.ts"],"names":[],"mappings":"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"}
|
@@ -8,7 +8,7 @@ const findAppointmentsWithLLM = async ({ model, appointments, prompt, metadata,
|
|
8
8
|
try {
|
9
9
|
const formattedAppointments = JSON.stringify(appointments);
|
10
10
|
const result = await chain.invoke(await prompt_1.systemPrompt.format({
|
11
|
-
|
11
|
+
currentDateTime: new Date().toISOString(),
|
12
12
|
appointments: formattedAppointments,
|
13
13
|
prompt,
|
14
14
|
}), {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"findAppointmentsWithLLM.js","sourceRoot":"","sources":["../../../../../extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,qCAA2D;AAUpD,MAAM,uBAAuB,GAAG,KAAK,EAAE,EAC5C,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,SAAS,GACoB,EAAgC,EAAE;IAC/D,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,eAAM,CAAC,CAAA;IAEhC,IAAI,CAAC;QACH,MAAM,qBAAqB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QAE1D,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAC/B,MAAM,qBAAY,CAAC,MAAM,CAAC;YACxB,
|
1
|
+
{"version":3,"file":"findAppointmentsWithLLM.js","sourceRoot":"","sources":["../../../../../extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,qCAA2D;AAUpD,MAAM,uBAAuB,GAAG,KAAK,EAAE,EAC5C,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,SAAS,GACoB,EAAgC,EAAE;IAC/D,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,eAAM,CAAC,CAAA;IAEhC,IAAI,CAAC;QACH,MAAM,qBAAqB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QAE1D,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAC/B,MAAM,qBAAY,CAAC,MAAM,CAAC;YACxB,eAAe,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACzC,YAAY,EAAE,qBAAqB;YACnC,MAAM;SACP,CAAC,EACF;YACE,QAAQ;YACR,OAAO,EAAE,gCAAgC;YACzC,SAAS;SACV,CACF,CAAA;QAED,OAAO;YACL,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC,CAAA;AAhCY,QAAA,uBAAuB,2BAgCnC"}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { ChatPromptTemplate } from '@langchain/core/prompts';
|
2
|
-
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\nYou are a **thorough and precise** medical assistant.\nYou will receive:\n1. A list (array) of **appointments** for a single patient (in JSON format).\n2. A set of **instructions** (written by a clinician, for a clinician) specifying which types of appointments to find.\n\n---\n### **Your Task**\nYour goal is to carefully analyze the provided instructions and the list of appointments to **identify only those that match the instructions**.\n\n- You must be **thorough** in your search but only return results when you are **certain** that they match.\n- If multiple appointments match, return **all** their IDs.\n- If no appointments match, return an empty array—this is a valid outcome.\n- Be **meticulous when evaluating time-based criteria**, ensuring all matches are **precise** relative to ${
|
2
|
+
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\nYou are a **thorough and precise** medical assistant.\nYou will receive:\n1. A list (array) of **appointments** for a single patient (in JSON format).\n2. A set of **instructions** (written by a clinician, for a clinician) specifying which types of appointments to find.\n\n---\n### **Your Task**\nYour goal is to carefully analyze the provided instructions and the list of appointments to **identify only those that match the instructions**.\n\n- You must be **thorough** in your search but only return results when you are **certain** that they match.\n- If multiple appointments match, return **all** their IDs.\n- If no appointments match, return an empty array—this is a valid outcome.\n- Be **meticulous when evaluating time-based criteria**, ensuring all matches are **precise** relative to ${currentDateTime}.\n\n---\n### **Important Instructions**\n- **Interpret clinically**: Instructions are written by a clinician for a clinician. Understand medical terminology correctly.\n - Example: \"Rx\" relates to prescription or medication follow-up, \"PT\" refers to physical therapy, \"f/u\" means follow-up. 2x/wk means 2 times a week while 2:1 means two patients per one clinician.\n- **Only return matches when you are certain**:\n - Use your expertise for matching but do not assume connections—appointments must explicitly fit the given instructions.\n - If an instruction is vague or ambiguous, only match appointments if the data supports it directly.\n- **Evaluate time constraints precisely**:\n - If the instruction mentions \"past\" appointments, **only include** those scheduled **before** ${currentDateTime}.\n - If \"future\" appointments are requested, **only include** those scheduled **after** ${currentDateTime}.\n - If an exact date is specified, match it **precisely**.\n - For relative time windows (e.g., “within the next 12 hours”):\n - Calculate the exact time difference between an appointment's scheduled date/time and ${currentDateTime}.\n - Example: If an appointment is scheduled at a time such that the time difference from ${currentDateTime} is more than 0 but less than or equal to 12 hours, then it qualifies.\n - It is critical to ensure the accuracy of your time comparison. Double check your calculation and reasoning.\n- **Only include appointment IDs that exist in the provided input array**.\n- **Do not fabricate matches**—returning an empty array is preferable to an incorrect match.\n\n\n----------\nPatient Appointments:\n${appointments}\n----------\nInstructions:\n${prompt}\n\nYour output must be a valid JSON object with the following fields:\n\n- appointmentIds: An array containing the IDs of appointments that match the given criteria. If no appointments meet the criteria, this array must be empty.\n- explanation: A concise, human-readable explanation that clearly describes:\n - How and why the selected appointments match the input criteria.\n - Why any appointments were excluded, if relevant.\n - Any edge cases or specific reasoning behind your selection.\n\n## Critical Requirements\n### Ensure that the explanation strictly matches the appointmentIds:\n- If appointmentIds contains **selected appointments**, the explanation must accurately describe **why they were chosen**.\n- If appointmentIds is **empty**, the explanation must clearly state **why no matches were found**.\n\n### Be thorough and precise:\n- Carefully **analyze all appointments** before making a decision.\n- **Double-check** your reasoning to confirm that **only valid matches** are included.\n- Ensure that no appointments that **do not meet the criteria** are selected.\n- **Maintain strict consistency** between appointmentIds and explanation.\n- **Do not contradict yourself**: The explanation must always align with the selected appointments appointmentIds. Double check your explanation against the appointmentIds.\n">, any>;
|
@@ -15,7 +15,7 @@ Your goal is to carefully analyze the provided instructions and the list of appo
|
|
15
15
|
- You must be **thorough** in your search but only return results when you are **certain** that they match.
|
16
16
|
- If multiple appointments match, return **all** their IDs.
|
17
17
|
- If no appointments match, return an empty array—this is a valid outcome.
|
18
|
-
- Be **meticulous when evaluating time-based criteria**, ensuring all matches are **precise** relative to \${
|
18
|
+
- Be **meticulous when evaluating time-based criteria**, ensuring all matches are **precise** relative to \${currentDateTime}.
|
19
19
|
|
20
20
|
---
|
21
21
|
### **Important Instructions**
|
@@ -25,9 +25,13 @@ Your goal is to carefully analyze the provided instructions and the list of appo
|
|
25
25
|
- Use your expertise for matching but do not assume connections—appointments must explicitly fit the given instructions.
|
26
26
|
- If an instruction is vague or ambiguous, only match appointments if the data supports it directly.
|
27
27
|
- **Evaluate time constraints precisely**:
|
28
|
-
- If the instruction mentions "past" appointments, **only include** those scheduled **before** \${
|
29
|
-
- If "future" appointments are requested, **only include** those scheduled **after** \${
|
28
|
+
- If the instruction mentions "past" appointments, **only include** those scheduled **before** \${currentDateTime}.
|
29
|
+
- If "future" appointments are requested, **only include** those scheduled **after** \${currentDateTime}.
|
30
30
|
- If an exact date is specified, match it **precisely**.
|
31
|
+
- For relative time windows (e.g., “within the next 12 hours”):
|
32
|
+
- Calculate the exact time difference between an appointment's scheduled date/time and \${currentDateTime}.
|
33
|
+
- Example: If an appointment is scheduled at a time such that the time difference from \${currentDateTime} is more than 0 but less than or equal to 12 hours, then it qualifies.
|
34
|
+
- It is critical to ensure the accuracy of your time comparison. Double check your calculation and reasoning.
|
31
35
|
- **Only include appointment IDs that exist in the provided input array**.
|
32
36
|
- **Do not fabricate matches**—returning an empty array is preferable to an incorrect match.
|
33
37
|
|
@@ -51,11 +55,12 @@ Your output must be a valid JSON object with the following fields:
|
|
51
55
|
### Ensure that the explanation strictly matches the appointmentIds:
|
52
56
|
- If appointmentIds contains **selected appointments**, the explanation must accurately describe **why they were chosen**.
|
53
57
|
- If appointmentIds is **empty**, the explanation must clearly state **why no matches were found**.
|
54
|
-
- **Do not contradict yourself**: The explanation must always align with the selected appointments.
|
55
58
|
|
56
59
|
### Be thorough and precise:
|
57
60
|
- Carefully **analyze all appointments** before making a decision.
|
58
61
|
- **Double-check** your reasoning to confirm that **only valid matches** are included.
|
59
62
|
- Ensure that no appointments that **do not meet the criteria** are selected.
|
60
|
-
- **Maintain strict consistency** between appointmentIds and explanation
|
63
|
+
- **Maintain strict consistency** between appointmentIds and explanation.
|
64
|
+
- **Do not contradict yourself**: The explanation must always align with the selected appointments appointmentIds. Double check your explanation against the appointmentIds.
|
65
|
+
`);
|
61
66
|
//# sourceMappingURL=prompt.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../extensions/elation/lib/findAppointmentsWithLLM/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/lib/findAppointmentsWithLLM/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE/C,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D3D,CAAC,CAAA"}
|