@openmrs/esm-appointments-app 11.1.1-pre.9828 → 11.1.1-pre.9832

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.
@@ -5,4 +5,4 @@
5
5
  │ 7505.js (566.240 KiB)
6
6
  
7
7
 
8
- Rspack compiled with 1 warning in 35.08 s
8
+ Rspack compiled with 1 warning in 37.87 s
package/dist/9399.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([["9399"],{2452(e,t,a){a.d(t,{A:()=>U});var n=a(7125),i=a.n(n),s=a(5921),l=a(5910),r=a(8466),o=a(8622),m=a(2895),p=a(8755),c=a(5084),d=a(9224),u=a(2845),_=a(5370);let h=({appointment:e,patientUuid:t,hasActiveVisit:a,mutateVisits:n})=>{let{checkInButton:r}=(0,m.useConfig)(),{t:o}=(0,s.useTranslation)(),{mutateAppointments:p}=(0,_.q)(),c=t=>(0,u.yI)("CheckedIn",e.uuid).then(()=>{(0,m.showSnackbar)({title:o("checkedIn","Checked in"),subtitle:t,kind:"success",isLowContrast:!0}),p?.()}).catch(e=>{console.error("Check-in failed:",e),(0,m.showSnackbar)({title:o("checkInFailed","Check-in failed"),subtitle:e?.message??o("appointmentCheckInFailed","An error occurred while checking in the appointment"),kind:"error",isLowContrast:!1})});return i().createElement(l.Button,{size:"sm",kind:"tertiary",onClick:()=>{r.customUrl?(0,m.navigate)({to:r.customUrl,templateParams:{patientUuid:e.patient.uuid,appointmentUuid:e.uuid}}):a?c(o("appointmentCheckedInWithExistingVisit","Appointment checked in using existing active visit")):(0,m.launchWorkspace2)("appointments-start-visit-workspace",{patientUuid:t,showPatientHeader:!0,openedFrom:"appointments-check-in",onVisitStarted:async()=>{n();try{if(await (0,u.oo)(e.uuid)==="CheckedIn")return void p?.()}catch(e){console.error("Could not verify appointment status before auto check-in:",e)}c(o("appointmentCheckedInAfterVisitStarted","The visit was started and the appointment was checked in"))}})}},o("checkIn","Check in"))},E=({appointment:e,hasActiveVisit:t,mutateVisits:a})=>{let{t:n}=(0,s.useTranslation)(),{checkInButton:r,checkOutButton:o}=(0,m.useConfig)(),p=e.patient.uuid,d=e.status===c.y2.CHECKEDIN,u=e.status===c.y2.COMPLETED,_=e.status===c.y2.CANCELLED,E=e.status===c.y2.SCHEDULED;return i().createElement("div",{className:"-esm-appointments__appointments-actions__container___zHYgC"},_||u?null:o.enabled&&d?i().createElement(l.Button,{onClick:()=>{if(o.customUrl)(0,m.navigate)({to:o.customUrl,templateParams:{patientUuid:p,appointmentUuid:e.uuid}});else{let t=(0,m.showModal)("end-appointment-modal",{closeModal:()=>{a(),t()},patientUuid:p,appointmentUuid:e.uuid})}},kind:"danger--tertiary",size:"sm"},n("checkOut","Check out")):E&&r.enabled?i().createElement(h,{patientUuid:p,appointment:e,hasActiveVisit:t,mutateVisits:a}):null)};var f=a(3464),b=a.n(f),g=a(8909),C=a.n(g),y=a(1947),w=a(9391);let S="-esm-appointments__appointment-details__gridTitle___0TN+t",D="-esm-appointments__appointment-details__label___YZswU",T="-esm-appointments__appointment-details__historyGridLabel___eBVjN",v="-esm-appointments__appointment-details__historyGridCount___Jzg26",k="-esm-appointments__appointment-details__labelBold___sHQrZ",N="-esm-appointments__appointment-details__labelContainer___aK+Ki",A=({appointment:e})=>{let{t}=(0,s.useTranslation)(),[a,l]=(0,n.useState)(!1),{appointmentsCount:r,isLoading:o}=function(e){let t=new AbortController,a=`${m.restBaseUrl}/appointments/search`,n=(0,y.h)(),{data:i,error:s,isLoading:l,isValidating:r}=C()(e?[a,e,n]:null,()=>(0,m.openmrsFetch)(a,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:n}})),o=i?.data?.length?i.data.filter(e=>"Missed"===e.status).length:0,p=i?.data?.length?i.data.filter(e=>"Completed"===e.status).length:0;return{appointmentsCount:{missedAppointments:o,completedAppointments:p,cancelledAppointments:i?.data?.length?i.data.filter(e=>"Cancelled"===e.status).length:0,upcomingAppointments:i?.data?.length?i.data?.filter(e=>b()(Number(e.startDateTime)).isAfter(b()())).length:0},error:s,isLoading:l,isValidating:r}}(e.patient.uuid),{patient:p}=(0,m.usePatient)(e.patient.uuid);return(0,n.useEffect)(()=>{o||l(!0)},[r,o]),i().createElement("div",{className:"-esm-appointments__appointment-details__appointmentDetailsContainer___M9gEQ"},i().createElement("p",{className:"-esm-appointments__appointment-details__title___1BFru"},e.service.name),i().createElement("p",{className:"-esm-appointments__appointment-details__subTitle___06SeW"},(0,m.formatDatetime)(new Date(e.startDateTime))),i().createElement("div",{className:"-esm-appointments__appointment-details__patientInfoGrid___XeNNF"},i().createElement("div",null,i().createElement("p",{className:S},t("patientDetails","Patient details")),i().createElement("div",{className:N},i().createElement("p",{className:k},t("patientName","Patient name"),": "),i().createElement("p",{className:D},e.patient.name)),i().createElement("div",{className:N},i().createElement("p",{className:k},t("age","Age"),": "),i().createElement("p",{className:D},e.patient.age)),i().createElement("div",{className:N},i().createElement("p",{className:k},t("gender","Gender"),": "),i().createElement("p",{className:D},(0,w.o_)(e.patient.gender,t))),p&&p?.birthDate?i().createElement("div",{className:N},i().createElement("p",{className:k},t("dateOfBirth","Date of birth"),": "),i().createElement("p",{className:D},(0,m.formatDate)(new Date(p.birthDate)))):"",p&&p?.telecom?p.telecom.map((e,a)=>i().createElement("div",{key:a,className:N},i().createElement("p",{className:k},t("Contact","Contact {{index}}",{index:a+1}),": "),i().createElement("p",{className:D},e.value))):""),i().createElement("div",null,i().createElement("p",{className:S},t("appointmentNotes","Appointment Notes")),i().createElement("p",{className:D},e.comments)),i().createElement("div",null,i().createElement("p",{className:S},t("appointmentHistory","Appointment History")),i().createElement("div",{className:"-esm-appointments__appointment-details__historyGrid___vKJn3"},i().createElement("div",null,i().createElement("p",{className:T},t("completed","Completed")),i().createElement("span",{className:v},r.completedAppointments)),i().createElement("div",null,i().createElement("p",{className:T},t("missed","Missed")),i().createElement("span",{className:"-esm-appointments__appointment-details__historyGridCountRed___ZGybQ"},r.missedAppointments)),i().createElement("div",null,i().createElement("p",{className:T},t("cancelled","Cancelled")),i().createElement("span",{className:v},r.cancelledAppointments)),i().createElement("div",null,i().createElement("p",{className:T},t("upcoming","Upcoming")),i().createElement("span",{className:v},r.upcomingAppointments))))))};var M=a(3639);let I={expandedRow:"-esm-appointments__appointments-table__expandedRow___NmScC",hiddenRow:"-esm-appointments__appointments-table__hiddenRow___hlW96",container:"-esm-appointments__appointments-table__container___uMiWL",toolbarContent:"-esm-appointments__appointments-table__toolbarContent___Tlob+",headerContainer:"-esm-appointments__appointments-table__headerContainer___24pWO",tabletHeading:"-esm-appointments__appointments-table__tabletHeading___67j+D",desktopHeading:"-esm-appointments__appointments-table__desktopHeading___kG1y1",emptyStateContent:"-esm-appointments__appointments-table__emptyStateContent___Nzyi1",searchbar:"-esm-appointments__appointments-table__searchbar___5HFn8",link:"-esm-appointments__appointments-table__link___8L7Lk",toolbar:"-esm-appointments__appointments-table__toolbar___MfsAm",menuItem:"-esm-appointments__appointments-table__menuItem___QdfqZ",actionsCell:"-esm-appointments__appointments-table__actionsCell___qgGK8",content:"-esm-appointments__appointments-table__content___VdevS",tileContainer:"-esm-appointments__appointments-table__tileContainer___f-3Ln",tile:"-esm-appointments__appointments-table__tile___hn4wi",tileContent:"-esm-appointments__appointments-table__tileContent___qkbOe",layer:"-esm-appointments__appointments-table__layer___f4eXM",filterEmptyState:"-esm-appointments__appointments-table__filterEmptyState___a7D-d",filterEmptyStateTile:"-esm-appointments__appointments-table__filterEmptyStateTile___yU4-C",filterEmptyStateContent:"-esm-appointments__appointments-table__filterEmptyStateContent___Xfzsj",filterEmptyStateHelper:"-esm-appointments__appointments-table__filterEmptyStateHelper___OvkG+"},U=({appointments:e,isLoading:t,tableHeading:a})=>{let{t:u}=(0,s.useTranslation)(),[_,h]=(0,n.useState)(25),[f,b]=(0,n.useState)(""),{selectedAppointmentStatuses:g,setSelectedAppointmentStatuses:y}=(0,M.nS)(),{appointmentsTableColumns:w}=(0,m.useConfig)(),S=(0,d.LZ)(e,f,g),{results:D,goTo:T,currentPage:v}=(0,m.usePagination)(S,_),{customPatientChartUrl:k,patientIdentifierType:N}=(0,m.useConfig)(),[U,P]=(0,n.useState)(new Set),F=(0,m.useLayoutType)(),L=(0,m.isDesktop)(F)?"sm":"lg",{visits:x,mutateVisits:H}=(()=>{let e=`${m.restBaseUrl}/visit?includeInactive=false&v=custom:(uuid,patient:(uuid),startDatetime,stopDatetime)`,{data:t,error:a,isLoading:n,mutate:i}=C()(e,m.openmrsFetch);return{isLoading:n,visits:t?.data?.results??[],error:a,mutateVisits:i}})(),O=(0,n.useMemo)(()=>new Map(x?.filter(e=>e?.startDatetime&&!e?.stopDatetime).map(e=>[e.patient.uuid,e])),[x]);(0,n.useEffect)(()=>{P(new Set)},[e]);let B=["actions","overflowMenu"],$=w.map(e=>({header:u(e,e),key:e}));$.push({header:"",key:"overflowMenu"});let z=(0,n.useMemo)(()=>D?.map(e=>({id:e.uuid,patientName:i().createElement(m.ConfigurableLink,{className:I.link,to:k,templateParams:{patientUuid:e.patient.uuid}},e.patient.name),nextAppointmentDate:"--",identifier:N?e.patient[N.replaceAll(" ","")]??e.patient.identifier:e.patient.identifier,dateTime:(0,m.formatDatetime)(new Date(e.startDateTime)),visitStartTime:O.has(e.patient.uuid)?(0,m.formatDatetime)(new Date(O.get(e.patient.uuid).startDatetime)):"--",serviceType:e.service.name,location:e.location?.name,provider:e.providers?.[0]?.name??"--",status:u(e.status),actions:i().createElement("div",{className:I.actionsCell},i().createElement(E,{appointment:e,hasActiveVisit:O.has(e.patient.uuid),mutateVisits:H})),overflowMenu:i().createElement(l.OverflowMenu,{align:"left","aria-label":u("actions","Actions"),flipped:!0,size:L},i().createElement(l.OverflowMenuItem,{className:I.menuItem,itemText:u("editAppointment","Edit appointment"),onClick:()=>(0,m.launchWorkspace2)("appointments-form-workspace",{patientUuid:e.patient.uuid,appointment:e})})),appointment:e})),[D,k,N,L,u,O,H]);return t?i().createElement(l.DataTableSkeleton,{role:"progressbar",rowCount:5}):i().createElement(l.Layer,{className:I.container},i().createElement("div",{className:I.headerContainer},i().createElement("div",{className:(0,m.isDesktop)(F)?I.desktopHeading:I.tabletHeading},i().createElement("h2",null,a))),i().createElement(l.DataTable,{"aria-label":u("appointmentsTable","Appointments table"),"data-floating-menu-container":!0,rows:z,headers:$,isSortable:!0,size:L,useZebraStyles:!0},({rows:t,headers:n,getExpandHeaderProps:s,getHeaderProps:E,getRowProps:f,getSelectionProps:C,getTableProps:w,getTableContainerProps:S,getToolbarProps:D})=>i().createElement(i().Fragment,null,i().createElement(l.TableContainer,S(),i().createElement(l.TableToolbar,{...D(),size:L},i().createElement(m.TableBatchActions,{shouldShowBatchActions:U.size>0,totalSelected:U.size,onCancel:()=>P(new Set)},i().createElement(l.TableBatchAction,{renderIcon:r.Vv,onClick:()=>{let t=e.filter(e=>U.has(e.uuid)),a=(0,m.showModal)("batch-change-appointments-statuses-modal",{appointments:t,closeModal:()=>a()})}},u("changeStatus","Change status"))),i().createElement(l.TableToolbarContent,{className:I.toolbarContent},i().createElement(l.TableToolbarSearch,{className:I.searchbar,labelText:u("filterAppointments","Filter appointments"),placeholder:u("filterTable","Filter table"),onChange:e=>b(e.target.value),persistent:!0,size:L}),i().createElement(l.MultiSelect,{id:"statusMultiSelect",size:L,items:Object.values(c.y2).map(e=>({id:e,label:u(e)})),itemToString:e=>e?e.label:"",label:u("filterAppointmentsByStatus","Filter appointments by status"),onChange:({selectedItems:e})=>y([...new Set(e.map(e=>e.id))]),type:"inline",selectedItems:g.map(e=>({id:e,label:u(e)}))}),i().createElement(l.Button,{size:L,kind:"tertiary",renderIcon:o.f5,onClick:()=>{let t=e[0]?.startDateTime?(0,m.formatDate)(new Date(e[0].startDateTime),{time:!1,noToday:!0}):null;(0,p.u)(e,z,`${a}_appointments_${t}`)}},u("download","Download")))),i().createElement(l.Table,w(),i().createElement(l.TableHead,null,i().createElement(l.TableRow,null,i().createElement(l.TableExpandHeader,{enableToggle:!0,...s()}),i().createElement(l.TableSelectAll,{...C(),checked:U.size===t.length&&U.size>0,onSelect:()=>{U.size<t.length?P(new Set(t.map(e=>e.id))):P(new Set)}}),n.map(e=>i().createElement(l.TableHeader,E({header:e,isSortable:!B.includes(e.key)}),e.header)))),i().createElement(l.TableBody,null,t.map(t=>{let a=e.find(e=>e.uuid===t.id);return a?i().createElement(i().Fragment,{key:t.id},i().createElement(l.TableExpandRow,f({row:t}),i().createElement(l.TableSelectRow,{...C({row:t}),checked:U.has(t.id),onSelect:()=>{U.has(t.id)?P(new Set([...U].filter(e=>e!==t.id))):P(new Set([...U,t.id]))}}),t.cells.map(e=>i().createElement(l.TableCell,{key:e.id},e.value?.content??e.value))),t.isExpanded?i().createElement(l.TableExpandedRow,{className:I.expandedRow,colSpan:n.length+2},i().createElement(A,{appointment:a})):i().createElement(l.TableExpandedRow,{className:I.hiddenRow,colSpan:n.length+2})):null})))),0===t.length?i().createElement("div",{className:I.tileContainer},i().createElement(l.Layer,null,i().createElement(l.Tile,{className:I.tile},i().createElement("div",{className:I.tileContent},i().createElement("p",{className:I.content},u("noAppointmentsToDisplay","No appointments to display")),i().createElement("p",{className:I.helper},u("checkFilters","Check the filters above")))))):i().createElement(l.Pagination,{backwardText:u("previousPage","Previous page"),forwardText:u("nextPage","Next page"),itemsPerPageText:u("itemsPerPage","Items per page")+":",page:v,pageNumberText:u("pageNumber","Page number"),pageSize:_,pageSizes:(0,d.uB)(e,_)??[],onChange:({page:e,pageSize:t})=>{T(e),h(t)},totalItems:e.length??0}))))}},9224(e,t,a){a.d(t,{Bm:()=>r,LZ:()=>l,WB:()=>s,uB:()=>i});var n=a(7125);function i(e,t=10){return e?Array.from({length:Math.ceil(e.length/t)},(e,a)=>(a+1)*t):[]}function s(e,t){return(0,n.useMemo)(()=>{if(t&&""!==t.trim()){let a=t.toLowerCase();return e.filter(e=>Object.entries(e).some(([e,t])=>"patientUuid"!==e&&`${t}`.toLowerCase().includes(a)))}return e},[t,e])}function l(e,t,a){return(0,n.useMemo)(()=>e.filter(e=>{if(a.length>0&&!a.includes(e.status))return!1;if(!t||""===t.trim())return!0;{let a=t.toLowerCase();return!!(e.patient.name?.toLowerCase()?.includes(a)||e.patient.identifier?.toLowerCase()?.includes(a))}}),[t,e,a])}function r(e,t){return t?.length>0?e.filter(({service:e})=>t.includes(e.uuid)):e}},8755(e,t,a){a.d(t,{K:()=>r,u:()=>l});var n=a(2164),i=a(2895),s=a(7003);async function l(e,t,a="Appointments"){let r=(await (0,i.getConfig)(s.AO)).includePhoneNumberInExcelSpreadsheet??!1,p=m(o(await Promise.all(e.map(async e=>{let a=t.find(t=>t.id===e.uuid),n=a?.identifier??e.patient.identifier,s=await (0,i.fetchCurrentPatient)(e.patient.uuid),l=r&&s?.telecom?s.telecom.map(e=>e?.value).join(", "):"";return{"Patient name":e.patient.name,Gender:"F"===e.patient.gender?"Female":"Male",Age:e.patient.age,Identifier:n,"Appointment type":e.service?.name,Date:(0,i.formatDate)(new Date(e.startDateTime),{mode:"wide"}),...r?{"Telephone number":l}:{}}}))),"Appointment list");(0,n._h)(p,`${a}.xlsx`,{compression:!0})}function r(e,t=`Unscheduled appointments ${(0,i.formatDate)(new Date,{year:!0,time:!0})}`){let a=m(o(e?.map(e=>({"Patient name":e.name,Gender:"F"===e.gender?"Female":"Male",Age:e.age,"Phone Number":e.phoneNumber??"--",Identifier:e.identifier??"--"}))),"Appointment list");(0,n._h)(a,`${t}.xlsx`,{compression:!0})}function o(e){let t=e.reduce((e,t)=>Math.max(e,t["Patient name"].length),30),a=n.Wp.json_to_sheet(e);return a["!cols"]=[{wch:t}],a}function m(e,t){let a=n.Wp.book_new();return n.Wp.book_append_sheet(a,e,t),a}},2373(e,t,a){a.d(t,{Ee:()=>o,Xz:()=>u,_h:()=>c,o_:()=>d,tF:()=>p,w:()=>_,xh:()=>m});var n=a(3464),i=a.n(n),s=a(2895),l=a(5084),r=a(7003);let o=e=>{let t=i()(e).startOf("day").format(r.BC);return`${s.restBaseUrl}/appointments?forDate=${encodeURIComponent(t)}`},m=e=>{let t=e.getHours(),a=e.getMinutes(),n=a<10?`0${a}`:a.toString();return`${t%12||12}:${n} ${t>=12?"PM":"AM"}`},p=(e,t)=>e.isSame(t,"month"),c=e=>{let t=i()(e).startOf("month"),a=i()(e).endOf("month"),n=i()(e).daysInMonth(),s=i()(e).subtract(1,"month"),l=i()(e).add(1,"month"),r=[];for(let e=s.daysInMonth()-t.day()+1;e<=s.daysInMonth();e++)r.push(s.date(e));for(let t=1;t<=n;t++)r.push(e.date(t));let o=r.length>30?7:14;for(let e=1;e<o-a.day();e++)r.push(l.date(e));return r},d=(e,t)=>{switch(e){case"M":return t("male","Male");case"F":return t("female","Female");case"O":return t("other","Other");case"U":return t("unknown","Unknown");default:return e}},u=e=>{(0,s.launchWorkspace2)("appointments-patient-search-workspace",{initialQuery:"",workspaceTitle:e("createNewAppointment","Create new appointment"),onPatientSelected(e,t,a,n){a(r.gC,{patientUuid:t.id})}},{startVisitWorkspaceName:"appointments-start-visit-workspace"})},_=(e,t)=>{let a={[l.y2.REQUESTED]:0,[l.y2.SCHEDULED]:1,[l.y2.CHECKEDIN]:3,[l.y2.COMPLETED]:4,[l.y2.CANCELLED]:4,[l.y2.MISSED]:4};return a[e]<a[t]||t===l.y2.SCHEDULED}},9391(e,t,a){a.d(t,{Ee:()=>n.Ee,Xz:()=>n.Xz,_h:()=>n._h,o_:()=>n.o_,tF:()=>n.tF,w:()=>n.w});var n=a(2373)},5845(e,t,a){a.d(t,{H:()=>o,M:()=>m});var n=a(8909),i=a.n(n),s=a(2895),l=a(1947),r=a(9391);let o=e=>{let t=(0,r.Ee)(e),{data:a,...n}=i()(t,s.openmrsFetch);return{appointmentList:a?.data??[],...n}},m=e=>{let t=(0,l.h)(),a=`${s.restBaseUrl}/appointment/earlyAppointment?forDate=${e||t}`,{data:n,error:r,isLoading:o}=i()(a,s.openmrsFetch,{errorRetryCount:2});return{earlyAppointmentList:n?.data??[],isLoading:o,error:r}}},5370(e,t,a){a.d(t,{q:()=>r});var n=a(7125),i=a(8909),s=a(2895);let l=`${s.restBaseUrl}/appointment`;function r(){let{mutate:e}=(0,i.useSWRConfig)();return{mutateAppointments:(0,n.useCallback)(()=>e(e=>"string"==typeof e&&e.startsWith(l)||Array.isArray(e)&&e[0].startsWith(l)),[e])}}},1947(e,t,a){a.d(t,{h:()=>r});var n=a(3464),i=a.n(n),s=a(7125),l=a(2745);function r(){let e=(0,l.useParams)();return(0,s.useMemo)(()=>{if(e.date){let t=i()(e.date,"YYYY-MM-DD").startOf("day");if(t.isValid())return t.format("YYYY-MM-DD");console.warn(`Invalid date format in URL parameter: ${e.date}. Format should be YYYY-MM-DD. Falling back to current date.`)}return i()().startOf("day").format("YYYY-MM-DD")},[e.date])}},2845(e,t,a){a.d(t,{DM:()=>c,oo:()=>u,yI:()=>d});var n=a(3464),i=a.n(n),s=a(8909),l=a.n(s),r=a(2895),o=a(5602),m=a.n(o);i().extend(m());let p=`${r.restBaseUrl}/appointments/search`;function c(e,t,a){let{data:n,error:s,isLoading:o,isValidating:m,mutate:c}=l()(e?[p,e,t]:null,()=>(0,r.openmrsFetch)(p,{method:"POST",signal:a.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:t}})),d=n?.data?.length?n.data:null,u=d?.sort((e,t)=>t.startDateTime>e.startDateTime?1:-1)?.filter(({status:e})=>"Cancelled"!==e)?.filter(({startDateTime:e})=>i()(new Date(e).toISOString()).isBefore(new Date().setHours(0,0,0,0))),_=d?.sort((e,t)=>e.startDateTime>t.startDateTime?1:-1)?.filter(({status:e})=>"Cancelled"!==e)?.filter(({startDateTime:e})=>i()(new Date(e).toISOString()).isAfter(i()().endOf("day"))),h=d?.sort((e,t)=>e.startDateTime>t.startDateTime?1:-1)?.filter(({status:e})=>"Cancelled"!==e)?.filter(({startDateTime:e})=>i()(new Date(e).toISOString()).isToday());return{data:n?{pastAppointments:u,upcomingAppointments:_,todaysAppointments:h}:null,error:s,isLoading:o,isValidating:m,mutate:c}}let d=async(e,t)=>{let a=Intl.DateTimeFormat().resolvedOptions().timeZone,n=i()(new Date).format("YYYY-MM-DDTHH:mm:ss.SSSZZ"),s=`${r.restBaseUrl}/appointments/${t}/status-change`;return await (0,r.openmrsFetch)(s,{body:{toStatus:e,onDate:n,timeZone:a},method:"POST",headers:{"Content-Type":"application/json"}})},u=async e=>{let t=`${r.restBaseUrl}/appointment?uuid=${e}`,{data:a}=await (0,r.openmrsFetch)(t);return a?.status}},3639(e,t,a){a.d(t,{nS:()=>l});var n=a(2895);let i=(0,n.createGlobalStore)("appointments-app",{appointmentServiceTypes:[],selectedAppointmentStatuses:[]},"sessionStorage"),s={setAppointmentServiceTypes:(e,t)=>({appointmentServiceTypes:t}),setSelectedAppointmentStatuses:(e,t)=>({selectedAppointmentStatuses:t})};function l(){return(0,n.useStoreWithActions)(i,s)}}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([["9399"],{2452(e,t,a){a.d(t,{A:()=>U});var n=a(7125),i=a.n(n),s=a(5921),l=a(5910),r=a(8466),o=a(8622),m=a(2895),p=a(8755),c=a(5084),d=a(9224),u=a(2845),_=a(5370);let h=({appointment:e,patientUuid:t,hasActiveVisit:a,mutateVisits:n})=>{let{checkInButton:r}=(0,m.useConfig)(),{t:o}=(0,s.useTranslation)(),{mutateAppointments:p}=(0,_.q)(),c=t=>(0,u.yI)("CheckedIn",e.uuid).then(()=>{(0,m.showSnackbar)({title:o("checkedIn","Checked in"),subtitle:t,kind:"success",isLowContrast:!0}),p?.()}).catch(e=>{console.error("Check-in failed:",e),(0,m.showSnackbar)({title:o("checkInFailed","Check-in failed"),subtitle:e?.message??o("appointmentCheckInFailed","An error occurred while checking in the appointment"),kind:"error",isLowContrast:!1})});return i().createElement(l.Button,{size:"sm",kind:"tertiary",onClick:()=>{r.customUrl?(0,m.navigate)({to:r.customUrl,templateParams:{patientUuid:e.patient.uuid,appointmentUuid:e.uuid}}):a?c(o("appointmentCheckedInWithExistingVisit","Appointment checked in using existing active visit")):(0,m.launchWorkspace2)("appointments-start-visit-workspace",{patientUuid:t,showPatientHeader:!0,openedFrom:"appointments-check-in",onVisitStarted:async()=>{n();try{if(await (0,u.oo)(e.uuid)==="CheckedIn")return void p?.()}catch(e){console.error("Could not verify appointment status before auto check-in:",e)}c(o("appointmentCheckedInAfterVisitStarted","The visit was started and the appointment was checked in"))}})}},o("checkIn","Check in"))},E=({appointment:e,hasActiveVisit:t,mutateVisits:a})=>{let{t:n}=(0,s.useTranslation)(),{checkInButton:r,checkOutButton:o}=(0,m.useConfig)(),p=e.patient.uuid,d=e.status===c.y2.CHECKEDIN,u=e.status===c.y2.COMPLETED,_=e.status===c.y2.CANCELLED,E=e.status===c.y2.SCHEDULED;return i().createElement("div",{className:"-esm-appointments__appointments-actions__container___zHYgC"},_||u?null:o.enabled&&d?i().createElement(l.Button,{onClick:()=>{if(o.customUrl)(0,m.navigate)({to:o.customUrl,templateParams:{patientUuid:p,appointmentUuid:e.uuid}});else{let t=(0,m.showModal)("end-appointment-modal",{closeModal:()=>{a(),t()},patientUuid:p,appointmentUuid:e.uuid})}},kind:"danger--tertiary",size:"sm"},n("checkOut","Check out")):E&&r.enabled?i().createElement(h,{patientUuid:p,appointment:e,hasActiveVisit:t,mutateVisits:a}):null)};var f=a(3464),b=a.n(f),g=a(8909),C=a.n(g),y=a(1947),w=a(9391);let S="-esm-appointments__appointment-details__gridTitle___0TN+t",D="-esm-appointments__appointment-details__label___YZswU",T="-esm-appointments__appointment-details__historyGridLabel___eBVjN",v="-esm-appointments__appointment-details__historyGridCount___Jzg26",k="-esm-appointments__appointment-details__labelBold___sHQrZ",N="-esm-appointments__appointment-details__labelContainer___aK+Ki",A=({appointment:e})=>{let{t}=(0,s.useTranslation)(),[a,l]=(0,n.useState)(!1),{appointmentsCount:r,isLoading:o}=function(e){let t=new AbortController,a=`${m.restBaseUrl}/appointments/search`,n=(0,y.h)(),{data:i,error:s,isLoading:l,isValidating:r}=C()(e?[a,e,n]:null,()=>(0,m.openmrsFetch)(a,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:n}})),o=i?.data?.length?i.data.filter(e=>"Missed"===e.status).length:0,p=i?.data?.length?i.data.filter(e=>"Completed"===e.status).length:0;return{appointmentsCount:{missedAppointments:o,completedAppointments:p,cancelledAppointments:i?.data?.length?i.data.filter(e=>"Cancelled"===e.status).length:0,upcomingAppointments:i?.data?.length?i.data?.filter(e=>b()(Number(e.startDateTime)).isAfter(b()())).length:0},error:s,isLoading:l,isValidating:r}}(e.patient.uuid),{patient:p}=(0,m.usePatient)(e.patient.uuid);return(0,n.useEffect)(()=>{o||l(!0)},[r,o]),i().createElement("div",{className:"-esm-appointments__appointment-details__appointmentDetailsContainer___M9gEQ"},i().createElement("p",{className:"-esm-appointments__appointment-details__title___1BFru"},e.service.name),i().createElement("p",{className:"-esm-appointments__appointment-details__subTitle___06SeW"},(0,m.formatDatetime)(new Date(e.startDateTime))),i().createElement("div",{className:"-esm-appointments__appointment-details__patientInfoGrid___XeNNF"},i().createElement("div",null,i().createElement("p",{className:S},t("patientDetails","Patient details")),i().createElement("div",{className:N},i().createElement("p",{className:k},t("patientName","Patient name"),": "),i().createElement("p",{className:D},e.patient.name)),i().createElement("div",{className:N},i().createElement("p",{className:k},t("age","Age"),": "),i().createElement("p",{className:D},e.patient.age)),i().createElement("div",{className:N},i().createElement("p",{className:k},t("gender","Gender"),": "),i().createElement("p",{className:D},(0,w.o_)(e.patient.gender,t))),p&&p?.birthDate?i().createElement("div",{className:N},i().createElement("p",{className:k},t("dateOfBirth","Date of birth"),": "),i().createElement("p",{className:D},(0,m.formatDate)((0,m.parseDate)(p.birthDate)))):"",p&&p?.telecom?p.telecom.map((e,a)=>i().createElement("div",{key:a,className:N},i().createElement("p",{className:k},t("Contact","Contact {{index}}",{index:a+1}),": "),i().createElement("p",{className:D},e.value))):""),i().createElement("div",null,i().createElement("p",{className:S},t("appointmentNotes","Appointment Notes")),i().createElement("p",{className:D},e.comments)),i().createElement("div",null,i().createElement("p",{className:S},t("appointmentHistory","Appointment History")),i().createElement("div",{className:"-esm-appointments__appointment-details__historyGrid___vKJn3"},i().createElement("div",null,i().createElement("p",{className:T},t("completed","Completed")),i().createElement("span",{className:v},r.completedAppointments)),i().createElement("div",null,i().createElement("p",{className:T},t("missed","Missed")),i().createElement("span",{className:"-esm-appointments__appointment-details__historyGridCountRed___ZGybQ"},r.missedAppointments)),i().createElement("div",null,i().createElement("p",{className:T},t("cancelled","Cancelled")),i().createElement("span",{className:v},r.cancelledAppointments)),i().createElement("div",null,i().createElement("p",{className:T},t("upcoming","Upcoming")),i().createElement("span",{className:v},r.upcomingAppointments))))))};var M=a(3639);let I={expandedRow:"-esm-appointments__appointments-table__expandedRow___NmScC",hiddenRow:"-esm-appointments__appointments-table__hiddenRow___hlW96",container:"-esm-appointments__appointments-table__container___uMiWL",toolbarContent:"-esm-appointments__appointments-table__toolbarContent___Tlob+",headerContainer:"-esm-appointments__appointments-table__headerContainer___24pWO",tabletHeading:"-esm-appointments__appointments-table__tabletHeading___67j+D",desktopHeading:"-esm-appointments__appointments-table__desktopHeading___kG1y1",emptyStateContent:"-esm-appointments__appointments-table__emptyStateContent___Nzyi1",searchbar:"-esm-appointments__appointments-table__searchbar___5HFn8",link:"-esm-appointments__appointments-table__link___8L7Lk",toolbar:"-esm-appointments__appointments-table__toolbar___MfsAm",menuItem:"-esm-appointments__appointments-table__menuItem___QdfqZ",actionsCell:"-esm-appointments__appointments-table__actionsCell___qgGK8",content:"-esm-appointments__appointments-table__content___VdevS",tileContainer:"-esm-appointments__appointments-table__tileContainer___f-3Ln",tile:"-esm-appointments__appointments-table__tile___hn4wi",tileContent:"-esm-appointments__appointments-table__tileContent___qkbOe",layer:"-esm-appointments__appointments-table__layer___f4eXM",filterEmptyState:"-esm-appointments__appointments-table__filterEmptyState___a7D-d",filterEmptyStateTile:"-esm-appointments__appointments-table__filterEmptyStateTile___yU4-C",filterEmptyStateContent:"-esm-appointments__appointments-table__filterEmptyStateContent___Xfzsj",filterEmptyStateHelper:"-esm-appointments__appointments-table__filterEmptyStateHelper___OvkG+"},U=({appointments:e,isLoading:t,tableHeading:a})=>{let{t:u}=(0,s.useTranslation)(),[_,h]=(0,n.useState)(25),[f,b]=(0,n.useState)(""),{selectedAppointmentStatuses:g,setSelectedAppointmentStatuses:y}=(0,M.nS)(),{appointmentsTableColumns:w}=(0,m.useConfig)(),S=(0,d.LZ)(e,f,g),{results:D,goTo:T,currentPage:v}=(0,m.usePagination)(S,_),{customPatientChartUrl:k,patientIdentifierType:N}=(0,m.useConfig)(),[U,P]=(0,n.useState)(new Set),F=(0,m.useLayoutType)(),L=(0,m.isDesktop)(F)?"sm":"lg",{visits:x,mutateVisits:H}=(()=>{let e=`${m.restBaseUrl}/visit?includeInactive=false&v=custom:(uuid,patient:(uuid),startDatetime,stopDatetime)`,{data:t,error:a,isLoading:n,mutate:i}=C()(e,m.openmrsFetch);return{isLoading:n,visits:t?.data?.results??[],error:a,mutateVisits:i}})(),O=(0,n.useMemo)(()=>new Map(x?.filter(e=>e?.startDatetime&&!e?.stopDatetime).map(e=>[e.patient.uuid,e])),[x]);(0,n.useEffect)(()=>{P(new Set)},[e]);let B=["actions","overflowMenu"],$=w.map(e=>({header:u(e,e),key:e}));$.push({header:"",key:"overflowMenu"});let z=(0,n.useMemo)(()=>D?.map(e=>({id:e.uuid,patientName:i().createElement(m.ConfigurableLink,{className:I.link,to:k,templateParams:{patientUuid:e.patient.uuid}},e.patient.name),nextAppointmentDate:"--",identifier:N?e.patient[N.replaceAll(" ","")]??e.patient.identifier:e.patient.identifier,dateTime:(0,m.formatDatetime)(new Date(e.startDateTime)),visitStartTime:O.has(e.patient.uuid)?(0,m.formatDatetime)(new Date(O.get(e.patient.uuid).startDatetime)):"--",serviceType:e.service.name,location:e.location?.name,provider:e.providers?.[0]?.name??"--",status:u(e.status),actions:i().createElement("div",{className:I.actionsCell},i().createElement(E,{appointment:e,hasActiveVisit:O.has(e.patient.uuid),mutateVisits:H})),overflowMenu:i().createElement(l.OverflowMenu,{align:"left","aria-label":u("actions","Actions"),flipped:!0,size:L},i().createElement(l.OverflowMenuItem,{className:I.menuItem,itemText:u("editAppointment","Edit appointment"),onClick:()=>(0,m.launchWorkspace2)("appointments-form-workspace",{patientUuid:e.patient.uuid,appointment:e})})),appointment:e})),[D,k,N,L,u,O,H]);return t?i().createElement(l.DataTableSkeleton,{role:"progressbar",rowCount:5}):i().createElement(l.Layer,{className:I.container},i().createElement("div",{className:I.headerContainer},i().createElement("div",{className:(0,m.isDesktop)(F)?I.desktopHeading:I.tabletHeading},i().createElement("h2",null,a))),i().createElement(l.DataTable,{"aria-label":u("appointmentsTable","Appointments table"),"data-floating-menu-container":!0,rows:z,headers:$,isSortable:!0,size:L,useZebraStyles:!0},({rows:t,headers:n,getExpandHeaderProps:s,getHeaderProps:E,getRowProps:f,getSelectionProps:C,getTableProps:w,getTableContainerProps:S,getToolbarProps:D})=>i().createElement(i().Fragment,null,i().createElement(l.TableContainer,S(),i().createElement(l.TableToolbar,{...D(),size:L},i().createElement(m.TableBatchActions,{shouldShowBatchActions:U.size>0,totalSelected:U.size,onCancel:()=>P(new Set)},i().createElement(l.TableBatchAction,{renderIcon:r.Vv,onClick:()=>{let t=e.filter(e=>U.has(e.uuid)),a=(0,m.showModal)("batch-change-appointments-statuses-modal",{appointments:t,closeModal:()=>a()})}},u("changeStatus","Change status"))),i().createElement(l.TableToolbarContent,{className:I.toolbarContent},i().createElement(l.TableToolbarSearch,{className:I.searchbar,labelText:u("filterAppointments","Filter appointments"),placeholder:u("filterTable","Filter table"),onChange:e=>b(e.target.value),persistent:!0,size:L}),i().createElement(l.MultiSelect,{id:"statusMultiSelect",size:L,items:Object.values(c.y2).map(e=>({id:e,label:u(e)})),itemToString:e=>e?e.label:"",label:u("filterAppointmentsByStatus","Filter appointments by status"),onChange:({selectedItems:e})=>y([...new Set(e.map(e=>e.id))]),type:"inline",selectedItems:g.map(e=>({id:e,label:u(e)}))}),i().createElement(l.Button,{size:L,kind:"tertiary",renderIcon:o.f5,onClick:()=>{let t=e[0]?.startDateTime?(0,m.formatDate)(new Date(e[0].startDateTime),{time:!1,noToday:!0}):null;(0,p.u)(e,z,`${a}_appointments_${t}`)}},u("download","Download")))),i().createElement(l.Table,w(),i().createElement(l.TableHead,null,i().createElement(l.TableRow,null,i().createElement(l.TableExpandHeader,{enableToggle:!0,...s()}),i().createElement(l.TableSelectAll,{...C(),checked:U.size===t.length&&U.size>0,onSelect:()=>{U.size<t.length?P(new Set(t.map(e=>e.id))):P(new Set)}}),n.map(e=>i().createElement(l.TableHeader,E({header:e,isSortable:!B.includes(e.key)}),e.header)))),i().createElement(l.TableBody,null,t.map(t=>{let a=e.find(e=>e.uuid===t.id);return a?i().createElement(i().Fragment,{key:t.id},i().createElement(l.TableExpandRow,f({row:t}),i().createElement(l.TableSelectRow,{...C({row:t}),checked:U.has(t.id),onSelect:()=>{U.has(t.id)?P(new Set([...U].filter(e=>e!==t.id))):P(new Set([...U,t.id]))}}),t.cells.map(e=>i().createElement(l.TableCell,{key:e.id},e.value?.content??e.value))),t.isExpanded?i().createElement(l.TableExpandedRow,{className:I.expandedRow,colSpan:n.length+2},i().createElement(A,{appointment:a})):i().createElement(l.TableExpandedRow,{className:I.hiddenRow,colSpan:n.length+2})):null})))),0===t.length?i().createElement("div",{className:I.tileContainer},i().createElement(l.Layer,null,i().createElement(l.Tile,{className:I.tile},i().createElement("div",{className:I.tileContent},i().createElement("p",{className:I.content},u("noAppointmentsToDisplay","No appointments to display")),i().createElement("p",{className:I.helper},u("checkFilters","Check the filters above")))))):i().createElement(l.Pagination,{backwardText:u("previousPage","Previous page"),forwardText:u("nextPage","Next page"),itemsPerPageText:u("itemsPerPage","Items per page")+":",page:v,pageNumberText:u("pageNumber","Page number"),pageSize:_,pageSizes:(0,d.uB)(e,_)??[],onChange:({page:e,pageSize:t})=>{T(e),h(t)},totalItems:e.length??0}))))}},9224(e,t,a){a.d(t,{Bm:()=>r,LZ:()=>l,WB:()=>s,uB:()=>i});var n=a(7125);function i(e,t=10){return e?Array.from({length:Math.ceil(e.length/t)},(e,a)=>(a+1)*t):[]}function s(e,t){return(0,n.useMemo)(()=>{if(t&&""!==t.trim()){let a=t.toLowerCase();return e.filter(e=>Object.entries(e).some(([e,t])=>"patientUuid"!==e&&`${t}`.toLowerCase().includes(a)))}return e},[t,e])}function l(e,t,a){return(0,n.useMemo)(()=>e.filter(e=>{if(a.length>0&&!a.includes(e.status))return!1;if(!t||""===t.trim())return!0;{let a=t.toLowerCase();return!!(e.patient.name?.toLowerCase()?.includes(a)||e.patient.identifier?.toLowerCase()?.includes(a))}}),[t,e,a])}function r(e,t){return t?.length>0?e.filter(({service:e})=>t.includes(e.uuid)):e}},8755(e,t,a){a.d(t,{K:()=>r,u:()=>l});var n=a(2164),i=a(2895),s=a(7003);async function l(e,t,a="Appointments"){let r=(await (0,i.getConfig)(s.AO)).includePhoneNumberInExcelSpreadsheet??!1,p=m(o(await Promise.all(e.map(async e=>{let a=t.find(t=>t.id===e.uuid),n=a?.identifier??e.patient.identifier,s=await (0,i.fetchCurrentPatient)(e.patient.uuid),l=r&&s?.telecom?s.telecom.map(e=>e?.value).join(", "):"";return{"Patient name":e.patient.name,Gender:"F"===e.patient.gender?"Female":"Male",Age:e.patient.age,Identifier:n,"Appointment type":e.service?.name,Date:(0,i.formatDate)(new Date(e.startDateTime),{mode:"wide"}),...r?{"Telephone number":l}:{}}}))),"Appointment list");(0,n._h)(p,`${a}.xlsx`,{compression:!0})}function r(e,t=`Unscheduled appointments ${(0,i.formatDate)(new Date,{year:!0,time:!0})}`){let a=m(o(e?.map(e=>({"Patient name":e.name,Gender:"F"===e.gender?"Female":"Male",Age:e.age,"Phone Number":e.phoneNumber??"--",Identifier:e.identifier??"--"}))),"Appointment list");(0,n._h)(a,`${t}.xlsx`,{compression:!0})}function o(e){let t=e.reduce((e,t)=>Math.max(e,t["Patient name"].length),30),a=n.Wp.json_to_sheet(e);return a["!cols"]=[{wch:t}],a}function m(e,t){let a=n.Wp.book_new();return n.Wp.book_append_sheet(a,e,t),a}},2373(e,t,a){a.d(t,{Ee:()=>o,Xz:()=>u,_h:()=>c,o_:()=>d,tF:()=>p,w:()=>_,xh:()=>m});var n=a(3464),i=a.n(n),s=a(2895),l=a(5084),r=a(7003);let o=e=>{let t=i()(e).startOf("day").format(r.BC);return`${s.restBaseUrl}/appointments?forDate=${encodeURIComponent(t)}`},m=e=>{let t=e.getHours(),a=e.getMinutes(),n=a<10?`0${a}`:a.toString();return`${t%12||12}:${n} ${t>=12?"PM":"AM"}`},p=(e,t)=>e.isSame(t,"month"),c=e=>{let t=i()(e).startOf("month"),a=i()(e).endOf("month"),n=i()(e).daysInMonth(),s=i()(e).subtract(1,"month"),l=i()(e).add(1,"month"),r=[];for(let e=s.daysInMonth()-t.day()+1;e<=s.daysInMonth();e++)r.push(s.date(e));for(let t=1;t<=n;t++)r.push(e.date(t));let o=r.length>30?7:14;for(let e=1;e<o-a.day();e++)r.push(l.date(e));return r},d=(e,t)=>{switch(e){case"M":return t("male","Male");case"F":return t("female","Female");case"O":return t("other","Other");case"U":return t("unknown","Unknown");default:return e}},u=e=>{(0,s.launchWorkspace2)("appointments-patient-search-workspace",{initialQuery:"",workspaceTitle:e("createNewAppointment","Create new appointment"),onPatientSelected(e,t,a,n){a(r.gC,{patientUuid:t.id})}},{startVisitWorkspaceName:"appointments-start-visit-workspace"})},_=(e,t)=>{let a={[l.y2.REQUESTED]:0,[l.y2.SCHEDULED]:1,[l.y2.CHECKEDIN]:3,[l.y2.COMPLETED]:4,[l.y2.CANCELLED]:4,[l.y2.MISSED]:4};return a[e]<a[t]||t===l.y2.SCHEDULED}},9391(e,t,a){a.d(t,{Ee:()=>n.Ee,Xz:()=>n.Xz,_h:()=>n._h,o_:()=>n.o_,tF:()=>n.tF,w:()=>n.w});var n=a(2373)},5845(e,t,a){a.d(t,{H:()=>o,M:()=>m});var n=a(8909),i=a.n(n),s=a(2895),l=a(1947),r=a(9391);let o=e=>{let t=(0,r.Ee)(e),{data:a,...n}=i()(t,s.openmrsFetch);return{appointmentList:a?.data??[],...n}},m=e=>{let t=(0,l.h)(),a=`${s.restBaseUrl}/appointment/earlyAppointment?forDate=${e||t}`,{data:n,error:r,isLoading:o}=i()(a,s.openmrsFetch,{errorRetryCount:2});return{earlyAppointmentList:n?.data??[],isLoading:o,error:r}}},5370(e,t,a){a.d(t,{q:()=>r});var n=a(7125),i=a(8909),s=a(2895);let l=`${s.restBaseUrl}/appointment`;function r(){let{mutate:e}=(0,i.useSWRConfig)();return{mutateAppointments:(0,n.useCallback)(()=>e(e=>"string"==typeof e&&e.startsWith(l)||Array.isArray(e)&&e[0].startsWith(l)),[e])}}},1947(e,t,a){a.d(t,{h:()=>r});var n=a(3464),i=a.n(n),s=a(7125),l=a(2745);function r(){let e=(0,l.useParams)();return(0,s.useMemo)(()=>{if(e.date){let t=i()(e.date,"YYYY-MM-DD").startOf("day");if(t.isValid())return t.format("YYYY-MM-DD");console.warn(`Invalid date format in URL parameter: ${e.date}. Format should be YYYY-MM-DD. Falling back to current date.`)}return i()().startOf("day").format("YYYY-MM-DD")},[e.date])}},2845(e,t,a){a.d(t,{DM:()=>c,oo:()=>u,yI:()=>d});var n=a(3464),i=a.n(n),s=a(8909),l=a.n(s),r=a(2895),o=a(5602),m=a.n(o);i().extend(m());let p=`${r.restBaseUrl}/appointments/search`;function c(e,t,a){let{data:n,error:s,isLoading:o,isValidating:m,mutate:c}=l()(e?[p,e,t]:null,()=>(0,r.openmrsFetch)(p,{method:"POST",signal:a.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:t}})),d=n?.data?.length?n.data:null,u=d?.sort((e,t)=>t.startDateTime>e.startDateTime?1:-1)?.filter(({status:e})=>"Cancelled"!==e)?.filter(({startDateTime:e})=>i()(new Date(e).toISOString()).isBefore(new Date().setHours(0,0,0,0))),_=d?.sort((e,t)=>e.startDateTime>t.startDateTime?1:-1)?.filter(({status:e})=>"Cancelled"!==e)?.filter(({startDateTime:e})=>i()(new Date(e).toISOString()).isAfter(i()().endOf("day"))),h=d?.sort((e,t)=>e.startDateTime>t.startDateTime?1:-1)?.filter(({status:e})=>"Cancelled"!==e)?.filter(({startDateTime:e})=>i()(new Date(e).toISOString()).isToday());return{data:n?{pastAppointments:u,upcomingAppointments:_,todaysAppointments:h}:null,error:s,isLoading:o,isValidating:m,mutate:c}}let d=async(e,t)=>{let a=Intl.DateTimeFormat().resolvedOptions().timeZone,n=i()(new Date).format("YYYY-MM-DDTHH:mm:ss.SSSZZ"),s=`${r.restBaseUrl}/appointments/${t}/status-change`;return await (0,r.openmrsFetch)(s,{body:{toStatus:e,onDate:n,timeZone:a},method:"POST",headers:{"Content-Type":"application/json"}})},u=async e=>{let t=`${r.restBaseUrl}/appointment?uuid=${e}`,{data:a}=await (0,r.openmrsFetch)(t);return a?.status}},3639(e,t,a){a.d(t,{nS:()=>l});var n=a(2895);let i=(0,n.createGlobalStore)("appointments-app",{appointmentServiceTypes:[],selectedAppointmentStatuses:[]},"sessionStorage"),s={setAppointmentServiceTypes:(e,t)=>({appointmentServiceTypes:t}),setSelectedAppointmentStatuses:(e,t)=>({selectedAppointmentStatuses:t})};function l(){return(0,n.useStoreWithActions)(i,s)}}}]);
package/dist/9399.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"9399.js","sources":["webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/checkin-button.component.tsx","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-actions.component.tsx","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-actions.scss?51e4","webpack://@openmrs/esm-appointments-app/./src/appointments/details/appointment-details.scss?32fd","webpack://@openmrs/esm-appointments-app/./src/appointments/details/appointment-details.component.tsx","webpack://@openmrs/esm-appointments-app/./src/hooks/usePatientAppointmentHistory.ts","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-table.scss?859e","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-table.component.tsx","webpack://@openmrs/esm-appointments-app/./src/hooks/useActiveVisits.ts","webpack://@openmrs/esm-appointments-app/./src/appointments/utils.tsx","webpack://@openmrs/esm-appointments-app/./src/helpers/excel.ts","webpack://@openmrs/esm-appointments-app/./src/helpers/functions.ts","webpack://@openmrs/esm-appointments-app/./src/hooks/useAppointmentList.ts","webpack://@openmrs/esm-appointments-app/./src/hooks/useMutateAppointments.ts","webpack://@openmrs/esm-appointments-app/./src/hooks/useSelectedDate.ts","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-appointments.resource.ts","webpack://@openmrs/esm-appointments-app/./src/store.ts"],"names":["appointment","patientUuid","hasActiveVisit","mutateVisits","checkInButton","useConfig","t","useTranslation","mutateAppointments","useMutateAppointments","checkIn","successSubtitle","changeAppointmentStatus","showSnackbar","error","console","Button","navigate","launchWorkspace2","getAppointmentStatus","checkOutButton","isCheckedIn","AppointmentStatus","isCompleted","isCancelled","isScheduled","dispose","showModal","CheckInButton","isEnabledQuery","setIsEnabledQuery","useState","appointmentsCount","isLoading","usePatientAppointmentHistory","abortController","AbortController","appointmentsSearchUrl","restBaseUrl","selectedDate","useSelectedDate","data","isValidating","useSWR","openmrsFetch","missedAppointments","completedAppointments","cancelledAppointments","upcomingAppointments","dayjs","Number","patient","usePatient","useEffect","formatDatetime","Date","getGender","formatDate","contact","i","appointments","tableHeading","pageSize","setPageSize","searchString","setSearchString","selectedAppointmentStatuses","setSelectedAppointmentStatuses","useAppointmentsStore","appointmentsTableColumns","searchResults","useAppointmentSearchResults","results","goTo","currentPage","usePagination","customPatientChartUrl","patientIdentifierType","selectedAppointmentUuids","setSelectedAppointmentUuids","Set","layout","useLayoutType","responsiveSize","isDesktop","visits","useActiveVisits","visitsUrl","mutate","activeVisitsByPatientUuid","useMemo","Map","visit","unsortableColumns","headerData","columnKey","rowData","ConfigurableLink","styles","AppointmentActions","OverflowMenu","OverflowMenuItem","DataTableSkeleton","Layer","DataTable","rows","headers","getExpandHeaderProps","getHeaderProps","getRowProps","getSelectionProps","getTableProps","getTableContainerProps","getToolbarProps","TableContainer","TableToolbar","TableBatchActions","TableBatchAction","Calendar","selectedAppointments","app","closeModal","TableToolbarContent","TableToolbarSearch","event","MultiSelect","Object","status","item","selectedItems","Download","date","exportAppointmentsToSpreadsheet","Table","TableHead","TableRow","TableExpandHeader","TableSelectAll","row","header","TableHeader","TableBody","matchingAppointment","React","TableExpandRow","TableSelectRow","uuid","cell","TableCell","TableExpandedRow","AppointmentDetails","Tile","Pagination","getPageSizes","page","Array","Math","_","useSearchResults","search","value","lowerCaseSearch","filterByServiceType","appointmentList","appointmentServiceTypes","service","fileName","includePhoneNumbers","config","getConfig","moduleName","workbook","createWorkbook","createWorksheet","Promise","identifier","patientInfo","fetchCurrentPatient","phoneNumber","telecomObj","writeFile","exportUnscheduledAppointmentsToSpreadsheet","unscheduledAppointments","max_width","w","r","worksheet","utils","sheetName","buildAppointmentsUrl","isoDate","startOfDay","omrsDateFormat","encodeURIComponent","formatAMPM","hours24","minutes","minutesStr","isSameMonth","cellDate","currentDate","monthDays","monthStart","monthEnd","lastMonth","nextMonth","days","dayLen","gender","launchCreateAppointmentForm","launchChildWorkspace","closeWorkspace","appointmentsFormWorkspace","canTransition","fromStatus","toStatus","sequences","useAppointmentList","searchUrl","rest","useEarlyAppointmentList","startDate","url","appointmentUrlMatcher","useSWRConfig","useCallback","key","params","useParams","parsedDate","isToday","usePatientAppointments","pastAppointments","a","b","startDateTime","todaysAppointments","appointmentUuid","timeZone","Intl","statusChangeTime","appointmentsStore","createGlobalStore","storeActions","useStoreWithActions"],"mappings":"qSAkGA,MA/EoD,CAAC,CAAEA,YAAAA,CAAW,CAAEC,YAAAA,CAAW,CAAEC,eAAAA,CAAc,CAAEC,aAAA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A,CACE,wBAAyB,EAAE,CAC3B,4BAA6B,EAAE,AACjC,EACA,kBAGWC,EAAe,CAC1B,4BAA2BtF,EAAGO,IACrB,EAAEA,wBAAAA,CAAwB,GAEnC,gCAA+BP,EAAG3F,IACzB,EAAEA,4BAAAA,CAA4B,EAEzC,EAEO,SAASE,IACd,MAAOgL,AAAAA,GAAAA,EAAAA,mBAAAA,AAAAA,EAAoBH,EAAmBE,EAChD,C"}
1
+ {"version":3,"file":"9399.js","sources":["webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/checkin-button.component.tsx","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-actions.component.tsx","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-actions.scss?51e4","webpack://@openmrs/esm-appointments-app/./src/appointments/details/appointment-details.scss?32fd","webpack://@openmrs/esm-appointments-app/./src/appointments/details/appointment-details.component.tsx","webpack://@openmrs/esm-appointments-app/./src/hooks/usePatientAppointmentHistory.ts","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-table.scss?859e","webpack://@openmrs/esm-appointments-app/./src/appointments/common-components/appointments-table.component.tsx","webpack://@openmrs/esm-appointments-app/./src/hooks/useActiveVisits.ts","webpack://@openmrs/esm-appointments-app/./src/appointments/utils.tsx","webpack://@openmrs/esm-appointments-app/./src/helpers/excel.ts","webpack://@openmrs/esm-appointments-app/./src/helpers/functions.ts","webpack://@openmrs/esm-appointments-app/./src/hooks/useAppointmentList.ts","webpack://@openmrs/esm-appointments-app/./src/hooks/useMutateAppointments.ts","webpack://@openmrs/esm-appointments-app/./src/hooks/useSelectedDate.ts","webpack://@openmrs/esm-appointments-app/./src/patient-appointments/patient-appointments.resource.ts","webpack://@openmrs/esm-appointments-app/./src/store.ts"],"names":["appointment","patientUuid","hasActiveVisit","mutateVisits","checkInButton","useConfig","t","useTranslation","mutateAppointments","useMutateAppointments","checkIn","successSubtitle","changeAppointmentStatus","showSnackbar","error","console","Button","navigate","launchWorkspace2","getAppointmentStatus","checkOutButton","isCheckedIn","AppointmentStatus","isCompleted","isCancelled","isScheduled","dispose","showModal","CheckInButton","isEnabledQuery","setIsEnabledQuery","useState","appointmentsCount","isLoading","usePatientAppointmentHistory","abortController","AbortController","appointmentsSearchUrl","restBaseUrl","selectedDate","useSelectedDate","data","isValidating","useSWR","openmrsFetch","missedAppointments","completedAppointments","cancelledAppointments","upcomingAppointments","dayjs","Number","patient","usePatient","useEffect","formatDatetime","Date","getGender","formatDate","parseDate","contact","i","appointments","tableHeading","pageSize","setPageSize","searchString","setSearchString","selectedAppointmentStatuses","setSelectedAppointmentStatuses","useAppointmentsStore","appointmentsTableColumns","searchResults","useAppointmentSearchResults","results","goTo","currentPage","usePagination","customPatientChartUrl","patientIdentifierType","selectedAppointmentUuids","setSelectedAppointmentUuids","Set","layout","useLayoutType","responsiveSize","isDesktop","visits","useActiveVisits","visitsUrl","mutate","activeVisitsByPatientUuid","useMemo","Map","visit","unsortableColumns","headerData","columnKey","rowData","ConfigurableLink","styles","AppointmentActions","OverflowMenu","OverflowMenuItem","DataTableSkeleton","Layer","DataTable","rows","headers","getExpandHeaderProps","getHeaderProps","getRowProps","getSelectionProps","getTableProps","getTableContainerProps","getToolbarProps","TableContainer","TableToolbar","TableBatchActions","TableBatchAction","Calendar","selectedAppointments","app","closeModal","TableToolbarContent","TableToolbarSearch","event","MultiSelect","Object","status","item","selectedItems","Download","date","exportAppointmentsToSpreadsheet","Table","TableHead","TableRow","TableExpandHeader","TableSelectAll","row","header","TableHeader","TableBody","matchingAppointment","React","TableExpandRow","TableSelectRow","uuid","cell","TableCell","TableExpandedRow","AppointmentDetails","Tile","Pagination","getPageSizes","page","Array","Math","_","useSearchResults","search","value","lowerCaseSearch","filterByServiceType","appointmentList","appointmentServiceTypes","service","fileName","includePhoneNumbers","config","getConfig","moduleName","workbook","createWorkbook","createWorksheet","Promise","identifier","patientInfo","fetchCurrentPatient","phoneNumber","telecomObj","writeFile","exportUnscheduledAppointmentsToSpreadsheet","unscheduledAppointments","max_width","w","r","worksheet","utils","sheetName","buildAppointmentsUrl","isoDate","startOfDay","omrsDateFormat","encodeURIComponent","formatAMPM","hours24","minutes","minutesStr","isSameMonth","cellDate","currentDate","monthDays","monthStart","monthEnd","lastMonth","nextMonth","days","dayLen","gender","launchCreateAppointmentForm","launchChildWorkspace","closeWorkspace","appointmentsFormWorkspace","canTransition","fromStatus","toStatus","sequences","useAppointmentList","searchUrl","rest","useEarlyAppointmentList","startDate","url","appointmentUrlMatcher","useSWRConfig","useCallback","key","params","useParams","parsedDate","isToday","usePatientAppointments","pastAppointments","a","b","startDateTime","todaysAppointments","appointmentUuid","timeZone","Intl","statusChangeTime","appointmentsStore","createGlobalStore","storeActions","useStoreWithActions"],"mappings":"qSAkGA,MA/EoD,CAAC,CAAEA,YAAAA,CAAW,CAAEC,YAAAA,CAAW,CAAEC,eAAAA,CAAc,CAAEC,aAAAA,CAAY,CAAE,IAC7G,GAAM,CAAEC,cAAAA,CAAa,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,SAAAA,AAAAA,IACpB,CAAEC,EAAAA,CAAC,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,IACR,CAAEC,mBAAAA,CAAkB,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,IAGzBC,EAAU,AAACC,GACfC,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAwB,YAAaZ,EAAY,IAAI,EAClD,IAAI,CAAC,KACJa,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAa,CACX,MAAOP,EAAE,YAAa,cACtB,SAAUK,EACV,KAAM,UACN,cAAe,EACjB,GACAH,KACF,GACC,KAAK,CAAC,AAACM,IACNC,QAAQ,KAAK,CAAC,mBAAoBD,GAClCD,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAa,CACX,MAAOP,EAAE,gBAAiB,mBAC1B,SACEQ,GAAO,SAAWR,EAAE,2BAA4B,uDAClD,KAAM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,MAAQ,MAAM,CAF1B,6BAGjBwK,EAAM,CAAC,EAAEzL,EAAAA,WAAWA,CAAC,cAAc,EAAEwM,EAAgB,cAAc,CAAC,CAC1E,OAAO,MAAMlM,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAamL,EAAK,CAC7B,KAAM,CAAEP,SAAAA,EAAU,OAAQyB,EAAkB,SAAUF,CAAS,EAC/D,OAAQ,OACR,QAAS,CAAE,eAAgB,kBAAmB,CAChD,EACF,EAGa5N,EAAuB,MAAO2N,IACzC,IAAMf,EAAM,CAAC,EAAEzL,EAAAA,WAAWA,CAAC,kBAAkB,EAAEwM,EAAgB,CAAC,CAC1D,CAAErM,KAAAA,CAAI,CAAE,CAAG,MAAMG,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAkCmL,GACzD,OAAOtL,GAAM,MACf,C,8CCxEO,IAAMyM,EAAoBC,AAAAA,GAAAA,EAAAA,iBAAAA,AAAAA,EAC/B,mBACA,CACE,wBAAyB,EAAE,CAC3B,4BAA6B,EAAE,AACjC,EACA,kBAGWC,EAAe,CAC1B,4BAA2BtF,EAAGO,IACrB,EAAEA,wBAAAA,CAAwB,GAEnC,gCAA+BP,EAAG3F,IACzB,EAAEA,4BAAAA,CAA4B,EAEzC,EAEO,SAASE,IACd,MAAOgL,AAAAA,GAAAA,EAAAA,mBAAAA,AAAAA,EAAoBH,EAAmBE,EAChD,C"}
@@ -1,3 +1,3 @@
1
- var _openmrs_esm_appointments_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@openmrs/esm-appointments-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@openmrs/esm-appointments-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,o,i={7368(e,t,r){"use strict";var n,o,i,a,s,l,u,p,c,d,f,h,m=r(523),g=r.n(m);let b=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),y={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},M=null!=(i=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?i:{},O=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},_=null!=(s=null==(d=r.consumesLoadingData)?void 0:d.moduleIdToConsumeDataMapping)?s:{},v={},R=[],T={},w=null==(f=r.initializeExposesData)?void 0:f.shareScope;for(let e in g())r.federation[e]=g()[e];m(r.federation,"consumesLoadingModuleToHandlerMapping",()=>{let e={};for(let[t,r]of Object.entries(_))e[t]={getter:r.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:r.requiredVersion,strictVersion:r.strictVersion,singleton:r.singleton,eager:r.eager},scope:[r.shareScope]},shareKey:r.shareKey};return e}),m(r.federation,"initOptions",()=>({})),m(r.federation.initOptions,"name",()=>"@openmrs/esm-appointments-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(M))for(let n of r)if("object"==typeof n&&null!==n){let{name:r,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:o,scope:[t],shareConfig:p,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(y).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>b),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>y),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=y[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},2243(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},1772(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},9837(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(1772);let n=r(7789),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},3738(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(1772);let n=r(7789),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},7789(e,t,r){r(1772);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-appointments-app:11.1.1-pre.9828";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},223(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3545(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},6917(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},1864(e,t,r){let n=r(3545),o=r(1092),i=r(2677),a=r(85),s=r(6781);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:p,moduleToHandlerMapping:c}=e;n.attachShareScopeMap(u),u.o(p,t)&&p[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:o}=c[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=i.getUsedExports(u,p),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[o.options.name]});let b=o.loadShare(p,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:p}));return h?.()||d()}return e});b.then?r.push(l[e]=b.then(t).catch(n)):t(b)}catch(e){n(e)}})}},85(e,t){t.RUNTIME_012="RUNTIME-012"},6781(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
1
+ var _openmrs_esm_appointments_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@openmrs/esm-appointments-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@openmrs/esm-appointments-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,o,i={7368(e,t,r){"use strict";var n,o,i,a,s,l,u,p,c,d,f,h,m=r(523),g=r.n(m);let b=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),y={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},M=null!=(i=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?i:{},O=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},_=null!=(s=null==(d=r.consumesLoadingData)?void 0:d.moduleIdToConsumeDataMapping)?s:{},v={},R=[],T={},w=null==(f=r.initializeExposesData)?void 0:f.shareScope;for(let e in g())r.federation[e]=g()[e];m(r.federation,"consumesLoadingModuleToHandlerMapping",()=>{let e={};for(let[t,r]of Object.entries(_))e[t]={getter:r.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:r.requiredVersion,strictVersion:r.strictVersion,singleton:r.singleton,eager:r.eager},scope:[r.shareScope]},shareKey:r.shareKey};return e}),m(r.federation,"initOptions",()=>({})),m(r.federation.initOptions,"name",()=>"@openmrs/esm-appointments-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(M))for(let n of r)if("object"==typeof n&&null!==n){let{name:r,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:o,scope:[t],shareConfig:p,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(y).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>b),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>y),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=y[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},2243(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},1772(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},9837(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(1772);let n=r(7789),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},3738(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(1772);let n=r(7789),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},7789(e,t,r){r(1772);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-appointments-app:11.1.1-pre.9832";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},223(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3545(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},6917(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},1864(e,t,r){let n=r(3545),o=r(1092),i=r(2677),a=r(85),s=r(6781);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:p,moduleToHandlerMapping:c}=e;n.attachShareScopeMap(u),u.o(p,t)&&p[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:o}=c[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=i.getUsedExports(u,p),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[o.options.name]});let b=o.loadShare(p,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:p}));return h?.()||d()}return e});b.then?r.push(l[e]=b.then(t).catch(n)):t(b)}catch(e){n(e)}})}},85(e,t){t.RUNTIME_012="RUNTIME-012"},6781(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
2
2
  ${n}`),o.join("\n")}},1315(e,t){t.getSharedFallbackGetter=({shareKey:e,factory:t,version:r,webpackRequire:n,libraryType:o="global"})=>{let{runtime:i,instance:a,bundlerRuntime:s,sharedFallback:l}=n.federation;if(!l)return t;let u=l[e];if(!u)return t;let p=r?u.find(e=>e[1]===r):u[0];if(!p)throw Error(`No fallback item found for shareKey: ${e} and version: ${r}`);return()=>i.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:p[2],entry:`${n.p}${p[0]}`,type:o,entryGlobalName:p[2],shareScope:"default"}}).then(t=>{if(!t)throw Error(`Failed to load fallback entry for shareKey: ${e} and version: ${r}`);return t.init(n.federation.instance,s).then(()=>t.get())})}},2677(e,t){t.getUsedExports=function(e,t){let r=e.federation.usedExports;if(r)return r[t]}},523(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let n=r(223),o=r(3545),i=r(3586),a=r(1864),s=r(2221),l=r(4307),u=r(1180),p=r(367),c=r(1315),d=r(3738);d=n.__toESM(d);let f={remotes:i.remotes,consumes:a.consumes,I:s.initializeSharing,S:{},installInitialConsumes:l.installInitialConsumes,initContainerEntry:u.initContainerEntry,init:p.init,getSharedFallbackGetter:c.getSharedFallbackGetter},h={runtime:d,instance:void 0,initOptions:void 0,bundlerRuntime:f,attachShareScopeMap:o.attachShareScopeMap,bundlerRuntimeOptions:{}},m=h.instance,g=h.initOptions,b=h.bundlerRuntimeOptions;t.attachShareScopeMap=o.attachShareScopeMap,t.bundlerRuntime=f,t.bundlerRuntimeOptions=b,t.default=h,t.initOptions=g,t.instance=m,Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return d}})},367(e,t,r){let n=r(223),o=r(3738),i=r(9837);i=n.__toESM(i),t.init=function({webpackRequire:e}){let{initOptions:t,runtime:n,sharedFallback:a,bundlerRuntime:s,libraryType:l}=e.federation;if(!t)throw Error("initOptions is required!");return t.plugins||=[],t.plugins.push({name:"tree-shake-plugin",beforeInit(t){let{userOptions:n,origin:u,options:p}=t,c=n.version||p.version;if(!a)return t;let d=n.shared||{},f=[];Object.keys(d).forEach(t=>{(Array.isArray(d[t])?d[t]:[d[t]]).forEach(r=>{f.push([t,r]),"get"in r&&(r.treeShaking||={},r.treeShaking.get=r.get,r.get=s.getSharedFallbackGetter({shareKey:t,factory:r.get,webpackRequire:e,libraryType:l,version:r.version}))})});let h=i.default.global.getGlobalSnapshotInfoByModuleInfo({name:u.name,version:c});return h&&"shared"in h&&(Object.keys(p.shared||{}).forEach(e=>{p.shared[e].forEach(t=>{f.push([e,t])})}),f.forEach(([e,t])=>{((e,t)=>{let n=h.shared.find(t=>t.sharedName===e);if(!n)return;let{treeShaking:i}=t;if(!i)return;let{secondarySharedTreeShakingName:a,secondarySharedTreeShakingEntry:s,treeShakingStatus:p}=n;i.status!==p&&(i.status=p,s&&l&&a&&(i.get=async()=>{let e=await (0,o.getRemoteEntry)({origin:u,remoteInfo:{name:a,entry:s,type:l,entryGlobalName:a,shareScope:"default"}});return await e.init(u,r.federation.bundlerRuntime),e.get()}))})(e,t)})),t}}),n.init(t)}},1180(e,t){t.initContainerEntry=function(e){let{webpackRequire:t,shareScope:r,initScope:n,shareScopeKey:o,remoteEntryInitOptions:i}=e;if(!t.S||!t.federation||!t.federation.instance||!t.federation.initOptions)return;let a=t.federation.instance;a.initOptions({name:t.federation.initOptions.name,remotes:[],...i});let s=i?.shareScopeKeys,l=i?.shareScopeMap;if(o&&"string"!=typeof o)o.forEach(e=>{if(!s||!l)return void a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}});l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})});else{let e=o||"default";Array.isArray(s)?s.forEach(e=>{l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})}):a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}})}return(t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),Array.isArray(o))?t.federation.initOptions.shared?t.I(o,n):Promise.all(o.map(e=>t.I(e,n))).then(()=>!0):t.I(o||"default",n)}},2221(e,t,r){let n=r(3545),o=r(6917);t.initializeSharing=function({shareScopeName:e,webpackRequire:t,initPromises:r,initTokens:i,initScope:a}){let s=Array.isArray(e)?e:[e];var l=[],u=function(s){a||(a=[]);let l=t.federation.instance;var u=i[s];if(u||(u=i[s]={from:l.name}),a.indexOf(u)>=0)return;a.push(u);let p=r[s];if(p)return p;var c=r=>{var n=e=>{let t;return t="Initialization of sharing external failed: "+e,"u">typeof console&&console.warn&&console.warn(t)};try{var o=t(r);if(!o)return;var i=r=>r&&r.init&&r.init(t.S[s],a,{shareScopeMap:t.S||{},shareScopeKeys:e});if(o.then)return d.push(o.then(i,n));var l=i(o);if(l&&"boolean"!=typeof l&&l.then)return d.push(l.catch(n))}catch(e){n(e)}};let d=l.initializeSharing(s,{strategy:l.options.shareStrategy,initScope:a,from:"build"});n.attachShareScopeMap(t);let f=t.federation.bundlerRuntimeOptions.remotes;return(f&&Object.keys(f.idToRemoteMap).forEach(e=>{let t=f.idToRemoteMap[e],r=f.idToExternalAndNameMapping[e][2];if(t.length>1)c(r);else if(1===t.length){let e=t[0];o.FEDERATION_SUPPORTED_TYPES.includes(e.externalType)||c(r)}}),d.length)?r[s]=Promise.all(d).then(()=>r[s]=!0):r[s]=!0};return s.forEach(e=>{l.push(u(e))}),Promise.all(l).then(()=>!0)}},4307(e,t,r){let n=r(1092),o=r(2677);t.installInitialConsumes=function(e){n.updateConsumeOptions(e);let{moduleToHandlerMapping:t,webpackRequire:r,installedModules:i,initialConsumes:a,asyncLoad:s}=e,l=[];a.forEach(e=>{l.push([e,()=>(function(e){let{moduleId:t,moduleToHandlerMapping:r,webpackRequire:n,asyncLoad:i}=e,a=n.federation.instance;if(!a)throw Error("Federation instance not found!");let{shareKey:s,shareInfo:l}=r[t];try{let e=o.getUsedExports(n,s),t={...l};if(e&&(t.treeShaking={usedExports:e,useIn:[a.options.name]}),i)return a.loadShare(s,{customShareInfo:t});return a.loadShareSync(s,{customShareInfo:t})}catch(e){throw console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.'),console.error("The original error message is as follows: "),e}})({moduleId:e,moduleToHandlerMapping:t,webpackRequire:r,asyncLoad:s})])});let u=(e,n)=>{r.m[e]=o=>{i[e]=0,delete r.c[e];let a=n();if("function"!=typeof a)throw Error(`Shared module is not available for eager consumption: ${e}`);let s=a(),{shareInfo:l}=t[e];if(l?.shareConfig?.layer&&s&&"object"==typeof s)try{s.hasOwnProperty("layer")&&void 0!==s.layer||(s.layer=l.shareConfig.layer)}catch(e){}o.exports=s}};if(s)return Promise.all(l.map(async([e,t])=>{let r=await t();u(e,()=>r)}));l.forEach(([e,t])=>{u(e,t)})}},3586(e,t,r){r(223);let n=r(3545),o=r(6917),i=r(1092),a=r(1853);t.remotes=function(e){i.updateRemoteOptions(e);let{chunkId:t,promises:r,webpackRequire:s,chunkMapping:l,idToExternalAndNameMapping:u,idToRemoteMap:p}=e;n.attachShareScopeMap(s),s.o(l,t)&&l[t].forEach(e=>{let t=s.R;t||(t=[]);let n=u[e],i=p[e]||[];if(t.indexOf(n)>=0)return;if(t.push(n),n.p)return r.push(n.p);let l=t=>{t||(t=Error("Container missing")),"string"==typeof t.message&&(t.message+=`
3
3
  while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},c=(e,t,o,i,a,s)=>{try{let u=e(t,o);if(!u||!u.then)return a(u,i,s);{let e=u.then(e=>a(e,i),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,o)=>c(r.get,n[1],t,0,f,o),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===i.length&&o.FEDERATION_SUPPORTED_TYPES.includes(i[0].externalType)&&i[0].name?c(()=>{try{let e=(0,a.decodeName)(i[0].name,a.ENCODE_NAME_PREFIX)+n[1].slice(1),t=s.federation.instance,r=()=>s.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===t.options.shareStrategy){let e=Array.isArray(n[0])?n[0]:[n[0]];return Promise.all(e.map(e=>t.sharedHandler.initializeSharing(e))).then(()=>r())}return r()}catch(e){l(e)}},n[2],0,0,f,1):c(s,n[2],0,0,(e,t,r)=>e?c(s.I,n[0],0,e,d,r):l(),1)})}},1092(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:o}=t,{sharedFallback:i,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:o={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(o).forEach(([e,n])=>{r[e]||(r[e]={getter:i?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:i?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:i?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){let{initialConsumes:t=[]}=e;l.forEach(e=>{t.includes(e)||t.push(e)})}if("chunkMapping"in e){let{chunkMapping:t={}}=e;Object.entries(u).forEach(([e,r])=>{t[e]||(t[e]=[]),r.forEach(r=>{t[e].includes(r)||t[e].push(r)})})}n._updated=1}if(o&&!o._updated){let{federation:e}=t;if(!e.instance||!o.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(o.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={requiredVersion:`^${o}`},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:o,scope:[e],shareConfig:p,get:i};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),o._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:o={}}=e,{remotesLoadingData:i}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!i||i._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=i;if(s&&l){for(let[e,t]of Object.entries(l))if(r[e]||(r[e]=[t.shareScope,t.name,t.externalModuleId]),!n[e]&&a[t.remoteName]){let r=a[t.remoteName];n[e]||=[],r.forEach(t=>{n[e].includes(t)||n[e].push(t)})}o&&Object.entries(s).forEach(([e,t])=>{o[e]||(o[e]=[]),t.forEach(t=>{o[e].includes(t)||o[e].push(t)})}),i._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e].call(r.exports,r,r.exports,s),r.exports}s.m=i,s.c=a,s.x=()=>s(2243),s.federation||(s.federation={chunkMatcher:function(e){return!/^(9(181|270|794)|1373|5943|7226|8678)$/.test(e)},rootOutputDir:""}),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".js",s.miniCssF=e=>""+e+".css",s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l={},s.l=function(e,t,r,n){if(l[e])return void l[e].push(t);if(void 0!==r)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var p=a[u];if(p.getAttribute("src")==e||p.getAttribute("data-rspack")=="@openmrs/esm-appointments-app:"+r){o=p;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@openmrs/esm-appointments-app:"+r),o.src=e),l[e]=[t];var c=function(t,r){o.onerror=o.onload=null,clearTimeout(d);var n=l[e];if(delete l[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@carbon/react",version:"1.92.1",factory:()=>Promise.all([s.e("9011"),s.e("6479"),s.e("5361"),s.e("3600"),s.e("682"),s.e("5713"),s.e("9270"),s.e("8678")]).then(()=>()=>s(5208)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"10.0.1-pre.5630",factory:()=>Promise.all([s.e("9011"),s.e("9024"),s.e("3600"),s.e("6557"),s.e("7505"),s.e("7226"),s.e("1373"),s.e("9270"),s.e("8678"),s.e("5943"),s.e("9794")]).then(()=>()=>s(5032)),eager:0,singleton:1,requiredVersion:"10.x",strictVersion:0},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([s.e("689"),s.e("9270")]).then(()=>()=>s(3144)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("1789"),s.e("9270")]).then(()=>()=>s(2348)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react-router-dom",version:"6.30.1",factory:()=>Promise.all([s.e("9712"),s.e("9270"),s.e("8678")]).then(()=>()=>s(7059)),eager:0,singleton:1,requiredVersion:"6.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("466").then(()=>()=>s(4041)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("9270")]).then(()=>()=>s(2372)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("9270"),s.e("9061")]).then(()=>()=>s(9876)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("9270"),s.e("9771")]).then(()=>()=>s(2470)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("9270"),s.e("7209")]).then(()=>()=>s(5216)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@openmrs/esm-appointments-app"},s.I=s.I||function(){throw Error("should have __webpack_require__.I")},s.g.importScripts&&(u=s.g.location+"");var l,u,p=s.g.document;if(!u&&p&&(p.currentScript&&"SCRIPT"===p.currentScript.tagName.toUpperCase()&&(u=p.currentScript.src),!u)){var c=p.getElementsByTagName("script");if(c.length)for(var d=c.length-1;d>-1&&(!u||!/^http(s?):/.test(u));)u=c[d--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");if(s.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.consumesLoadingData={chunkMapping:{9270:["7125"],1373:["8909","5910"],7654:["2895"],8678:["6693"],5943:["9106","5292","4498"],9794:["2745"],7226:["5921"]},moduleIdToConsumeDataMapping:{4498:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("1442")]).then(()=>()=>s(9876))},7125:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("466").then(()=>()=>s(4041))},8909:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("9590")]).then(()=>()=>s(5216))},6693:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("689").then(()=>()=>s(3144))},2895:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"10.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("9011"),s.e("9024"),s.e("3600"),s.e("6557"),s.e("7505"),s.e("7226"),s.e("1373"),s.e("8678"),s.e("5943")]).then(()=>()=>s(5032))},5292:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("2152")]).then(()=>()=>s(2470))},5910:{shareScope:"default",shareKey:"@carbon/react",import:"@carbon/react",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("9011"),s.e("6479"),s.e("5361"),s.e("3600"),s.e("682"),s.e("5713"),s.e("8678")]).then(()=>()=>s(5208))},2745:{shareScope:"default",shareKey:"react-router-dom",import:"react-router-dom",requiredVersion:"6.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("9712"),s.e("8678")]).then(()=>()=>s(7059))},9106:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3989").then(()=>()=>s(2372))},5921:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("1789").then(()=>()=>s(2348))}},initialConsumes:[]},s.f.consumes=s.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},"u">typeof document){var f=function(e,t,r,n,o){var i=document.createElement("link");return i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.href=t,i.onerror=i.onload=function(r){if(i.onerror=i.onload=null,"load"===r.type)n();else{var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=s,i.parentNode&&i.parentNode.removeChild(i),o(l)}},r?r.parentNode.insertBefore(i,r.nextSibling):document.head.appendChild(i),i},h=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=r[n],i=o.getAttribute("data-href")||o.getAttribute("href");if(i&&(i=i.split("?")[0]),"stylesheet"===o.rel&&(i===e||i===t))return o}for(var a=document.getElementsByTagName("style"),n=0;n<a.length;n++){var o=a[n],i=o.getAttribute("data-href");if(i===e||i===t)return o}},m={1293:0};s.f.miniCss=function(e,t){if(m[e])t.push(m[e]);else 0!==m[e]&&({1884:1,2495:1,2620:1,3724:1,4307:1,5556:1,606:1,6773:1,6789:1,7505:1,8937:1,8945:1,8981:1,9181:1,9443:1})[e]&&t.push(m[e]=new Promise(function(t,r){var n=s.miniCssF(e),o=s.p+n;if(h(n,o))return t();f(e,o,null,t,r)}).then(function(){m[e]=0},function(t){throw delete m[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("9270"),s.e("9794"),s.e("7654")]).then(()=>()=>s(3189))},shareScope:"default"},s.getContainer=s.getContainer||function(){throw Error("should have __webpack_require__.getContainer")},s.initContainer=s.initContainer||function(){throw Error("should have __webpack_require__.initContainer")},e={1293:0},s.f.j=function(t,r){var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(9(181|270|794)|1373|5943|7226|8678)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=o);var i=s.p+s.u(t),a=Error();s.l(i,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,o,[i,a,l]=r,u=0;if(i.some(t=>0!==e[t])){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);l&&l(s)}for(t&&t(r);u<i.length;u++)o=i[u],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},(r=globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),s.ruid="bundler=rspack@1.7.9",n=s.x,o=!1,s.x=function(){if(o||(o=!0,s(7368)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_openmrs_esm_appointments_app=s.x()})();
@@ -25,7 +25,7 @@
25
25
  "auxiliaryFiles": [
26
26
  "openmrs-esm-appointments-app.js.map"
27
27
  ],
28
- "hash": "dd270d84863bf04f",
28
+ "hash": "626da2bc2f89616a",
29
29
  "childrenByOrder": {}
30
30
  },
31
31
  {
@@ -2098,9 +2098,9 @@
2098
2098
  "initial": false,
2099
2099
  "entry": false,
2100
2100
  "reason": "split chunk (cache group: default)",
2101
- "size": 46557,
2101
+ "size": 46569,
2102
2102
  "sizes": {
2103
- "javascript": 46557
2103
+ "javascript": 46569
2104
2104
  },
2105
2105
  "names": [],
2106
2106
  "idHints": [
@@ -2115,7 +2115,7 @@
2115
2115
  "auxiliaryFiles": [
2116
2116
  "9399.js.map"
2117
2117
  ],
2118
- "hash": "c2ce67e5083e9e7b",
2118
+ "hash": "b62cfffce19d9089",
2119
2119
  "childrenByOrder": {}
2120
2120
  },
2121
2121
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0","appointments":">=2.0.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"},"order":2},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-dashboard","slot":"appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"hideDashboardTitle":true,"path":"appointments","slot":"patient-chart-appointments-dashboard-slot","title":"Appointments"}},{"name":"appointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"visit-form-top-slot"},{"name":"home-appointments-tile","slot":"home-metrics-tiles-slot","component":"homeAppointmentsTile"},{"name":"metrics-card-scheduled-appointments","component":"metricsCardScheduledAppointments","slot":"appointments-metrics-slot","order":1},{"name":"metrics-card-highest-volume-service","component":"metricsCardHighestVolumeService","slot":"appointments-metrics-slot","order":2},{"name":"metrics-card-providers-booked","component":"metricsCardProvidersBooked","slot":"appointments-metrics-slot","order":3}],"modals":[{"name":"end-appointment-modal","component":"endAppointmentModal"},{"name":"cancel-appointment-modal","component":"cancelAppointmentModal"},{"name":"batch-change-appointments-statuses-modal","component":"batchChangeAppointmentStatusesModal"}],"workspaceGroups2":[{"name":"appointments-group","scopePattern":"/home/appointments"}],"workspaceWindows2":[{"name":"appointments-window","group":"appointments-group"}],"workspaces2":[{"name":"appointments-form-workspace","component":"appointmentsFormWorkspace","window":"appointments-window"},{"name":"appointments-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"appointments-window"},{"name":"appointments-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"appointments-window"}],"version":"11.1.1-pre.9828"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0","appointments":">=2.0.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"},"order":2},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-dashboard","slot":"appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"hideDashboardTitle":true,"path":"appointments","slot":"patient-chart-appointments-dashboard-slot","title":"Appointments"}},{"name":"appointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"visit-form-top-slot"},{"name":"home-appointments-tile","slot":"home-metrics-tiles-slot","component":"homeAppointmentsTile"},{"name":"metrics-card-scheduled-appointments","component":"metricsCardScheduledAppointments","slot":"appointments-metrics-slot","order":1},{"name":"metrics-card-highest-volume-service","component":"metricsCardHighestVolumeService","slot":"appointments-metrics-slot","order":2},{"name":"metrics-card-providers-booked","component":"metricsCardProvidersBooked","slot":"appointments-metrics-slot","order":3}],"modals":[{"name":"end-appointment-modal","component":"endAppointmentModal"},{"name":"cancel-appointment-modal","component":"cancelAppointmentModal"},{"name":"batch-change-appointments-statuses-modal","component":"batchChangeAppointmentStatusesModal"}],"workspaceGroups2":[{"name":"appointments-group","scopePattern":"/home/appointments"}],"workspaceWindows2":[{"name":"appointments-window","group":"appointments-group"}],"workspaces2":[{"name":"appointments-form-workspace","component":"appointmentsFormWorkspace","window":"appointments-window"},{"name":"appointments-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"appointments-window"},{"name":"appointments-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"appointments-window"}],"version":"11.1.1-pre.9832"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-appointments-app",
3
- "version": "11.1.1-pre.9828",
3
+ "version": "11.1.1-pre.9832",
4
4
  "description": "Appointments front-end module for O3",
5
5
  "browser": "dist/openmrs-esm-appointments-app.js",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { formatDate, formatDatetime, usePatient } from '@openmrs/esm-framework';
3
+ import { formatDate, formatDatetime, parseDate, usePatient } from '@openmrs/esm-framework';
4
4
  import { usePatientAppointmentHistory } from '../../hooks/usePatientAppointmentHistory';
5
5
  import { getGender } from '../../helpers';
6
6
  import { type Appointment } from '../../types';
@@ -45,7 +45,7 @@ const AppointmentDetails: React.FC<AppointmentDetailsProps> = ({ appointment })
45
45
  {patient && patient?.birthDate ? (
46
46
  <div className={styles.labelContainer}>
47
47
  <p className={styles.labelBold}>{t('dateOfBirth', 'Date of birth')}: </p>
48
- <p className={styles.label}>{formatDate(new Date(patient.birthDate))}</p>
48
+ <p className={styles.label}>{formatDate(parseDate(patient.birthDate))}</p>
49
49
  </div>
50
50
  ) : (
51
51
  ''
@@ -103,3 +103,25 @@ test('renders appointment details correctly', async () => {
103
103
  expect(screen.getByText(/Upcoming/i)).toBeInTheDocument();
104
104
  expect(screen.getByText('4', { exact: true })).toBeInTheDocument();
105
105
  });
106
+
107
+ test('shows the birth date on the right day in timezones behind UTC', () => {
108
+ // FHIR birth dates are date-only strings like "2020-03-22", which `new Date()` reads as UTC midnight. That's the
109
+ // previous day anywhere behind UTC. The suite runs in UTC, so switch zones to exercise that case.
110
+ const originalTz = process.env.TZ;
111
+ process.env.TZ = 'America/New_York';
112
+
113
+ try {
114
+ mockUsePatient.mockReturnValue({
115
+ error: null,
116
+ isLoading: false,
117
+ patientUuid: mockPatient.id,
118
+ patient: { birthDate: '2020-03-22' },
119
+ });
120
+
121
+ render(<AppointmentDetails appointment={appointment} />);
122
+
123
+ expect(screen.getByText(/22-Mar-2020/i)).toBeInTheDocument();
124
+ } finally {
125
+ process.env.TZ = originalTz;
126
+ }
127
+ });