@kenyaemr/esm-morgue-app 5.3.7-pre.1361 → 5.3.7-pre.1382

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.
@@ -5,9 +5,9 @@
5
5
  "initial": false,
6
6
  "entry": false,
7
7
  "recorded": false,
8
- "size": 172325,
8
+ "size": 172542,
9
9
  "sizes": {
10
- "javascript": 172325
10
+ "javascript": 172542
11
11
  },
12
12
  "names": [],
13
13
  "idHints": [],
@@ -21,7 +21,7 @@
21
21
  "auxiliaryFiles": [
22
22
  "20.js.map"
23
23
  ],
24
- "hash": "64e18ea1f95ec81d",
24
+ "hash": "9650c2a42f093439",
25
25
  "childrenByOrder": {}
26
26
  },
27
27
  {
@@ -75,6 +75,33 @@
75
75
  "hash": "614a619569bebb3c",
76
76
  "childrenByOrder": {}
77
77
  },
78
+ {
79
+ "rendered": true,
80
+ "initial": false,
81
+ "entry": false,
82
+ "recorded": false,
83
+ "reason": "split chunk (cache group: defaultVendors)",
84
+ "size": 2923932,
85
+ "sizes": {
86
+ "javascript": 2923932
87
+ },
88
+ "names": [],
89
+ "idHints": [
90
+ "vendors"
91
+ ],
92
+ "runtime": [
93
+ "@kenyaemr/esm-morgue-app",
94
+ "main"
95
+ ],
96
+ "files": [
97
+ "149.js"
98
+ ],
99
+ "auxiliaryFiles": [
100
+ "149.js.map"
101
+ ],
102
+ "hash": "84bf2c68e2851f68",
103
+ "childrenByOrder": {}
104
+ },
78
105
  {
79
106
  "rendered": true,
80
107
  "initial": false,
@@ -292,6 +319,33 @@
292
319
  "hash": "1251170012b7bac7",
293
320
  "childrenByOrder": {}
294
321
  },
322
+ {
323
+ "rendered": true,
324
+ "initial": false,
325
+ "entry": false,
326
+ "recorded": false,
327
+ "reason": "split chunk (cache group: defaultVendors)",
328
+ "size": 252938,
329
+ "sizes": {
330
+ "javascript": 252938
331
+ },
332
+ "names": [],
333
+ "idHints": [
334
+ "vendors"
335
+ ],
336
+ "runtime": [
337
+ "@kenyaemr/esm-morgue-app",
338
+ "main"
339
+ ],
340
+ "files": [
341
+ "701.js"
342
+ ],
343
+ "auxiliaryFiles": [
344
+ "701.js.map"
345
+ ],
346
+ "hash": "c4e7240fce53d693",
347
+ "childrenByOrder": {}
348
+ },
295
349
  {
296
350
  "rendered": true,
297
351
  "initial": true,
@@ -317,7 +371,7 @@
317
371
  "auxiliaryFiles": [
318
372
  "main.js.map"
319
373
  ],
320
- "hash": "d32c7bc3ef849c39",
374
+ "hash": "4690e17baddf1b48",
321
375
  "childrenByOrder": {}
322
376
  },
323
377
  {
@@ -352,36 +406,9 @@
352
406
  "initial": false,
353
407
  "entry": false,
354
408
  "recorded": false,
355
- "reason": "split chunk (cache group: defaultVendors)",
356
- "size": 2916772,
357
- "sizes": {
358
- "javascript": 2916772
359
- },
360
- "names": [],
361
- "idHints": [
362
- "vendors"
363
- ],
364
- "runtime": [
365
- "@kenyaemr/esm-morgue-app",
366
- "main"
367
- ],
368
- "files": [
369
- "864.js"
370
- ],
371
- "auxiliaryFiles": [
372
- "864.js.map"
373
- ],
374
- "hash": "c771dbab1bd1a039",
375
- "childrenByOrder": {}
376
- },
377
- {
378
- "rendered": true,
379
- "initial": false,
380
- "entry": false,
381
- "recorded": false,
382
- "size": 93525,
409
+ "size": 93181,
383
410
  "sizes": {
384
- "javascript": 93525
411
+ "javascript": 93181
385
412
  },
386
413
  "names": [],
387
414
  "idHints": [],
@@ -395,7 +422,7 @@
395
422
  "auxiliaryFiles": [
396
423
  "870.js.map"
397
424
  ],
398
- "hash": "1f58e9fda1ec6cba",
425
+ "hash": "86cf470919868f97",
399
426
  "childrenByOrder": {}
400
427
  },
401
428
  {
@@ -491,34 +518,7 @@
491
518
  "auxiliaryFiles": [
492
519
  "926.js.map"
493
520
  ],
494
- "hash": "b06ffc5a6d60a971",
495
- "childrenByOrder": {}
496
- },
497
- {
498
- "rendered": true,
499
- "initial": false,
500
- "entry": false,
501
- "recorded": false,
502
- "reason": "split chunk (cache group: defaultVendors)",
503
- "size": 260098,
504
- "sizes": {
505
- "javascript": 260098
506
- },
507
- "names": [],
508
- "idHints": [
509
- "vendors"
510
- ],
511
- "runtime": [
512
- "@kenyaemr/esm-morgue-app",
513
- "main"
514
- ],
515
- "files": [
516
- "999.js"
517
- ],
518
- "auxiliaryFiles": [
519
- "999.js.map"
520
- ],
521
- "hash": "075f37c00637d642",
521
+ "hash": "5cb88d495cfa1ecf",
522
522
  "childrenByOrder": {}
523
523
  }
524
524
  ]
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e,r,t,n,o={7926:(e,r,t)=>{"use strict";var n=t(1083),o=(n.Type.String,n.Type.Object,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.UUID,t(380)),a=t.n(o),i=t(4441),u=t(8877);function l(e){var r=e.config,t=r.name,l=r.title,s=(0,u.useLocation)(),f=window.getOpenmrsSpaBase()+"home",c=(0,o.useMemo)((function(){return decodeURIComponent((0,i.A)(s.pathname.split("/")))}),[s.pathname]);return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(c)&&(c=s.pathname.split("/").at(-3)),a().createElement(n.ConfigurableLink,{to:f+"/"+t,className:"cds--side-nav__link ".concat(t===c&&"active-left-nav-link")},l)}var s,f={featureName:"esm-morgue-app",moduleName:"@kenyaemr/esm-morgue-app"};t(4767),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(144),t.e(864),t.e(214),t.e(434),t.e(921),t.e(20)]).then(t.bind(t,5020))}),f),(0,n.getSyncLifecycle)((s={name:"morgue",title:"Morgue"},function(){return a().createElement(u.BrowserRouter,null,a().createElement(l,{config:s}))}),f),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(144),t.e(864),t.e(999),t.e(434),t.e(921),t.e(870)]).then(t.bind(t,870))}),f)},4767:(e,r,t)=>{var n={"./en.json":[4300,300]};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=4767,e.exports=o},4441:(e,r,t)=>{"use strict";t.d(r,{A:()=>n});const n=function(e){var r=null==e?0:e.length;return r?e[r-1]:void 0}}},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}i.m=o,i.c=a,i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.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);i.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var u=2&n&&t;"object"==typeof u&&!~e.indexOf(u);u=r(u))Object.getOwnPropertyNames(u).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,i.d(o,a),o},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@kenyaemr/esm-morgue-app:",i.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var u,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var c=s[f];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==n+o){u=c;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.setAttribute("data-webpack",n+o),u.src=e),t[e]=[r];var p=(r,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=p.bind(null,u.onerror),u.onload=p.bind(null,u.onload),l&&document.head.appendChild(u)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},r={};i.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];i.o(i.S,t)||(i.S[t]={});var a=i.S[t],u="@kenyaemr/esm-morgue-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},i=o[r];(!i||!i.loaded&&(!n!=!i.eager?n:u>i.from))&&(o[r]={get:t,from:u,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","5.8.2-pre.2394",(()=>Promise.all([i.e(831),i.e(380)]).then((()=>()=>i(831))))),l("react-i18next","11.18.6",(()=>Promise.all([i.e(380),i.e(225)]).then((()=>()=>i(1225))))),l("react-router-dom","6.26.2",(()=>Promise.all([i.e(144),i.e(913),i.e(380)]).then((()=>()=>i(2913))))),l("react","18.3.1",(()=>i.e(41).then((()=>()=>i(4041))))),l("swr/_internal","2.2.5",(()=>Promise.all([i.e(372),i.e(380)]).then((()=>()=>i(2372))))),l("swr/immutable","2.2.5",(()=>Promise.all([i.e(380),i.e(434),i.e(876)]).then((()=>()=>i(9876)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var r=i.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(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.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(u=e[a]))[0]?"-":(o>0?".":"")+(o=2,u);return n}var i=[];for(a=1;a<e.length;a++){var u=e[a];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():r(u))}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,u=1,l=!0;;u++,i++){var s,f,c=u<r.length?(typeof r[u])[0]:"";if(i>=n.length||"o"==(f=(typeof(s=n[i]))[0]))return!l||("u"==c?u>o&&!a:""==c!=a);if("u"==f){if(!l||"u"!=c)return!1}else if(l)if(c==f)if(u<=o){if(s!=r[u])return!1}else{if(a?s>r[u]:s<r[u])return!1;s!=r[u]&&(l=!1)}else if("s"!=c&&"n"!=c){if(a||u<=o)return!1;l=!1,u--}else{if(u<=o||f<c!=a)return!1;l=!1}else"s"!=c&&"n"!=c&&(l=!1,u--)}}var p=[],d=p.pop.bind(p);for(i=1;i<r.length;i++){var m=r[i];p.push(1==m?d()|d():2==m?d()&d():m?t(m,n):!d())}return!!d()},n=(r,t,n)=>{var o=n?(e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}))(r[t]):r[t];return Object.keys(o).reduce(((r,t)=>!r||!o[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],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}})(r,t)?t:r),0)},o=(e,r,t)=>t?t():((e,r)=>(e=>{throw new Error(e)})("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),a=(e=>function(r,t,n,o,a){var u=i.I(r);return u&&u.then&&!n?u.then(e.bind(e,r,i.S[r],t,!1,o,a)):e(r,i.S[r],t,n,o,a)})(((e,a,u,l,s,f)=>{if(!((e,r)=>e&&i.o(e,r))(a,u))return o(e,u,f);var c,p,d=n(a,u,l);return t(s,d)||(p=((e,t,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[t][n].from)+" of shared singleton module "+t+" (required "+r(o)+")")(a,u,d,s),"undefined"!=typeof console&&console.warn&&console.warn(p)),(c=a[u][d]).loaded=1,c.get()})),u={},l={5434:()=>a("default","swr/_internal",!1,[1,2],(()=>i.e(372).then((()=>()=>i(2372))))),3150:()=>a("default","react-i18next",!1,[1,11],(()=>i.e(606).then((()=>()=>i(1225))))),8010:()=>a("default","swr/immutable",!1,[1,2],(()=>i.e(495).then((()=>()=>i(9876))))),380:()=>a("default","react",!1,[1,18,1,0],(()=>i.e(41).then((()=>()=>i(4041))))),1083:()=>a("default","@openmrs/esm-framework",!1,[1,5],(()=>i.e(831).then((()=>()=>i(831))))),8877:()=>a("default","react-router-dom",!1,[1,6],(()=>Promise.all([i.e(144),i.e(913)]).then((()=>()=>i(2913)))))};[1083,380,8877].forEach((e=>{i.m[e]=r=>{u[e]=0,delete i.c[e];var t=l[e]();if("function"!=typeof t)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=t()}}));var s={380:[380],434:[5434],921:[3150,8010]},f={};i.f.consumes=(e,r)=>{i.o(s,e)&&s[e].forEach((e=>{if(i.o(u,e))return r.push(u[e]);if(!f[e]){var t=r=>{u[e]=0,i.m[e]=t=>{delete i.c[e],t.exports=r()}};f[e]=!0;var n=r=>{delete u[e],i.m[e]=t=>{throw delete i.c[e],r}};try{var o=l[e]();o.then?r.push(u[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))}})(),(()=>{var e={792:0,380:0,926:0};i.f.j=(r,t)=>{var n=i.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(380|434|921)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=i.p+i.u(r),u=new Error;i.l(a,(t=>{if(i.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;u.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",u.name="ChunkLoadError",u.type=o,u.request=a,n[1](u)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,u,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in u)i.o(u,n)&&(i.m[n]=u[n]);l&&l(i)}for(r&&r(t);s<a.length;s++)o=a[s],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_kenyaemr_esm_morgue_app=globalThis.webpackChunk_kenyaemr_esm_morgue_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),i.nc=void 0,i(7926)})();
1
+ (()=>{var e,r,t,n,o={7926:(e,r,t)=>{"use strict";var n=t(1083),o=(n.Type.String,n.Type.Object,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.String,n.Type.UUID,t(380)),a=t.n(o),i=t(4441),u=t(8877);function l(e){var r=e.config,t=r.name,l=r.title,s=(0,u.useLocation)(),f=window.getOpenmrsSpaBase()+"home",c=(0,o.useMemo)((function(){return decodeURIComponent((0,i.A)(s.pathname.split("/")))}),[s.pathname]);return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(c)&&(c=s.pathname.split("/").at(-3)),a().createElement(n.ConfigurableLink,{to:f+"/"+t,className:"cds--side-nav__link ".concat(t===c&&"active-left-nav-link")},l)}var s,f={featureName:"esm-morgue-app",moduleName:"@kenyaemr/esm-morgue-app"};t(4767),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(144),t.e(149),t.e(214),t.e(434),t.e(921),t.e(20)]).then(t.bind(t,5020))}),f),(0,n.getSyncLifecycle)((s={name:"morgue",title:"Morgue"},function(){return a().createElement(u.BrowserRouter,null,a().createElement(l,{config:s}))}),f),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(144),t.e(149),t.e(701),t.e(434),t.e(921),t.e(870)]).then(t.bind(t,870))}),f)},4767:(e,r,t)=>{var n={"./en.json":[4300,300]};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=4767,e.exports=o},4441:(e,r,t)=>{"use strict";t.d(r,{A:()=>n});const n=function(e){var r=null==e?0:e.length;return r?e[r-1]:void 0}}},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}i.m=o,i.c=a,i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.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);i.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var u=2&n&&t;"object"==typeof u&&!~e.indexOf(u);u=r(u))Object.getOwnPropertyNames(u).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,i.d(o,a),o},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@kenyaemr/esm-morgue-app:",i.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var u,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var c=s[f];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==n+o){u=c;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.setAttribute("data-webpack",n+o),u.src=e),t[e]=[r];var p=(r,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=p.bind(null,u.onerror),u.onload=p.bind(null,u.onload),l&&document.head.appendChild(u)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},r={};i.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];i.o(i.S,t)||(i.S[t]={});var a=i.S[t],u="@kenyaemr/esm-morgue-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},i=o[r];(!i||!i.loaded&&(!n!=!i.eager?n:u>i.from))&&(o[r]={get:t,from:u,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","5.8.2-pre.2394",(()=>Promise.all([i.e(831),i.e(380)]).then((()=>()=>i(831))))),l("react-i18next","11.18.6",(()=>Promise.all([i.e(380),i.e(225)]).then((()=>()=>i(1225))))),l("react-router-dom","6.26.2",(()=>Promise.all([i.e(144),i.e(913),i.e(380)]).then((()=>()=>i(2913))))),l("react","18.3.1",(()=>i.e(41).then((()=>()=>i(4041))))),l("swr/_internal","2.2.5",(()=>Promise.all([i.e(372),i.e(380)]).then((()=>()=>i(2372))))),l("swr/immutable","2.2.5",(()=>Promise.all([i.e(380),i.e(434),i.e(876)]).then((()=>()=>i(9876)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var r=i.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(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.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(u=e[a]))[0]?"-":(o>0?".":"")+(o=2,u);return n}var i=[];for(a=1;a<e.length;a++){var u=e[a];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():r(u))}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,u=1,l=!0;;u++,i++){var s,f,c=u<r.length?(typeof r[u])[0]:"";if(i>=n.length||"o"==(f=(typeof(s=n[i]))[0]))return!l||("u"==c?u>o&&!a:""==c!=a);if("u"==f){if(!l||"u"!=c)return!1}else if(l)if(c==f)if(u<=o){if(s!=r[u])return!1}else{if(a?s>r[u]:s<r[u])return!1;s!=r[u]&&(l=!1)}else if("s"!=c&&"n"!=c){if(a||u<=o)return!1;l=!1,u--}else{if(u<=o||f<c!=a)return!1;l=!1}else"s"!=c&&"n"!=c&&(l=!1,u--)}}var p=[],d=p.pop.bind(p);for(i=1;i<r.length;i++){var m=r[i];p.push(1==m?d()|d():2==m?d()&d():m?t(m,n):!d())}return!!d()},n=(r,t,n)=>{var o=n?(e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}))(r[t]):r[t];return Object.keys(o).reduce(((r,t)=>!r||!o[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],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}})(r,t)?t:r),0)},o=(e,r,t)=>t?t():((e,r)=>(e=>{throw new Error(e)})("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),a=(e=>function(r,t,n,o,a){var u=i.I(r);return u&&u.then&&!n?u.then(e.bind(e,r,i.S[r],t,!1,o,a)):e(r,i.S[r],t,n,o,a)})(((e,a,u,l,s,f)=>{if(!((e,r)=>e&&i.o(e,r))(a,u))return o(e,u,f);var c,p,d=n(a,u,l);return t(s,d)||(p=((e,t,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[t][n].from)+" of shared singleton module "+t+" (required "+r(o)+")")(a,u,d,s),"undefined"!=typeof console&&console.warn&&console.warn(p)),(c=a[u][d]).loaded=1,c.get()})),u={},l={5434:()=>a("default","swr/_internal",!1,[1,2],(()=>i.e(372).then((()=>()=>i(2372))))),3150:()=>a("default","react-i18next",!1,[1,11],(()=>i.e(606).then((()=>()=>i(1225))))),8010:()=>a("default","swr/immutable",!1,[1,2],(()=>i.e(495).then((()=>()=>i(9876))))),380:()=>a("default","react",!1,[1,18,1,0],(()=>i.e(41).then((()=>()=>i(4041))))),1083:()=>a("default","@openmrs/esm-framework",!1,[1,5],(()=>i.e(831).then((()=>()=>i(831))))),8877:()=>a("default","react-router-dom",!1,[1,6],(()=>Promise.all([i.e(144),i.e(913)]).then((()=>()=>i(2913)))))};[1083,380,8877].forEach((e=>{i.m[e]=r=>{u[e]=0,delete i.c[e];var t=l[e]();if("function"!=typeof t)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=t()}}));var s={380:[380],434:[5434],921:[3150,8010]},f={};i.f.consumes=(e,r)=>{i.o(s,e)&&s[e].forEach((e=>{if(i.o(u,e))return r.push(u[e]);if(!f[e]){var t=r=>{u[e]=0,i.m[e]=t=>{delete i.c[e],t.exports=r()}};f[e]=!0;var n=r=>{delete u[e],i.m[e]=t=>{throw delete i.c[e],r}};try{var o=l[e]();o.then?r.push(u[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))}})(),(()=>{var e={792:0,380:0,926:0};i.f.j=(r,t)=>{var n=i.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(380|434|921)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=i.p+i.u(r),u=new Error;i.l(a,(t=>{if(i.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;u.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",u.name="ChunkLoadError",u.type=o,u.request=a,n[1](u)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,u,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in u)i.o(u,n)&&(i.m[n]=u[n]);l&&l(i)}for(r&&r(t);s<a.length;s++)o=a[s],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_kenyaemr_esm_morgue_app=globalThis.webpackChunk_kenyaemr_esm_morgue_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),i.nc=void 0,i(7926)})();
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.24.0"},"extensions":[{"component":"morgueDashboardLink","name":"morgue-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"morgue","title":"morgue","slot":"morgue-dashboard-slot"}},{"component":"peerCalendarDashboardLink","name":"peer-calendar-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"peer-calendar","title":"Peer Calendar","slot":"peer-calendar-dashboard-slot","path":"peer-management"}},{"component":"root","name":"morgue-dashboard-root","slot":"morgue-dashboard-slot"}],"workspaces":[{"name":"patient-additional-info-form","component":"patientAdditionalInfoForm","title":"add more details","type":"other-form"},{"name":"autopsy-form-workspace","component":"morgueFormEntry","title":"Autopsy form entry","type":"form","width":"extra-wide","canMaximize":true,"canHide":true}],"pages":[{"component":"root","route":"morgue"}],"version":"5.3.7-pre.1361"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.24.0"},"extensions":[{"component":"morgueDashboardLink","name":"morgue-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"morgue","title":"morgue","slot":"morgue-dashboard-slot"}},{"component":"peerCalendarDashboardLink","name":"peer-calendar-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"peer-calendar","title":"Peer Calendar","slot":"peer-calendar-dashboard-slot","path":"peer-management"}},{"component":"root","name":"morgue-dashboard-root","slot":"morgue-dashboard-slot"}],"workspaces":[{"name":"patient-additional-info-form","component":"patientAdditionalInfoForm","title":"add more details","type":"other-form"},{"name":"autopsy-form-workspace","component":"morgueFormEntry","title":"Autopsy form entry","type":"form","width":"extra-wide","canMaximize":true,"canHide":true}],"pages":[{"component":"root","route":"morgue"}],"version":"5.3.7-pre.1382"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenyaemr/esm-morgue-app",
3
- "version": "5.3.7-pre.1361",
3
+ "version": "5.3.7-pre.1382",
4
4
  "description": "morgue app for KenyaEMR",
5
5
  "browser": "dist/kenyaemr-esm-morgue-app.js",
6
6
  "main": "src/index.ts",
@@ -1,21 +1,24 @@
1
- import React, { useState } from 'react';
1
+ import React from 'react';
2
2
  import styles from './compartment.scss';
3
3
  import { Button, Tag } from '@carbon/react';
4
4
  import { View } from '@carbon/react/icons';
5
5
  import { toUpperCase } from '../helpers/expression-helper';
6
- import { ConfigurableLink, formatDate, navigate } from '@openmrs/esm-framework';
6
+ import { ConfigurableLink, formatDate, usePatient, Visit } from '@openmrs/esm-framework';
7
7
  import { useTranslation } from 'react-i18next';
8
- import { useParams } from 'react-router-dom';
9
- import { getPatientUuidFromUrl } from '@openmrs/esm-patient-common-lib';
10
- import { Patient } from '../types';
8
+ import dayjs from 'dayjs';
11
9
 
12
10
  interface AvailableCompartmentProps {
13
- patientInfo: Patient;
11
+ patientVisitInfo: Visit;
14
12
  index: number;
15
13
  }
16
14
 
17
- const AvailableCompartment: React.FC<AvailableCompartmentProps> = ({ patientInfo, index }) => {
15
+ const AvailableCompartment: React.FC<AvailableCompartmentProps> = ({ patientVisitInfo, index }) => {
18
16
  const { t } = useTranslation();
17
+ const { patient } = usePatient(patientVisitInfo?.patient?.uuid);
18
+ const deceasedName = patient?.name.map((names) => names.text).join(' ');
19
+ const deceasedResidence = patient?.address.map((residence) => residence?.city);
20
+ const deathDate = patient?.deceasedDateTime;
21
+ const formatDeathDate = dayjs(deathDate).format('YYYY-MM-DD');
19
22
 
20
23
  return (
21
24
  <div className={styles.cardView}>
@@ -23,19 +26,19 @@ const AvailableCompartment: React.FC<AvailableCompartmentProps> = ({ patientInfo
23
26
  <div className={styles.cardLabelWrapper}>
24
27
  <div className={styles.cardLabel}>{index + 1}</div>
25
28
  </div>
26
- <span className={styles.deceasedName}>{toUpperCase(patientInfo.person.display)}</span>
29
+ <span className={styles.deceasedName}>{toUpperCase(deceasedName)}</span>
27
30
  </div>
28
31
  <div className={styles.cardRow}>
32
+ <span className={styles.deceasedAge}>
33
+ {t('gender', 'Gender: ')}
34
+ {toUpperCase(patient?.gender)}
35
+ </span>
29
36
  <span className={styles.deceasedDate}>
30
37
  {t('deathDate', 'Death date: ')}
31
- {formatDate(new Date(patientInfo.person.deathDate))}
32
- </span>
33
- <span className={styles.deceasedAge}>
34
- {t('age', 'Age: ')}
35
- {patientInfo?.person?.age}
38
+ {formatDeathDate}
36
39
  </span>
37
40
  <span className={styles.deceasedResidences}>
38
- {t('area', 'Area: ')} {patientInfo.person.preferredAddress?.address4}
41
+ {t('area', 'Area: ')} {deceasedResidence}
39
42
  </span>
40
43
  </div>
41
44
  <div className={styles.cardRow}>
@@ -48,7 +51,7 @@ const AvailableCompartment: React.FC<AvailableCompartmentProps> = ({ patientInfo
48
51
  </div>
49
52
  <ConfigurableLink
50
53
  className={styles.configurableLink}
51
- to={`\${openmrsSpaBase}/patient/${patientInfo.uuid}/chart/deceased-panel`}>
54
+ to={`\${openmrsSpaBase}/patient/${patientVisitInfo?.uuid}/chart/deceased-panel`}>
52
55
  <Button className={styles.assignButton} kind="primary" renderIcon={View}>
53
56
  {t('viewDetails', 'View details')}
54
57
  </Button>
@@ -2,18 +2,18 @@ import React from 'react';
2
2
  import styles from './compartment.scss';
3
3
  import EmptyCompartment from './empty-compartment.component';
4
4
  import AvailableCompartment from './avail-compartment.compartment';
5
- import { Patient } from '../types';
5
+ import { Visit } from '@openmrs/esm-framework';
6
6
 
7
7
  interface CompartmentViewProps {
8
- patients: (Patient | null)[];
8
+ patientVisit: Array<Visit>;
9
9
  }
10
10
 
11
- const CompartmentView: React.FC<CompartmentViewProps> = ({ patients }) => {
11
+ const CompartmentView: React.FC<CompartmentViewProps> = ({ patientVisit }) => {
12
12
  return (
13
13
  <div className={styles.allPatientCardWrapper}>
14
- {patients.map((patient, index) => (
14
+ {patientVisit.map((patient, index) => (
15
15
  <div key={index} className={styles.cardRow}>
16
- {patient ? <AvailableCompartment patientInfo={patient} index={index} /> : <EmptyCompartment />}
16
+ {patient ? <AvailableCompartment patientVisitInfo={patient} index={index} /> : <EmptyCompartment />}
17
17
  </div>
18
18
  ))}
19
19
  </div>
@@ -106,21 +106,11 @@ export const startVisitWithEncounter = (payload) => {
106
106
  const postUrl = `${restBaseUrl}/encounter`;
107
107
  return openmrsFetch(postUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: payload });
108
108
  };
109
+ export const useActiveMorgueVisit = () => {
110
+ const { morgueVisitTypeUuid } = useConfig<ConfigObject>();
111
+ const url = `${restBaseUrl}/visit?v=full&includeInactive=false&totalCount=true&visitType=${morgueVisitTypeUuid}`;
112
+ const { data, error, isLoading } = useSWR<FetchResponse<{ results: Array<Visit> }>>(url, openmrsFetch);
113
+ const activeDeceased = data?.data?.results;
109
114
 
110
- export function useVisit(patientUuid: string) {
111
- const customRepresentation =
112
- 'custom:(uuid,encounters:(uuid,diagnoses:(uuid,display,certainty,diagnosis:(coded:(uuid,display))),encounterDatetime,encounterType:(uuid,display),encounterProviders:(uuid,display,provider:(uuid,person:(uuid,display)))),location:(uuid,name,display),visitType:(uuid,name,display),startDatetime,stopDatetime)&limit=1';
113
-
114
- const { data, error, isLoading, isValidating, mutate } = useSWR<{ data: { results: Array<Visit> } }, Error>(
115
- `${restBaseUrl}/visit?patient=${patientUuid}&v=${customRepresentation}`,
116
- openmrsFetch,
117
- );
118
-
119
- return {
120
- visits: data ? data?.data?.results[0] : null,
121
- error,
122
- isLoading,
123
- isValidating,
124
- mutateVisits: mutate,
125
- };
126
- }
115
+ return { data: activeDeceased, error, isLoading };
116
+ };
@@ -3,12 +3,12 @@ import { useTranslation } from 'react-i18next';
3
3
  import DeceasedFilter from '../header/admitted-queue-header.component';
4
4
  import styles from './admitted-queue.scss';
5
5
  import CompartmentView from '../card/compartment-view.compartment';
6
- import { useDeceasedPatient } from '../hook/useMorgue.resource';
6
+ import { useActiveMorgueVisit, useDeceasedPatient } from '../hook/useMorgue.resource';
7
7
  import { InlineLoading } from '@carbon/react';
8
8
  import { CardHeader, ErrorState } from '@openmrs/esm-patient-common-lib';
9
9
 
10
10
  export const AdmittedQueue: React.FC = () => {
11
- const { data: deceasedPatients, error, isLoading } = useDeceasedPatient();
11
+ const { data: activeDeceased, error, isLoading } = useActiveMorgueVisit();
12
12
  const { t } = useTranslation();
13
13
 
14
14
  if (isLoading) {
@@ -30,7 +30,7 @@ export const AdmittedQueue: React.FC = () => {
30
30
  <CardHeader title={t('allocation', 'Allocation')} children={''} />
31
31
  <DeceasedFilter />
32
32
  <div className={styles.patientCardContainer}>
33
- <CompartmentView patients={deceasedPatients || []} />
33
+ <CompartmentView patientVisit={activeDeceased} />
34
34
  </div>
35
35
  </div>
36
36
  );