@awell-health/awell-extensions 1.0.232 → 1.0.234

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. package/dist/extensions/index.js +2 -0
  2. package/dist/extensions/index.js.map +1 -1
  3. package/dist/extensions/markdown.json +4 -0
  4. package/dist/extensions/medplum/actions/createPatient/config/dataPoints.d.ts +6 -0
  5. package/dist/extensions/medplum/actions/createPatient/config/dataPoints.js +10 -0
  6. package/dist/extensions/medplum/actions/createPatient/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/medplum/actions/createPatient/config/fields.d.ts +119 -0
  8. package/dist/extensions/medplum/actions/createPatient/config/fields.js +87 -0
  9. package/dist/extensions/medplum/actions/createPatient/config/fields.js.map +1 -0
  10. package/dist/extensions/medplum/actions/createPatient/config/index.d.ts +2 -0
  11. package/dist/extensions/medplum/actions/createPatient/config/index.js +19 -0
  12. package/dist/extensions/medplum/actions/createPatient/config/index.js.map +1 -0
  13. package/dist/extensions/medplum/actions/createPatient/createPatient.d.ts +4 -0
  14. package/dist/extensions/medplum/actions/createPatient/createPatient.js +84 -0
  15. package/dist/extensions/medplum/actions/createPatient/createPatient.js.map +1 -0
  16. package/dist/extensions/medplum/actions/createPatient/createPatient.test.d.ts +1 -0
  17. package/dist/extensions/medplum/actions/createPatient/createPatient.test.js +47 -0
  18. package/dist/extensions/medplum/actions/createPatient/createPatient.test.js.map +1 -0
  19. package/dist/extensions/medplum/actions/createPatient/index.d.ts +1 -0
  20. package/dist/extensions/medplum/actions/createPatient/index.js +6 -0
  21. package/dist/extensions/medplum/actions/createPatient/index.js.map +1 -0
  22. package/dist/extensions/medplum/actions/createServiceRequest/config/dataPoints.d.ts +6 -0
  23. package/dist/extensions/medplum/actions/createServiceRequest/config/dataPoints.js +10 -0
  24. package/dist/extensions/medplum/actions/createServiceRequest/config/dataPoints.js.map +1 -0
  25. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.d.ts +48 -0
  26. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.js +37 -0
  27. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.js.map +1 -0
  28. package/dist/extensions/medplum/actions/createServiceRequest/config/index.d.ts +2 -0
  29. package/dist/extensions/medplum/actions/createServiceRequest/config/index.js +19 -0
  30. package/dist/extensions/medplum/actions/createServiceRequest/config/index.js.map +1 -0
  31. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.d.ts +4 -0
  32. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.js +44 -0
  33. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.js.map +1 -0
  34. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.test.d.ts +1 -0
  35. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.test.js +40 -0
  36. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.test.js.map +1 -0
  37. package/dist/extensions/medplum/actions/createServiceRequest/index.d.ts +1 -0
  38. package/dist/extensions/medplum/actions/createServiceRequest/index.js +6 -0
  39. package/dist/extensions/medplum/actions/createServiceRequest/index.js.map +1 -0
  40. package/dist/extensions/medplum/actions/createTask/config/dataPoints.d.ts +6 -0
  41. package/dist/extensions/medplum/actions/createTask/config/dataPoints.js +10 -0
  42. package/dist/extensions/medplum/actions/createTask/config/dataPoints.js.map +1 -0
  43. package/dist/extensions/medplum/actions/createTask/config/fields.d.ts +88 -0
  44. package/dist/extensions/medplum/actions/createTask/config/fields.js +65 -0
  45. package/dist/extensions/medplum/actions/createTask/config/fields.js.map +1 -0
  46. package/dist/extensions/medplum/actions/createTask/config/index.d.ts +2 -0
  47. package/dist/extensions/medplum/actions/createTask/config/index.js +19 -0
  48. package/dist/extensions/medplum/actions/createTask/config/index.js.map +1 -0
  49. package/dist/extensions/medplum/actions/createTask/createTask.d.ts +4 -0
  50. package/dist/extensions/medplum/actions/createTask/createTask.js +56 -0
  51. package/dist/extensions/medplum/actions/createTask/createTask.js.map +1 -0
  52. package/dist/extensions/medplum/actions/createTask/createTask.test.d.ts +1 -0
  53. package/dist/extensions/medplum/actions/createTask/createTask.test.js +41 -0
  54. package/dist/extensions/medplum/actions/createTask/createTask.test.js.map +1 -0
  55. package/dist/extensions/medplum/actions/createTask/index.d.ts +1 -0
  56. package/dist/extensions/medplum/actions/createTask/index.js +6 -0
  57. package/dist/extensions/medplum/actions/createTask/index.js.map +1 -0
  58. package/dist/extensions/medplum/actions/executeBot/config/dataPoints.d.ts +6 -0
  59. package/dist/extensions/medplum/actions/executeBot/config/dataPoints.js +10 -0
  60. package/dist/extensions/medplum/actions/executeBot/config/dataPoints.js.map +1 -0
  61. package/dist/extensions/medplum/actions/executeBot/config/fields.d.ts +34 -0
  62. package/dist/extensions/medplum/actions/executeBot/config/fields.js +41 -0
  63. package/dist/extensions/medplum/actions/executeBot/config/fields.js.map +1 -0
  64. package/dist/extensions/medplum/actions/executeBot/config/index.d.ts +2 -0
  65. package/dist/extensions/medplum/actions/executeBot/config/index.js +19 -0
  66. package/dist/extensions/medplum/actions/executeBot/config/index.js.map +1 -0
  67. package/dist/extensions/medplum/actions/executeBot/executeBot.d.ts +4 -0
  68. package/dist/extensions/medplum/actions/executeBot/executeBot.js +28 -0
  69. package/dist/extensions/medplum/actions/executeBot/executeBot.js.map +1 -0
  70. package/dist/extensions/medplum/actions/executeBot/executeBot.test.d.ts +1 -0
  71. package/dist/extensions/medplum/actions/executeBot/executeBot.test.js +35 -0
  72. package/dist/extensions/medplum/actions/executeBot/executeBot.test.js.map +1 -0
  73. package/dist/extensions/medplum/actions/executeBot/index.d.ts +1 -0
  74. package/dist/extensions/medplum/actions/executeBot/index.js +6 -0
  75. package/dist/extensions/medplum/actions/executeBot/index.js.map +1 -0
  76. package/dist/extensions/medplum/actions/getAppointment/config/dataPoints.d.ts +6 -0
  77. package/dist/extensions/medplum/actions/getAppointment/config/dataPoints.js +10 -0
  78. package/dist/extensions/medplum/actions/getAppointment/config/dataPoints.js.map +1 -0
  79. package/dist/extensions/medplum/actions/getAppointment/config/fields.d.ts +18 -0
  80. package/dist/extensions/medplum/actions/getAppointment/config/fields.js +20 -0
  81. package/dist/extensions/medplum/actions/getAppointment/config/fields.js.map +1 -0
  82. package/dist/extensions/medplum/actions/getAppointment/config/index.d.ts +2 -0
  83. package/dist/extensions/medplum/actions/getAppointment/config/index.js +19 -0
  84. package/dist/extensions/medplum/actions/getAppointment/config/index.js.map +1 -0
  85. package/dist/extensions/medplum/actions/getAppointment/getAppointment.d.ts +4 -0
  86. package/dist/extensions/medplum/actions/getAppointment/getAppointment.js +33 -0
  87. package/dist/extensions/medplum/actions/getAppointment/getAppointment.js.map +1 -0
  88. package/dist/extensions/medplum/actions/getAppointment/getAppointment.test.d.ts +1 -0
  89. package/dist/extensions/medplum/actions/getAppointment/getAppointment.test.js +34 -0
  90. package/dist/extensions/medplum/actions/getAppointment/getAppointment.test.js.map +1 -0
  91. package/dist/extensions/medplum/actions/getAppointment/index.d.ts +1 -0
  92. package/dist/extensions/medplum/actions/getAppointment/index.js +6 -0
  93. package/dist/extensions/medplum/actions/getAppointment/index.js.map +1 -0
  94. package/dist/extensions/medplum/actions/getPatient/config/dataPoints.d.ts +6 -0
  95. package/dist/extensions/medplum/actions/getPatient/config/dataPoints.js +10 -0
  96. package/dist/extensions/medplum/actions/getPatient/config/dataPoints.js.map +1 -0
  97. package/dist/extensions/medplum/actions/getPatient/config/fields.d.ts +18 -0
  98. package/dist/extensions/medplum/actions/getPatient/config/fields.js +20 -0
  99. package/dist/extensions/medplum/actions/getPatient/config/fields.js.map +1 -0
  100. package/dist/extensions/medplum/actions/getPatient/config/index.d.ts +2 -0
  101. package/dist/extensions/medplum/actions/getPatient/config/index.js +19 -0
  102. package/dist/extensions/medplum/actions/getPatient/config/index.js.map +1 -0
  103. package/dist/extensions/medplum/actions/getPatient/getPatient.d.ts +4 -0
  104. package/dist/extensions/medplum/actions/getPatient/getPatient.js +33 -0
  105. package/dist/extensions/medplum/actions/getPatient/getPatient.js.map +1 -0
  106. package/dist/extensions/medplum/actions/getPatient/getPatient.test.d.ts +1 -0
  107. package/dist/extensions/medplum/actions/getPatient/getPatient.test.js +34 -0
  108. package/dist/extensions/medplum/actions/getPatient/getPatient.test.js.map +1 -0
  109. package/dist/extensions/medplum/actions/getPatient/index.d.ts +1 -0
  110. package/dist/extensions/medplum/actions/getPatient/index.js +6 -0
  111. package/dist/extensions/medplum/actions/getPatient/index.js.map +1 -0
  112. package/dist/extensions/medplum/actions/index.d.ts +6 -0
  113. package/dist/extensions/medplum/actions/index.js +16 -0
  114. package/dist/extensions/medplum/actions/index.js.map +1 -0
  115. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.d.ts +2 -0
  116. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.js +11 -0
  117. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.js.map +1 -0
  118. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.d.ts +3 -0
  119. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.js +27 -0
  120. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.js.map +1 -0
  121. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.d.ts +14 -0
  122. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.js +10 -0
  123. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.js.map +1 -0
  124. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.d.ts +2 -0
  125. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.js +11 -0
  126. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.js.map +1 -0
  127. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.d.ts +3 -0
  128. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.js +28 -0
  129. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.js.map +1 -0
  130. package/dist/extensions/medplum/fhir/schemas/atoms/index.d.ts +5 -0
  131. package/dist/extensions/medplum/fhir/schemas/atoms/index.js +16 -0
  132. package/dist/extensions/medplum/fhir/schemas/atoms/index.js.map +1 -0
  133. package/dist/extensions/medplum/fhir/schemas/index.d.ts +1 -0
  134. package/dist/extensions/medplum/fhir/schemas/index.js +6 -0
  135. package/dist/extensions/medplum/fhir/schemas/index.js.map +1 -0
  136. package/dist/extensions/medplum/fhir/schemas/resources/index.d.ts +3 -0
  137. package/dist/extensions/medplum/fhir/schemas/resources/index.js +10 -0
  138. package/dist/extensions/medplum/fhir/schemas/resources/index.js.map +1 -0
  139. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.d.ts +38 -0
  140. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.js +20 -0
  141. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.js.map +1 -0
  142. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.d.ts +17 -0
  143. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.js +12 -0
  144. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.js.map +1 -0
  145. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.d.ts +29 -0
  146. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.js +17 -0
  147. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.js.map +1 -0
  148. package/dist/extensions/medplum/index.d.ts +2 -0
  149. package/dist/extensions/medplum/index.js +42 -0
  150. package/dist/extensions/medplum/index.js.map +1 -0
  151. package/dist/extensions/medplum/settings.d.ts +27 -0
  152. package/dist/extensions/medplum/settings.js +25 -0
  153. package/dist/extensions/medplum/settings.js.map +1 -0
  154. package/dist/extensions/medplum/utils/index.d.ts +2 -0
  155. package/dist/extensions/medplum/utils/index.js +7 -0
  156. package/dist/extensions/medplum/utils/index.js.map +1 -0
  157. package/dist/extensions/medplum/utils/validateAndCreateSdkClient.d.ts +17 -0
  158. package/dist/extensions/medplum/utils/validateAndCreateSdkClient.js +27 -0
  159. package/dist/extensions/medplum/utils/validateAndCreateSdkClient.js.map +1 -0
  160. package/dist/extensions/talkDesk/actions/index.d.ts +7 -0
  161. package/dist/extensions/talkDesk/actions/triggerFlow/config/fields.d.ts +10 -0
  162. package/dist/extensions/talkDesk/actions/triggerFlow/config/fields.js +9 -1
  163. package/dist/extensions/talkDesk/actions/triggerFlow/config/fields.js.map +1 -1
  164. package/dist/extensions/talkDesk/actions/triggerFlow/triggerFlow.js +14 -7
  165. package/dist/extensions/talkDesk/actions/triggerFlow/triggerFlow.js.map +1 -1
  166. package/dist/extensions/talkDesk/actions/triggerFlow/triggerFlow.test.js +1 -0
  167. package/dist/extensions/talkDesk/actions/triggerFlow/triggerFlow.test.js.map +1 -1
  168. package/package.json +4 -1
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ const tests_1 = require("../../../../src/tests");
5
+ const __mocks__1 = require("../../__mocks__");
6
+ jest.mock('@medplum/core', () => {
7
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
8
+ const { MedplumClient: MedplumMockClient } = require('../../__mocks__');
9
+ return {
10
+ MedplumClient: MedplumMockClient,
11
+ };
12
+ });
13
+ describe('Medplum - Execute bot', () => {
14
+ const onComplete = jest.fn();
15
+ const onError = jest.fn();
16
+ beforeEach(() => {
17
+ jest.clearAllMocks();
18
+ });
19
+ test('Should execute a bot', async () => {
20
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
21
+ fields: {
22
+ botId: 'abef24f7-90c8-4705-a1d0-174d9c0968c1',
23
+ body: undefined,
24
+ },
25
+ settings: __mocks__1.mockSettings,
26
+ });
27
+ await _1.executeBot.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
28
+ expect(onComplete).toHaveBeenCalledWith({
29
+ data_points: {
30
+ data: '"Bot executed!"',
31
+ },
32
+ });
33
+ });
34
+ });
35
+ //# sourceMappingURL=executeBot.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeBot.test.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/executeBot/executeBot.test.ts"],"names":[],"mappings":";;AAAA,wBAA8B;AAC9B,iDAA2D;AAC3D,8CAA8C;AAE9C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE;IAC9B,8DAA8D;IAC9D,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAEvE,OAAO;QACL,aAAa,EAAE,iBAAiB;KACjC,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,KAAK,EAAE,sCAAsC;gBAC7C,IAAI,EAAE,SAAS;aAChB;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,CAAA;QAEF,MAAM,aAAU,CAAC,iBAAiB,CAChC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,IAAI,EAAE,iBAAiB;aACxB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { executeBot } from './executeBot';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeBot = void 0;
4
+ var executeBot_1 = require("./executeBot");
5
+ Object.defineProperty(exports, "executeBot", { enumerable: true, get: function () { return executeBot_1.executeBot; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/executeBot/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ appointmentData: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ appointmentData: {
6
+ key: 'appointmentData',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getAppointment/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,eAAe,EAAE;QACf,GAAG,EAAE,iBAAiB;QACtB,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
+ appointmentId: {
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
+ appointmentId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ appointmentId: string;
16
+ }, {
17
+ appointmentId: string;
18
+ }>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ exports.fields = {
7
+ appointmentId: {
8
+ id: 'appointmentId',
9
+ label: 'Appointment ID',
10
+ description: 'The identifier of the appointment in Medplum',
11
+ type: extensions_core_1.FieldType.STRING,
12
+ required: true,
13
+ },
14
+ };
15
+ exports.FieldsValidationSchema = zod_1.z.object({
16
+ appointmentId: zod_1.z.string().nonempty({
17
+ message: 'Missing "Appointment ID"',
18
+ }),
19
+ });
20
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getAppointment/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,8CAA8C;QAC3D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;QACjC,OAAO,EAAE,0BAA0B;KACpC,CAAC;CAC+C,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './dataPoints';
2
+ export * from './fields';
@@ -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("./dataPoints"), exports);
18
+ __exportStar(require("./fields"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getAppointment/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const getAppointment: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAppointment = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const utils_1 = require("../../utils");
7
+ exports.getAppointment = {
8
+ key: 'getAppointment',
9
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
10
+ title: 'Get appointment',
11
+ description: 'Retrieve appointment details from Medplum',
12
+ fields: config_1.fields,
13
+ previewable: true,
14
+ dataPoints: config_1.dataPoints,
15
+ onActivityCreated: async (payload, onComplete, onError) => {
16
+ const { fields: input, medplumSdk } = await (0, utils_1.validateAndCreateSdkClient)({
17
+ fieldsSchema: config_1.FieldsValidationSchema,
18
+ payload,
19
+ });
20
+ const res = await medplumSdk.readResource('Appointment', input.appointmentId);
21
+ /**
22
+ * TODO:
23
+ * Either create specific data points and pick from the appointment object what we need OR
24
+ * store the full object and allow introspection and picking the values the builder needs in Awell Studio.
25
+ */
26
+ await onComplete({
27
+ data_points: {
28
+ appointmentData: JSON.stringify(res),
29
+ },
30
+ });
31
+ },
32
+ };
33
+ //# sourceMappingURL=getAppointment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAppointment.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getAppointment/getAppointment.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,uCAAwD;AAE3C,QAAA,cAAc,GAIvB;IACF,GAAG,EAAE,gBAAgB;IACrB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,2CAA2C;IACxD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,kCAA0B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,YAAY,CACvC,aAAa,EACb,KAAK,CAAC,aAAa,CACpB,CAAA;QAED;;;;WAIG;QACH,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;aACrC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ const tests_1 = require("../../../../src/tests");
5
+ const __mocks__1 = require("../../__mocks__");
6
+ jest.mock('@medplum/core', () => {
7
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
8
+ const { MedplumClient: MedplumMockClient } = require('../../__mocks__');
9
+ return {
10
+ MedplumClient: MedplumMockClient,
11
+ };
12
+ });
13
+ describe('Medplum - Get appointment', () => {
14
+ const onComplete = jest.fn();
15
+ const onError = jest.fn();
16
+ beforeEach(() => {
17
+ jest.clearAllMocks();
18
+ });
19
+ test('Should return an appointment', async () => {
20
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
21
+ fields: {
22
+ appointmentId: '3e471b29-eec4-47e0-86f1-cec848658417',
23
+ },
24
+ settings: __mocks__1.mockSettings,
25
+ });
26
+ await _1.getAppointment.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
27
+ expect(onComplete).toHaveBeenCalledWith({
28
+ data_points: {
29
+ appointmentData: JSON.stringify(__mocks__1.mockAppointmentResponse),
30
+ },
31
+ });
32
+ });
33
+ });
34
+ //# sourceMappingURL=getAppointment.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAppointment.test.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getAppointment/getAppointment.test.ts"],"names":[],"mappings":";;AAAA,wBAAkC;AAClC,iDAA2D;AAC3D,8CAAuE;AAEvE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE;IAC9B,8DAA8D;IAC9D,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAEvE,OAAO;QACL,aAAa,EAAE,iBAAiB;KACjC,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,aAAa,EAAE,sCAAsC;aACtD;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,CAAA;QAEF,MAAM,iBAAc,CAAC,iBAAiB,CACpC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,kCAAuB,CAAC;aACzD;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { getAppointment } from './getAppointment';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAppointment = void 0;
4
+ var getAppointment_1 = require("./getAppointment");
5
+ Object.defineProperty(exports, "getAppointment", { enumerable: true, get: function () { return getAppointment_1.getAppointment; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getAppointment/index.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAAxC,gHAAA,cAAc,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ patientData: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ patientData: {
6
+ key: 'patientData',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getPatient/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import { z } from 'zod';
3
+ export declare const fields: {
4
+ patientId: {
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
+ patientId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ patientId: string;
16
+ }, {
17
+ patientId: string;
18
+ }>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ exports.fields = {
7
+ patientId: {
8
+ id: 'patientId',
9
+ label: 'Patient ID',
10
+ description: 'The identifier of the patient in Medplum',
11
+ type: extensions_core_1.FieldType.STRING,
12
+ required: true,
13
+ },
14
+ };
15
+ exports.FieldsValidationSchema = zod_1.z.object({
16
+ patientId: zod_1.z.string().nonempty({
17
+ message: 'Missing "Patient ID"',
18
+ }),
19
+ });
20
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getPatient/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;QAC7B,OAAO,EAAE,sBAAsB;KAChC,CAAC;CAC+C,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './dataPoints';
2
+ export * from './fields';
@@ -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("./dataPoints"), exports);
18
+ __exportStar(require("./fields"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/getPatient/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const getPatient: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPatient = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const utils_1 = require("../../utils");
7
+ exports.getPatient = {
8
+ key: 'getPatient',
9
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
10
+ title: 'Get patient',
11
+ description: 'Retrieve patient details from Medplum',
12
+ fields: config_1.fields,
13
+ previewable: true,
14
+ dataPoints: config_1.dataPoints,
15
+ onActivityCreated: async (payload, onComplete, onError) => {
16
+ const { fields: input, medplumSdk } = await (0, utils_1.validateAndCreateSdkClient)({
17
+ fieldsSchema: config_1.FieldsValidationSchema,
18
+ payload,
19
+ });
20
+ const res = await medplumSdk.readResource('Patient', input.patientId);
21
+ /**
22
+ * TODO:
23
+ * Either create specific data points and pick from the patient object what we need OR
24
+ * store the full object and allow introspection and picking the values the builder needs in Awell Studio.
25
+ */
26
+ await onComplete({
27
+ data_points: {
28
+ patientData: JSON.stringify(res),
29
+ },
30
+ });
31
+ },
32
+ };
33
+ //# sourceMappingURL=getPatient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPatient.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getPatient/getPatient.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,uCAAwD;AAE3C,QAAA,UAAU,GAInB;IACF,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,uCAAuC;IACpD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,kCAA0B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;QAErE;;;;WAIG;QACH,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;aACjC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ const tests_1 = require("../../../../src/tests");
5
+ const __mocks__1 = require("../../__mocks__");
6
+ jest.mock('@medplum/core', () => {
7
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
8
+ const { MedplumClient: MedplumMockClient } = require('../../__mocks__');
9
+ return {
10
+ MedplumClient: MedplumMockClient,
11
+ };
12
+ });
13
+ describe('Medplum - Get patient', () => {
14
+ const onComplete = jest.fn();
15
+ const onError = jest.fn();
16
+ beforeEach(() => {
17
+ jest.clearAllMocks();
18
+ });
19
+ test('Should return a patient', async () => {
20
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
21
+ fields: {
22
+ patientId: '404bbc59-5b60-445d-808c-b2c7b2351d9b',
23
+ },
24
+ settings: __mocks__1.mockSettings,
25
+ });
26
+ await _1.getPatient.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
27
+ expect(onComplete).toHaveBeenCalledWith({
28
+ data_points: {
29
+ patientData: JSON.stringify(__mocks__1.mockGetPatientResponse),
30
+ },
31
+ });
32
+ });
33
+ });
34
+ //# sourceMappingURL=getPatient.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPatient.test.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getPatient/getPatient.test.ts"],"names":[],"mappings":";;AAAA,wBAA8B;AAC9B,iDAA2D;AAC3D,8CAAsE;AAEtE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE;IAC9B,8DAA8D;IAC9D,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAEvE,OAAO;QACL,aAAa,EAAE,iBAAiB;KACjC,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACzC,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,SAAS,EAAE,sCAAsC;aAClD;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,CAAA;QAEF,MAAM,aAAU,CAAC,iBAAiB,CAChC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,iCAAsB,CAAC;aACpD;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { getPatient } from './getPatient';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPatient = void 0;
4
+ var getPatient_1 = require("./getPatient");
5
+ Object.defineProperty(exports, "getPatient", { enumerable: true, get: function () { return getPatient_1.getPatient; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/getPatient/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,6 @@
1
+ export { getPatient } from './getPatient';
2
+ export { createPatient } from './createPatient';
3
+ export { getAppointment } from './getAppointment';
4
+ export { executeBot } from './executeBot';
5
+ export { createTask } from './createTask';
6
+ export { createServiceRequest } from './createServiceRequest';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createServiceRequest = exports.createTask = exports.executeBot = exports.getAppointment = exports.createPatient = exports.getPatient = void 0;
4
+ var getPatient_1 = require("./getPatient");
5
+ Object.defineProperty(exports, "getPatient", { enumerable: true, get: function () { return getPatient_1.getPatient; } });
6
+ var createPatient_1 = require("./createPatient");
7
+ Object.defineProperty(exports, "createPatient", { enumerable: true, get: function () { return createPatient_1.createPatient; } });
8
+ var getAppointment_1 = require("./getAppointment");
9
+ Object.defineProperty(exports, "getAppointment", { enumerable: true, get: function () { return getAppointment_1.getAppointment; } });
10
+ var executeBot_1 = require("./executeBot");
11
+ Object.defineProperty(exports, "executeBot", { enumerable: true, get: function () { return executeBot_1.executeBot; } });
12
+ var createTask_1 = require("./createTask");
13
+ Object.defineProperty(exports, "createTask", { enumerable: true, get: function () { return createTask_1.createTask; } });
14
+ var createServiceRequest_1 = require("./createServiceRequest");
15
+ Object.defineProperty(exports, "createServiceRequest", { enumerable: true, get: function () { return createServiceRequest_1.createServiceRequest; } });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/medplum/actions/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const GenderSchema: z.ZodUnion<[z.ZodLiteral<"male">, z.ZodLiteral<"female">, z.ZodLiteral<"other">, z.ZodLiteral<"unknown">]>;
@@ -0,0 +1,11 @@
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.union([
6
+ zod_1.z.literal('male'),
7
+ zod_1.z.literal('female'),
8
+ zod_1.z.literal('other'),
9
+ zod_1.z.literal('unknown'),
10
+ ]);
11
+ //# sourceMappingURL=GenderSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenderSchema.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/fhir/schemas/atoms/GenderSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,YAAY,GAAG,OAAC,CAAC,KAAK,CAAC;IAClC,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACjB,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnB,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAClB,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;CACrB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const ServiceRequestIntentSchema: z.ZodUnion<[z.ZodLiteral<"proposal">, z.ZodLiteral<"plan">, z.ZodLiteral<"directive">, z.ZodLiteral<"order">, z.ZodLiteral<"original-order">, z.ZodLiteral<"reflex-order">, z.ZodLiteral<"filler-order">, z.ZodLiteral<"instance-order">, z.ZodLiteral<"option">]>;
3
+ export declare const TaskIntentSchema: z.ZodUnion<[z.ZodLiteral<"unknown">, z.ZodLiteral<"proposal">, z.ZodLiteral<"plan">, z.ZodLiteral<"order">, z.ZodLiteral<"original-order">, z.ZodLiteral<"reflex-order">, z.ZodLiteral<"filler-order">, z.ZodLiteral<"instance-order">, z.ZodLiteral<"option">]>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskIntentSchema = exports.ServiceRequestIntentSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ServiceRequestIntentSchema = zod_1.z.union([
6
+ zod_1.z.literal('proposal'),
7
+ zod_1.z.literal('plan'),
8
+ zod_1.z.literal('directive'),
9
+ zod_1.z.literal('order'),
10
+ zod_1.z.literal('original-order'),
11
+ zod_1.z.literal('reflex-order'),
12
+ zod_1.z.literal('filler-order'),
13
+ zod_1.z.literal('instance-order'),
14
+ zod_1.z.literal('option'),
15
+ ]);
16
+ exports.TaskIntentSchema = zod_1.z.union([
17
+ zod_1.z.literal('unknown'),
18
+ zod_1.z.literal('proposal'),
19
+ zod_1.z.literal('plan'),
20
+ zod_1.z.literal('order'),
21
+ zod_1.z.literal('original-order'),
22
+ zod_1.z.literal('reflex-order'),
23
+ zod_1.z.literal('filler-order'),
24
+ zod_1.z.literal('instance-order'),
25
+ zod_1.z.literal('option'),
26
+ ]);
27
+ //# sourceMappingURL=IntentSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntentSchema.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/fhir/schemas/atoms/IntentSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC;IAChD,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IACrB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACjB,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACtB,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAClB,OAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC3B,OAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACzB,OAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACzB,OAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC3B,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;CACpB,CAAC,CAAA;AAEW,QAAA,gBAAgB,GAAG,OAAC,CAAC,KAAK,CAAC;IACtC,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACpB,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IACrB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACjB,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAClB,OAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC3B,OAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACzB,OAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACzB,OAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC3B,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;CACpB,CAAC,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const PeriodSchema: z.ZodObject<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ start: z.ZodOptional<z.ZodString>;
5
+ end: z.ZodOptional<z.ZodString>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ id?: string | undefined;
8
+ start?: string | undefined;
9
+ end?: string | undefined;
10
+ }, {
11
+ id?: string | undefined;
12
+ start?: string | undefined;
13
+ end?: string | undefined;
14
+ }>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PeriodSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PeriodSchema = zod_1.z.object({
6
+ id: zod_1.z.string().optional(),
7
+ start: zod_1.z.string().optional(),
8
+ end: zod_1.z.string().optional(),
9
+ });
10
+ //# sourceMappingURL=PeriodSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeriodSchema.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/fhir/schemas/atoms/PeriodSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const PrioritySchema: z.ZodUnion<[z.ZodLiteral<"routine">, z.ZodLiteral<"urgent">, z.ZodLiteral<"asap">, z.ZodLiteral<"stat">]>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrioritySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PrioritySchema = zod_1.z.union([
6
+ zod_1.z.literal('routine'),
7
+ zod_1.z.literal('urgent'),
8
+ zod_1.z.literal('asap'),
9
+ zod_1.z.literal('stat'),
10
+ ]);
11
+ //# sourceMappingURL=PrioritySchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrioritySchema.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/fhir/schemas/atoms/PrioritySchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,cAAc,GAAG,OAAC,CAAC,KAAK,CAAC;IACpC,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACpB,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACjB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CAClB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const ServiceRequestStatusSchema: z.ZodUnion<[z.ZodLiteral<"draft">, z.ZodLiteral<"active">, z.ZodLiteral<"on-hold">, z.ZodLiteral<"revoked">, z.ZodLiteral<"completed">, z.ZodLiteral<"entered-in-error">, z.ZodLiteral<"unknown">]>;
3
+ export declare const TaskStatusSchema: z.ZodUnion<[z.ZodLiteral<"draft">, z.ZodLiteral<"requested">, z.ZodLiteral<"received">, z.ZodLiteral<"accepted">, z.ZodLiteral<"rejected">, z.ZodLiteral<"ready">, z.ZodLiteral<"cancelled">, z.ZodLiteral<"in-progress">, z.ZodLiteral<"on-hold">, z.ZodLiteral<"failed">, z.ZodLiteral<"completed">, z.ZodLiteral<"entered-in-error">]>;