@awell-health/awell-extensions 1.1.36 → 1.1.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/dist/extensions/collectData/v1/actions/collectMedication/collectMedication.js +1 -1
  2. package/dist/extensions/collectData/v1/actions/collectMedication/collectMedication.js.map +1 -1
  3. package/dist/extensions/collectData/v1/actions/collectMedication/collectMedication.test.js +5 -3
  4. package/dist/extensions/collectData/v1/actions/collectMedication/collectMedication.test.js.map +1 -1
  5. package/dist/extensions/collectData/v1/actions/collectMedication/config/fields.d.ts +17 -2
  6. package/dist/extensions/collectData/v1/actions/collectMedication/config/fields.js +13 -2
  7. package/dist/extensions/collectData/v1/actions/collectMedication/config/fields.js.map +1 -1
  8. package/dist/extensions/experimental/index.js +0 -1
  9. package/dist/extensions/experimental/index.js.map +1 -1
  10. package/dist/extensions/experimental/v1/actions/index.d.ts +0 -1
  11. package/dist/extensions/experimental/v1/actions/index.js +1 -3
  12. package/dist/extensions/experimental/v1/actions/index.js.map +1 -1
  13. package/dist/extensions/markdown.json +1 -1
  14. package/package.json +1 -1
  15. package/dist/extensions/experimental/v1/actions/enterMedication/config/datapoints.d.ts +0 -6
  16. package/dist/extensions/experimental/v1/actions/enterMedication/config/datapoints.js +0 -10
  17. package/dist/extensions/experimental/v1/actions/enterMedication/config/datapoints.js.map +0 -1
  18. package/dist/extensions/experimental/v1/actions/enterMedication/config/fields.d.ts +0 -18
  19. package/dist/extensions/experimental/v1/actions/enterMedication/config/fields.js +0 -18
  20. package/dist/extensions/experimental/v1/actions/enterMedication/config/fields.js.map +0 -1
  21. package/dist/extensions/experimental/v1/actions/enterMedication/config/index.d.ts +0 -2
  22. package/dist/extensions/experimental/v1/actions/enterMedication/config/index.js +0 -9
  23. package/dist/extensions/experimental/v1/actions/enterMedication/config/index.js.map +0 -1
  24. package/dist/extensions/experimental/v1/actions/enterMedication/enterMedication.d.ts +0 -4
  25. package/dist/extensions/experimental/v1/actions/enterMedication/enterMedication.js +0 -24
  26. package/dist/extensions/experimental/v1/actions/enterMedication/enterMedication.js.map +0 -1
  27. package/dist/extensions/experimental/v1/actions/enterMedication/enterMedication.test.d.ts +0 -1
  28. package/dist/extensions/experimental/v1/actions/enterMedication/enterMedication.test.js +0 -23
  29. package/dist/extensions/experimental/v1/actions/enterMedication/enterMedication.test.js.map +0 -1
  30. package/dist/extensions/experimental/v1/actions/enterMedication/index.d.ts +0 -1
  31. package/dist/extensions/experimental/v1/actions/enterMedication/index.js +0 -6
  32. package/dist/extensions/experimental/v1/actions/enterMedication/index.js.map +0 -1
@@ -7,7 +7,7 @@ exports.collectMedication = {
7
7
  key: 'collectMedication',
8
8
  category: extensions_core_1.Category.FORMS,
9
9
  title: 'Collect medication',
10
- description: 'Collect medication in a semi-structured way from the user',
10
+ description: 'Collect medication from the user',
11
11
  fields: config_1.fields,
12
12
  dataPoints: config_1.dataPoints,
13
13
  options: {
@@ -1 +1 @@
1
- {"version":3,"file":"collectMedication.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/collectMedication/collectMedication.ts"],"names":[],"mappings":";;;AAEA,mEAAwD;AACxD,qCAA6C;AAEhC,QAAA,iBAAiB,GAA2C;IACvE,GAAG,EAAE,mBAAmB;IACxB,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,2DAA2D;IACxE,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,qCAAqC;IACvC,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"collectMedication.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/collectMedication/collectMedication.ts"],"names":[],"mappings":";;;AAEA,mEAAwD;AACxD,qCAA6C;AAEhC,QAAA,iBAAiB,GAA2C;IACvE,GAAG,EAAE,mBAAmB;IACxB,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,qCAAqC;IACvC,CAAC;CACF,CAAA"}
@@ -10,12 +10,14 @@ describe('Advanced data collection - Collect medication', () => {
10
10
  });
11
11
  test('Should work', async () => {
12
12
  const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
13
- fields: {},
13
+ fields: {
14
+ label: 'Test',
15
+ },
14
16
  settings: {},
15
17
  });
16
18
  await _1.collectMedication.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
17
- expect(onError).not.toBeCalled();
18
- expect(onComplete).not.toBeCalled();
19
+ expect(onError).not.toHaveBeenCalled();
20
+ expect(onComplete).not.toHaveBeenCalled();
19
21
  });
20
22
  });
21
23
  //# sourceMappingURL=collectMedication.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collectMedication.test.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/collectMedication/collectMedication.test.ts"],"names":[],"mappings":";;AAAA,wBAAqC;AACrC,oDAA8D;AAE9D,QAAQ,CAAC,+CAA+C,EAAE,GAAG,EAAE;IAC7D,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,aAAa,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;SACb,CAAC,CAAA;QAEF,MAAM,oBAAiB,CAAC,iBAAiB,CACvC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;QAChC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"collectMedication.test.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/collectMedication/collectMedication.test.ts"],"names":[],"mappings":";;AAAA,wBAAqC;AACrC,oDAA8D;AAE9D,QAAQ,CAAC,+CAA+C,EAAE,GAAG,EAAE;IAC7D,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,aAAa,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,KAAK,EAAE,MAAM;aACd;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,CAAA;QAEF,MAAM,oBAAiB,CAAC,iBAAiB,CACvC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACtC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IAC3C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,3 +1,18 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
1
2
  import { z } from 'zod';
2
- export declare const fields: {};
3
- export declare const FieldsValidationSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3
+ export declare const fields: {
4
+ label: {
5
+ id: string;
6
+ label: string;
7
+ type: FieldType.STRING;
8
+ required: false;
9
+ description: string;
10
+ };
11
+ };
12
+ export declare const FieldsValidationSchema: z.ZodObject<{
13
+ label: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ label?: string | undefined;
16
+ }, {
17
+ label?: string | undefined;
18
+ }>;
@@ -1,7 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
4
5
  const zod_1 = require("zod");
5
- exports.fields = {};
6
- exports.FieldsValidationSchema = zod_1.z.object({});
6
+ exports.fields = {
7
+ label: {
8
+ id: 'label',
9
+ label: 'Label',
10
+ type: extensions_core_1.FieldType.STRING,
11
+ required: false,
12
+ description: 'A label or description that will be shown above the question',
13
+ },
14
+ };
15
+ exports.FieldsValidationSchema = zod_1.z.object({
16
+ label: zod_1.z.string().optional(),
17
+ });
7
18
  //# sourceMappingURL=fields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/collectData/v1/actions/collectMedication/config/fields.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,MAAM,GAAG,EAAkC,CAAA;AAE3C,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAC5C,EAAoD,CACrD,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/collectData/v1/actions/collectMedication/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,8DAA8D;KAC5E;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACqB,CAAC,CAAA"}
@@ -18,7 +18,6 @@ exports.Experimental = {
18
18
  schemas: schemas_1.schemas,
19
19
  actions: {
20
20
  requestVideoVisit: actions_1.requestVideoVisit,
21
- enterMedication: actions_1.enterMedication,
22
21
  wait: actions_1.wait,
23
22
  patientRecommendation: actions_1.patientRecommendation,
24
23
  redirect: actions_1.redirect,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/experimental/index.ts"],"names":[],"mappings":";;;AAAA,0CAOqB;AAErB,yCAAqC;AACrC,uCAAmC;AACnC,mEAAoE;AAEvD,QAAA,YAAY,GAAc;IACrC,GAAG,EAAE,cAAc;IACnB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,yDAAyD;IACnE,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,OAAO,EAAE;QACP,iBAAiB,EAAjB,2BAAiB;QACjB,eAAe,EAAf,yBAAe;QACf,IAAI,EAAJ,cAAI;QACJ,qBAAqB,EAArB,+BAAqB;QACrB,QAAQ,EAAR,kBAAQ;QACR,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/experimental/index.ts"],"names":[],"mappings":";;;AAAA,0CAMqB;AAErB,yCAAqC;AACrC,uCAAmC;AACnC,mEAAoE;AAEvD,QAAA,YAAY,GAAc;IACrC,GAAG,EAAE,cAAc;IACnB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,yDAAyD;IACnE,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,OAAO,EAAE;QACP,iBAAiB,EAAjB,2BAAiB;QACjB,IAAI,EAAJ,cAAI;QACJ,qBAAqB,EAArB,+BAAqB;QACrB,QAAQ,EAAR,kBAAQ;QACR,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA"}
@@ -1,5 +1,4 @@
1
1
  export { requestVideoVisit } from './requestVideoVisit';
2
- export { enterMedication } from './enterMedication';
3
2
  export { wait } from './wait';
4
3
  export { patientRecommendation } from './patientRecommendation';
5
4
  export { redirect } from './redirect';
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.returnObject = exports.redirect = exports.patientRecommendation = exports.wait = exports.enterMedication = exports.requestVideoVisit = void 0;
3
+ exports.returnObject = exports.redirect = exports.patientRecommendation = exports.wait = exports.requestVideoVisit = void 0;
4
4
  var requestVideoVisit_1 = require("./requestVideoVisit");
5
5
  Object.defineProperty(exports, "requestVideoVisit", { enumerable: true, get: function () { return requestVideoVisit_1.requestVideoVisit; } });
6
- var enterMedication_1 = require("./enterMedication");
7
- Object.defineProperty(exports, "enterMedication", { enumerable: true, get: function () { return enterMedication_1.enterMedication; } });
8
6
  var wait_1 = require("./wait");
9
7
  Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return wait_1.wait; } });
10
8
  var patientRecommendation_1 = require("./patientRecommendation");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/experimental/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,+BAA6B;AAApB,4FAAA,IAAI,OAAA;AACb,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/experimental/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,+BAA6B;AAApB,4FAAA,IAAI,OAAA;AACb,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
@@ -28,7 +28,7 @@
28
28
  "changelog": "# CM.com changelog\n"
29
29
  },
30
30
  "collectData": {
31
- "readme": "---\ntitle: Advanced data collection\ndescription: Collect data from your users using a variety of input types and data sources\n---\n\nThis extension allows you to collect data from your users using a variety of more advanced input types and data sources.\n\n## Extension settings\n\nIn order to set up this extension, no settings are required.\n\n## Custom Actions\n\n### Dynamic choice selector\n\nStandard select questions in Awell forms have a discrete set of choices to select from that are defined at the time that the form is created. If the list of choices to present to your responders isn't known at the time the form is being built, or changes often, this action allows you to load choices dynamically from a remote data source.\n\nDynamically-loaded choices must adhere to the following format in a list form (i.e. an array):\n\n```json\n{\n \"id\": \"unique-id\",\n \"label\": \"Choice label\",\n \"value\": \"Choice value\"\n}\n```\n\nAdditionally, you can specify a free text search field (`Options - Search query param` field) to allow users to search through the choices. This is optional but highly recommended. If not specified, the choices will be fetched on question load and presented in a static list that cannot be filtered.\n\nAs an example, using the endpoint `https://example.com/choices` with a query parameter `search` (e.g. `https://example.com/choices?search=QUERY` where `QUERY` is whatever the user typed into the input), then the API is expected to return the choices based on that match the search term.\n\nWe recommend that your search logic returns an _alphabetically-sorted_ list of all options where the _lowercase_ label names _contain_ the _lowercase_ search term.\n\n```js\n// Example search logic\nconst searchTerm = req.query.search\nconst results = []\n\noptions.forEach((option) => {\n if (option.label.toLowerCase().includes(searchTerm.toLowerCase())) {\n results.push({\n label: option.label,\n value: option.value,\n id: option.id,\n })\n }\n})\n\nconst sortedResults = results.sort((a, b) => a.label.localeCompare(b.label))\nres.json(results)\n```\n",
31
+ "readme": "---\ntitle: Advanced data collection\ndescription: Collect data from your users using a variety of input types and data sources\n---\n\nThis extension allows you to collect data from your users using a variety of more advanced input types and data sources.\n\n## Extension settings\n\nIn order to set up this extension, no settings are required.\n\n## Custom Actions\n\n### Dynamic choice selector\n\nStandard select questions in Awell forms have a discrete set of choices to select from that are defined at the time that the form is created. If the list of choices to present to your responders isn't known at the time the form is being built, or changes often, this action allows you to load choices dynamically from a remote data source.\n\nDynamically-loaded choices must adhere to the following format in a list form (i.e. an array):\n\n```json\n{\n \"id\": \"unique-id\",\n \"label\": \"Choice label\",\n \"value\": \"Choice value\"\n}\n```\n\nAdditionally, you can specify a free text search field (`Options - Search query param` field) to allow users to search through the choices. This is optional but highly recommended. If not specified, the choices will be fetched on question load and presented in a static list that cannot be filtered.\n\nAs an example, using the endpoint `https://example.com/choices` with a query parameter `search` (e.g. `https://example.com/choices?search=QUERY` where `QUERY` is whatever the user typed into the input), then the API is expected to return the choices based on that match the search term.\n\nWe recommend that your search logic returns an _alphabetically-sorted_ list of all options where the _lowercase_ label names _contain_ the _lowercase_ search term.\n\n```js\n// Example search logic\nconst searchTerm = req.query.search\nconst results = []\n\noptions.forEach((option) => {\n if (option.label.toLowerCase().includes(searchTerm.toLowerCase())) {\n results.push({\n label: option.label,\n value: option.value,\n id: option.id,\n })\n }\n})\n\nconst sortedResults = results.sort((a, b) => a.label.localeCompare(b.label))\nres.json(results)\n```\n\n### Collect medication\n\nThis action enables patients to list their medications. They can add multiple medications, providing the name, dosage, and any specific instructions for each one.",
32
32
  "changelog": "# Collect Data changelog\n"
33
33
  },
34
34
  "dockHealth": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.1.36",
3
+ "version": "1.1.39",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -1,6 +0,0 @@
1
- export declare const dataPoints: {
2
- medicationData: {
3
- key: string;
4
- valueType: "json";
5
- };
6
- };
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dataPoints = void 0;
4
- exports.dataPoints = {
5
- medicationData: {
6
- key: 'medicationData',
7
- valueType: 'json',
8
- },
9
- };
10
- //# sourceMappingURL=datapoints.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/enterMedication/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
@@ -1,18 +0,0 @@
1
- import { FieldType } from '@awell-health/extensions-core';
2
- import { z } from 'zod';
3
- export declare const fields: {
4
- label: {
5
- id: string;
6
- label: string;
7
- type: FieldType.STRING;
8
- required: false;
9
- description: string;
10
- };
11
- };
12
- export declare const FieldsValidationSchema: z.ZodObject<{
13
- label: z.ZodOptional<z.ZodString>;
14
- }, "strip", z.ZodTypeAny, {
15
- label?: string | undefined;
16
- }, {
17
- label?: string | undefined;
18
- }>;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldsValidationSchema = exports.fields = void 0;
4
- const extensions_core_1 = require("@awell-health/extensions-core");
5
- const zod_1 = require("zod");
6
- exports.fields = {
7
- label: {
8
- id: 'label',
9
- label: 'Label',
10
- type: extensions_core_1.FieldType.STRING,
11
- required: false,
12
- description: 'A label or description that will be shown above the question',
13
- },
14
- };
15
- exports.FieldsValidationSchema = zod_1.z.object({
16
- label: zod_1.z.string().optional(),
17
- });
18
- //# sourceMappingURL=fields.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/enterMedication/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,8DAA8D;KAC5E;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACqB,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { fields, FieldsValidationSchema } from './fields';
2
- export { dataPoints } from './datapoints';
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/enterMedication/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -1,4 +0,0 @@
1
- import { type Action } from '@awell-health/extensions-core';
2
- import { type settings } from '../../../settings';
3
- import { fields } from './config';
4
- export declare const enterMedication: Action<typeof fields, typeof settings>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enterMedication = void 0;
4
- const extensions_core_1 = require("@awell-health/extensions-core");
5
- const config_1 = require("./config");
6
- exports.enterMedication = {
7
- key: 'enterMedication',
8
- category: extensions_core_1.Category.FORMS,
9
- title: 'Enter medication',
10
- description: 'Allow a user to enter medication',
11
- fields: config_1.fields,
12
- dataPoints: config_1.dataPoints,
13
- options: {
14
- stakeholders: {
15
- label: 'Stakeholder',
16
- mode: 'single',
17
- },
18
- },
19
- previewable: false,
20
- onActivityCreated: async (payload, onComplete, onError) => {
21
- // Completion happens in Hosted Pages
22
- },
23
- };
24
- //# sourceMappingURL=enterMedication.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enterMedication.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/enterMedication/enterMedication.ts"],"names":[],"mappings":";;;AAEA,mEAAwD;AACxD,qCAA6C;AAEhC,QAAA,eAAe,GAA2C;IACrE,GAAG,EAAE,iBAAiB;IACtB,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,qCAAqC;IACvC,CAAC;CACF,CAAA"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const _1 = require(".");
4
- const tests_1 = require("../../../../../src/tests");
5
- describe('Experimental - Enter medication', () => {
6
- const onComplete = jest.fn();
7
- const onError = jest.fn();
8
- beforeEach(() => {
9
- jest.clearAllMocks();
10
- });
11
- test('Should work', async () => {
12
- const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
13
- fields: {
14
- label: '<p>Test</p>',
15
- },
16
- settings: {},
17
- });
18
- await _1.enterMedication.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
19
- expect(onError).not.toHaveBeenCalled();
20
- expect(onComplete).not.toHaveBeenCalled();
21
- });
22
- });
23
- //# sourceMappingURL=enterMedication.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enterMedication.test.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/enterMedication/enterMedication.test.ts"],"names":[],"mappings":";;AAAA,wBAAmC;AACnC,oDAA8D;AAE9D,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,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,aAAa,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,KAAK,EAAE,aAAa;aACrB;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,CAAA;QAEF,MAAM,kBAAe,CAAC,iBAAiB,CACrC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACtC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IAC3C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- export { enterMedication } from './enterMedication';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enterMedication = void 0;
4
- var enterMedication_1 = require("./enterMedication");
5
- Object.defineProperty(exports, "enterMedication", { enumerable: true, get: function () { return enterMedication_1.enterMedication; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/enterMedication/index.ts"],"names":[],"mappings":";;;AAAA,qDAAmD;AAA1C,kHAAA,eAAe,OAAA"}