@openmrs/esm-ward-app 11.1.1-pre.9708 → 11.1.1-pre.9714

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.
@@ -3,4 +3,4 @@
3
3
  │ 581.js (898.749 KiB)
4
4
  
5
5
 
6
- Rspack compiled with 1 warning in 23.50 s
6
+ Rspack compiled with 1 warning in 20.51 s
package/dist/1442.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["1442"],{9876(e,a,r){r.r(a),r.d(a,{default:()=>d,immutable:()=>s});var l=r(4675),t=r(2372);let s=e=>(a,r,l)=>(l.revalidateOnFocus=!1,l.revalidateIfStale=!1,l.revalidateOnReconnect=!1,l.refreshInterval=0,e(a,r,l)),d=(0,t.withMiddleware)(l.u,s)}}]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1442.js","sources":["webpack://@openmrs/esm-ward-app/../../node_modules/swr/dist/immutable/index.mjs"],"names":[],"mappings":"+MAGA,IAAM,EAAY,AAAC,GAAa,CAAC,EAAK,EAAS,KAEvC,EAAO,iBAAiB,CAAG,GAC3B,EAAO,iBAAiB,CAAG,GAC3B,EAAO,qBAAqB,CAAG,GAC/B,EAAO,eAAe,CAAG,EAClB,EAAW,EAAK,EAAS,IAElC,EAAkB,qBAAe,GAAM,CAAE,E"}
package/dist/1780.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["1780"],{866(e,t,n){n.d(t,{A:()=>a});let a={occupiedBed:"-esm-ward__ward-bed__occupiedBed___B0eph",emptyBed:"-esm-ward__ward-bed__emptyBed___NNt7-",skeleton:"-esm-ward__ward-bed__skeleton___UvR9H",emptyBedText:"-esm-ward__ward-bed__emptyBedText___7Ipj7"}},3356(e,t,n){n.d(t,{A:()=>a});let a={wardPatientCard:"-esm-ward__ward-patient-card__wardPatientCard___NjMVe",wardPatientCardButton:"-esm-ward__ward-patient-card__wardPatientCardButton___Xw-ov",activeWardPatientCardButton:"-esm-ward__ward-patient-card__activeWardPatientCardButton___jp465",wardPatientCardRow:"-esm-ward__ward-patient-card__wardPatientCardRow___O-Jht",wardPatientCardPendingItemsRow:"-esm-ward__ward-patient-card__wardPatientCardPendingItemsRow___MzSq2",wardPatientPendingOrdersRow:"-esm-ward__ward-patient-card__wardPatientPendingOrdersRow___rRApd",wardPatientCardExtensionSlot:"-esm-ward__ward-patient-card__wardPatientCardExtensionSlot___WvNzG",wardPatientCardHeader:"-esm-ward__ward-patient-card__wardPatientCardHeader___5a47N",wardPatientCardHeaderBadge:"-esm-ward__ward-patient-card__wardPatientCardHeaderBadge___xnMNB",wardPatientCardDispositionTypeContainer:"-esm-ward__ward-patient-card__wardPatientCardDispositionTypeContainer___yNAdL",wardPatientName:"-esm-ward__ward-patient-card__wardPatientName___w0ALg",wardPatientBedNumber:"-esm-ward__ward-patient-card__wardPatientBedNumber___dxTfe",empty:"-esm-ward__ward-patient-card__empty___fjKgf",bedNumberBox:"-esm-ward__ward-patient-card__bedNumberBox___IUQwS",movementIcon:"-esm-ward__ward-patient-card__movementIcon___D2yrt",cancelTransferRequestButton:"-esm-ward__ward-patient-card__cancelTransferRequestButton___K2Amt",chemistryReferenceIcon:"-esm-ward__ward-patient-card__chemistryReferenceIcon___+cAiI",wardPatientAddress:"-esm-ward__ward-patient-card__wardPatientAddress___4G9m6",wardPatientObsLabel:"-esm-ward__ward-patient-card__wardPatientObsLabel___XO4yd",responsiveTooltip:"-esm-ward__ward-patient-card__responsiveTooltip___p-jmt",dotSeparatedChildren:"-esm-ward__ward-patient-card__dotSeparatedChildren___OdHvX",skeletonText:"-esm-ward__ward-patient-card__skeletonText___E6V6B",unassignedPatient:"-esm-ward__ward-patient-card__unassignedPatient___XyiyN"}},7104(e,t,n){n.d(t,{A:()=>a});let a={wardView:"-esm-ward__ward-view__wardView___rT-JC",verticalTiling:"-esm-ward__ward-view__verticalTiling___L+wuj",wardViewMain:"-esm-ward__ward-view__wardViewMain___8CJRz"}},6377(e,t,n){n.d(t,{A:()=>a});let a={admissionRequestCard:"-esm-ward__admission-request-card__admissionRequestCard___iwYkp",admissionRequestCardHeaderContainer:"-esm-ward__admission-request-card__admissionRequestCardHeaderContainer___Nyxcv",admissionRequestCardHeaderBadge:"-esm-ward__admission-request-card__admissionRequestCardHeaderBadge___NzLS2",admissionRequestCardHeader:"-esm-ward__admission-request-card__admissionRequestCardHeader___feIpm",admissionRequestCardExtensionSlot:"-esm-ward__admission-request-card__admissionRequestCardExtensionSlot___TIVve",admissionEncounterDetails:"-esm-ward__admission-request-card__admissionEncounterDetails___MnhYg",admissionRequestActionBar:"-esm-ward__admission-request-card__admissionRequestActionBar___Yt4EL"}},4808(e,t,n){n.d(t,{A:()=>p});var a=n(7125),r=n.n(a),i=n(866),s=n(3356),d=n(5921);let o=({bed:e})=>{let{t}=(0,d.useTranslation)();return r().createElement("div",{id:`bed-${e.bedNumber}`,className:i.A.emptyBed},r().createElement("span",{className:`${s.A.wardPatientBedNumber} ${s.A.empty}`},e.bedNumber),r().createElement("p",{className:i.A.emptyBedText},t("emptyBed","Empty bed")))};var l=n(7768);let u="-esm-ward__bed-share-divider__bedDividerLine___BSKFi",c=({isLoading:e})=>{let{t}=(0,d.useTranslation)();return r().createElement("div",{className:"-esm-ward__bed-share-divider__bedDivider___UR6jR"},r().createElement("div",{className:u}),e?r().createElement(l.rrI,null):r().createElement(l.vwO,null,t("bedShare","Bed share")),r().createElement("div",{className:u}))},m=({patientCards:e,isLoadingDivider:t,bed:n})=>{let a=e.flatMap((e,n)=>0===n?[e]:[r().createElement(c,{key:`divider-${n}`,isLoading:t}),e]);return r().createElement("div",{id:`bed-${n.bedNumber}`,className:i.A.occupiedBed},a)},p=e=>{let{bed:t,patientCards:n}=e;return n?.length>0?r().createElement(m,e):r().createElement(o,{bed:t})}},3724(e,t,n){n.d(t,{A:()=>o});var a=n(2895),r=n(7125),i=n(4498),s=n.n(i);let d=`custom:${[["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["admissionDecisionConcept","ref"],["denyAdmissionConcept","ref"]].map(e=>e.join(":")).join(",")}`;function o(){let e=s()(`${a.restBaseUrl}/emrapi/configuration?v=${d}`,a.openmrsFetch);return(0,r.useMemo)(()=>({emrConfiguration:e.data?.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}),[e])}},160(e,t,n){n.d(t,{k:()=>r});var a=n(2895);function r(e){let t=e?.length>0,n=new URLSearchParams;for(let t of(n.append("v","custom:(visit,patient:(uuid,identifiers:(uuid,display,identifier,identifierType),voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),encounterAssigningToCurrentInpatientLocation:(encounterDatetime),currentInpatientRequest:(dispositionLocation,dispositionType,disposition:(uuid,display),dispositionEncounter:(uuid,display),dispositionObsGroup:(uuid,display),visit:(uuid),patient:(uuid)),firstAdmissionOrTransferEncounter:(encounterDatetime),currentInpatientLocation,)"),e??[]))n.append("patients",t);return(0,a.useOpenmrsFetchAll)(t?`${a.restBaseUrl}/emrapi/inpatient/admission?${n.toString()}`:null)}},3102(e,t,n){n.d(t,{e:()=>r});var a=n(2895);function r(e,t=!0,n="default"){let i=new URLSearchParams({...e,v:n}),s=`${a.restBaseUrl}/obs?${i}`;return(0,a.useOpenmrsFetchAll)(t?s:null)}},9656(e,t,n){n.d(t,{A:()=>d});var a=n(2895),r=n(2745),i=n(4498),s=n.n(i);function d(){let{locationUuid:e}=(0,r.useParams)(),{sessionLocation:t}=(0,a.useSession)(),{data:n,isLoading:i,error:d}=function(e,t="custom:(display,uuid)"){return s()(e?`${a.restBaseUrl}/location/${e}?v=${t}`:null,a.openmrsFetch)}(e||null),o=e&&d;return{location:e?n?.data:t,isLoadingLocation:i,errorFetchingLocation:d,invalidLocation:o}}},2488(e,t,n){n.d(t,{u:()=>u});var a=n(7125),r=n(9900),i=n(2895),s=n(7364),d=n.n(s),o=n(9656),l=n(160);function u(){let e=function(e="custom:(ward,totalBeds,occupiedBeds,bedLayouts:(rowNumber,columnNumber,bedNumber,bedId,bedUuid,status,location,patients:(person:full,identifiers,uuid)))"){let{location:t}=(0,o.A)(),n=(0,i.useFeatureFlag)("bedmanagement-module"),a=t?.uuid?`${i.restBaseUrl}/admissionLocation/${t?.uuid}?v=${e}`:null,{data:r,...s}=d()(n?a:null,i.openmrsFetch);return{admissionLocation:r?.data,...s}}(),t=function(){let{location:e}=(0,o.A)();return(0,i.useOpenmrsFetchAll)(e?`${i.restBaseUrl}/emrapi/inpatient/admission?currentInpatientLocation=${e.uuid}&v=custom:(visit,patient:(uuid,identifiers:(uuid,display,identifier,identifierType),voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),encounterAssigningToCurrentInpatientLocation:(encounterDatetime),currentInpatientRequest:(dispositionLocation,dispositionType,disposition:(uuid,display),dispositionEncounter:(uuid,display),dispositionObsGroup:(uuid,display),visit:(uuid),patient:(uuid)),firstAdmissionOrTransferEncounter:(encounterDatetime),currentInpatientLocation,)`:null)}(),n=function(e=["ADMIT","TRANSFER"],t="custom:(dispositionLocation,dispositionType,disposition,dispositionEncounter:full,patient:(uuid,identifiers,voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),dispositionObsGroup,visit)"){let{location:n}=(0,o.A)(),a=new URLSearchParams;a.set("dispositionType",e.join(",")),a.set("dispositionLocation",n?.uuid),a.set("v",t);let{data:r,...s}=(0,i.useOpenmrsFetchAll)(n?.uuid?`${i.restBaseUrl}/emrapi/inpatient/request?${a.toString()}`:null);return{inpatientRequests:r,...s}}(),{location:s}=(0,o.A)(),{data:u}=t,{admissionLocation:c}=e,{inpatientRequests:m}=n,p=(0,a.useMemo)(()=>{if(!c||!u||!m)return null;{let e=new Set;for(let t of c.bedLayouts)for(let n of t.patients)e.add(n.uuid);for(let t of m)e.add(t.patient.uuid);for(let t of u)e.delete(t.patient.uuid);return e}},[c,u,m]),_=(0,l.k)(p?Array.from(p):null),{data:f}=_;return{...(0,a.useMemo)(()=>({...(0,r.U1)(u,c,m,f,s)}),[c,u,m,f,s]),admissionLocationResponse:e,inpatientAdmissionResponse:t,inpatientRequestResponse:n,isLoading:e.isLoading||t.isLoading||n.isLoading||_.isLoading,async mutate(){await Promise.all([e?.mutate?.(),t?.mutate?.(),n?.mutate?.(),_?.mutate?.()])}}}},5084(e,t,n){n.d(t,{d:()=>r});var a,r=((a={}).PATIENTS="patients",a.FREE_BEDS="freeBeds",a.TOTAL_BEDS="totalBeds",a.PENDING_OUT="pendingOut",a.FEMALES_OF_REPRODUCTIVE_AGE="femalesOfReproductiveAge",a.NEWBORNS="newborns",a)},103(e,t,n){n.d(t,{A:()=>o});var a=n(7125),r=n.n(a),i=n(9900),s=n(3743),d=n(3356);let o=({id:e,wardPatient:t})=>{let{patient:n,visit:a,inpatientAdmission:o}=t,{conceptUuid:l}=(0,i.UG)("admissionRequestNote",e)??{};return null!=o?null:r().createElement("div",{className:d.A.wardPatientCardRow},r().createElement(s.A,{id:e,configOverride:{conceptUuid:l,limit:0,id:"admission-note",onlyWithinCurrentVisit:!0,orderBy:"ascending",label:"Admission Note"},patient:n,visit:a}))}},6213(e,t,n){n.d(t,{A:()=>o});var a=n(7125),r=n.n(a),i=n(9656),s=n(7768),d=n(5921);let o=({wardPatient:e})=>{let{location:t}=(0,i.A)(),{t:n}=(0,d.useTranslation)(),{visit:a,inpatientAdmission:o}=e;return a?o?o.currentInpatientLocation.uuid!==t?.uuid?r().createElement(s.jeF,{hideCloseButton:!0,kind:"warning",lowContrast:!0,title:n("admittedTo","Admitted to {{locationName}}",{locationName:o.currentInpatientLocation.display})}):null:r().createElement(s.jeF,{hideCloseButton:!0,kind:"warning",lowContrast:!0,title:n("noAdmission","No admission found")}):r().createElement(s.jeF,{hideCloseButton:!0,kind:"warning",lowContrast:!0,title:n("noActiveVisit","No active visit")})}},5001(e,t,n){n.d(t,{A:()=>g});var a=n(7125),r=n.n(a),i=n(3760),s=n(9900),d=n(529),o=n(3356),l=n(5921),u=n(2895),c=n(7364),m=n.n(c);let p=({wardPatient:e,orderUuid:t,label:n,onOrderCount:i})=>{let{t:s}=(0,l.useTranslation)(),{count:c,isLoading:p}=function(e,t,n){let a=e&&t&&n?`${u.restBaseUrl}/order?includeNullFulfillerStatus=true&patient=${e}&orderTypes=${t}&activatedOnOrAfterDate=${n}&excludeCanceledAndExpired=true&excludeDiscontinueOrders=true`:null,{data:r,...i}=m()(a,u.openmrsFetch);return{orders:r?.data.results,count:r?.data.results.length,...i}}(e?.patient?.uuid,t,e?.visit?.startDatetime.split("T")[0]);if((0,a.useEffect)(()=>{p||i(c)},[c,p,i]),p||!c||0===c)return null;let _=n?s(n):s("Orders","Orders");return r().createElement("div",{className:o.A.wardPatientCardDispositionTypeContainer},r().createElement(d.u$,{className:o.A.chemistryReferenceIcon,size:"24"}),c," ",_)};var _=n(7768),f=n(8537);let w=({wardPatient:e})=>{let{t}=(0,l.useTranslation)(),{dispositionType:n,dispositionLocation:i}=e?.inpatientRequest,s=(0,a.useMemo)(()=>"TRANSFER"===n?i?t("transferToDispositionLocation","Transfer to {{location}}",{location:i.name}):t("pendingTransfer","Pending Transfer"):"DISCHARGE"===n?t("pendingDischarge","Pending Discharge"):"",[n,i,t]);return"TRANSFER"!==n&&"DISCHARGE"!==n?null:r().createElement("div",{className:o.A.wardPatientCardDispositionTypeContainer},r().createElement(f.yG,{className:o.A.movementIcon,size:24}),s,r().createElement(_.K0,{label:t("cancel","Cancel"),kind:"secondary",className:o.A.cancelTransferRequestButton,size:"sm",onClick:()=>{(0,u.launchWorkspace2)("ward-patient-cancel-admission-request-workspace",{},{},{wardPatient:e})}},r().createElement(u.CloseOutlineIcon,null)))},g=({id:e,wardPatient:t})=>{let{orders:n,showPendingItems:d}=(0,s.UG)("pendingItems",e)||{},[l,u]=(0,a.useState)(!1),c=!!t?.inpatientRequest||l,m=(0,a.useCallback)(e=>{e>0&&u(!0)},[]);return(0,a.useEffect)(()=>{n?.orderTypes?.length||u(!1)},[n]),r().createElement("div",{className:o.A.wardPatientCardPendingItemsRow},d&&c?r().createElement(r().Fragment,null,r().createElement(i.Dx,{className:o.A.hourGlassIcon,size:"16"}),":"):null,n?.orderTypes.map(({uuid:e,label:n})=>r().createElement(p,{key:`pending-order-type-${e}`,wardPatient:t,orderUuid:e,label:n,onOrderCount:m})),t?.inpatientRequest?r().createElement(w,{wardPatient:t}):null)}},2332(e,t,n){n.d(t,{A:()=>s});var a=n(2895),r=n(7125),i=n.n(r);let s=({patient:e})=>e.person?.birthdate?i().createElement("div",null,(0,a.age)(e.person.birthdate)):null},5174(e,t,n){n.d(t,{A:()=>s});var a=n(7125),r=n.n(a),i=n(3356);let s=({bed:e})=>e?r().createElement("div",{className:i.A.bedNumberBox},r().createElement("span",{className:i.A.wardPatientBedNumber},e.bedNumber)):r().createElement(r().Fragment,null)},5e3(e,t,n){n.d(t,{A:()=>s});var a=n(7125),r=n.n(a),i=n(5921);let s=({patient:e})=>{let{t}=(0,i.useTranslation)();return r().createElement("div",null,((e,t)=>{switch(t){case"M":return e("male","Male");case"F":return e("female","Female");case"O":return e("other","Other");case"unknown":return e("unknown","Unknown");default:return t}})(t,e?.person?.gender))}},8768(e,t,n){n.d(t,{A:()=>d});var a=n(7125),r=n.n(a),i=n(2895),s=n(9900);let d=({id:e,patient:t})=>{let n=(0,s.UG)("patientIdentifier",e),a=t.identifiers.map(e=>({value:e.identifier,type:{text:e.identifierType.name,coding:[{code:e.identifierType.uuid}]}}));return r().createElement("div",{className:"-esm-ward__ward-patient-identifier__wardPatientIdentifierWrapper___Cjt9t"},r().createElement(i.PatientBannerPatientIdentifiers,{identifiers:a,showIdentifierLabel:n?.showIdentifierLabel}))}},9474(e,t,n){n.d(t,{A:()=>s});var a=n(7125),r=n.n(a),i=n(3356);let s=({patient:e})=>r().createElement("div",{className:i.A.wardPatientName},e?.person?.preferredName?.display)},3743(e,t,n){n.d(t,{A:()=>m});var a=n(7125),r=n.n(a),i=n(3672),s=n(7768),d=n(5921),o=n(3102),l=n(9900),u=n(4267),c=n(3356);let m=({id:e,configOverride:t,patient:n,visit:a})=>{let m=(0,l.UG)("obs",e),{conceptUuid:p,onlyWithinCurrentVisit:_,orderBy:f,limit:w,label:g}=t??m??{},{data:E,isLoading:A}=(0,o.e)({patient:n.uuid,concept:p},null!=p,i.Fx),{t:y}=(0,d.useTranslation)();if(A)return r().createElement(s.rrI,null);{let e=E?.filter(e=>!_||e.encounter.visit?.uuid===a?.uuid)?.sort((e,t)=>("descending"===f?-1:1)*e.obsDatetime.localeCompare(t.obsDatetime))?.slice(0,0===w?Number.MAX_VALUE:w),t=null!=g?y(g):e?.[0]?.concept?.display,n=e?.map(e=>{let{value:t}=e,n=t?.display??String(t),a=(0,i.Fe)(e,y);return r().createElement(u.A,{key:e.uuid,tooltipContent:a},r().createElement("span",{title:a},n," "))});return n?.length>0?r().createElement("div",null,r().createElement("span",{className:c.A.wardPatientObsLabel},t?y("labelColon","{{label}}:",{label:t}):""),r().createElement("div",{className:c.A.dotSeparatedChildren},n)):null}}},3672(e,t,n){n.d(t,{Fe:()=>s,Fx:()=>r,uk:()=>i});var a=n(2895);let r="custom:(uuid,display,obsDatetime,value,concept:(uuid,display),encounter:(uuid,display,encounterType,encounterDatetime,visit:(uuid,display)))";function i(e=[]){let t=new Map;for(let n of e){let{color:e,appliedToConceptSets:a}=n;for(let n of a??[])t.has(n)||t.set(n,e)}let n=e.flatMap(e=>e.appliedToConceptSets),r=`${a.restBaseUrl}/concept?references=${n.join()}&v=custom:(uuid,setMembers:(uuid))`,{data:s}=(0,a.useOpenmrsFetchAll)(r),d=new Map;if(s)for(let e of s)for(let n of e.setMembers)d.has(n.uuid)||d.set(n.uuid,t.get(e.uuid));return d}function s(e,t){return t("encounterDisplay","{{encounterType}} {{encounterDate}}",{encounterType:e.encounter.encounterType.display,encounterDate:new Date(e.encounter.encounterDatetime).toLocaleDateString(),interpolation:{escapeValue:!1}})}},4267(e,t,n){n.d(t,{A:()=>o});var a=n(7768),r=n(2895),i=n(7125),s=n.n(i),d=n(3356);let o=({children:e,tooltipContent:t})=>{let n=(0,r.useLayoutType)();return(0,r.isDesktop)(n)?s().createElement(a.m_M,{description:t,className:d.A.responsiveTooltip},s().createElement("span",null,e)):s().createElement(a.Gff,{className:d.A.responsiveTooltip},s().createElement(a.yvu,null,e),s().createElement(a.pNg,null,t))}},9390(e,t,n){n.d(t,{A:()=>d});var a=n(7768),r=n(7125),i=n.n(r),s=n(3356);let d=()=>i().createElement(a.ryE,{className:s.A.skeletonText})},5965(e,t,n){n.d(t,{A:()=>u});var a=n(7125),r=n.n(a),i=n(3464),s=n.n(i),d=n(279),o=n.n(d),l=n(5921);s().extend(o());let u=({encounterAssigningToCurrentInpatientLocation:e})=>{let{t}=(0,l.useTranslation)();if(!e?.encounterDatetime)return null;let n=s().duration(s()().diff(e.encounterDatetime)),a=Math.floor(n.asDays()),i=n.hours(),d=n.minutes(),o=n.seconds(),u=[];return(a>0&&u.push(t("days",{count:a,defaultValue_one:"{{count}} day",defaultValue_other:"{{count}} days"})),i>0&&u.push(t("hours",{count:i,defaultValue_one:"{{count}} hour",defaultValue_other:"{{count}} hours"})),d>0&&u.push(t("minutes",{count:d,defaultValue_one:"{{count}} minute",defaultValue_other:"{{count}} minutes"})),o>0&&0===u.length&&u.push(t("seconds",{count:o,defaultValue_one:"{{count}} second",defaultValue_other:"{{count}} seconds"})),0===u.length)?null:r().createElement("div",null,t("timeOnWard","Time on this ward: {{timeOnWard}}",{timeOnWard:u.join(" ")}))}},7781(e,t,n){n.d(t,{A:()=>m});var a=n(7125),r=n.n(a),i=n(3464),s=n.n(i),d=n(279),o=n.n(d),l=n(5562),u=n.n(l),c=n(5921);s().extend(o()),s().extend(u());let m=({firstAdmissionOrTransferEncounter:e})=>{let{t}=(0,c.useTranslation)();if(!e)return null;let n=s()(e.encounterDatetime).fromNow();return r().createElement("div",null,t("timeSinceAdmission","Admitted: {{timeSinceAdmission}}",{timeSinceAdmission:n}))}},8080(e,t,n){n.d(t,{A:()=>d});var a=n(7125),r=n.n(a),i=n(2895),s=n(3356);let d=({children:e,wardPatient:t,relatedTransferPatients:n})=>{let{patient:a}=t;return r().createElement("div",{className:s.A.wardPatientCard},e,r().createElement("button",{className:s.A.wardPatientCardButton,onClick:()=>{(0,i.launchWorkspace2)("ward-patient-workspace",{},{},{wardPatient:t,relatedTransferPatients:n})}},(0,i.getPatientName)(a.person)))}},875(e,t,n){n.d(t,{A:()=>c});var a=n(2895),r=n(7125),i=n.n(r),s=n(5921),d=n(5084),o=n(9900),l=n(7768);let u=({metricName:e,metricValue:t,isLoading:n})=>i().createElement("div",{className:"-esm-ward__ward-metric__metric___b1Tcz"},i().createElement("span",{className:"-esm-ward__ward-metric__metricName___YEKn3"},e),n?i().createElement(l.PuA,{className:"-esm-ward__ward-metric__skeleton___qjeUd"}):i().createElement("span",{className:"-esm-ward__ward-metric__metricValue___c3LvS"},t)),c=({metrics:e=[d.d.PATIENTS,d.d.FREE_BEDS,d.d.TOTAL_BEDS,d.d.PENDING_OUT]})=>{let{t}=(0,s.useTranslation)(),n=(0,a.useFeatureFlag)("bedmanagement-module"),{wardPatientGroupDetails:l}=(0,a.useAppContext)("ward-view-context")??{},{admissionLocationResponse:c,inpatientAdmissionResponse:m,inpatientRequestResponse:p}=l||{},{isLoading:_,error:f}=c??{},w=c?.isLoading||m?.isLoading||p?.isLoading,g=(0,r.useMemo)(()=>l?(0,o.eD)(l):{},[l]);return l?(f&&(0,a.showNotification)({kind:"error",title:t("errorLoadingBedDetails","Error loading bed details"),description:f.message}),i().createElement("div",{className:"-esm-ward__ward-metrics__metricsContainer___65Spn"},e.includes(d.d.PATIENTS)&&i().createElement(u,{metricName:(0,o.Jk)("patients",t),metricValue:g.patients??"--",isLoading:!1,key:"patients"}),e.includes(d.d.FEMALES_OF_REPRODUCTIVE_AGE)&&g.femalesOfReproductiveAge&&"0"!==g.femalesOfReproductiveAge&&i().createElement(u,{metricName:(0,o.Jk)("femalesOfReproductiveAge",t),metricValue:g.femalesOfReproductiveAge??"--",isLoading:!!_||!!w,key:"femalesOfReproductiveAge"}),e.includes(d.d.NEWBORNS)&&g.newborns&&"0"!==g.newborns&&i().createElement(u,{metricName:(0,o.Jk)("newborns",t),metricValue:g.newborns??"--",isLoading:!!_||!!w,key:"newborns"}),n&&i().createElement(i().Fragment,null,e.includes(d.d.FREE_BEDS)&&i().createElement(u,{metricName:(0,o.Jk)("freeBeds",t),metricValue:g.freeBeds??"--",isLoading:!!_||!!w,key:"freeBeds"}),e.includes(d.d.TOTAL_BEDS)&&i().createElement(u,{metricName:(0,o.Jk)("totalBeds",t),metricValue:g.totalBeds??"--",isLoading:!!_||!!w,key:"totalBeds"}),e.includes(d.d.PENDING_OUT)&&i().createElement(u,{metricName:(0,o.Jk)("pendingOut",t),metricValue:f?"--":l?.wardPatientPendingCount?.toString()??"--",isLoading:!!w,key:"pendingOut"})))):i().createElement(i().Fragment,null)}},929(e,t,n){n.d(t,{A:()=>p});var a=n(7125),r=n.n(a),i=n(3373),s=n.n(i),d=n(5921),o=n(7768),l=n(8537),u=n(2895);let c=({wardPendingPatients:e})=>{let{wardPatientGroupDetails:t}=(0,u.useAppContext)("ward-view-context")??{},{inpatientRequests:n,isLoading:a,error:i}=t?.inpatientRequestResponse??{},{t:c}=(0,d.useTranslation)(),m=(0,u.useLayoutType)();return a||!n?null:i?(console.error(i),r().createElement(o.jeF,{kind:"error",title:c("errorLoadingPatientAdmissionRequests","Error loading patient admission requests")})):r().createElement("div",{className:s()("-esm-ward__admission-requests__admissionRequestsContainer___bXgB6",{"-esm-ward__admission-requests__blackBackground___xRDWm":n?.length,"-esm-ward__admission-requests__lightBlueBackground___z3E8l":!n?.length})},r().createElement(l.yG,{className:"-esm-ward__admission-requests__movementIcon___UkccD",size:"24"}),r().createElement("span",{className:"-esm-ward__admission-requests__content___E-1qx"},c("admissionRequestsCount","{{count}} admission request",{count:n.length})),r().createElement(o.$nd,{className:"-esm-ward__admission-requests__manageButton___PVRF+",onClick:()=>{(0,u.launchWorkspace2)("admission-requests-workspace",{wardPendingPatients:e},{startVisitWorkspaceName:"ward-app-start-visit-workspace"})},renderIcon:u.ArrowRightIcon,kind:"ghost",size:(0,u.isDesktop)(m)?"sm":"lg"},c("manage","Manage")))};var m=n(9656);let p=({wardPendingPatients:e,wardMetrics:t})=>{let{location:n}=(0,m.A)();return r().createElement("div",{className:"-esm-ward__ward-view-header__wardViewHeader___u4v+A"},r().createElement("h2",null,n?.display),t,r().createElement(c,{wardPendingPatients:e}))}},9900(e,t,n){n.d(t,{U1:()=>o,eD:()=>d,Jk:()=>l,yZ:()=>s,UG:()=>u,k9:()=>c});var a=n(2895),r=n(7125),i=n(5921);function s(e){return{id:e.bedId,uuid:e.bedUuid,bedNumber:e.bedNumber,bedType:e.bedType,row:e.rowNumber,column:e.columnNumber,status:e.status}}function d(e){let t=[...e.wardUnadmittedPatientsWithBed?.values(),...[...e.wardAdmittedPatientsWithBed?.values()].map(e=>e.patient),...e.wardUnassignedPatientsList?.map(e=>e.patient)],n=t?.length??0,a=t.filter(e=>null!=e.person.age&&e.person.age<1)?.length??0,r=t.filter(e=>"F"===e.person.gender).filter(e=>null!=e.person.age&&e.person.age>=10)?.length??0,i=e.bedLayouts?.length??0,s=e.bedLayouts?.filter(e=>e.patients?.length>0).length??0;return{patients:n.toString(),freeBeds:(i-s).toString(),totalBeds:i.toString(),newborns:a.toString(),femalesOfReproductiveAge:r.toString()}}function o(e,t,n,a,r){let i,s=function(e){let t=new Map;for(let n of e??[])n&&t.set(n.patient.uuid,n);return t}([...e??[],...a??[]]),d=new Map,o=new Map,l=t&&(i=new Intl.Collator([],{numeric:!0}),t.bedLayouts.filter(e=>e.bedId).sort((e,t)=>i.compare(e.bedNumber,t.bedNumber))),u=new Set,c=0;l?.map(e=>{let{patients:t}=e;t.map(e=>{let t=s.get(e.uuid);if(u.add(e.uuid),t?.currentInpatientLocation?.uuid===r.uuid){d.set(e.uuid,t);let n=t.currentInpatientRequest?.dispositionType;("TRANSFER"===n||"DISCHARGE"===n)&&c++}else o.set(e.uuid,e)})});let m=e?.filter(e=>(u.add(e.patient.uuid),!d.has(e.patient.uuid)&&!o.has(e.patient.uuid)))??[];for(let e of n??[])e&&u.add(e.patient.uuid);return{wardAdmittedPatientsWithBed:d,wardUnadmittedPatientsWithBed:o,wardPatientPendingCount:c,bedLayouts:l,wardUnassignedPatientsList:m,allWardPatientUuids:u,inpatientAdmissionsByPatientUuid:s}}function l(e,t){switch(e){case"patients":return t("patients","Patients");case"freeBeds":return t("freeBeds","Free beds");case"totalBeds":return t("totalBeds","Total beds");case"pendingOut":return t("pendingOut","Pending out");case"femalesOfReproductiveAge":return t("mothers","Mothers");case"newborns":return t("infants","Infants")}}function u(e,t){let n=(0,a.useConfig)(),{t:r}=(0,i.useTranslation)();try{return n?.patientCardElements?.[e]?.find(e=>e?.id===t)}catch(n){return(0,a.showNotification)({title:r("errorConfiguringPatientCard","Error configuring patient card"),kind:"error",critical:!0,description:r("errorConfiguringPatientCardMessage","Unable to find configuration for {{elementType}}, id: {{id}}",{elementType:e,id:t})}),null}}function c(e){let{wards:t}=(0,a.useConfig)(),n=(0,r.useMemo)(()=>t?.find(t=>null==t.appliedTo||t.appliedTo?.length===0||t.appliedTo.some(t=>t.location===e)),[t,e]);return n||(console.warn("No ward card configuration has `appliedTo` criteria that matches the current location. Using the default configuration."),{id:"default-ward"})}},6545(e,t,n){n.d(t,{A:()=>w});var a=n(7125),r=n.n(a),i=n(3373),s=n.n(i),d=n(7768),o=n(5921),l=n(2895),u=n(9656),c=n(9390),m=n(866);let p=()=>r().createElement("div",{className:`${m.A.emptyBed} ${m.A.skeleton}`},r().createElement(d.ryE,null),r().createElement(c.A,null));var _=n(7104);let f=()=>r().createElement(r().Fragment,null,Array(20).fill(0).map((e,t)=>r().createElement(p,{key:t}))),w=({wardBeds:e,wardUnassignedPatients:t})=>{let{location:n}=(0,u.A)(),{t:i}=(0,o.useTranslation)(),{wardPatientGroupDetails:c}=(0,l.useAppContext)("ward-view-context")??{},{bedLayouts:m,isLoading:p}=c??{},{error:w}=c?.admissionLocationResponse??{},{error:g,hasMore:E,loadMore:A}=c?.inpatientAdmissionResponse??{},y=(0,l.useFeatureFlag)("bedmanagement-module"),v=(0,a.useRef)(null);return((0,a.useEffect)(function(){let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&E&&!g&&!p&&A()})},{threshold:1});return v.current&&e.observe(v.current),()=>{v.current&&e.unobserve(v.current)}},[g,E,A,v,p]),c)?r().createElement("div",{className:s()(_.A.wardViewMain,_.A.verticalTiling)},p?r().createElement(f,null):r().createElement(r().Fragment,null,e,t),m?.length===0&&y&&r().createElement(d.jeF,{kind:"warning",lowContrast:!0,title:i("noBedsConfigured","No beds configured for this location")}),w&&r().createElement(d.jeF,{kind:"error",lowContrast:!0,title:i("errorLoadingWardLocation","Error loading ward location"),subtitle:w?.message??i("invalidWardLocation","Invalid ward location: {{location}}",{location:n.display})}),g&&r().createElement(d.jeF,{kind:"error",lowContrast:!0,title:i("errorLoadingPatients","Error loading admitted patients"),subtitle:g?.message}),r().createElement("div",{ref:v})):r().createElement(r().Fragment,null)}},201(e,t,n){n.d(t,{A:()=>u});var a=n(7125),r=n.n(a),i=n(7768),s=n(5921),d=n(2895),o=n(3836),l=n(6377);let u=({wardPatient:e,relatedTransferPatients:t})=>{let{t:n}=(0,s.useTranslation)(),a="tablet"===(0,d.useLayoutType)()?"lg":"md",{closeWorkspace:u,launchChildWorkspace:c}=(0,d.useWorkspace2Context)(),m="TRANSFER"===e.inpatientRequest.dispositionType;return r().createElement("div",{className:l.A.admissionRequestActionBar},r().createElement(i.$nd,{kind:"ghost",size:a,onClick:()=>{c("transfer-elsewhere-workspace",{wardPatient:e,relatedTransferPatients:t})}},m?n("transferElsewhere","Transfer elsewhere"):n("admitElsewhere","Admit elsewhere")),r().createElement(i.$nd,{kind:"ghost",size:a,onClick:()=>{c("cancel-admission-request-workspace",{wardPatient:e,relatedTransferPatients:t})}},n("cancel","Cancel")),r().createElement(o.A,{wardPatient:e,relatedTransferPatients:t,dispositionType:e.inpatientRequest.dispositionType,onAdmitPatientSuccess:async()=>{await u({discardUnsavedChanges:!0}),(0,d.closeWorkspaceGroup2)()}}))}},3863(e,t,n){n.d(t,{A:()=>p});var a=n(7125),r=n.n(a),i=n(2895),s=n(3373),d=n.n(s),o=n(2332),l=n(5e3),u=n(8768),c=n(9474),m=n(6377);let p=({wardPatient:e})=>{let{inpatientRequest:t}=e,{dispositionEncounter:n}=t,{patient:a}=e;return r().createElement("div",{className:m.A.admissionRequestCardHeaderContainer},r().createElement("div",{className:m.A.admissionRequestCardHeader},r().createElement(c.A,{patient:a}),r().createElement(u.A,{id:"patient-identifier",patient:a}),r().createElement(l.A,{patient:a}),r().createElement(o.A,{patient:a})),r().createElement("div",{className:d()(m.A.admissionRequestCardHeader,m.A.admissionEncounterDetails)},r().createElement("div",null,(0,i.formatDatetime)(new Date(n?.encounterDatetime),{locale:(0,i.getLocale)(),mode:"standard"})),r().createElement("div",null,n?.encounterProviders?.map(e=>e?.provider?.display).join(",")),r().createElement("div",null,n?.location?.display)))}},3836(e,t,n){n.d(t,{A:()=>u});var a=n(7125),r=n.n(a),i=n(5921),s=n(7768),d=n(2895),o=n(9656),l=n(6794);let u=({wardPatient:e,relatedTransferPatients:t,onAdmitPatientSuccess:n,disabled:u,dispositionType:c,kind:m="ghost",size:p})=>{let{patient:_,visit:f,bed:w}=e??{},{t:g}=(0,i.useTranslation)(),{location:E}=(0,o.A)(),A="tablet"===(0,d.useLayoutType)()?"lg":"md",{wardPatientGroupDetails:y}=(0,d.useAppContext)("ward-view-context")??{},{admitPatient:v,isLoadingEmrConfiguration:T,errorFetchingEmrConfiguration:h}=(0,l.E)(),[b,N]=(0,a.useState)(!1),{launchChildWorkspace:C}=(0,d.useWorkspace2Context)(),P=(0,d.useFeatureFlag)("bedmanagement-module"),R=async()=>{if(P&&!w)C("admit-patient-form-workspace",{wardPatient:e,relatedTransferPatients:t});else{N(!0);let a=[e,...t??[]],r=await Promise.allSettled(a.map(e=>v(e.patient,e.inpatientRequest?.dispositionType??c,e.visit.uuid)));await y?.mutate?.(),r.forEach((e,t)=>{let n=a[t],r=n.patient.person.preferredName.display,i=n.inpatientRequest?.dispositionType??c;if("fulfilled"===e.status)(0,d.showSnackbar)({kind:"success",title:"ADMIT"===i?g("patientAdmittedSuccessfully","Patient admitted successfully"):g("patientTransferredSuccessfully","Patient transferred successfully"),subtitle:"ADMIT"===i?g("patientAdmittedToLocation","{{patientName}} admitted successfully to {{location}}",{patientName:r,location:E?.display}):g("patientTransferredToLocation","{{patientName}} transferred successfully to {{location}}",{patientName:r,location:E?.display})});else{let t=e.reason,n=t?.responseBody?.error?.globalErrors?.[0]?.message??t?.message??g("unknownError","An unknown error occurred");(0,d.showSnackbar)({kind:"error",title:"ADMIT"===i?g("errorAdmittingPatient","Failed to admit {{patientName}}",{patientName:r}):g("errorTransferringPatient","Failed to transfer {{patientName}}",{patientName:r}),subtitle:n})}}),r.some(e=>"fulfilled"===e.status)&&n(),N(!1)}},k=T||h||u||b;return r().createElement(s.$nd,{kind:m,renderIcon:d.ArrowRightIcon,size:p??A,disabled:k,onClick:R},"ADMIT"===c||k?g("admitPatient","Admit patient"):g("transferPatient","Transfer patient"))}},6794(e,t,n){n.d(t,{E:()=>o,R_:()=>s,S6:()=>c,Tb:()=>u,ZJ:()=>d,tf:()=>l});var a=n(2895),r=n(3724),i=n(9656);function s(){let{location:e}=(0,i.A)(),{currentProvider:t}=(0,a.useSession)(),{emrConfiguration:n,isLoadingEmrConfiguration:s,errorFetchingEmrConfiguration:d}=(0,r.A)();return{createEncounter:(r,i,s,d=[])=>{let o={patient:r.uuid,encounterType:i,location:e?.uuid,encounterProviders:[{provider:t?.uuid,encounterRole:n?.clinicianEncounterRole?.uuid}],obs:d,visit:s};return(0,a.openmrsFetch)(`${a.restBaseUrl}/encounter`,{method:"POST",headers:{"content-type":"application/json"},body:o})},emrConfiguration:n,isLoadingEmrConfiguration:s,errorFetchingEmrConfiguration:d}}function d(e){return(0,a.openmrsFetch)(`${a.restBaseUrl}/encounter/${e}`,{method:"DELETE"})}function o(){let{createEncounter:e,emrConfiguration:t,isLoadingEmrConfiguration:n,errorFetchingEmrConfiguration:a}=s();return{admitPatient:(n,a,r)=>e(n,"ADMIT"===a?t.admissionEncounterType:"TRANSFER"===a?t.transferWithinHospitalEncounterType:null,r),isLoadingEmrConfiguration:n,errorFetchingEmrConfiguration:a}}function l(e,t,n){return(0,a.openmrsFetch)(`${a.restBaseUrl}/beds/${e}`,{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:t,encounterUuid:n}})}function u(e,t){return(0,a.openmrsFetch)(`${a.restBaseUrl}/beds/${e}?patientUuid=${t}`,{method:"DELETE"})}function c(e){return(0,a.openmrsFetch)(`${a.restBaseUrl}/beds?patientUuid=${e}`)}}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["1780"],{866(e,t,n){n.d(t,{A:()=>a});let a={occupiedBed:"-esm-ward__ward-bed__occupiedBed___B0eph",emptyBed:"-esm-ward__ward-bed__emptyBed___NNt7-",skeleton:"-esm-ward__ward-bed__skeleton___UvR9H",emptyBedText:"-esm-ward__ward-bed__emptyBedText___7Ipj7"}},3356(e,t,n){n.d(t,{A:()=>a});let a={wardPatientCard:"-esm-ward__ward-patient-card__wardPatientCard___NjMVe",wardPatientCardButton:"-esm-ward__ward-patient-card__wardPatientCardButton___Xw-ov",activeWardPatientCardButton:"-esm-ward__ward-patient-card__activeWardPatientCardButton___jp465",wardPatientCardRow:"-esm-ward__ward-patient-card__wardPatientCardRow___O-Jht",wardPatientCardPendingItemsRow:"-esm-ward__ward-patient-card__wardPatientCardPendingItemsRow___MzSq2",wardPatientPendingOrdersRow:"-esm-ward__ward-patient-card__wardPatientPendingOrdersRow___rRApd",wardPatientCardExtensionSlot:"-esm-ward__ward-patient-card__wardPatientCardExtensionSlot___WvNzG",wardPatientCardHeader:"-esm-ward__ward-patient-card__wardPatientCardHeader___5a47N",wardPatientCardHeaderBadge:"-esm-ward__ward-patient-card__wardPatientCardHeaderBadge___xnMNB",wardPatientCardDispositionTypeContainer:"-esm-ward__ward-patient-card__wardPatientCardDispositionTypeContainer___yNAdL",wardPatientName:"-esm-ward__ward-patient-card__wardPatientName___w0ALg",wardPatientBedNumber:"-esm-ward__ward-patient-card__wardPatientBedNumber___dxTfe",empty:"-esm-ward__ward-patient-card__empty___fjKgf",bedNumberBox:"-esm-ward__ward-patient-card__bedNumberBox___IUQwS",movementIcon:"-esm-ward__ward-patient-card__movementIcon___D2yrt",cancelTransferRequestButton:"-esm-ward__ward-patient-card__cancelTransferRequestButton___K2Amt",chemistryReferenceIcon:"-esm-ward__ward-patient-card__chemistryReferenceIcon___+cAiI",wardPatientAddress:"-esm-ward__ward-patient-card__wardPatientAddress___4G9m6",wardPatientObsLabel:"-esm-ward__ward-patient-card__wardPatientObsLabel___XO4yd",responsiveTooltip:"-esm-ward__ward-patient-card__responsiveTooltip___p-jmt",dotSeparatedChildren:"-esm-ward__ward-patient-card__dotSeparatedChildren___OdHvX",skeletonText:"-esm-ward__ward-patient-card__skeletonText___E6V6B",unassignedPatient:"-esm-ward__ward-patient-card__unassignedPatient___XyiyN"}},7104(e,t,n){n.d(t,{A:()=>a});let a={wardView:"-esm-ward__ward-view__wardView___rT-JC",verticalTiling:"-esm-ward__ward-view__verticalTiling___L+wuj",wardViewMain:"-esm-ward__ward-view__wardViewMain___8CJRz"}},6377(e,t,n){n.d(t,{A:()=>a});let a={admissionRequestCard:"-esm-ward__admission-request-card__admissionRequestCard___iwYkp",admissionRequestCardHeaderContainer:"-esm-ward__admission-request-card__admissionRequestCardHeaderContainer___Nyxcv",admissionRequestCardHeaderBadge:"-esm-ward__admission-request-card__admissionRequestCardHeaderBadge___NzLS2",admissionRequestCardHeader:"-esm-ward__admission-request-card__admissionRequestCardHeader___feIpm",admissionRequestCardExtensionSlot:"-esm-ward__admission-request-card__admissionRequestCardExtensionSlot___TIVve",admissionEncounterDetails:"-esm-ward__admission-request-card__admissionEncounterDetails___MnhYg",admissionRequestActionBar:"-esm-ward__admission-request-card__admissionRequestActionBar___Yt4EL"}},4808(e,t,n){n.d(t,{A:()=>p});var a=n(7125),r=n.n(a),i=n(866),s=n(3356),d=n(5921);let o=({bed:e})=>{let{t}=(0,d.useTranslation)();return r().createElement("div",{id:`bed-${e.bedNumber}`,className:i.A.emptyBed},r().createElement("span",{className:`${s.A.wardPatientBedNumber} ${s.A.empty}`},e.bedNumber),r().createElement("p",{className:i.A.emptyBedText},t("emptyBed","Empty bed")))};var l=n(7768);let u="-esm-ward__bed-share-divider__bedDividerLine___BSKFi",c=({isLoading:e})=>{let{t}=(0,d.useTranslation)();return r().createElement("div",{className:"-esm-ward__bed-share-divider__bedDivider___UR6jR"},r().createElement("div",{className:u}),e?r().createElement(l.rrI,null):r().createElement(l.vwO,null,t("bedShare","Bed share")),r().createElement("div",{className:u}))},m=({patientCards:e,isLoadingDivider:t,bed:n})=>{let a=e.flatMap((e,n)=>0===n?[e]:[r().createElement(c,{key:`divider-${n}`,isLoading:t}),e]);return r().createElement("div",{id:`bed-${n.bedNumber}`,className:i.A.occupiedBed},a)},p=e=>{let{bed:t,patientCards:n}=e;return n?.length>0?r().createElement(m,e):r().createElement(o,{bed:t})}},3724(e,t,n){n.d(t,{A:()=>o});var a=n(2895),r=n(7125),i=n(4498),s=n.n(i);let d=`custom:${[["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["admissionDecisionConcept","ref"],["denyAdmissionConcept","ref"]].map(e=>e.join(":")).join(",")}`;function o(){let e=s()(`${a.restBaseUrl}/emrapi/configuration?v=${d}`,a.openmrsFetch);return(0,r.useMemo)(()=>({emrConfiguration:e.data?.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}),[e])}},160(e,t,n){n.d(t,{k:()=>r});var a=n(2895);function r(e){let t=e?.length>0,n=new URLSearchParams;for(let t of(n.append("v","custom:(visit,patient:(uuid,identifiers:(uuid,display,identifier,identifierType),voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),encounterAssigningToCurrentInpatientLocation:(encounterDatetime),currentInpatientRequest:(dispositionLocation,dispositionType,disposition:(uuid,display),dispositionEncounter:(uuid,display),dispositionObsGroup:(uuid,display),visit:(uuid),patient:(uuid)),firstAdmissionOrTransferEncounter:(encounterDatetime),currentInpatientLocation,)"),e??[]))n.append("patients",t);return(0,a.useOpenmrsFetchAll)(t?`${a.restBaseUrl}/emrapi/inpatient/admission?${n.toString()}`:null)}},3102(e,t,n){n.d(t,{e:()=>r});var a=n(2895);function r(e,t=!0,n="default"){let i=new URLSearchParams({...e,v:n}),s=`${a.restBaseUrl}/obs?${i}`;return(0,a.useOpenmrsFetchAll)(t?s:null)}},9656(e,t,n){n.d(t,{A:()=>d});var a=n(2895),r=n(2745),i=n(4498),s=n.n(i);function d(){let{locationUuid:e}=(0,r.useParams)(),{sessionLocation:t}=(0,a.useSession)(),{data:n,isLoading:i,error:d}=function(e,t="custom:(display,uuid)"){return s()(e?`${a.restBaseUrl}/location/${e}?v=${t}`:null,a.openmrsFetch)}(e||null),o=e&&d;return{location:e?n?.data:t,isLoadingLocation:i,errorFetchingLocation:d,invalidLocation:o}}},2488(e,t,n){n.d(t,{u:()=>u});var a=n(7125),r=n(9900),i=n(2895),s=n(8909),d=n.n(s),o=n(9656),l=n(160);function u(){let e=function(e="custom:(ward,totalBeds,occupiedBeds,bedLayouts:(rowNumber,columnNumber,bedNumber,bedId,bedUuid,status,location,patients:(person:full,identifiers,uuid)))"){let{location:t}=(0,o.A)(),n=(0,i.useFeatureFlag)("bedmanagement-module"),a=t?.uuid?`${i.restBaseUrl}/admissionLocation/${t?.uuid}?v=${e}`:null,{data:r,...s}=d()(n?a:null,i.openmrsFetch);return{admissionLocation:r?.data,...s}}(),t=function(){let{location:e}=(0,o.A)();return(0,i.useOpenmrsFetchAll)(e?`${i.restBaseUrl}/emrapi/inpatient/admission?currentInpatientLocation=${e.uuid}&v=custom:(visit,patient:(uuid,identifiers:(uuid,display,identifier,identifierType),voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),encounterAssigningToCurrentInpatientLocation:(encounterDatetime),currentInpatientRequest:(dispositionLocation,dispositionType,disposition:(uuid,display),dispositionEncounter:(uuid,display),dispositionObsGroup:(uuid,display),visit:(uuid),patient:(uuid)),firstAdmissionOrTransferEncounter:(encounterDatetime),currentInpatientLocation,)`:null)}(),n=function(e=["ADMIT","TRANSFER"],t="custom:(dispositionLocation,dispositionType,disposition,dispositionEncounter:full,patient:(uuid,identifiers,voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),dispositionObsGroup,visit)"){let{location:n}=(0,o.A)(),a=new URLSearchParams;a.set("dispositionType",e.join(",")),a.set("dispositionLocation",n?.uuid),a.set("v",t);let{data:r,...s}=(0,i.useOpenmrsFetchAll)(n?.uuid?`${i.restBaseUrl}/emrapi/inpatient/request?${a.toString()}`:null);return{inpatientRequests:r,...s}}(),{location:s}=(0,o.A)(),{data:u}=t,{admissionLocation:c}=e,{inpatientRequests:m}=n,p=(0,a.useMemo)(()=>{if(!c||!u||!m)return null;{let e=new Set;for(let t of c.bedLayouts)for(let n of t.patients)e.add(n.uuid);for(let t of m)e.add(t.patient.uuid);for(let t of u)e.delete(t.patient.uuid);return e}},[c,u,m]),_=(0,l.k)(p?Array.from(p):null),{data:f}=_;return{...(0,a.useMemo)(()=>({...(0,r.U1)(u,c,m,f,s)}),[c,u,m,f,s]),admissionLocationResponse:e,inpatientAdmissionResponse:t,inpatientRequestResponse:n,isLoading:e.isLoading||t.isLoading||n.isLoading||_.isLoading,async mutate(){await Promise.all([e?.mutate?.(),t?.mutate?.(),n?.mutate?.(),_?.mutate?.()])}}}},5084(e,t,n){n.d(t,{d:()=>r});var a,r=((a={}).PATIENTS="patients",a.FREE_BEDS="freeBeds",a.TOTAL_BEDS="totalBeds",a.PENDING_OUT="pendingOut",a.FEMALES_OF_REPRODUCTIVE_AGE="femalesOfReproductiveAge",a.NEWBORNS="newborns",a)},103(e,t,n){n.d(t,{A:()=>o});var a=n(7125),r=n.n(a),i=n(9900),s=n(3743),d=n(3356);let o=({id:e,wardPatient:t})=>{let{patient:n,visit:a,inpatientAdmission:o}=t,{conceptUuid:l}=(0,i.UG)("admissionRequestNote",e)??{};return null!=o?null:r().createElement("div",{className:d.A.wardPatientCardRow},r().createElement(s.A,{id:e,configOverride:{conceptUuid:l,limit:0,id:"admission-note",onlyWithinCurrentVisit:!0,orderBy:"ascending",label:"Admission Note"},patient:n,visit:a}))}},6213(e,t,n){n.d(t,{A:()=>o});var a=n(7125),r=n.n(a),i=n(9656),s=n(7768),d=n(5921);let o=({wardPatient:e})=>{let{location:t}=(0,i.A)(),{t:n}=(0,d.useTranslation)(),{visit:a,inpatientAdmission:o}=e;return a?o?o.currentInpatientLocation.uuid!==t?.uuid?r().createElement(s.jeF,{hideCloseButton:!0,kind:"warning",lowContrast:!0,title:n("admittedTo","Admitted to {{locationName}}",{locationName:o.currentInpatientLocation.display})}):null:r().createElement(s.jeF,{hideCloseButton:!0,kind:"warning",lowContrast:!0,title:n("noAdmission","No admission found")}):r().createElement(s.jeF,{hideCloseButton:!0,kind:"warning",lowContrast:!0,title:n("noActiveVisit","No active visit")})}},5001(e,t,n){n.d(t,{A:()=>g});var a=n(7125),r=n.n(a),i=n(3760),s=n(9900),d=n(529),o=n(3356),l=n(5921),u=n(2895),c=n(8909),m=n.n(c);let p=({wardPatient:e,orderUuid:t,label:n,onOrderCount:i})=>{let{t:s}=(0,l.useTranslation)(),{count:c,isLoading:p}=function(e,t,n){let a=e&&t&&n?`${u.restBaseUrl}/order?includeNullFulfillerStatus=true&patient=${e}&orderTypes=${t}&activatedOnOrAfterDate=${n}&excludeCanceledAndExpired=true&excludeDiscontinueOrders=true`:null,{data:r,...i}=m()(a,u.openmrsFetch);return{orders:r?.data.results,count:r?.data.results.length,...i}}(e?.patient?.uuid,t,e?.visit?.startDatetime.split("T")[0]);if((0,a.useEffect)(()=>{p||i(c)},[c,p,i]),p||!c||0===c)return null;let _=n?s(n):s("Orders","Orders");return r().createElement("div",{className:o.A.wardPatientCardDispositionTypeContainer},r().createElement(d.u$,{className:o.A.chemistryReferenceIcon,size:"24"}),c," ",_)};var _=n(7768),f=n(8537);let w=({wardPatient:e})=>{let{t}=(0,l.useTranslation)(),{dispositionType:n,dispositionLocation:i}=e?.inpatientRequest,s=(0,a.useMemo)(()=>"TRANSFER"===n?i?t("transferToDispositionLocation","Transfer to {{location}}",{location:i.name}):t("pendingTransfer","Pending Transfer"):"DISCHARGE"===n?t("pendingDischarge","Pending Discharge"):"",[n,i,t]);return"TRANSFER"!==n&&"DISCHARGE"!==n?null:r().createElement("div",{className:o.A.wardPatientCardDispositionTypeContainer},r().createElement(f.yG,{className:o.A.movementIcon,size:24}),s,r().createElement(_.K0,{label:t("cancel","Cancel"),kind:"secondary",className:o.A.cancelTransferRequestButton,size:"sm",onClick:()=>{(0,u.launchWorkspace2)("ward-patient-cancel-admission-request-workspace",{},{},{wardPatient:e})}},r().createElement(u.CloseOutlineIcon,null)))},g=({id:e,wardPatient:t})=>{let{orders:n,showPendingItems:d}=(0,s.UG)("pendingItems",e)||{},[l,u]=(0,a.useState)(!1),c=!!t?.inpatientRequest||l,m=(0,a.useCallback)(e=>{e>0&&u(!0)},[]);return(0,a.useEffect)(()=>{n?.orderTypes?.length||u(!1)},[n]),r().createElement("div",{className:o.A.wardPatientCardPendingItemsRow},d&&c?r().createElement(r().Fragment,null,r().createElement(i.Dx,{className:o.A.hourGlassIcon,size:"16"}),":"):null,n?.orderTypes.map(({uuid:e,label:n})=>r().createElement(p,{key:`pending-order-type-${e}`,wardPatient:t,orderUuid:e,label:n,onOrderCount:m})),t?.inpatientRequest?r().createElement(w,{wardPatient:t}):null)}},2332(e,t,n){n.d(t,{A:()=>s});var a=n(2895),r=n(7125),i=n.n(r);let s=({patient:e})=>e.person?.birthdate?i().createElement("div",null,(0,a.age)(e.person.birthdate)):null},5174(e,t,n){n.d(t,{A:()=>s});var a=n(7125),r=n.n(a),i=n(3356);let s=({bed:e})=>e?r().createElement("div",{className:i.A.bedNumberBox},r().createElement("span",{className:i.A.wardPatientBedNumber},e.bedNumber)):r().createElement(r().Fragment,null)},5e3(e,t,n){n.d(t,{A:()=>s});var a=n(7125),r=n.n(a),i=n(5921);let s=({patient:e})=>{let{t}=(0,i.useTranslation)();return r().createElement("div",null,((e,t)=>{switch(t){case"M":return e("male","Male");case"F":return e("female","Female");case"O":return e("other","Other");case"unknown":return e("unknown","Unknown");default:return t}})(t,e?.person?.gender))}},8768(e,t,n){n.d(t,{A:()=>d});var a=n(7125),r=n.n(a),i=n(2895),s=n(9900);let d=({id:e,patient:t})=>{let n=(0,s.UG)("patientIdentifier",e),a=t.identifiers.map(e=>({value:e.identifier,type:{text:e.identifierType.name,coding:[{code:e.identifierType.uuid}]}}));return r().createElement("div",{className:"-esm-ward__ward-patient-identifier__wardPatientIdentifierWrapper___Cjt9t"},r().createElement(i.PatientBannerPatientIdentifiers,{identifiers:a,showIdentifierLabel:n?.showIdentifierLabel}))}},9474(e,t,n){n.d(t,{A:()=>s});var a=n(7125),r=n.n(a),i=n(3356);let s=({patient:e})=>r().createElement("div",{className:i.A.wardPatientName},e?.person?.preferredName?.display)},3743(e,t,n){n.d(t,{A:()=>m});var a=n(7125),r=n.n(a),i=n(3672),s=n(7768),d=n(5921),o=n(3102),l=n(9900),u=n(4267),c=n(3356);let m=({id:e,configOverride:t,patient:n,visit:a})=>{let m=(0,l.UG)("obs",e),{conceptUuid:p,onlyWithinCurrentVisit:_,orderBy:f,limit:w,label:g}=t??m??{},{data:E,isLoading:A}=(0,o.e)({patient:n.uuid,concept:p},null!=p,i.Fx),{t:y}=(0,d.useTranslation)();if(A)return r().createElement(s.rrI,null);{let e=E?.filter(e=>!_||e.encounter.visit?.uuid===a?.uuid)?.sort((e,t)=>("descending"===f?-1:1)*e.obsDatetime.localeCompare(t.obsDatetime))?.slice(0,0===w?Number.MAX_VALUE:w),t=null!=g?y(g):e?.[0]?.concept?.display,n=e?.map(e=>{let{value:t}=e,n=t?.display??String(t),a=(0,i.Fe)(e,y);return r().createElement(u.A,{key:e.uuid,tooltipContent:a},r().createElement("span",{title:a},n," "))});return n?.length>0?r().createElement("div",null,r().createElement("span",{className:c.A.wardPatientObsLabel},t?y("labelColon","{{label}}:",{label:t}):""),r().createElement("div",{className:c.A.dotSeparatedChildren},n)):null}}},3672(e,t,n){n.d(t,{Fe:()=>s,Fx:()=>r,uk:()=>i});var a=n(2895);let r="custom:(uuid,display,obsDatetime,value,concept:(uuid,display),encounter:(uuid,display,encounterType,encounterDatetime,visit:(uuid,display)))";function i(e=[]){let t=new Map;for(let n of e){let{color:e,appliedToConceptSets:a}=n;for(let n of a??[])t.has(n)||t.set(n,e)}let n=e.flatMap(e=>e.appliedToConceptSets),r=`${a.restBaseUrl}/concept?references=${n.join()}&v=custom:(uuid,setMembers:(uuid))`,{data:s}=(0,a.useOpenmrsFetchAll)(r),d=new Map;if(s)for(let e of s)for(let n of e.setMembers)d.has(n.uuid)||d.set(n.uuid,t.get(e.uuid));return d}function s(e,t){return t("encounterDisplay","{{encounterType}} {{encounterDate}}",{encounterType:e.encounter.encounterType.display,encounterDate:new Date(e.encounter.encounterDatetime).toLocaleDateString(),interpolation:{escapeValue:!1}})}},4267(e,t,n){n.d(t,{A:()=>o});var a=n(7768),r=n(2895),i=n(7125),s=n.n(i),d=n(3356);let o=({children:e,tooltipContent:t})=>{let n=(0,r.useLayoutType)();return(0,r.isDesktop)(n)?s().createElement(a.m_M,{description:t,className:d.A.responsiveTooltip},s().createElement("span",null,e)):s().createElement(a.Gff,{className:d.A.responsiveTooltip},s().createElement(a.yvu,null,e),s().createElement(a.pNg,null,t))}},9390(e,t,n){n.d(t,{A:()=>d});var a=n(7768),r=n(7125),i=n.n(r),s=n(3356);let d=()=>i().createElement(a.ryE,{className:s.A.skeletonText})},5965(e,t,n){n.d(t,{A:()=>u});var a=n(7125),r=n.n(a),i=n(3464),s=n.n(i),d=n(279),o=n.n(d),l=n(5921);s().extend(o());let u=({encounterAssigningToCurrentInpatientLocation:e})=>{let{t}=(0,l.useTranslation)();if(!e?.encounterDatetime)return null;let n=s().duration(s()().diff(e.encounterDatetime)),a=Math.floor(n.asDays()),i=n.hours(),d=n.minutes(),o=n.seconds(),u=[];return(a>0&&u.push(t("days",{count:a,defaultValue_one:"{{count}} day",defaultValue_other:"{{count}} days"})),i>0&&u.push(t("hours",{count:i,defaultValue_one:"{{count}} hour",defaultValue_other:"{{count}} hours"})),d>0&&u.push(t("minutes",{count:d,defaultValue_one:"{{count}} minute",defaultValue_other:"{{count}} minutes"})),o>0&&0===u.length&&u.push(t("seconds",{count:o,defaultValue_one:"{{count}} second",defaultValue_other:"{{count}} seconds"})),0===u.length)?null:r().createElement("div",null,t("timeOnWard","Time on this ward: {{timeOnWard}}",{timeOnWard:u.join(" ")}))}},7781(e,t,n){n.d(t,{A:()=>m});var a=n(7125),r=n.n(a),i=n(3464),s=n.n(i),d=n(279),o=n.n(d),l=n(5562),u=n.n(l),c=n(5921);s().extend(o()),s().extend(u());let m=({firstAdmissionOrTransferEncounter:e})=>{let{t}=(0,c.useTranslation)();if(!e)return null;let n=s()(e.encounterDatetime).fromNow();return r().createElement("div",null,t("timeSinceAdmission","Admitted: {{timeSinceAdmission}}",{timeSinceAdmission:n}))}},8080(e,t,n){n.d(t,{A:()=>d});var a=n(7125),r=n.n(a),i=n(2895),s=n(3356);let d=({children:e,wardPatient:t,relatedTransferPatients:n})=>{let{patient:a}=t;return r().createElement("div",{className:s.A.wardPatientCard},e,r().createElement("button",{className:s.A.wardPatientCardButton,onClick:()=>{(0,i.launchWorkspace2)("ward-patient-workspace",{},{},{wardPatient:t,relatedTransferPatients:n})}},(0,i.getPatientName)(a.person)))}},875(e,t,n){n.d(t,{A:()=>c});var a=n(2895),r=n(7125),i=n.n(r),s=n(5921),d=n(5084),o=n(9900),l=n(7768);let u=({metricName:e,metricValue:t,isLoading:n})=>i().createElement("div",{className:"-esm-ward__ward-metric__metric___b1Tcz"},i().createElement("span",{className:"-esm-ward__ward-metric__metricName___YEKn3"},e),n?i().createElement(l.PuA,{className:"-esm-ward__ward-metric__skeleton___qjeUd"}):i().createElement("span",{className:"-esm-ward__ward-metric__metricValue___c3LvS"},t)),c=({metrics:e=[d.d.PATIENTS,d.d.FREE_BEDS,d.d.TOTAL_BEDS,d.d.PENDING_OUT]})=>{let{t}=(0,s.useTranslation)(),n=(0,a.useFeatureFlag)("bedmanagement-module"),{wardPatientGroupDetails:l}=(0,a.useAppContext)("ward-view-context")??{},{admissionLocationResponse:c,inpatientAdmissionResponse:m,inpatientRequestResponse:p}=l||{},{isLoading:_,error:f}=c??{},w=c?.isLoading||m?.isLoading||p?.isLoading,g=(0,r.useMemo)(()=>l?(0,o.eD)(l):{},[l]);return l?(f&&(0,a.showNotification)({kind:"error",title:t("errorLoadingBedDetails","Error loading bed details"),description:f.message}),i().createElement("div",{className:"-esm-ward__ward-metrics__metricsContainer___65Spn"},e.includes(d.d.PATIENTS)&&i().createElement(u,{metricName:(0,o.Jk)("patients",t),metricValue:g.patients??"--",isLoading:!1,key:"patients"}),e.includes(d.d.FEMALES_OF_REPRODUCTIVE_AGE)&&g.femalesOfReproductiveAge&&"0"!==g.femalesOfReproductiveAge&&i().createElement(u,{metricName:(0,o.Jk)("femalesOfReproductiveAge",t),metricValue:g.femalesOfReproductiveAge??"--",isLoading:!!_||!!w,key:"femalesOfReproductiveAge"}),e.includes(d.d.NEWBORNS)&&g.newborns&&"0"!==g.newborns&&i().createElement(u,{metricName:(0,o.Jk)("newborns",t),metricValue:g.newborns??"--",isLoading:!!_||!!w,key:"newborns"}),n&&i().createElement(i().Fragment,null,e.includes(d.d.FREE_BEDS)&&i().createElement(u,{metricName:(0,o.Jk)("freeBeds",t),metricValue:g.freeBeds??"--",isLoading:!!_||!!w,key:"freeBeds"}),e.includes(d.d.TOTAL_BEDS)&&i().createElement(u,{metricName:(0,o.Jk)("totalBeds",t),metricValue:g.totalBeds??"--",isLoading:!!_||!!w,key:"totalBeds"}),e.includes(d.d.PENDING_OUT)&&i().createElement(u,{metricName:(0,o.Jk)("pendingOut",t),metricValue:f?"--":l?.wardPatientPendingCount?.toString()??"--",isLoading:!!w,key:"pendingOut"})))):i().createElement(i().Fragment,null)}},929(e,t,n){n.d(t,{A:()=>p});var a=n(7125),r=n.n(a),i=n(3373),s=n.n(i),d=n(5921),o=n(7768),l=n(8537),u=n(2895);let c=({wardPendingPatients:e})=>{let{wardPatientGroupDetails:t}=(0,u.useAppContext)("ward-view-context")??{},{inpatientRequests:n,isLoading:a,error:i}=t?.inpatientRequestResponse??{},{t:c}=(0,d.useTranslation)(),m=(0,u.useLayoutType)();return a||!n?null:i?(console.error(i),r().createElement(o.jeF,{kind:"error",title:c("errorLoadingPatientAdmissionRequests","Error loading patient admission requests")})):r().createElement("div",{className:s()("-esm-ward__admission-requests__admissionRequestsContainer___bXgB6",{"-esm-ward__admission-requests__blackBackground___xRDWm":n?.length,"-esm-ward__admission-requests__lightBlueBackground___z3E8l":!n?.length})},r().createElement(l.yG,{className:"-esm-ward__admission-requests__movementIcon___UkccD",size:"24"}),r().createElement("span",{className:"-esm-ward__admission-requests__content___E-1qx"},c("admissionRequestsCount","{{count}} admission request",{count:n.length})),r().createElement(o.$nd,{className:"-esm-ward__admission-requests__manageButton___PVRF+",onClick:()=>{(0,u.launchWorkspace2)("admission-requests-workspace",{wardPendingPatients:e},{startVisitWorkspaceName:"ward-app-start-visit-workspace"})},renderIcon:u.ArrowRightIcon,kind:"ghost",size:(0,u.isDesktop)(m)?"sm":"lg"},c("manage","Manage")))};var m=n(9656);let p=({wardPendingPatients:e,wardMetrics:t})=>{let{location:n}=(0,m.A)();return r().createElement("div",{className:"-esm-ward__ward-view-header__wardViewHeader___u4v+A"},r().createElement("h2",null,n?.display),t,r().createElement(c,{wardPendingPatients:e}))}},9900(e,t,n){n.d(t,{U1:()=>o,eD:()=>d,Jk:()=>l,yZ:()=>s,UG:()=>u,k9:()=>c});var a=n(2895),r=n(7125),i=n(5921);function s(e){return{id:e.bedId,uuid:e.bedUuid,bedNumber:e.bedNumber,bedType:e.bedType,row:e.rowNumber,column:e.columnNumber,status:e.status}}function d(e){let t=[...e.wardUnadmittedPatientsWithBed?.values(),...[...e.wardAdmittedPatientsWithBed?.values()].map(e=>e.patient),...e.wardUnassignedPatientsList?.map(e=>e.patient)],n=t?.length??0,a=t.filter(e=>null!=e.person.age&&e.person.age<1)?.length??0,r=t.filter(e=>"F"===e.person.gender).filter(e=>null!=e.person.age&&e.person.age>=10)?.length??0,i=e.bedLayouts?.length??0,s=e.bedLayouts?.filter(e=>e.patients?.length>0).length??0;return{patients:n.toString(),freeBeds:(i-s).toString(),totalBeds:i.toString(),newborns:a.toString(),femalesOfReproductiveAge:r.toString()}}function o(e,t,n,a,r){let i,s=function(e){let t=new Map;for(let n of e??[])n&&t.set(n.patient.uuid,n);return t}([...e??[],...a??[]]),d=new Map,o=new Map,l=t&&(i=new Intl.Collator([],{numeric:!0}),t.bedLayouts.filter(e=>e.bedId).sort((e,t)=>i.compare(e.bedNumber,t.bedNumber))),u=new Set,c=0;l?.map(e=>{let{patients:t}=e;t.map(e=>{let t=s.get(e.uuid);if(u.add(e.uuid),t?.currentInpatientLocation?.uuid===r.uuid){d.set(e.uuid,t);let n=t.currentInpatientRequest?.dispositionType;("TRANSFER"===n||"DISCHARGE"===n)&&c++}else o.set(e.uuid,e)})});let m=e?.filter(e=>(u.add(e.patient.uuid),!d.has(e.patient.uuid)&&!o.has(e.patient.uuid)))??[];for(let e of n??[])e&&u.add(e.patient.uuid);return{wardAdmittedPatientsWithBed:d,wardUnadmittedPatientsWithBed:o,wardPatientPendingCount:c,bedLayouts:l,wardUnassignedPatientsList:m,allWardPatientUuids:u,inpatientAdmissionsByPatientUuid:s}}function l(e,t){switch(e){case"patients":return t("patients","Patients");case"freeBeds":return t("freeBeds","Free beds");case"totalBeds":return t("totalBeds","Total beds");case"pendingOut":return t("pendingOut","Pending out");case"femalesOfReproductiveAge":return t("mothers","Mothers");case"newborns":return t("infants","Infants")}}function u(e,t){let n=(0,a.useConfig)(),{t:r}=(0,i.useTranslation)();try{return n?.patientCardElements?.[e]?.find(e=>e?.id===t)}catch(n){return(0,a.showNotification)({title:r("errorConfiguringPatientCard","Error configuring patient card"),kind:"error",critical:!0,description:r("errorConfiguringPatientCardMessage","Unable to find configuration for {{elementType}}, id: {{id}}",{elementType:e,id:t})}),null}}function c(e){let{wards:t}=(0,a.useConfig)(),n=(0,r.useMemo)(()=>t?.find(t=>null==t.appliedTo||t.appliedTo?.length===0||t.appliedTo.some(t=>t.location===e)),[t,e]);return n||(console.warn("No ward card configuration has `appliedTo` criteria that matches the current location. Using the default configuration."),{id:"default-ward"})}},6545(e,t,n){n.d(t,{A:()=>w});var a=n(7125),r=n.n(a),i=n(3373),s=n.n(i),d=n(7768),o=n(5921),l=n(2895),u=n(9656),c=n(9390),m=n(866);let p=()=>r().createElement("div",{className:`${m.A.emptyBed} ${m.A.skeleton}`},r().createElement(d.ryE,null),r().createElement(c.A,null));var _=n(7104);let f=()=>r().createElement(r().Fragment,null,Array(20).fill(0).map((e,t)=>r().createElement(p,{key:t}))),w=({wardBeds:e,wardUnassignedPatients:t})=>{let{location:n}=(0,u.A)(),{t:i}=(0,o.useTranslation)(),{wardPatientGroupDetails:c}=(0,l.useAppContext)("ward-view-context")??{},{bedLayouts:m,isLoading:p}=c??{},{error:w}=c?.admissionLocationResponse??{},{error:g,hasMore:E,loadMore:A}=c?.inpatientAdmissionResponse??{},y=(0,l.useFeatureFlag)("bedmanagement-module"),v=(0,a.useRef)(null);return((0,a.useEffect)(function(){let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&E&&!g&&!p&&A()})},{threshold:1});return v.current&&e.observe(v.current),()=>{v.current&&e.unobserve(v.current)}},[g,E,A,v,p]),c)?r().createElement("div",{className:s()(_.A.wardViewMain,_.A.verticalTiling)},p?r().createElement(f,null):r().createElement(r().Fragment,null,e,t),m?.length===0&&y&&r().createElement(d.jeF,{kind:"warning",lowContrast:!0,title:i("noBedsConfigured","No beds configured for this location")}),w&&r().createElement(d.jeF,{kind:"error",lowContrast:!0,title:i("errorLoadingWardLocation","Error loading ward location"),subtitle:w?.message??i("invalidWardLocation","Invalid ward location: {{location}}",{location:n.display})}),g&&r().createElement(d.jeF,{kind:"error",lowContrast:!0,title:i("errorLoadingPatients","Error loading admitted patients"),subtitle:g?.message}),r().createElement("div",{ref:v})):r().createElement(r().Fragment,null)}},201(e,t,n){n.d(t,{A:()=>u});var a=n(7125),r=n.n(a),i=n(7768),s=n(5921),d=n(2895),o=n(3836),l=n(6377);let u=({wardPatient:e,relatedTransferPatients:t})=>{let{t:n}=(0,s.useTranslation)(),a="tablet"===(0,d.useLayoutType)()?"lg":"md",{closeWorkspace:u,launchChildWorkspace:c}=(0,d.useWorkspace2Context)(),m="TRANSFER"===e.inpatientRequest.dispositionType;return r().createElement("div",{className:l.A.admissionRequestActionBar},r().createElement(i.$nd,{kind:"ghost",size:a,onClick:()=>{c("transfer-elsewhere-workspace",{wardPatient:e,relatedTransferPatients:t})}},m?n("transferElsewhere","Transfer elsewhere"):n("admitElsewhere","Admit elsewhere")),r().createElement(i.$nd,{kind:"ghost",size:a,onClick:()=>{c("cancel-admission-request-workspace",{wardPatient:e,relatedTransferPatients:t})}},n("cancel","Cancel")),r().createElement(o.A,{wardPatient:e,relatedTransferPatients:t,dispositionType:e.inpatientRequest.dispositionType,onAdmitPatientSuccess:async()=>{await u({discardUnsavedChanges:!0}),(0,d.closeWorkspaceGroup2)()}}))}},3863(e,t,n){n.d(t,{A:()=>p});var a=n(7125),r=n.n(a),i=n(2895),s=n(3373),d=n.n(s),o=n(2332),l=n(5e3),u=n(8768),c=n(9474),m=n(6377);let p=({wardPatient:e})=>{let{inpatientRequest:t}=e,{dispositionEncounter:n}=t,{patient:a}=e;return r().createElement("div",{className:m.A.admissionRequestCardHeaderContainer},r().createElement("div",{className:m.A.admissionRequestCardHeader},r().createElement(c.A,{patient:a}),r().createElement(u.A,{id:"patient-identifier",patient:a}),r().createElement(l.A,{patient:a}),r().createElement(o.A,{patient:a})),r().createElement("div",{className:d()(m.A.admissionRequestCardHeader,m.A.admissionEncounterDetails)},r().createElement("div",null,(0,i.formatDatetime)(new Date(n?.encounterDatetime),{locale:(0,i.getLocale)(),mode:"standard"})),r().createElement("div",null,n?.encounterProviders?.map(e=>e?.provider?.display).join(",")),r().createElement("div",null,n?.location?.display)))}},3836(e,t,n){n.d(t,{A:()=>u});var a=n(7125),r=n.n(a),i=n(5921),s=n(7768),d=n(2895),o=n(9656),l=n(6794);let u=({wardPatient:e,relatedTransferPatients:t,onAdmitPatientSuccess:n,disabled:u,dispositionType:c,kind:m="ghost",size:p})=>{let{patient:_,visit:f,bed:w}=e??{},{t:g}=(0,i.useTranslation)(),{location:E}=(0,o.A)(),A="tablet"===(0,d.useLayoutType)()?"lg":"md",{wardPatientGroupDetails:y}=(0,d.useAppContext)("ward-view-context")??{},{admitPatient:v,isLoadingEmrConfiguration:T,errorFetchingEmrConfiguration:h}=(0,l.E)(),[b,N]=(0,a.useState)(!1),{launchChildWorkspace:C}=(0,d.useWorkspace2Context)(),P=(0,d.useFeatureFlag)("bedmanagement-module"),R=async()=>{if(P&&!w)C("admit-patient-form-workspace",{wardPatient:e,relatedTransferPatients:t});else{N(!0);let a=[e,...t??[]],r=await Promise.allSettled(a.map(e=>v(e.patient,e.inpatientRequest?.dispositionType??c,e.visit.uuid)));await y?.mutate?.(),r.forEach((e,t)=>{let n=a[t],r=n.patient.person.preferredName.display,i=n.inpatientRequest?.dispositionType??c;if("fulfilled"===e.status)(0,d.showSnackbar)({kind:"success",title:"ADMIT"===i?g("patientAdmittedSuccessfully","Patient admitted successfully"):g("patientTransferredSuccessfully","Patient transferred successfully"),subtitle:"ADMIT"===i?g("patientAdmittedToLocation","{{patientName}} admitted successfully to {{location}}",{patientName:r,location:E?.display}):g("patientTransferredToLocation","{{patientName}} transferred successfully to {{location}}",{patientName:r,location:E?.display})});else{let t=e.reason,n=t?.responseBody?.error?.globalErrors?.[0]?.message??t?.message??g("unknownError","An unknown error occurred");(0,d.showSnackbar)({kind:"error",title:"ADMIT"===i?g("errorAdmittingPatient","Failed to admit {{patientName}}",{patientName:r}):g("errorTransferringPatient","Failed to transfer {{patientName}}",{patientName:r}),subtitle:n})}}),r.some(e=>"fulfilled"===e.status)&&n(),N(!1)}},k=T||h||u||b;return r().createElement(s.$nd,{kind:m,renderIcon:d.ArrowRightIcon,size:p??A,disabled:k,onClick:R},"ADMIT"===c||k?g("admitPatient","Admit patient"):g("transferPatient","Transfer patient"))}},6794(e,t,n){n.d(t,{E:()=>o,R_:()=>s,S6:()=>c,Tb:()=>u,ZJ:()=>d,tf:()=>l});var a=n(2895),r=n(3724),i=n(9656);function s(){let{location:e}=(0,i.A)(),{currentProvider:t}=(0,a.useSession)(),{emrConfiguration:n,isLoadingEmrConfiguration:s,errorFetchingEmrConfiguration:d}=(0,r.A)();return{createEncounter:(r,i,s,d=[])=>{let o={patient:r.uuid,encounterType:i,location:e?.uuid,encounterProviders:[{provider:t?.uuid,encounterRole:n?.clinicianEncounterRole?.uuid}],obs:d,visit:s};return(0,a.openmrsFetch)(`${a.restBaseUrl}/encounter`,{method:"POST",headers:{"content-type":"application/json"},body:o})},emrConfiguration:n,isLoadingEmrConfiguration:s,errorFetchingEmrConfiguration:d}}function d(e){return(0,a.openmrsFetch)(`${a.restBaseUrl}/encounter/${e}`,{method:"DELETE"})}function o(){let{createEncounter:e,emrConfiguration:t,isLoadingEmrConfiguration:n,errorFetchingEmrConfiguration:a}=s();return{admitPatient:(n,a,r)=>e(n,"ADMIT"===a?t.admissionEncounterType:"TRANSFER"===a?t.transferWithinHospitalEncounterType:null,r),isLoadingEmrConfiguration:n,errorFetchingEmrConfiguration:a}}function l(e,t,n){return(0,a.openmrsFetch)(`${a.restBaseUrl}/beds/${e}`,{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:t,encounterUuid:n}})}function u(e,t){return(0,a.openmrsFetch)(`${a.restBaseUrl}/beds/${e}?patientUuid=${t}`,{method:"DELETE"})}function c(e){return(0,a.openmrsFetch)(`${a.restBaseUrl}/beds?patientUuid=${e}`)}}}]);
package/dist/2152.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["2152"],{2470(e,t,a){a.r(t),a.d(t,{default:()=>_,infinite:()=>d,unstable_serialize:()=>c});var r=a(7125),l=a(4675),i=a(4079),n=a(2372),u=a(8139);let s=e=>(0,i.s)(e?e(0,null):null)[0],c=e=>"$inf$"+s(e),o=Promise.resolve(),d=e=>(t,a,l)=>{let n,c=(0,r.useRef)(!1),{cache:d,initialSize:_=1,revalidateAll:f=!1,persistSize:p=!1,revalidateFirstPage:b=!0,revalidateOnMount:g=!1,parallel:m=!1}=l,[,,,h]=i.a.get(i.o);try{(n=s(t))&&(n="$inf$"+n)}catch(e){}let[k,w,y]=(0,i.c)(d,n),v=(0,r.useCallback)(()=>(0,i.i)(k()._l)?_:k()._l,[d,n,_]);(0,u.useSyncExternalStore)((0,r.useCallback)(e=>n?y(n,()=>{e()}):()=>{},[d,n]),v,v);let C=(0,r.useCallback)(()=>{let e=k()._l;return(0,i.i)(e)?_:e},[n,_]),$=(0,r.useRef)(C());(0,i.u)(()=>{if(!c.current){c.current=!0;return}n&&w({_l:p?$.current:C()})},[n,d]);let U=g&&!c.current,z=e(n,async e=>{let r=k()._i,n=k()._r,u=i.a.get(d),s=u[8],c=()=>u[8]!==s;w({_r:i.U});let o=[],_=C(),[p]=(0,i.c)(d,e),g=p().data,y=[],v=null;for(let e=0;e<_;++e){let[u,s]=(0,i.s)(t(e,m?null:v));if(!u)break;let[_,p]=(0,i.c)(d,u),k=_().data,w=f||r||(0,i.i)(k)||b&&!e&&!(0,i.i)(g)||U||g&&!(0,i.i)(g[e])&&!l.compare(g[e],k);if(a&&("function"==typeof n?n(k,s):w)){let t=async()=>{if(u in h){let e=h[u];delete h[u],k=await e}else k=await a(s);c()||p({data:k,_k:s}),o[e]=k};m?y.push(t):await t()}else o[e]=k;m||(v=k)}return m&&await Promise.all(y.map(e=>e())),c()||w({_i:i.U}),o},l),L=(0,r.useCallback)(function(e,t){let a="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==a.revalidate;return n?(r&&((0,i.i)(e)?w({_i:!0,_r:a.revalidate}):w({_i:!1,_r:a.revalidate})),arguments.length?z.mutate(e,{...a,revalidate:r}):z.mutate()):o},[n,d]),P=(0,r.useCallback)(e=>{let a;if(!n)return o;let[,r]=(0,i.c)(d,n);if((0,i.e)(e)?a=e(C()):"number"==typeof e&&(a=e),"number"!=typeof a)return o;r({_l:a}),$.current=a;let l=[],[u]=(0,i.c)(d,n),s=null;for(let e=0;e<a;++e){let[a]=(0,i.s)(t(e,s)),[r]=(0,i.c)(d,a),n=a?r().data:i.U;if((0,i.i)(n))return L(u().data);l.push(n),s=n}return L(l)},[n,d,L,C]);return{size:C(),setSize:P,mutate:L,get data(){return z.data},get error(){return z.error},get isValidating(){return z.isValidating},get isLoading(){return z.isLoading}}},_=(0,n.withMiddleware)(l.u,d)}}]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2152.js","sources":["webpack://@openmrs/esm-ward-app/../../node_modules/swr/dist/infinite/index.mjs"],"names":["Promise","p","e","i","u","arguments"],"mappings":"qQAOA,IAAM,EAAkB,AAAC,GACd,QAAU,EAAS,EAAO,EAAG,MAAQ,KAAK,CAAC,EAAE,CAElD,EAAqB,AAAC,GACjB,QAAkB,EAAgB,GAKvC,EAAgBA,QAAQ,OAAO,GAC/B,EAAW,AAAC,GAAa,CAAC,EAAQ,EAAI,KACpC,IAKI,EALE,EAAc,aAAO,IACrB,CAAE,MAAO,CAAO,CAAE,cAAc,CAAC,CAAE,gBAAgB,EAAK,CAAEC,YAAAA,EAAc,EAAK,CAAE,sBAAsB,EAAI,CAAE,oBAAoB,EAAK,CAAE,WAAW,EAAK,CAAE,CAAG,EAC3J,IAAO,EAAQ,CAAG,OAAkB,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U,MAAM,CAAG,EAAI,MAAM,CAAC,EAAM,CACvC,GAAG,CAAO,CACV,WAAY,CAChB,GAAK,EAAI,MAAM,IAnBU,CAoB7B,EAEA,CACI,EACA,EACH,EAEK,EAAU,kBAAY,AAAC,QAIrB,EAFJ,GAAI,CAAC,EAAa,OAAO,EACzB,GAAM,EAAG,EAAW,CAAG,QAAkB,EAAS,GAOlD,GALI,GAAAF,EAAA,GAAW,GACX,EAAO,EAAI,KACJ,AAAc,UAAd,OAAO,GACd,GAAO,CAAE,EAET,AAAe,UAAf,OAAO,EAAkB,OAAO,EACpC,EAAW,CACP,GAAI,CACR,GACA,EAAgB,OAAO,CAAG,EAE1B,IAAM,EAAO,EAAE,CACT,CAAC,EAAiB,CAAG,QAAkB,EAAS,GAClD,EAAmB,KACvB,IAAI,IAAI,EAAI,EAAG,EAAI,EAAM,EAAE,EAAE,CACzB,GAAM,CAAC,EAAQ,CAAG,QAAU,EAAO,EAAG,IAChC,CAAC,EAAS,CAAG,QAAkB,EAAS,GAExC,EAAW,EAAU,IAAW,IAAI,CAAG,GAAS,CAEtD,GAAI,GAAAA,EAAA,GAAY,GACZ,OAAO,EAAO,IAAmB,IAAI,EAEzC,EAAK,IAAI,CAAC,GACV,EAAmB,CACvB,CACA,OAAO,EAAO,EAClB,EAEA,CACI,EACA,EACA,EACA,EACH,EAGD,MAAO,CACH,KAAM,IACN,UACA,SACA,IAAI,MAAQ,CACR,OAAO,EAAI,IAAI,AACnB,EACA,IAAI,OAAS,CACT,OAAO,EAAI,KAAK,AACpB,EACA,IAAI,cAAgB,CAChB,OAAO,EAAI,YAAY,AAC3B,EACA,IAAI,WAAa,CACb,OAAO,EAAI,SAAS,AACxB,CACJ,CACJ,EACE,EAAiB,qBAAe,GAAM,CAAE,E"}
package/dist/3560.js CHANGED
@@ -1 +1 @@
1
- (globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["3560"],{4767(e,t,i){var n={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["7519","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["4087","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","3378"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["4335","5940"],"./hi.json":["6840","2881"]};function s(e){if(!i.o(n,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=n[e],s=t[0];return i.e(t[1]).then(function(){return i(s)})}s.keys=()=>Object.keys(n),s.id=4767,e.exports=s},5132(e,t,i){"use strict";i.d(t,{A:()=>n});let n="@openmrs/esm-ward-app"},7227(e,t,i){"use strict";i.r(t),i.d(t,{patientTransferAndSwapWorkspaceSiderailIcon:()=>I,root:()=>f,wardDashboardLink:()=>u,wardPatientCancelAdmissionRequestWorkspace:()=>w,wardPatientNotesActionButton:()=>T,maternalWardView:()=>q,clinicalFormWorkspaceSideRailIcon:()=>S,patientDischargeWorkspace:()=>j,wardPatientWorkspaceBanner:()=>O,admitPatientFormWorkspace:()=>_,startupApp:()=>N,wardPatientNotesWorkspace:()=>A,patientTransferAndSwapWorkspace:()=>v,wardPatientWorkspace:()=>g,defaultWardView:()=>W,createAdmissionEncounterWorkspace:()=>U,orderBasketWorkspaceSideRailIcon:()=>C,importTranslation:()=>c,noteHistoryModal:()=>D,patientDischargeWorkspaceSideRailIcon:()=>P,patientTransferRequestWorkspace:()=>k,wardPatientActionButton:()=>b,wardView:()=>h,admissionRequestWorkspace:()=>m,deleteNoteModal:()=>R,cancelAdmissionRequestWorkspace:()=>L});var n=i(2895);let s={patientCardElements:{_description:"Configuration of various patient card elements. Each configured element must have a unique id, defined in the ward React component being used.",obs:{_type:n.Type.Array,_default:[],_description:"Configures obs values to display.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:n.Type.UUID,_description:"Identifies the concept to use to identify the desired observations."},label:{_type:n.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display. If not provided, defaults to the concept's name. (Note that this can be set to an empty string to not show a label)"},orderBy:{_type:n.Type.String,_default:"descending",_description:"One of 'ascending' or 'descending', specifying whether to display the obs by obsDatetime ascendingly or descendingly.",_validators:[n.validators.oneOf(["ascending","descending"])]},limit:{_type:n.Type.Number,_default:1,_description:"If set to a number greater than one, this will show multiple obs for this concept, which will appear as a list. Set to 0 for unlimited."},onlyWithinCurrentVisit:{_type:n.Type.Boolean,_default:!1,_description:"Optional. If true, limits display to only observations within current visit. Defaults to false"}}},pendingItems:{_type:n.Type.Array,_default:[{id:"pending-items",orders:{orderTypes:[{label:"Labs",uuid:"52a447d3-a64a-11e3-9aeb-50e549534c5e"}]},showPendingItems:!0}],_description:"Configures pending orders and transfers to display.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},orders:{orderTypes:{_type:n.Type.Array,_description:"Configures pending orders and transfers to display.",_elements:{uuid:{_type:n.Type.UUID,_description:"Identifies the order type."},label:{_type:n.Type.String,_default:"",_description:"The label or i18n key to the translated label to display. If not provided, defaults to 'Orders'"}}}},showPendingItems:{_type:n.Type.Boolean,_description:"Optional. If true, pending items (e.g., number of pending orders) will be displayed on the patient card."}}},patientIdentifier:{_type:n.Type.Array,_default:[{id:"patient-identifier",showIdentifierLabel:!1}],_description:"Configures patient identifier to display. An unconfigured element displays the preferred identifier.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},showIdentifierLabel:{_type:n.Type.Boolean,_description:'If true, the identifier type (eg: "OpenMRS ID") is shown along with the identifier itself. Defaults to false'}}},patientAddress:{_type:n.Type.Array,_default:[{id:"patient-address",fields:["cityVillage","country"]}],_description:"Configures patient address elements.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},fields:{_type:n.Type.Array,_description:"The fields of the address to display",_elements:{_type:n.Type.String,_validators:[n.validators.oneOf(["cityVillage","stateProvince","country","postalCode","countyDistrict","latitude","longitude","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","address13","address14","address15"])]}}}},admissionRequestNote:{_type:n.Type.Array,_default:[{id:"admission-request-note",conceptUuid:"161011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}],_description:"Configures admission request notes to display.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:n.Type.UUID,_description:"Required. Identifies the concept for the admission request note."}}},coloredObsTags:{_type:n.Type.Array,_default:[],_description:"Configures observation values to display as Carbon tags.",_elements:{conceptUuid:{_type:n.Type.UUID,_default:"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",_description:"Required. Identifies the concept to use to identify the desired observations."},summaryLabel:{_type:n.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag shows the count of the number of answers that are present but not configured to show as their own tags. If not provided, defaults to the name of the concept."},summaryLabelI18nModule:{_type:n.Type.String,_default:"",_description:"Optional. The custom module to use for translation of the summary label"},summaryLabelColor:{_type:n.Type.String,_default:"",_description:"The color of the summary tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors"},tags:{_type:n.Type.Array,_default:[],_description:"An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets will be displayed as their own tags with the specified color. Any observation with coded values not belonging to any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times, the first matching applied-to rule takes precedence.",_elements:{color:{_type:n.Type.String,_description:"Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors."},appliedToConceptSets:{_type:n.Type.Array,_description:"The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets will be displayed as their own tag with the specified color. If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.",_elements:{_type:n.Type.UUID}}}}}}},wards:{_type:n.Type.Array,_default:[{id:"default-ward"}],_description:"Configuration of what type of ward to use at different ward locations.",_elements:{id:{_type:n.Type.String,_description:'The ward type to use. Currently, "default-ward" and "maternal-ward" are supported. This string also serves as the extension slot name for the ward view.'},appliedTo:{_type:n.Type.Array,_description:"Optional. Conditions under which this card definition should be used. If not provided, the configuration is applied to all wards.",_elements:{location:{_type:n.Type.UUID,_default:"",_description:"The UUID of the location. If not provided, applies to all wards."}}}}},hideWorkspaceVitalsLinks:{_type:n.Type.Boolean,_default:!1,_description:"Configure whether to hide vital history and record vital links in the ward patient workspace."},additionalInpatientNotesConceptUuids:{_type:n.Type.Array,_default:[],_description:"List of uuids of concepts that represent notes to display in the notes view in addition to the consultFreeTextCommentsConcept defined by EMR-API"}};var o=i(5132),a=i(7125),r=i.n(a),d=i(2745);let l={path:"ward",slot:"ward-dashboard-slot",title:"wards",basePath:`${window.spaBase}/home`},p={allowedSessionLocationUuids:{_type:n.Type.Array,_default:[],_description:"If not empty, the discharge button will only show for users whose session location is included in this list. If empty, the discharge button will show for all locations.",_elements:{_type:n.Type.String}}},c=i(4767),y={featureName:"ward",moduleName:o.A},f=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("8340")]).then(i.bind(i,1759)),y),u=(0,n.getSyncLifecycle)(()=>r().createElement(d.BrowserRouter,null,r().createElement(n.DashboardExtension,{path:l.path,title:l.title,basePath:l.basePath,icon:l.icon})),y),h=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("2101")]).then(i.bind(i,8804)),y),m=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("6418")]).then(i.bind(i,1465)),y),_=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("8424")]).then(i.bind(i,7195)),y),g=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("9080")]).then(i.bind(i,6811)),y),A=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("388")]).then(i.bind(i,2863)),y),b=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("1664")]).then(i.bind(i,9235)),y),w=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("8493")]).then(i.bind(i,7260)),y),T=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("7249")]).then(i.bind(i,2504)),y),v=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("833"),i.e("5296")]).then(i.bind(i,663)),y),j=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("9983")]).then(i.bind(i,1858)),y),I=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("502")]).then(i.bind(i,7653)),y),k=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("833"),i.e("1364")]).then(i.bind(i,3313)),y),P=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("9011"),i.e("7226"),i.e("9427")]).then(i.bind(i,4078)),y),L=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("6802")]).then(i.bind(i,3801)),y),S=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("5576"),i.e("7226"),i.e("6270")]).then(i.bind(i,4109)),y),C=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("582")]).then(i.bind(i,4789)),y),U=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("2997"),i.e("992")]).then(i.bind(i,787)),y),W=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("8417"),i.e("7226"),i.e("7884"),i.e("2997"),i.e("1780"),i.e("2008")]).then(i.bind(i,637)),{featureName:"default-ward-view",moduleName:o.A,swrConfig:{refreshInterval:6e4}}),q=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("8417"),i.e("7226"),i.e("7884"),i.e("2997"),i.e("1780"),i.e("412")]).then(i.bind(i,9801)),{featureName:"maternal-ward-view",moduleName:o.A,swrConfig:{refreshInterval:6e4}}),O=(0,n.getAsyncLifecycle)(()=>i.e("6703").then(i.bind(i,1378)),y),R=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("2495")]).then(i.bind(i,8866)),y),D=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("2162")]).then(i.bind(i,1193)),y);function N(){(0,n.registerBreadcrumbs)([]),(0,n.defineConfigSchema)(o.A,s),(0,n.defineExtensionConfigSchema)("ward-patient-discharge",p),(0,n.registerFeatureFlag)("bedmanagement-module","Bed management module","Enables features related to bed management / assignment. Requires the backend bed management module to be installed.")}}}]);
1
+ (globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["3560"],{4767(e,t,i){var n={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["7519","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["4087","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","3378"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["4335","5940"],"./hi.json":["6840","2881"]};function s(e){if(!i.o(n,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=n[e],s=t[0];return i.e(t[1]).then(function(){return i(s)})}s.keys=()=>Object.keys(n),s.id=4767,e.exports=s},5132(e,t,i){"use strict";i.d(t,{A:()=>n});let n="@openmrs/esm-ward-app"},7227(e,t,i){"use strict";i.r(t),i.d(t,{patientTransferAndSwapWorkspaceSiderailIcon:()=>I,root:()=>f,wardDashboardLink:()=>u,wardPatientCancelAdmissionRequestWorkspace:()=>w,wardPatientNotesActionButton:()=>T,maternalWardView:()=>q,clinicalFormWorkspaceSideRailIcon:()=>S,patientDischargeWorkspace:()=>j,wardPatientWorkspaceBanner:()=>O,admitPatientFormWorkspace:()=>_,startupApp:()=>N,wardPatientNotesWorkspace:()=>A,patientTransferAndSwapWorkspace:()=>v,wardPatientWorkspace:()=>g,defaultWardView:()=>W,createAdmissionEncounterWorkspace:()=>U,orderBasketWorkspaceSideRailIcon:()=>C,importTranslation:()=>c,noteHistoryModal:()=>D,patientDischargeWorkspaceSideRailIcon:()=>P,patientTransferRequestWorkspace:()=>k,wardPatientActionButton:()=>b,wardView:()=>h,admissionRequestWorkspace:()=>m,deleteNoteModal:()=>R,cancelAdmissionRequestWorkspace:()=>L});var n=i(2895);let s={patientCardElements:{_description:"Configuration of various patient card elements. Each configured element must have a unique id, defined in the ward React component being used.",obs:{_type:n.Type.Array,_default:[],_description:"Configures obs values to display.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:n.Type.UUID,_description:"Identifies the concept to use to identify the desired observations."},label:{_type:n.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display. If not provided, defaults to the concept's name. (Note that this can be set to an empty string to not show a label)"},orderBy:{_type:n.Type.String,_default:"descending",_description:"One of 'ascending' or 'descending', specifying whether to display the obs by obsDatetime ascendingly or descendingly.",_validators:[n.validators.oneOf(["ascending","descending"])]},limit:{_type:n.Type.Number,_default:1,_description:"If set to a number greater than one, this will show multiple obs for this concept, which will appear as a list. Set to 0 for unlimited."},onlyWithinCurrentVisit:{_type:n.Type.Boolean,_default:!1,_description:"Optional. If true, limits display to only observations within current visit. Defaults to false"}}},pendingItems:{_type:n.Type.Array,_default:[{id:"pending-items",orders:{orderTypes:[{label:"Labs",uuid:"52a447d3-a64a-11e3-9aeb-50e549534c5e"}]},showPendingItems:!0}],_description:"Configures pending orders and transfers to display.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},orders:{orderTypes:{_type:n.Type.Array,_description:"Configures pending orders and transfers to display.",_elements:{uuid:{_type:n.Type.UUID,_description:"Identifies the order type."},label:{_type:n.Type.String,_default:"",_description:"The label or i18n key to the translated label to display. If not provided, defaults to 'Orders'"}}}},showPendingItems:{_type:n.Type.Boolean,_description:"Optional. If true, pending items (e.g., number of pending orders) will be displayed on the patient card."}}},patientIdentifier:{_type:n.Type.Array,_default:[{id:"patient-identifier",showIdentifierLabel:!1}],_description:"Configures patient identifier to display. An unconfigured element displays the preferred identifier.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},showIdentifierLabel:{_type:n.Type.Boolean,_description:'If true, the identifier type (eg: "OpenMRS ID") is shown along with the identifier itself. Defaults to false'}}},patientAddress:{_type:n.Type.Array,_default:[{id:"patient-address",fields:["cityVillage","country"]}],_description:"Configures patient address elements.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},fields:{_type:n.Type.Array,_description:"The fields of the address to display",_elements:{_type:n.Type.String,_validators:[n.validators.oneOf(["cityVillage","stateProvince","country","postalCode","countyDistrict","latitude","longitude","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","address13","address14","address15"])]}}}},admissionRequestNote:{_type:n.Type.Array,_default:[{id:"admission-request-note",conceptUuid:"161011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}],_description:"Configures admission request notes to display.",_elements:{id:{_type:n.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:n.Type.UUID,_description:"Required. Identifies the concept for the admission request note."}}},coloredObsTags:{_type:n.Type.Array,_default:[],_description:"Configures observation values to display as Carbon tags.",_elements:{conceptUuid:{_type:n.Type.UUID,_default:"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",_description:"Required. Identifies the concept to use to identify the desired observations."},summaryLabel:{_type:n.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag shows the count of the number of answers that are present but not configured to show as their own tags. If not provided, defaults to the name of the concept."},summaryLabelI18nModule:{_type:n.Type.String,_default:"",_description:"Optional. The custom module to use for translation of the summary label"},summaryLabelColor:{_type:n.Type.String,_default:"",_description:"The color of the summary tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors"},tags:{_type:n.Type.Array,_default:[],_description:"An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets will be displayed as their own tags with the specified color. Any observation with coded values not belonging to any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times, the first matching applied-to rule takes precedence.",_elements:{color:{_type:n.Type.String,_description:"Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors."},appliedToConceptSets:{_type:n.Type.Array,_description:"The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets will be displayed as their own tag with the specified color. If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.",_elements:{_type:n.Type.UUID}}}}}}},wards:{_type:n.Type.Array,_default:[{id:"default-ward"}],_description:"Configuration of what type of ward to use at different ward locations.",_elements:{id:{_type:n.Type.String,_description:'The ward type to use. Currently, "default-ward" and "maternal-ward" are supported. This string also serves as the extension slot name for the ward view.'},appliedTo:{_type:n.Type.Array,_description:"Optional. Conditions under which this card definition should be used. If not provided, the configuration is applied to all wards.",_elements:{location:{_type:n.Type.UUID,_default:"",_description:"The UUID of the location. If not provided, applies to all wards."}}}}},hideWorkspaceVitalsLinks:{_type:n.Type.Boolean,_default:!1,_description:"Configure whether to hide vital history and record vital links in the ward patient workspace."},additionalInpatientNotesConceptUuids:{_type:n.Type.Array,_default:[],_description:"List of uuids of concepts that represent notes to display in the notes view in addition to the consultFreeTextCommentsConcept defined by EMR-API"}};var o=i(5132),a=i(7125),r=i.n(a),d=i(2745);let l={path:"ward",slot:"ward-dashboard-slot",title:"wards",basePath:`${window.spaBase}/home`},p={allowedSessionLocationUuids:{_type:n.Type.Array,_default:[],_description:"If not empty, the discharge button will only show for users whose session location is included in this list. If empty, the discharge button will show for all locations.",_elements:{_type:n.Type.String}}},c=i(4767),y={featureName:"ward",moduleName:o.A},f=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("8340")]).then(i.bind(i,1759)),y),u=(0,n.getSyncLifecycle)(()=>r().createElement(d.BrowserRouter,null,r().createElement(n.DashboardExtension,{path:l.path,title:l.title,basePath:l.basePath,icon:l.icon})),y),h=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("2101")]).then(i.bind(i,8804)),y),m=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("6418")]).then(i.bind(i,1465)),y),_=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("8424")]).then(i.bind(i,7195)),y),g=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("9080")]).then(i.bind(i,6811)),y),A=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("388")]).then(i.bind(i,2863)),y),b=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("1664")]).then(i.bind(i,9235)),y),w=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("8493")]).then(i.bind(i,7260)),y),T=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("7249")]).then(i.bind(i,2504)),y),v=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("833"),i.e("5296")]).then(i.bind(i,663)),y),j=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("9983")]).then(i.bind(i,1858)),y),I=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("502")]).then(i.bind(i,7653)),y),k=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("833"),i.e("1364")]).then(i.bind(i,3313)),y),P=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("9011"),i.e("7226"),i.e("9427")]).then(i.bind(i,4078)),y),L=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("3598"),i.e("7226"),i.e("7884"),i.e("6802")]).then(i.bind(i,3801)),y),S=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("5576"),i.e("7226"),i.e("6270")]).then(i.bind(i,4109)),y),C=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("7226"),i.e("582")]).then(i.bind(i,4789)),y),U=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("2126"),i.e("992")]).then(i.bind(i,787)),y),W=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("8417"),i.e("7226"),i.e("7884"),i.e("2126"),i.e("1780"),i.e("2008")]).then(i.bind(i,637)),{featureName:"default-ward-view",moduleName:o.A,swrConfig:{refreshInterval:6e4}}),q=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("8417"),i.e("7226"),i.e("7884"),i.e("2126"),i.e("1780"),i.e("412")]).then(i.bind(i,9801)),{featureName:"maternal-ward-view",moduleName:o.A,swrConfig:{refreshInterval:6e4}}),O=(0,n.getAsyncLifecycle)(()=>i.e("6703").then(i.bind(i,1378)),y),R=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("7884"),i.e("2495")]).then(i.bind(i,8866)),y),D=(0,n.getAsyncLifecycle)(()=>Promise.all([i.e("689"),i.e("9011"),i.e("6673"),i.e("7226"),i.e("2162")]).then(i.bind(i,1193)),y);function N(){(0,n.registerBreadcrumbs)([]),(0,n.defineConfigSchema)(o.A,s),(0,n.defineExtensionConfigSchema)("ward-patient-discharge",p),(0,n.registerFeatureFlag)("bedmanagement-module","Bed management module","Enables features related to bed management / assignment. Requires the backend bed management module to be installed.")}}}]);
package/dist/3989.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["3989"],{2372(e,t,n){n.r(t),n.d(t,{INFINITE_PREFIX:()=>B,IS_REACT_LEGACY:()=>k,IS_SERVER:()=>I,OBJECT:()=>l,SWRConfig:()=>H,SWRGlobalState:()=>_,UNDEFINED:()=>a,cache:()=>q,compare:()=>$,createCacheHelper:()=>b,defaultConfig:()=>j,defaultConfigOptions:()=>S,getTimestamp:()=>W,hasRequestAnimationFrame:()=>y,initCache:()=>U,internalMutate:()=>x,isDocumentDefined:()=>v,isFunction:()=>u,isPromiseLike:()=>f,isUndefined:()=>s,isWindowDefined:()=>g,mergeConfigs:()=>z,mergeObjects:()=>c,mutate:()=>J,noop:()=>o,normalize:()=>K,preload:()=>Z,preset:()=>O,rAF:()=>A,revalidateEvents:()=>M,serialize:()=>N,slowConnection:()=>F,stableHash:()=>E,subscribeCallback:()=>en,useIsomorphicLayoutEffect:()=>D,useSWRConfig:()=>Q,withArgs:()=>et,withMiddleware:()=>er});var r=n(7125),i=n.n(r);let o=()=>{},a=o(),l=Object,s=e=>e===a,u=e=>"function"==typeof e,c=(e,t)=>({...e,...t}),f=e=>u(e.then),d=new WeakMap,p=0,E=e=>{let t,n,r=typeof e,i=e&&e.constructor,o=i==Date;if(l(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=d.get(e))return t;if(t=++p+"~",d.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=E(e[n])+",";d.set(e,t)}if(i==l){t="#";let r=l.keys(e).sort();for(;!s(n=r.pop());)s(e[n])||(t+=n+":"+E(e[n])+",");d.set(e,t)}}return t},_=new WeakMap,h={},w={},m="undefined",g=typeof window!=m,v=typeof document!=m,y=()=>g&&typeof window.requestAnimationFrame!=m,b=(e,t)=>{let n=_.get(e);return[()=>!s(t)&&e.get(t)||h,r=>{if(!s(t)){let i=e.get(t);t in w||(w[t]=i),n[5](t,c(i,r),i||h)}},n[6],()=>!s(t)&&t in w?w[t]:!s(t)&&e.get(t)||h]},R=!0,[C,T]=g&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],O={isOnline:()=>R,isVisible:()=>{let e=v&&document.visibilityState;return s(e)||"hidden"!==e}},S={initFocus:e=>(v&&document.addEventListener("visibilitychange",e),C("focus",e),()=>{v&&document.removeEventListener("visibilitychange",e),T("focus",e)}),initReconnect:e=>{let t=()=>{R=!0,e()},n=()=>{R=!1};return C("online",t),C("offline",n),()=>{T("online",t),T("offline",n)}}},k=!i().useId,I=!g||"Deno"in window,A=e=>y()?window.requestAnimationFrame(e):setTimeout(e,1),D=I?r.useEffect:r.useLayoutEffect,L="u">typeof navigator&&navigator.connection,F=!I&&L&&(["slow-2g","2g"].includes(L.effectiveType)||L.saveData),N=e=>{if(u(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?E(e):"",t]},V=0,W=()=>++V;var M={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function x(...e){let[t,n,r,i]=e,o=c({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),l=o.populateCache,d=o.rollbackOnError,p=o.optimisticData,E=o.throwOnError;if(u(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(h))}return h(n);async function h(n){let i,[c]=N(n);if(!c)return;let[h,w]=b(t,c),[m,g,v,y]=_.get(t),R=()=>{let e=m[c];return(u(o.revalidate)?o.revalidate(h().data,n):!1!==o.revalidate)&&(delete v[c],delete y[c],e&&e[0])?e[0](2).then(()=>h().data):h().data};if(e.length<3)return R();let C=r,T=W();g[c]=[T,0];let O=!s(p),S=h(),k=S.data,I=S._c,A=s(I)?k:I;if(O&&w({data:p=u(p)?p(A,k):p,_c:A}),u(C))try{C=C(A)}catch(e){i=e}if(C&&f(C)){let e;if(C=await C.catch(e=>{i=e}),T!==g[c][0]){if(i)throw i;return C}i&&O&&(e=i,"function"==typeof d?d(e):!1!==d)&&(l=!0,w({data:A,_c:a}))}if(l&&!i&&(u(l)?w({data:l(C,A),error:a,_c:a}):w({data:C,error:a,_c:a})),g[c][1]=W(),Promise.resolve(R()).then(()=>{w({_c:a})}),i){if(E)throw i;return}return C}}let P=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},U=(e,t)=>{if(!_.has(e)){let n=c(S,t),r={},i=x.bind(a,e),l=o,s={},u=(e,t)=>{let n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},f=(t,n,r)=>{e.set(t,n);let i=s[t];if(i)for(let e of i)e(n,r)},d=()=>{if(!_.has(e)&&(_.set(e,[r,{},{},{},i,f,u]),!I)){let t=n.initFocus(setTimeout.bind(a,P.bind(a,r,0))),i=n.initReconnect(setTimeout.bind(a,P.bind(a,r,1)));l=()=>{t&&t(),i&&i(),_.delete(e)}}};return d(),[e,i,d,l]}return[e,_.get(e)[4]]},$=(e,t)=>E(e)==E(t),[q,J]=U(new Map),j=c({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,n,r,i)=>{let o=n.errorRetryCount,a=i.retryCount,l=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;(s(o)||!(a>o))&&setTimeout(r,l,i)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:F?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:F?5e3:3e3,compare:$,isPaused:()=>!1,cache:q,mutate:J,fallback:{}},O),z=(e,t)=>{let n=c(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=c(i,a))}return n},G=(0,r.createContext)({}),H=e=>{let{value:t}=e,n=(0,r.useContext)(G),i=u(t),o=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),l=(0,r.useMemo)(()=>i?o:z(n,o),[i,n,o]),s=o&&o.provider,f=(0,r.useRef)(a);s&&!f.current&&(f.current=U(s(l.cache||q),o));let d=f.current;return d&&(l.cache=d[0],l.mutate=d[1]),D(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,r.createElement)(G.Provider,c(e,{value:l}))},B="$inf$",X=g&&window.__SWR_DEVTOOLS_USE__,Y=X?window.__SWR_DEVTOOLS_USE__:[],K=e=>u(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Q=()=>c(j,(0,r.useContext)(G)),Z=(e,t)=>{let[n,r]=N(e),[,,,i]=_.get(q);if(i[n])return i[n];let o=t(r);return i[n]=o,o},ee=Y.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=N(t),[,,,i]=_.get(q);if(r.startsWith(B))return n(...e);let o=i[r];return s(o)?n(...e):(delete i[r],o)});return e(t,i,r)}),et=e=>function(...t){let n=Q(),[r,i,o]=K(t),a=z(n,o),l=e,{use:s}=a,u=(s||[]).concat(ee);for(let e=u.length;e--;)l=u[e](l);return l(r,i||a.fetcher||null,a)},en=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},er=(e,t)=>(...n)=>{let[r,i,o]=K(n),a=(o.use||[]).concat(t);return e(r,i,{...o,use:a})};X&&(window.__SWR_DEVTOOLS_REACT__=i())}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["3989"],{2372(e,t,r){r.r(t),r.d(t,{INFINITE_PREFIX:()=>"$inf$",IS_REACT_LEGACY:()=>n.j,IS_SERVER:()=>n.I,OBJECT:()=>n.O,SWRConfig:()=>n.S,SWRGlobalState:()=>n.a,UNDEFINED:()=>n.U,cache:()=>n.o,compare:()=>n.v,createCacheHelper:()=>n.c,defaultConfig:()=>n.d,defaultConfigOptions:()=>n.w,getTimestamp:()=>n.g,hasRequestAnimationFrame:()=>n.x,initCache:()=>n.y,internalMutate:()=>n.f,isDocumentDefined:()=>n.z,isFunction:()=>n.e,isLegacyDeno:()=>n.A,isPromiseLike:()=>n.b,isUndefined:()=>n.i,isWindowDefined:()=>n.p,mergeConfigs:()=>n.t,mergeObjects:()=>n.m,mutate:()=>n.k,noop:()=>n.n,normalize:()=>u,preload:()=>s,preset:()=>n.B,rAF:()=>n.r,revalidateEvents:()=>n.C,serialize:()=>n.s,slowConnection:()=>n.D,stableHash:()=>n.G,subscribeCallback:()=>p,unload:()=>n.l,useIsomorphicLayoutEffect:()=>n.u,useSWRConfig:()=>c,withArgs:()=>d,withMiddleware:()=>g});var n=r(4079),i=r(7125),o=r.n(i);let a=n.p&&window.__SWR_DEVTOOLS_USE__,l=a?window.__SWR_DEVTOOLS_USE__:[],u=e=>(0,n.e)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],c=()=>{let e=(0,i.useContext)(n.q);return(0,i.useMemo)(()=>(0,n.m)(n.d,e),[e])},s=(e,t)=>{if(n.I)return;let[r,i]=(0,n.s)(e),[,,,o]=n.a.get(n.o);if(o[r])return o[r];let a=t(i);return o[r]=a,a},f=l.concat(e=>(t,r,i)=>{let o=r&&((...e)=>{let[i]=(0,n.s)(t),[,,,o]=n.a.get(n.o);if(i.startsWith("$inf$"))return r(...e);let a=o[i];return(0,n.i)(a)?r(...e):(delete o[i],a)});return e(t,o,i)}),d=e=>function(...t){let r=c(),[i,o,a]=u(t),l=(0,n.t)(r,a),s=e,{use:d}=l,p=(d||[]).concat(f);for(let e=p.length;e--;)s=p[e](s);return s(i,o||l.fetcher||null,l)},p=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}},g=(e,t)=>(...r)=>{let[n,i,o]=u(r),a=(o.use||[]).concat(t);return e(n,i,{...o,use:a})};a&&(window.__SWR_DEVTOOLS_REACT__=o())},4079(e,t,r){r.d(t,{x:()=>T,I:()=>N,j:()=>j,u:()=>M,F:()=>a,g:()=>G,r:()=>F,C:()=>f,d:()=>Z,o:()=>Y,z:()=>R,a:()=>d,l:()=>Q,w:()=>L,S:()=>er,i:()=>E,t:()=>ee,E:()=>c,f:()=>B,q:()=>et,c:()=>C,B:()=>I,M:()=>u,n:()=>p,y:()=>H,U:()=>g,k:()=>K,v:()=>X,G:()=>$,R:()=>l,h:()=>s,s:()=>q,D:()=>W,O:()=>h,e:()=>m,p:()=>O,A:()=>S,b:()=>w,m:()=>_});var n=r(7125),i=r.n(n),o=Object.prototype.hasOwnProperty;let a=0,l=1,u=2,c=3,s=4;var f={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1,UNLOAD_EVENT:4};let d=new WeakMap,p=()=>{},g=p(),h=Object,E=e=>e===g,m=e=>"function"==typeof e,_=(e,t)=>({...e,...t}),w=e=>m(e.then),y={},b={},v="undefined",O=typeof window!=v,R=typeof document!=v,S=O&&"Deno"in window,T=()=>O&&typeof window.requestAnimationFrame!=v,C=(e,t)=>{let r=d.get(e);return[()=>!E(t)&&e.get(t)||y,n=>{if(!E(t)){let i=e.get(t);t in b||(b[t]=i),r[5](t,_(i,n),i||y)}},r[6],()=>!E(t)&&t in b?b[t]:!E(t)&&e.get(t)||y]},D=!0,[k,A]=O&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[p,p],I={isOnline:()=>D,isVisible:()=>{let e=R&&document.visibilityState;return E(e)||"hidden"!==e}},L={initFocus:e=>(R&&document.addEventListener("visibilitychange",e),k("focus",e),()=>{R&&document.removeEventListener("visibilitychange",e),A("focus",e)}),initReconnect:e=>{let t=()=>{D=!0,e()},r=()=>{D=!1};return k("online",t),k("offline",r),()=>{A("online",t),A("offline",r)}}},j=!i().useId,N=!O||S,F=e=>T()?window.requestAnimationFrame(e):setTimeout(e,1),M=N?n.useEffect:n.useLayoutEffect,V="u">typeof navigator&&navigator.connection,W=!N&&V&&(["slow-2g","2g"].includes(V.effectiveType)||V.saveData),x=new WeakMap,U=(e,t)=>e===`[object ${t}]`,P=0,$=e=>{let t,r,n=typeof e,i=h.prototype.toString.call(e),o=U(i,"Date"),a=U(i,"RegExp"),l=U(i,"Object");if(h(e)!==e||o||a)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=x.get(e))return t;if(t=++P+"~",x.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=$(e[r])+",";x.set(e,t)}if(l){t="#";let n=h.keys(e).sort();for(;!E(r=n.pop());)E(e[r])||(t+=r+":"+$(e[r])+",");x.set(e,t)}}return t},q=e=>{if(m(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?$(e):"",t]},z=0,G=()=>++z;async function B(...e){let[t,r,n,i]=e,o=_({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),a=o.populateCache,l=o.rollbackOnError,c=o.optimisticData,s=o.throwOnError;if(m(r)){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(f))}return f(r);async function f(r){let i,[f]=q(r);if(!f)return;let[p,h]=C(t,f),[_,y,b,v]=d.get(t),O=()=>{let e=_[f];return(m(o.revalidate)?o.revalidate(p().data,r):!1!==o.revalidate)&&(delete b[f],delete v[f],e&&e[0])?e[0](u).then(()=>p().data):p().data};if(e.length<3)return O();let R=n,S=!1,T=G();y[f]=[T,0];let D=!E(c),k=p(),A=k.data,I=k._c,L=E(I)?A:I;if(D&&h({data:c=m(c)?c(L,A):c,_c:L}),m(R))try{R=R(L)}catch(e){i=e,S=!0}if(R&&w(R)){let e;if(R=await R.catch(e=>{i=e,S=!0}),T!==y[f][0]){if(S)throw i;return R}S&&D&&(e=i,"function"==typeof l?l(e):!1!==l)&&(a=!0,h({data:L,_c:g}))}if(a&&!S&&(m(a)?h({data:a(R,L),error:g,_c:g}):h({data:R,error:g,_c:g})),y[f][1]=G(),Promise.resolve(O()).then(()=>{h({_c:g})}),S){if(s)throw i;return}return R}}let J=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},H=(e,t)=>{if(!d.has(e)){let r=_(L,t),n=Object.create(null),i=B.bind(g,e),o=p,u=Object.create(null),c=(e,t)=>{let r=u[e]||[];return u[e]=r,r.push(t),()=>{let e=r.indexOf(t);e>=0&&(r[e]=r[r.length-1],r.pop())}},f=(t,r,n)=>{e.set(t,r);let i=u[t];if(i)for(let e of i)e(r,n)},h=t=>{let r=d.get(e),[,i,o,a]=r,l=G();for(let e in r[8]++,o)delete o[e];for(let e in a)delete a[e];for(let e in i)i[e]=[l,l];let c={};for(let t of[...e.keys()]){let r=e.get(t);e.delete(t);let n=u[t];if(n)for(let e of n)e(c,r)}let f=!t||!1!==t.revalidate;for(let e in n){let t=n[e];for(let e=0;e<t.length;e++)t[e](s,{revalidate:f&&!e})}},E=()=>{if(!d.has(e)&&(d.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,f,c,h,0]),!N)){let t=r.initFocus(setTimeout.bind(g,J.bind(g,n,a))),i=r.initReconnect(setTimeout.bind(g,J.bind(g,n,l)));o=()=>{t&&t(),i&&i(),d.delete(e)}}};return E(),[e,i,E,o,h]}let r=d.get(e);return[e,r[4],g,g,r[7]]},X=function e(t,r){var n,i;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(o.call(t,n)&&++i&&!o.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},[Y,K,,,Q]=H(new Map),Z=_({onLoadingSlow:p,onSuccess:p,onError:p,onErrorRetry:(e,t,r,n,i)=>{let o=r.errorRetryCount,a=i.retryCount,l=~~((Math.random()+.5)*(1<<(a<8?a:8)))*r.errorRetryInterval;(E(o)||!(a>o))&&setTimeout(n,l,i)},onDiscarded:p,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:W?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:W?5e3:3e3,compare:X,isPaused:()=>!1,cache:Y,mutate:K,unload:Q,fallback:{}},I),ee=(e,t)=>{let r=_(e,t);if(t){let{use:n,fallback:i,cacheData:o}=e,{use:a,fallback:l,cacheData:u}=t;n&&a&&(r.use=n.concat(a)),i&&l&&(r.fallback=_(i,l)),o&&u&&(r.cacheData=_(o,u))}return r},et=(0,n.createContext)({}),er=e=>{let{value:t}=e,r=(0,n.useContext)(et),i=m(t),o=(0,n.useMemo)(()=>i?t(r):t,[i,r,t]),a=(0,n.useMemo)(()=>i?o:ee(r,o),[i,r,o]),l=o&&o.provider,u=(0,n.useRef)(g);l&&!u.current&&(u.current=H(l(a.cache||Y),o));let c=u.current;return c&&(a.cache=c[0],a.mutate=c[1],a.unload=c[4]),M(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,n.createElement)(et.Provider,_(e,{value:a}))}}}]);
package/dist/3989.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"3989.js","sources":["webpack://@openmrs/esm-ward-app/../../node_modules/swr/dist/_internal/index.mjs"],"names":["Object","WeakMap","Date","RegExp","JSON","Array","window","document","I","setTimeout","navigator","o","Promise","e","t","s","Map","r","Math","i"],"mappings":"63BAGA,IAAM,EAAO,KAAK,EAKZ,EAA8B,IAC9B,EAASA,OACT,EAAc,AAAC,GAAI,IAAM,EACzB,EAAa,AAAC,GAAI,AAAY,YAAZ,OAAO,EACzB,EAAe,CAAC,EAAG,IAAK,EACtB,GAAG,CAAC,CACJ,GAAG,CAAC,AACR,GACE,EAAgB,AAAC,GAAI,EAAW,EAAE,IAAI,EAMtC,EAAQ,IAAIC,QAEd,EAAU,EASR,EAAa,AAAC,IAChB,IAGI,EACA,EAJE,EAAO,OAAO,EACd,EAAc,GAAO,EAAI,WAAW,CACpC,EAAS,GAAeC,KAG9B,GAAI,EAAO,KAAS,GAAQ,GAAU,GAAeC,OA8BjD,EAAS,EAAS,EAAI,MAAM,GAAK,AAAQ,UAAR,EAAmB,EAAI,QAAQ,GAAK,AAAQ,UAAR,EAAmBC,KAAK,SAAS,CAAC,GAAO,GAAK,MA9B1D,CAIzD,GADA,EAAS,EAAM,GAAG,CAAC,GACP,OAAO,EAMnB,GAFA,EAAS,EAAE,EAAU,IACrB,EAAM,GAAG,CAAC,EAAK,GACX,GAAeC,MAAO,CAGtB,IAAI,EAAQ,EADZ,EAAS,IACM,EAAQ,EAAI,MAAM,CAAE,IAC/B,GAAU,EAAW,CAAG,CAAC,EAAM,EAAI,IAEvC,EAAM,GAAG,CAAC,EAA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AAW,AAAC,GACP,SAAoB,GAAG,CAAI,EAE9B,IAAM,EAAiB,IAEjB,CAAC,EAAK,EAAI,EAAQ,CAAG,EAAU,GAE/B,EAAS,EAAa,EAAgB,GAExC,EAAO,EACL,CAAE,KAAG,CAAE,CAAG,EACV,EAAa,AAAC,IAAO,EAAE,AAAD,EAAG,MAAM,CAAC,IACtC,IAAI,IAAI,EAAI,EAAW,MAAM,CAAE,KAC3B,EAAO,CAAU,CAAC,EAAE,CAAC,GAEzB,OAAO,EAAK,EAAK,GAAM,EAAO,OAAO,EAAI,KAAM,EACnD,EAKE,GAAoB,CAAC,EAAK,EAAW,KACvC,IAAM,EAAoB,CAAS,CAAC,EAAI,EAAK,EAAS,CAAC,EAAI,CAAG,EAAE,AAAD,EAE/D,OADA,EAAkB,IAAI,CAAC,GAChB,KACH,IAAM,EAAQ,EAAkB,OAAO,CAAC,GACpC,GAAS,IAET,CAAiB,CAAC,EAAM,CAAG,CAAiB,CAAC,EAAkB,MAAM,CAAG,EAAE,CAC1E,EAAkB,GAAG,GAE7B,CACJ,EAGM,GAAiB,CAAC,EAAQ,IACrB,CAAC,GAAG,KACP,GAAM,CAAC,EAAK,EAAI,EAAO,CAAG,EAAU,GAC9B,EAAO,AAAC,GAAO,GAAG,EAAI,EAAE,AAAD,EAAG,MAAM,CAAC,GACvC,OAAO,EAAO,EAAK,EAAI,CACnB,GAAG,CAAM,CACT,IAAK,CACT,EACJ,CAhGI,IAEAA,CAAAA,OAAO,sBAAsB,CAAG,I"}
1
+ {"version":3,"file":"3989.js","sources":["webpack://@openmrs/esm-ward-app/../../node_modules/swr/dist/_internal/index.mjs","webpack://@openmrs/esm-ward-app/../../node_modules/dequal/lite/index.mjs","webpack://@openmrs/esm-ward-app/../../node_modules/swr/dist/config-context-ext53wcz.mjs"],"names":["window","Object","WeakMap","document","setTimeout","navigator","t","JSON","Array","o","Promise","e","Date","RegExp","Map","Math","i","c"],"mappings":"4+BAMA,IAAM,EAAiB,GAAe,EAAIA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O,EACpC,GAAgB,OAAO,CAAG,EAAU,EAAS,EAAe,KAAK,EAAI,GAAQ,EAAM,EAEvF,IAAMC,EAAe,EAAgB,OAAO,CAe5C,OAbIA,IACA,EAAe,KAAK,CAAGA,CAAY,CAAC,EAAE,CACtC,EAAe,MAAM,CAAGA,CAAY,CAAC,EAAE,CACvC,EAAe,MAAM,CAAGA,CAAY,CAAC,EAAE,EAG3C,EAA0B,KACtB,GAAIA,EAGA,OADAA,CAAY,CAAC,EAAE,EAAIA,CAAY,CAAC,EAAE,GAC3BA,CAAY,CAAC,EAAE,AAE9B,EAAG,EAAE,EACE,oBAAc,GAAiB,QAAQ,CAAE,EAAa,EAAO,CAChE,MAAO,CACX,GACJ,C"}
package/dist/4560.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["4560"],{3296(e,r,t){var n=t(7125),a="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},i=n.useState,u=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!a(e,t)}catch(e){return!0}}var o="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),n=i({inst:{value:t,getSnapshot:r}}),a=n[0].inst,o=n[1];return s(function(){a.value=t,a.getSnapshot=r,c(a)&&o({inst:a})},[e,t,r]),u(function(){return c(a)&&o({inst:a}),e(function(){c(a)&&o({inst:a})})},[e]),l(t),t};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:o},8139(e,r,t){e.exports=t(3296)},4675(e,r,t){t.d(r,{S:()=>v,u:()=>h});var n=t(7125),a=t.n(n),i=t(8139),u=t(2372),s=t(4079);let l=a().use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(r=>{e.status="fulfilled",e.value=r},r=>{e.status="rejected",e.reason=r}),e}}),c={dedupe:!0},o=(e,r,t)=>{var n;return!!r&&(null==(n=e.get(r))?void 0:n.has(t))===!0},d=(e,r,t)=>{if(!r)return;let n=e.get(r);n||(n=new Set,e.set(r,n)),n.add(t)},f=Promise.resolve(s.U);f.status="fulfilled",f.value=s.U;let g=()=>s.n,v=s.O.defineProperty(s.S,"defaultValue",{value:s.d}),h=(0,u.withArgs)((e,r,t)=>{let{cache:a,compare:v,suspense:h,fallbackData:p,revalidateOnMount:w,revalidateIfStale:b,refreshInterval:S,refreshWhenHidden:k,refreshWhenOffline:m,keepPreviousData:y,strictServerPrefetchWarning:R}=t,[V,_,E,U]=s.a.get(a),[C,D]=(0,s.s)(e),L=(0,n.useRef)(!1),O=(0,n.useRef)(!1),T=(0,n.useRef)(C),P=(0,n.useRef)(r),I=(0,n.useRef)(t),j=()=>I.current.isVisible()&&I.current.isOnline(),[x,F,M,W]=(0,s.c)(a,C),q=(0,n.useRef)({}).current,z=(0,s.i)(p)?(0,s.i)(t.fallback)?s.U:t.fallback[C]:p,A=t.cacheData,Y=C?null==A?void 0:A[C]:s.U,$=C?U[C]:s.U,B=(0,s.i)($)&&!(0,s.i)(Y),G=B?Y:$,H=(e,r)=>{for(let t in q)if("data"===t){if(!v(e[t],r[t])&&(!(0,s.i)(e[t])||!v(ei,r[t])))return!1}else if(r[t]!==e[t])return!1;return!0},J=!L.current,K=(0,n.useMemo)(()=>{let e=x(),t=W(),n=e=>{let t=(0,s.m)(e);return(delete t._k,(()=>{if(!C||!r||I.current.isPaused())return!1;if(J&&!(0,s.i)(w))return w;let e=(0,s.i)(z)?t.data:z;return!(h&&B&&(0,s.i)(e))&&((0,s.i)(e)||b)})())?{isValidating:!0,isLoading:!0,...t}:t},a=n(e),i=e===t?a:n(t),u=a;return[()=>{let e=n(x());return H(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>i]},[a,C]),N=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>M(C,(r,t)=>{H(t,r)||e()}),[a,C]),K[0],K[1]),Q=V[C]&&V[C].length>0,X=N.data,Z=(0,s.i)(X)?z&&(0,s.b)(z)?l(z):z:X,ee=N.error,er=(0,n.useRef)(Z),et=(0,n.useRef)(s.U),en=et.current;en||(et.current=en=new WeakMap);let ea=(0,n.useRef)(null),ei=y?(0,s.i)(X)?(0,s.i)(er.current)?Z:er.current:X:Z,eu=C&&(0,s.i)(Z),es=(0,n.useRef)(null);s.I||(0,i.useSyncExternalStore)(g,()=>(es.current=!1,es),()=>(es.current=!0,es));let el=es.current;R&&el&&!h&&eu&&console.warn(`Missing pre-initiated data for serialized key "${C}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ec=!(!C||!r||I.current.isPaused())&&(!Q||!!(0,s.i)(ee))&&(J&&!(0,s.i)(w)?w:(!h||!B||!eu)&&(h?!(0,s.i)(Z)&&b:(0,s.i)(Z)||b)),eo=J&&ec,ed=(0,s.i)(N.isValidating)?eo:N.isValidating,ef=(0,s.i)(N.isLoading)?eo:N.isLoading,eg=(0,n.useCallback)(async e=>{let r,n,a=P.current;if(!C||!a||O.current||I.current.isPaused())return!1;let i=!0,u=e||{},l=!E[C]||!u.dedupe,c=B&&!o(en,A,C)&&!(0,s.i)(G)&&(0,s.i)(x().data),f=()=>s.j?!O.current&&C===T.current&&L.current:C===T.current,g={isValidating:!1,isLoading:!1},h=()=>{F(g)},p=()=>{let e=E[C];e&&e[1]===n&&delete E[C]},w={isValidating:!0};(0,s.i)(x().data)&&(w.isLoading=!0);try{if(l&&(F(w),t.loadingTimeout&&(0,s.i)(x().data)&&setTimeout(()=>{i&&f()&&I.current.onLoadingSlow(C,t)},t.loadingTimeout),c&&d(en,A,C),E[C]=[c?G:a(D),(0,s.g)()],c&&U[C]&&delete U[C]),[r,n]=E[C],r=await r,l&&setTimeout(p,t.dedupingInterval),!E[C]||E[C][1]!==n)return l&&f()&&I.current.onDiscarded(C),!1;g.error=s.U;let e=_[C];if(!(0,s.i)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return h(),l&&f()&&I.current.onDiscarded(C),!1;let u=x().data;g.data=v(u,r)?u:r,l&&f()&&I.current.onSuccess(r,C,t)}catch(t){p();let e=I.current,{shouldRetryOnError:r}=e;!e.isPaused()&&(g.error=t,l&&f()&&(e.onError(t,C,e),(!0===r||(0,s.e)(r)&&r(t))&&(!I.current.revalidateOnFocus||!I.current.revalidateOnReconnect||j())&&e.onErrorRetry(t,C,e,e=>{let r=V[C];r&&r[0]&&r[0](s.E,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return i=!1,h(),!0},[C,a]),ev=(0,n.useCallback)((...e)=>(0,s.f)(a,T.current,...e),[]);if((0,s.u)(()=>{let e=ea.current;e&&(ea.current=null,d(en,e.cacheData,e.key),(0,s.i)(x().data)&&F({data:e.data,error:s.U,_k:e._k}),U[e.key]&&delete U[e.key])}),(0,s.u)(()=>{P.current=r,I.current=t,(0,s.i)(X)||(er.current=X)}),(0,s.u)(()=>{if(r||!B||(0,s.i)(G)||o(en,A,C)||!(0,s.i)(x().data))return;d(en,A,C);let e=_[C];(({value:e,getCacheData:r,canCommit:t,setCache:n})=>{let a=e=>{t()&&(0,s.i)(r())&&n(e)};Promise.resolve(e).then(e=>{a({data:e,error:s.U})},e=>{a({error:e})})})({value:G,getCacheData:()=>x().data,canCommit:()=>!O.current&&C===T.current&&_[C]===e,setCache:e=>F({...e,_k:D})})}),(0,s.u)(()=>{if(!C)return;let e=eg.bind(s.U,c),r=0;I.current.revalidateOnFocus&&(r=Date.now()+I.current.focusThrottleInterval);let t=(0,u.subscribeCallback)(C,V,(t,n={})=>{if(t==s.F){let t=Date.now();I.current.revalidateOnFocus&&t>r&&j()&&(r=t+I.current.focusThrottleInterval,e())}else if(t==s.R)I.current.revalidateOnReconnect&&j()&&e();else if(t==s.M)return eg();else if(t==s.E)return eg(n);else if(t==s.h&&(er.current=s.U,n.revalidate))return eg()});return O.current=!1,T.current=C,L.current=!0,F({_k:D}),ec&&!E[C]&&((0,s.i)(Z)||s.I?e():(0,s.r)(e)),()=>{O.current=!0,t()}},[C]),(0,s.u)(()=>{let e;function r(){let r=(0,s.e)(S)?S(x().data):S;r&&-1!==e&&(e=setTimeout(t,r))}function t(){!x().error&&(k||I.current.isVisible())&&(m||I.current.isOnline())?eg(c).then(r):r()}return r(),()=>{e&&(clearTimeout(e),e=-1)}},[S,k,m,C]),(0,n.useDebugValue)(ei),h){if(!s.j&&s.I&&eu&&(0,s.i)(G))throw Error("Fallback data is required when using Suspense in SSR.");eu&&(P.current=r,I.current=t,O.current=!1);let e=!(0,s.i)(G)&&eu,n=s.U;if(e&&B?(Z=n=G&&(0,s.b)(G)?l(G):G,ei=n,s.I||(ea.current={data:n,_k:D,key:C,cacheData:A})):l(e?ev(G):f),!(0,s.i)(ee)&&eu)throw ee;let a=eu&&(0,s.i)(n)?eg(c):f;!(0,s.i)(ei)&&eu&&(a.status="fulfilled",a.value=!0),l(a)}return{mutate:ev,get data(){return q.data=!0,ei},get error(){return q.error=!0,ee},get isValidating(){return q.isValidating=!0,ed},get isLoading(){return q.isLoading=!0,ef}}})}}]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"4560.js","sources":["webpack://@openmrs/esm-ward-app/../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","webpack://@openmrs/esm-ward-app/../../node_modules/use-sync-external-store/shim/index.js","webpack://@openmrs/esm-ward-app/../../node_modules/swr/dist/use-swr-emll9s78.mjs"],"names":["Object","u","c","e","window","Set","Promise","s","WeakMap","console","setTimeout","r","Date","t","clearTimeout","Error"],"mappings":"yIAWA,IAAI,EAAQ,EAAQ,MAIhB,EAAW,YAAe,OAAOA,OAAO,EAAE,CAAGA,OAAO,EAAE,CAH1D,SAAY,CAAC,CAAE,CAAC,EACd,OAAO,AAAC,IAAM,GA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