@awell-health/awell-extensions 2.1.86 → 2.1.88

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.
@@ -0,0 +1,21 @@
1
+ import { type DocumentFieldValueAssignedPayload } from '../documentFieldValueAssigned';
2
+ /**
3
+ * Mock payload with all fields populated
4
+ */
5
+ export declare const fullPayload: DocumentFieldValueAssignedPayload;
6
+ /**
7
+ * Mock payload with only phone number
8
+ */
9
+ export declare const phoneOnlyPayload: DocumentFieldValueAssignedPayload;
10
+ /**
11
+ * Mock payload with no mapped fields
12
+ */
13
+ export declare const unmappedFieldsPayload: DocumentFieldValueAssignedPayload;
14
+ /**
15
+ * Mock payload with empty assignments
16
+ */
17
+ export declare const emptyAssignmentsPayload: DocumentFieldValueAssignedPayload;
18
+ /**
19
+ * Mock payload with user present
20
+ */
21
+ export declare const withUserPayload: DocumentFieldValueAssignedPayload;
@@ -0,0 +1,215 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withUserPayload = exports.emptyAssignmentsPayload = exports.unmappedFieldsPayload = exports.phoneOnlyPayload = exports.fullPayload = void 0;
4
+ /**
5
+ * Mock payload with all fields populated
6
+ */
7
+ exports.fullPayload = {
8
+ accountId: 'account-123',
9
+ workspaceId: 'workspace-456',
10
+ documentId: 'document-789',
11
+ document: {
12
+ isUploading: false,
13
+ createdAt: '2026-01-28T15:12:25.215Z',
14
+ id: 'document-789',
15
+ name: 'test-document',
16
+ sourceType: 'upload',
17
+ sourceId: 'source-abc',
18
+ from: null,
19
+ to: null,
20
+ pagesCount: 8,
21
+ },
22
+ user: null,
23
+ assignments: [
24
+ {
25
+ fieldId: 'field-1',
26
+ valueText: 'John',
27
+ valueDate: null,
28
+ valueArray: null,
29
+ valueObject: null,
30
+ order: 1,
31
+ name: 'Patient First Name',
32
+ type: 'text',
33
+ dateFlag: null,
34
+ },
35
+ {
36
+ fieldId: 'field-2',
37
+ valueText: 'Doe',
38
+ valueDate: null,
39
+ valueArray: null,
40
+ valueObject: null,
41
+ order: 2,
42
+ name: 'Patient Last Name',
43
+ type: 'text',
44
+ dateFlag: null,
45
+ },
46
+ {
47
+ fieldId: 'field-3',
48
+ valueText: '80202-5544',
49
+ valueDate: null,
50
+ valueArray: null,
51
+ valueObject: null,
52
+ order: 5,
53
+ name: 'Patient Zip Code',
54
+ type: 'text',
55
+ dateFlag: null,
56
+ },
57
+ {
58
+ fieldId: 'field-4',
59
+ valueText: null,
60
+ valueDate: null,
61
+ valueArray: ['MRN123456', 'INS789012'],
62
+ valueObject: null,
63
+ order: 8,
64
+ name: 'Patient Identifiers',
65
+ type: 'text_array',
66
+ dateFlag: null,
67
+ },
68
+ {
69
+ fieldId: 'field-5',
70
+ valueText: '555-123-4567',
71
+ valueDate: null,
72
+ valueArray: null,
73
+ valueObject: null,
74
+ order: 9,
75
+ name: 'Patient Phone Number',
76
+ type: 'text',
77
+ dateFlag: null,
78
+ },
79
+ {
80
+ fieldId: 'field-6',
81
+ valueText: 'Dr. Smith, Primary Care',
82
+ valueDate: null,
83
+ valueArray: null,
84
+ valueObject: null,
85
+ order: 10,
86
+ name: 'Receiving Provider Full Name',
87
+ type: 'text',
88
+ dateFlag: null,
89
+ },
90
+ ],
91
+ };
92
+ /**
93
+ * Mock payload with only phone number
94
+ */
95
+ exports.phoneOnlyPayload = {
96
+ accountId: 'account-123',
97
+ workspaceId: 'workspace-456',
98
+ documentId: 'document-789',
99
+ document: {
100
+ isUploading: false,
101
+ createdAt: '2026-01-20T16:05:04.476Z',
102
+ id: 'document-789',
103
+ name: 'phone-only-doc',
104
+ sourceType: 'upload',
105
+ sourceId: 'source-abc',
106
+ from: null,
107
+ to: null,
108
+ pagesCount: 2,
109
+ },
110
+ user: null,
111
+ assignments: [
112
+ {
113
+ fieldId: 'field-5',
114
+ valueText: '720-862-4005',
115
+ valueDate: null,
116
+ valueArray: null,
117
+ valueObject: null,
118
+ order: 9,
119
+ name: 'Patient Phone Number',
120
+ type: 'text',
121
+ dateFlag: null,
122
+ },
123
+ ],
124
+ };
125
+ /**
126
+ * Mock payload with no mapped fields
127
+ */
128
+ exports.unmappedFieldsPayload = {
129
+ accountId: 'account-123',
130
+ workspaceId: 'workspace-456',
131
+ documentId: 'document-789',
132
+ document: {
133
+ isUploading: false,
134
+ createdAt: '2026-01-20T16:05:04.476Z',
135
+ id: 'document-789',
136
+ name: 'unmapped-doc',
137
+ sourceType: 'upload',
138
+ sourceId: 'source-abc',
139
+ from: null,
140
+ to: null,
141
+ pagesCount: 1,
142
+ },
143
+ user: null,
144
+ assignments: [
145
+ {
146
+ fieldId: 'field-unknown',
147
+ valueText: 'Some unknown value',
148
+ valueDate: null,
149
+ valueArray: null,
150
+ valueObject: null,
151
+ order: 1,
152
+ name: 'Unknown Field Name',
153
+ type: 'text',
154
+ dateFlag: null,
155
+ },
156
+ ],
157
+ };
158
+ /**
159
+ * Mock payload with empty assignments
160
+ */
161
+ exports.emptyAssignmentsPayload = {
162
+ accountId: 'account-123',
163
+ workspaceId: 'workspace-456',
164
+ documentId: 'document-789',
165
+ document: {
166
+ isUploading: false,
167
+ createdAt: '2026-01-20T16:05:04.476Z',
168
+ id: 'document-789',
169
+ name: 'empty-doc',
170
+ sourceType: 'upload',
171
+ sourceId: 'source-abc',
172
+ from: null,
173
+ to: null,
174
+ pagesCount: 1,
175
+ },
176
+ user: null,
177
+ assignments: [],
178
+ };
179
+ /**
180
+ * Mock payload with user present
181
+ */
182
+ exports.withUserPayload = {
183
+ accountId: 'account-123',
184
+ workspaceId: 'workspace-456',
185
+ documentId: 'document-789',
186
+ document: {
187
+ isUploading: false,
188
+ createdAt: '2026-01-20T16:05:04.476Z',
189
+ id: 'document-789',
190
+ name: 'with-user-doc',
191
+ sourceType: 'upload',
192
+ sourceId: 'source-abc',
193
+ from: null,
194
+ to: null,
195
+ pagesCount: 2,
196
+ },
197
+ user: {
198
+ id: 'user-123',
199
+ email: 'user@example.com',
200
+ },
201
+ assignments: [
202
+ {
203
+ fieldId: 'field-1',
204
+ valueText: 'Jane',
205
+ valueDate: null,
206
+ valueArray: null,
207
+ valueObject: null,
208
+ order: 1,
209
+ name: 'Patient First Name',
210
+ type: 'text',
211
+ dateFlag: null,
212
+ },
213
+ ],
214
+ };
215
+ //# sourceMappingURL=documentFieldValueAssigned.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentFieldValueAssigned.mock.js","sourceRoot":"","sources":["../../../../../extensions/documo/webhooks/__testdata__/documentFieldValueAssigned.mock.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,WAAW,GAAsC;IAC5D,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,QAAQ,EAAE;QACR,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,0BAA0B;QACrC,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,IAAI;QACR,UAAU,EAAE,CAAC;KACd;IACD,IAAI,EAAE,IAAI;IACV,WAAW,EAAE;QACX;YACE,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;SACf;QACD;YACE,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,KAAK;YAChB,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;SACf;QACD;YACE,OAAO,EAAE,SAAS;YACl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,EAAE,YAAY;QACtB,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,IAAI;QACR,UAAU,EAAE,CAAC;KACd;IACD,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,EAAE;CAChB,CAAA;AAED;;GAEG;AACU,QAAA,eAAe,GAAsC;IAChE,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,QAAQ,EAAE;QACR,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,0BAA0B;QACrC,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,IAAI;QACR,UAAU,EAAE,CAAC;KACd;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,kBAAkB;KAC1B;IACD,WAAW,EAAE;QACX;YACE,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAA"}
@@ -4,13 +4,65 @@ declare const dataPoints: {
4
4
  key: string;
5
5
  valueType: "json";
6
6
  };
7
+ patientFirstName: {
8
+ key: string;
9
+ valueType: "string";
10
+ };
11
+ patientLastName: {
12
+ key: string;
13
+ valueType: "string";
14
+ };
15
+ patientZipCode: {
16
+ key: string;
17
+ valueType: "string";
18
+ };
19
+ patientIdentifiers: {
20
+ key: string;
21
+ valueType: "json";
22
+ };
23
+ patientMobilePhone: {
24
+ key: string;
25
+ valueType: "string";
26
+ };
27
+ receivingProviderFullName: {
28
+ key: string;
29
+ valueType: "string";
30
+ };
7
31
  };
32
+ /**
33
+ * Field assignment from the webhook payload
34
+ */
8
35
  interface FieldAssignment {
9
- field: {
10
- id: string;
11
- name: string;
12
- };
13
- value: string | null;
36
+ fieldId: string;
37
+ valueText: string | null;
38
+ valueDate: string | null;
39
+ valueArray: unknown[] | null;
40
+ valueObject: Record<string, unknown> | null;
41
+ order: number;
42
+ name: string;
43
+ type: string;
44
+ dateFlag: string | null;
45
+ }
46
+ /**
47
+ * Document metadata from the webhook payload
48
+ */
49
+ interface DocumentInfo {
50
+ isUploading: boolean;
51
+ createdAt: string;
52
+ id: string;
53
+ name: string;
54
+ sourceType: string;
55
+ sourceId: string;
56
+ from: string | null;
57
+ to: string | null;
58
+ pagesCount: number;
59
+ }
60
+ /**
61
+ * User information from the webhook payload
62
+ */
63
+ interface UserInfo {
64
+ id: string;
65
+ email: string;
14
66
  }
15
67
  /**
16
68
  * Document Field Value Assigned webhook payload
@@ -21,11 +73,8 @@ export interface DocumentFieldValueAssignedPayload {
21
73
  accountId: string;
22
74
  workspaceId: string;
23
75
  documentId: string;
24
- status: string;
25
- user: {
26
- id: string;
27
- email: string;
28
- };
76
+ document: DocumentInfo;
77
+ user: UserInfo | null;
29
78
  assignments: FieldAssignment[];
30
79
  }
31
80
  export declare const documentFieldValueAssigned: Webhook<keyof typeof dataPoints, DocumentFieldValueAssignedPayload>;
@@ -6,15 +6,95 @@ const dataPoints = {
6
6
  key: 'webhookData',
7
7
  valueType: 'json',
8
8
  },
9
+ patientFirstName: {
10
+ key: 'patientFirstName',
11
+ valueType: 'string',
12
+ },
13
+ patientLastName: {
14
+ key: 'patientLastName',
15
+ valueType: 'string',
16
+ },
17
+ patientZipCode: {
18
+ key: 'patientZipCode',
19
+ valueType: 'string',
20
+ },
21
+ patientIdentifiers: {
22
+ key: 'patientIdentifiers',
23
+ valueType: 'json',
24
+ },
25
+ patientMobilePhone: {
26
+ key: 'patientMobilePhone',
27
+ valueType: 'string',
28
+ },
29
+ receivingProviderFullName: {
30
+ key: 'receivingProviderFullName',
31
+ valueType: 'string',
32
+ },
33
+ };
34
+ /**
35
+ * Known field name mappings to data points
36
+ * Keys are the field names as they appear in the Documo webhook
37
+ * Values are the corresponding data point names
38
+ */
39
+ const FIELD_NAME_MAPPINGS = {
40
+ 'Patient First Name': 'patientFirstName',
41
+ 'Patient Last Name': 'patientLastName',
42
+ 'Patient Zip Code': 'patientZipCode',
43
+ 'Patient Identifiers': 'patientIdentifiers',
44
+ 'Patient Phone Number': 'patientMobilePhone',
45
+ 'Receiving Provider Full Name': 'receivingProviderFullName',
9
46
  };
47
+ /**
48
+ * Extracts a field value by name from the assignments array
49
+ */
50
+ function getFieldValueByName(assignments, fieldName) {
51
+ const assignment = assignments.find((a) => a.name === fieldName);
52
+ if (assignment == null) {
53
+ return null;
54
+ }
55
+ // Return the appropriate value based on type
56
+ if (assignment.valueText != null) {
57
+ return assignment.valueText;
58
+ }
59
+ if (assignment.valueDate != null) {
60
+ return assignment.valueDate;
61
+ }
62
+ if (assignment.valueArray != null) {
63
+ return JSON.stringify(assignment.valueArray);
64
+ }
65
+ if (assignment.valueObject != null) {
66
+ return JSON.stringify(assignment.valueObject);
67
+ }
68
+ return null;
69
+ }
70
+ /**
71
+ * Extracts all mapped patient fields from assignments
72
+ */
73
+ function extractPatientFields(assignments) {
74
+ const result = {};
75
+ for (const [documoFieldName, patientFieldName] of Object.entries(FIELD_NAME_MAPPINGS)) {
76
+ result[patientFieldName] = getFieldValueByName(assignments, documoFieldName);
77
+ }
78
+ return result;
79
+ }
10
80
  exports.documentFieldValueAssigned = {
11
81
  key: 'documentFieldValueAssigned',
12
82
  description: 'This webhook is triggered when a field value is assigned to a document.',
13
83
  dataPoints,
14
- onWebhookReceived: async ({ payload }, onSuccess) => {
84
+ onEvent: async ({ payload: { payload }, onSuccess }) => {
85
+ var _a, _b, _c, _d, _e, _f;
86
+ const { assignments } = payload;
87
+ // Extract mapped patient fields
88
+ const patientFields = extractPatientFields(assignments);
15
89
  await onSuccess({
16
90
  data_points: {
17
91
  webhookData: JSON.stringify(payload),
92
+ patientFirstName: (_a = patientFields.patientFirstName) !== null && _a !== void 0 ? _a : '',
93
+ patientLastName: (_b = patientFields.patientLastName) !== null && _b !== void 0 ? _b : '',
94
+ patientZipCode: (_c = patientFields.patientZipCode) !== null && _c !== void 0 ? _c : '',
95
+ patientIdentifiers: (_d = patientFields.patientIdentifiers) !== null && _d !== void 0 ? _d : '',
96
+ patientMobilePhone: (_e = patientFields.patientMobilePhone) !== null && _e !== void 0 ? _e : '',
97
+ receivingProviderFullName: (_f = patientFields.receivingProviderFullName) !== null && _f !== void 0 ? _f : '',
18
98
  },
19
99
  });
20
100
  },
@@ -1 +1 @@
1
- {"version":3,"file":"documentFieldValueAssigned.js","sourceRoot":"","sources":["../../../../extensions/documo/webhooks/documentFieldValueAssigned.ts"],"names":[],"mappings":";;;AAKA,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA;AA2BlC,QAAA,0BAA0B,GAGnC;IACF,GAAG,EAAE,4BAA4B;IACjC,WAAW,EACT,yEAAyE;IAC3E,UAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE;QAClD,MAAM,SAAS,CAAC;YACd,WAAW,EAAE;gBACX,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;aACrC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"documentFieldValueAssigned.js","sourceRoot":"","sources":["../../../../extensions/documo/webhooks/documentFieldValueAssigned.ts"],"names":[],"mappings":";;;AAKA,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,MAAM;KAClB;IACD,gBAAgB,EAAE;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,iBAA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,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -1 +1 @@
1
- export declare const webhooks: (import("@awell-health/extensions-core").Webhook<"webhookData" | "extractedInfo", import("./ocrDocumentCompleted").OcrDocumentCompletedPayload, Record<string, import("@awell-health/extensions-core").Setting>> | import("@awell-health/extensions-core").Webhook<"webhookData", import("./documentFieldValueAssigned").DocumentFieldValueAssignedPayload, Record<string, import("@awell-health/extensions-core").Setting>>)[];
1
+ export declare const webhooks: (import("@awell-health/extensions-core").Webhook<"webhookData" | "extractedInfo", import("./ocrDocumentCompleted").OcrDocumentCompletedPayload, Record<string, import("@awell-health/extensions-core").Setting>> | import("@awell-health/extensions-core").Webhook<"webhookData" | "patientFirstName" | "patientLastName" | "patientZipCode" | "patientIdentifiers" | "patientMobilePhone" | "receivingProviderFullName", import("./documentFieldValueAssigned").DocumentFieldValueAssignedPayload, Record<string, import("@awell-health/extensions-core").Setting>>)[];
@@ -72,7 +72,7 @@
72
72
  "changelog": "# DocuSign changelog\n"
73
73
  },
74
74
  "documo": {
75
- "readme": "---\ntitle: Documo\ndescription: Documo extension for Awell\n---\n# Documo extension\n\nDocumo extension for Awell\n\n## Actions\n\n- **Hello World**: A simple action that logs a message.\n\n## Webhooks\n\n- **Hello World Webhook**: A simple webhook that receives events.\n\n## Settings\n\n- **Api Key**: API Key\n",
75
+ "readme": "---\ntitle: Documo\ndescription: Documo extension for Awell\n---\n# Documo extension\n\nDocumo extension for Awell that integrates with Documo's intelligent document processing platform.\n\n## Webhooks\n\n### OCR Document Completed\n\nTriggered when OCR processing completes on a document. Uses an LLM to extract patient information from the OCR text.\n\n**Data Points:**\n- `webhookData` - Full webhook payload (JSON)\n- `extractedInfo` - Extracted patient information (JSON)\n\n### Document Field Value Assigned\n\nTriggered when a field value is assigned to a document. Extracts patient and provider information from the document field assignments.\n\n**Data Points:**\n\n| Data Point | Type | Description |\n|------------|------|-------------|\n| `webhookData` | json | Full webhook payload |\n| `patientFirstName` | string | Patient's first name |\n| `patientLastName` | string | Patient's last name |\n| `patientZipCode` | string | Patient's zip code |\n| `patientIdentifiers` | json | Array of patient identifiers (e.g., MRN, insurance ID) |\n| `patientMobilePhone` | string | Patient's phone number |\n| `receivingProviderFullName` | string | Name of the receiving provider |\n\n**Field Mappings:**\n\nThe webhook maps Documo field names to data points:\n\n| Documo Field Name | Data Point |\n|-------------------|------------|\n| Patient First Name | `patientFirstName` |\n| Patient Last Name | `patientLastName` |\n| Patient Zip Code | `patientZipCode` |\n| Patient Identifiers | `patientIdentifiers` |\n| Patient Phone Number | `patientMobilePhone` |\n| Receiving Provider Full Name | `receivingProviderFullName` |\n\n## Settings\n\n- **Api Key**: Documo API Key\n\n## Development\n\n### Running Tests\n\nTo run tests for a specific file:\n\n```bash\nyarn run test -- <file name>\n```\n\nOr run all Documo tests:\n\n```bash\nyarn run test -- --testPathPattern='extensions/documo' --runInBand\n```\n",
76
76
  "changelog": "# Documo changelog\n\n## [Unreleased]\n\n- Initial release\n"
77
77
  },
78
78
  "dropboxSign": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.1.86",
3
+ "version": "2.1.88",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -103,7 +103,7 @@
103
103
  "dependencies": {
104
104
  "@airtop/sdk": "^0.1.44",
105
105
  "@awell-health/awell-sdk": "0.1.24",
106
- "@awell-health/extensions-core": "1.1.9",
106
+ "@awell-health/extensions-core": "1.1.11",
107
107
  "@awell-health/healthie-sdk": "^0.1.1",
108
108
  "@calcom/embed-react": "^1.5.3",
109
109
  "@dropbox/sign": "^1.8.0",