@openmrs/esm-laboratory-app 1.6.1-pre.1875 → 1.6.1-pre.1879

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.
@@ -0,0 +1 @@
1
+ {"hash":"632c5bcc2603be8b","duration":7709}
@@ -1,7 +1,7 @@
1
1
  WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended size limit (244.141 KiB). This can impact web performance.
2
2
  │ Assets:
3
+ │ 676.js (589.550 KiB)
3
4
  │ 5945.js (661.979 KiB)
4
- │ 3575.js (588.792 KiB)
5
5
  
6
6
 
7
- Rspack compiled with 1 warning in 6.31 s
7
+ Rspack compiled with 1 warning in 6.77 s
package/dist/1570.js CHANGED
@@ -1 +1 @@
1
- (globalThis.webpackChunk_openmrs_esm_laboratory_app=globalThis.webpackChunk_openmrs_esm_laboratory_app||[]).push([["1570"],{4767(e,t,n){var a={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./es_419.json":["1842","6271"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["2237","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["9900","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["6468","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","3378"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["4335","5940"],"./hi.json":["6840","2881"]};function s(e){if(!n.o(a,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=a[e],s=t[0];return n.e(t[1]).then(function(){return n(s)})}s.keys=()=>Object.keys(a),s.id=4767,e.exports=s},3209(e,t,n){"use strict";let a;n.r(t),n.d(t,{amendLabResultsAction:()=>M,laboratoryDashboardLink:()=>w,rejectLabRequestAction:()=>W,root:()=>k,testOrderedTile:()=>U,declinedLabRequestsTable:()=>P,pendingReviewListTile:()=>D,allLabRequestsTable:()=>A,inprogressLabRequestsTable:()=>O,startupApp:()=>V,addLabRequestResultsAction:()=>B,worklistTile:()=>$,pickupLabRequestAction:()=>q,completedTile:()=>E,pendingReviewLabRequestsTable:()=>I,completedLabRequestsTable:()=>N,importTranslation:()=>L,rejectLabRequestModal:()=>R,approvalLabResultsModal:()=>S,approveLabResultsAction:()=>z,pickupLabRequestModal:()=>C});var s=n(766);let r=["name","urgency","age","dob","sex","totalOrders","action","patientId"],i={laboratoryOrderTypeUuid:{_type:s.Type.String,_default:"52a447d3-a64a-11e3-9aeb-50e549534c5e",_description:"UUID for orderType"},labTableColumns:{_type:s.Type.Array,_default:["name","urgency","age","sex","totalOrders","action"],_description:"The columns to display in the lab table. Allowed values: "+r.join(", "),_elements:{_type:s.Type.String,_validators:[s.validators.oneOf(r)]}},patientIdIdentifierTypeUuid:{_type:s.Type.UUID,_default:"05a29f94-c0ed-11e2-94be-8c13b969e334",_description:'Needed if the "id" column of "labTableColumns" is used. Is the OpenMRS ID by default.'},usePreferredPatientIdentifier:{_type:s.Type.Boolean,_default:!0,_description:"When true (default), the patientId column shows an identifier only when it is both preferred and matches patientIdIdentifierTypeUuid. When false, any identifier of the configured type is shown regardless of preferred status, with a fallback to the patient's preferred identifier of any type."},enableReviewingLabResultsBeforeApproval:{_type:s.Type.Boolean,_default:!1,_description:"Enable reviewing lab results before final approval. When enabled, lab results will be submitted for review before being approved and finalized."}};var o=n(2664),l=n(2153),d=n(5021),u=n(6045);function c({dashboardLinkConfig:e}){let{t}=(0,u.useTranslation)(),{name:n,title:a}=e,r=(0,d.useLocation)(),i=`${window.spaBase}/home`,p=(0,l.useMemo)(()=>r.pathname.split("/").map(e=>decodeURIComponent(e)).includes(n),[r.pathname,n]);return(0,o.jsx)(s.ConfigurableLink,{to:`${i}/${n}`,className:`cds--side-nav__link ${p?"active-left-nav-link":""}`,children:t(a)})}var p=n(2492),b=n.n(p),f=n(3378),y=n(4091);let m=()=>{let e="tablet"===(0,s.useLayoutType)(),{t}=(0,u.useTranslation)(),{laboratoryOrderTypeUuid:n}=(0,s.useConfig)(),a=(0,y.b5)(),[r,i]=(0,l.useState)(null),d=(0,l.useRef)(null),{activeVisit:c,error:p,isLoading:b}=(0,s.useVisit)(r?.uuid);(0,l.useEffect)(()=>{if(r&&!b){if(p){(0,s.showSnackbar)({title:t("errorCheckingVisit","Error checking visit status"),subtitle:p.message,kind:"error"}),i(null),d.current=null;return}if(c){let e=d.current?.()??Promise.resolve();e?.then(()=>{(0,s.launchWorkspace2)("add-test-order-basket-workspace",{},{patientUuid:r.uuid,patient:r.patient,visitContext:c,visibleOrderPanels:[n],labOrderWorkspaceName:"add-test-order-basket-add-lab-order-workspace",onOrderBasketSubmitted:()=>{a()}}),i(null),d.current=null}).catch(()=>{})}else{let e=[r?.patient?.name?.[0]?.given?.filter(Boolean).join(" "),r?.patient?.name?.[0]?.family].filter(Boolean).join(" ")||t("theSelectedPatient","The selected patient");(0,s.showSnackbar)({title:t("visitRequired","Visit required"),subtitle:t("startVisitToAddLabTest",'{{patientName}} does not have an active visit. Click the "Start visit" button next to their name to begin one.',{patientName:e}),kind:"warning"}),i(null),d.current=null}}},[c,p,n,b,r,a,t]);let m=(0,l.useCallback)((e,t,n,a)=>{d.current=a,i({uuid:e,patient:t})},[]);return(0,o.jsx)(f.Button,{className:"-esm-laboratory__add-test-order-button__buttonContainer___N6WXw",onClick:()=>{(0,s.launchWorkspace2)("add-test-order-patient-search-workspace",{workspaceTitle:t("addTestOrder","Add test order"),onPatientSelected:m},{startVisitWorkspaceName:"add-test-order-start-visit-workspace"})},kind:"primary",size:e?"lg":"md",renderIcon:e=>(0,o.jsx)(s.AddIcon,{size:16,...e}),children:t("addTestOrder","Add test order")})};var h=n(1505);let j="lab-panels-slot",g=()=>{let{t:e}=(0,u.useTranslation)(),{enableReviewingLabResultsBeforeApproval:t}=(0,s.useConfig)(),[n,a]=(0,l.useState)(0),r=(0,s.useAssignedExtensions)(j).filter(e=>{let n=e.meta??{};return 0!==Object.keys(n).length&&("pendingReviewPanel"!==n.name||!0===t)});return(0,o.jsx)("main",{children:(0,o.jsx)("section",{children:(0,o.jsx)("div",{children:(0,o.jsxs)(f.Tabs,{selectedIndex:n,onChange:({selectedIndex:e})=>a(e),children:[(0,o.jsx)(f.TabList,{"aria-label":"Laboratory tabs",contained:!0,children:r.map(t=>{let{name:n,title:a}=t.meta??{};return n&&a?(0,o.jsx)(f.Tab,{className:"-esm-laboratory__laboratory-tabs__tab___PmDin",id:`${t.id}-tab`,children:e(a,{ns:t.moduleName,defaultValue:a})},t.id):null})}),(0,o.jsx)(f.TabPanels,{children:r.map(e=>(0,o.jsx)(f.TabPanel,{children:(0,o.jsx)(h.ComponentContext.Provider,{value:{moduleName:e.moduleName,featureName:"laboratory",extension:{extensionId:e.id,extensionSlotName:j,extensionSlotModuleName:e.moduleName}},children:(0,o.jsx)(s.Extension,{})},e.id)},e.id))})]})})})})},_=()=>{let{t:e}=(0,u.useTranslation)(),{enableReviewingLabResultsBeforeApproval:t}=(0,s.useConfig)(),n="lab-tiles-slot",a=(0,s.useAssignedExtensions)(n).filter(e=>0!==Object.keys(e.meta??{}).length&&("pending-review-list-tile-component"!==e.name||!0===t));return(0,o.jsx)("div",{className:"-esm-laboratory__laboratory-summary-tiles__cardContainer___m0SWw",children:a.map((e,t)=>(0,o.jsx)(h.ComponentContext.Provider,{value:{moduleName:e.moduleName,featureName:"laboratory",extension:{extensionId:e.id,extensionSlotName:n,extensionSlotModuleName:e.moduleName}},children:(0,o.jsx)(s.Extension,{})},e.id))})},x=()=>{let{t:e}=(0,u.useTranslation)(),[t,n]=(0,l.useState)([b()().startOf("day").toDate(),new Date]);return(0,s.useDefineAppContext)("laboratory-date-filter",{dateRange:t,setDateRange:n}),(0,o.jsxs)("div",{children:[(0,o.jsxs)(s.PageHeader,{className:"-esm-laboratory__laboratory-dashboard__pageHeader___+6jLs",children:[(0,o.jsx)(s.PageHeaderContent,{illustration:(0,o.jsx)(s.LaboratoryPictogram,{}),title:e("laboratory","Laboratory")}),(0,o.jsx)(m,{})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(_,{}),(0,o.jsx)(g,{})]})]})},v="@openmrs/esm-laboratory-app",T={featureName:"laboratory",moduleName:v},L=n(4767),k=(0,s.getSyncLifecycle)(()=>(0,o.jsx)(d.BrowserRouter,{basename:`${window.spaBase}/home/laboratory`,children:(0,o.jsx)(d.Routes,{children:(0,o.jsx)(d.Route,{path:"/",element:(0,o.jsx)(x,{})})})}),T),w=(0,s.getSyncLifecycle)((a={name:"laboratory",title:"Laboratory"},()=>(0,o.jsx)(d.BrowserRouter,{children:(0,o.jsx)(c,{dashboardLinkConfig:a})})),T),C=(0,s.getAsyncLifecycle)(()=>n.e("4316").then(n.bind(n,1031)),T),S=(0,s.getAsyncLifecycle)(()=>n.e("7248").then(n.bind(n,4659)),T),R=(0,s.getAsyncLifecycle)(()=>n.e("3994").then(n.bind(n,1409)),T),A=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("1656")]).then(n.bind(n,7457)),T),O=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("9515")]).then(n.bind(n,1820)),T),N=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("7423")]).then(n.bind(n,7632)),T),P=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("9467")]).then(n.bind(n,6572)),T),I=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("8435")]).then(n.bind(n,6772)),T),$=(0,s.getAsyncLifecycle)(()=>n.e("1929").then(n.bind(n,7648)),T),D=(0,s.getAsyncLifecycle)(()=>n.e("2316").then(n.bind(n,5127)),T),E=(0,s.getAsyncLifecycle)(()=>n.e("7033").then(n.bind(n,7488)),T),U=(0,s.getAsyncLifecycle)(()=>n.e("2659").then(n.bind(n,46)),T),B=(0,s.getAsyncLifecycle)(()=>n.e("5306").then(n.bind(n,8481)),T),q=(0,s.getAsyncLifecycle)(()=>n.e("1966").then(n.bind(n,4637)),T),W=(0,s.getAsyncLifecycle)(()=>n.e("8323").then(n.bind(n,1294)),T),z=(0,s.getAsyncLifecycle)(()=>n.e("8420").then(n.bind(n,9999)),T),M=(0,s.getAsyncLifecycle)(()=>n.e("6050").then(n.bind(n,5529)),T);function V(){(0,s.defineConfigSchema)(v,i)}},4091(e,t,n){"use strict";n.d(t,{Or:()=>p,b5:()=>f,bc:()=>b,ko:()=>u});var a=n(2153),s=n(2492),r=n.n(s),i=n(5361),o=n.n(i),l=n(766);let d={status:null,unpickedOrdersOnly:!1,excludeCanceled:!0,includePatientId:!1};function u(e=d){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),{status:n,unpickedOrdersOnly:a,excludeCanceled:s,includePatientId:i}={...d,...t},{dateRange:p}=(0,l.useAppContext)("laboratory-date-filter")??{dateRange:[r()().startOf("day").toDate(),new Date]},{laboratoryOrderTypeUuid:b}=(0,l.useConfig)(),f=`custom:(uuid,orderNumber,patient:(uuid,display,person:(uuid,display,age,birthdate,gender)${i?",identifiers":""}),concept:(uuid,display),action,careSetting:(uuid,display,description,careSettingType,display),previousOrder,dateActivated,scheduledDate,dateStopped,autoExpireDate,encounter:(uuid,display),orderer:(uuid,display),orderReason,orderReasonNonCoded,orderType:(uuid,display,name,description,conceptClasses,parent),urgency,instructions,commentToFulfiller,display,fulfillerStatus,fulfillerComment,accessionNumber,specimenSource,laterality,clinicalHistory,frequency,numberOfRepeats)`,y=`${l.restBaseUrl}/order?orderTypes=${b}&v=${f}`;y=n?y+`&fulfillerStatus=${n}`:y,y=s?`${y}&excludeCanceledAndExpired=true&excludeDiscontinueOrders=true`:y,y=p?`${y}&activatedOnOrAfterDate=${p.at(0).toISOString()}&activatedOnOrBeforeDate=${p.at(1).toISOString()}`:y;let{data:m,error:h,mutate:j,isLoading:g,isValidating:_}=o()(`${y}`,c);return{labOrders:m?.filter(e=>!a||function({action:e,fulfillerStatus:t}){return("NEW"===e||"REVISE"===e)&&null===t}(e))??[],isLoading:g,isError:h,mutate:j,isValidating:_}}async function c(e){let t=[],n=e;for(;n;){let e=await (0,l.openmrsFetch)(n);t.push(...e.data?.results??[]),n=function(e){let t=e?.find(e=>"next"===e.rel)?.uri;if(!t)return null;let n=new URL(t);return n.host=window.location.host,n.protocol=window.location.protocol,n.toString()}(e.data?.links)}return t}function p(e,t,n){return(0,l.openmrsFetch)(`${l.restBaseUrl}/order/${e}/fulfillerdetails/`,{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:{fulfillerStatus:t}})}function b(e,t,n){return(0,l.openmrsFetch)(`${l.restBaseUrl}/order/${e}/fulfillerdetails/`,{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:{fulfillerStatus:"DECLINED",fulfillerComment:t}})}function f(){let{laboratoryOrderTypeUuid:e}=(0,l.useConfig)(),{mutate:t}=(0,i.useSWRConfig)();return(0,a.useCallback)(()=>{t(t=>"string"==typeof t&&t.startsWith(`${l.restBaseUrl}/order?orderTypes=${e}`),void 0,{revalidate:!0})},[e,t])}}}]);
1
+ (globalThis.webpackChunk_openmrs_esm_laboratory_app=globalThis.webpackChunk_openmrs_esm_laboratory_app||[]).push([["1570"],{4767(e,t,n){var a={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./es_419.json":["1842","6271"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["9900","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["6468","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","3378"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["4335","5940"],"./hi.json":["6840","2881"]};function s(e){if(!n.o(a,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=a[e],s=t[0];return n.e(t[1]).then(function(){return n(s)})}s.keys=()=>Object.keys(a),s.id=4767,e.exports=s},3209(e,t,n){"use strict";let a;n.r(t),n.d(t,{amendLabResultsAction:()=>M,laboratoryDashboardLink:()=>w,rejectLabRequestAction:()=>W,root:()=>k,testOrderedTile:()=>U,declinedLabRequestsTable:()=>P,pendingReviewListTile:()=>D,allLabRequestsTable:()=>A,inprogressLabRequestsTable:()=>O,startupApp:()=>V,addLabRequestResultsAction:()=>B,worklistTile:()=>$,pickupLabRequestAction:()=>q,completedTile:()=>E,pendingReviewLabRequestsTable:()=>I,completedLabRequestsTable:()=>N,importTranslation:()=>L,rejectLabRequestModal:()=>R,approvalLabResultsModal:()=>S,approveLabResultsAction:()=>z,pickupLabRequestModal:()=>C});var s=n(766);let r=["name","urgency","age","dob","sex","totalOrders","action","patientId"],i={laboratoryOrderTypeUuid:{_type:s.Type.String,_default:"52a447d3-a64a-11e3-9aeb-50e549534c5e",_description:"UUID for orderType"},labTableColumns:{_type:s.Type.Array,_default:["name","urgency","age","sex","totalOrders","action"],_description:"The columns to display in the lab table. Allowed values: "+r.join(", "),_elements:{_type:s.Type.String,_validators:[s.validators.oneOf(r)]}},patientIdIdentifierTypeUuid:{_type:s.Type.UUID,_default:"05a29f94-c0ed-11e2-94be-8c13b969e334",_description:'Needed if the "id" column of "labTableColumns" is used. Is the OpenMRS ID by default.'},usePreferredPatientIdentifier:{_type:s.Type.Boolean,_default:!0,_description:"When true (default), the patientId column shows an identifier only when it is both preferred and matches patientIdIdentifierTypeUuid. When false, any identifier of the configured type is shown regardless of preferred status, with a fallback to the patient's preferred identifier of any type."},enableReviewingLabResultsBeforeApproval:{_type:s.Type.Boolean,_default:!1,_description:"Enable reviewing lab results before final approval. When enabled, lab results will be submitted for review before being approved and finalized."}};var o=n(2664),l=n(2153),d=n(5021),u=n(6045);function c({dashboardLinkConfig:e}){let{t}=(0,u.useTranslation)(),{name:n,title:a}=e,r=(0,d.useLocation)(),i=`${window.spaBase}/home`,p=(0,l.useMemo)(()=>r.pathname.split("/").map(e=>decodeURIComponent(e)).includes(n),[r.pathname,n]);return(0,o.jsx)(s.ConfigurableLink,{to:`${i}/${n}`,className:`cds--side-nav__link ${p?"active-left-nav-link":""}`,children:t(a)})}var p=n(2492),b=n.n(p),f=n(3378),y=n(4091);let m=()=>{let e="tablet"===(0,s.useLayoutType)(),{t}=(0,u.useTranslation)(),{laboratoryOrderTypeUuid:n}=(0,s.useConfig)(),a=(0,y.b5)(),[r,i]=(0,l.useState)(null),d=(0,l.useRef)(null),{activeVisit:c,error:p,isLoading:b}=(0,s.useVisit)(r?.uuid);(0,l.useEffect)(()=>{if(r&&!b){if(p){(0,s.showSnackbar)({title:t("errorCheckingVisit","Error checking visit status"),subtitle:p.message,kind:"error"}),i(null),d.current=null;return}if(c){let e=d.current?.()??Promise.resolve();e?.then(()=>{(0,s.launchWorkspace2)("add-test-order-basket-workspace",{},{patientUuid:r.uuid,patient:r.patient,visitContext:c,visibleOrderPanels:[n],labOrderWorkspaceName:"add-test-order-basket-add-lab-order-workspace",onOrderBasketSubmitted:()=>{a()}}),i(null),d.current=null}).catch(()=>{})}else{let e=[r?.patient?.name?.[0]?.given?.filter(Boolean).join(" "),r?.patient?.name?.[0]?.family].filter(Boolean).join(" ")||t("theSelectedPatient","The selected patient");(0,s.showSnackbar)({title:t("visitRequired","Visit required"),subtitle:t("startVisitToAddLabTest",'{{patientName}} does not have an active visit. Click the "Start visit" button next to their name to begin one.',{patientName:e}),kind:"warning"}),i(null),d.current=null}}},[c,p,n,b,r,a,t]);let m=(0,l.useCallback)((e,t,n,a)=>{d.current=a,i({uuid:e,patient:t})},[]);return(0,o.jsx)(f.Button,{className:"-esm-laboratory__add-test-order-button__buttonContainer___N6WXw",onClick:()=>{(0,s.launchWorkspace2)("add-test-order-patient-search-workspace",{workspaceTitle:t("addTestOrder","Add test order"),onPatientSelected:m},{startVisitWorkspaceName:"add-test-order-start-visit-workspace"})},kind:"primary",size:e?"lg":"md",renderIcon:e=>(0,o.jsx)(s.AddIcon,{size:16,...e}),children:t("addTestOrder","Add test order")})};var h=n(1505);let j="lab-panels-slot",g=()=>{let{t:e}=(0,u.useTranslation)(),{enableReviewingLabResultsBeforeApproval:t}=(0,s.useConfig)(),[n,a]=(0,l.useState)(0),r=(0,s.useAssignedExtensions)(j).filter(e=>{let n=e.meta??{};return 0!==Object.keys(n).length&&("pendingReviewPanel"!==n.name||!0===t)});return(0,o.jsx)("main",{children:(0,o.jsx)("section",{children:(0,o.jsx)("div",{children:(0,o.jsxs)(f.Tabs,{selectedIndex:n,onChange:({selectedIndex:e})=>a(e),children:[(0,o.jsx)(f.TabList,{"aria-label":"Laboratory tabs",contained:!0,children:r.map(t=>{let{name:n,title:a}=t.meta??{};return n&&a?(0,o.jsx)(f.Tab,{className:"-esm-laboratory__laboratory-tabs__tab___PmDin",id:`${t.id}-tab`,children:e(a,{ns:t.moduleName,defaultValue:a})},t.id):null})}),(0,o.jsx)(f.TabPanels,{children:r.map(e=>(0,o.jsx)(f.TabPanel,{children:(0,o.jsx)(h.ComponentContext.Provider,{value:{moduleName:e.moduleName,featureName:"laboratory",extension:{extensionId:e.id,extensionSlotName:j,extensionSlotModuleName:e.moduleName}},children:(0,o.jsx)(s.Extension,{})},e.id)},e.id))})]})})})})},_=()=>{let{t:e}=(0,u.useTranslation)(),{enableReviewingLabResultsBeforeApproval:t}=(0,s.useConfig)(),n="lab-tiles-slot",a=(0,s.useAssignedExtensions)(n).filter(e=>0!==Object.keys(e.meta??{}).length&&("pending-review-list-tile-component"!==e.name||!0===t));return(0,o.jsx)("div",{className:"-esm-laboratory__laboratory-summary-tiles__cardContainer___m0SWw",children:a.map((e,t)=>(0,o.jsx)(h.ComponentContext.Provider,{value:{moduleName:e.moduleName,featureName:"laboratory",extension:{extensionId:e.id,extensionSlotName:n,extensionSlotModuleName:e.moduleName}},children:(0,o.jsx)(s.Extension,{})},e.id))})},x=()=>{let{t:e}=(0,u.useTranslation)(),[t,n]=(0,l.useState)([b()().startOf("day").toDate(),new Date]);return(0,s.useDefineAppContext)("laboratory-date-filter",{dateRange:t,setDateRange:n}),(0,o.jsxs)("div",{children:[(0,o.jsxs)(s.PageHeader,{className:"-esm-laboratory__laboratory-dashboard__pageHeader___+6jLs",children:[(0,o.jsx)(s.PageHeaderContent,{illustration:(0,o.jsx)(s.LaboratoryPictogram,{}),title:e("laboratory","Laboratory")}),(0,o.jsx)(m,{})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(_,{}),(0,o.jsx)(g,{})]})]})},v="@openmrs/esm-laboratory-app",T={featureName:"laboratory",moduleName:v},L=n(4767),k=(0,s.getSyncLifecycle)(()=>(0,o.jsx)(d.BrowserRouter,{basename:`${window.spaBase}/home/laboratory`,children:(0,o.jsx)(d.Routes,{children:(0,o.jsx)(d.Route,{path:"/",element:(0,o.jsx)(x,{})})})}),T),w=(0,s.getSyncLifecycle)((a={name:"laboratory",title:"Laboratory"},()=>(0,o.jsx)(d.BrowserRouter,{children:(0,o.jsx)(c,{dashboardLinkConfig:a})})),T),C=(0,s.getAsyncLifecycle)(()=>n.e("4316").then(n.bind(n,1031)),T),S=(0,s.getAsyncLifecycle)(()=>n.e("7248").then(n.bind(n,4659)),T),R=(0,s.getAsyncLifecycle)(()=>n.e("3994").then(n.bind(n,1409)),T),A=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("1656")]).then(n.bind(n,7457)),T),O=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("9515")]).then(n.bind(n,1820)),T),N=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("7423")]).then(n.bind(n,7632)),T),P=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("9467")]).then(n.bind(n,6572)),T),I=(0,s.getAsyncLifecycle)(()=>Promise.all([n.e("1924"),n.e("8435")]).then(n.bind(n,6772)),T),$=(0,s.getAsyncLifecycle)(()=>n.e("1929").then(n.bind(n,7648)),T),D=(0,s.getAsyncLifecycle)(()=>n.e("2316").then(n.bind(n,5127)),T),E=(0,s.getAsyncLifecycle)(()=>n.e("7033").then(n.bind(n,7488)),T),U=(0,s.getAsyncLifecycle)(()=>n.e("2659").then(n.bind(n,46)),T),B=(0,s.getAsyncLifecycle)(()=>n.e("5306").then(n.bind(n,8481)),T),q=(0,s.getAsyncLifecycle)(()=>n.e("1966").then(n.bind(n,4637)),T),W=(0,s.getAsyncLifecycle)(()=>n.e("8323").then(n.bind(n,1294)),T),z=(0,s.getAsyncLifecycle)(()=>n.e("8420").then(n.bind(n,9999)),T),M=(0,s.getAsyncLifecycle)(()=>n.e("6050").then(n.bind(n,5529)),T);function V(){(0,s.defineConfigSchema)(v,i)}},4091(e,t,n){"use strict";n.d(t,{Or:()=>p,b5:()=>f,bc:()=>b,ko:()=>u});var a=n(2153),s=n(2492),r=n.n(s),i=n(5361),o=n.n(i),l=n(766);let d={status:null,unpickedOrdersOnly:!1,excludeCanceled:!0,includePatientId:!1};function u(e=d){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),{status:n,unpickedOrdersOnly:a,excludeCanceled:s,includePatientId:i}={...d,...t},{dateRange:p}=(0,l.useAppContext)("laboratory-date-filter")??{dateRange:[r()().startOf("day").toDate(),new Date]},{laboratoryOrderTypeUuid:b}=(0,l.useConfig)(),f=`custom:(uuid,orderNumber,patient:(uuid,display,person:(uuid,display,age,birthdate,gender)${i?",identifiers":""}),concept:(uuid,display),action,careSetting:(uuid,display,description,careSettingType,display),previousOrder,dateActivated,scheduledDate,dateStopped,autoExpireDate,encounter:(uuid,display),orderer:(uuid,display),orderReason,orderReasonNonCoded,orderType:(uuid,display,name,description,conceptClasses,parent),urgency,instructions,commentToFulfiller,display,fulfillerStatus,fulfillerComment,accessionNumber,specimenSource,laterality,clinicalHistory,frequency,numberOfRepeats)`,y=`${l.restBaseUrl}/order?orderTypes=${b}&v=${f}`;y=n?y+`&fulfillerStatus=${n}`:y,y=s?`${y}&excludeCanceledAndExpired=true&excludeDiscontinueOrders=true`:y,y=p?`${y}&activatedOnOrAfterDate=${p.at(0).toISOString()}&activatedOnOrBeforeDate=${p.at(1).toISOString()}`:y;let{data:m,error:h,mutate:j,isLoading:g,isValidating:_}=o()(`${y}`,c);return{labOrders:m?.filter(e=>!a||function({action:e,fulfillerStatus:t}){return("NEW"===e||"REVISE"===e)&&null===t}(e))??[],isLoading:g,isError:h,mutate:j,isValidating:_}}async function c(e){let t=[],n=e;for(;n;){let e=await (0,l.openmrsFetch)(n);t.push(...e.data?.results??[]),n=function(e){let t=e?.find(e=>"next"===e.rel)?.uri;if(!t)return null;let n=new URL(t);return n.host=window.location.host,n.protocol=window.location.protocol,n.toString()}(e.data?.links)}return t}function p(e,t,n){return(0,l.openmrsFetch)(`${l.restBaseUrl}/order/${e}/fulfillerdetails/`,{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:{fulfillerStatus:t}})}function b(e,t,n){return(0,l.openmrsFetch)(`${l.restBaseUrl}/order/${e}/fulfillerdetails/`,{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:{fulfillerStatus:"DECLINED",fulfillerComment:t}})}function f(){let{laboratoryOrderTypeUuid:e}=(0,l.useConfig)(),{mutate:t}=(0,i.useSWRConfig)();return(0,a.useCallback)(()=>{t(t=>"string"==typeof t&&t.startsWith(`${l.restBaseUrl}/order?orderTypes=${e}`),void 0,{revalidate:!0})},[e,t])}}}]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"676.css","sources":["webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/cards/card-header.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/custom-overflow-menu/custom-overflow-menu.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/icons/icons.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/dashboard-extension/dashboard.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/datepicker/datepicker.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@carbon/styles/scss/utilities/_focus-outline.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@carbon/styles/scss/utilities/_component-reset.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/diagnosis-tags/diagnosis-tags.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/empty-card/empty-card.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/error-state/error-state.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/left-nav/left-nav.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/location-picker/location-picker.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/_vars.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/numeric-observation/numeric-observation.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@carbon/colors/index.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@carbon/type/scss/_styles.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/page-header/page-header.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/pagination/pagination.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/patient-banner/patient-info/patient-banner-patient-info.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/patient-banner/actions-menu/patient-banner-actions-menu.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/patient-photo/patient-photo.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/pictograms/pictograms.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/snackbars/snackbar.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/workspaces2/workspace2.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/workspaces2/exported-workspace.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/workspaces2/action-menu2/action-menu-button2.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/patient-banner/contact-details/patient-banner-contact-details.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/workspaces2/action-menu2/action-menu2.module.scss","webpack://@openmrs/esm-laboratory-app/./node_modules/@openmrs/esm-styleguide/dist/workspaces2/workspace-windows-and-menu.module.scss"],"names":[],"mappings":"AAIA,wOAQE,6OASF,wEAEE,wTAMF,yEAEE,wRAQA,iMCnCF,wFAIE,8GAKF,qMAWA,0EAIA,oIAME,yGCjCA,4ECEF,yGAMA,kFCGA,8NAQE,qPCYE,qCDZF,4MAKA,6ICyBE,qCDzBF,4FAGE,6GAKF,oKAQF,gRAGE,uTAKA,yTAIA,0WAIA,wqBAQA,ibAcF,mIAUA,qIAWA,2LAaA,8EAIA,4EAIA,4EAKA,mJAQA,6EAIA,+EAIA,6EAIA,uFAMA,+EAIA,0EAIA,2GAMA,gPAIA,oLASA,oIAYA,0EAKA,6PAMA,kKAGE,kDAHF,oFAQA,8LAQA,mJASA,qKEhNE,4MFmNA,qGAKA,qHAIA,6GAIA,wGAOF,6HAIA,qFAKA,iFAKA,iFAKA,wZE1PE,yMF8PA,mHAMA,mGAKA,wGAGE,mdE5QF,0XFgRI,sMAOA,4VAMA,mKC9RF,qCD8RE,8IAIA,uMClQF,qCDkQE,sJAIA,kXAOA,wQAKA,4JAKF,sNEtTF,+VFyTI,0IAMF,gHAIA,6MEnUF,oUFsUI,iRAcA,sLAQA,gOAKA,yOAKA,6HAKA,kIAUN,sEAGE,4NAOA,qWAOA,qWAME,wFAIA,+JAIA,+HAKA,6IAOJ,oZAcE,wOAYA,iJAIA,4KAOA,oLAKA,gFAMI,iJAMA,iHAMA,sHG3eN,qHAOA,yHAKA,yaAWA,yHCvBA,wEAIA,2VAQE,wTAOA,wRAMF,0JAKE,6OASF,6FCvCA,6UAOA,kSAOE,yTAOA,yRAMF,4JAKE,+OASF,8FCzCA,wGAKE,yVAKE,qLAMA,mNAYF,4DAOA,6DCnCF,8WAIA,wXASA,gIAMA,kHAOA,wVAMA,kHCKa,gGDIb,oJAOE,2GAKF,qFAIA,4IAOA,mFEPE,iJCnDA,iKFMW,iLGwDD,iLAqBH,8HH9DI,6HEYT,yUAOF,mTAMA,2PAUA,wFFlDW,qRCTH,2RG21BN,kTH31BM,qFDIG,0ZEuFX,grBD3FQ,wgBCqGR,+FAMA,6GAMA,gHAMA,gGAMA,8GAMA,gHGtIF,wWASA,mHAMA,wQAKE,8FCpBF,+VAIA,keAYA,sHAME,gSAQF,qHAME,6RAQF,mGAMA,iVAQE,+FCzDF,8JAMA,8GAIA,yFAIA,wUAOA,qIAOA,sIAOA,kJAOA,oYAUA,qJAOA,4LAMA,sFAKA,sWAQA,yGAKA,4aAQA,8FAGE,oKAIA,uKAIA,0HAOA,8YAMF,+HAOA,uFAIA,iHAKA,4FAIA,6FAIA,sUAOE,iHAKA,8GAIA,8HC3JF,sUAQI,6IAGE,qIChBN,oFAKA,0KAUA,8ICdE,sFCDF,8HASA,6HASA,mHAKA,4HAIA,4HChBA,0IAGE,2JAGA,0JAGA,8JASA,gQASE,6eAWA,sMAOF,iRAQE,2MAUF,4JAIE,6LAMJ,0HAOA,+EAME,uNAOE,4TAGE,qGAOF,kJAIE,wHAIA,4HAMJ,2IAMA,wGAKE,wLAQF,mIAIE,6FAIA,mIAIE,8HAQJ,6GAMA,yBACE,+GAKF,0HAEE,kKAKA,sLAKF,sHAIA,wIAIA,sHAUI,qOAMF,sIAGE,iNCvNN,sHCCA,sJAOE,6GAKA,6UAMA,0FAKF,+IAME,kaAYA,gMAWA,oaAOA,8JAOE,qHAQF,2OAaA,0NAIE,6MAIA,+bAKA,wMCnGJ,gNAOA,2UAKA,0TAIE,iHAKF,8JAIE,0LAKF,uFAIA,yGAKA,yFdUA,sUehDA,2EAIA,4EAME,sHAKE,gMAOA,kRAUA,gRAQF,mOAYA,yIAKE,qHAMF,uIAME,gGAMJ,wHCjFA,oJAOE,wPAMA,qQAUF,sHAKE"}