@awell-health/awell-extensions 2.0.103 → 2.0.105

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,6 +25,7 @@ exports.Awell = {
25
25
  isPatientEnrolledInCareFlow: actions_1.isPatientEnrolledInCareFlow,
26
26
  updateBaselineInfo: actions_1.updateBaselineInfo,
27
27
  startHostedPagesSession: actions_1.startHostedPagesSession,
28
+ startCareFlowAndSession: actions_1.startCareFlowAndSession,
28
29
  // deletePatient, Deleting the patient who is currently enrolled in the pathway seems dangerous
29
30
  },
30
31
  webhooks: webhooks_1.webhooks,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/awell/index.ts"],"names":[],"mappings":";;;AAAA,0CAUqB;AAErB,yCAAqC;AACrC,4CAAwC;AACxC,mEAAoE;AAEvD,QAAA,KAAK,GAAc;IAC9B,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EACN,iGAAiG;IACnG,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE;QACP,sBAAsB,EAAtB,gCAAsB;QACtB,sBAAsB,EAAtB,gCAAsB;QACtB,aAAa,EAAb,uBAAa;QACb,aAAa,EAAb,uBAAa;QACb,YAAY,EAAZ,sBAAY;QACZ,2BAA2B,EAA3B,qCAA2B;QAC3B,2BAA2B,EAA3B,qCAA2B;QAC3B,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,+FAA+F;KAChG;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/awell/index.ts"],"names":[],"mappings":";;;AAAA,0CAWqB;AAErB,yCAAqC;AACrC,4CAAwC;AACxC,mEAAoE;AAEvD,QAAA,KAAK,GAAc;IAC9B,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EACN,iGAAiG;IACnG,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE;QACP,sBAAsB,EAAtB,gCAAsB;QACtB,sBAAsB,EAAtB,gCAAsB;QACtB,aAAa,EAAb,uBAAa;QACb,aAAa,EAAb,uBAAa;QACb,YAAY,EAAZ,sBAAY;QACZ,2BAA2B,EAA3B,qCAA2B;QAC3B,2BAA2B,EAA3B,qCAA2B;QAC3B,kBAAkB,EAAlB,4BAAkB;QAClB,uBAAuB,EAAvB,iCAAuB;QACvB,uBAAuB,EAAvB,iCAAuB;QACvB,+FAA+F;KAChG;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
@@ -14,6 +14,12 @@ export declare const fields: {
14
14
  label: string;
15
15
  description: string;
16
16
  type: FieldType.STRING;
17
+ options: {
18
+ dropdownOptions: {
19
+ value: string;
20
+ label: string;
21
+ }[];
22
+ };
17
23
  required: true;
18
24
  };
19
25
  baselineInfo: {
@@ -14,9 +14,21 @@ exports.fields = {
14
14
  },
15
15
  stakeholderDefinitionId: {
16
16
  id: 'stakeholderDefinitionId',
17
- label: 'Stakeholder definition ID',
18
- description: 'The definition ID of the stakeholder to start the session for',
17
+ label: 'Stakeholder ',
18
+ description: 'The stakeholder to start the session for',
19
19
  type: extensions_core_1.FieldType.STRING,
20
+ options: {
21
+ dropdownOptions: [
22
+ {
23
+ value: 'LGH3v741vUqm',
24
+ label: 'Physician',
25
+ },
26
+ {
27
+ value: 'patient',
28
+ label: 'Patient',
29
+ },
30
+ ],
31
+ },
20
32
  required: true,
21
33
  },
22
34
  baselineInfo: {
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/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AAE;YACV,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAA;YAC1D,OAAO,OAAC,CAAC,KAAK,CAAA;SACf;IACH,CAAC,CAAC;CAC6C,CAAC,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/awell/v1/actions/startCareFlowAndSession/config/fields.ts"],"names":[],"mappings":";;;AACA,mEAAqE;AACrE,mCAAuC;AACvC,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,oBAAoB,EAAE;QACpB,EAAE,EAAE,sBAAsB;QAC1B,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,yBAAyB;QAC7B,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,OAAO,EAAE;YACP,eAAe,EAAE;gBACf;oBACE,KAAK,EAAE,cAAc;oBACrB,KAAK,EAAE,WAAW;iBACnB;gBACD;oBACE,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,SAAS;iBACjB;aACF;SACF;QACD,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,eAAe;QACtB,WAAW,EACT,gKAAgK;QAClK,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IA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AEF,IAAI,CAAC,kBAAkB,EAAE;gBACvB,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,QAAQ;oBACd,OAAO,EACL,4GAA4G;iBAC/G,CAAC,CAAA;gBACF,OAAO,OAAC,CAAC,KAAK,CAAA;aACf;YAED,IAAI,CAAC,yBAAyB,EAAE;gBAC9B,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,QAAQ;oBACd,OAAO,EACL,kJAAkJ;iBACrJ,CAAC,CAAA;gBACF,OAAO,OAAC,CAAC,KAAK,CAAA;aACf;YAED,OAAO,UAAU,CAAA;SAClB;QAAC,OAAO,CAAC,EAAE;YACV,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAA;YAC1D,OAAO,OAAC,CAAC,KAAK,CAAA;SACf;IACH,CAAC,CAAC;CAC6C,CAAC,CAAA"}
@@ -27,7 +27,10 @@ exports.startCareFlowAndSession = {
27
27
  input: {
28
28
  patient_id: payload.patient.id,
29
29
  pathway_definition_id: careFlowDefinitionId,
30
- stakeholder_definition_id: stakeholderDefinitionId,
30
+ // If the stakeholder is the patient, we don't need to specify a stakeholder definition id
31
+ stakeholder_definition_id: stakeholderDefinitionId === 'patient'
32
+ ? undefined
33
+ : stakeholderDefinitionId,
31
34
  data_points: baselineInfo,
32
35
  },
33
36
  },
@@ -1 +1 @@
1
- {"version":3,"file":"startCareFlowAndSession.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/startCareFlowAndSession/startCareFlowAndSession.ts"],"names":[],"mappings":";;;AAEA,mEAAkE;AAClE,qCAAqE;AACrE,6BAAuB;AACvB,0EAA8E;AAEjE,QAAA,uBAAuB,GAA2C;IAC7E,GAAG,EAAE,yBAAyB;IAC9B,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,wDAAwD;IACrE,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAiB,EAAE;QAC1E,MAAM,EACJ,MAAM,EAAE,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,YAAY,EAAE,GACxE,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;aAC/B,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;QAEpC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC;YAC5C,yBAAyB,EAAE;gBACzB,MAAM,EAAE;oBACN,KAAK,EAAE;wBACL,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE;wBAC9B,qBAAqB,EAAE,oBAAoB;wBAC3C,yBAAyB,EAAE,uBAAuB;wBAClD,WAAW,EAAE,YAAY;qBAC1B;iBACF;gBACD,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,IAAI;aAClB;SACF,CAAC,CAAA;QAEF,MAAM,EACJ,yBAAyB,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,GACvD,GAAG,IAAI,CAAA;QAER,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,UAAU,EAAE,UAAU;gBACtB,UAAU,EAAE,WAAW;aACxB;YACD,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,sCAAsC,UAAU,oBAAoB,WAAW,GAAG;iBAC5F,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"startCareFlowAndSession.js","sourceRoot":"","sources":["../../../../../../extensions/awell/v1/actions/startCareFlowAndSession/startC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;QAER,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,UAAU,EAAE,UAAU;gBACtB,UAAU,EAAE,WAAW;aACxB;YACD,MAAM,EAAE;gBACN,IAAA,iCAAmB,EAAC;oBAClB,OAAO,EAAE,sCAAsC,UAAU,oBAAoB,WAAW,GAAG;iBAC5F,CAAC;aACH;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.103",
3
+ "version": "2.0.105",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {