@awell-health/awell-extensions 1.0.214 → 1.0.216

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/athenahealth/actions/createAppointmentNote/config/datapoints.js.map +1 -0
  2. package/dist/extensions/athenahealth/actions/createAppointmentNote/config/fields.d.ts +39 -0
  3. package/dist/extensions/athenahealth/actions/{cancelAppointment → createAppointmentNote}/config/fields.js +16 -8
  4. package/dist/extensions/athenahealth/actions/createAppointmentNote/config/fields.js.map +1 -0
  5. package/dist/extensions/athenahealth/actions/createAppointmentNote/config/index.js.map +1 -0
  6. package/dist/extensions/athenahealth/actions/{addProblemToPatientChart/addProblemToPatientChart.d.ts → createAppointmentNote/createAppointmentNote.d.ts} +1 -1
  7. package/dist/extensions/athenahealth/actions/createAppointmentNote/createAppointmentNote.js +29 -0
  8. package/dist/extensions/athenahealth/actions/createAppointmentNote/createAppointmentNote.js.map +1 -0
  9. package/dist/extensions/athenahealth/actions/createAppointmentNote/createAppointmentNote.test.js +73 -0
  10. package/dist/extensions/athenahealth/actions/createAppointmentNote/createAppointmentNote.test.js.map +1 -0
  11. package/dist/extensions/athenahealth/actions/createAppointmentNote/index.d.ts +1 -0
  12. package/dist/extensions/athenahealth/actions/createAppointmentNote/index.js +6 -0
  13. package/dist/extensions/athenahealth/actions/createAppointmentNote/index.js.map +1 -0
  14. package/dist/extensions/athenahealth/actions/createPatient/config/datapoints.d.ts +6 -0
  15. package/dist/extensions/athenahealth/actions/createPatient/config/datapoints.js +10 -0
  16. package/dist/extensions/athenahealth/actions/createPatient/config/datapoints.js.map +1 -0
  17. package/dist/extensions/athenahealth/actions/{addDocumentToPatientChart → createPatient}/config/fields.d.ts +23 -32
  18. package/dist/extensions/athenahealth/actions/createPatient/config/fields.js +54 -0
  19. package/dist/extensions/athenahealth/actions/createPatient/config/fields.js.map +1 -0
  20. package/dist/extensions/athenahealth/actions/createPatient/config/index.js.map +1 -0
  21. package/dist/extensions/athenahealth/actions/{cancelAppointment/cancelAppointment.d.ts → createPatient/createPatient.d.ts} +1 -1
  22. package/dist/extensions/athenahealth/actions/createPatient/createPatient.js +31 -0
  23. package/dist/extensions/athenahealth/actions/createPatient/createPatient.js.map +1 -0
  24. package/dist/extensions/athenahealth/actions/createPatient/createPatient.test.js +32 -0
  25. package/dist/extensions/athenahealth/actions/createPatient/createPatient.test.js.map +1 -0
  26. package/dist/extensions/athenahealth/actions/createPatient/index.d.ts +1 -0
  27. package/dist/extensions/athenahealth/actions/createPatient/index.js +6 -0
  28. package/dist/extensions/athenahealth/actions/createPatient/index.js.map +1 -0
  29. package/dist/extensions/athenahealth/actions/getAppointment/config/datapoints.d.ts +9 -1
  30. package/dist/extensions/athenahealth/actions/getAppointment/config/datapoints.js +10 -2
  31. package/dist/extensions/athenahealth/actions/getAppointment/config/datapoints.js.map +1 -1
  32. package/dist/extensions/athenahealth/actions/getAppointment/config/fields.d.ts +0 -10
  33. package/dist/extensions/athenahealth/actions/getAppointment/config/fields.js +0 -8
  34. package/dist/extensions/athenahealth/actions/getAppointment/config/fields.js.map +1 -1
  35. package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.js +12 -7
  36. package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.js.map +1 -1
  37. package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.test.js +60 -15
  38. package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.test.js.map +1 -1
  39. package/dist/extensions/athenahealth/actions/getPatient/config/fields.d.ts +0 -10
  40. package/dist/extensions/athenahealth/actions/getPatient/config/fields.js +0 -8
  41. package/dist/extensions/athenahealth/actions/getPatient/config/fields.js.map +1 -1
  42. package/dist/extensions/athenahealth/actions/getPatient/getPatient.js +9 -8
  43. package/dist/extensions/athenahealth/actions/getPatient/getPatient.js.map +1 -1
  44. package/dist/extensions/athenahealth/actions/getPatient/getPatient.test.js +58 -15
  45. package/dist/extensions/athenahealth/actions/getPatient/getPatient.test.js.map +1 -1
  46. package/dist/extensions/athenahealth/actions/index.d.ts +35 -87
  47. package/dist/extensions/athenahealth/actions/index.js +4 -6
  48. package/dist/extensions/athenahealth/actions/index.js.map +1 -1
  49. package/dist/extensions/athenahealth/api/client.d.ts +32 -2
  50. package/dist/extensions/athenahealth/api/client.js +38 -2
  51. package/dist/extensions/athenahealth/api/client.js.map +1 -1
  52. package/dist/extensions/athenahealth/api/schema/appointment.d.ts +36 -0
  53. package/dist/extensions/athenahealth/api/schema/appointment.js +21 -0
  54. package/dist/extensions/athenahealth/api/schema/appointment.js.map +1 -0
  55. package/dist/extensions/athenahealth/api/schema/date.d.ts +7 -0
  56. package/dist/extensions/athenahealth/api/schema/date.js +23 -0
  57. package/dist/extensions/athenahealth/api/schema/date.js.map +1 -0
  58. package/dist/extensions/athenahealth/api/schema/index.d.ts +3 -0
  59. package/dist/extensions/athenahealth/api/schema/index.js +11 -0
  60. package/dist/extensions/athenahealth/api/schema/index.js.map +1 -0
  61. package/dist/extensions/athenahealth/api/schema/patient.d.ts +42 -0
  62. package/dist/extensions/athenahealth/api/schema/patient.js +22 -0
  63. package/dist/extensions/athenahealth/api/schema/patient.js.map +1 -0
  64. package/dist/extensions/athenahealth/api/schema/schema.test.js +22 -0
  65. package/dist/extensions/athenahealth/api/schema/schema.test.js.map +1 -0
  66. package/dist/extensions/athenahealth/helpers.d.ts +2 -0
  67. package/dist/extensions/athenahealth/helpers.js +2 -2
  68. package/dist/extensions/athenahealth/helpers.js.map +1 -1
  69. package/dist/extensions/athenahealth/settings.d.ts +10 -0
  70. package/dist/extensions/athenahealth/settings.js +11 -3
  71. package/dist/extensions/athenahealth/settings.js.map +1 -1
  72. package/dist/extensions/athenahealth/validation/date.d.ts +6 -0
  73. package/dist/extensions/athenahealth/validation/date.js +22 -0
  74. package/dist/extensions/athenahealth/validation/date.js.map +1 -0
  75. package/dist/extensions/athenahealth/validation/validation.test.d.ts +1 -0
  76. package/dist/extensions/athenahealth/validation/validation.test.js +12 -0
  77. package/dist/extensions/athenahealth/validation/validation.test.js.map +1 -0
  78. package/dist/extensions/markdown.json +1 -1
  79. package/package.json +1 -1
  80. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.d.ts +0 -4
  81. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.js +0 -24
  82. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.js.map +0 -1
  83. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.test.js +0 -31
  84. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.test.js.map +0 -1
  85. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/datapoints.js.map +0 -1
  86. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/fields.js +0 -61
  87. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/fields.js.map +0 -1
  88. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/index.js.map +0 -1
  89. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/index.d.ts +0 -1
  90. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/index.js +0 -6
  91. package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/index.js.map +0 -1
  92. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.js +0 -24
  93. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.js.map +0 -1
  94. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.test.js +0 -29
  95. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.test.js.map +0 -1
  96. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.d.ts +0 -1
  97. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.js +0 -5
  98. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.js.map +0 -1
  99. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/fields.d.ts +0 -48
  100. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/fields.js +0 -45
  101. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/fields.js.map +0 -1
  102. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/index.js.map +0 -1
  103. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/index.d.ts +0 -1
  104. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/index.js +0 -6
  105. package/dist/extensions/athenahealth/actions/addProblemToPatientChart/index.js.map +0 -1
  106. package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.js +0 -24
  107. package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.js.map +0 -1
  108. package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.test.js +0 -27
  109. package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.test.js.map +0 -1
  110. package/dist/extensions/athenahealth/actions/cancelAppointment/config/datapoints.d.ts +0 -1
  111. package/dist/extensions/athenahealth/actions/cancelAppointment/config/datapoints.js +0 -5
  112. package/dist/extensions/athenahealth/actions/cancelAppointment/config/datapoints.js.map +0 -1
  113. package/dist/extensions/athenahealth/actions/cancelAppointment/config/fields.d.ts +0 -28
  114. package/dist/extensions/athenahealth/actions/cancelAppointment/config/fields.js.map +0 -1
  115. package/dist/extensions/athenahealth/actions/cancelAppointment/config/index.d.ts +0 -2
  116. package/dist/extensions/athenahealth/actions/cancelAppointment/config/index.js +0 -9
  117. package/dist/extensions/athenahealth/actions/cancelAppointment/config/index.js.map +0 -1
  118. package/dist/extensions/athenahealth/actions/cancelAppointment/index.d.ts +0 -1
  119. package/dist/extensions/athenahealth/actions/cancelAppointment/index.js +0 -6
  120. package/dist/extensions/athenahealth/actions/cancelAppointment/index.js.map +0 -1
  121. /package/dist/extensions/athenahealth/actions/{addDocumentToPatientChart → createAppointmentNote}/config/datapoints.d.ts +0 -0
  122. /package/dist/extensions/athenahealth/actions/{addDocumentToPatientChart → createAppointmentNote}/config/datapoints.js +0 -0
  123. /package/dist/extensions/athenahealth/actions/{addDocumentToPatientChart → createAppointmentNote}/config/index.d.ts +0 -0
  124. /package/dist/extensions/athenahealth/actions/{addDocumentToPatientChart → createAppointmentNote}/config/index.js +0 -0
  125. /package/dist/extensions/athenahealth/actions/{addDocumentToPatientChart/addDocumentToPatientChart.test.d.ts → createAppointmentNote/createAppointmentNote.test.d.ts} +0 -0
  126. /package/dist/extensions/athenahealth/actions/{addProblemToPatientChart → createPatient}/config/index.d.ts +0 -0
  127. /package/dist/extensions/athenahealth/actions/{addProblemToPatientChart → createPatient}/config/index.js +0 -0
  128. /package/dist/extensions/athenahealth/actions/{addProblemToPatientChart/addProblemToPatientChart.test.d.ts → createPatient/createPatient.test.d.ts} +0 -0
  129. /package/dist/extensions/athenahealth/{actions/cancelAppointment/cancelAppointment.test.d.ts → api/schema/schema.test.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/createAppointmentNote/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
@@ -0,0 +1,39 @@
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
+ notetext: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.TEXT;
16
+ required: true;
17
+ };
18
+ displayonschedule: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.BOOLEAN;
23
+ required: false;
24
+ };
25
+ };
26
+ export declare const FieldsValidationSchema: z.ZodObject<{
27
+ appointmentid: z.ZodString;
28
+ notetext: z.ZodString;
29
+ displayonschedule: z.ZodOptional<z.ZodBoolean>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ appointmentid: string;
32
+ notetext: string;
33
+ displayonschedule?: boolean | undefined;
34
+ }, {
35
+ appointmentid: string;
36
+ notetext: string;
37
+ displayonschedule?: boolean | undefined;
38
+ }>;
39
+ export type CreateAppointmentNoteInputType = z.infer<typeof FieldsValidationSchema>;
@@ -7,23 +7,31 @@ exports.FieldsValidationSchema = exports.fields = void 0;
7
7
  const extensions_core_1 = require("@awell-health/extensions-core");
8
8
  const zod_1 = __importDefault(require("zod"));
9
9
  exports.fields = {
10
- appointmentId: {
11
- id: 'appointmentId',
10
+ appointmentid: {
11
+ id: 'appointmentid',
12
12
  label: 'Appointment ID',
13
13
  description: '',
14
14
  type: extensions_core_1.FieldType.STRING,
15
15
  required: true,
16
16
  },
17
- practiceId: {
18
- id: 'practiceId',
19
- label: 'Practice ID',
17
+ notetext: {
18
+ id: 'notetext',
19
+ label: 'Note text',
20
20
  description: '',
21
- type: extensions_core_1.FieldType.STRING,
21
+ type: extensions_core_1.FieldType.TEXT,
22
22
  required: true,
23
23
  },
24
+ displayonschedule: {
25
+ id: 'displayonschedule',
26
+ label: 'Add note to homepage',
27
+ description: 'Add appointment note to homepage display',
28
+ type: extensions_core_1.FieldType.BOOLEAN,
29
+ required: false,
30
+ },
24
31
  };
25
32
  exports.FieldsValidationSchema = zod_1.default.object({
26
- appointmentId: zod_1.default.string(),
27
- practiceId: zod_1.default.string(),
33
+ appointmentid: zod_1.default.string().min(1),
34
+ notetext: zod_1.default.string().min(1),
35
+ displayonschedule: zod_1.default.boolean().optional(),
28
36
  });
29
37
  //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/createAppointmentNote/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,iBAAiB,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACQ,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/createAppointmentNote/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -1,4 +1,4 @@
1
1
  import { type Action } from '@awell-health/extensions-core';
2
2
  import { type settings } from '../../settings';
3
3
  import { fields, dataPoints } from './config';
4
- export declare const addProblemToPatientChart: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
4
+ export declare const createAppointmentNote: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAppointmentNote = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const helpers_1 = require("../../helpers");
7
+ const lodash_1 = require("lodash");
8
+ exports.createAppointmentNote = {
9
+ key: 'createAppointmentNote',
10
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
11
+ title: 'Create appointment note',
12
+ description: 'Creates a note for a specific appointment',
13
+ fields: config_1.fields,
14
+ previewable: false,
15
+ dataPoints: config_1.dataPoints,
16
+ onActivityCreated: async (payload, onComplete, onError) => {
17
+ const { fields: input, client, settings: { practiceId }, } = await (0, helpers_1.validatePayloadAndCreateClient)({
18
+ fieldsSchema: config_1.FieldsValidationSchema,
19
+ payload,
20
+ });
21
+ await client.createAppointmentNote({
22
+ practiceId,
23
+ appointmentId: input.appointmentid,
24
+ data: (0, lodash_1.omit)(input, ['appointmentid']),
25
+ });
26
+ await onComplete();
27
+ },
28
+ };
29
+ //# sourceMappingURL=createAppointmentNote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAppointmentNote.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/createAppointmentNote/createAppointmentNote.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,2CAA8D;AAC9D,mCAA6B;AAEhB,QAAA,qBAAqB,GAI9B;IACF,GAAG,EAAE,uBAAuB;IAC5B,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,2CAA2C;IACxD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EACJ,MAAM,EAAE,KAAK,EACb,MAAM,EACN,QAAQ,EAAE,EAAE,UAAU,EAAE,GACzB,GAAG,MAAM,IAAA,wCAA8B,EAAC;YACvC,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,MAAM,CAAC,qBAAqB,CAAC;YACjC,UAAU;YACV,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,IAAI,EAAE,IAAA,aAAI,EAAC,KAAK,EAAE,CAAC,eAAe,CAAC,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ const tests_1 = require("../../../../src/tests");
5
+ const mockData_1 = require("../../api/__mocks__/mockData");
6
+ jest.mock('../../api/client');
7
+ describe('athenahealth - Create appointment note', () => {
8
+ const onComplete = jest.fn();
9
+ const onError = jest.fn();
10
+ beforeEach(() => {
11
+ jest.clearAllMocks();
12
+ });
13
+ test('Should create an appointment note', async () => {
14
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
15
+ fields: {
16
+ appointmentid: '1',
17
+ notetext: 'hello world',
18
+ displayonschedule: true,
19
+ },
20
+ settings: mockData_1.mockSettings,
21
+ });
22
+ await _1.createAppointmentNote.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
23
+ expect(onComplete).toHaveBeenCalled();
24
+ });
25
+ test('Should return an error when the appointment does not exist', async () => {
26
+ var _a, _b;
27
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
28
+ fields: {
29
+ appointmentid: 'non-existing-appointment-id',
30
+ notetext: 'hello world',
31
+ displayonschedule: true,
32
+ },
33
+ settings: mockData_1.mockSettings,
34
+ });
35
+ try {
36
+ await _1.createAppointmentNote.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
37
+ }
38
+ catch (error) {
39
+ const axiosError = error;
40
+ expect(axiosError.response).toBeDefined();
41
+ expect((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status).toBe(404);
42
+ expect((_b = axiosError.response) === null || _b === void 0 ? void 0 : _b.data).toStrictEqual({
43
+ error: 'The appointment is not available.',
44
+ });
45
+ }
46
+ expect(onComplete).not.toHaveBeenCalled();
47
+ });
48
+ test('Should return an error when practice is not found', async () => {
49
+ var _a, _b;
50
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
51
+ fields: {
52
+ appointmentid: '1',
53
+ notetext: 'hello world',
54
+ displayonschedule: true,
55
+ },
56
+ settings: { ...mockData_1.mockSettings, practiceId: 'non-existing-practice-id' },
57
+ });
58
+ try {
59
+ await _1.createAppointmentNote.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
60
+ }
61
+ catch (error) {
62
+ const axiosError = error;
63
+ expect(axiosError.response).toBeDefined();
64
+ expect((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status).toBe(404);
65
+ expect((_b = axiosError.response) === null || _b === void 0 ? void 0 : _b.data).toStrictEqual({
66
+ error: 'Invalid practice.',
67
+ detailedmessage: 'The practice ID does not exist.',
68
+ });
69
+ }
70
+ expect(onComplete).not.toHaveBeenCalled();
71
+ });
72
+ });
73
+ //# sourceMappingURL=createAppointmentNote.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAppointmentNote.test.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/createAppointmentNote/createAppointmentNote.test.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export { createAppointmentNote } from './createAppointmentNote';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAppointmentNote = void 0;
4
+ var createAppointmentNote_1 = require("./createAppointmentNote");
5
+ Object.defineProperty(exports, "createAppointmentNote", { enumerable: true, get: function () { return createAppointmentNote_1.createAppointmentNote; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/createAppointmentNote/index.ts"],"names":[],"mappings":";;;AAAA,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ createdPatientId: {
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
+ createdPatientId: {
6
+ key: 'createdPatientId',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=datapoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/createPatient/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,gBAAgB,EAAE;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -1,68 +1,59 @@
1
1
  import { FieldType } from '@awell-health/extensions-core';
2
2
  import z from 'zod';
3
3
  export declare const fields: {
4
- patientId: {
4
+ departmentid: {
5
5
  id: string;
6
6
  label: string;
7
7
  description: string;
8
8
  type: FieldType.STRING;
9
9
  required: true;
10
10
  };
11
- practiceId: {
11
+ firstname: {
12
12
  id: string;
13
13
  label: string;
14
14
  description: string;
15
15
  type: FieldType.STRING;
16
16
  required: true;
17
17
  };
18
- departmentId: {
18
+ lastname: {
19
19
  id: string;
20
20
  label: string;
21
21
  description: string;
22
22
  type: FieldType.STRING;
23
23
  required: true;
24
24
  };
25
- actionNote: {
25
+ dob: {
26
26
  id: string;
27
27
  label: string;
28
28
  description: string;
29
- type: FieldType.STRING;
30
- required: false;
31
- };
32
- documentContent: {
33
- id: string;
34
- label: string;
35
- description: string;
36
- type: FieldType.HTML;
29
+ type: FieldType.DATE;
37
30
  required: true;
38
31
  };
39
- autoClose: {
32
+ email: {
40
33
  id: string;
41
34
  label: string;
42
35
  description: string;
43
- type: FieldType.BOOLEAN;
36
+ type: FieldType.STRING;
44
37
  required: true;
45
38
  };
46
39
  };
47
40
  export declare const FieldsValidationSchema: z.ZodObject<{
48
- patientId: z.ZodString;
49
- practiceId: z.ZodString;
50
- departmentId: z.ZodString;
51
- actionNote: z.ZodString;
52
- documentContent: z.ZodString;
53
- autoClose: z.ZodBoolean;
41
+ departmentid: z.ZodString;
42
+ firstname: z.ZodString;
43
+ lastname: z.ZodString;
44
+ dob: z.ZodEffects<z.ZodString, string, string>;
45
+ email: z.ZodString;
54
46
  }, "strip", z.ZodTypeAny, {
55
- patientId: string;
56
- practiceId: string;
57
- departmentId: string;
58
- actionNote: string;
59
- documentContent: string;
60
- autoClose: boolean;
47
+ email: string;
48
+ dob: string;
49
+ departmentid: string;
50
+ firstname: string;
51
+ lastname: string;
61
52
  }, {
62
- patientId: string;
63
- practiceId: string;
64
- departmentId: string;
65
- actionNote: string;
66
- documentContent: string;
67
- autoClose: boolean;
53
+ email: string;
54
+ dob: string;
55
+ departmentid: string;
56
+ firstname: string;
57
+ lastname: string;
68
58
  }>;
59
+ export type CreatePatientInputType = z.infer<typeof FieldsValidationSchema>;
@@ -0,0 +1,54 @@
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
+ const date_1 = require("../../../validation/date");
10
+ exports.fields = {
11
+ departmentid: {
12
+ id: 'departmentid',
13
+ label: 'Department ID',
14
+ description: '',
15
+ type: extensions_core_1.FieldType.STRING,
16
+ required: true,
17
+ },
18
+ firstname: {
19
+ id: 'firstname',
20
+ label: 'First name',
21
+ description: '',
22
+ type: extensions_core_1.FieldType.STRING,
23
+ required: true,
24
+ },
25
+ lastname: {
26
+ id: 'lastname',
27
+ label: 'Last name',
28
+ description: '',
29
+ type: extensions_core_1.FieldType.STRING,
30
+ required: true,
31
+ },
32
+ dob: {
33
+ id: 'dob',
34
+ label: 'Date of birth',
35
+ description: '',
36
+ type: extensions_core_1.FieldType.DATE,
37
+ required: true,
38
+ },
39
+ email: {
40
+ id: 'email',
41
+ label: 'Email',
42
+ description: '',
43
+ type: extensions_core_1.FieldType.STRING,
44
+ required: true,
45
+ },
46
+ };
47
+ exports.FieldsValidationSchema = zod_1.default.object({
48
+ departmentid: zod_1.default.string().min(1),
49
+ firstname: zod_1.default.string().min(1),
50
+ lastname: zod_1.default.string().min(1),
51
+ dob: date_1.AwellToAthenaDateOnlySchema,
52
+ email: zod_1.default.string().min(1).email(),
53
+ });
54
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/createPatient/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AACxC,mDAAsE;AAEzD,QAAA,MAAM,GAAG;IACpB,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,GAAG,EAAE,kCAA2B;IAChC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE;CACiB,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/createPatient/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -1,4 +1,4 @@
1
1
  import { type Action } from '@awell-health/extensions-core';
2
2
  import { type settings } from '../../settings';
3
3
  import { fields, dataPoints } from './config';
4
- export declare const cancelAppointment: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
4
+ export declare const createPatient: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPatient = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const helpers_1 = require("../../helpers");
7
+ exports.createPatient = {
8
+ key: 'createPatient',
9
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
10
+ title: 'Create patient',
11
+ description: 'Create a patient in athena',
12
+ fields: config_1.fields,
13
+ previewable: false,
14
+ dataPoints: config_1.dataPoints,
15
+ onActivityCreated: async (payload, onComplete, onError) => {
16
+ const { fields: input, client, settings: { practiceId }, } = await (0, helpers_1.validatePayloadAndCreateClient)({
17
+ fieldsSchema: config_1.FieldsValidationSchema,
18
+ payload,
19
+ });
20
+ const res = await client.createPatient({
21
+ practiceId,
22
+ data: input,
23
+ });
24
+ await onComplete({
25
+ data_points: {
26
+ createdPatientId: res.patientid,
27
+ },
28
+ });
29
+ },
30
+ };
31
+ //# sourceMappingURL=createPatient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPatient.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/createPatient/createPatient.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,2CAA8D;AAEjD,QAAA,aAAa,GAItB;IACF,GAAG,EAAE,eAAe;IACpB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EACJ,MAAM,EAAE,KAAK,EACb,MAAM,EACN,QAAQ,EAAE,EAAE,UAAU,EAAE,GACzB,GAAG,MAAM,IAAA,wCAA8B,EAAC;YACvC,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC;YACrC,UAAU;YACV,IAAI,EAAE,KAAK;SACZ,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,gBAAgB,EAAE,GAAG,CAAC,SAAS;aAChC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ const tests_1 = require("../../../../src/tests");
5
+ const mockData_1 = require("../../api/__mocks__/mockData");
6
+ jest.mock('../../api/client');
7
+ describe('athenahealth - Create patient', () => {
8
+ const onComplete = jest.fn();
9
+ const onError = jest.fn();
10
+ beforeEach(() => {
11
+ jest.clearAllMocks();
12
+ });
13
+ test('Should create a patient', async () => {
14
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
15
+ fields: {
16
+ firstname: 'Nick',
17
+ lastname: 'Hellemans',
18
+ dob: '11/30/1993',
19
+ email: 'nick@awellhealth.com',
20
+ departmentid: '1',
21
+ },
22
+ settings: mockData_1.mockSettings,
23
+ });
24
+ await _1.createPatient.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
25
+ expect(onComplete).toHaveBeenCalledWith({
26
+ data_points: {
27
+ createdPatientId: '1',
28
+ },
29
+ });
30
+ });
31
+ });
32
+ //# sourceMappingURL=createPatient.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPatient.test.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/createPatient/createPatient.test.ts"],"names":[],"mappings":";;AAAA,wBAAiC;AACjC,iDAA2D;AAC3D,2DAA2D;AAE3D,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAE7B,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,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,MAAM;gBACjB,QAAQ,EAAE,WAAW;gBACrB,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,sBAAsB;gBAC7B,YAAY,EAAE,GAAG;aAClB;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,CAAA;QAEF,MAAM,gBAAa,CAAC,iBAAiB,CACnC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,gBAAgB,EAAE,GAAG;aACtB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { createPatient } from './createPatient';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPatient = void 0;
4
+ var createPatient_1 = require("./createPatient");
5
+ Object.defineProperty(exports, "createPatient", { enumerable: true, get: function () { return createPatient_1.createPatient; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/createPatient/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
@@ -11,7 +11,11 @@ export declare const dataPoints: {
11
11
  key: string;
12
12
  valueType: "string";
13
13
  };
14
- type: {
14
+ appointmentTypeName: {
15
+ key: string;
16
+ valueType: "string";
17
+ };
18
+ appointmentTypeId: {
15
19
  key: string;
16
20
  valueType: "string";
17
21
  };
@@ -19,4 +23,8 @@ export declare const dataPoints: {
19
23
  key: string;
20
24
  valueType: "date";
21
25
  };
26
+ duration: {
27
+ key: string;
28
+ valueType: "number";
29
+ };
22
30
  };
@@ -14,13 +14,21 @@ exports.dataPoints = {
14
14
  key: 'status',
15
15
  valueType: 'string',
16
16
  },
17
- type: {
18
- key: 'type',
17
+ appointmentTypeName: {
18
+ key: 'appointmentTypeName',
19
+ valueType: 'string',
20
+ },
21
+ appointmentTypeId: {
22
+ key: 'appointmentTypeId',
19
23
  valueType: 'string',
20
24
  },
21
25
  date: {
22
26
  key: 'date',
23
27
  valueType: 'date',
24
28
  },
29
+ duration: {
30
+ key: 'duration',
31
+ valueType: 'number',
32
+ },
25
33
  };
26
34
  //# sourceMappingURL=datapoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/getAppointment/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/getAppointment/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,QAAQ;KACpB;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,qBAAqB;QAC1B,SAAS,EAAE,QAAQ;KACpB;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,mBAAmB;QACxB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,MAAM;KAClB;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -8,21 +8,11 @@ export declare const fields: {
8
8
  type: FieldType.STRING;
9
9
  required: true;
10
10
  };
11
- practiceId: {
12
- id: string;
13
- label: string;
14
- description: string;
15
- type: FieldType.STRING;
16
- required: true;
17
- };
18
11
  };
19
12
  export declare const FieldsValidationSchema: z.ZodObject<{
20
13
  appointmentId: z.ZodString;
21
- practiceId: z.ZodString;
22
14
  }, "strip", z.ZodTypeAny, {
23
15
  appointmentId: string;
24
- practiceId: string;
25
16
  }, {
26
17
  appointmentId: string;
27
- practiceId: string;
28
18
  }>;
@@ -14,16 +14,8 @@ exports.fields = {
14
14
  type: extensions_core_1.FieldType.STRING,
15
15
  required: true,
16
16
  },
17
- practiceId: {
18
- id: 'practiceId',
19
- label: 'Practice ID',
20
- description: '',
21
- type: extensions_core_1.FieldType.STRING,
22
- required: true,
23
- },
24
17
  };
25
18
  exports.FieldsValidationSchema = zod_1.default.object({
26
19
  appointmentId: zod_1.default.string(),
27
- practiceId: zod_1.default.string(),
28
20
  });
29
21
  //# sourceMappingURL=fields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/getAppointment/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE;CAC2B,CAAC,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/getAppointment/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE;CACwB,CAAC,CAAA"}