@awell-health/awell-extensions 2.0.129 → 2.0.130

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. package/dist/extensions/elation/actions/index.d.ts +234 -0
  2. package/dist/extensions/elation/actions/index.js +2 -0
  3. package/dist/extensions/elation/actions/index.js.map +1 -1
  4. package/dist/extensions/elation/actions/updatePatientTags/config/dataPoints.d.ts +6 -0
  5. package/dist/extensions/elation/actions/updatePatientTags/config/dataPoints.js +10 -0
  6. package/dist/extensions/elation/actions/updatePatientTags/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/elation/actions/updatePatientTags/config/fields.d.ts +28 -0
  8. package/dist/extensions/elation/actions/updatePatientTags/config/fields.js +26 -0
  9. package/dist/extensions/elation/actions/updatePatientTags/config/fields.js.map +1 -0
  10. package/dist/extensions/elation/actions/updatePatientTags/config/index.d.ts +2 -0
  11. package/dist/extensions/elation/actions/updatePatientTags/config/index.js +9 -0
  12. package/dist/extensions/elation/actions/updatePatientTags/config/index.js.map +1 -0
  13. package/dist/extensions/elation/actions/updatePatientTags/index.d.ts +1 -0
  14. package/dist/extensions/elation/actions/updatePatientTags/index.js +6 -0
  15. package/dist/extensions/elation/actions/updatePatientTags/index.js.map +1 -0
  16. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.d.ts +4 -0
  17. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.js +98 -0
  18. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.js.map +1 -0
  19. package/dist/extensions/elation/settings.d.ts +10 -0
  20. package/dist/extensions/elation/settings.js +8 -0
  21. package/dist/extensions/elation/settings.js.map +1 -1
  22. package/package.json +1 -1
@@ -50,6 +50,13 @@ export declare const actions: {
50
50
  description: string;
51
51
  required: false;
52
52
  };
53
+ openAiApiKey: {
54
+ key: string;
55
+ label: string;
56
+ obfuscated: true;
57
+ required: false;
58
+ description: string;
59
+ };
53
60
  }, "status" | "firstName" | "lastName" | "email" | "dob" | "mobilePhone" | "preferredLanguage" | "sex" | "genderIdentity" | "middleName" | "notes" | "pronouns" | "ssn" | "race" | "ethnicity" | "primaryPhysicianId" | "caregiverPracticeId" | "mainPhone" | "actualName" | "legalGenderMarker" | "sexualOrientation" | "previousFirstName" | "previousLastName" | "preferredServiceLocationId" | "patientObject">;
54
61
  createPatient: import("@awell-health/extensions-core").Action<{
55
62
  firstName: {
@@ -236,6 +243,13 @@ export declare const actions: {
236
243
  description: string;
237
244
  required: false;
238
245
  };
246
+ openAiApiKey: {
247
+ key: string;
248
+ label: string;
249
+ obfuscated: true;
250
+ required: false;
251
+ description: string;
252
+ };
239
253
  }, "patientId">;
240
254
  updatePatient: import("@awell-health/extensions-core").Action<{
241
255
  patientId: {
@@ -420,6 +434,13 @@ export declare const actions: {
420
434
  description: string;
421
435
  required: false;
422
436
  };
437
+ openAiApiKey: {
438
+ key: string;
439
+ label: string;
440
+ obfuscated: true;
441
+ required: false;
442
+ description: string;
443
+ };
423
444
  }, never>;
424
445
  createAppointment: import("@awell-health/extensions-core").Action<{
425
446
  patientId: {
@@ -524,6 +545,13 @@ export declare const actions: {
524
545
  description: string;
525
546
  required: false;
526
547
  };
548
+ openAiApiKey: {
549
+ key: string;
550
+ label: string;
551
+ obfuscated: true;
552
+ required: false;
553
+ description: string;
554
+ };
527
555
  }, "appointmentId">;
528
556
  getAppointment: import("@awell-health/extensions-core").Action<{
529
557
  appointmentId: {
@@ -576,6 +604,13 @@ export declare const actions: {
576
604
  description: string;
577
605
  required: false;
578
606
  };
607
+ openAiApiKey: {
608
+ key: string;
609
+ label: string;
610
+ obfuscated: true;
611
+ required: false;
612
+ description: string;
613
+ };
579
614
  }, "practiceId" | "status" | "patientId" | "duration" | "reason" | "description" | "physicianId" | "appointment" | "scheduledDate" | "serviceLocationId" | "telehealthDetails">;
580
615
  findAppointments: import("@awell-health/extensions-core").Action<{
581
616
  patientId: {
@@ -661,6 +696,13 @@ export declare const actions: {
661
696
  description: string;
662
697
  required: false;
663
698
  };
699
+ openAiApiKey: {
700
+ key: string;
701
+ label: string;
702
+ obfuscated: true;
703
+ required: false;
704
+ description: string;
705
+ };
664
706
  }, "appointments" | "appointment_exists">;
665
707
  getPharmacy: import("@awell-health/extensions-core").Action<{
666
708
  ncpdpId: {
@@ -713,6 +755,13 @@ export declare const actions: {
713
755
  description: string;
714
756
  required: false;
715
757
  };
758
+ openAiApiKey: {
759
+ key: string;
760
+ label: string;
761
+ obfuscated: true;
762
+ required: false;
763
+ description: string;
764
+ };
716
765
  }, string>;
717
766
  getPhysician: import("@awell-health/extensions-core").Action<{
718
767
  physicianId: {
@@ -765,6 +814,13 @@ export declare const actions: {
765
814
  description: string;
766
815
  required: false;
767
816
  };
817
+ openAiApiKey: {
818
+ key: string;
819
+ label: string;
820
+ obfuscated: true;
821
+ required: false;
822
+ description: string;
823
+ };
768
824
  }, "caregiverPracticeId" | "physicianFirstName" | "physicianLastName" | "physicianCredentials" | "physicianEmail" | "physicianNPI" | "physicianUserId">;
769
825
  findPhysician: import("@awell-health/extensions-core").Action<{
770
826
  firstName: {
@@ -831,6 +887,13 @@ export declare const actions: {
831
887
  description: string;
832
888
  required: false;
833
889
  };
890
+ openAiApiKey: {
891
+ key: string;
892
+ label: string;
893
+ obfuscated: true;
894
+ required: false;
895
+ description: string;
896
+ };
834
897
  }, "physicianId" | "caregiverPracticeId" | "physicianFirstName" | "physicianLastName" | "physicianCredentials" | "physicianEmail" | "physicianNPI" | "physicianUserId">;
835
898
  createNonVisitNote: import("@awell-health/extensions-core").Action<{
836
899
  patientId: {
@@ -911,6 +974,13 @@ export declare const actions: {
911
974
  description: string;
912
975
  required: false;
913
976
  };
977
+ openAiApiKey: {
978
+ key: string;
979
+ label: string;
980
+ obfuscated: true;
981
+ required: false;
982
+ description: string;
983
+ };
914
984
  }, "nonVisitNoteId" | "nonVisitNoteBulletId">;
915
985
  updateNonVisitNote: import("@awell-health/extensions-core").Action<{
916
986
  nonVisitNoteId: {
@@ -1033,6 +1103,13 @@ export declare const actions: {
1033
1103
  description: string;
1034
1104
  required: false;
1035
1105
  };
1106
+ openAiApiKey: {
1107
+ key: string;
1108
+ label: string;
1109
+ obfuscated: true;
1110
+ required: false;
1111
+ description: string;
1112
+ };
1036
1113
  }, string>;
1037
1114
  getNonVisitNote: import("@awell-health/extensions-core").Action<{
1038
1115
  nonVisitNoteId: {
@@ -1085,6 +1162,13 @@ export declare const actions: {
1085
1162
  description: string;
1086
1163
  required: false;
1087
1164
  };
1165
+ openAiApiKey: {
1166
+ key: string;
1167
+ label: string;
1168
+ obfuscated: true;
1169
+ required: false;
1170
+ description: string;
1171
+ };
1088
1172
  }, "practiceId" | "patientId" | "text" | "authorId" | "tags" | "documentDate" | "chartDate">;
1089
1173
  deleteNonVisitNote: import("@awell-health/extensions-core").Action<{
1090
1174
  nonVisitNoteId: {
@@ -1137,6 +1221,13 @@ export declare const actions: {
1137
1221
  description: string;
1138
1222
  required: false;
1139
1223
  };
1224
+ openAiApiKey: {
1225
+ key: string;
1226
+ label: string;
1227
+ obfuscated: true;
1228
+ required: false;
1229
+ description: string;
1230
+ };
1140
1231
  }, string>;
1141
1232
  createVisitNote: import("@awell-health/extensions-core").Action<{
1142
1233
  patientId: {
@@ -1250,6 +1341,13 @@ export declare const actions: {
1250
1341
  description: string;
1251
1342
  required: false;
1252
1343
  };
1344
+ openAiApiKey: {
1345
+ key: string;
1346
+ label: string;
1347
+ obfuscated: true;
1348
+ required: false;
1349
+ description: string;
1350
+ };
1253
1351
  }, "visitNoteId">;
1254
1352
  addVitals: import("@awell-health/extensions-core").Action<{
1255
1353
  patientId: {
@@ -1498,6 +1596,13 @@ export declare const actions: {
1498
1596
  description: string;
1499
1597
  required: false;
1500
1598
  };
1599
+ openAiApiKey: {
1600
+ key: string;
1601
+ label: string;
1602
+ obfuscated: true;
1603
+ required: false;
1604
+ description: string;
1605
+ };
1501
1606
  }, "vitalsId">;
1502
1607
  addHistory: import("@awell-health/extensions-core").Action<{
1503
1608
  patientId: {
@@ -1570,6 +1675,13 @@ export declare const actions: {
1570
1675
  description: string;
1571
1676
  required: false;
1572
1677
  };
1678
+ openAiApiKey: {
1679
+ key: string;
1680
+ label: string;
1681
+ obfuscated: true;
1682
+ required: false;
1683
+ description: string;
1684
+ };
1573
1685
  }, string>;
1574
1686
  addAllergy: import("@awell-health/extensions-core").Action<{
1575
1687
  patientId: {
@@ -1650,6 +1762,13 @@ export declare const actions: {
1650
1762
  description: string;
1651
1763
  required: false;
1652
1764
  };
1765
+ openAiApiKey: {
1766
+ key: string;
1767
+ label: string;
1768
+ obfuscated: true;
1769
+ required: false;
1770
+ description: string;
1771
+ };
1653
1772
  }, "allergyId">;
1654
1773
  postLetter: import("@awell-health/extensions-core").Action<{
1655
1774
  patientId: {
@@ -1744,6 +1863,13 @@ export declare const actions: {
1744
1863
  description: string;
1745
1864
  required: false;
1746
1865
  };
1866
+ openAiApiKey: {
1867
+ key: string;
1868
+ label: string;
1869
+ obfuscated: true;
1870
+ required: false;
1871
+ description: string;
1872
+ };
1747
1873
  }, "letterId">;
1748
1874
  createLabOrder: import("@awell-health/extensions-core").Action<{
1749
1875
  patientId: {
@@ -1845,6 +1971,13 @@ export declare const actions: {
1845
1971
  description: string;
1846
1972
  required: false;
1847
1973
  };
1974
+ openAiApiKey: {
1975
+ key: string;
1976
+ label: string;
1977
+ obfuscated: true;
1978
+ required: false;
1979
+ description: string;
1980
+ };
1848
1981
  }, "labOrderId" | "printableLabOrderView">;
1849
1982
  createMessageThread: import("@awell-health/extensions-core").Action<{
1850
1983
  patientId: {
@@ -1946,6 +2079,13 @@ export declare const actions: {
1946
2079
  description: string;
1947
2080
  required: false;
1948
2081
  };
2082
+ openAiApiKey: {
2083
+ key: string;
2084
+ label: string;
2085
+ obfuscated: true;
2086
+ required: false;
2087
+ description: string;
2088
+ };
1949
2089
  }, "messageThreadId">;
1950
2090
  getLetter: import("@awell-health/extensions-core").Action<{
1951
2091
  letterId: {
@@ -1998,6 +2138,13 @@ export declare const actions: {
1998
2138
  description: string;
1999
2139
  required: false;
2000
2140
  };
2141
+ openAiApiKey: {
2142
+ key: string;
2143
+ label: string;
2144
+ obfuscated: true;
2145
+ required: false;
2146
+ description: string;
2147
+ };
2001
2148
  }, "body" | "signedBy">;
2002
2149
  createReferralOrder: import("@awell-health/extensions-core").Action<{
2003
2150
  patient: {
@@ -2098,6 +2245,13 @@ export declare const actions: {
2098
2245
  description: string;
2099
2246
  required: false;
2100
2247
  };
2248
+ openAiApiKey: {
2249
+ key: string;
2250
+ label: string;
2251
+ obfuscated: true;
2252
+ required: false;
2253
+ description: string;
2254
+ };
2101
2255
  }, "id">;
2102
2256
  createCareGap: import("@awell-health/extensions-core").Action<{
2103
2257
  quality_program: {
@@ -2198,6 +2352,13 @@ export declare const actions: {
2198
2352
  description: string;
2199
2353
  required: false;
2200
2354
  };
2355
+ openAiApiKey: {
2356
+ key: string;
2357
+ label: string;
2358
+ obfuscated: true;
2359
+ required: false;
2360
+ description: string;
2361
+ };
2201
2362
  }, "id">;
2202
2363
  closeCareGap: import("@awell-health/extensions-core").Action<{
2203
2364
  quality_program: {
@@ -2257,5 +2418,78 @@ export declare const actions: {
2257
2418
  description: string;
2258
2419
  required: false;
2259
2420
  };
2421
+ openAiApiKey: {
2422
+ key: string;
2423
+ label: string;
2424
+ obfuscated: true;
2425
+ required: false;
2426
+ description: string;
2427
+ };
2260
2428
  }, never>;
2429
+ updatePatientTags: import("@awell-health/extensions-core").Action<{
2430
+ patientId: {
2431
+ id: string;
2432
+ label: string;
2433
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
2434
+ required: true;
2435
+ description: string;
2436
+ };
2437
+ prompt: {
2438
+ id: string;
2439
+ label: string;
2440
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
2441
+ required: true;
2442
+ description: string;
2443
+ };
2444
+ }, {
2445
+ base_url: {
2446
+ key: string;
2447
+ label: string;
2448
+ obfuscated: false;
2449
+ description: string;
2450
+ required: true;
2451
+ };
2452
+ auth_url: {
2453
+ key: string;
2454
+ label: string;
2455
+ obfuscated: false;
2456
+ description: string;
2457
+ required: true;
2458
+ };
2459
+ client_id: {
2460
+ key: string;
2461
+ label: string;
2462
+ obfuscated: false;
2463
+ description: string;
2464
+ required: true;
2465
+ };
2466
+ client_secret: {
2467
+ key: string;
2468
+ label: string;
2469
+ obfuscated: true;
2470
+ description: string;
2471
+ required: true;
2472
+ };
2473
+ username: {
2474
+ key: string;
2475
+ label: string;
2476
+ obfuscated: false;
2477
+ description: string;
2478
+ required: false;
2479
+ };
2480
+ password: {
2481
+ key: string;
2482
+ label: string;
2483
+ obfuscated: true;
2484
+ description: string;
2485
+ required: false;
2486
+ };
2487
+ openAiApiKey: {
2488
+ key: string;
2489
+ label: string;
2490
+ obfuscated: true;
2491
+ required: false;
2492
+ description: string;
2493
+ };
2494
+ }, "updatedTags">;
2261
2495
  };
@@ -25,6 +25,7 @@ const getLetter_1 = require("./getLetter");
25
25
  const createReferralOrder_1 = require("./createReferralOrder");
26
26
  const createCareGap_1 = require("./createCareGap");
27
27
  const closeCareGap_1 = require("./closeCareGap");
28
+ const updatePatientTags_1 = require("./updatePatientTags");
28
29
  exports.actions = {
29
30
  getPatient: getPatient_1.getPatient,
30
31
  createPatient: createPatient_1.createPatient,
@@ -50,5 +51,6 @@ exports.actions = {
50
51
  createReferralOrder: createReferralOrder_1.createReferralOrder,
51
52
  createCareGap: createCareGap_1.createCareGap,
52
53
  closeCareGap: closeCareGap_1.closeCareGap,
54
+ updatePatientTags: updatePatientTags_1.updatePatientTags,
53
55
  };
54
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/index.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AACpD,mDAA+C;AAC/C,mDAA+C;AAC/C,2DAAuD;AACvD,qDAAiD;AACjD,+CAA2C;AAC3C,yDAAqD;AACrD,mDAA+C;AAC/C,6DAAyD;AACzD,6DAAyD;AACzD,uDAAmD;AACnD,6DAAyD;AACzD,iDAA6C;AAC7C,6CAAyC;AACzC,qDAAiD;AACjD,+DAA2D;AAC3D,wDAAoD;AACpD,wDAAoD;AACpD,uEAAmE;AACnE,qDAAiD;AACjD,2CAAuC;AACvC,+DAA2D;AAC3D,mDAA+C;AAC/C,iDAA6C;AAEhC,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,uBAAU;IACV,aAAa,EAAb,6BAAa;IACb,aAAa,EAAb,6BAAa;IACb,iBAAiB,EAAjB,qCAAiB;IACjB,cAAc,EAAd,+BAAc;IACd,gBAAgB,EAAhB,mCAAgB;IAChB,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;IACZ,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,kBAAkB,EAAlB,uCAAkB;IAClB,eAAe,EAAf,iCAAe;IACf,kBAAkB,EAAlB,uCAAkB;IAClB,eAAe,EAAf,iCAAe;IACf,SAAS,EAAT,qBAAS;IACT,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,mBAAmB,EAAnB,yCAAmB;IACnB,SAAS,EAAT,qBAAS;IACT,mBAAmB,EAAnB,yCAAmB;IACnB,aAAa,EAAb,6BAAa;IACb,YAAY,EAAZ,2BAAY;CACb,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/index.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AACpD,mDAA+C;AAC/C,mDAA+C;AAC/C,2DAAuD;AACvD,qDAAiD;AACjD,+CAA2C;AAC3C,yDAAqD;AACrD,mDAA+C;AAC/C,6DAAyD;AACzD,6DAAyD;AACzD,uDAAmD;AACnD,6DAAyD;AACzD,iDAA6C;AAC7C,6CAAyC;AACzC,qDAAiD;AACjD,+DAA2D;AAC3D,wDAAoD;AACpD,wDAAoD;AACpD,uEAAmE;AACnE,qDAAiD;AACjD,2CAAuC;AACvC,+DAA2D;AAC3D,mDAA+C;AAC/C,iDAA6C;AAC7C,2DAAuD;AAE1C,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,uBAAU;IACV,aAAa,EAAb,6BAAa;IACb,aAAa,EAAb,6BAAa;IACb,iBAAiB,EAAjB,qCAAiB;IACjB,cAAc,EAAd,+BAAc;IACd,gBAAgB,EAAhB,mCAAgB;IAChB,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;IACZ,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,kBAAkB,EAAlB,uCAAkB;IAClB,eAAe,EAAf,iCAAe;IACf,kBAAkB,EAAlB,uCAAkB;IAClB,eAAe,EAAf,iCAAe;IACf,SAAS,EAAT,qBAAS;IACT,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,mBAAmB,EAAnB,yCAAmB;IACnB,SAAS,EAAT,qBAAS;IACT,mBAAmB,EAAnB,yCAAmB;IACnB,aAAa,EAAb,6BAAa;IACb,YAAY,EAAZ,2BAAY;IACZ,iBAAiB,EAAjB,qCAAiB;CAClB,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ updatedTags: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ updatedTags: {
6
+ key: 'updatedTags',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/updatePatientTags/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ patientId: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.NUMERIC;
8
+ required: true;
9
+ description: string;
10
+ };
11
+ prompt: {
12
+ id: string;
13
+ label: string;
14
+ type: FieldType.TEXT;
15
+ required: true;
16
+ description: string;
17
+ };
18
+ };
19
+ export declare const FieldsValidationSchema: z.ZodObject<{
20
+ patientId: z.ZodNumber;
21
+ prompt: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ patientId: number;
24
+ prompt: string;
25
+ }, {
26
+ patientId: number;
27
+ prompt: string;
28
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const zod_1 = require("zod");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ exports.fields = {
7
+ patientId: {
8
+ id: 'patientId',
9
+ label: 'Elation patient ID',
10
+ type: extensions_core_1.FieldType.NUMERIC,
11
+ required: true,
12
+ description: '',
13
+ },
14
+ prompt: {
15
+ id: 'prompt',
16
+ label: 'Describe what tags you would like to add, update, or remove',
17
+ type: extensions_core_1.FieldType.TEXT,
18
+ required: true,
19
+ description: '',
20
+ },
21
+ };
22
+ exports.FieldsValidationSchema = zod_1.z.object({
23
+ patientId: extensions_core_1.NumericIdSchema,
24
+ prompt: zod_1.z.string().min(1),
25
+ });
26
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/updatePatientTags/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAIsC;AAEzB,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,6DAA6D;QACpE,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,EAAE;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,iCAAe;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACwB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { dataPoints } from './dataPoints';
2
+ export { fields, FieldsValidationSchema } from './fields';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = exports.dataPoints = void 0;
4
+ var dataPoints_1 = require("./dataPoints");
5
+ Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
6
+ var fields_1 = require("./fields");
7
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
8
+ Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/elation/actions/updatePatientTags/config/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}
@@ -0,0 +1 @@
1
+ export { updatePatientTags } from './updatePatientTags';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updatePatientTags = void 0;
4
+ var updatePatientTags_1 = require("./updatePatientTags");
5
+ Object.defineProperty(exports, "updatePatientTags", { enumerable: true, get: function () { return updatePatientTags_1.updatePatientTags; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/updatePatientTags/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const updatePatientTags: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updatePatientTags = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const client_1 = require("../../client");
6
+ const config_1 = require("./config");
7
+ const output_parsers_1 = require("@langchain/core/output_parsers");
8
+ const zod_1 = require("zod");
9
+ const openai_1 = require("@langchain/openai");
10
+ const addEventLog_1 = require("../../../../src/lib/awell/addEventLog");
11
+ exports.updatePatientTags = {
12
+ key: 'updatePatientTags',
13
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
14
+ title: 'Update patient tags',
15
+ description: 'Update patient tags in Elation.',
16
+ fields: config_1.fields,
17
+ previewable: false,
18
+ dataPoints: config_1.dataPoints,
19
+ onEvent: async ({ payload, onComplete, onError }) => {
20
+ const { prompt, patientId } = config_1.FieldsValidationSchema.parse(payload.fields);
21
+ const api = (0, client_1.makeAPIClient)(payload.settings);
22
+ const openAiApiKey = payload.settings.openAiApiKey;
23
+ if (openAiApiKey === undefined || openAiApiKey === '') {
24
+ await onError({
25
+ events: [
26
+ {
27
+ date: new Date().toISOString(),
28
+ text: { en: 'OpenAI API key is required for this action.' },
29
+ error: {
30
+ category: 'SERVER_ERROR',
31
+ message: 'OpenAI API key is required for this action.',
32
+ },
33
+ },
34
+ ],
35
+ });
36
+ return;
37
+ }
38
+ try {
39
+ const { tags } = await api.getPatient(patientId);
40
+ const existingTags = tags !== null && tags !== void 0 ? tags : [];
41
+ const ChatModelGPT4o = new openai_1.ChatOpenAI({
42
+ modelName: 'gpt-4o',
43
+ openAIApiKey: openAiApiKey,
44
+ temperature: 0,
45
+ maxRetries: 3,
46
+ timeout: 10000,
47
+ });
48
+ const systemPrompt = `You are a helpful assistant. You will receive a list of patient tags and an instruction in natural language about which tags to add, update, or remove. Your output should always be the updated list of tags (as an array). An empty array is also a valid output.
49
+
50
+ Important Instructions:
51
+ - The maximum number of tags is 10.
52
+ - The max length of a single tag is 100 characters.
53
+ - Ensure tags are unique.
54
+
55
+ Input array: ${JSON.stringify(existingTags)}
56
+ Instruction: ${prompt}
57
+
58
+ Output a JSON object with two keys:
59
+ 1. updatedTags: The updated array of tags
60
+ 2. explanation: A readable explanation of the changes made to the tags and why`;
61
+ const parser = output_parsers_1.StructuredOutputParser.fromZodSchema(zod_1.z.object({
62
+ updatedTags: zod_1.z.array(zod_1.z.string()),
63
+ explanation: zod_1.z.string(),
64
+ }));
65
+ const chain = ChatModelGPT4o.pipe(parser);
66
+ const result = await chain.invoke(systemPrompt);
67
+ await api.updatePatient(patientId, {
68
+ tags: result.updatedTags,
69
+ });
70
+ await onComplete({
71
+ data_points: {
72
+ updatedTags: result.updatedTags.join(', '),
73
+ },
74
+ events: [
75
+ (0, addEventLog_1.addActivityEventLog)({
76
+ message: `Previous patient tags: ${(existingTags === null || existingTags === void 0 ? void 0 : existingTags.length) > 0 ? existingTags === null || existingTags === void 0 ? void 0 : existingTags.join(', ') : 'No tags'}\nUpdated patient tags: ${result.updatedTags.join(', ')}\nExplanation: ${result.explanation}`,
77
+ }),
78
+ ],
79
+ });
80
+ }
81
+ catch (error) {
82
+ console.error(error);
83
+ await onError({
84
+ events: [
85
+ {
86
+ date: new Date().toISOString(),
87
+ text: { en: 'Unable to update patient tags' },
88
+ error: {
89
+ category: 'SERVER_ERROR',
90
+ message: 'Unable to update patient tags',
91
+ },
92
+ },
93
+ ],
94
+ });
95
+ }
96
+ },
97
+ };
98
+ //# sourceMappingURL=updatePatientTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePatientTags.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/updatePatientTags/updatePatientTags.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,yCAA4C;AAC5C,qCAAqE;AACrE,mEAAuE;AACvE,6BAAuB;AACvB,8CAA8C;AAC9C,uEAA2E;AAE9D,QAAA,iBAAiB,GAI1B;IACF,GAAG,EAAE,mBAAmB;IACxB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,iCAAiC;IAC9C,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;QACjE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,+BAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAC1E,MAAM,GAAG,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAE3C,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAA;QAElD,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,EAAE,EAAE,CAAC;YACtD,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,6CAA6C,EAAE;wBAC3D,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,6CAA6C;yBACvD;qBACF;iBACF;a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YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,2BAA2B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,MAAM,CAAC,WAAW,EAAE;qBACjM,CAAC;iBACH;aACF,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACpB,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,+BAA+B,EAAE;wBAC7C,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,+BAA+B;yBACzC;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -42,12 +42,20 @@ export declare const settings: {
42
42
  description: string;
43
43
  required: false;
44
44
  };
45
+ openAiApiKey: {
46
+ key: string;
47
+ label: string;
48
+ obfuscated: true;
49
+ required: false;
50
+ description: string;
51
+ };
45
52
  };
46
53
  export declare const SettingsValidationSchema: z.ZodObject<{
47
54
  base_url: z.ZodString;
48
55
  auth_url: z.ZodString;
49
56
  client_id: z.ZodString;
50
57
  client_secret: z.ZodString;
58
+ openAiApiKey: z.ZodOptional<z.ZodString>;
51
59
  /**
52
60
  * Elation now uses client credentials authentication.
53
61
  * We don't remove the settings just yet for backward compatibility for existing care flows.
@@ -62,6 +70,7 @@ export declare const SettingsValidationSchema: z.ZodObject<{
62
70
  base_url: string;
63
71
  username?: string | undefined;
64
72
  password?: string | undefined;
73
+ openAiApiKey?: string | undefined;
65
74
  }, {
66
75
  auth_url: string;
67
76
  client_id: string;
@@ -69,4 +78,5 @@ export declare const SettingsValidationSchema: z.ZodObject<{
69
78
  base_url: string;
70
79
  username?: string | undefined;
71
80
  password?: string | undefined;
81
+ openAiApiKey?: string | undefined;
72
82
  }>;
@@ -45,12 +45,20 @@ exports.settings = {
45
45
  description: '⚠️ Deprecated: Elation now uses client credentials authentication. This setting is no longer required and should be removed from your settings.',
46
46
  required: false,
47
47
  },
48
+ openAiApiKey: {
49
+ key: 'openAiApiKey',
50
+ label: 'OpenAI API key ',
51
+ obfuscated: true,
52
+ required: false,
53
+ description: 'Required for some actions only.',
54
+ },
48
55
  };
49
56
  exports.SettingsValidationSchema = zod_1.z.object({
50
57
  base_url: zod_1.z.string().min(1),
51
58
  auth_url: zod_1.z.string().min(1),
52
59
  client_id: zod_1.z.string().min(1),
53
60
  client_secret: zod_1.z.string().min(1),
61
+ openAiApiKey: zod_1.z.string().optional(),
54
62
  /**
55
63
  * Elation now uses client credentials authentication.
56
64
  * We don't remove the settings just yet for backward compatibility for existing care flows.
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/elation/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,mBAAmB;QAC1B,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,sDAAsD;QACnE,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,WAAW;QAClB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,mDAAmD;QAChE,QAAQ,EAAE,IAAI;KACf;IACD,aAAa,EAAE;QACb,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,eAAe;QACtB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,uDAAuD;QACpE,Q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AAQ,EAAE;IAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACoB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.129",
3
+ "version": "2.0.130",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {