@ampath/esm-reports-app 1.0.0-next.71 → 1.0.0-next.72
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/410.js +1 -1
- package/dist/{919.css → 500.css} +1 -1
- package/dist/{919.css.map → 500.css.map} +1 -1
- package/dist/500.js +1 -0
- package/dist/500.js.map +1 -0
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/reports/moh-710/registers/moh-510/moh-510.component.tsx +2 -4
- package/src/reports/moh-711/moh-711.component.tsx +12 -2
- package/src/reports/moh-711/registers/moh-510-register.component.tsx +1 -1
- package/src/reports/moh-711/registers/moh-512-columns.ts +94 -0
- package/src/reports/moh-711/registers/moh-512.component.tsx +141 -0
- package/src/reports/moh-711/registers/moh-512.scss +64 -0
- package/src/reports/moh-711/registers/tb-register-columns.ts +17 -0
- package/src/reports/moh-711/registers/tb-register.component.tsx +93 -0
- package/src/reports/moh-711/registers/tb-register.scss +64 -0
- package/src/reports/moh-711/sections/family-planning.component.tsx +158 -53
- package/src/reports/moh-711/sections/tb-screening.component.tsx +50 -13
- package/src/resources/moh-710.resource.ts +1 -1
- package/src/resources/moh-711.resource.ts +56 -5
- package/src/root.component.tsx +4 -0
- package/dist/919.js +0 -1
- package/dist/919.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _ampath_esm_reports_app;!function(){var e="undefined"!=typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw new Error("@ampath/esm-reports-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var r=e._FEDERATION_RUNTIME_CORE_FROM;r&&r.version&&"2.8"!==String(r.version).split(".").slice(0,2).join(".")&&console.warn("@ampath/esm-reports-app was built against Module Federation 2.8.x but the app shell provides "+r.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{"use strict";var e,r,t,n,a,o,i={2464(e,r,t){var n={};function a(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}t.r(n),t.d(n,{Module:()=>p.Module,ModuleFederation:()=>p.ModuleFederation,createInstance:()=>h,getInstance:()=>M,getRemoteEntry:()=>p.getRemoteEntry,getRemoteInfo:()=>p.getRemoteInfo,init:()=>m,loadRemote:()=>g,loadScript:()=>p.loadScript,loadScriptNode:()=>p.loadScriptNode,loadShare:()=>y,loadShareSync:()=>S,preloadRemote:()=>b,registerGlobalPlugins:()=>p.registerGlobalPlugins,registerPlugins:()=>E,registerRemotes:()=>v,registerShared:()=>R});const o=["script"];function i(e){const{webpackRequire:r,moduleToHandlerMapping:t}=e,{consumesLoadingData:n,initializeSharingData:a}=r,{sharedFallback:o,bundlerRuntime:i,libraryType:s}=r.federation;if(n&&!n._updated){const{moduleIdToConsumeDataMapping:a={},initialConsumes:c=[],chunkMapping:l={}}=n;if(Object.entries(a).forEach(([e,n])=>{t[e]||(t[e]={getter:o?i?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:r,libraryType:s}):n.fallback,treeShakingGetter:o?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:o?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){const{initialConsumes:r=[]}=e;c.forEach(e=>{r.includes(e)||r.push(e)})}if("chunkMapping"in e){const{chunkMapping:r={}}=e;Object.entries(l).forEach(([e,t])=>{r[e]||(r[e]=[]),t.forEach(t=>{r[e].includes(t)||r[e].push(t)})})}n._updated=1}if(a&&!a._updated){const{federation:e}=r;if(!e.instance||!a.scopeToSharingDataMapping)return;const t={};for(let[e,r]of Object.entries(a.scopeToSharingDataMapping))for(let n of r)if("object"==typeof n&&null!==n){const{name:r,version:a,factory:o,eager:i,singleton:s,requiredVersion:c,strictVersion:l}=n,p={requiredVersion:`^${a}`},u=function(e){return void 0!==e};u(s)&&(p.singleton=s),u(c)&&(p.requiredVersion=c),u(i)&&(p.eager=i),u(l)&&(p.strictVersion=l);const d={version:a,scope:[e],shareConfig:p,get:o};t[r]?t[r].push(d):t[r]=[d]}e.instance.registerShared(t),a._updated=1}}const s=self._OPENMRS_FEDERATION_SDK;function c(e,r){const t=e.federation.usedExports;if(t)return t[r]}const l="RUNTIME-012",p=self._FEDERATION_RUNTIME_CORE;function u(e,r){return p.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(t=>!("@ampath/esm-reports-app:1.0.0-next.71"!==t.options.id&&(t.options.name!==e||t.options.version||r)&&(t.options.name!==e||!r||t.options.version!==r)))}const d=self._OPENMRS_FEDERATION_ERROR_CODES;function h(e){const r=new((0,p.getGlobalFederationConstructor)()||p.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,p.setGlobalFederationInstance)(r),r}let f=null;function m(e){const r=u(e.name,e.version),t={...e,id:e.id||""};return r?(r.initOptions(t),f||(f=r),r):(f=h(t),f)}function g(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.loadRemote.apply(f,e)}function y(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.loadShare.apply(f,e)}function S(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.loadShareSync.apply(f,e)}function b(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.preloadRemote.apply(f,e)}function v(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.registerRemotes.apply(f,e)}function E(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.registerPlugins.apply(f,e)}function M(e){return e?p.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:f}function R(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.registerShared.apply(f,e)}(0,p.setGlobalFederationConstructor)(p.ModuleFederation);const k={global:{...p.helpers.global,getGlobalFederationInstance:u},share:p.helpers.share,utils:p.helpers.utils},_={remotes:function(e){!function(e){const{webpackRequire:r,idToExternalAndNameMapping:t={},idToRemoteMap:n={},chunkMapping:a={}}=e,{remotesLoadingData:o}=r,i=r.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!o||o._updated||!i)return;const{chunkMapping:s,moduleIdToRemoteDataMapping:c}=o;if(s&&c){for(let[e,r]of Object.entries(c))if(t[e]||(t[e]=[r.shareScope,r.name,r.externalModuleId]),!n[e]&&i[r.remoteName]){const t=i[r.remoteName];n[e]||=[],t.forEach(r=>{n[e].includes(r)||n[e].push(r)})}a&&Object.entries(s).forEach(([e,r])=>{a[e]||(a[e]=[]),r.forEach(r=>{a[e].includes(r)||a[e].push(r)})}),o._updated=1}}(e);const{chunkId:r,promises:t,webpackRequire:n,chunkMapping:i,idToExternalAndNameMapping:c,idToRemoteMap:l}=e;a(n),n.o(i,r)&&i[r].forEach(e=>{let r=n.R;r||(r=[]);const a=c[e],i=l[e]||[];if(r.indexOf(a)>=0)return;if(r.push(a),a.p)return t.push(a.p);const p=r=>{r||(r=new Error("Container missing")),"string"==typeof r.message&&(r.message+=`\nwhile loading "${a[1]}" from ${a[2]}`),n.m[e]=()=>{throw r},a.p=0},u=(e,r,n,o,i,s)=>{try{const c=e(r,n);if(!c||!c.then)return i(c,o,s);{const e=c.then(e=>i(e,o),p);if(!s)return e;t.push(a.p=e)}}catch(e){p(e)}};var d=(e,t,n)=>u(t.get,a[1],r,0,h,n),h=r=>{a.p=1,n.m[e]=e=>{e.exports=r()}};1===i.length&&o.includes(i[0].externalType)&&i[0].name?u(()=>{try{const e=(0,s.decodeName)(i[0].name,s.ENCODE_NAME_PREFIX)+a[1].slice(1),r=n.federation.instance,t=()=>n.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===r.options.shareStrategy){const e=Array.isArray(a[0])?a[0]:[a[0]];return Promise.all(e.map(e=>r.sharedHandler.initializeSharing(e))).then(()=>t())}return t()}catch(e){p(e)}},a[2],0,0,h,1):u(n,a[2],0,0,(e,r,t)=>e?u(n.I,a[0],0,e,d,t):p(),1)})},consumes:function(e){i(e);const{chunkId:r,promises:t,installedModules:n,webpackRequire:o,chunkMapping:s,moduleToHandlerMapping:p}=e;a(o),o.o(s,r)&&s[r].forEach(e=>{if(o.o(n,e))return t.push(n[e]);const r=r=>{n[e]=0,o.m[e]=t=>{delete o.c[e];const n=r(),{shareInfo:a}=p[e];if(a?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=a.shareConfig.layer)}catch(e){}t.exports=n}},a=r=>{delete n[e],o.m[e]=t=>{throw delete o.c[e],r}};try{const i=o.federation.instance;if(!i)throw new Error("Federation instance not found!");const{shareKey:s,getter:u,shareInfo:d,treeShakingGetter:h}=p[e],f=c(o,s),m={...d};Array.isArray(m.scope)&&Array.isArray(m.scope[0])&&(m.scope=m.scope[0]),f&&(m.treeShaking={usedExports:f,useIn:[i.options.name]});const g=i.loadShare(s,{customShareInfo:m}).then(e=>{if(!1===e){if("function"!=typeof u)throw new Error(((e,r,t)=>{const n=[`${[r[e]]} #${e}`];return t&&n.push(`args: ${JSON.stringify(t)}`),n.push((e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`)(e)),n.join("\n")})(l,{[l]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:s}));return h?.()||u()}return e});g.then?t.push(n[e]=g.then(r).catch(a)):r(g)}catch(e){a(e)}})},I:function({shareScopeName:e,webpackRequire:r,initPromises:t,initTokens:n,initScope:i}){const s=Array.isArray(e)?e:[e];var c=[];return s.forEach(s=>{c.push(function(s){i||(i=[]);const c=r.federation.instance;var l=n[s];if(l||(l=n[s]={from:c.name}),i.indexOf(l)>=0)return;i.push(l);const p=t[s];if(p)return p;var u=t=>{var n=e=>{return r="Initialization of sharing external failed: "+e,"undefined"!=typeof console&&console.warn&&console.warn(r);var r};try{var a=r(t);if(!a)return;var o=t=>t&&t.init&&t.init(r.S[s],i,{shareScopeMap:r.S||{},shareScopeKeys:e});if(a.then)return d.push(a.then(o,n));var c=o(a);if(c&&"boolean"!=typeof c&&c.then)return d.push(c.catch(n))}catch(e){n(e)}};const d=c.initializeSharing(s,{strategy:c.options.shareStrategy,initScope:i,from:"build"});a(r);const h=r.federation.bundlerRuntimeOptions.remotes;return h&&Object.keys(h.idToRemoteMap).forEach(e=>{const r=h.idToRemoteMap[e],t=h.idToExternalAndNameMapping[e][2];if(r.length>1)u(t);else if(1===r.length){const e=r[0];o.includes(e.externalType)||u(t)}}),d.length?t[s]=Promise.all(d).then(()=>t[s]=!0):t[s]=!0}(s))}),Promise.all(c).then(()=>!0)},S:{},installInitialConsumes:function(e){i(e);const{moduleToHandlerMapping:r,webpackRequire:t,installedModules:n,initialConsumes:a,asyncLoad:o}=e,s=[];a.forEach(e=>{s.push([e,()=>function(e){const{moduleId:r,moduleToHandlerMapping:t,webpackRequire:n,asyncLoad:a}=e,o=n.federation.instance;if(!o)throw new Error("Federation instance not found!");const{shareKey:i,shareInfo:s}=t[r];try{const e=c(n,i),r={...s};return e&&(r.treeShaking={usedExports:e,useIn:[o.options.name]}),a?o.loadShare(i,{customShareInfo:r}):o.loadShareSync(i,{customShareInfo:r})}catch(e){throw console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.'),console.error("The original error message is as follows: "),e}}({moduleId:e,moduleToHandlerMapping:r,webpackRequire:t,asyncLoad:o})])});const l=(e,a)=>{t.m[e]=o=>{n[e]=0,delete t.c[e];const i=a();if("function"!=typeof i)throw new Error(`Shared module is not available for eager consumption: ${e}`);const s=i(),{shareInfo:c}=r[e];if(c?.shareConfig?.layer&&s&&"object"==typeof s)try{s.hasOwnProperty("layer")&&void 0!==s.layer||(s.layer=c.shareConfig.layer)}catch(e){}o.exports=s}};if(o)return Promise.all(s.map(async([e,r])=>{const t=await r();l(e,()=>t)}));s.forEach(([e,r])=>{l(e,r)})},initContainerEntry:function(e){const{webpackRequire:r,shareScope:t,initScope:n,shareScopeKey:a,remoteEntryInitOptions:o}=e;if(!r.S)return;if(!r.federation||!r.federation.instance||!r.federation.initOptions)return;const i=r.federation.instance;i.initOptions({name:r.federation.initOptions.name,remotes:[],...o});const s=o?.shareScopeKeys,c=o?.shareScopeMap;if(a&&"string"!=typeof a)a.forEach(e=>{if(!s||!c)return void i.initShareScopeMap(e,t,{hostShareScopeMap:o?.shareScopeMap||{}});c[e]||(c[e]={});const r=c[e];i.initShareScopeMap(e,r,{hostShareScopeMap:o?.shareScopeMap||{}})});else{const e=a||"default";Array.isArray(s)?s.forEach(e=>{c[e]||(c[e]={});const r=c[e];i.initShareScopeMap(e,r,{hostShareScopeMap:o?.shareScopeMap||{}})}):i.initShareScopeMap(e,t,{hostShareScopeMap:o?.shareScopeMap||{}})}return r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),Array.isArray(a)?Boolean(r.federation.initOptions.shared)?r.I(a,n):Promise.all(a.map(e=>r.I(e,n))).then(()=>!0):r.I(a||"default",n)},init:function({webpackRequire:e}){const{initOptions:r,runtime:n,sharedFallback:a,bundlerRuntime:o,libraryType:i}=e.federation;if(!r)throw new Error("initOptions is required!");{const n=function(){return{name:"tree-shake-plugin",beforeInit(r){const{userOptions:n,origin:s,options:c}=r,l=n.version||c.version;if(!a)return r;const u=n.shared||{},d=[];Object.keys(u).forEach(r=>{(Array.isArray(u[r])?u[r]:[u[r]]).forEach(t=>{d.push([r,t]),"get"in t&&(t.treeShaking||={},t.treeShaking.get=t.get,t.get=o.getSharedFallbackGetter({shareKey:r,factory:t.get,webpackRequire:e,libraryType:i,version:t.version}))})});const h=k.global.getGlobalSnapshotInfoByModuleInfo({name:s.name,version:l});return h&&"shared"in h?(Object.keys(c.shared||{}).forEach(e=>{c.shared[e].forEach(r=>{d.push([e,r])})}),d.forEach(([e,r])=>{((e,r)=>{const n=h.shared.find(r=>r.sharedName===e);if(!n)return;const{treeShaking:a}=r;if(!a)return;const{secondarySharedTreeShakingName:o,secondarySharedTreeShakingEntry:c,treeShakingStatus:l}=n;a.status!==l&&(a.status=l,c&&i&&o&&(a.get=async()=>{const e=await(0,p.getRemoteEntry)({origin:s,remoteInfo:{name:o,entry:c,type:i,entryGlobalName:o,shareScope:"default"}});return await e.init(s,t.federation.bundlerRuntime),e.get()}))})(e,r)}),r):r}}};r.plugins||=[],r.plugins.push(n())}return n.init(r)},getSharedFallbackGetter:({shareKey:e,factory:r,version:t,webpackRequire:n,libraryType:a="global"})=>{const{runtime:o,instance:i,bundlerRuntime:s,sharedFallback:c}=n.federation;if(!c)return r;const l=c[e];if(!l)return r;const p=t?l.find(e=>e[1]===t):l[0];if(!p)throw new Error(`No fallback item found for shareKey: ${e} and version: ${t}`);return()=>o.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:p[2],entry:`${n.p}${p[0]}`,type:a,entryGlobalName:p[2],shareScope:"default"}}).then(r=>{if(!r)throw new Error(`Failed to load fallback entry for shareKey: ${e} and version: ${t}`);return r.init(n.federation.instance,s).then(()=>r.get())})}},w={runtime:n,instance:void 0,initOptions:void 0,bundlerRuntime:_,attachShareScopeMap:a,bundlerRuntimeOptions:{}};if(!t.federation.runtime||!t.federation.bundlerRuntime){var I=t.federation;for(var T in t.federation={},w)t.federation[T]=w[T];for(var T in I)t.federation[T]=I[T]}t.federation.instance||(t.federation.instance=t.federation.bundlerRuntime.init({webpackRequire:t}),t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),t.federation.installInitialConsumes&&t.federation.installInitialConsumes())},9421(e,r,t){var n={"./start":()=>Promise.all([t.e(31),t.e(435),t.e(410)]).then(()=>()=>t(5410))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),o=(e,r,n)=>t.federation.bundlerRuntime.initContainerEntry({webpackRequire:t,shareScope:e,initScope:r,remoteEntryInitOptions:n,shareScopeKey:"default"});t.d(r,{get:()=>a,init:()=>o})}},s={};function c(e){var r=s[e];if(void 0!==r)return r.exports;var t=s[e]={exports:{}},n={id:e,module:t,factory:i[e],require:c};return c.i.forEach(function(e){e(n)}),t=n.module,n.factory.call(t.exports,t,t.exports,n.require),t.exports}c.m=i,c.c=s,c.i=[],c.x=e=>{},c.federation||(c.federation={initOptions:{name:"@ampath/esm-reports-app",remotes:[],shareStrategy:"version-first"},chunkMatcher:function(e){return!/^(31|435|680|987)$/.test(e)},rootOutputDir:"",bundlerRuntimeOptions:{remotes:{remoteInfos:{},webpackRequire:c,idToRemoteMap:{},chunkMapping:{},idToExternalAndNameMapping:{}}}},c.consumesLoadingData={},c.remotesLoadingData={}),c.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return c.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.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 a=Object.create(null);c.r(a);var o={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(e=>o[e]=()=>t[e]);return o.default=()=>t,c.d(a,o),a},c.d=(e,r)=>{for(var t in r)c.o(r,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((r,t)=>(c.f[t](e,r),r),[])),c.u=e=>e+".js",c.miniCssF=e=>e+".css",c.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@ampath/esm-reports-app:",c.l=(e,r,a,o)=>{if(t[e])t[e].push(r);else{var i,s;if(void 0!==a)for(var l=document.getElementsByTagName("script"),p=0;p<l.length;p++){var u=l[p];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+a){i=u;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack",n+a),i.src=e),t[e]=[r];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),r)return r(n)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),s&&document.head.appendChild(i)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{c.S={};var e={},r={};c.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];c.o(c.S,t)||(c.S[t]={});var o=c.S[t],i="@ampath/esm-reports-app",s=(e,r,t,n)=>{var a=o[e]=o[e]||{},s=a[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(a[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","11.0.1-pre.5776",()=>Promise.all([c.e(961),c.e(600),c.e(478),c.e(295),c.e(31),c.e(680),c.e(435),c.e(987)]).then(()=>()=>c(9295))),s("dayjs","1.11.20",()=>c.e(353).then(()=>()=>c(4353))),s("react-i18next","16.6.6",()=>Promise.all([c.e(478),c.e(311),c.e(31)]).then(()=>()=>c(3311))),s("react-router-dom","6.30.3",()=>Promise.all([c.e(961),c.e(282),c.e(31)]).then(()=>()=>c(282))),s("react","18.3.1",()=>c.e(540).then(()=>()=>c(6540)))),e[t]=l.length?Promise.all(l).then(()=>e[t]=1):1}}})(),(()=>{c.federation.initOptions.shared={"@openmrs/esm-framework":[{version:"11.0.1-pre.5776",get:()=>Promise.all([c.e(961),c.e(600),c.e(478),c.e(295),c.e(31),c.e(680),c.e(435),c.e(987)]).then(()=>()=>c(9295)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"*",strictVersion:!1,singleton:!0,layer:null}}],dayjs:[{version:"1.11.20",get:()=>c.e(353).then(()=>()=>c(4353)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"1.x",strictVersion:!1,singleton:!0,layer:null}}],"react-i18next":[{version:"16.6.6",get:()=>Promise.all([c.e(478),c.e(311),c.e(31)]).then(()=>()=>c(3311)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"16.x",strictVersion:!1,singleton:!0,layer:null}}],"react-router-dom":[{version:"6.30.3",get:()=>Promise.all([c.e(961),c.e(282),c.e(31)]).then(()=>()=>c(282)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"6.x",strictVersion:!1,singleton:!0,layer:null}}],react:[{version:"18.3.1",get:()=>c.e(540).then(()=>()=>c(6540)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"18.x",strictVersion:!1,singleton:!0,layer:null}}]},c.S={};var e={},r={};c.I=(t,n)=>c.federation.bundlerRuntime.I({shareScopeName:t,webpackRequire:c,initPromises:e,initTokens:r,initScope:n})})(),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})(),(()=>{var e={};c.consumesLoadingData.moduleIdToConsumeDataMapping={6031:{fallback:()=>c.e(540).then(()=>()=>c(6540)),shareScope:["default"],singleton:!0,requiredVersion:"18.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"react"},6435:{fallback:()=>Promise.all([c.e(961),c.e(282)]).then(()=>()=>c(282)),shareScope:["default"],singleton:!0,requiredVersion:"6.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"react-router-dom"},7693:{fallback:()=>Promise.all([c.e(961),c.e(600),c.e(478),c.e(295),c.e(680),c.e(987)]).then(()=>()=>c(9295)),shareScope:["default"],singleton:!0,requiredVersion:"*",strictVersion:!1,eager:!1,layer:void 0,shareKey:"@openmrs/esm-framework"},7680:{fallback:()=>c.e(353).then(()=>()=>c(4353)),shareScope:["default"],singleton:!0,requiredVersion:"1.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"dayjs"},3987:{fallback:()=>c.e(311).then(()=>()=>c(3311)),shareScope:["default"],singleton:!0,requiredVersion:"16.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"react-i18next"}};var r={};c.consumesLoadingData.chunkMapping={31:[6031],410:[7693],435:[6435],680:[7680],987:[3987]},c.f.consumes=(t,n)=>{c.federation.bundlerRuntime.consumes({chunkMapping:c.consumesLoadingData.chunkMapping,installedModules:e,chunkId:t,moduleToHandlerMapping:r,promises:n,webpackRequire:c})}})(),(()=>{if("undefined"!=typeof document){var e={462:0};c.f.miniCss=(r,t)=>{e[r]?t.push(e[r]):0!==e[r]&&{295:1,919:1}[r]&&t.push(e[r]=(e=>new Promise((r,t)=>{var n=c.miniCssF(e),a=c.p+n;if(((e,r)=>{for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var a=(i=t[n]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(a===e||a===r))return i}var o=document.getElementsByTagName("style");for(n=0;n<o.length;n++){var i;if((a=(i=o[n]).getAttribute("data-href"))===e||a===r)return i}})(n,a))return r();((e,r,t,n,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",c.nc&&(o.nonce=c.nc),o.onerror=o.onload=t=>{if(o.onerror=o.onload=null,"load"===t.type)n();else{var i=t&&t.type,s=t&&t.target&&t.target.href||r,c=new Error("Loading CSS chunk "+e+" failed.\n("+i+": "+s+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=i,c.request=s,o.parentNode&&o.parentNode.removeChild(o),a(c)}},o.href=r,document.head.appendChild(o)})(e,a,0,r,t)}))(r).then(()=>{e[r]=0},t=>{throw delete e[r],t}))}}})(),a=c.x,o=!1,c.x=()=>{if(o||(o=!0,c(2464)),"function"==typeof a)return a();console.warn("[Module Federation] prevStartup is not a function, skipping startup execution")},(()=>{var e={462:0};c.f.j=(r,t)=>{var n=c.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(31|435|680|987)$/.test(r))e[r]=0;else{var a=new Promise((t,a)=>n=e[r]=[t,a]);t.push(n[2]=a);var o=c.p+c.u(r),i=new Error;c.l(o,t=>{if(c.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,s]=t,l=0;if(o.some(r=>0!==e[r])){for(n in i)c.o(i,n)&&(c.m[n]=i[n]);s&&s(c)}for(r&&r(t);l<o.length;l++)a=o[l],c.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_ampath_esm_reports_app=self.webpackChunk_ampath_esm_reports_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),c.x();var l=c(9421);_ampath_esm_reports_app=l})();
|
|
1
|
+
var _ampath_esm_reports_app;!function(){var e="undefined"!=typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw new Error("@ampath/esm-reports-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var r=e._FEDERATION_RUNTIME_CORE_FROM;r&&r.version&&"2.8"!==String(r.version).split(".").slice(0,2).join(".")&&console.warn("@ampath/esm-reports-app was built against Module Federation 2.8.x but the app shell provides "+r.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{"use strict";var e,r,t,n,a,o,i={2464(e,r,t){var n={};function a(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}t.r(n),t.d(n,{Module:()=>p.Module,ModuleFederation:()=>p.ModuleFederation,createInstance:()=>h,getInstance:()=>M,getRemoteEntry:()=>p.getRemoteEntry,getRemoteInfo:()=>p.getRemoteInfo,init:()=>m,loadRemote:()=>g,loadScript:()=>p.loadScript,loadScriptNode:()=>p.loadScriptNode,loadShare:()=>y,loadShareSync:()=>S,preloadRemote:()=>b,registerGlobalPlugins:()=>p.registerGlobalPlugins,registerPlugins:()=>E,registerRemotes:()=>v,registerShared:()=>R});const o=["script"];function i(e){const{webpackRequire:r,moduleToHandlerMapping:t}=e,{consumesLoadingData:n,initializeSharingData:a}=r,{sharedFallback:o,bundlerRuntime:i,libraryType:s}=r.federation;if(n&&!n._updated){const{moduleIdToConsumeDataMapping:a={},initialConsumes:c=[],chunkMapping:l={}}=n;if(Object.entries(a).forEach(([e,n])=>{t[e]||(t[e]={getter:o?i?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:r,libraryType:s}):n.fallback,treeShakingGetter:o?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:o?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){const{initialConsumes:r=[]}=e;c.forEach(e=>{r.includes(e)||r.push(e)})}if("chunkMapping"in e){const{chunkMapping:r={}}=e;Object.entries(l).forEach(([e,t])=>{r[e]||(r[e]=[]),t.forEach(t=>{r[e].includes(t)||r[e].push(t)})})}n._updated=1}if(a&&!a._updated){const{federation:e}=r;if(!e.instance||!a.scopeToSharingDataMapping)return;const t={};for(let[e,r]of Object.entries(a.scopeToSharingDataMapping))for(let n of r)if("object"==typeof n&&null!==n){const{name:r,version:a,factory:o,eager:i,singleton:s,requiredVersion:c,strictVersion:l}=n,p={requiredVersion:`^${a}`},u=function(e){return void 0!==e};u(s)&&(p.singleton=s),u(c)&&(p.requiredVersion=c),u(i)&&(p.eager=i),u(l)&&(p.strictVersion=l);const d={version:a,scope:[e],shareConfig:p,get:o};t[r]?t[r].push(d):t[r]=[d]}e.instance.registerShared(t),a._updated=1}}const s=self._OPENMRS_FEDERATION_SDK;function c(e,r){const t=e.federation.usedExports;if(t)return t[r]}const l="RUNTIME-012",p=self._FEDERATION_RUNTIME_CORE;function u(e,r){return p.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(t=>!("@ampath/esm-reports-app:1.0.0-next.72"!==t.options.id&&(t.options.name!==e||t.options.version||r)&&(t.options.name!==e||!r||t.options.version!==r)))}const d=self._OPENMRS_FEDERATION_ERROR_CODES;function h(e){const r=new((0,p.getGlobalFederationConstructor)()||p.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,p.setGlobalFederationInstance)(r),r}let f=null;function m(e){const r=u(e.name,e.version),t={...e,id:e.id||""};return r?(r.initOptions(t),f||(f=r),r):(f=h(t),f)}function g(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.loadRemote.apply(f,e)}function y(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.loadShare.apply(f,e)}function S(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.loadShareSync.apply(f,e)}function b(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.preloadRemote.apply(f,e)}function v(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.registerRemotes.apply(f,e)}function E(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.registerPlugins.apply(f,e)}function M(e){return e?p.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:f}function R(...e){return(0,p.assert)(f,d.RUNTIME_009,d.runtimeDescMap),f.registerShared.apply(f,e)}(0,p.setGlobalFederationConstructor)(p.ModuleFederation);const k={global:{...p.helpers.global,getGlobalFederationInstance:u},share:p.helpers.share,utils:p.helpers.utils},_={remotes:function(e){!function(e){const{webpackRequire:r,idToExternalAndNameMapping:t={},idToRemoteMap:n={},chunkMapping:a={}}=e,{remotesLoadingData:o}=r,i=r.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!o||o._updated||!i)return;const{chunkMapping:s,moduleIdToRemoteDataMapping:c}=o;if(s&&c){for(let[e,r]of Object.entries(c))if(t[e]||(t[e]=[r.shareScope,r.name,r.externalModuleId]),!n[e]&&i[r.remoteName]){const t=i[r.remoteName];n[e]||=[],t.forEach(r=>{n[e].includes(r)||n[e].push(r)})}a&&Object.entries(s).forEach(([e,r])=>{a[e]||(a[e]=[]),r.forEach(r=>{a[e].includes(r)||a[e].push(r)})}),o._updated=1}}(e);const{chunkId:r,promises:t,webpackRequire:n,chunkMapping:i,idToExternalAndNameMapping:c,idToRemoteMap:l}=e;a(n),n.o(i,r)&&i[r].forEach(e=>{let r=n.R;r||(r=[]);const a=c[e],i=l[e]||[];if(r.indexOf(a)>=0)return;if(r.push(a),a.p)return t.push(a.p);const p=r=>{r||(r=new Error("Container missing")),"string"==typeof r.message&&(r.message+=`\nwhile loading "${a[1]}" from ${a[2]}`),n.m[e]=()=>{throw r},a.p=0},u=(e,r,n,o,i,s)=>{try{const c=e(r,n);if(!c||!c.then)return i(c,o,s);{const e=c.then(e=>i(e,o),p);if(!s)return e;t.push(a.p=e)}}catch(e){p(e)}};var d=(e,t,n)=>u(t.get,a[1],r,0,h,n),h=r=>{a.p=1,n.m[e]=e=>{e.exports=r()}};1===i.length&&o.includes(i[0].externalType)&&i[0].name?u(()=>{try{const e=(0,s.decodeName)(i[0].name,s.ENCODE_NAME_PREFIX)+a[1].slice(1),r=n.federation.instance,t=()=>n.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===r.options.shareStrategy){const e=Array.isArray(a[0])?a[0]:[a[0]];return Promise.all(e.map(e=>r.sharedHandler.initializeSharing(e))).then(()=>t())}return t()}catch(e){p(e)}},a[2],0,0,h,1):u(n,a[2],0,0,(e,r,t)=>e?u(n.I,a[0],0,e,d,t):p(),1)})},consumes:function(e){i(e);const{chunkId:r,promises:t,installedModules:n,webpackRequire:o,chunkMapping:s,moduleToHandlerMapping:p}=e;a(o),o.o(s,r)&&s[r].forEach(e=>{if(o.o(n,e))return t.push(n[e]);const r=r=>{n[e]=0,o.m[e]=t=>{delete o.c[e];const n=r(),{shareInfo:a}=p[e];if(a?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=a.shareConfig.layer)}catch(e){}t.exports=n}},a=r=>{delete n[e],o.m[e]=t=>{throw delete o.c[e],r}};try{const i=o.federation.instance;if(!i)throw new Error("Federation instance not found!");const{shareKey:s,getter:u,shareInfo:d,treeShakingGetter:h}=p[e],f=c(o,s),m={...d};Array.isArray(m.scope)&&Array.isArray(m.scope[0])&&(m.scope=m.scope[0]),f&&(m.treeShaking={usedExports:f,useIn:[i.options.name]});const g=i.loadShare(s,{customShareInfo:m}).then(e=>{if(!1===e){if("function"!=typeof u)throw new Error(((e,r,t)=>{const n=[`${[r[e]]} #${e}`];return t&&n.push(`args: ${JSON.stringify(t)}`),n.push((e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`)(e)),n.join("\n")})(l,{[l]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:s}));return h?.()||u()}return e});g.then?t.push(n[e]=g.then(r).catch(a)):r(g)}catch(e){a(e)}})},I:function({shareScopeName:e,webpackRequire:r,initPromises:t,initTokens:n,initScope:i}){const s=Array.isArray(e)?e:[e];var c=[];return s.forEach(s=>{c.push(function(s){i||(i=[]);const c=r.federation.instance;var l=n[s];if(l||(l=n[s]={from:c.name}),i.indexOf(l)>=0)return;i.push(l);const p=t[s];if(p)return p;var u=t=>{var n=e=>{return r="Initialization of sharing external failed: "+e,"undefined"!=typeof console&&console.warn&&console.warn(r);var r};try{var a=r(t);if(!a)return;var o=t=>t&&t.init&&t.init(r.S[s],i,{shareScopeMap:r.S||{},shareScopeKeys:e});if(a.then)return d.push(a.then(o,n));var c=o(a);if(c&&"boolean"!=typeof c&&c.then)return d.push(c.catch(n))}catch(e){n(e)}};const d=c.initializeSharing(s,{strategy:c.options.shareStrategy,initScope:i,from:"build"});a(r);const h=r.federation.bundlerRuntimeOptions.remotes;return h&&Object.keys(h.idToRemoteMap).forEach(e=>{const r=h.idToRemoteMap[e],t=h.idToExternalAndNameMapping[e][2];if(r.length>1)u(t);else if(1===r.length){const e=r[0];o.includes(e.externalType)||u(t)}}),d.length?t[s]=Promise.all(d).then(()=>t[s]=!0):t[s]=!0}(s))}),Promise.all(c).then(()=>!0)},S:{},installInitialConsumes:function(e){i(e);const{moduleToHandlerMapping:r,webpackRequire:t,installedModules:n,initialConsumes:a,asyncLoad:o}=e,s=[];a.forEach(e=>{s.push([e,()=>function(e){const{moduleId:r,moduleToHandlerMapping:t,webpackRequire:n,asyncLoad:a}=e,o=n.federation.instance;if(!o)throw new Error("Federation instance not found!");const{shareKey:i,shareInfo:s}=t[r];try{const e=c(n,i),r={...s};return e&&(r.treeShaking={usedExports:e,useIn:[o.options.name]}),a?o.loadShare(i,{customShareInfo:r}):o.loadShareSync(i,{customShareInfo:r})}catch(e){throw console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.'),console.error("The original error message is as follows: "),e}}({moduleId:e,moduleToHandlerMapping:r,webpackRequire:t,asyncLoad:o})])});const l=(e,a)=>{t.m[e]=o=>{n[e]=0,delete t.c[e];const i=a();if("function"!=typeof i)throw new Error(`Shared module is not available for eager consumption: ${e}`);const s=i(),{shareInfo:c}=r[e];if(c?.shareConfig?.layer&&s&&"object"==typeof s)try{s.hasOwnProperty("layer")&&void 0!==s.layer||(s.layer=c.shareConfig.layer)}catch(e){}o.exports=s}};if(o)return Promise.all(s.map(async([e,r])=>{const t=await r();l(e,()=>t)}));s.forEach(([e,r])=>{l(e,r)})},initContainerEntry:function(e){const{webpackRequire:r,shareScope:t,initScope:n,shareScopeKey:a,remoteEntryInitOptions:o}=e;if(!r.S)return;if(!r.federation||!r.federation.instance||!r.federation.initOptions)return;const i=r.federation.instance;i.initOptions({name:r.federation.initOptions.name,remotes:[],...o});const s=o?.shareScopeKeys,c=o?.shareScopeMap;if(a&&"string"!=typeof a)a.forEach(e=>{if(!s||!c)return void i.initShareScopeMap(e,t,{hostShareScopeMap:o?.shareScopeMap||{}});c[e]||(c[e]={});const r=c[e];i.initShareScopeMap(e,r,{hostShareScopeMap:o?.shareScopeMap||{}})});else{const e=a||"default";Array.isArray(s)?s.forEach(e=>{c[e]||(c[e]={});const r=c[e];i.initShareScopeMap(e,r,{hostShareScopeMap:o?.shareScopeMap||{}})}):i.initShareScopeMap(e,t,{hostShareScopeMap:o?.shareScopeMap||{}})}return r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),Array.isArray(a)?Boolean(r.federation.initOptions.shared)?r.I(a,n):Promise.all(a.map(e=>r.I(e,n))).then(()=>!0):r.I(a||"default",n)},init:function({webpackRequire:e}){const{initOptions:r,runtime:n,sharedFallback:a,bundlerRuntime:o,libraryType:i}=e.federation;if(!r)throw new Error("initOptions is required!");{const n=function(){return{name:"tree-shake-plugin",beforeInit(r){const{userOptions:n,origin:s,options:c}=r,l=n.version||c.version;if(!a)return r;const u=n.shared||{},d=[];Object.keys(u).forEach(r=>{(Array.isArray(u[r])?u[r]:[u[r]]).forEach(t=>{d.push([r,t]),"get"in t&&(t.treeShaking||={},t.treeShaking.get=t.get,t.get=o.getSharedFallbackGetter({shareKey:r,factory:t.get,webpackRequire:e,libraryType:i,version:t.version}))})});const h=k.global.getGlobalSnapshotInfoByModuleInfo({name:s.name,version:l});return h&&"shared"in h?(Object.keys(c.shared||{}).forEach(e=>{c.shared[e].forEach(r=>{d.push([e,r])})}),d.forEach(([e,r])=>{((e,r)=>{const n=h.shared.find(r=>r.sharedName===e);if(!n)return;const{treeShaking:a}=r;if(!a)return;const{secondarySharedTreeShakingName:o,secondarySharedTreeShakingEntry:c,treeShakingStatus:l}=n;a.status!==l&&(a.status=l,c&&i&&o&&(a.get=async()=>{const e=await(0,p.getRemoteEntry)({origin:s,remoteInfo:{name:o,entry:c,type:i,entryGlobalName:o,shareScope:"default"}});return await e.init(s,t.federation.bundlerRuntime),e.get()}))})(e,r)}),r):r}}};r.plugins||=[],r.plugins.push(n())}return n.init(r)},getSharedFallbackGetter:({shareKey:e,factory:r,version:t,webpackRequire:n,libraryType:a="global"})=>{const{runtime:o,instance:i,bundlerRuntime:s,sharedFallback:c}=n.federation;if(!c)return r;const l=c[e];if(!l)return r;const p=t?l.find(e=>e[1]===t):l[0];if(!p)throw new Error(`No fallback item found for shareKey: ${e} and version: ${t}`);return()=>o.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:p[2],entry:`${n.p}${p[0]}`,type:a,entryGlobalName:p[2],shareScope:"default"}}).then(r=>{if(!r)throw new Error(`Failed to load fallback entry for shareKey: ${e} and version: ${t}`);return r.init(n.federation.instance,s).then(()=>r.get())})}},w={runtime:n,instance:void 0,initOptions:void 0,bundlerRuntime:_,attachShareScopeMap:a,bundlerRuntimeOptions:{}};if(!t.federation.runtime||!t.federation.bundlerRuntime){var I=t.federation;for(var T in t.federation={},w)t.federation[T]=w[T];for(var T in I)t.federation[T]=I[T]}t.federation.instance||(t.federation.instance=t.federation.bundlerRuntime.init({webpackRequire:t}),t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),t.federation.installInitialConsumes&&t.federation.installInitialConsumes())},9421(e,r,t){var n={"./start":()=>Promise.all([t.e(31),t.e(435),t.e(410)]).then(()=>()=>t(5410))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),o=(e,r,n)=>t.federation.bundlerRuntime.initContainerEntry({webpackRequire:t,shareScope:e,initScope:r,remoteEntryInitOptions:n,shareScopeKey:"default"});t.d(r,{get:()=>a,init:()=>o})}},s={};function c(e){var r=s[e];if(void 0!==r)return r.exports;var t=s[e]={exports:{}},n={id:e,module:t,factory:i[e],require:c};return c.i.forEach(function(e){e(n)}),t=n.module,n.factory.call(t.exports,t,t.exports,n.require),t.exports}c.m=i,c.c=s,c.i=[],c.x=e=>{},c.federation||(c.federation={initOptions:{name:"@ampath/esm-reports-app",remotes:[],shareStrategy:"version-first"},chunkMatcher:function(e){return!/^(31|435|680|987)$/.test(e)},rootOutputDir:"",bundlerRuntimeOptions:{remotes:{remoteInfos:{},webpackRequire:c,idToRemoteMap:{},chunkMapping:{},idToExternalAndNameMapping:{}}}},c.consumesLoadingData={},c.remotesLoadingData={}),c.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return c.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.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 a=Object.create(null);c.r(a);var o={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(e=>o[e]=()=>t[e]);return o.default=()=>t,c.d(a,o),a},c.d=(e,r)=>{for(var t in r)c.o(r,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((r,t)=>(c.f[t](e,r),r),[])),c.u=e=>e+".js",c.miniCssF=e=>e+".css",c.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@ampath/esm-reports-app:",c.l=(e,r,a,o)=>{if(t[e])t[e].push(r);else{var i,s;if(void 0!==a)for(var l=document.getElementsByTagName("script"),p=0;p<l.length;p++){var u=l[p];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+a){i=u;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack",n+a),i.src=e),t[e]=[r];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),r)return r(n)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),s&&document.head.appendChild(i)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{c.S={};var e={},r={};c.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];c.o(c.S,t)||(c.S[t]={});var o=c.S[t],i="@ampath/esm-reports-app",s=(e,r,t,n)=>{var a=o[e]=o[e]||{},s=a[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(a[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","11.0.1-pre.5776",()=>Promise.all([c.e(961),c.e(600),c.e(478),c.e(295),c.e(31),c.e(680),c.e(435),c.e(987)]).then(()=>()=>c(9295))),s("dayjs","1.11.20",()=>c.e(353).then(()=>()=>c(4353))),s("react-i18next","16.6.6",()=>Promise.all([c.e(478),c.e(311),c.e(31)]).then(()=>()=>c(3311))),s("react-router-dom","6.30.3",()=>Promise.all([c.e(961),c.e(282),c.e(31)]).then(()=>()=>c(282))),s("react","18.3.1",()=>c.e(540).then(()=>()=>c(6540)))),e[t]=l.length?Promise.all(l).then(()=>e[t]=1):1}}})(),(()=>{c.federation.initOptions.shared={"@openmrs/esm-framework":[{version:"11.0.1-pre.5776",get:()=>Promise.all([c.e(961),c.e(600),c.e(478),c.e(295),c.e(31),c.e(680),c.e(435),c.e(987)]).then(()=>()=>c(9295)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"*",strictVersion:!1,singleton:!0,layer:null}}],dayjs:[{version:"1.11.20",get:()=>c.e(353).then(()=>()=>c(4353)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"1.x",strictVersion:!1,singleton:!0,layer:null}}],"react-i18next":[{version:"16.6.6",get:()=>Promise.all([c.e(478),c.e(311),c.e(31)]).then(()=>()=>c(3311)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"16.x",strictVersion:!1,singleton:!0,layer:null}}],"react-router-dom":[{version:"6.30.3",get:()=>Promise.all([c.e(961),c.e(282),c.e(31)]).then(()=>()=>c(282)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"6.x",strictVersion:!1,singleton:!0,layer:null}}],react:[{version:"18.3.1",get:()=>c.e(540).then(()=>()=>c(6540)),scope:["default"],shareConfig:{eager:!1,requiredVersion:"18.x",strictVersion:!1,singleton:!0,layer:null}}]},c.S={};var e={},r={};c.I=(t,n)=>c.federation.bundlerRuntime.I({shareScopeName:t,webpackRequire:c,initPromises:e,initTokens:r,initScope:n})})(),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})(),(()=>{var e={};c.consumesLoadingData.moduleIdToConsumeDataMapping={6031:{fallback:()=>c.e(540).then(()=>()=>c(6540)),shareScope:["default"],singleton:!0,requiredVersion:"18.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"react"},6435:{fallback:()=>Promise.all([c.e(961),c.e(282)]).then(()=>()=>c(282)),shareScope:["default"],singleton:!0,requiredVersion:"6.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"react-router-dom"},7693:{fallback:()=>Promise.all([c.e(961),c.e(600),c.e(478),c.e(295),c.e(680),c.e(987)]).then(()=>()=>c(9295)),shareScope:["default"],singleton:!0,requiredVersion:"*",strictVersion:!1,eager:!1,layer:void 0,shareKey:"@openmrs/esm-framework"},7680:{fallback:()=>c.e(353).then(()=>()=>c(4353)),shareScope:["default"],singleton:!0,requiredVersion:"1.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"dayjs"},3987:{fallback:()=>c.e(311).then(()=>()=>c(3311)),shareScope:["default"],singleton:!0,requiredVersion:"16.x",strictVersion:!1,eager:!1,layer:void 0,shareKey:"react-i18next"}};var r={};c.consumesLoadingData.chunkMapping={31:[6031],410:[7693],435:[6435],680:[7680],987:[3987]},c.f.consumes=(t,n)=>{c.federation.bundlerRuntime.consumes({chunkMapping:c.consumesLoadingData.chunkMapping,installedModules:e,chunkId:t,moduleToHandlerMapping:r,promises:n,webpackRequire:c})}})(),(()=>{if("undefined"!=typeof document){var e={462:0};c.f.miniCss=(r,t)=>{e[r]?t.push(e[r]):0!==e[r]&&{295:1,500:1}[r]&&t.push(e[r]=(e=>new Promise((r,t)=>{var n=c.miniCssF(e),a=c.p+n;if(((e,r)=>{for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var a=(i=t[n]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(a===e||a===r))return i}var o=document.getElementsByTagName("style");for(n=0;n<o.length;n++){var i;if((a=(i=o[n]).getAttribute("data-href"))===e||a===r)return i}})(n,a))return r();((e,r,t,n,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",c.nc&&(o.nonce=c.nc),o.onerror=o.onload=t=>{if(o.onerror=o.onload=null,"load"===t.type)n();else{var i=t&&t.type,s=t&&t.target&&t.target.href||r,c=new Error("Loading CSS chunk "+e+" failed.\n("+i+": "+s+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=i,c.request=s,o.parentNode&&o.parentNode.removeChild(o),a(c)}},o.href=r,document.head.appendChild(o)})(e,a,0,r,t)}))(r).then(()=>{e[r]=0},t=>{throw delete e[r],t}))}}})(),a=c.x,o=!1,c.x=()=>{if(o||(o=!0,c(2464)),"function"==typeof a)return a();console.warn("[Module Federation] prevStartup is not a function, skipping startup execution")},(()=>{var e={462:0};c.f.j=(r,t)=>{var n=c.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(31|435|680|987)$/.test(r))e[r]=0;else{var a=new Promise((t,a)=>n=e[r]=[t,a]);t.push(n[2]=a);var o=c.p+c.u(r),i=new Error;c.l(o,t=>{if(c.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,s]=t,l=0;if(o.some(r=>0!==e[r])){for(n in i)c.o(i,n)&&(c.m[n]=i[n]);s&&s(c)}for(r&&r(t);l<o.length;l++)a=o[l],c.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_ampath_esm_reports_app=self.webpackChunk_ampath_esm_reports_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),c.x();var l=c(9421);_ampath_esm_reports_app=l})();
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"ampath-reports-dashboard-link","component":"reportsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Reports Dashboard"],"meta":{"name":"reports","slot":"ampath-reports-dashboard-slot","title":"Reports"},"online":true,"offline":true},{"component":"root","name":"ampath-reports-dashboard-root","slot":"ampath-reports-dashboard-slot","privileges":["O3 View Reports Dashboard"]}],"pages":[],"version":"1.0.0-next.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"ampath-reports-dashboard-link","component":"reportsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Reports Dashboard"],"meta":{"name":"reports","slot":"ampath-reports-dashboard-slot","title":"Reports"},"online":true,"offline":true},{"component":"root","name":"ampath-reports-dashboard-root","slot":"ampath-reports-dashboard-slot","privileges":["O3 View Reports Dashboard"]}],"pages":[],"version":"1.0.0-next.72"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import styles from './moh-510.scss';
|
|
4
4
|
import { useSearchParams } from 'react-router-dom';
|
|
5
5
|
import { RegisterLayout, usePatientList } from '../../../../common/report-register';
|
|
6
|
-
import {
|
|
6
|
+
import { getMoh510PatientList } from '../../../../resources/moh-710.resource';
|
|
7
7
|
import { moh510ExportColumns } from './moh-510.columns';
|
|
8
8
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
9
9
|
import classNames from 'classnames';
|
|
@@ -16,7 +16,6 @@ const Moh510RegisterComponent: React.FC<Moh510RegisterComponentProps> = () => {
|
|
|
16
16
|
const endDate = searchParams.get('endDate');
|
|
17
17
|
const locationUuids = searchParams.get('locationUuids');
|
|
18
18
|
const indicator = searchParams.get('indicator');
|
|
19
|
-
const reportName = 'moh710Report';
|
|
20
19
|
|
|
21
20
|
const {
|
|
22
21
|
rows: patientlist,
|
|
@@ -29,14 +28,13 @@ const Moh510RegisterComponent: React.FC<Moh510RegisterComponentProps> = () => {
|
|
|
29
28
|
fetchAll,
|
|
30
29
|
} = usePatientList(
|
|
31
30
|
({ startIndex, limit }) =>
|
|
32
|
-
|
|
31
|
+
getMoh510PatientList({
|
|
33
32
|
startDate: startDate!,
|
|
34
33
|
endDate: endDate!,
|
|
35
34
|
locationUuids: locationUuids!,
|
|
36
35
|
indicator: indicator!,
|
|
37
36
|
startIndex,
|
|
38
37
|
limit,
|
|
39
|
-
reportName: reportName,
|
|
40
38
|
}),
|
|
41
39
|
[startDate, endDate, locationUuids, indicator],
|
|
42
40
|
);
|
|
@@ -138,7 +138,12 @@ const Moh711Report: React.FC = () => {
|
|
|
138
138
|
locationUuids={locationUuid!}
|
|
139
139
|
/>
|
|
140
140
|
<GBVComponent moh711Data={moh711Data} />
|
|
141
|
-
<FamilyPlanningComponent
|
|
141
|
+
<FamilyPlanningComponent
|
|
142
|
+
moh711Data={moh711Data}
|
|
143
|
+
startDate={startDate}
|
|
144
|
+
endDate={endDate}
|
|
145
|
+
locationUuids={locationUuid!}
|
|
146
|
+
/>
|
|
142
147
|
<CervicalCancerComponent
|
|
143
148
|
moh711Data={moh711Data}
|
|
144
149
|
startDate={startDate}
|
|
@@ -166,7 +171,12 @@ const Moh711Report: React.FC = () => {
|
|
|
166
171
|
<ChanisComponent moh711Data={moh711Data} />
|
|
167
172
|
<PhysiotherapyComponent moh711Data={moh711Data} />
|
|
168
173
|
<OtherComponent moh711Data={MaternityComponent} />
|
|
169
|
-
<TBScreeningComponent
|
|
174
|
+
<TBScreeningComponent
|
|
175
|
+
moh711Data={moh711Data}
|
|
176
|
+
startDate={startDate}
|
|
177
|
+
endDate={endDate}
|
|
178
|
+
locationUuids={locationUuid!}
|
|
179
|
+
/>
|
|
170
180
|
</div>
|
|
171
181
|
</div>
|
|
172
182
|
</ReportPage>
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { useSearchParams } from 'react-router-dom';
|
|
3
3
|
|
|
4
4
|
import styles from '../../../common/report-register/register-table.scss';
|
|
5
|
-
import { getMoh510PatientList } from '../../../resources/moh-711.resource';
|
|
6
5
|
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
6
|
+
import { getMoh510PatientList } from '../../../resources/moh-710.resource';
|
|
7
7
|
|
|
8
8
|
const Moh510Register: React.FC = () => {
|
|
9
9
|
const [searchParams] = useSearchParams();
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register/register-columns';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MOH 512 Family Planning (FP) Register as it prints: one column per cell, A to AS, in the
|
|
5
|
+
* order they appear. Values read the aliases of moh_512_patient_list_template.
|
|
6
|
+
*
|
|
7
|
+
* Columns without a corresponding template alias export blank until the template exposes
|
|
8
|
+
* the required field.
|
|
9
|
+
*/
|
|
10
|
+
export const moh512ExportColumns: RegisterColumn[] = [
|
|
11
|
+
{ header: 'Date (DD/MM/YYYY) - A', value: (row) => row.date ?? '' },
|
|
12
|
+
{ header: 'Client Number - B', value: (row) => row.cr_id ?? row.amrs_id ?? '' },
|
|
13
|
+
{ header: 'Name of Client - C', value: (row) => row.name_of_client ?? '' },
|
|
14
|
+
{ header: 'Client Type - D', value: (row) => row.client_type ?? '' },
|
|
15
|
+
{ header: '1st Ever User of Contraceptive - E', value: (row) => row.first_ever_use_of_contraceptive ?? '' },
|
|
16
|
+
{ header: 'Age - F', value: (row) => row.age ?? '' },
|
|
17
|
+
{ header: 'Sex - G', value: (row) => row.sex ?? '' },
|
|
18
|
+
{ header: 'Disability Status - H', value: (row) => row.disability_status ?? '' },
|
|
19
|
+
{ header: 'Telephone Number - I', value: (row) => row.phone_number ?? '' },
|
|
20
|
+
{ header: 'Village / Estate / Landmark - J', value: (row) => row.village_estate_landmark ?? '' },
|
|
21
|
+
{ header: 'Counselled for FP - K', value: (row) => row.counselled_on_fp ?? '' },
|
|
22
|
+
|
|
23
|
+
// Combined oral contraceptive pills
|
|
24
|
+
{
|
|
25
|
+
header: 'COC Type of Visit - L',
|
|
26
|
+
value: (row) => row.type_of_visit_for_method_combined_oral_contraceptive ?? '',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
header: 'COC Qty Disp. (Cycles) - M',
|
|
30
|
+
value: (row) => row.quantity_dispensed_combined_oral_contraceptive ?? '',
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// Progestin only pills
|
|
34
|
+
{ header: 'POP Type of Visit - N', value: (row) => row.type_of_visit_for_method_progestine ?? '' },
|
|
35
|
+
{ header: 'POP Qty Disp. (Cycles) - O', value: (row) => row.quantity_dispensed_progestine ?? '' },
|
|
36
|
+
|
|
37
|
+
// Emergency contraceptive pill
|
|
38
|
+
{
|
|
39
|
+
header: 'Emergency Contraceptive Doses Disp. - P',
|
|
40
|
+
value: (row) => row.quantity_dispensed_emergency_contraceptive_pills ?? '',
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
// Injectables (DMPA)
|
|
44
|
+
{ header: 'Injectables Type of Visit - Q', value: () => '' },
|
|
45
|
+
{ header: 'DMPA IM Qty Disp. (Vials) - R', value: () => '' },
|
|
46
|
+
{ header: 'DMPA SC Qty Disp. (Vials) - S', value: () => '' },
|
|
47
|
+
|
|
48
|
+
// Implants: the register has one type-of-visit column for all implants
|
|
49
|
+
{
|
|
50
|
+
header: 'Implants Type of Visit - T',
|
|
51
|
+
value: (row) => row.type_of_visit_for_method_1_rod ?? row.type_of_visit_for_method_2_rod ?? '',
|
|
52
|
+
},
|
|
53
|
+
{ header: 'Qty Disp. 1 Rod (Sets) - U', value: (row) => row.quantity_dispensed_1_rod ?? '' },
|
|
54
|
+
{ header: 'Qty Disp. 2 Rods, 3 yrs (Sets) - V', value: () => '' },
|
|
55
|
+
{ header: 'Qty Disp. 2 Rods, 5 yrs (Sets) - W', value: () => '' },
|
|
56
|
+
|
|
57
|
+
// IUDs
|
|
58
|
+
{ header: 'IUD Type of Visit - X', value: (row) => row.type_of_visit_for_method_iud ?? '' },
|
|
59
|
+
{ header: 'IUD Qty Disp. Non-Hormonal (Sets) - Y', value: (row) => row.quantity_dispensed_non_hormonal ?? '' },
|
|
60
|
+
{ header: 'IUD Qty Disp. Hormonal (Sets) - Z', value: (row) => row.quantity_dispensed_hormonal ?? '' },
|
|
61
|
+
{ header: 'Reasons for LARC Removal - AA', value: (row) => row.reason_for_larc_removal ?? '' },
|
|
62
|
+
|
|
63
|
+
// Condoms
|
|
64
|
+
{ header: 'Condom Clients - AB', value: (row) => row.type_of_condom ?? '' },
|
|
65
|
+
{ header: 'Qty Disp. Male Condoms - AC', value: (row) => row.quantity_dispensed_male_condoms ?? '' },
|
|
66
|
+
{ header: 'Qty Disp. Female Condoms - AD', value: (row) => row.quantity_dispensed_female_condoms ?? '' },
|
|
67
|
+
|
|
68
|
+
{ header: 'VSC (BTL or Vasectomy) - AE', value: (row) => row.voluntary_surgical_contraception ?? '' },
|
|
69
|
+
|
|
70
|
+
// Natural FP
|
|
71
|
+
{ header: 'Counselled on Natural FP - AF', value: (row) => row.counseled_on_natural_fp ?? '' },
|
|
72
|
+
{ header: 'Cycle Beads Given - AG', value: (row) => row.given_cycle_beads ?? '' },
|
|
73
|
+
|
|
74
|
+
{ header: 'Timing of PPFP - AH', value: (row) => row.received_post_partum_fp ?? '' },
|
|
75
|
+
{ header: 'TB Screening - AI', value: (row) => row.tb_screening ?? '' },
|
|
76
|
+
|
|
77
|
+
// HIV testing
|
|
78
|
+
{ header: 'Counselled for HIV - AJ', value: (row) => row.counselled_on_hiv ?? '' },
|
|
79
|
+
{ header: 'Counselled and Tested for HIV - AK', value: (row) => row.tested_for_hiv ?? '' },
|
|
80
|
+
{ header: 'HIV Status - AL', value: (row) => row.hiv_results ?? '' },
|
|
81
|
+
|
|
82
|
+
{ header: 'IPV or Reproductive Coercion - AM', value: (row) => row.intimate_partner_violence ?? '' },
|
|
83
|
+
|
|
84
|
+
// Cervical cancer screening
|
|
85
|
+
{ header: 'Cervical Cancer Screened - AN', value: (row) => row.screened_for_cervical_cancer ?? '' },
|
|
86
|
+
{ header: 'Cervical Cancer Results - AO', value: (row) => row.cervical_cancer_screening_result ?? '' },
|
|
87
|
+
|
|
88
|
+
// Referrals
|
|
89
|
+
{ header: 'Referral From - AP', value: (row) => row.referral_from ?? '' },
|
|
90
|
+
{ header: 'Referral To - AQ', value: (row) => row.referral_to ?? '' },
|
|
91
|
+
{ header: 'Reason for Referral - AR', value: (row) => row.reason_for_referral ?? '' },
|
|
92
|
+
|
|
93
|
+
{ header: 'Remarks - AS', value: (row) => row.comments ?? '' },
|
|
94
|
+
];
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useLocation, useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
|
|
7
|
+
import styles from './moh-512.scss';
|
|
8
|
+
import { moh512ExportColumns } from './moh-512-columns';
|
|
9
|
+
import { getMoh512PatientList } from '../../../resources/moh-711.resource';
|
|
10
|
+
|
|
11
|
+
interface Moh512RegisterComponentProps {}
|
|
12
|
+
|
|
13
|
+
const Moh512RegisterComponent: React.FC<Moh512RegisterComponentProps> = () => {
|
|
14
|
+
const [searchParams] = useSearchParams();
|
|
15
|
+
const location = useLocation();
|
|
16
|
+
|
|
17
|
+
const startDate = searchParams.get('startDate');
|
|
18
|
+
const endDate = searchParams.get('endDate');
|
|
19
|
+
const locationUuids = searchParams.get('locationUuids');
|
|
20
|
+
const indicator = searchParams.get('indicator');
|
|
21
|
+
const reportName = location.state?.reportName || '';
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
rows: patientlist,
|
|
25
|
+
total,
|
|
26
|
+
isTotalExact,
|
|
27
|
+
isLoading,
|
|
28
|
+
page,
|
|
29
|
+
pageSize,
|
|
30
|
+
onPageChange,
|
|
31
|
+
fetchAll,
|
|
32
|
+
} = usePatientList(
|
|
33
|
+
({ startIndex, limit }) =>
|
|
34
|
+
getMoh512PatientList({
|
|
35
|
+
startDate,
|
|
36
|
+
endDate,
|
|
37
|
+
locationUuids,
|
|
38
|
+
indicator,
|
|
39
|
+
reportName,
|
|
40
|
+
startIndex,
|
|
41
|
+
limit,
|
|
42
|
+
}),
|
|
43
|
+
[startDate, endDate, locationUuids, indicator, reportName],
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const columns = [
|
|
47
|
+
{ key: 'date', label: 'Date' },
|
|
48
|
+
{ key: 'cr_id', label: 'Client Number' },
|
|
49
|
+
{ key: 'name_of_client', label: 'Name of Client' },
|
|
50
|
+
{ key: 'client_type', label: 'Client Type' },
|
|
51
|
+
{ key: 'first_ever_use_of_contraceptive', label: '1st Ever User of Contraceptive' },
|
|
52
|
+
{ key: 'age', label: 'Age' },
|
|
53
|
+
{ key: 'sex', label: 'Sex' },
|
|
54
|
+
{ key: 'disability_status', label: 'Disability Status' },
|
|
55
|
+
{ key: 'phone_number', label: 'Telephone Number' },
|
|
56
|
+
{ key: 'village_estate_landmark', label: 'Village/Estate/Landmark' },
|
|
57
|
+
{ key: 'counselled_on_fp', label: 'Counselled on FP' },
|
|
58
|
+
{ key: 'type_of_visit_for_method_combined_oral_contraceptive', label: 'COC Visit Type' },
|
|
59
|
+
{ key: 'quantity_dispensed_combined_oral_contraceptive', label: 'COC Quantity' },
|
|
60
|
+
{ key: 'type_of_visit_for_method_progestine', label: 'POP Visit Type' },
|
|
61
|
+
{ key: 'quantity_dispensed_progestine', label: 'POP Quantity' },
|
|
62
|
+
{ key: 'quantity_dispensed_emergency_contraceptive_pills', label: 'Emergency Contraceptive Doses' },
|
|
63
|
+
{ key: 'type_of_visit_for_method_1_rod', label: '1 Rod Visit Type' },
|
|
64
|
+
{ key: 'quantity_dispensed_1_rod', label: '1 Rod (Sets)' },
|
|
65
|
+
{ key: 'type_of_visit_for_method_2_rod', label: '2 Rods Visit Type' },
|
|
66
|
+
{ key: 'quantity_dispensed_2_rod', label: '2 Rods (Sets)' },
|
|
67
|
+
{ key: 'type_of_visit_for_method_iud', label: 'IUD Visit Type' },
|
|
68
|
+
{ key: 'quantity_dispensed_non_hormonal', label: 'Non-Hormonal IUD (Sets)' },
|
|
69
|
+
{ key: 'quantity_dispensed_hormonal', label: 'Hormonal IUD (Sets)' },
|
|
70
|
+
{ key: 'reason_for_larc_removal', label: 'Reason for LARC Removal' },
|
|
71
|
+
{ key: 'type_of_condom', label: 'Condom Client Sex' },
|
|
72
|
+
{ key: 'quantity_dispensed_male_condoms', label: 'Male Condoms' },
|
|
73
|
+
{ key: 'quantity_dispensed_female_condoms', label: 'Female Condoms' },
|
|
74
|
+
{ key: 'voluntary_surgical_contraception', label: 'VSC' },
|
|
75
|
+
{ key: 'counseled_on_natural_fp', label: 'Natural FP' },
|
|
76
|
+
{ key: 'given_cycle_beads', label: 'Cycle Beads Given' },
|
|
77
|
+
{ key: 'received_post_partum_fp', label: 'Timing of PPFP' },
|
|
78
|
+
{ key: 'tb_screening', label: 'TB Screening' },
|
|
79
|
+
{ key: 'counselled_on_hiv', label: 'Counselled for HIV' },
|
|
80
|
+
{ key: 'tested_for_hiv', label: 'Counselled and Tested for HIV' },
|
|
81
|
+
{ key: 'hiv_results', label: 'HIV Status' },
|
|
82
|
+
{ key: 'intimate_partner_violence', label: 'IPV/Reproductive Coercion' },
|
|
83
|
+
{ key: 'screened_for_cervical_cancer', label: 'Cervical Cancer Screened' },
|
|
84
|
+
{ key: 'cervical_cancer_screening_result', label: 'Cervical Cancer Result' },
|
|
85
|
+
{ key: 'referral_from', label: 'Referral From' },
|
|
86
|
+
{ key: 'referral_to', label: 'Referral To' },
|
|
87
|
+
{ key: 'reason_for_referral', label: 'Reason for Referral' },
|
|
88
|
+
{ key: 'comments', label: 'Remarks' },
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<RegisterLayout
|
|
93
|
+
parentLabel="MOH-711 Report"
|
|
94
|
+
parentPath="/moh-711"
|
|
95
|
+
title="MOH 512 Register"
|
|
96
|
+
isLoading={isLoading}
|
|
97
|
+
isEmpty={patientlist.length === 0}
|
|
98
|
+
page={page}
|
|
99
|
+
pageSize={pageSize}
|
|
100
|
+
total={total}
|
|
101
|
+
isTotalExact={isTotalExact}
|
|
102
|
+
onPageChange={onPageChange}
|
|
103
|
+
fetchAll={fetchAll}
|
|
104
|
+
columns={moh512ExportColumns}
|
|
105
|
+
>
|
|
106
|
+
<div className={styles.tableContainer}>
|
|
107
|
+
<Table className={classNames(styles.table, styles.tableBordered, styles.tableStriped)}>
|
|
108
|
+
<TableHead>
|
|
109
|
+
<TableRow>
|
|
110
|
+
{columns.map((column) => (
|
|
111
|
+
<TableHeader key={column.key}>{column.label}</TableHeader>
|
|
112
|
+
))}
|
|
113
|
+
</TableRow>
|
|
114
|
+
</TableHead>
|
|
115
|
+
|
|
116
|
+
<TableBody>
|
|
117
|
+
{isLoading ? (
|
|
118
|
+
<TableRow>
|
|
119
|
+
<TableCell colSpan={columns.length}>Loading register...</TableCell>
|
|
120
|
+
</TableRow>
|
|
121
|
+
) : patientlist.length === 0 ? (
|
|
122
|
+
<TableRow>
|
|
123
|
+
<TableCell colSpan={columns.length}>No records found.</TableCell>
|
|
124
|
+
</TableRow>
|
|
125
|
+
) : (
|
|
126
|
+
patientlist.map((patient, index) => (
|
|
127
|
+
<TableRow key={patient.person_id || patient.id || index}>
|
|
128
|
+
{columns.map((column) => (
|
|
129
|
+
<TableCell key={column.key}>{patient[column.key] ?? ''}</TableCell>
|
|
130
|
+
))}
|
|
131
|
+
</TableRow>
|
|
132
|
+
))
|
|
133
|
+
)}
|
|
134
|
+
</TableBody>
|
|
135
|
+
</Table>
|
|
136
|
+
</div>
|
|
137
|
+
</RegisterLayout>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export default Moh512RegisterComponent;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.tableContainer {
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Sized to content rather than to the frame, so a long value -- a full name,
|
|
9
|
+
say -- widens its own column instead of wrapping. `.tableScroll` in the
|
|
10
|
+
layout scrolls when the table outgrows the page. */
|
|
11
|
+
|
|
12
|
+
.table {
|
|
13
|
+
width: auto;
|
|
14
|
+
min-width: 100%;
|
|
15
|
+
margin: 0;
|
|
16
|
+
font-size: 0.75rem;
|
|
17
|
+
border-collapse: collapse;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tableBordered td,
|
|
21
|
+
.tableBordered th {
|
|
22
|
+
padding: 0.125rem 0.5rem;
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
line-height: 1.3;
|
|
25
|
+
border: 1px solid $ui-04;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tableBordered th {
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: $color-gray-100;
|
|
31
|
+
background-color: $ui-01;
|
|
32
|
+
/* headings carry deliberate line breaks, so they wrap where the markup says */
|
|
33
|
+
white-space: normal;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tableBordered td {
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Long prose columns (diagnoses, referrals, comments) wrap inside a bounded
|
|
41
|
+
width instead of stretching the row past the fold. */
|
|
42
|
+
.tableBordered td.wrapCell {
|
|
43
|
+
white-space: normal;
|
|
44
|
+
min-width: 8rem;
|
|
45
|
+
max-width: 16rem;
|
|
46
|
+
overflow-wrap: anywhere;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tableStriped tbody tr:nth-of-type(odd) {
|
|
50
|
+
background-color: $ui-01;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tableStriped tbody tr:hover {
|
|
54
|
+
background-color: $brand-primary-10;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.textCentre {
|
|
58
|
+
text-align: center;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.verticalText {
|
|
62
|
+
writing-mode: vertical-rl;
|
|
63
|
+
transform: rotate(180deg);
|
|
64
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register/register-columns';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MOH 204A as the register prints it: one column per cell, in the order they appear.
|
|
5
|
+
*/
|
|
6
|
+
export const TBExportColumns: RegisterColumn[] = [
|
|
7
|
+
{ header: 'Date (DD/MM/YYYY) - A', value: (row) => row.date ?? '' },
|
|
8
|
+
{
|
|
9
|
+
header: 'CR Number - B',
|
|
10
|
+
value: (row) => row.child_number ?? '',
|
|
11
|
+
},
|
|
12
|
+
{ header: 'TB Screening - C', value: (row) => row.child_names ?? '' },
|
|
13
|
+
{ header: 'TB Status - D', value: (row) => row.sex ?? '' },
|
|
14
|
+
{ header: 'Date of Birth - E', value: (row) => row.date_of_birth ?? '' },
|
|
15
|
+
{ header: 'Gender - F', value: (row) => row.date_first_seen ?? '' },
|
|
16
|
+
{ header: 'TCA - F', value: (row) => row.date_first_seen ?? '' },
|
|
17
|
+
];
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
|
|
7
|
+
import styles from './tb-register.scss';
|
|
8
|
+
import { TBExportColumns } from './tb-register-columns';
|
|
9
|
+
import { getTBPatientList } from '../../../resources/moh-711.resource';
|
|
10
|
+
|
|
11
|
+
interface TbRegisterComponentProps {}
|
|
12
|
+
|
|
13
|
+
const TbRegisterComponent: React.FC<TbRegisterComponentProps> = () => {
|
|
14
|
+
const [searchParams] = useSearchParams();
|
|
15
|
+
const startDate = searchParams.get('startDate');
|
|
16
|
+
const endDate = searchParams.get('endDate');
|
|
17
|
+
const locationUuids = searchParams.get('locationUuids');
|
|
18
|
+
const indicator = searchParams.get('indicator');
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
rows: patientlist,
|
|
22
|
+
total,
|
|
23
|
+
isTotalExact,
|
|
24
|
+
isLoading,
|
|
25
|
+
page,
|
|
26
|
+
pageSize,
|
|
27
|
+
onPageChange,
|
|
28
|
+
fetchAll,
|
|
29
|
+
} = usePatientList(
|
|
30
|
+
({ startIndex, limit }) =>
|
|
31
|
+
getTBPatientList({
|
|
32
|
+
startDate: startDate!,
|
|
33
|
+
endDate: endDate!,
|
|
34
|
+
locationUuids: locationUuids!,
|
|
35
|
+
indicator: indicator!,
|
|
36
|
+
startIndex,
|
|
37
|
+
limit,
|
|
38
|
+
reportName: 'moh711Report',
|
|
39
|
+
}),
|
|
40
|
+
[startDate, endDate, locationUuids, indicator],
|
|
41
|
+
);
|
|
42
|
+
return (
|
|
43
|
+
<RegisterLayout
|
|
44
|
+
parentLabel="MOH-711 Report"
|
|
45
|
+
parentPath="/moh-711"
|
|
46
|
+
title="TB Register"
|
|
47
|
+
isLoading={isLoading}
|
|
48
|
+
isEmpty={patientlist.length === 0}
|
|
49
|
+
page={page}
|
|
50
|
+
pageSize={pageSize}
|
|
51
|
+
total={total}
|
|
52
|
+
isTotalExact={isTotalExact}
|
|
53
|
+
onPageChange={onPageChange}
|
|
54
|
+
fetchAll={fetchAll}
|
|
55
|
+
columns={TBExportColumns}
|
|
56
|
+
>
|
|
57
|
+
<div className={styles.tableContainer}>
|
|
58
|
+
<Table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
|
|
59
|
+
<TableHead>
|
|
60
|
+
<TableRow>
|
|
61
|
+
<TableHeader>Date</TableHeader>
|
|
62
|
+
<TableHeader>CR No</TableHeader>
|
|
63
|
+
<TableHeader>DOB</TableHeader>
|
|
64
|
+
<TableHeader>Gender</TableHeader>
|
|
65
|
+
<TableHeader>TB Screening</TableHeader>
|
|
66
|
+
<TableHeader>TCA</TableHeader>
|
|
67
|
+
</TableRow>
|
|
68
|
+
</TableHead>
|
|
69
|
+
<TableBody>
|
|
70
|
+
{patientlist?.length > 0 ? (
|
|
71
|
+
patientlist?.map((patient, i) => (
|
|
72
|
+
<TableRow key={patient.person_id || patient.id}>
|
|
73
|
+
<TableCell>{patient.date}</TableCell>
|
|
74
|
+
<TableCell>{patient.cr_id}</TableCell>
|
|
75
|
+
<TableCell>{patient.date_of_birth}</TableCell>
|
|
76
|
+
<TableCell>{patient.gender}</TableCell>
|
|
77
|
+
<TableCell>{patient.tb_screening}</TableCell>
|
|
78
|
+
<TableCell>{patient.rtc}</TableCell>
|
|
79
|
+
</TableRow>
|
|
80
|
+
))
|
|
81
|
+
) : (
|
|
82
|
+
<TableRow>
|
|
83
|
+
<TableCell colSpan={28}>No data available</TableCell>
|
|
84
|
+
</TableRow>
|
|
85
|
+
)}
|
|
86
|
+
</TableBody>
|
|
87
|
+
</Table>
|
|
88
|
+
</div>
|
|
89
|
+
</RegisterLayout>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default TbRegisterComponent;
|