@awell-health/awell-extensions 1.0.183 → 1.0.185
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.d.ts +4 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.js +24 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.test.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.test.js +31 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.test.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/datapoints.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/datapoints.js +5 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/datapoints.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/fields.d.ts +68 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/fields.js +61 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/fields.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/index.d.ts +2 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/index.js +9 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/index.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/index.js +6 -0
- package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.d.ts +4 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.js +24 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.test.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.test.js +29 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.test.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.js +5 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/fields.d.ts +48 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/fields.js +45 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/fields.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/index.d.ts +2 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/index.js +9 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/index.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/index.js +6 -0
- package/dist/extensions/athenahealth/actions/addProblemToPatientChart/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.d.ts +4 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.js +24 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.js.map +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.test.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.test.js +27 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/cancelAppointment.test.js.map +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/datapoints.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/datapoints.js +5 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/datapoints.js.map +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/fields.d.ts +28 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/fields.js +29 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/fields.js.map +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/index.d.ts +2 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/index.js +9 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/config/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/index.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/index.js +6 -0
- package/dist/extensions/athenahealth/actions/cancelAppointment/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/datapoints.d.ts +22 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/datapoints.js +26 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/datapoints.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/fields.d.ts +28 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/fields.js +29 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/fields.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/index.d.ts +2 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/index.js +9 -0
- package/dist/extensions/athenahealth/actions/getAppointment/config/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.d.ts +4 -0
- package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.js +32 -0
- package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.test.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.test.js +35 -0
- package/dist/extensions/athenahealth/actions/getAppointment/getAppointment.test.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/index.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/getAppointment/index.js +6 -0
- package/dist/extensions/athenahealth/actions/getAppointment/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/datapoints.d.ts +18 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/datapoints.js +22 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/datapoints.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/fields.d.ts +28 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/fields.js +29 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/fields.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/index.d.ts +2 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/index.js +9 -0
- package/dist/extensions/athenahealth/actions/getPatient/config/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/getPatient.d.ts +4 -0
- package/dist/extensions/athenahealth/actions/getPatient/getPatient.js +33 -0
- package/dist/extensions/athenahealth/actions/getPatient/getPatient.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/getPatient.test.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/getPatient.test.js +34 -0
- package/dist/extensions/athenahealth/actions/getPatient/getPatient.test.js.map +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/index.d.ts +1 -0
- package/dist/extensions/athenahealth/actions/getPatient/index.js +6 -0
- package/dist/extensions/athenahealth/actions/getPatient/index.js.map +1 -0
- package/dist/extensions/athenahealth/actions/index.d.ts +305 -0
- package/dist/extensions/athenahealth/actions/index.js +16 -0
- package/dist/extensions/athenahealth/actions/index.js.map +1 -0
- package/dist/extensions/athenahealth/api/cacheService.d.ts +11 -0
- package/dist/extensions/athenahealth/api/cacheService.js +15 -0
- package/dist/extensions/athenahealth/api/cacheService.js.map +1 -0
- package/dist/extensions/athenahealth/api/client.d.ts +21 -0
- package/dist/extensions/athenahealth/api/client.js +31 -0
- package/dist/extensions/athenahealth/api/client.js.map +1 -0
- package/dist/extensions/athenahealth/helpers.d.ts +11 -0
- package/dist/extensions/athenahealth/helpers.js +31 -0
- package/dist/extensions/athenahealth/helpers.js.map +1 -0
- package/dist/extensions/athenahealth/index.d.ts +2 -0
- package/dist/extensions/athenahealth/index.js +22 -0
- package/dist/extensions/athenahealth/index.js.map +1 -0
- package/dist/extensions/athenahealth/settings.d.ts +57 -0
- package/dist/extensions/athenahealth/settings.js +49 -0
- package/dist/extensions/athenahealth/settings.js.map +1 -0
- package/dist/extensions/index.js +3 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/markdown.json +5 -1
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/config/fields.js +8 -0
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/config/fields.js.map +1 -1
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/createChartingNoteAdvanced-fail.test.js +105 -12
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/createChartingNoteAdvanced-fail.test.js.map +1 -1
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.js +5 -0
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.js.map +1 -1
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.test.js +6 -6
- package/dist/extensions/wellinks/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.test.js.map +1 -1
- package/dist/extensions/wellinks/gql/wellinksSdk.d.ts +89 -32
- package/dist/extensions/wellinks/gql/wellinksSdk.js +17 -1
- package/dist/extensions/wellinks/gql/wellinksSdk.js.map +1 -1
- package/dist/extensions/wellinks/graphql/queries.d.ts +1 -0
- package/dist/extensions/wellinks/graphql/queries.js +9 -1
- package/dist/extensions/wellinks/graphql/queries.js.map +1 -1
- package/package.json +1 -1
@@ -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 addDocumentToPatientChart: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
|
package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addDocumentToPatientChart = 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.addDocumentToPatientChart = {
|
8
|
+
key: 'addDocumentToPatientChart',
|
9
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
10
|
+
title: 'Add document to patient chart',
|
11
|
+
description: "Adds a document to the patient's chart",
|
12
|
+
fields: config_1.fields,
|
13
|
+
previewable: false,
|
14
|
+
dataPoints: config_1.dataPoints,
|
15
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
16
|
+
const { fields: input, client } = await (0, helpers_1.validatePayloadAndCreateClient)({
|
17
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
18
|
+
payload,
|
19
|
+
});
|
20
|
+
console.log(input, client);
|
21
|
+
await onComplete();
|
22
|
+
},
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=addDocumentToPatientChart.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addDocumentToPatientChart.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,2CAA8D;AAEjD,QAAA,yBAAyB,GAIlC;IACF,GAAG,EAAE,2BAA2B;IAChC,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,+BAA+B;IACtC,WAAW,EAAE,wCAAwC;IACrD,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,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,wCAA8B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QAE1B,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const _1 = require(".");
|
4
|
+
const tests_1 = require("../../../../src/tests");
|
5
|
+
describe('Athena - Cancel appointment', () => {
|
6
|
+
const settings = {
|
7
|
+
client_id: 'hello',
|
8
|
+
client_secret: 'world',
|
9
|
+
auth_url: 'https://api.preview.platform.athenahealth.com/oauth2/v1/token',
|
10
|
+
api_url: 'https://api.preview.platform.athenahealth.com',
|
11
|
+
scope: 'athena/service/Athenanet.MDP.* system/Observation.read system/Patient.read',
|
12
|
+
};
|
13
|
+
const onComplete = jest.fn();
|
14
|
+
const onError = jest.fn();
|
15
|
+
test('Should return an appointment', async () => {
|
16
|
+
const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
|
17
|
+
fields: {
|
18
|
+
patientId: '1',
|
19
|
+
practiceId: '1',
|
20
|
+
departmentId: '1',
|
21
|
+
actionNote: 'Some note',
|
22
|
+
documentContent: 'Some content',
|
23
|
+
autoClose: false,
|
24
|
+
},
|
25
|
+
settings,
|
26
|
+
});
|
27
|
+
await _1.addDocumentToPatientChart.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
|
28
|
+
expect(onComplete).toHaveBeenCalled();
|
29
|
+
});
|
30
|
+
});
|
31
|
+
//# sourceMappingURL=addDocumentToPatientChart.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addDocumentToPatientChart.test.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/addDocumentToPatientChart/addDocumentToPatientChart.test.ts"],"names":[],"mappings":";;AAAA,wBAA6C;AAC7C,iDAA2D;AAE3D,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,MAAM,QAAQ,GAAG;QACf,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,OAAO;QACtB,QAAQ,EAAE,+DAA+D;QACzE,OAAO,EAAE,+CAA+C;QACxD,KAAK,EACH,4EAA4E;KAC/E,CAAA;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,IAAI,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,SAAS,EAAE,GAAG;gBACd,UAAU,EAAE,GAAG;gBACf,YAAY,EAAE,GAAG;gBACjB,UAAU,EAAE,WAAW;gBACvB,eAAe,EAAE,cAAc;gBAC/B,SAAS,EAAE,KAAK;aACjB;YACD,QAAQ;SACT,CAAC,CAAA;QAEF,MAAM,4BAAyB,CAAC,iBAAiB,CAC/C,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACvC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const dataPoints: {};
|
package/dist/extensions/athenahealth/actions/addDocumentToPatientChart/config/datapoints.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/addDocumentToPatientChart/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
|
@@ -0,0 +1,68 @@
|
|
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
|
+
practiceId: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.STRING;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
departmentId: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
description: string;
|
22
|
+
type: FieldType.STRING;
|
23
|
+
required: true;
|
24
|
+
};
|
25
|
+
actionNote: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
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;
|
37
|
+
required: true;
|
38
|
+
};
|
39
|
+
autoClose: {
|
40
|
+
id: string;
|
41
|
+
label: string;
|
42
|
+
description: string;
|
43
|
+
type: FieldType.BOOLEAN;
|
44
|
+
required: true;
|
45
|
+
};
|
46
|
+
};
|
47
|
+
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;
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
55
|
+
patientId: string;
|
56
|
+
practiceId: string;
|
57
|
+
departmentId: string;
|
58
|
+
actionNote: string;
|
59
|
+
documentContent: string;
|
60
|
+
autoClose: boolean;
|
61
|
+
}, {
|
62
|
+
patientId: string;
|
63
|
+
practiceId: string;
|
64
|
+
departmentId: string;
|
65
|
+
actionNote: string;
|
66
|
+
documentContent: string;
|
67
|
+
autoClose: boolean;
|
68
|
+
}>;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
exports.fields = {
|
10
|
+
patientId: {
|
11
|
+
id: 'patientId',
|
12
|
+
label: 'Patient ID',
|
13
|
+
description: '',
|
14
|
+
type: extensions_core_1.FieldType.STRING,
|
15
|
+
required: true,
|
16
|
+
},
|
17
|
+
practiceId: {
|
18
|
+
id: 'practiceId',
|
19
|
+
label: 'Practice ID',
|
20
|
+
description: '',
|
21
|
+
type: extensions_core_1.FieldType.STRING,
|
22
|
+
required: true,
|
23
|
+
},
|
24
|
+
departmentId: {
|
25
|
+
id: 'departmentId',
|
26
|
+
label: 'Department ID',
|
27
|
+
description: 'The department ID associated with the uploaded document.',
|
28
|
+
type: extensions_core_1.FieldType.STRING,
|
29
|
+
required: true,
|
30
|
+
},
|
31
|
+
actionNote: {
|
32
|
+
id: 'actionNote',
|
33
|
+
label: 'Any note to accompany the creation of this document',
|
34
|
+
description: '',
|
35
|
+
type: extensions_core_1.FieldType.STRING,
|
36
|
+
required: false,
|
37
|
+
},
|
38
|
+
documentContent: {
|
39
|
+
id: 'documentContent',
|
40
|
+
label: 'Content of the document',
|
41
|
+
description: '',
|
42
|
+
type: extensions_core_1.FieldType.HTML,
|
43
|
+
required: true,
|
44
|
+
},
|
45
|
+
autoClose: {
|
46
|
+
id: 'autoClose',
|
47
|
+
label: 'Auto close?',
|
48
|
+
description: 'Documents will, normally, automatically appear in the clinical inbox for providers to review. In some cases, you might want to force the document to skip the clinical inbox, and go directly to the patient chart with a "closed" status.',
|
49
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
50
|
+
required: true,
|
51
|
+
},
|
52
|
+
};
|
53
|
+
exports.FieldsValidationSchema = zod_1.default.object({
|
54
|
+
patientId: zod_1.default.string(),
|
55
|
+
practiceId: zod_1.default.string(),
|
56
|
+
departmentId: zod_1.default.string(),
|
57
|
+
actionNote: zod_1.default.string(),
|
58
|
+
documentContent: zod_1.default.string(),
|
59
|
+
autoClose: zod_1.default.boolean(),
|
60
|
+
});
|
61
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/addDocumentToPatientChart/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,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,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;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,0DAA0D;QACvE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,qDAAqD;QAC5D,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,aAAa;QACpB,WAAW,EACT,4OAA4O;QAC9O,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE;IACtB,eAAe,EAAE,aAAC,CAAC,MAAM,EAAE;IAC3B,SAAS,EAAE,aAAC,CAAC,OAAO,EAAE;CAC2B,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var datapoints_1 = require("./datapoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return datapoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/addDocumentToPatientChart/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { addDocumentToPatientChart } from './addDocumentToPatientChart';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addDocumentToPatientChart = void 0;
|
4
|
+
var addDocumentToPatientChart_1 = require("./addDocumentToPatientChart");
|
5
|
+
Object.defineProperty(exports, "addDocumentToPatientChart", { enumerable: true, get: function () { return addDocumentToPatientChart_1.addDocumentToPatientChart; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/addDocumentToPatientChart/index.ts"],"names":[],"mappings":";;;AAAA,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA"}
|
package/dist/extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addProblemToPatientChart = 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.addProblemToPatientChart = {
|
8
|
+
key: 'addProblemToPatientChart',
|
9
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
10
|
+
title: 'Add problem to patient chart',
|
11
|
+
description: "Records a problem in the patient's active problem list",
|
12
|
+
fields: config_1.fields,
|
13
|
+
previewable: false,
|
14
|
+
dataPoints: config_1.dataPoints,
|
15
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
16
|
+
const { fields: input, client } = await (0, helpers_1.validatePayloadAndCreateClient)({
|
17
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
18
|
+
payload,
|
19
|
+
});
|
20
|
+
console.log(input, client);
|
21
|
+
await onComplete();
|
22
|
+
},
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=addProblemToPatientChart.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addProblemToPatientChart.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,2CAA8D;AAEjD,QAAA,wBAAwB,GAIjC;IACF,GAAG,EAAE,0BAA0B;IAC/B,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,wDAAwD;IACrE,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,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,wCAA8B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QAE1B,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const _1 = require(".");
|
4
|
+
const tests_1 = require("../../../../src/tests");
|
5
|
+
describe('Athena - Cancel appointment', () => {
|
6
|
+
const settings = {
|
7
|
+
client_id: 'hello',
|
8
|
+
client_secret: 'world',
|
9
|
+
auth_url: 'https://api.preview.platform.athenahealth.com/oauth2/v1/token',
|
10
|
+
api_url: 'https://api.preview.platform.athenahealth.com',
|
11
|
+
scope: 'athena/service/Athenanet.MDP.* system/Observation.read system/Patient.read',
|
12
|
+
};
|
13
|
+
const onComplete = jest.fn();
|
14
|
+
const onError = jest.fn();
|
15
|
+
test('Should return an appointment', async () => {
|
16
|
+
const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
|
17
|
+
fields: {
|
18
|
+
patientId: '1',
|
19
|
+
practiceId: '1',
|
20
|
+
note: 'Hello world',
|
21
|
+
startDate: '2024-01-01',
|
22
|
+
},
|
23
|
+
settings,
|
24
|
+
});
|
25
|
+
await _1.addProblemToPatientChart.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
|
26
|
+
expect(onComplete).toHaveBeenCalled();
|
27
|
+
});
|
28
|
+
});
|
29
|
+
//# sourceMappingURL=addProblemToPatientChart.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addProblemToPatientChart.test.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/addProblemToPatientChart/addProblemToPatientChart.test.ts"],"names":[],"mappings":";;AAAA,wBAA4C;AAC5C,iDAA2D;AAE3D,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,MAAM,QAAQ,GAAG;QACf,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,OAAO;QACtB,QAAQ,EAAE,+DAA+D;QACzE,OAAO,EAAE,+CAA+C;QACxD,KAAK,EACH,4EAA4E;KAC/E,CAAA;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,IAAI,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,SAAS,EAAE,GAAG;gBACd,UAAU,EAAE,GAAG;gBACf,IAAI,EAAE,aAAa;gBACnB,SAAS,EAAE,YAAY;aACxB;YACD,QAAQ;SACT,CAAC,CAAA;QAEF,MAAM,2BAAwB,CAAC,iBAAiB,CAC9C,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACvC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const dataPoints: {};
|
package/dist/extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/addProblemToPatientChart/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
|
@@ -0,0 +1,48 @@
|
|
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
|
+
practiceId: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.STRING;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
note: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
description: string;
|
22
|
+
type: FieldType.TEXT;
|
23
|
+
required: true;
|
24
|
+
};
|
25
|
+
startDate: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
description: string;
|
29
|
+
type: FieldType.TEXT;
|
30
|
+
required: true;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
34
|
+
patientId: z.ZodString;
|
35
|
+
practiceId: z.ZodString;
|
36
|
+
note: z.ZodString;
|
37
|
+
startDate: z.ZodEffects<z.ZodDate, string, Date>;
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
39
|
+
note: string;
|
40
|
+
patientId: string;
|
41
|
+
practiceId: string;
|
42
|
+
startDate: string;
|
43
|
+
}, {
|
44
|
+
note: string;
|
45
|
+
patientId: string;
|
46
|
+
practiceId: string;
|
47
|
+
startDate: Date;
|
48
|
+
}>;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
exports.fields = {
|
10
|
+
patientId: {
|
11
|
+
id: 'patientId',
|
12
|
+
label: 'Patient ID',
|
13
|
+
description: '',
|
14
|
+
type: extensions_core_1.FieldType.STRING,
|
15
|
+
required: true,
|
16
|
+
},
|
17
|
+
practiceId: {
|
18
|
+
id: 'practiceId',
|
19
|
+
label: 'Practice ID',
|
20
|
+
description: '',
|
21
|
+
type: extensions_core_1.FieldType.STRING,
|
22
|
+
required: true,
|
23
|
+
},
|
24
|
+
note: {
|
25
|
+
id: 'note',
|
26
|
+
label: 'Note',
|
27
|
+
description: 'The note to be attached to this problem',
|
28
|
+
type: extensions_core_1.FieldType.TEXT,
|
29
|
+
required: true,
|
30
|
+
},
|
31
|
+
startDate: {
|
32
|
+
id: 'startDate',
|
33
|
+
label: 'Start date',
|
34
|
+
description: 'The onset date to be updated for this problem',
|
35
|
+
type: extensions_core_1.FieldType.TEXT,
|
36
|
+
required: true,
|
37
|
+
},
|
38
|
+
};
|
39
|
+
exports.FieldsValidationSchema = zod_1.default.object({
|
40
|
+
patientId: zod_1.default.string(),
|
41
|
+
practiceId: zod_1.default.string(),
|
42
|
+
note: zod_1.default.string(),
|
43
|
+
startDate: extensions_core_1.DateOnlySchema,
|
44
|
+
});
|
45
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/addProblemToPatientChart/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAIsC;AACtC,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,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,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;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,gCAAc;CACwB,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var datapoints_1 = require("./datapoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return datapoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/addProblemToPatientChart/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { addProblemToPatientChart } from './addProblemToPatientChart';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addProblemToPatientChart = void 0;
|
4
|
+
var addProblemToPatientChart_1 = require("./addProblemToPatientChart");
|
5
|
+
Object.defineProperty(exports, "addProblemToPatientChart", { enumerable: true, get: function () { return addProblemToPatientChart_1.addProblemToPatientChart; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/addProblemToPatientChart/index.ts"],"names":[],"mappings":";;;AAAA,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.cancelAppointment = 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.cancelAppointment = {
|
8
|
+
key: 'cancelAppointment',
|
9
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
10
|
+
title: 'Cancel appointment',
|
11
|
+
description: 'Cancel an appointment',
|
12
|
+
fields: config_1.fields,
|
13
|
+
previewable: false,
|
14
|
+
dataPoints: config_1.dataPoints,
|
15
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
16
|
+
const { fields: input, client } = await (0, helpers_1.validatePayloadAndCreateClient)({
|
17
|
+
fieldsSchema: config_1.FieldsValidationSchema,
|
18
|
+
payload,
|
19
|
+
});
|
20
|
+
console.log(input, client);
|
21
|
+
await onComplete();
|
22
|
+
},
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=cancelAppointment.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cancelAppointment.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/cancelAppointment/cancelAppointment.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,2CAA8D;AAEjD,QAAA,iBAAiB,GAI1B;IACF,GAAG,EAAE,mBAAmB;IACxB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,uBAAuB;IACpC,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,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,wCAA8B,EAAC;YACrE,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QAE1B,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const _1 = require(".");
|
4
|
+
const tests_1 = require("../../../../src/tests");
|
5
|
+
describe('Athena - Cancel appointment', () => {
|
6
|
+
const settings = {
|
7
|
+
client_id: 'hello',
|
8
|
+
client_secret: 'world',
|
9
|
+
auth_url: 'https://api.preview.platform.athenahealth.com/oauth2/v1/token',
|
10
|
+
api_url: 'https://api.preview.platform.athenahealth.com',
|
11
|
+
scope: 'athena/service/Athenanet.MDP.* system/Observation.read system/Patient.read',
|
12
|
+
};
|
13
|
+
const onComplete = jest.fn();
|
14
|
+
const onError = jest.fn();
|
15
|
+
test('Should return an appointment', async () => {
|
16
|
+
const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
|
17
|
+
fields: {
|
18
|
+
appointmentId: '1',
|
19
|
+
practiceId: '1',
|
20
|
+
},
|
21
|
+
settings,
|
22
|
+
});
|
23
|
+
await _1.cancelAppointment.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
|
24
|
+
expect(onComplete).toHaveBeenCalled();
|
25
|
+
});
|
26
|
+
});
|
27
|
+
//# sourceMappingURL=cancelAppointment.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cancelAppointment.test.js","sourceRoot":"","sources":["../../../../../extensions/athenahealth/actions/cancelAppointment/cancelAppointment.test.ts"],"names":[],"mappings":";;AAAA,wBAAqC;AACrC,iDAA2D;AAE3D,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,MAAM,QAAQ,GAAG;QACf,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,OAAO;QACtB,QAAQ,EAAE,+DAA+D;QACzE,OAAO,EAAE,+CAA+C;QACxD,KAAK,EACH,4EAA4E;KAC/E,CAAA;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,IAAI,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,aAAa,EAAE,GAAG;gBAClB,UAAU,EAAE,GAAG;aAChB;YACD,QAAQ;SACT,CAAC,CAAA;QAEF,MAAM,oBAAiB,CAAC,iBAAiB,CACvC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACvC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const dataPoints: {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/cancelAppointment/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
|
@@ -0,0 +1,28 @@
|
|
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
|
+
practiceId: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.STRING;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
20
|
+
appointmentId: z.ZodString;
|
21
|
+
practiceId: z.ZodString;
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
23
|
+
appointmentId: string;
|
24
|
+
practiceId: string;
|
25
|
+
}, {
|
26
|
+
appointmentId: string;
|
27
|
+
practiceId: string;
|
28
|
+
}>;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
7
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
exports.fields = {
|
10
|
+
appointmentId: {
|
11
|
+
id: 'appointmentId',
|
12
|
+
label: 'Appointment ID',
|
13
|
+
description: '',
|
14
|
+
type: extensions_core_1.FieldType.STRING,
|
15
|
+
required: true,
|
16
|
+
},
|
17
|
+
practiceId: {
|
18
|
+
id: 'practiceId',
|
19
|
+
label: 'Practice ID',
|
20
|
+
description: '',
|
21
|
+
type: extensions_core_1.FieldType.STRING,
|
22
|
+
required: true,
|
23
|
+
},
|
24
|
+
};
|
25
|
+
exports.FieldsValidationSchema = zod_1.default.object({
|
26
|
+
appointmentId: zod_1.default.string(),
|
27
|
+
practiceId: zod_1.default.string(),
|
28
|
+
});
|
29
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/athenahealth/actions/cancelAppointment/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"}
|