@awell-health/awell-extensions 1.0.81 → 1.0.84
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/webhooks/index.d.ts +1 -1
- package/dist/extensions/elation/webhooks/index.js +2 -2
- package/dist/extensions/elation/webhooks/index.js.map +1 -1
- package/dist/extensions/elation/webhooks/{onCreatePatient.d.ts → patientCreatedOrUpdated.d.ts} +2 -2
- package/dist/extensions/elation/webhooks/{onCreatePatient.js → patientCreatedOrUpdated.js} +9 -5
- package/dist/extensions/elation/webhooks/patientCreatedOrUpdated.js.map +1 -0
- package/dist/extensions/healthie/actions/createChartingNote.d.ts +7 -0
- package/dist/extensions/healthie/actions/createChartingNote.js +9 -1
- package/dist/extensions/healthie/actions/createChartingNote.js.map +1 -1
- package/dist/extensions/healthie/actions/getPatient.d.ts +4 -0
- package/dist/extensions/healthie/actions/getPatient.js +9 -3
- package/dist/extensions/healthie/actions/getPatient.js.map +1 -1
- package/dist/extensions/healthie/actions/index.d.ts +8 -1
- package/dist/extensions/healthie/helpers.d.ts +1 -0
- package/dist/extensions/healthie/helpers.js +18 -0
- package/dist/extensions/healthie/helpers.js.map +1 -0
- package/dist/extensions/markdown.json +2 -2
- package/package.json +1 -1
- package/dist/extensions/elation/webhooks/onCreatePatient.js.map +0 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
export type { OnCreatePatient } from './
|
1
|
+
export type { OnCreatePatient } from './patientCreatedOrUpdated';
|
2
2
|
export declare const webhooks: import("@awell-health/extensions-core").Webhook<"patientId", import("../types/subscription").SubscriptionEvent>[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.webhooks = void 0;
|
4
|
-
const
|
5
|
-
exports.webhooks = [
|
4
|
+
const patientCreatedOrUpdated_1 = require("./patientCreatedOrUpdated");
|
5
|
+
exports.webhooks = [patientCreatedOrUpdated_1.patientCreatedOrUpdated];
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/index.ts"],"names":[],"mappings":";;;AAAA,uEAAmE;AAGtD,QAAA,QAAQ,GAAG,CAAC,iDAAuB,CAAC,CAAA"}
|
package/dist/extensions/elation/webhooks/{onCreatePatient.d.ts → patientCreatedOrUpdated.d.ts}
RENAMED
@@ -6,6 +6,6 @@ declare const dataPoints: {
|
|
6
6
|
valueType: "string";
|
7
7
|
};
|
8
8
|
};
|
9
|
-
export declare const
|
10
|
-
export type OnCreatePatient = typeof
|
9
|
+
export declare const patientCreatedOrUpdated: Webhook<keyof typeof dataPoints, SubscriptionEvent>;
|
10
|
+
export type OnCreatePatient = typeof patientCreatedOrUpdated;
|
11
11
|
export {};
|
@@ -1,17 +1,21 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.patientCreatedOrUpdated = void 0;
|
4
4
|
const dataPoints = {
|
5
5
|
patientId: {
|
6
6
|
key: 'patientId',
|
7
7
|
valueType: 'string',
|
8
8
|
},
|
9
9
|
};
|
10
|
-
exports.
|
11
|
-
key: '
|
10
|
+
exports.patientCreatedOrUpdated = {
|
11
|
+
key: 'patientCreatedOrUpdated',
|
12
12
|
dataPoints,
|
13
13
|
onWebhookReceived: async ({ payload, settings }, onSuccess, onError) => {
|
14
|
-
const { data, resource } = payload;
|
14
|
+
const { data, resource, action } = payload;
|
15
|
+
// skip non 'saved' actions for that webhook
|
16
|
+
if (action !== 'saved') {
|
17
|
+
return;
|
18
|
+
}
|
15
19
|
if (resource !== 'patients') {
|
16
20
|
await onError({
|
17
21
|
response: {
|
@@ -27,4 +31,4 @@ exports.onCreatePatient = {
|
|
27
31
|
}
|
28
32
|
},
|
29
33
|
};
|
30
|
-
//# sourceMappingURL=
|
34
|
+
//# sourceMappingURL=patientCreatedOrUpdated.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"patientCreatedOrUpdated.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/patientCreatedOrUpdated.ts"],"names":[],"mappings":";;;AAMA,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,uBAAuB,GAGhC;IACF,GAAG,EAAE,yBAAyB;IAC9B,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;QAE1C,4CAA4C;QAC5C,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,OAAM;SACP;QAED,IAAI,QAAQ,KAAK,UAAU,EAAE;YAC3B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,2BAA2B;iBACrC;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;aAC5C,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
@@ -22,6 +22,13 @@ declare const fields: {
|
|
22
22
|
type: FieldType.HTML;
|
23
23
|
required: true;
|
24
24
|
};
|
25
|
+
marked_locked: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
description: string;
|
29
|
+
type: FieldType.BOOLEAN;
|
30
|
+
required: false;
|
31
|
+
};
|
25
32
|
};
|
26
33
|
export declare const createChartingNote: Action<typeof fields, typeof settings>;
|
27
34
|
export {};
|
@@ -29,6 +29,13 @@ const fields = {
|
|
29
29
|
type: extensions_core_1.FieldType.HTML,
|
30
30
|
required: true,
|
31
31
|
},
|
32
|
+
marked_locked: {
|
33
|
+
id: 'marked_locked',
|
34
|
+
label: 'Mark as locked?',
|
35
|
+
description: 'This field allows you to mark the content as locked.',
|
36
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
37
|
+
required: false,
|
38
|
+
},
|
32
39
|
};
|
33
40
|
exports.createChartingNote = {
|
34
41
|
key: 'createChartingNote',
|
@@ -40,7 +47,7 @@ exports.createChartingNote = {
|
|
40
47
|
onActivityCreated: async (payload, onComplete, onError) => {
|
41
48
|
var _a;
|
42
49
|
const { fields, settings } = payload;
|
43
|
-
const { healthie_patient_id, form_id, note_content } = fields;
|
50
|
+
const { healthie_patient_id, form_id, note_content, marked_locked } = fields;
|
44
51
|
try {
|
45
52
|
if ((0, lodash_1.isNil)(healthie_patient_id) || (0, lodash_1.isNil)(form_id) || (0, lodash_1.isNil)(note_content)) {
|
46
53
|
await onError({
|
@@ -124,6 +131,7 @@ exports.createChartingNote = {
|
|
124
131
|
answer: note_content,
|
125
132
|
},
|
126
133
|
],
|
134
|
+
marked_locked: marked_locked !== null && marked_locked !== void 0 ? marked_locked : false,
|
127
135
|
},
|
128
136
|
});
|
129
137
|
await onComplete();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createChartingNote.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/createChartingNote.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAC9B,mEAIsC;AACtC,mEAAwD;AACxD,oCAAmC;AACnC,oDAAmD;AAEnD,sCAAqE;AAErE,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,qEAAqE;QACvE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EACT,wEAAwE;QAC1E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,kBAAkB,GAA2C;IACxE,GAAG,EAAE,oBAAoB;IACzB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,qCAAqC;IAClD,MAAM;IACN,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;;QACvE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;QACpC,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"createChartingNote.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/createChartingNote.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAC9B,mEAIsC;AACtC,mEAAwD;AACxD,oCAAmC;AACnC,oDAAmD;AAEnD,sCAAqE;AAErE,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,qEAAqE;QACvE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EACT,wEAAwE;QAC1E,IAAI,EAAE,2BAAS,CAAC,MAAM;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AM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,gCAAgC,EAAE;4BAC9C,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
|
@@ -6,6 +6,7 @@ const extensions_core_2 = require("@awell-health/extensions-core");
|
|
6
6
|
const errors_1 = require("../errors");
|
7
7
|
const sdk_1 = require("../gql/sdk");
|
8
8
|
const graphqlClient_1 = require("../graphqlClient");
|
9
|
+
const helpers_1 = require("../helpers");
|
9
10
|
const getPatient_zod_1 = require("../validation/getPatient.zod");
|
10
11
|
const fields = {
|
11
12
|
patientId: {
|
@@ -32,6 +33,10 @@ const dataPoints = {
|
|
32
33
|
key: 'gender',
|
33
34
|
valueType: 'string',
|
34
35
|
},
|
36
|
+
isoSex: {
|
37
|
+
key: 'isoSex',
|
38
|
+
valueType: 'number',
|
39
|
+
},
|
35
40
|
email: {
|
36
41
|
key: 'email',
|
37
42
|
valueType: 'string',
|
@@ -58,7 +63,7 @@ exports.getPatient = {
|
|
58
63
|
dataPoints,
|
59
64
|
previewable: true,
|
60
65
|
onActivityCreated: async (payload, onComplete, onError) => {
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
62
67
|
const { fields, settings } = payload;
|
63
68
|
const { patientId } = fields;
|
64
69
|
try {
|
@@ -74,9 +79,10 @@ exports.getPatient = {
|
|
74
79
|
dob,
|
75
80
|
email: (_c = data.user) === null || _c === void 0 ? void 0 : _c.email,
|
76
81
|
gender: (_d = data.user) === null || _d === void 0 ? void 0 : _d.gender,
|
82
|
+
isoSex: String((0, helpers_1.mapHealthieGenderToIsoSex)((_e = data.user) === null || _e === void 0 ? void 0 : _e.gender)),
|
77
83
|
phoneNumber,
|
78
|
-
groupName: (
|
79
|
-
primaryProviderId: (
|
84
|
+
groupName: (_g = (_f = data.user) === null || _f === void 0 ? void 0 : _f.user_group) === null || _g === void 0 ? void 0 : _g.name,
|
85
|
+
primaryProviderId: (_h = data.user) === null || _h === void 0 ? void 0 : _h.dietitian_id,
|
80
86
|
},
|
81
87
|
events,
|
82
88
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getPatient.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/getPatient.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AACtC,mEAAwD;AACxD,sCAAqE;AACrE,oCAAmC;AACnC,oDAAmD;
|
1
|
+
{"version":3,"file":"getPatient.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/getPatient.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AACtC,mEAAwD;AACxD,sCAAqE;AACrE,oCAAmC;AACnC,oDAAmD;AACnD,wCAAsD;AAEtD,iEAAiE;AAEjE,MAAM,MAAM,GAAG;IACb,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,+DAA+D;QACjE,IAAI,EAAE,2BAAS,CAAC,MAAM;KACvB;CAC8B,CAAA;AAEjC,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,SAAS,EAAE,QAAQ;KACpB;IACD,GAAG,EAAE;QACH,GAAG,EAAE,KAAK;QACV,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,KAAK,EAAE;QACL,GAAG,EAAE,OAAO;QACZ,SAAS,EAAE,QAAQ;K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 -169,7 +169,7 @@ export declare const actions: {
|
|
169
169
|
required: true;
|
170
170
|
description: string;
|
171
171
|
};
|
172
|
-
}, "email" | "firstName" | "lastName" | "gender" | "dob" | "phoneNumber" | "primaryProviderId" | "groupName", never>;
|
172
|
+
}, "email" | "firstName" | "lastName" | "gender" | "dob" | "isoSex" | "phoneNumber" | "primaryProviderId" | "groupName", never>;
|
173
173
|
sendChatMessage: import("@awell-health/extensions-core").Action<{
|
174
174
|
healthie_patient_id: {
|
175
175
|
id: string;
|
@@ -470,6 +470,13 @@ export declare const actions: {
|
|
470
470
|
type: import("@awell-health/extensions-core").FieldType.HTML;
|
471
471
|
required: true;
|
472
472
|
};
|
473
|
+
marked_locked: {
|
474
|
+
id: string;
|
475
|
+
label: string;
|
476
|
+
description: string;
|
477
|
+
type: import("@awell-health/extensions-core").FieldType.BOOLEAN;
|
478
|
+
required: false;
|
479
|
+
};
|
473
480
|
}, {
|
474
481
|
apiUrl: {
|
475
482
|
key: string;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const mapHealthieGenderToIsoSex: (healthieGender: string | undefined | null) => 0 | 1 | 2;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.mapHealthieGenderToIsoSex = void 0;
|
4
|
+
const mapHealthieGenderToIsoSex = (healthieGender) => {
|
5
|
+
const lowercaseGender = healthieGender === null || healthieGender === void 0 ? void 0 : healthieGender.toLowerCase();
|
6
|
+
switch (lowercaseGender) {
|
7
|
+
case 'f':
|
8
|
+
case 'female':
|
9
|
+
return 2;
|
10
|
+
case 'm':
|
11
|
+
case 'male':
|
12
|
+
return 1;
|
13
|
+
default:
|
14
|
+
return 0;
|
15
|
+
}
|
16
|
+
};
|
17
|
+
exports.mapHealthieGenderToIsoSex = mapHealthieGenderToIsoSex;
|
18
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../extensions/healthie/helpers.ts"],"names":[],"mappings":";;;AAAO,MAAM,yBAAyB,GAAG,CACvC,cAAyC,EAC9B,EAAE;IACb,MAAM,eAAe,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAA;IACrD,QAAQ,eAAe,EAAE;QACvB,KAAK,GAAG,CAAC;QACT,KAAK,QAAQ;YACX,OAAO,CAAC,CAAA;QACV,KAAK,GAAG,CAAC;QACT,KAAK,MAAM;YACT,OAAO,CAAC,CAAA;QACV;YACE,OAAO,CAAC,CAAA;KACX;AACH,CAAC,CAAA;AAdY,QAAA,yBAAyB,6BAcrC"}
|
@@ -33,7 +33,7 @@
|
|
33
33
|
},
|
34
34
|
"elation": {
|
35
35
|
"readme": "---\ntitle: Elation\ndescription: Elation is a cloud-based health record system designed for healthcare providers, clinics, and medical practices.\n---\n# Elation\n\nElation is a cloud-based health record system designed for healthcare providers, clinics, and medical practices. It offers a range of features including patient scheduling, charting, e-prescribing, billing, and telemedicine. Overall, Elation is designed to streamline the workflow of medical practices, improve patient care, and increase efficiency.\n\n## Extension settings\n\nIn order to use this extension you will need to provide the extension with the following settings:\n\n- Base URL / endpoint URL of the API\n- Authorization URL\n- Client ID for OAuth2 Password authentication\n- Client Secret for OAuth2 Password authentication\n- API Username for OAuth2 Password authentication\n- API Password for OAuth2 Password authentication\n\n## Actions\n\nThe following actions are supported with Elation today:\n\n### Create Patient\n\nCreate a patient in the EHR. **Does not look for duplicates**\n\nRequired fields include:\n- First Name\n- Last Name\n- Date of Birth (YYYY-MM-DD)\n- Sex (Male, Female, Other, Unknown)\n- Primary Physician (the ID of the physician, which you will be able to retrieve using the [Find Physicians](https://docs.elationhealth.com/reference/find-physicians) API call, or by using the `Find Physician` action)\n- Caregiver Practice (the ID of the practice. Again, you can find using the same API call or action as listed above)\n\nThere are also a number of optional fields.\n\n**NOTE: We currently do not support nested objects, so the entire patient object supported by elation's API is not yet exposed**. Please reach out to us if you're looking to add a particular field or set of fields.\n\n### Get Patient\n\nUsing a patient identifier, get a patient object that has all datapoints listed above in `Create Patient`.\n\n**NOTE: Because we don't yet support nested objects and arrays in extensions, we expose specifically the `mobile_phone` field, which is a search for the patient's mobile phone specifically.**\n\n### Update Patient\n\nUpdate a patient using any fields available in create patient.\n\nOddly enough, the following fields are always required by Elation:\n- first_name\n- last_name\n- dob\n- sex\n- primary_physician\n- caregiver_practice\n\n\n\n### Create Appointment\n\nCreate a patient appointment in your EHR for a given practice and physician.\n\nCreating an appointment requires a few strings to be well-formulated:\n- `Scheduled date` must be a datetime string (ISO-8601). For example, January 1, 2023 at noon, Pacific Time (-8 hours) would be shown as such: `2023-01-01T12:00:00.000-08:00`\n- `Reason` must not be free text. This value comes from the following list of appointment types (`Follow-Up`, `Office Visit`, `Physical Exam`, etc.):\n\n- `Patient` is the patient ID.\n- `Physician` is the physician ID (see `Find Physician`)\n- `Practice` is the practice ID (again, see `Find Physician`)\n\nYou can also include a duration (default to 15 minutes, or whatever has been set in your EHR)\n\n### Get Appointment\n\nGet an appointment using an appointment ID. View all of the fields supported by the API.\n\n### Create Non-Visit Note\n\nThe non-visit note is a special kind of note that, as the name suggests, is not associated with a visit. These notes, in their simplest form, provide a chronological account of information about the patient.\n\n### Update Non-Visit Note\n\nUpdates the non-visit note identified by an ID. Only ID is required by default, however editing any of `text`, `author` or `category` requires `Bullet ID` and both `text` and `author` to be provided.\n\n### Delete Non-Visit Note\n\nDeletes the non-visit note identified by an ID.\n\n### Get Non-Visit Note\n\nGets the non-visit note identified by an ID. Fields are saved as data points:\n- `authorId`\n- `text`\n- `chartDate`\n- `documentDate`\n- `patientId`\n- `practiceId`\n- `tags` (comma-separated list)",
|
36
|
-
"changelog": "# Elation Changelog\n\n## 2023-
|
36
|
+
"changelog": "# Elation Changelog\n\n## September 4, 2023\n\n- rename `onCreatePatient` webhook to `patientCreatedOrUpdated`\n- filter non `saved` actions for this webhook\n\n## August 21, 2023\n\n- make non-visit note text a large input (`StringType.TEXT`)\n"
|
37
37
|
},
|
38
38
|
"formsort": {
|
39
39
|
"readme": "---\ntitle: Formsort\ndescription: Formsort is a fully-managed form-building platform.\n---\n# Formsort\n\nFormsort is a fully-managed form-building platform. Team can use the online studio (a specialized content management system for forms) to create form content, modify styles, and configure integrations.\n\nFormsort hosts your fully-branded forms, either on one of your subdomains or embedded in a page on your site. When responders submit answers, Formsort sends the answers to a destination of your liking directly. Formsort doesn't store the responder's answers. \n\n## Flow settings\n\nIn order for the flows to work well with Awell care flows, make sure your flow settings are set as follows:\n\n- There should be no redirects\n- \"Start each session as a new responder\" should be checked\n- \"Enable URL navigation\" should be disabled\n- \"Enable restart once flow completed\" should be disabled\n- \"Enable close once flow completed\" should be disabled\n\n## Custom Actions\n\n### Complete flow\n\nLet a stakeholder complete a Formsort flow from within Awell Hosted Pages.\n\n**Limitations:**\nCurrently data from the flow is not ingested into Awell yet and cannot be used in your care flow as data points.\n",
|
@@ -41,7 +41,7 @@
|
|
41
41
|
},
|
42
42
|
"healthie": {
|
43
43
|
"readme": "---\ntitle: Healthie\ndescription: Healthie offers infrastructure for next generation digital health organizations that provide virtual-first care.\n---\n# What is Healthie?\n\nHealthie offers infrastructure for next generation digital health organizations that provide virtual-first care. Healthie’s API-first and fully brandable suite of solutions (Scheduling, EMR, Client Engagement) enables healthcare builders to launch and scale best-in-class experiences for their members. Healthie also offers a built-in marketplace of business and clinical integrations used by our organizations.\n\nTo learn more, visit [www.gethealthie.com](www.gethealthie.com).\n\n## Healthie x Awell\n\nWith this extension, organizations are able to build clinical workflows in Awell’s low-code platform and easily integrate them into Healthie. By doing so, Healthie’s customers can automate routine clinical tasks, synchronize data between systems and drive seamless coordination between care team and patients.\n\nBy combining Healthie’s web and mobile platform with our clinical workflows, clinicians will be able to provide the right care, at the right time for the right patient.\n\n# Extension settings\n\nIn order to set up this extension, **you will need to provide a Healthie API key and Api url**. You can obtain an API key via the Healthie portal (`Settings > Developer > API keys`). You can obtain API url in the [DOCUMENTATION](https://docs.gethealthie.com/docs/#environments) in `Environments` section.\n\nPlease note that the extension automatically prefixes the API key with `Basic ` so please provide your raw API key without `Basic ` in front.\n\n# Custom Actions\n\n## Send chat message action\n\nSends a chat message to a patient in name of the provided provider ID. Will create a new conversation if no active conversation between patient and provider exists or sends a message in an existing conversation if there is an active conversation between the two.\n\n## Create patient\n\nCreates a new patient according to the passed fields. After completion the `healthiePatientId` will be exposed as a data point in the care flow.\n\n## Update patient\n\nUpdates a specific patient (defined by the provided `id`) according to the passed fields.\n\n## Apply tag to patient\n\nAdds a tag (existing one, identified by an `id`) to a patient. Although the Healthie API call allows assigning multiple tags per API call, for simplicity of the logic this action can only take one tag as input. Assigning multiple tags is possible by adding multiple actions.\n\n## Remove tag from patient\n\nRemoves a tag (identified by an `id`) from a patient.\n\n## Create charting note\n\nCreates a charting note with the provided `note_content`.\n\n**Prerequisites and set-up:**\n1. The form specified by the `form_id` exists in Healthie.\n2. The form specified by the `form_id` is a charting form (click \"Convert to charting form\" in the form options).\n3. The form contains at least one question of type `textarea` (long text answer). The action will write the content of the charting note in the first question of that type it finds in the form.\n\n## Send form completion request\n\nSend a form completion request to the patient. You will need the Healthie patient ID and the ID of the form you would like the patient to complete.\n\nAlthough the Healthie API call allows sending form completion requests to multiple users per API call (see recipient_ids in their docs), we decided that every action only sends one form completion request. This heavily simplifies the logic and better fits our domain model (1-to-1 relationship between patient and pathway). If a user would like to send multiple form completion requests, they you can just add multiple actions.\n\n## Archive patient\n\nArchives a patient with a given `id`.\n\n## Create location\n\nCreates a location. ID of the created location is stored as `locationId` data point.\n\n## Close chat conversation\n\nCloses chat conversation with a given `id` as a provider with the given `provider_id`.\n\n## Delete appointment\n\nDeletes an appointment with a given `id`.\n\n## Cancel appointment\n\nCancels an appointment with a given `id`.\n",
|
44
|
-
"changelog": "# Healthie changelog\n\n## May 2023\n\n- New webhooks added: `appliedTagCreated`, `appliedTagDeleted`, `appointmentDeleted`, `appointmentUpdated`, `formAnswerGroupCreated`, `formAnswerGroupDeleted`, `formAnswerGroupLocked`, `formAnswerGroupSigned`, `labOrderCreated`, `labOrderUpdated`, `messageCreated`, `messageDeleted`, `metricEntryCreated`, `metricEntryDeleted`, `metricEntryUpdated`, `patientUpdated`, `requestFormCompletionCreated`, `requestFormCompletionDeleted`, `requestFormCompletionUpdated`, `taskCreated`, `taskDeleted`, `taskUpdated`\n\n## April 2023\n\n- Create task action: now also adds support for reminders.\n"
|
44
|
+
"changelog": "# Healthie changelog\n\n## September 5, 2023\n\n- add Healthie gender to Sex in iso format mapper in `getPatient`\n\n## May 2023\n\n- New webhooks added: `appliedTagCreated`, `appliedTagDeleted`, `appointmentDeleted`, `appointmentUpdated`, `formAnswerGroupCreated`, `formAnswerGroupDeleted`, `formAnswerGroupLocked`, `formAnswerGroupSigned`, `labOrderCreated`, `labOrderUpdated`, `messageCreated`, `messageDeleted`, `metricEntryCreated`, `metricEntryDeleted`, `metricEntryUpdated`, `patientUpdated`, `requestFormCompletionCreated`, `requestFormCompletionDeleted`, `requestFormCompletionUpdated`, `taskCreated`, `taskDeleted`, `taskUpdated`\n\n## April 2023\n\n- Create task action: now also adds support for reminders.\n"
|
45
45
|
},
|
46
46
|
"hello-world": {
|
47
47
|
"readme": "---\ntitle: Hello world\ndescription: This is an example extension.\n---\n# Hello world extension",
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"onCreatePatient.js","sourceRoot":"","sources":["../../../../extensions/elation/webhooks/onCreatePatient.ts"],"names":[],"mappings":";;;AAMA,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA;AAElC,QAAA,eAAe,GAGxB;IACF,GAAG,EAAE,iBAAiB;IACtB,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QACrE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;QAClC,IAAI,QAAQ,KAAK,UAAU,EAAE;YAC3B,MAAM,OAAO,CAAC;gBACZ,QAAQ,EAAE;oBACR,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,2BAA2B;iBACrC;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,SAAS,CAAC;gBACd,WAAW,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;aAC5C,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|