@openmrs/esm-patient-immunizations-app 4.0.1-pre.262 → 4.0.1-pre.268
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
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
1
|
+
[32m@openmrs/esm-patient-immunizations-app:build[0m: cache hit, replaying output [2mfcdf318436264e1d[0m
|
|
2
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0massets by chunk 921 KiB (id hint: vendors)
|
|
3
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m assets by status [1m[33m853 KiB[39m[22m [1m[33m[big][39m[22m
|
|
4
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[33m965.js[39m[22m [1m[33m446 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
5
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[33m858.js[39m[22m [1m[33m407 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
6
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[32m206.js[39m[22m 45.4 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
7
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[32m709.js[39m[22m 19 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
8
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[32m245.js[39m[22m 4.15 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
9
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m+ 11 assets
|
|
10
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0morphan modules 4.01 MiB [1m[33m[orphan][39m[22m 648 modules
|
|
11
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mruntime modules 39.6 KiB 28 modules
|
|
12
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mbuilt modules 2.82 MiB (javascript) 252 bytes (consume-shared) 210 bytes (share-init) [1m[33m[built][39m[22m
|
|
13
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1m../../node_modules/[39m[22m 2.67 MiB 93 modules
|
|
14
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1m./[39m[22m 63.8 KiB 13 modules
|
|
15
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1m../esm-patient-common-lib/src/[39m[22m 86.1 KiB
|
|
16
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m [1m../esm-patient-common-lib/src/index.ts + 44 modules[39m[22m 74.9 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
17
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m + 5 modules
|
|
18
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m consume-shared-module modules 252 bytes
|
|
19
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1mconsume shared module (default) @openmrs/[39m[22m 126 bytes 3 modules
|
|
20
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m + 3 modules
|
|
21
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m provide-module modules 210 bytes
|
|
22
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1mprovide shared module (default) @openmrs/[39m[22m 84 bytes 2 modules
|
|
23
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m + 3 modules
|
|
24
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m [1mcontainer entry[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
25
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m
|
|
26
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m[1m[33mWARNING[39m[22m in [1masset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
|
27
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mThis can impact web performance.
|
|
28
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mAssets:
|
|
29
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m 858.js (407 KiB)
|
|
30
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m 965.js (446 KiB)[39m[22m
|
|
31
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m
|
|
32
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mwebpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in 58217 ms
|
package/dist/927.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[927],{7904:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I,.-esm-patient-immunizations__card-header__tabletHeader___efA_M{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4:after,.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I{height:3rem}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__card-header__tabletHeader___efA_M{height:4.5rem}.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}',""]),o.locals={desktopHeader:"-esm-patient-immunizations__card-header__desktopHeader___BUQ5I",tabletHeader:"-esm-patient-immunizations__card-header__tabletHeader___efA_M"};const s=o},7942:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.active-left-nav-link .-esm-patient-immunizations__dashboardextension__link___lom8t:nth-child(1){color:#161616;padding:1.2rem 0 1.2rem 1.2rem}",""]),o.locals={link:"-esm-patient-immunizations__dashboardextension__link___lom8t"};const s=o},7431:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__empty-state__action___xInzb{margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__content___lACIK{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4:after,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__heading___gW4Bc:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__tile___DvfL3{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={action:"-esm-patient-immunizations__empty-state__action___xInzb",content:"-esm-patient-immunizations__empty-state__content___lACIK",desktopHeading:"-esm-patient-immunizations__empty-state__desktopHeading___UIGID",tabletHeading:"-esm-patient-immunizations__empty-state__tabletHeading___lVXqD",heading:"-esm-patient-immunizations__empty-state__heading___gW4Bc",tile:"-esm-patient-immunizations__empty-state__tile___DvfL3"};const s=o},418:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__error-state__errorMessage___kDICS{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-immunizations__error-state__errorCopy___UX21v{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4:after,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__error-state__tile___LTdVO{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={errorMessage:"-esm-patient-immunizations__error-state__errorMessage___kDICS",errorCopy:"-esm-patient-immunizations__error-state__errorCopy___UX21v",desktopHeading:"-esm-patient-immunizations__error-state__desktopHeading___Bhvtx",tabletHeading:"-esm-patient-immunizations__error-state__tabletHeading___EAqy2",tile:"-esm-patient-immunizations__error-state__tile___LTdVO"};const s=o},8952:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__pagination__bodyShort01____zD39,.-esm-patient-immunizations__pagination__configurableLink___JhehZ{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-immunizations__pagination__desktop___TGt17,.-esm-patient-immunizations__pagination__tablet___BEzP7{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex;border-top:1px solid #e0e0e0;justify-content:space-between;color:#525252;background-color:#fff;padding-left:1rem;align-items:center}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination{min-height:0rem;height:2rem;width:auto;border:none}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--pagination__right{min-height:0rem;height:2rem}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination{min-height:0rem;height:3rem;width:auto;border:none}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--pagination__right{min-height:0rem;height:3rem}.-esm-patient-immunizations__pagination__configurableLink___JhehZ{text-decoration:none;padding:0 .5rem}.-esm-patient-immunizations__pagination__pagination___B09B8{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;display:flex}div.-esm-patient-immunizations__pagination__pagination___B09B8>.cds--pagination__left{display:none}",""]),o.locals={bodyShort01:"-esm-patient-immunizations__pagination__bodyShort01____zD39",configurableLink:"-esm-patient-immunizations__pagination__configurableLink___JhehZ",desktop:"-esm-patient-immunizations__pagination__desktop___TGt17",tablet:"-esm-patient-immunizations__pagination__tablet___BEzP7",pagination:"-esm-patient-immunizations__pagination__pagination___B09B8"};const s=o},1927:(t,e,n)=>{n.r(e),n.d(e,{CardHeader:()=>w,DashboardExtension:()=>V,DashboardGroupExtension:()=>H,EmptyDataIllustration:()=>k,EmptyState:()=>C,ErrorState:()=>O,PatientChartPagination:()=>X,WorkspaceWindowSizeProvider:()=>Mt,cancelPrompt:()=>zt,changeWorkspaceContext:()=>Et,closeAllWorkspaces:()=>kt,closeWorkspace:()=>St,convertTime12to24:()=>tt,createDashboardGroup:()=>L,createDashboardLink:()=>F,createOfflineVisitForPatient:()=>we,formEntrySub:()=>st,getOfflineVisitForPatient:()=>ye,getPromptBeforeClosingFcn:()=>wt,getWorkspaceStore:()=>xt,launchPatientChartWithWorkspaceOpen:()=>vt,launchPatientWorkspace:()=>gt,launchStartVisitPrompt:()=>B,patientRegistrationSyncType:()=>le,promptBeforeClosing:()=>bt,registerNavGroup:()=>M,registerWorkspace:()=>_t,resetWorkspaceStore:()=>Ct,useActivePatientEnrollment:()=>Qt,useAutoCreatedOfflineVisit:()=>ve,useNavGroups:()=>D,useOfflineVisit:()=>ge,usePaginationInfo:()=>R,usePatientOrOfflineRegisteredPatient:()=>ce,useVisitOrOfflineVisit:()=>he,useVitalsConceptMetadata:()=>it,useWorkspaceWindowSize:()=>Wt,useWorkspaces:()=>Ot,visitSyncType:()=>_e,withUnit:()=>ot});var r=n(5529),a=n.n(r),i=n(906),o=n(6062),s=n.n(o),l=n(4036),c=n.n(l),u=n(6793),d=n.n(u),p=n(7892),m=n.n(p),f=n(1173),_=n.n(f),h=n(2464),g=n.n(h),v=n(7904),y={};y.styleTagTransform=g(),y.setAttributes=m(),y.insert=d().bind(null,"head"),y.domAPI=c(),y.insertStyleElement=_(),s()(v.Z,y);const b=v.Z&&v.Z.locals?v.Z.locals:void 0;function w(t){var e=t.title,n=t.children,r="tablet"===(0,i.useLayoutType)();return a().createElement("div",{className:r?b.tabletHeader:b.desktopHeader},a().createElement("h4",null,e),n)}var z=n(9694),S=n(4924),k=function(t){var e=t.width,n=void 0===e?"64":e,r=t.height,i=void 0===r?"64":r;return a().createElement("svg",{width:n,height:i,viewBox:"0 0 64 64"},a().createElement("title",null,"Empty data illustration"),a().createElement("g",{fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},E=n(7431),A={};A.styleTagTransform=g(),A.setAttributes=m(),A.insert=d().bind(null,"head"),A.domAPI=c(),A.insertStyleElement=_(),s()(E.Z,A);const x=E.Z&&E.Z.locals?E.Z.locals:void 0;var C=function(t){var e=(0,S.useTranslation)().t,n="tablet"===(0,i.useLayoutType)();return a().createElement(z.mh4,null,a().createElement(z.n9L,{className:x.tile},a().createElement("div",{className:n?x.tabletHeading:x.desktopHeading},a().createElement("h4",null,t.headerTitle)),a().createElement(k,null),a().createElement("p",{className:x.content},a().createElement(S.Trans,{i18nKey:"emptyStateText",values:{displayText:t.displayText.toLowerCase()}},"There are no ",t.displayText.toLowerCase()," to display for this patient")),a().createElement("p",{className:x.action},t.launchForm&&a().createElement("span",null,a().createElement(z.rUS,{onClick:function(){return t.launchForm()}},a().createElement(a().Fragment,null,e("record","Record")," ",t.displayText.toLowerCase()))))))},I=n(418),P={};P.styleTagTransform=g(),P.setAttributes=m(),P.insert=d().bind(null,"head"),P.domAPI=c(),P.insertStyleElement=_(),s()(I.Z,P);const T=I.Z&&I.Z.locals?I.Z.locals:void 0;var O=function(t){var e,n,r=t.error,o=t.headerTitle,s=(0,S.useTranslation)().t,l="tablet"===(0,i.useLayoutType)();return a().createElement(z.mh4,null,a().createElement(z.n9L,{className:T.tile},a().createElement("div",{className:l?T.tabletHeading:T.desktopHeading},a().createElement("h4",null,o)),a().createElement("p",{className:T.errorMessage},s("error","Error")," ","".concat(null==r||null===(e=r.response)||void 0===e?void 0:e.status,": "),null==r||null===(n=r.response)||void 0===n?void 0:n.statusText),a().createElement("p",{className:T.errorCopy},s("errorCopy","Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above."))))},H=function(t){var e=t.title,n=t.slotName,o=t.basePath,s=t.isExpanded;return(0,r.useEffect)((function(){M(n)}),[n]),a().createElement(z.UQy,null,a().createElement(z.Qdk,{open:null==s||s,title:e,style:{border:"none"}},a().createElement(i.ExtensionSlot,{extensionSlotName:null!=n?n:e,state:{basePath:o}})))},L=function(t){var e=t.title,n=t.slotName,r=t.isExpanded;return function(t){var i=t.basePath;return a().createElement(H,{title:e,slotName:n,basePath:i,isExpanded:r})}};function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var W=(0,i.createGlobalStore)("nav-groups",{navGroups:[]});function M(t){var e,n=W.getState();W.setState({navGroups:[t].concat((e=n.navGroups,function(t){if(Array.isArray(t))return j(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}var D=(0,i.createUseStore)(W);var U=n(7942),Z={};Z.styleTagTransform=g(),Z.setAttributes=m(),Z.insert=d().bind(null,"head"),Z.domAPI=c(),Z.insertStyleElement=_(),s()(U.Z,Z);const N=U.Z&&U.Z.locals?U.Z.locals:void 0;var V=function(t){var e,n=t.title,o=t.basePath,s=null!==(e=window.location)&&void 0!==e?e:{pathname:""},l=n===(0,r.useMemo)((function(){return decodeURIComponent((t=s.pathname.split("/"),(e=null==t?0:t.length)?t[e-1]:void 0));var t,e}),[s.pathname])?"active-left-nav-link":"non-active";return a().createElement("div",{key:n,className:l},a().createElement(i.ConfigurableLink,{to:"".concat(o,"/").concat(encodeURIComponent(n)),className:"cds--side-nav__link "+N.link},n))},F=function(t){return function(e){var n=e.basePath;return a().createElement(V,{title:t.title,basePath:n})}};function B(){var t=(0,i.showModal)("start-visit-dialog",{closeModal:function(){return t()}})}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e,n,a){var i=(0,S.useTranslation)().t,o=(0,r.useMemo)((function(){var n,r=Math.ceil(e/t);return(n=Array(r).keys(),function(t){if(Array.isArray(t))return G(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return(e+1)*t}))}),[t,e]),s=(0,r.useMemo)((function(){return t>e?"".concat(e," / ").concat(e):t*n>e?"".concat(t*(n-1)+a," / ").concat(e):"".concat(t*n," / ").concat(e)}),[t,e,n,a]);return{pageSizes:o,itemsDisplayed:"".concat(s," ").concat(i("items"," items"))}}var q=n(8952),$={};$.styleTagTransform=g(),$.setAttributes=m(),$.insert=d().bind(null,"head"),$.domAPI=c(),$.insertStyleElement=_(),s()(q.Z,$);const Q=q.Z&&q.Z.locals?q.Z.locals:void 0;var X=function(t){var e=t.totalItems,n=t.pageSize,r=t.onPageNumberChange,o=t.pageNumber,s=t.dashboardLinkUrl,l=t.currentItems,c=t.dashboardLinkLabel,u=(0,S.useTranslation)().t,d=R(n,e,o,l),p=d.itemsDisplayed,m=d.pageSizes,f="tablet"===(0,i.useLayoutType)();return a().createElement(a().Fragment,null,e>0&&a().createElement("div",{className:f?Q.tablet:Q.desktop},a().createElement("div",null,p,s&&a().createElement(i.ConfigurableLink,{to:s,className:Q.configurableLink},null!=c?c:u("seeAll","See all"))),a().createElement(z.tlE,{className:Q.pagination,page:o,pageSize:n,pageSizes:m,totalItems:e,onChange:r,size:f?"lg":"sm"})))};function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var K,Y,tt=function(t,e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.split(":"),2),r=n[0],a=n[1];return"12"===r&&"AM"===e&&(r="00"),"PM"===e&&(r="12"===r?r:parseInt(r,10)+12),[r,a]},et=n(9857),nt=function(){return nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},nt.apply(this,arguments)},rt=function(t){return"function"==typeof t[1]?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},at=(K=et.ZP,Y=function(t){return function(e,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r)}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rt(t),r=n[0],a=n[1],i=n[2],o=(i.use||[]).concat(Y);return K(r,a,nt(nt({},i),{use:o}))});function it(){var t,e,n="/ws/rest/v1/concept/?q=VITALS SIGNS&v=".concat("custom:(setMembers:(uuid,display,hiNormal,hiAbsolute,hiCritical,lowNormal,lowAbsolute,lowCritical,units))"),r=at(n,i.openmrsFetch),a=r.data,o=r.error,s=null===(e=null==a||null===(t=a.data)||void 0===t?void 0:t.results[0])||void 0===e?void 0:e.setMembers;return{data:(null==s?void 0:s.length)?new Map(s.map((function(t){return[t.uuid,t.units]}))):new Map([]),isError:o,isLoading:!a&&!o,conceptMetadata:s}}var ot=function(t,e){return"".concat(t," ").concat(e?"(".concat(e,")"):"")},st=new(n(2444).BehaviorSubject)(null),lt=n(6081);function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ut(t,e,n[e])}))}return t}function pt(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}function mt(t){return function(t){if(Array.isArray(t))return ct(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ft={};function _t(t){var e,n;ft[t.name]=pt(dt({},t),{preferredWindowSize:null!==(e=t.preferredWindowSize)&&void 0!==e?e:"normal",type:null!==(n=t.type)&&void 0!==n?n:"form"})}function ht(t){var e,n=null==t||null===(e=t.meta)||void 0===e?void 0:e.title;return"string"==typeof n?n:n&&"object"==typeof n?(0,i.translateFrom)(t.moduleName,n.key,n.default):t.name}function gt(t,e){var n=xt(),r=n.getState(),a=function(t){if(ft[t])return ft[t];var e,n,r,a,i=(0,lt.getExtensionRegistration)(t);if(i)return{name:i.name,title:ht(i),preferredWindowSize:null!==(r=null===(e=i.meta)||void 0===e?void 0:e.screenSize)&&void 0!==r?r:"normal",load:i.load,type:null!==(a=null===(n=i.meta)||void 0===n?void 0:n.type)&&void 0!==a?a:"form"};throw new Error("No workspace named '".concat(t,"' has been registered."))}(t),o=pt(dt({},a),{closeWorkspace:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return St(t,e)},promptBeforeClosing:function(e){return bt(t,e)},additionalProps:e}),s=r.openWorkspaces.filter((function(t){return t.type==o.type}));if(0==s.length)n.setState(pt(dt({},r),{openWorkspaces:[o].concat(mt(r.openWorkspaces))}));else{var l=r.openWorkspaces.findIndex((function(e){return e.name==t})),c=wt(s[0].name);if(l>=0){var u=mt(r.openWorkspaces);u.splice(l,1),r.openWorkspaces[l].additionalProps=o.additionalProps;var d=[r.openWorkspaces[l]].concat(mt(u));n.setState(pt(dt({},r),{openWorkspaces:d}))}else if(!c||c()){var p,m=null!==(p=s[0].title)&&void 0!==p?p:s[0].name,f={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","activeFormWarning","There is an active form open in the workspace"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","workspaceModalText","Launching a new form in the workspace could cause you to lose unsaved work on the ".concat(m," form."),{formName:m}),onConfirm:function(){var t=n.getState();n.setState({openWorkspaces:[o].concat(mt(t.openWorkspaces.filter((function(t){return t.type!=o.type})))),prompt:null})},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","openAnyway","Open anyway")};n.setState(pt(dt({},r),{prompt:f}))}else{var _=n.getState();n.setState(pt(dt({},_),{openWorkspaces:[o].concat(mt(_.openWorkspaces.filter((function(t){return t.type!=o.type}))))}))}}}function vt(t){var e=t.patientUuid,n=t.workspaceName,r=t.dashboardName,a=t.additionalProps;Et(e),gt(n,a),(0,i.navigate)({to:"${openmrsSpaBase}/patient/"+"".concat(e,"/chart")+(r?"/".concat(r):"")})}var yt={};function bt(t,e){yt[t]=e}function wt(t){return yt[t]}function zt(){var t=xt(),e=t.getState();t.setState(pt(dt({},e),{prompt:null}))}function St(t,e){var n=xt(),r=wt(t);if(!e&&r&&r()){var a={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangesTitleText","Unsaved Changes"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangeText","You have unsaved changes in the side panel. Do you want to discard these changes?"),onConfirm:function(){var e=n.getState();n.setState(pt(dt({},e),{prompt:null,openWorkspaces:e.openWorkspaces.filter((function(e){return e.name!=t}))}))},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","discard","Discard")};n.setState(pt(dt({},n.getState()),{prompt:a}))}else{var o=n.getState();n.setState(pt(dt({},o),{openWorkspaces:o.openWorkspaces.filter((function(e){return e.name!=t}))}))}}function kt(){var t=xt(),e=t.getState();t.setState(pt(dt({},e),{openWorkspaces:[]}))}function Et(t){var e=xt();e.getState().patientUuid!=t&&e.setState({patientUuid:t,openWorkspaces:[],prompt:null})}var At={patientUuid:null,openWorkspaces:[],prompt:null};function xt(){return(0,i.getGlobalStore)("workspace",At)}function Ct(){xt().setState(At)}var It=n(6217);function Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Tt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Pt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(){var t=Tt((0,r.useState)([]),2),e=t[0],n=t[1],a=Tt((0,r.useState)(null),2),i=a[0],o=a[1];(0,r.useEffect)((function(){var t=function(t){n(t.openWorkspaces),o(t.prompt)};t((0,It.getWorkspaceStore)().getState()),(0,It.getWorkspaceStore)().subscribe(t)}),[]);var s=(0,r.useMemo)((function(){return 0===e.length?"hidden":e[0].preferredWindowSize}),[e]);return{active:e.length>0,windowState:s,workspaces:e,prompt:i}}function Ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lt(t,e){switch(e){case"minimized":case"reopened":return{size:"normal"};default:return{size:e}}}var jt=(0,r.createContext)({windowSize:{size:"normal"},active:!1}),Wt=function(){return(0,r.useContext)(jt)},Mt=function(t){var e=t.children,n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ht(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a().useReducer(Lt,{size:"normal"}),2),i=n[0],o=n[1],s=Ot(),l=s.workspaces,c=s.windowState,u=s.active;(0,r.useEffect)((function(){l.length>0&&"maximized"===c?o("maximized"):o("reopened")}),[l.length,c]);var d=(0,r.useCallback)((function(t){o(t)}),[]),p=(0,r.useMemo)((function(){return{windowSize:i,updateWindowSize:d,active:u}}),[i,d,u]);return a().createElement(jt.Provider,{value:p},e)},Dt=n(617),Ut=n(6806),Zt=n(1610);const Nt=function(t,e){return!(null==t||!t.length)&&(0,Zt.Z)(t,e,0)>-1},Vt=function(t,e,n){for(var r=-1,a=null==t?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1};var Ft=n(1749),Bt=n(7459);var Gt=n(3249);const Rt=Bt.Z&&1/(0,Gt.Z)(new Bt.Z([,-0]))[1]==1/0?function(t){return new Bt.Z(t)}:function(){},qt=function(t,e){return t&&t.length?function(t,e,n){var r=-1,a=Nt,i=t.length,o=!0,s=[],l=s;if(n)o=!1,a=Vt;else if(i>=200){var c=e?null:Rt(t);if(c)return(0,Gt.Z)(c);o=!1,a=Ft.Z,l=new Ut.Z}else l=e?[]:s;t:for(;++r<i;){var u=t[r],d=e?e(u):u;if(u=n||0!==u?u:0,o&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue t;e&&l.push(d),s.push(u)}else a(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}(t,(0,Dt.Z)(e,2)):[]};var $t,Qt=function(t){var e,n=(0,et.ZP)("/ws/rest/v1/programenrollment?patient=".concat(t,"&v=").concat("custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))"),i.openmrsFetch),a=n.data,o=n.error,s=(0,r.useMemo)((function(){return null!==(e=null==a?void 0:a.data.results.sort((function(t,e){return e.dateEnrolled>t.dateEnrolled?1:-1})).filter((function(t){return null===t.dateCompleted})))&&void 0!==e?e:[]}),[null==a?void 0:a.data.results]);return{activePatientEnrollment:qt(s,(function(t){var e;return null==t||null===(e=t.program)||void 0===e?void 0:e.uuid})),error:o,isLoading:!a&&!o}},Xt=n(5047),Jt=n.n(Xt),Kt=new Uint8Array(16);function Yt(){if(!$t&&!($t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $t(Kt)}const te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ee=function(t){return"string"==typeof t&&te.test(t)};for(var ne=[],re=0;re<256;++re)ne.push((re+256).toString(16).substr(1));const ae=function(t,e,n){var r=(t=t||{}).random||(t.rng||Yt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=r[a];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ne[t[e+0]]+ne[t[e+1]]+ne[t[e+2]]+ne[t[e+3]]+"-"+ne[t[e+4]]+ne[t[e+5]]+"-"+ne[t[e+6]]+ne[t[e+7]]+"-"+ne[t[e+8]]+ne[t[e+9]]+"-"+ne[t[e+10]]+ne[t[e+11]]+ne[t[e+12]]+ne[t[e+13]]+ne[t[e+14]]+ne[t[e+15]]).toLowerCase();if(!ee(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oe(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function se(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){oe(i,r,a,o,s,"next",t)}function s(t){oe(i,r,a,o,s,"throw",t)}o(void 0)}))}}var le="patient-registration";function ce(t){var e=(0,i.useConnectivity)(),n=(0,i.usePatient)(t),a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)({data:null,error:null}),2),o=a[0],s=a[1];return(0,r.useEffect)((function(){e?s({error:null,data:null}):function(t){return ue.apply(this,arguments)}(t).then((function(t){s({error:null,data:t})})).catch((function(t){s({error:t,data:null})}))}),[t,e]),(0,r.useMemo)((function(){return n.isLoading||!o.data&&!o.error?{isLoading:!0,patient:null,patientUuid:t,error:null}:n.patient&&!n.patient.issue?{isLoading:!1,patient:n.patient,patientUuid:t,error:null}:o.data?{isLoading:!1,patient:o.data,patientUuid:t,error:null}:{isLoading:!1,patient:null,patientUuid:t,error:null!==(e=n.error)&&void 0!==e?e:o.error};var e}),[n,o.data,o.error,t])}function ue(){return(ue=se(Jt().mark((function t(e){var n,r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(le);case 2:return n=t.sent,r=n.find((function(t){var n;return(null===(n=t.fhirPatient)||void 0===n?void 0:n.id)===e})),t.abrupt("return",r.fhirPatient);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pe(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function me(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){pe(i,r,a,o,s,"next",t)}function s(t){pe(i,r,a,o,s,"throw",t)}o(void 0)}))}}function fe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return de(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _e="visit";function he(t){var e=(0,i.useConnectivity)(),n=fe((0,r.useState)(),2),a=n[0],o=n[1];return(0,r.useEffect)((function(){o((e?i.useVisit:ge)(t))}),[e,t]),a}function ge(t){var e=fe((0,r.useState)({data:null,error:null,isLoading:!0}),2),n=e[0],a=e[1];return(0,r.useEffect)((function(){ye(t).then((function(t){a({error:null,data:t?Se(t):null,isLoading:!1})})).catch((function(t){a({error:t,data:null,isLoading:!1})}))}),[t]),{currentVisit:n.data,isLoading:n.isLoading,isValidating:!1,error:n.error,mutate:function(){}}}function ve(t,e){var n,a,o=(0,i.useConnectivity)(),s=null===(n=(0,i.useSession)())||void 0===n||null===(a=n.sessionLocation)||void 0===a?void 0:a.uuid,l=ge(t),c=l.currentVisit,u=l.isValidating,d=l.error,p=l.mutate;(0,r.useEffect)((function(){o||u||c||d||we(t,s,e).finally((function(){return p()}))}),[o,c,u,d,p,s,e,t])}function ye(t){return be.apply(this,arguments)}function be(){return(be=me(Jt().mark((function t(e){var n;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(_e);case 2:return n=t.sent,t.abrupt("return",n.find((function(t){return t.patient===e})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function we(t,e,n){return ze.apply(this,arguments)}function ze(){return(ze=me(Jt().mark((function t(e,n,r){var a,o,s,l;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(le);case 2:return a=t.sent,o=a.some((function(t){return t.fhirPatient.id===e})),s={uuid:ae(),patient:e,startDatetime:new Date,location:n,visitType:r},l={id:s.uuid,displayName:"Offline visit",patientUuid:e,dependencies:o?[{type:le,id:e}]:[]},t.next=8,(0,i.queueSynchronizationItem)(_e,s,l);case 8:return t.abrupt("return",s);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Se(t){var e,n;return{uuid:t.uuid,startDatetime:null===(e=t.startDatetime)||void 0===e?void 0:e.toString(),stopDatetime:null===(n=t.stopDatetime)||void 0===n?void 0:n.toString(),encounters:[],visitType:{uuid:t.visitType,display:"Offline"},patient:{uuid:t.patient}}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[927],{7904:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I,.-esm-patient-immunizations__card-header__tabletHeader___efA_M{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4:after,.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I{height:3rem}.-esm-patient-immunizations__card-header__desktopHeader___BUQ5I h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__card-header__tabletHeader___efA_M{height:4.5rem}.-esm-patient-immunizations__card-header__tabletHeader___efA_M h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}',""]),o.locals={desktopHeader:"-esm-patient-immunizations__card-header__desktopHeader___BUQ5I",tabletHeader:"-esm-patient-immunizations__card-header__tabletHeader___efA_M"};const s=o},7942:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.active-left-nav-link .-esm-patient-immunizations__dashboardextension__link___lom8t:nth-child(1){color:#161616;padding:1.2rem 0 1.2rem 1.2rem}",""]),o.locals={link:"-esm-patient-immunizations__dashboardextension__link___lom8t"};const s=o},7431:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__empty-state__action___xInzb{margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__content___lACIK{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__empty-state__desktopHeading___UIGID h4:after,.-esm-patient-immunizations__empty-state__tabletHeading___lVXqD h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__heading___gW4Bc:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__empty-state__tile___DvfL3{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={action:"-esm-patient-immunizations__empty-state__action___xInzb",content:"-esm-patient-immunizations__empty-state__content___lACIK",desktopHeading:"-esm-patient-immunizations__empty-state__desktopHeading___UIGID",tabletHeading:"-esm-patient-immunizations__empty-state__tabletHeading___lVXqD",heading:"-esm-patient-immunizations__empty-state__heading___gW4Bc",tile:"-esm-patient-immunizations__empty-state__tile___DvfL3"};const s=o},418:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__error-state__errorMessage___kDICS{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-immunizations__error-state__errorCopy___UX21v{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-immunizations__error-state__desktopHeading___Bhvtx h4:after,.-esm-patient-immunizations__error-state__tabletHeading___EAqy2 h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-immunizations__error-state__tile___LTdVO{text-align:center;border:1px solid #e0e0e0}',""]),o.locals={errorMessage:"-esm-patient-immunizations__error-state__errorMessage___kDICS",errorCopy:"-esm-patient-immunizations__error-state__errorCopy___UX21v",desktopHeading:"-esm-patient-immunizations__error-state__desktopHeading___Bhvtx",tabletHeading:"-esm-patient-immunizations__error-state__tabletHeading___EAqy2",tile:"-esm-patient-immunizations__error-state__tile___LTdVO"};const s=o},8952:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(9601),a=n.n(r),i=n(2609),o=n.n(i)()(a());o.push([t.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__pagination__bodyShort01____zD39,.-esm-patient-immunizations__pagination__configurableLink___JhehZ{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-immunizations__pagination__desktop___TGt17,.-esm-patient-immunizations__pagination__tablet___BEzP7{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex;border-top:1px solid #e0e0e0;justify-content:space-between;color:#525252;background-color:#fff;padding-left:1rem;align-items:center}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination{min-height:0rem;height:2rem;width:auto;border:none}.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__desktop___TGt17 .cds--pagination .cds--pagination__right{min-height:0rem;height:2rem}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination{min-height:0rem;height:3rem;width:auto;border:none}.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--select-input,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--btn,.-esm-patient-immunizations__pagination__tablet___BEzP7 .cds--pagination .cds--pagination__right{min-height:0rem;height:3rem}.-esm-patient-immunizations__pagination__configurableLink___JhehZ{text-decoration:none;padding:0 .5rem}.-esm-patient-immunizations__pagination__pagination___B09B8{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;display:flex}div.-esm-patient-immunizations__pagination__pagination___B09B8>.cds--pagination__left{display:none}",""]),o.locals={bodyShort01:"-esm-patient-immunizations__pagination__bodyShort01____zD39",configurableLink:"-esm-patient-immunizations__pagination__configurableLink___JhehZ",desktop:"-esm-patient-immunizations__pagination__desktop___TGt17",tablet:"-esm-patient-immunizations__pagination__tablet___BEzP7",pagination:"-esm-patient-immunizations__pagination__pagination___B09B8"};const s=o},1927:(t,e,n)=>{n.r(e),n.d(e,{CardHeader:()=>w,DashboardExtension:()=>V,DashboardGroupExtension:()=>T,EmptyDataIllustration:()=>k,EmptyState:()=>P,ErrorState:()=>j,PatientChartPagination:()=>X,WorkspaceWindowSizeProvider:()=>Lt,cancelPrompt:()=>St,changeWorkspaceContext:()=>Et,closeAllWorkspaces:()=>kt,closeWorkspace:()=>zt,convertTime12to24:()=>tt,createDashboardGroup:()=>H,createDashboardLink:()=>F,createOfflineVisitForPatient:()=>Se,formEntrySub:()=>st,getOfflineVisitForPatient:()=>be,getPromptBeforeClosingFcn:()=>wt,getWorkspaceStore:()=>Ot,launchPatientChartWithWorkspaceOpen:()=>vt,launchPatientWorkspace:()=>gt,launchStartVisitPrompt:()=>B,patientRegistrationSyncType:()=>le,promptBeforeClosing:()=>bt,registerNavGroup:()=>L,registerWorkspace:()=>_t,resetWorkspaceStore:()=>Pt,useActivePatientEnrollment:()=>Qt,useAutoCreatedOfflineVisit:()=>ye,useNavGroups:()=>M,useOfflineVisit:()=>ve,usePaginationInfo:()=>R,usePatientOrOfflineRegisteredPatient:()=>ue,useVisitOrOfflineVisit:()=>ge,useVitalsConceptMetadata:()=>it,useWorkspaceWindowSize:()=>Dt,useWorkspaces:()=>jt,visitSyncType:()=>he,withUnit:()=>ot});var r=n(5529),a=n.n(r),i=n(906),o=n(6062),s=n.n(o),c=n(4036),l=n.n(c),u=n(6793),p=n.n(u),d=n(7892),m=n.n(d),f=n(1173),_=n.n(f),h=n(2464),g=n.n(h),v=n(7904),y={};y.styleTagTransform=g(),y.setAttributes=m(),y.insert=p().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=_(),s()(v.Z,y);const b=v.Z&&v.Z.locals?v.Z.locals:void 0;function w(t){var e=t.title,n=t.children,r="tablet"===(0,i.useLayoutType)();return a().createElement("div",{className:r?b.tabletHeader:b.desktopHeader},a().createElement("h4",null,e),n)}var S=n(9694),z=n(4924),k=function(t){var e=t.width,n=void 0===e?"64":e,r=t.height,i=void 0===r?"64":r;return a().createElement("svg",{width:n,height:i,viewBox:"0 0 64 64"},a().createElement("title",null,"Empty data illustration"),a().createElement("g",{fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},E=n(7431),A={};A.styleTagTransform=g(),A.setAttributes=m(),A.insert=p().bind(null,"head"),A.domAPI=l(),A.insertStyleElement=_(),s()(E.Z,A);const O=E.Z&&E.Z.locals?E.Z.locals:void 0;var P=function(t){var e=(0,z.useTranslation)().t,n="tablet"===(0,i.useLayoutType)();return a().createElement(S.mh4,null,a().createElement(S.n9L,{className:O.tile},a().createElement("div",{className:n?O.tabletHeading:O.desktopHeading},a().createElement("h4",null,t.headerTitle)),a().createElement(k,null),a().createElement("p",{className:O.content},a().createElement(z.Trans,{i18nKey:"emptyStateText",values:{displayText:t.displayText.toLowerCase()}},"There are no ",t.displayText.toLowerCase()," to display for this patient")),a().createElement("p",{className:O.action},t.launchForm&&a().createElement("span",null,a().createElement(S.rUS,{onClick:function(){return t.launchForm()}},a().createElement(a().Fragment,null,e("record","Record")," ",t.displayText.toLowerCase()))))))},x=n(418),C={};C.styleTagTransform=g(),C.setAttributes=m(),C.insert=p().bind(null,"head"),C.domAPI=l(),C.insertStyleElement=_(),s()(x.Z,C);const I=x.Z&&x.Z.locals?x.Z.locals:void 0;var j=function(t){var e,n,r=t.error,o=t.headerTitle,s=(0,z.useTranslation)().t,c="tablet"===(0,i.useLayoutType)();return a().createElement(S.mh4,null,a().createElement(S.n9L,{className:I.tile},a().createElement("div",{className:c?I.tabletHeading:I.desktopHeading},a().createElement("h4",null,o)),a().createElement("p",{className:I.errorMessage},s("error","Error")," ","".concat(null==r||null===(e=r.response)||void 0===e?void 0:e.status,": "),null==r||null===(n=r.response)||void 0===n?void 0:n.statusText),a().createElement("p",{className:I.errorCopy},s("errorCopy","Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above."))))},T=function(t){var e=t.title,n=t.slotName,o=t.basePath,s=t.isExpanded;return(0,r.useEffect)((function(){L(n)}),[n]),a().createElement(S.UQy,null,a().createElement(S.Qdk,{open:null==s||s,title:e,style:{border:"none"}},a().createElement(i.ExtensionSlot,{extensionSlotName:null!=n?n:e,state:{basePath:o}})))},H=function(t){var e=t.title,n=t.slotName,r=t.isExpanded;return function(t){var i=t.basePath;return a().createElement(T,{title:e,slotName:n,basePath:i,isExpanded:r})}};function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var D=(0,i.createGlobalStore)("nav-groups",{navGroups:[]});function L(t){var e,n=D.getState();D.setState({navGroups:[t].concat((e=n.navGroups,function(t){if(Array.isArray(t))return W(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}var M=(0,i.createUseStore)(D);var Z=n(7942),U={};U.styleTagTransform=g(),U.setAttributes=m(),U.insert=p().bind(null,"head"),U.domAPI=l(),U.insertStyleElement=_(),s()(Z.Z,U);const N=Z.Z&&Z.Z.locals?Z.Z.locals:void 0;var V=function(t){var e,n=t.title,o=t.basePath,s=null!==(e=window.location)&&void 0!==e?e:{pathname:""},c=n===(0,r.useMemo)((function(){return decodeURIComponent((t=s.pathname.split("/"),(e=null==t?0:t.length)?t[e-1]:void 0));var t,e}),[s.pathname])?"active-left-nav-link":"non-active";return a().createElement("div",{key:n,className:c},a().createElement(i.ConfigurableLink,{to:"".concat(o,"/").concat(encodeURIComponent(n)),className:"cds--side-nav__link "+N.link},n))},F=function(t){return function(e){var n=e.basePath;return a().createElement(V,{title:t.title,basePath:n})}};function B(){var t=(0,i.showModal)("start-visit-dialog",{closeModal:function(){return t()}})}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e,n,a){var i=(0,z.useTranslation)().t,o=(0,r.useMemo)((function(){var n,r=Math.ceil(e/t);return(n=Array(r).keys(),function(t){if(Array.isArray(t))return G(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return(e+1)*t}))}),[t,e]),s=(0,r.useMemo)((function(){return t>e?"".concat(e," / ").concat(e):t*n>e?"".concat(t*(n-1)+a," / ").concat(e):"".concat(t*n," / ").concat(e)}),[t,e,n,a]);return{pageSizes:o,itemsDisplayed:"".concat(s," ").concat(i("items"," items"))}}var q=n(8952),$={};$.styleTagTransform=g(),$.setAttributes=m(),$.insert=p().bind(null,"head"),$.domAPI=l(),$.insertStyleElement=_(),s()(q.Z,$);const Q=q.Z&&q.Z.locals?q.Z.locals:void 0;var X=function(t){var e=t.totalItems,n=t.pageSize,r=t.onPageNumberChange,o=t.pageNumber,s=t.dashboardLinkUrl,c=t.currentItems,l=t.dashboardLinkLabel,u=(0,z.useTranslation)().t,p=R(n,e,o,c),d=p.itemsDisplayed,m=p.pageSizes,f="tablet"===(0,i.useLayoutType)();return a().createElement(a().Fragment,null,e>0&&a().createElement("div",{className:f?Q.tablet:Q.desktop},a().createElement("div",null,d,s&&a().createElement(i.ConfigurableLink,{to:s,className:Q.configurableLink},null!=l?l:u("seeAll","See all"))),a().createElement(S.tlE,{className:Q.pagination,page:o,pageSize:n,pageSizes:m,totalItems:e,onChange:r,size:f?"lg":"sm"})))};function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var K,Y,tt=function(t,e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.split(":"),2),r=n[0],a=n[1];return"12"===r&&"AM"===e&&(r="00"),"PM"===e&&(r="12"===r?r:parseInt(r,10)+12),[r,a]},et=n(9857),nt=function(){return nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},nt.apply(this,arguments)},rt=function(t){return"function"==typeof t[1]?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},at=(K=et.ZP,Y=function(t){return function(e,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r)}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rt(t),r=n[0],a=n[1],i=n[2],o=(i.use||[]).concat(Y);return K(r,a,nt(nt({},i),{use:o}))});function it(){var t,e,n="/ws/rest/v1/concept/?q=VITALS SIGNS&v=".concat("custom:(setMembers:(uuid,display,hiNormal,hiAbsolute,hiCritical,lowNormal,lowAbsolute,lowCritical,units))"),r=at(n,i.openmrsFetch),a=r.data,o=r.error,s=null===(e=null==a||null===(t=a.data)||void 0===t?void 0:t.results[0])||void 0===e?void 0:e.setMembers;return{data:(null==s?void 0:s.length)?new Map(s.map((function(t){return[t.uuid,t.units]}))):new Map([]),isError:o,isLoading:!a&&!o,conceptMetadata:s}}var ot=function(t,e){return"".concat(t," ").concat(e?"(".concat(e,")"):"")},st=new(n(2444).BehaviorSubject)(null),ct=n(6081);function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ut(t,e,n[e])}))}return t}function dt(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}function mt(t){return function(t){if(Array.isArray(t))return lt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ft={};function _t(t){var e,n;ft[t.name]=dt(pt({},t),{preferredWindowSize:null!==(e=t.preferredWindowSize)&&void 0!==e?e:"normal",type:null!==(n=t.type)&&void 0!==n?n:"form"})}function ht(t){var e,n=null==t||null===(e=t.meta)||void 0===e?void 0:e.title;return"string"==typeof n?n:n&&"object"==typeof n?(0,i.translateFrom)(t.moduleName,n.key,n.default):t.name}function gt(t,e){var n=Ot(),r=n.getState(),a=function(t){if(ft[t])return ft[t];var e,n,r,a,i=(0,ct.getExtensionRegistration)(t);if(i)return{name:i.name,title:ht(i),preferredWindowSize:null!==(r=null===(e=i.meta)||void 0===e?void 0:e.screenSize)&&void 0!==r?r:"normal",load:i.load,type:null!==(a=null===(n=i.meta)||void 0===n?void 0:n.type)&&void 0!==a?a:"form"};throw new Error("No workspace named '".concat(t,"' has been registered."))}(t),o=dt(pt({},a),{closeWorkspace:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return zt(t,e)},promptBeforeClosing:function(e){return bt(t,e)},additionalProps:e}),s=r.openWorkspaces.filter((function(t){return t.type==o.type}));if(0==s.length)n.setState(dt(pt({},r),{openWorkspaces:[o].concat(mt(r.openWorkspaces))}));else{var c=r.openWorkspaces.findIndex((function(e){return e.name==t})),l=wt(s[0].name);if(c>=0){var u=mt(r.openWorkspaces);u.splice(c,1),r.openWorkspaces[c].additionalProps=o.additionalProps;var p=[r.openWorkspaces[c]].concat(mt(u));n.setState(dt(pt({},r),{openWorkspaces:p}))}else if(!l||l()){var d,m=null!==(d=s[0].title)&&void 0!==d?d:s[0].name,f={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","activeFormWarning","There is an active form open in the workspace"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","workspaceModalText","Launching a new form in the workspace could cause you to lose unsaved work on the ".concat(m," form."),{formName:m}),onConfirm:function(){var t=n.getState();n.setState({openWorkspaces:[o].concat(mt(t.openWorkspaces.filter((function(t){return t.type!=o.type})))),prompt:null})},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","openAnyway","Open anyway")};n.setState(dt(pt({},r),{prompt:f}))}else{var _=n.getState();n.setState(dt(pt({},_),{openWorkspaces:[o].concat(mt(_.openWorkspaces.filter((function(t){return t.type!=o.type}))))}))}}}function vt(t){var e=t.patientUuid,n=t.workspaceName,r=t.dashboardName,a=t.additionalProps;Et(e),gt(n,a),(0,i.navigate)({to:"${openmrsSpaBase}/patient/"+"".concat(e,"/chart")+(r?"/".concat(r):"")})}var yt={};function bt(t,e){yt[t]=e}function wt(t){return yt[t]}function St(){var t=Ot(),e=t.getState();t.setState(dt(pt({},e),{prompt:null}))}function zt(t,e){var n=Ot(),r=wt(t);if(!e&&r&&r()){var a={title:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangesTitleText","Unsaved Changes"),body:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","unsavedChangeText","You have unsaved changes in the side panel. Do you want to discard these changes?"),onConfirm:function(){var e=n.getState();n.setState(dt(pt({},e),{prompt:null,openWorkspaces:e.openWorkspaces.filter((function(e){return e.name!=t}))}))},confirmText:(0,i.translateFrom)("@openmrs/esm-patient-chart-app","discard","Discard")};n.setState(dt(pt({},n.getState()),{prompt:a}))}else{var o=n.getState();n.setState(dt(pt({},o),{openWorkspaces:o.openWorkspaces.filter((function(e){return e.name!=t}))}))}}function kt(){var t=Ot(),e=t.getState();t.setState(dt(pt({},e),{openWorkspaces:[]}))}function Et(t){var e=Ot();e.getState().patientUuid!=t&&e.setState({patientUuid:t,openWorkspaces:[],prompt:null})}var At={patientUuid:null,openWorkspaces:[],prompt:null};function Ot(){return(0,i.getGlobalStore)("workspace",At)}function Pt(){Ot().setState(At)}var xt=n(6217);function Ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(){var t=It((0,r.useState)([]),2),e=t[0],n=t[1],a=It((0,r.useState)(null),2),i=a[0],o=a[1];(0,r.useEffect)((function(){var t=function(t){n(t.openWorkspaces),o(t.prompt)};t((0,xt.getWorkspaceStore)().getState()),(0,xt.getWorkspaceStore)().subscribe(t)}),[]);var s=(0,r.useMemo)((function(){return 0===e.length?"hidden":e[0].preferredWindowSize}),[e]);return{active:e.length>0,windowState:s,workspaces:e,prompt:i}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ht(t,e){switch(e){case"minimized":case"reopened":return{size:"normal"};default:return{size:e}}}var Wt=(0,r.createContext)({windowSize:{size:"normal"},active:!1}),Dt=function(){return(0,r.useContext)(Wt)},Lt=function(t){var e=t.children,n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a().useReducer(Ht,{size:"normal"}),2),i=n[0],o=n[1],s=jt(),c=s.workspaces,l=s.windowState,u=s.active;(0,r.useEffect)((function(){c.length>0&&"maximized"===l?o("maximized"):o("reopened")}),[c.length,l]);var p=(0,r.useCallback)((function(t){o(t)}),[]),d=(0,r.useMemo)((function(){return{windowSize:i,updateWindowSize:p,active:u}}),[i,p,u]);return a().createElement(Wt.Provider,{value:d},e)},Mt=n(617),Zt=n(6806),Ut=n(1610);const Nt=function(t,e){return!(null==t||!t.length)&&(0,Ut.Z)(t,e,0)>-1},Vt=function(t,e,n){for(var r=-1,a=null==t?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1};var Ft=n(1749),Bt=n(7459);var Gt=n(3249);const Rt=Bt.Z&&1/(0,Gt.Z)(new Bt.Z([,-0]))[1]==1/0?function(t){return new Bt.Z(t)}:function(){},qt=function(t,e){return t&&t.length?function(t,e,n){var r=-1,a=Nt,i=t.length,o=!0,s=[],c=s;if(n)o=!1,a=Vt;else if(i>=200){var l=e?null:Rt(t);if(l)return(0,Gt.Z)(l);o=!1,a=Ft.Z,c=new Zt.Z}else c=e?[]:s;t:for(;++r<i;){var u=t[r],p=e?e(u):u;if(u=n||0!==u?u:0,o&&p==p){for(var d=c.length;d--;)if(c[d]===p)continue t;e&&c.push(p),s.push(u)}else a(c,p,n)||(c!==s&&c.push(p),s.push(u))}return s}(t,(0,Mt.Z)(e,2)):[]};var $t,Qt=function(t){var e,n=(0,et.ZP)("/ws/rest/v1/programenrollment?patient=".concat(t,"&v=").concat("custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))"),i.openmrsFetch),a=n.data,o=n.error,s=(0,r.useMemo)((function(){return null!==(e=null==a?void 0:a.data.results.sort((function(t,e){return e.dateEnrolled>t.dateEnrolled?1:-1})).filter((function(t){return null===t.dateCompleted})))&&void 0!==e?e:[]}),[null==a?void 0:a.data.results]);return{activePatientEnrollment:qt(s,(function(t){var e;return null==t||null===(e=t.program)||void 0===e?void 0:e.uuid})),error:o,isLoading:!a&&!o}},Xt=n(5047),Jt=n.n(Xt),Kt=new Uint8Array(16);function Yt(){if(!$t&&!($t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $t(Kt)}const te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ee=function(t){return"string"==typeof t&&te.test(t)};for(var ne=[],re=0;re<256;++re)ne.push((re+256).toString(16).substr(1));const ae=function(t,e,n){var r=(t=t||{}).random||(t.rng||Yt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=r[a];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ne[t[e+0]]+ne[t[e+1]]+ne[t[e+2]]+ne[t[e+3]]+"-"+ne[t[e+4]]+ne[t[e+5]]+"-"+ne[t[e+6]]+ne[t[e+7]]+"-"+ne[t[e+8]]+ne[t[e+9]]+"-"+ne[t[e+10]]+ne[t[e+11]]+ne[t[e+12]]+ne[t[e+13]]+ne[t[e+14]]+ne[t[e+15]]).toLowerCase();if(!ee(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oe(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}function se(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){oe(i,r,a,o,s,"next",t)}function s(t){oe(i,r,a,o,s,"throw",t)}o(void 0)}))}}function ce(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var le="patient-registration";function ue(t){var e=(0,i.useConnectivity)(),n=(0,i.usePatient)(t),a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)({patient:void 0,error:void 0}),2),o=a[0],s=a[1];return(0,r.useEffect)((function(){e?s({error:void 0,patient:void 0}):function(t){return pe.apply(this,arguments)}(t).then((function(t){s({error:void 0,patient:t})})).catch((function(t){var e,n;e=t,(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n)?s({error:t,patient:void 0}):s({error:new Error(JSON.stringify(t)),patient:void 0})}))}),[t,e]),(0,r.useMemo)((function(){if(e){if(n.patient&&n.patient.hasOwnProperty("issue")){var t=n.patient;return r=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ce(t,e,n[e])}))}return t}({},n),a=null!=(a={patient:void 0,error:new Error(JSON.stringify(t.issue))})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}(Object(a)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(a,t))})),r}return n}var r,a,i;return{isLoading:!(o.patient||o.error),patient:o.patient,patientUuid:null===(i=o.patient)||void 0===i?void 0:i.id,error:o.error}}),[e,n,o.patient,o.error])}function pe(){return(pe=se(Jt().mark((function t(e){var n,r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(le);case 2:return n=t.sent,r=n.find((function(t){var n;return(null===(n=t.fhirPatient)||void 0===n?void 0:n.id)===e})),t.abrupt("return",r.fhirPatient);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function me(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}function fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){me(i,r,a,o,s,"next",t)}function s(t){me(i,r,a,o,s,"throw",t)}o(void 0)}))}}function _e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return de(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var he="visit";function ge(t){var e=(0,i.useConnectivity)(),n=_e((0,r.useState)(),2),a=n[0],o=n[1];return(0,r.useEffect)((function(){o((e?i.useVisit:ve)(t))}),[e,t]),a}function ve(t){var e=_e((0,r.useState)({data:null,error:null,isLoading:!0}),2),n=e[0],a=e[1];return(0,r.useEffect)((function(){be(t).then((function(t){a({error:null,data:t?ke(t):null,isLoading:!1})})).catch((function(t){a({error:t,data:null,isLoading:!1})}))}),[t]),{currentVisit:n.data,isLoading:n.isLoading,isValidating:!1,error:n.error,mutate:function(){}}}function ye(t,e){var n,a,o=(0,i.useConnectivity)(),s=null===(n=(0,i.useSession)())||void 0===n||null===(a=n.sessionLocation)||void 0===a?void 0:a.uuid,c=ve(t),l=c.currentVisit,u=c.isValidating,p=c.error,d=c.mutate;(0,r.useEffect)((function(){o||u||l||p||Se(t,s,e).finally((function(){return d()}))}),[o,l,u,p,d,s,e,t])}function be(t){return we.apply(this,arguments)}function we(){return(we=fe(Jt().mark((function t(e){var n;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(he);case 2:return n=t.sent,t.abrupt("return",n.find((function(t){return t.patient===e})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Se(t,e,n){return ze.apply(this,arguments)}function ze(){return(ze=fe(Jt().mark((function t(e,n,r){var a,o,s,c;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.getSynchronizationItems)(le);case 2:return a=t.sent,o=a.some((function(t){return t.fhirPatient.id===e})),s={uuid:ae(),patient:e,startDatetime:new Date,location:n,visitType:r},c={id:s.uuid,displayName:"Offline visit",patientUuid:e,dependencies:o?[{type:le,id:e}]:[]},t.next=8,(0,i.queueSynchronizationItem)(he,s,c);case 8:return t.abrupt("return",s);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ke(t){var e,n;return{uuid:t.uuid,startDatetime:null===(e=t.startDatetime)||void 0===e?void 0:e.toString(),stopDatetime:null===(n=t.stopDatetime)||void 0===n?void 0:n.toString(),encounters:[],visitType:{uuid:t.visitType,display:"Offline"},patient:{uuid:t.patient}}}}}]);
|
|
@@ -394,9 +394,9 @@
|
|
|
394
394
|
"entry": false,
|
|
395
395
|
"recorded": false,
|
|
396
396
|
"reason": "reused as split chunk (cache group: default)",
|
|
397
|
-
"size":
|
|
397
|
+
"size": 88179,
|
|
398
398
|
"sizes": {
|
|
399
|
-
"javascript":
|
|
399
|
+
"javascript": 88137,
|
|
400
400
|
"consume-shared": 42
|
|
401
401
|
},
|
|
402
402
|
"names": [],
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
"927.js"
|
|
410
410
|
],
|
|
411
411
|
"auxiliaryFiles": [],
|
|
412
|
-
"hash": "
|
|
412
|
+
"hash": "2a708125972ee7cbb487",
|
|
413
413
|
"childrenByOrder": {}
|
|
414
414
|
},
|
|
415
415
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-immunizations-app",
|
|
3
|
-
"version": "4.0.1-pre.
|
|
3
|
+
"version": "4.0.1-pre.268",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Patient immunizations microfrontend for the OpenMRS SPA",
|
|
6
6
|
"browser": "dist/openmrs-esm-patient-immunizations-app.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@carbon/react": "^1.9.0",
|
|
37
|
-
"@openmrs/esm-patient-common-lib": "^4.0.1-pre.
|
|
37
|
+
"@openmrs/esm-patient-common-lib": "^4.0.1-pre.268",
|
|
38
38
|
"d3": "^7.0.3",
|
|
39
39
|
"lodash-es": "^4.17.15"
|
|
40
40
|
},
|
|
@@ -47,5 +47,8 @@
|
|
|
47
47
|
"react-router-dom": "6.x",
|
|
48
48
|
"rxjs": "6.x"
|
|
49
49
|
},
|
|
50
|
-
"
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"webpack": "^5.74.0"
|
|
52
|
+
},
|
|
53
|
+
"gitHead": "cfdc3455e0c1434893e51cc862046fe7605cce28"
|
|
51
54
|
}
|