@openmrs/esm-appointments-app 12.1.2-pre.10062 → 12.1.2-pre.10072
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/dist/9399.js +1 -1
- package/dist/9399.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/appointments/details/appointment-details.component.tsx +2 -2
- package/src/appointments/details/appointment-details.test.tsx +38 -1
package/.turbo/turbo-build.log
CHANGED
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,n){n.d(t,{A:()=>I});var a=n(7240),i=n(7125),s=n.n(i),l=n(5921),r=n(5910),o=n(8466),p=n(8622),m=n(3422),d=n(8755),c=n(5084),_=n(9224),u=n(2845),h=n(5370);let f=({appointment:e,patientUuid:t,hasActiveVisit:n,mutateVisits:i})=>{let{checkInButton:s}=(0,m.useConfig)(),{t:o}=(0,l.useTranslation)(),{mutateAppointments:p}=(0,h.q)(),d=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(0,a.jsx)(r.Button,{size:"sm",kind:"tertiary",onClick:()=>{s.customUrl?(0,m.navigate)({to:s.customUrl,templateParams:{patientUuid:e.patient.uuid,appointmentUuid:e.uuid}}):n?d(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()=>{i();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)}d(o("appointmentCheckedInAfterVisitStarted","The visit was started and the appointment was checked in"))}})},children:o("checkIn","Check in")})},b=({appointment:e,hasActiveVisit:t,mutateVisits:n})=>{let{t:i}=(0,l.useTranslation)(),{checkInButton:s,checkOutButton:o}=(0,m.useConfig)(),p=e.patient.uuid,d=e.status===c.y2.CHECKEDIN,_=e.status===c.y2.COMPLETED,u=e.status===c.y2.CANCELLED,h=e.status===c.y2.SCHEDULED;return(0,a.jsx)("div",{className:"-esm-appointments__appointments-actions__container___zHYgC",children:u||_?null:o.enabled&&d?(0,a.jsx)(r.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:()=>{n(),t()},patientUuid:p,appointmentUuid:e.uuid})}},kind:"danger--tertiary",size:"sm",children:i("checkOut","Check out")}):h&&s.enabled?(0,a.jsx)(f,{patientUuid:p,appointment:e,hasActiveVisit:t,mutateVisits:n}):null})};var x=n(3464),g=n.n(x),C=n(8909),j=n.n(C),y=n(1947),w=n(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,l.useTranslation)(),[n,s]=(0,i.useState)(!1),{appointmentsCount:r,isLoading:o}=function(e){let t=new AbortController,n=`${m.restBaseUrl}/appointments/search`,a=(0,y.h)(),{data:i,error:s,isLoading:l,isValidating:r}=j()(e?[n,e,a]:null,()=>(0,m.openmrsFetch)(n,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:a}})),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=>g()(Number(e.startDateTime)).isAfter(g()())).length:0},error:s,isLoading:l,isValidating:r}}(e.patient.uuid),{patient:p}=(0,m.usePatient)(e.patient.uuid);return(0,i.useEffect)(()=>{o||s(!0)},[r,o]),(0,a.jsxs)("div",{className:"-esm-appointments__appointment-details__appointmentDetailsContainer___M9gEQ",children:[(0,a.jsx)("p",{className:"-esm-appointments__appointment-details__title___1BFru",children:e.service.name}),(0,a.jsx)("p",{className:"-esm-appointments__appointment-details__subTitle___06SeW",children:(0,m.formatDatetime)(new Date(e.startDateTime))}),(0,a.jsxs)("div",{className:"-esm-appointments__appointment-details__patientInfoGrid___XeNNF",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:S,children:t("patientDetails","Patient details")}),(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("patientName","Patient name"),": "]}),(0,a.jsx)("p",{className:D,children:e.patient.name})]}),(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("age","Age"),": "]}),(0,a.jsx)("p",{className:D,children:e.patient.age})]}),(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("gender","Gender"),": "]}),(0,a.jsx)("p",{className:D,children:(0,w.o_)(e.patient.gender,t)})]}),p&&p?.birthDate?(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("dateOfBirth","Date of birth"),": "]}),(0,a.jsx)("p",{className:D,children:(0,m.formatDate)((0,m.parseDate)(p.birthDate))})]}):"",p&&p?.telecom?p.telecom.map((e,n)=>(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("Contact","Contact {{index}}",{index:n+1}),": "]}),(0,a.jsx)("p",{className:D,children:e.value})]},n)):""]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:S,children:t("appointmentNotes","Appointment Notes")}),(0,a.jsx)("p",{className:D,children:e.comments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:S,children:t("appointmentHistory","Appointment History")}),(0,a.jsxs)("div",{className:"-esm-appointments__appointment-details__historyGrid___vKJn3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:t("completed","Completed")}),(0,a.jsx)("span",{className:v,children:r.completedAppointments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:t("missed","Missed")}),(0,a.jsx)("span",{className:"-esm-appointments__appointment-details__historyGridCountRed___ZGybQ",children:r.missedAppointments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:t("cancelled","Cancelled")}),(0,a.jsx)("span",{className:v,children:r.cancelledAppointments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:T,children:t("upcoming","Upcoming")}),(0,a.jsx)("span",{className:v,children:r.upcomingAppointments})]})]})]})]})]})};var M=n(3639);let E={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+"},I=({appointments:e,isLoading:t,tableHeading:n})=>{let{t:u}=(0,l.useTranslation)(),[h,f]=(0,i.useState)(25),[x,g]=(0,i.useState)(""),{selectedAppointmentStatuses:C,setSelectedAppointmentStatuses:y}=(0,M.nS)(),{appointmentsTableColumns:w}=(0,m.useConfig)(),S=(0,_.LZ)(e,x,C),{results:D,goTo:T,currentPage:v}=(0,m.usePagination)(S,h),{customPatientChartUrl:k,patientIdentifierType:N}=(0,m.useConfig)(),[I,U]=(0,i.useState)(new Set),P=(0,m.useLayoutType)(),F=(0,m.isDesktop)(P)?"sm":"lg",{visits:L,mutateVisits:H}=(()=>{let e=`${m.restBaseUrl}/visit?includeInactive=false&v=custom:(uuid,patient:(uuid),startDatetime,stopDatetime)`,{data:t,error:n,isLoading:a,mutate:i}=j()(e,m.openmrsFetch);return{isLoading:a,visits:t?.data?.results??[],error:n,mutateVisits:i}})(),O=(0,i.useMemo)(()=>new Map(L?.filter(e=>e?.startDatetime&&!e?.stopDatetime).map(e=>[e.patient.uuid,e])),[L]);(0,i.useEffect)(()=>{U(new Set)},[e]);let B=["actions","overflowMenu"],$=w.map(e=>({header:u(e,e),key:e}));$.push({header:"",key:"overflowMenu"});let z=(0,i.useMemo)(()=>D?.map(e=>({id:e.uuid,patientName:(0,a.jsx)(m.ConfigurableLink,{className:E.link,to:k,templateParams:{patientUuid:e.patient.uuid},children: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:(0,a.jsx)("div",{className:E.actionsCell,children:(0,a.jsx)(b,{appointment:e,hasActiveVisit:O.has(e.patient.uuid),mutateVisits:H})}),overflowMenu:(0,a.jsx)(r.OverflowMenu,{align:"left","aria-label":u("actions","Actions"),flipped:!0,size:F,children:(0,a.jsx)(r.OverflowMenuItem,{className:E.menuItem,itemText:u("editAppointment","Edit appointment"),onClick:()=>(0,m.launchWorkspace2)("appointments-form-workspace",{patientUuid:e.patient.uuid,appointment:e})})}),appointment:e})),[D,k,N,F,u,O,H]);return t?(0,a.jsx)(r.DataTableSkeleton,{role:"progressbar",rowCount:5}):(0,a.jsxs)(r.Layer,{className:E.container,children:[(0,a.jsx)("div",{className:E.headerContainer,children:(0,a.jsx)("div",{className:(0,m.isDesktop)(P)?E.desktopHeading:E.tabletHeading,children:(0,a.jsx)("h2",{children:n})})}),(0,a.jsx)(r.DataTable,{"aria-label":u("appointmentsTable","Appointments table"),"data-floating-menu-container":!0,rows:z,headers:$,isSortable:!0,size:F,useZebraStyles:!0,children:({rows:t,headers:i,getExpandHeaderProps:l,getHeaderProps:b,getRowProps:x,getSelectionProps:j,getTableProps:w,getTableContainerProps:S,getToolbarProps:D})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.TableContainer,{...S(),children:[(0,a.jsxs)(r.TableToolbar,{...D(),size:F,children:[(0,a.jsx)(m.TableBatchActions,{shouldShowBatchActions:I.size>0,totalSelected:I.size,onCancel:()=>U(new Set),children:(0,a.jsx)(r.TableBatchAction,{renderIcon:o.Vv,onClick:()=>{let t=e.filter(e=>I.has(e.uuid)),n=(0,m.showModal)("batch-change-appointments-statuses-modal",{appointments:t,closeModal:()=>n()})},children:u("changeStatus","Change status")})}),(0,a.jsxs)(r.TableToolbarContent,{className:E.toolbarContent,children:[(0,a.jsx)(r.TableToolbarSearch,{className:E.searchbar,labelText:u("filterAppointments","Filter appointments"),placeholder:u("filterTable","Filter table"),onChange:e=>g(e.target.value),persistent:!0,size:F}),(0,a.jsx)(r.MultiSelect,{id:"statusMultiSelect",size:F,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:C.map(e=>({id:e,label:u(e)}))}),(0,a.jsx)(r.Button,{size:F,kind:"tertiary",renderIcon:p.f5,onClick:()=>{let t=e[0]?.startDateTime?(0,m.formatDate)(new Date(e[0].startDateTime),{time:!1,noToday:!0}):null;(0,d.u)(e,z,`${n}_appointments_${t}`)},children:u("download","Download")})]})]}),(0,a.jsxs)(r.Table,{...w(),children:[(0,a.jsx)(r.TableHead,{children:(0,a.jsxs)(r.TableRow,{children:[(0,a.jsx)(r.TableExpandHeader,{enableToggle:!0,...l()}),(0,a.jsx)(r.TableSelectAll,{...j(),checked:I.size===t.length&&I.size>0,onSelect:()=>{I.size<t.length?U(new Set(t.map(e=>e.id))):U(new Set)}}),i.map(e=>(0,a.jsx)(r.TableHeader,{...b({header:e,isSortable:!B.includes(e.key)}),children:e.header}))]})}),(0,a.jsx)(r.TableBody,{children:t.map(t=>{let n=e.find(e=>e.uuid===t.id);return n?(0,a.jsxs)(s().Fragment,{children:[(0,a.jsxs)(r.TableExpandRow,{...x({row:t}),children:[(0,a.jsx)(r.TableSelectRow,{...j({row:t}),checked:I.has(t.id),onSelect:()=>{I.has(t.id)?U(new Set([...I].filter(e=>e!==t.id))):U(new Set([...I,t.id]))}}),t.cells.map(e=>(0,a.jsx)(r.TableCell,{children:e.value?.content??e.value},e.id))]}),t.isExpanded?(0,a.jsx)(r.TableExpandedRow,{className:E.expandedRow,colSpan:i.length+2,children:(0,a.jsx)(A,{appointment:n})}):(0,a.jsx)(r.TableExpandedRow,{className:E.hiddenRow,colSpan:i.length+2})]},t.id):null})})]})]}),0===t.length?(0,a.jsx)("div",{className:E.tileContainer,children:(0,a.jsx)(r.Layer,{children:(0,a.jsx)(r.Tile,{className:E.tile,children:(0,a.jsxs)("div",{className:E.tileContent,children:[(0,a.jsx)("p",{className:E.content,children:u("noAppointmentsToDisplay","No appointments to display")}),(0,a.jsx)("p",{className:E.helper,children:u("checkFilters","Check the filters above")})]})})})}):(0,a.jsx)(r.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:h,pageSizes:(0,_.uB)(e,h)??[],onChange:({page:e,pageSize:t})=>{T(e),f(t)},totalItems:e.length??0})]})})]})}},9224(e,t,n){n.d(t,{Bm:()=>r,LZ:()=>l,WB:()=>s,uB:()=>i});var a=n(7125);function i(e,t=10){return e?Array.from({length:Math.ceil(e.length/t)},(e,n)=>(n+1)*t):[]}function s(e,t){return(0,a.useMemo)(()=>{if(t&&""!==t.trim()){let n=t.toLowerCase();return e.filter(e=>Object.entries(e).some(([e,t])=>"patientUuid"!==e&&`${t}`.toLowerCase().includes(n)))}return e},[t,e])}function l(e,t,n){return(0,a.useMemo)(()=>e.filter(e=>{if(n.length>0&&!n.includes(e.status))return!1;if(!t||""===t.trim())return!0;{let n=t.toLowerCase();return!!(e.patient.name?.toLowerCase()?.includes(n)||e.patient.identifier?.toLowerCase()?.includes(n))}}),[t,e,n])}function r(e,t){return t?.length>0?e.filter(({service:e})=>t.includes(e.uuid)):e}},8755(e,t,n){n.d(t,{K:()=>r,u:()=>l});var a=n(2164),i=n(3422),s=n(7003);async function l(e,t,n="Appointments"){let r=(await (0,i.getConfig)(s.AO)).includePhoneNumberInExcelSpreadsheet??!1,m=p(o(await Promise.all(e.map(async e=>{let n=t.find(t=>t.id===e.uuid),a=n?.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:a,"Appointment type":e.service?.name,Date:(0,i.formatDate)(new Date(e.startDateTime),{mode:"wide"}),...r?{"Telephone number":l}:{}}}))),"Appointment list");(0,a._h)(m,`${n}.xlsx`,{compression:!0})}function r(e,t=`Unscheduled appointments ${(0,i.formatDate)(new Date,{year:!0,time:!0})}`){let n=p(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,a._h)(n,`${t}.xlsx`,{compression:!0})}function o(e){let t=e.reduce((e,t)=>Math.max(e,t["Patient name"].length),30),n=a.Wp.json_to_sheet(e);return n["!cols"]=[{wch:t}],n}function p(e,t){let n=a.Wp.book_new();return a.Wp.book_append_sheet(n,e,t),n}},2373(e,t,n){n.d(t,{Ee:()=>o,Xz:()=>_,_h:()=>d,o_:()=>c,tF:()=>m,w:()=>u,xh:()=>p});var a=n(3464),i=n.n(a),s=n(3422),l=n(5084),r=n(7003);let o=e=>{let t=i()(e).startOf("day").format(r.BC);return`${s.restBaseUrl}/appointments?forDate=${encodeURIComponent(t)}`},p=e=>{let t=e.getHours(),n=e.getMinutes(),a=n<10?`0${n}`:n.toString();return`${t%12||12}:${a} ${t>=12?"PM":"AM"}`},m=(e,t)=>e.isSame(t,"month"),d=e=>{let t=i()(e).startOf("month"),n=i()(e).endOf("month"),a=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<=a;t++)r.push(e.date(t));let o=r.length>30?7:14;for(let e=1;e<o-n.day();e++)r.push(l.date(e));return r},c=(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}},_=e=>{(0,s.launchWorkspace2)("appointments-patient-search-workspace",{initialQuery:"",workspaceTitle:e("createNewAppointment","Create new appointment"),onPatientSelected(e,t,n,a){n(r.gC,{patientUuid:t.id})}},{startVisitWorkspaceName:"appointments-start-visit-workspace"})},u=(e,t)=>{let n={[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 n[e]<n[t]||t===l.y2.SCHEDULED}},9391(e,t,n){n.d(t,{Ee:()=>a.Ee,Xz:()=>a.Xz,_h:()=>a._h,o_:()=>a.o_,tF:()=>a.tF,w:()=>a.w});var a=n(2373)},5845(e,t,n){n.d(t,{H:()=>o,M:()=>p});var a=n(8909),i=n.n(a),s=n(3422),l=n(1947),r=n(9391);let o=e=>{let t=(0,r.Ee)(e),{data:n,...a}=i()(t,s.openmrsFetch);return{appointmentList:n?.data??[],...a}},p=e=>{let t=(0,l.h)(),n=`${s.restBaseUrl}/appointment/earlyAppointment?forDate=${e||t}`,{data:a,error:r,isLoading:o}=i()(n,s.openmrsFetch,{errorRetryCount:2});return{earlyAppointmentList:a?.data??[],isLoading:o,error:r}}},5370(e,t,n){n.d(t,{q:()=>r});var a=n(7125),i=n(8909),s=n(3422);let l=`${s.restBaseUrl}/appointment`;function r(){let{mutate:e}=(0,i.useSWRConfig)();return{mutateAppointments:(0,a.useCallback)(()=>e(e=>"string"==typeof e&&e.startsWith(l)||Array.isArray(e)&&e[0].startsWith(l)),[e])}}},1947(e,t,n){n.d(t,{h:()=>r});var a=n(3464),i=n.n(a),s=n(7125),l=n(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,n){n.d(t,{DM:()=>d,oo:()=>_,yI:()=>c});var a=n(3464),i=n.n(a),s=n(8909),l=n.n(s),r=n(3422),o=n(5602),p=n.n(o);i().extend(p());let m=`${r.restBaseUrl}/appointments/search`;function d(e,t,n){let{data:a,error:s,isLoading:o,isValidating:p,mutate:d}=l()(e?[m,e,t]:null,()=>(0,r.openmrsFetch)(m,{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:t}})),c=a?.data?.length?a.data:null,_=c?.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))),u=c?.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=c?.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:a?{pastAppointments:_,upcomingAppointments:u,todaysAppointments:h}:null,error:s,isLoading:o,isValidating:p,mutate:d}}let c=async(e,t)=>{let n=Intl.DateTimeFormat().resolvedOptions().timeZone,a=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:a,timeZone:n},method:"POST",headers:{"Content-Type":"application/json"}})},_=async e=>{let t=`${r.restBaseUrl}/appointment?uuid=${e}`,{data:n}=await (0,r.openmrsFetch)(t);return n?.status}},3639(e,t,n){n.d(t,{nS:()=>l});var a=n(3422);let i=(0,a.createGlobalStore)("appointments-app",{appointmentServiceTypes:[],selectedAppointmentStatuses:[]},"sessionStorage"),s={setAppointmentServiceTypes:(e,t)=>({appointmentServiceTypes:t}),setSelectedAppointmentStatuses:(e,t)=>({selectedAppointmentStatuses:t})};function l(){return(0,a.useStoreWithActions)(i,s)}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([["9399"],{2452(e,t,n){n.d(t,{A:()=>I});var a=n(7240),i=n(7125),s=n.n(i),l=n(5921),r=n(5910),o=n(8466),p=n(8622),m=n(3422),d=n(8755),c=n(5084),_=n(9224),u=n(2845),h=n(5370);let f=({appointment:e,patientUuid:t,hasActiveVisit:n,mutateVisits:i})=>{let{checkInButton:s}=(0,m.useConfig)(),{t:o}=(0,l.useTranslation)(),{mutateAppointments:p}=(0,h.q)(),d=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(0,a.jsx)(r.Button,{size:"sm",kind:"tertiary",onClick:()=>{s.customUrl?(0,m.navigate)({to:s.customUrl,templateParams:{patientUuid:e.patient.uuid,appointmentUuid:e.uuid}}):n?d(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()=>{i();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)}d(o("appointmentCheckedInAfterVisitStarted","The visit was started and the appointment was checked in"))}})},children:o("checkIn","Check in")})},b=({appointment:e,hasActiveVisit:t,mutateVisits:n})=>{let{t:i}=(0,l.useTranslation)(),{checkInButton:s,checkOutButton:o}=(0,m.useConfig)(),p=e.patient.uuid,d=e.status===c.y2.CHECKEDIN,_=e.status===c.y2.COMPLETED,u=e.status===c.y2.CANCELLED,h=e.status===c.y2.SCHEDULED;return(0,a.jsx)("div",{className:"-esm-appointments__appointments-actions__container___zHYgC",children:u||_?null:o.enabled&&d?(0,a.jsx)(r.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:()=>{n(),t()},patientUuid:p,appointmentUuid:e.uuid})}},kind:"danger--tertiary",size:"sm",children:i("checkOut","Check out")}):h&&s.enabled?(0,a.jsx)(f,{patientUuid:p,appointment:e,hasActiveVisit:t,mutateVisits:n}):null})};var x=n(3464),g=n.n(x),C=n(8909),j=n.n(C),y=n(1947),w=n(9391);let S="-esm-appointments__appointment-details__gridTitle___0TN+t",T="-esm-appointments__appointment-details__label___YZswU",D="-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,l.useTranslation)(),[n,s]=(0,i.useState)(!1),{appointmentsCount:r,isLoading:o}=function(e){let t=new AbortController,n=`${m.restBaseUrl}/appointments/search`,a=(0,y.h)(),{data:i,error:s,isLoading:l,isValidating:r}=j()(e?[n,e,a]:null,()=>(0,m.openmrsFetch)(n,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:a}})),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=>g()(Number(e.startDateTime)).isAfter(g()())).length:0},error:s,isLoading:l,isValidating:r}}(e.patient.uuid),{patient:p}=(0,m.usePatient)(e.patient.uuid);return(0,i.useEffect)(()=>{o||s(!0)},[r,o]),(0,a.jsxs)("div",{className:"-esm-appointments__appointment-details__appointmentDetailsContainer___M9gEQ",children:[(0,a.jsx)("p",{className:"-esm-appointments__appointment-details__title___1BFru",children:e.service.name}),(0,a.jsx)("p",{className:"-esm-appointments__appointment-details__subTitle___06SeW",children:(0,m.formatDatetime)(new Date(e.startDateTime))}),(0,a.jsxs)("div",{className:"-esm-appointments__appointment-details__patientInfoGrid___XeNNF",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:S,children:t("patientDetails","Patient details")}),(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("patientName","Patient name"),": "]}),(0,a.jsx)("p",{className:T,children:e.patient.name})]}),(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("age","Age"),": "]}),(0,a.jsx)("p",{className:T,children:e.patient.age})]}),(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("gender","Gender"),": "]}),(0,a.jsx)("p",{className:T,children:(0,w.o_)(e.patient.gender,t)})]}),p&&p?.birthDate?(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("dateOfBirth","Date of birth"),": "]}),(0,a.jsx)("p",{className:T,children:(0,m.formatPartialDate)(p.birthDate,{time:!1,noToday:!0})})]}):"",p&&p?.telecom?p.telecom.map((e,n)=>(0,a.jsxs)("div",{className:N,children:[(0,a.jsxs)("p",{className:k,children:[t("Contact","Contact {{index}}",{index:n+1}),": "]}),(0,a.jsx)("p",{className:T,children:e.value})]},n)):""]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:S,children:t("appointmentNotes","Appointment Notes")}),(0,a.jsx)("p",{className:T,children:e.comments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:S,children:t("appointmentHistory","Appointment History")}),(0,a.jsxs)("div",{className:"-esm-appointments__appointment-details__historyGrid___vKJn3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:D,children:t("completed","Completed")}),(0,a.jsx)("span",{className:v,children:r.completedAppointments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:D,children:t("missed","Missed")}),(0,a.jsx)("span",{className:"-esm-appointments__appointment-details__historyGridCountRed___ZGybQ",children:r.missedAppointments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:D,children:t("cancelled","Cancelled")}),(0,a.jsx)("span",{className:v,children:r.cancelledAppointments})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:D,children:t("upcoming","Upcoming")}),(0,a.jsx)("span",{className:v,children:r.upcomingAppointments})]})]})]})]})]})};var M=n(3639);let E={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+"},I=({appointments:e,isLoading:t,tableHeading:n})=>{let{t:u}=(0,l.useTranslation)(),[h,f]=(0,i.useState)(25),[x,g]=(0,i.useState)(""),{selectedAppointmentStatuses:C,setSelectedAppointmentStatuses:y}=(0,M.nS)(),{appointmentsTableColumns:w}=(0,m.useConfig)(),S=(0,_.LZ)(e,x,C),{results:T,goTo:D,currentPage:v}=(0,m.usePagination)(S,h),{customPatientChartUrl:k,patientIdentifierType:N}=(0,m.useConfig)(),[I,U]=(0,i.useState)(new Set),P=(0,m.useLayoutType)(),F=(0,m.isDesktop)(P)?"sm":"lg",{visits:L,mutateVisits:H}=(()=>{let e=`${m.restBaseUrl}/visit?includeInactive=false&v=custom:(uuid,patient:(uuid),startDatetime,stopDatetime)`,{data:t,error:n,isLoading:a,mutate:i}=j()(e,m.openmrsFetch);return{isLoading:a,visits:t?.data?.results??[],error:n,mutateVisits:i}})(),O=(0,i.useMemo)(()=>new Map(L?.filter(e=>e?.startDatetime&&!e?.stopDatetime).map(e=>[e.patient.uuid,e])),[L]);(0,i.useEffect)(()=>{U(new Set)},[e]);let B=["actions","overflowMenu"],$=w.map(e=>({header:u(e,e),key:e}));$.push({header:"",key:"overflowMenu"});let z=(0,i.useMemo)(()=>T?.map(e=>({id:e.uuid,patientName:(0,a.jsx)(m.ConfigurableLink,{className:E.link,to:k,templateParams:{patientUuid:e.patient.uuid},children: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:(0,a.jsx)("div",{className:E.actionsCell,children:(0,a.jsx)(b,{appointment:e,hasActiveVisit:O.has(e.patient.uuid),mutateVisits:H})}),overflowMenu:(0,a.jsx)(r.OverflowMenu,{align:"left","aria-label":u("actions","Actions"),flipped:!0,size:F,children:(0,a.jsx)(r.OverflowMenuItem,{className:E.menuItem,itemText:u("editAppointment","Edit appointment"),onClick:()=>(0,m.launchWorkspace2)("appointments-form-workspace",{patientUuid:e.patient.uuid,appointment:e})})}),appointment:e})),[T,k,N,F,u,O,H]);return t?(0,a.jsx)(r.DataTableSkeleton,{role:"progressbar",rowCount:5}):(0,a.jsxs)(r.Layer,{className:E.container,children:[(0,a.jsx)("div",{className:E.headerContainer,children:(0,a.jsx)("div",{className:(0,m.isDesktop)(P)?E.desktopHeading:E.tabletHeading,children:(0,a.jsx)("h2",{children:n})})}),(0,a.jsx)(r.DataTable,{"aria-label":u("appointmentsTable","Appointments table"),"data-floating-menu-container":!0,rows:z,headers:$,isSortable:!0,size:F,useZebraStyles:!0,children:({rows:t,headers:i,getExpandHeaderProps:l,getHeaderProps:b,getRowProps:x,getSelectionProps:j,getTableProps:w,getTableContainerProps:S,getToolbarProps:T})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.TableContainer,{...S(),children:[(0,a.jsxs)(r.TableToolbar,{...T(),size:F,children:[(0,a.jsx)(m.TableBatchActions,{shouldShowBatchActions:I.size>0,totalSelected:I.size,onCancel:()=>U(new Set),children:(0,a.jsx)(r.TableBatchAction,{renderIcon:o.Vv,onClick:()=>{let t=e.filter(e=>I.has(e.uuid)),n=(0,m.showModal)("batch-change-appointments-statuses-modal",{appointments:t,closeModal:()=>n()})},children:u("changeStatus","Change status")})}),(0,a.jsxs)(r.TableToolbarContent,{className:E.toolbarContent,children:[(0,a.jsx)(r.TableToolbarSearch,{className:E.searchbar,labelText:u("filterAppointments","Filter appointments"),placeholder:u("filterTable","Filter table"),onChange:e=>g(e.target.value),persistent:!0,size:F}),(0,a.jsx)(r.MultiSelect,{id:"statusMultiSelect",size:F,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:C.map(e=>({id:e,label:u(e)}))}),(0,a.jsx)(r.Button,{size:F,kind:"tertiary",renderIcon:p.f5,onClick:()=>{let t=e[0]?.startDateTime?(0,m.formatDate)(new Date(e[0].startDateTime),{time:!1,noToday:!0}):null;(0,d.u)(e,z,`${n}_appointments_${t}`)},children:u("download","Download")})]})]}),(0,a.jsxs)(r.Table,{...w(),children:[(0,a.jsx)(r.TableHead,{children:(0,a.jsxs)(r.TableRow,{children:[(0,a.jsx)(r.TableExpandHeader,{enableToggle:!0,...l()}),(0,a.jsx)(r.TableSelectAll,{...j(),checked:I.size===t.length&&I.size>0,onSelect:()=>{I.size<t.length?U(new Set(t.map(e=>e.id))):U(new Set)}}),i.map(e=>(0,a.jsx)(r.TableHeader,{...b({header:e,isSortable:!B.includes(e.key)}),children:e.header}))]})}),(0,a.jsx)(r.TableBody,{children:t.map(t=>{let n=e.find(e=>e.uuid===t.id);return n?(0,a.jsxs)(s().Fragment,{children:[(0,a.jsxs)(r.TableExpandRow,{...x({row:t}),children:[(0,a.jsx)(r.TableSelectRow,{...j({row:t}),checked:I.has(t.id),onSelect:()=>{I.has(t.id)?U(new Set([...I].filter(e=>e!==t.id))):U(new Set([...I,t.id]))}}),t.cells.map(e=>(0,a.jsx)(r.TableCell,{children:e.value?.content??e.value},e.id))]}),t.isExpanded?(0,a.jsx)(r.TableExpandedRow,{className:E.expandedRow,colSpan:i.length+2,children:(0,a.jsx)(A,{appointment:n})}):(0,a.jsx)(r.TableExpandedRow,{className:E.hiddenRow,colSpan:i.length+2})]},t.id):null})})]})]}),0===t.length?(0,a.jsx)("div",{className:E.tileContainer,children:(0,a.jsx)(r.Layer,{children:(0,a.jsx)(r.Tile,{className:E.tile,children:(0,a.jsxs)("div",{className:E.tileContent,children:[(0,a.jsx)("p",{className:E.content,children:u("noAppointmentsToDisplay","No appointments to display")}),(0,a.jsx)("p",{className:E.helper,children:u("checkFilters","Check the filters above")})]})})})}):(0,a.jsx)(r.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:h,pageSizes:(0,_.uB)(e,h)??[],onChange:({page:e,pageSize:t})=>{D(e),f(t)},totalItems:e.length??0})]})})]})}},9224(e,t,n){n.d(t,{Bm:()=>r,LZ:()=>l,WB:()=>s,uB:()=>i});var a=n(7125);function i(e,t=10){return e?Array.from({length:Math.ceil(e.length/t)},(e,n)=>(n+1)*t):[]}function s(e,t){return(0,a.useMemo)(()=>{if(t&&""!==t.trim()){let n=t.toLowerCase();return e.filter(e=>Object.entries(e).some(([e,t])=>"patientUuid"!==e&&`${t}`.toLowerCase().includes(n)))}return e},[t,e])}function l(e,t,n){return(0,a.useMemo)(()=>e.filter(e=>{if(n.length>0&&!n.includes(e.status))return!1;if(!t||""===t.trim())return!0;{let n=t.toLowerCase();return!!(e.patient.name?.toLowerCase()?.includes(n)||e.patient.identifier?.toLowerCase()?.includes(n))}}),[t,e,n])}function r(e,t){return t?.length>0?e.filter(({service:e})=>t.includes(e.uuid)):e}},8755(e,t,n){n.d(t,{K:()=>r,u:()=>l});var a=n(2164),i=n(3422),s=n(7003);async function l(e,t,n="Appointments"){let r=(await (0,i.getConfig)(s.AO)).includePhoneNumberInExcelSpreadsheet??!1,m=p(o(await Promise.all(e.map(async e=>{let n=t.find(t=>t.id===e.uuid),a=n?.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:a,"Appointment type":e.service?.name,Date:(0,i.formatDate)(new Date(e.startDateTime),{mode:"wide"}),...r?{"Telephone number":l}:{}}}))),"Appointment list");(0,a._h)(m,`${n}.xlsx`,{compression:!0})}function r(e,t=`Unscheduled appointments ${(0,i.formatDate)(new Date,{year:!0,time:!0})}`){let n=p(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,a._h)(n,`${t}.xlsx`,{compression:!0})}function o(e){let t=e.reduce((e,t)=>Math.max(e,t["Patient name"].length),30),n=a.Wp.json_to_sheet(e);return n["!cols"]=[{wch:t}],n}function p(e,t){let n=a.Wp.book_new();return a.Wp.book_append_sheet(n,e,t),n}},2373(e,t,n){n.d(t,{Ee:()=>o,Xz:()=>_,_h:()=>d,o_:()=>c,tF:()=>m,w:()=>u,xh:()=>p});var a=n(3464),i=n.n(a),s=n(3422),l=n(5084),r=n(7003);let o=e=>{let t=i()(e).startOf("day").format(r.BC);return`${s.restBaseUrl}/appointments?forDate=${encodeURIComponent(t)}`},p=e=>{let t=e.getHours(),n=e.getMinutes(),a=n<10?`0${n}`:n.toString();return`${t%12||12}:${a} ${t>=12?"PM":"AM"}`},m=(e,t)=>e.isSame(t,"month"),d=e=>{let t=i()(e).startOf("month"),n=i()(e).endOf("month"),a=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<=a;t++)r.push(e.date(t));let o=r.length>30?7:14;for(let e=1;e<o-n.day();e++)r.push(l.date(e));return r},c=(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}},_=e=>{(0,s.launchWorkspace2)("appointments-patient-search-workspace",{initialQuery:"",workspaceTitle:e("createNewAppointment","Create new appointment"),onPatientSelected(e,t,n,a){n(r.gC,{patientUuid:t.id})}},{startVisitWorkspaceName:"appointments-start-visit-workspace"})},u=(e,t)=>{let n={[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 n[e]<n[t]||t===l.y2.SCHEDULED}},9391(e,t,n){n.d(t,{Ee:()=>a.Ee,Xz:()=>a.Xz,_h:()=>a._h,o_:()=>a.o_,tF:()=>a.tF,w:()=>a.w});var a=n(2373)},5845(e,t,n){n.d(t,{H:()=>o,M:()=>p});var a=n(8909),i=n.n(a),s=n(3422),l=n(1947),r=n(9391);let o=e=>{let t=(0,r.Ee)(e),{data:n,...a}=i()(t,s.openmrsFetch);return{appointmentList:n?.data??[],...a}},p=e=>{let t=(0,l.h)(),n=`${s.restBaseUrl}/appointment/earlyAppointment?forDate=${e||t}`,{data:a,error:r,isLoading:o}=i()(n,s.openmrsFetch,{errorRetryCount:2});return{earlyAppointmentList:a?.data??[],isLoading:o,error:r}}},5370(e,t,n){n.d(t,{q:()=>r});var a=n(7125),i=n(8909),s=n(3422);let l=`${s.restBaseUrl}/appointment`;function r(){let{mutate:e}=(0,i.useSWRConfig)();return{mutateAppointments:(0,a.useCallback)(()=>e(e=>"string"==typeof e&&e.startsWith(l)||Array.isArray(e)&&e[0].startsWith(l)),[e])}}},1947(e,t,n){n.d(t,{h:()=>r});var a=n(3464),i=n.n(a),s=n(7125),l=n(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,n){n.d(t,{DM:()=>d,oo:()=>_,yI:()=>c});var a=n(3464),i=n.n(a),s=n(8909),l=n.n(s),r=n(3422),o=n(5602),p=n.n(o);i().extend(p());let m=`${r.restBaseUrl}/appointments/search`;function d(e,t,n){let{data:a,error:s,isLoading:o,isValidating:p,mutate:d}=l()(e?[m,e,t]:null,()=>(0,r.openmrsFetch)(m,{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json"},body:{patientUuid:e,startDate:t}})),c=a?.data?.length?a.data:null,_=c?.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))),u=c?.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=c?.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:a?{pastAppointments:_,upcomingAppointments:u,todaysAppointments:h}:null,error:s,isLoading:o,isValidating:p,mutate:d}}let c=async(e,t)=>{let n=Intl.DateTimeFormat().resolvedOptions().timeZone,a=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:a,timeZone:n},method:"POST",headers:{"Content-Type":"application/json"}})},_=async e=>{let t=`${r.restBaseUrl}/appointment?uuid=${e}`,{data:n}=await (0,r.openmrsFetch)(t);return n?.status}},3639(e,t,n){n.d(t,{nS:()=>l});var a=n(3422);let i=(0,a.createGlobalStore)("appointments-app",{appointmentServiceTypes:[],selectedAppointmentStatuses:[]},"sessionStorage"),s={setAppointmentServiceTypes:(e,t)=>({appointmentServiceTypes:t}),setSelectedAppointmentStatuses:(e,t)=>({selectedAppointmentStatuses:t})};function l(){return(0,a.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","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":"+SAkGA,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,QACN,cAAe,EACjB,EACF,GAEJ,MACE,UAACU,EAAAA,MAAMA,CAAAA,CACL,KAAK,KACL,KAAK,WACL,QAAS,KAEP,AAAIZ,EAAc,SAAS,CACzBa,AAAAA,GAAAA,EAAAA,QAAAA,AAAAA,EAAS,CACP,GAAIb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AAC,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
|
+
{"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","formatPartialDate","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","formatDate","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":"+SAkGA,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,IAC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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,EAAG5F,IACzB,EAAEA,4BAAAA,CAA4B,EAEzC,EAEO,SAASE,IACd,MAAOiL,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:12.1.2-pre.10062";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:12.1.2-pre.10072";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|1921|6462|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("8020"),s.e("682"),s.e("5713"),s.e("9270"),s.e("8678"),s.e("1921")]).then(()=>()=>s(5208)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"11.0.1-pre.5908",factory:()=>Promise.all([s.e("9011"),s.e("9024"),s.e("8020"),s.e("6557"),s.e("6905"),s.e("7226"),s.e("1373"),s.e("9270"),s.e("8678"),s.e("1921"),s.e("6462"),s.e("9794")]).then(()=>()=>s(800)),eager:0,singleton:1,requiredVersion:"11.x",strictVersion:0},{name:"react-dom/client",version:"18.3.1",factory:()=>Promise.all([s.e("8678"),s.e("1610")]).then(()=>()=>s(5873)),eager:0,singleton:1,requiredVersion:"18.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/jsx-runtime",version:"18.3.1",factory:()=>Promise.all([s.e("9270"),s.e("3390")]).then(()=>()=>s(1085)),eager:0,singleton:1,requiredVersion:"18.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"],1921:["7240"],7226:["5921"],1373:["8909","5910"],7654:["3422"],8678:["6693"],6462:["9106","5292","4498","9792"],9794:["2745"]},moduleIdToConsumeDataMapping:{3422:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"11.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("9011"),s.e("9024"),s.e("8020"),s.e("6557"),s.e("6905"),s.e("7226"),s.e("1373"),s.e("8678"),s.e("6462")]).then(()=>()=>s(800))},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))},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:()=>Promise.all([s.e("689"),s.e("9270")]).then(()=>()=>s(3144))},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))},9792:{shareScope:"default",shareKey:"react-dom/client",import:"react-dom/client",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("9229").then(()=>()=>s(5873))},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("8020"),s.e("682"),s.e("5713"),s.e("8678")]).then(()=>()=>s(5208))},7240:{shareScope:"default",shareKey:"react/jsx-runtime",import:"react/jsx-runtime",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("1009").then(()=>()=>s(1085))},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))},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,2329:1,2495:1,4307:1,4675:1,5556:1,606:1,6789:1,6905:1,836: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("1921"),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|1921|6462|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()})();
|
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":"12.1.2-pre.
|
|
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":"12.1.2-pre.10072"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import {
|
|
3
|
+
import { formatDatetime, formatPartialDate, 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}>{
|
|
48
|
+
<p className={styles.label}>{formatPartialDate(patient.birthDate, { time: false, noToday: true })}</p>
|
|
49
49
|
</div>
|
|
50
50
|
) : (
|
|
51
51
|
''
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { vi, expect, test } from 'vitest';
|
|
2
|
+
import { afterEach, vi, expect, test } from 'vitest';
|
|
3
3
|
import { render, screen } from '@testing-library/react';
|
|
4
4
|
import { usePatient } from '@openmrs/esm-framework';
|
|
5
5
|
import { mockPatient } from 'tools';
|
|
@@ -53,6 +53,8 @@ const appointment: Appointment = {
|
|
|
53
53
|
|
|
54
54
|
const mockUsePatient = vi.mocked(usePatient);
|
|
55
55
|
|
|
56
|
+
afterEach(() => vi.useRealTimers());
|
|
57
|
+
|
|
56
58
|
vi.mock('../../hooks/usePatientAppointmentHistory', () => ({
|
|
57
59
|
usePatientAppointmentHistory: () => ({
|
|
58
60
|
appointmentsCount: {
|
|
@@ -125,3 +127,38 @@ test('shows the birth date on the right day in timezones behind UTC', () => {
|
|
|
125
127
|
process.env.TZ = originalTz;
|
|
126
128
|
}
|
|
127
129
|
});
|
|
130
|
+
|
|
131
|
+
test.each([
|
|
132
|
+
{ label: 'the year', birthDate: '2020', expected: '2020' },
|
|
133
|
+
{ label: 'the month', birthDate: '2020-03', expected: 'Mar 2020' },
|
|
134
|
+
])('shows an estimated birth date known to $label at that precision', ({ birthDate, expected }) => {
|
|
135
|
+
mockUsePatient.mockReturnValue({
|
|
136
|
+
error: null,
|
|
137
|
+
isLoading: false,
|
|
138
|
+
patientUuid: mockPatient.id,
|
|
139
|
+
patient: { birthDate },
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
render(<AppointmentDetails appointment={appointment} />);
|
|
143
|
+
|
|
144
|
+
expect(screen.getByText(expected)).toBeInTheDocument();
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test.each([
|
|
148
|
+
{ birthDate: '2026', expected: '2026' },
|
|
149
|
+
{ birthDate: '2026-11', expected: 'Nov 2026' },
|
|
150
|
+
{ birthDate: '2026-11-02', expected: '02-Nov-2026' },
|
|
151
|
+
])('shows birthdate $birthDate without a relative date label', ({ birthDate, expected }) => {
|
|
152
|
+
vi.useFakeTimers();
|
|
153
|
+
vi.setSystemTime(new Date('2026-11-02T12:00:00Z'));
|
|
154
|
+
mockUsePatient.mockReturnValue({
|
|
155
|
+
error: null,
|
|
156
|
+
isLoading: false,
|
|
157
|
+
patientUuid: mockPatient.id,
|
|
158
|
+
patient: { birthDate },
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
render(<AppointmentDetails appointment={appointment} />);
|
|
162
|
+
|
|
163
|
+
expect(screen.getByText(expected)).toBeInTheDocument();
|
|
164
|
+
});
|