@openmrs/esm-dispensing-app 1.9.2-pre.1376 → 1.9.2-pre.1379
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/.turbo/cache/ee0f3863a0a14b15-meta.json +1 -0
- package/.turbo/cache/ee0f3863a0a14b15.tar.zst +0 -0
- package/.turbo/turbo-build.log +3 -3
- package/dist/1043.js +1 -1
- package/dist/1043.js.map +1 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +5 -5
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/fill-prescription/on-prescription-filled.modal.tsx +30 -7
- package/src/fill-prescription/on-prescription-filled.scss +1 -1
- package/src/utils.ts +1 -1
- package/.turbo/cache/3019568427d147c1-meta.json +0 -1
- package/.turbo/cache/3019568427d147c1.tar.zst +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"hash":"ee0f3863a0a14b15","duration":41964}
|
|
Binary file
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -13,12 +13,12 @@ assets by path *.json 36.2 KiB
|
|
|
13
13
|
asset routes.json 2.57 KiB [emitted] [from: src/routes.json] [copied]
|
|
14
14
|
orphan modules 9.23 MiB [orphan] 3126 modules
|
|
15
15
|
runtime modules 43.2 KiB 30 modules
|
|
16
|
-
built modules 8.
|
|
16
|
+
built modules 8.73 MiB (javascript) 378 bytes (share-init) 378 bytes (consume-shared) [built]
|
|
17
17
|
modules by path ./node_modules/ 7.91 MiB 673 modules
|
|
18
18
|
modules by path ./translations/ 204 KiB
|
|
19
19
|
./translations/ lazy nonrecursive .json$ 160 bytes [built] [code generated]
|
|
20
20
|
+ 42 modules
|
|
21
|
-
modules by path ./src/
|
|
21
|
+
modules by path ./src/ 636 KiB 34 modules
|
|
22
22
|
provide-module modules 378 bytes 9 modules
|
|
23
23
|
consume-shared-module modules 378 bytes
|
|
24
24
|
modules by path consume shared module (default) @openmrs/ 84 bytes 2 modules
|
|
@@ -38,4 +38,4 @@ Entrypoints:
|
|
|
38
38
|
main (549 KiB)
|
|
39
39
|
main.js
|
|
40
40
|
|
|
41
|
-
webpack 5.99.9 compiled with 2 warnings in
|
|
41
|
+
webpack 5.99.9 compiled with 2 warnings in 39780 ms
|
package/dist/1043.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[1043],{41043:(n,e,r)=>{r.r(e),r.d(e,{default:()=>N});var a=r(16072),i=r.n(a),o=r(9696),s=r(2076),t=r(25987),c=r(85316),p=r(9806),l=r(24756),d=r(14290),u=r(27042),b=r(85072),m=r.n(b),g=r(97825),f=r.n(g),A=r(77659),$=r.n(A),y=r(55056),h=r.n(y),v=r(10540),C=r.n(v),k=r(41113),_=r.n(k),w=r(61273),x={};x.styleTagTransform=_(),x.setAttributes=h(),x.insert=$().bind(null,"head"),x.domAPI=f(),x.insertStyleElement=C(),m()(w.A,x);const E=w.A&&w.A.locals?w.A.locals:void 0,N=function(n){var e=n.patient,r=n.encounterUuid,a=n.close,b=(0,t.useConfig)().dispenserProviderRoles,m=(0,t.useSession)(),g=(0,l.u9)(b),f=(0,c.IQ)(r).medicationRequestBundles,A=(0,s.useTranslation)().t,$=(0,t.getPatientName)(e);return i().createElement(i().Fragment,null,i().createElement(o.rQ0,null,A("dispenseAllPrescriptions","Dispense prescriptions")),i().createElement(o.cwr,null,i().createElement("p",{className:E.modalDescription},i().createElement(s.Trans,{i18nKey:"confirmRemovePatientFromQueue"},"Would you like to mark prescriptions ordered for ",i().createElement("strong",null,{patientName:$})," as dispensed and completed?")),f.map((function(n){return i().createElement(o.FAs,{className:E.prescriptionTile},i().createElement(d.A,{key:n.request.id,medicationEvent:n.request}))}))),i().createElement(o.jlY,null,i().createElement(o.$nd,{kind:"secondary",onClick:a},A("cancel","Cancel")),i().createElement(o.$nd,{onClick:function(){(0,p.gY)(r);var n=!0,e=!1,i=void 0;try{for(var o,s=function(){var n=o.value,e=(0,l.ux)(n.request,m,g,!0),r=(0,p.Q0)((0,p.H_)(n.request));(0,l.A7)(e,u.NV.completed).then((function(){(0,t.showSnackbar)({title:A("stockDispensed","Stock dispensed"),subtitle:r,isLowContrast:!1})})).catch((function(n){(0,t.showSnackbar)({title:A("errorDispensingMedication","Error dispensing medication"),kind:"error",subtitle:A("errorDispensingMedicationMessage","{{medication}}: {{error}}",{medication:r,error:null==n?void 0:n.message})})}))},c=f[Symbol.iterator]();!(n=(o=c.next()).done);n=!0)s()}catch(n){e=!0,i=n}finally{try{n||null==c.return||c.return()}finally{if(e)throw i}}a(),(0,p.Yi)(r)}},A("dispenseAllPrescriptions","Dispense all prescriptions"))))}},61273:(n,e,r)=>{r.d(e,{A:()=>t});var a=r(54991),i=r.n(a),o=r(76314),s=r.n(o)()(i());s.push([n.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-dispensing__on-prescription-filled__modalDescription___2TH\\+y{margin-bottom:1rem}.-esm-dispensing__on-prescription-filled__prescriptionTile___6RHj1{display:flex;justify-content:space-between;width:100%;margin:.125rem 0 .5rem;padding:0;background-color:#fff;border-left:.5rem solid var(--brand-03);color:#525252;margin-bottom:1rem !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/fill-prescription/on-prescription-filled.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,oEACE,kBC0BW,CDvBb,mEACE,YAAA,CACA,6BAAA,CACA,UAAA,CACA,sBAAA,CACA,SAAA,CACA,qBAAA,CACA,uCAAA,CACA,aDTQ,CCUR,6BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.modalDescription {\n margin-bottom: layout.$spacing-05;\n}\n\n.prescriptionTile {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin: layout.$spacing-01 0 layout.$spacing-03;\n padding: 0;\n background-color: #fff;\n border-left: layout.$spacing-03 solid var(--brand-03);\n color: $text-02;\n margin-bottom: layout.$spacing-05 !important;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),s.locals={modalDescription:"-esm-dispensing__on-prescription-filled__modalDescription___2TH+y",prescriptionTile:"-esm-dispensing__on-prescription-filled__prescriptionTile___6RHj1"};const t=s}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[1043],{41043:(n,e,r)=>{r.r(e),r.d(e,{default:()=>B});var a=r(16072),t=r.n(a),o=r(9696),i=r(2076),s=r(25987),c=r(85316),p=r(9806),l=r(24756),u=r(14290),d=r(27042),b=r(85072),m=r.n(b),g=r(97825),f=r.n(g),y=r(77659),h=r.n(y),A=r(55056),$=r.n(A),v=r(10540),k=r.n(v),w=r(41113),C=r.n(w),_=r(61273),x={};x.styleTagTransform=C(),x.setAttributes=$(),x.insert=h().bind(null,"head"),x.domAPI=f(),x.insertStyleElement=k(),m()(_.A,x);const E=_.A&&_.A.locals?_.A.locals:void 0;function N(n,e,r,a,t,o,i){try{var s=n[o](i),c=s.value}catch(n){return void r(n)}s.done?e(c):Promise.resolve(c).then(a,t)}function T(n,e){var r,a,t,o={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(r=1,a&&(t=2&s[0]?a.return:s[0]?a.throw||((t=a.return)&&t.call(a),0):a.next)&&!(t=t.call(a,s[1])).done)return t;switch(a=0,t&&(s=[2&s[0],t.value]),s[0]){case 0:case 1:t=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((t=(t=o.trys).length>0&&t[t.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!t||s[1]>t[0]&&s[1]<t[3])){o.label=s[1];break}if(6===s[0]&&o.label<t[1]){o.label=t[1],t=s;break}if(t&&o.label<t[2]){o.label=t[2],o.ops.push(s);break}t[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(n,o)}catch(n){s=[6,n],a=0}finally{r=t=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function D(n){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&n[e],a=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}const B=function(n){var e=n.patient,r=n.encounterUuid,a=n.close,b=(0,s.useConfig)().dispenserProviderRoles,m=(0,s.useSession)(),g=(0,l.u9)(b),f=(0,c.IQ)(r).medicationRequestBundles,y=(0,i.useTranslation)().t,h=(0,s.getPatientName)(e);return t().createElement(t().Fragment,null,t().createElement(o.rQ0,null,y("dispenseAllPrescriptions","Dispense prescriptions")),t().createElement(o.cwr,null,t().createElement("p",{className:E.modalDescription},t().createElement(i.Trans,{i18nKey:"confirmRemovePatientFromQueue"},"Would you like to mark prescriptions ordered for ",t().createElement("strong",null,{patientName:h})," as dispensed? Orders with no refills will be marked as completed.")),f.map((function(n){return t().createElement(o.FAs,{className:E.prescriptionTile},t().createElement(u.A,{key:n.request.id,medicationEvent:n.request}))}))),t().createElement(o.jlY,null,t().createElement(o.$nd,{kind:"secondary",onClick:a},y("cancel","Cancel")),t().createElement(o.$nd,{onClick:function(){var n;(n=function(){var n,e,t,o,i,u,b;return T(this,(function(h){switch(h.label){case 0:(0,p.gY)(r),n=!0,e=!1,t=void 0,h.label=1;case 1:h.trys.push([1,6,7,8]),o=function(){var n,e,r;return T(this,(function(a){switch(a.label){case 0:return n=u.value,e=(0,l.ux)(n.request,m,g,!0),r=(0,p.Q0)((0,p.H_)(n.request)),[4,(0,l.A7)(e,d.NV.completed).then((function(r){var a=0==n.request.dispenseRequest.numberOfRepeatsAllowed;return r.ok&&a?(0,c.NT)((0,p.vj)(e.authorizingPrescription[0].reference),d.O7.completed).then((function(){return r})):r})).then((function(){(0,s.showSnackbar)({title:y("stockDispensed","Stock dispensed"),subtitle:r,isLowContrast:!1})})).catch((function(n){(0,s.showSnackbar)({title:y("errorDispensingMedication","Error dispensing medication"),kind:"error",subtitle:y("errorDispensingMedicationMessage","{{medication}}: {{error}}",{medication:r,error:null==n?void 0:n.message})})}))];case 1:return a.sent(),[2]}}))},i=f[Symbol.iterator](),h.label=2;case 2:return(n=(u=i.next()).done)?[3,5]:[5,D(o())];case 3:h.sent(),h.label=4;case 4:return n=!0,[3,2];case 5:return[3,8];case 6:return b=h.sent(),e=!0,t=b,[3,8];case 7:try{n||null==i.return||i.return()}finally{if(e)throw t}return[7];case 8:return a(),(0,p.Yi)(r),[2]}}))},function(){var e=this,r=arguments;return new Promise((function(a,t){var o=n.apply(e,r);function i(n){N(o,a,t,i,s,"next",n)}function s(n){N(o,a,t,i,s,"throw",n)}i(void 0)}))})()}},y("dispenseAllPrescriptions","Dispense all prescriptions"))))}},61273:(n,e,r)=>{r.d(e,{A:()=>s});var a=r(54991),t=r.n(a),o=r(76314),i=r.n(o)()(t());i.push([n.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-dispensing__on-prescription-filled__modalDescription___2TH\\+y{margin-bottom:1rem}.-esm-dispensing__on-prescription-filled__prescriptionTile___6RHj1{display:flex;justify-content:space-between;width:100%;margin:.125rem 0 .5rem;padding:0 0 0 .5rem;background-color:#fff;border-left:.5rem solid var(--brand-03);color:#525252;margin-bottom:1rem !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/fill-prescription/on-prescription-filled.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,oEACE,kBC0BW,CDvBb,mEACE,YAAA,CACA,6BAAA,CACA,UAAA,CACA,sBAAA,CACA,mBAAA,CACA,qBAAA,CACA,uCAAA,CACA,aDTQ,CCUR,6BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.modalDescription {\n margin-bottom: layout.$spacing-05;\n}\n\n.prescriptionTile {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin: layout.$spacing-01 0 layout.$spacing-03;\n padding: 0 0 0 layout.$spacing-03;\n background-color: #fff;\n border-left: layout.$spacing-03 solid var(--brand-03);\n color: $text-02;\n margin-bottom: layout.$spacing-05 !important;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),i.locals={modalDescription:"-esm-dispensing__on-prescription-filled__modalDescription___2TH+y",prescriptionTile:"-esm-dispensing__on-prescription-filled__prescriptionTile___6RHj1"};const s=i}}]);
|
package/dist/1043.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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E,QAAU,CAAC,kEAAkE,gEAAgE,wEAAwE,MAAQ,GAAG,SAAW,+MAA+M,eAAiB,CAAC,g/DAAg/D,mfAAmf,25DAA25D,WAAa,MAEvkLoC,EAAwBrE,OAAS,CAChC,iBAAoB,oEACpB,iBAAoB,qEAErB,S","sources":["webpack://@openmrs/esm-dispensing-app/./src/fill-prescription/on-prescription-filled.scss?382c","webpack://@openmrs/esm-dispensing-app/./src/fill-prescription/on-prescription-filled.modal.tsx","webpack://@openmrs/esm-dispensing-app/./src/fill-prescription/on-prescription-filled.scss"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","undefined","patient","encounterUuid","close","useConfig","dispenserProviderRoles","session","useSession","providers","useProviders","usePrescriptionDetails","medicationRequestBundles","useTranslation","t","patientName","getPatientName","ModalHeader","ModalBody","p","className","styles","modalDescription","Trans","i18nKey","strong","map","bundle","Tile","prescriptionTile","MedicationEvent","key","request","id","medicationEvent","ModalFooter","Button","kind","onClick","markEncounterAsStale","medicationRequestBundle","medicationDispensePayload","medicationDisplay","initiateMedicationDispenseBody","getMedicationDisplay","getMedicationReferenceOrCodeableConcept","saveMedicationDispense","MedicationDispenseStatus","completed","then","response","hasNoRefills","dispenseRequest","numberOfRepeatsAllowed","ok","updateMedicationRequestFulfillerStatus","getUuidFromReference","authorizingPrescription","reference","MedicationRequestFulfillerStatus","showSnackbar","title","subtitle","isLowContrast","catch","error","medication","message","revalidate","___CSS_LOADER_EXPORT___","push","module"],"sourceRoot":""}
|
|
@@ -191,9 +191,9 @@
|
|
|
191
191
|
"initial": false,
|
|
192
192
|
"entry": false,
|
|
193
193
|
"recorded": false,
|
|
194
|
-
"size":
|
|
194
|
+
"size": 21030,
|
|
195
195
|
"sizes": {
|
|
196
|
-
"javascript":
|
|
196
|
+
"javascript": 21030
|
|
197
197
|
},
|
|
198
198
|
"names": [],
|
|
199
199
|
"idHints": [],
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"auxiliaryFiles": [
|
|
208
208
|
"1043.js.map"
|
|
209
209
|
],
|
|
210
|
-
"hash": "
|
|
210
|
+
"hash": "eead2533bf836323",
|
|
211
211
|
"childrenByOrder": {}
|
|
212
212
|
},
|
|
213
213
|
{
|
|
@@ -1509,7 +1509,7 @@
|
|
|
1509
1509
|
"auxiliaryFiles": [
|
|
1510
1510
|
"main.js.map"
|
|
1511
1511
|
],
|
|
1512
|
-
"hash": "
|
|
1512
|
+
"hash": "77f4b1dca15fa320",
|
|
1513
1513
|
"childrenByOrder": {}
|
|
1514
1514
|
},
|
|
1515
1515
|
{
|
|
@@ -1532,7 +1532,7 @@
|
|
|
1532
1532
|
"auxiliaryFiles": [
|
|
1533
1533
|
"8885.js.map"
|
|
1534
1534
|
],
|
|
1535
|
-
"hash": "
|
|
1535
|
+
"hash": "6efea7f9d5b7fc74",
|
|
1536
1536
|
"childrenByOrder": {}
|
|
1537
1537
|
},
|
|
1538
1538
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces2":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","window":"dispensing-window"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","window":"dispensing-window"},{"name":"dispense-workspace","component":"dispenseWorkspace","window":"dispensing-window"},{"name":"dispensing-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"fill-prescription-window"},{"name":"dispensing-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"fill-prescription-window"},{"name":"dispensing-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"fill-prescription-window"},{"name":"dispensing-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"fill-prescription-window"}],"workspaceWindows2":[{"name":"dispensing-window","group":"dispensing-group"},{"name":"fill-prescription-window","group":"dispensing-group"}],"workspaceGroups2":[{"name":"dispensing-group","overlay":true}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"},{"name":"on-prescription-filled-modal","component":"onPrescriptionFilledModal"}],"version":"1.9.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces2":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","window":"dispensing-window"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","window":"dispensing-window"},{"name":"dispense-workspace","component":"dispenseWorkspace","window":"dispensing-window"},{"name":"dispensing-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"fill-prescription-window"},{"name":"dispensing-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"fill-prescription-window"},{"name":"dispensing-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"fill-prescription-window"},{"name":"dispensing-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"fill-prescription-window"}],"workspaceWindows2":[{"name":"dispensing-window","group":"dispensing-group"},{"name":"fill-prescription-window","group":"dispensing-group"}],"workspaceGroups2":[{"name":"dispensing-group","overlay":true}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"},{"name":"on-prescription-filled-modal","component":"onPrescriptionFilledModal"}],"version":"1.9.2-pre.1379"}
|
package/package.json
CHANGED
|
@@ -2,10 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { Button, ModalBody, ModalFooter, ModalHeader, Tile } from '@carbon/react';
|
|
3
3
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
import { getPatientName, showSnackbar, useConfig, useSession } from '@openmrs/esm-framework';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
updateMedicationRequestFulfillerStatus,
|
|
7
|
+
usePrescriptionDetails,
|
|
8
|
+
} from '../medication-request/medication-request.resource';
|
|
6
9
|
import {
|
|
7
10
|
getMedicationDisplay,
|
|
8
11
|
getMedicationReferenceOrCodeableConcept,
|
|
12
|
+
getUuidFromReference,
|
|
9
13
|
markEncounterAsStale,
|
|
10
14
|
revalidate,
|
|
11
15
|
} from '../utils';
|
|
@@ -16,7 +20,7 @@ import {
|
|
|
16
20
|
} from '../medication-dispense/medication-dispense.resource';
|
|
17
21
|
import { type PharmacyConfig } from '../config-schema';
|
|
18
22
|
import MedicationEvent from '../components/medication-event.component';
|
|
19
|
-
import { MedicationDispenseStatus } from '../types';
|
|
23
|
+
import { MedicationDispenseStatus, MedicationRequestFulfillerStatus } from '../types';
|
|
20
24
|
import styles from './on-prescription-filled.scss';
|
|
21
25
|
|
|
22
26
|
interface OnPrescriptionFilledModalProps {
|
|
@@ -45,7 +49,7 @@ const OnPrescriptionFilledModal: React.FC<OnPrescriptionFilledModalProps> = ({ p
|
|
|
45
49
|
const { medicationRequestBundles } = usePrescriptionDetails(encounterUuid);
|
|
46
50
|
const { t } = useTranslation();
|
|
47
51
|
|
|
48
|
-
const onConfirm = () => {
|
|
52
|
+
const onConfirm = async () => {
|
|
49
53
|
markEncounterAsStale(encounterUuid);
|
|
50
54
|
for (const medicationRequestBundle of medicationRequestBundles) {
|
|
51
55
|
const medicationDispensePayload = initiateMedicationDispenseBody(
|
|
@@ -57,7 +61,21 @@ const OnPrescriptionFilledModal: React.FC<OnPrescriptionFilledModalProps> = ({ p
|
|
|
57
61
|
const medicationDisplay = getMedicationDisplay(
|
|
58
62
|
getMedicationReferenceOrCodeableConcept(medicationRequestBundle.request),
|
|
59
63
|
);
|
|
60
|
-
|
|
64
|
+
|
|
65
|
+
await saveMedicationDispense(medicationDispensePayload, MedicationDispenseStatus.completed)
|
|
66
|
+
.then((response) => {
|
|
67
|
+
const hasNoRefills = medicationRequestBundle.request.dispenseRequest.numberOfRepeatsAllowed == 0;
|
|
68
|
+
if (response.ok && hasNoRefills) {
|
|
69
|
+
return updateMedicationRequestFulfillerStatus(
|
|
70
|
+
getUuidFromReference(
|
|
71
|
+
medicationDispensePayload.authorizingPrescription[0].reference, // assumes authorizing prescription exist
|
|
72
|
+
),
|
|
73
|
+
MedicationRequestFulfillerStatus.completed,
|
|
74
|
+
).then(() => response);
|
|
75
|
+
} else {
|
|
76
|
+
return response;
|
|
77
|
+
}
|
|
78
|
+
})
|
|
61
79
|
.then(() => {
|
|
62
80
|
showSnackbar({
|
|
63
81
|
title: t('stockDispensed', 'Stock dispensed'),
|
|
@@ -88,8 +106,8 @@ const OnPrescriptionFilledModal: React.FC<OnPrescriptionFilledModalProps> = ({ p
|
|
|
88
106
|
<ModalBody>
|
|
89
107
|
<p className={styles.modalDescription}>
|
|
90
108
|
<Trans i18nKey="confirmRemovePatientFromQueue">
|
|
91
|
-
Would you like to mark prescriptions ordered for <strong>{{ patientName } as any}</strong> as dispensed
|
|
92
|
-
completed
|
|
109
|
+
Would you like to mark prescriptions ordered for <strong>{{ patientName } as any}</strong> as dispensed?
|
|
110
|
+
Orders with no refills will be marked as completed.
|
|
93
111
|
</Trans>
|
|
94
112
|
</p>
|
|
95
113
|
{medicationRequestBundles.map((bundle) => (
|
|
@@ -102,7 +120,12 @@ const OnPrescriptionFilledModal: React.FC<OnPrescriptionFilledModalProps> = ({ p
|
|
|
102
120
|
<Button kind="secondary" onClick={close}>
|
|
103
121
|
{t('cancel', 'Cancel')}
|
|
104
122
|
</Button>
|
|
105
|
-
<Button
|
|
123
|
+
<Button
|
|
124
|
+
onClick={() => {
|
|
125
|
+
onConfirm();
|
|
126
|
+
}}>
|
|
127
|
+
{t('dispenseAllPrescriptions', 'Dispense all prescriptions')}
|
|
128
|
+
</Button>
|
|
106
129
|
</ModalFooter>
|
|
107
130
|
</>
|
|
108
131
|
);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
justify-content: space-between;
|
|
12
12
|
width: 100%;
|
|
13
13
|
margin: layout.$spacing-01 0 layout.$spacing-03;
|
|
14
|
-
padding: 0;
|
|
14
|
+
padding: 0 0 0 layout.$spacing-03;
|
|
15
15
|
background-color: #fff;
|
|
16
16
|
border-left: layout.$spacing-03 solid var(--brand-03);
|
|
17
17
|
color: $text-02;
|
package/src/utils.ts
CHANGED
|
@@ -270,7 +270,7 @@ export function computePrescriptionStatusMessageCode(
|
|
|
270
270
|
return null;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
export function computeQuantityRemaining(medicationRequestBundle): number {
|
|
273
|
+
export function computeQuantityRemaining(medicationRequestBundle: MedicationRequestBundle): number {
|
|
274
274
|
if (medicationRequestBundle) {
|
|
275
275
|
// hard protect against quantity type mistmatch
|
|
276
276
|
if (!getQuantityUnitsMatch([medicationRequestBundle.request, ...medicationRequestBundle.dispenses])) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"3019568427d147c1","duration":43603}
|
|
Binary file
|