@openmrs/esm-patient-immunizations-app 5.0.1-pre.2016 → 5.0.1-pre.2021
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/turbo-build.log +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js.buildmanifest.json +2 -2
- package/dist/routes.json +1 -1
- package/jest.config.js +3 -0
- package/package.json +6 -3
- package/src/__mocks__/immunizations.mock.ts +432 -0
- package/src/immunizations/immunizations-overview.test.tsx +7 -6
- package/tsconfig.json +1 -1
- package/src/immunizations/immunization-mapper.test.outdated.ts +0 -310
- package/src/immunizations/immunizations-detailed-summary.test.outdated.tsx +0 -65
- package/src/immunizations/immunizations-form.test.outdated.tsx +0 -347
- package/src/immunizations/immunizations.resource.test.outdated.tsx +0 -86
- package/src/immunizations/vaccination-row.test.outdated.tsx +0 -101
package/.turbo/turbo-build.log
CHANGED
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e,r,t={6233:(e,r,t)=>{"use strict";var n=t(2870),o=t(4556);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}n.Type.String,n.Type.Array,n.Type.UUID,n.Type.Array,n.Type.String,n.Type.Number;var i,s,l="@openmrs/esm-patient-immunizations-app",u={featureName:"patient-immunizations",moduleName:l};t(3979),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(47),t.e(340),t.e(278),t.e(268),t.e(924),t.e(28)]).then(t.bind(t,8028))}),u),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(47),t.e(340),t.e(278),t.e(268),t.e(924),t.e(444),t.e(187)]).then(t.bind(t,5187))}),u),(0,n.getSyncLifecycle)((0,o.createDashboardLink)((i=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){a(e,r,t[r])}))}return e}({},{slot:"patient-chart-immunizations-dashboard-slot",columns:1,path:"Immunizations",title:"Immunizations"}),s=null!=(s={moduleName:l})?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(s)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(s,e))})),i)),u),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(47),t.e(340),t.e(278),t.e(268),t.e(924),t.e(444),t.e(903)]).then(t.bind(t,1903))}),u)},3979:(e,r,t)=>{var n={"./am.json":[8788,788],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807]};function o(e){if(!t.o(n,e))return Promise.resolve().then((()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}));var r=n[e],o=r[0];return t.e(r[1]).then((()=>t(o)))}o.keys=()=>Object.keys(n),o.id=3979,e.exports=o}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=t,o.c=n,o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((r,t)=>(o.f[t](e,r),r)),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-immunizations-app:",o.l=(t,n,a,i)=>{if(e[t])e[t].push(n);else{var s,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),p=0;p<u.length;p++){var c=u[p];if(c.getAttribute("src")==t||c.getAttribute("data-webpack")==r+a){s=c;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",r+a),s.src=t),e[t]=[n];var f=(r,n)=>{s.onerror=s.onload=null,clearTimeout(m);var o=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),r)return r(n)},m=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{o.S={};var e={},r={};o.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];o.o(o.S,t)||(o.S[t]={});var i=o.S[t],s="@openmrs/esm-patient-immunizations-app",l=(e,r,t,n)=>{var o=i[e]=i[e]||{},a=o[r];(!a||!a.loaded&&(!n!=!a.eager?n:s>a.from))&&(o[r]={get:t,from:s,eager:!!n})},u=[];return"default"===t&&(l("@openmrs/esm-framework","5.0.3-pre.905",(()=>Promise.all([o.e(47),o.e(130),o.e(268)]).then((()=>()=>o(130))))),l("@openmrs/esm-patient-common-lib","5.0.1-pre.
|
|
1
|
+
(()=>{var e,r,t={6233:(e,r,t)=>{"use strict";var n=t(2870),o=t(4556);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}n.Type.String,n.Type.Array,n.Type.UUID,n.Type.Array,n.Type.String,n.Type.Number;var i,s,l="@openmrs/esm-patient-immunizations-app",u={featureName:"patient-immunizations",moduleName:l};t(3979),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(47),t.e(340),t.e(278),t.e(268),t.e(924),t.e(28)]).then(t.bind(t,8028))}),u),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(47),t.e(340),t.e(278),t.e(268),t.e(924),t.e(444),t.e(187)]).then(t.bind(t,5187))}),u),(0,n.getSyncLifecycle)((0,o.createDashboardLink)((i=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){a(e,r,t[r])}))}return e}({},{slot:"patient-chart-immunizations-dashboard-slot",columns:1,path:"Immunizations",title:"Immunizations"}),s=null!=(s={moduleName:l})?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(s)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(s,e))})),i)),u),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(47),t.e(340),t.e(278),t.e(268),t.e(924),t.e(444),t.e(903)]).then(t.bind(t,1903))}),u)},3979:(e,r,t)=>{var n={"./am.json":[8788,788],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807]};function o(e){if(!t.o(n,e))return Promise.resolve().then((()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}));var r=n[e],o=r[0];return t.e(r[1]).then((()=>t(o)))}o.keys=()=>Object.keys(n),o.id=3979,e.exports=o}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=t,o.c=n,o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((r,t)=>(o.f[t](e,r),r)),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-immunizations-app:",o.l=(t,n,a,i)=>{if(e[t])e[t].push(n);else{var s,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),p=0;p<u.length;p++){var c=u[p];if(c.getAttribute("src")==t||c.getAttribute("data-webpack")==r+a){s=c;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",r+a),s.src=t),e[t]=[n];var f=(r,n)=>{s.onerror=s.onload=null,clearTimeout(m);var o=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),r)return r(n)},m=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{o.S={};var e={},r={};o.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];o.o(o.S,t)||(o.S[t]={});var i=o.S[t],s="@openmrs/esm-patient-immunizations-app",l=(e,r,t,n)=>{var o=i[e]=i[e]||{},a=o[r];(!a||!a.loaded&&(!n!=!a.eager?n:s>a.from))&&(o[r]={get:t,from:s,eager:!!n})},u=[];return"default"===t&&(l("@openmrs/esm-framework","5.0.3-pre.905",(()=>Promise.all([o.e(47),o.e(130),o.e(268)]).then((()=>()=>o(130))))),l("@openmrs/esm-patient-common-lib","5.0.1-pre.2021",(()=>Promise.all([o.e(47),o.e(340),o.e(268),o.e(924),o.e(444),o.e(230),o.e(7)]).then((()=>()=>o(9230))))),l("react-i18next","11.18.6",(()=>Promise.all([o.e(588),o.e(268)]).then((()=>()=>o(6588))))),l("react-router-dom","6.4.3",(()=>Promise.all([o.e(591),o.e(268)]).then((()=>()=>o(6591))))),l("react","18.2.0",(()=>o.e(784).then((()=>()=>o(2784))))),l("rxjs","6.6.7",(()=>o.e(442).then((()=>()=>o(2442)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e=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},r=e=>{var t=e[0],n="";if(1===e.length)return"*";if(t+.5){n+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var o=1,a=1;a<e.length;a++)o--,n+="u"==(typeof(s=e[a]))[0]?"-":(o>0?".":"")+(o=2,s);return n}var i=[];for(a=1;a<e.length;a++){var s=e[a];i.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?i.pop()+" "+i.pop():r(s))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},t=(r,n)=>{if(0 in r){n=e(n);var o=r[0],a=o<0;a&&(o=-o-1);for(var i=0,s=1,l=!0;;s++,i++){var u,p,c=s<r.length?(typeof r[s])[0]:"";if(i>=n.length||"o"==(p=(typeof(u=n[i]))[0]))return!l||("u"==c?s>o&&!a:""==c!=a);if("u"==p){if(!l||"u"!=c)return!1}else if(l)if(c==p)if(s<=o){if(u!=r[s])return!1}else{if(a?u>r[s]:u<r[s])return!1;u!=r[s]&&(l=!1)}else if("s"!=c&&"n"!=c){if(a||s<=o)return!1;l=!1,s--}else{if(s<=o||p<c!=a)return!1;l=!1}else"s"!=c&&"n"!=c&&(l=!1,s--)}}var f=[],m=f.pop.bind(f);for(i=1;i<r.length;i++){var d=r[i];f.push(1==d?m()|m():2==d?m()&m():d?t(d,n):!m())}return!!m()},n=(r,t)=>{var n=r[t];return Object.keys(n).reduce(((r,t)=>!r||!n[r].loaded&&((r,t)=>{r=e(r),t=e(t);for(var n=0;;){if(n>=r.length)return n<t.length&&"u"!=(typeof t[n])[0];var o=r[n],a=(typeof o)[0];if(n>=t.length)return"u"==a;var i=t[n],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}})(r,t)?t:r),0)},a=(e,o,a,l)=>{var u=n(e,a);return t(l,u)||i(((e,t,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[t][n].from)+" of shared singleton module "+t+" (required "+r(o)+")")(e,a,u,l)),s(e[a][u])},i=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},s=e=>(e.loaded=1,e.get()),l=e=>function(r,t,n,a){var i=o.I(r);return i&&i.then?i.then(e.bind(e,r,o.S[r],t,n,a)):e(r,o.S[r],t,n,a)},u=l(((e,r,t,a)=>r&&o.o(r,t)?((e,r,t,o)=>{var a=n(e,t);return s(e[t][a])})(r,0,t):a())),p=l(((e,r,t,n,i)=>r&&o.o(r,t)?a(r,0,t,n):i())),c={},f={268:()=>p("default","react",[1,18],(()=>o.e(784).then((()=>()=>o(2784))))),4924:()=>p("default","react-i18next",[1,11],(()=>o.e(588).then((()=>()=>o(6588))))),2444:()=>p("default","rxjs",[1,6],(()=>o.e(442).then((()=>()=>o(2442))))),6081:()=>u("default","@openmrs/esm-framework/src/internal",(()=>o.e(130).then((()=>()=>o(130))))),8744:()=>p("default","react-router-dom",[1,6],(()=>o.e(591).then((()=>()=>o(6591))))),2870:()=>p("default","@openmrs/esm-framework",[1,5],(()=>Promise.all([o.e(47),o.e(130),o.e(268)]).then((()=>()=>o(130))))),4556:()=>p("default","@openmrs/esm-patient-common-lib",[1,5],(()=>Promise.all([o.e(47),o.e(340),o.e(268),o.e(924),o.e(444),o.e(230)]).then((()=>()=>o(9230)))))};[2870,4556].forEach((e=>{o.m[e]=r=>{c[e]=0,delete o.c[e];var t=f[e]();if("function"!=typeof t)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=t()}}));var m={7:[2870,4556],230:[6081,8744],268:[268],444:[2444],924:[4924]};o.f.consumes=(e,r)=>{o.o(m,e)&&m[e].forEach((e=>{if(o.o(c,e))return r.push(c[e]);var t=r=>{c[e]=0,o.m[e]=t=>{delete o.c[e],t.exports=r()}},n=r=>{delete c[e],o.m[e]=t=>{throw delete o.c[e],r}};try{var a=f[e]();a.then?r.push(c[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}))}})(),(()=>{var e={179:0,7:0,233:0};o.f.j=(r,t)=>{var n=o.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(268|444|7|924)$/.test(r))e[r]=0;else{var a=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=a);var i=o.p+o.u(r),s=new Error;o.l(i,(t=>{if(o.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;s.message="Loading chunk "+r+" failed.\n("+a+": "+i+")",s.name="ChunkLoadError",s.type=a,s.request=i,n[1](s)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[i,s,l]=t,u=0;if(i.some((r=>0!==e[r]))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);l&&l(o)}for(r&&r(t);u<i.length;u++)a=i[u],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),o.nc=void 0,o(6233)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_patient_immunizations_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,d,f,m,c,h,v,g,b={6278:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(7),t.e(233)]).then((()=>()=>t(6233)))},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})}},y={};function w(e){var r=y[e];if(void 0!==r)return r.exports;var t=y[e]={id:e,loaded:!1,exports:{}};return b[e].call(t.exports,t,t.exports,w),t.loaded=!0,t.exports}w.m=b,w.c=y,w.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return w.d(r,{a:r}),r},w.d=(e,r)=>{for(var t in r)w.o(r,t)&&!w.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},w.f={},w.e=e=>Promise.all(Object.keys(w.f).reduce(((r,t)=>(w.f[t](e,r),r)),[])),w.u=e=>e+".js",w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),w.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),w.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-immunizations-app:",w.l=(t,n,o,a)=>{if(e[t])e[t].push(n);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")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,w.nc&&i.setAttribute("nonce",w.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(f);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),s&&document.head.appendChild(i)}},w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},w.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{w.S={};var e={},r={};w.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];w.o(w.S,t)||(w.S[t]={});var a=w.S[t],i="@openmrs/esm-patient-immunizations-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","5.0.3-pre.905",(()=>Promise.all([w.e(47),w.e(130),w.e(268)]).then((()=>()=>w(130))))),s("@openmrs/esm-patient-common-lib","5.0.1-pre.
|
|
1
|
+
var _openmrs_esm_patient_immunizations_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,d,f,m,c,h,v,g,b={6278:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(7),t.e(233)]).then((()=>()=>t(6233)))},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})}},y={};function w(e){var r=y[e];if(void 0!==r)return r.exports;var t=y[e]={id:e,loaded:!1,exports:{}};return b[e].call(t.exports,t,t.exports,w),t.loaded=!0,t.exports}w.m=b,w.c=y,w.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return w.d(r,{a:r}),r},w.d=(e,r)=>{for(var t in r)w.o(r,t)&&!w.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},w.f={},w.e=e=>Promise.all(Object.keys(w.f).reduce(((r,t)=>(w.f[t](e,r),r)),[])),w.u=e=>e+".js",w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),w.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),w.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-immunizations-app:",w.l=(t,n,o,a)=>{if(e[t])e[t].push(n);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")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,w.nc&&i.setAttribute("nonce",w.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(f);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),s&&document.head.appendChild(i)}},w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},w.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{w.S={};var e={},r={};w.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];w.o(w.S,t)||(w.S[t]={});var a=w.S[t],i="@openmrs/esm-patient-immunizations-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","5.0.3-pre.905",(()=>Promise.all([w.e(47),w.e(130),w.e(268)]).then((()=>()=>w(130))))),s("@openmrs/esm-patient-common-lib","5.0.1-pre.2021",(()=>Promise.all([w.e(47),w.e(340),w.e(268),w.e(924),w.e(444),w.e(230),w.e(7)]).then((()=>()=>w(9230))))),s("react-i18next","11.18.6",(()=>Promise.all([w.e(588),w.e(268)]).then((()=>()=>w(6588))))),s("react-router-dom","6.4.3",(()=>Promise.all([w.e(591),w.e(268)]).then((()=>()=>w(6591))))),s("react","18.2.0",(()=>w.e(784).then((()=>()=>w(2784))))),s("rxjs","6.6.7",(()=>w.e(442).then((()=>()=>w(2442)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;w.g.importScripts&&(e=w.g.location+"");var r=w.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),w.p=e})(),t=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},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=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,a=1;a<e.length;a++)n--,t+="u"==(typeof(s=e[a]))[0]?"-":(n>0?".":"")+(n=2,s);return t}var i=[];for(a=1;a<e.length;a++){var s=e[a];i.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?i.pop()+" "+i.pop():o(s))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,s=1,l=!0;;s++,i++){var u,p,d=s<e.length?(typeof e[s])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!l||("u"==d?s>n&&!o:""==d!=o);if("u"==p){if(!l||"u"!=d)return!1}else if(l)if(d==p)if(s<=n){if(u!=e[s])return!1}else{if(o?u>e[s]:u<e[s])return!1;u!=e[s]&&(l=!1)}else if("s"!=d&&"n"!=d){if(o||s<=n)return!1;l=!1,s--}else{if(s<=n||p<d!=o)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,s--)}}var f=[],m=f.pop.bind(f);for(i=1;i<e.length;i++){var c=e[i];f.push(1==c?m()|m():2==c?m()&m():c?a(c,r):!m())}return!!m()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},s=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",l=(e,r,t,n)=>{var o=i(e,t);return d(e[t][o])},u=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||p(s(e,t,o,n)),d(e[t][o])},p=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},d=e=>(e.loaded=1,e.get()),m=(f=e=>function(r,t,n,o){var a=w.I(r);return a&&a.then?a.then(e.bind(e,r,w.S[r],t,n,o)):e(r,w.S[r],t,n,o)})(((e,r,t,n)=>r&&w.o(r,t)?l(r,0,t):n())),c=f(((e,r,t,n,o)=>r&&w.o(r,t)?u(r,0,t,n):o())),h={},v={268:()=>c("default","react",[1,18],(()=>w.e(784).then((()=>()=>w(2784))))),4924:()=>c("default","react-i18next",[1,11],(()=>w.e(588).then((()=>()=>w(6588))))),2444:()=>c("default","rxjs",[1,6],(()=>w.e(442).then((()=>()=>w(2442))))),6081:()=>m("default","@openmrs/esm-framework/src/internal",(()=>w.e(130).then((()=>()=>w(130))))),8744:()=>c("default","react-router-dom",[1,6],(()=>w.e(591).then((()=>()=>w(6591))))),2870:()=>c("default","@openmrs/esm-framework",[1,5],(()=>Promise.all([w.e(47),w.e(130),w.e(268)]).then((()=>()=>w(130))))),4556:()=>c("default","@openmrs/esm-patient-common-lib",[1,5],(()=>Promise.all([w.e(47),w.e(340),w.e(268),w.e(924),w.e(444),w.e(230)]).then((()=>()=>w(9230)))))},g={7:[2870,4556],230:[6081,8744],268:[268],444:[2444],924:[4924]},w.f.consumes=(e,r)=>{w.o(g,e)&&g[e].forEach((e=>{if(w.o(h,e))return r.push(h[e]);var t=r=>{h[e]=0,w.m[e]=t=>{delete w.c[e],t.exports=r()}},n=r=>{delete h[e],w.m[e]=t=>{throw delete w.c[e],r}};try{var o=v[e]();o.then?r.push(h[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={537:0};w.f.j=(r,t)=>{var n=w.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(268|444|7|924)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=w.p+w.u(r),i=new Error;w.l(a,(t=>{if(w.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)w.o(i,n)&&(w.m[n]=i[n]);s&&s(w)}for(r&&r(t);l<a.length;l++)o=a[l],w.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),w.nc=void 0;var _=w(6278);_openmrs_esm_patient_immunizations_app=_})();
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"auxiliaryFiles": [
|
|
125
125
|
"main.js.map"
|
|
126
126
|
],
|
|
127
|
-
"hash": "
|
|
127
|
+
"hash": "f4c04625fe48254e",
|
|
128
128
|
"childrenByOrder": {}
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"auxiliaryFiles": [
|
|
370
370
|
"openmrs-esm-patient-immunizations-app.js.map"
|
|
371
371
|
],
|
|
372
|
-
"hash": "
|
|
372
|
+
"hash": "8cd4e75d847cb4fe",
|
|
373
373
|
"childrenByOrder": {}
|
|
374
374
|
},
|
|
375
375
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"immunization-overview-widget","component":"immunizationsOverview","meta":{"columnSpan":4},"order":8},{"name":"immunization-details-widget","component":"immunizationsDetailedSummary","slot":"patient-chart-immunizations-dashboard-slot","meta":{"columnSpan":1}},{"name":"immunization-summary-dashboard","component":"immunizationsDashboardLink","slot":"patient-chart-dashboard-slot","meta":{"slot":"patient-chart-immunizations-dashboard-slot","columns":1,"path":"Immunizations"},"order":8},{"name":"immunization-form-workspace","component":"immunizationsForm","meta":{"title":"Immunization Form"}}],"pages":[],"version":"5.0.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"immunization-overview-widget","component":"immunizationsOverview","meta":{"columnSpan":4},"order":8},{"name":"immunization-details-widget","component":"immunizationsDetailedSummary","slot":"patient-chart-immunizations-dashboard-slot","meta":{"columnSpan":1}},{"name":"immunization-summary-dashboard","component":"immunizationsDashboardLink","slot":"patient-chart-dashboard-slot","meta":{"slot":"patient-chart-immunizations-dashboard-slot","columns":1,"path":"Immunizations"},"order":8},{"name":"immunization-form-workspace","component":"immunizationsForm","meta":{"title":"Immunization Form"}}],"pages":[],"version":"5.0.1-pre.2021"}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-immunizations-app",
|
|
3
|
-
"version": "5.0.1-pre.
|
|
3
|
+
"version": "5.0.1-pre.2021",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Patient immunizations microfrontend for the OpenMRS SPA",
|
|
6
6
|
"browser": "dist/openmrs-esm-patient-immunizations-app.js",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"build": "webpack --mode production",
|
|
14
14
|
"analyze": "webpack --mode=production --env analyze=true",
|
|
15
15
|
"lint": "cross-env TIMING=1 eslint src --ext tsx,ts --fix --max-warnings=0",
|
|
16
|
+
"test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests",
|
|
17
|
+
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js",
|
|
18
|
+
"coverage": "yarn test --coverage",
|
|
16
19
|
"typescript": "tsc",
|
|
17
20
|
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
|
|
18
21
|
},
|
|
@@ -35,7 +38,7 @@
|
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
40
|
"@carbon/react": "^1.12.0",
|
|
38
|
-
"@openmrs/esm-patient-common-lib": "^5.0.1-pre.
|
|
41
|
+
"@openmrs/esm-patient-common-lib": "^5.0.1-pre.2021",
|
|
39
42
|
"lodash-es": "^4.17.15"
|
|
40
43
|
},
|
|
41
44
|
"peerDependencies": {
|
|
@@ -50,5 +53,5 @@
|
|
|
50
53
|
"devDependencies": {
|
|
51
54
|
"webpack": "^5.74.0"
|
|
52
55
|
},
|
|
53
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "46896996edbc115740a8ab7ba0b759877ae4d15f"
|
|
54
57
|
}
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import type { FHIRImmunizationBundle } from '../immunizations/immunization-domain';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
|
|
4
|
+
export const mockImmunizationConfig = {
|
|
5
|
+
immunizationsConfig: {
|
|
6
|
+
vaccinesConceptSet: 'vaccinationsUuid',
|
|
7
|
+
sequenceDefinitions: [
|
|
8
|
+
{
|
|
9
|
+
vaccineConceptUuid: 'RotavirusUuid',
|
|
10
|
+
sequences: [
|
|
11
|
+
{
|
|
12
|
+
sequenceLabel: 'dose-1',
|
|
13
|
+
sequenceNumber: '1',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
sequenceLabel: 'dose-2',
|
|
17
|
+
sequenceNumber: '2',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
sequenceLabel: 'booster-1',
|
|
21
|
+
sequenceNumber: '11',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
vaccineConceptUuid: 'PolioUuid',
|
|
27
|
+
sequences: [
|
|
28
|
+
{
|
|
29
|
+
sequenceLabel: '2 Months',
|
|
30
|
+
sequenceNumber: '1',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
sequenceLabel: '6 Months',
|
|
34
|
+
sequenceNumber: '2',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
sequenceLabel: '8 Months',
|
|
38
|
+
sequenceNumber: '2',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const mockVaccinesConceptSet = {
|
|
47
|
+
setMembers: [
|
|
48
|
+
{
|
|
49
|
+
uuid: 'RotavirusUuid',
|
|
50
|
+
display: 'Rotavirus',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
uuid: 'PolioUuid',
|
|
54
|
+
display: 'Polio',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
uuid: 'InfluenzaUuid',
|
|
58
|
+
display: 'Influenza',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
uuid: 'AdinovirusUuid',
|
|
62
|
+
display: 'Adinovirus',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const mockPatientImmunization = {
|
|
68
|
+
resourceType: 'Immunization',
|
|
69
|
+
id: 'protocol',
|
|
70
|
+
uuid: 'b9c21a82-aed3-11ea-b3de-0242ac130004',
|
|
71
|
+
vaccineCode: {
|
|
72
|
+
coding: [
|
|
73
|
+
{
|
|
74
|
+
system: '',
|
|
75
|
+
code: '104',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
text: 'Rotavirus',
|
|
79
|
+
},
|
|
80
|
+
patient: {
|
|
81
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
82
|
+
},
|
|
83
|
+
encounter: {
|
|
84
|
+
reference: 'Encounter/example',
|
|
85
|
+
},
|
|
86
|
+
occurrenceDateTime: '2018-06-18',
|
|
87
|
+
location: {
|
|
88
|
+
reference: 'Location/1',
|
|
89
|
+
},
|
|
90
|
+
manufacturer: {
|
|
91
|
+
reference: 'Organization/hl7',
|
|
92
|
+
},
|
|
93
|
+
lotNumber: 'PT123F',
|
|
94
|
+
expirationDate: '2018-12-15',
|
|
95
|
+
protocolApplied: [
|
|
96
|
+
{
|
|
97
|
+
series: '2 Months',
|
|
98
|
+
occurrenceDateTime: '2018-06-18',
|
|
99
|
+
doseNumberPositiveInt: 1,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
series: '4 Months',
|
|
103
|
+
occurrenceDateTime: '2018-09-21',
|
|
104
|
+
doseNumberPositiveInt: 2,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const mockPatientImmunizationsSearchResponse: FHIRImmunizationBundle = {
|
|
110
|
+
resourceType: 'Bundle',
|
|
111
|
+
entry: [
|
|
112
|
+
{
|
|
113
|
+
fullUrl: '',
|
|
114
|
+
resource: {
|
|
115
|
+
resourceType: 'Immunization',
|
|
116
|
+
id: 'b9c21a82-aed3-11ea-b3de-0242ac130001',
|
|
117
|
+
vaccineCode: {
|
|
118
|
+
coding: [
|
|
119
|
+
{
|
|
120
|
+
code: 'RotavirusUuid',
|
|
121
|
+
display: 'Rotavirus',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
status: 'completed',
|
|
126
|
+
patient: {
|
|
127
|
+
type: 'Patient',
|
|
128
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
129
|
+
},
|
|
130
|
+
encounter: {
|
|
131
|
+
type: 'Encounter',
|
|
132
|
+
reference: 'Encounter/Example',
|
|
133
|
+
},
|
|
134
|
+
location: {
|
|
135
|
+
type: 'Location',
|
|
136
|
+
reference: 'Location/1',
|
|
137
|
+
},
|
|
138
|
+
performer: [{ actor: { type: 'Practitioner', reference: 'Practitioner/12334' } }],
|
|
139
|
+
occurrenceDateTime: dayjs('2018-09-21').toDate(),
|
|
140
|
+
expirationDate: dayjs('2025-12-15').toDate(),
|
|
141
|
+
manufacturer: {
|
|
142
|
+
display: 'Organization/hl7',
|
|
143
|
+
},
|
|
144
|
+
lotNumber: '12345',
|
|
145
|
+
protocolApplied: [
|
|
146
|
+
{
|
|
147
|
+
series: '4 Months',
|
|
148
|
+
doseNumberPositiveInt: 2,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
fullUrl: '',
|
|
155
|
+
resource: {
|
|
156
|
+
resourceType: 'Immunization',
|
|
157
|
+
id: 'b9c21a82-aed3-11ea-b3de-0242ac130001',
|
|
158
|
+
vaccineCode: {
|
|
159
|
+
coding: [
|
|
160
|
+
{
|
|
161
|
+
code: 'RotavirusUuid',
|
|
162
|
+
display: 'Rotavirus',
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
status: 'completed',
|
|
167
|
+
patient: {
|
|
168
|
+
type: 'Patient',
|
|
169
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
170
|
+
},
|
|
171
|
+
encounter: {
|
|
172
|
+
type: 'Encounter',
|
|
173
|
+
reference: 'Encounter/Example',
|
|
174
|
+
},
|
|
175
|
+
location: {
|
|
176
|
+
type: 'Location',
|
|
177
|
+
reference: 'Location/1',
|
|
178
|
+
},
|
|
179
|
+
performer: [{ actor: { type: 'Practitioner', reference: 'Practitioner/12334' } }],
|
|
180
|
+
occurrenceDateTime: dayjs('2018-06-18').toDate(),
|
|
181
|
+
expirationDate: dayjs('2025-12-15').toDate(),
|
|
182
|
+
manufacturer: {
|
|
183
|
+
display: 'Organization/hl7',
|
|
184
|
+
},
|
|
185
|
+
lotNumber: '12345',
|
|
186
|
+
protocolApplied: [
|
|
187
|
+
{
|
|
188
|
+
series: '2 Months',
|
|
189
|
+
doseNumberPositiveInt: 1,
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
fullUrl: '',
|
|
196
|
+
resource: {
|
|
197
|
+
resourceType: 'Immunization',
|
|
198
|
+
id: 'b9c21d5c-aed3-11ea-b3de-0242ac130002',
|
|
199
|
+
vaccineCode: {
|
|
200
|
+
coding: [
|
|
201
|
+
{
|
|
202
|
+
code: 'PolioUuid',
|
|
203
|
+
display: 'Polio',
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
status: 'completed',
|
|
208
|
+
patient: {
|
|
209
|
+
type: 'Patient',
|
|
210
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
211
|
+
},
|
|
212
|
+
encounter: {
|
|
213
|
+
type: 'Encounter',
|
|
214
|
+
reference: 'Encounter/Example',
|
|
215
|
+
},
|
|
216
|
+
location: {
|
|
217
|
+
type: 'Location',
|
|
218
|
+
reference: 'Location/1',
|
|
219
|
+
},
|
|
220
|
+
performer: [{ actor: { type: 'Practitioner', reference: 'Practitioner/12334' } }],
|
|
221
|
+
manufacturer: {
|
|
222
|
+
display: 'Organization/hl7',
|
|
223
|
+
},
|
|
224
|
+
lotNumber: '12345',
|
|
225
|
+
occurrenceDateTime: dayjs('2018-05-21').toDate(),
|
|
226
|
+
expirationDate: dayjs('2025-12-15').toDate(),
|
|
227
|
+
protocolApplied: [
|
|
228
|
+
{
|
|
229
|
+
series: '2 Months',
|
|
230
|
+
doseNumberPositiveInt: 1,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
fullUrl: '',
|
|
237
|
+
resource: {
|
|
238
|
+
resourceType: 'Immunization',
|
|
239
|
+
id: 'b9c21d5c-aed3-11ea-b3de-0242ac130002',
|
|
240
|
+
vaccineCode: {
|
|
241
|
+
coding: [
|
|
242
|
+
{
|
|
243
|
+
code: 'PolioUuid',
|
|
244
|
+
display: 'Polio',
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
status: 'completed',
|
|
249
|
+
patient: {
|
|
250
|
+
type: 'Patient',
|
|
251
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
252
|
+
},
|
|
253
|
+
encounter: {
|
|
254
|
+
type: 'Encounter',
|
|
255
|
+
reference: 'Encounter/Example',
|
|
256
|
+
},
|
|
257
|
+
location: {
|
|
258
|
+
type: 'Location',
|
|
259
|
+
reference: 'Location/1',
|
|
260
|
+
},
|
|
261
|
+
performer: [{ actor: { type: 'Practitioner', reference: 'Practitioner/12334' } }],
|
|
262
|
+
manufacturer: {
|
|
263
|
+
display: 'Organization/hl7',
|
|
264
|
+
},
|
|
265
|
+
lotNumber: '1234',
|
|
266
|
+
occurrenceDateTime: dayjs('2018-11-01').toDate(),
|
|
267
|
+
expirationDate: dayjs('2025-12-15').toDate(),
|
|
268
|
+
protocolApplied: [
|
|
269
|
+
{
|
|
270
|
+
series: '4 Months',
|
|
271
|
+
doseNumberPositiveInt: 2,
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
fullUrl: '',
|
|
278
|
+
resource: {
|
|
279
|
+
resourceType: 'Immunization',
|
|
280
|
+
id: 'b9c21e6a-aed3-11ea-b3de-0242ac130003',
|
|
281
|
+
vaccineCode: {
|
|
282
|
+
coding: [
|
|
283
|
+
{
|
|
284
|
+
code: 'InfluenzaUuid',
|
|
285
|
+
display: 'Influenza',
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
status: 'completed',
|
|
290
|
+
patient: {
|
|
291
|
+
type: 'Patient',
|
|
292
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
293
|
+
},
|
|
294
|
+
encounter: {
|
|
295
|
+
type: 'Encounter',
|
|
296
|
+
reference: 'Encounter/Example',
|
|
297
|
+
},
|
|
298
|
+
location: {
|
|
299
|
+
type: 'Location',
|
|
300
|
+
reference: 'Location/1',
|
|
301
|
+
},
|
|
302
|
+
performer: [{ actor: { type: 'Practitioner', reference: 'Practitioner/12334' } }],
|
|
303
|
+
manufacturer: {
|
|
304
|
+
display: 'Organization/hl7',
|
|
305
|
+
},
|
|
306
|
+
lotNumber: '12345',
|
|
307
|
+
occurrenceDateTime: dayjs('2018-05-21').toDate(),
|
|
308
|
+
expirationDate: dayjs('2025-12-15').toDate(),
|
|
309
|
+
protocolApplied: [
|
|
310
|
+
{
|
|
311
|
+
doseNumberPositiveInt: 1,
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
fullUrl: '',
|
|
318
|
+
resource: {
|
|
319
|
+
resourceType: 'Immunization',
|
|
320
|
+
id: 'b9c21e6a-aed3-11ea-b3de-0242ac130003',
|
|
321
|
+
vaccineCode: {
|
|
322
|
+
coding: [
|
|
323
|
+
{
|
|
324
|
+
code: 'InfluenzaUuid',
|
|
325
|
+
display: 'Influenza',
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
status: 'completed',
|
|
330
|
+
patient: {
|
|
331
|
+
type: 'Patient',
|
|
332
|
+
reference: 'Patient/D1A903924D4443A7A388778D77D86155',
|
|
333
|
+
},
|
|
334
|
+
encounter: {
|
|
335
|
+
type: 'Encounter',
|
|
336
|
+
reference: 'Encounter/Example',
|
|
337
|
+
},
|
|
338
|
+
location: {
|
|
339
|
+
type: 'Location',
|
|
340
|
+
reference: 'Location/1',
|
|
341
|
+
},
|
|
342
|
+
performer: [{ actor: { type: 'Practitioner', reference: 'Practitioner/12334' } }],
|
|
343
|
+
manufacturer: {
|
|
344
|
+
display: 'Organization/hl7',
|
|
345
|
+
},
|
|
346
|
+
lotNumber: '12345',
|
|
347
|
+
occurrenceDateTime: dayjs('2018-05-21').toDate(),
|
|
348
|
+
expirationDate: dayjs('2025-12-15').toDate(),
|
|
349
|
+
protocolApplied: [
|
|
350
|
+
{
|
|
351
|
+
doseNumberPositiveInt: 1,
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
export const mockPaginatedImmunizations = [
|
|
360
|
+
{
|
|
361
|
+
vaccineName: 'Rotavirus',
|
|
362
|
+
vaccineUuid: 'RotavirusUuid',
|
|
363
|
+
existingDoses: [
|
|
364
|
+
{
|
|
365
|
+
immunizationObsUuid: 'b9c21a82-aed3-11ea-b3de-0242ac130001',
|
|
366
|
+
manufacturer: 'Organization/hl7',
|
|
367
|
+
lotNumber: '12345',
|
|
368
|
+
sequenceLabel: '4 Months',
|
|
369
|
+
sequenceNumber: 2,
|
|
370
|
+
occurrenceDateTime: '2018-09-21',
|
|
371
|
+
expirationDate: '2025-12-15',
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
immunizationObsUuid: 'b9c21a82-aed3-11ea-b3de-0242ac130001',
|
|
375
|
+
manufacturer: 'Organization/hl7',
|
|
376
|
+
lotNumber: '12345',
|
|
377
|
+
sequenceLabel: '2 Months',
|
|
378
|
+
sequenceNumber: 1,
|
|
379
|
+
occurrenceDateTime: '2018-06-18',
|
|
380
|
+
expirationDate: '2025-12-15',
|
|
381
|
+
},
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
vaccineName: 'Polio',
|
|
386
|
+
vaccineUuid: 'PolioUuid',
|
|
387
|
+
existingDoses: [
|
|
388
|
+
{
|
|
389
|
+
immunizationObsUuid: 'b9c21d5c-aed3-11ea-b3de-0242ac130002',
|
|
390
|
+
manufacturer: 'Organization/hl7',
|
|
391
|
+
lotNumber: '1234',
|
|
392
|
+
sequenceLabel: '4 Months',
|
|
393
|
+
sequenceNumber: 2,
|
|
394
|
+
occurrenceDateTime: '2018-11-01',
|
|
395
|
+
expirationDate: '2025-12-15',
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
immunizationObsUuid: 'b9c21d5c-aed3-11ea-b3de-0242ac130002',
|
|
399
|
+
manufacturer: 'Organization/hl7',
|
|
400
|
+
lotNumber: '12345',
|
|
401
|
+
sequenceLabel: '2 Months',
|
|
402
|
+
sequenceNumber: 1,
|
|
403
|
+
occurrenceDateTime: '2018-05-21',
|
|
404
|
+
expirationDate: '2025-12-15',
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
vaccineName: 'Influenza',
|
|
410
|
+
vaccineUuid: 'InfluenzaUuid',
|
|
411
|
+
existingDoses: [
|
|
412
|
+
{
|
|
413
|
+
immunizationObsUuid: 'b9c21e6a-aed3-11ea-b3de-0242ac130003',
|
|
414
|
+
manufacturer: 'Organization/hl7',
|
|
415
|
+
lotNumber: '12345',
|
|
416
|
+
sequenceLabel: undefined,
|
|
417
|
+
sequenceNumber: 1,
|
|
418
|
+
occurrenceDateTime: '2018-05-21',
|
|
419
|
+
expirationDate: '2025-12-15',
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
immunizationObsUuid: 'b9c21e6a-aed3-11ea-b3de-0242ac130003',
|
|
423
|
+
manufacturer: 'Organization/hl7',
|
|
424
|
+
lotNumber: '12345',
|
|
425
|
+
sequenceLabel: undefined,
|
|
426
|
+
sequenceNumber: 1,
|
|
427
|
+
occurrenceDateTime: '2018-05-21',
|
|
428
|
+
expirationDate: '2025-12-15',
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { screen } from '@testing-library/react';
|
|
3
|
-
import {
|
|
4
|
-
mockPatientImmunizationsSearchResponse,
|
|
5
|
-
mockPaginatedImmunizations,
|
|
6
|
-
} from '../../../../__mocks__/immunizations.mock';
|
|
7
|
-
import { patientChartBasePath, renderWithSwr, waitForLoadingToFinish } from '../../../../tools/test-helpers';
|
|
8
|
-
import { mockPatient } from '../../../../__mocks__/patient.mock';
|
|
9
3
|
import { openmrsFetch, usePagination } from '@openmrs/esm-framework';
|
|
4
|
+
import { mockPatientImmunizationsSearchResponse, mockPaginatedImmunizations } from '../__mocks__/immunizations.mock';
|
|
5
|
+
import {
|
|
6
|
+
mockPatient,
|
|
7
|
+
patientChartBasePath,
|
|
8
|
+
renderWithSwr,
|
|
9
|
+
waitForLoadingToFinish,
|
|
10
|
+
} from '../../../../tools/test-helpers';
|
|
10
11
|
import ImmunizationsOverview from './immunizations-overview.component';
|
|
11
12
|
|
|
12
13
|
const testProps = {
|
package/tsconfig.json
CHANGED