@openmrs/esm-dispensing-app 1.0.1-pre.166 → 1.0.1-pre.167

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.
package/dist/299.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunk_openmrs_esm_dispensing_app=self.webpackChunk_openmrs_esm_dispensing_app||[]).push([[299],{9299:(e,n,t)=>{"use strict";t.r(n),t.d(n,{backendDependencies:()=>p,importTranslation:()=>a,setupOpenMRS:()=>l,version:()=>s});var o=t(3907),i={appName:{_type:o.Type.String,_default:"Pharmacy"},actionButtons:{pauseButton:{enabled:{_type:o.Type.Boolean,_description:"Enabled/Disable including a Pause button in the button action bar",_default:!0}},closeButton:{enabled:{_type:o.Type.Boolean,_description:"Enabled/Disable including a Close button in the button action bar",_default:!0}}},medicationRequestExpirationPeriodInDays:{_type:o.Type.Number,_description:"Medication Requests older that this will be considered expired",_default:90},locationBehavior:{locationColumn:{enabled:{_type:o.Type.Boolean,_description:"Enabled/Disable including a Location column in the main prescriptions table showing ordering location",_default:!1}},locationFilter:{enabled:{_type:o.Type.Boolean,_description:"Enable/Disable Location filter on main prescriptions page",_default:!1},tag:{_type:o.Type.String,_description:"Name of the location tag to use when fetching locations to populate filter",_default:"Login Location"}}},substitutionReason:{uuid:{_type:o.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Substitution' question. Sample CIEL concept: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167862/",_default:""}},substitutionType:{uuid:{_type:o.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Type of Substitution' question. Sample CIEL concept: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167859/",_default:""}}},s="1.0.1-pre.166",a=t(3979),p={fhir2:"^1.2.0","webservices.rest":"^2.2.0"};function l(){var e="@openmrs/esm-dispensing-app",n={featureName:"dispensing",moduleName:e};return(0,o.defineConfigSchema)(e,i),{pages:[{route:"dispensing",load:(0,o.getAsyncLifecycle)((function(){return Promise.all([t.e(672),t.e(49)]).then(t.bind(t,1049))}),n),online:!0,offline:!0}],extensions:[{id:"dispensing-link",slot:"app-menu-slot",load:(0,o.getAsyncLifecycle)((function(){return Promise.all([t.e(672),t.e(397),t.e(641)]).then(t.bind(t,9641))}),n),online:!0,offline:!1},{name:"dispensing-dashboard",slot:"dispensing-dashboard-slot",load:(0,o.getAsyncLifecycle)((function(){return Promise.all([t.e(589),t.e(672),t.e(397),t.e(135)]).then(t.bind(t,8236))}),n),online:!0,offline:!0}]}}},3979:(e,n,t)=>{var o={"./en.json":[3574,574]};function i(e){if(!t.o(o,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=o[e],i=n[0];return t.e(n[1]).then((()=>t(i)))}i.keys=()=>Object.keys(o),i.id=3979,e.exports=i}}]);
1
+ (self.webpackChunk_openmrs_esm_dispensing_app=self.webpackChunk_openmrs_esm_dispensing_app||[]).push([[299],{9299:(e,n,t)=>{"use strict";t.r(n),t.d(n,{backendDependencies:()=>p,importTranslation:()=>a,setupOpenMRS:()=>l,version:()=>s});var o=t(3907),i={appName:{_type:o.Type.String,_default:"Pharmacy"},actionButtons:{pauseButton:{enabled:{_type:o.Type.Boolean,_description:"Enabled/Disable including a Pause button in the button action bar",_default:!0}},closeButton:{enabled:{_type:o.Type.Boolean,_description:"Enabled/Disable including a Close button in the button action bar",_default:!0}}},medicationRequestExpirationPeriodInDays:{_type:o.Type.Number,_description:"Medication Requests older that this will be considered expired",_default:90},locationBehavior:{locationColumn:{enabled:{_type:o.Type.Boolean,_description:"Enabled/Disable including a Location column in the main prescriptions table showing ordering location",_default:!1}},locationFilter:{enabled:{_type:o.Type.Boolean,_description:"Enable/Disable Location filter on main prescriptions page",_default:!1},tag:{_type:o.Type.String,_description:"Name of the location tag to use when fetching locations to populate filter",_default:"Login Location"}}},substitutionReason:{uuid:{_type:o.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Substitution' question. Sample CIEL concept: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167862/",_default:""}},substitutionType:{uuid:{_type:o.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Type of Substitution' question. Sample CIEL concept: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167859/",_default:""}}},s="1.0.1-pre.167",a=t(3979),p={fhir2:"^1.2.0","webservices.rest":"^2.2.0"};function l(){var e="@openmrs/esm-dispensing-app",n={featureName:"dispensing",moduleName:e};return(0,o.defineConfigSchema)(e,i),{pages:[{route:"dispensing",load:(0,o.getAsyncLifecycle)((function(){return Promise.all([t.e(672),t.e(49)]).then(t.bind(t,1049))}),n),online:!0,offline:!0}],extensions:[{id:"dispensing-link",slot:"app-menu-slot",load:(0,o.getAsyncLifecycle)((function(){return Promise.all([t.e(672),t.e(397),t.e(641)]).then(t.bind(t,9641))}),n),online:!0,offline:!1},{name:"dispensing-dashboard",slot:"dispensing-dashboard-slot",load:(0,o.getAsyncLifecycle)((function(){return Promise.all([t.e(589),t.e(672),t.e(397),t.e(135)]).then(t.bind(t,8236))}),n),online:!0,offline:!0}]}}},3979:(e,n,t)=>{var o={"./en.json":[3574,574]};function i(e){if(!t.o(o,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=o[e],i=n[0];return t.e(n[1]).then((()=>t(i)))}i.keys=()=>Object.keys(o),i.id=3979,e.exports=i}}]);
@@ -27,9 +27,9 @@
27
27
  "initial": false,
28
28
  "entry": false,
29
29
  "recorded": false,
30
- "size": 178535,
30
+ "size": 178870,
31
31
  "sizes": {
32
- "javascript": 178451,
32
+ "javascript": 178786,
33
33
  "consume-shared": 84
34
34
  },
35
35
  "names": [],
@@ -42,7 +42,7 @@
42
42
  "135.js"
43
43
  ],
44
44
  "auxiliaryFiles": [],
45
- "hash": "088855e4952526edee56",
45
+ "hash": "e91335cdd6a8966320ca",
46
46
  "childrenByOrder": {}
47
47
  },
48
48
  {
@@ -68,7 +68,7 @@
68
68
  "main.js"
69
69
  ],
70
70
  "auxiliaryFiles": [],
71
- "hash": "5d24a92a149434a9b999",
71
+ "hash": "b0d1361fe7267379c476",
72
72
  "childrenByOrder": {}
73
73
  },
74
74
  {
@@ -137,7 +137,7 @@
137
137
  "299.js"
138
138
  ],
139
139
  "auxiliaryFiles": [],
140
- "hash": "0c40eee51a2ff1f959e5",
140
+ "hash": "44ac31fdc9f25c07cae7",
141
141
  "childrenByOrder": {}
142
142
  },
143
143
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-dispensing-app",
3
- "version": "1.0.1-pre.166",
3
+ "version": "1.0.1-pre.167",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Medication dispensing application",
6
6
  "browser": "dist/openmrs-esm-dispensing-app.js",
package/src/types.ts CHANGED
@@ -348,8 +348,12 @@ export enum MedicationRequestStatus {
348
348
  expired = "expired",
349
349
  }
350
350
 
351
- // a status calculated from the status of the medication request + the status of the most recent associated medication dispense
352
- // TODO: this may be removed/updated dependong on how we handle things server-side?
351
+ /**
352
+ * This is a bit of a mouthful, but, within the UI, the "status" of a request we want to display to the pharmacist is
353
+ * a combination of the status of the request and the status of the most recent dispensing event; given a request
354
+ * status and a dispense status, this is the actual status we want to display to the pharmacist (see util method
355
+ * computeMedicationRequestMedicationDispenseCombinedStatus)
356
+ */
353
357
  export enum MedicationRequestMedicationDispenseCombinedStatus {
354
358
  active = "active",
355
359
  cancelled = "cancelled",
package/src/utils.ts CHANGED
@@ -17,7 +17,14 @@ import {
17
17
  } from "./constants";
18
18
  import dayjs from "dayjs";
19
19
 
20
- // TODO this may end up being handled by the enhanced medication request status?
20
+ /**
21
+ * This is a bit of a mouthful, but, within the UI, the "status" of a request we want to display to the pharmacist is
22
+ * a combination of the status of the request and the status of the most recent dispensing event; given a request
23
+ * status and a dispense status, this calculates the actual status we want to display to the pharmacist
24
+ *
25
+ * @param medicationRequestStatus
26
+ * @param medicationDispenseStatus
27
+ */
21
28
  export function computeMedicationRequestMedicationDispenseCombinedStatus(
22
29
  medicationRequestStatus: MedicationRequestStatus,
23
30
  medicationDispenseStatus: MedicationDispenseStatus