@openmrs/esm-dispensing-app 1.9.2-pre.1360 → 1.9.2-pre.1361
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/91369b8cb2c493f8-meta.json +1 -0
- package/.turbo/cache/91369b8cb2c493f8.tar.zst +0 -0
- package/.turbo/turbo-build.log +12 -13
- package/dist/1043.js +1 -0
- package/dist/1043.js.map +1 -0
- package/dist/3568.js +1 -0
- package/dist/3568.js.map +1 -0
- package/dist/4300.js +1 -1
- package/dist/6825.js +1 -0
- package/dist/6825.js.map +1 -0
- package/dist/7240.js +1 -0
- package/dist/7240.js.map +1 -0
- package/dist/8885.js +1 -0
- package/dist/8885.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-dispensing-app.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +110 -35
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/fill-prescription/fill-prescription-button.component.tsx +70 -68
- package/src/fill-prescription/on-prescription-filled.modal.tsx +111 -0
- package/src/fill-prescription/on-prescription-filled.scss +19 -0
- package/src/history/history-and-comments.scss +2 -0
- package/src/index.ts +9 -2
- package/src/medication-dispense/medication-dispense.resource.tsx +2 -2
- package/src/prescriptions/prescription-details.scss +3 -1
- package/src/routes.json +29 -9
- package/translations/en.json +4 -3
- package/.turbo/cache/16ccfb9ea3a232b9-meta.json +0 -1
- package/.turbo/cache/16ccfb9ea3a232b9.tar.zst +0 -0
- package/dist/6867.js +0 -1
- package/dist/6867.js.map +0 -1
- package/dist/9072.js +0 -1
- package/dist/9072.js.map +0 -1
|
@@ -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(
|
|
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.3663",(()=>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.9641",(()=>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})();
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"auxiliaryFiles": [
|
|
162
162
|
"963.js.map"
|
|
163
163
|
],
|
|
164
|
-
"hash": "
|
|
164
|
+
"hash": "3650b046ef9b8347",
|
|
165
165
|
"childrenByOrder": {}
|
|
166
166
|
},
|
|
167
167
|
{
|
|
@@ -186,6 +186,30 @@
|
|
|
186
186
|
"hash": "d37dce78fedf6853",
|
|
187
187
|
"childrenByOrder": {}
|
|
188
188
|
},
|
|
189
|
+
{
|
|
190
|
+
"rendered": true,
|
|
191
|
+
"initial": false,
|
|
192
|
+
"entry": false,
|
|
193
|
+
"recorded": false,
|
|
194
|
+
"size": 12597,
|
|
195
|
+
"sizes": {
|
|
196
|
+
"javascript": 12597
|
|
197
|
+
},
|
|
198
|
+
"names": [],
|
|
199
|
+
"idHints": [],
|
|
200
|
+
"runtime": [
|
|
201
|
+
"@openmrs/esm-dispensing-app",
|
|
202
|
+
"main"
|
|
203
|
+
],
|
|
204
|
+
"files": [
|
|
205
|
+
"1043.js"
|
|
206
|
+
],
|
|
207
|
+
"auxiliaryFiles": [
|
|
208
|
+
"1043.js.map"
|
|
209
|
+
],
|
|
210
|
+
"hash": "245f441c1ef14399",
|
|
211
|
+
"childrenByOrder": {}
|
|
212
|
+
},
|
|
189
213
|
{
|
|
190
214
|
"rendered": true,
|
|
191
215
|
"initial": false,
|
|
@@ -548,6 +572,30 @@
|
|
|
548
572
|
"hash": "e287f58fbfd71f5b",
|
|
549
573
|
"childrenByOrder": {}
|
|
550
574
|
},
|
|
575
|
+
{
|
|
576
|
+
"rendered": true,
|
|
577
|
+
"initial": false,
|
|
578
|
+
"entry": false,
|
|
579
|
+
"recorded": false,
|
|
580
|
+
"size": 64172,
|
|
581
|
+
"sizes": {
|
|
582
|
+
"javascript": 64172
|
|
583
|
+
},
|
|
584
|
+
"names": [],
|
|
585
|
+
"idHints": [],
|
|
586
|
+
"runtime": [
|
|
587
|
+
"@openmrs/esm-dispensing-app",
|
|
588
|
+
"main"
|
|
589
|
+
],
|
|
590
|
+
"files": [
|
|
591
|
+
"3568.js"
|
|
592
|
+
],
|
|
593
|
+
"auxiliaryFiles": [
|
|
594
|
+
"3568.js.map"
|
|
595
|
+
],
|
|
596
|
+
"hash": "e853e73735339778",
|
|
597
|
+
"childrenByOrder": {}
|
|
598
|
+
},
|
|
551
599
|
{
|
|
552
600
|
"rendered": true,
|
|
553
601
|
"initial": false,
|
|
@@ -613,7 +661,7 @@
|
|
|
613
661
|
"auxiliaryFiles": [
|
|
614
662
|
"4099.js.map"
|
|
615
663
|
],
|
|
616
|
-
"hash": "
|
|
664
|
+
"hash": "5262e47c4cfa2860",
|
|
617
665
|
"childrenByOrder": {}
|
|
618
666
|
},
|
|
619
667
|
{
|
|
@@ -667,9 +715,9 @@
|
|
|
667
715
|
"initial": false,
|
|
668
716
|
"entry": false,
|
|
669
717
|
"recorded": false,
|
|
670
|
-
"size":
|
|
718
|
+
"size": 4981,
|
|
671
719
|
"sizes": {
|
|
672
|
-
"javascript":
|
|
720
|
+
"javascript": 4981
|
|
673
721
|
},
|
|
674
722
|
"names": [],
|
|
675
723
|
"idHints": [],
|
|
@@ -681,7 +729,7 @@
|
|
|
681
729
|
"4300.js"
|
|
682
730
|
],
|
|
683
731
|
"auxiliaryFiles": [],
|
|
684
|
-
"hash": "
|
|
732
|
+
"hash": "89e84e8d04618990",
|
|
685
733
|
"childrenByOrder": {}
|
|
686
734
|
},
|
|
687
735
|
{
|
|
@@ -1110,6 +1158,32 @@
|
|
|
1110
1158
|
"hash": "d8f21458cfd6a714",
|
|
1111
1159
|
"childrenByOrder": {}
|
|
1112
1160
|
},
|
|
1161
|
+
{
|
|
1162
|
+
"rendered": true,
|
|
1163
|
+
"initial": false,
|
|
1164
|
+
"entry": false,
|
|
1165
|
+
"recorded": false,
|
|
1166
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
1167
|
+
"size": 185431,
|
|
1168
|
+
"sizes": {
|
|
1169
|
+
"javascript": 185431
|
|
1170
|
+
},
|
|
1171
|
+
"names": [],
|
|
1172
|
+
"idHints": [
|
|
1173
|
+
"vendors"
|
|
1174
|
+
],
|
|
1175
|
+
"runtime": [
|
|
1176
|
+
"@openmrs/esm-dispensing-app"
|
|
1177
|
+
],
|
|
1178
|
+
"files": [
|
|
1179
|
+
"6825.js"
|
|
1180
|
+
],
|
|
1181
|
+
"auxiliaryFiles": [
|
|
1182
|
+
"6825.js.map"
|
|
1183
|
+
],
|
|
1184
|
+
"hash": "749e080015cf416b",
|
|
1185
|
+
"childrenByOrder": {}
|
|
1186
|
+
},
|
|
1113
1187
|
{
|
|
1114
1188
|
"rendered": true,
|
|
1115
1189
|
"initial": false,
|
|
@@ -1153,7 +1227,7 @@
|
|
|
1153
1227
|
"auxiliaryFiles": [
|
|
1154
1228
|
"6841.js.map"
|
|
1155
1229
|
],
|
|
1156
|
-
"hash": "
|
|
1230
|
+
"hash": "82d339025ec7b754",
|
|
1157
1231
|
"childrenByOrder": {}
|
|
1158
1232
|
},
|
|
1159
1233
|
{
|
|
@@ -1183,22 +1257,21 @@
|
|
|
1183
1257
|
"initial": false,
|
|
1184
1258
|
"entry": false,
|
|
1185
1259
|
"recorded": false,
|
|
1186
|
-
"size":
|
|
1260
|
+
"size": 4914,
|
|
1187
1261
|
"sizes": {
|
|
1188
|
-
"javascript":
|
|
1262
|
+
"javascript": 4914
|
|
1189
1263
|
},
|
|
1190
1264
|
"names": [],
|
|
1191
1265
|
"idHints": [],
|
|
1192
1266
|
"runtime": [
|
|
1193
|
-
"@openmrs/esm-dispensing-app"
|
|
1267
|
+
"@openmrs/esm-dispensing-app",
|
|
1268
|
+
"main"
|
|
1194
1269
|
],
|
|
1195
1270
|
"files": [
|
|
1196
|
-
"
|
|
1197
|
-
],
|
|
1198
|
-
"auxiliaryFiles": [
|
|
1199
|
-
"6867.js.map"
|
|
1271
|
+
"7097.js"
|
|
1200
1272
|
],
|
|
1201
|
-
"
|
|
1273
|
+
"auxiliaryFiles": [],
|
|
1274
|
+
"hash": "fb5a2f8d73afa30a",
|
|
1202
1275
|
"childrenByOrder": {}
|
|
1203
1276
|
},
|
|
1204
1277
|
{
|
|
@@ -1217,10 +1290,10 @@
|
|
|
1217
1290
|
"main"
|
|
1218
1291
|
],
|
|
1219
1292
|
"files": [
|
|
1220
|
-
"
|
|
1293
|
+
"7159.js"
|
|
1221
1294
|
],
|
|
1222
1295
|
"auxiliaryFiles": [],
|
|
1223
|
-
"hash": "
|
|
1296
|
+
"hash": "7fb6919a17f1696b",
|
|
1224
1297
|
"childrenByOrder": {}
|
|
1225
1298
|
},
|
|
1226
1299
|
{
|
|
@@ -1228,21 +1301,26 @@
|
|
|
1228
1301
|
"initial": false,
|
|
1229
1302
|
"entry": false,
|
|
1230
1303
|
"recorded": false,
|
|
1231
|
-
"
|
|
1304
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
1305
|
+
"size": 23425,
|
|
1232
1306
|
"sizes": {
|
|
1233
|
-
"javascript":
|
|
1307
|
+
"javascript": 23425
|
|
1234
1308
|
},
|
|
1235
1309
|
"names": [],
|
|
1236
|
-
"idHints": [
|
|
1310
|
+
"idHints": [
|
|
1311
|
+
"vendors"
|
|
1312
|
+
],
|
|
1237
1313
|
"runtime": [
|
|
1238
1314
|
"@openmrs/esm-dispensing-app",
|
|
1239
1315
|
"main"
|
|
1240
1316
|
],
|
|
1241
1317
|
"files": [
|
|
1242
|
-
"
|
|
1318
|
+
"7240.js"
|
|
1243
1319
|
],
|
|
1244
|
-
"auxiliaryFiles": [
|
|
1245
|
-
|
|
1320
|
+
"auxiliaryFiles": [
|
|
1321
|
+
"7240.js.map"
|
|
1322
|
+
],
|
|
1323
|
+
"hash": "d64c7380097487e0",
|
|
1246
1324
|
"childrenByOrder": {}
|
|
1247
1325
|
},
|
|
1248
1326
|
{
|
|
@@ -1411,10 +1489,10 @@
|
|
|
1411
1489
|
"initial": true,
|
|
1412
1490
|
"entry": true,
|
|
1413
1491
|
"recorded": false,
|
|
1414
|
-
"size":
|
|
1492
|
+
"size": 3635038,
|
|
1415
1493
|
"sizes": {
|
|
1416
1494
|
"consume-shared": 210,
|
|
1417
|
-
"javascript":
|
|
1495
|
+
"javascript": 3612062,
|
|
1418
1496
|
"share-init": 378,
|
|
1419
1497
|
"runtime": 22388
|
|
1420
1498
|
},
|
|
@@ -1431,7 +1509,7 @@
|
|
|
1431
1509
|
"auxiliaryFiles": [
|
|
1432
1510
|
"main.js.map"
|
|
1433
1511
|
],
|
|
1434
|
-
"hash": "
|
|
1512
|
+
"hash": "8bd220550de9cc13",
|
|
1435
1513
|
"childrenByOrder": {}
|
|
1436
1514
|
},
|
|
1437
1515
|
{
|
|
@@ -1439,25 +1517,22 @@
|
|
|
1439
1517
|
"initial": false,
|
|
1440
1518
|
"entry": false,
|
|
1441
1519
|
"recorded": false,
|
|
1442
|
-
"
|
|
1443
|
-
"size": 208856,
|
|
1520
|
+
"size": 319725,
|
|
1444
1521
|
"sizes": {
|
|
1445
|
-
"javascript":
|
|
1522
|
+
"javascript": 319725
|
|
1446
1523
|
},
|
|
1447
1524
|
"names": [],
|
|
1448
|
-
"idHints": [
|
|
1449
|
-
"vendors"
|
|
1450
|
-
],
|
|
1525
|
+
"idHints": [],
|
|
1451
1526
|
"runtime": [
|
|
1452
1527
|
"@openmrs/esm-dispensing-app"
|
|
1453
1528
|
],
|
|
1454
1529
|
"files": [
|
|
1455
|
-
"
|
|
1530
|
+
"8885.js"
|
|
1456
1531
|
],
|
|
1457
1532
|
"auxiliaryFiles": [
|
|
1458
|
-
"
|
|
1533
|
+
"8885.js.map"
|
|
1459
1534
|
],
|
|
1460
|
-
"hash": "
|
|
1535
|
+
"hash": "38c2ed9c46ecb85b",
|
|
1461
1536
|
"childrenByOrder": {}
|
|
1462
1537
|
},
|
|
1463
1538
|
{
|
|
@@ -1638,7 +1713,7 @@
|
|
|
1638
1713
|
"auxiliaryFiles": [
|
|
1639
1714
|
"openmrs-esm-dispensing-app.js.map"
|
|
1640
1715
|
],
|
|
1641
|
-
"hash": "
|
|
1716
|
+
"hash": "7f3bfad5b66b0cd4",
|
|
1642
1717
|
"childrenByOrder": {}
|
|
1643
1718
|
}
|
|
1644
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":"
|
|
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.1361"}
|
package/package.json
CHANGED
|
@@ -3,86 +3,72 @@ import { Button } from '@carbon/react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import {
|
|
5
5
|
AddIcon,
|
|
6
|
-
|
|
6
|
+
type FetchResponse,
|
|
7
7
|
launchWorkspace2,
|
|
8
|
+
openmrsFetch,
|
|
9
|
+
restBaseUrl,
|
|
10
|
+
showModal,
|
|
8
11
|
showSnackbar,
|
|
9
|
-
useConfig,
|
|
10
12
|
useLayoutType,
|
|
11
|
-
|
|
13
|
+
type Visit,
|
|
14
|
+
type Workspace2DefinitionProps,
|
|
12
15
|
} from '@openmrs/esm-framework';
|
|
13
|
-
import { computeQuantityRemaining } from '../utils';
|
|
14
|
-
import { getPrescriptionDetails } from '../medication-request/medication-request.resource';
|
|
15
|
-
import { initiateMedicationDispenseBody, useProviders } from '../medication-dispense/medication-dispense.resource';
|
|
16
|
-
import { type PharmacyConfig } from '../config-schema';
|
|
17
16
|
import styles from './fill-prescription-button.scss';
|
|
17
|
+
import { type Order } from '@openmrs/esm-patient-common-lib';
|
|
18
18
|
|
|
19
19
|
const FillPrescriptionButton: React.FC<{}> = () => {
|
|
20
20
|
const isTablet = useLayoutType() === 'tablet';
|
|
21
21
|
const responsiveSize = isTablet ? 'lg' : 'md';
|
|
22
22
|
const { t } = useTranslation();
|
|
23
|
-
const { dispenseBehavior, dispenserProviderRoles } = useConfig<PharmacyConfig>();
|
|
24
|
-
const session = useSession();
|
|
25
|
-
const providers = useProviders(dispenserProviderRoles);
|
|
26
|
-
|
|
27
|
-
const onAfterSaveFillPrescriptionForm = (patient: fhir.Patient, encounterUuid: string) => {
|
|
28
|
-
const fillDispensingForm = (props) => {
|
|
29
|
-
return new Promise((resolve) => {
|
|
30
|
-
const onWorkspaceClosed = resolve;
|
|
31
|
-
launchWorkspace2('dispense-workspace', { ...props, onWorkspaceClosed });
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
getPrescriptionDetails(encounterUuid)
|
|
36
|
-
.then(async (prescriptionDetails) => {
|
|
37
|
-
const { medicationRequestBundles } = prescriptionDetails;
|
|
38
|
-
for (const medicationRequestBundle of medicationRequestBundles) {
|
|
39
|
-
let quantityRemaining = null;
|
|
40
|
-
if (dispenseBehavior.restrictTotalQuantityDispensed) {
|
|
41
|
-
quantityRemaining = computeQuantityRemaining(medicationRequestBundle);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const quantityDispensed = 0;
|
|
45
|
-
const dispenseFormProps = {
|
|
46
|
-
patientUuid: patient.id,
|
|
47
|
-
encounterUuid,
|
|
48
|
-
medicationDispense: initiateMedicationDispenseBody(
|
|
49
|
-
medicationRequestBundle.request,
|
|
50
|
-
session,
|
|
51
|
-
providers,
|
|
52
|
-
true,
|
|
53
|
-
),
|
|
54
|
-
medicationRequestBundle,
|
|
55
|
-
quantityRemaining,
|
|
56
|
-
quantityDispensed,
|
|
57
|
-
mode: 'enter',
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
await fillDispensingForm(dispenseFormProps);
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
.catch(() => {
|
|
64
|
-
showSnackbar({
|
|
65
|
-
isLowContrast: true,
|
|
66
|
-
kind: 'error',
|
|
67
|
-
title: t('errorLoadingPrescriptionDetails', 'Error loading prescription details'),
|
|
68
|
-
subtitle: t('tryRefreshingThePage', 'Try refreshing the page.'),
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// See PatientSearchWorkspaceProps in patient-search-app
|
|
74
|
-
const workspaceProps = {
|
|
75
|
-
initialQuery: '',
|
|
76
|
-
nonNavigationSelectPatientAction: (_: string, patient: fhir.Patient) => {
|
|
77
|
-
launchWorkspace('fill-prescription-form', {
|
|
78
|
-
patient,
|
|
79
|
-
onAfterSave: onAfterSaveFillPrescriptionForm,
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
23
|
|
|
84
24
|
const launchSearchWorkspace = () => {
|
|
85
|
-
|
|
25
|
+
launchWorkspace2(
|
|
26
|
+
'dispensing-patient-search-workspace',
|
|
27
|
+
{
|
|
28
|
+
workspaceTitle: t('fillPrescriptionForPatient', 'Fill prescription for patient'),
|
|
29
|
+
onPatientSelected(
|
|
30
|
+
patientUuid: string,
|
|
31
|
+
patient: fhir.Patient,
|
|
32
|
+
launchChildWorkspace: Workspace2DefinitionProps['launchChildWorkspace'],
|
|
33
|
+
closeWorkspace: Workspace2DefinitionProps['closeWorkspace'],
|
|
34
|
+
) {
|
|
35
|
+
getActiveVisitsForPatient(patientUuid).then(async (response) => {
|
|
36
|
+
const activeVisit = response.data.results?.[0];
|
|
37
|
+
if (activeVisit) {
|
|
38
|
+
await closeWorkspace();
|
|
39
|
+
launchWorkspace2(
|
|
40
|
+
'dispensing-order-basket-workspace',
|
|
41
|
+
{},
|
|
42
|
+
{
|
|
43
|
+
patientUuid: patientUuid,
|
|
44
|
+
patient: patient,
|
|
45
|
+
visitContext: activeVisit,
|
|
46
|
+
drugOrderWorkspaceName: 'dispensing-order-basket-add-drug-order-workspace',
|
|
47
|
+
onOrderBasketSubmitted: (encounterUuid: string, _: Array<Order>) => {
|
|
48
|
+
showModal('on-prescription-filled-modal', {
|
|
49
|
+
patient,
|
|
50
|
+
encounterUuid,
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
} else {
|
|
56
|
+
showSnackbar({
|
|
57
|
+
title: t('visitRequired', 'Visit required'),
|
|
58
|
+
subtitle: t(
|
|
59
|
+
'visitRequiredForPatientToFillPrescription',
|
|
60
|
+
'Visit required for patient to fill prescription',
|
|
61
|
+
),
|
|
62
|
+
kind: 'error',
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
startVisitWorkspaceName: 'ward-app-start-visit-workspace',
|
|
70
|
+
},
|
|
71
|
+
);
|
|
86
72
|
};
|
|
87
73
|
|
|
88
74
|
return (
|
|
@@ -98,4 +84,20 @@ const FillPrescriptionButton: React.FC<{}> = () => {
|
|
|
98
84
|
);
|
|
99
85
|
};
|
|
100
86
|
|
|
87
|
+
function getActiveVisitsForPatient(
|
|
88
|
+
patientUuid: string,
|
|
89
|
+
abortController?: AbortController,
|
|
90
|
+
v?: string,
|
|
91
|
+
): Promise<FetchResponse<{ results: Array<Visit> }>> {
|
|
92
|
+
const custom = v ?? `default`;
|
|
93
|
+
|
|
94
|
+
return openmrsFetch(`${restBaseUrl}/visit?patient=${patientUuid}&v=${custom}&includeInactive=false`, {
|
|
95
|
+
signal: abortController?.signal,
|
|
96
|
+
method: 'GET',
|
|
97
|
+
headers: {
|
|
98
|
+
'Content-type': 'application/json',
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
101
103
|
export default FillPrescriptionButton;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, ModalBody, ModalFooter, ModalHeader, Tile } from '@carbon/react';
|
|
3
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
4
|
+
import { getPatientName, showSnackbar, useConfig, useSession } from '@openmrs/esm-framework';
|
|
5
|
+
import { usePrescriptionDetails } from '../medication-request/medication-request.resource';
|
|
6
|
+
import {
|
|
7
|
+
getMedicationDisplay,
|
|
8
|
+
getMedicationReferenceOrCodeableConcept,
|
|
9
|
+
markEncounterAsStale,
|
|
10
|
+
revalidate,
|
|
11
|
+
} from '../utils';
|
|
12
|
+
import {
|
|
13
|
+
initiateMedicationDispenseBody,
|
|
14
|
+
saveMedicationDispense,
|
|
15
|
+
useProviders,
|
|
16
|
+
} from '../medication-dispense/medication-dispense.resource';
|
|
17
|
+
import { type PharmacyConfig } from '../config-schema';
|
|
18
|
+
import MedicationEvent from '../components/medication-event.component';
|
|
19
|
+
import { MedicationDispenseStatus } from '../types';
|
|
20
|
+
import styles from './on-prescription-filled.scss';
|
|
21
|
+
|
|
22
|
+
interface OnPrescriptionFilledModalProps {
|
|
23
|
+
patient: fhir.Patient;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The encounter with which the user just placed the fill prescription order.
|
|
27
|
+
*/
|
|
28
|
+
encounterUuid: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* closes the modal
|
|
32
|
+
*/
|
|
33
|
+
close(): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* This modal appears after the user submits the order basket opened via the
|
|
38
|
+
* "Fill Prescription" button in the dispensing app. It confirms whether the user
|
|
39
|
+
* would like to immediately mark the medication orders as dispensed.
|
|
40
|
+
*/
|
|
41
|
+
const OnPrescriptionFilledModal: React.FC<OnPrescriptionFilledModalProps> = ({ patient, encounterUuid, close }) => {
|
|
42
|
+
const { dispenserProviderRoles } = useConfig<PharmacyConfig>();
|
|
43
|
+
const session = useSession();
|
|
44
|
+
const providers = useProviders(dispenserProviderRoles);
|
|
45
|
+
const { medicationRequestBundles } = usePrescriptionDetails(encounterUuid);
|
|
46
|
+
const { t } = useTranslation();
|
|
47
|
+
|
|
48
|
+
const onConfirm = () => {
|
|
49
|
+
markEncounterAsStale(encounterUuid);
|
|
50
|
+
for (const medicationRequestBundle of medicationRequestBundles) {
|
|
51
|
+
const medicationDispensePayload = initiateMedicationDispenseBody(
|
|
52
|
+
medicationRequestBundle.request,
|
|
53
|
+
session,
|
|
54
|
+
providers,
|
|
55
|
+
true,
|
|
56
|
+
);
|
|
57
|
+
const medicationDisplay = getMedicationDisplay(
|
|
58
|
+
getMedicationReferenceOrCodeableConcept(medicationRequestBundle.request),
|
|
59
|
+
);
|
|
60
|
+
saveMedicationDispense(medicationDispensePayload, MedicationDispenseStatus.completed)
|
|
61
|
+
.then(() => {
|
|
62
|
+
showSnackbar({
|
|
63
|
+
title: t('stockDispensed', 'Stock dispensed'),
|
|
64
|
+
subtitle: medicationDisplay,
|
|
65
|
+
isLowContrast: false,
|
|
66
|
+
});
|
|
67
|
+
})
|
|
68
|
+
.catch((error) => {
|
|
69
|
+
showSnackbar({
|
|
70
|
+
title: t('errorDispensingMedication', 'Error dispensing medication'),
|
|
71
|
+
kind: 'error',
|
|
72
|
+
subtitle: t('errorDispensingMedicationMessage', '{{medication}}: {{error}}', {
|
|
73
|
+
medication: medicationDisplay,
|
|
74
|
+
error: error?.message,
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
close();
|
|
80
|
+
revalidate(encounterUuid);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const patientName = getPatientName(patient);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<>
|
|
87
|
+
<ModalHeader>{t('dispenseAllPrescriptions', 'Dispense prescriptions')}</ModalHeader>
|
|
88
|
+
<ModalBody>
|
|
89
|
+
<p className={styles.modalDescription}>
|
|
90
|
+
<Trans i18nKey="confirmRemovePatientFromQueue">
|
|
91
|
+
Would you like to mark prescriptions ordered for <strong>{{ patientName } as any}</strong> as dispensed and
|
|
92
|
+
completed?
|
|
93
|
+
</Trans>
|
|
94
|
+
</p>
|
|
95
|
+
{medicationRequestBundles.map((bundle) => (
|
|
96
|
+
<Tile className={styles.prescriptionTile}>
|
|
97
|
+
<MedicationEvent key={bundle.request.id} medicationEvent={bundle.request} />
|
|
98
|
+
</Tile>
|
|
99
|
+
))}
|
|
100
|
+
</ModalBody>
|
|
101
|
+
<ModalFooter>
|
|
102
|
+
<Button kind="secondary" onClick={close}>
|
|
103
|
+
{t('cancel', 'Cancel')}
|
|
104
|
+
</Button>
|
|
105
|
+
<Button onClick={onConfirm}>{t('dispenseAllPrescriptions', 'Dispense all prescriptions')}</Button>
|
|
106
|
+
</ModalFooter>
|
|
107
|
+
</>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export default OnPrescriptionFilledModal;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
|
+
|
|
5
|
+
.modalDescription {
|
|
6
|
+
margin-bottom: layout.$spacing-05;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.prescriptionTile {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
width: 100%;
|
|
13
|
+
margin: layout.$spacing-01 0 layout.$spacing-03;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
border-left: layout.$spacing-03 solid var(--brand-03);
|
|
17
|
+
color: $text-02;
|
|
18
|
+
margin-bottom: layout.$spacing-05 !important;
|
|
19
|
+
}
|