@awell-health/awell-extensions 2.0.205 → 2.0.207
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__/generateMockAppointment.d.ts +8 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/generateMockAppointment.js +45 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/generateMockAppointment.js.map +1 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/generatePayload.d.ts +4 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/generatePayload.js +33 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/generatePayload.js.map +1 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/index.d.ts +2 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/index.js +19 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/index.js.map +1 -0
- package/dist/extensions/elation/actions/findAppointmentsWithAI/config/fields.js +1 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/config/fields.js.map +1 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.d.ts +1 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.js +59 -29
- package/dist/extensions/elation/actions/findAppointmentsWithAI/findAppointmentsWithAI.js.map +1 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/{getAppoitnmentCountByStatus.js → getAppointmentCountByStatus.js} +1 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/getAppointmentCountByStatus.js.map +1 -0
- package/dist/extensions/elation/actions/findFutureAppointment/findFutureAppointment.js +1 -0
- package/dist/extensions/elation/actions/findFutureAppointment/findFutureAppointment.js.map +1 -1
- package/dist/extensions/elation/lib/extractDatesFromInstructions/evaluate.d.ts +1 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/evaluate.js +68 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/evaluate.js.map +1 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/extractDatesFromInstructions.d.ts +12 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/extractDatesFromInstructions.js +28 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/extractDatesFromInstructions.js.map +1 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/parser.d.ts +20 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/parser.js +11 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/parser.js.map +1 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/prompt.d.ts +2 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/prompt.js +33 -0
- package/dist/extensions/elation/lib/extractDatesFromInstructions/prompt.js.map +1 -0
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.d.ts +3 -2
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.js +8 -5
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/findAppointmentsWithLLM.js.map +1 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/parser.js +1 -2
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/parser.js.map +1 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/prompt.d.ts +2 -1
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/prompt.js +55 -2
- package/dist/extensions/elation/lib/findAppointmentsWithLLM/prompt.js.map +1 -1
- package/dist/extensions/medplum/actions/getAppointment/getAppointment.js +4 -1
- package/dist/extensions/medplum/actions/getAppointment/getAppointment.js.map +1 -1
- package/dist/extensions/medplum/actions/getServiceRequest/__testdata__/ServiceRequest.mock.d.ts +15 -0
- package/dist/extensions/medplum/actions/getServiceRequest/__testdata__/ServiceRequest.mock.js +19 -0
- package/dist/extensions/medplum/actions/getServiceRequest/__testdata__/ServiceRequest.mock.js.map +1 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/dataPoints.d.ts +22 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/dataPoints.js +26 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/dataPoints.js.map +1 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/fields.d.ts +18 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/fields.js +20 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/fields.js.map +1 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/index.d.ts +2 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/index.js +19 -0
- package/dist/extensions/medplum/actions/getServiceRequest/config/index.js.map +1 -0
- package/dist/extensions/medplum/actions/getServiceRequest/getServiceRequest.d.ts +4 -0
- package/dist/extensions/medplum/actions/getServiceRequest/getServiceRequest.js +43 -0
- package/dist/extensions/medplum/actions/getServiceRequest/getServiceRequest.js.map +1 -0
- package/dist/extensions/medplum/actions/getServiceRequest/index.d.ts +1 -0
- package/dist/extensions/medplum/actions/getServiceRequest/index.js +18 -0
- package/dist/extensions/medplum/actions/getServiceRequest/index.js.map +1 -0
- package/dist/extensions/medplum/actions/index.d.ts +1 -0
- package/dist/extensions/medplum/actions/index.js +3 -1
- package/dist/extensions/medplum/actions/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.d.ts +0 -41
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.js +0 -93
- package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.js.map +0 -1
- package/dist/extensions/elation/actions/findAppointmentsWithAI/getAppoitnmentCountByStatus.js.map +0 -1
- /package/dist/extensions/elation/actions/findAppointmentsWithAI/{getAppoitnmentCountByStatus.d.ts → getAppointmentCountByStatus.d.ts} +0 -0
@@ -6,7 +6,6 @@ const output_parsers_1 = require("@langchain/core/output_parsers");
|
|
6
6
|
exports.AppointmentsSchema = zod_1.z.array(zod_1.z.coerce.number());
|
7
7
|
exports.parser = output_parsers_1.StructuredOutputParser.fromZodSchema(zod_1.z.object({
|
8
8
|
appointmentIds: exports.AppointmentsSchema,
|
9
|
-
explanation: zod_1.z
|
10
|
-
.string()
|
9
|
+
explanation: zod_1.z.string(),
|
11
10
|
}));
|
12
11
|
//# sourceMappingURL=parser.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../../extensions/elation/lib/findAppointmentsWithLLM/parser.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mEAAuE;AAE1D,QAAA,kBAAkB,GAAG,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;AAE/C,QAAA,MAAM,GAAG,uCAAsB,CAAC,aAAa,CACxD,OAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,0BAAkB;IAClC,WAAW,EAAE,OAAC
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../../extensions/elation/lib/findAppointmentsWithLLM/parser.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mEAAuE;AAE1D,QAAA,kBAAkB,GAAG,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;AAE/C,QAAA,MAAM,GAAG,uCAAsB,CAAC,aAAa,CACxD,OAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,0BAAkB;IAClC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CACH,CAAA"}
|
@@ -1,2 +1,3 @@
|
|
1
1
|
import { ChatPromptTemplate } from '@langchain/core/prompts';
|
2
|
-
export declare const
|
2
|
+
export declare const systemPromptWithDates: 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>;
|
3
|
+
export declare const systemPromptWithoutDates: 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**.\nTranslate the instructions into a set of granular criteria, then go through the list of appointments and evaluate each criteria separately, and in a final pass keep only the appointments that meet all of the criteria.\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- The current date is {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- **Do not exclude appointments based on their scheduled date**.\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- **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.">, any>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.systemPromptWithoutDates = exports.systemPromptWithDates = void 0;
|
4
4
|
const prompts_1 = require("@langchain/core/prompts");
|
5
|
-
exports.
|
5
|
+
exports.systemPromptWithDates = prompts_1.ChatPromptTemplate.fromTemplate(`
|
6
6
|
You are a **thorough and precise** medical assistant.
|
7
7
|
You will receive:
|
8
8
|
1. A list (array) of **appointments** for a single patient (in JSON format).
|
@@ -63,4 +63,57 @@ Your output must be a valid JSON object with the following fields:
|
|
63
63
|
- **Maintain strict consistency** between appointmentIds and explanation.
|
64
64
|
- **Do not contradict yourself**: The explanation must always align with the selected appointments appointmentIds. Double check your explanation against the appointmentIds.
|
65
65
|
`);
|
66
|
+
exports.systemPromptWithoutDates = prompts_1.ChatPromptTemplate.fromTemplate(`
|
67
|
+
You are a **thorough and precise** medical assistant.
|
68
|
+
You will receive:
|
69
|
+
1. A list (array) of **appointments** for a single patient (in JSON format).
|
70
|
+
2. A set of **instructions** (written by a clinician, for a clinician) specifying which types of appointments to find.
|
71
|
+
|
72
|
+
---
|
73
|
+
### **Your Task**
|
74
|
+
Your goal is to carefully analyze the provided instructions and the list of appointments to **identify only those that match the instructions**.
|
75
|
+
Translate the instructions into a set of granular criteria, then go through the list of appointments and evaluate each criteria separately, and in a final pass keep only the appointments that meet all of the criteria.
|
76
|
+
|
77
|
+
- You must be **thorough** in your search but only return results when you are **certain** that they match.
|
78
|
+
- If multiple appointments match, return **all** their IDs.
|
79
|
+
- If no appointments match, return an empty array—this is a valid outcome.
|
80
|
+
- The current date is {currentDateTime}
|
81
|
+
|
82
|
+
---
|
83
|
+
### **Important Instructions**
|
84
|
+
- **Interpret clinically**: Instructions are written by a clinician for a clinician. Understand medical terminology correctly.
|
85
|
+
- 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.
|
86
|
+
- **Only return matches when you are certain**:
|
87
|
+
- Use your expertise for matching but do not assume connections—appointments must explicitly fit the given instructions.
|
88
|
+
- If an instruction is vague or ambiguous, only match appointments if the data supports it directly.
|
89
|
+
- **Do not exclude appointments based on their scheduled date**.
|
90
|
+
- **Only include appointment IDs that exist in the provided input array**.
|
91
|
+
- **Do not fabricate matches**—returning an empty array is preferable to an incorrect match.
|
92
|
+
|
93
|
+
|
94
|
+
----------
|
95
|
+
Patient Appointments:
|
96
|
+
{appointments}
|
97
|
+
----------
|
98
|
+
Instructions:
|
99
|
+
{prompt}
|
100
|
+
|
101
|
+
Your output must be a valid JSON object with the following fields:
|
102
|
+
|
103
|
+
- appointmentIds: An array containing the IDs of appointments that match the given criteria. If no appointments meet the criteria, this array must be empty.
|
104
|
+
- explanation: A concise, human-readable explanation that clearly describes:
|
105
|
+
- How and why the selected appointments match the input criteria.
|
106
|
+
- Why any appointments were excluded, if relevant.
|
107
|
+
- Any edge cases or specific reasoning behind your selection.
|
108
|
+
|
109
|
+
## Critical Requirements
|
110
|
+
### Ensure that the explanation strictly matches the appointmentIds:
|
111
|
+
- If appointmentIds contains **selected appointments**, the explanation must accurately describe **why they were chosen**.
|
112
|
+
- If appointmentIds is **empty**, the explanation must clearly state **why no matches were found**.
|
113
|
+
|
114
|
+
### Be thorough and precise:
|
115
|
+
- Carefully **analyze all appointments** before making a decision.
|
116
|
+
- **Double-check** your reasoning to confirm that **only valid matches** are included.
|
117
|
+
- **Maintain strict consistency** between appointmentIds and explanation.
|
118
|
+
- **Do not contradict yourself**: The explanation must always align with the selected appointments appointmentIds. Double check your explanation against the appointmentIds.`);
|
66
119
|
//# 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,
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../extensions/elation/lib/findAppointmentsWithLLM/prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAE/C,QAAA,qBAAqB,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DpE,CAAC,CAAA;AAEW,QAAA,wBAAwB,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6KAoDqG,CAAC,CAAA"}
|
@@ -4,6 +4,7 @@ exports.getAppointment = void 0;
|
|
4
4
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
5
|
const config_1 = require("./config");
|
6
6
|
const utils_1 = require("../../utils");
|
7
|
+
const extractResourceId_1 = require("../../utils/extractResourceId/extractResourceId");
|
7
8
|
exports.getAppointment = {
|
8
9
|
key: 'getAppointment',
|
9
10
|
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
@@ -13,11 +14,13 @@ exports.getAppointment = {
|
|
13
14
|
previewable: true,
|
14
15
|
dataPoints: config_1.dataPoints,
|
15
16
|
onActivityCreated: async (payload, onComplete, onError) => {
|
17
|
+
var _a;
|
16
18
|
const { fields: input, medplumSdk } = await (0, utils_1.validateAndCreateSdkClient)({
|
17
19
|
fieldsSchema: config_1.FieldsValidationSchema,
|
18
20
|
payload,
|
19
21
|
});
|
20
|
-
const
|
22
|
+
const resourceId = (_a = (0, extractResourceId_1.extractResourceId)(input.appointmentId, 'Appointment')) !== null && _a !== void 0 ? _a : '';
|
23
|
+
const res = await medplumSdk.readResource('Appointment', resourceId);
|
21
24
|
await onComplete({
|
22
25
|
data_points: {
|
23
26
|
appointmentData: JSON.stringify(res),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getAppointment.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getAppointment/getAppointment.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,uCAAwD;
|
1
|
+
{"version":3,"file":"getAppointment.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getAppointment/getAppointment.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,uCAAwD;AACxD,uFAAmF;AAEtE,QAAA,cAAc,GAIvB;IACF,GAAG,EAAE,gBAAgB;IACrB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,2CAA2C;IACxD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;;QACvE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,kCAA0B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,UAAU,GACd,MAAA,IAAA,qCAAiB,EAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,mCAAI,EAAE,CAAA;QAE7D,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;QAEpE,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;aACrC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
package/dist/extensions/medplum/actions/getServiceRequest/__testdata__/ServiceRequest.mock.d.ts
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
export declare const ServiceRequestMock: {
|
2
|
+
resourceType: "ServiceRequest";
|
3
|
+
id: string;
|
4
|
+
intent: "directive";
|
5
|
+
status: "active";
|
6
|
+
priority: "routine";
|
7
|
+
subject: {
|
8
|
+
reference: string;
|
9
|
+
display: string;
|
10
|
+
};
|
11
|
+
requester: {
|
12
|
+
reference: string;
|
13
|
+
display: string;
|
14
|
+
};
|
15
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ServiceRequestMock = void 0;
|
4
|
+
exports.ServiceRequestMock = {
|
5
|
+
resourceType: 'ServiceRequest',
|
6
|
+
id: '01956c66-683b-715c-97ef-e5b930d05ab0',
|
7
|
+
intent: 'directive',
|
8
|
+
status: 'active',
|
9
|
+
priority: 'routine',
|
10
|
+
subject: {
|
11
|
+
reference: 'Patient/01953d3f-780c-719b-bbea-8e40ed73e67a',
|
12
|
+
display: 'Nick Hellemans',
|
13
|
+
},
|
14
|
+
requester: {
|
15
|
+
reference: 'Practitioner/c0eee7ed-ce30-456b-a0ba-eddeaaf9753a',
|
16
|
+
display: 'Thomas Vande Casteele',
|
17
|
+
},
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=ServiceRequest.mock.js.map
|
package/dist/extensions/medplum/actions/getServiceRequest/__testdata__/ServiceRequest.mock.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ServiceRequest.mock.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getServiceRequest/__testdata__/ServiceRequest.mock.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAG;IAChC,YAAY,EAAE,gBAAgB;IAC9B,EAAE,EAAE,sCAAsC;IAC1C,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE;QACP,SAAS,EAAE,8CAA8C;QACzD,OAAO,EAAE,gBAAgB;KAC1B;IACD,SAAS,EAAE;QACT,SAAS,EAAE,mDAAmD;QAC9D,OAAO,EAAE,uBAAuB;KACjC;CACuB,CAAA"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export declare const dataPoints: {
|
2
|
+
serviceRequestResource: {
|
3
|
+
key: string;
|
4
|
+
valueType: "json";
|
5
|
+
};
|
6
|
+
status: {
|
7
|
+
key: string;
|
8
|
+
valueType: "string";
|
9
|
+
};
|
10
|
+
intent: {
|
11
|
+
key: string;
|
12
|
+
valueType: "string";
|
13
|
+
};
|
14
|
+
priority: {
|
15
|
+
key: string;
|
16
|
+
valueType: "string";
|
17
|
+
};
|
18
|
+
patientId: {
|
19
|
+
key: string;
|
20
|
+
valueType: "string";
|
21
|
+
};
|
22
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = void 0;
|
4
|
+
exports.dataPoints = {
|
5
|
+
serviceRequestResource: {
|
6
|
+
key: 'serviceRequestResource',
|
7
|
+
valueType: 'json',
|
8
|
+
},
|
9
|
+
status: {
|
10
|
+
key: 'status',
|
11
|
+
valueType: 'string',
|
12
|
+
},
|
13
|
+
intent: {
|
14
|
+
key: 'intent',
|
15
|
+
valueType: 'string',
|
16
|
+
},
|
17
|
+
priority: {
|
18
|
+
key: 'priority',
|
19
|
+
valueType: 'string',
|
20
|
+
},
|
21
|
+
patientId: {
|
22
|
+
key: 'patientId',
|
23
|
+
valueType: 'string',
|
24
|
+
},
|
25
|
+
};
|
26
|
+
//# sourceMappingURL=dataPoints.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getServiceRequest/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,sBAAsB,EAAE;QACtB,GAAG,EAAE,wBAAwB;QAC7B,SAAS,EAAE,MAAM;KAClB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,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
|
+
resourceId: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
13
|
+
resourceId: z.ZodString;
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
15
|
+
resourceId: string;
|
16
|
+
}, {
|
17
|
+
resourceId: string;
|
18
|
+
}>;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.fields = {
|
7
|
+
resourceId: {
|
8
|
+
id: 'resourceId',
|
9
|
+
label: 'Resource ID',
|
10
|
+
description: 'The resource ID of the ServiceRequest in Medplum',
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
12
|
+
required: true,
|
13
|
+
},
|
14
|
+
};
|
15
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
16
|
+
resourceId: zod_1.z.string().nonempty({
|
17
|
+
message: 'Missing "Resource ID"',
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getServiceRequest/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,kDAAkD;QAC/D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;QAC9B,OAAO,EAAE,uBAAuB;KACjC,CAAC;CAC+C,CAAC,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./dataPoints"), exports);
|
18
|
+
__exportStar(require("./fields"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getServiceRequest/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getServiceRequest = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const config_1 = require("./config");
|
6
|
+
const utils_1 = require("../../utils");
|
7
|
+
const extractResourceId_1 = require("../../utils/extractResourceId/extractResourceId");
|
8
|
+
exports.getServiceRequest = {
|
9
|
+
key: 'getServiceRequest',
|
10
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
11
|
+
title: 'Get service request',
|
12
|
+
description: 'Retrieve service request details from Medplum',
|
13
|
+
fields: config_1.fields,
|
14
|
+
previewable: true,
|
15
|
+
dataPoints: config_1.dataPoints,
|
16
|
+
onEvent: async ({ payload, onComplete, onError }) => {
|
17
|
+
var _a;
|
18
|
+
const { fields: input, medplumSdk } = await (0, utils_1.validateAndCreateSdkClient)({
|
19
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
20
|
+
payload,
|
21
|
+
});
|
22
|
+
const resourceId = (_a = (0, extractResourceId_1.extractResourceId)(input.resourceId, 'ServiceRequest')) !== null && _a !== void 0 ? _a : '';
|
23
|
+
const res = await medplumSdk.readResource('ServiceRequest', resourceId);
|
24
|
+
const getPatientId = () => {
|
25
|
+
var _a, _b;
|
26
|
+
const subjectReference = (_b = (_a = res.subject) === null || _a === void 0 ? void 0 : _a.reference) !== null && _b !== void 0 ? _b : '';
|
27
|
+
if (subjectReference.startsWith('Patient')) {
|
28
|
+
return (0, extractResourceId_1.extractResourceId)(subjectReference, 'Patient');
|
29
|
+
}
|
30
|
+
return null;
|
31
|
+
};
|
32
|
+
await onComplete({
|
33
|
+
data_points: {
|
34
|
+
serviceRequestResource: JSON.stringify(res),
|
35
|
+
status: res.status,
|
36
|
+
intent: res.intent,
|
37
|
+
priority: res.priority,
|
38
|
+
patientId: getPatientId(),
|
39
|
+
},
|
40
|
+
});
|
41
|
+
},
|
42
|
+
};
|
43
|
+
//# sourceMappingURL=getServiceRequest.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getServiceRequest.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getServiceRequest/getServiceRequest.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,uCAAwD;AACxD,uFAAmF;AAEtE,QAAA,iBAAiB,GAI1B;IACF,GAAG,EAAE,mBAAmB;IACxB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,+CAA+C;IAC5D,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;;QACjE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,kCAA0B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,UAAU,GACd,MAAA,IAAA,qCAAiB,EAAC,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,mCAAI,EAAE,CAAA;QAE7D,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;QAEvE,MAAM,YAAY,GAAG,GAAkB,EAAE;;YACvC,MAAM,gBAAgB,GAAG,MAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,SAAS,mCAAI,EAAE,CAAA;YAErD,IAAI,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC3C,OAAO,IAAA,qCAAiB,EAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;YACvD,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QAED,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;gBAC3C,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,SAAS,EAAE,YAAY,EAAE;aAC1B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './getServiceRequest';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./getServiceRequest"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getServiceRequest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAmC"}
|
@@ -7,3 +7,4 @@ export { createServiceRequest } from './createServiceRequest';
|
|
7
7
|
export { submitQuestionnaireResponse } from './submitQuestionnaireResponse';
|
8
8
|
export { createCalculationObservation } from './createCalculationObservation';
|
9
9
|
export { addSideEffect } from './addSideEffect';
|
10
|
+
export { getServiceRequest } from './getServiceRequest';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addSideEffect = exports.createCalculationObservation = exports.submitQuestionnaireResponse = exports.createServiceRequest = exports.createTask = exports.executeBot = exports.getAppointment = exports.createPatient = exports.getPatient = void 0;
|
3
|
+
exports.getServiceRequest = exports.addSideEffect = exports.createCalculationObservation = exports.submitQuestionnaireResponse = exports.createServiceRequest = exports.createTask = exports.executeBot = exports.getAppointment = exports.createPatient = exports.getPatient = void 0;
|
4
4
|
var getPatient_1 = require("./getPatient");
|
5
5
|
Object.defineProperty(exports, "getPatient", { enumerable: true, get: function () { return getPatient_1.getPatient; } });
|
6
6
|
var createPatient_1 = require("./createPatient");
|
@@ -19,4 +19,6 @@ var createCalculationObservation_1 = require("./createCalculationObservation");
|
|
19
19
|
Object.defineProperty(exports, "createCalculationObservation", { enumerable: true, get: function () { return createCalculationObservation_1.createCalculationObservation; } });
|
20
20
|
var addSideEffect_1 = require("./addSideEffect");
|
21
21
|
Object.defineProperty(exports, "addSideEffect", { enumerable: true, get: function () { return addSideEffect_1.addSideEffect; } });
|
22
|
+
var getServiceRequest_1 = require("./getServiceRequest");
|
23
|
+
Object.defineProperty(exports, "getServiceRequest", { enumerable: true, get: function () { return getServiceRequest_1.getServiceRequest; } });
|
22
24
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/medplum/actions/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA;AACrC,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/medplum/actions/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA;AACrC,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@awell-health/awell-extensions",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.207",
|
4
4
|
"packageManager": "yarn@4.5.3",
|
5
5
|
"main": "dist/src/index.js",
|
6
6
|
"repository": {
|
@@ -44,6 +44,7 @@
|
|
44
44
|
"@types/crypto-js": "^4.2.2",
|
45
45
|
"@types/docusign-esign": "^5.19.0",
|
46
46
|
"@types/express": "^4.17.19",
|
47
|
+
"@types/faker": "^6",
|
47
48
|
"@types/jest": "^29.5.14",
|
48
49
|
"@types/jsdom": "^21.1.7",
|
49
50
|
"@types/jsonpath": "^0.2.4",
|
@@ -67,6 +68,7 @@
|
|
67
68
|
"eslint-plugin-import": "^2.28.1",
|
68
69
|
"eslint-plugin-n": "^15.6.1",
|
69
70
|
"eslint-plugin-promise": "^6.1.1",
|
71
|
+
"faker": "^6.6.6",
|
70
72
|
"husky": "^9.1.7",
|
71
73
|
"jest": "29.7.0",
|
72
74
|
"jest-fetch-mock": "^3.0.3",
|
@@ -1,41 +0,0 @@
|
|
1
|
-
export declare const appointmentsMock: {
|
2
|
-
id: number;
|
3
|
-
scheduled_date: string;
|
4
|
-
duration: number;
|
5
|
-
billing_details: null;
|
6
|
-
payment: null;
|
7
|
-
time_slot_type: string;
|
8
|
-
time_slot_status: null;
|
9
|
-
reason: string;
|
10
|
-
mode: string;
|
11
|
-
description: string;
|
12
|
-
status: {
|
13
|
-
status: string;
|
14
|
-
room: null;
|
15
|
-
status_date: string;
|
16
|
-
status_detail: null;
|
17
|
-
};
|
18
|
-
patient: number;
|
19
|
-
patient_forms: {
|
20
|
-
patient_can_receive_forms: boolean;
|
21
|
-
anonymous_url: string;
|
22
|
-
overrides: never[];
|
23
|
-
short_code: null;
|
24
|
-
statuses: {
|
25
|
-
id: number;
|
26
|
-
name: string;
|
27
|
-
status: string;
|
28
|
-
}[];
|
29
|
-
hours_prior: number;
|
30
|
-
};
|
31
|
-
physician: number;
|
32
|
-
practice: number;
|
33
|
-
instructions: string;
|
34
|
-
recurring_event_schedule: null;
|
35
|
-
metadata: null;
|
36
|
-
created_date: string;
|
37
|
-
last_modified_date: string;
|
38
|
-
deleted_date: null;
|
39
|
-
service_location: null;
|
40
|
-
telehealth_details: string;
|
41
|
-
}[];
|
package/dist/extensions/elation/actions/findAppointmentsWithAI/__testdata__/GetAppointments.mock.js
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.appointmentsMock = void 0;
|
4
|
-
const date_fns_1 = require("date-fns");
|
5
|
-
exports.appointmentsMock = [
|
6
|
-
{
|
7
|
-
id: 123,
|
8
|
-
scheduled_date: (0, date_fns_1.addHours)(new Date(), 12).toISOString(),
|
9
|
-
duration: 60,
|
10
|
-
billing_details: null,
|
11
|
-
payment: null,
|
12
|
-
time_slot_type: 'appointment',
|
13
|
-
time_slot_status: null,
|
14
|
-
reason: 'PCP: Est. Patient Office',
|
15
|
-
mode: 'VIDEO',
|
16
|
-
description: '',
|
17
|
-
status: {
|
18
|
-
status: 'Scheduled',
|
19
|
-
room: null,
|
20
|
-
status_date: '2023-07-12T20:44:22Z',
|
21
|
-
status_detail: null,
|
22
|
-
},
|
23
|
-
patient: 12345,
|
24
|
-
patient_forms: {
|
25
|
-
patient_can_receive_forms: true,
|
26
|
-
anonymous_url: 'https://sandbox.elationemr.com/appointments/141701667029082/patient-forms/?key=642301d3930ac1e4d052ff65c093c5f1da1697e6b861a18f43a042b5afca50a1',
|
27
|
-
overrides: [],
|
28
|
-
short_code: null,
|
29
|
-
statuses: [
|
30
|
-
{
|
31
|
-
id: 316,
|
32
|
-
name: 'COVID-19 Screening Form',
|
33
|
-
status: 'incomplete',
|
34
|
-
},
|
35
|
-
],
|
36
|
-
hours_prior: 0,
|
37
|
-
},
|
38
|
-
physician: 141114870071298,
|
39
|
-
practice: 141114865745924,
|
40
|
-
instructions: '',
|
41
|
-
recurring_event_schedule: null,
|
42
|
-
metadata: null,
|
43
|
-
created_date: '2023-07-12T20:44:22Z',
|
44
|
-
last_modified_date: '2023-07-12T20:44:22Z',
|
45
|
-
deleted_date: null,
|
46
|
-
service_location: null,
|
47
|
-
telehealth_details: '',
|
48
|
-
},
|
49
|
-
{
|
50
|
-
id: 456,
|
51
|
-
scheduled_date: (0, date_fns_1.addHours)(new Date(), 25).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
|
-
//# sourceMappingURL=GetAppointments.mock.js.map
|
@@ -1 +0,0 @@
|
|
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/findAppointmentsWithAI/getAppoitnmentCountByStatus.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getAppoitnmentCountByStatus.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/findAppointmentsWithAI/getAppoitnmentCountByStatus.ts"],"names":[],"mappings":";;;AAGA,sEAA6D;AAEtD,MAAM,4BAA4B,GAAG,CACxC,YAAmC,EACX,EAAE;IAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,4BAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;QACrF,MAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAC7B,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAC,MAAM,MAAK,MAAM,CACvD,CAAC,MAAM,CAAA;QACR,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACZ,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;QACnB,CAAC;QACD,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC,CAAA;AAZU,QAAA,4BAA4B,gCAYtC"}
|