@openmrs/esm-ward-app 9.2.1-pre.7387 → 9.2.1-pre.7405

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/dist/9775.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"9775.js","mappings":"oMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,ogCAAqgC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,2CAA2C,8EAA8E,MAAQ,GAAG,SAAW,mRAAmR,eAAiB,CAAC,g/DAAg/D,gpBAAgpB,25DAA25D,WAAa,MAE7mMH,EAAwBI,OAAS,CAChC,SAAY,yCACZ,eAAkB,+CAClB,aAAgB,8CAEjB,S,6JCsBA,QAzB+B,WAC7B,IAAMC,GAAWC,EAAAA,EAAAA,KACTC,EAAiDF,EAAjDE,kBAAmBC,EAA8BH,EAA9BG,gBAAiBC,EAAaJ,EAAbI,SACtC,GAAQC,EAAAA,EAAAA,kBAANC,EAEFC,EAAeH,aAAAA,EAAAA,EAAUI,KACzBC,GAAaC,EAAAA,EAAAA,IAAcH,GAEjC,GAAIL,EACF,OAAO,qCAGT,GAAIC,EACF,OAAO,kBAACQ,EAAAA,IAAkBA,CAACC,KAAK,QAAQC,MAAOP,EAAE,2BAA4B,gCAG/E,IAAMQ,EAASL,EAAWX,GAE1B,OACE,kBAACiB,MAAAA,CAAIC,UAAWC,IAAWC,EAAAA,EAAOC,SAAUD,EAAAA,EAAOE,iBACjD,kBAACC,EAAAA,cAAaA,CAACC,KAAMR,IAG3B,C,+2BCPO,SAASS,EAAeC,GAC7B,MAAO,CACL1B,GAAI0B,EAAUC,MACdjB,KAAMgB,EAAUE,QAChBC,UAAWH,EAAUG,UACrBC,QAASJ,EAAUI,QACnBC,IAAKL,EAAUM,UACfC,OAAQP,EAAUQ,aAClBC,OAAQT,EAAUS,OAEtB,CAaO,SAASC,EAAeC,EAAyBC,G,IAC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EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQ7G,OAAS,IAAQA,YAASmH,C,gFCtBpD,SAASjH,IAMtB,IAAQM,GAAsC4G,EAAAA,EAAAA,aAAtC5G,aACF,GAAsB6G,EAAAA,EAAAA,cAApBC,gBAKJC,ECbS,SAAqB/G,G,IAAsBgH,EAAAA,UAAAA,OAAAA,QAAAA,IAAAA,UAAAA,GAAAA,UAAAA,GAAc,wBACtE,OAAOC,IACLjH,EAAe,GAA2BA,OAAxBkH,EAAAA,YAAY,cAA8BF,OAAlBhH,EAAa,OAAS,OAAJgH,GAAQ,KACpEG,EAAAA,aAEJ,CDQMJ,CAAYK,GAA4C,MAH1DC,EAGEN,EAHFM,KACAC,EAEEP,EAFFO,UACAC,EACER,EADFQ,MAEI3H,EAAkBwH,GAAuBI,EAE/C,MAAO,CACL3H,SAAUuH,EAAsBK,aAAAA,EAAAA,EAAkBJ,KAAOP,EACzDnH,kBAAAA,EACA6H,sBAAAA,EACA5H,gBAAAA,EAEJ,C,4FELA,QAhBuB,WAErB,IAAM8H,EAAmBC,OAAOC,oBAAsB,YAEtD,OACE,kBAACC,OAAAA,KACC,kBAACC,EAAAA,cAAaA,CAACC,SAAUL,GACvB,kBAACM,EAAAA,OAAMA,KACL,kBAACC,EAAAA,MAAKA,CAACC,KAAK,IAAIC,QAAS,kBAACC,EAAAA,QAAQA,QAClC,kBAACH,EAAAA,MAAKA,CAACC,KAAK,iBAAiBC,QAAS,kBAACC,EAAAA,QAAQA,UAKzD,C","sources":["webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.scss","webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.component.tsx","webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.resource.ts","webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.scss?c127","webpack://@openmrs/esm-ward-app/./src/hooks/useWardLocation.ts","webpack://@openmrs/esm-ward-app/./src/hooks/useLocation.ts","webpack://@openmrs/esm-ward-app/./src/root.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","response","useWardLocation","isLoadingLocation","invalidLocation","location","useTranslation","t","locationUuid","uuid","wardConfig","useWardConfig","InlineNotification","kind","title","wardId","div","className","classNames","styles","wardView","verticalTiling","ExtensionSlot","name","bedLayoutToBed","bedLayout","bedId","bedUuid","bedNumber","bedType","row","rowNumber","column","columnNumber","status","getWardMetrics","bedLayouts","wardPatientGroup","patients","totalPatientsCount","totalBeds","length","occupiedBeds","filter","bed","toString","freeBeds","createAndGetWardPatientGrouping","inpatientAdmissionsAtCurrentLocation","admissionLocation","inpatientRequests","inpatientAdmissionsAtOtherLocations","currentWardLocation","inpatientAdmissionsByPatientUuid","inpatientAdmissions","map","Map","inpatientAdmission","set","patient","getInpatientAdmissionsUuidMap","wardAdmittedPatientsWithBed","wardUnadmittedPatientsWithBed","collator","Intl","Collator","numeric","bl","sort","bedA","bedB","compare","filterBeds","allWardPatientUuids","Set","wardPatientPendingCount","admission","get","add","currentInpatientLocation","dispositionType","currentInpatientRequest","wardUnassignedPatientsList","has","size","inpatientRequest","getWardMetricNameTranslation","getWardMetricValueTranslation","value","metricValue","useElementConfig","elementType","config","useConfig","patientCardElements","find","elementConfig","e","showNotification","critical","description","wards","useMemo","wardDef","appliedTo","some","criteria","console","warn","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","useParams","useSession","sessionLocation","useLocation","rep","useSWRImmutable","restBaseUrl","openmrsFetch","locationUuidFromUrl","data","isLoading","error","errorFetchingLocation","locationResponse","wardViewBasename","window","getOpenmrsSpaBase","main","BrowserRouter","basename","Routes","Route","path","element","WardView"],"sourceRoot":""}
1
+ {"version":3,"file":"9775.js","mappings":"oMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAA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J,C,4FELA,QAhBuB,WAErB,IAAMmI,EAAmBC,OAAOC,oBAAsB,YAEtD,OACE,kBAACC,OAAAA,KACC,kBAACC,EAAAA,cAAaA,CAACC,SAAUL,GACvB,kBAACM,EAAAA,OAAMA,KACL,kBAACC,EAAAA,MAAKA,CAACC,KAAK,IAAIC,QAAS,kBAACC,EAAAA,QAAQA,QAClC,kBAACH,EAAAA,MAAKA,CAACC,KAAK,iBAAiBC,QAAS,kBAACC,EAAAA,QAAQA,UAKzD,C","sources":["webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.scss","webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.component.tsx","webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.resource.ts","webpack://@openmrs/esm-ward-app/./src/utils.ts","webpack://@openmrs/esm-ward-app/./src/ward-view/ward-view.scss?c127","webpack://@openmrs/esm-ward-app/./src/hooks/useWardLocation.ts","webpack://@openmrs/esm-ward-app/./src/hooks/useLocation.ts","webpack://@openmrs/esm-ward-app/./src/root.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","response","useWardLocation","isLoadingLocation","invalidLocation","location","useTranslation","t","locationUuid","uuid","wardConfig","useWardConfig","InlineNotification","kind","title","wardId","div","className","classNames","styles","wardView","verticalTiling","ExtensionSlot","name","bedLayoutToBed","bedLayout","bedId","bedUuid","bedNumber","bedType","row","rowNumber","column","columnNumber","status","getWardMetrics","wardPatientGroup","filterNewborns","filterReproductiveAge","allPatients","wardUnadmittedPatientsWithBed","values","wardAdmittedPatientsWithBed","map","admission","patient","wardUnassignedPatientsList","patientCount","length","newborns","filter","person","age","femalesOfReproductiveAge","patients","gender","totalBeds","bedLayouts","occupiedBeds","bed","toString","freeBeds","createAndGetWardPatientGrouping","inpatientAdmissionsAtCurrentLocation","admissionLocation","inpatientRequests","inpatientAdmissionsAtOtherLocations","currentWardLocation","inpatientAdmissionsByPatientUuid","inpatientAdmissions","Map","inpatientAdmission","set","getInpatientAdmissionsUuidMap","collator","Intl","Collator","numeric","bl","sort","bedA","bedB","compare","filterBeds","allWardPatientUuids","Set","wardPatientPendingCount","get","add","currentInpatientLocation","dispositionType","currentInpatientRequest","has","inpatientRequest","getWardMetricNameTranslation","useElementConfig","elementType","config","useConfig","patientCardElements","find","elementConfig","e","showNotification","critical","description","wards","useMemo","wardDef","appliedTo","some","criteria","console","warn","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","useParams","useSession","sessionLocation","useLocation","rep","useSWRImmutable","restBaseUrl","openmrsFetch","locationUuidFromUrl","data","isLoading","error","errorFetchingLocation","locationResponse","wardViewBasename","window","getOpenmrsSpaBase","main","BrowserRouter","basename","Routes","Route","path","element","WardView"],"sourceRoot":""}
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e,r,n,t,o={7512:(e,r,n)=>{"use strict";var t,o=n(54440),i=(o.Type.Array,o.Type.String,o.Type.UUID,o.Type.String,o.Type.String,o.validators.oneOf(["ascending","descending"]),o.Type.Number,o.Type.Boolean,o.Type.Array,o.Type.String,o.Type.Array,o.Type.UUID,o.Type.String,o.Type.Boolean,o.Type.Array,o.Type.String,o.Type.Boolean,o.Type.Array,o.Type.String,o.Type.Array,o.Type.String,o.validators.oneOf(["cityVillage","stateProvince","country","postalCode","countyDistrict","latitude","longitude","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","address13","address14","address15"]),o.Type.Array,o.Type.String,o.Type.UUID,o.Type.Array,o.Type.UUID,o.Type.String,o.Type.String,o.Type.String,o.Type.Array,o.Type.String,o.Type.Array,o.Type.UUID,o.Type.Array,o.Type.String,o.Type.Array,o.Type.UUID,o.Type.Boolean,o.Type.Array,n(11340)),a=n(1343),s=n.n(a),l=n(8877),c={path:"ward",slot:"ward-dashboard-slot",title:"wards",basePath:"".concat(window.spaBase,"/home")},u=(n(84767),{featureName:"ward",moduleName:i.A});(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(9775)]).then(n.bind(n,99775))},u),(0,o.getSyncLifecycle)((t=c,function(){return s().createElement(l.BrowserRouter,null,s().createElement(o.DashboardExtension,{path:t.path,title:t.title,basePath:t.basePath,icon:t.icon}))}),u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(7524)]).then(n.bind(n,27524))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(581)]).then(n.bind(n,80581))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(5434),n.e(2728)]).then(n.bind(n,12728))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(8501)]).then(n.bind(n,88501))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(1987)]).then(n.bind(n,61987))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(5603)]).then(n.bind(n,55603))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(4189),n.e(9756)]).then(n.bind(n,69756))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(2216)]).then(n.bind(n,22216))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(380),n.e(7661),n.e(3365)]).then(n.bind(n,23365))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(283)]).then(n.bind(n,80283))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(3413)]).then(n.bind(n,23413))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(380),n.e(7661),n.e(2948)]).then(n.bind(n,12948))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(8622),n.e(2339),n.e(3982)]).then(n.bind(n,33982))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(4189),n.e(3673)]).then(n.bind(n,53673))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(1899),n.e(2339),n.e(1741)]).then(n.bind(n,71741))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(917)]).then(n.bind(n,30917))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(8522)]).then(n.bind(n,48522))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(9117)]).then(n.bind(n,59117))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(5434),n.e(7179)]).then(n.bind(n,27179))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2898),n.e(2339),n.e(8010),n.e(5434),n.e(380),n.e(8610),n.e(1326)]).then(n.bind(n,61326))},{featureName:"default-ward-view",moduleName:i.A,swrConfig:{refreshInterval:6e4}}),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2898),n.e(2339),n.e(8010),n.e(5434),n.e(380),n.e(8610),n.e(5885)]).then(n.bind(n,35885))},{featureName:"maternal-ward-view",moduleName:i.A,swrConfig:{refreshInterval:6e4}}),(0,o.getAsyncLifecycle)(function(){return n.e(1776).then(n.bind(n,81776))},u)},11340:(e,r,n)=>{"use strict";n.d(r,{A:()=>t});var t="@openmrs/esm-ward-app"},84767:(e,r,n)=>{var t={"./am.json":[81197,1197],"./ar.json":[14132,4132],"./ar_SY.json":[37617,7617],"./bn.json":[77159,7159],"./cs.json":[86589,6589],"./de.json":[34944,4944],"./en.json":[34300,4300],"./en_US.json":[59569,9569],"./es.json":[93099,3099],"./es_MX.json":[88349,8349],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./hi.json":[36840,6840],"./hi_IN.json":[55442,5442],"./id.json":[72690,2690],"./it.json":[9538,9538],"./ka.json":[70795,795],"./km.json":[54335,4335],"./ku.json":[9895,9895],"./ky.json":[88163,8163],"./lg.json":[64618,4618],"./ne.json":[12146,2146],"./pl.json":[41119,1119],"./pt.json":[96679,6679],"./pt_BR.json":[36468,6468],"./qu.json":[35173,5173],"./ro_RO.json":[46022,6022],"./ru_RU.json":[60986,986],"./si.json":[56859,6859],"./sq.json":[88371,8371],"./sw.json":[89913,9913],"./sw_KE.json":[88618,8618],"./tr.json":[55241,5241],"./tr_TR.json":[99900,9900],"./uk.json":[60723,723],"./uz.json":[43584,3584],"./uz@Latn.json":[27097,7097],"./uz_UZ.json":[70890,890],"./vi.json":[79214,9214],"./zh.json":[35661,5661],"./zh_CN.json":[99879,9879],"./zh_TW.json":[10439,439]};function o(e){if(!n.o(t,e))return Promise.resolve().then(()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r});var r=t[e],o=r[0];return n.e(r[1]).then(()=>n(o))}o.keys=()=>Object.keys(t),o.id=84767,e.exports=o}},i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.exports}a.m=o,a.c=i,a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,t){if(1&t&&(n=this(n)),8&t)return n;if("object"==typeof n&&n){if(4&t&&n.__esModule)return n;if(16&t&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,r({}),r([]),r(r)];for(var s=2&t&&n;"object"==typeof s&&!~e.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,a.d(o,i),o},a.d=(e,r)=>{for(var n in r)a.o(r,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((r,n)=>(a.f[n](e,r),r),[])),a.u=e=>e+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n={},t="@openmrs/esm-ward-app:",a.l=(e,r,o,i)=>{if(n[e])n[e].push(r);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var f=c[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==t+o){s=f;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+o),s.src=e),n[e]=[r];var d=(r,t)=>{s.onerror=s.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(t)),r)return r(t)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{a.S={};var e={},r={};a.I=(n,t)=>{t||(t=[]);var o=r[n];if(o||(o=r[n]={}),!(t.indexOf(o)>=0)){if(t.push(o),e[n])return e[n];a.o(a.S,n)||(a.S[n]={});var i=a.S[n],s="@openmrs/esm-ward-app",l=(e,r,n,t)=>{var o=i[e]=i[e]||{},a=o[r];(!a||!a.loaded&&(!t!=!a.eager?t:s>a.from))&&(o[r]={get:n,from:s,eager:!!t})},c=[];return"default"===n&&(l("@openmrs/esm-framework","8.0.1-pre.3585",()=>Promise.all([a.e(3144),a.e(8622),a.e(4439),a.e(668),a.e(2339),a.e(8010),a.e(5434),a.e(1343),a.e(4230),a.e(8394)]).then(()=>()=>a(80668))),l("react-i18next","16.0.0",()=>Promise.all([a.e(6336),a.e(1343)]).then(()=>()=>a(16336))),l("react-router-dom","6.30.1",()=>Promise.all([a.e(3144),a.e(2913),a.e(1343)]).then(()=>()=>a(52913))),l("react","18.3.1",()=>a.e(4041).then(()=>()=>a(14041))),l("swr/_internal","2.2.5",()=>Promise.all([a.e(2372),a.e(1343)]).then(()=>()=>a(42372))),l("swr/immutable","2.2.5",()=>Promise.all([a.e(9876),a.e(5434),a.e(1343)]).then(()=>()=>a(29876))),l("swr/infinite","2.2.5",()=>Promise.all([a.e(5434),a.e(1343),a.e(89)]).then(()=>()=>a(52470)))),e[n]=c.length?Promise.all(c).then(()=>e[n]=1):1}}})(),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var n=r.getElementsByTagName("script");if(n.length)for(var t=n.length-1;t>-1&&(!e||!/^http(s?):/.test(e));)e=n[t--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),t=n[1]?r(n[1]):[];return n[2]&&(t.length++,t.push.apply(t,r(n[2]))),n[3]&&(t.push([]),t.push.apply(t,r(n[3]))),t},r=e=>{var n=e[0],t="";if(1===e.length)return"*";if(n+.5){t+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<e.length;i++)o--,t+="u"==(typeof(s=e[i]))[0]?"-":(o>0?".":"")+(o=2,s);return t}var a=[];for(i=1;i<e.length;i++){var s=e[i];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():r(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(r,t)=>{if(0 in r){t=e(t);var o=r[0],i=o<0;i&&(o=-o-1);for(var a=0,s=1,l=!0;;s++,a++){var c,u,f=s<r.length?(typeof r[s])[0]:"";if(a>=t.length||"o"==(u=(typeof(c=t[a]))[0]))return!l||("u"==f?s>o&&!i:""==f!=i);if("u"==u){if(!l||"u"!=f)return!1}else if(l)if(f==u)if(s<=o){if(c!=r[s])return!1}else{if(i?c>r[s]:c<r[s])return!1;c!=r[s]&&(l=!1)}else if("s"!=f&&"n"!=f){if(i||s<=o)return!1;l=!1,s--}else{if(s<=o||u<f!=i)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,s--)}}var d=[],p=d.pop.bind(d);for(a=1;a<r.length;a++){var y=r[a];d.push(1==y?p()|p():2==y?p()&p():y?n(y,t):!p())}return!!p()},t=(r,n,t)=>{var o=t?(e=>Object.keys(e).reduce((r,n)=>(e[n].eager&&(r[n]=e[n]),r),{}))(r[n]):r[n];return Object.keys(o).reduce((r,n)=>!r||!o[r].loaded&&((r,n)=>{r=e(r),n=e(n);for(var t=0;;){if(t>=r.length)return t<n.length&&"u"!=(typeof n[t])[0];var o=r[t],i=(typeof o)[0];if(t>=n.length)return"u"==i;var a=n[t],s=(typeof a)[0];if(i!=s)return"o"==i&&"n"==s||"s"==s||"u"==i;if("o"!=i&&"u"!=i&&o!=a)return o<a;t++}})(r,n)?n:r,0)},o=(e,r,n)=>n?n():((e,r)=>(e=>{throw new Error(e)})("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),i=(e=>function(r,n,t,o,i){var s=a.I(r);return s&&s.then&&!t?s.then(e.bind(e,r,a.S[r],n,!1,o,i)):e(r,a.S[r],n,t,o,i)})((e,i,s,l,c,u)=>{if(!((e,r)=>e&&a.o(e,r))(i,s))return o(e,s,u);var f,d,p=t(i,s,l);return n(c,p)||(d=((e,n,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[n][t].from)+" of shared singleton module "+n+" (required "+r(o)+")")(i,s,p,c),"undefined"!=typeof console&&console.warn&&console.warn(d)),(f=i[s][p]).loaded=1,f.get()}),s={},l={54440:()=>i("default","@openmrs/esm-framework",!1,[1,8],()=>Promise.all([a.e(3144),a.e(8622),a.e(4439),a.e(668),a.e(2339),a.e(8010),a.e(5434),a.e(8394)]).then(()=>()=>a(80668))),1343:()=>i("default","react",!1,[1,18],()=>a.e(4041).then(()=>()=>a(14041))),8877:()=>i("default","react-router-dom",!1,[1,6],()=>Promise.all([a.e(3144),a.e(2913)]).then(()=>()=>a(52913))),72339:()=>i("default","react-i18next",!1,[1,16],()=>a.e(6336).then(()=>()=>a(16336))),88010:()=>i("default","swr/immutable",!1,[1,2],()=>Promise.all([a.e(9876),a.e(5434)]).then(()=>()=>a(29876))),55434:()=>i("default","swr/_internal",!1,[1,2],()=>a.e(2372).then(()=>()=>a(42372))),98394:()=>i("default","swr/infinite",!1,[1,2],()=>a.e(2470).then(()=>()=>a(52470)))};[54440,1343,8877].forEach(e=>{a.m[e]=r=>{s[e]=0,delete a.c[e];var n=l[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=n()}});var c={1343:[1343],2339:[72339],4230:[8877,54440],5434:[55434],8010:[88010],8394:[98394],8792:[54440,1343,8877]},u={};a.f.consumes=(e,r)=>{a.o(c,e)&&c[e].forEach(e=>{if(a.o(s,e))return r.push(s[e]);if(!u[e]){var n=r=>{s[e]=0,a.m[e]=n=>{delete a.c[e],n.exports=r()}};u[e]=!0;var t=r=>{delete s[e],a.m[e]=n=>{throw delete a.c[e],r}};try{var o=l[e]();o.then?r.push(s[e]=o.then(n).catch(t)):n(o)}catch(e){t(e)}}})}})(),(()=>{var e={1343:0,4230:0,7512:0,8792:0};a.f.j=(r,n)=>{var t=a.o(e,r)?e[r]:void 0;if(0!==t)if(t)n.push(t[2]);else if(/^(1343|2339|4230|5434|8010|8394)$/.test(r))e[r]=0;else{var o=new Promise((n,o)=>t=e[r]=[n,o]);n.push(t[2]=o);var i=a.p+a.u(r),s=new Error;a.l(i,n=>{if(a.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+r+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,t[1](s)}},"chunk-"+r,r)}};var r=(r,n)=>{var t,o,[i,s,l]=n,c=0;if(i.some(r=>0!==e[r])){for(t in s)a.o(s,t)&&(a.m[t]=s[t]);l&&l(a)}for(r&&r(n);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),a.nc=void 0,a(7512)})();
1
+ (()=>{var e,r,n,t,o={7512:(e,r,n)=>{"use strict";var t,o=n(54440),i=(o.Type.Array,o.Type.String,o.Type.UUID,o.Type.String,o.Type.String,o.validators.oneOf(["ascending","descending"]),o.Type.Number,o.Type.Boolean,o.Type.Array,o.Type.String,o.Type.Array,o.Type.UUID,o.Type.String,o.Type.Boolean,o.Type.Array,o.Type.String,o.Type.Boolean,o.Type.Array,o.Type.String,o.Type.Array,o.Type.String,o.validators.oneOf(["cityVillage","stateProvince","country","postalCode","countyDistrict","latitude","longitude","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","address13","address14","address15"]),o.Type.Array,o.Type.String,o.Type.UUID,o.Type.Array,o.Type.UUID,o.Type.String,o.Type.String,o.Type.String,o.Type.Array,o.Type.String,o.Type.Array,o.Type.UUID,o.Type.Array,o.Type.String,o.Type.Array,o.Type.UUID,o.Type.Boolean,o.Type.Array,n(11340)),a=n(1343),s=n.n(a),l=n(8877),c={path:"ward",slot:"ward-dashboard-slot",title:"wards",basePath:"".concat(window.spaBase,"/home")},u=(n(84767),{featureName:"ward",moduleName:i.A});(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(9775)]).then(n.bind(n,99775))},u),(0,o.getSyncLifecycle)((t=c,function(){return s().createElement(l.BrowserRouter,null,s().createElement(o.DashboardExtension,{path:t.path,title:t.title,basePath:t.basePath,icon:t.icon}))}),u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(7524)]).then(n.bind(n,27524))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(581)]).then(n.bind(n,80581))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(5434),n.e(2728)]).then(n.bind(n,12728))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(8501)]).then(n.bind(n,88501))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(1987)]).then(n.bind(n,61987))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(5603)]).then(n.bind(n,55603))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(4189),n.e(9756)]).then(n.bind(n,69756))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(2216)]).then(n.bind(n,22216))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(380),n.e(7661),n.e(3365)]).then(n.bind(n,23365))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(283)]).then(n.bind(n,80283))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(3413)]).then(n.bind(n,23413))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(380),n.e(7661),n.e(2948)]).then(n.bind(n,12948))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(8622),n.e(2339),n.e(3982)]).then(n.bind(n,33982))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(9559),n.e(2339),n.e(8010),n.e(4189),n.e(3673)]).then(n.bind(n,53673))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(1899),n.e(2339),n.e(1741)]).then(n.bind(n,71741))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(917)]).then(n.bind(n,30917))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(8522)]).then(n.bind(n,48522))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(2339),n.e(9117)]).then(n.bind(n,59117))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2339),n.e(8010),n.e(5434),n.e(7179)]).then(n.bind(n,27179))},u),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2898),n.e(2339),n.e(8010),n.e(5434),n.e(380),n.e(4098),n.e(1326)]).then(n.bind(n,61326))},{featureName:"default-ward-view",moduleName:i.A,swrConfig:{refreshInterval:6e4}}),(0,o.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(4439),n.e(2898),n.e(2339),n.e(8010),n.e(5434),n.e(380),n.e(4098),n.e(5885)]).then(n.bind(n,35885))},{featureName:"maternal-ward-view",moduleName:i.A,swrConfig:{refreshInterval:6e4}}),(0,o.getAsyncLifecycle)(function(){return n.e(1776).then(n.bind(n,81776))},u)},11340:(e,r,n)=>{"use strict";n.d(r,{A:()=>t});var t="@openmrs/esm-ward-app"},84767:(e,r,n)=>{var t={"./am.json":[81197,1197],"./ar.json":[14132,4132],"./ar_SY.json":[37617,7617],"./bn.json":[77159,7159],"./cs.json":[86589,6589],"./de.json":[34944,4944],"./en.json":[34300,4300],"./en_US.json":[59569,9569],"./es.json":[93099,3099],"./es_MX.json":[88349,8349],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./hi.json":[36840,6840],"./hi_IN.json":[55442,5442],"./id.json":[72690,2690],"./it.json":[9538,9538],"./ka.json":[70795,795],"./km.json":[54335,4335],"./ku.json":[9895,9895],"./ky.json":[88163,8163],"./lg.json":[64618,4618],"./ne.json":[12146,2146],"./pl.json":[41119,1119],"./pt.json":[96679,6679],"./pt_BR.json":[36468,6468],"./qu.json":[35173,5173],"./ro_RO.json":[46022,6022],"./ru_RU.json":[60986,986],"./si.json":[56859,6859],"./sq.json":[88371,8371],"./sw.json":[89913,9913],"./sw_KE.json":[88618,8618],"./tr.json":[55241,5241],"./tr_TR.json":[99900,9900],"./uk.json":[60723,723],"./uz.json":[43584,3584],"./uz@Latn.json":[27097,7097],"./uz_UZ.json":[70890,890],"./vi.json":[79214,9214],"./zh.json":[35661,5661],"./zh_CN.json":[99879,9879],"./zh_TW.json":[10439,439]};function o(e){if(!n.o(t,e))return Promise.resolve().then(()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r});var r=t[e],o=r[0];return n.e(r[1]).then(()=>n(o))}o.keys=()=>Object.keys(t),o.id=84767,e.exports=o}},i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.exports}a.m=o,a.c=i,a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,t){if(1&t&&(n=this(n)),8&t)return n;if("object"==typeof n&&n){if(4&t&&n.__esModule)return n;if(16&t&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,r({}),r([]),r(r)];for(var s=2&t&&n;"object"==typeof s&&!~e.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,a.d(o,i),o},a.d=(e,r)=>{for(var n in r)a.o(r,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((r,n)=>(a.f[n](e,r),r),[])),a.u=e=>e+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n={},t="@openmrs/esm-ward-app:",a.l=(e,r,o,i)=>{if(n[e])n[e].push(r);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var f=c[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==t+o){s=f;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+o),s.src=e),n[e]=[r];var d=(r,t)=>{s.onerror=s.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(t)),r)return r(t)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{a.S={};var e={},r={};a.I=(n,t)=>{t||(t=[]);var o=r[n];if(o||(o=r[n]={}),!(t.indexOf(o)>=0)){if(t.push(o),e[n])return e[n];a.o(a.S,n)||(a.S[n]={});var i=a.S[n],s="@openmrs/esm-ward-app",l=(e,r,n,t)=>{var o=i[e]=i[e]||{},a=o[r];(!a||!a.loaded&&(!t!=!a.eager?t:s>a.from))&&(o[r]={get:n,from:s,eager:!!t})},c=[];return"default"===n&&(l("@openmrs/esm-framework","8.0.1-pre.3585",()=>Promise.all([a.e(3144),a.e(8622),a.e(4439),a.e(668),a.e(2339),a.e(8010),a.e(5434),a.e(1343),a.e(4230),a.e(8394)]).then(()=>()=>a(80668))),l("react-i18next","16.0.0",()=>Promise.all([a.e(6336),a.e(1343)]).then(()=>()=>a(16336))),l("react-router-dom","6.30.1",()=>Promise.all([a.e(3144),a.e(2913),a.e(1343)]).then(()=>()=>a(52913))),l("react","18.3.1",()=>a.e(4041).then(()=>()=>a(14041))),l("swr/_internal","2.2.5",()=>Promise.all([a.e(2372),a.e(1343)]).then(()=>()=>a(42372))),l("swr/immutable","2.2.5",()=>Promise.all([a.e(9876),a.e(5434),a.e(1343)]).then(()=>()=>a(29876))),l("swr/infinite","2.2.5",()=>Promise.all([a.e(5434),a.e(1343),a.e(89)]).then(()=>()=>a(52470)))),e[n]=c.length?Promise.all(c).then(()=>e[n]=1):1}}})(),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var n=r.getElementsByTagName("script");if(n.length)for(var t=n.length-1;t>-1&&(!e||!/^http(s?):/.test(e));)e=n[t--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),t=n[1]?r(n[1]):[];return n[2]&&(t.length++,t.push.apply(t,r(n[2]))),n[3]&&(t.push([]),t.push.apply(t,r(n[3]))),t},r=e=>{var n=e[0],t="";if(1===e.length)return"*";if(n+.5){t+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<e.length;i++)o--,t+="u"==(typeof(s=e[i]))[0]?"-":(o>0?".":"")+(o=2,s);return t}var a=[];for(i=1;i<e.length;i++){var s=e[i];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():r(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(r,t)=>{if(0 in r){t=e(t);var o=r[0],i=o<0;i&&(o=-o-1);for(var a=0,s=1,l=!0;;s++,a++){var c,u,f=s<r.length?(typeof r[s])[0]:"";if(a>=t.length||"o"==(u=(typeof(c=t[a]))[0]))return!l||("u"==f?s>o&&!i:""==f!=i);if("u"==u){if(!l||"u"!=f)return!1}else if(l)if(f==u)if(s<=o){if(c!=r[s])return!1}else{if(i?c>r[s]:c<r[s])return!1;c!=r[s]&&(l=!1)}else if("s"!=f&&"n"!=f){if(i||s<=o)return!1;l=!1,s--}else{if(s<=o||u<f!=i)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,s--)}}var d=[],p=d.pop.bind(d);for(a=1;a<r.length;a++){var y=r[a];d.push(1==y?p()|p():2==y?p()&p():y?n(y,t):!p())}return!!p()},t=(r,n,t)=>{var o=t?(e=>Object.keys(e).reduce((r,n)=>(e[n].eager&&(r[n]=e[n]),r),{}))(r[n]):r[n];return Object.keys(o).reduce((r,n)=>!r||!o[r].loaded&&((r,n)=>{r=e(r),n=e(n);for(var t=0;;){if(t>=r.length)return t<n.length&&"u"!=(typeof n[t])[0];var o=r[t],i=(typeof o)[0];if(t>=n.length)return"u"==i;var a=n[t],s=(typeof a)[0];if(i!=s)return"o"==i&&"n"==s||"s"==s||"u"==i;if("o"!=i&&"u"!=i&&o!=a)return o<a;t++}})(r,n)?n:r,0)},o=(e,r,n)=>n?n():((e,r)=>(e=>{throw new Error(e)})("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),i=(e=>function(r,n,t,o,i){var s=a.I(r);return s&&s.then&&!t?s.then(e.bind(e,r,a.S[r],n,!1,o,i)):e(r,a.S[r],n,t,o,i)})((e,i,s,l,c,u)=>{if(!((e,r)=>e&&a.o(e,r))(i,s))return o(e,s,u);var f,d,p=t(i,s,l);return n(c,p)||(d=((e,n,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[n][t].from)+" of shared singleton module "+n+" (required "+r(o)+")")(i,s,p,c),"undefined"!=typeof console&&console.warn&&console.warn(d)),(f=i[s][p]).loaded=1,f.get()}),s={},l={54440:()=>i("default","@openmrs/esm-framework",!1,[1,8],()=>Promise.all([a.e(3144),a.e(8622),a.e(4439),a.e(668),a.e(2339),a.e(8010),a.e(5434),a.e(8394)]).then(()=>()=>a(80668))),1343:()=>i("default","react",!1,[1,18],()=>a.e(4041).then(()=>()=>a(14041))),8877:()=>i("default","react-router-dom",!1,[1,6],()=>Promise.all([a.e(3144),a.e(2913)]).then(()=>()=>a(52913))),72339:()=>i("default","react-i18next",!1,[1,16],()=>a.e(6336).then(()=>()=>a(16336))),88010:()=>i("default","swr/immutable",!1,[1,2],()=>Promise.all([a.e(9876),a.e(5434)]).then(()=>()=>a(29876))),55434:()=>i("default","swr/_internal",!1,[1,2],()=>a.e(2372).then(()=>()=>a(42372))),98394:()=>i("default","swr/infinite",!1,[1,2],()=>a.e(2470).then(()=>()=>a(52470)))};[54440,1343,8877].forEach(e=>{a.m[e]=r=>{s[e]=0,delete a.c[e];var n=l[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=n()}});var c={1343:[1343],2339:[72339],4230:[8877,54440],5434:[55434],8010:[88010],8394:[98394],8792:[54440,1343,8877]},u={};a.f.consumes=(e,r)=>{a.o(c,e)&&c[e].forEach(e=>{if(a.o(s,e))return r.push(s[e]);if(!u[e]){var n=r=>{s[e]=0,a.m[e]=n=>{delete a.c[e],n.exports=r()}};u[e]=!0;var t=r=>{delete s[e],a.m[e]=n=>{throw delete a.c[e],r}};try{var o=l[e]();o.then?r.push(s[e]=o.then(n).catch(t)):n(o)}catch(e){t(e)}}})}})(),(()=>{var e={1343:0,4230:0,7512:0,8792:0};a.f.j=(r,n)=>{var t=a.o(e,r)?e[r]:void 0;if(0!==t)if(t)n.push(t[2]);else if(/^(1343|2339|4230|5434|8010|8394)$/.test(r))e[r]=0;else{var o=new Promise((n,o)=>t=e[r]=[n,o]);n.push(t[2]=o);var i=a.p+a.u(r),s=new Error;a.l(i,n=>{if(a.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+r+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,t[1](s)}},"chunk-"+r,r)}};var r=(r,n)=>{var t,o,[i,s,l]=n,c=0;if(i.some(r=>0!==e[r])){for(t in s)a.o(s,t)&&(a.m[t]=s[t]);l&&l(a)}for(r&&r(n);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),a.nc=void 0,a(7512)})();
@@ -54,9 +54,9 @@
54
54
  "entry": false,
55
55
  "recorded": false,
56
56
  "reason": "split chunk (cache group: default)",
57
- "size": 79800,
57
+ "size": 82075,
58
58
  "sizes": {
59
- "javascript": 79800
59
+ "javascript": 82075
60
60
  },
61
61
  "names": [],
62
62
  "idHints": [],
@@ -70,7 +70,7 @@
70
70
  "auxiliaryFiles": [
71
71
  "380.js.map"
72
72
  ],
73
- "hash": "79056e43226a2b27",
73
+ "hash": "620bc75ee944ff44",
74
74
  "childrenByOrder": {}
75
75
  },
76
76
  {
@@ -307,9 +307,9 @@
307
307
  "initial": false,
308
308
  "entry": false,
309
309
  "recorded": false,
310
- "size": 12251,
310
+ "size": 12434,
311
311
  "sizes": {
312
- "javascript": 12251
312
+ "javascript": 12434
313
313
  },
314
314
  "names": [],
315
315
  "idHints": [],
@@ -323,7 +323,7 @@
323
323
  "auxiliaryFiles": [
324
324
  "1326.js.map"
325
325
  ],
326
- "hash": "35bb930fa91e6da2",
326
+ "hash": "37958b3ea9f99e42",
327
327
  "childrenByOrder": {}
328
328
  },
329
329
  {
@@ -901,6 +901,31 @@
901
901
  "hash": "56a59cc98b21f82c",
902
902
  "childrenByOrder": {}
903
903
  },
904
+ {
905
+ "rendered": true,
906
+ "initial": false,
907
+ "entry": false,
908
+ "recorded": false,
909
+ "reason": "split chunk (cache group: default)",
910
+ "size": 253940,
911
+ "sizes": {
912
+ "javascript": 253940
913
+ },
914
+ "names": [],
915
+ "idHints": [],
916
+ "runtime": [
917
+ "@openmrs/esm-ward-app",
918
+ "main"
919
+ ],
920
+ "files": [
921
+ "4098.js"
922
+ ],
923
+ "auxiliaryFiles": [
924
+ "4098.js.map"
925
+ ],
926
+ "hash": "41b45edc5786382e",
927
+ "childrenByOrder": {}
928
+ },
904
929
  {
905
930
  "rendered": true,
906
931
  "initial": false,
@@ -974,9 +999,9 @@
974
999
  "initial": false,
975
1000
  "entry": false,
976
1001
  "recorded": false,
977
- "size": 6356,
1002
+ "size": 6225,
978
1003
  "sizes": {
979
- "javascript": 6356
1004
+ "javascript": 6225
980
1005
  },
981
1006
  "names": [],
982
1007
  "idHints": [],
@@ -988,7 +1013,7 @@
988
1013
  "4300.js"
989
1014
  ],
990
1015
  "auxiliaryFiles": [],
991
- "hash": "6db67bdb6e02ce9b",
1016
+ "hash": "cb3734a050484370",
992
1017
  "childrenByOrder": {}
993
1018
  },
994
1019
  {
@@ -1244,9 +1269,9 @@
1244
1269
  "initial": false,
1245
1270
  "entry": false,
1246
1271
  "recorded": false,
1247
- "size": 58077,
1272
+ "size": 58583,
1248
1273
  "sizes": {
1249
- "javascript": 58077
1274
+ "javascript": 58583
1250
1275
  },
1251
1276
  "names": [],
1252
1277
  "idHints": [],
@@ -1260,7 +1285,7 @@
1260
1285
  "auxiliaryFiles": [
1261
1286
  "5885.js.map"
1262
1287
  ],
1263
- "hash": "ef286b21543a0c29",
1288
+ "hash": "fec4e178e62f6567",
1264
1289
  "childrenByOrder": {}
1265
1290
  },
1266
1291
  {
@@ -1510,7 +1535,7 @@
1510
1535
  "auxiliaryFiles": [
1511
1536
  "7512.js.map"
1512
1537
  ],
1513
- "hash": "6c4c8cdfeec3d5ab",
1538
+ "hash": "0e860cc23e167e4a",
1514
1539
  "childrenByOrder": {}
1515
1540
  },
1516
1541
  {
@@ -1518,9 +1543,9 @@
1518
1543
  "initial": false,
1519
1544
  "entry": false,
1520
1545
  "recorded": false,
1521
- "size": 23241,
1546
+ "size": 25516,
1522
1547
  "sizes": {
1523
- "javascript": 23241
1548
+ "javascript": 25516
1524
1549
  },
1525
1550
  "names": [],
1526
1551
  "idHints": [],
@@ -1534,7 +1559,7 @@
1534
1559
  "auxiliaryFiles": [
1535
1560
  "7524.js.map"
1536
1561
  ],
1537
- "hash": "8061f1027d3884df",
1562
+ "hash": "817bb325d409b2cd",
1538
1563
  "childrenByOrder": {}
1539
1564
  },
1540
1565
  {
@@ -1767,31 +1792,6 @@
1767
1792
  "hash": "cb8c7557e563449a",
1768
1793
  "childrenByOrder": {}
1769
1794
  },
1770
- {
1771
- "rendered": true,
1772
- "initial": false,
1773
- "entry": false,
1774
- "recorded": false,
1775
- "reason": "split chunk (cache group: default)",
1776
- "size": 252403,
1777
- "sizes": {
1778
- "javascript": 252403
1779
- },
1780
- "names": [],
1781
- "idHints": [],
1782
- "runtime": [
1783
- "@openmrs/esm-ward-app",
1784
- "main"
1785
- ],
1786
- "files": [
1787
- "8610.js"
1788
- ],
1789
- "auxiliaryFiles": [
1790
- "8610.js.map"
1791
- ],
1792
- "hash": "e1b21ada3f832b18",
1793
- "childrenByOrder": {}
1794
- },
1795
1795
  {
1796
1796
  "rendered": true,
1797
1797
  "initial": false,
@@ -1866,7 +1866,7 @@
1866
1866
  "auxiliaryFiles": [
1867
1867
  "main.js.map"
1868
1868
  ],
1869
- "hash": "e31c03ac9d1b6cef",
1869
+ "hash": "a239ffc2134b26a7",
1870
1870
  "childrenByOrder": {}
1871
1871
  },
1872
1872
  {
@@ -2015,9 +2015,9 @@
2015
2015
  "initial": false,
2016
2016
  "entry": false,
2017
2017
  "recorded": false,
2018
- "size": 24023,
2018
+ "size": 26298,
2019
2019
  "sizes": {
2020
- "javascript": 24023
2020
+ "javascript": 26298
2021
2021
  },
2022
2022
  "names": [],
2023
2023
  "idHints": [],
@@ -2031,7 +2031,7 @@
2031
2031
  "auxiliaryFiles": [
2032
2032
  "9775.js.map"
2033
2033
  ],
2034
- "hash": "2c15e69f68e3b3d2",
2034
+ "hash": "7b4ae8f76f7d1274",
2035
2035
  "childrenByOrder": {}
2036
2036
  },
2037
2037
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0","emrapi":">=2.0.0 <4.0.0"},"optionalBackendDependencies":{"bedmanagement":{"version":"^6.0.0 || 6.0.0-SNAPSHOT","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardView","name":"ward-view","slot":"ward-view-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"name":"patient-discharge-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientDischargeWorkspaceSideRailIcon"},{"component":"defaultWardView","name":"default-ward","slot":"default-ward"},{"component":"maternalWardView","name":"maternal-ward","slot":"maternal-ward"},{"component":"wardPatientWorkspaceBanner","name":"ward-patient-workspace-banner","slot":"ward-workspace-patient-banner-slot"}],"workspaces2":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","window":"pending-admissions"},{"name":"transfer-elsewhere-workspace","component":"patientTransferRequestWorkspace","window":"pending-admissions"},{"name":"cancel-admission-request-workspace","component":"cancelAdmissionRequestWorkspace","window":"pending-admissions"},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","window":"pending-admissions"},{"name":"ward-app-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"add-patient-to-ward"},{"name":"ward-app-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"add-patient-to-ward"},{"name":"create-admission-encounter-workspace","component":"createAdmissionEncounterWorkspace","window":"add-patient-to-ward"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","window":"ward-patient"},{"name":"ward-patient-vitals-workspace","component":"@openmrs/esm-patient-vitals-app#exportedVitalsBiometricsFormWorkspace","window":"ward-patient"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","window":"ward-patient-notes"},{"name":"ward-patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","window":"ward-patient-transfer-swap"},{"name":"patient-discharge-workspace","component":"patientDischargeWorkspace","window":"ward-patient-discharge"},{"name":"ward-patient-clinical-forms-workspace","component":"@openmrs/esm-patient-forms-app#exportedClinicalFormsWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-cancel-admission-request-workspace","component":"wardPatientCancelAdmissionRequestWorkspace","window":"ward-patient-cancel-admission-request"},{"name":"ward-patient-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-lab-order-workspace","component":"@openmrs/esm-patient-tests-app#exportedAddLabOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-general-order-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"}],"workspaceWindows2":[{"name":"pending-admissions","group":"ward-manage-admissions","icon":"admissionRequestsWorkspaceSideRailIcon","width":"wider"},{"name":"add-patient-to-ward","group":"ward-manage-admissions","icon":"createAdmissionEncounterWorkspaceSideRailIcon"},{"name":"ward-patient","group":"ward-patient","icon":"wardPatientActionButton","width":"wider"},{"name":"ward-patient-notes","group":"ward-patient","icon":"wardPatientNotesActionButton"},{"name":"ward-patient-transfer-swap","group":"ward-patient","icon":"patientTransferAndSwapWorkspaceSiderailIcon"},{"name":"ward-patient-discharge","group":"ward-patient","icon":"patientDischargeWorkspaceSideRailIcon"},{"name":"ward-patient-clinical-forms","group":"ward-patient","icon":"clinicalFormWorkspaceSideRailIcon"},{"name":"ward-patient-order-basket","group":"ward-patient","icon":"orderBasketWorkspaceSideRailIcon"},{"name":"ward-patient-cancel-admission-request","group":"ward-patient"}],"workspaceGroups2":[{"name":"ward-manage-admissions","overlay":true,"persistence":"closable"},{"name":"ward-patient","overlay":true,"persistence":"closable"}],"version":"9.2.1-pre.7387"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0","emrapi":">=2.0.0 <4.0.0"},"optionalBackendDependencies":{"bedmanagement":{"version":"^6.0.0 || 6.0.0-SNAPSHOT","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardView","name":"ward-view","slot":"ward-view-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"name":"patient-discharge-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientDischargeWorkspaceSideRailIcon"},{"component":"defaultWardView","name":"default-ward","slot":"default-ward"},{"component":"maternalWardView","name":"maternal-ward","slot":"maternal-ward"},{"component":"wardPatientWorkspaceBanner","name":"ward-patient-workspace-banner","slot":"ward-workspace-patient-banner-slot"}],"workspaces2":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","window":"pending-admissions"},{"name":"transfer-elsewhere-workspace","component":"patientTransferRequestWorkspace","window":"pending-admissions"},{"name":"cancel-admission-request-workspace","component":"cancelAdmissionRequestWorkspace","window":"pending-admissions"},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","window":"pending-admissions"},{"name":"ward-app-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"add-patient-to-ward"},{"name":"ward-app-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"add-patient-to-ward"},{"name":"create-admission-encounter-workspace","component":"createAdmissionEncounterWorkspace","window":"add-patient-to-ward"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","window":"ward-patient"},{"name":"ward-patient-vitals-workspace","component":"@openmrs/esm-patient-vitals-app#exportedVitalsBiometricsFormWorkspace","window":"ward-patient"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","window":"ward-patient-notes"},{"name":"ward-patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","window":"ward-patient-transfer-swap"},{"name":"patient-discharge-workspace","component":"patientDischargeWorkspace","window":"ward-patient-discharge"},{"name":"ward-patient-clinical-forms-workspace","component":"@openmrs/esm-patient-forms-app#exportedClinicalFormsWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-cancel-admission-request-workspace","component":"wardPatientCancelAdmissionRequestWorkspace","window":"ward-patient-cancel-admission-request"},{"name":"ward-patient-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-lab-order-workspace","component":"@openmrs/esm-patient-tests-app#exportedAddLabOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-general-order-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"}],"workspaceWindows2":[{"name":"pending-admissions","group":"ward-manage-admissions","icon":"admissionRequestsWorkspaceSideRailIcon","width":"wider"},{"name":"add-patient-to-ward","group":"ward-manage-admissions","icon":"createAdmissionEncounterWorkspaceSideRailIcon"},{"name":"ward-patient","group":"ward-patient","icon":"wardPatientActionButton","width":"wider"},{"name":"ward-patient-notes","group":"ward-patient","icon":"wardPatientNotesActionButton"},{"name":"ward-patient-transfer-swap","group":"ward-patient","icon":"patientTransferAndSwapWorkspaceSiderailIcon"},{"name":"ward-patient-discharge","group":"ward-patient","icon":"patientDischargeWorkspaceSideRailIcon"},{"name":"ward-patient-clinical-forms","group":"ward-patient","icon":"clinicalFormWorkspaceSideRailIcon"},{"name":"ward-patient-order-basket","group":"ward-patient","icon":"orderBasketWorkspaceSideRailIcon"},{"name":"ward-patient-cancel-admission-request","group":"ward-patient"}],"workspaceGroups2":[{"name":"ward-manage-admissions","overlay":true,"persistence":"closable"},{"name":"ward-patient","overlay":true,"persistence":"closable"}],"version":"9.2.1-pre.7405"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-ward-app",
3
- "version": "9.2.1-pre.7387",
3
+ "version": "9.2.1-pre.7405",
4
4
  "description": "Ward and bed management module for O3",
5
5
  "browser": "dist/openmrs-esm-ward-app.js",
6
6
  "main": "src/index.ts",
@@ -230,6 +230,17 @@ export interface WardMetrics {
230
230
  patients: string;
231
231
  freeBeds: string;
232
232
  totalBeds: string;
233
+ femalesOfReproductiveAge?: string; // used in Maternal Ward View
234
+ newborns?: string; // used in Maternal Ward View
235
+ }
236
+
237
+ export enum WardMetricType {
238
+ PATIENTS = 'patients',
239
+ FREE_BEDS = 'freeBeds',
240
+ TOTAL_BEDS = 'totalBeds',
241
+ PENDING_OUT = 'pendingOut',
242
+ FEMALE_OF_REPRODUCTIVE_AGE = 'femalesOfReproductiveAge',
243
+ NEWBORNS = 'newborns',
233
244
  }
234
245
 
235
246
  export interface EncounterPayload {
package/src/utils.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { type Patient } from '@openmrs/esm-framework';
2
+
3
+ // TODO: potentially move these rules into config so they can be customized and defined in a centralized place
4
+
5
+ export function filterNewborns(patients: Patient[]) {
6
+ return patients.filter((patient) => patient.person.age < 1);
7
+ }
8
+
9
+ export function filterReproductiveAge(patients: Patient[]) {
10
+ return patients.filter((patient) => patient.person.age >= 10);
11
+ }
12
+
13
+ export function filterFemale(patients: Patient[]) {
14
+ return patients.filter((patient) => patient.person.gender === 'F');
15
+ }
@@ -8,6 +8,7 @@ import DefaultWardPendingPatients from './default-ward-pending-patients.componen
8
8
  import DefaultWardUnassignedPatients from './default-ward-unassigned-patients.component';
9
9
  import Ward from '../ward.component';
10
10
  import WardViewHeader from '../../ward-view-header/ward-view-header.component';
11
+ import WardMetrics from '../../ward-view-header/ward-metrics.component';
11
12
 
12
13
  const DefaultWardView = () => {
13
14
  const wardPatientGroupDetails = useWardPatientGrouping();
@@ -17,12 +18,13 @@ const DefaultWardView = () => {
17
18
  });
18
19
 
19
20
  const wardBeds = <DefaultWardBeds />;
21
+ const wardMetrics = <WardMetrics />;
20
22
  const wardUnassignedPatients = <DefaultWardUnassignedPatients />;
21
23
  const wardPendingPatients = <DefaultWardPendingPatients />;
22
24
 
23
25
  return (
24
26
  <>
25
- <WardViewHeader {...{ wardPendingPatients }} />
27
+ <WardViewHeader {...{ wardPendingPatients, wardMetrics }} />
26
28
  <Ward {...{ wardBeds, wardUnassignedPatients }} />
27
29
  </>
28
30
  );
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useDefineAppContext } from '@openmrs/esm-framework';
3
3
  import { useWardPatientGrouping } from '../../hooks/useWardPatientGrouping';
4
- import { type MaternalWardViewContext, type WardViewContext } from '../../types';
4
+ import { type MaternalWardViewContext, WardMetricType, type WardViewContext } from '../../types';
5
5
  import { useMotherChildrenRelationshipsByPatient } from './maternal-ward-view.resource';
6
6
  import MaternalWardBeds from './maternal-ward-beds.component';
7
7
  import MaternalWardPatientCardHeader from './maternal-ward-patient-card-header.component';
@@ -9,6 +9,7 @@ import MaternalWardPendingPatients from './maternal-ward-pending-patients.compon
9
9
  import MaternalWardUnassignedPatients from './maternal-ward-unassigned-patients.component';
10
10
  import Ward from '../ward.component';
11
11
  import WardViewHeader from '../../ward-view-header/ward-view-header.component';
12
+ import WardMetrics from '../../ward-view-header/ward-metrics.component';
12
13
 
13
14
  const MaternalWardView = () => {
14
15
  const wardPatientGroupDetails = useWardPatientGrouping();
@@ -24,12 +25,24 @@ const MaternalWardView = () => {
24
25
  });
25
26
 
26
27
  const wardBeds = <MaternalWardBeds {...motherChildRelationships} />;
28
+ const wardMetrics = (
29
+ <WardMetrics
30
+ metrics={[
31
+ WardMetricType.PATIENTS,
32
+ WardMetricType.FEMALE_OF_REPRODUCTIVE_AGE,
33
+ WardMetricType.NEWBORNS,
34
+ WardMetricType.FREE_BEDS,
35
+ WardMetricType.TOTAL_BEDS,
36
+ WardMetricType.PENDING_OUT,
37
+ ]}
38
+ />
39
+ );
27
40
  const wardUnassignedPatients = <MaternalWardUnassignedPatients />;
28
41
  const wardPendingPatients = <MaternalWardPendingPatients />;
29
42
 
30
43
  return (
31
44
  <>
32
- <WardViewHeader {...{ wardPendingPatients }} />
45
+ <WardViewHeader {...{ wardPendingPatients, wardMetrics }} />
33
46
  <Ward {...{ wardBeds, wardUnassignedPatients }} />
34
47
  </>
35
48
  );
@@ -0,0 +1,140 @@
1
+ import { createAndGetWardPatientGrouping, getWardMetrics } from './ward-view.resource';
2
+ import { type AdmissionLocationFetchResponse, type InpatientAdmission, type WardPatientGroupDetails } from '../types';
3
+ import type { Location } from '@openmrs/esm-framework';
4
+
5
+ describe('Ward View Resource', () => {
6
+ const patient1 = {
7
+ uuid: 'patient-uuid-1',
8
+ person: {
9
+ uuid: 'some-person-uuid-1',
10
+ age: 24,
11
+ gender: 'F',
12
+ },
13
+ };
14
+
15
+ const patient2 = {
16
+ uuid: 'patient-uuid-2',
17
+ person: {
18
+ uuid: 'some-person-uuid-2',
19
+ age: 0.5,
20
+ gender: 'M',
21
+ },
22
+ };
23
+
24
+ const currentWardLocation: Location = {
25
+ uuid: 'some-location-uuid',
26
+ };
27
+
28
+ const inpatientAdmissionsAtCurrentLocation: InpatientAdmission[] = [
29
+ {
30
+ patient: patient1,
31
+ visit: undefined,
32
+ encounterAssigningToCurrentInpatientLocation: undefined,
33
+ firstAdmissionOrTransferEncounter: undefined,
34
+ currentInpatientRequest: undefined,
35
+ currentInpatientLocation: currentWardLocation,
36
+ },
37
+ {
38
+ patient: patient2,
39
+ visit: undefined,
40
+ encounterAssigningToCurrentInpatientLocation: undefined,
41
+ firstAdmissionOrTransferEncounter: undefined,
42
+ currentInpatientRequest: undefined,
43
+ currentInpatientLocation: currentWardLocation,
44
+ },
45
+ ];
46
+
47
+ const admissionLocationFetchResponse: AdmissionLocationFetchResponse = {
48
+ bedLayouts: [
49
+ {
50
+ rowNumber: 1,
51
+ columnNumber: 1,
52
+ bedNumber: '1',
53
+ bedId: 1,
54
+ bedUuid: 'some-bed-uuid',
55
+ status: 'OCCUPIED',
56
+ bedType: undefined,
57
+ location: '',
58
+ patients: [patient1],
59
+ bedTagMaps: [],
60
+ },
61
+ ],
62
+ occupiedBeds: 1,
63
+ totalBeds: 1,
64
+ ward: currentWardLocation,
65
+ };
66
+
67
+ describe('createAndGetWardPatientGrouping', () => {
68
+ it('should handle null data', () => {
69
+ const wardPatientGrouping = createAndGetWardPatientGrouping(null, null, null, null, null);
70
+ expect(wardPatientGrouping.allWardPatientUuids.size).toBe(0);
71
+ });
72
+ it('should include inpatient admissions at current location when counting total patients', () => {
73
+ const wardPatientGrouping = createAndGetWardPatientGrouping(
74
+ inpatientAdmissionsAtCurrentLocation,
75
+ null,
76
+ null,
77
+ null,
78
+ null,
79
+ );
80
+ expect(wardPatientGrouping.allWardPatientUuids.size).toBe(2);
81
+ });
82
+ it('should return admitted patient with bed', () => {
83
+ const wardPatientGrouping = createAndGetWardPatientGrouping(
84
+ inpatientAdmissionsAtCurrentLocation,
85
+ admissionLocationFetchResponse,
86
+ null,
87
+ null,
88
+ currentWardLocation,
89
+ );
90
+ expect(wardPatientGrouping.wardAdmittedPatientsWithBed.size).toBe(1);
91
+ expect(wardPatientGrouping.wardAdmittedPatientsWithBed.has('patient-uuid-1')).toBeTruthy();
92
+ });
93
+ it('should return admitted patient without bed', () => {
94
+ const wardPatientGrouping = createAndGetWardPatientGrouping(
95
+ inpatientAdmissionsAtCurrentLocation,
96
+ admissionLocationFetchResponse,
97
+ null,
98
+ null,
99
+ currentWardLocation,
100
+ );
101
+ expect(wardPatientGrouping.wardUnassignedPatientsList.length).toBe(1);
102
+ expect(wardPatientGrouping.wardUnassignedPatientsList.at(0).patient.uuid).toBe('patient-uuid-2');
103
+ });
104
+ });
105
+
106
+ describe('getWardMetrics', () => {
107
+ const createAndGetWardPatientGroupingResults = createAndGetWardPatientGrouping(
108
+ inpatientAdmissionsAtCurrentLocation,
109
+ admissionLocationFetchResponse,
110
+ null,
111
+ null,
112
+ currentWardLocation,
113
+ );
114
+ const wardPatientGrouping: WardPatientGroupDetails = {
115
+ allWardPatientUuids: createAndGetWardPatientGroupingResults.allWardPatientUuids,
116
+ bedLayouts: createAndGetWardPatientGroupingResults.bedLayouts,
117
+ inpatientAdmissionsByPatientUuid: createAndGetWardPatientGroupingResults.inpatientAdmissionsByPatientUuid,
118
+ wardAdmittedPatientsWithBed: createAndGetWardPatientGroupingResults.wardAdmittedPatientsWithBed,
119
+ wardPatientPendingCount: createAndGetWardPatientGroupingResults.wardPatientPendingCount,
120
+ wardUnadmittedPatientsWithBed: createAndGetWardPatientGroupingResults.wardUnadmittedPatientsWithBed,
121
+ wardUnassignedPatientsList: createAndGetWardPatientGroupingResults.wardUnassignedPatientsList,
122
+ inpatientRequestResponse: undefined,
123
+ inpatientAdmissionResponse: undefined,
124
+ admissionLocationResponse: undefined,
125
+ isLoading: false,
126
+ async mutate(): Promise<void> {
127
+ return Promise.resolve(undefined);
128
+ },
129
+ };
130
+
131
+ it('should return metrics', () => {
132
+ const metrics = getWardMetrics(wardPatientGrouping);
133
+ expect(metrics.patients).toBe('2');
134
+ expect(metrics.freeBeds).toBe('0');
135
+ expect(metrics.totalBeds).toBe('1');
136
+ expect(metrics.newborns).toBe('1');
137
+ expect(metrics.femalesOfReproductiveAge).toBe('1');
138
+ });
139
+ });
140
+ });