@ampath/esm-dha-workflow-app 4.0.0-claim-workflows.233 → 4.0.0-claim-workflows.235

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/2333.js CHANGED
@@ -1 +1 @@
1
- (globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[2333],{42333:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MNCHRoot:()=>J,accountingDashboard:()=>F,accountingDashboardLink:()=>R,admissionsDashboard:()=>Z,admissionsDashboardLink:()=>Y,attendedToPatientsExtension:()=>k,billingDashboard:()=>ie,billingDashboardLink:()=>ne,billingRoot:()=>Ae,bookings:()=>z,bookingsDashboardLink:()=>K,claims:()=>se,consultationDashboardLink:()=>Q,consultationQueue:()=>j,createOrderBillFormWorkspace:()=>ae,dhaWorkflowDashboard:()=>M,dhaWorkflowDashboardLink:()=>H,formEntryWorkspace:()=>ce,generateInterventionAttachmentsWorkspace:()=>le,importTranslation:()=>L,mnchQueueDashboardLink:()=>G,moduleName:()=>_,navLinks:()=>P,patientAdmissionSummary:()=>te,patientChartAdmissionsLink:()=>ee,pharmacyDashboardLink:()=>x,preauthsModal:()=>re,queueDashboardExtension:()=>q,queueDashboardLink:()=>O,registry:()=>w,registryDashboardLink:()=>E,registryExtension:()=>N,root:()=>C,serviceQueueAdmin:()=>V,serviceQueueBannerComponent:()=>$,serviceQueuesAdminLink:()=>X,startupApp:()=>T,triageAttendedToPatientsExtension:()=>v,triageDashboardLink:()=>I,triageQueueExtension:()=>W,triageWaitingPatientsExtension:()=>D,uploadInterventionAttachmentsWorkspace:()=>de,visitBillingForm:()=>oe,waitingPatientsExtension:()=>S,workflowRegistryLink:()=>B});var i=n(25987),A={concepts:{defaultPriorityConceptUuid:{_type:i.Type.ConceptUuid,_default:!1,_description:"The UUID of the default priority for the queues eg Not urgent."},defaultStatusConceptUuid:{_type:i.Type.ConceptUuid,_default:"51ae5e4d-b72b-4912-bf31-a17efb690aeb",_description:"The UUID of the default status for the queues eg Waiting."},defaultTransitionStatus:{_type:i.Type.ConceptUuid,_default:"ca7494ae-437f-4fd0-8aae-b88b9a2ba47d",_description:"The UUID of the default status for attending a service in the queues eg In Service."},systolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},diastolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},emergencyPriorityConceptUuid:{_type:i.Type.ConceptUuid,_default:!1,_description:"The UUID of the priority with the highest sort weight for the queues eg Emergency."},generalPatientNoteConceptUuid:{_type:i.Type.ConceptUuid,_default:"162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",_description:"The UUID of the free text note field intended to capture unstructured description of the patient encounter"},heightUuid:{_type:i.Type.ConceptUuid,_default:"5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},historicalObsConceptUuid:{_type:i.Type.Array,_default:["161643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"],_description:"The Uuids of the obs that are displayed on the previous visit modal",_elements:{_type:i.Type.ConceptUuid}},oxygenSaturationUuid:{_type:i.Type.ConceptUuid,_default:"5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},pulseUuid:{_type:i.Type.ConceptUuid,_default:"5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},problemListConceptUuid:{_type:i.Type.ConceptUuid,_default:"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},respiratoryRateUuid:{_type:i.Type.ConceptUuid,_default:"5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},temperatureUuid:{_type:i.Type.ConceptUuid,_default:"5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},visitDiagnosesConceptUuid:{_type:i.Type.ConceptUuid,_default:"159947AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},weightUuid:{_type:i.Type.ConceptUuid,_default:"5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},subDomainUrl:{_type:i.Type.String,_description:"Subdomain e.g training,staging",_default:""},etlBaseUrl:{_type:i.Type.String,_description:"ETL Endpoint",_default:""},hieBaseUrl:{_type:i.Type.String,_description:"HIE Endpoint",_default:""},claimsBaseUrl:{_type:i.Type.String,_description:"",_default:""},claimsKey:{_type:i.Type.String,_description:"",_default:""},registrationBillableServices:{_type:i.Type.String,_description:"Billable services e.g consultation",_default:""},cashConsultationOrderTypeUuid:{_type:i.Type.String,_description:"CASH Consultation Order type uuid",_default:""},shaConsultationOrderTypeUuid:{_type:i.Type.String,_description:"SHA Consultation Order type uuid",_default:""},cashConsulationConceptUuid:{_type:i.Type.String,_description:"Cash Consultation concept uuid",_default:""},shaConsulationConceptUuid:{_type:i.Type.String,_description:"SHA Consultation concept uuid",_default:""},outPatientCareSettingUuid:{_type:i.Type.String,_description:"Outpatient care settings uuid",_default:""},orderEncounterTypeUuid:{_type:i.Type.String,_description:"Outpatient care settings uuid",_default:""},nonSHAPaymentModes:{_type:i.Type.Array,_description:"NON SHA payment modes",_default:[]},registrationServicequeues:{_type:i.Type.Array,_description:"Service Queues to display at send to triage",_default:[]},consultationBillableServiceNames:{_type:i.Type.Array,_description:"Consultation billable service names",_default:["CONSULTATION","KESSES CONSULTATION"]},maternityDischargeFormUuid:{_type:i.Type.ConceptUuid,_default:"a6f7d96d-7d6e-3c51-9786-7b817515ff5b"},maternityDischargeEncounterTypeUuid:{_type:i.Type.ConceptUuid,_default:"e3c2a17f-4d58-4725-b702-a5d75a2231d0"},shaPaymentModeUuid:{_type:i.Type.ConceptUuid,_default:"1be55f87-2931-41e0-89c8-8f5652c7c303"},cashPaymentModeUuid:{_type:i.Type.ConceptUuid,_default:"63eff7a4-6f82-43c4-a333-dbcc58fe9f74"}},a={path:"registration",slot:"client-registry-dashboard-slot",title:"Registration",basePath:"".concat(window.spaBase,"/home")},o=n(16072),s=n.n(o),r=n(27114),c=function(e){return function(){return s().createElement(r.BrowserRouter,null,s().createElement(i.DashboardExtension,{path:e.path,title:e.title,basePath:e.basePath,icon:e.icon}))}},d=n(51354),l={path:"dashboard",slot:"queue-dashboard-slot",title:"Dashboard",basePath:"".concat(window.spaBase,"/home")},u={path:"dispensing",slot:"dispensing-dashboard-slot",title:"Pharmacy",basePath:"".concat(window.spaBase,"/home")},p={path:"triage",slot:"triage-queue-dashboard-slot",title:"Triage",basePath:"".concat(window.spaBase,"/home")},y={path:"consultation",slot:"consultation-dashboard-slot",title:"Consultation",basePath:"".concat(window.spaBase,"/home")},h={path:"dashboard",slot:"dha-workflow-dashboard-slot",title:"Dashboard",basePath:"".concat(window.spaBase,"/home")},f={path:"accounting",slot:"accounting-dashboard-slot",title:"Accounting",basePath:"".concat(window.spaBase,"/home")},g={path:"bookings",slot:"bookings-dashboard-slot",title:"Bookings",basePath:"".concat(window.spaBase,"/home")},m={path:"admissions-dashboard",slot:"admissions-dashboard-slot",title:"Admissions",basePath:"".concat(window.spaBase,"/home")},b={path:"billing",slot:"ampath-billing-dashboard-slot",title:"Accounting",basePath:"".concat(window.spaBase,"/home")},_="@ampath/esm-dha-workflow-app",U={featureName:"Consulation Workflow",moduleName:_},L=n(84767);function T(){(0,i.defineConfigSchema)(_,A)}var P=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9093)]).then(n.bind(n,69093))}),{featureName:"side-nav-workflow-link",moduleName:_}),C=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(3654),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(6824),n.e(6028),n.e(5851),n.e(12),n.e(9091),n.e(7521)]).then(n.bind(n,27521))}),U),w=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(231),n.e(9721),n.e(6028),n.e(948)]).then(n.bind(n,96028))}),U),S=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(5015)]).then(n.bind(n,45015))}),U),k=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(8339)]).then(n.bind(n,88339))}),U),D=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(1833)]).then(n.bind(n,41833))}),U),v=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(1729)]).then(n.bind(n,71729))}),U),B=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(2076),n.e(7420)]).then(n.bind(n,27420))}),{featureName:"workflow-registry-link",moduleName:_}),E=(0,i.getSyncLifecycle)(c(a),U),N=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(231),n.e(9721),n.e(6028),n.e(6374)]).then(n.bind(n,66243))}),U),O=(0,i.getSyncLifecycle)(c(l),U),q=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4454),n.e(5851),n.e(2988)]).then(n.bind(n,85851))}),U),x=(0,i.getSyncLifecycle)(c(u),U),I=(0,i.getSyncLifecycle)(c(p),U),W=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(6824),n.e(1321)]).then(n.bind(n,81321))}),U),Q=(0,i.getSyncLifecycle)(c(y),U),j=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(6824),n.e(8239)]).then(n.bind(n,38239))}),U),H=(0,i.getSyncLifecycle)(c(h),U),M=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4454),n.e(5851),n.e(2988)]).then(n.bind(n,85851))}),U),R=(0,i.getSyncLifecycle)(c(f),U),F=(0,i.getAsyncLifecycle)((function(){return n.e(8895).then(n.bind(n,8895))}),U),K=(0,i.getSyncLifecycle)(c(g),U),z=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(6264)]).then(n.bind(n,16264))}),U),G=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(8558)]).then(n.bind(n,78558))}),U),J=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(6824),n.e(6260)]).then(n.bind(n,46260))}),U),V=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(3654),n.e(231),n.e(9721),n.e(9091)]).then(n.bind(n,49091))}),U),X=(0,i.getSyncLifecycle)(c({path:"service-queue-admin",slot:"service-queue-admin-dashboard-slot",title:"Service Queue Admin",basePath:"dha-workflow"}),U),Y=(0,i.getSyncLifecycle)(c(m),U),Z=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(12),n.e(2882)]).then(n.bind(n,40012))}),U),$=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(2021)]).then(n.bind(n,52021))}),U),ee=(0,i.getSyncLifecycle)((0,d.createDashboardLink)({path:"Admissions",slot:"patient-chart-admissions-summary-dashboard-slot",title:"Admissions",icon:"omrs-icon-hospital-bed"}),U),te=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4205)]).then(n.bind(n,64205))}),U),ne=(0,i.getSyncLifecycle)(c(b),U),ie=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(810),n.e(1277),n.e(4674)]).then(n.bind(n,4674))}),U),Ae=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2177),n.e(7830),n.e(9564),n.e(3654),n.e(810),n.e(231),n.e(2076),n.e(4454),n.e(1997),n.e(9904)]).then(n.bind(n,39904))}),U),ae=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2177),n.e(7199),n.e(231),n.e(2076),n.e(7258)]).then(n.bind(n,67258))}),U),oe=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4986)]).then(n.bind(n,44986))}),U),se=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2177),n.e(231),n.e(2076),n.e(7836)]).then(n.bind(n,67836))}),U),re=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2076),n.e(590)]).then(n.bind(n,70590))}),U),ce=(0,i.getAsyncLifecycle)((function(){return n.e(5119).then(n.bind(n,55119))}),{featureName:"admissions-form-entry",moduleName:_}),de=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2076),n.e(2230)]).then(n.bind(n,12230))}),U),le=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(3654),n.e(9043),n.e(2076),n.e(5056)]).then(n.bind(n,85056))}),U)},84767:(e,t,n)=>{var i={"./am.json":[81197,1197],"./en.json":[34300,4300],"./es.json":[93099,3099],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./km.json":[54335,4335]};function A(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],A=t[0];return n.e(t[1]).then((()=>n(A)))}A.keys=()=>Object.keys(i),A.id=84767,e.exports=A}}]);
1
+ (globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[2333],{42333:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MNCHRoot:()=>J,accountingDashboard:()=>F,accountingDashboardLink:()=>R,admissionsDashboard:()=>Z,admissionsDashboardLink:()=>Y,attendedToPatientsExtension:()=>k,billingDashboard:()=>ie,billingDashboardLink:()=>ne,billingRoot:()=>Ae,bookings:()=>z,bookingsDashboardLink:()=>K,claims:()=>se,consultationDashboardLink:()=>Q,consultationQueue:()=>j,createOrderBillFormWorkspace:()=>ae,dhaWorkflowDashboard:()=>M,dhaWorkflowDashboardLink:()=>H,formEntryWorkspace:()=>ce,generateInterventionAttachmentsWorkspace:()=>le,importTranslation:()=>L,mnchQueueDashboardLink:()=>G,moduleName:()=>_,navLinks:()=>P,patientAdmissionSummary:()=>te,patientChartAdmissionsLink:()=>ee,pharmacyDashboardLink:()=>x,preauthsModal:()=>re,queueDashboardExtension:()=>q,queueDashboardLink:()=>O,registry:()=>w,registryDashboardLink:()=>E,registryExtension:()=>N,root:()=>C,serviceQueueAdmin:()=>V,serviceQueueBannerComponent:()=>$,serviceQueuesAdminLink:()=>X,startupApp:()=>T,triageAttendedToPatientsExtension:()=>v,triageDashboardLink:()=>I,triageQueueExtension:()=>W,triageWaitingPatientsExtension:()=>D,uploadInterventionAttachmentsWorkspace:()=>de,visitBillingForm:()=>oe,waitingPatientsExtension:()=>S,workflowRegistryLink:()=>B});var i=n(25987),A={concepts:{defaultPriorityConceptUuid:{_type:i.Type.ConceptUuid,_default:!1,_description:"The UUID of the default priority for the queues eg Not urgent."},defaultStatusConceptUuid:{_type:i.Type.ConceptUuid,_default:"51ae5e4d-b72b-4912-bf31-a17efb690aeb",_description:"The UUID of the default status for the queues eg Waiting."},defaultTransitionStatus:{_type:i.Type.ConceptUuid,_default:"ca7494ae-437f-4fd0-8aae-b88b9a2ba47d",_description:"The UUID of the default status for attending a service in the queues eg In Service."},systolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},diastolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},emergencyPriorityConceptUuid:{_type:i.Type.ConceptUuid,_default:!1,_description:"The UUID of the priority with the highest sort weight for the queues eg Emergency."},generalPatientNoteConceptUuid:{_type:i.Type.ConceptUuid,_default:"162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",_description:"The UUID of the free text note field intended to capture unstructured description of the patient encounter"},heightUuid:{_type:i.Type.ConceptUuid,_default:"5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},historicalObsConceptUuid:{_type:i.Type.Array,_default:["161643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"],_description:"The Uuids of the obs that are displayed on the previous visit modal",_elements:{_type:i.Type.ConceptUuid}},oxygenSaturationUuid:{_type:i.Type.ConceptUuid,_default:"5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},pulseUuid:{_type:i.Type.ConceptUuid,_default:"5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},problemListConceptUuid:{_type:i.Type.ConceptUuid,_default:"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},respiratoryRateUuid:{_type:i.Type.ConceptUuid,_default:"5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},temperatureUuid:{_type:i.Type.ConceptUuid,_default:"5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},visitDiagnosesConceptUuid:{_type:i.Type.ConceptUuid,_default:"159947AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},weightUuid:{_type:i.Type.ConceptUuid,_default:"5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},subDomainUrl:{_type:i.Type.String,_description:"Subdomain e.g training,staging",_default:""},etlBaseUrl:{_type:i.Type.String,_description:"ETL Endpoint",_default:""},hieBaseUrl:{_type:i.Type.String,_description:"HIE Endpoint",_default:""},claimsBaseUrl:{_type:i.Type.String,_description:"",_default:""},claimsKey:{_type:i.Type.String,_description:"",_default:""},registrationBillableServices:{_type:i.Type.String,_description:"Billable services e.g consultation",_default:""},cashConsultationOrderTypeUuid:{_type:i.Type.String,_description:"CASH Consultation Order type uuid",_default:""},shaConsultationOrderTypeUuid:{_type:i.Type.String,_description:"SHA Consultation Order type uuid",_default:""},cashConsulationConceptUuid:{_type:i.Type.String,_description:"Cash Consultation concept uuid",_default:""},shaConsulationConceptUuid:{_type:i.Type.String,_description:"SHA Consultation concept uuid",_default:""},outPatientCareSettingUuid:{_type:i.Type.String,_description:"Outpatient care settings uuid",_default:""},orderEncounterTypeUuid:{_type:i.Type.String,_description:"Outpatient care settings uuid",_default:""},nonSHAPaymentModes:{_type:i.Type.Array,_description:"NON SHA payment modes",_default:[]},registrationServicequeues:{_type:i.Type.Array,_description:"Service Queues to display at send to triage",_default:[]},consultationBillableServiceNames:{_type:i.Type.Array,_description:"Consultation billable service names",_default:["CONSULTATION","KESSES CONSULTATION"]},maternityDischargeFormUuid:{_type:i.Type.ConceptUuid,_default:"a6f7d96d-7d6e-3c51-9786-7b817515ff5b"},maternityDischargeEncounterTypeUuid:{_type:i.Type.ConceptUuid,_default:"e3c2a17f-4d58-4725-b702-a5d75a2231d0"},shaPaymentModeUuid:{_type:i.Type.ConceptUuid,_default:"1be55f87-2931-41e0-89c8-8f5652c7c303"},cashPaymentModeUuid:{_type:i.Type.ConceptUuid,_default:"63eff7a4-6f82-43c4-a333-dbcc58fe9f74"}},a={path:"registration",slot:"client-registry-dashboard-slot",title:"Registration",basePath:"".concat(window.spaBase,"/home")},o=n(16072),s=n.n(o),r=n(27114),c=function(e){return function(){return s().createElement(r.BrowserRouter,null,s().createElement(i.DashboardExtension,{path:e.path,title:e.title,basePath:e.basePath,icon:e.icon}))}},d=n(51354),l={path:"dashboard",slot:"queue-dashboard-slot",title:"Dashboard",basePath:"".concat(window.spaBase,"/home")},u={path:"dispensing",slot:"dispensing-dashboard-slot",title:"Pharmacy",basePath:"".concat(window.spaBase,"/home")},p={path:"triage",slot:"triage-queue-dashboard-slot",title:"Triage",basePath:"".concat(window.spaBase,"/home")},y={path:"consultation",slot:"consultation-dashboard-slot",title:"Consultation",basePath:"".concat(window.spaBase,"/home")},h={path:"dashboard",slot:"dha-workflow-dashboard-slot",title:"Dashboard",basePath:"".concat(window.spaBase,"/home")},f={path:"accounting",slot:"accounting-dashboard-slot",title:"Accounting",basePath:"".concat(window.spaBase,"/home")},g={path:"bookings",slot:"bookings-dashboard-slot",title:"Bookings",basePath:"".concat(window.spaBase,"/home")},m={path:"admissions-dashboard",slot:"admissions-dashboard-slot",title:"Admissions",basePath:"".concat(window.spaBase,"/home")},b={path:"billing",slot:"ampath-billing-dashboard-slot",title:"Accounting",basePath:"".concat(window.spaBase,"/home")},_="@ampath/esm-dha-workflow-app",U={featureName:"Consulation Workflow",moduleName:_},L=n(84767);function T(){(0,i.defineConfigSchema)(_,A)}var P=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9093)]).then(n.bind(n,69093))}),{featureName:"side-nav-workflow-link",moduleName:_}),C=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(3654),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(6824),n.e(6028),n.e(5851),n.e(12),n.e(9091),n.e(7521)]).then(n.bind(n,27521))}),U),w=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(231),n.e(9721),n.e(6028),n.e(948)]).then(n.bind(n,96028))}),U),S=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(5015)]).then(n.bind(n,45015))}),U),k=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(8339)]).then(n.bind(n,88339))}),U),D=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(1833)]).then(n.bind(n,41833))}),U),v=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(2076),n.e(9721),n.e(4454),n.e(1729)]).then(n.bind(n,71729))}),U),B=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(2076),n.e(7420)]).then(n.bind(n,27420))}),{featureName:"workflow-registry-link",moduleName:_}),E=(0,i.getSyncLifecycle)(c(a),U),N=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(231),n.e(9721),n.e(6028),n.e(6374)]).then(n.bind(n,66243))}),U),O=(0,i.getSyncLifecycle)(c(l),U),q=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4454),n.e(5851),n.e(2988)]).then(n.bind(n,85851))}),U),x=(0,i.getSyncLifecycle)(c(u),U),I=(0,i.getSyncLifecycle)(c(p),U),W=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(6824),n.e(1321)]).then(n.bind(n,81321))}),U),Q=(0,i.getSyncLifecycle)(c(y),U),j=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(6824),n.e(8239)]).then(n.bind(n,38239))}),U),H=(0,i.getSyncLifecycle)(c(h),U),M=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4454),n.e(5851),n.e(2988)]).then(n.bind(n,85851))}),U),R=(0,i.getSyncLifecycle)(c(f),U),F=(0,i.getAsyncLifecycle)((function(){return n.e(8895).then(n.bind(n,8895))}),U),K=(0,i.getSyncLifecycle)(c(g),U),z=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(6264)]).then(n.bind(n,16264))}),U),G=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(8558)]).then(n.bind(n,78558))}),U),J=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(6824),n.e(6260)]).then(n.bind(n,46260))}),U),V=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(3654),n.e(231),n.e(9721),n.e(9091)]).then(n.bind(n,49091))}),U),X=(0,i.getSyncLifecycle)(c({path:"service-queue-admin",slot:"service-queue-admin-dashboard-slot",title:"Service Queue Admin",basePath:"dha-workflow"}),U),Y=(0,i.getSyncLifecycle)(c(m),U),Z=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(12),n.e(2882)]).then(n.bind(n,40012))}),U),$=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(231),n.e(9721),n.e(2021)]).then(n.bind(n,52021))}),U),ee=(0,i.getSyncLifecycle)((0,d.createDashboardLink)({path:"Admissions",slot:"patient-chart-admissions-summary-dashboard-slot",title:"Admissions",icon:"omrs-icon-hospital-bed"}),U),te=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4205)]).then(n.bind(n,64205))}),U),ne=(0,i.getSyncLifecycle)(c(b),U),ie=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(9564),n.e(810),n.e(1277),n.e(4674)]).then(n.bind(n,4674))}),U),Ae=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2177),n.e(7830),n.e(9564),n.e(3654),n.e(810),n.e(231),n.e(2076),n.e(4454),n.e(1997),n.e(9569)]).then(n.bind(n,59569))}),U),ae=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2177),n.e(7199),n.e(231),n.e(2076),n.e(7258)]).then(n.bind(n,67258))}),U),oe=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(4986)]).then(n.bind(n,44986))}),U),se=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2177),n.e(231),n.e(2076),n.e(7836)]).then(n.bind(n,67836))}),U),re=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2076),n.e(590)]).then(n.bind(n,70590))}),U),ce=(0,i.getAsyncLifecycle)((function(){return n.e(5119).then(n.bind(n,55119))}),{featureName:"admissions-form-entry",moduleName:_}),de=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(2076),n.e(2230)]).then(n.bind(n,12230))}),U),le=(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(961),n.e(7743),n.e(3654),n.e(9043),n.e(2076),n.e(5056)]).then(n.bind(n,85056))}),U)},84767:(e,t,n)=>{var i={"./am.json":[81197,1197],"./en.json":[34300,4300],"./es.json":[93099,3099],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./km.json":[54335,4335]};function A(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],A=t[0];return n.e(t[1]).then((()=>n(A)))}A.keys=()=>Object.keys(i),A.id=84767,e.exports=A}}]);
package/dist/6824.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[948,6824],{4947:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(16072),o=n.n(r),a=n(85072),l=n.n(a),i=n(97825),c=n.n(i),u=n(77659),s=n.n(u),d=n(55056),m=n.n(d),f=n(10540),A=n.n(f),p=n(41113),_=n.n(p),h=n(7457),w={};w.styleTagTransform=_(),w.setAttributes=m(),w.insert=s().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=A(),l()(h.A,w);const y=h.A&&h.A.locals?h.A.locals:void 0,g=function(e){var t=e.title,n=e.count,r=e.other;return t?o().createElement("div",{className:y.statsCard},o().createElement("div",{className:y.statsCardHeader},o().createElement("h5",null,t),o().createElement("h1",null,n," ",r))):o().createElement(o().Fragment,null)}},7457:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__stat-card-component__statsCard___BtVgd{display:flex;flex-direction:column;width:40%;row-gap:5px;border-radius:12px;border:1px solid #d2d2d2;height:100px;padding:10px 10px}","",{version:3,sources:["webpack://./src/shared/ui/stat-card/stat-card.component.scss"],names:[],mappings:"AAAA,2DACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,WAAA,CACA,kBAAA,CACA,wBAAA,CACA,YAAA,CACA,iBAAA",sourcesContent:[".statsCard{\n display: flex;\n flex-direction: column;\n width: 40%;\n row-gap: 5px;\n border-radius: 12px;\n border: 1px solid #d2d2d2;\n height: 100px;\n padding: 10px 10px;\n}"],sourceRoot:""}]),l.locals={statsCard:"-esm-dha-workflow__stat-card-component__statsCard___BtVgd"};const i=l},10901:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),l.locals={};const i=l},10990:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function i(e){o(l,r,a,i,c,"next",e)}function c(e){o(l,r,a,i,c,"throw",e)}i(void 0)}))}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function u(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}n.d(t,{LI:()=>g,LX:()=>C,MW:()=>w,QN:()=>y,Zr:()=>v,an:()=>p,d3:()=>b});var s=1500,d="dha_consultation_clearance";function m(){if("undefined"==typeof window)return[];try{var e;return JSON.parse(null!==(e=window.localStorage.getItem(d))&&void 0!==e?e:"[]")}catch(e){return[]}}function f(e){if("undefined"!=typeof window)try{window.localStorage.setItem(d,JSON.stringify(e))}catch(e){}}var A=function(e){return new Promise((function(t){return setTimeout(t,e)}))};function p(e){var t,n,o=e.exempt||e.preCleared,a={id:"cc-".concat(Date.now(),"-").concat(Math.floor(1e3*Math.random())),patientName:e.patientName,crNumber:e.crNumber,locationUuid:e.locationUuid,queue:e.queue,visitType:e.visitType,payer:e.payer,amount:e.preCleared?null!==(t=e.amountOverride)&&void 0!==t?t:0:e.exempt?0:s,status:o?"CLEARED":"AWAITING_PAYMENT",createdAt:(new Date).toISOString()};return f([a].concat(function(e){if(Array.isArray(e))return r(e)}(n=m())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),a}var _="dha_prepaid_services";function h(){if("undefined"==typeof window)return[];try{var e;return JSON.parse(null!==(e=window.localStorage.getItem(_))&&void 0!==e?e:"[]")}catch(e){return[]}}function w(e,t){return a((function(){return u(this,(function(n){switch(n.label){case 0:return[4,A(200)];case 1:return n.sent(),[2,h().filter((function(n){return!(e&&n.status!==e||t&&n.locationUuid!==t)})).sort((function(e,t){return e.dueDate<t.dueDate?-1:1}))]}}))}))()}function y(e){return h().find((function(t){return t.crNumber===e&&"OPEN"===t.status}))}function g(e){!function(e){if("undefined"!=typeof window)try{window.localStorage.setItem(_,JSON.stringify(e))}catch(e){}}(h().map((function(t){return t.id===e?c(i({},t),{status:"FULFILLED"}):t})))}function C(e,t){return a((function(){return u(this,(function(n){switch(n.label){case 0:return[4,A(250)];case 1:return n.sent(),[2,m().filter((function(n){return!(e&&n.status!==e||t&&n.locationUuid!==t)})).sort((function(e,t){return e.createdAt<t.createdAt?1:-1}))]}}))}))()}function v(e){return a((function(){var t;return u(this,(function(n){switch(n.label){case 0:return[4,A(50)];case 1:return n.sent(),[2,{awaiting:(t=m().filter((function(t){return!e||t.locationUuid===e}))).filter((function(e){return"AWAITING_PAYMENT"===e.status})).length,cleared:t.filter((function(e){return"CLEARED"===e.status})).length}]}}))}))()}function b(e){return a((function(){return u(this,(function(t){switch(t.label){case 0:return[4,A(300)];case 1:return t.sent(),f(m().map((function(t){return t.id===e?c(i({},t),{status:"CLEARED"}):t}))),[2]}}))}))()}},13164:(e,t,n)=>{n.d(t,{A:()=>C});var r=n(16072),o=n.n(r),a=n(85072),l=n.n(a),i=n(97825),c=n.n(i),u=n(77659),s=n.n(u),d=n(55056),m=n.n(d),f=n(10540),A=n.n(f),p=n(41113),_=n.n(p),h=n(90974),w={};w.styleTagTransform=_(),w.setAttributes=m(),w.insert=s().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=A(),l()(h.A,w);const y=h.A&&h.A.locals?h.A.locals:void 0;var g=n(25987);const C=function(){return o().createElement(o().Fragment,null,o().createElement("div",{className:y.fhwrSlotLayout},o().createElement("div",{className:y.fhwrSlotContent},o().createElement("div",{className:y.fhwrSlot},o().createElement(g.ExtensionSlot,{name:"facility-hie-header-slot"})),o().createElement("div",{className:y.fhwrSlot},o().createElement(g.ExtensionSlot,{name:"health-worker-hie-header-slot"})))))}},14079:(e,t,n)=>{n.d(t,{T:()=>c,t:()=>i});var r=n(25987);function o(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function i(e){o(l,r,a,i,c,"next",e)}function c(e){o(l,r,a,i,c,"throw",e)}i(void 0)}))}}function l(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function i(e){return a((function(){var t,n;return l(this,(function(o){switch(o.label){case 0:return t=new URLSearchParams({v:"custom:(uuid,name,location:(uuid,display))",location:e}).toString(),n="".concat(r.restBaseUrl,"/queue"),[4,(0,r.openmrsFetch)("".concat(n,"?").concat(t))];case 1:return[4,o.sent().json()];case 2:return[2,o.sent().results]}}))}))()}function c(e){return a((function(){var t;return l(this,(function(n){switch(n.label){case 0:return t="".concat(r.restBaseUrl,"/queue-entry/transition"),[4,(0,r.openmrsFetch)(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()]}}))}))()}},22536:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__move-patient-component__modelLayout___0T068{display:flex;flex-direction:column;width:100%;padding:15px 15px}.-esm-dha-workflow__move-patient-component__formSection___qJVf3{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__move-patient-component__sectionHeader___GrD-V{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__move-patient-component__formRow___uMLgS{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__move-patient-component__formControl___iQauu{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__move-patient-component__actionSection___427LO{display:flex;flex-direction:row;width:100%;column-gap:5px}","",{version:3,sources:["webpack://./src/service-queues/modals/move/move-patient.component.scss"],names:[],mappings:"AAAA,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,iBAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,kEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,4DACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CAEJ,kEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:[".modelLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 15px 15px;\n}\n.formSection{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.sectionHeader{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.formRow{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.formControl{\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.actionSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}"],sourceRoot:""}]),l.locals={modelLayout:"-esm-dha-workflow__move-patient-component__modelLayout___0T068",formSection:"-esm-dha-workflow__move-patient-component__formSection___qJVf3",sectionHeader:"-esm-dha-workflow__move-patient-component__sectionHeader___GrD-V",formRow:"-esm-dha-workflow__move-patient-component__formRow___uMLgS",formControl:"-esm-dha-workflow__move-patient-component__formControl___iQauu",actionSection:"-esm-dha-workflow__move-patient-component__actionSection___427LO"};const i=l},22540:(e,t,n)=>{n.d(t,{Q:()=>o,s:()=>r});var r=function(e){return e.Completed="COMPLETED",e.Waiting="WAITING",e.InService="IN SERVICE",e}({}),o=function(e){return e.Emergency="EMERGENCY",e.Priority="PRIORITY",e.NonUrgent="NON-URGENT",e}({})},25838:(e,t,n)=>{n.d(t,{_m:()=>i,jN:()=>c,xL:()=>u});var r=n(25987);function o(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function i(e){o(l,r,a,i,c,"next",e)}function c(e){o(l,r,a,i,c,"throw",e)}i(void 0)}))}}function l(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function i(e){return a((function(){var t,n,o;return l(this,(function(a){switch(a.label){case 0:return t="".concat(r.restBaseUrl,"/visit"),[4,(0,r.openmrsFetch)(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})];case 1:return(n=a.sent()).ok?[3,3]:[4,n.text()];case 2:throw o=a.sent(),new Error("Request failed with ".concat(n.status,": ").concat(o));case 3:return[2,n.json()]}}))}))()}function c(e,t){return a((function(){var n,o,a;return l(this,(function(l){switch(l.label){case 0:return n="".concat(r.restBaseUrl,"/visit/").concat(e),[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return(o=l.sent()).ok?[3,3]:[4,o.text()];case 2:throw a=l.sent(),new Error("Request failed with ".concat(o.status,": ").concat(a));case 3:return[2,o.json()]}}))}))()}function u(e,t){return a((function(){var n,o,a;return l(this,(function(l){switch(l.label){case 0:return n="".concat(r.restBaseUrl,"/visit/").concat(e),[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return(o=l.sent()).ok?[3,3]:[4,o.text()];case 2:throw a=l.sent(),new Error("Request failed with ".concat(o.status,": ").concat(a));case 3:return[2,o.json()]}}))}))()}},39001:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX{display:flex;flex-direction:column;width:100%;row-gap:10px}.-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX .-esm-dha-workflow__daily-report-patient-list__actionHeaderSection___4IhLX{display:flex;flex-direction:row;justify-content:flex-end;width:100%;column-gap:15px}.-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX .-esm-dha-workflow__daily-report-patient-list__actionHeaderSection___4IhLX .-esm-dha-workflow__daily-report-patient-list__searchInput___g1xlZ{width:40%}.-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX .-esm-dha-workflow__daily-report-patient-list__serveModalContentSection___vM\\+Dq{display:flex;flex-direction:column;width:100%;row-gap:10px}","",{version:3,sources:["webpack://./src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.scss"],names:[],mappings:"AAAA,wEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CAEA,mJACI,YAAA,CACA,kBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CAEA,sNACI,SAAA,CAIR,yJACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA",sourcesContent:[".checkedInlLayout {\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 10px;\n\n .actionHeaderSection {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n width: 100%;\n column-gap: 15px;\n\n .searchInput {\n width: 40%;\n }\n }\n\n .serveModalContentSection {\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 10px;\n }\n\n}"],sourceRoot:""}]),l.locals={checkedInlLayout:"-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX",actionHeaderSection:"-esm-dha-workflow__daily-report-patient-list__actionHeaderSection___4IhLX",searchInput:"-esm-dha-workflow__daily-report-patient-list__searchInput___g1xlZ",serveModalContentSection:"-esm-dha-workflow__daily-report-patient-list__serveModalContentSection___vM+Dq"};const i=l},43227:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__confirm-modal__modalLayout___WC62A{display:flex;flex-direction:column;row-gap:15px;padding:15px 15px}.-esm-dha-workflow__confirm-modal__modalTitle___RDCGD{display:flex;flex-direction:row;justify-content:center}.-esm-dha-workflow__confirm-modal__modalContentSection___aGI9S{display:flex;flex-direction:row;row-gap:15px;align-items:center;justify-content:center}","",{version:3,sources:["webpack://./src/shared/ui/confirm-modal/confirm.modal.scss"],names:[],mappings:"AAAA,uDACI,YAAA,CACA,qBAAA,CACA,YAAA,CACA,iBAAA,CAEJ,sDACI,YAAA,CACA,kBAAA,CACA,sBAAA,CAEJ,+DACI,YAAA,CACA,kBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:[".modalLayout{\n display: flex;\n flex-direction: column;\n row-gap: 15px;\n padding: 15px 15px;\n}\n.modalTitle{\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n.modalContentSection{\n display: flex;\n flex-direction: row;\n row-gap: 15px;\n align-items: center;\n justify-content: center;\n}"],sourceRoot:""}]),l.locals={modalLayout:"-esm-dha-workflow__confirm-modal__modalLayout___WC62A",modalTitle:"-esm-dha-workflow__confirm-modal__modalTitle___RDCGD",modalContentSection:"-esm-dha-workflow__confirm-modal__modalContentSection___aGI9S"};const i=l},45883:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__service-queue-component__consultationLayout___fP0LQ{display:flex;flex-direction:column;width:100%;padding:15px 15px;row-gap:15px}.-esm-dha-workflow__service-queue-component__headerAction___4qPNf{display:flex;flex-direction:row;column-gap:5px;justify-content:flex-end;padding:10px 10px}","",{version:3,sources:["webpack://./src/service-queues/service-queue/service-queue.component.scss"],names:[],mappings:"AAAA,wEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,iBAAA,CACA,YAAA,CAEJ,kEACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,wBAAA,CACA,iBAAA",sourcesContent:[".consultationLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 15px 15px;\n row-gap: 15px;\n}\n.headerAction{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n justify-content: flex-end;\n padding: 10px 10px;\n}\n"],sourceRoot:""}]),l.locals={consultationLayout:"-esm-dha-workflow__service-queue-component__consultationLayout___fP0LQ",headerAction:"-esm-dha-workflow__service-queue-component__headerAction___4qPNf"};const i=l},50196:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65{display:flex;flex-direction:row;width:100%;border-radius:12px;border:1px solid #d2d2d2;min-height:100px;padding:10px 10px;column-gap:10px}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__aggregateStatsCardHeader___mdeys{display:flex;flex-direction:column;width:50%;column-gap:3px}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg{display:flex;flex-direction:column;width:50%;font-size:14px;row-gap:5px}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg .-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv{display:flex;flex-direction:row;width:100%}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg .-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv .-esm-dha-workflow__aggregate-stat-card__title___9JHiO{width:90%}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg .-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv .-esm-dha-workflow__aggregate-stat-card__count___gjmZ8{width:10%}.-esm-dha-workflow__aggregate-stat-card__totalCount___GOYfp{color:#0f62fe}.-esm-dha-workflow__aggregate-stat-card__totalCount___GOYfp:hover{cursor:pointer}","",{version:3,sources:["webpack://./src/shared/ui/aggregate-stat-card/aggregate-stat-card.scss"],names:[],mappings:"AAAA,oEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,kBAAA,CACA,wBAAA,CACA,gBAAA,CACA,iBAAA,CACA,eAAA,CACA,8IACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,cAAA,CAEJ,2HACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,cAAA,CACA,WAAA,CACD,wLACC,YAAA,CACA,kBAAA,CACA,UAAA,CACA,+OACG,SAAA,CAEH,+OACI,SAAA,CAMZ,4DACI,aAAA,CAGJ,kEACI,cAAA",sourcesContent:[".aggregateStatsCard{\n display: flex;\n flex-direction: row;\n width: 100%;\n border-radius: 12px;\n border: 1px solid #d2d2d2;\n min-height: 100px;\n padding: 10px 10px;\n column-gap: 10px;\n .aggregateStatsCardHeader{\n display: flex;\n flex-direction: column;\n width: 50%;\n column-gap: 3px;\n }\n .stats{\n display: flex;\n flex-direction: column;\n width: 50%;\n font-size: 14px;\n row-gap: 5px;\n .statDetails{\n display: flex;\n flex-direction: row;\n width: 100%;\n .title{\n width: 90%;\n }\n .count{\n width: 10%;\n }\n }\n }\n}\n\n.totalCount{\n color: rgb(15, 98, 254);\n}\n\n.totalCount:hover{\n cursor: pointer;\n}"],sourceRoot:""}]),l.locals={aggregateStatsCard:"-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65",aggregateStatsCardHeader:"-esm-dha-workflow__aggregate-stat-card__aggregateStatsCardHeader___mdeys",stats:"-esm-dha-workflow__aggregate-stat-card__stats___Hiktg",statDetails:"-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv",title:"-esm-dha-workflow__aggregate-stat-card__title___9JHiO",count:"-esm-dha-workflow__aggregate-stat-card__count___gjmZ8",totalCount:"-esm-dha-workflow__aggregate-stat-card__totalCount___GOYfp"};const i=l},62890:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),l.locals={};const i=l},66270:(e,t,n)=>{n.d(t,{A:()=>T});var r=n(47743),o=n(16072),a=n.n(o),l=n(85072),i=n.n(l),c=n(97825),u=n.n(c),s=n(77659),d=n.n(s),m=n(55056),f=n.n(m),A=n(10540),p=n.n(A),_=n(41113),h=n.n(_),w=n(22536),y={};y.styleTagTransform=h(),y.setAttributes=f(),y.insert=d().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=p(),i()(w.A,y);const g=w.A&&w.A.locals?w.A.locals:void 0;var C=n(14079),v=n(75862),b=n(25987);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){x(a,r,o,l,i,"next",e)}function i(e){x(a,r,o,l,i,"throw",e)}l(void 0)}))}}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const T=function(e){var t=e.open,n=e.onModalClose,l=e.locationUuid,i=e.currentQueueEntryUuid,c=e.onTransferSuccess,u=k((0,o.useState)([]),2),s=u[0],d=u[1],m=k((0,o.useState)(),2),f=m[0],A=m[1],p=k((0,o.useState)(),2),_=p[0],h=p[1],w=k((0,o.useState)(),2),y=w[0],E=w[1],x=k((0,o.useState)(!1),2),T=x[0],N=x[1];(0,o.useEffect)((function(){q()}),[l]);var q=function(){return S((function(){var e;return I(this,(function(t){switch(t.label){case 0:return[4,(0,C.t)(l)];case 1:return e=t.sent(),d(e),[2]}}))}))()},P=function(e,t,n){(0,b.showSnackbar)({kind:e,title:t,subtitle:n})};return a().createElement(a().Fragment,null,a().createElement(r.aFV,{modalHeading:"Transfer Client",open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:T?function(){}:function(){return S((function(){var e,t;return I(this,(function(n){switch(n.label){case 0:T&&P("error","Trsnefering patient","Transfering patient...please wait"),N(!0),e={queueEntryToTransition:i,newQueue:y.uuid,newStatus:v.cn.WAITING_UUID,newPriority:_,newPriorityComment:f},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,C.T)(e)];case 2:return n.sent(),P("success","Client succesfully moved",""),c(),[3,4];case 3:return t=n.sent(),P("error",t.message,""),N(!1),[3,4];case 4:return[2]}}))}))()},primaryButtonText:T?a().createElement(r.OuH,{description:"Assign To..."}):"Assign To",secondaryButtonText:"Cancel"},a().createElement(r.cwr,null,a().createElement("div",{className:g.modelLayout},a().createElement("div",{className:g.formSection},a().createElement("div",{className:g.formRow},a().createElement("div",{className:g.formControl},a().createElement(r.l6P,{id:"service-queue",labelText:"Select the new Queue",onChange:function(e){return t=e.target.value,n=s.find((function(e){return e.uuid===t})),void E(n);var t,n}},a().createElement(r.ebT,{value:"",text:""}),";",s&&s.filter((function(e){return e.uuid!==i})).map((function(e){return a().createElement(r.ebT,{value:e.uuid,text:"".concat(e.name," (").concat(e.location.display,")")})}))))),a().createElement("div",{className:g.formRow},a().createElement("div",{className:g.formControl},a().createElement(r.l6P,{id:"priority",labelText:"Select a Priority",onChange:function(e){return t=e.target.value,void h(t);var t}},a().createElement(r.ebT,{value:"",text:"Select"}),";",a().createElement(r.ebT,{value:v.i3.NORMAL_PRIORITY_UUID,text:"PRIORITY"}),";",a().createElement(r.ebT,{value:v.i3.NOT_URGENT_PRIORITY_UUID,text:"NON URGENT"}),";",a().createElement(r.ebT,{value:v.i3.EMERGENCY_PRIORITY_UUID,text:"EMERGENCY"}),";"))),a().createElement("div",{className:g.formRow},a().createElement("div",{className:g.formControl},a().createElement(r.fs1,{enableCounter:!0,helperText:"",id:"comment",labelText:"Comment",maxCount:500,placeholder:"",onChange:function(e){return t=e.target.value,void A(t);var t},rows:4}))))))))}},67833:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__queue-list-component__queueListLayout___NRAjd{display:flex;flex-direction:column;width:100%;row-gap:15px;padding:5px 5px}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl{display:flex;flex-direction:row;justify-content:flex-end;width:100%;column-gap:10px}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl .-esm-dha-workflow__queue-list-component__filters___0Q8Dk{display:flex;flex-direction:row;width:80%;column-gap:15px}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl .-esm-dha-workflow__queue-list-component__filters___0Q8Dk .-esm-dha-workflow__queue-list-component__filter___Bs4bt{width:45%}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl .-esm-dha-workflow__queue-list-component__actionBtns___32J\\+M{display:flex;flex-direction:row;width:20%;column-gap:15px}.-esm-dha-workflow__queue-list-component__tableSection___Xy2dr{display:flex;flex-direction:column;width:100%;row-gap:10px}.-esm-dha-workflow__queue-list-component__nonUrgentTag___XIeQc{background-color:#a7f0ba;color:#0e6027}.-esm-dha-workflow__queue-list-component__emergencyTag___\\+JXpV{background-color:#da1e28;color:#fff}.-esm-dha-workflow__queue-list-component__priorityTag___N1pgD{background-color:#f8ed62;color:brown}.-esm-dha-workflow__queue-list-component__flaggedPatient___ETW9e{color:orange}.-esm-dha-workflow__queue-list-component__unflaggedPatient___lYmvG{color:#000}","",{version:3,sources:["webpack://./src/service-queues/queue-list/queue-list.component.scss"],names:[],mappings:"AAAA,kEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CACA,eAAA,CAEJ,+DACI,YAAA,CACA,kBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CACA,yHACI,YAAA,CACA,kBAAA,CACA,SAAA,CACA,eAAA,CACA,kLACI,SAAA,CAGR,6HACI,YAAA,CACA,kBAAA,CACA,SAAA,CACA,eAAA,CAGR,+DACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CAKJ,+DACI,wBAAA,CACA,aAAA,CAEJ,gEACI,wBAAA,CACA,UAAA,CAEJ,8DACI,wBAAA,CACA,WAAA,CAEJ,iEACI,YAAA,CAEJ,mEACI,UAAA",sourcesContent:[".queueListLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 15px;\n padding: 5px 5px;\n}\n.actionHeader{\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n width: 100%;\n column-gap: 10px;\n .filters{\n display: flex;\n flex-direction: row;\n width: 80%;\n column-gap: 15px;\n .filter{\n width: 45%;\n }\n }\n .actionBtns{\n display: flex;\n flex-direction: row;\n width: 20%;\n column-gap: 15px;\n }\n}\n.tableSection{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 10px;\n}\n\n\n\n.nonUrgentTag{\n background-color:rgb(167, 240, 186);\n color:rgb(14, 96, 39);\n}\n.emergencyTag{\n background-color:#da1e28;\n color:#FFF;\n}\n.priorityTag{\n background-color:rgb(248,237,98);\n color:brown;\n}\n.flaggedPatient{\n color: orange;\n}\n.unflaggedPatient{\n color: black;\n}"],sourceRoot:""}]),l.locals={queueListLayout:"-esm-dha-workflow__queue-list-component__queueListLayout___NRAjd",actionHeader:"-esm-dha-workflow__queue-list-component__actionHeader___pEpFl",filters:"-esm-dha-workflow__queue-list-component__filters___0Q8Dk",filter:"-esm-dha-workflow__queue-list-component__filter___Bs4bt",actionBtns:"-esm-dha-workflow__queue-list-component__actionBtns___32J+M",tableSection:"-esm-dha-workflow__queue-list-component__tableSection___Xy2dr",nonUrgentTag:"-esm-dha-workflow__queue-list-component__nonUrgentTag___XIeQc",emergencyTag:"-esm-dha-workflow__queue-list-component__emergencyTag___+JXpV",priorityTag:"-esm-dha-workflow__queue-list-component__priorityTag___N1pgD",flaggedPatient:"-esm-dha-workflow__queue-list-component__flaggedPatient___ETW9e",unflaggedPatient:"-esm-dha-workflow__queue-list-component__unflaggedPatient___lYmvG"};const i=l},69117:(e,t,n)=>{n.d(t,{A:()=>Ie});var r=n(16072),o=n.n(r),a=n(25987),l=n(11314),i=n(47743),c=n(85072),u=n.n(c),s=n(97825),d=n.n(s),m=n(77659),f=n.n(m),A=n(55056),p=n.n(A),_=n(10540),h=n.n(_),w=n(41113),y=n.n(w),g=n(67833),C={};C.styleTagTransform=y(),C.setAttributes=p(),C.insert=f().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=h(),u()(g.A,C);const v=g.A&&g.A.locals?g.A.locals:void 0;var b=n(22540),E=n(93323),x="checkin",S=function(e,t){return(t+e).replaceAll(" ","")},k=n(10990);function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}const P=function(e){var t,n,l,c,u=e.queueRoom,s=e.queueEntries,d=e.handleMovePatient,m=e.handleTransitionPatient,f=e.handleServePatient,A=e.handleSignOff,p=e.handleRemovePatient,_=e.showComingFromCol,h=e.handleClearQueue,w=function(e,t){return e.filter((function(e){return e.priority===t})).sort((function(e,t){return t.wait_time_in_min-e.wait_time_in_min}))},y=function(){return!!D&&function(e,t){return!(!e||!t)&&S(e,t)===(null!==(n=localStorage.getItem(x))&&void 0!==n?n:null);var n}(D.uuid,u)},g=function(e){return"".concat(C(e.family_name)," ").concat(C(e.middle_name)," ").concat(C(e.given_name))},C=function(e){return"NULL"!==e&&e?e:""},I=(0,a.useSession)(),q=null!==(c=null==I||null===(t=I.sessionLocation)||void 0===t?void 0:t.uuid)&&void 0!==c?c:"",P=T((0,r.useState)([]),2),O=P[0],R=P[1];(0,r.useEffect)((function(){(0,k.LX)(void 0,q).then(R)}),[q,s]);var B,j,L,U=function(e){var t="".concat(e.family_name," ").concat(e.middle_name," ").concat(e.given_name).toLowerCase().split(/\s+/).filter((function(e){return e&&"null"!==e}));return O.find((function(n){return!!(e.identifiers&&n.crNumber&&e.identifiers.includes(n.crNumber))||n.patientName.toLowerCase().split(/\s+/).filter(Boolean).filter((function(e){return t.includes(e)})).length>=2}))},D=null!==(B=null==I?void 0:I.currentProvider)&&void 0!==B?B:null,F=T((0,r.useState)(y()),2),Y=F[0],M=F[1],G=T((0,r.useState)(""),2),H=G[0],Q=G[1],J=T((0,r.useState)(),2),V=J[0],W=J[1],X=(0,r.useMemo)((function(){return w(s,b.Q.Emergency)}),[s]),z=(0,r.useMemo)((function(){return w(s,b.Q.Priority)}),[s]),$=(0,r.useMemo)((function(){return w(s,b.Q.NonUrgent)}),[s]),K=(0,r.useMemo)((function(){return N(X).concat(N(z),N($)).filter((function(e){return!H||e.status===H}))}),[s,H]),Z=(0,r.useMemo)((function(){return V?K.filter((function(e){return"".concat(e.family_name," ").concat(e.middle_name," ").concat(e.given_name).trim().toLowerCase().includes(V.trim().toLowerCase())})):K}),[s,V,H]),ee=(0,a.userHasAccess)("O3 Clear Triage Queue",{privileges:null!==(j=null===(n=I.user)||void 0===n?void 0:n.privileges)&&void 0!==j?j:[],roles:null!==(L=null===(l=I.user)||void 0===l?void 0:l.roles)&&void 0!==L?L:[]}),te=function(e){var t;switch(e){case b.s.Completed:t="green";break;case b.s.Waiting:t="gray";break;case b.s.InService:t="blue";break;default:t="gray"}return t};return o().createElement(o().Fragment,null,o().createElement("div",{className:v.queueListLayout},o().createElement("div",{className:v.actionHeader},o().createElement("div",{className:v.filters},o().createElement("div",{className:v.filter},o().createElement(i.a32,{onChange:function(e){var t="";e&&e.selectedItem&&(t=e.selectedItem.id),Q(t)},id:"queue-status-combobox",items:[{text:"ALL",id:""},{text:"IN SERVICE",id:"IN SERVICE"},{text:"WAITING",id:"WAITING"}],itemToString:function(e){return e?e.text:""},titleText:"Status"})),o().createElement("div",{className:v.filter},o().createElement(i.ksK,{id:"queue-search",labelText:"Name",onChange:function(e){return t=e.target.value,void W(t);var t},placeholder:"Enter patient name to filter"}))),o().createElement("div",{className:v.actionBtns},Y?o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement(i.$nd,{kind:"secondary",onClick:function(){localStorage.removeItem(x),M(y())}},"Check Out")),K.length>0?o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement(i.$nd,{kind:"danger",onClick:function(){h(K)},disabled:!ee},"Clear Queue"))):o().createElement(o().Fragment,null)):o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement(i.$nd,{kind:"primary",onClick:function(){D&&(function(e,t){var n=S(e,t);localStorage.setItem(x,n)}(D.uuid,u),M(y()))}},"Check In"))))),o().createElement("div",{className:v.tableSection},o().createElement(i.XIK,null,o().createElement(i.ndF,null,o().createElement(i.Hjg,null,o().createElement(i.A0N,null,"No"),o().createElement(i.A0N,null,"Name"),o().createElement(i.A0N,null,"Age(Years)"),o().createElement(i.A0N,null,"Phone Number"),o().createElement(i.A0N,null,"Identifiers"),o().createElement(i.A0N,null,"Coming From"),o().createElement(i.A0N,null,"Ticket"),o().createElement(i.A0N,null,"Status"),o().createElement(i.A0N,null,"Clearance"),o().createElement(i.A0N,null,"Priority"),o().createElement(i.A0N,null,"Wait Time"),o().createElement(i.A0N,null,"Action"))),o().createElement(i.BFY,null,Z.map((function(e,t){var n,r,a,l,c,u;return o().createElement(i.Hjg,{id:e.queue_entry_uuid},o().createElement(i.nA6,null,t+1),o().createElement(i.nA6,null,o().createElement("div",{className:1===e.hide_in_queue?v.flaggedPatient:v.unflaggedPatient},Y&&e.status!==b.s.Waiting?o().createElement(i.N_E,{href:"".concat(window.spaBase,"/patient/").concat(e.patient_uuid,"/chart/")},g(e)):o().createElement(o().Fragment,null,g(e)))),o().createElement(i.nA6,null,null!==(a=e.age)&&void 0!==a?a:""),o().createElement(i.nA6,null,null!==(l=e.phone_number)&&void 0!==l?l:""),o().createElement(i.nA6,null,null!==(c=e.identifiers)&&void 0!==c?c:""),o().createElement(i.nA6,null,_?e.queue_coming_from:""),o().createElement(i.nA6,null,e.queue_entry_id),o().createElement(i.nA6,null,o().createElement(i.vwO,{size:"md",type:te(e.status)},e.status)),o().createElement(i.nA6,null,(u=U(e))?"CLEARED"===u.status?o().createElement(i.vwO,{size:"md",type:"green"},"Ready"):o().createElement(i.vwO,{size:"md",type:"red"},"Awaiting clearance"):""),o().createElement(i.nA6,null,o().createElement(i.vwO,{size:"md",className:v[(0,E.EU)(e.priority)]},e.priority)),o().createElement(i.nA6,null,"".concat(e.wait_time_in_min," minute(s)")),0===e.hide_in_queue?o().createElement(o().Fragment,null,o().createElement(i.nA6,null,e.status===b.s.Waiting&&0===e.hide_in_queue?o().createElement(o().Fragment,null,o().createElement(i.$nd,{kind:"ghost",disabled:!Y||"AWAITING_PAYMENT"===(null===(n=U(e))||void 0===n?void 0:n.status),title:"AWAITING_PAYMENT"===(null===(r=U(e))||void 0===r?void 0:r.status)?"Consultation fee not yet cleared":void 0,onClick:function(){return f(e)}},"Call")):o().createElement(o().Fragment,null,Y?o().createElement(o().Fragment,null,o().createElement(i.obU,{"aria-label":"overflow-menu"},o().createElement(i.XSD,{itemText:"Assign To",onClick:function(){return d(e)}}),o().createElement(i.XSD,{itemText:"Transition",onClick:function(){return m(e)}}),o().createElement(i.XSD,{itemText:"Sign Off",onClick:function(){return A(e)}}),o().createElement(i.XSD,{itemText:"Remove Patient",onClick:function(){return p(e)}}))):o().createElement(o().Fragment,null)))):o().createElement(o().Fragment,null,o().createElement(i.nA6,null)))})))))))};var O=n(45883),R={};R.styleTagTransform=y(),R.setAttributes=p(),R.insert=f().bind(null,"head"),R.domAPI=d(),R.insertStyleElement=h(),u()(O.A,R);const B=O.A&&O.A.locals?O.A.locals:void 0;var j=n(66270),L=n(81204),U={};U.styleTagTransform=y(),U.setAttributes=p(),U.insert=f().bind(null,"head"),U.domAPI=d(),U.insertStyleElement=h(),u()(L.A,U);const D=L.A&&L.A.locals?L.A.locals:void 0;var F=n(14079),Y=n(75862);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Q=function(e){var t=e.open,n=e.onModalClose,l=e.currentQueueEntry,c=H((0,r.useState)(),2),u=c[0],s=c[1],d=H((0,r.useState)(),2),m=d[0],f=d[1],A=H((0,r.useState)(),2),p=A[0],_=A[1],h=function(e,t,n){(0,a.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(i.aFV,{open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:function(){return(e=function(){var e,t;return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:e={queueEntryToTransition:l.queue_entry_uuid,newQueue:l.service_uuid,newStatus:p,newPriority:m,newPriorityComment:u},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,F.T)(e)];case 2:return r.sent(),h("success","Client succesfully Transitioned",""),n(),[3,4];case 3:return t=r.sent(),h("error",t.message,""),[3,4];case 4:return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){G(a,r,o,l,i,"next",e)}function i(e){G(a,r,o,l,i,"throw",e)}l(void 0)}))})();var e},primaryButtonText:"Transition",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:D.modelLayout},o().createElement("div",{className:D.sectionHeader},o().createElement("h4",null,"Move Client")),o().createElement("div",{className:D.formSection},o().createElement("div",{className:D.formRow},o().createElement("div",{className:D.formControl},o().createElement(i.l6P,{id:"queue-status",labelText:"Select Queue Status",onChange:function(e){return t=e.target.value,void _(t);var t}},o().createElement(i.ebT,{value:"",text:""}),";",o().createElement(i.ebT,{value:Y.cn.WAITING_UUID,text:"IN WAITING"}),";",o().createElement(i.ebT,{value:Y.cn.IN_SERVICE_UUID,text:"IN SERVICE"}),";",o().createElement(i.ebT,{value:Y.cn.COMPLETED_UUID,text:"COMPLETED"}),";")),o().createElement("div",{className:D.formControl},o().createElement(i.l6P,{id:"priority",labelText:"Select a Priority",onChange:function(e){return t=e.target.value,void f(t);var t}},o().createElement(i.ebT,{value:"",text:"Select"}),";",o().createElement(i.ebT,{value:Y.i3.NORMAL_PRIORITY_UUID,text:"NORMAL"}),";",o().createElement(i.ebT,{value:Y.i3.EMERGENCY_PRIORITY_UUID,text:"EMERGENCY"}),";"))),o().createElement("div",{className:D.formRow},o().createElement("div",{className:D.formControl},o().createElement(i.fs1,{enableCounter:!0,helperText:"Comment",id:"comment",labelText:"Comment",maxCount:500,placeholder:"Comment",onChange:function(e){return t=e.target.value,void s(t);var t},rows:4}))))))))};var J=n(10901),V={};V.styleTagTransform=y(),V.setAttributes=p(),V.insert=f().bind(null,"head"),V.domAPI=d(),V.insertStyleElement=h(),u()(J.A,V);const W=J.A&&J.A.locals?J.A.locals:void 0;function X(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}const z=function(e){var t=e.open,n=e.onModalClose,r=e.currentQueueEntry,l=e.onSuccessfullServe,c=function(e,t,n){(0,a.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"Serve Client",open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:function(){return(e=function(){var e,t;return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(n){switch(n.label){case 0:e={queueEntryToTransition:r.queue_entry_uuid,newQueue:r.service_uuid,newStatus:Y.cn.IN_SERVICE_UUID},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,F.T)(e)];case 2:return n.sent(),c("success","Client succesfully served",""),l(),[3,4];case 3:return t=n.sent(),c("error",t.message,""),[3,4];case 4:return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){X(a,r,o,l,i,"next",e)}function i(e){X(a,r,o,l,i,"throw",e)}l(void 0)}))})();var e},primaryButtonText:"Serve",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:W.serveModalLayout},o().createElement("div",{className:W.serveModalContentSection},o().createElement("div",{className:W.formRow},o().createElement("p",null,"Name: ",r.family_name," ",r.middle_name," ",r.given_name),o().createElement("p",null,"Ticket No: ",r.queue_entry_id),o().createElement("p",null,"Status: ",r.status),o().createElement("p",null,"Priority: ",r.priority)))))))};var $=n(71841),K={};K.styleTagTransform=y(),K.setAttributes=p(),K.insert=f().bind(null,"head"),K.domAPI=d(),K.insertStyleElement=h(),u()($.A,K);const Z=$.A&&$.A.locals?$.A.locals:void 0;var ee=n(4947),te=n(50196),ne={};ne.styleTagTransform=y(),ne.setAttributes=p(),ne.insert=f().bind(null,"head"),ne.domAPI=d(),ne.insertStyleElement=h(),u()(te.A,ne);const re=te.A&&te.A.locals?te.A.locals:void 0,oe=function(e){var t=e.title,n=e.totalCount,r=e.stats,a=e.onStatDetailsRequest;return t?o().createElement("div",{className:re.aggregateStatsCard},o().createElement("div",{className:re.aggregateStatsCardHeader},o().createElement("h5",null,t),o().createElement("h1",{className:re.totalCount,onClick:a},n)),o().createElement("div",{className:re.stats},r.map((function(e,t){return o().createElement(o().Fragment,null,o().createElement("div",{className:re.statDetails},o().createElement("div",{className:re.title},e.title," :"),o().createElement("div",{className:re.count},o().createElement("strong",null,e.count))))})))):o().createElement(o().Fragment,null)},ae=function(e){var t=e.queueEntries,n=e.report,a=e.onStatDetailsRequest,l=function(e){var n=0;return t.forEach((function(t){e.includes(t.status)&&(n+=1)})),n},i=(0,r.useMemo)((function(){return l(["WAITING"])}),[t]),c=(0,r.useMemo)((function(){return l(["IN SERVICE","COMPLETED"])}),[t]),u=(0,r.useMemo)((function(){return e=0,n.forEach((function(t){e+=t.patients})),e;var e}),[n]),s=(0,r.useMemo)((function(){return n.map((function(e){return{title:e.queue_room_name,count:e.patients}}))}),[n]);return t?o().createElement("div",{className:Z.statsSection},o().createElement("div",{className:Z.aggregate},o().createElement(oe,{title:"Total Checked In",totalCount:null!=u?u:0,stats:s,onStatDetailsRequest:a})),o().createElement(ee.A,{title:"Patients in waiting",count:null!=i?i:0}),o().createElement(ee.A,{title:"Patients attended to",count:null!=c?c:0})):"No queue entry records"};var le=n(62890),ie={};ie.styleTagTransform=y(),ie.setAttributes=p(),ie.insert=f().bind(null,"head"),ie.domAPI=d(),ie.insertStyleElement=h(),u()(le.A,ie);const ce=le.A&&le.A.locals?le.A.locals:void 0;var ue=n(25838);function se(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){se(a,r,o,l,i,"next",e)}function i(e){se(a,r,o,l,i,"throw",e)}l(void 0)}))}}function me(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const fe=function(e){var t=e.open,n=e.onModalClose,r=e.currentQueueEntry,c=e.onSuccessfullSignOff,u=function(e,t,n){(0,a.showSnackbar)({kind:e,title:t,subtitle:n})},s=function(e){return de((function(){return me(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,l.oG)(e.queue_entry_uuid)];case 1:return t.sent(),u("success","Patient removal from queue successfully!",""),[3,3];case 2:return t.sent(),u("error","Patient removal from queue failed!",""),[3,3];case 3:return[2]}}))}))()};return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"Sign Off",open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:function(){return de((function(){var e,t;return me(this,(function(n){switch(n.label){case 0:e={stopDatetime:(new Date).toISOString()},n.label=1;case 1:return n.trys.push([1,4,,5]),[4,s(r)];case 2:return n.sent(),[4,(0,ue.jN)(r.visit_uuid,e)];case 3:return n.sent(),u("success","Visit Ended successfully",""),c(),[3,5];case 4:return t=n.sent(),u("error",t.message,""),[3,5];case 5:return[2]}}))}))()},primaryButtonText:"Sign Off",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:ce.serveModalLayout},o().createElement("div",{className:ce.serveModalContentSection},o().createElement("div",{className:ce.formRow},o().createElement(i.ksK,{id:"health-worker-id",labelText:"Enter your Provider ID",onChange:function(){},type:"text"})))))))};var Ae=n(43227),pe={};pe.styleTagTransform=y(),pe.setAttributes=p(),pe.insert=f().bind(null,"head"),pe.domAPI=d(),pe.insertStyleElement=h(),u()(Ae.A,pe);const _e=Ae.A&&Ae.A.locals?Ae.A.locals:void 0,he=function(e){var t=e.open,n=e.title,r=e.subtitle,a=e.onConfirm,l=e.onModalClose;return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"",open:t,size:"md",onSecondarySubmit:l,onRequestClose:function(){return l()},onRequestSubmit:a,primaryButtonText:"Confirm",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:_e.modalLayout},o().createElement("div",{className:_e.modalTitle},o().createElement("h4",null,n)),o().createElement("div",{className:_e.modalContentSection},o().createElement("h6",null,r))))))};var we=n(39001),ye={};ye.styleTagTransform=y(),ye.setAttributes=p(),ye.insert=f().bind(null,"head"),ye.domAPI=d(),ye.insertStyleElement=h(),u()(we.A,ye);const ge=we.A&&we.A.locals?we.A.locals:void 0;function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const ve=function(e){var t,n,a=e.open,l=e.onModalClose,c=e.patientList,u=(t=(0,r.useState)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],d=u[1],m=(0,r.useMemo)((function(){return s?c.filter((function(e){return e.person_name.trim().toLowerCase().includes(s.trim().toLowerCase())})):c}),[c,s]);return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"Checked In Patient List",open:a,size:"lg",onSecondarySubmit:function(){return l()},onRequestClose:function(){return l()},onRequestSubmit:l,primaryButtonText:"Close",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:ge.checkedInlLayout},o().createElement("div",{className:ge.actionHeaderSection},o().createElement("div",{className:ge.searchInput},o().createElement(i.ksK,{id:"queue-search",labelText:"",onChange:function(e){return t=e.target.value,void d(t);var t},placeholder:"Enter patient name to filter"}))),o().createElement("div",{className:ge.serveModalContentSection},o().createElement(i.XIK,null,o().createElement(i.ndF,null,o().createElement(i.Hjg,null,o().createElement(i.A0N,null,"No"),o().createElement(i.A0N,null,"Name"),o().createElement(i.A0N,null,"Age"),o().createElement(i.A0N,null,"Gender"),o().createElement(i.A0N,null,"Phone Number"),o().createElement(i.A0N,null,"Identifiers"),o().createElement(i.A0N,null,"Queue Room"),o().createElement(i.A0N,null,"Current Queue Room"),o().createElement(i.A0N,null,"Status"))),o().createElement(i.BFY,null,m.map((function(e,t){var n;return o().createElement(i.Hjg,{id:"".concat(e.queue_entry_id)},o().createElement(i.nA6,null,t+1),o().createElement(i.nA6,null,e.person_name),o().createElement(i.nA6,null,e.age),o().createElement(i.nA6,null,e.gender),o().createElement(i.nA6,null,e.phone_number),o().createElement(i.nA6,null,e.identifiers),o().createElement(i.nA6,null,e.queue_room_name),o().createElement(i.nA6,null,null!==(n=e.current_queue_room)&&void 0!==n?n:""),o().createElement(i.nA6,null,o().createElement(i.vwO,{size:"md",type:"SERVED"===e.served_status?"blue":"gray"},e.served_status)))})))))))))};function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){Ee(a,r,o,l,i,"next",e)}function i(e){Ee(a,r,o,l,i,"throw",e)}l(void 0)}))}}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const Ie=function(e){var t=e.serviceTypeUuid,n=e.title,c=Se((0,r.useState)([]),2),u=c[0],s=c[1],d=Se((0,r.useState)([]),2),m=d[0],f=d[1],A=Se((0,r.useState)([]),2),p=A[0],_=A[1],h=Se((0,r.useState)(),2),w=h[0],y=h[1],g=Se((0,r.useState)(!1),2),C=g[0],v=g[1],b=Se((0,r.useState)(!1),2),E=b[0],x=b[1],S=Se((0,r.useState)(!1),2),k=S[0],I=S[1],T=Se((0,r.useState)(!1),2),N=T[0],q=T[1],O=Se((0,r.useState)(!1),2),R=O[0],L=O[1],U=Se((0,r.useState)(),2),D=U[0],F=U[1],M=Se((0,r.useState)(!1),2),G=M[0],H=M[1],J=Se((0,r.useState)(!1),2),V=J[0],W=J[1],X=(0,a.useSession)().sessionLocation.uuid,$=(0,r.useMemo)((function(){return e={},u&&0!==u.length?(u.forEach((function(t){var n=t.queue_room;e[n]?e[n].push(t):e[n]=[t]})),e):{};var e}),[u]);(0,r.useEffect)((function(){t&&X&&(K(),Z(),de())}),[t,X]);var K=function(){return xe((function(){var e;return ke(this,(function(n){switch(n.label){case 0:W(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,l.U3)(t,X)];case 2:return e=n.sent(),s(e),W(!1),[3,4];case 3:return n.sent(),(0,a.showSnackbar)({kind:"error",title:"Error fetching queue",subtitle:"An error occurred while fetching the queue. Please reload or contact support"}),[3,4];case 4:return[2]}}))}))()},Z=function(){return xe((function(){var e;return ke(this,(function(n){switch(n.label){case 0:W(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,l.C)(t,X)];case 2:return e=n.sent(),f(e),W(!1),[3,4];case 3:return n.sent(),(0,a.showSnackbar)({kind:"error",title:"Error fetching queue daily report",subtitle:"An error occurred while fetching the queue daily report. Please reload or contact support"}),[3,4];case 4:return[2]}}))}))()};if(!$)return o().createElement(o().Fragment,null,"No Data to Display");var ee=function(e){v(!0),y(e)},te=function(){v(!1),x(!1),I(!1),le()},ne=function(e){x(!0),y(e)},re=function(e){I(!0),y(e)},oe=function(e){q(!0),y(e)},le=function(){K()},ie=function(e){return xe((function(){var t,n;return ke(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(0,l.oG)(e.queue_entry_uuid)];case 1:return r.sent(),(0,a.showSnackbar)({kind:"success",title:"Patient removal from queue successfully!",subtitle:""}),[4,(0,ue.jN)(e.visit_uuid,{stopDatetime:(new Date).toISOString()})];case 2:return r.sent(),(0,a.showSnackbar)({kind:"success",title:"Visit Ended successfully!",subtitle:""}),le(),[3,4];case 3:return t=r.sent(),(0,a.showSnackbar)({kind:"error",title:"Patient removal from queue failed!",subtitle:null!==(n=t.message)&&void 0!==n?n:""}),[3,4];case 4:return[2]}}))}))()},ce=function(e){return xe((function(){return ke(this,(function(t){return F(e),L(!0),[2]}))}))()},se=function(e){return xe((function(){return ke(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,(0,l.oG)(e.queue_entry_uuid)];case 1:return t.sent(),[4,(0,ue.jN)(e.visit_uuid,{stopDatetime:(new Date).toISOString()})];case 2:return t.sent(),(0,a.showSnackbar)({kind:"success",title:"Queue entry successfully closed",subtitle:"Queue entry ".concat(e.queue_id," successfully closed")}),[3,4];case 3:return t.sent(),(0,a.showSnackbar)({kind:"error",title:"Queue entry close failrure",subtitle:"Queue entry ".concat(e.queue_id," could not be closed. Please retry of contact support")}),[3,4];case 4:return[2]}}))}))()},de=function(){return xe((function(){var e;return ke(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,l.vv)(t,X)];case 1:return e=n.sent(),_(e),[3,3];case 2:return n.sent(),(0,a.showSnackbar)({kind:"error",title:"Error fetching patient list",subtitle:"An error ocuured while fetching the service queue checked in patient list"}),[3,3];case 3:return[2]}}))}))()};return t?o().createElement(o().Fragment,null,o().createElement("div",{className:B.consultationLayout},o().createElement("div",{className:B.headerSection},o().createElement("h4",null,n)),o().createElement("div",null,u?o().createElement(o().Fragment,null,o().createElement(ae,{queueEntries:u,report:m,onStatDetailsRequest:function(){H(!0)}})):o().createElement(o().Fragment,null)),o().createElement("div",{className:B.headerAction},o().createElement(i.$nd,{kind:"tertiary",onClick:le,disabled:V},V?o().createElement(i.OuH,{description:"Refreshing..."}):"Refresh")),o().createElement("div",{className:B.contentSection},o().createElement(i.tUM,null,o().createElement(i.wbY,{contained:!0},$&&Object.keys($).map((function(e){return o().createElement(i.ozo,null,e)}))),o().createElement(i.T2N,null,$&&Object.keys($).map((function(e){return o().createElement(i.KpK,null,o().createElement(P,{queueRoom:e,queueEntries:$[e],handleMovePatient:ee,handleTransitionPatient:ne,handleServePatient:re,handleSignOff:oe,handleRemovePatient:ie,showComingFromCol:t!==Y.XA.TRIAGE_SERVICE_UUID,handleClearQueue:ce}))})))))),C&&w?o().createElement(o().Fragment,null,o().createElement(j.A,{open:C,locationUuid:X,onModalClose:te,currentQueueEntryUuid:w.queue_entry_uuid,onTransferSuccess:te})):o().createElement(o().Fragment,null),E?o().createElement(o().Fragment,null,o().createElement(Q,{open:E,onModalClose:te,currentQueueEntry:w})):o().createElement(o().Fragment,null),k?o().createElement(o().Fragment,null,o().createElement(z,{open:k,onModalClose:te,currentQueueEntry:w,onSuccessfullServe:function(){te(),w&&w.patient_uuid&&(window.location.href="".concat(window.spaBase,"/patient/").concat(w.patient_uuid,"/chart"))}})):o().createElement(o().Fragment,null),N?o().createElement(o().Fragment,null,o().createElement(fe,{open:N,onModalClose:te,currentQueueEntry:w,onSuccessfullSignOff:function(){q(!1),le()}})):o().createElement(o().Fragment,null),R?o().createElement(o().Fragment,null,o().createElement(he,{open:R,onConfirm:function(){L(!1),xe((function(){var e,t;return ke(this,(function(n){switch(n.label){case 0:e=0,n.label=1;case 1:return e<D.length?(t=u[e],[4,se(t)]):[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))(),F([]),le()},onModalClose:function(){L(!1),F([])},title:"Clear Queue",subtitle:"You are about to clear the patient queue and their respective visits. Are you sure?"})):o().createElement(o().Fragment,null),G&&p?o().createElement(o().Fragment,null,o().createElement(ve,{open:G,onModalClose:function(){H(!1)},patientList:p})):o().createElement(o().Fragment,null)):o().createElement(o().Fragment,null,"No service type defined")}},71841:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__stat-details-component__statsSection___Aldqg{display:flex;flex-direction:row;width:100%;column-gap:15px;margin-bottom:15px}.-esm-dha-workflow__stat-details-component__statsSection___Aldqg .-esm-dha-workflow__stat-details-component__aggregate___djBt1{display:flex;flex-direction:column;width:50%}","",{version:3,sources:["webpack://./src/service-queues/service-queue/stats/stat-details/stat-details.component.scss"],names:[],mappings:"AAAA,iEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,eAAA,CACA,kBAAA,CACA,+HACI,YAAA,CACA,qBAAA,CACA,SAAA",sourcesContent:[".statsSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 15px;\n margin-bottom: 15px;\n .aggregate{\n display: flex;\n flex-direction: column;\n width: 50%;\n }\n}"],sourceRoot:""}]),l.locals={statsSection:"-esm-dha-workflow__stat-details-component__statsSection___Aldqg",aggregate:"-esm-dha-workflow__stat-details-component__aggregate___djBt1"};const i=l},81204:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),l.locals={};const i=l},90974:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotLayout___D7rtH{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotContent___Gy17P{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:.75rem;width:100%}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3{display:flex;flex-direction:column;flex:1 1 18rem;min-width:0}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3:empty{display:none}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3>*{width:100%}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3 .cds--tile{padding-top:.25rem;padding-bottom:.25rem;min-height:0}","",{version:3,sources:["webpack://./src/shared/ui/facility-worker-slot/facility-worker.component-slot.component.scss"],names:[],mappings:"AAAA,qFACE,YAAA,CACA,qBAAA,CACA,UAAA,CAGF,sFACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,mBAAA,CACA,UAAA,CACA,UAAA,CAGF,+EACE,YAAA,CACA,qBAAA,CACA,cAAA,CACA,WAAA,CAGA,qFACE,YAAA,CAIF,iFACE,UAAA,CAKF,0FACE,kBAAA,CACA,qBAAA,CACA,YAAA",sourcesContent:[".fhwrSlotLayout {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.fhwrSlotContent {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: stretch;\n gap: 0.75rem;\n width: 100%;\n}\n\n.fhwrSlot {\n display: flex;\n flex-direction: column;\n flex: 1 1 18rem;\n min-width: 0;\n\n /* Collapse a slot that has no extension so the other fills the row neatly. */\n &:empty {\n display: none;\n }\n\n /* Let the extension card fill its column so the two sides stay aligned. */\n > * {\n width: 100%;\n }\n\n /* Trim the extension card's vertical padding so the facility / worker header\n is a neat, compact band (keep the horizontal padding for alignment). */\n :global(.cds--tile) {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n min-height: 0;\n }\n}\n"],sourceRoot:""}]),l.locals={fhwrSlotLayout:"-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotLayout___D7rtH",fhwrSlotContent:"-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotContent___Gy17P",fhwrSlot:"-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3"};const i=l},93323:(e,t,n)=>{n.d(t,{EU:()=>a,HT:()=>o});var r=n(22540);function o(e){return 1===e||"1"===e?"green":"red"}var a=function(e){var t;switch(e){case r.Q.Emergency:t="emergencyTag";break;case r.Q.Priority:t="priorityTag";break;case r.Q.NonUrgent:t="nonUrgentTag";break;case"".concat(r.Q.Emergency," PRIORITY"):t="emergencyTag";break;case"".concat(r.Q.NonUrgent," PRIORITY"):t="nonUrgentTag";break;case"".concat(r.Q.Priority," PRIORITY"):case"NORMAL PRIORITY":t="priorityTag";break;case"NOT URGENT":t="nonUrgentTag";break;default:t="gray"}return t}}}]);
1
+ "use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[948,6824],{4947:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(16072),o=n.n(r),a=n(85072),l=n.n(a),i=n(97825),c=n.n(i),u=n(77659),s=n.n(u),d=n(55056),m=n.n(d),f=n(10540),A=n.n(f),p=n(41113),_=n.n(p),h=n(7457),w={};w.styleTagTransform=_(),w.setAttributes=m(),w.insert=s().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=A(),l()(h.A,w);const y=h.A&&h.A.locals?h.A.locals:void 0,g=function(e){var t=e.title,n=e.count,r=e.other;return t?o().createElement("div",{className:y.statsCard},o().createElement("div",{className:y.statsCardHeader},o().createElement("h5",null,t),o().createElement("h1",null,n," ",r))):o().createElement(o().Fragment,null)}},7457:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__stat-card-component__statsCard___BtVgd{display:flex;flex-direction:column;width:40%;row-gap:5px;border-radius:12px;border:1px solid #d2d2d2;height:100px;padding:10px 10px}","",{version:3,sources:["webpack://./src/shared/ui/stat-card/stat-card.component.scss"],names:[],mappings:"AAAA,2DACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,WAAA,CACA,kBAAA,CACA,wBAAA,CACA,YAAA,CACA,iBAAA",sourcesContent:[".statsCard{\n display: flex;\n flex-direction: column;\n width: 40%;\n row-gap: 5px;\n border-radius: 12px;\n border: 1px solid #d2d2d2;\n height: 100px;\n padding: 10px 10px;\n}"],sourceRoot:""}]),l.locals={statsCard:"-esm-dha-workflow__stat-card-component__statsCard___BtVgd"};const i=l},10901:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),l.locals={};const i=l},10990:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function i(e){o(l,r,a,i,c,"next",e)}function c(e){o(l,r,a,i,c,"throw",e)}i(void 0)}))}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function u(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}n.d(t,{LI:()=>g,LX:()=>C,MW:()=>w,QN:()=>y,Zr:()=>v,an:()=>p,d3:()=>b});var s=1500,d="dha_consultation_clearance";function m(){if("undefined"==typeof window)return[];try{var e;return JSON.parse(null!==(e=window.localStorage.getItem(d))&&void 0!==e?e:"[]")}catch(e){return[]}}function f(e){if("undefined"!=typeof window)try{window.localStorage.setItem(d,JSON.stringify(e))}catch(e){}}var A=function(e){return new Promise((function(t){return setTimeout(t,e)}))};function p(e){var t,n,o=e.exempt||e.preCleared,a={id:"cc-".concat(Date.now(),"-").concat(Math.floor(1e3*Math.random())),patientName:e.patientName,crNumber:e.crNumber,locationUuid:e.locationUuid,queue:e.queue,visitType:e.visitType,payer:e.payer,amount:e.preCleared?null!==(t=e.amountOverride)&&void 0!==t?t:0:e.exempt?0:s,status:o?"CLEARED":"AWAITING_PAYMENT",createdAt:(new Date).toISOString()};return f([a].concat(function(e){if(Array.isArray(e))return r(e)}(n=m())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),a}var _="dha_prepaid_services";function h(){if("undefined"==typeof window)return[];try{var e;return JSON.parse(null!==(e=window.localStorage.getItem(_))&&void 0!==e?e:"[]")}catch(e){return[]}}function w(e,t){return a((function(){return u(this,(function(n){switch(n.label){case 0:return[4,A(200)];case 1:return n.sent(),[2,h().filter((function(n){return!(e&&n.status!==e||t&&n.locationUuid!==t)})).sort((function(e,t){return e.dueDate<t.dueDate?-1:1}))]}}))}))()}function y(e){return h().find((function(t){return t.crNumber===e&&"OPEN"===t.status}))}function g(e){!function(e){if("undefined"!=typeof window)try{window.localStorage.setItem(_,JSON.stringify(e))}catch(e){}}(h().map((function(t){return t.id===e?c(i({},t),{status:"FULFILLED"}):t})))}function C(e,t){return a((function(){return u(this,(function(n){switch(n.label){case 0:return[4,A(250)];case 1:return n.sent(),[2,m().filter((function(n){return!(e&&n.status!==e||t&&n.locationUuid!==t)})).sort((function(e,t){return e.createdAt<t.createdAt?1:-1}))]}}))}))()}function v(e){return a((function(){var t;return u(this,(function(n){switch(n.label){case 0:return[4,A(50)];case 1:return n.sent(),[2,{awaiting:(t=m().filter((function(t){return!e||t.locationUuid===e}))).filter((function(e){return"AWAITING_PAYMENT"===e.status})).length,cleared:t.filter((function(e){return"CLEARED"===e.status})).length}]}}))}))()}function b(e){return a((function(){return u(this,(function(t){switch(t.label){case 0:return[4,A(300)];case 1:return t.sent(),f(m().map((function(t){return t.id===e?c(i({},t),{status:"CLEARED"}):t}))),[2]}}))}))()}},13164:(e,t,n)=>{n.d(t,{A:()=>C});var r=n(16072),o=n.n(r),a=n(85072),l=n.n(a),i=n(97825),c=n.n(i),u=n(77659),s=n.n(u),d=n(55056),m=n.n(d),f=n(10540),A=n.n(f),p=n(41113),_=n.n(p),h=n(90974),w={};w.styleTagTransform=_(),w.setAttributes=m(),w.insert=s().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=A(),l()(h.A,w);const y=h.A&&h.A.locals?h.A.locals:void 0;var g=n(25987);const C=function(){return o().createElement(o().Fragment,null,o().createElement("div",{className:y.fhwrSlotLayout},o().createElement("div",{className:y.fhwrSlotContent},o().createElement("div",{className:y.fhwrSlot},o().createElement(g.ExtensionSlot,{name:"facility-hie-header-slot"})),o().createElement("div",{className:y.fhwrSlot},o().createElement(g.ExtensionSlot,{name:"health-worker-hie-header-slot"})))))}},14079:(e,t,n)=>{n.d(t,{T:()=>c,t:()=>i});var r=n(25987);function o(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function i(e){o(l,r,a,i,c,"next",e)}function c(e){o(l,r,a,i,c,"throw",e)}i(void 0)}))}}function l(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function i(e){return a((function(){var t,n;return l(this,(function(o){switch(o.label){case 0:return t=new URLSearchParams({v:"custom:(uuid,name,location:(uuid,display))",location:e}).toString(),n="".concat(r.restBaseUrl,"/queue"),[4,(0,r.openmrsFetch)("".concat(n,"?").concat(t))];case 1:return[4,o.sent().json()];case 2:return[2,o.sent().results]}}))}))()}function c(e){return a((function(){var t;return l(this,(function(n){switch(n.label){case 0:return t="".concat(r.restBaseUrl,"/queue-entry/transition"),[4,(0,r.openmrsFetch)(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()]}}))}))()}},22536:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__move-patient-component__modelLayout___0T068{display:flex;flex-direction:column;width:100%;padding:15px 15px}.-esm-dha-workflow__move-patient-component__formSection___qJVf3{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__move-patient-component__sectionHeader___GrD-V{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__move-patient-component__formRow___uMLgS{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__move-patient-component__formControl___iQauu{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__move-patient-component__actionSection___427LO{display:flex;flex-direction:row;width:100%;column-gap:5px}","",{version:3,sources:["webpack://./src/service-queues/modals/move/move-patient.component.scss"],names:[],mappings:"AAAA,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,iBAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,kEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,4DACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CAEJ,kEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:[".modelLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 15px 15px;\n}\n.formSection{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.sectionHeader{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.formRow{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.formControl{\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.actionSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}"],sourceRoot:""}]),l.locals={modelLayout:"-esm-dha-workflow__move-patient-component__modelLayout___0T068",formSection:"-esm-dha-workflow__move-patient-component__formSection___qJVf3",sectionHeader:"-esm-dha-workflow__move-patient-component__sectionHeader___GrD-V",formRow:"-esm-dha-workflow__move-patient-component__formRow___uMLgS",formControl:"-esm-dha-workflow__move-patient-component__formControl___iQauu",actionSection:"-esm-dha-workflow__move-patient-component__actionSection___427LO"};const i=l},22540:(e,t,n)=>{n.d(t,{Q:()=>o,s:()=>r});var r=function(e){return e.Completed="COMPLETED",e.Waiting="WAITING",e.InService="IN SERVICE",e}({}),o=function(e){return e.Emergency="EMERGENCY",e.Priority="PRIORITY",e.NonUrgent="NON-URGENT",e}({})},25838:(e,t,n)=>{n.d(t,{_m:()=>i,jN:()=>c,xL:()=>u});var r=n(25987);function o(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function i(e){o(l,r,a,i,c,"next",e)}function c(e){o(l,r,a,i,c,"throw",e)}i(void 0)}))}}function l(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function i(e){return a((function(){var t,n,o;return l(this,(function(a){switch(a.label){case 0:return t="".concat(r.restBaseUrl,"/visit"),[4,(0,r.openmrsFetch)(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})];case 1:return(n=a.sent()).ok?[3,3]:[4,n.text()];case 2:throw o=a.sent(),new Error("Request failed with ".concat(n.status,": ").concat(o));case 3:return[2,n.json()]}}))}))()}function c(e,t){return a((function(){var n,o,a;return l(this,(function(l){switch(l.label){case 0:return n="".concat(r.restBaseUrl,"/visit/").concat(e),[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return(o=l.sent()).ok?[3,3]:[4,o.text()];case 2:throw a=l.sent(),new Error("Request failed with ".concat(o.status,": ").concat(a));case 3:return[2,o.json()]}}))}))()}function u(e,t){return a((function(){var n,o,a;return l(this,(function(l){switch(l.label){case 0:return n="".concat(r.restBaseUrl,"/visit/").concat(e),[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return(o=l.sent()).ok?[3,3]:[4,o.text()];case 2:throw a=l.sent(),new Error("Request failed with ".concat(o.status,": ").concat(a));case 3:return[2,o.json()]}}))}))()}},39001:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX{display:flex;flex-direction:column;width:100%;row-gap:10px}.-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX .-esm-dha-workflow__daily-report-patient-list__actionHeaderSection___4IhLX{display:flex;flex-direction:row;justify-content:flex-end;width:100%;column-gap:15px}.-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX .-esm-dha-workflow__daily-report-patient-list__actionHeaderSection___4IhLX .-esm-dha-workflow__daily-report-patient-list__searchInput___g1xlZ{width:40%}.-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX .-esm-dha-workflow__daily-report-patient-list__serveModalContentSection___vM\\+Dq{display:flex;flex-direction:column;width:100%;row-gap:10px}","",{version:3,sources:["webpack://./src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.scss"],names:[],mappings:"AAAA,wEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CAEA,mJACI,YAAA,CACA,kBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CAEA,sNACI,SAAA,CAIR,yJACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA",sourcesContent:[".checkedInlLayout {\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 10px;\n\n .actionHeaderSection {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n width: 100%;\n column-gap: 15px;\n\n .searchInput {\n width: 40%;\n }\n }\n\n .serveModalContentSection {\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 10px;\n }\n\n}"],sourceRoot:""}]),l.locals={checkedInlLayout:"-esm-dha-workflow__daily-report-patient-list__checkedInlLayout___pcVBX",actionHeaderSection:"-esm-dha-workflow__daily-report-patient-list__actionHeaderSection___4IhLX",searchInput:"-esm-dha-workflow__daily-report-patient-list__searchInput___g1xlZ",serveModalContentSection:"-esm-dha-workflow__daily-report-patient-list__serveModalContentSection___vM+Dq"};const i=l},43227:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__confirm-modal__modalLayout___WC62A{display:flex;flex-direction:column;row-gap:15px;padding:15px 15px}.-esm-dha-workflow__confirm-modal__modalTitle___RDCGD{display:flex;flex-direction:row;justify-content:center}.-esm-dha-workflow__confirm-modal__modalContentSection___aGI9S{display:flex;flex-direction:row;row-gap:15px;align-items:center;justify-content:center}","",{version:3,sources:["webpack://./src/shared/ui/confirm-modal/confirm.modal.scss"],names:[],mappings:"AAAA,uDACI,YAAA,CACA,qBAAA,CACA,YAAA,CACA,iBAAA,CAEJ,sDACI,YAAA,CACA,kBAAA,CACA,sBAAA,CAEJ,+DACI,YAAA,CACA,kBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:[".modalLayout{\n display: flex;\n flex-direction: column;\n row-gap: 15px;\n padding: 15px 15px;\n}\n.modalTitle{\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n.modalContentSection{\n display: flex;\n flex-direction: row;\n row-gap: 15px;\n align-items: center;\n justify-content: center;\n}"],sourceRoot:""}]),l.locals={modalLayout:"-esm-dha-workflow__confirm-modal__modalLayout___WC62A",modalTitle:"-esm-dha-workflow__confirm-modal__modalTitle___RDCGD",modalContentSection:"-esm-dha-workflow__confirm-modal__modalContentSection___aGI9S"};const i=l},45883:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__service-queue-component__consultationLayout___fP0LQ{display:flex;flex-direction:column;width:100%;padding:15px 15px;row-gap:15px}.-esm-dha-workflow__service-queue-component__headerAction___4qPNf{display:flex;flex-direction:row;column-gap:5px;justify-content:flex-end;padding:10px 10px}","",{version:3,sources:["webpack://./src/service-queues/service-queue/service-queue.component.scss"],names:[],mappings:"AAAA,wEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,iBAAA,CACA,YAAA,CAEJ,kEACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,wBAAA,CACA,iBAAA",sourcesContent:[".consultationLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 15px 15px;\n row-gap: 15px;\n}\n.headerAction{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n justify-content: flex-end;\n padding: 10px 10px;\n}\n"],sourceRoot:""}]),l.locals={consultationLayout:"-esm-dha-workflow__service-queue-component__consultationLayout___fP0LQ",headerAction:"-esm-dha-workflow__service-queue-component__headerAction___4qPNf"};const i=l},50196:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65{display:flex;flex-direction:row;width:100%;border-radius:12px;border:1px solid #d2d2d2;min-height:100px;padding:10px 10px;column-gap:10px}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__aggregateStatsCardHeader___mdeys{display:flex;flex-direction:column;width:50%;column-gap:3px}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg{display:flex;flex-direction:column;width:50%;font-size:14px;row-gap:5px}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg .-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv{display:flex;flex-direction:row;width:100%}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg .-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv .-esm-dha-workflow__aggregate-stat-card__title___9JHiO{width:90%}.-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65 .-esm-dha-workflow__aggregate-stat-card__stats___Hiktg .-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv .-esm-dha-workflow__aggregate-stat-card__count___gjmZ8{width:10%}.-esm-dha-workflow__aggregate-stat-card__totalCount___GOYfp{color:#0f62fe}.-esm-dha-workflow__aggregate-stat-card__totalCount___GOYfp:hover{cursor:pointer}","",{version:3,sources:["webpack://./src/shared/ui/aggregate-stat-card/aggregate-stat-card.scss"],names:[],mappings:"AAAA,oEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,kBAAA,CACA,wBAAA,CACA,gBAAA,CACA,iBAAA,CACA,eAAA,CACA,8IACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,cAAA,CAEJ,2HACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,cAAA,CACA,WAAA,CACD,wLACC,YAAA,CACA,kBAAA,CACA,UAAA,CACA,+OACG,SAAA,CAEH,+OACI,SAAA,CAMZ,4DACI,aAAA,CAGJ,kEACI,cAAA",sourcesContent:[".aggregateStatsCard{\n display: flex;\n flex-direction: row;\n width: 100%;\n border-radius: 12px;\n border: 1px solid #d2d2d2;\n min-height: 100px;\n padding: 10px 10px;\n column-gap: 10px;\n .aggregateStatsCardHeader{\n display: flex;\n flex-direction: column;\n width: 50%;\n column-gap: 3px;\n }\n .stats{\n display: flex;\n flex-direction: column;\n width: 50%;\n font-size: 14px;\n row-gap: 5px;\n .statDetails{\n display: flex;\n flex-direction: row;\n width: 100%;\n .title{\n width: 90%;\n }\n .count{\n width: 10%;\n }\n }\n }\n}\n\n.totalCount{\n color: rgb(15, 98, 254);\n}\n\n.totalCount:hover{\n cursor: pointer;\n}"],sourceRoot:""}]),l.locals={aggregateStatsCard:"-esm-dha-workflow__aggregate-stat-card__aggregateStatsCard___IJp65",aggregateStatsCardHeader:"-esm-dha-workflow__aggregate-stat-card__aggregateStatsCardHeader___mdeys",stats:"-esm-dha-workflow__aggregate-stat-card__stats___Hiktg",statDetails:"-esm-dha-workflow__aggregate-stat-card__statDetails___VbCsv",title:"-esm-dha-workflow__aggregate-stat-card__title___9JHiO",count:"-esm-dha-workflow__aggregate-stat-card__count___gjmZ8",totalCount:"-esm-dha-workflow__aggregate-stat-card__totalCount___GOYfp"};const i=l},62890:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),l.locals={};const i=l},66270:(e,t,n)=>{n.d(t,{A:()=>T});var r=n(47743),o=n(16072),a=n.n(o),l=n(85072),i=n.n(l),c=n(97825),u=n.n(c),s=n(77659),d=n.n(s),m=n(55056),f=n.n(m),A=n(10540),p=n.n(A),_=n(41113),h=n.n(_),w=n(22536),y={};y.styleTagTransform=h(),y.setAttributes=f(),y.insert=d().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=p(),i()(w.A,y);const g=w.A&&w.A.locals?w.A.locals:void 0;var C=n(14079),v=n(75862),b=n(25987);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){x(a,r,o,l,i,"next",e)}function i(e){x(a,r,o,l,i,"throw",e)}l(void 0)}))}}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const T=function(e){var t=e.open,n=e.onModalClose,l=e.locationUuid,i=e.currentQueueEntryUuid,c=e.onTransferSuccess,u=k((0,o.useState)([]),2),s=u[0],d=u[1],m=k((0,o.useState)(),2),f=m[0],A=m[1],p=k((0,o.useState)(),2),_=p[0],h=p[1],w=k((0,o.useState)(),2),y=w[0],E=w[1],x=k((0,o.useState)(!1),2),T=x[0],N=x[1];(0,o.useEffect)((function(){q()}),[l]);var q=function(){return S((function(){var e;return I(this,(function(t){switch(t.label){case 0:return[4,(0,C.t)(l)];case 1:return e=t.sent(),d(e),[2]}}))}))()},P=function(e,t,n){(0,b.showSnackbar)({kind:e,title:t,subtitle:n})};return a().createElement(a().Fragment,null,a().createElement(r.aFV,{modalHeading:"Transfer Client",open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:T?function(){}:function(){return S((function(){var e,t;return I(this,(function(n){switch(n.label){case 0:T&&P("error","Trsnefering patient","Transfering patient...please wait"),N(!0),e={queueEntryToTransition:i,newQueue:y.uuid,newStatus:v.cn.WAITING_UUID,newPriority:_,newPriorityComment:f},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,C.T)(e)];case 2:return n.sent(),P("success","Client succesfully moved",""),c(),[3,4];case 3:return t=n.sent(),P("error",t.message,""),N(!1),[3,4];case 4:return[2]}}))}))()},primaryButtonText:T?a().createElement(r.OuH,{description:"Assign To..."}):"Assign To",secondaryButtonText:"Cancel"},a().createElement(r.cwr,null,a().createElement("div",{className:g.modelLayout},a().createElement("div",{className:g.formSection},a().createElement("div",{className:g.formRow},a().createElement("div",{className:g.formControl},a().createElement(r.l6P,{id:"service-queue",labelText:"Select the new Queue",onChange:function(e){return t=e.target.value,n=s.find((function(e){return e.uuid===t})),void E(n);var t,n}},a().createElement(r.ebT,{value:"",text:""}),";",s&&s.filter((function(e){return e.uuid!==i})).map((function(e){return a().createElement(r.ebT,{value:e.uuid,text:"".concat(e.name," (").concat(e.location.display,")")})}))))),a().createElement("div",{className:g.formRow},a().createElement("div",{className:g.formControl},a().createElement(r.l6P,{id:"priority",labelText:"Select a Priority",onChange:function(e){return t=e.target.value,void h(t);var t}},a().createElement(r.ebT,{value:"",text:"Select"}),";",a().createElement(r.ebT,{value:v.i3.NORMAL_PRIORITY_UUID,text:"PRIORITY"}),";",a().createElement(r.ebT,{value:v.i3.NOT_URGENT_PRIORITY_UUID,text:"NON URGENT"}),";",a().createElement(r.ebT,{value:v.i3.EMERGENCY_PRIORITY_UUID,text:"EMERGENCY"}),";"))),a().createElement("div",{className:g.formRow},a().createElement("div",{className:g.formControl},a().createElement(r.fs1,{enableCounter:!0,helperText:"",id:"comment",labelText:"Comment",maxCount:500,placeholder:"",onChange:function(e){return t=e.target.value,void A(t);var t},rows:4}))))))))}},67833:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__queue-list-component__queueListLayout___NRAjd{display:flex;flex-direction:column;width:100%;row-gap:15px;padding:5px 5px}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl{display:flex;flex-direction:row;justify-content:flex-end;width:100%;column-gap:10px}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl .-esm-dha-workflow__queue-list-component__filters___0Q8Dk{display:flex;flex-direction:row;width:80%;column-gap:15px}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl .-esm-dha-workflow__queue-list-component__filters___0Q8Dk .-esm-dha-workflow__queue-list-component__filter___Bs4bt{width:45%}.-esm-dha-workflow__queue-list-component__actionHeader___pEpFl .-esm-dha-workflow__queue-list-component__actionBtns___32J\\+M{display:flex;flex-direction:row;width:20%;column-gap:15px}.-esm-dha-workflow__queue-list-component__tableSection___Xy2dr{display:flex;flex-direction:column;width:100%;row-gap:10px}.-esm-dha-workflow__queue-list-component__nonUrgentTag___XIeQc{background-color:#a7f0ba;color:#0e6027}.-esm-dha-workflow__queue-list-component__emergencyTag___\\+JXpV{background-color:#da1e28;color:#fff}.-esm-dha-workflow__queue-list-component__priorityTag___N1pgD{background-color:#f8ed62;color:brown}.-esm-dha-workflow__queue-list-component__flaggedPatient___ETW9e{color:orange}.-esm-dha-workflow__queue-list-component__unflaggedPatient___lYmvG{color:#000}","",{version:3,sources:["webpack://./src/service-queues/queue-list/queue-list.component.scss"],names:[],mappings:"AAAA,kEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CACA,eAAA,CAEJ,+DACI,YAAA,CACA,kBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CACA,yHACI,YAAA,CACA,kBAAA,CACA,SAAA,CACA,eAAA,CACA,kLACI,SAAA,CAGR,6HACI,YAAA,CACA,kBAAA,CACA,SAAA,CACA,eAAA,CAGR,+DACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CAKJ,+DACI,wBAAA,CACA,aAAA,CAEJ,gEACI,wBAAA,CACA,UAAA,CAEJ,8DACI,wBAAA,CACA,WAAA,CAEJ,iEACI,YAAA,CAEJ,mEACI,UAAA",sourcesContent:[".queueListLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 15px;\n padding: 5px 5px;\n}\n.actionHeader{\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n width: 100%;\n column-gap: 10px;\n .filters{\n display: flex;\n flex-direction: row;\n width: 80%;\n column-gap: 15px;\n .filter{\n width: 45%;\n }\n }\n .actionBtns{\n display: flex;\n flex-direction: row;\n width: 20%;\n column-gap: 15px;\n }\n}\n.tableSection{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 10px;\n}\n\n\n\n.nonUrgentTag{\n background-color:rgb(167, 240, 186);\n color:rgb(14, 96, 39);\n}\n.emergencyTag{\n background-color:#da1e28;\n color:#FFF;\n}\n.priorityTag{\n background-color:rgb(248,237,98);\n color:brown;\n}\n.flaggedPatient{\n color: orange;\n}\n.unflaggedPatient{\n color: black;\n}"],sourceRoot:""}]),l.locals={queueListLayout:"-esm-dha-workflow__queue-list-component__queueListLayout___NRAjd",actionHeader:"-esm-dha-workflow__queue-list-component__actionHeader___pEpFl",filters:"-esm-dha-workflow__queue-list-component__filters___0Q8Dk",filter:"-esm-dha-workflow__queue-list-component__filter___Bs4bt",actionBtns:"-esm-dha-workflow__queue-list-component__actionBtns___32J+M",tableSection:"-esm-dha-workflow__queue-list-component__tableSection___Xy2dr",nonUrgentTag:"-esm-dha-workflow__queue-list-component__nonUrgentTag___XIeQc",emergencyTag:"-esm-dha-workflow__queue-list-component__emergencyTag___+JXpV",priorityTag:"-esm-dha-workflow__queue-list-component__priorityTag___N1pgD",flaggedPatient:"-esm-dha-workflow__queue-list-component__flaggedPatient___ETW9e",unflaggedPatient:"-esm-dha-workflow__queue-list-component__unflaggedPatient___lYmvG"};const i=l},69117:(e,t,n)=>{n.d(t,{A:()=>Ie});var r=n(16072),o=n.n(r),a=n(25987),l=n(11314),i=n(47743),c=n(85072),u=n.n(c),s=n(97825),d=n.n(s),m=n(77659),f=n.n(m),A=n(55056),p=n.n(A),_=n(10540),h=n.n(_),w=n(41113),y=n.n(w),g=n(67833),C={};C.styleTagTransform=y(),C.setAttributes=p(),C.insert=f().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=h(),u()(g.A,C);const v=g.A&&g.A.locals?g.A.locals:void 0;var b=n(22540),E=n(93323),x="checkin",S=function(e,t){return(t+e).replaceAll(" ","")},k=n(10990);function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}const P=function(e){var t,n,l,c,u=e.queueRoom,s=e.queueEntries,d=e.handleMovePatient,m=e.handleTransitionPatient,f=e.handleServePatient,A=e.handleSignOff,p=e.handleRemovePatient,_=e.showComingFromCol,h=e.handleClearQueue,w=function(e,t){return e.filter((function(e){return e.priority===t})).sort((function(e,t){return t.wait_time_in_min-e.wait_time_in_min}))},y=function(){return!!U&&function(e,t){return!(!e||!t)&&S(e,t)===(null!==(n=localStorage.getItem(x))&&void 0!==n?n:null);var n}(U.uuid,u)},g=function(e){return"".concat(C(e.family_name)," ").concat(C(e.middle_name)," ").concat(C(e.given_name))},C=function(e){return"NULL"!==e&&e?e:""},I=(0,a.useSession)(),q=null!==(c=null==I||null===(t=I.sessionLocation)||void 0===t?void 0:t.uuid)&&void 0!==c?c:"",P=T((0,r.useState)([]),2),O=(P[0],P[1]);(0,r.useEffect)((function(){(0,k.LX)(void 0,q).then(O)}),[q,s]);var R,B,j,U=null!==(R=null==I?void 0:I.currentProvider)&&void 0!==R?R:null,L=T((0,r.useState)(y()),2),D=L[0],F=L[1],Y=T((0,r.useState)(""),2),M=Y[0],G=Y[1],H=T((0,r.useState)(),2),Q=H[0],J=H[1],V=(0,r.useMemo)((function(){return w(s,b.Q.Emergency)}),[s]),W=(0,r.useMemo)((function(){return w(s,b.Q.Priority)}),[s]),X=(0,r.useMemo)((function(){return w(s,b.Q.NonUrgent)}),[s]),z=(0,r.useMemo)((function(){return N(V).concat(N(W),N(X)).filter((function(e){return!M||e.status===M}))}),[s,M]),$=(0,r.useMemo)((function(){return Q?z.filter((function(e){return"".concat(e.family_name," ").concat(e.middle_name," ").concat(e.given_name).trim().toLowerCase().includes(Q.trim().toLowerCase())})):z}),[s,Q,M]),K=(0,a.userHasAccess)("O3 Clear Triage Queue",{privileges:null!==(B=null===(n=I.user)||void 0===n?void 0:n.privileges)&&void 0!==B?B:[],roles:null!==(j=null===(l=I.user)||void 0===l?void 0:l.roles)&&void 0!==j?j:[]}),Z=function(e){var t;switch(e){case b.s.Completed:t="green";break;case b.s.Waiting:t="gray";break;case b.s.InService:t="blue";break;default:t="gray"}return t};return o().createElement(o().Fragment,null,o().createElement("div",{className:v.queueListLayout},o().createElement("div",{className:v.actionHeader},o().createElement("div",{className:v.filters},o().createElement("div",{className:v.filter},o().createElement(i.a32,{onChange:function(e){var t="";e&&e.selectedItem&&(t=e.selectedItem.id),G(t)},id:"queue-status-combobox",items:[{text:"ALL",id:""},{text:"IN SERVICE",id:"IN SERVICE"},{text:"WAITING",id:"WAITING"}],itemToString:function(e){return e?e.text:""},titleText:"Status"})),o().createElement("div",{className:v.filter},o().createElement(i.ksK,{id:"queue-search",labelText:"Name",onChange:function(e){return t=e.target.value,void J(t);var t},placeholder:"Enter patient name to filter"}))),o().createElement("div",{className:v.actionBtns},D?o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement(i.$nd,{kind:"secondary",onClick:function(){localStorage.removeItem(x),F(y())}},"Check Out")),z.length>0?o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement(i.$nd,{kind:"danger",onClick:function(){h(z)},disabled:!K},"Clear Queue"))):o().createElement(o().Fragment,null)):o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement(i.$nd,{kind:"primary",onClick:function(){U&&(function(e,t){var n=S(e,t);localStorage.setItem(x,n)}(U.uuid,u),F(y()))}},"Check In"))))),o().createElement("div",{className:v.tableSection},o().createElement(i.XIK,null,o().createElement(i.ndF,null,o().createElement(i.Hjg,null,o().createElement(i.A0N,null,"No"),o().createElement(i.A0N,null,"Name"),o().createElement(i.A0N,null,"Age(Years)"),o().createElement(i.A0N,null,"Phone Number"),o().createElement(i.A0N,null,"Identifiers"),o().createElement(i.A0N,null,"Coming From"),o().createElement(i.A0N,null,"Ticket"),o().createElement(i.A0N,null,"Status"),o().createElement(i.A0N,null,"Priority"),o().createElement(i.A0N,null,"Wait Time"),o().createElement(i.A0N,null,"Action"))),o().createElement(i.BFY,null,$.map((function(e,t){var n,r,a;return o().createElement(i.Hjg,{id:e.queue_entry_uuid},o().createElement(i.nA6,null,t+1),o().createElement(i.nA6,null,o().createElement("div",{className:1===e.hide_in_queue?v.flaggedPatient:v.unflaggedPatient},D&&e.status!==b.s.Waiting?o().createElement(i.N_E,{href:"".concat(window.spaBase,"/patient/").concat(e.patient_uuid,"/chart/")},g(e)):o().createElement(o().Fragment,null,g(e)))),o().createElement(i.nA6,null,null!==(n=e.age)&&void 0!==n?n:""),o().createElement(i.nA6,null,null!==(r=e.phone_number)&&void 0!==r?r:""),o().createElement(i.nA6,null,null!==(a=e.identifiers)&&void 0!==a?a:""),o().createElement(i.nA6,null,_?e.queue_coming_from:""),o().createElement(i.nA6,null,e.queue_entry_id),o().createElement(i.nA6,null,o().createElement(i.vwO,{size:"md",type:Z(e.status)},e.status)),o().createElement(i.nA6,null,o().createElement(i.vwO,{size:"md",className:v[(0,E.EU)(e.priority)]},e.priority)),o().createElement(i.nA6,null,"".concat(e.wait_time_in_min," minute(s)")),0===e.hide_in_queue?o().createElement(o().Fragment,null,o().createElement(i.nA6,null,e.status===b.s.Waiting&&0===e.hide_in_queue?o().createElement(o().Fragment,null,o().createElement(i.$nd,{kind:"ghost",disabled:!D,onClick:function(){return f(e)}},"Call")):o().createElement(o().Fragment,null,D?o().createElement(o().Fragment,null,o().createElement(i.obU,{"aria-label":"overflow-menu"},o().createElement(i.XSD,{itemText:"Assign To",onClick:function(){return d(e)}}),o().createElement(i.XSD,{itemText:"Transition",onClick:function(){return m(e)}}),o().createElement(i.XSD,{itemText:"Sign Off",onClick:function(){return A(e)}}),o().createElement(i.XSD,{itemText:"Remove Patient",onClick:function(){return p(e)}}))):o().createElement(o().Fragment,null)))):o().createElement(o().Fragment,null,o().createElement(i.nA6,null)))})))))))};var O=n(45883),R={};R.styleTagTransform=y(),R.setAttributes=p(),R.insert=f().bind(null,"head"),R.domAPI=d(),R.insertStyleElement=h(),u()(O.A,R);const B=O.A&&O.A.locals?O.A.locals:void 0;var j=n(66270),U=n(81204),L={};L.styleTagTransform=y(),L.setAttributes=p(),L.insert=f().bind(null,"head"),L.domAPI=d(),L.insertStyleElement=h(),u()(U.A,L);const D=U.A&&U.A.locals?U.A.locals:void 0;var F=n(14079),Y=n(75862);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Q=function(e){var t=e.open,n=e.onModalClose,l=e.currentQueueEntry,c=H((0,r.useState)(),2),u=c[0],s=c[1],d=H((0,r.useState)(),2),m=d[0],f=d[1],A=H((0,r.useState)(),2),p=A[0],_=A[1],h=function(e,t,n){(0,a.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(i.aFV,{open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:function(){return(e=function(){var e,t;return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:e={queueEntryToTransition:l.queue_entry_uuid,newQueue:l.service_uuid,newStatus:p,newPriority:m,newPriorityComment:u},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,F.T)(e)];case 2:return r.sent(),h("success","Client succesfully Transitioned",""),n(),[3,4];case 3:return t=r.sent(),h("error",t.message,""),[3,4];case 4:return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){G(a,r,o,l,i,"next",e)}function i(e){G(a,r,o,l,i,"throw",e)}l(void 0)}))})();var e},primaryButtonText:"Transition",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:D.modelLayout},o().createElement("div",{className:D.sectionHeader},o().createElement("h4",null,"Move Client")),o().createElement("div",{className:D.formSection},o().createElement("div",{className:D.formRow},o().createElement("div",{className:D.formControl},o().createElement(i.l6P,{id:"queue-status",labelText:"Select Queue Status",onChange:function(e){return t=e.target.value,void _(t);var t}},o().createElement(i.ebT,{value:"",text:""}),";",o().createElement(i.ebT,{value:Y.cn.WAITING_UUID,text:"IN WAITING"}),";",o().createElement(i.ebT,{value:Y.cn.IN_SERVICE_UUID,text:"IN SERVICE"}),";",o().createElement(i.ebT,{value:Y.cn.COMPLETED_UUID,text:"COMPLETED"}),";")),o().createElement("div",{className:D.formControl},o().createElement(i.l6P,{id:"priority",labelText:"Select a Priority",onChange:function(e){return t=e.target.value,void f(t);var t}},o().createElement(i.ebT,{value:"",text:"Select"}),";",o().createElement(i.ebT,{value:Y.i3.NORMAL_PRIORITY_UUID,text:"NORMAL"}),";",o().createElement(i.ebT,{value:Y.i3.EMERGENCY_PRIORITY_UUID,text:"EMERGENCY"}),";"))),o().createElement("div",{className:D.formRow},o().createElement("div",{className:D.formControl},o().createElement(i.fs1,{enableCounter:!0,helperText:"Comment",id:"comment",labelText:"Comment",maxCount:500,placeholder:"Comment",onChange:function(e){return t=e.target.value,void s(t);var t},rows:4}))))))))};var J=n(10901),V={};V.styleTagTransform=y(),V.setAttributes=p(),V.insert=f().bind(null,"head"),V.domAPI=d(),V.insertStyleElement=h(),u()(J.A,V);const W=J.A&&J.A.locals?J.A.locals:void 0;function X(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}const z=function(e){var t=e.open,n=e.onModalClose,r=e.currentQueueEntry,l=e.onSuccessfullServe,c=function(e,t,n){(0,a.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"Serve Client",open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:function(){return(e=function(){var e,t;return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(n){switch(n.label){case 0:e={queueEntryToTransition:r.queue_entry_uuid,newQueue:r.service_uuid,newStatus:Y.cn.IN_SERVICE_UUID},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,F.T)(e)];case 2:return n.sent(),c("success","Client succesfully served",""),l(),[3,4];case 3:return t=n.sent(),c("error",t.message,""),[3,4];case 4:return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){X(a,r,o,l,i,"next",e)}function i(e){X(a,r,o,l,i,"throw",e)}l(void 0)}))})();var e},primaryButtonText:"Serve",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:W.serveModalLayout},o().createElement("div",{className:W.serveModalContentSection},o().createElement("div",{className:W.formRow},o().createElement("p",null,"Name: ",r.family_name," ",r.middle_name," ",r.given_name),o().createElement("p",null,"Ticket No: ",r.queue_entry_id),o().createElement("p",null,"Status: ",r.status),o().createElement("p",null,"Priority: ",r.priority)))))))};var $=n(71841),K={};K.styleTagTransform=y(),K.setAttributes=p(),K.insert=f().bind(null,"head"),K.domAPI=d(),K.insertStyleElement=h(),u()($.A,K);const Z=$.A&&$.A.locals?$.A.locals:void 0;var ee=n(4947),te=n(50196),ne={};ne.styleTagTransform=y(),ne.setAttributes=p(),ne.insert=f().bind(null,"head"),ne.domAPI=d(),ne.insertStyleElement=h(),u()(te.A,ne);const re=te.A&&te.A.locals?te.A.locals:void 0,oe=function(e){var t=e.title,n=e.totalCount,r=e.stats,a=e.onStatDetailsRequest;return t?o().createElement("div",{className:re.aggregateStatsCard},o().createElement("div",{className:re.aggregateStatsCardHeader},o().createElement("h5",null,t),o().createElement("h1",{className:re.totalCount,onClick:a},n)),o().createElement("div",{className:re.stats},r.map((function(e,t){return o().createElement(o().Fragment,null,o().createElement("div",{className:re.statDetails},o().createElement("div",{className:re.title},e.title," :"),o().createElement("div",{className:re.count},o().createElement("strong",null,e.count))))})))):o().createElement(o().Fragment,null)},ae=function(e){var t=e.queueEntries,n=e.report,a=e.onStatDetailsRequest,l=function(e){var n=0;return t.forEach((function(t){e.includes(t.status)&&(n+=1)})),n},i=(0,r.useMemo)((function(){return l(["WAITING"])}),[t]),c=(0,r.useMemo)((function(){return l(["IN SERVICE","COMPLETED"])}),[t]),u=(0,r.useMemo)((function(){return e=0,n.forEach((function(t){e+=t.patients})),e;var e}),[n]),s=(0,r.useMemo)((function(){return n.map((function(e){return{title:e.queue_room_name,count:e.patients}}))}),[n]);return t?o().createElement("div",{className:Z.statsSection},o().createElement("div",{className:Z.aggregate},o().createElement(oe,{title:"Total Checked In",totalCount:null!=u?u:0,stats:s,onStatDetailsRequest:a})),o().createElement(ee.A,{title:"Patients in waiting",count:null!=i?i:0}),o().createElement(ee.A,{title:"Patients attended to",count:null!=c?c:0})):"No queue entry records"};var le=n(62890),ie={};ie.styleTagTransform=y(),ie.setAttributes=p(),ie.insert=f().bind(null,"head"),ie.domAPI=d(),ie.insertStyleElement=h(),u()(le.A,ie);const ce=le.A&&le.A.locals?le.A.locals:void 0;var ue=n(25838);function se(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){se(a,r,o,l,i,"next",e)}function i(e){se(a,r,o,l,i,"throw",e)}l(void 0)}))}}function me(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const fe=function(e){var t=e.open,n=e.onModalClose,r=e.currentQueueEntry,c=e.onSuccessfullSignOff,u=function(e,t,n){(0,a.showSnackbar)({kind:e,title:t,subtitle:n})},s=function(e){return de((function(){return me(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,l.oG)(e.queue_entry_uuid)];case 1:return t.sent(),u("success","Patient removal from queue successfully!",""),[3,3];case 2:return t.sent(),u("error","Patient removal from queue failed!",""),[3,3];case 3:return[2]}}))}))()};return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"Sign Off",open:t,size:"md",onSecondarySubmit:function(){return n()},onRequestClose:function(){return n()},onRequestSubmit:function(){return de((function(){var e,t;return me(this,(function(n){switch(n.label){case 0:e={stopDatetime:(new Date).toISOString()},n.label=1;case 1:return n.trys.push([1,4,,5]),[4,s(r)];case 2:return n.sent(),[4,(0,ue.jN)(r.visit_uuid,e)];case 3:return n.sent(),u("success","Visit Ended successfully",""),c(),[3,5];case 4:return t=n.sent(),u("error",t.message,""),[3,5];case 5:return[2]}}))}))()},primaryButtonText:"Sign Off",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:ce.serveModalLayout},o().createElement("div",{className:ce.serveModalContentSection},o().createElement("div",{className:ce.formRow},o().createElement(i.ksK,{id:"health-worker-id",labelText:"Enter your Provider ID",onChange:function(){},type:"text"})))))))};var Ae=n(43227),pe={};pe.styleTagTransform=y(),pe.setAttributes=p(),pe.insert=f().bind(null,"head"),pe.domAPI=d(),pe.insertStyleElement=h(),u()(Ae.A,pe);const _e=Ae.A&&Ae.A.locals?Ae.A.locals:void 0,he=function(e){var t=e.open,n=e.title,r=e.subtitle,a=e.onConfirm,l=e.onModalClose;return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"",open:t,size:"md",onSecondarySubmit:l,onRequestClose:function(){return l()},onRequestSubmit:a,primaryButtonText:"Confirm",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:_e.modalLayout},o().createElement("div",{className:_e.modalTitle},o().createElement("h4",null,n)),o().createElement("div",{className:_e.modalContentSection},o().createElement("h6",null,r))))))};var we=n(39001),ye={};ye.styleTagTransform=y(),ye.setAttributes=p(),ye.insert=f().bind(null,"head"),ye.domAPI=d(),ye.insertStyleElement=h(),u()(we.A,ye);const ge=we.A&&we.A.locals?we.A.locals:void 0;function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const ve=function(e){var t,n,a=e.open,l=e.onModalClose,c=e.patientList,u=(t=(0,r.useState)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],d=u[1],m=(0,r.useMemo)((function(){return s?c.filter((function(e){return e.person_name.trim().toLowerCase().includes(s.trim().toLowerCase())})):c}),[c,s]);return o().createElement(o().Fragment,null,o().createElement(i.aFV,{modalHeading:"Checked In Patient List",open:a,size:"lg",onSecondarySubmit:function(){return l()},onRequestClose:function(){return l()},onRequestSubmit:l,primaryButtonText:"Close",secondaryButtonText:"Cancel"},o().createElement(i.cwr,null,o().createElement("div",{className:ge.checkedInlLayout},o().createElement("div",{className:ge.actionHeaderSection},o().createElement("div",{className:ge.searchInput},o().createElement(i.ksK,{id:"queue-search",labelText:"",onChange:function(e){return t=e.target.value,void d(t);var t},placeholder:"Enter patient name to filter"}))),o().createElement("div",{className:ge.serveModalContentSection},o().createElement(i.XIK,null,o().createElement(i.ndF,null,o().createElement(i.Hjg,null,o().createElement(i.A0N,null,"No"),o().createElement(i.A0N,null,"Name"),o().createElement(i.A0N,null,"Age"),o().createElement(i.A0N,null,"Gender"),o().createElement(i.A0N,null,"Phone Number"),o().createElement(i.A0N,null,"Identifiers"),o().createElement(i.A0N,null,"Queue Room"),o().createElement(i.A0N,null,"Current Queue Room"),o().createElement(i.A0N,null,"Status"))),o().createElement(i.BFY,null,m.map((function(e,t){var n;return o().createElement(i.Hjg,{id:"".concat(e.queue_entry_id)},o().createElement(i.nA6,null,t+1),o().createElement(i.nA6,null,e.person_name),o().createElement(i.nA6,null,e.age),o().createElement(i.nA6,null,e.gender),o().createElement(i.nA6,null,e.phone_number),o().createElement(i.nA6,null,e.identifiers),o().createElement(i.nA6,null,e.queue_room_name),o().createElement(i.nA6,null,null!==(n=e.current_queue_room)&&void 0!==n?n:""),o().createElement(i.nA6,null,o().createElement(i.vwO,{size:"md",type:"SERVED"===e.served_status?"blue":"gray"},e.served_status)))})))))))))};function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){Ee(a,r,o,l,i,"next",e)}function i(e){Ee(a,r,o,l,i,"throw",e)}l(void 0)}))}}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const Ie=function(e){var t=e.serviceTypeUuid,n=e.title,c=Se((0,r.useState)([]),2),u=c[0],s=c[1],d=Se((0,r.useState)([]),2),m=d[0],f=d[1],A=Se((0,r.useState)([]),2),p=A[0],_=A[1],h=Se((0,r.useState)(),2),w=h[0],y=h[1],g=Se((0,r.useState)(!1),2),C=g[0],v=g[1],b=Se((0,r.useState)(!1),2),E=b[0],x=b[1],S=Se((0,r.useState)(!1),2),k=S[0],I=S[1],T=Se((0,r.useState)(!1),2),N=T[0],q=T[1],O=Se((0,r.useState)(!1),2),R=O[0],U=O[1],L=Se((0,r.useState)(),2),D=L[0],F=L[1],M=Se((0,r.useState)(!1),2),G=M[0],H=M[1],J=Se((0,r.useState)(!1),2),V=J[0],W=J[1],X=(0,a.useSession)().sessionLocation.uuid,$=(0,r.useMemo)((function(){return e={},u&&0!==u.length?(u.forEach((function(t){var n=t.queue_room;e[n]?e[n].push(t):e[n]=[t]})),e):{};var e}),[u]);(0,r.useEffect)((function(){t&&X&&(K(),Z(),de())}),[t,X]);var K=function(){return xe((function(){var e;return ke(this,(function(n){switch(n.label){case 0:W(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,l.U3)(t,X)];case 2:return e=n.sent(),s(e),W(!1),[3,4];case 3:return n.sent(),(0,a.showSnackbar)({kind:"error",title:"Error fetching queue",subtitle:"An error occurred while fetching the queue. Please reload or contact support"}),[3,4];case 4:return[2]}}))}))()},Z=function(){return xe((function(){var e;return ke(this,(function(n){switch(n.label){case 0:W(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,l.C)(t,X)];case 2:return e=n.sent(),f(e),W(!1),[3,4];case 3:return n.sent(),(0,a.showSnackbar)({kind:"error",title:"Error fetching queue daily report",subtitle:"An error occurred while fetching the queue daily report. Please reload or contact support"}),[3,4];case 4:return[2]}}))}))()};if(!$)return o().createElement(o().Fragment,null,"No Data to Display");var ee=function(e){v(!0),y(e)},te=function(){v(!1),x(!1),I(!1),le()},ne=function(e){x(!0),y(e)},re=function(e){I(!0),y(e)},oe=function(e){q(!0),y(e)},le=function(){K()},ie=function(e){return xe((function(){var t,n;return ke(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(0,l.oG)(e.queue_entry_uuid)];case 1:return r.sent(),(0,a.showSnackbar)({kind:"success",title:"Patient removal from queue successfully!",subtitle:""}),[4,(0,ue.jN)(e.visit_uuid,{stopDatetime:(new Date).toISOString()})];case 2:return r.sent(),(0,a.showSnackbar)({kind:"success",title:"Visit Ended successfully!",subtitle:""}),le(),[3,4];case 3:return t=r.sent(),(0,a.showSnackbar)({kind:"error",title:"Patient removal from queue failed!",subtitle:null!==(n=t.message)&&void 0!==n?n:""}),[3,4];case 4:return[2]}}))}))()},ce=function(e){return xe((function(){return ke(this,(function(t){return F(e),U(!0),[2]}))}))()},se=function(e){return xe((function(){return ke(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,(0,l.oG)(e.queue_entry_uuid)];case 1:return t.sent(),[4,(0,ue.jN)(e.visit_uuid,{stopDatetime:(new Date).toISOString()})];case 2:return t.sent(),(0,a.showSnackbar)({kind:"success",title:"Queue entry successfully closed",subtitle:"Queue entry ".concat(e.queue_id," successfully closed")}),[3,4];case 3:return t.sent(),(0,a.showSnackbar)({kind:"error",title:"Queue entry close failrure",subtitle:"Queue entry ".concat(e.queue_id," could not be closed. Please retry of contact support")}),[3,4];case 4:return[2]}}))}))()},de=function(){return xe((function(){var e;return ke(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,l.vv)(t,X)];case 1:return e=n.sent(),_(e),[3,3];case 2:return n.sent(),(0,a.showSnackbar)({kind:"error",title:"Error fetching patient list",subtitle:"An error ocuured while fetching the service queue checked in patient list"}),[3,3];case 3:return[2]}}))}))()};return t?o().createElement(o().Fragment,null,o().createElement("div",{className:B.consultationLayout},o().createElement("div",{className:B.headerSection},o().createElement("h4",null,n)),o().createElement("div",null,u?o().createElement(o().Fragment,null,o().createElement(ae,{queueEntries:u,report:m,onStatDetailsRequest:function(){H(!0)}})):o().createElement(o().Fragment,null)),o().createElement("div",{className:B.headerAction},o().createElement(i.$nd,{kind:"tertiary",onClick:le,disabled:V},V?o().createElement(i.OuH,{description:"Refreshing..."}):"Refresh")),o().createElement("div",{className:B.contentSection},o().createElement(i.tUM,null,o().createElement(i.wbY,{contained:!0},$&&Object.keys($).map((function(e){return o().createElement(i.ozo,null,e)}))),o().createElement(i.T2N,null,$&&Object.keys($).map((function(e){return o().createElement(i.KpK,null,o().createElement(P,{queueRoom:e,queueEntries:$[e],handleMovePatient:ee,handleTransitionPatient:ne,handleServePatient:re,handleSignOff:oe,handleRemovePatient:ie,showComingFromCol:t!==Y.XA.TRIAGE_SERVICE_UUID,handleClearQueue:ce}))})))))),C&&w?o().createElement(o().Fragment,null,o().createElement(j.A,{open:C,locationUuid:X,onModalClose:te,currentQueueEntryUuid:w.queue_entry_uuid,onTransferSuccess:te})):o().createElement(o().Fragment,null),E?o().createElement(o().Fragment,null,o().createElement(Q,{open:E,onModalClose:te,currentQueueEntry:w})):o().createElement(o().Fragment,null),k?o().createElement(o().Fragment,null,o().createElement(z,{open:k,onModalClose:te,currentQueueEntry:w,onSuccessfullServe:function(){te(),w&&w.patient_uuid&&(window.location.href="".concat(window.spaBase,"/patient/").concat(w.patient_uuid,"/chart"))}})):o().createElement(o().Fragment,null),N?o().createElement(o().Fragment,null,o().createElement(fe,{open:N,onModalClose:te,currentQueueEntry:w,onSuccessfullSignOff:function(){q(!1),le()}})):o().createElement(o().Fragment,null),R?o().createElement(o().Fragment,null,o().createElement(he,{open:R,onConfirm:function(){U(!1),xe((function(){var e,t;return ke(this,(function(n){switch(n.label){case 0:e=0,n.label=1;case 1:return e<D.length?(t=u[e],[4,se(t)]):[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))(),F([]),le()},onModalClose:function(){U(!1),F([])},title:"Clear Queue",subtitle:"You are about to clear the patient queue and their respective visits. Are you sure?"})):o().createElement(o().Fragment,null),G&&p?o().createElement(o().Fragment,null,o().createElement(ve,{open:G,onModalClose:function(){H(!1)},patientList:p})):o().createElement(o().Fragment,null)):o().createElement(o().Fragment,null,"No service type defined")}},71841:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__stat-details-component__statsSection___Aldqg{display:flex;flex-direction:row;width:100%;column-gap:15px;margin-bottom:15px}.-esm-dha-workflow__stat-details-component__statsSection___Aldqg .-esm-dha-workflow__stat-details-component__aggregate___djBt1{display:flex;flex-direction:column;width:50%}","",{version:3,sources:["webpack://./src/service-queues/service-queue/stats/stat-details/stat-details.component.scss"],names:[],mappings:"AAAA,iEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,eAAA,CACA,kBAAA,CACA,+HACI,YAAA,CACA,qBAAA,CACA,SAAA",sourcesContent:[".statsSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 15px;\n margin-bottom: 15px;\n .aggregate{\n display: flex;\n flex-direction: column;\n width: 50%;\n }\n}"],sourceRoot:""}]),l.locals={statsSection:"-esm-dha-workflow__stat-details-component__statsSection___Aldqg",aggregate:"-esm-dha-workflow__stat-details-component__aggregate___djBt1"};const i=l},81204:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),l.locals={};const i=l},90974:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(72996),o=n.n(r),a=n(70159),l=n.n(a)()(o());l.push([e.id,".-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotLayout___D7rtH{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotContent___Gy17P{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:.75rem;width:100%}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3{display:flex;flex-direction:column;flex:1 1 18rem;min-width:0}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3:empty{display:none}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3>*{width:100%}.-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3 .cds--tile{padding-top:.25rem;padding-bottom:.25rem;min-height:0}","",{version:3,sources:["webpack://./src/shared/ui/facility-worker-slot/facility-worker.component-slot.component.scss"],names:[],mappings:"AAAA,qFACE,YAAA,CACA,qBAAA,CACA,UAAA,CAGF,sFACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,mBAAA,CACA,UAAA,CACA,UAAA,CAGF,+EACE,YAAA,CACA,qBAAA,CACA,cAAA,CACA,WAAA,CAGA,qFACE,YAAA,CAIF,iFACE,UAAA,CAKF,0FACE,kBAAA,CACA,qBAAA,CACA,YAAA",sourcesContent:[".fhwrSlotLayout {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.fhwrSlotContent {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: stretch;\n gap: 0.75rem;\n width: 100%;\n}\n\n.fhwrSlot {\n display: flex;\n flex-direction: column;\n flex: 1 1 18rem;\n min-width: 0;\n\n /* Collapse a slot that has no extension so the other fills the row neatly. */\n &:empty {\n display: none;\n }\n\n /* Let the extension card fill its column so the two sides stay aligned. */\n > * {\n width: 100%;\n }\n\n /* Trim the extension card's vertical padding so the facility / worker header\n is a neat, compact band (keep the horizontal padding for alignment). */\n :global(.cds--tile) {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n min-height: 0;\n }\n}\n"],sourceRoot:""}]),l.locals={fhwrSlotLayout:"-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotLayout___D7rtH",fhwrSlotContent:"-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlotContent___Gy17P",fhwrSlot:"-esm-dha-workflow__facility-worker-component-slot-component__fhwrSlot___zyjG3"};const i=l},93323:(e,t,n)=>{n.d(t,{EU:()=>a,HT:()=>o});var r=n(22540);function o(e){return 1===e||"1"===e?"green":"red"}var a=function(e){var t;switch(e){case r.Q.Emergency:t="emergencyTag";break;case r.Q.Priority:t="priorityTag";break;case r.Q.NonUrgent:t="nonUrgentTag";break;case"".concat(r.Q.Emergency," PRIORITY"):t="emergencyTag";break;case"".concat(r.Q.NonUrgent," PRIORITY"):t="nonUrgentTag";break;case"".concat(r.Q.Priority," PRIORITY"):case"NORMAL PRIORITY":t="priorityTag";break;case"NOT URGENT":t="nonUrgentTag";break;default:t="gray"}return t}}}]);