@awell-health/awell-extensions 1.0.104 → 1.0.105

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.
Files changed (78) hide show
  1. package/dist/extensions/docuSign/settings.d.ts +2 -2
  2. package/dist/extensions/elation/actions/createAppointment.d.ts +6 -6
  3. package/dist/extensions/elation/actions/createAppointment.js +12 -12
  4. package/dist/extensions/elation/actions/createAppointment.js.map +1 -1
  5. package/dist/extensions/elation/actions/createNonVisitNote.d.ts +6 -27
  6. package/dist/extensions/elation/actions/createNonVisitNote.js +25 -39
  7. package/dist/extensions/elation/actions/createNonVisitNote.js.map +1 -1
  8. package/dist/extensions/elation/actions/createPatient.d.ts +17 -2
  9. package/dist/extensions/elation/actions/createPatient.js +48 -19
  10. package/dist/extensions/elation/actions/createPatient.js.map +1 -1
  11. package/dist/extensions/elation/actions/deleteNonVisitNote.js +1 -1
  12. package/dist/extensions/elation/actions/deleteNonVisitNote.js.map +1 -1
  13. package/dist/extensions/elation/actions/findPhysician.js +0 -7
  14. package/dist/extensions/elation/actions/findPhysician.js.map +1 -1
  15. package/dist/extensions/elation/actions/getAppointment.js +1 -1
  16. package/dist/extensions/elation/actions/getAppointment.js.map +1 -1
  17. package/dist/extensions/elation/actions/getPatient.d.ts +5 -1
  18. package/dist/extensions/elation/actions/getPatient.js +11 -3
  19. package/dist/extensions/elation/actions/getPatient.js.map +1 -1
  20. package/dist/extensions/elation/actions/getPhysician/config/dataPoints.d.ts +30 -0
  21. package/dist/extensions/elation/actions/getPhysician/config/dataPoints.js +34 -0
  22. package/dist/extensions/elation/actions/getPhysician/config/dataPoints.js.map +1 -0
  23. package/dist/extensions/elation/actions/getPhysician/config/fields.d.ts +18 -0
  24. package/dist/extensions/elation/actions/getPhysician/config/fields.js +19 -0
  25. package/dist/extensions/elation/actions/getPhysician/config/fields.js.map +1 -0
  26. package/dist/extensions/elation/actions/getPhysician/config/index.d.ts +2 -0
  27. package/dist/extensions/elation/actions/getPhysician/config/index.js +9 -0
  28. package/dist/extensions/elation/actions/getPhysician/config/index.js.map +1 -0
  29. package/dist/extensions/elation/actions/getPhysician/getPhysician.d.ts +4 -0
  30. package/dist/extensions/elation/actions/getPhysician/getPhysician.js +86 -0
  31. package/dist/extensions/elation/actions/getPhysician/getPhysician.js.map +1 -0
  32. package/dist/extensions/elation/actions/getPhysician/getPhysician.test.d.ts +1 -0
  33. package/dist/extensions/elation/actions/getPhysician/getPhysician.test.js +46 -0
  34. package/dist/extensions/elation/actions/getPhysician/getPhysician.test.js.map +1 -0
  35. package/dist/extensions/elation/actions/getPhysician/index.d.ts +1 -0
  36. package/dist/extensions/elation/actions/getPhysician/index.js +6 -0
  37. package/dist/extensions/elation/actions/getPhysician/index.js.map +1 -0
  38. package/dist/extensions/elation/actions/index.d.ts +50 -119
  39. package/dist/extensions/elation/actions/index.js +4 -2
  40. package/dist/extensions/elation/actions/index.js.map +1 -1
  41. package/dist/extensions/elation/actions/updatePatient.d.ts +7 -7
  42. package/dist/extensions/elation/actions/updatePatient.js +37 -26
  43. package/dist/extensions/elation/actions/updatePatient.js.map +1 -1
  44. package/dist/extensions/elation/client.d.ts +5 -3
  45. package/dist/extensions/elation/client.js +12 -1
  46. package/dist/extensions/elation/client.js.map +1 -1
  47. package/dist/extensions/elation/types/patient.d.ts +3 -2
  48. package/dist/extensions/elation/utils/elationMobilePhoneToE164/elationMobilePhoneToE164.d.ts +9 -0
  49. package/dist/extensions/elation/utils/elationMobilePhoneToE164/elationMobilePhoneToE164.js +24 -0
  50. package/dist/extensions/elation/utils/elationMobilePhoneToE164/elationMobilePhoneToE164.js.map +1 -0
  51. package/dist/extensions/elation/utils/elationMobilePhoneToE164/elationMobilePhoneToE164.test.d.ts +1 -0
  52. package/dist/extensions/elation/utils/elationMobilePhoneToE164/elationMobilePhoneToE164.test.js +26 -0
  53. package/dist/extensions/elation/utils/elationMobilePhoneToE164/elationMobilePhoneToE164.test.js.map +1 -0
  54. package/dist/extensions/elation/utils/elationMobilePhoneToE164/index.d.ts +1 -0
  55. package/dist/extensions/elation/utils/elationMobilePhoneToE164/index.js +6 -0
  56. package/dist/extensions/elation/utils/elationMobilePhoneToE164/index.js.map +1 -0
  57. package/dist/extensions/elation/utils/getLastEmail/getLastEmail.d.ts +2 -0
  58. package/dist/extensions/elation/utils/getLastEmail/getLastEmail.js +21 -0
  59. package/dist/extensions/elation/utils/getLastEmail/getLastEmail.js.map +1 -0
  60. package/dist/extensions/elation/utils/getLastEmail/getLastEmail.test.d.ts +1 -0
  61. package/dist/extensions/elation/utils/getLastEmail/getLastEmail.test.js +29 -0
  62. package/dist/extensions/elation/utils/getLastEmail/getLastEmail.test.js.map +1 -0
  63. package/dist/extensions/elation/utils/getLastEmail/index.d.ts +1 -0
  64. package/dist/extensions/elation/utils/getLastEmail/index.js +6 -0
  65. package/dist/extensions/elation/utils/getLastEmail/index.js.map +1 -0
  66. package/dist/extensions/elation/validation/patient.zod.d.ts +591 -0
  67. package/dist/extensions/elation/validation/patient.zod.js +39 -1
  68. package/dist/extensions/elation/validation/patient.zod.js.map +1 -1
  69. package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.d.ts +11 -0
  70. package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.js +34 -0
  71. package/dist/extensions/elation/webhooks/appointmentCreatedOrUpdated.js.map +1 -0
  72. package/dist/extensions/elation/webhooks/index.d.ts +1 -2
  73. package/dist/extensions/elation/webhooks/index.js +2 -1
  74. package/dist/extensions/elation/webhooks/index.js.map +1 -1
  75. package/dist/extensions/elation/webhooks/patientCreatedOrUpdated.d.ts +1 -1
  76. package/dist/extensions/elation/webhooks/patientCreatedOrUpdated.js +1 -1
  77. package/dist/extensions/markdown.json +2 -2
  78. package/package.json +1 -1
@@ -50,7 +50,7 @@ export declare const actions: {
50
50
  description: string;
51
51
  required: true;
52
52
  };
53
- }, "sex" | "firstName" | "lastName" | "mobilePhone" | "preferredLanguage" | "notes" | "pronouns" | "dob" | "ssn" | "race" | "ethnicity" | "primaryPhysicianId" | "caregiverPracticeId" | "middleName" | "actualName" | "genderIdentity" | "legalGenderMarker" | "sexualOrientation" | "previousFirstName" | "previousLastName", never>;
53
+ }, "email" | "sex" | "firstName" | "lastName" | "mobilePhone" | "preferredLanguage" | "notes" | "pronouns" | "dob" | "ssn" | "race" | "ethnicity" | "primaryPhysicianId" | "caregiverPracticeId" | "middleName" | "actualName" | "genderIdentity" | "legalGenderMarker" | "sexualOrientation" | "previousFirstName" | "previousLastName", never>;
54
54
  createPatient: import("@awell-health/extensions-core").Action<{
55
55
  firstName: {
56
56
  id: string;
@@ -70,7 +70,7 @@ export declare const actions: {
70
70
  id: string;
71
71
  label: string;
72
72
  description: string;
73
- type: import("@awell-health/extensions-core").FieldType.STRING;
73
+ type: import("@awell-health/extensions-core").FieldType.DATE;
74
74
  required: true;
75
75
  };
76
76
  sex: {
@@ -94,6 +94,21 @@ export declare const actions: {
94
94
  type: import("@awell-health/extensions-core").FieldType.NUMERIC;
95
95
  required: true;
96
96
  };
97
+ email: {
98
+ id: string;
99
+ label: string;
100
+ description: string;
101
+ type: import("@awell-health/extensions-core").FieldType.STRING;
102
+ required: false;
103
+ };
104
+ mobilePhone: {
105
+ id: string;
106
+ label: string;
107
+ description: string;
108
+ type: import("@awell-health/extensions-core").FieldType.STRING;
109
+ stringType: import("@awell-health/extensions-core").StringType.PHONE;
110
+ required: false;
111
+ };
97
112
  middleName: {
98
113
  id: string;
99
114
  label: string;
@@ -229,42 +244,42 @@ export declare const actions: {
229
244
  label: string;
230
245
  description: string;
231
246
  type: import("@awell-health/extensions-core").FieldType.STRING;
232
- required: true;
247
+ required: false;
233
248
  };
234
249
  lastName: {
235
250
  id: string;
236
251
  label: string;
237
252
  description: string;
238
253
  type: import("@awell-health/extensions-core").FieldType.STRING;
239
- required: true;
254
+ required: false;
240
255
  };
241
256
  dob: {
242
257
  id: string;
243
258
  label: string;
244
259
  description: string;
245
- type: import("@awell-health/extensions-core").FieldType.STRING;
246
- required: true;
260
+ type: import("@awell-health/extensions-core").FieldType.DATE;
261
+ required: false;
247
262
  };
248
263
  sex: {
249
264
  id: string;
250
265
  label: string;
251
266
  description: string;
252
267
  type: import("@awell-health/extensions-core").FieldType.STRING;
253
- required: true;
268
+ required: false;
254
269
  };
255
270
  primaryPhysicianId: {
256
271
  id: string;
257
272
  label: string;
258
273
  description: string;
259
274
  type: import("@awell-health/extensions-core").FieldType.NUMERIC;
260
- required: true;
275
+ required: false;
261
276
  };
262
277
  caregiverPracticeId: {
263
278
  id: string;
264
279
  label: string;
265
280
  description: string;
266
281
  type: import("@awell-health/extensions-core").FieldType.NUMERIC;
267
- required: true;
282
+ required: false;
268
283
  };
269
284
  middleName: {
270
285
  id: string;
@@ -389,25 +404,25 @@ export declare const actions: {
389
404
  };
390
405
  }, never, never>;
391
406
  createAppointment: import("@awell-health/extensions-core").Action<{
392
- scheduledDate: {
407
+ patientId: {
393
408
  id: string;
394
409
  label: string;
395
410
  description: string;
396
- type: import("@awell-health/extensions-core").FieldType.STRING;
411
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
397
412
  required: true;
398
413
  };
399
- reason: {
414
+ scheduledDate: {
400
415
  id: string;
401
416
  label: string;
402
417
  description: string;
403
- type: import("@awell-health/extensions-core").FieldType.STRING;
418
+ type: import("@awell-health/extensions-core").FieldType.DATE;
404
419
  required: true;
405
420
  };
406
- patientId: {
421
+ reason: {
407
422
  id: string;
408
423
  label: string;
409
424
  description: string;
410
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
425
+ type: import("@awell-health/extensions-core").FieldType.STRING;
411
426
  required: true;
412
427
  };
413
428
  physicianId: {
@@ -544,27 +559,13 @@ export declare const actions: {
544
559
  required: true;
545
560
  };
546
561
  }, "reason" | "description" | "patientId" | "duration" | "scheduledDate" | "physicianId" | "practiceId" | "serviceLocationId" | "telehealthDetails", never>;
547
- findPhysician: import("@awell-health/extensions-core").Action<{
548
- firstName: {
549
- id: string;
550
- label: string;
551
- description: string;
552
- type: import("@awell-health/extensions-core").FieldType.STRING;
553
- required: false;
554
- };
555
- lastName: {
562
+ getPhysician: import("@awell-health/extensions-core").Action<{
563
+ physicianId: {
556
564
  id: string;
557
565
  label: string;
566
+ type: import("@awell-health/extensions-core").FieldType.NUMERIC;
567
+ required: true;
558
568
  description: string;
559
- type: import("@awell-health/extensions-core").FieldType.STRING;
560
- required: false;
561
- };
562
- npi: {
563
- id: string;
564
- label: string;
565
- description: string;
566
- type: import("@awell-health/extensions-core").FieldType.STRING;
567
- required: false;
568
569
  };
569
570
  }, {
570
571
  base_url: {
@@ -609,58 +610,23 @@ export declare const actions: {
609
610
  description: string;
610
611
  required: true;
611
612
  };
612
- }, "caregiverPracticeId" | "physicianId" | "physicianFirstName" | "physicianLastName" | "physicianCredentials" | "physicianEmail" | "physicianNPI" | "physicianUserId", never>;
613
- createNonVisitNote: import("@awell-health/extensions-core").Action<{
614
- text: {
615
- id: string;
616
- label: string;
617
- description: string;
618
- type: import("@awell-health/extensions-core").FieldType.TEXT;
619
- required: true;
620
- };
621
- authorId: {
622
- id: string;
623
- label: string;
624
- description: string;
625
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
626
- required: true;
627
- };
628
- patientId: {
629
- id: string;
630
- label: string;
631
- description: string;
632
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
633
- required: true;
634
- };
635
- category: {
613
+ }, "email" | "credentials" | "firstName" | "lastName" | "caregiverPracticeId" | "NPI" | "userId", never>;
614
+ findPhysician: import("@awell-health/extensions-core").Action<{
615
+ firstName: {
636
616
  id: string;
637
617
  label: string;
638
618
  description: string;
639
619
  type: import("@awell-health/extensions-core").FieldType.STRING;
640
620
  required: false;
641
621
  };
642
- practiceId: {
622
+ lastName: {
643
623
  id: string;
644
624
  label: string;
645
625
  description: string;
646
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
626
+ type: import("@awell-health/extensions-core").FieldType.STRING;
647
627
  required: false;
648
628
  };
649
- documentDate: {
650
- id: string;
651
- label: string;
652
- description: string;
653
- type: import("@awell-health/extensions-core").FieldType.DATE;
654
- required: true;
655
- };
656
- chartDate: {
657
- id: string;
658
- label: string;
659
- description: string;
660
- type: import("@awell-health/extensions-core").FieldType.DATE;
661
- required: true;
662
- };
663
- tags: {
629
+ npi: {
664
630
  id: string;
665
631
  label: string;
666
632
  description: string;
@@ -710,42 +676,21 @@ export declare const actions: {
710
676
  description: string;
711
677
  required: true;
712
678
  };
713
- }, "nonVisitNoteId" | "nonVisitNoteBulletId", never>;
714
- updateNonVisitNote: import("@awell-health/extensions-core").Action<{
715
- nonVisitNoteId: {
679
+ }, "caregiverPracticeId" | "physicianId" | "physicianFirstName" | "physicianLastName" | "physicianCredentials" | "physicianEmail" | "physicianNPI" | "physicianUserId", never>;
680
+ createNonVisitNote: import("@awell-health/extensions-core").Action<{
681
+ patientId: {
716
682
  id: string;
717
683
  label: string;
718
684
  description: string;
719
685
  type: import("@awell-health/extensions-core").FieldType.NUMERIC;
720
686
  required: true;
721
687
  };
722
- nonVisitNoteBulletId: {
723
- id: string;
724
- label: string;
725
- description: string;
726
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
727
- required: false;
728
- };
729
- text: {
730
- id: string;
731
- label: string;
732
- description: string;
733
- type: import("@awell-health/extensions-core").FieldType.TEXT;
734
- required: false;
735
- };
736
688
  authorId: {
737
689
  id: string;
738
690
  label: string;
739
691
  description: string;
740
692
  type: import("@awell-health/extensions-core").FieldType.NUMERIC;
741
- required: false;
742
- };
743
- patientId: {
744
- id: string;
745
- label: string;
746
- description: string;
747
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
748
- required: false;
693
+ required: true;
749
694
  };
750
695
  category: {
751
696
  id: string;
@@ -754,33 +699,19 @@ export declare const actions: {
754
699
  type: import("@awell-health/extensions-core").FieldType.STRING;
755
700
  required: false;
756
701
  };
757
- practiceId: {
758
- id: string;
759
- label: string;
760
- description: string;
761
- type: import("@awell-health/extensions-core").FieldType.NUMERIC;
762
- required: false;
763
- };
764
- documentDate: {
765
- id: string;
766
- label: string;
767
- description: string;
768
- type: import("@awell-health/extensions-core").FieldType.DATE;
769
- required: false;
770
- };
771
- chartDate: {
702
+ tags: {
772
703
  id: string;
773
704
  label: string;
774
705
  description: string;
775
- type: import("@awell-health/extensions-core").FieldType.DATE;
706
+ type: import("@awell-health/extensions-core").FieldType.STRING;
776
707
  required: false;
777
708
  };
778
- tags: {
709
+ text: {
779
710
  id: string;
780
711
  label: string;
781
712
  description: string;
782
- type: import("@awell-health/extensions-core").FieldType.STRING;
783
- required: false;
713
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
714
+ required: true;
784
715
  };
785
716
  }, {
786
717
  base_url: {
@@ -825,7 +756,7 @@ export declare const actions: {
825
756
  description: string;
826
757
  required: true;
827
758
  };
828
- }, string, never>;
759
+ }, "nonVisitNoteId" | "nonVisitNoteBulletId", never>;
829
760
  getNonVisitNote: import("@awell-health/extensions-core").Action<{
830
761
  nonVisitNoteId: {
831
762
  id: string;
@@ -8,18 +8,20 @@ const createAppointment_1 = require("./createAppointment");
8
8
  const getAppointment_1 = require("./getAppointment");
9
9
  const findPhysician_1 = require("./findPhysician");
10
10
  const createNonVisitNote_1 = require("./createNonVisitNote");
11
- const updateNonVisitNote_1 = require("./updateNonVisitNote");
11
+ // import { updateNonVisitNote } from './updateNonVisitNote'
12
12
  const getNonVisitNote_1 = require("./getNonVisitNote");
13
13
  const deleteNonVisitNote_1 = require("./deleteNonVisitNote");
14
+ const getPhysician_1 = require("./getPhysician");
14
15
  exports.actions = {
15
16
  getPatient: getPatient_1.getPatient,
16
17
  createPatient: createPatient_1.createPatient,
17
18
  updatePatient: updatePatient_1.updatePatient,
18
19
  createAppointment: createAppointment_1.createAppointment,
19
20
  getAppointment: getAppointment_1.getAppointment,
21
+ getPhysician: getPhysician_1.getPhysician,
20
22
  findPhysician: findPhysician_1.findPhysician,
21
23
  createNonVisitNote: createNonVisitNote_1.createNonVisitNote,
22
- updateNonVisitNote: updateNonVisitNote_1.updateNonVisitNote,
24
+ // updateNonVisitNote, // Disable for now, don't immediately see a use case for this action.
23
25
  getNonVisitNote: getNonVisitNote_1.getNonVisitNote,
24
26
  deleteNonVisitNote: deleteNonVisitNote_1.deleteNonVisitNote,
25
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/index.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,mDAA+C;AAC/C,mDAA+C;AAC/C,2DAAuD;AACvD,qDAAiD;AACjD,mDAA+C;AAC/C,6DAAyD;AACzD,6DAAyD;AACzD,uDAAmD;AACnD,6DAAyD;AAE5C,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,uBAAU;IACV,aAAa,EAAb,6BAAa;IACb,aAAa,EAAb,6BAAa;IACb,iBAAiB,EAAjB,qCAAiB;IACjB,cAAc,EAAd,+BAAc;IACd,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,kBAAkB,EAAlB,uCAAkB;IAClB,eAAe,EAAf,iCAAe;IACf,kBAAkB,EAAlB,uCAAkB;CACnB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/index.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,mDAA+C;AAC/C,mDAA+C;AAC/C,2DAAuD;AACvD,qDAAiD;AACjD,mDAA+C;AAC/C,6DAAyD;AACzD,4DAA4D;AAC5D,uDAAmD;AACnD,6DAAyD;AACzD,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,YAAY,EAAZ,2BAAY;IACZ,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,4FAA4F;IAC5F,eAAe,EAAf,iCAAe;IACf,kBAAkB,EAAlB,uCAAkB;CACnB,CAAA"}
@@ -13,42 +13,42 @@ declare const fields: {
13
13
  label: string;
14
14
  description: string;
15
15
  type: FieldType.STRING;
16
- required: true;
16
+ required: false;
17
17
  };
18
18
  lastName: {
19
19
  id: string;
20
20
  label: string;
21
21
  description: string;
22
22
  type: FieldType.STRING;
23
- required: true;
23
+ required: false;
24
24
  };
25
25
  dob: {
26
26
  id: string;
27
27
  label: string;
28
28
  description: string;
29
- type: FieldType.STRING;
30
- required: true;
29
+ type: FieldType.DATE;
30
+ required: false;
31
31
  };
32
32
  sex: {
33
33
  id: string;
34
34
  label: string;
35
35
  description: string;
36
36
  type: FieldType.STRING;
37
- required: true;
37
+ required: false;
38
38
  };
39
39
  primaryPhysicianId: {
40
40
  id: string;
41
41
  label: string;
42
42
  description: string;
43
43
  type: FieldType.NUMERIC;
44
- required: true;
44
+ required: false;
45
45
  };
46
46
  caregiverPracticeId: {
47
47
  id: string;
48
48
  label: string;
49
49
  description: string;
50
50
  type: FieldType.NUMERIC;
51
- required: true;
51
+ required: false;
52
52
  };
53
53
  middleName: {
54
54
  id: string;
@@ -13,80 +13,80 @@ const fields = {
13
13
  patientId: {
14
14
  id: 'patientId',
15
15
  label: 'Patient ID',
16
- description: 'The patient ID (a number)',
16
+ description: 'The ID of the patient in Elation',
17
17
  type: extensions_core_1.FieldType.NUMERIC,
18
18
  required: true,
19
19
  },
20
20
  firstName: {
21
21
  id: 'firstName',
22
22
  label: 'First Name',
23
- description: 'Maximum length of 70 characters',
23
+ description: '',
24
24
  type: extensions_core_1.FieldType.STRING,
25
- required: true,
25
+ required: false,
26
26
  },
27
27
  lastName: {
28
28
  id: 'lastName',
29
29
  label: 'Last Name',
30
- description: 'Maximum length of 70 characters',
30
+ description: '',
31
31
  type: extensions_core_1.FieldType.STRING,
32
- required: true,
32
+ required: false,
33
33
  },
34
34
  dob: {
35
35
  id: 'dob',
36
36
  label: 'Date of Birth',
37
- description: 'Date of Birth (YYYY-MM-DD)',
38
- type: extensions_core_1.FieldType.STRING,
39
- required: true,
37
+ description: 'YYYY-MM-DD',
38
+ type: extensions_core_1.FieldType.DATE,
39
+ required: false,
40
40
  },
41
41
  sex: {
42
42
  id: 'sex',
43
43
  label: 'Sex',
44
- description: "Sex of a patient. Possible values are 'Male', 'Female', 'Other', 'Unknown'",
44
+ description: "Possible values are 'Male', 'Female', 'Other', 'Unknown'",
45
45
  type: extensions_core_1.FieldType.STRING,
46
- required: true,
46
+ required: false,
47
47
  },
48
48
  primaryPhysicianId: {
49
49
  id: 'primaryPhysicianId',
50
50
  label: 'Primary Physician ID',
51
- description: '',
51
+ description: 'The ID of the primary physician associated to the patient',
52
52
  type: extensions_core_1.FieldType.NUMERIC,
53
- required: true,
53
+ required: false,
54
54
  },
55
55
  caregiverPracticeId: {
56
56
  id: 'caregiverPracticeId',
57
57
  label: 'Caregiver Practice ID',
58
58
  description: '',
59
59
  type: extensions_core_1.FieldType.NUMERIC,
60
- required: true,
60
+ required: false,
61
61
  },
62
62
  middleName: {
63
63
  id: 'middleName',
64
64
  label: 'Middle Name',
65
- description: 'Maximum length of 50 characters',
65
+ description: '',
66
66
  type: extensions_core_1.FieldType.STRING,
67
67
  },
68
68
  actualName: {
69
69
  id: 'actualName',
70
70
  label: 'Actual Name',
71
- description: 'Maximum length of 150 characters',
71
+ description: '',
72
72
  type: extensions_core_1.FieldType.STRING,
73
73
  },
74
74
  genderIdentity: {
75
75
  id: 'genderIdentity',
76
76
  label: 'Gender identity',
77
- description: "Gender identity of a patient. Possible values are 'unknown', 'man', 'woman', 'transgender_man', 'transgender_woman', 'nonbinary', 'option_not_listed', 'prefer_not_to_say', 'two_spirit'",
77
+ description: "Possible values are 'unknown', 'man', 'woman', 'transgender_man', 'transgender_woman', 'nonbinary', 'option_not_listed', 'prefer_not_to_say', 'two_spirit'",
78
78
  type: extensions_core_1.FieldType.STRING,
79
79
  },
80
80
  legalGenderMarker: {
81
81
  id: 'legalGenderMarker',
82
82
  label: 'Legal gender marker',
83
- description: "Legal gender marker of a patient. Possible values are 'M', 'F', 'X', 'U'",
83
+ description: "Possible values are 'M', 'F', 'X', 'U'",
84
84
  type: extensions_core_1.FieldType.STRING,
85
85
  },
86
86
  pronouns: {
87
87
  id: 'pronouns',
88
88
  label: 'Pronouns',
89
- description: "Pronouns by which a patient identifies self. Possible values are 'he_him_his', 'she_her_hers', 'they_them_theirs', 'not_listed'",
89
+ description: "Possible values are 'he_him_his', 'she_her_hers', 'they_them_theirs', 'not_listed'",
90
90
  type: extensions_core_1.FieldType.STRING,
91
91
  },
92
92
  sexualOrientation: {
@@ -98,31 +98,31 @@ const fields = {
98
98
  ssn: {
99
99
  id: 'ssn',
100
100
  label: 'SSN',
101
- description: 'Social Security number. A number with 9 digits',
101
+ description: 'The Social Security number of the patient',
102
102
  type: extensions_core_1.FieldType.STRING,
103
103
  },
104
104
  ethnicity: {
105
105
  id: 'ethnicity',
106
106
  label: 'Ethnicity',
107
- description: "The ethnicity of the person. Possible values are 'No ethnicity specified', 'Hispanic or Latino', 'Not Hispanic or Latino', 'Declined to specify'.",
107
+ description: "Possible values are 'No ethnicity specified', 'Hispanic or Latino', 'Not Hispanic or Latino', 'Declined to specify'.",
108
108
  type: extensions_core_1.FieldType.STRING,
109
109
  },
110
110
  race: {
111
111
  id: 'race',
112
112
  label: 'Race',
113
- description: "The race of the person. Possible values are 'No race specified', 'American Indian or Alaska Native', 'Asian', 'Black or African American', 'Native Hawaiian or Other Pacific Islander', 'White', 'Declined to specify'.",
113
+ description: "Possible values are 'No race specified', 'American Indian or Alaska Native', 'Asian', 'Black or African American', 'Native Hawaiian or Other Pacific Islander', 'White', 'Declined to specify'.",
114
114
  type: extensions_core_1.FieldType.STRING,
115
115
  },
116
116
  preferredLanguage: {
117
117
  id: 'preferredLanguage',
118
118
  label: 'Preferred language',
119
- description: "The language preferred by the patient. Full names e.g. 'English', 'Spanish' or 'French'.",
119
+ description: "Full names e.g. 'English', 'Spanish' or 'French'.",
120
120
  type: extensions_core_1.FieldType.STRING,
121
121
  },
122
122
  notes: {
123
123
  id: 'notes',
124
124
  label: 'Notes',
125
- description: 'Additional notes about the patient. Maximum length of 500 characters.',
125
+ description: 'Additional notes about the patient.',
126
126
  type: extensions_core_1.FieldType.STRING,
127
127
  },
128
128
  previousFirstName: {
@@ -151,7 +151,7 @@ exports.updatePatient = {
151
151
  var _a, _b;
152
152
  try {
153
153
  const { patientId, firstName, lastName, actualName, caregiverPracticeId, genderIdentity, legalGenderMarker, middleName, preferredLanguage, previousFirstName, previousLastName, primaryPhysicianId, sexualOrientation, ...fields } = payload.fields;
154
- const patient = patient_zod_1.patientSchema.parse({
154
+ const patient = patient_zod_1.updatePatientSchema.parse({
155
155
  ...fields,
156
156
  first_name: firstName,
157
157
  last_name: lastName,
@@ -167,9 +167,20 @@ exports.updatePatient = {
167
167
  previous_last_name: previousLastName,
168
168
  });
169
169
  const id = extensions_core_1.NumericIdSchema.parse(patientId);
170
- // API Call should produce AuthError or something dif.
170
+ /** We only want to patch the fields that are not undefined or null so
171
+ * we know the update is intentional. I.e. if the builder doesn't set
172
+ * a value for any action field besides the patient ID (which is required)
173
+ * then we are updating nothing.
174
+ **/
175
+ const updatedPatientFields = Object.entries(patient).reduce((acc, [key, value]) => {
176
+ if (value !== null && value !== undefined) {
177
+ // @ts-expect-error this is just fine
178
+ acc[key] = value;
179
+ }
180
+ return acc;
181
+ }, {});
171
182
  const api = (0, client_1.makeAPIClient)(payload.settings);
172
- await api.updatePatient(id, patient);
183
+ await api.updatePatient(id, updatedPatientFields);
173
184
  await onComplete();
174
185
  }
175
186
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"updatePatient.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/updatePatient.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,6BAA8B;AAC9B,mEAMsC;AACtC,mEAAwD;AAExD,sCAAyC;AACzC,+DAAmD;AACnD,iCAAkC;AAClC,2DAAyD;AAEzD,MAAM,M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AM,mCAAI,kBAAkB,WAC1C,GAAG,CAAC,OACN,EAAE;6BACH;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAA;gBACtC,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;4BACrB,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO;6BACR;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"updatePatient.js","sourceRoot":"","sources":["../../../../extensions/elation/actions/updatePatient.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,6BAA8B;AAC9B,mEAMsC;AACtC,mEAAwD;AAExD,sCAAyC;AACzC,+DAAmD;AACnD,iCAAkC;AAClC,2DAA+D;AAE/D,MAAM,MAAM,GAAG;IACb,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,kCAAkC;QAC/C,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,2BA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,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;4BACrB,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO;6BACR;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
@@ -2,7 +2,7 @@ import { APIClient, DataWrapper, type DataWrapperCtor, type OAuthGrantPasswordRe
2
2
  import { type settings } from './settings';
3
3
  import { type AppointmentInput, type AppointmentResponse } from './types/appointment';
4
4
  import { type ElationCollection } from './types/generic';
5
- import { type PatientInput, type PatientResponse } from './types/patient';
5
+ import { type PatientInput, type PatientResponse, type UpdatePatientInput } from './types/patient';
6
6
  import { type Subscription, type SubscriptionRequest } from './types/subscription';
7
7
  import { type PhysicianResponse } from './types/physician';
8
8
  import { type NonVisitNoteInput, type NonVisitNoteResponse } from './types/nonVisitNote';
@@ -11,10 +11,11 @@ export declare class ElationDataWrapper extends DataWrapper {
11
11
  createAppointment(obj: Partial<AppointmentInput>): Promise<AppointmentResponse>;
12
12
  getPatient(id: number): Promise<PatientResponse>;
13
13
  createPatient(obj: Partial<PatientInput>): Promise<PatientResponse>;
14
- updatePatient(id: number, obj: Partial<PatientInput>): Promise<PatientResponse>;
14
+ updatePatient(id: number, obj: Partial<UpdatePatientInput>): Promise<PatientResponse>;
15
15
  findSubscriptions(): Promise<Subscription[]>;
16
16
  createSubscription(obj: SubscriptionRequest): Promise<Subscription>;
17
17
  deleteSubscription(id: number): Promise<void>;
18
+ getPhysician(id: number): Promise<PhysicianResponse>;
18
19
  findPhysicians({ params, }: {
19
20
  params?: {
20
21
  first_name?: string;
@@ -39,10 +40,11 @@ export declare class ElationAPIClient extends APIClient<ElationDataWrapper> {
39
40
  createAppointment(obj: Partial<AppointmentInput>): Promise<AppointmentResponse>;
40
41
  getPatient(id: number): Promise<PatientResponse>;
41
42
  createPatient(obj: Partial<PatientInput>): Promise<PatientResponse>;
42
- updatePatient(id: number, obj: Partial<PatientInput>): Promise<PatientResponse>;
43
+ updatePatient(id: number, obj: Partial<UpdatePatientInput>): Promise<PatientResponse>;
43
44
  findSubscriptions(): Promise<Subscription[]>;
44
45
  createSubscription(obj: SubscriptionRequest): Promise<Subscription>;
45
46
  deleteSubscription(id: number): Promise<void>;
47
+ getPhysician(id: number): Promise<PhysicianResponse>;
46
48
  findPhysicians({ params, }: {
47
49
  params?: {
48
50
  first_name?: string;
@@ -41,7 +41,7 @@ class ElationDataWrapper extends extensions_core_1.DataWrapper {
41
41
  }
42
42
  async updatePatient(id, obj) {
43
43
  const req = this.Request({
44
- method: 'PUT',
44
+ method: 'PATCH',
45
45
  url: `/patients/${id}`,
46
46
  data: obj,
47
47
  });
@@ -72,6 +72,14 @@ class ElationDataWrapper extends extensions_core_1.DataWrapper {
72
72
  });
73
73
  await req;
74
74
  }
75
+ async getPhysician(id) {
76
+ const req = this.Request({
77
+ method: 'GET',
78
+ url: `/physicians/${id}`,
79
+ });
80
+ const res = await req;
81
+ return res;
82
+ }
75
83
  async findPhysicians({ params, }) {
76
84
  return await this.Request({
77
85
  method: 'GET',
@@ -146,6 +154,9 @@ class ElationAPIClient extends extensions_core_1.APIClient {
146
154
  await dw.deleteSubscription(id);
147
155
  });
148
156
  }
157
+ async getPhysician(id) {
158
+ return await this.FetchData(async (dw) => await dw.getPhysician(id));
159
+ }
149
160
  async findPhysicians({ params, }) {
150
161
  return await this.FetchData(async (dw) => await dw.findPhysicians({ params }));
151
162
  }