@openmrs/esm-patient-vitals-app 11.3.1-pre.9452 → 11.3.1-pre.9455

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_vitals_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,c,h,m,v,g,b,y,w,_={28746:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2276),t.e(9595),t.e(1343),t.e(8515),t.e(9228)]).then((()=>()=>t(19228)))},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-vitals-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(l=!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),l&&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-vitals-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3518",(()=>Promise.all([j.e(7545),j.e(2276),j.e(5670),j.e(5434),j.e(1343),j.e(5182),j.e(8515)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9452",(()=>Promise.all([j.e(7545),j.e(2276),j.e(5434),j.e(1343),j.e(5182),j.e(8515),j.e(8803)]).then((()=>()=>j(18803))))),l("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),l("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),l("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),l("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),l("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),l("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),l("swr/immutable","2.2.5",(()=>Promise.all([j.e(9876),j.e(5434),j.e(1343)]).then((()=>()=>j(29876))))),l("swr/infinite","2.2.5",(()=>Promise.all([j.e(2470),j.e(5434),j.e(1343)]).then((()=>()=>j(52470)))))),e[t]=s.length?Promise.all(s).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],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"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(l=e[o]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var a=[];for(o=1;o<e.length;o++){var l=e[o];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():i(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},l=(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,s=!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!s||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!s||"u"!=f)return!1}else if(s)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]&&(s=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||p<f!=n)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!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?l(h,r):!c())}return!!c()},s=(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(!s(r,t))return m(e,t,a);var i=f(r,t,n);return l(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),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))))),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(7545),j.e(5670),j.e(5434),j.e(5182)]).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],(()=>Promise.all([j.e(9876),j.e(5434)]).then((()=>()=>j(29876))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>Promise.all([j.e(2470),j.e(5434)]).then((()=>()=>j(52470))))),36274:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([j.e(7545),j.e(5434),j.e(5182),j.e(8803)]).then((()=>()=>j(18803)))))},y={1343:[1343],5182:[8877,24818],5434:[55434],8515:[46372,54440,72339,88010,98394],9228:[36274]},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={6167: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|5182|5434|8515)$/.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,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);l&&l(j)}for(r&&r(t);s<a.length;s++)o=a[s],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(28746);_openmrs_esm_patient_vitals_app=S})();
1
+ var _openmrs_esm_patient_vitals_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,c,h,m,v,g,b,y,w,_={28746:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2276),t.e(9595),t.e(1343),t.e(8515),t.e(9228)]).then((()=>()=>t(19228)))},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-vitals-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(l=!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),l&&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-vitals-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3518",(()=>Promise.all([j.e(7545),j.e(2276),j.e(5670),j.e(5434),j.e(1343),j.e(5182),j.e(8515)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9455",(()=>Promise.all([j.e(7545),j.e(2276),j.e(5434),j.e(1343),j.e(5182),j.e(8515),j.e(4341)]).then((()=>()=>j(94341))))),l("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),l("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),l("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),l("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),l("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),l("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),l("swr/immutable","2.2.5",(()=>Promise.all([j.e(9876),j.e(5434),j.e(1343)]).then((()=>()=>j(29876))))),l("swr/infinite","2.2.5",(()=>Promise.all([j.e(2470),j.e(5434),j.e(1343)]).then((()=>()=>j(52470)))))),e[t]=s.length?Promise.all(s).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],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"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(l=e[o]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var a=[];for(o=1;o<e.length;o++){var l=e[o];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():i(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},l=(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,s=!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!s||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!s||"u"!=f)return!1}else if(s)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]&&(s=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||p<f!=n)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!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?l(h,r):!c())}return!!c()},s=(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(!s(r,t))return m(e,t,a);var i=f(r,t,n);return l(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),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))))),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(7545),j.e(5670),j.e(5434),j.e(5182)]).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],(()=>Promise.all([j.e(9876),j.e(5434)]).then((()=>()=>j(29876))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>Promise.all([j.e(2470),j.e(5434)]).then((()=>()=>j(52470))))),36274:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([j.e(7545),j.e(5434),j.e(5182),j.e(4341)]).then((()=>()=>j(94341)))))},y={1343:[1343],5182:[8877,24818],5434:[55434],8515:[46372,54440,72339,88010,98394],9228:[36274]},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={6167: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|5182|5434|8515)$/.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,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);l&&l(j)}for(r&&r(t);s<a.length;s++)o=a[s],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(28746);_openmrs_esm_patient_vitals_app=S})();
@@ -561,6 +561,31 @@
561
561
  "hash": "8fbd2c38ceeaf61b",
562
562
  "childrenByOrder": {}
563
563
  },
564
+ {
565
+ "rendered": true,
566
+ "initial": false,
567
+ "entry": false,
568
+ "recorded": false,
569
+ "reason": "reused as split chunk (cache group: default)",
570
+ "size": 256623,
571
+ "sizes": {
572
+ "javascript": 256623
573
+ },
574
+ "names": [],
575
+ "idHints": [],
576
+ "runtime": [
577
+ "@openmrs/esm-patient-vitals-app",
578
+ "main"
579
+ ],
580
+ "files": [
581
+ "4341.js"
582
+ ],
583
+ "auxiliaryFiles": [
584
+ "4341.js.map"
585
+ ],
586
+ "hash": "363de256e70a440e",
587
+ "childrenByOrder": {}
588
+ },
564
589
  {
565
590
  "rendered": true,
566
591
  "initial": false,
@@ -693,13 +718,14 @@
693
718
  "childrenByOrder": {}
694
719
  },
695
720
  {
696
- "rendered": true,
721
+ "rendered": false,
697
722
  "initial": false,
698
723
  "entry": false,
699
724
  "recorded": false,
700
- "size": 138585,
725
+ "reason": "reused as split chunk (cache group: default)",
726
+ "size": 42,
701
727
  "sizes": {
702
- "javascript": 138585
728
+ "consume-shared": 42
703
729
  },
704
730
  "names": [],
705
731
  "idHints": [],
@@ -707,24 +733,19 @@
707
733
  "@openmrs/esm-patient-vitals-app",
708
734
  "main"
709
735
  ],
710
- "files": [
711
- "5415.js"
712
- ],
713
- "auxiliaryFiles": [
714
- "5415.js.map"
715
- ],
716
- "hash": "1ffb0549661647e0",
736
+ "files": [],
737
+ "auxiliaryFiles": [],
738
+ "hash": "6072f73ce56d83ac",
717
739
  "childrenByOrder": {}
718
740
  },
719
741
  {
720
- "rendered": false,
742
+ "rendered": true,
721
743
  "initial": false,
722
744
  "entry": false,
723
745
  "recorded": false,
724
- "reason": "reused as split chunk (cache group: default)",
725
- "size": 42,
746
+ "size": 3016,
726
747
  "sizes": {
727
- "consume-shared": 42
748
+ "javascript": 3016
728
749
  },
729
750
  "names": [],
730
751
  "idHints": [],
@@ -732,9 +753,11 @@
732
753
  "@openmrs/esm-patient-vitals-app",
733
754
  "main"
734
755
  ],
735
- "files": [],
756
+ "files": [
757
+ "5442.js"
758
+ ],
736
759
  "auxiliaryFiles": [],
737
- "hash": "6072f73ce56d83ac",
760
+ "hash": "8ac956a6e335e676",
738
761
  "childrenByOrder": {}
739
762
  },
740
763
  {
@@ -742,9 +765,9 @@
742
765
  "initial": false,
743
766
  "entry": false,
744
767
  "recorded": false,
745
- "size": 3016,
768
+ "size": 3214,
746
769
  "sizes": {
747
- "javascript": 3016
770
+ "javascript": 3214
748
771
  },
749
772
  "names": [],
750
773
  "idHints": [],
@@ -753,10 +776,12 @@
753
776
  "main"
754
777
  ],
755
778
  "files": [
756
- "5442.js"
779
+ "5652.js"
757
780
  ],
758
- "auxiliaryFiles": [],
759
- "hash": "8ac956a6e335e676",
781
+ "auxiliaryFiles": [
782
+ "5652.js.map"
783
+ ],
784
+ "hash": "5441bfced95d0d45",
760
785
  "childrenByOrder": {}
761
786
  },
762
787
  {
@@ -854,7 +879,7 @@
854
879
  "auxiliaryFiles": [
855
880
  "openmrs-esm-patient-vitals-app.js.map"
856
881
  ],
857
- "hash": "df94b1e59873bbb4",
882
+ "hash": "287f201bf55af795",
858
883
  "childrenByOrder": {}
859
884
  },
860
885
  {
@@ -1062,6 +1087,31 @@
1062
1087
  "hash": "6d32502e558f4a54",
1063
1088
  "childrenByOrder": {}
1064
1089
  },
1090
+ {
1091
+ "rendered": true,
1092
+ "initial": false,
1093
+ "entry": false,
1094
+ "recorded": false,
1095
+ "reason": "reused as split chunk (cache group: default)",
1096
+ "size": 139996,
1097
+ "sizes": {
1098
+ "javascript": 139996
1099
+ },
1100
+ "names": [],
1101
+ "idHints": [],
1102
+ "runtime": [
1103
+ "@openmrs/esm-patient-vitals-app",
1104
+ "main"
1105
+ ],
1106
+ "files": [
1107
+ "7437.js"
1108
+ ],
1109
+ "auxiliaryFiles": [
1110
+ "7437.js.map"
1111
+ ],
1112
+ "hash": "72d1eb9ac189c913",
1113
+ "childrenByOrder": {}
1114
+ },
1065
1115
  {
1066
1116
  "rendered": true,
1067
1117
  "initial": false,
@@ -1225,10 +1275,10 @@
1225
1275
  "initial": true,
1226
1276
  "entry": true,
1227
1277
  "recorded": false,
1228
- "size": 4061579,
1278
+ "size": 4060727,
1229
1279
  "sizes": {
1230
1280
  "consume-shared": 294,
1231
- "javascript": 4038065,
1281
+ "javascript": 4037213,
1232
1282
  "share-init": 420,
1233
1283
  "runtime": 22800
1234
1284
  },
@@ -1245,32 +1295,7 @@
1245
1295
  "auxiliaryFiles": [
1246
1296
  "main.js.map"
1247
1297
  ],
1248
- "hash": "43924ceed24d7f0f",
1249
- "childrenByOrder": {}
1250
- },
1251
- {
1252
- "rendered": true,
1253
- "initial": false,
1254
- "entry": false,
1255
- "recorded": false,
1256
- "reason": "reused as split chunk (cache group: default)",
1257
- "size": 251776,
1258
- "sizes": {
1259
- "javascript": 251776
1260
- },
1261
- "names": [],
1262
- "idHints": [],
1263
- "runtime": [
1264
- "@openmrs/esm-patient-vitals-app",
1265
- "main"
1266
- ],
1267
- "files": [
1268
- "8803.js"
1269
- ],
1270
- "auxiliaryFiles": [
1271
- "8803.js.map"
1272
- ],
1273
- "hash": "66368814e0b4d3f0",
1298
+ "hash": "e79ad6c281106ed4",
1274
1299
  "childrenByOrder": {}
1275
1300
  },
1276
1301
  {
@@ -1324,9 +1349,9 @@
1324
1349
  "initial": false,
1325
1350
  "entry": false,
1326
1351
  "recorded": false,
1327
- "size": 423475,
1352
+ "size": 422623,
1328
1353
  "sizes": {
1329
- "javascript": 423433,
1354
+ "javascript": 422581,
1330
1355
  "consume-shared": 42
1331
1356
  },
1332
1357
  "names": [],
@@ -1340,7 +1365,7 @@
1340
1365
  "auxiliaryFiles": [
1341
1366
  "9228.js.map"
1342
1367
  ],
1343
- "hash": "c9009a78186f2b4d",
1368
+ "hash": "f747399fe52bfeb1",
1344
1369
  "childrenByOrder": {}
1345
1370
  },
1346
1371
  {
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"},"extensions":[{"name":"vitals-overview-widget","component":"vitalsSummary","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":true},"order":1},{"name":"vitals-details-widget","component":"vitalsMain","slot":"patient-chart-vitals-biometrics-dashboard-slot","meta":{"title":"Vitals","view":"vitals","fullWidth":true},"order":1},{"name":"patient-vitals-info","component":"vitalsHeader","slot":"patient-info-slot"},{"name":"biometrics-overview-widget","component":"biometricsOverview","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":true},"order":2},{"name":"biometrics-details-widget","component":"biometricsDetailedSummary","slot":"patient-chart-vitals-biometrics-dashboard-slot","meta":{"view":"biometrics","title":"Biometrics","fullWidth":true}},{"name":"results-summary-dashboard","component":"vitalsAndBiometricsDashboardLink","slot":"patient-chart-dashboard-slot","order":2,"meta":{"slot":"patient-chart-vitals-biometrics-dashboard-slot","path":"Vitals & Biometrics"}},{"name":"weight-tile","component":"weightTile","slot":"visit-form-header-slot","order":2}],"pages":[],"workspaces":[{"name":"patient-vitals-biometrics-form-workspace","title":"recordVitalsAndBiometrics","component":"vitalsBiometricsFormWorkspace"}],"modals":[{"name":"vitals-biometrics-delete-confirmation-modal","component":"vitalsAndBiometricsDeleteConfirmationModal"}],"version":"11.3.1-pre.9452"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"vitals-overview-widget","component":"vitalsSummary","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":true},"order":1},{"name":"vitals-details-widget","component":"vitalsMain","slot":"patient-chart-vitals-biometrics-dashboard-slot","meta":{"title":"Vitals","view":"vitals","fullWidth":true},"order":1},{"name":"patient-vitals-info","component":"vitalsHeader","slot":"patient-info-slot"},{"name":"biometrics-overview-widget","component":"biometricsOverview","slot":"patient-chart-summary-dashboard-slot","meta":{"fullWidth":true},"order":2},{"name":"biometrics-details-widget","component":"biometricsDetailedSummary","slot":"patient-chart-vitals-biometrics-dashboard-slot","meta":{"view":"biometrics","title":"Biometrics","fullWidth":true}},{"name":"results-summary-dashboard","component":"vitalsAndBiometricsDashboardLink","slot":"patient-chart-dashboard-slot","order":2,"meta":{"slot":"patient-chart-vitals-biometrics-dashboard-slot","path":"Vitals & Biometrics"}},{"name":"weight-tile","component":"weightTile","slot":"visit-form-header-slot","order":2}],"pages":[],"workspaces2":[{"name":"patient-vitals-biometrics-form-workspace","component":"vitalsBiometricsFormWorkspace","window":"patient-vitals-biometrics-form-workspace"}],"workspaceWindows2":[{"name":"patient-vitals-biometrics-form-workspace","group":"patient-chart"}],"modals":[{"name":"vitals-biometrics-delete-confirmation-modal","component":"vitalsAndBiometricsDeleteConfirmationModal"}],"version":"11.3.1-pre.9455"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-vitals-app",
3
- "version": "11.3.1-pre.9452",
3
+ "version": "11.3.1-pre.9455",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient vitals microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-vitals-app.js",
@@ -53,7 +53,8 @@
53
53
  "swr": "2.x"
54
54
  },
55
55
  "devDependencies": {
56
- "@openmrs/esm-patient-common-lib": "11.3.1-pre.9452"
56
+ "@openmrs/esm-patient-common-lib": "11.3.1-pre.9455",
57
+ "webpack": "^5.99.9"
57
58
  },
58
59
  "stableVersion": "11.3.0"
59
60
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Layer, OverflowMenu, OverflowMenuItem } from '@carbon/react';
4
- import { launchWorkspace, showModal, useLayoutType } from '@openmrs/esm-framework';
4
+ import { launchWorkspace2, showModal, useLayoutType } from '@openmrs/esm-framework';
5
5
  import { patientVitalsBiometricsFormWorkspace } from '../../constants';
6
6
  import styles from './vitals-biometrics-action-menu.scss';
7
7
 
@@ -16,7 +16,7 @@ export const VitalsAndBiometricsActionMenu = ({ encounterUuid, patient }: Vitals
16
16
  const isTablet = useLayoutType() === 'tablet';
17
17
 
18
18
  const handleLaunchVitalsAndBiometricsForm = useCallback(() => {
19
- launchWorkspace(patientVitalsBiometricsFormWorkspace, {
19
+ launchWorkspace2(patientVitalsBiometricsFormWorkspace, {
20
20
  workspaceTitle: t('editVitalsAndBiometrics', 'Edit Vitals and Biometrics'),
21
21
  editEncounterUuid: encounterUuid,
22
22
  formContext: 'editing',
package/src/index.ts CHANGED
@@ -59,12 +59,16 @@ export const vitalsAndBiometricsDashboardLink =
59
59
 
60
60
  export const weightTile = getAsyncLifecycle(() => import('./components/weight-tile/weight-tile.component'), options);
61
61
 
62
- // t('recordVitalsAndBiometrics', 'Record Vitals and Biometrics')
63
62
  export const vitalsBiometricsFormWorkspace = getAsyncLifecycle(
64
63
  () => import('./vitals-biometrics-form/vitals-biometrics-form.workspace'),
65
64
  options,
66
65
  );
67
66
 
67
+ export const exportedVitalsBiometricsFormWorkspace = getAsyncLifecycle(
68
+ () => import('./vitals-biometrics-form/exported-vitals-biometrics-form.workspace'),
69
+ options,
70
+ );
71
+
68
72
  export const vitalsAndBiometricsDeleteConfirmationModal = getAsyncLifecycle(
69
73
  () => import('./components/delete-vitals-biometrics-modal/delete-vitals-biometrics.modal'),
70
74
  options,
package/src/routes.json CHANGED
@@ -67,11 +67,17 @@
67
67
  }
68
68
  ],
69
69
  "pages": [],
70
- "workspaces": [
70
+ "workspaces2": [
71
71
  {
72
72
  "name": "patient-vitals-biometrics-form-workspace",
73
- "title": "recordVitalsAndBiometrics",
74
- "component": "vitalsBiometricsFormWorkspace"
73
+ "component": "vitalsBiometricsFormWorkspace",
74
+ "window": "patient-vitals-biometrics-form-workspace"
75
+ }
76
+ ],
77
+ "workspaceWindows2": [
78
+ {
79
+ "name": "patient-vitals-biometrics-form-workspace",
80
+ "group": "patient-chart"
75
81
  }
76
82
  ],
77
83
  "modals": [
@@ -8,7 +8,7 @@ dayjs.extend(duration);
8
8
  import { Trans, useTranslation } from 'react-i18next';
9
9
  import { Button, InlineLoading, Tag } from '@carbon/react';
10
10
  import { ArrowRight } from '@carbon/react/icons';
11
- import { ConfigurableLink, formatDate, parseDate, useConfig, useVisit, useWorkspaces } from '@openmrs/esm-framework';
11
+ import { ConfigurableLink, formatDate, parseDate, useConfig, type Visit } from '@openmrs/esm-framework';
12
12
  import {
13
13
  assessValue,
14
14
  getReferenceRangesForConcept,
@@ -24,6 +24,13 @@ import styles from './vitals-header.scss';
24
24
 
25
25
  interface VitalsHeaderProps {
26
26
  patientUuid: string;
27
+ visitContext: Visit;
28
+
29
+ /**
30
+ * custom function to launch the vitals form. Use this in places outside of the patient chart
31
+ * to launch the exported vitals form.
32
+ */
33
+ launchCustomVitalsForm?: () => void;
27
34
 
28
35
  /**
29
36
  * This is useful for extensions slots using the Vitals Header
@@ -31,7 +38,12 @@ interface VitalsHeaderProps {
31
38
  hideLinks?: boolean;
32
39
  }
33
40
 
34
- const VitalsHeader: React.FC<VitalsHeaderProps> = ({ patientUuid, hideLinks = false }) => {
41
+ const VitalsHeader: React.FC<VitalsHeaderProps> = ({
42
+ patientUuid,
43
+ visitContext,
44
+ launchCustomVitalsForm,
45
+ hideLinks = false,
46
+ }) => {
35
47
  const { t } = useTranslation();
36
48
  const config = useConfig<ConfigObject>();
37
49
  const { conceptUnits } = useConceptUnits();
@@ -40,10 +52,7 @@ const VitalsHeader: React.FC<VitalsHeaderProps> = ({ patientUuid, hideLinks = fa
40
52
  const latestVitals = vitals?.[0];
41
53
  const [showDetailsPanel, setShowDetailsPanel] = useState(false);
42
54
  const toggleDetailsPanel = () => setShowDetailsPanel(!showDetailsPanel);
43
- const { activeVisit } = useVisit(patientUuid);
44
- const { workspaces } = useWorkspaces();
45
-
46
- const isWorkspaceOpen = useCallback(() => Boolean(workspaces?.length), [workspaces]);
55
+ const isActiveVisit = Boolean(visitContext && !visitContext.stopDatetime);
47
56
  const launchForm = useLaunchVitalsAndBiometricsForm(patientUuid);
48
57
 
49
58
  const launchVitalsAndBiometricsForm = useCallback(
@@ -61,11 +70,10 @@ const VitalsHeader: React.FC<VitalsHeaderProps> = ({ patientUuid, hideLinks = fa
61
70
  }
62
71
 
63
72
  if (latestVitals && Object.keys(latestVitals)?.length && conceptRanges?.length) {
64
- const hasActiveVisit = Boolean(activeVisit?.uuid);
65
73
  const now = dayjs();
66
74
  const vitalsTakenTimeAgo = dayjs.duration(now.diff(latestVitals?.date));
67
75
  const vitalsOverdueThresholdHours = config.vitals.vitalsOverdueThresholdHours;
68
- const areVitalsOverdue = hasActiveVisit && vitalsTakenTimeAgo.asHours() >= vitalsOverdueThresholdHours;
76
+ const areVitalsOverdue = isActiveVisit && vitalsTakenTimeAgo.asHours() >= vitalsOverdueThresholdHours;
69
77
  const vitalsOverdueDayCount = Math.round(vitalsTakenTimeAgo.asDays());
70
78
  const hoursSinceVitalsTaken = Math.round(vitalsTakenTimeAgo.asHours());
71
79
  let overdueVitalsTagContent: React.ReactNode = null;
@@ -139,7 +147,7 @@ const VitalsHeader: React.FC<VitalsHeaderProps> = ({ patientUuid, hideLinks = fa
139
147
  className={styles.recordVitalsButton}
140
148
  data-openmrs-role="Record Vitals"
141
149
  kind="ghost"
142
- onClick={launchVitalsAndBiometricsForm}
150
+ onClick={launchCustomVitalsForm ?? launchVitalsAndBiometricsForm}
143
151
  size="sm"
144
152
  >
145
153
  {t('recordVitals', 'Record vitals')}
@@ -148,11 +156,7 @@ const VitalsHeader: React.FC<VitalsHeaderProps> = ({ patientUuid, hideLinks = fa
148
156
  </div>
149
157
  )}
150
158
  </div>
151
- <div
152
- className={classNames(styles.rowContainer, {
153
- [styles.workspaceOpen]: isWorkspaceOpen(),
154
- })}
155
- >
159
+ <div className={styles.rowContainer}>
156
160
  <div className={styles.row}>
157
161
  <VitalsHeaderItem
158
162
  interpretation={interpretBloodPressure(
@@ -55,19 +55,12 @@
55
55
  }
56
56
 
57
57
  .row {
58
- display: flex;
59
58
  justify-content: space-between;
60
59
  align-items: center;
61
60
  max-width: 100vw;
62
- }
63
-
64
- :global(.omrs-breakpoint-lt-desktop),
65
- .workspaceOpen {
66
- .row {
67
- display: grid;
68
- grid-template-columns: repeat(4, minmax(0, 1fr));
69
- column-gap: layout.$spacing-11;
70
- }
61
+ display: grid;
62
+ grid-template-columns: repeat(4, minmax(0, 1fr));
63
+ column-gap: layout.$spacing-11;
71
64
  }
72
65
 
73
66
  .loading {
@@ -2,15 +2,15 @@ import React from 'react';
2
2
  import dayjs from 'dayjs';
3
3
  import { screen } from '@testing-library/react';
4
4
  import userEvent from '@testing-library/user-event';
5
- import {
6
- type WorkspacesInfo,
7
- getDefaultsFromConfigSchema,
8
- useConfig,
9
- useVisit,
10
- useWorkspaces,
11
- } from '@openmrs/esm-framework';
5
+ import { getDefaultsFromConfigSchema, useConfig, useVisit } from '@openmrs/esm-framework';
12
6
  import { mockPatient, getByTextWithMarkup, renderWithSwr, waitForLoadingToFinish } from 'tools';
13
- import { formattedVitals, mockConceptUnits, mockVisit, mockVitalsConceptMetadata, mockVitalsConfig } from '__mocks__';
7
+ import {
8
+ formattedVitals,
9
+ mockConceptUnits,
10
+ mockOngoingVisitWithEncounters,
11
+ mockVitalsConceptMetadata,
12
+ mockVitalsConfig,
13
+ } from '__mocks__';
14
14
  import { configSchema, type ConfigObject } from '../config-schema';
15
15
  import { type PatientVitalsAndBiometrics, useVitalsAndBiometrics } from '../common';
16
16
  import VitalsHeader from './vitals-header.extension';
@@ -18,14 +18,12 @@ import VitalsHeader from './vitals-header.extension';
18
18
  const testProps = {
19
19
  patientUuid: mockPatient.id,
20
20
  showRecordVitalsButton: true,
21
+ visitContext: mockOngoingVisitWithEncounters,
21
22
  };
22
23
 
23
24
  const mockUseConfig = jest.mocked(useConfig<ConfigObject>);
24
25
  const mockUseVitalsAndBiometrics = jest.mocked(useVitalsAndBiometrics);
25
- const mockUseWorkspaces = jest.mocked(useWorkspaces);
26
- const mockUseVisit = jest.mocked(useVisit);
27
26
 
28
- mockUseWorkspaces.mockReturnValue({ workspaces: [] } as WorkspacesInfo);
29
27
  const mockLaunchWorkspaceRequiringVisit = jest.fn();
30
28
  const mockUseLaunchWorkspaceRequiringVisit = jest.fn().mockImplementation((name) => {
31
29
  return () => mockLaunchWorkspaceRequiringVisit(name);
@@ -76,7 +74,6 @@ describe('VitalsHeader', () => {
76
74
  });
77
75
 
78
76
  it('renders the most recently recorded values in the vitals header', async () => {
79
- mockUseVisit.mockReturnValueOnce({ activeVisit: mockVisit } as ReturnType<typeof useVisit>);
80
77
  mockUseVitalsAndBiometrics.mockReturnValue({
81
78
  data: [
82
79
  {
@@ -130,7 +127,6 @@ describe('VitalsHeader', () => {
130
127
  });
131
128
 
132
129
  it('displays correct overdue tag for vitals 5 days old', async () => {
133
- mockUseVisit.mockReturnValueOnce({ activeVisit: mockVisit } as ReturnType<typeof useVisit>);
134
130
  const fiveDaysAgo = dayjs().subtract(5, 'days').toISOString();
135
131
  const vitalsData = [
136
132
  {