@openmrs/esm-dispensing-app 1.9.2-pre.1373 → 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/main.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +6 -6
- 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/e3d2ae319b376eef-meta.json +0 -1
- package/.turbo/cache/e3d2ae319b376eef.tar.zst +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_dispensing_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,c,h,m,v,g,b,y,w,_={35092:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2177),t.e(3460),t.e(6825),t.e(6072),t.e(4361),t.e(8885)]).then((()=>()=>t(38885)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},P={};function j(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,loaded:!1,exports:{}};return _[e].call(t.exports,t,t.exports,j),t.loaded=!0,t.exports}j.m=_,j.c=P,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);j.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-dispensing-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},j.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{j.S={};var e={},r={};j.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@openmrs/esm-dispensing-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","8.0.1-pre.3669",(()=>Promise.all([j.e(2177),j.e(1704),j.e(3460),j.e(1856),j.e(6072),j.e(1997),j.e(4361)]).then((()=>()=>j(41856))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.
|
|
1
|
+
var _openmrs_esm_dispensing_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,c,h,m,v,g,b,y,w,_={35092:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2177),t.e(3460),t.e(6825),t.e(6072),t.e(4361),t.e(8885)]).then((()=>()=>t(38885)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},P={};function j(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,loaded:!1,exports:{}};return _[e].call(t.exports,t,t.exports,j),t.loaded=!0,t.exports}j.m=_,j.c=P,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);j.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-dispensing-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},j.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{j.S={};var e={},r={};j.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@openmrs/esm-dispensing-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","8.0.1-pre.3669",(()=>Promise.all([j.e(2177),j.e(1704),j.e(3460),j.e(1856),j.e(6072),j.e(1997),j.e(4361)]).then((()=>()=>j(41856))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.9681",(()=>Promise.all([j.e(2177),j.e(1704),j.e(3460),j.e(1589),j.e(6072),j.e(1997),j.e(4361)]).then((()=>()=>j(81589))))),s("dayjs","1.11.13",(()=>j.e(4353).then((()=>()=>j(74353))))),s("react-dom","18.3.1",(()=>Promise.all([j.e(961),j.e(6072)]).then((()=>()=>j(40961))))),s("react-i18next","16.0.0",(()=>Promise.all([j.e(7255),j.e(6072)]).then((()=>()=>j(77255))))),s("react","18.3.1",(()=>j.e(6540).then((()=>()=>j(96540))))),s("rxjs","6.6.7",(()=>j.e(3184).then((()=>()=>j(63184))))),s("swr/immutable","2.3.3",(()=>Promise.all([j.e(2177),j.e(6072),j.e(4225)]).then((()=>()=>j(54225))))),s("swr/infinite","2.3.3",(()=>Promise.all([j.e(2177),j.e(6072),j.e(3041)]).then((()=>()=>j(23041)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;j.g.importScripts&&(e=j.g.location+"");var r=j.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=e})(),o=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},a=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],a=(typeof n)[0];if(t>=r.length)return"u"==a;var i=r[t],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(s=e[o]))[0]?"-":(n>0?".":"")+(n=2,s);return t}var a=[];for(o=1;o<e.length;o++){var s=e[o];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():i(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},s=(e,r)=>{if(0 in e){r=o(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var a=0,i=1,l=!0;;i++,a++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(a>=r.length||"o"==(p=(typeof(u=r[a]))[0]))return!l||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!l||"u"!=f)return!1}else if(l)if(f==p)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(l=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;l=!1,i--}else{if(i<=t||p<f!=n)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,i--)}}var d=[],c=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?c()|c():2==h?c()&c():h?s(h,r):!c())}return!!c()},l=(e,r)=>e&&j.o(e,r),u=e=>(e.loaded=1,e.get()),p=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),f=(e,r,t)=>{var n=t?p(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,o,a){var i=j.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,j.S[r],t,!1,o,a)):e(r,j.S[r],t,n,o,a)})(((e,r,t,n,o,a)=>{if(!l(r,t))return m(e,t,a);var i=f(r,t,n);return s(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={16072:()=>v("default","react",!1,[1,18],(()=>j.e(6540).then((()=>()=>j(96540))))),44209:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(6606).then((()=>()=>j(54225))))),53083:()=>v("default","rxjs",!1,[1,6],(()=>j.e(3184).then((()=>()=>j(63184))))),56339:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(5422).then((()=>()=>j(23041))))),2076:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(7255).then((()=>()=>j(77255))))),25987:()=>v("default","@openmrs/esm-framework",!1,[0],(()=>Promise.all([j.e(1704),j.e(1856),j.e(1997)]).then((()=>()=>j(41856))))),70231:()=>v("default","dayjs",!1,[1,1],(()=>j.e(4353).then((()=>()=>j(74353))))),92646:()=>v("default","react-dom",!1,[1,18],(()=>j.e(961).then((()=>()=>j(40961))))),51354:()=>v("default","@openmrs/esm-patient-common-lib",!1,[0],(()=>Promise.all([j.e(1704),j.e(1589),j.e(1997)]).then((()=>()=>j(81589)))))},y={1354:[51354],1997:[44209,53083,56339],4361:[2076,25987,70231,92646],6072:[16072]},w={},j.f.consumes=(e,r)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,j.m[e]=t=>{delete j.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],j.m[e]=t=>{throw delete j.c[e],r}};try{var o=b[e]();o.then?r.push(g[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={9986:0};j.f.j=(r,t)=>{var n=j.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1354|1997|4361|6072)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=j.p+j.u(r),i=new Error;j.l(a,(t=>{if(j.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,s]=t,l=0;if(a.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);s&&s(j)}for(r&&r(t);l<a.length;l++)o=a[l],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(35092);_openmrs_esm_dispensing_app=S})();
|
|
@@ -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
|
{
|
|
@@ -1713,7 +1713,7 @@
|
|
|
1713
1713
|
"auxiliaryFiles": [
|
|
1714
1714
|
"openmrs-esm-dispensing-app.js.map"
|
|
1715
1715
|
],
|
|
1716
|
-
"hash": "
|
|
1716
|
+
"hash": "f090f13bb69ac714",
|
|
1717
1717
|
"childrenByOrder": {}
|
|
1718
1718
|
}
|
|
1719
1719
|
]
|
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":"e3d2ae319b376eef","duration":43113}
|
|
Binary file
|