@awell-health/awell-extensions 2.1.183 → 2.1.184
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/awell/index.js +3 -0
- package/dist/extensions/awell/index.js.map +1 -1
- package/dist/extensions/awell/v1/ingestion/dataIngestion.d.ts +36 -0
- package/dist/extensions/awell/v1/ingestion/dataIngestion.js +48 -0
- package/dist/extensions/awell/v1/ingestion/dataIngestion.js.map +1 -0
- package/dist/extensions/awell/v1/ingestion/index.d.ts +18 -0
- package/dist/extensions/awell/v1/ingestion/index.js +7 -0
- package/dist/extensions/awell/v1/ingestion/index.js.map +1 -0
- package/dist/extensions/bland/api/schema/SendCall.schema.d.ts +1 -1
- package/dist/extensions/bland/api/schema/atoms/WebhookEventsSchema.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ exports.Awell = void 0;
|
|
|
4
4
|
const actions_1 = require("./v1/actions");
|
|
5
5
|
const settings_1 = require("./settings");
|
|
6
6
|
const webhooks_1 = require("./v1/webhooks");
|
|
7
|
+
const ingestion_1 = require("./v1/ingestion");
|
|
7
8
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
8
9
|
exports.Awell = {
|
|
9
10
|
key: 'awell',
|
|
@@ -35,5 +36,7 @@ exports.Awell = {
|
|
|
35
36
|
getCurrentCareflowId: actions_1.getCurrentCareflowId,
|
|
36
37
|
},
|
|
37
38
|
webhooks: webhooks_1.webhooks,
|
|
39
|
+
identifier: { system: 'https://awellhealth.com' },
|
|
40
|
+
ingestion: ingestion_1.ingestion,
|
|
38
41
|
};
|
|
39
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/awell/index.ts"],"names":[],"mappings":";;;AAAA,0CAkBqB;AAErB,yCAAqC;AACrC,4CAAwC;AACxC,mEAAoE;AAEvD,QAAA,KAAK,GAAc;IAC9B,GA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AsB;QACtB,sBAAsB,EAAtB,gCAAsB;QACtB,aAAa,EAAb,uBAAa;QACb,aAAa,EAAb,uBAAa;QACb,YAAY,EAAZ,sBAAY;QACZ,SAAS,EAAT,mBAAS;QACT,2BAA2B,EAA3B,qCAA2B;QAC3B,2BAA2B,EAA3B,qCAA2B;QAC3B,wBAAwB,EAAxB,kCAAwB;QACxB,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,uBAAuB,EAAvB,iCAAuB;QACvB,iBAAiB,EAAjB,2BAAiB;QACjB,eAAe,EAAf,yBAAe;QACf,iBAAiB,EAAjB,2BAAiB;QACjB,oBAAoB,EAApB,8BAAoB;KACrB;IACD,QAAQ,EAAR,mBAAQ;IACR,UAAU,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE;IACjD,SAAS,EAAT,qBAAS;CACV,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Experimental. The payload is the record: one POST is one patient. Everything
|
|
4
|
+
* but the subject key is optional so a partial payload still ingests what it
|
|
5
|
+
* carries. Field names (`Gender` included) match the data workbench as-is.
|
|
6
|
+
*/
|
|
7
|
+
export declare const dataIngestionSchema: z.ZodObject<{
|
|
8
|
+
patient_id: z.ZodString;
|
|
9
|
+
facility_name: z.ZodOptional<z.ZodString>;
|
|
10
|
+
Gender: z.ZodOptional<z.ZodString>;
|
|
11
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
13
|
+
birth_date: z.ZodOptional<z.ZodString>;
|
|
14
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
street: z.ZodOptional<z.ZodString>;
|
|
16
|
+
city: z.ZodOptional<z.ZodString>;
|
|
17
|
+
state: z.ZodOptional<z.ZodString>;
|
|
18
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$loose>>;
|
|
20
|
+
}, z.core.$loose>;
|
|
21
|
+
export declare const dataIngestion: import("@awell-health/extensions-core").IngestionEndpoint<{
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
patient_id: string;
|
|
24
|
+
facility_name?: string | undefined;
|
|
25
|
+
Gender?: string | undefined;
|
|
26
|
+
first_name?: string | undefined;
|
|
27
|
+
last_name?: string | undefined;
|
|
28
|
+
birth_date?: string | undefined;
|
|
29
|
+
address?: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
street?: string | undefined;
|
|
32
|
+
city?: string | undefined;
|
|
33
|
+
state?: string | undefined;
|
|
34
|
+
zip?: string | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
}, unknown, import("@awell-health/extensions-core").Settings>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataIngestion = exports.dataIngestionSchema = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const trimmedString = zod_1.z.string().trim();
|
|
8
|
+
/**
|
|
9
|
+
* Experimental. The payload is the record: one POST is one patient. Everything
|
|
10
|
+
* but the subject key is optional so a partial payload still ingests what it
|
|
11
|
+
* carries. Field names (`Gender` included) match the data workbench as-is.
|
|
12
|
+
*/
|
|
13
|
+
exports.dataIngestionSchema = zod_1.z.looseObject({
|
|
14
|
+
patient_id: trimmedString.min(1),
|
|
15
|
+
facility_name: trimmedString.optional(),
|
|
16
|
+
Gender: trimmedString.optional(),
|
|
17
|
+
first_name: trimmedString.optional(),
|
|
18
|
+
last_name: trimmedString.optional(),
|
|
19
|
+
birth_date: trimmedString.optional(),
|
|
20
|
+
address: zod_1.z
|
|
21
|
+
.looseObject({
|
|
22
|
+
street: trimmedString.optional(),
|
|
23
|
+
city: trimmedString.optional(),
|
|
24
|
+
state: trimmedString.optional(),
|
|
25
|
+
zip: trimmedString.optional(),
|
|
26
|
+
})
|
|
27
|
+
.optional(),
|
|
28
|
+
});
|
|
29
|
+
exports.dataIngestion = (0, extensions_core_1.defineEndpoint)({
|
|
30
|
+
key: 'dataIngestion',
|
|
31
|
+
title: 'Data ingestion (experimental)',
|
|
32
|
+
description: 'Experimental endpoint. POST a patient payload to write demographics to the data store and publish a care flow start event. Identifies the patient by `patient_id`.',
|
|
33
|
+
source: 'webhook',
|
|
34
|
+
schema: exports.dataIngestionSchema,
|
|
35
|
+
identifier: { resolveValue: (record) => record.patient_id },
|
|
36
|
+
run: async ({ record, store, events }) => {
|
|
37
|
+
store.save('patient', (0, lodash_1.omitBy)({
|
|
38
|
+
facility_name: record.facility_name,
|
|
39
|
+
Gender: record.Gender,
|
|
40
|
+
first_name: record.first_name,
|
|
41
|
+
last_name: record.last_name,
|
|
42
|
+
birth_date: record.birth_date,
|
|
43
|
+
address: record.address,
|
|
44
|
+
}, lodash_1.isUndefined));
|
|
45
|
+
events.publish({ key: 'careflow.start' });
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=dataIngestion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataIngestion.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/ingestion/dataIngestion.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,mCAA4C;AAC5C,6BAAuB;AAEvB,MAAM,aAAa,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAA;AAEvC;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,OAAC,CAAC,WAAW,CAAC;IAC/C,UAAU,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC,QAAQ,EAAE;IACvC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,aAAa,CAAC,QAAQ,EAAE;IACpC,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE;IACnC,UAAU,EAAE,aAAa,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,OAAC;SACP,WAAW,CAAC;QACX,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE;QAChC,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE;QAC9B,KAAK,EAAE,aAAa,CAAC,QAAQ,EAAE;QAC/B,GAAG,EAAE,aAAa,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,aAAa,GAAG,IAAA,gCAAc,EAAC;IAC1C,GAAG,EAAE,eAAe;IACpB,KAAK,EAAE,+BAA+B;IACtC,WAAW,EACT,oKAAoK;IACtK,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,2BAAmB;IAC3B,UAAU,EAAE,EAAE,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE;IAC3D,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QACvC,KAAK,CAAC,IAAI,CACR,SAAS,EACT,IAAA,eAAM,EACJ;YACE,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,EACD,oBAAW,CACZ,CACF,CAAA;QAED,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,CAAC,CAAA;IAC3C,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { dataIngestion } from './dataIngestion';
|
|
2
|
+
export { dataIngestion };
|
|
3
|
+
export declare const ingestion: import("@awell-health/extensions-core").IngestionEndpoint<{
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
patient_id: string;
|
|
6
|
+
facility_name?: string | undefined;
|
|
7
|
+
Gender?: string | undefined;
|
|
8
|
+
first_name?: string | undefined;
|
|
9
|
+
last_name?: string | undefined;
|
|
10
|
+
birth_date?: string | undefined;
|
|
11
|
+
address?: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
street?: string | undefined;
|
|
14
|
+
city?: string | undefined;
|
|
15
|
+
state?: string | undefined;
|
|
16
|
+
zip?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
}, unknown, import("@awell-health/extensions-core").Settings>[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ingestion = exports.dataIngestion = void 0;
|
|
4
|
+
const dataIngestion_1 = require("./dataIngestion");
|
|
5
|
+
Object.defineProperty(exports, "dataIngestion", { enumerable: true, get: function () { return dataIngestion_1.dataIngestion; } });
|
|
6
|
+
exports.ingestion = [dataIngestion_1.dataIngestion];
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/awell/v1/ingestion/index.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAEtC,8FAFA,6BAAa,OAEA;AACT,QAAA,SAAS,GAAG,CAAC,6BAAa,CAAC,CAAA"}
|
|
@@ -57,10 +57,10 @@ export declare const SendCallInputSchema: z.ZodObject<{
|
|
|
57
57
|
from: z.ZodOptional<z.ZodString>;
|
|
58
58
|
webhook: z.ZodOptional<z.ZodString>;
|
|
59
59
|
webhook_events: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
60
|
+
webhook: "webhook";
|
|
60
61
|
queue: "queue";
|
|
61
62
|
call: "call";
|
|
62
63
|
latency: "latency";
|
|
63
|
-
webhook: "webhook";
|
|
64
64
|
tool: "tool";
|
|
65
65
|
dynamic_data: "dynamic_data";
|
|
66
66
|
citations: "citations";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const WebhookEventsSchema: z.ZodArray<z.ZodEnum<{
|
|
3
|
+
webhook: "webhook";
|
|
3
4
|
queue: "queue";
|
|
4
5
|
call: "call";
|
|
5
6
|
latency: "latency";
|
|
6
|
-
webhook: "webhook";
|
|
7
7
|
tool: "tool";
|
|
8
8
|
dynamic_data: "dynamic_data";
|
|
9
9
|
citations: "citations";
|