@awell-health/awell-extensions 2.0.145 → 2.0.146

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. package/dist/extensions/epic/actions/createClinicalNote/__testdata__/CreateClinicalNote.mock.d.ts +8 -0
  2. package/dist/extensions/epic/actions/createClinicalNote/__testdata__/CreateClinicalNote.mock.js +12 -0
  3. package/dist/extensions/epic/actions/createClinicalNote/__testdata__/CreateClinicalNote.mock.js.map +1 -0
  4. package/dist/extensions/epic/actions/createClinicalNote/config/datapoints.d.ts +6 -1
  5. package/dist/extensions/epic/actions/createClinicalNote/config/datapoints.js +6 -1
  6. package/dist/extensions/epic/actions/createClinicalNote/config/datapoints.js.map +1 -1
  7. package/dist/extensions/epic/actions/createClinicalNote/config/fields.d.ts +66 -2
  8. package/dist/extensions/epic/actions/createClinicalNote/config/fields.js +56 -2
  9. package/dist/extensions/epic/actions/createClinicalNote/config/fields.js.map +1 -1
  10. package/dist/extensions/epic/actions/createClinicalNote/createClinicalNote.js +66 -1
  11. package/dist/extensions/epic/actions/createClinicalNote/createClinicalNote.js.map +1 -1
  12. package/dist/extensions/epic/actions/createPatient/__testdata__/CreateFhirPatient.mock.d.ts +8 -0
  13. package/dist/extensions/epic/actions/createPatient/__testdata__/CreateFhirPatient.mock.js +12 -0
  14. package/dist/extensions/epic/actions/createPatient/__testdata__/CreateFhirPatient.mock.js.map +1 -0
  15. package/dist/extensions/epic/actions/createPatient/config/datapoints.d.ts +6 -1
  16. package/dist/extensions/epic/actions/createPatient/config/datapoints.js +6 -1
  17. package/dist/extensions/epic/actions/createPatient/config/datapoints.js.map +1 -1
  18. package/dist/extensions/epic/actions/createPatient/config/fields.d.ts +70 -2
  19. package/dist/extensions/epic/actions/createPatient/config/fields.js +61 -2
  20. package/dist/extensions/epic/actions/createPatient/config/fields.js.map +1 -1
  21. package/dist/extensions/epic/actions/createPatient/createPatient.js +61 -1
  22. package/dist/extensions/epic/actions/createPatient/createPatient.js.map +1 -1
  23. package/dist/extensions/epic/actions/getAppointment/__testdata__/GetAppointment.mock.d.ts +52 -0
  24. package/dist/extensions/epic/actions/getAppointment/__testdata__/GetAppointment.mock.js +94 -0
  25. package/dist/extensions/epic/actions/getAppointment/__testdata__/GetAppointment.mock.js.map +1 -0
  26. package/dist/extensions/epic/actions/getAppointment/config/datapoints.d.ts +22 -1
  27. package/dist/extensions/epic/actions/getAppointment/config/datapoints.js +22 -1
  28. package/dist/extensions/epic/actions/getAppointment/config/datapoints.js.map +1 -1
  29. package/dist/extensions/epic/actions/getAppointment/config/fields.d.ts +17 -2
  30. package/dist/extensions/epic/actions/getAppointment/config/fields.js +13 -2
  31. package/dist/extensions/epic/actions/getAppointment/config/fields.js.map +1 -1
  32. package/dist/extensions/epic/actions/getAppointment/getAppointment.js +38 -1
  33. package/dist/extensions/epic/actions/getAppointment/getAppointment.js.map +1 -1
  34. package/dist/extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.d.ts +90 -0
  35. package/dist/extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.js +189 -0
  36. package/dist/extensions/epic/actions/getPatient/__testdata__/FhirPatient.mock.js.map +1 -0
  37. package/dist/extensions/epic/actions/getPatient/config/datapoints.d.ts +6 -1
  38. package/dist/extensions/epic/actions/getPatient/config/datapoints.js +6 -1
  39. package/dist/extensions/epic/actions/getPatient/config/datapoints.js.map +1 -1
  40. package/dist/extensions/epic/actions/getPatient/config/fields.d.ts +17 -2
  41. package/dist/extensions/epic/actions/getPatient/config/fields.js +13 -2
  42. package/dist/extensions/epic/actions/getPatient/config/fields.js.map +1 -1
  43. package/dist/extensions/epic/actions/getPatient/getPatient.js +31 -1
  44. package/dist/extensions/epic/actions/getPatient/getPatient.js.map +1 -1
  45. package/dist/extensions/epic/actions/index.d.ts +296 -4
  46. package/dist/extensions/epic/actions/index.js +2 -0
  47. package/dist/extensions/epic/actions/index.js.map +1 -1
  48. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientMatch.mock.d.ts +114 -0
  49. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientMatch.mock.js +221 -0
  50. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientMatch.mock.js.map +1 -0
  51. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientNoMatch.mock.d.ts +14 -0
  52. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientNoMatch.mock.js +22 -0
  53. package/dist/extensions/epic/actions/matchPatient/__testdata__/FhirPatientNoMatch.mock.js.map +1 -0
  54. package/dist/extensions/epic/actions/matchPatient/__testdata__/index.d.ts +2 -0
  55. package/dist/extensions/epic/actions/matchPatient/__testdata__/index.js +19 -0
  56. package/dist/extensions/epic/actions/matchPatient/__testdata__/index.js.map +1 -0
  57. package/dist/extensions/epic/actions/matchPatient/config/datapoints.d.ts +6 -0
  58. package/dist/extensions/epic/actions/matchPatient/config/datapoints.js +10 -0
  59. package/dist/extensions/epic/actions/matchPatient/config/datapoints.js.map +1 -0
  60. package/dist/extensions/epic/actions/matchPatient/config/fields.d.ts +61 -0
  61. package/dist/extensions/epic/actions/matchPatient/config/fields.js +58 -0
  62. package/dist/extensions/epic/actions/matchPatient/config/fields.js.map +1 -0
  63. package/dist/extensions/epic/actions/matchPatient/config/index.d.ts +2 -0
  64. package/dist/extensions/epic/actions/matchPatient/config/index.js +9 -0
  65. package/dist/extensions/epic/actions/matchPatient/config/index.js.map +1 -0
  66. package/dist/extensions/epic/actions/matchPatient/index.d.ts +1 -0
  67. package/dist/extensions/epic/actions/matchPatient/index.js +6 -0
  68. package/dist/extensions/epic/actions/matchPatient/index.js.map +1 -0
  69. package/dist/extensions/epic/actions/matchPatient/matchPatient.d.ts +4 -0
  70. package/dist/extensions/epic/actions/matchPatient/matchPatient.js +87 -0
  71. package/dist/extensions/epic/actions/matchPatient/matchPatient.js.map +1 -0
  72. package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.d.ts +26 -0
  73. package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.js +121 -0
  74. package/dist/extensions/epic/lib/api/FhirR4/FhirR4client.js.map +1 -0
  75. package/dist/extensions/epic/lib/api/FhirR4/index.d.ts +1 -0
  76. package/dist/extensions/epic/lib/api/FhirR4/index.js +18 -0
  77. package/dist/extensions/epic/lib/api/FhirR4/index.js.map +1 -0
  78. package/dist/extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.d.ts +9 -0
  79. package/dist/extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.js +6 -0
  80. package/dist/extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.js.map +1 -0
  81. package/dist/extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.d.ts +7 -0
  82. package/dist/extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.js +3 -0
  83. package/dist/extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.js.map +1 -0
  84. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.d.ts +7 -0
  85. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.js +3 -0
  86. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.js.map +1 -0
  87. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.d.ts +37 -0
  88. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.js +3 -0
  89. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.js.map +1 -0
  90. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.d.ts +9 -0
  91. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.js +6 -0
  92. package/dist/extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.js.map +1 -0
  93. package/dist/extensions/epic/lib/api/FhirR4/schema/index.d.ts +5 -0
  94. package/dist/extensions/epic/lib/api/FhirR4/schema/index.js +22 -0
  95. package/dist/extensions/epic/lib/api/FhirR4/schema/index.js.map +1 -0
  96. package/dist/extensions/epic/lib/api/auth/generateJWT/generateJWT.d.ts +8 -0
  97. package/dist/extensions/epic/lib/api/auth/generateJWT/generateJWT.js +38 -0
  98. package/dist/extensions/epic/lib/api/auth/generateJWT/generateJWT.js.map +1 -0
  99. package/dist/extensions/epic/lib/api/auth/generateJWT/index.d.ts +1 -0
  100. package/dist/extensions/epic/lib/api/auth/generateJWT/index.js +18 -0
  101. package/dist/extensions/epic/lib/api/auth/generateJWT/index.js.map +1 -0
  102. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.d.ts +2 -0
  103. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.js +17 -0
  104. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.js.map +1 -0
  105. package/dist/extensions/epic/lib/api/schemas/Appointment/index.d.ts +1 -0
  106. package/dist/extensions/epic/lib/api/schemas/Appointment/index.js +18 -0
  107. package/dist/extensions/epic/lib/api/schemas/Appointment/index.js.map +1 -0
  108. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.d.ts +2 -0
  109. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.js +6 -0
  110. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.js.map +1 -0
  111. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.d.ts +9 -0
  112. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.js +28 -0
  113. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.js.map +1 -0
  114. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.d.ts +2 -0
  115. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.js +19 -0
  116. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.js.map +1 -0
  117. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.d.ts +2 -0
  118. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.js +6 -0
  119. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.js.map +1 -0
  120. package/dist/extensions/epic/lib/api/schemas/Patient/index.d.ts +1 -0
  121. package/dist/extensions/epic/lib/api/schemas/Patient/index.js +18 -0
  122. package/dist/extensions/epic/lib/api/schemas/Patient/index.js.map +1 -0
  123. package/dist/extensions/epic/lib/validatePayloadAndCreateSdks.d.ts +18 -0
  124. package/dist/extensions/epic/lib/validatePayloadAndCreateSdks.js +31 -0
  125. package/dist/extensions/epic/lib/validatePayloadAndCreateSdks.js.map +1 -0
  126. package/dist/extensions/epic/settings.d.ts +46 -2
  127. package/dist/extensions/epic/settings.js +36 -2
  128. package/dist/extensions/epic/settings.js.map +1 -1
  129. package/package.json +3 -1
@@ -0,0 +1,121 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.EpicFhirR4Client = void 0;
37
+ const axios_1 = __importStar(require("axios"));
38
+ const lodash_1 = require("lodash");
39
+ const generateJWT_1 = require("../auth/generateJWT");
40
+ /**
41
+ * FHIR R4 API Client
42
+ */
43
+ class EpicFhirR4Client {
44
+ constructor({ baseUrl, authUrl, clientId, privateKey, }) {
45
+ this.accessToken = null;
46
+ this.tokenExpiry = null; // Store token expiry time in UNIX timestamp
47
+ this.authUrl = authUrl;
48
+ this.clientId = clientId;
49
+ this.privateKey = privateKey;
50
+ this.client = axios_1.default.create({
51
+ baseURL: new URL('FHIR/R4/', baseUrl).toString(),
52
+ headers: new axios_1.AxiosHeaders({
53
+ 'Content-Type': 'application/json',
54
+ }),
55
+ });
56
+ this.client.interceptors.request.use(async (config) => {
57
+ var _a;
58
+ if ((0, lodash_1.isNil)(this.accessToken) || this.isTokenExpired()) {
59
+ await this.refreshAccessToken();
60
+ }
61
+ // Add the Authorization header to the request
62
+ if (!(0, lodash_1.isNil)(this.accessToken)) {
63
+ config.headers = axios_1.AxiosHeaders.from((_a = config === null || config === void 0 ? void 0 : config.headers) !== null && _a !== void 0 ? _a : {});
64
+ config.headers.set('Authorization', `Bearer ${this.accessToken}`);
65
+ }
66
+ return config;
67
+ });
68
+ }
69
+ async refreshAccessToken() {
70
+ try {
71
+ const tokenResponse = await axios_1.default.post(this.authUrl, {
72
+ grant_type: 'client_credentials',
73
+ client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
74
+ client_assertion: (0, generateJWT_1.generateJWT)(this.clientId, this.authUrl, this.privateKey),
75
+ }, {
76
+ headers: {
77
+ 'Content-Type': 'application/x-www-form-urlencoded',
78
+ },
79
+ });
80
+ this.accessToken = tokenResponse.data.access_token;
81
+ this.tokenExpiry =
82
+ Math.floor(Date.now() / 1000) + tokenResponse.data.expires_in; // Current time + expiry
83
+ }
84
+ catch (error) {
85
+ console.error('Failed to refresh access token:', error);
86
+ throw new Error('Unable to refresh access token');
87
+ }
88
+ }
89
+ isTokenExpired() {
90
+ const now = Math.floor(Date.now() / 1000); // Current time in seconds
91
+ return ((0, lodash_1.isNil)(this.tokenExpiry) || now >= this.tokenExpiry - 60 // Refresh 1 minute before expiry
92
+ );
93
+ }
94
+ async getPatient(resourceId) {
95
+ const url = new URL(`Patient/${resourceId}`, this.client.defaults.baseURL);
96
+ const response = await this.client.get(url.toString());
97
+ return response;
98
+ }
99
+ async createPatient(data) {
100
+ const url = new URL(`Patient`, this.client.defaults.baseURL);
101
+ const response = await this.client.post(url.toString(), data);
102
+ return response;
103
+ }
104
+ async matchPatient(data) {
105
+ const url = new URL(`Patient/$match`, this.client.defaults.baseURL);
106
+ const response = await this.client.post(url.toString(), data);
107
+ return response;
108
+ }
109
+ async createDocumentReference(data) {
110
+ const url = new URL(`DocumentReference`, this.client.defaults.baseURL);
111
+ const response = await this.client.post(url.toString(), data);
112
+ return response;
113
+ }
114
+ async getAppointment(resourceId) {
115
+ const url = new URL(`Appointment/${resourceId}`, this.client.defaults.baseURL);
116
+ const response = await this.client.get(url.toString());
117
+ return response;
118
+ }
119
+ }
120
+ exports.EpicFhirR4Client = EpicFhirR4Client;
121
+ //# sourceMappingURL=FhirR4client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FhirR4client.js","sourceRoot":"","sources":["../../../../../../extensions/epic/lib/api/FhirR4/FhirR4client.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export * from './FhirR4client';
@@ -0,0 +1,18 @@
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("./FhirR4client"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/epic/lib/api/FhirR4/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { type Appointment } from '@medplum/fhirtypes';
3
+ export declare const AppointmentReadInputSchema: z.ZodString;
4
+ export type AppointmentReadInputType = z.infer<typeof AppointmentReadInputSchema>;
5
+ /**
6
+ * This is probably imperfect as Medplum's FHIR type might
7
+ * not be fully compatible with Epic's FHIR type but good enough for now
8
+ */
9
+ export type AppointmentReadResponseType = Appointment;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppointmentReadInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.AppointmentReadInputSchema = zod_1.z.string();
6
+ //# sourceMappingURL=AppointmentRead.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppointmentRead.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/AppointmentRead.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGV,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { type DocumentReference } from '@medplum/fhirtypes';
2
+ /**
3
+ * This is probably imperfect as Medplum's FHIR type might
4
+ * not be fully compatible with Epic's FHIR type but good enough for now
5
+ */
6
+ export type DocumentReferenceCreateInputType = Partial<DocumentReference>;
7
+ export type DocumentReferenceCreateResponseType = DocumentReference;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DocumentReferenceCreate.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentReferenceCreate.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { type Patient } from '@medplum/fhirtypes';
2
+ /**
3
+ * This is probably imperfect as Medplum's FHIR type might
4
+ * not be fully compatible with Epic's FHIR type but good enough for now
5
+ */
6
+ export type PatientCreateInputType = Partial<Patient>;
7
+ export type PatientCreateResponseType = Patient;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PatientCreate.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientCreate.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/PatientCreate.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import { type Patient } from '@medplum/fhirtypes';
2
+ export interface PatientMatchInputType {
3
+ resourceType: 'Parameters';
4
+ parameter: [
5
+ {
6
+ name: 'resource';
7
+ resource: Partial<Patient>;
8
+ },
9
+ {
10
+ name: 'onlyCertainMatches';
11
+ valueBoolean: 'true' | 'false';
12
+ }
13
+ ];
14
+ }
15
+ export interface PatientMatchResponseType {
16
+ resourceType: 'Bundle';
17
+ type: 'searchset';
18
+ total: number;
19
+ link: unknown;
20
+ entry: [
21
+ {
22
+ link: unknown;
23
+ fullUrl: string;
24
+ resource: Partial<Patient>;
25
+ search: {
26
+ extension: [
27
+ {
28
+ valueCode: 'certain' | 'probable' | 'possible' | 'certainly-not';
29
+ url: 'http://hl7.org/fhir/StructureDefinition/match-grade';
30
+ }
31
+ ];
32
+ mode: 'match';
33
+ score: number;
34
+ };
35
+ }
36
+ ];
37
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PatientMatch.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientMatch.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/PatientMatch.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { type Patient } from '@medplum/fhirtypes';
3
+ export declare const PatientReadInputSchema: z.ZodString;
4
+ export type PatientReadInputType = z.infer<typeof PatientReadInputSchema>;
5
+ /**
6
+ * This is probably imperfect as Medplum's FHIR type might
7
+ * not be fully compatible with Epic's FHIR type but good enough for now
8
+ */
9
+ export type PatientReadResponseType = Patient;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PatientReadInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PatientReadInputSchema = zod_1.z.string();
6
+ //# sourceMappingURL=PatientRead.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientRead.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/FhirR4/schema/PatientRead.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGV,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './PatientRead.schema';
2
+ export * from './PatientCreate.schema';
3
+ export * from './PatientMatch.schema';
4
+ export * from './DocumentReferenceCreate.schema';
5
+ export * from './AppointmentRead.schema';
@@ -0,0 +1,22 @@
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("./PatientRead.schema"), exports);
18
+ __exportStar(require("./PatientCreate.schema"), exports);
19
+ __exportStar(require("./PatientMatch.schema"), exports);
20
+ __exportStar(require("./DocumentReferenceCreate.schema"), exports);
21
+ __exportStar(require("./AppointmentRead.schema"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Generates a JWT for Epic's FHIR integration.
3
+ * @param clientId - The client ID for the app.
4
+ * @param tokenEndpoint - The FHIR authorization server's token endpoint URL.
5
+ * @param privateKey - The private key to sign the JWT.
6
+ * @returns The signed JWT.
7
+ */
8
+ export declare const generateJWT: (clientId: string, tokenEndpoint: string, privateKey: string) => string;
@@ -0,0 +1,38 @@
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.generateJWT = void 0;
7
+ const crypto_1 = require("crypto");
8
+ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
9
+ /**
10
+ * Generates a JWT for Epic's FHIR integration.
11
+ * @param clientId - The client ID for the app.
12
+ * @param tokenEndpoint - The FHIR authorization server's token endpoint URL.
13
+ * @param privateKey - The private key to sign the JWT.
14
+ * @returns The signed JWT.
15
+ */
16
+ const generateJWT = (clientId, tokenEndpoint, privateKey) => {
17
+ const nowInSeconds = Math.floor(Date.now() / 1000);
18
+ const jwtHeader = {
19
+ alg: 'RS384',
20
+ typ: 'JWT',
21
+ };
22
+ const jwtPayload = {
23
+ iss: clientId,
24
+ sub: clientId,
25
+ aud: tokenEndpoint,
26
+ jti: (0, crypto_1.randomUUID)(),
27
+ exp: nowInSeconds + 300, // 5 minutes in the future
28
+ nbf: nowInSeconds,
29
+ iat: nowInSeconds,
30
+ };
31
+ const token = jsonwebtoken_1.default.sign(jwtPayload, privateKey, {
32
+ algorithm: 'RS384',
33
+ header: jwtHeader,
34
+ });
35
+ return token;
36
+ };
37
+ exports.generateJWT = generateJWT;
38
+ //# sourceMappingURL=generateJWT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateJWT.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/auth/generateJWT/generateJWT.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AACnC,gEAA8B;AAE9B;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,CACzB,QAAgB,EAChB,aAAqB,EACrB,UAAkB,EACV,EAAE;IACV,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;IAClD,MAAM,SAAS,GAAG;QAChB,GAAG,EAAE,OAAO;QACZ,GAAG,EAAE,KAAK;KACX,CAAA;IAED,MAAM,UAAU,GAAG;QACjB,GAAG,EAAE,QAAQ;QACb,GAAG,EAAE,QAAQ;QACb,GAAG,EAAE,aAAa;QAClB,GAAG,EAAE,IAAA,mBAAU,GAAE;QACjB,GAAG,EAAE,YAAY,GAAG,GAAG,EAAE,0BAA0B;QACnD,GAAG,EAAE,YAAY;QACjB,GAAG,EAAE,YAAY;KAClB,CAAA;IAED,MAAM,KAAK,GAAG,sBAAG,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE;QAC7C,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AA3BY,QAAA,WAAW,eA2BvB"}
@@ -0,0 +1 @@
1
+ export * from './generateJWT';
@@ -0,0 +1,18 @@
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("./generateJWT"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/auth/generateJWT/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const StatusSchema: z.ZodEnum<["proposed", "pending", "booked", "arrived", "fulfilled", "cancelled", "noshow", "entered-in-error", "checked-in", "waitlist"]>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.StatusSchema = zod_1.z.enum([
6
+ 'proposed',
7
+ 'pending',
8
+ 'booked',
9
+ 'arrived',
10
+ 'fulfilled',
11
+ 'cancelled',
12
+ 'noshow',
13
+ 'entered-in-error',
14
+ 'checked-in',
15
+ 'waitlist',
16
+ ]);
17
+ //# sourceMappingURL=Status.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Status.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/Appointment/Status.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC;IACjC,UAAU;IACV,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,kBAAkB;IAClB,YAAY;IACZ,UAAU;CACX,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './Status.schema';
@@ -0,0 +1,18 @@
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("./Status.schema"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/Appointment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const StatusSchema: z.ZodEnum<["final", "preliminary"]>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.StatusSchema = zod_1.z.enum(['final', 'preliminary']);
6
+ //# sourceMappingURL=Status.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Status.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/DocumentReference/Status.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * See https://fhir.epic.com/Sandbox?api=1046
4
+ */
5
+ export declare const TypeSchema: z.ZodEnum<["Progress Note", "Consult Note", "Procedure Note", "H&P Note", "Discharge Summary", "ED Note", "Patient Instructions", "Nursing Note"]>;
6
+ export declare const LoincCodeTypesDictionary: Record<z.infer<typeof TypeSchema>, {
7
+ code: string;
8
+ label: string;
9
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoincCodeTypesDictionary = exports.TypeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * See https://fhir.epic.com/Sandbox?api=1046
7
+ */
8
+ exports.TypeSchema = zod_1.z.enum([
9
+ 'Progress Note',
10
+ 'Consult Note',
11
+ 'Procedure Note',
12
+ 'H&P Note',
13
+ 'Discharge Summary',
14
+ 'ED Note',
15
+ 'Patient Instructions',
16
+ 'Nursing Note',
17
+ ]);
18
+ exports.LoincCodeTypesDictionary = {
19
+ 'Progress Note': { code: '11506-3', label: 'Progress Note' },
20
+ 'Consult Note': { code: '11488-4', label: 'Consult Note' },
21
+ 'Procedure Note': { code: '28570-0', label: 'Procedure Note' },
22
+ 'H&P Note': { code: '34117-2', label: 'H&P Note' },
23
+ 'Discharge Summary': { code: '18842-5', label: 'Discharge Summary' },
24
+ 'ED Note': { code: '34111-5', label: 'ED Note' },
25
+ 'Patient Instructions': { code: '69730-0', label: 'Patient Instructions' },
26
+ 'Nursing Note': { code: '34746-8', label: 'Nursing Note' },
27
+ };
28
+ //# sourceMappingURL=Type.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Type.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/DocumentReference/Type.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB;;GAEG;AACU,QAAA,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC;IAC/B,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,UAAU;IACV,mBAAmB;IACnB,SAAS;IACT,sBAAsB;IACtB,cAAc;CACf,CAAC,CAAA;AAEW,QAAA,wBAAwB,GAGjC;IACF,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE;IAC5D,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;IAC1D,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC9D,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE;IAClD,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB,EAAE;IACpE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IAChD,sBAAsB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,sBAAsB,EAAE;IAC1E,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;CAClD,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Status.schema';
2
+ export * from './Type.schema';
@@ -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("./Status.schema"), exports);
18
+ __exportStar(require("./Type.schema"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/DocumentReference/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,gDAA6B"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const GenderSchema: z.ZodEnum<["male", "female", "other", "unknown"]>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenderSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.GenderSchema = zod_1.z.enum(['male', 'female', 'other', 'unknown']);
6
+ //# sourceMappingURL=Gender.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gender.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/Patient/Gender.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './Gender.schema';
@@ -0,0 +1,18 @@
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("./Gender.schema"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/schemas/Patient/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B"}
@@ -0,0 +1,18 @@
1
+ import { type NewActivityPayload, type Pathway, type Patient } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ import { SettingsValidationSchema } from '../settings';
4
+ import { type Activity } from '@awell-health/extensions-core/dist/types/Activity';
5
+ import { EpicFhirR4Client } from './api/FhirR4';
6
+ type ValidatePayloadAndCreateSdks = <T extends z.ZodTypeAny, P extends NewActivityPayload<any, any>>(args: {
7
+ fieldsSchema: T;
8
+ payload: P;
9
+ }) => Promise<{
10
+ epicFhirR4Sdk: EpicFhirR4Client;
11
+ fields: z.infer<(typeof args)['fieldsSchema']>;
12
+ settings: z.infer<typeof SettingsValidationSchema>;
13
+ pathway: Pathway;
14
+ patient: Patient;
15
+ activity: Activity;
16
+ }>;
17
+ export declare const validatePayloadAndCreateSdks: ValidatePayloadAndCreateSdks;
18
+ export {};