@openmrs/esm-patient-medications-app 11.3.1-pre.9654 → 11.3.1-pre.9663

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.
@@ -1 +1 @@
1
- var _openmrs_esm_patient_medications_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,_={94731:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(6877),t.e(8689),t.e(1343),t.e(5434),t.e(8716),t.e(8437)]).then((()=>()=>t(78437)))},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,exports:{}};return _[e].call(t.exports,t,t.exports,j),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-patient-medications-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.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-patient-medications-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.3614",(()=>Promise.all([j.e(7160),j.e(6877),j.e(5670),j.e(1343),j.e(5434),j.e(2941),j.e(8716)]).then((()=>()=>j(55670))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.9654",(()=>Promise.all([j.e(7160),j.e(6877),j.e(1343),j.e(5434),j.e(2941),j.e(8716),j.e(4341)]).then((()=>()=>j(94341))))),s("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),s("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),s("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),s("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),s("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),s("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),s("swr/immutable","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),s("swr/infinite","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),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={1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),8877:()=>v("default","react-router-dom",!1,[1,6],(()=>j.e(2913).then((()=>()=>j(52913))))),24818:()=>v("default","rxjs",!1,[1,6],(()=>j.e(2457).then((()=>()=>j(82457))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(2470).then((()=>()=>j(52470))))),46372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(3464).then((()=>()=>j(23464))))),54440:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([j.e(7160),j.e(5670),j.e(2941)]).then((()=>()=>j(55670))))),72339:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(6336).then((()=>()=>j(16336))))),88010:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(9876).then((()=>()=>j(29876))))),36274:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([j.e(7160),j.e(2941),j.e(4341)]).then((()=>()=>j(94341)))))},y={1343:[1343],2941:[8877,24818,98394],5434:[55434],8437:[36274],8716:[46372,54440,72339,88010]},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={282: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(/^(1343|2941|5434|8716)$/.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_patient_medications_app=globalThis.webpackChunk_openmrs_esm_patient_medications_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(94731);_openmrs_esm_patient_medications_app=S})();
1
+ var _openmrs_esm_patient_medications_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,_={94731:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(6877),t.e(8689),t.e(1343),t.e(5434),t.e(8716),t.e(8437)]).then((()=>()=>t(78437)))},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,exports:{}};return _[e].call(t.exports,t,t.exports,j),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-patient-medications-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.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-patient-medications-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.3614",(()=>Promise.all([j.e(7160),j.e(6877),j.e(5670),j.e(1343),j.e(5434),j.e(2941),j.e(8716)]).then((()=>()=>j(55670))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.9663",(()=>Promise.all([j.e(7160),j.e(6877),j.e(1343),j.e(5434),j.e(2941),j.e(8716),j.e(4341)]).then((()=>()=>j(94341))))),s("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),s("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),s("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),s("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),s("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),s("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),s("swr/immutable","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),s("swr/infinite","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),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={1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),8877:()=>v("default","react-router-dom",!1,[1,6],(()=>j.e(2913).then((()=>()=>j(52913))))),24818:()=>v("default","rxjs",!1,[1,6],(()=>j.e(2457).then((()=>()=>j(82457))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(2470).then((()=>()=>j(52470))))),46372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(3464).then((()=>()=>j(23464))))),54440:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([j.e(7160),j.e(5670),j.e(2941)]).then((()=>()=>j(55670))))),72339:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(6336).then((()=>()=>j(16336))))),88010:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(9876).then((()=>()=>j(29876))))),36274:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([j.e(7160),j.e(2941),j.e(4341)]).then((()=>()=>j(94341)))))},y={1343:[1343],2941:[8877,24818,98394],5434:[55434],8437:[36274],8716:[46372,54440,72339,88010]},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={282: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(/^(1343|2941|5434|8716)$/.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_patient_medications_app=globalThis.webpackChunk_openmrs_esm_patient_medications_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(94731);_openmrs_esm_patient_medications_app=S})();
@@ -48,7 +48,7 @@
48
48
  "auxiliaryFiles": [
49
49
  "openmrs-esm-patient-medications-app.js.map"
50
50
  ],
51
- "hash": "9c9f18123620afe8",
51
+ "hash": "c3832b123634ed34",
52
52
  "childrenByOrder": {}
53
53
  },
54
54
  {
@@ -585,9 +585,9 @@
585
585
  "initial": false,
586
586
  "entry": false,
587
587
  "recorded": false,
588
- "size": 4232,
588
+ "size": 4342,
589
589
  "sizes": {
590
- "javascript": 4232
590
+ "javascript": 4342
591
591
  },
592
592
  "names": [],
593
593
  "idHints": [],
@@ -599,7 +599,7 @@
599
599
  "4300.js"
600
600
  ],
601
601
  "auxiliaryFiles": [],
602
- "hash": "65630d6f7756cf73",
602
+ "hash": "810a53a918b5eca6",
603
603
  "childrenByOrder": {}
604
604
  },
605
605
  {
@@ -1277,10 +1277,10 @@
1277
1277
  "initial": false,
1278
1278
  "entry": false,
1279
1279
  "recorded": false,
1280
- "size": 151620,
1280
+ "size": 152359,
1281
1281
  "sizes": {
1282
1282
  "consume-shared": 42,
1283
- "javascript": 151578
1283
+ "javascript": 152317
1284
1284
  },
1285
1285
  "names": [],
1286
1286
  "idHints": [],
@@ -1293,7 +1293,7 @@
1293
1293
  "auxiliaryFiles": [
1294
1294
  "8437.js.map"
1295
1295
  ],
1296
- "hash": "a450506bcda7da30",
1296
+ "hash": "cf4d33be432138e8",
1297
1297
  "childrenByOrder": {}
1298
1298
  },
1299
1299
  {
@@ -1370,10 +1370,10 @@
1370
1370
  "initial": true,
1371
1371
  "entry": true,
1372
1372
  "recorded": false,
1373
- "size": 3121250,
1373
+ "size": 3121989,
1374
1374
  "sizes": {
1375
1375
  "consume-shared": 294,
1376
- "javascript": 3097854,
1376
+ "javascript": 3098593,
1377
1377
  "share-init": 420,
1378
1378
  "runtime": 22682
1379
1379
  },
@@ -1390,7 +1390,7 @@
1390
1390
  "auxiliaryFiles": [
1391
1391
  "main.js.map"
1392
1392
  ],
1393
- "hash": "bed6cce8eff02122",
1393
+ "hash": "3bf948cd79ad2e11",
1394
1394
  "childrenByOrder": {}
1395
1395
  },
1396
1396
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"optionalBackendDependencies":{"providermanagement":{"version":"^2.16.0","feature":{"flagName":"providermanagement-module","label":"Prescribing Clinician Roles","description":"Enable support for configuring prescribing clinicians roles when ordering drugs. Requires the backend providermanagement module."}},"ordertemplates":{"version":"^1.0.2","feature":{"flagName":"ordertemplates-module","label":"Order Templates","description":"Enable support for order templates when ordering drugs. Requires the backend ordertemplates module."}}},"extensions":[{"name":"medications-details-widget","component":"medicationsSummary","slot":"patient-chart-medications-dashboard-slot","meta":{"fullWidth":false}},{"name":"active-medications-widget","component":"activeMedications","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":false},"order":4},{"name":"past-medications-widget","component":"pastMedications","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":false},"order":5},{"name":"medications-summary-dashboard","component":"medicationsDashboardLink","slot":"patient-chart-dashboard-slot","order":3,"meta":{"slot":"patient-chart-medications-dashboard-slot","path":"Medications"}},{"name":"drug-order-panel","component":"drugOrderPanel","slot":"order-basket-slot","order":1},{"name":"drug-order-form","component":"drugOrderForm"},{"name":"drug-search-combobox","component":"drugSearchComboBox"}],"workspaces2":[{"name":"add-drug-order","component":"addDrugOrderWorkspace","window":"patient-chart-order-basket"}],"version":"11.3.1-pre.9654"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"optionalBackendDependencies":{"providermanagement":{"version":"^2.16.0","feature":{"flagName":"providermanagement-module","label":"Prescribing Clinician Roles","description":"Enable support for configuring prescribing clinicians roles when ordering drugs. Requires the backend providermanagement module."}},"ordertemplates":{"version":"^1.0.2","feature":{"flagName":"ordertemplates-module","label":"Order Templates","description":"Enable support for order templates when ordering drugs. Requires the backend ordertemplates module."}}},"extensions":[{"name":"medications-details-widget","component":"medicationsSummary","slot":"patient-chart-medications-dashboard-slot","meta":{"fullWidth":false}},{"name":"active-medications-widget","component":"activeMedications","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":false},"order":4},{"name":"past-medications-widget","component":"pastMedications","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":false},"order":5},{"name":"medications-summary-dashboard","component":"medicationsDashboardLink","slot":"patient-chart-dashboard-slot","order":3,"meta":{"slot":"patient-chart-medications-dashboard-slot","path":"Medications"}},{"name":"drug-order-panel","component":"drugOrderPanel","slot":"order-basket-slot","order":1},{"name":"drug-order-form","component":"drugOrderForm"},{"name":"drug-search-combobox","component":"drugSearchComboBox"}],"workspaces2":[{"name":"add-drug-order","component":"addDrugOrderWorkspace","window":"patient-chart-order-basket"}],"version":"11.3.1-pre.9663"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-medications-app",
3
- "version": "11.3.1-pre.9654",
3
+ "version": "11.3.1-pre.9663",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient medications microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-medications-app.js",
@@ -52,7 +52,7 @@
52
52
  "swr": "2.x"
53
53
  },
54
54
  "devDependencies": {
55
- "@openmrs/esm-patient-common-lib": "11.3.1-pre.9654",
55
+ "@openmrs/esm-patient-common-lib": "11.3.1-pre.9663",
56
56
  "webpack": "^5.99.9"
57
57
  },
58
58
  "stableVersion": "11.3.0"
@@ -1,9 +1,8 @@
1
1
  import React, { type ComponentProps, useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
2
  import dayjs from 'dayjs';
3
- import { capitalize } from 'lodash-es';
4
3
  import {
5
- DataTable,
6
4
  Button,
5
+ DataTable,
7
6
  IconButton,
8
7
  InlineLoading,
9
8
  OverflowMenu,
@@ -18,41 +17,40 @@ import {
18
17
  Tag,
19
18
  Tooltip,
20
19
  } from '@carbon/react';
20
+ import { capitalize } from 'lodash-es';
21
+ import { useTranslation } from 'react-i18next';
22
+ import { useReactToPrint } from 'react-to-print';
23
+ import { useSWRConfig } from 'swr';
21
24
  import {
22
25
  CardHeader,
23
26
  compare,
24
- type DrugOrderBasketItem,
27
+ invalidateVisitAndEncounterData,
28
+ invalidateVisitByUuid,
25
29
  PatientChartPagination,
30
+ type DrugOrderBasketItem,
26
31
  type Order,
32
+ type OrderBasketWindowProps,
33
+ type PatientWorkspaceGroupProps,
27
34
  useLaunchWorkspaceRequiringVisit,
28
35
  useOrderBasket,
29
- type PatientWorkspaceGroupProps,
30
- invalidateVisitByUuid,
31
- invalidateVisitAndEncounterData,
32
- type OrderBasketWindowProps,
33
36
  } from '@openmrs/esm-patient-common-lib';
34
37
  import {
35
38
  AddIcon,
36
39
  age,
37
- getPatientName,
38
40
  formatDate,
41
+ getPatientName,
42
+ launchWorkspace2,
39
43
  PrinterIcon,
40
44
  useConfig,
41
45
  useLayoutType,
42
46
  usePagination,
43
47
  UserIcon,
44
- launchWorkspace2,
45
- type Encounter,
46
- showModal,
47
48
  } from '@openmrs/esm-framework';
48
- import { useTranslation } from 'react-i18next';
49
- import { useReactToPrint } from 'react-to-print';
49
+ import { buildMedicationOrder } from '../api';
50
+ import { type AddDrugOrderWorkspaceProps } from '../add-drug-order/add-drug-order.workspace';
50
51
  import { type ConfigObject } from '../config-schema';
51
52
  import PrintComponent from '../print/print.component';
52
53
  import styles from './medications-details-table.scss';
53
- import { useSWRConfig } from 'swr';
54
- import { type AddDrugOrderWorkspaceProps } from '../add-drug-order/add-drug-order.workspace';
55
- import { buildMedicationOrder } from '../api';
56
54
 
57
55
  export interface MedicationsDetailsTableProps {
58
56
  isValidating?: boolean;
@@ -102,8 +100,13 @@ const MedicationsDetailsTable: React.FC<MedicationsDetailsTableProps> = ({
102
100
  },
103
101
  ];
104
102
 
105
- const tableRows = results?.map((medication, id) => ({
106
- id: `${id}`,
103
+ const medicationsByUuid = useMemo(
104
+ () => new Map(results?.map((medication) => [medication.uuid, medication]) ?? []),
105
+ [results],
106
+ );
107
+
108
+ const tableRows = results?.map((medication) => ({
109
+ id: medication.uuid,
107
110
  details: {
108
111
  sortKey: medication.drug?.display,
109
112
  content: (
@@ -247,7 +250,7 @@ const MedicationsDetailsTable: React.FC<MedicationsDetailsTableProps> = ({
247
250
  <Button
248
251
  kind="ghost"
249
252
  renderIcon={PrinterIcon}
250
- iconDescription="Add vitals"
253
+ iconDescription={t('printMedications', 'Print medications')}
251
254
  className={styles.printButton}
252
255
  onClick={handlePrint}
253
256
  >
@@ -258,7 +261,7 @@ const MedicationsDetailsTable: React.FC<MedicationsDetailsTableProps> = ({
258
261
  <Button
259
262
  kind="ghost"
260
263
  renderIcon={(props: ComponentProps<typeof AddIcon>) => <AddIcon size={16} {...props} />}
261
- iconDescription="Launch order basket"
264
+ iconDescription={t('launchOrderBasket', 'Launch order basket')}
262
265
  onClick={() => launchOrderBasket({}, { encounterUuid: '' })}
263
266
  >
264
267
  {t('add', 'Add')}
@@ -292,32 +295,37 @@ const MedicationsDetailsTable: React.FC<MedicationsDetailsTableProps> = ({
292
295
  {header.header}
293
296
  </TableHeader>
294
297
  ))}
295
- <TableHeader aria-label={t('actions', 'Actions')} />
298
+ {!isPrinting && <TableHeader aria-label={t('actions', 'Actions')} />}
296
299
  </TableRow>
297
300
  </TableHead>
298
301
  <TableBody>
299
- {rows.map((row, rowIndex) => (
300
- <TableRow className={styles.row} {...getRowProps({ row })}>
301
- {row.cells.map((cell) => (
302
- <TableCell className={styles.tableCell} key={cell.id}>
303
- {cell.value?.content ?? cell.value}
304
- </TableCell>
305
- ))}
306
- {!isPrinting && (
307
- <TableCell className="cds--table-column-menu">
308
- <OrderBasketItemActions
309
- patient={patient}
310
- showDiscontinueButton={showDiscontinueButton}
311
- showModifyButton={showModifyButton}
312
- showReorderButton={showReorderButton}
313
- medication={medications[rowIndex]}
314
- items={orders}
315
- setItems={setOrders}
316
- />
317
- </TableCell>
318
- )}
319
- </TableRow>
320
- ))}
302
+ {rows.map((row) => {
303
+ const medication = medicationsByUuid.get(row.id);
304
+
305
+ return (
306
+ <TableRow className={styles.row} {...getRowProps({ row })}>
307
+ {row.cells.map((cell) => (
308
+ <TableCell className={styles.tableCell} key={cell.id}>
309
+ {cell.value?.content ?? cell.value}
310
+ </TableCell>
311
+ ))}
312
+
313
+ {!isPrinting && medication && (
314
+ <TableCell className="cds--table-column-menu">
315
+ <OrderBasketItemActions
316
+ patient={patient}
317
+ showDiscontinueButton={showDiscontinueButton}
318
+ showModifyButton={showModifyButton}
319
+ showReorderButton={showReorderButton}
320
+ medication={medication}
321
+ items={orders}
322
+ setItems={setOrders}
323
+ />
324
+ </TableCell>
325
+ )}
326
+ </TableRow>
327
+ );
328
+ })}
321
329
  </TableBody>
322
330
  </Table>
323
331
  </TableContainer>
@@ -325,7 +333,7 @@ const MedicationsDetailsTable: React.FC<MedicationsDetailsTableProps> = ({
325
333
  </DataTable>
326
334
  <PatientChartPagination
327
335
  pageNumber={currentPage}
328
- totalItems={medications.length}
336
+ totalItems={medications?.length ?? 0}
329
337
  currentItems={results.length}
330
338
  pageSize={pageSize}
331
339
  onPageNumberChange={({ page }) => goTo(page)}
@@ -500,7 +508,13 @@ function OrderBasketItemActions({
500
508
  }, [items, setItems, medication, workspaceGroupProps]);
501
509
 
502
510
  return (
503
- <OverflowMenu aria-label="Actions menu" selectorPrimaryFocus={'#modify'} flipped size={isTablet ? 'lg' : 'md'}>
511
+ <OverflowMenu
512
+ aria-label={t('actionsMenu', 'Actions menu')}
513
+ align="left"
514
+ selectorPrimaryFocus={'#modify'}
515
+ flipped
516
+ size={isTablet ? 'lg' : 'md'}
517
+ >
504
518
  {showModifyButton && (
505
519
  <OverflowMenuItem
506
520
  className={styles.menuItem}
@@ -513,21 +527,21 @@ function OrderBasketItemActions({
513
527
  {showReorderButton && (
514
528
  <OverflowMenuItem
515
529
  className={styles.menuItem}
530
+ disabled={alreadyInBasket}
516
531
  id="reorder"
517
532
  itemText={t('reorder', 'Reorder')}
518
533
  onClick={handleReorderClick}
519
- disabled={alreadyInBasket}
520
534
  />
521
535
  )}
522
536
  {showDiscontinueButton && (
523
537
  <OverflowMenuItem
524
538
  className={styles.menuItem}
539
+ disabled={alreadyInBasket}
540
+ hasDivider
525
541
  id="discontinue"
542
+ isDelete
526
543
  itemText={t('discontinue', 'Discontinue')}
527
544
  onClick={handleDiscontinueClick}
528
- disabled={alreadyInBasket}
529
- isDelete={true}
530
- hasDivider
531
545
  />
532
546
  )}
533
547
  </OverflowMenu>
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "actions": "Actions",
3
+ "actionsMenu": "Actions menu",
3
4
  "activeMedicationsDisplayText": "active medications",
4
5
  "activeMedicationsHeaderTitle": "Active medications",
5
6
  "activeMedicationsTableTitle": "Active Medications",
@@ -47,6 +48,7 @@
47
48
  "indication": "Indication",
48
49
  "indicationErrorMessage": "Indication is required",
49
50
  "indicationPlaceholder": "e.g. \"Hypertension\"",
51
+ "launchOrderBasket": "Launch order basket",
50
52
  "male": "Male",
51
53
  "medicationDurationAndUnit": "for {{duration}} {{durationUnit}}",
52
54
  "medicationIndefiniteDuration": "Indefinite duration",
@@ -83,6 +85,7 @@
83
85
  "prescriptionRefills": "Prescription refills",
84
86
  "print": "Print",
85
87
  "printedBy": "Printed by",
88
+ "printMedications": "Print medications",
86
89
  "prn": "P.R.N.",
87
90
  "prnReason": "P.R.N. reason",
88
91
  "prnReasonPlaceholder": "Reason to take medicine",