@awell-health/awell-extensions 1.0.89 → 1.0.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/dataPoints.d.ts +6 -0
  2. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/dataPoints.js +10 -0
  3. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/dataPoints.js.map +1 -0
  4. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/fields.d.ts +98 -0
  5. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/fields.js +84 -0
  6. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/fields.js.map +1 -0
  7. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/index.d.ts +2 -0
  8. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/index.js +19 -0
  9. package/dist/extensions/canvasMedical/v1/actions/createClaim/config/index.js.map +1 -0
  10. package/dist/extensions/canvasMedical/v1/actions/createClaim/createClaim.d.ts +4 -0
  11. package/dist/extensions/canvasMedical/v1/actions/createClaim/createClaim.js +66 -0
  12. package/dist/extensions/canvasMedical/v1/actions/createClaim/createClaim.js.map +1 -0
  13. package/dist/extensions/canvasMedical/v1/actions/createClaim/createClaim.test.d.ts +1 -0
  14. package/dist/extensions/canvasMedical/v1/actions/createClaim/createClaim.test.js +27 -0
  15. package/dist/extensions/canvasMedical/v1/actions/createClaim/createClaim.test.js.map +1 -0
  16. package/dist/extensions/canvasMedical/v1/actions/createClaim/index.d.ts +1 -0
  17. package/dist/extensions/canvasMedical/v1/actions/createClaim/index.js +6 -0
  18. package/dist/extensions/canvasMedical/v1/actions/createClaim/index.js.map +1 -0
  19. package/dist/extensions/canvasMedical/v1/actions/index.d.ts +1 -0
  20. package/dist/extensions/canvasMedical/v1/actions/index.js +3 -1
  21. package/dist/extensions/canvasMedical/v1/actions/index.js.map +1 -1
  22. package/dist/extensions/canvasMedical/v1/client/client.d.ts +3 -0
  23. package/dist/extensions/canvasMedical/v1/client/client.js +11 -0
  24. package/dist/extensions/canvasMedical/v1/client/client.js.map +1 -1
  25. package/dist/extensions/canvasMedical/v1/validation/claim.d.ts +52 -0
  26. package/dist/extensions/canvasMedical/v1/validation/claim.js +23 -0
  27. package/dist/extensions/canvasMedical/v1/validation/claim.js.map +1 -0
  28. package/dist/extensions/canvasMedical/v1/validation/index.d.ts +1 -0
  29. package/dist/extensions/canvasMedical/v1/validation/index.js +1 -0
  30. package/dist/extensions/canvasMedical/v1/validation/index.js.map +1 -1
  31. package/dist/extensions/canvasMedical/v1/validation/validation.d.ts +4 -0
  32. package/dist/extensions/canvasMedical/v1/validation/validation.js +36 -0
  33. package/dist/extensions/canvasMedical/v1/validation/validation.js.map +1 -0
  34. package/dist/extensions/markdown.json +1 -1
  35. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ claimsId: {
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
+ claimsId: {
6
+ key: 'claimsId',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../../extensions/canvasMedical/v1/actions/createClaim/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,98 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import { z } from 'zod';
3
+ export declare const fields: {
4
+ status: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: true;
10
+ };
11
+ type: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.JSON;
16
+ required: true;
17
+ };
18
+ patientId: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.STRING;
23
+ required: true;
24
+ };
25
+ created: {
26
+ id: string;
27
+ label: string;
28
+ description: string;
29
+ type: FieldType.DATE;
30
+ required: true;
31
+ };
32
+ provider: {
33
+ id: string;
34
+ label: string;
35
+ description: string;
36
+ type: FieldType.JSON;
37
+ required: true;
38
+ };
39
+ supportingInfo: {
40
+ id: string;
41
+ label: string;
42
+ description: string;
43
+ type: FieldType.JSON;
44
+ required: false;
45
+ };
46
+ diagnosis: {
47
+ id: string;
48
+ label: string;
49
+ description: string;
50
+ type: FieldType.JSON;
51
+ required: true;
52
+ };
53
+ insurance: {
54
+ id: string;
55
+ label: string;
56
+ description: string;
57
+ type: FieldType.JSON;
58
+ required: true;
59
+ };
60
+ item: {
61
+ id: string;
62
+ label: string;
63
+ description: string;
64
+ type: FieldType.JSON;
65
+ required: true;
66
+ };
67
+ };
68
+ export declare const fieldsValidationSchema: z.ZodObject<{
69
+ status: z.ZodString;
70
+ type: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>, string>;
71
+ patientId: z.ZodString;
72
+ created: z.ZodEffects<z.ZodDate, string, Date>;
73
+ provider: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>, string>;
74
+ supportingInfo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>[], string>>;
75
+ diagnosis: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>[], string>;
76
+ insurance: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>[], string>;
77
+ item: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>[], string>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ type: Record<string, any>;
80
+ item: Record<string, any>[];
81
+ status: string;
82
+ created: string;
83
+ provider: Record<string, any>;
84
+ diagnosis: Record<string, any>[];
85
+ insurance: Record<string, any>[];
86
+ patientId: string;
87
+ supportingInfo?: Record<string, any>[] | undefined;
88
+ }, {
89
+ type: string;
90
+ item: string;
91
+ status: string;
92
+ created: Date;
93
+ provider: string;
94
+ diagnosis: string;
95
+ insurance: string;
96
+ patientId: string;
97
+ supportingInfo?: string | undefined;
98
+ }>;
@@ -0,0 +1,84 @@
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
+ const validation_1 = require("../../../validation");
7
+ // Note: https://docs.canvasmedical.com/reference/claim-create
8
+ exports.fields = {
9
+ status: {
10
+ id: 'status',
11
+ label: 'Status',
12
+ description: 'Accepts a value representing the status compliant with Canvas Medical.',
13
+ type: extensions_core_1.FieldType.STRING,
14
+ required: true,
15
+ },
16
+ type: {
17
+ id: 'type',
18
+ label: 'Type',
19
+ description: 'Accepts a JSON object representing the type compliant with Canvas Medical.',
20
+ type: extensions_core_1.FieldType.JSON,
21
+ required: true,
22
+ },
23
+ patientId: {
24
+ id: 'patientId',
25
+ label: 'Patient ID',
26
+ description: `The patient's unique resource ID (e.g. 865058f6654149bd921264d91519af9e)`,
27
+ type: extensions_core_1.FieldType.STRING,
28
+ required: true,
29
+ },
30
+ created: {
31
+ id: 'created',
32
+ label: 'Created',
33
+ description: 'The field indicating when this claim resource was created, accepting a date in the YYYY-MM-DD format.',
34
+ type: extensions_core_1.FieldType.DATE,
35
+ required: true,
36
+ },
37
+ provider: {
38
+ id: 'provider',
39
+ label: 'Provider',
40
+ description: 'The field related to determining personnel resources for services in the statement accepts a JSON object in accordance with the Canvas Medical format.',
41
+ type: extensions_core_1.FieldType.JSON,
42
+ required: true,
43
+ },
44
+ supportingInfo: {
45
+ id: 'supportingInfo',
46
+ label: 'Supporting Info',
47
+ description: 'Accepts a value representing the supporting info compliant with Canvas Medical.',
48
+ type: extensions_core_1.FieldType.JSON,
49
+ required: false,
50
+ },
51
+ diagnosis: {
52
+ id: 'diagnosis',
53
+ label: 'Diagnosis',
54
+ description: 'The field represents the list will create the Assessments in Canvas for this claim and accepts an array of JSON objects.',
55
+ type: extensions_core_1.FieldType.JSON,
56
+ required: true,
57
+ },
58
+ insurance: {
59
+ id: 'insurance',
60
+ label: 'Insurance',
61
+ description: 'The field represents the list of elements that defines what coverages are to be used when adjudicating the claim and accepts an array of JSON objects.',
62
+ type: extensions_core_1.FieldType.JSON,
63
+ required: true,
64
+ },
65
+ item: {
66
+ id: 'item',
67
+ label: 'Item',
68
+ description: 'The field represents the list of service charges to be used in the claim and accepts an array of JSON objects.',
69
+ type: extensions_core_1.FieldType.JSON,
70
+ required: true,
71
+ },
72
+ };
73
+ exports.fieldsValidationSchema = zod_1.z.object({
74
+ status: zod_1.z.string(),
75
+ type: validation_1.JsonSchema,
76
+ patientId: zod_1.z.string(),
77
+ created: extensions_core_1.DateOnlySchema,
78
+ provider: validation_1.JsonSchema,
79
+ supportingInfo: validation_1.JsonArraySchema.optional(),
80
+ diagnosis: validation_1.JsonArraySchema,
81
+ insurance: validation_1.JsonArraySchema,
82
+ item: validation_1.JsonArraySchema,
83
+ });
84
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/canvasMedical/v1/actions/createClaim/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAIsC;AACtC,6BAAwC;AACxC,oDAAiE;AAEjE,8DAA8D;AACjD,QAAA,MAAM,GAAG;IACpB,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EACT,wEAAwE;QAC1E,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;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AAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,uBAAU;IAChB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,gCAAc;IACvB,QAAQ,EAAE,uBAAU;IACpB,cAAc,EAAE,4BAAe,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,4BAAe;IAC1B,SAAS,EAAE,4BAAe;IAC1B,IAAI,EAAE,4BAAe;CAC4B,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/canvasMedical/v1/actions/createClaim/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 } from './config';
4
+ export declare const createClaim: Action<typeof fields, typeof settings>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createClaim = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const extensions_core_2 = require("@awell-health/extensions-core");
6
+ const config_1 = require("./config");
7
+ const utils_1 = require("../../utils");
8
+ const zod_1 = require("zod");
9
+ const client_1 = require("../../client");
10
+ exports.createClaim = {
11
+ key: 'createClaim',
12
+ category: extensions_core_2.Category.EHR_INTEGRATIONS,
13
+ title: 'Create claim',
14
+ description: 'Create a claim for a specific patient.',
15
+ fields: config_1.fields,
16
+ dataPoints: config_1.dataPoints,
17
+ previewable: true,
18
+ onActivityCreated: async (payload, onComplete, onError) => {
19
+ try {
20
+ const { fields: { status, type, patientId, created, provider, supportingInfo, diagnosis, insurance, item, }, } = (0, extensions_core_1.validate)({
21
+ schema: zod_1.z.object({
22
+ fields: config_1.fieldsValidationSchema,
23
+ }),
24
+ payload,
25
+ });
26
+ const api = (0, client_1.makeAPIClient)(payload.settings);
27
+ const claimId = await api.createClaim({
28
+ resourceType: 'Claim',
29
+ status,
30
+ type,
31
+ use: 'claim',
32
+ patient: {
33
+ reference: `Patient/${patientId}`,
34
+ },
35
+ created,
36
+ provider,
37
+ supportingInfo,
38
+ diagnosis,
39
+ insurance,
40
+ item,
41
+ });
42
+ await onComplete({
43
+ data_points: {
44
+ claimId,
45
+ },
46
+ });
47
+ }
48
+ catch (error) {
49
+ console.log(error);
50
+ let parsedError;
51
+ if ((0, utils_1.isZodError)(error)) {
52
+ parsedError = (0, utils_1.parseZodError)(error);
53
+ }
54
+ else if ((0, utils_1.isAxiosError)(error)) {
55
+ parsedError = (0, utils_1.parseAxiosError)(error);
56
+ }
57
+ else {
58
+ parsedError = (0, utils_1.parseUnknowError)(error);
59
+ }
60
+ await onError({
61
+ events: [parsedError],
62
+ });
63
+ }
64
+ },
65
+ };
66
+ //# sourceMappingURL=createClaim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClaim.js","sourceRoot":"","sources":["../../../../../../extensions/canvasMedical/v1/actions/createClaim/createClaim.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,mEAAwD;AACxD,qCAAqE;AACrE,uCAMoB;AACpB,6BAAuB;AAEvB,yCAA4C;AAE/B,QAAA,WAAW,GAA2C;IACjE,GAAG,EAAE,aAAa;IAClB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,wCAAwC;IACrD,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,MAAM,EACJ,MAAM,EAAE,EACN,MAAM,EACN,IAAI,EACJ,SAAS,EACT,OAAO,EACP,QAAQ,EACR,cAAc,EACd,SAAS,EACT,SAAS,EACT,IAAI,GACL,GACF,GAAG,IAAA,0BAAQ,EAAC;gBACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;oBACf,MAAM,EAAE,+BAAsB;iBAC/B,CAAC;gBACF,OAAO;aACR,CAAC,CAAA;YAEF,MAAM,GAAG,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAC3C,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,WAAW,CAAC;gBACpC,YAAY,EAAE,OAAO;gBACrB,MAAM;gBACN,IAAI;gBACJ,GAAG,EAAE,OAAO;gBACZ,OAAO,EAAE;oBACP,SAAS,EAAE,WAAW,SAAS,EAAE;iBAClC;gBACD,OAAO;gBACP,QAAQ;gBACR,cAAc;gBACd,SAAS;gBACT,SAAS;gBACT,IAAI;aACL,CAAC,CAAA;YAEF,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE;oBACX,OAAO;iBACR;aACF,CAAC,CAAA;SACH;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAClB,IAAI,WAAW,CAAA;YAEf,IAAI,IAAA,kBAAU,EAAC,KAAK,CAAC,EAAE;gBACrB,WAAW,GAAG,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAA;aACnC;iBAAM,IAAI,IAAA,oBAAY,EAAC,KAAK,CAAC,EAAE;gBAC9B,WAAW,GAAG,IAAA,uBAAe,EAAC,KAAmB,CAAC,CAAA;aACnD;iBAAM;gBACL,WAAW,GAAG,IAAA,wBAAgB,EAAC,KAAc,CAAC,CAAA;aAC/C;YACD,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE,CAAC,WAAW,CAAC;aACtB,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tests_1 = require("../../../../../src/tests");
4
+ const __mocks__1 = require("../../client/__mocks__");
5
+ const createClaim_1 = require("./createClaim");
6
+ jest.mock('../../client', () => ({
7
+ ...jest.requireActual('../../client'),
8
+ makeAPIClient: __mocks__1.mockedMakeAPIClient,
9
+ }));
10
+ describe('createClaim', () => {
11
+ const onComplete = jest.fn();
12
+ const onError = jest.fn();
13
+ const payload = {
14
+ settings: __mocks__1.mockedSettings,
15
+ fields: __mocks__1.mockedCreateClaimData,
16
+ };
17
+ it('should create claim', async () => {
18
+ await createClaim_1.createClaim.onActivityCreated((0, tests_1.generateTestPayload)(payload), onComplete, onError);
19
+ expect(onComplete).toHaveBeenCalledTimes(1);
20
+ expect(onComplete).toHaveBeenCalledWith({
21
+ data_points: {
22
+ claimId: __mocks__1.mockedClaimId,
23
+ },
24
+ });
25
+ });
26
+ });
27
+ //# sourceMappingURL=createClaim.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClaim.test.js","sourceRoot":"","sources":["../../../../../../extensions/canvasMedical/v1/actions/createClaim/createClaim.test.ts"],"names":[],"mappings":";;AAAA,oDAA8D;AAC9D,qDAK+B;AAC/B,+CAA2C;AAE3C,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/B,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC;IACrC,aAAa,EAAE,8BAAmB;CACnC,CAAC,CAAC,CAAA;AAEH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IACzB,MAAM,OAAO,GAAG;QACd,QAAQ,EAAE,yBAAc;QACxB,MAAM,EAAE,gCAAqB;KAC9B,CAAA;IAED,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;QACnC,MAAM,yBAAW,CAAC,iBAAiB,CACjC,IAAA,2BAAmB,EAAC,OAAO,CAAC,EAC5B,UAAU,EACV,OAAO,CACR,CAAA;QACD,MAAM,CAAC,UAAU,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;QAC3C,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,OAAO,EAAE,wBAAa;aACvB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { createClaim } from './createClaim';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createClaim = void 0;
4
+ var createClaim_1 = require("./createClaim");
5
+ Object.defineProperty(exports, "createClaim", { enumerable: true, get: function () { return createClaim_1.createClaim; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/canvasMedical/v1/actions/createClaim/index.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAAlC,0GAAA,WAAW,OAAA"}
@@ -5,3 +5,4 @@ export { updateTask } from './updateTask';
5
5
  export { createPatient } from './createPatient';
6
6
  export { updatePatient } from './updatePatient';
7
7
  export { createQuestionnaireResponses } from './createQuestionnaireResponses';
8
+ export { createClaim } from './createClaim';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createQuestionnaireResponses = exports.updatePatient = exports.createPatient = exports.updateTask = exports.createTask = exports.updateAppointment = exports.createAppointment = void 0;
3
+ exports.createClaim = exports.createQuestionnaireResponses = exports.updatePatient = exports.createPatient = exports.updateTask = exports.createTask = exports.updateAppointment = exports.createAppointment = void 0;
4
4
  var createAppointment_1 = require("./createAppointment");
5
5
  Object.defineProperty(exports, "createAppointment", { enumerable: true, get: function () { return createAppointment_1.createAppointment; } });
6
6
  var updateAppointment_1 = require("./updateAppointment");
@@ -15,6 +15,8 @@ var updatePatient_1 = require("./updatePatient");
15
15
  Object.defineProperty(exports, "updatePatient", { enumerable: true, get: function () { return updatePatient_1.updatePatient; } });
16
16
  var createQuestionnaireResponses_1 = require("./createQuestionnaireResponses");
17
17
  Object.defineProperty(exports, "createQuestionnaireResponses", { enumerable: true, get: function () { return createQuestionnaireResponses_1.createQuestionnaireResponses; } });
18
+ var createClaim_1 = require("./createClaim");
19
+ Object.defineProperty(exports, "createClaim", { enumerable: true, get: function () { return createClaim_1.createClaim; } });
18
20
  // Note: should also NOT be exported, since that is only used with the JSON type data points, which we don't support yet
19
21
  // export { getAppointment } from './getAppointment'
20
22
  // export { getTask } from './getTask'
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA;AAErC,wHAAwH;AACxH,oDAAoD;AACpD,sCAAsC;AACtC,4CAA4C;AAC5C,4DAA4D;AAC5D,wEAAwE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA;AACrC,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,wHAAwH;AACxH,oDAAoD;AACpD,sCAAsC;AACtC,4CAA4C;AAC5C,4DAA4D;AAC5D,wEAAwE"}
@@ -1,6 +1,7 @@
1
1
  import { DataWrapper, APIClient, type DataWrapperCtor } from '@awell-health/extensions-core';
2
2
  import { type settings } from '../../settings';
3
3
  import { type AppointmentWithId, type Appointment, type Task, type TaskWithId, type Patient, type PatientWithId, type CreatingQuestionnaireResponses, type QuestionnaireResponse } from '../validation';
4
+ import { type Claim } from '../validation/claim';
4
5
  import type { AppointmentWithIdResponse, CanvasAPIClientConstrutorProps, Id, TaskWithIdResponse, PatientWithIdResponse } from './type';
5
6
  export declare class CanvasDataWrapper extends DataWrapper {
6
7
  createAppointment(data: Appointment): Promise<Id>;
@@ -14,6 +15,7 @@ export declare class CanvasDataWrapper extends DataWrapper {
14
15
  getPatient(id: string): Promise<PatientWithIdResponse>;
15
16
  createQuestionnaireResponses(data: CreatingQuestionnaireResponses): Promise<Id>;
16
17
  getQuestionnaireResponse(id: string): Promise<QuestionnaireResponse>;
18
+ createClaim(data: Claim): Promise<Id>;
17
19
  }
18
20
  export declare class CanvasAPIClient extends APIClient<CanvasDataWrapper> {
19
21
  readonly ctor: DataWrapperCtor<CanvasDataWrapper>;
@@ -29,5 +31,6 @@ export declare class CanvasAPIClient extends APIClient<CanvasDataWrapper> {
29
31
  getPatient(id: string): Promise<PatientWithIdResponse>;
30
32
  createQuestionnaireResponses(obj: CreatingQuestionnaireResponses): Promise<Id>;
31
33
  getQuestionnaireResponse(id: string): Promise<QuestionnaireResponse>;
34
+ createClaim(obj: Claim): Promise<Id>;
32
35
  }
33
36
  export declare const makeAPIClient: (payloadSettings: Record<keyof typeof settings, string | undefined>) => CanvasAPIClient;
@@ -88,6 +88,14 @@ class CanvasDataWrapper extends extensions_core_1.DataWrapper {
88
88
  url: `/QuestionnaireResponse/${id}`,
89
89
  });
90
90
  }
91
+ async createClaim(data) {
92
+ const response = await this.RequestRaw({
93
+ method: 'POST',
94
+ url: `/Claim`,
95
+ data,
96
+ });
97
+ return (0, utils_1.extractIdFromLocationHeader)(response);
98
+ }
91
99
  }
92
100
  exports.CanvasDataWrapper = CanvasDataWrapper;
93
101
  class CanvasAPIClient extends extensions_core_1.APIClient {
@@ -134,6 +142,9 @@ class CanvasAPIClient extends extensions_core_1.APIClient {
134
142
  async getQuestionnaireResponse(id) {
135
143
  return await this.FetchData(async (dw) => await dw.getQuestionnaireResponse(id));
136
144
  }
145
+ async createClaim(obj) {
146
+ return await this.FetchData(async (dw) => await dw.createClaim(obj));
147
+ }
137
148
  }
138
149
  exports.CanvasAPIClient = CanvasAPIClient;
139
150
  const makeAPIClient = (payloadSettings) => {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/client/client.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AAE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Q,EAAE,GAAG,qBAAqB,EAAE,GACpD,2BAAc,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;IAEvC,OAAO,IAAI,eAAe,CAAC;QACzB,OAAO,EAAE,QAAQ;QACjB,aAAa,EAAE,qBAAqB;QACpC,OAAO,EAAE,QAAQ;KAClB,CAAC,CAAA;AACJ,CAAC,CAAA;AAXY,QAAA,aAAa,iBAWzB"}
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ export declare const claimSchema: z.ZodObject<{
3
+ resourceType: z.ZodLiteral<"Claim">;
4
+ status: z.ZodString;
5
+ type: z.ZodRecord<z.ZodString, z.ZodAny>;
6
+ use: z.ZodString;
7
+ patient: z.ZodObject<{
8
+ reference: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ reference: string;
11
+ }, {
12
+ reference: string;
13
+ }>;
14
+ created: z.ZodEffects<z.ZodDate, string, Date>;
15
+ priority: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
16
+ provider: z.ZodRecord<z.ZodString, z.ZodAny>;
17
+ supportingInfo: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
18
+ diagnosis: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
19
+ insurance: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
20
+ item: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
21
+ }, "strip", z.ZodTypeAny, {
22
+ type: Record<string, any>;
23
+ item: Record<string, any>[];
24
+ use: string;
25
+ status: string;
26
+ patient: {
27
+ reference: string;
28
+ };
29
+ resourceType: "Claim";
30
+ created: string;
31
+ provider: Record<string, any>;
32
+ diagnosis: Record<string, any>[];
33
+ insurance: Record<string, any>[];
34
+ priority?: Record<string, any> | undefined;
35
+ supportingInfo?: any[] | undefined;
36
+ }, {
37
+ type: Record<string, any>;
38
+ item: Record<string, any>[];
39
+ use: string;
40
+ status: string;
41
+ patient: {
42
+ reference: string;
43
+ };
44
+ resourceType: "Claim";
45
+ created: Date;
46
+ provider: Record<string, any>;
47
+ diagnosis: Record<string, any>[];
48
+ insurance: Record<string, any>[];
49
+ priority?: Record<string, any> | undefined;
50
+ supportingInfo?: any[] | undefined;
51
+ }>;
52
+ export type Claim = z.infer<typeof claimSchema>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.claimSchema = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const zod_1 = require("zod");
6
+ const reference_zod_1 = require("./reference.zod");
7
+ exports.claimSchema = zod_1.z.object({
8
+ resourceType: zod_1.z.literal('Claim'),
9
+ status: zod_1.z.string(),
10
+ type: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
11
+ use: zod_1.z.string(),
12
+ patient: zod_1.z.object({
13
+ reference: (0, reference_zod_1.createReferenceSchema)('Patient'),
14
+ }),
15
+ created: extensions_core_1.DateOnlySchema,
16
+ priority: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
17
+ provider: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
18
+ supportingInfo: zod_1.z.array(zod_1.z.any()).optional(),
19
+ diagnosis: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
20
+ insurance: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
21
+ item: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
22
+ });
23
+ //# sourceMappingURL=claim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/validation/claim.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,6BAAuB;AACvB,mDAAuD;AAE1C,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,YAAY,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAChC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC;IACnC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,SAAS,EAAE,IAAA,qCAAqB,EAAC,SAAS,CAAC;KAC5C,CAAC;IACF,OAAO,EAAE,gCAAc;IACvB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC;IACvC,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;CAC7C,CAAC,CAAA"}
@@ -5,3 +5,4 @@ export * from './id.zod';
5
5
  export * from './task.zod';
6
6
  export * from './patient.zod';
7
7
  export * from './questionnaireResponses.zod';
8
+ export * from './validation';
@@ -23,4 +23,5 @@ __exportStar(require("./id.zod"), exports);
23
23
  __exportStar(require("./task.zod"), exports);
24
24
  __exportStar(require("./patient.zod"), exports);
25
25
  __exportStar(require("./questionnaireResponses.zod"), exports);
26
+ __exportStar(require("./validation"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/validation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAAuD;AAA9C,sHAAA,qBAAqB,OAAA;AAC9B,oDAAiC;AACjC,iDAA8B;AAC9B,2CAAwB;AACxB,6CAA0B;AAC1B,gDAA6B;AAC7B,+DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/validation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAAuD;AAA9C,sHAAA,qBAAqB,OAAA;AAC9B,oDAAiC;AACjC,iDAA8B;AAC9B,2CAAwB;AACxB,6CAA0B;AAC1B,gDAA6B;AAC7B,+DAA4C;AAC5C,+CAA4B"}
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const StringTransformToJson: z.ZodEffects<z.ZodString, Record<string, any>, string>;
3
+ export declare const JsonSchema: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>, string>;
4
+ export declare const JsonArraySchema: z.ZodEffects<z.ZodEffects<z.ZodString, Record<string, any>, string>, Record<string, any>[], string>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonArraySchema = exports.JsonSchema = exports.StringTransformToJson = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const zod_1 = require("zod");
6
+ exports.StringTransformToJson = zod_1.z
7
+ .string()
8
+ .transform((str, ctx) => {
9
+ if ((0, lodash_1.isNil)(str) || (0, lodash_1.isEmpty)(str))
10
+ return {};
11
+ try {
12
+ return JSON.parse(str);
13
+ }
14
+ catch (e) {
15
+ ctx.addIssue({ code: 'custom', message: 'Invalid JSON' });
16
+ return zod_1.z.NEVER;
17
+ }
18
+ });
19
+ exports.JsonSchema = exports.StringTransformToJson.transform((jsonObject, ctx) => {
20
+ if ((0, lodash_1.isNil)(jsonObject) || (0, lodash_1.isEmpty)(jsonObject)) {
21
+ ctx.addIssue({
22
+ code: 'custom',
23
+ message: 'The object should not be empty',
24
+ });
25
+ return zod_1.z.NEVER;
26
+ }
27
+ return jsonObject;
28
+ });
29
+ exports.JsonArraySchema = exports.StringTransformToJson.transform((jsonObject, ctx) => {
30
+ if (!Array.isArray(jsonObject)) {
31
+ ctx.addIssue({ code: 'custom', message: 'Invalid JSON' });
32
+ return zod_1.z.NEVER;
33
+ }
34
+ return jsonObject;
35
+ });
36
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../extensions/canvasMedical/v1/validation/validation.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AACvC,6BAAuB;AAEV,QAAA,qBAAqB,GAAG,OAAC;KACnC,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,GAAG,EAAuB,EAAE;IAC3C,IAAI,IAAA,cAAK,EAAC,GAAG,CAAC,IAAI,IAAA,gBAAO,EAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAA;IACzC,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;KACvB;IAAC,OAAO,CAAC,EAAE;QACV,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAA;QACzD,OAAO,OAAC,CAAC,KAAK,CAAA;KACf;AACH,CAAC,CAAC,CAAA;AAES,QAAA,UAAU,GAAG,6BAAqB,CAAC,SAAS,CACvD,CAAC,UAAU,EAAE,GAAG,EAAuB,EAAE;IACvC,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,IAAI,IAAA,gBAAO,EAAC,UAAU,CAAC,EAAE;QAC5C,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,gCAAgC;SAC1C,CAAC,CAAA;QACF,OAAO,OAAC,CAAC,KAAK,CAAA;KACf;IACD,OAAO,UAAU,CAAA;AACnB,CAAC,CACF,CAAA;AAEY,QAAA,eAAe,GAAG,6BAAqB,CAAC,SAAS,CAC5D,CAAC,UAAU,EAAE,GAAG,EAA8B,EAAE;IAC9C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC9B,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAA;QACzD,OAAO,OAAC,CAAC,KAAK,CAAA;KACf;IACD,OAAO,UAAU,CAAA;AACnB,CAAC,CACF,CAAA"}
@@ -12,7 +12,7 @@
12
12
  "changelog": "# Cal.com changelog\n\n## September 4, 2023\n\n- add updateBooking and deleteBooking actions\n- update and refactor structure of getBooking and bookAppointment actions\n\n## July 4, 2023\n\n- Get booking action: add validation that bookingId and apiKey are not empty\n- Get booking action: add validation of response data to make sure we have data points\n\n## April 27, 2023\n\n- Get booking action: `startTime` and `endTime` data points are now of value type `date` instead of `string`.\n"
13
13
  },
14
14
  "canvasMedical": {
15
- "readme": "---\ntitle: Canvas Medical\ndescription: Canvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users.\n---\n\n# Canvas Medical\n\nCanvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users. Leveraging certified EHR as a foundation, Canvas Medical offers a comprehensive suite of APIs, enabling customers to swiftly launch innovative patient experiences and cost-effective business models.\n\nCanvas Medical provides appointment management, patient data creation and updates, task management, questionnaire creation, and much more.\n\n## Extension settings\n\nFor the extension to function correctly, you must include the following elements in your settings:\n\n`client_id` and `client_secret`: These values are generated on the Canvas Medical platform.\n`base_url`: This determines the base URL for your FHIR endpoint.\n`auth_url`: This determines the base URL for your authorization endpoint.\n\n### Create appointment\n\nEasily schedule appointments with providers using the Canvas API. This action allows you to reserve a meeting with a healthcare provider by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the unique `appointmentId`, serving as the key within the Canvas API object.\n\n### Create patient\n\nEffortlessly create patients using the Canvas API. This action allows you to generate a new patient record by submitting `patientData` in JSON format. Upon successful execution, the data points returns the unique `patientId`, serving as the key within the Canvas API object.\n\n### Create task\n\nEfficiently create tasks associated with a specific patient using the Canvas API. This action allows you to generate a new task linked to a designated patient by submitting `taskData` in JSON format. Upon successful execution, the data points returns the unique `taskId`, serving as the key within the Canvas API object.\n\n### Create questionnaire responses\n\nCreate questionnaire responses using the Canvas API to effortlessly record answers within an existing questionnaire. This action requires several parameters:\n\n- `questionnaireId`: Reference to the Canvas Questionnaire using the questionnaire id.\n- `subjectId`: Reference to the Canvas Patient using the patient id.\n- `authored`: Timestamp when the Questionnaire response was filled out (If omitted, the current timestamp at data ingestion will be used).\n- `authorId`: Reference to the patient or practitioner filling out the questionnaire. If omitted, it defaults to Canvas Bot.\n- `item`: List of answers to questions in the questionnaire.\n\nUpon successful execution, the data points returns `questionnaireResponseId`, which serves as the key within the Canvas API object.\n\n### Update appointment\n\nEffortlessly cancel or modify a reserved appointment using the Canvas API. This action allows you to update appointment details by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the `appointmentId`, serving as the key within the Canvas API object.\n\n### Update patient\n\nEfficiently update existing patient information within the system using the Canvas API. This action allows you to modify data by submitting `patientData` in JSON format. Upon successful execution, the data points returns the `patientId`, which serves as the key within the Canvas API object\n\n### Update task\n\nEfficiently update existing task information within the system using the Canvas API. This action allows you to modify data by submitting `taskData` in JSON format. Upon successful execution, the action returns the `taskId`, which serves as the key within the Canvas API object.\n",
15
+ "readme": "---\ntitle: Canvas Medical\ndescription: Canvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users.\n---\n\n# Canvas Medical\n\nCanvas Medical is a healthcare platform that empowers care delivery companies to revolutionize digital health experiences for their patients and users. Leveraging certified EHR as a foundation, Canvas Medical offers a comprehensive suite of APIs, enabling customers to swiftly launch innovative patient experiences and cost-effective business models.\n\nCanvas Medical provides appointment management, patient data creation and updates, task management, questionnaire creation, and much more.\n\n## Extension settings\n\nFor the extension to function correctly, you must include the following elements in your settings:\n\n`client_id` and `client_secret`: These values are generated on the Canvas Medical platform.\n`base_url`: This determines the base URL for your FHIR endpoint.\n`auth_url`: This determines the base URL for your authorization endpoint.\n\n### Create appointment\n\nEasily schedule appointments with providers using the Canvas API. This action allows you to reserve a meeting with a healthcare provider by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the unique `appointmentId`, serving as the key within the Canvas API object.\n\n### Create patient\n\nEffortlessly create patients using the Canvas API. This action allows you to generate a new patient record by submitting `patientData` in JSON format. Upon successful execution, the data points returns the unique `patientId`, serving as the key within the Canvas API object.\n\n### Create task\n\nEfficiently create tasks associated with a specific patient using the Canvas API. This action allows you to generate a new task linked to a designated patient by submitting `taskData` in JSON format. Upon successful execution, the data points returns the unique `taskId`, serving as the key within the Canvas API object.\n\n### Create questionnaire responses\n\nCreate questionnaire responses using the Canvas API to effortlessly record answers within an existing questionnaire. This action requires several parameters:\n\n- `questionnaireId`: Reference to the Canvas Questionnaire using the questionnaire id.\n- `subjectId`: Reference to the Canvas Patient using the patient id.\n- `authored`: Timestamp when the Questionnaire response was filled out (If omitted, the current timestamp at data ingestion will be used).\n- `authorId`: Reference to the patient or practitioner filling out the questionnaire. If omitted, it defaults to Canvas Bot.\n- `item`: List of answers to questions in the questionnaire.\n\nUpon successful execution, the data points returns `questionnaireResponseId`, which serves as the key within the Canvas API object.\n\n### Update appointment\n\nEffortlessly cancel or modify a reserved appointment using the Canvas API. This action allows you to update appointment details by submitting `appointmentData` in JSON format. Upon successful execution, the data points returns the `appointmentId`, serving as the key within the Canvas API object.\n\n### Update patient\n\nEfficiently update existing patient information within the system using the Canvas API. This action allows you to modify data by submitting `patientData` in JSON format. Upon successful execution, the data points returns the `patientId`, which serves as the key within the Canvas API object\n\n### Update task\n\nEfficiently update existing task information within the system using the Canvas API. This action allows you to modify data by submitting `taskData` in JSON format. Upon successful execution, the action returns the `taskId`, which serves as the key within the Canvas API object.\n\n### Create claim\n\nCreate claim using the Canvas API. This action requires several parameters:\n\n- `status`: Status compliant with Canvas Medical.\n- `type`: Type compliant with Canvas Medical.\n- `patientId`: Reference to the Canvas Patient using the patient id.\n- `created`: The field indicating when this claim resource was created\n- `provider`: The field related to determining personnel resources for services in the statement\n- `supportingInfo`: Supporting info compliant with Canvas Medical.\n- `diagnosis`: The field represents the list will create the Assessments in Canvas for this claim.\n- `insurance`: The field represents the list of elements that defines what coverages are to be used when adjudicating the claim.\n- `item`: The field represents the list of service charges to be used in the claim.\n\nUpon successful execution, the data points returns `claimId`, which serves as the key within the Canvas API object.\n",
16
16
  "changelog": "# Canvas Medical changelog\n\n## 2023-09-01\n\n- Add new actions: `createAppointment`, `createPatient`, `createQuestionnaireResponses`, `createTask`, `updateAppointment`, `updatePatient`, and `updateTask` for enhanced functionality.\n"
17
17
  },
18
18
  "cloudinary": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {