@awell-health/awell-extensions 2.0.150 → 2.0.151
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.d.ts +137 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.js +284 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.d.ts +30 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.js +42 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/index.d.ts +2 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/index.js +19 -0
- package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/index.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/datapoints.d.ts +6 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/datapoints.js +10 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/datapoints.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/fields.d.ts +18 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/fields.js +21 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/fields.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/index.d.ts +2 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/index.js +9 -0
- package/dist/extensions/epic/actions/findPatientByMRN/config/index.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/findPatientByMRN.d.ts +4 -0
- package/dist/extensions/epic/actions/findPatientByMRN/findPatientByMRN.js +55 -0
- package/dist/extensions/epic/actions/findPatientByMRN/findPatientByMRN.js.map +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/index.d.ts +1 -0
- package/dist/extensions/epic/actions/findPatientByMRN/index.js +6 -0
- package/dist/extensions/epic/actions/findPatientByMRN/index.js.map +1 -0
- package/dist/extensions/epic/actions/index.d.ts +38 -0
- package/dist/extensions/epic/actions/index.js +2 -0
- package/dist/extensions/epic/actions/index.js.map +1 -1
- package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.d.ts +2 -1
- package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.js +6 -1
- package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.js.map +1 -1
- package/dist/extensions/epic/lib/api/FhirR4/schema/PatientSearch.schema.d.ts +8 -0
- package/dist/extensions/epic/lib/api/FhirR4/schema/PatientSearch.schema.js +3 -0
- package/dist/extensions/epic/lib/api/FhirR4/schema/PatientSearch.schema.js.map +1 -0
- package/dist/extensions/epic/lib/api/FhirR4/schema/index.d.ts +1 -0
- package/dist/extensions/epic/lib/api/FhirR4/schema/index.js +1 -0
- package/dist/extensions/epic/lib/api/FhirR4/schema/index.js.map +1 -1
- package/dist/extensions/markdown.json +1 -1
- package/package.json +1 -1
@@ -0,0 +1,137 @@
|
|
1
|
+
export declare const FhirPatientMatch: {
|
2
|
+
resourceType: string;
|
3
|
+
type: string;
|
4
|
+
total: number;
|
5
|
+
link: {
|
6
|
+
relation: string;
|
7
|
+
url: string;
|
8
|
+
}[];
|
9
|
+
entry: {
|
10
|
+
link: {
|
11
|
+
relation: string;
|
12
|
+
url: string;
|
13
|
+
}[];
|
14
|
+
fullUrl: string;
|
15
|
+
resource: {
|
16
|
+
resourceType: string;
|
17
|
+
id: string;
|
18
|
+
extension: ({
|
19
|
+
valueCodeableConcept: {
|
20
|
+
coding: {
|
21
|
+
system: string;
|
22
|
+
code: string;
|
23
|
+
display: string;
|
24
|
+
}[];
|
25
|
+
};
|
26
|
+
url: string;
|
27
|
+
extension?: undefined;
|
28
|
+
valueCode?: undefined;
|
29
|
+
} | {
|
30
|
+
extension: ({
|
31
|
+
valueCoding: {
|
32
|
+
system: string;
|
33
|
+
code: string;
|
34
|
+
display: string;
|
35
|
+
};
|
36
|
+
url: string;
|
37
|
+
valueString?: undefined;
|
38
|
+
} | {
|
39
|
+
valueString: string;
|
40
|
+
url: string;
|
41
|
+
valueCoding?: undefined;
|
42
|
+
})[];
|
43
|
+
url: string;
|
44
|
+
valueCodeableConcept?: undefined;
|
45
|
+
valueCode?: undefined;
|
46
|
+
} | {
|
47
|
+
valueCode: string;
|
48
|
+
url: string;
|
49
|
+
valueCodeableConcept?: undefined;
|
50
|
+
extension?: undefined;
|
51
|
+
})[];
|
52
|
+
identifier: ({
|
53
|
+
use: string;
|
54
|
+
type: {
|
55
|
+
text: string;
|
56
|
+
};
|
57
|
+
system: string;
|
58
|
+
value: string;
|
59
|
+
_value?: undefined;
|
60
|
+
} | {
|
61
|
+
use: string;
|
62
|
+
system: string;
|
63
|
+
_value: {
|
64
|
+
extension: {
|
65
|
+
valueString: string;
|
66
|
+
url: string;
|
67
|
+
}[];
|
68
|
+
};
|
69
|
+
type?: undefined;
|
70
|
+
value?: undefined;
|
71
|
+
})[];
|
72
|
+
active: boolean;
|
73
|
+
name: {
|
74
|
+
use: string;
|
75
|
+
text: string;
|
76
|
+
family: string;
|
77
|
+
given: string[];
|
78
|
+
}[];
|
79
|
+
telecom: {
|
80
|
+
system: string;
|
81
|
+
value: string;
|
82
|
+
use: string;
|
83
|
+
}[];
|
84
|
+
gender: string;
|
85
|
+
birthDate: string;
|
86
|
+
deceasedBoolean: boolean;
|
87
|
+
address: {
|
88
|
+
use: string;
|
89
|
+
line: string[];
|
90
|
+
city: string;
|
91
|
+
state: string;
|
92
|
+
postalCode: string;
|
93
|
+
country: string;
|
94
|
+
}[];
|
95
|
+
contact: ({
|
96
|
+
relationship: {
|
97
|
+
coding: {
|
98
|
+
system: string;
|
99
|
+
code: string;
|
100
|
+
display: string;
|
101
|
+
}[];
|
102
|
+
text: string;
|
103
|
+
}[];
|
104
|
+
name: {
|
105
|
+
use: string;
|
106
|
+
text: string;
|
107
|
+
};
|
108
|
+
telecom: {
|
109
|
+
system: string;
|
110
|
+
value: string;
|
111
|
+
use: string;
|
112
|
+
}[];
|
113
|
+
organization?: undefined;
|
114
|
+
} | {
|
115
|
+
relationship: {
|
116
|
+
coding: {
|
117
|
+
system: string;
|
118
|
+
code: string;
|
119
|
+
display: string;
|
120
|
+
}[];
|
121
|
+
}[];
|
122
|
+
organization: {
|
123
|
+
display: string;
|
124
|
+
};
|
125
|
+
name?: undefined;
|
126
|
+
telecom?: undefined;
|
127
|
+
})[];
|
128
|
+
managingOrganization: {
|
129
|
+
reference: string;
|
130
|
+
display: string;
|
131
|
+
};
|
132
|
+
};
|
133
|
+
search: {
|
134
|
+
mode: string;
|
135
|
+
};
|
136
|
+
}[];
|
137
|
+
};
|
@@ -0,0 +1,284 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FhirPatientMatch = void 0;
|
4
|
+
exports.FhirPatientMatch = {
|
5
|
+
resourceType: 'Bundle',
|
6
|
+
type: 'searchset',
|
7
|
+
total: 1,
|
8
|
+
link: [
|
9
|
+
{
|
10
|
+
relation: 'self',
|
11
|
+
url: 'https://vendorservices.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/Patient?identifier=MRN|201502',
|
12
|
+
},
|
13
|
+
],
|
14
|
+
entry: [
|
15
|
+
{
|
16
|
+
link: [
|
17
|
+
{
|
18
|
+
relation: 'self',
|
19
|
+
url: 'https://vendorservices.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/Patient/ehZfTJ9tsbEEtj3Gv-xzlYA3',
|
20
|
+
},
|
21
|
+
],
|
22
|
+
fullUrl: 'https://vendorservices.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/Patient/ehZfTJ9tsbEEtj3Gv-xzlYA3',
|
23
|
+
resource: {
|
24
|
+
resourceType: 'Patient',
|
25
|
+
id: 'ehZfTJ9tsbEEtj3Gv-xzlYA3',
|
26
|
+
extension: [
|
27
|
+
{
|
28
|
+
valueCodeableConcept: {
|
29
|
+
coding: [
|
30
|
+
{
|
31
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.10.698084.130.657370.19999000',
|
32
|
+
code: 'male',
|
33
|
+
display: 'male',
|
34
|
+
},
|
35
|
+
],
|
36
|
+
},
|
37
|
+
url: 'http://open.epic.com/FHIR/StructureDefinition/extension/legal-sex',
|
38
|
+
},
|
39
|
+
{
|
40
|
+
valueCodeableConcept: {
|
41
|
+
coding: [
|
42
|
+
{
|
43
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.10.698084.130.657370.19999000',
|
44
|
+
code: 'male',
|
45
|
+
display: 'male',
|
46
|
+
},
|
47
|
+
],
|
48
|
+
},
|
49
|
+
url: 'http://open.epic.com/FHIR/StructureDefinition/extension/sex-for-clinical-use',
|
50
|
+
},
|
51
|
+
{
|
52
|
+
extension: [
|
53
|
+
{
|
54
|
+
valueCoding: {
|
55
|
+
system: 'http://terminology.hl7.org/CodeSystem/v3-NullFlavor',
|
56
|
+
code: 'UNK',
|
57
|
+
display: 'Unknown',
|
58
|
+
},
|
59
|
+
url: 'ombCategory',
|
60
|
+
},
|
61
|
+
{
|
62
|
+
valueString: 'Unknown',
|
63
|
+
url: 'text',
|
64
|
+
},
|
65
|
+
],
|
66
|
+
url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race',
|
67
|
+
},
|
68
|
+
{
|
69
|
+
extension: [
|
70
|
+
{
|
71
|
+
valueString: 'Unknown',
|
72
|
+
url: 'text',
|
73
|
+
},
|
74
|
+
],
|
75
|
+
url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity',
|
76
|
+
},
|
77
|
+
{
|
78
|
+
valueCode: '248153007',
|
79
|
+
url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex',
|
80
|
+
},
|
81
|
+
{
|
82
|
+
valueCodeableConcept: {
|
83
|
+
coding: [
|
84
|
+
{
|
85
|
+
system: 'http://loinc.org',
|
86
|
+
code: 'LA29518-0',
|
87
|
+
display: 'he/him/his/his/himself',
|
88
|
+
},
|
89
|
+
],
|
90
|
+
},
|
91
|
+
url: 'http://open.epic.com/FHIR/StructureDefinition/extension/calculated-pronouns-to-use-for-text',
|
92
|
+
},
|
93
|
+
],
|
94
|
+
identifier: [
|
95
|
+
{
|
96
|
+
use: 'usual',
|
97
|
+
type: {
|
98
|
+
text: 'CEID',
|
99
|
+
},
|
100
|
+
system: 'urn:epic:apporchard.curprod',
|
101
|
+
value: 'AO16D7L2DWNS497',
|
102
|
+
},
|
103
|
+
{
|
104
|
+
use: 'usual',
|
105
|
+
type: {
|
106
|
+
text: 'EPIC',
|
107
|
+
},
|
108
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.5.737384.0',
|
109
|
+
value: 'E1712',
|
110
|
+
},
|
111
|
+
{
|
112
|
+
use: 'usual',
|
113
|
+
type: {
|
114
|
+
text: 'EXTERNAL',
|
115
|
+
},
|
116
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.2.698084',
|
117
|
+
value: 'Z4998',
|
118
|
+
},
|
119
|
+
{
|
120
|
+
use: 'usual',
|
121
|
+
type: {
|
122
|
+
text: 'FHIR',
|
123
|
+
},
|
124
|
+
system: 'http://open.epic.com/FHIR/StructureDefinition/patient-dstu2-fhir-id',
|
125
|
+
value: 'T5A4rDhR7OzIZZrDriMjIavZaMBjRBl9Qi.90lWyps8cB',
|
126
|
+
},
|
127
|
+
{
|
128
|
+
use: 'usual',
|
129
|
+
type: {
|
130
|
+
text: 'FHIR STU3',
|
131
|
+
},
|
132
|
+
system: 'http://open.epic.com/FHIR/StructureDefinition/patient-fhir-id',
|
133
|
+
value: 'ehZfTJ9tsbEEtj3Gv-xzlYA3',
|
134
|
+
},
|
135
|
+
{
|
136
|
+
use: 'usual',
|
137
|
+
type: {
|
138
|
+
text: 'INTERNAL',
|
139
|
+
},
|
140
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.2.698084',
|
141
|
+
value: ' Z4998',
|
142
|
+
},
|
143
|
+
{
|
144
|
+
use: 'usual',
|
145
|
+
type: {
|
146
|
+
text: 'MRN',
|
147
|
+
},
|
148
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.5.737384.14',
|
149
|
+
value: '201502',
|
150
|
+
},
|
151
|
+
{
|
152
|
+
use: 'usual',
|
153
|
+
type: {
|
154
|
+
text: 'MYCHARTLOGIN',
|
155
|
+
},
|
156
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.3.878082.110',
|
157
|
+
value: 'CLINDOCJEAN',
|
158
|
+
},
|
159
|
+
{
|
160
|
+
use: 'usual',
|
161
|
+
type: {
|
162
|
+
text: 'WPRINTERNAL',
|
163
|
+
},
|
164
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.2.878082',
|
165
|
+
value: '117',
|
166
|
+
},
|
167
|
+
{
|
168
|
+
use: 'usual',
|
169
|
+
system: 'urn:oid:2.16.840.1.113883.4.1',
|
170
|
+
_value: {
|
171
|
+
extension: [
|
172
|
+
{
|
173
|
+
valueString: 'xxx-xx-6749',
|
174
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendered-value',
|
175
|
+
},
|
176
|
+
],
|
177
|
+
},
|
178
|
+
},
|
179
|
+
],
|
180
|
+
active: true,
|
181
|
+
name: [
|
182
|
+
{
|
183
|
+
use: 'official',
|
184
|
+
text: 'Jean Clin Doc',
|
185
|
+
family: 'Clin Doc',
|
186
|
+
given: ['Jean'],
|
187
|
+
},
|
188
|
+
{
|
189
|
+
use: 'usual',
|
190
|
+
text: 'Jean Clin Doc',
|
191
|
+
family: 'Clin Doc',
|
192
|
+
given: ['Jean'],
|
193
|
+
},
|
194
|
+
],
|
195
|
+
telecom: [
|
196
|
+
{
|
197
|
+
system: 'phone',
|
198
|
+
value: '608-213-5806',
|
199
|
+
use: 'home',
|
200
|
+
},
|
201
|
+
{
|
202
|
+
system: 'phone',
|
203
|
+
value: '608-272-5000',
|
204
|
+
use: 'work',
|
205
|
+
},
|
206
|
+
],
|
207
|
+
gender: 'male',
|
208
|
+
birthDate: '1950-02-22',
|
209
|
+
deceasedBoolean: false,
|
210
|
+
address: [
|
211
|
+
{
|
212
|
+
use: 'home',
|
213
|
+
line: ['134 Elm Street'],
|
214
|
+
city: 'Madison',
|
215
|
+
state: 'WI',
|
216
|
+
postalCode: '53706',
|
217
|
+
country: 'US',
|
218
|
+
},
|
219
|
+
],
|
220
|
+
contact: [
|
221
|
+
{
|
222
|
+
relationship: [
|
223
|
+
{
|
224
|
+
coding: [
|
225
|
+
{
|
226
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0131',
|
227
|
+
code: 'C',
|
228
|
+
display: 'Emergency Contact',
|
229
|
+
},
|
230
|
+
{
|
231
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0131',
|
232
|
+
code: 'N',
|
233
|
+
display: 'Next-of-Kin',
|
234
|
+
},
|
235
|
+
{
|
236
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.4.827665.1000',
|
237
|
+
code: '14',
|
238
|
+
display: 'Sister',
|
239
|
+
},
|
240
|
+
],
|
241
|
+
text: 'Sister',
|
242
|
+
},
|
243
|
+
],
|
244
|
+
name: {
|
245
|
+
use: 'usual',
|
246
|
+
text: 'Sally Tonga',
|
247
|
+
},
|
248
|
+
telecom: [
|
249
|
+
{
|
250
|
+
system: 'phone',
|
251
|
+
value: '608-921-8342',
|
252
|
+
use: 'home',
|
253
|
+
},
|
254
|
+
],
|
255
|
+
},
|
256
|
+
{
|
257
|
+
relationship: [
|
258
|
+
{
|
259
|
+
coding: [
|
260
|
+
{
|
261
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0131',
|
262
|
+
code: 'E',
|
263
|
+
display: 'Employer',
|
264
|
+
},
|
265
|
+
],
|
266
|
+
},
|
267
|
+
],
|
268
|
+
organization: {
|
269
|
+
display: 'Ehs Generic Employer',
|
270
|
+
},
|
271
|
+
},
|
272
|
+
],
|
273
|
+
managingOrganization: {
|
274
|
+
reference: 'Organization/enRyWnSP963FYDpoks4NHOA3',
|
275
|
+
display: 'Epic Hospital System',
|
276
|
+
},
|
277
|
+
},
|
278
|
+
search: {
|
279
|
+
mode: 'match',
|
280
|
+
},
|
281
|
+
},
|
282
|
+
],
|
283
|
+
};
|
284
|
+
//# sourceMappingURL=FhirPatientMatch.mock.js.map
|
package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FhirPatientMatch.mock.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE;QACJ;YACE,QAAQ,EAAE,MAAM;YAChB,GAAG,EAAE,uGAAuG;SAC7G;KACF;IACD,KAAK,EAAE;QACL;YACE,IAAI,EAAE;gBACJ;oBACE,QAAQ,EAAE,MAAM;oBAChB,GAAG,EAAE,0GAA0G;iBAChH;aACF;YACD,OAAO,EACL,0GAA0G;YAC5G,QAAQ,EAAE;gBACR,YAAY,EAAE,SAAS;gBACvB,EAAE,EAAE,0BAA0B;gBAC9B,SAAS,EAAE;oBACT;wBACE,oBAAoB,EAAE;4BACpB,MAAM,EAAE;gCACN;oCACE,MAAM,EACJ,iEAAiE;oCACnE,IAAI,EAAE,MAAM;oCACZ,OAAO,EAAE,MAAM;iCAChB;6BACF;yBACF;wBACD,GAAG,EAAE,mEAAmE;qBACzE;oBACD;wBACE,oBAAoB,EAAE;4BACpB,MAAM,EAAE;gCACN;oCACE,MAAM,EACJ,iEAAiE;oCACnE,IAAI,EAAE,MAAM;oCACZ,OAAO,EAAE,MAAM;iCAChB;6BACF;yBACF;wBACD,GAAG,EAAE,8EAA8E;qBACpF;oBACD;wBAC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;oBACpB,SAAS,EAAE,uCAAuC;oBAClD,OAAO,EAAE,sBAAsB;iBAChC;aACF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;aACd;SACF;KACF;CACF,CAAA"}
|
package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.d.ts
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
export declare const FhirPatientNoMatch: {
|
2
|
+
resourceType: string;
|
3
|
+
type: string;
|
4
|
+
total: number;
|
5
|
+
link: {
|
6
|
+
relation: string;
|
7
|
+
url: string;
|
8
|
+
}[];
|
9
|
+
entry: {
|
10
|
+
fullUrl: string;
|
11
|
+
resource: {
|
12
|
+
resourceType: string;
|
13
|
+
issue: {
|
14
|
+
severity: string;
|
15
|
+
code: string;
|
16
|
+
details: {
|
17
|
+
coding: {
|
18
|
+
system: string;
|
19
|
+
code: string;
|
20
|
+
display: string;
|
21
|
+
}[];
|
22
|
+
text: string;
|
23
|
+
};
|
24
|
+
}[];
|
25
|
+
};
|
26
|
+
search: {
|
27
|
+
mode: string;
|
28
|
+
};
|
29
|
+
}[];
|
30
|
+
};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FhirPatientNoMatch = void 0;
|
4
|
+
exports.FhirPatientNoMatch = {
|
5
|
+
resourceType: 'Bundle',
|
6
|
+
type: 'searchset',
|
7
|
+
total: 0,
|
8
|
+
link: [
|
9
|
+
{
|
10
|
+
relation: 'self',
|
11
|
+
url: 'https://vendorservices.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/Patient?identifier=MRN|2015023',
|
12
|
+
},
|
13
|
+
],
|
14
|
+
entry: [
|
15
|
+
{
|
16
|
+
fullUrl: 'urn:uuid:9ed03464-6f59-4f81-bdb0-77109106a215',
|
17
|
+
resource: {
|
18
|
+
resourceType: 'OperationOutcome',
|
19
|
+
issue: [
|
20
|
+
{
|
21
|
+
severity: 'warning',
|
22
|
+
code: 'processing',
|
23
|
+
details: {
|
24
|
+
coding: [
|
25
|
+
{
|
26
|
+
system: 'urn:oid:1.2.840.114350.1.13.0.1.7.2.657369',
|
27
|
+
code: '4101',
|
28
|
+
display: 'Resource request returns no results.',
|
29
|
+
},
|
30
|
+
],
|
31
|
+
text: 'Resource request returns no results.',
|
32
|
+
},
|
33
|
+
},
|
34
|
+
],
|
35
|
+
},
|
36
|
+
search: {
|
37
|
+
mode: 'outcome',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
],
|
41
|
+
};
|
42
|
+
//# sourceMappingURL=FhirPatientNoMatch.mock.js.map
|
package/dist/extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FhirPatientNoMatch.mock.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE;QACJ;YACE,QAAQ,EAAE,MAAM;YAChB,GAAG,EAAE,wGAAwG;SAC9G;KACF;IACD,KAAK,EAAE;QACL;YACE,OAAO,EAAE,+CAA+C;YACxD,QAAQ,EAAE;gBACR,YAAY,EAAE,kBAAkB;gBAChC,KAAK,EAAE;oBACL;wBACE,QAAQ,EAAE,SAAS;wBACnB,IAAI,EAAE,YAAY;wBAClB,OAAO,EAAE;4BACP,MAAM,EAAE;gCACN;oCACE,MAAM,EAAE,4CAA4C;oCACpD,IAAI,EAAE,MAAM;oCACZ,OAAO,EAAE,sCAAsC;iCAChD;6BACF;4BACD,IAAI,EAAE,sCAAsC;yBAC7C;qBACF;iBACF;aACF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;aAChB;SACF;KACF;CACF,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./FhirPatientMatch.mock"), exports);
|
18
|
+
__exportStar(require("./FhirPatientNoMatch.mock"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/findPatientByMRN/__testdata__/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,4DAAyC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/findPatientByMRN/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
2
|
+
import z from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
MRN: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
type: FieldType.STRING;
|
8
|
+
description: string;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
13
|
+
MRN: z.ZodString;
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
15
|
+
MRN: string;
|
16
|
+
}, {
|
17
|
+
MRN: string;
|
18
|
+
}>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
exports.fields = {
|
10
|
+
MRN: {
|
11
|
+
id: 'MRN',
|
12
|
+
label: 'Medical Record Number (MRN)',
|
13
|
+
type: extensions_core_1.FieldType.STRING,
|
14
|
+
description: '',
|
15
|
+
required: true,
|
16
|
+
},
|
17
|
+
};
|
18
|
+
exports.FieldsValidationSchema = zod_1.default.object({
|
19
|
+
MRN: zod_1.default.string().min(1),
|
20
|
+
});
|
21
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/findPatientByMRN/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,6BAA6B;QACpC,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,WAAW,EAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC2B,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var datapoints_1 = require("./datapoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return datapoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/epic/actions/findPatientByMRN/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.findPatientByMRN = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
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");
|
9
|
+
exports.findPatientByMRN = {
|
10
|
+
key: 'findPatientByMRN',
|
11
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
12
|
+
title: 'Find patient by MRN',
|
13
|
+
description: 'Find patient by MRN in Epic',
|
14
|
+
fields: config_1.fields,
|
15
|
+
previewable: false,
|
16
|
+
dataPoints: config_1.dataPoints,
|
17
|
+
onEvent: async ({ payload, onComplete, onError }) => {
|
18
|
+
var _a, _b, _c, _d, _e;
|
19
|
+
const { epicFhirR4Sdk, fields: { MRN }, } = await (0, validatePayloadAndCreateSdks_1.validatePayloadAndCreateSdks)({
|
20
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
21
|
+
payload,
|
22
|
+
});
|
23
|
+
try {
|
24
|
+
const { data } = await epicFhirR4Sdk.searchPatient({ MRN });
|
25
|
+
const matchCount = (_a = data.total) !== null && _a !== void 0 ? _a : 0;
|
26
|
+
if (matchCount === 0) {
|
27
|
+
throw new Error('No patient found');
|
28
|
+
}
|
29
|
+
if (matchCount > 1) {
|
30
|
+
throw new Error('Multiple patients found');
|
31
|
+
}
|
32
|
+
await onComplete({
|
33
|
+
data_points: {
|
34
|
+
resourceId: (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.entry) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.resource) === null || _d === void 0 ? void 0 : _d.id,
|
35
|
+
},
|
36
|
+
});
|
37
|
+
}
|
38
|
+
catch (error) {
|
39
|
+
if (error instanceof axios_1.AxiosError) {
|
40
|
+
const err = error;
|
41
|
+
await onError({
|
42
|
+
events: [
|
43
|
+
(0, awell_1.addActivityEventLog)({
|
44
|
+
message: JSON.stringify((_e = err.response) === null || _e === void 0 ? void 0 : _e.data, null, 2),
|
45
|
+
}),
|
46
|
+
],
|
47
|
+
});
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
// Throw all other errors
|
51
|
+
throw error;
|
52
|
+
}
|
53
|
+
},
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=findPatientByMRN.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"findPatientByMRN.js","sourceRoot":"","sources":["../../../../../extensions/epic/actions/findPatientByMRN/findPatientByMRN.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;A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O,CAAC;oBACZ,MAAM,EAAE;wBACN,IAAA,2BAAmB,EAAC;4BAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;yBACrD,CAAC;qBACH;iBACF,CAAC,CAAA;gBACF,OAAM;YACR,CAAC;YAED,yBAAyB;YACzB,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { findPatientByMRN } from './findPatientByMRN';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.findPatientByMRN = void 0;
|
4
|
+
var findPatientByMRN_1 = require("./findPatientByMRN");
|
5
|
+
Object.defineProperty(exports, "findPatientByMRN", { enumerable: true, get: function () { return findPatientByMRN_1.findPatientByMRN; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/epic/actions/findPatientByMRN/index.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA"}
|
@@ -295,5 +295,43 @@ declare const actions: {
|
|
295
295
|
description: string;
|
296
296
|
};
|
297
297
|
}, "resourceId">;
|
298
|
+
findPatientByMRN: import("@awell-health/extensions-core").Action<{
|
299
|
+
MRN: {
|
300
|
+
id: string;
|
301
|
+
label: string;
|
302
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
303
|
+
description: string;
|
304
|
+
required: true;
|
305
|
+
};
|
306
|
+
}, {
|
307
|
+
baseUrl: {
|
308
|
+
key: string;
|
309
|
+
label: string;
|
310
|
+
required: true;
|
311
|
+
obfuscated: false;
|
312
|
+
description: string;
|
313
|
+
};
|
314
|
+
authUrl: {
|
315
|
+
key: string;
|
316
|
+
label: string;
|
317
|
+
required: true;
|
318
|
+
obfuscated: false;
|
319
|
+
description: string;
|
320
|
+
};
|
321
|
+
clientId: {
|
322
|
+
key: string;
|
323
|
+
label: string;
|
324
|
+
required: true;
|
325
|
+
obfuscated: false;
|
326
|
+
description: string;
|
327
|
+
};
|
328
|
+
privateKey: {
|
329
|
+
key: string;
|
330
|
+
label: string;
|
331
|
+
required: true;
|
332
|
+
obfuscated: true;
|
333
|
+
description: string;
|
334
|
+
};
|
335
|
+
}, "resourceId">;
|
298
336
|
};
|
299
337
|
export default actions;
|
@@ -5,12 +5,14 @@ const getPatient_1 = require("./getPatient");
|
|
5
5
|
const getAppointment_1 = require("./getAppointment");
|
6
6
|
const createClinicalNote_1 = require("./createClinicalNote");
|
7
7
|
const matchPatient_1 = require("./matchPatient");
|
8
|
+
const findPatientByMRN_1 = require("./findPatientByMRN");
|
8
9
|
const actions = {
|
9
10
|
getPatient: getPatient_1.getPatient,
|
10
11
|
getAppointment: getAppointment_1.getAppointment,
|
11
12
|
createPatient: createPatient_1.createPatient,
|
12
13
|
createClinicalNote: createClinicalNote_1.createClinicalNote,
|
13
14
|
matchPatient: matchPatient_1.matchPatient,
|
15
|
+
findPatientByMRN: findPatientByMRN_1.findPatientByMRN,
|
14
16
|
};
|
15
17
|
exports.default = actions;
|
16
18
|
//# 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;AACzD,iDAA6C;
|
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;AAC7C,yDAAqD;AACrD,MAAM,OAAO,GAAG;IACd,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,YAAY,EAAZ,2BAAY;IACZ,gBAAgB,EAAhB,mCAAgB;CACjB,CAAA;AAED,kBAAe,OAAO,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type AxiosResponse } from 'axios';
|
2
|
-
import { type PatientReadInputType, type PatientReadResponseType, type PatientCreateInputType, type PatientCreateResponseType, type PatientMatchInputType, type PatientMatchResponseType, type DocumentReferenceCreateInputType, type DocumentReferenceCreateResponseType, type AppointmentReadResponseType, type AppointmentReadInputType } from './schema';
|
2
|
+
import { type PatientReadInputType, type PatientReadResponseType, type PatientCreateInputType, type PatientCreateResponseType, type PatientMatchInputType, type PatientMatchResponseType, type DocumentReferenceCreateInputType, type DocumentReferenceCreateResponseType, type AppointmentReadResponseType, type AppointmentReadInputType, type PatientSearchInputType, type PatientSearchResponseType } from './schema';
|
3
3
|
/**
|
4
4
|
* FHIR R4 API Client
|
5
5
|
*/
|
@@ -21,6 +21,7 @@ export declare class EpicFhirR4Client {
|
|
21
21
|
getPatient(resourceId: PatientReadInputType): Promise<AxiosResponse<PatientReadResponseType>>;
|
22
22
|
createPatient(data: PatientCreateInputType): Promise<AxiosResponse<PatientCreateResponseType>>;
|
23
23
|
matchPatient(data: PatientMatchInputType): Promise<AxiosResponse<PatientMatchResponseType>>;
|
24
|
+
searchPatient(data: PatientSearchInputType): Promise<AxiosResponse<PatientSearchResponseType>>;
|
24
25
|
createDocumentReference(data: DocumentReferenceCreateInputType): Promise<AxiosResponse<DocumentReferenceCreateResponseType>>;
|
25
26
|
getAppointment(resourceId: AppointmentReadInputType): Promise<AxiosResponse<AppointmentReadResponseType>>;
|
26
27
|
}
|
@@ -48,7 +48,7 @@ class EpicFhirR4Client {
|
|
48
48
|
this.clientId = clientId;
|
49
49
|
this.privateKey = privateKey;
|
50
50
|
this.client = axios_1.default.create({
|
51
|
-
baseURL: new URL('FHIR/R4/', baseUrl).toString(),
|
51
|
+
baseURL: new URL('FHIR/R4/', (0, lodash_1.endsWith)(baseUrl, '/') ? baseUrl : `${baseUrl}/`).toString(),
|
52
52
|
headers: new axios_1.AxiosHeaders({
|
53
53
|
'Content-Type': 'application/json',
|
54
54
|
}),
|
@@ -106,6 +106,11 @@ class EpicFhirR4Client {
|
|
106
106
|
const response = await this.client.post(url.toString(), data);
|
107
107
|
return response;
|
108
108
|
}
|
109
|
+
async searchPatient(data) {
|
110
|
+
const url = new URL(`Patient`, this.client.defaults.baseURL);
|
111
|
+
const response = await this.client.get(`${url.toString()}?identifier=MRN|${data.MRN}`);
|
112
|
+
return response;
|
113
|
+
}
|
109
114
|
async createDocumentReference(data) {
|
110
115
|
const url = new URL(`DocumentReference`, this.client.defaults.baseURL);
|
111
116
|
const response = await this.client.post(url.toString(), data);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FhirR4client.js","sourceRoot":"","sources":["../../../../../../extensions/epic/lib/api/FhirR4/FhirR4client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAKc;
|
1
|
+
{"version":3,"file":"FhirR4client.js","sourceRoot":"","sources":["../../../../../../extensions/epic/lib/api/FhirR4/FhirR4client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAKc;AAed,mCAAwC;AACxC,qDAAiD;AAEjD;;GAEG;AACH,MAAa,gBAAgB;IAS3B,YAAY,EACV,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,GAMX;QAbO,gBAAW,GAAkB,IAAI,CAAA;QACjC,gBAAW,GAAkB,IAAI,CAAA,CAAC,4CAA4C;QAapF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC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ACpC,GAAG,CAAC,QAAQ,EAAE,CACf,CAAA;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AA5KD,4CA4KC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PatientSearch.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/PatientSearch.schema.ts"],"names":[],"mappings":""}
|
@@ -19,4 +19,5 @@ __exportStar(require("./PatientCreate.schema"), exports);
|
|
19
19
|
__exportStar(require("./PatientMatch.schema"), exports);
|
20
20
|
__exportStar(require("./DocumentReferenceCreate.schema"), exports);
|
21
21
|
__exportStar(require("./AppointmentRead.schema"), exports);
|
22
|
+
__exportStar(require("./PatientSearch.schema"), exports);
|
22
23
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,yDAAsC;AACtC,wDAAqC;AACrC,mEAAgD;AAChD,2DAAwC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,yDAAsC;AACtC,wDAAqC;AACrC,mEAAgD;AAChD,2DAAwC;AACxC,yDAAsC"}
|
@@ -60,7 +60,7 @@
|
|
60
60
|
"changelog": "# Elation Changelog\n\n## January 30, 2024\n\n- New actions\n - Post letter: Using patient and practice identifier, post a new letter to either Provider, Patient or associate it with an existing Referral.\n\n## October 3, 2023\n\n- The README is now more concise with less unneeded detail. A section on the particularities of Elation subscriptions (webhooks) was added.\n- Misc. updates to labels, descriptions, action fields order\n- Action updates\n - Create Non-Visit Note:\n - Simplify the action by removing some optional action fields (we can always expand later)\n - `document_date` and `chart_date` are now automatically set to the date of today so that the corresponding action fields could be removed\n - Create patient\n - `dob` is now a `date` field type (was a string)\n - You can pass a mobile phone number and email when creating a patient\n - Find physician\n - Only returns the physician ID instead of all the details of the physician. To retrieve the details one can use the new `Get physician` action\n - Update patient\n - `dob` is now a `date` field type (was a string)\n - We are now using `PATCH` instead of `PUT` which allows for a partial update, i.e. only update the fields that are needed.\n- New actions\n - Get physician: Using a physician identifier, retrieve a physician object from Elation.\n- Removed actions\n - Update Non-Visit Note\n- Webhooks\n - Fix the type of `patientId` in `patientCreatedOrUpdated` webhook\n - Added `appointmentCreatedOrUpdated` webhook\n\n## September 4, 2023\n\n- rename `onCreatePatient` webhook to `patientCreatedOrUpdated`\n- filter non `saved` actions for this webhook\n\n## August 21, 2023\n\n- make non-visit note text a large input (`StringType.TEXT`)\n\n## May 23, 2024\n\n- add patient_status.status to patient object in getPatient action\n- add status to updatePatient action\n"
|
61
61
|
},
|
62
62
|
"epic": {
|
63
|
-
"readme": "---\ntitle: Epic\ndescription: Epic is an Electronic Health Records (EHR) system for healthcare organizations, hospitals and large practices.\n---\n\n# Epic\n\nEpic is an Electronic Health Records (EHR) system for healthcare organizations, hospitals and large practices.\n\n## Introduction\n\n### Integration landscape\n\nEpic provides a comprehensive range of interfaces for integration. We've grouped them into four key categories:\n\n1. **Read**: Retrieve data from Epic (e.g., patient demographics). \n2. **Write**: Send data to Epic (e.g., create a patient, create a document). \n3. **Subscriptions/Events**: Subscribe to events in Epic. \n4. **Embedded Apps**: Embed applications within Epic, SSO launch, and more (typically via SMART-on-FHIR). \n\nEach category offers multiple interfaces tailored to specific workflows and use cases.\n\nWe seamlessly integrates with Epic across all categories using industry-standard protocols like HL7, FHIR, and proprietary APIs. We prioritize trust and flexibility, supporting both REST and non-REST interfaces to meet your organization's needs.\n\n### The Epic extension\n\nThe **Epic Extension** is designed to support **Read** and **Write** integrations via [SMART Backend Services](https://fhir.epic.com/Documentation?docId=oauth2§ion=BackendOAuth2Guide). These integrations are server-to-server (backend) and do not require direct user interaction—whether from patients or practitioners.\n\nThe extension supports a variety of REST-based interfaces, including:\n\n- Vendor Services API\n- FHIR R4\n- FHIR DSTU2\n- FHIR STU3\n\nIn addition to REST interfaces, Epic also supports non-REST standards like HL7, enabling tasks such as querying patient demographics (ADR A19) or creating documents (ORU messages). **Awell supports these non-REST standards as well.** However, the Epic Extension focuses specifically on REST-based interfaces.\n\n## Setup\n\nTo set up the Epic Extension in Awell, you’ll need to configure the following:\n\n- **Base URL**: The Epic instance's base URL (e.g., `https://fhir.epic.com/interconnect-fhir-oauth/api/`). \n- **Auth URL**: The URL for obtaining access tokens (e.g., `https://fhir.epic.com/interconnect-fhir-oauth/oauth2/token`). \n- **Client ID**: The client ID of Awell’s registered Epic application. \n- **Private Key**: The private key for the application, formatted as a single string with new lines explicitly indicated by `\\n`.\n\n**Example of Private Key Format**:\n`-----BEGIN PRIVATE KEY-----\\naaaaaaa\\nbbbbb\\n-----END PRIVATE KEY-----`\n\n## Actions\n\n### Get patient (R4)\n\nRetrieve a patient’s details using their FHIR resource ID. This action returns the full FHIR Patient resource.\n\n### Match patient (R4)\n\nFind a patient using demographic data. The action returns a matching Patient resource **only if a single high-confidence match is found**. \n\n- If multiple high-confidence matches or no matches are found, the action fails. \n- This uses the `Patient.$match` (R4) operation, recommended for backend-to-backend integrations (learn more: [Epic Documentation](https://fhir.epic.com/Sandbox?api=10423)).\n\nThe action will return the FHIR resource ID of the matched patient.\n\n### Create patient (R4)\n\nAdd a new patient to Epic using demographic information. Required fields include: \n\n- SSN\n- Given name\n- Family name\n- Gender\n- Birth date\n\nWhile optional, including an email address is highly recommended to improve accuracy when matching patients in the future. \n\nThe action will return the FHIR resource ID of the created patient.\n\n### Get appointment\n\nRetrieve details of a specific appointment using its FHIR resource ID. The action returns the full FHIR Appointment resource.\n\n### Create clinical note (R4)\n\nCreate a clinical document in Epic. Required fields include:\n\n- **Patient resource ID**: The patient’s FHIR resource ID. \n- **Encounter resource ID**: The related encounter’s FHIR resource ID (currently required; [Pre-Charting support is coming February 2025](https://fhir.epic.com/Sandbox?api=1046)). \n- **Document status**: The status of the document. \n- **Document type**: The type of the document. \n- **Document content**: The content of the document. \n\nThe action will return the FHIR resource ID of the created document.\n\n",
|
63
|
+
"readme": "---\ntitle: Epic\ndescription: Epic is an Electronic Health Records (EHR) system for healthcare organizations, hospitals and large practices.\n---\n\n# Epic\n\nEpic is an Electronic Health Records (EHR) system for healthcare organizations, hospitals and large practices.\n\n## Introduction\n\n### Integration landscape\n\nEpic provides a comprehensive range of interfaces for integration. We've grouped them into four key categories:\n\n1. **Read**: Retrieve data from Epic (e.g., patient demographics). \n2. **Write**: Send data to Epic (e.g., create a patient, create a document). \n3. **Subscriptions/Events**: Subscribe to events in Epic. \n4. **Embedded Apps**: Embed applications within Epic, SSO launch, and more (typically via SMART-on-FHIR). \n\nEach category offers multiple interfaces tailored to specific workflows and use cases.\n\nWe seamlessly integrates with Epic across all categories using industry-standard protocols like HL7, FHIR, and proprietary APIs. We prioritize trust and flexibility, supporting both REST and non-REST interfaces to meet your organization's needs.\n\n### The Epic extension\n\nThe **Epic Extension** is designed to support **Read** and **Write** integrations via [SMART Backend Services](https://fhir.epic.com/Documentation?docId=oauth2§ion=BackendOAuth2Guide). These integrations are server-to-server (backend) and do not require direct user interaction—whether from patients or practitioners.\n\nThe extension supports a variety of REST-based interfaces, including:\n\n- Vendor Services API\n- FHIR R4\n- FHIR DSTU2\n- FHIR STU3\n\nIn addition to REST interfaces, Epic also supports non-REST standards like HL7, enabling tasks such as querying patient demographics (ADR A19) or creating documents (ORU messages). **Awell supports these non-REST standards as well.** However, the Epic Extension focuses specifically on REST-based interfaces.\n\n## Setup\n\nTo set up the Epic Extension in Awell, you’ll need to configure the following:\n\n- **Base URL**: The Epic instance's base URL (e.g., `https://fhir.epic.com/interconnect-fhir-oauth/api/`). \n- **Auth URL**: The URL for obtaining access tokens (e.g., `https://fhir.epic.com/interconnect-fhir-oauth/oauth2/token`). \n- **Client ID**: The client ID of Awell’s registered Epic application. \n- **Private Key**: The private key for the application, formatted as a single string with new lines explicitly indicated by `\\n`.\n\n**Example of Private Key Format**:\n`-----BEGIN PRIVATE KEY-----\\naaaaaaa\\nbbbbb\\n-----END PRIVATE KEY-----`\n\n## Actions\n\n### Get patient (R4)\n\nRetrieve a patient’s details using their FHIR resource ID. This action returns the full FHIR Patient resource.\n\n### Match patient (R4)\n\nFind a patient using demographic data. The action returns a matching Patient resource **only if a single high-confidence match is found**. \n\n- If multiple high-confidence matches or no matches are found, the action fails. \n- This uses the `Patient.$match` (R4) operation, recommended for backend-to-backend integrations (learn more: [Epic Documentation](https://fhir.epic.com/Sandbox?api=10423)).\n\nThe action will return the FHIR resource ID of the matched patient.\n\n### Create patient (R4)\n\nAdd a new patient to Epic using demographic information. Required fields include: \n\n- SSN\n- Given name\n- Family name\n- Gender\n- Birth date\n\nWhile optional, including an email address is highly recommended to improve accuracy when matching patients in the future. \n\nThe action will return the FHIR resource ID of the created patient.\n\n### Get appointment\n\nRetrieve details of a specific appointment using its FHIR resource ID. The action returns the full FHIR Appointment resource.\n\n### Create clinical note (R4)\n\nCreate a clinical document in Epic. Required fields include:\n\n- **Patient resource ID**: The patient’s FHIR resource ID. \n- **Encounter resource ID**: The related encounter’s FHIR resource ID (currently required; [Pre-Charting support is coming February 2025](https://fhir.epic.com/Sandbox?api=1046)). \n- **Document status**: The status of the document. \n- **Document type**: The type of the document. \n- **Document content**: The content of the document. \n\nThe action will return the FHIR resource ID of the created document.\n\n### Find patient by MRN (R4)\n\nLeverages the `Patient.search` (R4) operation to find a patient by their MRN. The action will return the FHIR resource ID of the patient.\n\n",
|
64
64
|
"changelog": "# Epic changelog"
|
65
65
|
},
|
66
66
|
"experimental": {
|