@openmrs/esm-patient-vitals-app 8.0.2-pre.4616 → 8.0.2-pre.4635
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 +3 -3
- package/dist/282.js +1 -1
- package/dist/282.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-vitals-app.js +1 -1
- package/dist/openmrs-esm-patient-vitals-app.js.buildmanifest.json +7 -7
- package/dist/routes.json +1 -1
- package/package.json +3 -3
- package/src/vitals/paginated-vitals.component.tsx +25 -5
- package/src/vitals/paginated-vitals.scss +20 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -19,8 +19,8 @@ built modules 5.65 MiB (javascript) 378 bytes (share-init) 378 bytes (consume-sh
|
|
|
19
19
|
modules by path [1m../[39m[22m 5.41 MiB
|
|
20
20
|
modules by path [1m../../node_modules/[39m[22m 5.32 MiB 113 modules
|
|
21
21
|
modules by path [1m../esm-patient-common-lib/src/[39m[22m 98.5 KiB 5 modules
|
|
22
|
-
modules by path [1m./[39m[22m
|
|
23
|
-
javascript modules
|
|
22
|
+
modules by path [1m./[39m[22m 247 KiB
|
|
23
|
+
javascript modules 232 KiB 16 modules
|
|
24
24
|
optional modules 15.1 KiB [1m[33m[optional][39m[22m 9 modules
|
|
25
25
|
provide-module modules 378 bytes 9 modules
|
|
26
26
|
consume-shared-module modules 378 bytes
|
|
@@ -43,4 +43,4 @@ Entrypoints:
|
|
|
43
43
|
main.js
|
|
44
44
|
[39m[22m
|
|
45
45
|
|
|
46
|
-
webpack 5.89.0 compiled with [1m[33m2 warnings[39m[22m in
|
|
46
|
+
webpack 5.89.0 compiled with [1m[33m2 warnings[39m[22m in 130088 ms
|
package/dist/282.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[282],{2025:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__biometrics-base__widgetCard___VVsWE{border:1px solid #e0e0e0;background-color:#fff}.-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95 .cds--content-switcher{max-width:max-content}.-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95 .cds--content-switcher .cds--content-switcher__label{height:1rem}.-esm-patient-vitals__biometrics-base__divider___jTWE5{width:1px;height:1rem;color:#e0e0e0;margin:0 1rem}.-esm-patient-vitals__biometrics-base__backgroundDataFetchingIndicator___RmjJQ{align-items:center;display:flex;flex:1 1 0%;justify-content:end}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/biometrics/biometrics-base.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,0DACE,wBAAA,CACA,qBDLM,CCQR,2EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAEA,kGACE,qBAAA,CAEA,gIACE,WCYO,CDPb,uDACE,SAAA,CACA,WCKW,CDJX,aDzBM,CC0BN,aAAA,CAGF,+EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA",sourceRoot:""}]),l.locals={widgetCard:"-esm-patient-vitals__biometrics-base__widgetCard___VVsWE",biometricsHeaderActionItems:"-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95",divider:"-esm-patient-vitals__biometrics-base__divider___jTWE5",backgroundDataFetchingIndicator:"-esm-patient-vitals__biometrics-base__backgroundDataFetchingIndicator___RmjJQ"};const o=l},6775:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__biometrics-chart__label01___P3gNF,.-esm-patient-vitals__biometrics-chart__biometricLabel___SCxoN{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-vitals__biometrics-chart__bodyShort01___fVnip{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-vitals__biometrics-chart__biometricChartContainer___zWIvB{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-patient-vitals__biometrics-chart__biometricsArea___ocfRG{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc{flex-grow:4;padding:0 1rem 3rem}.-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc .cds--cc--layout-row{height:0}.-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc .layout-child{margin-top:.5rem}.-esm-patient-vitals__biometrics-chart__biometricLabel___SCxoN{margin-bottom:1rem;display:inline-block}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H{margin:1rem 0;scroll-behavior:smooth}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H>ul{flex-direction:column !important}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ{outline:0;outline-offset:0;min-height:2rem}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ:active,.-esm-patient-vitals__biometrics-chart__tab___eoQnZ:focus{outline:2px solid var(--brand-03) !important}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-patient-vitals__biometrics-chart__tablist___NB22b .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-patient-vitals__biometrics-chart__tablist___NB22b>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/biometrics/biometrics-chart.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,uHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,4DC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,wEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,+DACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,oEACE,WAAA,CACA,mBAAA,CAEA,yFACE,QAAA,CAGF,kFACE,gBEbS,CFiBb,+DAEE,kBETW,CFUX,oBAAA,CAGF,6DACE,aAAA,CACA,sBAAA,CAEA,gEACE,gCAAA,CAGF,sJACE,gBAAA,CAGF,qHACE,0BAAA,CACA,6BAAA,CAIJ,oDACE,SAAA,CACA,gBAAA,CACA,eExBW,CF0BX,qHACE,4CAAA,CAGF,wEACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,yEACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,wEACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,+FACE,kBAAA",sourceRoot:""}]),l.locals={label01:"-esm-patient-vitals__biometrics-chart__label01___P3gNF",biometricLabel:"-esm-patient-vitals__biometrics-chart__biometricLabel___SCxoN",bodyShort01:"-esm-patient-vitals__biometrics-chart__bodyShort01___fVnip",biometricChartContainer:"-esm-patient-vitals__biometrics-chart__biometricChartContainer___zWIvB",biometricsArea:"-esm-patient-vitals__biometrics-chart__biometricsArea___ocfRG",biometricsChartArea:"-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc",verticalTabs:"-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H",tab:"-esm-patient-vitals__biometrics-chart__tab___eoQnZ",tablist:"-esm-patient-vitals__biometrics-chart__tablist___NB22b"};const o=l},2651:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-header-item__container___kmFjV{display:flex;flex-flow:row wrap;flex-direction:column;margin:.5rem 0rem;min-inline-size:max-content}.-esm-patient-vitals__vitals-header-item__abnormal-value___r8fHJ,.-esm-patient-vitals__vitals-header-item__critical-value___DS2P3{border:1px solid #161616;background-color:#fff;display:flex;flex-direction:column;justify-content:center;width:fit-content;padding:0rem .25rem}.-esm-patient-vitals__vitals-header-item__critical-value___DS2P3{border:2px solid #da1e28}.-esm-patient-vitals__vitals-header-item__label-container___n8ySg,.-esm-patient-vitals__vitals-header-item__value-container___yDyp1{align-items:center;display:flex;justify-content:space-between}.-esm-patient-vitals__vitals-header-item__value-container___yDyp1{margin-top:.25rem}.-esm-patient-vitals__vitals-header-item__label___EIC_V{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252;margin-right:.375rem}.-esm-patient-vitals__vitals-header-item__danger-icon___RZ2tm{color:#da1e28;height:.25rem;width:.25rem}.-esm-patient-vitals__vitals-header-item__value___hCJxz{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-patient-vitals__vitals-header-item__units___Srfo9{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);color:#525252}.-esm-patient-vitals__vitals-header-item__pad-right___stjFA{margin-right:2px}.-esm-patient-vitals__vitals-header-item__critically-low___r4XPj::after,.-esm-patient-vitals__vitals-header-item__critically-high___IF8gS::after,.-esm-patient-vitals__vitals-header-item__low___ryY7W::after,.-esm-patient-vitals__vitals-header-item__high___SlE90::after{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}.-esm-patient-vitals__vitals-header-item__low___ryY7W::after{content:" ↓"}.-esm-patient-vitals__vitals-header-item__critically-low___r4XPj::after{content:" ↓↓"}.-esm-patient-vitals__vitals-header-item__high___SlE90::after{content:" ↑"}.-esm-patient-vitals__vitals-header-item__critically-high___IF8gS::after{content:" ↑↑"}',"",{version:3,sources:["webpack://./src/vitals-and-biometrics-header/vitals-header-item.scss","webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAAA,MCoDA,mBACE,CAAA,mBACA,CAAA,mBACA,CAAA,yBACA,CAAA,+BACA,CAAA,yEACA,CAAA,2GACA,CAAA,4DDxDF,YACE,CAAA,kBACA,CAAA,qBACA,CAAA,iBACA,CAAA,2BACA,CAAA,kIAGF,wBACE,CAAA,qBACA,CAAA,YACA,CAAA,qBACA,CAAA,sBACA,CAAA,iBACA,CAAA,mBACA,CAAA,iEAGF,wBAEE,CAAA,oIAGF,kBACE,CAAA,YACA,CAAA,6BACA,CAAA,kEAGF,iBAEE,CAAA,wDAGF,gDE6zBI,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CAAA,aD71BM,CAAA,oBDmCR,CAAA,8DAGF,aCvBS,CAAA,aDyBP,CAAA,YACA,CAAA,wDAGF,oDEizBI,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CAAA,wDF7yBJ,wDE6yBI,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CAAA,aD71BM,CAAA,4DDqDV,gBACE,CAAA,4QAIA,2DEmyBE,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CAAA,aD71BM,CAAA,6DDgEV,YACE,CAAA,wEAGF,aACE,CAAA,8DAGF,YACE,CAAA,yEAGF,aACE",sourceRoot:""}]),l.locals={container:"-esm-patient-vitals__vitals-header-item__container___kmFjV","abnormal-value":"-esm-patient-vitals__vitals-header-item__abnormal-value___r8fHJ","critical-value":"-esm-patient-vitals__vitals-header-item__critical-value___DS2P3","label-container":"-esm-patient-vitals__vitals-header-item__label-container___n8ySg","value-container":"-esm-patient-vitals__vitals-header-item__value-container___yDyp1",label:"-esm-patient-vitals__vitals-header-item__label___EIC_V","danger-icon":"-esm-patient-vitals__vitals-header-item__danger-icon___RZ2tm",value:"-esm-patient-vitals__vitals-header-item__value___hCJxz",units:"-esm-patient-vitals__vitals-header-item__units___Srfo9","pad-right":"-esm-patient-vitals__vitals-header-item__pad-right___stjFA","critically-low":"-esm-patient-vitals__vitals-header-item__critically-low___r4XPj","critically-high":"-esm-patient-vitals__vitals-header-item__critically-high___IF8gS",low:"-esm-patient-vitals__vitals-header-item__low___ryY7W",high:"-esm-patient-vitals__vitals-header-item__high___SlE90"};const o=l},2253:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-header__vitals-header___TRa8v{display:flex;justify-content:space-between;align-items:center;height:3rem;margin-left:1rem;outline:none;pointer-events:visibleFill}.-esm-patient-vitals__vitals-header__container___m2kfC{display:flex;align-items:baseline}.-esm-patient-vitals__vitals-header__background___RdUX3{background-color:#f4f4f4}.-esm-patient-vitals__vitals-header__row-container___VTy3u{width:100%;border-bottom:1px solid #e0e0e0;padding-bottom:.75rem}.-esm-patient-vitals__vitals-header__row___SCSqu{display:flex;justify-content:space-between;align-items:center;margin:0rem 1rem;max-width:100vw}.omrs-breakpoint-lt-desktop .-esm-patient-vitals__vitals-header__row___SCSqu,.-esm-patient-vitals__vitals-header__workspace-open___GKzIC .-esm-patient-vitals__vitals-header__row___SCSqu{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));column-gap:5rem}.-esm-patient-vitals__vitals-header__loading___QQtT1{display:flex;background-color:#f4f4f4;justify-content:center;min-height:3rem}.-esm-patient-vitals__vitals-header__container-row___xXXdB{display:flex;flex-wrap:wrap}.-esm-patient-vitals__vitals-header__tag___xSDrn{margin-left:.5rem}.-esm-patient-vitals__vitals-header__overdueIndicator___oqpJC{display:flex;align-items:center}.-esm-patient-vitals__vitals-header__overdueIndicator___oqpJC svg{margin-right:.25rem}.-esm-patient-vitals__vitals-header__button-container___N51rw{display:flex;align-items:center}.-esm-patient-vitals__vitals-header__arrow-up-button___eah45{display:flex;align-items:baseline;justify-content:center;cursor:pointer;margin-left:.5rem}.-esm-patient-vitals__vitals-header__arrow-up-icon___y8Ga4:not([disabled]) svg{fill:#0f62fe}.-esm-patient-vitals__vitals-header__heading___wDqjW{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-right:.5rem;color:#525252}.-esm-patient-vitals__vitals-header__record-vitals___Mfd_F{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-vitals__vitals-header__body-text____w1wq,.-esm-patient-vitals__vitals-header__link___Fr_ND{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252}.-esm-patient-vitals__vitals-header__link___Fr_ND{margin-left:.5rem;text-decoration-line:none;color:#0f62fe}html[dir=rtl] .-esm-patient-vitals__vitals-header__container___m2kfC>span:nth-child(2){margin-right:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/vitals-and-biometrics-header/vitals-header.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,2DACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,WC2CW,CD1CX,gBCsBW,CDrBX,YAAA,CACA,0BAAA,CAGF,uDACE,YAAA,CACA,oBAAA,CAGF,wDACE,wBDDwB,CCI1B,2DACE,UAAA,CACA,+BAAA,CACA,qBAAA,CAGF,iDACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CAKA,0LACE,YAAA,CACA,+CAAA,CACA,eAAA,CAIJ,qDACE,YAAA,CACA,wBD7BwB,CC8BxB,sBAAA,CACA,eCCW,CDEb,2DACE,YAAA,CACA,cAAA,CAGF,iDACE,iBAAA,CAGF,8DACE,YAAA,CACA,kBAAA,CAEA,kEACE,mBAAA,CAIJ,8DACE,YAAA,CACA,kBAAA,CAGF,6DACE,YAAA,CACA,oBAAA,CACA,sBAAA,CACA,cAAA,CACA,iBAAA,CAGF,+EACE,YD1EgB,CC6ElB,qDE0wBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFxwBF,kBCrEW,CDsEX,aDtFQ,CCyFV,2DEowBI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CFhwBJ,yGEgwBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CF9vBF,aD/FQ,CCkGV,kDACE,iBAAA,CAEA,yBAAA,CACA,aDtFe,CC4Fb,uFACE,kBC7FO",sourceRoot:""}]),l.locals={"vitals-header":"-esm-patient-vitals__vitals-header__vitals-header___TRa8v",container:"-esm-patient-vitals__vitals-header__container___m2kfC",background:"-esm-patient-vitals__vitals-header__background___RdUX3","row-container":"-esm-patient-vitals__vitals-header__row-container___VTy3u",row:"-esm-patient-vitals__vitals-header__row___SCSqu","workspace-open":"-esm-patient-vitals__vitals-header__workspace-open___GKzIC",loading:"-esm-patient-vitals__vitals-header__loading___QQtT1","container-row":"-esm-patient-vitals__vitals-header__container-row___xXXdB",tag:"-esm-patient-vitals__vitals-header__tag___xSDrn",overdueIndicator:"-esm-patient-vitals__vitals-header__overdueIndicator___oqpJC","button-container":"-esm-patient-vitals__vitals-header__button-container___N51rw","arrow-up-button":"-esm-patient-vitals__vitals-header__arrow-up-button___eah45","arrow-up-icon":"-esm-patient-vitals__vitals-header__arrow-up-icon___y8Ga4",heading:"-esm-patient-vitals__vitals-header__heading___wDqjW","record-vitals":"-esm-patient-vitals__vitals-header__record-vitals___Mfd_F","body-text":"-esm-patient-vitals__vitals-header__body-text____w1wq",link:"-esm-patient-vitals__vitals-header__link___Fr_ND"};const o=l},8393:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,'.-esm-patient-vitals__paginated-vitals__table___tGgKY td{white-space:nowrap}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq td:nth-child(2),.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI td:nth-child(2),.-esm-patient-vitals__paginated-vitals__low___ZYjHL td:nth-child(2),.-esm-patient-vitals__paginated-vitals__high___kRFGr td:nth-child(2){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)}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq,.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI{border:2px solid #da1e28 !important}.-esm-patient-vitals__paginated-vitals__low___ZYjHL,.-esm-patient-vitals__paginated-vitals__high___kRFGr{border:1.5px solid #000 !important}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq td:nth-child(2)::after{content:" ↓↓"}.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI td:nth-child(2)::after{content:" ↑↑"}.-esm-patient-vitals__paginated-vitals__low___ZYjHL td:nth-child(2)::after{content:" ↓"}.-esm-patient-vitals__paginated-vitals__high___kRFGr td:nth-child(2)::after{content:" ↑"}.-esm-patient-vitals__paginated-vitals__off-scale-low___moLj6 td:nth-child(2)::after{content:" ↓↓↓"}.-esm-patient-vitals__paginated-vitals__off-scale-high___fnflS td:nth-child(2)::after{content:" ↑↑↑"}.-esm-patient-vitals__paginated-vitals__offScaleHigh___XpEz7,.-esm-patient-vitals__paginated-vitals__offScaleLow___Ss3WT,.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI,.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq,.-esm-patient-vitals__paginated-vitals__high___kRFGr,.-esm-patient-vitals__paginated-vitals__low___ZYjHL{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)}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq::after{content:" ↓↓"}.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI::after{content:" ↑↑"}.-esm-patient-vitals__paginated-vitals__low___ZYjHL::after{content:" ↓"}.-esm-patient-vitals__paginated-vitals__high___kRFGr::after{content:" ↑"}',"",{version:3,sources:["webpack://./src/vitals/paginated-vitals.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAAA,yDAIE,kBACE,CAAA,sSAKF,2DCw1BE,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CAAA,6HDn1BJ,mCACE,CAAA,yGAGF,kCACE,CAAA,qFAIA,aACE,CAAA,sFAKF,aACE,CAAA,2EAKF,YACE,CAAA,4EAKF,YACE,CAAA,qFAKF,cACE,CAAA,sFAKF,cACE,CAAA,+VAIJ,2DCuyBI,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CAAA,qED9xBJ,aACE,CAAA,sEAGF,aACE,CAAA,2DAGF,YACE,CAAA,4DAGF,YACE",sourceRoot:""}]),l.locals={table:"-esm-patient-vitals__paginated-vitals__table___tGgKY",criticallyLow:"-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq",criticallyHigh:"-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI",low:"-esm-patient-vitals__paginated-vitals__low___ZYjHL",high:"-esm-patient-vitals__paginated-vitals__high___kRFGr","off-scale-low":"-esm-patient-vitals__paginated-vitals__off-scale-low___moLj6","off-scale-high":"-esm-patient-vitals__paginated-vitals__off-scale-high___fnflS",offScaleHigh:"-esm-patient-vitals__paginated-vitals__offScaleHigh___XpEz7",offScaleLow:"-esm-patient-vitals__paginated-vitals__offScaleLow___Ss3WT"};const o=l},1888:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,"@media screen{.-esm-patient-vitals__print__printPage___BhX2J{background-color:#fff;display:none}}@media print{@page{size:auto;margin:2.5rem}.-esm-patient-vitals__print__header___uIp5f{display:flex;align-items:center;justify-content:space-between;background-color:#fff}.-esm-patient-vitals__print__patientDetails___Vr7Cd{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);margin:0 .5rem}.-esm-patient-vitals__print__patientInfo___z7G0t{color:#393939;font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-patient-vitals__print__name___sfPBA{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-right:.5rem}.-esm-patient-vitals__print__footer___3u_QJ{font-size:.75rem;display:flex}.-esm-patient-vitals__print__date___Af9Cg{margin-left:1.5rem}.-esm-patient-vitals__print__gender___t6PwU{text-transform:capitalize}.-esm-patient-vitals__print__printedBy___NBaEw{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);margin:0 .25rem}.-esm-patient-vitals__print__subheader___EibcN{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;padding:.5rem;text-align:center}}","",{version:3,sources:["webpack://./src/vitals/print/print.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAIA,cACE,+CACE,qBCGI,CDFJ,YAAA,CAAA,CAIJ,aACE,MACE,SAAA,CACA,aEgCS,CF7BX,4CACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,qBCZI,CDeN,oDG00BE,oDAAA,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CHx0BA,cAAA,CAGF,iDACE,aCmBM,CEizBN,oDAAA,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CHh0BF,0CGg0BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CH9zBA,kBEfS,CFkBX,4CACE,gBEdS,CFeT,YAAA,CAGF,0CACE,kBETS,CFYX,4CACE,yBAAA,CAGF,+CG8yBE,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CH5yBA,eAAA,CAGF,+CGyyBE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CHvyBA,aCXM,CDYN,aEvCS,CFwCT,iBAAA,CAAA",sourceRoot:""}]),l.locals={printPage:"-esm-patient-vitals__print__printPage___BhX2J",header:"-esm-patient-vitals__print__header___uIp5f",patientDetails:"-esm-patient-vitals__print__patientDetails___Vr7Cd",patientInfo:"-esm-patient-vitals__print__patientInfo___z7G0t",name:"-esm-patient-vitals__print__name___sfPBA",footer:"-esm-patient-vitals__print__footer___3u_QJ",date:"-esm-patient-vitals__print__date___Af9Cg",gender:"-esm-patient-vitals__print__gender___t6PwU",printedBy:"-esm-patient-vitals__print__printedBy___NBaEw",subheader:"-esm-patient-vitals__print__subheader___EibcN"};const o=l},9361:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-chart__label01___IkvGS,.-esm-patient-vitals__vitals-chart__vitalsSignLabel___NYx6i{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-vitals__vitals-chart__bodyShort01___M480D{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-vitals__vitals-chart__vitalsChartContainer____aVtw{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-patient-vitals__vitals-chart__vitalSignsArea___Ev8GQ{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk{flex-grow:4;padding:0 1rem 3rem}.-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk .cds--cc--layout-row{height:0}.-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk .layout-child{margin-top:.5rem}.-esm-patient-vitals__vitals-chart__vitalsSignLabel___NYx6i{margin-bottom:1rem;display:inline-block}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb{margin:1rem 0;scroll-behavior:smooth}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb>ul{flex-direction:column !important}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-patient-vitals__vitals-chart__tab___g2wF6{outline:0;outline-offset:0;min-height:2rem}.-esm-patient-vitals__vitals-chart__tab___g2wF6:active,.-esm-patient-vitals__vitals-chart__tab___g2wF6:focus{outline:2px solid var(--brand-03) !important}.-esm-patient-vitals__vitals-chart__tab___g2wF6[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-patient-vitals__vitals-chart__tab___g2wF6[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-patient-vitals__vitals-chart__tablist___OoHVR .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-patient-vitals__vitals-chart__tablist___OoHVR>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/vitals/vitals-chart.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,gHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,wDC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,iEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,2DACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,4DACE,WAAA,CACA,mBAAA,CAEA,iFACE,QAAA,CAGF,0EACE,gBAAA,CAIJ,4DAEE,kBAAA,CACA,oBAAA,CAGF,yDACE,aAAA,CACA,sBAAA,CAEA,4DACE,gCAAA,CAGF,kJACE,gBAAA,CAGF,iHACE,0BAAA,CACA,6BAAA,CAIJ,gDACE,SAAA,CACA,gBAAA,CACA,eAAA,CAEA,6GACE,4CAAA,CAGF,oEACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,qEACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,oEACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,2FACE,kBAAA",sourceRoot:""}]),l.locals={label01:"-esm-patient-vitals__vitals-chart__label01___IkvGS",vitalsSignLabel:"-esm-patient-vitals__vitals-chart__vitalsSignLabel___NYx6i",bodyShort01:"-esm-patient-vitals__vitals-chart__bodyShort01___M480D",vitalsChartContainer:"-esm-patient-vitals__vitals-chart__vitalsChartContainer____aVtw",vitalSignsArea:"-esm-patient-vitals__vitals-chart__vitalSignsArea___Ev8GQ",vitalsChartArea:"-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk",verticalTabs:"-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb",tab:"-esm-patient-vitals__vitals-chart__tab___g2wF6",tablist:"-esm-patient-vitals__vitals-chart__tablist___OoHVR"};const o=l},6299:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,".-esm-patient-vitals__vitals-overview__widgetCard___u3uLL{background-color:#fff;border:1px solid #e0e0e0}.-esm-patient-vitals__vitals-overview__divider___EV5ez{width:1px;height:1rem;color:#e0e0e0;margin:0 1rem}.-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr .cds--content-switcher{max-width:max-content}.-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr .cds--content-switcher .cds--content-switcher__label{height:1rem}.-esm-patient-vitals__vitals-overview__customRow____W_Ay tbody{white-space:nowrap}.-esm-patient-vitals__vitals-overview__backgroundDataFetchingIndicator___Op161{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-patient-vitals__vitals-overview__printButton___G94Ip{margin-left:1.25rem}","",{version:3,sources:["webpack://./src/vitals/vitals-overview.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAIA,0DACE,qBCIM,CDHN,wBAAA,CAGF,uDACE,SAAA,CACA,WEoBW,CFnBX,aC+BQ,CD9BR,aAAA,CAGF,uEACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAEA,8FACE,qBAAA,CAEA,4HACE,WEKO,CAAA,+DFCX,kBAAA,CAGF,+EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAGF,2DACE,mBAAA",sourceRoot:""}]),l.locals={widgetCard:"-esm-patient-vitals__vitals-overview__widgetCard___u3uLL",divider:"-esm-patient-vitals__vitals-overview__divider___EV5ez",vitalsHeaderActionItems:"-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr",customRow:"-esm-patient-vitals__vitals-overview__customRow____W_Ay",backgroundDataFetchingIndicator:"-esm-patient-vitals__vitals-overview__backgroundDataFetchingIndicator___Op161",printButton:"-esm-patient-vitals__vitals-overview__printButton___G94Ip"};const o=l},9454:(e,t,a)=>{"use strict";a.d(t,{wA:()=>c,IZ:()=>_,tQ:()=>u,WK:()=>A,$2:()=>O,F9:()=>S,VK:()=>D,l4:()=>C,Aq:()=>y});var i=a(268),r=a(2870),n=a(9198),l=a.n(n),o=a(9285),s=a.n(o);function c(e,t){if(t&&e){if(t.hiCritical&&e>=t.hiCritical)return"critically_high";if(t.hiNormal&&e>t.hiNormal)return"high";if(t.lowCritical&&e<=t.lowCritical)return"critically_low";if(t.lowNormal&&e<t.lowNormal)return"low"}return"normal"}function A(e,t,a,i){if(!i)return"normal";var r=c(e,u(null==a?void 0:a.systolicBloodPressureUuid,i)),n=(null==a?void 0:a.diastolicBloodPressureUuid)?c(t,u(a.diastolicBloodPressureUuid,i)):"normal";return"critically_high"===r||"critically_high"===n?"critically_high":"critically_low"===r||"critically_low"===n?"critically_low":"high"===r||"high"===n?"high":"low"===r||"low"===n?"low":"normal"}function _(e){switch(e){case"BMI":return"";case"Temperature":case"Weight":return"--.-";case"Height":case"diastolic":case"systolic":case"Pulse":return"---";default:return"--"}}function u(e,t){if(e&&(null==t?void 0:t.length))return null==t?void 0:t.find((function(t){return t.uuid===e}))}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function m(e,t,a,i,r,n,l){try{var o=e[n](l),s=o.value}catch(e){return void a(e)}o.done?t(s):Promise.resolve(s).then(i,r)}function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function v(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){p(e,t,a[t])}))}return e}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=100,b=Symbol("vitalsAndBiometrics");function f(e){return"".concat(e,"RenderInterpretation")}function C(){var e,t,a="".concat(r.restBaseUrl,"/concept/?q=VITALS SIGNS&v=").concat("custom:(setMembers:(uuid,display,hiNormal,hiAbsolute,hiCritical,lowNormal,lowAbsolute,lowCritical,units))"),i=l()(a,r.openmrsFetch),n=i.data,o=i.error,s=i.isLoading,c=null==n||null===(t=n.data)||void 0===t||null===(e=t.results[0])||void 0===e?void 0:e.setMembers,A=(null==c?void 0:c.length)?new Map(c.map((function(e){return[e.uuid,e.units]}))):new Map([]),_=(null==c?void 0:c.length)?new Map(c.map((function(e){var t,a;return[e.uuid,{lowAbsolute:null!==(t=e.lowAbsolute)&&void 0!==t?t:null,highAbsolute:null!==(a=e.hiAbsolute)&&void 0!==a?a:null}]}))):new Map([]);return{data:A,error:o,isLoading:s,conceptMetadata:c,conceptRanges:_}}var y=function(e,t){return"".concat(e," ").concat(t?"(".concat(t,")"):"")},w=0,E=new Map;function D(e){var t,a,n,l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vitals",_=C().conceptMetadata,d=(0,r.useConfig)().concepts,m=(0,i.useMemo)((function(){return[d.heightUuid,d.midUpperArmCircumferenceUuid,d.weightUuid]}),[d.heightUuid,d.midUpperArmCircumferenceUuid,d.weightUuid]),g=(0,i.useMemo)((function(){return("both"===o?Object.values(d):Object.values(d).filter((function(e){return"vitals"===o&&!m.includes(e)||"biometrics"===o&&m.includes(e)}))).join(",")}),[d,m,o]),y=(0,i.useCallback)((function(t,a){return{swrKeyNeedle:b,mode:o,patientUuid:e,conceptUuids:g,page:t,prevPageData:a}}),[o,g,e]),D=s()(y,B),S=D.data,k=D.isLoading,O=D.isValidating,U=D.setSize,F=D.error,j=D.size,P=D.mutate;(0,i.useEffect)((function(){var e=++w;return E.set(e,P),function(){E.delete(e)}}),[P]);var x,T=(0,i.useCallback)((function(e){switch(e){case d.systolicBloodPressureUuid:return"systolic";case d.diastolicBloodPressureUuid:return"diastolic";case d.pulseUuid:return"pulse";case d.temperatureUuid:return"temperature";case d.oxygenSaturationUuid:return"spo2";case d.respiratoryRateUuid:return"respiratoryRate";case d.heightUuid:return"height";case d.weightUuid:return"weight";case d.midUpperArmCircumferenceUuid:return"muac";default:return""}}),[d.heightUuid,d.midUpperArmCircumferenceUuid,d.systolicBloodPressureUuid,d.oxygenSaturationUuid,d.diastolicBloodPressureUuid,d.pulseUuid,d.respiratoryRateUuid,d.temperatureUuid,d.weightUuid]),N=(0,i.useMemo)((function(){var e,t,a,i,r=null==S||null===(i=S[0])||void 0===i||null===(a=i.data)||void 0===a||null===(t=a.entry)||void 0===t||null===(e=t.map((function(e){return e.resource})).filter(Boolean).map(function(e){return function(t){var a,i,r,n,l,o,s,A;return{code:null==t||null===(r=t.code)||void 0===r||null===(i=r.coding)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.code,interpretation:c(null==t||null===(n=t.valueQuantity)||void 0===n?void 0:n.value,u(null==t||null===(s=t.code)||void 0===s||null===(o=s.coding)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.code,e)),recordedDate:null==t?void 0:t.effectiveDateTime,value:null==t||null===(A=t.valueQuantity)||void 0===A?void 0:A.value}}}(_)))||void 0===e?void 0:e.reduce((function(e,t){var a,i,r,n,l=new Date(new Date(t.recordedDate)).toISOString();return e.has(l)&&e.get(l)?e.set(l,(r=v({},e.get(l)),p(a={},T(t.code),t.value),p(a,f(T(t.code)),t.interpretation),n=null!=(n=a)?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})),r)):t.value&&e.set(l,(p(i={},T(t.code),t.value),p(i,f(T(t.code)),t.interpretation),i)),e}),new Map);return Array.from(null!=r?r:[]).map((function(e,t){var a,i,r=h(e,2),n=r[0],l=r[1],s=v({id:t.toString(),date:n},l);return"both"!==o&&"biometrics"!==o||(s.bmi=(a=Number(l.weight),i=Number(l.height),a>0&&i>0?Number((a/Math.pow(i/100,2)).toFixed(1)):null)),"both"!==o&&"vitals"!==o||(s.bloodPressureRenderInterpretation=A(l.systolic,l.diastolic,d,_)),s}))}),[S,_,T,d,o]);return{data:S?N:void 0,isLoading:k,error:F,hasMore:!!(null==S?void 0:S.length)&&!!(null===(a=S[S.length-1].data)||void 0===a||null===(t=a.link)||void 0===t?void 0:t.some((function(e){return"next"===e.relation}))),isValidating:O,loadingNewData:O,setPage:U,currentPage:j,totalResults:null!==(x=null==S||null===(l=S[0])||void 0===l||null===(n=l.data)||void 0===n?void 0:n.total)&&void 0!==x?x:void 0,mutate:P}}function B(e){var t,a=e.patientUuid,i=e.conceptUuids,n=e.page,l=e.prevPageData;if(l&&!(null==l||null===(t=l.data)||void 0===t?void 0:t.link.some((function(e){return"next"===e.relation}))))return null;var o="".concat(r.fhirBaseUrl,"/Observation?subject:Patient=").concat(a,"&"),s=new URLSearchParams;return s.append("code",i),s.append("_summary","data"),s.append("_sort","-date"),s.append("_count",g.toString()),n&&s.append("_getpagesoffset",(n*g).toString()),(0,r.openmrsFetch)(o+s.toString())}function S(e,t,a,i,n,l,o){return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/encounter"),{method:"POST",headers:{"Content-Type":"application/json"},signal:l.signal,body:{patient:i,location:o,encounterType:e,form:t,obs:k(n,a)}})}function k(e,t){return Object.entries(e).filter((function(e){var t=h(e,2),a=(t[0],t[1]);return Boolean(a)})).map((function(e){var a=h(e,2),i=a[0],r=a[1];return{concept:t[i+"Uuid"],value:r}}))}function O(){return U.apply(this,arguments)}function U(){var e;return e=function(){return function(e,t){var a,i,r,n,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,i=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){l=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){l.label=n[1];break}if(6===n[0]&&l.label<r[1]){l.label=r[1],r=n;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(n);break}r[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],i=0}finally{a=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}(this,(function(e){return E.forEach((function(e){return e()})),[2]}))},U=function(){var t=this,a=arguments;return new Promise((function(i,r){var n=e.apply(t,a);function l(e){m(n,i,r,l,o,"next",e)}function o(e){m(n,i,r,l,o,"throw",e)}l(void 0)}))},U.apply(this,arguments)}},9282:(e,t,a)=>{"use strict";a.r(t),a.d(t,{biometricsDetailedSummary:()=>We,biometricsOverview:()=>qe,importTranslation:()=>Le,startupApp:()=>ze,vitalsAndBiometricsDashboardLink:()=>Ye,vitalsBiometricsFormWorkspace:()=>Je,vitalsHeader:()=>He,vitalsMain:()=>Ve,vitalsSummary:()=>Me,weightTile:()=>Qe});var i=a(2870),r=a(884);var n={concepts:{systolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},diastolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},pulseUuid:{_type:i.Type.ConceptUuid,_default:"5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},temperatureUuid:{_type:i.Type.ConceptUuid,_default:"5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},oxygenSaturationUuid:{_type:i.Type.ConceptUuid,_default:"5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},heightUuid:{_type:i.Type.ConceptUuid,_default:"5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},weightUuid:{_type:i.Type.ConceptUuid,_default:"5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},respiratoryRateUuid:{_type:i.Type.ConceptUuid,_default:"5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},generalPatientNoteUuid:{_type:i.Type.ConceptUuid,_default:"165095AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},midUpperArmCircumferenceUuid:{_type:i.Type.ConceptUuid,_default:"1343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},vitals:{useFormEngine:{_type:i.Type.Boolean,_default:!1,_description:"Whether to use an Ampath form as the vitals and biometrics form. If set to true, encounterUuid and formUuid must be set as well."},encounterTypeUuid:{_type:i.Type.UUID,_default:"67a71486-1a54-468f-ac3e-7091a9a79584"},logo:{src:{_type:i.Type.String,_default:null,_description:"A path or URL to an image. Defaults to the OpenMRS SVG sprite."},alt:{_type:i.Type.String,_default:"Logo",_description:"Alt text, shown on hover"},name:{_type:i.Type.String,_default:null,_description:"The organization name displayed when image is absent"}},showPrintButton:{_type:i.Type.Boolean,_default:!1,_description:"Determines whether or not to display the Print button in the vitals datatable header. If set to true, a Print button gets shown as the right-most item in the table header. When clicked, this button enables the user to print out the contents of the table"},formUuid:{_type:i.Type.UUID,_default:"9f26aad4-244a-46ca-be49-1196df1a8c9a"},formName:{_type:i.Type.String,_default:"Vitals"},useMuacColors:{_type:i.Type.Boolean,_default:!1,_description:"Whether to show/use MUAC color codes. If set to true, the input will show status colors."}},biometrics:{bmiUnit:{_type:i.Type.String,_default:"kg / m²"}}},l=a(268),o=a.n(l),s=a(4924),c=a(234),A=a(5089),_=a(5508),u=a(2074),d=a(37),m=a(6759);function p(e,t){if(e)if(t.vitals.useFormEngine){var a=t.vitals;i=a.formUuid,n=a.formName,(0,r.launchPatientWorkspace)("patient-form-entry-workspace",{workspaceTitle:n,formInfo:{formUuid:i,encounterUuid:""}})}else(0,r.launchPatientWorkspace)("patient-vitals-biometrics-form-workspace");else(0,r.launchStartVisitPrompt)();var i,n}var v=a(9454),h=a(321),g=a.n(h),b=a(1195),f=a.n(b),C=a(3275),y=a.n(C),w=a(7162),E=a.n(w),D=a(2094),B=a.n(D),S=a(757),k=a.n(S),O=a(8393),U={};U.styleTagTransform=k(),U.setAttributes=E(),U.insert=y().bind(null,"head"),U.domAPI=f(),U.insertStyleElement=B(),g()(O.Z,U);const F=O.Z&&O.Z.locals?O.Z.locals:void 0;function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function P(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function x(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){P(e,t,a[t])}))}return e}const T=function(e){var t,a,n=e.tableRows,s=e.pageSize,c=e.pageUrl,_=e.urlLabel,u=e.tableHeaders,d=e.isPrinting,m="tablet"===(0,i.useLayoutType)(),p=function(e){var t=e.interpretation,a=e.children;switch(t){case"critically_high":return o().createElement(A.pj1,{className:F.criticallyHigh},a);case"critically_low":return o().createElement(A.pj1,{className:F.criticallyLow},a);case"high":return o().createElement(A.pj1,{className:F.high},a);case"low":return o().createElement(A.pj1,{className:F.low},a);default:return o().createElement(A.pj1,null,a)}},v=(t=(0,l.useState)({key:"",sortDirection:"NONE"}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(t,a)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?j(e,t):void 0}}(t,a)||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.")}()),h=v[0],g=v[1],b=(0,l.useMemo)((function(){if("NONE"===h.sortDirection)return n;var e=u.find((function(e){return e.key===h.key}));return e?n.slice().sort((function(t,a){var i=e.sortFunc(t,a);return"DESC"===h.sortDirection?i:-i})):n}),[u,n,h]),f=(0,i.usePagination)(b,s),C=f.results,y=f.goTo,w=f.currentPage,E=d?b:C;return o().createElement("div",null,o().createElement(A.wQF,{rows:E,headers:u,size:m?"lg":"sm",useZebraStyles:!0,sortRow:function(e,t,a){var i=a.key,r=a.sortDirection;g("NONE"===r?{key:"",sortDirection:r}:{key:i,sortDirection:r})},isSortable:!0},(function(e){var t=e.rows,a=e.headers,i=e.getTableProps,r=e.getHeaderProps;return o().createElement(A.xJi,null,o().createElement(A.iA_,x({className:F.table,"aria-label":"vitals"},i()),o().createElement(A.ssF,null,o().createElement(A.SCH,null,a.map((function(e){var t,a;return o().createElement(A.xDH,function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(x({},r({header:e,isSortable:e.isSortable})),{key:e.key}),null!==(a=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==a?a:e.header)})))),o().createElement(A.RMI,null,t.map((function(e){return o().createElement(A.SCH,{key:e.id},e.cells.map((function(t){var a,i,r=C.find((function(t){return t.id===e.id})),n=r&&r[t.id.substring(2)+"Interpretation"];return o().createElement(p,{key:"styled-cell-".concat(t.id),interpretation:n},null!==(i=null===(a=t.value)||void 0===a?void 0:a.content)&&void 0!==i?i:t.value)})))})))))})),d?null:o().createElement(r.PatientChartPagination,{pageNumber:w,totalItems:n.length,currentItems:C.length,pageSize:s,onPageNumberChange:function(e){var t=e.page;return y(t)},dashboardLinkUrl:c,dashboardLinkLabel:_}))};var N=a(1888),I={};I.styleTagTransform=k(),I.setAttributes=E(),I.insert=y().bind(null,"head"),I.domAPI=f(),I.insertStyleElement=B(),g()(N.Z,I);const R=N.Z&&N.Z.locals?N.Z.locals:void 0,L=function(e){var t,a=e.subheader,r=e.patientDetails,n=(0,s.useTranslation)().t,l=(0,i.useConfig)().vitals.logo,c=(0,i.useSession)();return o().createElement("div",{className:R.printPage},o().createElement("header",{className:R.header},(null==l?void 0:l.src)?o().createElement("img",{className:R.logo,src:(0,i.interpolateUrl)(l.src),alt:l.alt,width:110,height:40}):(null==l?void 0:l.name)?l.name:o().createElement("svg",{role:"img",width:110,height:40,viewBox:"0 0 380 119",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40.29 40.328a27.755 27.755 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.647 8.116l.02-18.54A42.835 42.835 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968l.021 18.36ZM79.645 79.671a27.744 27.744 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.857 42.857 0 0 0 59.96 103a42.833 42.833 0 0 0 19.672-4.751l.013-18.578ZM40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.819 42.819 0 0 0 4.752 19.672l18.576.013ZM79.634 40.289a27.753 27.753 0 0 1 8.154 19.688 27.744 27.744 0 0 1-8.117 19.646l18.542.02a42.842 42.842 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675l-18.577-.013ZM156.184 60.002c0-8.748-6.118-15.776-15.025-15.776-8.909 0-15.025 7.028-15.025 15.776 0 8.749 6.116 15.78 15.025 15.78 8.907 0 15.025-7.031 15.025-15.78Zm-34.881 0c0-11.482 8.318-19.958 19.856-19.958 11.536 0 19.855 8.477 19.855 19.959 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.965ZM179.514 75.54c5.507 0 9.05-4.14 9.05-9.482 0-5.341-3.543-9.483-9.05-9.483-5.505 0-9.046 4.142-9.046 9.483 0 5.342 3.541 9.482 9.046 9.482ZM166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248V53.306ZM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193h16.021Zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868l3.219 2.508ZM227.854 59.356c0-2.346-.216-4.36-.216-6.05h4.031c0 1.363.11 2.777.11 4.195h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25V59.356ZM259.211 41.008h6.708L278.8 70.791h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507V41.01ZM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333v12.558Zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037L334.018 79h-5.525l-10.304-17.063h-5.797V79h-4.506V41.01ZM358.123 47.712c-1.506-2.413-4.187-3.486-6.926-3.486-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45l-3.699 3.218Z"})),o().createElement("div",{className:R.patientDetails},o().createElement("span",{className:R.name},null==r?void 0:r.name),o().createElement("span",{className:R.patientInfo},null==r?void 0:r.gender,", ",null==r?void 0:r.age,", ",null==r?void 0:r.identifiers," ")),o().createElement("div",{className:R.printedBy},n("printedBy","Printed by"),o().createElement("span",{className:R.printedBy},null==c||null===(t=c.user)||void 0===t?void 0:t.display))),o().createElement("div",{className:R.subheader},o().createElement("h4",null,a)))};var z=a(2524),G=a.n(z),Z=a(5771),M=a(9361),V={};V.styleTagTransform=k(),V.setAttributes=E(),V.insert=y().bind(null,"head"),V.domAPI=f(),V.insertStyleElement=B(),g()(M.Z,V);const H=M.Z&&M.Z.locals?M.Z.locals:void 0;function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function W(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Q;!function(e){e.LABELS="labels",e.LABELS_RATIO="labels_ratio",e.LINEAR="linear",e.LOG="log",e.TIME="time"}(Q||(Q={}));const J=function(e){var t,a,r,n,c,_=e.patientVitals,u=e.conceptUnits,d=e.config,m=(0,s.useTranslation)().t,p=(0,l.useId)(),h=Y(o().useState({title:"".concat(m("bp","BP")," (").concat(u.get(d.concepts.systolicBloodPressureUuid),")"),value:"systolic"}),2),g=h[0],b=h[1],f=[{id:"bloodPressure",title:(0,v.Aq)(m("bp","BP"),null!==(t=u.get(d.concepts.systolicBloodPressureUuid))&&void 0!==t?t:"-"),value:"systolic"},{id:"oxygenSaturation",title:(0,v.Aq)(m("spo2","SpO2"),null!==(a=u.get(d.concepts.oxygenSaturationUuid))&&void 0!==a?a:"-"),value:"spo2"},{id:"temperature",title:(0,v.Aq)(m("temp","Temp"),null!==(r=u.get(d.concepts.temperatureUuid))&&void 0!==r?r:"-"),value:"temperature"},{id:"respiratoryRate",title:(0,v.Aq)(m("respiratoryRate","R. rate"),null!==(n=u.get(d.concepts.respiratoryRateUuid))&&void 0!==n?n:"-"),value:"respiratoryRate"},{id:"pulse",title:(0,v.Aq)(m("pulse","Pulse"),null!==(c=u.get(d.concepts.pulseUuid))&&void 0!==c?c:"-"),value:"pulse"}],C=(0,l.useMemo)((function(){return _.filter((function(e){return e[g.value]})).splice(0,10).sort((function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()})).map((function(e){if(e[g.value])return["systolic","diastolic"].includes(g.value)?[{group:"Systolic blood pressure",key:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{year:!1}),value:e.systolic,date:e.date},{group:"Diastolic blood pressure",key:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{year:!1}),value:e.diastolic,date:e.date}]:{group:g.title,key:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{year:!1}),value:e[g.value],date:e.date}}))}),[_,g]),y={title:g.title,axes:{bottom:{title:m("date","Date"),mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:g.title,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:W({},g.title,"#6929c4")},tooltip:{customHTML:function(e){var t=Y(e,1)[0],a=t.value,i=t.group,r=t.key;return'<div class="cds--tooltip cds--tooltip--shown" style="min-width: max-content; font-weight:600">'.concat(a," - ").concat(String(i).toUpperCase(),'\n <span style="color: #c6c6c6; font-size: 1rem; font-weight:600">').concat(r,"</span></div>")}},height:"400px"};return o().createElement("div",{className:H.vitalsChartContainer},o().createElement("div",{className:H.vitalSignsArea},o().createElement("label",{className:H.vitalsSignLabel,htmlFor:"".concat(p,"-tab")},m("vitalSignDisplayed","Vital sign displayed")),o().createElement(A.mQc,{className:H.verticalTabs},o().createElement(A.tdY,{className:H.tablist,"aria-label":"Vitals tabs"},f.map((function(e){var t=e.id,a=e.title,i=e.value;return o().createElement(A.OK9,{className:G()(H.tab,W({},H.selectedTab,g.title===a)),id:"".concat(t,"-tab"),key:t,onClick:function(){return b({title:a,value:i})}},a)}))))),o().createElement("div",{className:H.vitalsChartArea},o().createElement(Z.wW,{data:C.flat(),options:y})))};var K=a(6299),X={};X.styleTagTransform=k(),X.setAttributes=E(),X.insert=y().bind(null,"head"),X.domAPI=f(),X.insertStyleElement=B(),g()(K.Z,X);const $=K.Z&&K.Z.locals?K.Z.locals:void 0;function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function te(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const ie=function(e){var t,a,n,h,g,b=e.patientUuid,f=e.pageSize,C=e.urlLabel,y=e.pageUrl,w=(0,s.useTranslation)().t,E=(0,i.useConfig)(),D=w("vitals","Vitals"),B=ae((0,l.useState)(!1),2),S=B[0],k=B[1],O=(0,r.useVisitOrOfflineVisit)(b).currentVisit,U="tablet"===(0,i.useLayoutType)(),F=ae((0,l.useState)(!1),2),j=F[0],P=F[1],x=(0,l.useRef)(null),N=(0,i.usePatient)(b),I=(0,i.useConfig)().excludePatientIdentifierCodeTypes,R=(0,v.VK)(b),z=R.data,G=R.error,Z=R.isLoading,M=R.isValidating,V=(0,v.l4)().data,H=E.vitals.showPrintButton&&!S,q=(0,l.useCallback)((function(){p(O,E)}),[E,O]),W=(0,l.useMemo)((function(){var e,t,a,r,n,l,o,s=null!==(o=null==N||null===(t=N.patient)||void 0===t||null===(e=t.identifier)||void 0===e?void 0:e.filter((function(e){return!(null==I?void 0:I.uuids.includes(e.type.coding[0].code))})))&&void 0!==o?o:[];return{name:(null==N?void 0:N.patient)?(0,i.displayName)(null==N?void 0:N.patient):"",age:(0,i.age)(null==N||null===(a=N.patient)||void 0===a?void 0:a.birthDate),gender:function(e){switch(e){case"male":return w("male","Male");case"female":return w("female","Female");case"other":return w("other","Other");case"unknown":return w("unknown","Unknown");default:return e}}(null==N||null===(r=N.patient)||void 0===r?void 0:r.gender),location:null==N||null===(l=N.patient)||void 0===l||null===(n=l.address)||void 0===n?void 0:n[0].city,identifiers:(null==s?void 0:s.length)?s.map((function(e){var t=e.value;return e.type,t})):[]}}),[N,w,null==I?void 0:I.uuids]),Y=[{key:"dateRender",header:w("dateAndTime","Date and time"),isSortable:!0,sortFunc:function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()}},{key:"temperatureRender",header:(0,v.Aq)(w("temperature","Temp"),null!==(t=V.get(E.concepts.temperatureUuid))&&void 0!==t?t:""),isSortable:!0,sortFunc:function(e,t){return e.temperature&&t.temperature?e.temperature-t.temperature:0}},{key:"bloodPressureRender",header:(0,v.Aq)(w("bloodPressure","BP"),null!==(a=V.get(E.concepts.systolicBloodPressureUuid))&&void 0!==a?a:""),isSortable:!0,sortFunc:function(e,t){return e.systolic&&t.systolic&&e.diastolic&&t.diastolic?e.systolic!==t.systolic?e.systolic-t.systolic:e.diastolic-t.diastolic:0}},{key:"pulseRender",header:(0,v.Aq)(w("pulse","Pulse"),null!==(n=V.get(E.concepts.pulseUuid))&&void 0!==n?n:""),isSortable:!0,sortFunc:function(e,t){return e.pulse&&t.pulse?e.pulse-t.pulse:0}},{key:"respiratoryRateRender",header:(0,v.Aq)(w("respiratoryRate","R. Rate"),null!==(h=V.get(E.concepts.respiratoryRateUuid))&&void 0!==h?h:""),isSortable:!0,sortFunc:function(e,t){return e.respiratoryRate&&t.respiratoryRate?e.respiratoryRate-t.respiratoryRate:0}},{key:"spo2Render",header:(0,v.Aq)(w("spo2","SPO2"),null!==(g=V.get(E.concepts.oxygenSaturationUuid))&&void 0!==g?g:""),isSortable:!0,sortFunc:function(e,t){return e.spo2&&t.spo2?e.spo2-t.spo2:0}}],Q=(0,l.useMemo)((function(){return null==z?void 0:z.map((function(e,t){var a,r,n,l,o,s;return function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){te(e,t,a[t])}))}return e}({},e),{id:"".concat(t),dateRender:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{mode:"wide",time:!0}),bloodPressureRender:"".concat(null!==(a=e.systolic)&&void 0!==a?a:"--"," / ").concat(null!==(r=e.diastolic)&&void 0!==r?r:"--"),pulseRender:null!==(n=e.pulse)&&void 0!==n?n:"--",spo2Render:null!==(l=e.spo2)&&void 0!==l?l:"--",temperatureRender:null!==(o=e.temperature)&&void 0!==o?o:"--",respiratoryRateRender:null!==(s=e.respiratoryRate)&&void 0!==s?s:"--"})}))}),[z]),K=(0,l.useRef)(null);(0,l.useEffect)((function(){j&&K.current&&K.current()}),[j]);var X=(0,c.useReactToPrint)({content:function(){return x.current},documentTitle:"OpenMRS - ".concat(W.name," - ").concat(D),onBeforeGetContent:function(){return new Promise((function(e){N&&N.patient&&D&&(K.current=e,P(!0))}))},onAfterPrint:function(){K.current=null,P(!1)}});return o().createElement(o().Fragment,null,Z?o().createElement(A.gqd,{role:"progressbar",compact:!U,zebra:!0}):G?o().createElement(r.ErrorState,{error:G,headerTitle:D}):(null==z?void 0:z.length)?o().createElement("div",{className:$.widgetCard},o().createElement(r.CardHeader,{title:D},o().createElement("div",{className:$.backgroundDataFetchingIndicator},o().createElement("span",null,M?o().createElement(A.lSo,null):null)),o().createElement("div",{className:$.vitalsHeaderActionItems},o().createElement(A.GHR,{onChange:function(e){return k("chartView"===e.name)},size:U?"md":"sm"},o().createElement(A.aNl,{name:"tableView",text:"Table view"},o().createElement(_.iA,{size:16})),o().createElement(A.aNl,{name:"chartView",text:"Chart view"},o().createElement(u.eA,{size:16}))),o().createElement(o().Fragment,null,o().createElement("span",{className:$.divider},"|"),H&&o().createElement(A.zxk,{kind:"ghost",renderIcon:d.FB,iconDescription:"Add vitals",className:$.printButton,onClick:X},w("print","Print")),o().createElement(A.zxk,{kind:"ghost",renderIcon:m.mm,iconDescription:"Add vitals",onClick:q},w("add","Add"))))),S?o().createElement(J,{patientVitals:z,conceptUnits:V,config:E}):o().createElement("div",{ref:x},o().createElement(L,{subheader:D,patientDetails:W}),o().createElement(T,{isPrinting:j,tableRows:Q,pageSize:f,urlLabel:C,pageUrl:y,tableHeaders:Y}))):o().createElement(r.EmptyState,{displayText:w("vitalSigns","Vital signs"),headerTitle:D,launchForm:q}))};var re=a(3565),ne=a.n(re),le=a(6824),oe=a.n(le),se=a(781),ce=a(2651),Ae={};Ae.styleTagTransform=k(),Ae.setAttributes=E(),Ae.insert=y().bind(null,"head"),Ae.domAPI=f(),Ae.insertStyleElement=B(),g()(ce.Z,Ae);const _e=ce.Z&&ce.Z.locals?ce.Z.locals:void 0;function ue(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const de=function(e){var t,a=e.interpretation,i=e.value,r=e.unitName,n=e.unitSymbol,l=(0,s.useTranslation)().t,c=a&&a.includes("critically"),A=a&&"normal"!==a;return o().createElement("section",{className:_e.container},o().createElement("div",{className:G()((t={},ue(t,_e["critical-value"],c),ue(t,_e["abnormal-value"],A),t))},o().createElement("div",{className:_e["label-container"]},o().createElement("label",{className:_e.label},r),A?o().createElement("span",{className:_e[a.replace("_","-")],title:l("abnormalValue","Abnormal value")}):null),o().createElement("div",{className:_e["value-container"]},o().createElement("label",{className:_e["pad-right"]},o().createElement("span",{className:_e.value},i||"-"," "),o().createElement("span",{className:_e.units},i&&n)))))};var me=a(2253),pe={};pe.styleTagTransform=k(),pe.setAttributes=E(),pe.insert=y().bind(null,"head"),pe.domAPI=f(),pe.insertStyleElement=B(),g()(me.Z,pe);const ve=me.Z&&me.Z.locals?me.Z.locals:void 0;function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}ne().extend(oe());var ge=a(6775),be={};be.styleTagTransform=k(),be.setAttributes=E(),be.insert=y().bind(null,"head"),be.domAPI=f(),be.insertStyleElement=B(),g()(ge.Z,be);const fe=ge.Z&&ge.Z.locals?ge.Z.locals:void 0;function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ce(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ce(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var we;!function(e){e.LABELS="labels",e.LABELS_RATIO="labels_ratio",e.LINEAR="linear",e.LOG="log",e.TIME="time"}(we||(we={}));var Ee={weight:"#6929c4",height:"#6929c4",bmi:"#6929c4"};const De=function(e){var t,a,r,n=e.patientBiometrics,c=e.conceptUnits,_=e.config,u=(0,s.useTranslation)().t,d=_.biometrics.bmiUnit,m=ye((0,l.useState)({title:"".concat(u("weight","Weight")," (").concat(null!==(t=c.get(_.concepts.weightUuid))&&void 0!==t?t:"",")"),value:"weight",groupName:"weight"}),2),p=m[0],v=m[1],h=(0,l.useMemo)((function(){return n.filter((function(e){return e[p.value]})).splice(0,10).sort((function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()})).map((function(e){return e[p.value]&&{group:p.groupName,key:(0,i.formatDate)(new Date(e.date),{mode:"wide",year:!1,time:!1}),value:e[p.value],date:e.date}}))}),[n,p.groupName,p.value]),g=(0,l.useMemo)((function(){return{title:p.title,axes:{bottom:{title:u("date","Date"),mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:p.title,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:Ee},tooltip:{customHTML:function(e){var t=ye(e,1)[0],a=t.value,r=t.date;return'<div class="cds--tooltip cds--tooltip--shown" style="min-width: max-content; font-weight:600">'.concat((0,i.formatDate)((0,i.parseDate)(r),{year:!0}),' -\n <span style="color: #c6c6c6; font-size: 1rem; font-weight:400">').concat(a,"</span></div>")}},height:"400px"}}),[p,u]);return o().createElement("div",{className:fe.biometricChartContainer},o().createElement("div",{className:fe.biometricsArea},o().createElement("label",{className:fe.biometricLabel,htmlFor:"biometrics-chart-radio-group"},u("biometricDisplayed","Biometric displayed")),o().createElement(A.mQc,{className:fe.verticalTabs},o().createElement(A.tdY,{className:fe.tablist,"aria-label":"Biometrics tabs"},[{id:"weight",label:"".concat(u("weight","Weight")," (").concat(null!==(a=c.get(_.concepts.weightUuid))&&void 0!==a?a:"",")")},{id:"height",label:"".concat(u("height","Height")," (").concat(null!==(r=c.get(_.concepts.heightUuid))&&void 0!==r?r:"",")")},{id:"bmi",label:"".concat(u("bmi","BMI")," (").concat(d,")")}].map((function(e){var t,a,i,r=e.id,n=e.label;return o().createElement(A.OK9,{className:G()(fe.tab,fe.bodyLong01,(t={},a=fe.selectedTab,i=p.title===n,a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t)),key:r,onClick:function(){return v({title:n,value:r,groupName:r})}},n)}))))),o().createElement("div",{className:fe.biometricsChartArea},o().createElement(Z.wW,{data:h,options:g})))};function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Se(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const ke=function(e){var t,a,n=e.tableRows,s=e.pageSize,c=e.pageUrl,_=e.urlLabel,u=e.tableHeaders,d="tablet"===(0,i.useLayoutType)(),m=(t=(0,l.useState)({key:"",sortDirection:"NONE"}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(t,a)||function(e,t){if(e){if("string"==typeof e)return Be(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Be(e,t):void 0}}(t,a)||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.")}()),p=m[0],v=m[1],h=(0,l.useMemo)((function(){if("NONE"===p.sortDirection)return n;var e=u.find((function(e){return e.key===p.key}));return e?n.slice().sort((function(t,a){var i=e.sortFunc(t,a);return"DESC"===p.sortDirection?i:-i})):n}),[n,u,p]),g=(0,i.usePagination)(h,s),b=g.results,f=g.goTo,C=g.currentPage;return o().createElement("div",null,o().createElement(A.wQF,{rows:b,headers:u,size:d?"lg":"sm",useZebraStyles:!0,sortRow:function(e,t,a){var i=a.key,r=a.sortDirection;v("NONE"===r?{key:"",sortDirection:r}:{key:i,sortDirection:r})},isSortable:!0},(function(e){var t=e.rows,a=e.headers,i=e.getHeaderProps,r=e.getTableProps;return o().createElement(A.xJi,null,o().createElement(A.iA_,function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){Se(e,t,a[t])}))}return e}({"aria-label":"biometrics"},r()),o().createElement(A.ssF,null,o().createElement(A.SCH,null,a.map((function(e){var t,a;return o().createElement(A.xDH,i({header:e,isSortable:e.isSortable}),null!==(a=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==a?a:e.header)})))),o().createElement(A.RMI,null,t.map((function(e){return o().createElement(A.SCH,{key:e.id},e.cells.map((function(e){var t,a;return o().createElement(A.pj1,{key:e.id},null!==(a=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==a?a:e.value)})))})))))})),o().createElement(r.PatientChartPagination,{pageNumber:C,totalItems:n.length,currentItems:b.length,pageSize:s,onPageNumberChange:function(e){var t=e.page;return f(t)},dashboardLinkUrl:c,dashboardLinkLabel:_}))};var Oe=a(2025),Ue={};Ue.styleTagTransform=k(),Ue.setAttributes=E(),Ue.insert=y().bind(null,"head"),Ue.domAPI=f(),Ue.insertStyleElement=B(),g()(Oe.Z,Ue);const Fe=Oe.Z&&Oe.Z.locals?Oe.Z.locals:void 0;function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Pe(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function xe(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){Pe(e,t,a[t])}))}return e}const Te=function(e){var t,a,n,c,d,h=e.patientUuid,g=e.pageSize,b=e.urlLabel,f=e.pageUrl,C=(0,s.useTranslation)().t,y=C("biometrics_lower","biometrics"),w=C("biometrics","Biometrics"),E=(c=(0,l.useState)(!1),d=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(c,d)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?je(e,t):void 0}}(c,d)||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.")}()),D=E[0],B=E[1],S="tablet"===(0,i.useLayoutType)(),k=(0,i.useConfig)(),O=k.biometrics.bmiUnit,U=(0,v.VK)(h,"biometrics"),F=U.data,j=U.isLoading,P=U.error,x=U.isValidating,T=(0,v.l4)().data,N=(0,r.useVisitOrOfflineVisit)(h).currentVisit,I=(0,l.useCallback)((function(){return p(N,k)}),[k,N]),R=[{key:"dateRender",header:C("dateAndTime","Date and time"),isSortable:!0,sortFunc:function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()}},{key:"weightRender",header:(0,v.Aq)(C("weight","Weight"),null!==(t=T.get(k.concepts.weightUuid))&&void 0!==t?t:""),isSortable:!0,sortFunc:function(e,t){return e.weight&&t.weight?e.weight-t.weight:0}},{key:"heightRender",header:(0,v.Aq)(C("height","Height"),null!==(a=T.get(k.concepts.heightUuid))&&void 0!==a?a:""),isSortable:!0,sortFunc:function(e,t){return e.height&&t.height?e.height-t.height:0}},{key:"bmiRender",header:"".concat(C("bmi","BMI")," (").concat(O,")"),isSortable:!0,sortFunc:function(e,t){return e.bmi&&t.bmi?e.bmi-t.bmi:0}},{key:"muacRender",header:(0,v.Aq)(C("muac","MUAC"),null!==(n=T.get(k.concepts.midUpperArmCircumferenceUuid))&&void 0!==n?n:""),isSortable:!0,sortFunc:function(e,t){return e.muac&&t.muac?e.muac-t.muac:0}}],L=(0,l.useMemo)((function(){return null==F?void 0:F.map((function(e,t){var a,r,n,l;return function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(xe({},e),{id:"".concat(t),dateRender:(0,i.formatDatetime)((0,i.parseDate)(e.date.toString()),{mode:"wide"}),weightRender:null!==(a=e.weight)&&void 0!==a?a:"--",heightRender:null!==(r=e.height)&&void 0!==r?r:"--",bmiRender:null!==(n=e.bmi)&&void 0!==n?n:"--",muacRender:null!==(l=e.muac)&&void 0!==l?l:"--"})}))}),[F]);return j?o().createElement(A.gqd,{role:"progressbar"}):P?o().createElement(r.ErrorState,{error:P,headerTitle:w}):(null==F?void 0:F.length)?o().createElement("div",{className:Fe.widgetCard},o().createElement(r.CardHeader,{title:w},o().createElement("div",{className:Fe.backgroundDataFetchingIndicator},o().createElement("span",null,x?o().createElement(A.lSo,null):null)),o().createElement("div",{className:Fe.biometricsHeaderActionItems},o().createElement(A.GHR,{onChange:function(e){return B("chartView"===e.name)},size:S?"md":"sm"},o().createElement(A.aNl,{name:"tableView",text:"Table view"},o().createElement(_.iA,{size:16})),o().createElement(A.aNl,{name:"chartView",text:"Chart view"},o().createElement(u.eA,{size:16}))),o().createElement(o().Fragment,null,o().createElement("span",{className:Fe.divider},"|"),o().createElement(A.zxk,{kind:"ghost",renderIcon:function(e){return o().createElement(m.mm,xe({size:16},e))},iconDescription:"Add biometrics",onClick:I},C("add","Add"))))),D?o().createElement(De,{patientBiometrics:F,conceptUnits:T,config:k}):o().createElement(ke,{tableRows:L,pageSize:g,urlLabel:b,pageUrl:f,tableHeaders:R})):o().createElement(r.EmptyState,{displayText:y,headerTitle:w,launchForm:I})};function Ne(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var Ie="@openmrs/esm-patient-vitals-app",Re={featureName:"patient-vitals",moduleName:Ie},Le=a(3979);function ze(){(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:"".concat(i.fhirBaseUrl,"/Observation.+")}),(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:".+".concat(i.restBaseUrl,"/concept.+")}),(0,i.defineConfigSchema)(Ie,n)}var Ge,Ze,Me=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(e.basePath,(0,s.useTranslation)().t),i="${openmrsSpaBase}/patient/".concat(t,"/chart/Vitals & Biometrics"),r=a("seeAll","See all");return o().createElement(ie,{patientUuid:t,pageSize:5,urlLabel:r,pageUrl:i})}),Re),Ve=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(0,s.useTranslation)().t,i="${openmrsSpaBase}/patient/".concat(t,"/chart"),r=a("goToSummary","Go to Summary");return o().createElement(ie,{patientUuid:t,pageSize:10,urlLabel:r,pageUrl:i})}),Re),He=(0,i.getSyncLifecycle)((function(e){var t,a,n,c,_,u,d=e.patientUuid,h=(0,s.useTranslation)().t,g=(0,i.useConfig)(),b=(0,v.l4)(),f=b.data,C=b.conceptMetadata,y=(0,v.VK)(d,"both"),w=y.data,E=y.isLoading,D=y.isValidating,B=null==w?void 0:w[0],S=(_=(0,l.useState)(!1),u=2,function(e){if(Array.isArray(e))return e}(_)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(_,u)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?he(e,t):void 0}}(_,u)||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.")}()),k=S[0],O=S[1],U=(0,r.useVisitOrOfflineVisit)(d).currentVisit,F=(0,i.useWorkspaces)().workspaces,j=(0,l.useCallback)((function(){return Boolean(null==F?void 0:F.length)}),[F]),P=(0,l.useCallback)((function(e){e.stopPropagation(),p(U,g)}),[g,U]);if(E)return o().createElement(A.lSo,{role:"progressbar",className:ve.loading,description:"".concat(h("loading","Loading")," ...")});if(B&&(null===(t=Object.keys(B))||void 0===t?void 0:t.length)&&(null==C?void 0:C.length)){var x,T,N,I,R,L,z,Z,M,V,H,q,W,Y,Q,J,K=Boolean(null==U?void 0:U.uuid),X=Boolean(ne()(null==B?void 0:B.date).isToday()),$=K&&!X;return o().createElement("div",{className:ve.background},o().createElement("div",{className:ve["vitals-header"],role:"button",tabIndex:0,onClick:function(){return O(!k)}},o().createElement("span",{className:ve.container},o().createElement("span",{className:ve.heading},h("vitalsAndBiometrics","Vitals and biometrics")),o().createElement("span",{className:ve["body-text"]},(0,i.formatDate)((0,i.parseDate)(null==B?void 0:B.date),{day:!0,time:!0})),$?o().createElement("div",{className:ve.tag},o().createElement(A.Vp9,{type:"red"},o().createElement("span",{className:ve.overdueIndicator},o().createElement(se.qp,null),h("overdue","Overdue")))):null,o().createElement(i.ConfigurableLink,{className:ve.link,to:"${openmrsSpaBase}/patient/".concat(d,"/chart/Vitals & Biometrics")},h("vitalsHistory","Vitals history"))),D?o().createElement("div",{className:ve.backgroundDataFetchingIndicator},o().createElement("span",null,D?o().createElement(A.lSo,null):null)):null,o().createElement("div",{className:ve["button-container"]},o().createElement(A.zxk,{className:G()(ve["record-vitals"],ve["arrow-up-icon"]),kind:"ghost",size:"sm",onClick:P},h("recordVitals","Record vitals"),o().createElement(m.ol,{size:16,className:ve["arrow-up-button"],title:"ArrowRight"})))),o().createElement("div",{className:G()(ve["row-container"],(a={},n=ve["workspace-open"],c=j(),n in a?Object.defineProperty(a,n,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[n]=c,a))},o().createElement("div",{className:ve.row},o().createElement(de,{interpretation:(0,v.WK)(null==B?void 0:B.systolic,null==B?void 0:B.diastolic,null==g?void 0:g.concepts,C),unitName:h("bp","BP"),unitSymbol:null!==(x=(null==B?void 0:B.systolic)&&f.get(g.concepts.systolicBloodPressureUuid))&&void 0!==x?x:"",value:"".concat(null!==(T=null==B?void 0:B.systolic)&&void 0!==T?T:"--"," / ").concat(null!==(N=null==B?void 0:B.diastolic)&&void 0!==N?N:"--")}),o().createElement(de,{interpretation:(0,v.wA)(null==B?void 0:B.pulse,(0,v.tQ)(g.concepts.pulseUuid,C)),unitName:h("heartRate","Heart rate"),unitSymbol:null!==(I=(null==B?void 0:B.pulse)&&f.get(g.concepts.pulseUuid))&&void 0!==I?I:"",value:null!==(R=null==B?void 0:B.pulse)&&void 0!==R?R:"--"}),o().createElement(de,{interpretation:(0,v.wA)(null==B?void 0:B.respiratoryRate,(0,v.tQ)(g.concepts.respiratoryRateUuid,C)),unitName:h("respiratoryRate","R. rate"),unitSymbol:null!==(L=(null==B?void 0:B.respiratoryRate)&&f.get(g.concepts.respiratoryRateUuid))&&void 0!==L?L:"",value:null!==(z=null==B?void 0:B.respiratoryRate)&&void 0!==z?z:"--"}),o().createElement(de,{interpretation:(0,v.wA)(null==B?void 0:B.spo2,(0,v.tQ)(g.concepts.oxygenSaturationUuid,C)),unitName:h("spo2","SpO2"),unitSymbol:null!==(Z=(null==B?void 0:B.spo2)&&f.get(g.concepts.oxygenSaturationUuid))&&void 0!==Z?Z:"",value:null!==(M=null==B?void 0:B.spo2)&&void 0!==M?M:"--"}),o().createElement(de,{interpretation:(0,v.wA)(B.temperature,(0,v.tQ)(g.concepts.temperatureUuid,C)),unitName:h("temperatureAbbreviated","Temp"),unitSymbol:null!==(V=(null==B?void 0:B.temperature)&&f.get(g.concepts.temperatureUuid))&&void 0!==V?V:"",value:null!==(H=null==B?void 0:B.temperature)&&void 0!==H?H:"--"}),o().createElement(de,{unitName:h("weight","Weight"),unitSymbol:null!==(q=(null==B?void 0:B.weight)&&f.get(g.concepts.weightUuid))&&void 0!==q?q:"",value:null!==(W=null==B?void 0:B.weight)&&void 0!==W?W:"--"}),o().createElement(de,{unitName:h("height","Height"),unitSymbol:null!==(Y=(null==B?void 0:B.height)&&f.get(g.concepts.heightUuid))&&void 0!==Y?Y:"",value:null!==(Q=null==B?void 0:B.height)&&void 0!==Q?Q:"--"}),o().createElement(de,{unitName:h("bmi","BMI"),unitSymbol:(null==B?void 0:B.bmi)&&g.biometrics.bmiUnit,value:null!==(J=null==B?void 0:B.bmi)&&void 0!==J?J:"--"}))))}return o().createElement("div",{className:ve["vitals-header"]},o().createElement("span",{className:ve.container},o().createElement("span",{className:ve.heading},h("vitalsAndBiometrics","Vitals and biometrics")),o().createElement("span",{className:ve["body-text"]},h("noDataRecorded","No data has been recorded for this patient"))),o().createElement("div",{className:ve.container},o().createElement(A.zxk,{className:G()(ve["record-vitals"],ve["arrow-up-icon"]),onClick:P,kind:"ghost",size:"sm"},h("recordVitals","Record vitals"),o().createElement(m.ol,{size:16,className:ve["arrow-up-button"],title:"ArrowRight"}))))}),Re),qe=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(e.basePath,(0,s.useTranslation)().t),i="${openmrsSpaBase}/patient/".concat(t,"/chart/Vitals & Biometrics"),r=a("seeAll","See all");return o().createElement(Te,{patientUuid:t,pageSize:5,urlLabel:r,pageUrl:i})}),Re),We=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(0,s.useTranslation)().t,i="${openmrsSpaBase}/patient/".concat(t,"/chart"),r=a("goToSummary","Go to Summary");return o().createElement(Te,{patientUuid:t,pageSize:10,urlLabel:r,pageUrl:i})}),Re),Ye=(0,i.getSyncLifecycle)((0,r.createDashboardLink)((Ge=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){Ne(e,t,a[t])}))}return e}({},{slot:"patient-chart-vitals-biometrics-dashboard-slot",columns:1,path:"Vitals & Biometrics",title:"Vitals & Biometrics"}),Ze=null!=(Ze={moduleName:Ie})?Ze:{},Object.getOwnPropertyDescriptors?Object.defineProperties(Ge,Object.getOwnPropertyDescriptors(Ze)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(Ze)).forEach((function(e){Object.defineProperty(Ge,e,Object.getOwnPropertyDescriptor(Ze,e))})),Ge)),Re),Qe=(0,i.getAsyncLifecycle)((function(){return a.e(525).then(a.bind(a,3525))}),Re),Je=(0,i.getAsyncLifecycle)((function(){return Promise.all([a.e(729),a.e(934)]).then(a.bind(a,1934))}),Re)},3979:(e,t,a)=>{var i={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807],"./zh.json":[8271,271],"./zh_CN.json":[1644,644]};function r(e){if(!a.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return a.e(t[1]).then((()=>a(r)))}r.keys=()=>Object.keys(i),r.id=3979,e.exports=r}}]);
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[282],{2025:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__biometrics-base__widgetCard___VVsWE{border:1px solid #e0e0e0;background-color:#fff}.-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95 .cds--content-switcher{max-width:max-content}.-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95 .cds--content-switcher .cds--content-switcher__label{height:1rem}.-esm-patient-vitals__biometrics-base__divider___jTWE5{width:1px;height:1rem;color:#e0e0e0;margin:0 1rem}.-esm-patient-vitals__biometrics-base__backgroundDataFetchingIndicator___RmjJQ{align-items:center;display:flex;flex:1 1 0%;justify-content:end}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/biometrics/biometrics-base.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,0DACE,wBAAA,CACA,qBDLM,CCQR,2EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAEA,kGACE,qBAAA,CAEA,gIACE,WCYO,CDPb,uDACE,SAAA,CACA,WCKW,CDJX,aDzBM,CC0BN,aAAA,CAGF,+EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA",sourceRoot:""}]),l.locals={widgetCard:"-esm-patient-vitals__biometrics-base__widgetCard___VVsWE",biometricsHeaderActionItems:"-esm-patient-vitals__biometrics-base__biometricsHeaderActionItems___dMq95",divider:"-esm-patient-vitals__biometrics-base__divider___jTWE5",backgroundDataFetchingIndicator:"-esm-patient-vitals__biometrics-base__backgroundDataFetchingIndicator___RmjJQ"};const o=l},6775:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__biometrics-chart__label01___P3gNF,.-esm-patient-vitals__biometrics-chart__biometricLabel___SCxoN{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-vitals__biometrics-chart__bodyShort01___fVnip{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-vitals__biometrics-chart__biometricChartContainer___zWIvB{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-patient-vitals__biometrics-chart__biometricsArea___ocfRG{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc{flex-grow:4;padding:0 1rem 3rem}.-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc .cds--cc--layout-row{height:0}.-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc .layout-child{margin-top:.5rem}.-esm-patient-vitals__biometrics-chart__biometricLabel___SCxoN{margin-bottom:1rem;display:inline-block}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H{margin:1rem 0;scroll-behavior:smooth}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H>ul{flex-direction:column !important}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ{outline:0;outline-offset:0;min-height:2rem}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ:active,.-esm-patient-vitals__biometrics-chart__tab___eoQnZ:focus{outline:2px solid var(--brand-03) !important}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-patient-vitals__biometrics-chart__tab___eoQnZ[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-patient-vitals__biometrics-chart__tablist___NB22b .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-patient-vitals__biometrics-chart__tablist___NB22b>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/biometrics/biometrics-chart.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,uHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,4DC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,wEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,+DACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,oEACE,WAAA,CACA,mBAAA,CAEA,yFACE,QAAA,CAGF,kFACE,gBEbS,CFiBb,+DAEE,kBETW,CFUX,oBAAA,CAGF,6DACE,aAAA,CACA,sBAAA,CAEA,gEACE,gCAAA,CAGF,sJACE,gBAAA,CAGF,qHACE,0BAAA,CACA,6BAAA,CAIJ,oDACE,SAAA,CACA,gBAAA,CACA,eExBW,CF0BX,qHACE,4CAAA,CAGF,wEACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,yEACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,wEACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,+FACE,kBAAA",sourceRoot:""}]),l.locals={label01:"-esm-patient-vitals__biometrics-chart__label01___P3gNF",biometricLabel:"-esm-patient-vitals__biometrics-chart__biometricLabel___SCxoN",bodyShort01:"-esm-patient-vitals__biometrics-chart__bodyShort01___fVnip",biometricChartContainer:"-esm-patient-vitals__biometrics-chart__biometricChartContainer___zWIvB",biometricsArea:"-esm-patient-vitals__biometrics-chart__biometricsArea___ocfRG",biometricsChartArea:"-esm-patient-vitals__biometrics-chart__biometricsChartArea___KOOUc",verticalTabs:"-esm-patient-vitals__biometrics-chart__verticalTabs___UgR3H",tab:"-esm-patient-vitals__biometrics-chart__tab___eoQnZ",tablist:"-esm-patient-vitals__biometrics-chart__tablist___NB22b"};const o=l},2651:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-header-item__container___kmFjV{display:flex;flex-flow:row wrap;flex-direction:column;margin:.5rem 0rem;min-inline-size:max-content}.-esm-patient-vitals__vitals-header-item__abnormal-value___r8fHJ,.-esm-patient-vitals__vitals-header-item__critical-value___DS2P3{border:1px solid #161616;background-color:#fff;display:flex;flex-direction:column;justify-content:center;width:fit-content;padding:0rem .25rem}.-esm-patient-vitals__vitals-header-item__critical-value___DS2P3{border:2px solid #da1e28}.-esm-patient-vitals__vitals-header-item__label-container___n8ySg,.-esm-patient-vitals__vitals-header-item__value-container___yDyp1{align-items:center;display:flex;justify-content:space-between}.-esm-patient-vitals__vitals-header-item__value-container___yDyp1{margin-top:.25rem}.-esm-patient-vitals__vitals-header-item__label___EIC_V{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252;margin-right:.375rem}.-esm-patient-vitals__vitals-header-item__danger-icon___RZ2tm{color:#da1e28;height:.25rem;width:.25rem}.-esm-patient-vitals__vitals-header-item__value___hCJxz{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-patient-vitals__vitals-header-item__units___Srfo9{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);color:#525252}.-esm-patient-vitals__vitals-header-item__pad-right___stjFA{margin-right:2px}.-esm-patient-vitals__vitals-header-item__critically-low___r4XPj::after,.-esm-patient-vitals__vitals-header-item__critically-high___IF8gS::after,.-esm-patient-vitals__vitals-header-item__low___ryY7W::after,.-esm-patient-vitals__vitals-header-item__high___SlE90::after{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}.-esm-patient-vitals__vitals-header-item__low___ryY7W::after{content:" ↓"}.-esm-patient-vitals__vitals-header-item__critically-low___r4XPj::after{content:" ↓↓"}.-esm-patient-vitals__vitals-header-item__high___SlE90::after{content:" ↑"}.-esm-patient-vitals__vitals-header-item__critically-high___IF8gS::after{content:" ↑↑"}',"",{version:3,sources:["webpack://./src/vitals-and-biometrics-header/vitals-header-item.scss","webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAAA,MCoDA,mBACE,CAAA,mBACA,CAAA,mBACA,CAAA,yBACA,CAAA,+BACA,CAAA,yEACA,CAAA,2GACA,CAAA,4DDxDF,YACE,CAAA,kBACA,CAAA,qBACA,CAAA,iBACA,CAAA,2BACA,CAAA,kIAGF,wBACE,CAAA,qBACA,CAAA,YACA,CAAA,qBACA,CAAA,sBACA,CAAA,iBACA,CAAA,mBACA,CAAA,iEAGF,wBAEE,CAAA,oIAGF,kBACE,CAAA,YACA,CAAA,6BACA,CAAA,kEAGF,iBAEE,CAAA,wDAGF,gDE6zBI,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CAAA,aD71BM,CAAA,oBDmCR,CAAA,8DAGF,aCvBS,CAAA,aDyBP,CAAA,YACA,CAAA,wDAGF,oDEizBI,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CAAA,wDF7yBJ,wDE6yBI,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CAAA,aD71BM,CAAA,4DDqDV,gBACE,CAAA,4QAIA,2DEmyBE,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CAAA,aD71BM,CAAA,6DDgEV,YACE,CAAA,wEAGF,aACE,CAAA,8DAGF,YACE,CAAA,yEAGF,aACE",sourceRoot:""}]),l.locals={container:"-esm-patient-vitals__vitals-header-item__container___kmFjV","abnormal-value":"-esm-patient-vitals__vitals-header-item__abnormal-value___r8fHJ","critical-value":"-esm-patient-vitals__vitals-header-item__critical-value___DS2P3","label-container":"-esm-patient-vitals__vitals-header-item__label-container___n8ySg","value-container":"-esm-patient-vitals__vitals-header-item__value-container___yDyp1",label:"-esm-patient-vitals__vitals-header-item__label___EIC_V","danger-icon":"-esm-patient-vitals__vitals-header-item__danger-icon___RZ2tm",value:"-esm-patient-vitals__vitals-header-item__value___hCJxz",units:"-esm-patient-vitals__vitals-header-item__units___Srfo9","pad-right":"-esm-patient-vitals__vitals-header-item__pad-right___stjFA","critically-low":"-esm-patient-vitals__vitals-header-item__critically-low___r4XPj","critically-high":"-esm-patient-vitals__vitals-header-item__critically-high___IF8gS",low:"-esm-patient-vitals__vitals-header-item__low___ryY7W",high:"-esm-patient-vitals__vitals-header-item__high___SlE90"};const o=l},2253:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-header__vitals-header___TRa8v{display:flex;justify-content:space-between;align-items:center;height:3rem;margin-left:1rem;outline:none;pointer-events:visibleFill}.-esm-patient-vitals__vitals-header__container___m2kfC{display:flex;align-items:baseline}.-esm-patient-vitals__vitals-header__background___RdUX3{background-color:#f4f4f4}.-esm-patient-vitals__vitals-header__row-container___VTy3u{width:100%;border-bottom:1px solid #e0e0e0;padding-bottom:.75rem}.-esm-patient-vitals__vitals-header__row___SCSqu{display:flex;justify-content:space-between;align-items:center;margin:0rem 1rem;max-width:100vw}.omrs-breakpoint-lt-desktop .-esm-patient-vitals__vitals-header__row___SCSqu,.-esm-patient-vitals__vitals-header__workspace-open___GKzIC .-esm-patient-vitals__vitals-header__row___SCSqu{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));column-gap:5rem}.-esm-patient-vitals__vitals-header__loading___QQtT1{display:flex;background-color:#f4f4f4;justify-content:center;min-height:3rem}.-esm-patient-vitals__vitals-header__container-row___xXXdB{display:flex;flex-wrap:wrap}.-esm-patient-vitals__vitals-header__tag___xSDrn{margin-left:.5rem}.-esm-patient-vitals__vitals-header__overdueIndicator___oqpJC{display:flex;align-items:center}.-esm-patient-vitals__vitals-header__overdueIndicator___oqpJC svg{margin-right:.25rem}.-esm-patient-vitals__vitals-header__button-container___N51rw{display:flex;align-items:center}.-esm-patient-vitals__vitals-header__arrow-up-button___eah45{display:flex;align-items:baseline;justify-content:center;cursor:pointer;margin-left:.5rem}.-esm-patient-vitals__vitals-header__arrow-up-icon___y8Ga4:not([disabled]) svg{fill:#0f62fe}.-esm-patient-vitals__vitals-header__heading___wDqjW{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-right:.5rem;color:#525252}.-esm-patient-vitals__vitals-header__record-vitals___Mfd_F{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-vitals__vitals-header__body-text____w1wq,.-esm-patient-vitals__vitals-header__link___Fr_ND{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252}.-esm-patient-vitals__vitals-header__link___Fr_ND{margin-left:.5rem;text-decoration-line:none;color:#0f62fe}html[dir=rtl] .-esm-patient-vitals__vitals-header__container___m2kfC>span:nth-child(2){margin-right:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/vitals-and-biometrics-header/vitals-header.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,2DACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,WC2CW,CD1CX,gBCsBW,CDrBX,YAAA,CACA,0BAAA,CAGF,uDACE,YAAA,CACA,oBAAA,CAGF,wDACE,wBDDwB,CCI1B,2DACE,UAAA,CACA,+BAAA,CACA,qBAAA,CAGF,iDACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CAKA,0LACE,YAAA,CACA,+CAAA,CACA,eAAA,CAIJ,qDACE,YAAA,CACA,wBD7BwB,CC8BxB,sBAAA,CACA,eCCW,CDEb,2DACE,YAAA,CACA,cAAA,CAGF,iDACE,iBAAA,CAGF,8DACE,YAAA,CACA,kBAAA,CAEA,kEACE,mBAAA,CAIJ,8DACE,YAAA,CACA,kBAAA,CAGF,6DACE,YAAA,CACA,oBAAA,CACA,sBAAA,CACA,cAAA,CACA,iBAAA,CAGF,+EACE,YD1EgB,CC6ElB,qDE0wBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFxwBF,kBCrEW,CDsEX,aDtFQ,CCyFV,2DEowBI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CFhwBJ,yGEgwBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CF9vBF,aD/FQ,CCkGV,kDACE,iBAAA,CAEA,yBAAA,CACA,aDtFe,CC4Fb,uFACE,kBC7FO",sourceRoot:""}]),l.locals={"vitals-header":"-esm-patient-vitals__vitals-header__vitals-header___TRa8v",container:"-esm-patient-vitals__vitals-header__container___m2kfC",background:"-esm-patient-vitals__vitals-header__background___RdUX3","row-container":"-esm-patient-vitals__vitals-header__row-container___VTy3u",row:"-esm-patient-vitals__vitals-header__row___SCSqu","workspace-open":"-esm-patient-vitals__vitals-header__workspace-open___GKzIC",loading:"-esm-patient-vitals__vitals-header__loading___QQtT1","container-row":"-esm-patient-vitals__vitals-header__container-row___xXXdB",tag:"-esm-patient-vitals__vitals-header__tag___xSDrn",overdueIndicator:"-esm-patient-vitals__vitals-header__overdueIndicator___oqpJC","button-container":"-esm-patient-vitals__vitals-header__button-container___N51rw","arrow-up-button":"-esm-patient-vitals__vitals-header__arrow-up-button___eah45","arrow-up-icon":"-esm-patient-vitals__vitals-header__arrow-up-icon___y8Ga4",heading:"-esm-patient-vitals__vitals-header__heading___wDqjW","record-vitals":"-esm-patient-vitals__vitals-header__record-vitals___Mfd_F","body-text":"-esm-patient-vitals__vitals-header__body-text____w1wq",link:"-esm-patient-vitals__vitals-header__link___Fr_ND"};const o=l},8393:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,'.-esm-patient-vitals__paginated-vitals__table___tGgKY td{white-space:nowrap;padding:.25rem}.-esm-patient-vitals__paginated-vitals__table___tGgKY td>span{width:100%;height:100%;display:inline-block}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq td:nth-child(2),.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI td:nth-child(2),.-esm-patient-vitals__paginated-vitals__low___ZYjHL td:nth-child(2),.-esm-patient-vitals__paginated-vitals__high___kRFGr td:nth-child(2){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)}.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI>span,.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq>span{border:2px solid #da1e28 !important;padding:.25rem .25rem .25rem 1rem}.-esm-patient-vitals__paginated-vitals__high___kRFGr>span,.-esm-patient-vitals__paginated-vitals__low___ZYjHL>span{border:1.5px solid #000 !important;padding:.25rem .25rem .25rem 1rem}.-esm-patient-vitals__paginated-vitals__normal___UO86t>span{padding-left:1rem}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq td:nth-child(2)::after{content:" ↓↓"}.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI td:nth-child(2)::after{content:" ↑↑"}.-esm-patient-vitals__paginated-vitals__low___ZYjHL td:nth-child(2)::after{content:" ↓"}.-esm-patient-vitals__paginated-vitals__high___kRFGr td:nth-child(2)::after{content:" ↑"}.-esm-patient-vitals__paginated-vitals__off-scale-low___moLj6 td:nth-child(2)::after{content:" ↓↓↓"}.-esm-patient-vitals__paginated-vitals__off-scale-high___fnflS td:nth-child(2)::after{content:" ↑↑↑"}.-esm-patient-vitals__paginated-vitals__offScaleHigh___XpEz7,.-esm-patient-vitals__paginated-vitals__offScaleLow___Ss3WT,.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI,.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq,.-esm-patient-vitals__paginated-vitals__high___kRFGr,.-esm-patient-vitals__paginated-vitals__low___ZYjHL{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)}.-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq>span::after{content:" ↓↓"}.-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI>span::after{content:" ↑↑"}.-esm-patient-vitals__paginated-vitals__low___ZYjHL>span::after{content:" ↓"}.-esm-patient-vitals__paginated-vitals__high___kRFGr>span::after{content:" ↑"}',"",{version:3,sources:["webpack://./src/vitals/paginated-vitals.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAAA,yDAKE,kBACE,CAAA,cCUS,CAAA,8DDRT,UACE,CAAA,WACA,CAAA,oBACA,CAAA,sSAMJ,2DEi1BE,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CAAA,uIF50BJ,mCACE,CAAA,iCACA,CAAA,mHAGF,kCACE,CAAA,iCACA,CAAA,4DAGF,iBCDa,CAAA,qFDMX,aACE,CAAA,sFAKF,aACE,CAAA,2EAKF,YACE,CAAA,4EAKF,YACE,CAAA,qFAKF,cACE,CAAA,sFAKF,cACE,CAAA,+VAIJ,2DE0xBI,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CAAA,0EFjxBJ,aACE,CAAA,2EAGF,aACE,CAAA,gEAGF,YACE,CAAA,iEAGF,YACE",sourceRoot:""}]),l.locals={table:"-esm-patient-vitals__paginated-vitals__table___tGgKY",criticallyLow:"-esm-patient-vitals__paginated-vitals__criticallyLow___aZhDq",criticallyHigh:"-esm-patient-vitals__paginated-vitals__criticallyHigh___eUeRI",low:"-esm-patient-vitals__paginated-vitals__low___ZYjHL",high:"-esm-patient-vitals__paginated-vitals__high___kRFGr",normal:"-esm-patient-vitals__paginated-vitals__normal___UO86t","off-scale-low":"-esm-patient-vitals__paginated-vitals__off-scale-low___moLj6","off-scale-high":"-esm-patient-vitals__paginated-vitals__off-scale-high___fnflS",offScaleHigh:"-esm-patient-vitals__paginated-vitals__offScaleHigh___XpEz7",offScaleLow:"-esm-patient-vitals__paginated-vitals__offScaleLow___Ss3WT"};const o=l},1888:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,"@media screen{.-esm-patient-vitals__print__printPage___BhX2J{background-color:#fff;display:none}}@media print{@page{size:auto;margin:2.5rem}.-esm-patient-vitals__print__header___uIp5f{display:flex;align-items:center;justify-content:space-between;background-color:#fff}.-esm-patient-vitals__print__patientDetails___Vr7Cd{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);margin:0 .5rem}.-esm-patient-vitals__print__patientInfo___z7G0t{color:#393939;font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-patient-vitals__print__name___sfPBA{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-right:.5rem}.-esm-patient-vitals__print__footer___3u_QJ{font-size:.75rem;display:flex}.-esm-patient-vitals__print__date___Af9Cg{margin-left:1.5rem}.-esm-patient-vitals__print__gender___t6PwU{text-transform:capitalize}.-esm-patient-vitals__print__printedBy___NBaEw{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);margin:0 .25rem}.-esm-patient-vitals__print__subheader___EibcN{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;padding:.5rem;text-align:center}}","",{version:3,sources:["webpack://./src/vitals/print/print.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAIA,cACE,+CACE,qBCGI,CDFJ,YAAA,CAAA,CAIJ,aACE,MACE,SAAA,CACA,aEgCS,CF7BX,4CACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,qBCZI,CDeN,oDG00BE,oDAAA,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CHx0BA,cAAA,CAGF,iDACE,aCmBM,CEizBN,oDAAA,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CHh0BF,0CGg0BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CH9zBA,kBEfS,CFkBX,4CACE,gBEdS,CFeT,YAAA,CAGF,0CACE,kBETS,CFYX,4CACE,yBAAA,CAGF,+CG8yBE,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CH5yBA,eAAA,CAGF,+CGyyBE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CHvyBA,aCXM,CDYN,aEvCS,CFwCT,iBAAA,CAAA",sourceRoot:""}]),l.locals={printPage:"-esm-patient-vitals__print__printPage___BhX2J",header:"-esm-patient-vitals__print__header___uIp5f",patientDetails:"-esm-patient-vitals__print__patientDetails___Vr7Cd",patientInfo:"-esm-patient-vitals__print__patientInfo___z7G0t",name:"-esm-patient-vitals__print__name___sfPBA",footer:"-esm-patient-vitals__print__footer___3u_QJ",date:"-esm-patient-vitals__print__date___Af9Cg",gender:"-esm-patient-vitals__print__gender___t6PwU",printedBy:"-esm-patient-vitals__print__printedBy___NBaEw",subheader:"-esm-patient-vitals__print__subheader___EibcN"};const o=l},9361:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-chart__label01___IkvGS,.-esm-patient-vitals__vitals-chart__vitalsSignLabel___NYx6i{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-vitals__vitals-chart__bodyShort01___M480D{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-vitals__vitals-chart__vitalsChartContainer____aVtw{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-patient-vitals__vitals-chart__vitalSignsArea___Ev8GQ{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk{flex-grow:4;padding:0 1rem 3rem}.-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk .cds--cc--layout-row{height:0}.-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk .layout-child{margin-top:.5rem}.-esm-patient-vitals__vitals-chart__vitalsSignLabel___NYx6i{margin-bottom:1rem;display:inline-block}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb{margin:1rem 0;scroll-behavior:smooth}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb>ul{flex-direction:column !important}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-patient-vitals__vitals-chart__tab___g2wF6{outline:0;outline-offset:0;min-height:2rem}.-esm-patient-vitals__vitals-chart__tab___g2wF6:active,.-esm-patient-vitals__vitals-chart__tab___g2wF6:focus{outline:2px solid var(--brand-03) !important}.-esm-patient-vitals__vitals-chart__tab___g2wF6[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-patient-vitals__vitals-chart__tab___g2wF6[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-patient-vitals__vitals-chart__tablist___OoHVR .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-patient-vitals__vitals-chart__tablist___OoHVR>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/vitals/vitals-chart.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,gHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,wDC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,iEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,2DACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,4DACE,WAAA,CACA,mBAAA,CAEA,iFACE,QAAA,CAGF,0EACE,gBAAA,CAIJ,4DAEE,kBAAA,CACA,oBAAA,CAGF,yDACE,aAAA,CACA,sBAAA,CAEA,4DACE,gCAAA,CAGF,kJACE,gBAAA,CAGF,iHACE,0BAAA,CACA,6BAAA,CAIJ,gDACE,SAAA,CACA,gBAAA,CACA,eAAA,CAEA,6GACE,4CAAA,CAGF,oEACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,qEACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,oEACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,2FACE,kBAAA",sourceRoot:""}]),l.locals={label01:"-esm-patient-vitals__vitals-chart__label01___IkvGS",vitalsSignLabel:"-esm-patient-vitals__vitals-chart__vitalsSignLabel___NYx6i",bodyShort01:"-esm-patient-vitals__vitals-chart__bodyShort01___M480D",vitalsChartContainer:"-esm-patient-vitals__vitals-chart__vitalsChartContainer____aVtw",vitalSignsArea:"-esm-patient-vitals__vitals-chart__vitalSignsArea___Ev8GQ",vitalsChartArea:"-esm-patient-vitals__vitals-chart__vitalsChartArea___v9hQk",verticalTabs:"-esm-patient-vitals__vitals-chart__verticalTabs___rZUTb",tab:"-esm-patient-vitals__vitals-chart__tab___g2wF6",tablist:"-esm-patient-vitals__vitals-chart__tablist___OoHVR"};const o=l},6299:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var i=a(272),r=a.n(i),n=a(2609),l=a.n(n)()(r());l.push([e.id,".-esm-patient-vitals__vitals-overview__widgetCard___u3uLL{background-color:#fff;border:1px solid #e0e0e0}.-esm-patient-vitals__vitals-overview__divider___EV5ez{width:1px;height:1rem;color:#e0e0e0;margin:0 1rem}.-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr .cds--content-switcher{max-width:max-content}.-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr .cds--content-switcher .cds--content-switcher__label{height:1rem}.-esm-patient-vitals__vitals-overview__customRow____W_Ay tbody{white-space:nowrap}.-esm-patient-vitals__vitals-overview__backgroundDataFetchingIndicator___Op161{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-patient-vitals__vitals-overview__printButton___G94Ip{margin-left:1.25rem}","",{version:3,sources:["webpack://./src/vitals/vitals-overview.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAIA,0DACE,qBCIM,CDHN,wBAAA,CAGF,uDACE,SAAA,CACA,WEoBW,CFnBX,aC+BQ,CD9BR,aAAA,CAGF,uEACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAEA,8FACE,qBAAA,CAEA,4HACE,WEKO,CAAA,+DFCX,kBAAA,CAGF,+EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAGF,2DACE,mBAAA",sourceRoot:""}]),l.locals={widgetCard:"-esm-patient-vitals__vitals-overview__widgetCard___u3uLL",divider:"-esm-patient-vitals__vitals-overview__divider___EV5ez",vitalsHeaderActionItems:"-esm-patient-vitals__vitals-overview__vitalsHeaderActionItems___Zldhr",customRow:"-esm-patient-vitals__vitals-overview__customRow____W_Ay",backgroundDataFetchingIndicator:"-esm-patient-vitals__vitals-overview__backgroundDataFetchingIndicator___Op161",printButton:"-esm-patient-vitals__vitals-overview__printButton___G94Ip"};const o=l},9454:(e,t,a)=>{"use strict";a.d(t,{wA:()=>c,IZ:()=>_,tQ:()=>u,WK:()=>A,$2:()=>O,F9:()=>S,VK:()=>B,l4:()=>C,Aq:()=>y});var i=a(268),r=a(2870),n=a(9198),l=a.n(n),o=a(9285),s=a.n(o);function c(e,t){if(t&&e){if(t.hiCritical&&e>=t.hiCritical)return"critically_high";if(t.hiNormal&&e>t.hiNormal)return"high";if(t.lowCritical&&e<=t.lowCritical)return"critically_low";if(t.lowNormal&&e<t.lowNormal)return"low"}return"normal"}function A(e,t,a,i){if(!i)return"normal";var r=c(e,u(null==a?void 0:a.systolicBloodPressureUuid,i)),n=(null==a?void 0:a.diastolicBloodPressureUuid)?c(t,u(a.diastolicBloodPressureUuid,i)):"normal";return"critically_high"===r||"critically_high"===n?"critically_high":"critically_low"===r||"critically_low"===n?"critically_low":"high"===r||"high"===n?"high":"low"===r||"low"===n?"low":"normal"}function _(e){switch(e){case"BMI":return"";case"Temperature":case"Weight":return"--.-";case"Height":case"diastolic":case"systolic":case"Pulse":return"---";default:return"--"}}function u(e,t){if(e&&(null==t?void 0:t.length))return null==t?void 0:t.find((function(t){return t.uuid===e}))}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function m(e,t,a,i,r,n,l){try{var o=e[n](l),s=o.value}catch(e){return void a(e)}o.done?t(s):Promise.resolve(s).then(i,r)}function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function v(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){p(e,t,a[t])}))}return e}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=100,b=Symbol("vitalsAndBiometrics");function f(e){return"".concat(e,"RenderInterpretation")}function C(){var e,t,a="".concat(r.restBaseUrl,"/concept/?q=VITALS SIGNS&v=").concat("custom:(setMembers:(uuid,display,hiNormal,hiAbsolute,hiCritical,lowNormal,lowAbsolute,lowCritical,units))"),i=l()(a,r.openmrsFetch),n=i.data,o=i.error,s=i.isLoading,c=null==n||null===(t=n.data)||void 0===t||null===(e=t.results[0])||void 0===e?void 0:e.setMembers,A=(null==c?void 0:c.length)?new Map(c.map((function(e){return[e.uuid,e.units]}))):new Map([]),_=(null==c?void 0:c.length)?new Map(c.map((function(e){var t,a;return[e.uuid,{lowAbsolute:null!==(t=e.lowAbsolute)&&void 0!==t?t:null,highAbsolute:null!==(a=e.hiAbsolute)&&void 0!==a?a:null}]}))):new Map([]);return{data:A,error:o,isLoading:s,conceptMetadata:c,conceptRanges:_}}var y=function(e,t){return"".concat(e," ").concat(t?"(".concat(t,")"):"")},w=0,E=new Map;function B(e){var t,a,n,l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vitals",_=C().conceptMetadata,d=(0,r.useConfig)().concepts,m=(0,i.useMemo)((function(){return[d.heightUuid,d.midUpperArmCircumferenceUuid,d.weightUuid]}),[d.heightUuid,d.midUpperArmCircumferenceUuid,d.weightUuid]),g=(0,i.useMemo)((function(){return("both"===o?Object.values(d):Object.values(d).filter((function(e){return"vitals"===o&&!m.includes(e)||"biometrics"===o&&m.includes(e)}))).join(",")}),[d,m,o]),y=(0,i.useCallback)((function(t,a){return{swrKeyNeedle:b,mode:o,patientUuid:e,conceptUuids:g,page:t,prevPageData:a}}),[o,g,e]),B=s()(y,D),S=B.data,k=B.isLoading,O=B.isValidating,U=B.setSize,F=B.error,j=B.size,P=B.mutate;(0,i.useEffect)((function(){var e=++w;return E.set(e,P),function(){E.delete(e)}}),[P]);var x,T=(0,i.useCallback)((function(e){switch(e){case d.systolicBloodPressureUuid:return"systolic";case d.diastolicBloodPressureUuid:return"diastolic";case d.pulseUuid:return"pulse";case d.temperatureUuid:return"temperature";case d.oxygenSaturationUuid:return"spo2";case d.respiratoryRateUuid:return"respiratoryRate";case d.heightUuid:return"height";case d.weightUuid:return"weight";case d.midUpperArmCircumferenceUuid:return"muac";default:return""}}),[d.heightUuid,d.midUpperArmCircumferenceUuid,d.systolicBloodPressureUuid,d.oxygenSaturationUuid,d.diastolicBloodPressureUuid,d.pulseUuid,d.respiratoryRateUuid,d.temperatureUuid,d.weightUuid]),N=(0,i.useMemo)((function(){var e,t,a,i,r=null==S||null===(i=S[0])||void 0===i||null===(a=i.data)||void 0===a||null===(t=a.entry)||void 0===t||null===(e=t.map((function(e){return e.resource})).filter(Boolean).map(function(e){return function(t){var a,i,r,n,l,o,s,A;return{code:null==t||null===(r=t.code)||void 0===r||null===(i=r.coding)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.code,interpretation:c(null==t||null===(n=t.valueQuantity)||void 0===n?void 0:n.value,u(null==t||null===(s=t.code)||void 0===s||null===(o=s.coding)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.code,e)),recordedDate:null==t?void 0:t.effectiveDateTime,value:null==t||null===(A=t.valueQuantity)||void 0===A?void 0:A.value}}}(_)))||void 0===e?void 0:e.reduce((function(e,t){var a,i,r,n,l=new Date(new Date(t.recordedDate)).toISOString();return e.has(l)&&e.get(l)?e.set(l,(r=v({},e.get(l)),p(a={},T(t.code),t.value),p(a,f(T(t.code)),t.interpretation),n=null!=(n=a)?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})),r)):t.value&&e.set(l,(p(i={},T(t.code),t.value),p(i,f(T(t.code)),t.interpretation),i)),e}),new Map);return Array.from(null!=r?r:[]).map((function(e,t){var a,i,r=h(e,2),n=r[0],l=r[1],s=v({id:t.toString(),date:n},l);return"both"!==o&&"biometrics"!==o||(s.bmi=(a=Number(l.weight),i=Number(l.height),a>0&&i>0?Number((a/Math.pow(i/100,2)).toFixed(1)):null)),"both"!==o&&"vitals"!==o||(s.bloodPressureRenderInterpretation=A(l.systolic,l.diastolic,d,_)),s}))}),[S,_,T,d,o]);return{data:S?N:void 0,isLoading:k,error:F,hasMore:!!(null==S?void 0:S.length)&&!!(null===(a=S[S.length-1].data)||void 0===a||null===(t=a.link)||void 0===t?void 0:t.some((function(e){return"next"===e.relation}))),isValidating:O,loadingNewData:O,setPage:U,currentPage:j,totalResults:null!==(x=null==S||null===(l=S[0])||void 0===l||null===(n=l.data)||void 0===n?void 0:n.total)&&void 0!==x?x:void 0,mutate:P}}function D(e){var t,a=e.patientUuid,i=e.conceptUuids,n=e.page,l=e.prevPageData;if(l&&!(null==l||null===(t=l.data)||void 0===t?void 0:t.link.some((function(e){return"next"===e.relation}))))return null;var o="".concat(r.fhirBaseUrl,"/Observation?subject:Patient=").concat(a,"&"),s=new URLSearchParams;return s.append("code",i),s.append("_summary","data"),s.append("_sort","-date"),s.append("_count",g.toString()),n&&s.append("_getpagesoffset",(n*g).toString()),(0,r.openmrsFetch)(o+s.toString())}function S(e,t,a,i,n,l,o){return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/encounter"),{method:"POST",headers:{"Content-Type":"application/json"},signal:l.signal,body:{patient:i,location:o,encounterType:e,form:t,obs:k(n,a)}})}function k(e,t){return Object.entries(e).filter((function(e){var t=h(e,2),a=(t[0],t[1]);return Boolean(a)})).map((function(e){var a=h(e,2),i=a[0],r=a[1];return{concept:t[i+"Uuid"],value:r}}))}function O(){return U.apply(this,arguments)}function U(){var e;return e=function(){return function(e,t){var a,i,r,n,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,i=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){l=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){l.label=n[1];break}if(6===n[0]&&l.label<r[1]){l.label=r[1],r=n;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(n);break}r[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],i=0}finally{a=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}(this,(function(e){return E.forEach((function(e){return e()})),[2]}))},U=function(){var t=this,a=arguments;return new Promise((function(i,r){var n=e.apply(t,a);function l(e){m(n,i,r,l,o,"next",e)}function o(e){m(n,i,r,l,o,"throw",e)}l(void 0)}))},U.apply(this,arguments)}},9282:(e,t,a)=>{"use strict";a.r(t),a.d(t,{biometricsDetailedSummary:()=>We,biometricsOverview:()=>qe,importTranslation:()=>Le,startupApp:()=>ze,vitalsAndBiometricsDashboardLink:()=>Ye,vitalsBiometricsFormWorkspace:()=>Je,vitalsHeader:()=>He,vitalsMain:()=>Ve,vitalsSummary:()=>Me,weightTile:()=>Qe});var i=a(2870),r=a(884);var n={concepts:{systolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},diastolicBloodPressureUuid:{_type:i.Type.ConceptUuid,_default:"5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},pulseUuid:{_type:i.Type.ConceptUuid,_default:"5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},temperatureUuid:{_type:i.Type.ConceptUuid,_default:"5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},oxygenSaturationUuid:{_type:i.Type.ConceptUuid,_default:"5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},heightUuid:{_type:i.Type.ConceptUuid,_default:"5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},weightUuid:{_type:i.Type.ConceptUuid,_default:"5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},respiratoryRateUuid:{_type:i.Type.ConceptUuid,_default:"5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},generalPatientNoteUuid:{_type:i.Type.ConceptUuid,_default:"165095AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},midUpperArmCircumferenceUuid:{_type:i.Type.ConceptUuid,_default:"1343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},vitals:{useFormEngine:{_type:i.Type.Boolean,_default:!1,_description:"Whether to use an Ampath form as the vitals and biometrics form. If set to true, encounterUuid and formUuid must be set as well."},encounterTypeUuid:{_type:i.Type.UUID,_default:"67a71486-1a54-468f-ac3e-7091a9a79584"},logo:{src:{_type:i.Type.String,_default:null,_description:"A path or URL to an image. Defaults to the OpenMRS SVG sprite."},alt:{_type:i.Type.String,_default:"Logo",_description:"Alt text, shown on hover"},name:{_type:i.Type.String,_default:null,_description:"The organization name displayed when image is absent"}},showPrintButton:{_type:i.Type.Boolean,_default:!1,_description:"Determines whether or not to display the Print button in the vitals datatable header. If set to true, a Print button gets shown as the right-most item in the table header. When clicked, this button enables the user to print out the contents of the table"},formUuid:{_type:i.Type.UUID,_default:"9f26aad4-244a-46ca-be49-1196df1a8c9a"},formName:{_type:i.Type.String,_default:"Vitals"},useMuacColors:{_type:i.Type.Boolean,_default:!1,_description:"Whether to show/use MUAC color codes. If set to true, the input will show status colors."}},biometrics:{bmiUnit:{_type:i.Type.String,_default:"kg / m²"}}},l=a(268),o=a.n(l),s=a(4924),c=a(234),A=a(5089),_=a(5508),u=a(2074),d=a(37),m=a(6759);function p(e,t){if(e)if(t.vitals.useFormEngine){var a=t.vitals;i=a.formUuid,n=a.formName,(0,r.launchPatientWorkspace)("patient-form-entry-workspace",{workspaceTitle:n,formInfo:{formUuid:i,encounterUuid:""}})}else(0,r.launchPatientWorkspace)("patient-vitals-biometrics-form-workspace");else(0,r.launchStartVisitPrompt)();var i,n}var v=a(9454),h=a(321),g=a.n(h),b=a(1195),f=a.n(b),C=a(3275),y=a.n(C),w=a(7162),E=a.n(w),B=a(2094),D=a.n(B),S=a(757),k=a.n(S),O=a(8393),U={};U.styleTagTransform=k(),U.setAttributes=E(),U.insert=y().bind(null,"head"),U.domAPI=f(),U.insertStyleElement=D(),g()(O.Z,U);const F=O.Z&&O.Z.locals?O.Z.locals:void 0;function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function P(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function x(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){P(e,t,a[t])}))}return e}const T=function(e){var t,a,n=e.tableRows,s=e.pageSize,c=e.pageUrl,_=e.urlLabel,u=e.tableHeaders,d=e.isPrinting,m="tablet"===(0,i.useLayoutType)(),p=function(e){var t=e.interpretation,a=e.children;switch(t){case"critically_high":return o().createElement(A.pj1,{className:F.criticallyHigh},o().createElement("span",null,a));case"critically_low":return o().createElement(A.pj1,{className:F.criticallyLow},o().createElement("span",null,a));case"high":return o().createElement(A.pj1,{className:F.high},o().createElement("span",null,a));case"low":return o().createElement(A.pj1,{className:F.low},o().createElement("span",null,a));default:return o().createElement(A.pj1,{className:F.normal},o().createElement("span",null,a))}},v=(t=(0,l.useState)({key:"",sortDirection:"NONE"}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(t,a)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?j(e,t):void 0}}(t,a)||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.")}()),h=v[0],g=v[1],b=(0,l.useMemo)((function(){if("NONE"===h.sortDirection)return n;var e=u.find((function(e){return e.key===h.key}));return e?n.slice().sort((function(t,a){var i=e.sortFunc(t,a);return"DESC"===h.sortDirection?i:-i})):n}),[u,n,h]),f=(0,i.usePagination)(b,s),C=f.results,y=f.goTo,w=f.currentPage,E=d?b:C;return o().createElement("div",null,o().createElement(A.wQF,{rows:E,headers:u,size:m?"lg":"sm",useZebraStyles:!0,sortRow:function(e,t,a){var i=a.key,r=a.sortDirection;g("NONE"===r?{key:"",sortDirection:r}:{key:i,sortDirection:r})},isSortable:!0},(function(e){var t=e.rows,a=e.headers,i=e.getTableProps,r=e.getHeaderProps;return o().createElement(A.xJi,null,o().createElement(A.iA_,x({className:F.table,"aria-label":"vitals"},i()),o().createElement(A.ssF,null,o().createElement(A.SCH,null,a.map((function(e){var t,a;return o().createElement(A.xDH,function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(x({},r({header:e,isSortable:e.isSortable})),{key:e.key}),null!==(a=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==a?a:e.header)})))),o().createElement(A.RMI,null,t.map((function(e){return o().createElement(A.SCH,{key:e.id},e.cells.map((function(t){var a,i,r=C.find((function(t){return t.id===e.id})),n=r&&r[t.id.substring(2)+"Interpretation"];return o().createElement(p,{key:"styled-cell-".concat(t.id),interpretation:n},null!==(i=null===(a=t.value)||void 0===a?void 0:a.content)&&void 0!==i?i:t.value)})))})))))})),d?null:o().createElement(r.PatientChartPagination,{pageNumber:w,totalItems:n.length,currentItems:C.length,pageSize:s,onPageNumberChange:function(e){var t=e.page;return y(t)},dashboardLinkUrl:c,dashboardLinkLabel:_}))};var N=a(1888),I={};I.styleTagTransform=k(),I.setAttributes=E(),I.insert=y().bind(null,"head"),I.domAPI=f(),I.insertStyleElement=D(),g()(N.Z,I);const R=N.Z&&N.Z.locals?N.Z.locals:void 0,L=function(e){var t,a=e.subheader,r=e.patientDetails,n=(0,s.useTranslation)().t,l=(0,i.useConfig)().vitals.logo,c=(0,i.useSession)();return o().createElement("div",{className:R.printPage},o().createElement("header",{className:R.header},(null==l?void 0:l.src)?o().createElement("img",{className:R.logo,src:(0,i.interpolateUrl)(l.src),alt:l.alt,width:110,height:40}):(null==l?void 0:l.name)?l.name:o().createElement("svg",{role:"img",width:110,height:40,viewBox:"0 0 380 119",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40.29 40.328a27.755 27.755 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.647 8.116l.02-18.54A42.835 42.835 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968l.021 18.36ZM79.645 79.671a27.744 27.744 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.857 42.857 0 0 0 59.96 103a42.833 42.833 0 0 0 19.672-4.751l.013-18.578ZM40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.819 42.819 0 0 0 4.752 19.672l18.576.013ZM79.634 40.289a27.753 27.753 0 0 1 8.154 19.688 27.744 27.744 0 0 1-8.117 19.646l18.542.02a42.842 42.842 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675l-18.577-.013ZM156.184 60.002c0-8.748-6.118-15.776-15.025-15.776-8.909 0-15.025 7.028-15.025 15.776 0 8.749 6.116 15.78 15.025 15.78 8.907 0 15.025-7.031 15.025-15.78Zm-34.881 0c0-11.482 8.318-19.958 19.856-19.958 11.536 0 19.855 8.477 19.855 19.959 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.965ZM179.514 75.54c5.507 0 9.05-4.14 9.05-9.482 0-5.341-3.543-9.483-9.05-9.483-5.505 0-9.046 4.142-9.046 9.483 0 5.342 3.541 9.482 9.046 9.482ZM166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248V53.306ZM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193h16.021Zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868l3.219 2.508ZM227.854 59.356c0-2.346-.216-4.36-.216-6.05h4.031c0 1.363.11 2.777.11 4.195h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25V59.356ZM259.211 41.008h6.708L278.8 70.791h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507V41.01ZM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333v12.558Zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037L334.018 79h-5.525l-10.304-17.063h-5.797V79h-4.506V41.01ZM358.123 47.712c-1.506-2.413-4.187-3.486-6.926-3.486-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45l-3.699 3.218Z"})),o().createElement("div",{className:R.patientDetails},o().createElement("span",{className:R.name},null==r?void 0:r.name),o().createElement("span",{className:R.patientInfo},null==r?void 0:r.gender,", ",null==r?void 0:r.age,", ",null==r?void 0:r.identifiers," ")),o().createElement("div",{className:R.printedBy},n("printedBy","Printed by"),o().createElement("span",{className:R.printedBy},null==c||null===(t=c.user)||void 0===t?void 0:t.display))),o().createElement("div",{className:R.subheader},o().createElement("h4",null,a)))};var z=a(2524),G=a.n(z),Z=a(5771),M=a(9361),V={};V.styleTagTransform=k(),V.setAttributes=E(),V.insert=y().bind(null,"head"),V.domAPI=f(),V.insertStyleElement=D(),g()(M.Z,V);const H=M.Z&&M.Z.locals?M.Z.locals:void 0;function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function W(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Q;!function(e){e.LABELS="labels",e.LABELS_RATIO="labels_ratio",e.LINEAR="linear",e.LOG="log",e.TIME="time"}(Q||(Q={}));const J=function(e){var t,a,r,n,c,_=e.patientVitals,u=e.conceptUnits,d=e.config,m=(0,s.useTranslation)().t,p=(0,l.useId)(),h=Y(o().useState({title:"".concat(m("bp","BP")," (").concat(u.get(d.concepts.systolicBloodPressureUuid),")"),value:"systolic"}),2),g=h[0],b=h[1],f=[{id:"bloodPressure",title:(0,v.Aq)(m("bp","BP"),null!==(t=u.get(d.concepts.systolicBloodPressureUuid))&&void 0!==t?t:"-"),value:"systolic"},{id:"oxygenSaturation",title:(0,v.Aq)(m("spo2","SpO2"),null!==(a=u.get(d.concepts.oxygenSaturationUuid))&&void 0!==a?a:"-"),value:"spo2"},{id:"temperature",title:(0,v.Aq)(m("temp","Temp"),null!==(r=u.get(d.concepts.temperatureUuid))&&void 0!==r?r:"-"),value:"temperature"},{id:"respiratoryRate",title:(0,v.Aq)(m("respiratoryRate","R. rate"),null!==(n=u.get(d.concepts.respiratoryRateUuid))&&void 0!==n?n:"-"),value:"respiratoryRate"},{id:"pulse",title:(0,v.Aq)(m("pulse","Pulse"),null!==(c=u.get(d.concepts.pulseUuid))&&void 0!==c?c:"-"),value:"pulse"}],C=(0,l.useMemo)((function(){return _.filter((function(e){return e[g.value]})).splice(0,10).sort((function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()})).map((function(e){if(e[g.value])return["systolic","diastolic"].includes(g.value)?[{group:"Systolic blood pressure",key:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{year:!1}),value:e.systolic,date:e.date},{group:"Diastolic blood pressure",key:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{year:!1}),value:e.diastolic,date:e.date}]:{group:g.title,key:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{year:!1}),value:e[g.value],date:e.date}}))}),[_,g]),y={title:g.title,axes:{bottom:{title:m("date","Date"),mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:g.title,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:W({},g.title,"#6929c4")},tooltip:{customHTML:function(e){var t=Y(e,1)[0],a=t.value,i=t.group,r=t.key;return'<div class="cds--tooltip cds--tooltip--shown" style="min-width: max-content; font-weight:600">'.concat(a," - ").concat(String(i).toUpperCase(),'\n <span style="color: #c6c6c6; font-size: 1rem; font-weight:600">').concat(r,"</span></div>")}},height:"400px"};return o().createElement("div",{className:H.vitalsChartContainer},o().createElement("div",{className:H.vitalSignsArea},o().createElement("label",{className:H.vitalsSignLabel,htmlFor:"".concat(p,"-tab")},m("vitalSignDisplayed","Vital sign displayed")),o().createElement(A.mQc,{className:H.verticalTabs},o().createElement(A.tdY,{className:H.tablist,"aria-label":"Vitals tabs"},f.map((function(e){var t=e.id,a=e.title,i=e.value;return o().createElement(A.OK9,{className:G()(H.tab,W({},H.selectedTab,g.title===a)),id:"".concat(t,"-tab"),key:t,onClick:function(){return b({title:a,value:i})}},a)}))))),o().createElement("div",{className:H.vitalsChartArea},o().createElement(Z.wW,{data:C.flat(),options:y})))};var K=a(6299),X={};X.styleTagTransform=k(),X.setAttributes=E(),X.insert=y().bind(null,"head"),X.domAPI=f(),X.insertStyleElement=D(),g()(K.Z,X);const $=K.Z&&K.Z.locals?K.Z.locals:void 0;function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function te(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const ie=function(e){var t,a,n,h,g,b=e.patientUuid,f=e.pageSize,C=e.urlLabel,y=e.pageUrl,w=(0,s.useTranslation)().t,E=(0,i.useConfig)(),B=w("vitals","Vitals"),D=ae((0,l.useState)(!1),2),S=D[0],k=D[1],O=(0,r.useVisitOrOfflineVisit)(b).currentVisit,U="tablet"===(0,i.useLayoutType)(),F=ae((0,l.useState)(!1),2),j=F[0],P=F[1],x=(0,l.useRef)(null),N=(0,i.usePatient)(b),I=(0,i.useConfig)().excludePatientIdentifierCodeTypes,R=(0,v.VK)(b),z=R.data,G=R.error,Z=R.isLoading,M=R.isValidating,V=(0,v.l4)().data,H=E.vitals.showPrintButton&&!S,q=(0,l.useCallback)((function(){p(O,E)}),[E,O]),W=(0,l.useMemo)((function(){var e,t,a,r,n,l,o,s=null!==(o=null==N||null===(t=N.patient)||void 0===t||null===(e=t.identifier)||void 0===e?void 0:e.filter((function(e){return!(null==I?void 0:I.uuids.includes(e.type.coding[0].code))})))&&void 0!==o?o:[];return{name:(null==N?void 0:N.patient)?(0,i.displayName)(null==N?void 0:N.patient):"",age:(0,i.age)(null==N||null===(a=N.patient)||void 0===a?void 0:a.birthDate),gender:function(e){switch(e){case"male":return w("male","Male");case"female":return w("female","Female");case"other":return w("other","Other");case"unknown":return w("unknown","Unknown");default:return e}}(null==N||null===(r=N.patient)||void 0===r?void 0:r.gender),location:null==N||null===(l=N.patient)||void 0===l||null===(n=l.address)||void 0===n?void 0:n[0].city,identifiers:(null==s?void 0:s.length)?s.map((function(e){var t=e.value;return e.type,t})):[]}}),[N,w,null==I?void 0:I.uuids]),Y=[{key:"dateRender",header:w("dateAndTime","Date and time"),isSortable:!0,sortFunc:function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()}},{key:"temperatureRender",header:(0,v.Aq)(w("temperature","Temp"),null!==(t=V.get(E.concepts.temperatureUuid))&&void 0!==t?t:""),isSortable:!0,sortFunc:function(e,t){return e.temperature&&t.temperature?e.temperature-t.temperature:0}},{key:"bloodPressureRender",header:(0,v.Aq)(w("bloodPressure","BP"),null!==(a=V.get(E.concepts.systolicBloodPressureUuid))&&void 0!==a?a:""),isSortable:!0,sortFunc:function(e,t){return e.systolic&&t.systolic&&e.diastolic&&t.diastolic?e.systolic!==t.systolic?e.systolic-t.systolic:e.diastolic-t.diastolic:0}},{key:"pulseRender",header:(0,v.Aq)(w("pulse","Pulse"),null!==(n=V.get(E.concepts.pulseUuid))&&void 0!==n?n:""),isSortable:!0,sortFunc:function(e,t){return e.pulse&&t.pulse?e.pulse-t.pulse:0}},{key:"respiratoryRateRender",header:(0,v.Aq)(w("respiratoryRate","R. Rate"),null!==(h=V.get(E.concepts.respiratoryRateUuid))&&void 0!==h?h:""),isSortable:!0,sortFunc:function(e,t){return e.respiratoryRate&&t.respiratoryRate?e.respiratoryRate-t.respiratoryRate:0}},{key:"spo2Render",header:(0,v.Aq)(w("spo2","SPO2"),null!==(g=V.get(E.concepts.oxygenSaturationUuid))&&void 0!==g?g:""),isSortable:!0,sortFunc:function(e,t){return e.spo2&&t.spo2?e.spo2-t.spo2:0}}],Q=(0,l.useMemo)((function(){return null==z?void 0:z.map((function(e,t){var a,r,n,l,o,s;return function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){te(e,t,a[t])}))}return e}({},e),{id:"".concat(t),dateRender:(0,i.formatDate)((0,i.parseDate)(e.date.toString()),{mode:"wide",time:!0}),bloodPressureRender:"".concat(null!==(a=e.systolic)&&void 0!==a?a:"--"," / ").concat(null!==(r=e.diastolic)&&void 0!==r?r:"--"),pulseRender:null!==(n=e.pulse)&&void 0!==n?n:"--",spo2Render:null!==(l=e.spo2)&&void 0!==l?l:"--",temperatureRender:null!==(o=e.temperature)&&void 0!==o?o:"--",respiratoryRateRender:null!==(s=e.respiratoryRate)&&void 0!==s?s:"--"})}))}),[z]),K=(0,l.useRef)(null);(0,l.useEffect)((function(){j&&K.current&&K.current()}),[j]);var X=(0,c.useReactToPrint)({content:function(){return x.current},documentTitle:"OpenMRS - ".concat(W.name," - ").concat(B),onBeforeGetContent:function(){return new Promise((function(e){N&&N.patient&&B&&(K.current=e,P(!0))}))},onAfterPrint:function(){K.current=null,P(!1)}});return o().createElement(o().Fragment,null,Z?o().createElement(A.gqd,{role:"progressbar",compact:!U,zebra:!0}):G?o().createElement(r.ErrorState,{error:G,headerTitle:B}):(null==z?void 0:z.length)?o().createElement("div",{className:$.widgetCard},o().createElement(r.CardHeader,{title:B},o().createElement("div",{className:$.backgroundDataFetchingIndicator},o().createElement("span",null,M?o().createElement(A.lSo,null):null)),o().createElement("div",{className:$.vitalsHeaderActionItems},o().createElement(A.GHR,{onChange:function(e){return k("chartView"===e.name)},size:U?"md":"sm"},o().createElement(A.aNl,{name:"tableView",text:"Table view"},o().createElement(_.iA,{size:16})),o().createElement(A.aNl,{name:"chartView",text:"Chart view"},o().createElement(u.eA,{size:16}))),o().createElement(o().Fragment,null,o().createElement("span",{className:$.divider},"|"),H&&o().createElement(A.zxk,{kind:"ghost",renderIcon:d.FB,iconDescription:"Add vitals",className:$.printButton,onClick:X},w("print","Print")),o().createElement(A.zxk,{kind:"ghost",renderIcon:m.mm,iconDescription:"Add vitals",onClick:q},w("add","Add"))))),S?o().createElement(J,{patientVitals:z,conceptUnits:V,config:E}):o().createElement("div",{ref:x},o().createElement(L,{subheader:B,patientDetails:W}),o().createElement(T,{isPrinting:j,tableRows:Q,pageSize:f,urlLabel:C,pageUrl:y,tableHeaders:Y}))):o().createElement(r.EmptyState,{displayText:w("vitalSigns","Vital signs"),headerTitle:B,launchForm:q}))};var re=a(3565),ne=a.n(re),le=a(6824),oe=a.n(le),se=a(781),ce=a(2651),Ae={};Ae.styleTagTransform=k(),Ae.setAttributes=E(),Ae.insert=y().bind(null,"head"),Ae.domAPI=f(),Ae.insertStyleElement=D(),g()(ce.Z,Ae);const _e=ce.Z&&ce.Z.locals?ce.Z.locals:void 0;function ue(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const de=function(e){var t,a=e.interpretation,i=e.value,r=e.unitName,n=e.unitSymbol,l=(0,s.useTranslation)().t,c=a&&a.includes("critically"),A=a&&"normal"!==a;return o().createElement("section",{className:_e.container},o().createElement("div",{className:G()((t={},ue(t,_e["critical-value"],c),ue(t,_e["abnormal-value"],A),t))},o().createElement("div",{className:_e["label-container"]},o().createElement("label",{className:_e.label},r),A?o().createElement("span",{className:_e[a.replace("_","-")],title:l("abnormalValue","Abnormal value")}):null),o().createElement("div",{className:_e["value-container"]},o().createElement("label",{className:_e["pad-right"]},o().createElement("span",{className:_e.value},i||"-"," "),o().createElement("span",{className:_e.units},i&&n)))))};var me=a(2253),pe={};pe.styleTagTransform=k(),pe.setAttributes=E(),pe.insert=y().bind(null,"head"),pe.domAPI=f(),pe.insertStyleElement=D(),g()(me.Z,pe);const ve=me.Z&&me.Z.locals?me.Z.locals:void 0;function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}ne().extend(oe());var ge=a(6775),be={};be.styleTagTransform=k(),be.setAttributes=E(),be.insert=y().bind(null,"head"),be.domAPI=f(),be.insertStyleElement=D(),g()(ge.Z,be);const fe=ge.Z&&ge.Z.locals?ge.Z.locals:void 0;function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ce(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ce(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var we;!function(e){e.LABELS="labels",e.LABELS_RATIO="labels_ratio",e.LINEAR="linear",e.LOG="log",e.TIME="time"}(we||(we={}));var Ee={weight:"#6929c4",height:"#6929c4",bmi:"#6929c4"};const Be=function(e){var t,a,r,n=e.patientBiometrics,c=e.conceptUnits,_=e.config,u=(0,s.useTranslation)().t,d=_.biometrics.bmiUnit,m=ye((0,l.useState)({title:"".concat(u("weight","Weight")," (").concat(null!==(t=c.get(_.concepts.weightUuid))&&void 0!==t?t:"",")"),value:"weight",groupName:"weight"}),2),p=m[0],v=m[1],h=(0,l.useMemo)((function(){return n.filter((function(e){return e[p.value]})).splice(0,10).sort((function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()})).map((function(e){return e[p.value]&&{group:p.groupName,key:(0,i.formatDate)(new Date(e.date),{mode:"wide",year:!1,time:!1}),value:e[p.value],date:e.date}}))}),[n,p.groupName,p.value]),g=(0,l.useMemo)((function(){return{title:p.title,axes:{bottom:{title:u("date","Date"),mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:p.title,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:Ee},tooltip:{customHTML:function(e){var t=ye(e,1)[0],a=t.value,r=t.date;return'<div class="cds--tooltip cds--tooltip--shown" style="min-width: max-content; font-weight:600">'.concat((0,i.formatDate)((0,i.parseDate)(r),{year:!0}),' -\n <span style="color: #c6c6c6; font-size: 1rem; font-weight:400">').concat(a,"</span></div>")}},height:"400px"}}),[p,u]);return o().createElement("div",{className:fe.biometricChartContainer},o().createElement("div",{className:fe.biometricsArea},o().createElement("label",{className:fe.biometricLabel,htmlFor:"biometrics-chart-radio-group"},u("biometricDisplayed","Biometric displayed")),o().createElement(A.mQc,{className:fe.verticalTabs},o().createElement(A.tdY,{className:fe.tablist,"aria-label":"Biometrics tabs"},[{id:"weight",label:"".concat(u("weight","Weight")," (").concat(null!==(a=c.get(_.concepts.weightUuid))&&void 0!==a?a:"",")")},{id:"height",label:"".concat(u("height","Height")," (").concat(null!==(r=c.get(_.concepts.heightUuid))&&void 0!==r?r:"",")")},{id:"bmi",label:"".concat(u("bmi","BMI")," (").concat(d,")")}].map((function(e){var t,a,i,r=e.id,n=e.label;return o().createElement(A.OK9,{className:G()(fe.tab,fe.bodyLong01,(t={},a=fe.selectedTab,i=p.title===n,a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t)),key:r,onClick:function(){return v({title:n,value:r,groupName:r})}},n)}))))),o().createElement("div",{className:fe.biometricsChartArea},o().createElement(Z.wW,{data:h,options:g})))};function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Se(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const ke=function(e){var t,a,n=e.tableRows,s=e.pageSize,c=e.pageUrl,_=e.urlLabel,u=e.tableHeaders,d="tablet"===(0,i.useLayoutType)(),m=(t=(0,l.useState)({key:"",sortDirection:"NONE"}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(t,a)||function(e,t){if(e){if("string"==typeof e)return De(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?De(e,t):void 0}}(t,a)||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.")}()),p=m[0],v=m[1],h=(0,l.useMemo)((function(){if("NONE"===p.sortDirection)return n;var e=u.find((function(e){return e.key===p.key}));return e?n.slice().sort((function(t,a){var i=e.sortFunc(t,a);return"DESC"===p.sortDirection?i:-i})):n}),[n,u,p]),g=(0,i.usePagination)(h,s),b=g.results,f=g.goTo,C=g.currentPage;return o().createElement("div",null,o().createElement(A.wQF,{rows:b,headers:u,size:d?"lg":"sm",useZebraStyles:!0,sortRow:function(e,t,a){var i=a.key,r=a.sortDirection;v("NONE"===r?{key:"",sortDirection:r}:{key:i,sortDirection:r})},isSortable:!0},(function(e){var t=e.rows,a=e.headers,i=e.getHeaderProps,r=e.getTableProps;return o().createElement(A.xJi,null,o().createElement(A.iA_,function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){Se(e,t,a[t])}))}return e}({"aria-label":"biometrics"},r()),o().createElement(A.ssF,null,o().createElement(A.SCH,null,a.map((function(e){var t,a;return o().createElement(A.xDH,i({header:e,isSortable:e.isSortable}),null!==(a=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==a?a:e.header)})))),o().createElement(A.RMI,null,t.map((function(e){return o().createElement(A.SCH,{key:e.id},e.cells.map((function(e){var t,a;return o().createElement(A.pj1,{key:e.id},null!==(a=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==a?a:e.value)})))})))))})),o().createElement(r.PatientChartPagination,{pageNumber:C,totalItems:n.length,currentItems:b.length,pageSize:s,onPageNumberChange:function(e){var t=e.page;return f(t)},dashboardLinkUrl:c,dashboardLinkLabel:_}))};var Oe=a(2025),Ue={};Ue.styleTagTransform=k(),Ue.setAttributes=E(),Ue.insert=y().bind(null,"head"),Ue.domAPI=f(),Ue.insertStyleElement=D(),g()(Oe.Z,Ue);const Fe=Oe.Z&&Oe.Z.locals?Oe.Z.locals:void 0;function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Pe(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function xe(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){Pe(e,t,a[t])}))}return e}const Te=function(e){var t,a,n,c,d,h=e.patientUuid,g=e.pageSize,b=e.urlLabel,f=e.pageUrl,C=(0,s.useTranslation)().t,y=C("biometrics_lower","biometrics"),w=C("biometrics","Biometrics"),E=(c=(0,l.useState)(!1),d=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(c,d)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?je(e,t):void 0}}(c,d)||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.")}()),B=E[0],D=E[1],S="tablet"===(0,i.useLayoutType)(),k=(0,i.useConfig)(),O=k.biometrics.bmiUnit,U=(0,v.VK)(h,"biometrics"),F=U.data,j=U.isLoading,P=U.error,x=U.isValidating,T=(0,v.l4)().data,N=(0,r.useVisitOrOfflineVisit)(h).currentVisit,I=(0,l.useCallback)((function(){return p(N,k)}),[k,N]),R=[{key:"dateRender",header:C("dateAndTime","Date and time"),isSortable:!0,sortFunc:function(e,t){return new Date(e.date).getTime()-new Date(t.date).getTime()}},{key:"weightRender",header:(0,v.Aq)(C("weight","Weight"),null!==(t=T.get(k.concepts.weightUuid))&&void 0!==t?t:""),isSortable:!0,sortFunc:function(e,t){return e.weight&&t.weight?e.weight-t.weight:0}},{key:"heightRender",header:(0,v.Aq)(C("height","Height"),null!==(a=T.get(k.concepts.heightUuid))&&void 0!==a?a:""),isSortable:!0,sortFunc:function(e,t){return e.height&&t.height?e.height-t.height:0}},{key:"bmiRender",header:"".concat(C("bmi","BMI")," (").concat(O,")"),isSortable:!0,sortFunc:function(e,t){return e.bmi&&t.bmi?e.bmi-t.bmi:0}},{key:"muacRender",header:(0,v.Aq)(C("muac","MUAC"),null!==(n=T.get(k.concepts.midUpperArmCircumferenceUuid))&&void 0!==n?n:""),isSortable:!0,sortFunc:function(e,t){return e.muac&&t.muac?e.muac-t.muac:0}}],L=(0,l.useMemo)((function(){return null==F?void 0:F.map((function(e,t){var a,r,n,l;return function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(xe({},e),{id:"".concat(t),dateRender:(0,i.formatDatetime)((0,i.parseDate)(e.date.toString()),{mode:"wide"}),weightRender:null!==(a=e.weight)&&void 0!==a?a:"--",heightRender:null!==(r=e.height)&&void 0!==r?r:"--",bmiRender:null!==(n=e.bmi)&&void 0!==n?n:"--",muacRender:null!==(l=e.muac)&&void 0!==l?l:"--"})}))}),[F]);return j?o().createElement(A.gqd,{role:"progressbar"}):P?o().createElement(r.ErrorState,{error:P,headerTitle:w}):(null==F?void 0:F.length)?o().createElement("div",{className:Fe.widgetCard},o().createElement(r.CardHeader,{title:w},o().createElement("div",{className:Fe.backgroundDataFetchingIndicator},o().createElement("span",null,x?o().createElement(A.lSo,null):null)),o().createElement("div",{className:Fe.biometricsHeaderActionItems},o().createElement(A.GHR,{onChange:function(e){return D("chartView"===e.name)},size:S?"md":"sm"},o().createElement(A.aNl,{name:"tableView",text:"Table view"},o().createElement(_.iA,{size:16})),o().createElement(A.aNl,{name:"chartView",text:"Chart view"},o().createElement(u.eA,{size:16}))),o().createElement(o().Fragment,null,o().createElement("span",{className:Fe.divider},"|"),o().createElement(A.zxk,{kind:"ghost",renderIcon:function(e){return o().createElement(m.mm,xe({size:16},e))},iconDescription:"Add biometrics",onClick:I},C("add","Add"))))),B?o().createElement(Be,{patientBiometrics:F,conceptUnits:T,config:k}):o().createElement(ke,{tableRows:L,pageSize:g,urlLabel:b,pageUrl:f,tableHeaders:R})):o().createElement(r.EmptyState,{displayText:y,headerTitle:w,launchForm:I})};function Ne(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var Ie="@openmrs/esm-patient-vitals-app",Re={featureName:"patient-vitals",moduleName:Ie},Le=a(3979);function ze(){(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:"".concat(i.fhirBaseUrl,"/Observation.+")}),(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:".+".concat(i.restBaseUrl,"/concept.+")}),(0,i.defineConfigSchema)(Ie,n)}var Ge,Ze,Me=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(e.basePath,(0,s.useTranslation)().t),i="${openmrsSpaBase}/patient/".concat(t,"/chart/Vitals & Biometrics"),r=a("seeAll","See all");return o().createElement(ie,{patientUuid:t,pageSize:5,urlLabel:r,pageUrl:i})}),Re),Ve=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(0,s.useTranslation)().t,i="${openmrsSpaBase}/patient/".concat(t,"/chart"),r=a("goToSummary","Go to Summary");return o().createElement(ie,{patientUuid:t,pageSize:10,urlLabel:r,pageUrl:i})}),Re),He=(0,i.getSyncLifecycle)((function(e){var t,a,n,c,_,u,d=e.patientUuid,h=(0,s.useTranslation)().t,g=(0,i.useConfig)(),b=(0,v.l4)(),f=b.data,C=b.conceptMetadata,y=(0,v.VK)(d,"both"),w=y.data,E=y.isLoading,B=y.isValidating,D=null==w?void 0:w[0],S=(_=(0,l.useState)(!1),u=2,function(e){if(Array.isArray(e))return e}(_)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,r,n=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return n}}(_,u)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?he(e,t):void 0}}(_,u)||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.")}()),k=S[0],O=S[1],U=(0,r.useVisitOrOfflineVisit)(d).currentVisit,F=(0,i.useWorkspaces)().workspaces,j=(0,l.useCallback)((function(){return Boolean(null==F?void 0:F.length)}),[F]),P=(0,l.useCallback)((function(e){e.stopPropagation(),p(U,g)}),[g,U]);if(E)return o().createElement(A.lSo,{role:"progressbar",className:ve.loading,description:"".concat(h("loading","Loading")," ...")});if(D&&(null===(t=Object.keys(D))||void 0===t?void 0:t.length)&&(null==C?void 0:C.length)){var x,T,N,I,R,L,z,Z,M,V,H,q,W,Y,Q,J,K=Boolean(null==U?void 0:U.uuid),X=Boolean(ne()(null==D?void 0:D.date).isToday()),$=K&&!X;return o().createElement("div",{className:ve.background},o().createElement("div",{className:ve["vitals-header"],role:"button",tabIndex:0,onClick:function(){return O(!k)}},o().createElement("span",{className:ve.container},o().createElement("span",{className:ve.heading},h("vitalsAndBiometrics","Vitals and biometrics")),o().createElement("span",{className:ve["body-text"]},(0,i.formatDate)((0,i.parseDate)(null==D?void 0:D.date),{day:!0,time:!0})),$?o().createElement("div",{className:ve.tag},o().createElement(A.Vp9,{type:"red"},o().createElement("span",{className:ve.overdueIndicator},o().createElement(se.qp,null),h("overdue","Overdue")))):null,o().createElement(i.ConfigurableLink,{className:ve.link,to:"${openmrsSpaBase}/patient/".concat(d,"/chart/Vitals & Biometrics")},h("vitalsHistory","Vitals history"))),B?o().createElement("div",{className:ve.backgroundDataFetchingIndicator},o().createElement("span",null,B?o().createElement(A.lSo,null):null)):null,o().createElement("div",{className:ve["button-container"]},o().createElement(A.zxk,{className:G()(ve["record-vitals"],ve["arrow-up-icon"]),kind:"ghost",size:"sm",onClick:P},h("recordVitals","Record vitals"),o().createElement(m.ol,{size:16,className:ve["arrow-up-button"],title:"ArrowRight"})))),o().createElement("div",{className:G()(ve["row-container"],(a={},n=ve["workspace-open"],c=j(),n in a?Object.defineProperty(a,n,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[n]=c,a))},o().createElement("div",{className:ve.row},o().createElement(de,{interpretation:(0,v.WK)(null==D?void 0:D.systolic,null==D?void 0:D.diastolic,null==g?void 0:g.concepts,C),unitName:h("bp","BP"),unitSymbol:null!==(x=(null==D?void 0:D.systolic)&&f.get(g.concepts.systolicBloodPressureUuid))&&void 0!==x?x:"",value:"".concat(null!==(T=null==D?void 0:D.systolic)&&void 0!==T?T:"--"," / ").concat(null!==(N=null==D?void 0:D.diastolic)&&void 0!==N?N:"--")}),o().createElement(de,{interpretation:(0,v.wA)(null==D?void 0:D.pulse,(0,v.tQ)(g.concepts.pulseUuid,C)),unitName:h("heartRate","Heart rate"),unitSymbol:null!==(I=(null==D?void 0:D.pulse)&&f.get(g.concepts.pulseUuid))&&void 0!==I?I:"",value:null!==(R=null==D?void 0:D.pulse)&&void 0!==R?R:"--"}),o().createElement(de,{interpretation:(0,v.wA)(null==D?void 0:D.respiratoryRate,(0,v.tQ)(g.concepts.respiratoryRateUuid,C)),unitName:h("respiratoryRate","R. rate"),unitSymbol:null!==(L=(null==D?void 0:D.respiratoryRate)&&f.get(g.concepts.respiratoryRateUuid))&&void 0!==L?L:"",value:null!==(z=null==D?void 0:D.respiratoryRate)&&void 0!==z?z:"--"}),o().createElement(de,{interpretation:(0,v.wA)(null==D?void 0:D.spo2,(0,v.tQ)(g.concepts.oxygenSaturationUuid,C)),unitName:h("spo2","SpO2"),unitSymbol:null!==(Z=(null==D?void 0:D.spo2)&&f.get(g.concepts.oxygenSaturationUuid))&&void 0!==Z?Z:"",value:null!==(M=null==D?void 0:D.spo2)&&void 0!==M?M:"--"}),o().createElement(de,{interpretation:(0,v.wA)(D.temperature,(0,v.tQ)(g.concepts.temperatureUuid,C)),unitName:h("temperatureAbbreviated","Temp"),unitSymbol:null!==(V=(null==D?void 0:D.temperature)&&f.get(g.concepts.temperatureUuid))&&void 0!==V?V:"",value:null!==(H=null==D?void 0:D.temperature)&&void 0!==H?H:"--"}),o().createElement(de,{unitName:h("weight","Weight"),unitSymbol:null!==(q=(null==D?void 0:D.weight)&&f.get(g.concepts.weightUuid))&&void 0!==q?q:"",value:null!==(W=null==D?void 0:D.weight)&&void 0!==W?W:"--"}),o().createElement(de,{unitName:h("height","Height"),unitSymbol:null!==(Y=(null==D?void 0:D.height)&&f.get(g.concepts.heightUuid))&&void 0!==Y?Y:"",value:null!==(Q=null==D?void 0:D.height)&&void 0!==Q?Q:"--"}),o().createElement(de,{unitName:h("bmi","BMI"),unitSymbol:(null==D?void 0:D.bmi)&&g.biometrics.bmiUnit,value:null!==(J=null==D?void 0:D.bmi)&&void 0!==J?J:"--"}))))}return o().createElement("div",{className:ve["vitals-header"]},o().createElement("span",{className:ve.container},o().createElement("span",{className:ve.heading},h("vitalsAndBiometrics","Vitals and biometrics")),o().createElement("span",{className:ve["body-text"]},h("noDataRecorded","No data has been recorded for this patient"))),o().createElement("div",{className:ve.container},o().createElement(A.zxk,{className:G()(ve["record-vitals"],ve["arrow-up-icon"]),onClick:P,kind:"ghost",size:"sm"},h("recordVitals","Record vitals"),o().createElement(m.ol,{size:16,className:ve["arrow-up-button"],title:"ArrowRight"}))))}),Re),qe=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(e.basePath,(0,s.useTranslation)().t),i="${openmrsSpaBase}/patient/".concat(t,"/chart/Vitals & Biometrics"),r=a("seeAll","See all");return o().createElement(Te,{patientUuid:t,pageSize:5,urlLabel:r,pageUrl:i})}),Re),We=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(0,s.useTranslation)().t,i="${openmrsSpaBase}/patient/".concat(t,"/chart"),r=a("goToSummary","Go to Summary");return o().createElement(Te,{patientUuid:t,pageSize:10,urlLabel:r,pageUrl:i})}),Re),Ye=(0,i.getSyncLifecycle)((0,r.createDashboardLink)((Ge=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},i=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),i.forEach((function(t){Ne(e,t,a[t])}))}return e}({},{slot:"patient-chart-vitals-biometrics-dashboard-slot",columns:1,path:"Vitals & Biometrics",title:"Vitals & Biometrics"}),Ze=null!=(Ze={moduleName:Ie})?Ze:{},Object.getOwnPropertyDescriptors?Object.defineProperties(Ge,Object.getOwnPropertyDescriptors(Ze)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a.push.apply(a,i)}return a}(Object(Ze)).forEach((function(e){Object.defineProperty(Ge,e,Object.getOwnPropertyDescriptor(Ze,e))})),Ge)),Re),Qe=(0,i.getAsyncLifecycle)((function(){return a.e(525).then(a.bind(a,3525))}),Re),Je=(0,i.getAsyncLifecycle)((function(){return Promise.all([a.e(729),a.e(934)]).then(a.bind(a,1934))}),Re)},3979:(e,t,a)=>{var i={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807],"./zh.json":[8271,271],"./zh_CN.json":[1644,644]};function r(e){if(!a.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return a.e(t[1]).then((()=>a(r)))}r.keys=()=>Object.keys(i),r.id=3979,e.exports=r}}]);
|