@awell-health/awell-extensions 2.0.144 → 2.0.146

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/dist/extensions/elation/actions/findAppointmentsByPrompt/findAppointmentsByPrompt.js +16 -5
  2. package/dist/extensions/elation/actions/findAppointmentsByPrompt/findAppointmentsByPrompt.js.map +1 -1
  3. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.js +11 -3
  4. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.js.map +1 -1
  5. package/dist/extensions/epic/actions/createClinicalNote/__testdata__/CreateClinicalNote.mock.d.ts +8 -0
  6. package/dist/extensions/epic/actions/createClinicalNote/__testdata__/CreateClinicalNote.mock.js +12 -0
  7. package/dist/extensions/epic/actions/createClinicalNote/__testdata__/CreateClinicalNote.mock.js.map +1 -0
  8. package/dist/extensions/epic/actions/createClinicalNote/config/datapoints.d.ts +6 -1
  9. package/dist/extensions/epic/actions/createClinicalNote/config/datapoints.js +6 -1
  10. package/dist/extensions/epic/actions/createClinicalNote/config/datapoints.js.map +1 -1
  11. package/dist/extensions/epic/actions/createClinicalNote/config/fields.d.ts +66 -2
  12. package/dist/extensions/epic/actions/createClinicalNote/config/fields.js +56 -2
  13. package/dist/extensions/epic/actions/createClinicalNote/config/fields.js.map +1 -1
  14. package/dist/extensions/epic/actions/createClinicalNote/createClinicalNote.js +66 -1
  15. package/dist/extensions/epic/actions/createClinicalNote/createClinicalNote.js.map +1 -1
  16. package/dist/extensions/epic/actions/createPatient/__testdata__/CreateFhirPatient.mock.d.ts +8 -0
  17. package/dist/extensions/epic/actions/createPatient/__testdata__/CreateFhirPatient.mock.js +12 -0
  18. package/dist/extensions/epic/actions/createPatient/__testdata__/CreateFhirPatient.mock.js.map +1 -0
  19. package/dist/extensions/epic/actions/createPatient/config/datapoints.d.ts +6 -1
  20. package/dist/extensions/epic/actions/createPatient/config/datapoints.js +6 -1
  21. package/dist/extensions/epic/actions/createPatient/config/datapoints.js.map +1 -1
  22. package/dist/extensions/epic/actions/createPatient/config/fields.d.ts +70 -2
  23. package/dist/extensions/epic/actions/createPatient/config/fields.js +61 -2
  24. package/dist/extensions/epic/actions/createPatient/config/fields.js.map +1 -1
  25. package/dist/extensions/epic/actions/createPatient/createPatient.js +61 -1
  26. package/dist/extensions/epic/actions/createPatient/createPatient.js.map +1 -1
  27. package/dist/extensions/epic/actions/getAppointment/__testdata__/GetAppointment.mock.d.ts +52 -0
  28. package/dist/extensions/epic/actions/getAppointment/__testdata__/GetAppointment.mock.js +94 -0
  29. package/dist/extensions/epic/actions/getAppointment/__testdata__/GetAppointment.mock.js.map +1 -0
  30. package/dist/extensions/epic/actions/getAppointment/config/datapoints.d.ts +22 -1
  31. package/dist/extensions/epic/actions/getAppointment/config/datapoints.js +22 -1
  32. package/dist/extensions/epic/actions/getAppointment/config/datapoints.js.map +1 -1
  33. package/dist/extensions/epic/actions/getAppointment/config/fields.d.ts +17 -2
  34. package/dist/extensions/epic/actions/getAppointment/config/fields.js +13 -2
  35. package/dist/extensions/epic/actions/getAppointment/config/fields.js.map +1 -1
  36. package/dist/extensions/epic/actions/getAppointment/getAppointment.js +38 -1
  37. package/dist/extensions/epic/actions/getAppointment/getAppointment.js.map +1 -1
  38. package/dist/extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.d.ts +90 -0
  39. package/dist/extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.js +189 -0
  40. package/dist/extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.js.map +1 -0
  41. package/dist/extensions/epic/actions/getPatient/config/datapoints.d.ts +6 -1
  42. package/dist/extensions/epic/actions/getPatient/config/datapoints.js +6 -1
  43. package/dist/extensions/epic/actions/getPatient/config/datapoints.js.map +1 -1
  44. package/dist/extensions/epic/actions/getPatient/config/fields.d.ts +17 -2
  45. package/dist/extensions/epic/actions/getPatient/config/fields.js +13 -2
  46. package/dist/extensions/epic/actions/getPatient/config/fields.js.map +1 -1
  47. package/dist/extensions/epic/actions/getPatient/getPatient.js +31 -1
  48. package/dist/extensions/epic/actions/getPatient/getPatient.js.map +1 -1
  49. package/dist/extensions/epic/actions/index.d.ts +296 -4
  50. package/dist/extensions/epic/actions/index.js +2 -0
  51. package/dist/extensions/epic/actions/index.js.map +1 -1
  52. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientMatch.mock.d.ts +114 -0
  53. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientMatch.mock.js +221 -0
  54. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientMatch.mock.js.map +1 -0
  55. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientNoMatch.mock.d.ts +14 -0
  56. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientNoMatch.mock.js +22 -0
  57. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientNoMatch.mock.js.map +1 -0
  58. package/dist/extensions/epic/actions/matchPatient/__testdata__/index.d.ts +2 -0
  59. package/dist/extensions/epic/actions/matchPatient/__testdata__/index.js +19 -0
  60. package/dist/extensions/epic/actions/matchPatient/__testdata__/index.js.map +1 -0
  61. package/dist/extensions/epic/actions/matchPatient/config/datapoints.d.ts +6 -0
  62. package/dist/extensions/epic/actions/matchPatient/config/datapoints.js +10 -0
  63. package/dist/extensions/epic/actions/matchPatient/config/datapoints.js.map +1 -0
  64. package/dist/extensions/epic/actions/matchPatient/config/fields.d.ts +61 -0
  65. package/dist/extensions/epic/actions/matchPatient/config/fields.js +58 -0
  66. package/dist/extensions/epic/actions/matchPatient/config/fields.js.map +1 -0
  67. package/dist/extensions/epic/actions/matchPatient/config/index.d.ts +2 -0
  68. package/dist/extensions/epic/actions/matchPatient/config/index.js +9 -0
  69. package/dist/extensions/epic/actions/matchPatient/config/index.js.map +1 -0
  70. package/dist/extensions/epic/actions/matchPatient/index.d.ts +1 -0
  71. package/dist/extensions/epic/actions/matchPatient/index.js +6 -0
  72. package/dist/extensions/epic/actions/matchPatient/index.js.map +1 -0
  73. package/dist/extensions/epic/actions/matchPatient/matchPatient.d.ts +4 -0
  74. package/dist/extensions/epic/actions/matchPatient/matchPatient.js +87 -0
  75. package/dist/extensions/epic/actions/matchPatient/matchPatient.js.map +1 -0
  76. package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.d.ts +26 -0
  77. package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.js +121 -0
  78. package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.js.map +1 -0
  79. package/dist/extensions/epic/lib/api/FhirR4/index.d.ts +1 -0
  80. package/dist/extensions/epic/lib/api/FhirR4/index.js +18 -0
  81. package/dist/extensions/epic/lib/api/FhirR4/index.js.map +1 -0
  82. package/dist/extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.d.ts +9 -0
  83. package/dist/extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.js +6 -0
  84. package/dist/extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.js.map +1 -0
  85. package/dist/extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.d.ts +7 -0
  86. package/dist/extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.js +3 -0
  87. package/dist/extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.js.map +1 -0
  88. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.d.ts +7 -0
  89. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.js +3 -0
  90. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.js.map +1 -0
  91. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.d.ts +37 -0
  92. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.js +3 -0
  93. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.js.map +1 -0
  94. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.d.ts +9 -0
  95. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.js +6 -0
  96. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.js.map +1 -0
  97. package/dist/extensions/epic/lib/api/FhirR4/schema/index.d.ts +5 -0
  98. package/dist/extensions/epic/lib/api/FhirR4/schema/index.js +22 -0
  99. package/dist/extensions/epic/lib/api/FhirR4/schema/index.js.map +1 -0
  100. package/dist/extensions/epic/lib/api/auth/generateJWT/generateJWT.d.ts +8 -0
  101. package/dist/extensions/epic/lib/api/auth/generateJWT/generateJWT.js +38 -0
  102. package/dist/extensions/epic/lib/api/auth/generateJWT/generateJWT.js.map +1 -0
  103. package/dist/extensions/epic/lib/api/auth/generateJWT/index.d.ts +1 -0
  104. package/dist/extensions/epic/lib/api/auth/generateJWT/index.js +18 -0
  105. package/dist/extensions/epic/lib/api/auth/generateJWT/index.js.map +1 -0
  106. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.d.ts +2 -0
  107. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.js +17 -0
  108. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.js.map +1 -0
  109. package/dist/extensions/epic/lib/api/schemas/Appointment/index.d.ts +1 -0
  110. package/dist/extensions/epic/lib/api/schemas/Appointment/index.js +18 -0
  111. package/dist/extensions/epic/lib/api/schemas/Appointment/index.js.map +1 -0
  112. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.d.ts +2 -0
  113. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.js +6 -0
  114. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.js.map +1 -0
  115. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.d.ts +9 -0
  116. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.js +28 -0
  117. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.js.map +1 -0
  118. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.d.ts +2 -0
  119. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.js +19 -0
  120. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.js.map +1 -0
  121. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.d.ts +2 -0
  122. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.js +6 -0
  123. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.js.map +1 -0
  124. package/dist/extensions/epic/lib/api/schemas/Patient/index.d.ts +1 -0
  125. package/dist/extensions/epic/lib/api/schemas/Patient/index.js +18 -0
  126. package/dist/extensions/epic/lib/api/schemas/Patient/index.js.map +1 -0
  127. package/dist/extensions/epic/lib/validatePayloadAndCreateSdks.d.ts +18 -0
  128. package/dist/extensions/epic/lib/validatePayloadAndCreateSdks.js +31 -0
  129. package/dist/extensions/epic/lib/validatePayloadAndCreateSdks.js.map +1 -0
  130. package/dist/extensions/epic/settings.d.ts +46 -2
  131. package/dist/extensions/epic/settings.js +36 -2
  132. package/dist/extensions/epic/settings.js.map +1 -1
  133. package/package.json +3 -1
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FhirPatient = void 0;
4
+ exports.FhirPatient = {
5
+ resourceType: 'Patient',
6
+ id: 'ePYvjhzgI56-88pdl89yRRQ3',
7
+ meta: {
8
+ security: [
9
+ {
10
+ system: 'http://terminology.hl7.org/CodeSystem/v3-ObservationValue',
11
+ code: 'PATRPT',
12
+ display: 'patient reported',
13
+ },
14
+ {
15
+ system: 'http://terminology.hl7.org/CodeSystem/v3-ObservationValue',
16
+ code: 'UNCERTREL',
17
+ display: 'uncertain reliability',
18
+ },
19
+ ],
20
+ },
21
+ extension: [
22
+ {
23
+ valueCodeableConcept: {
24
+ coding: [
25
+ {
26
+ system: 'urn:oid:1.2.840.114350.1.13.0.1.7.10.698084.130.657370.19999000',
27
+ code: 'male',
28
+ display: 'male',
29
+ },
30
+ ],
31
+ },
32
+ url: 'http://open.epic.com/FHIR/StructureDefinition/extension/legal-sex',
33
+ },
34
+ {
35
+ valueCodeableConcept: {
36
+ coding: [
37
+ {
38
+ system: 'urn:oid:1.2.840.114350.1.13.0.1.7.10.698084.130.657370.19999000',
39
+ code: 'male',
40
+ display: 'male',
41
+ },
42
+ ],
43
+ },
44
+ url: 'http://open.epic.com/FHIR/StructureDefinition/extension/sex-for-clinical-use',
45
+ },
46
+ {
47
+ extension: [
48
+ {
49
+ valueCoding: {
50
+ system: 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor',
51
+ code: 'UNK',
52
+ display: 'Unknown',
53
+ },
54
+ url: 'ombCategory',
55
+ },
56
+ {
57
+ valueString: 'Unknown',
58
+ url: 'text',
59
+ },
60
+ ],
61
+ url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race',
62
+ },
63
+ {
64
+ extension: [
65
+ {
66
+ valueString: 'Unknown',
67
+ url: 'text',
68
+ },
69
+ ],
70
+ url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity',
71
+ },
72
+ {
73
+ valueCode: '248153007',
74
+ url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex',
75
+ },
76
+ {
77
+ valueCodeableConcept: {
78
+ coding: [
79
+ {
80
+ system: 'http://loinc.org',
81
+ code: 'LA29518-0',
82
+ display: 'he/him/his/his/himself',
83
+ },
84
+ ],
85
+ },
86
+ url: 'http://open.epic.com/FHIR/StructureDefinition/extension/calculated-pronouns-to-use-for-text',
87
+ },
88
+ ],
89
+ identifier: [
90
+ {
91
+ use: 'usual',
92
+ type: {
93
+ text: 'CEID',
94
+ },
95
+ system: 'urn:oid:1.2.840.114350.1.13.0.1.7.3.688884.100',
96
+ value: 'FHR8V9S9K9VSTNT',
97
+ },
98
+ {
99
+ use: 'usual',
100
+ type: {
101
+ text: 'EPIC',
102
+ },
103
+ system: 'urn:oid:1.2.840.114350.1.13.0.1.7.5.737384.0',
104
+ value: 'E11629',
105
+ },
106
+ {
107
+ use: 'usual',
108
+ type: {
109
+ text: 'EXTERNAL',
110
+ },
111
+ system: 'urn:oid:1.2.840.114350.1.13.0.1.7.2.698084',
112
+ value: 'Z6315',
113
+ },
114
+ {
115
+ use: 'usual',
116
+ type: {
117
+ text: 'FHIR',
118
+ },
119
+ system: 'http://open.epic.com/FHIR/StructureDefinition/patient-dstu2-fhir-id',
120
+ value: 'TmZzIDkISjanyXDdAa7StWPQ3I4sWpHFnQqef3.cSGcAB',
121
+ },
122
+ {
123
+ use: 'usual',
124
+ type: {
125
+ text: 'FHIR STU3',
126
+ },
127
+ system: 'http://open.epic.com/FHIR/StructureDefinition/patient-fhir-id',
128
+ value: 'ePYvjhzgI56-88pdl89yRRQ3',
129
+ },
130
+ {
131
+ use: 'usual',
132
+ type: {
133
+ text: 'INTERNAL',
134
+ },
135
+ system: 'urn:oid:1.2.840.114350.1.13.0.1.7.2.698084',
136
+ value: ' Z6315',
137
+ },
138
+ {
139
+ use: 'usual',
140
+ system: 'urn:oid:2.16.840.1.113883.4.1',
141
+ _value: {
142
+ extension: [
143
+ {
144
+ valueString: 'xxx-xx-6669',
145
+ url: 'http://hl7.org/fhir/StructureDefinition/rendered-value',
146
+ },
147
+ ],
148
+ },
149
+ },
150
+ ],
151
+ active: true,
152
+ name: [
153
+ {
154
+ use: 'official',
155
+ text: 'Nick Test',
156
+ family: 'Test',
157
+ given: ['Nick'],
158
+ },
159
+ {
160
+ use: 'usual',
161
+ text: 'Nick Test',
162
+ family: 'Test',
163
+ given: ['Nick'],
164
+ },
165
+ ],
166
+ telecom: [
167
+ {
168
+ system: 'email',
169
+ value: 'nick@awellhealth.com',
170
+ rank: 1,
171
+ },
172
+ ],
173
+ gender: 'male',
174
+ birthDate: '1993-11-30',
175
+ deceasedBoolean: false,
176
+ address: [
177
+ {
178
+ use: 'home',
179
+ line: ['100 Milky Way', 'Learning Campus'],
180
+ city: 'Verona',
181
+ state: 'WI',
182
+ postalCode: '53593',
183
+ period: {
184
+ start: '2025-01-20',
185
+ },
186
+ },
187
+ ],
188
+ };
189
+ //# sourceMappingURL=FhirPatient.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FhirPatient.mock.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.ts"],"names":[],"mappings":"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"}
@@ -1 +1,6 @@
1
- export declare const dataPoints: {};
1
+ export declare const dataPoints: {
2
+ patient: {
3
+ key: string;
4
+ valueType: "json";
5
+ };
6
+ };
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dataPoints = void 0;
4
- exports.dataPoints = {};
4
+ exports.dataPoints = {
5
+ patient: {
6
+ key: 'patient',
7
+ valueType: 'json',
8
+ },
9
+ };
5
10
  //# sourceMappingURL=datapoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/getPatient/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/getPatient/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
@@ -1,3 +1,18 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
1
2
  import z from 'zod';
2
- export declare const fields: {};
3
- export declare const FieldsValidationSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3
+ export declare const fields: {
4
+ resourceId: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: true;
10
+ };
11
+ };
12
+ export declare const FieldsValidationSchema: z.ZodObject<{
13
+ resourceId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ resourceId: string;
16
+ }, {
17
+ resourceId: string;
18
+ }>;
@@ -4,7 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FieldsValidationSchema = exports.fields = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
7
8
  const zod_1 = __importDefault(require("zod"));
8
- exports.fields = {};
9
- exports.FieldsValidationSchema = zod_1.default.object({});
9
+ exports.fields = {
10
+ resourceId: {
11
+ id: 'resourceId',
12
+ label: 'Patient resource ID',
13
+ description: 'The resource ID of the patient',
14
+ type: extensions_core_1.FieldType.STRING,
15
+ required: true,
16
+ },
17
+ };
18
+ exports.FieldsValidationSchema = zod_1.default.object({
19
+ resourceId: zod_1.default.string().min(1),
20
+ });
10
21
  //# sourceMappingURL=fields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/getPatient/config/fields.ts"],"names":[],"mappings":";;;;;;AACA,8CAAwC;AAE3B,QAAA,MAAM,GAAG,EAAkC,CAAA;AAE3C,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC,EAAoD,CAAC,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/getPatient/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACoB,CAAC,CAAA"}
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPatient = void 0;
4
4
  const extensions_core_1 = require("@awell-health/extensions-core");
5
5
  const config_1 = require("./config");
6
+ const validatePayloadAndCreateSdks_1 = require("../../lib/validatePayloadAndCreateSdks");
7
+ const axios_1 = require("axios");
8
+ const awell_1 = require("../../../../src/lib/awell");
6
9
  exports.getPatient = {
7
10
  key: 'getPatient',
8
11
  category: extensions_core_1.Category.EHR_INTEGRATIONS,
@@ -12,7 +15,34 @@ exports.getPatient = {
12
15
  previewable: false,
13
16
  dataPoints: config_1.dataPoints,
14
17
  onEvent: async ({ payload, onComplete, onError }) => {
15
- await onComplete();
18
+ const { epicFhirR4Sdk, fields: { resourceId }, } = await (0, validatePayloadAndCreateSdks_1.validatePayloadAndCreateSdks)({
19
+ fieldsSchema: config_1.FieldsValidationSchema,
20
+ payload,
21
+ });
22
+ try {
23
+ const res = await epicFhirR4Sdk.getPatient(resourceId);
24
+ await onComplete({
25
+ data_points: {
26
+ patient: JSON.stringify(res.data),
27
+ },
28
+ });
29
+ }
30
+ catch (error) {
31
+ if (error instanceof axios_1.AxiosError) {
32
+ const err = error;
33
+ if (err.status === 404)
34
+ await onError({
35
+ events: [
36
+ (0, awell_1.addActivityEventLog)({
37
+ message: 'Patient not found',
38
+ }),
39
+ ],
40
+ });
41
+ return;
42
+ }
43
+ // Throw all other errors
44
+ throw error;
45
+ }
16
46
  },
17
47
  };
18
48
  //# sourceMappingURL=getPatient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPatient.js","sourceRoot":"","sources":["../../../../../extensions/epic/actions/getPatient/getPatient.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAA6C;AAEhC,QAAA,UAAU,GAInB;IACF,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAC,EAAiB,EAAE;QAC/D,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"getPatient.js","sourceRoot":"","sources":["../../../../../extensions/epic/actions/getPatient/getPatient.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,yFAAqF;AACrF,iCAAkC;AAClC,qDAA+D;AAElD,QAAA,UAAU,GAInB;IACF,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,oCAAoC;IACjD,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,EACJ,aAAa,EACb,MAAM,EAAE,EAAE,UAAU,EAAE,GACvB,GAAG,MAAM,IAAA,2DAA4B,EAAC;YACrC,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;YAEtD,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE;oBACX,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;iBAClC;aACF,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,kBAAU,EAAE,CAAC;gBAChC,MAAM,GAAG,GAAG,KAAmB,CAAA;gBAE/B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;oBACpB,MAAM,OAAO,CAAC;wBACZ,MAAM,EAAE;4BACN,IAAA,2BAAmB,EAAC;gCAClB,OAAO,EAAE,mBAAmB;6BAC7B,CAAC;yBACH;qBACF,CAAC,CAAA;gBACJ,OAAM;YACR,CAAC;YAED,yBAAyB;YACzB,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -1,7 +1,299 @@
1
1
  declare const actions: {
2
- getPatient: import("@awell-health/extensions-core").Action<{}, {}, never>;
3
- getAppointment: import("@awell-health/extensions-core").Action<{}, {}, never>;
4
- createPatient: import("@awell-health/extensions-core").Action<{}, {}, never>;
5
- createClinicalNote: import("@awell-health/extensions-core").Action<{}, {}, never>;
2
+ getPatient: import("@awell-health/extensions-core").Action<{
3
+ resourceId: {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ type: import("@awell-health/extensions-core").FieldType.STRING;
8
+ required: true;
9
+ };
10
+ }, {
11
+ baseUrl: {
12
+ key: string;
13
+ label: string;
14
+ required: true;
15
+ obfuscated: false;
16
+ description: string;
17
+ };
18
+ authUrl: {
19
+ key: string;
20
+ label: string;
21
+ required: true;
22
+ obfuscated: false;
23
+ description: string;
24
+ };
25
+ clientId: {
26
+ key: string;
27
+ label: string;
28
+ required: true;
29
+ obfuscated: false;
30
+ description: string;
31
+ };
32
+ privateKey: {
33
+ key: string;
34
+ label: string;
35
+ required: true;
36
+ obfuscated: true;
37
+ description: string;
38
+ };
39
+ }, "patient">;
40
+ getAppointment: import("@awell-health/extensions-core").Action<{
41
+ resourceId: {
42
+ id: string;
43
+ label: string;
44
+ description: string;
45
+ type: import("@awell-health/extensions-core").FieldType.STRING;
46
+ required: true;
47
+ };
48
+ }, {
49
+ baseUrl: {
50
+ key: string;
51
+ label: string;
52
+ required: true;
53
+ obfuscated: false;
54
+ description: string;
55
+ };
56
+ authUrl: {
57
+ key: string;
58
+ label: string;
59
+ required: true;
60
+ obfuscated: false;
61
+ description: string;
62
+ };
63
+ clientId: {
64
+ key: string;
65
+ label: string;
66
+ required: true;
67
+ obfuscated: false;
68
+ description: string;
69
+ };
70
+ privateKey: {
71
+ key: string;
72
+ label: string;
73
+ required: true;
74
+ obfuscated: true;
75
+ description: string;
76
+ };
77
+ }, "patientId" | "appointment" | "appointmentStatus" | "appointmentStartDateTime" | "appointmentTypeCode">;
78
+ createPatient: import("@awell-health/extensions-core").Action<{
79
+ ssn: {
80
+ id: string;
81
+ label: string;
82
+ type: import("@awell-health/extensions-core").FieldType.STRING;
83
+ description: string;
84
+ required: true;
85
+ };
86
+ familyName: {
87
+ id: string;
88
+ label: string;
89
+ type: import("@awell-health/extensions-core").FieldType.STRING;
90
+ description: string;
91
+ required: true;
92
+ };
93
+ givenName: {
94
+ id: string;
95
+ label: string;
96
+ type: import("@awell-health/extensions-core").FieldType.STRING;
97
+ description: string;
98
+ required: true;
99
+ };
100
+ birthDate: {
101
+ id: string;
102
+ label: string;
103
+ type: import("@awell-health/extensions-core").FieldType.DATE;
104
+ required: true;
105
+ };
106
+ gender: {
107
+ id: string;
108
+ label: string;
109
+ type: import("@awell-health/extensions-core").FieldType.STRING;
110
+ required: true;
111
+ options: {
112
+ dropdownOptions: {
113
+ value: "unknown" | "male" | "female" | "other";
114
+ label: string;
115
+ }[];
116
+ };
117
+ };
118
+ email: {
119
+ id: string;
120
+ label: string;
121
+ type: import("@awell-health/extensions-core").FieldType.STRING;
122
+ required: false;
123
+ };
124
+ }, {
125
+ baseUrl: {
126
+ key: string;
127
+ label: string;
128
+ required: true;
129
+ obfuscated: false;
130
+ description: string;
131
+ };
132
+ authUrl: {
133
+ key: string;
134
+ label: string;
135
+ required: true;
136
+ obfuscated: false;
137
+ description: string;
138
+ };
139
+ clientId: {
140
+ key: string;
141
+ label: string;
142
+ required: true;
143
+ obfuscated: false;
144
+ description: string;
145
+ };
146
+ privateKey: {
147
+ key: string;
148
+ label: string;
149
+ required: true;
150
+ obfuscated: true;
151
+ description: string;
152
+ };
153
+ }, "resourceId">;
154
+ createClinicalNote: import("@awell-health/extensions-core").Action<{
155
+ patientResourceId: {
156
+ id: string;
157
+ label: string;
158
+ type: import("@awell-health/extensions-core").FieldType.STRING;
159
+ description: string;
160
+ required: true;
161
+ };
162
+ encounterResourceId: {
163
+ id: string;
164
+ label: string;
165
+ description: string;
166
+ type: import("@awell-health/extensions-core").FieldType.STRING;
167
+ required: true;
168
+ };
169
+ status: {
170
+ id: string;
171
+ label: string;
172
+ type: import("@awell-health/extensions-core").FieldType.STRING;
173
+ required: true;
174
+ options: {
175
+ dropdownOptions: {
176
+ value: "final" | "preliminary";
177
+ label: string;
178
+ }[];
179
+ };
180
+ };
181
+ type: {
182
+ id: string;
183
+ label: string;
184
+ type: import("@awell-health/extensions-core").FieldType.STRING;
185
+ required: true;
186
+ options: {
187
+ dropdownOptions: {
188
+ value: "Progress Note" | "Consult Note" | "Procedure Note" | "H&P Note" | "Discharge Summary" | "ED Note" | "Patient Instructions" | "Nursing Note";
189
+ label: string;
190
+ }[];
191
+ };
192
+ };
193
+ note: {
194
+ id: string;
195
+ label: string;
196
+ type: import("@awell-health/extensions-core").FieldType.TEXT;
197
+ required: true;
198
+ };
199
+ }, {
200
+ baseUrl: {
201
+ key: string;
202
+ label: string;
203
+ required: true;
204
+ obfuscated: false;
205
+ description: string;
206
+ };
207
+ authUrl: {
208
+ key: string;
209
+ label: string;
210
+ required: true;
211
+ obfuscated: false;
212
+ description: string;
213
+ };
214
+ clientId: {
215
+ key: string;
216
+ label: string;
217
+ required: true;
218
+ obfuscated: false;
219
+ description: string;
220
+ };
221
+ privateKey: {
222
+ key: string;
223
+ label: string;
224
+ required: true;
225
+ obfuscated: true;
226
+ description: string;
227
+ };
228
+ }, "resourceId">;
229
+ matchPatient: import("@awell-health/extensions-core").Action<{
230
+ familyName: {
231
+ id: string;
232
+ label: string;
233
+ type: import("@awell-health/extensions-core").FieldType.STRING;
234
+ description: string;
235
+ required: true;
236
+ };
237
+ givenName: {
238
+ id: string;
239
+ label: string;
240
+ type: import("@awell-health/extensions-core").FieldType.STRING;
241
+ description: string;
242
+ required: true;
243
+ };
244
+ birthDate: {
245
+ id: string;
246
+ label: string;
247
+ type: import("@awell-health/extensions-core").FieldType.DATE;
248
+ required: true;
249
+ };
250
+ gender: {
251
+ id: string;
252
+ label: string;
253
+ type: import("@awell-health/extensions-core").FieldType.STRING;
254
+ required: true;
255
+ options: {
256
+ dropdownOptions: {
257
+ value: "unknown" | "male" | "female" | "other";
258
+ label: string;
259
+ }[];
260
+ };
261
+ };
262
+ email: {
263
+ id: string;
264
+ label: string;
265
+ type: import("@awell-health/extensions-core").FieldType.STRING;
266
+ required: true;
267
+ };
268
+ }, {
269
+ baseUrl: {
270
+ key: string;
271
+ label: string;
272
+ required: true;
273
+ obfuscated: false;
274
+ description: string;
275
+ };
276
+ authUrl: {
277
+ key: string;
278
+ label: string;
279
+ required: true;
280
+ obfuscated: false;
281
+ description: string;
282
+ };
283
+ clientId: {
284
+ key: string;
285
+ label: string;
286
+ required: true;
287
+ obfuscated: false;
288
+ description: string;
289
+ };
290
+ privateKey: {
291
+ key: string;
292
+ label: string;
293
+ required: true;
294
+ obfuscated: true;
295
+ description: string;
296
+ };
297
+ }, "resourceId">;
6
298
  };
7
299
  export default actions;
@@ -4,11 +4,13 @@ const createPatient_1 = require("./createPatient");
4
4
  const getPatient_1 = require("./getPatient");
5
5
  const getAppointment_1 = require("./getAppointment");
6
6
  const createClinicalNote_1 = require("./createClinicalNote");
7
+ const matchPatient_1 = require("./matchPatient");
7
8
  const actions = {
8
9
  getPatient: getPatient_1.getPatient,
9
10
  getAppointment: getAppointment_1.getAppointment,
10
11
  createPatient: createPatient_1.createPatient,
11
12
  createClinicalNote: createClinicalNote_1.createClinicalNote,
13
+ matchPatient: matchPatient_1.matchPatient,
12
14
  };
13
15
  exports.default = actions;
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/epic/actions/index.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,6CAAyC;AACzC,qDAAiD;AACjD,6DAAyD;AAEzD,MAAM,OAAO,GAAG;IACd,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;CACnB,CAAA;AAED,kBAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/epic/actions/index.ts"],"names":[],"mappings":";;AAAA,mDAA+C;AAC/C,6CAAyC;AACzC,qDAAiD;AACjD,6DAAyD;AACzD,iDAA6C;AAE7C,MAAM,OAAO,GAAG;IACd,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,YAAY,EAAZ,2BAAY;CACb,CAAA;AAED,kBAAe,OAAO,CAAA"}