@openmrs/esm-patient-vitals-app
Version:
Patient vitals microfrontend for the OpenMRS SPA
1 lines • 108 kB
JavaScript
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[5415],{51771:(e,n,t)=>{t.d(n,{A:()=>r});var a=t(30977),i=t.n(a),o=t(95924),l=t.n(o)()(i());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) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-vitals__vitals-biometrics-form__productiveHeading03___yqMgj,.-esm-patient-vitals__vitals-biometrics-form__title___8Mi2I{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)}.-esm-patient-vitals__vitals-biometrics-form__title___8Mi2I{margin:0 .5rem .5rem 0}.-esm-patient-vitals__vitals-biometrics-form__danger___dTfPs{color:#da1e28}.-esm-patient-vitals__vitals-biometrics-form__button___bbh1u{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-patient-vitals__vitals-biometrics-form__tablet___pL3A8{margin:.5rem 0;padding:1.5rem 1rem;background-color:#fff}.-esm-patient-vitals__vitals-biometrics-form__desktop___w3eIh{padding:0}.-esm-patient-vitals__vitals-biometrics-form__form___WuYae{display:flex;flex-direction:column;justify-content:space-between;height:100%}.omrs-breakpoint-lt-desktop .-esm-patient-vitals__vitals-biometrics-form__form___WuYae{background-color:#ededed}.omrs-breakpoint-gt-tablet .-esm-patient-vitals__vitals-biometrics-form__form___WuYae{background-color:#fff}.-esm-patient-vitals__vitals-biometrics-form__grid___pCnFw{margin:1rem;flex:1}.-esm-patient-vitals__vitals-biometrics-form__row___A1HYJ{margin:.5rem 0 0;display:flex;flex-flow:row wrap;gap:1rem .75rem}.-esm-patient-vitals__vitals-biometrics-form__spacer___VDuA2{margin-top:1rem}.-esm-patient-vitals__vitals-biometrics-form__noteInput___H39Wr{width:100%}.-esm-patient-vitals__vitals-biometrics-form__errorNotification___MBPx1{margin:.5rem 0}.-esm-patient-vitals__vitals-biometrics-form__errorContainer___dSLBv{margin:1rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/vitals-biometrics-form/vitals-biometrics-form.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,sIC81BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CD11BJ,4DAEE,sBAAA,CAGF,6DACE,aDQO,CCLT,6DACE,WEsCW,CFrCX,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAGF,6DACE,cAAA,CACA,mBAAA,CACA,qBDzBM,CC4BR,8DACE,SAAA,CAGF,2DACE,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,WAAA,CAGF,uFACE,wBAAA,CAGF,sFACE,qBD5CM,CC+CR,2DACE,WEpBW,CFqBX,MAAA,CAGF,0DACE,gBAAA,CACA,YAAA,CACA,kBAAA,CACA,eAAA,CAGF,6DACE,eEhCW,CFmCb,gEACE,UAAA,CAGF,wEACE,cAAA,CAGF,qEACE,WE5CW",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.productiveHeading03 {\n @include type.type-style('heading-03');\n}\n\n.title {\n @extend .productiveHeading03;\n margin: 0 layout.$spacing-03 layout.$spacing-03 0;\n}\n\n.danger {\n color: $danger;\n}\n\n.button {\n height: layout.$spacing-10;\n display: flex;\n align-content: flex-start;\n align-items: baseline;\n min-width: 50%;\n}\n\n.tablet {\n margin: layout.$spacing-03 0;\n padding: layout.$spacing-06 layout.$spacing-05;\n background-color: $ui-02;\n}\n\n.desktop {\n padding: 0;\n}\n\n.form {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .form {\n background-color: #ededed;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .form {\n background-color: $ui-02;\n}\n\n.grid {\n margin: layout.$spacing-05;\n flex: 1;\n}\n\n.row {\n margin: layout.$spacing-03 0 0;\n display: flex;\n flex-flow: row wrap;\n gap: layout.$spacing-05 layout.$spacing-04;\n}\n\n.spacer {\n margin-top: layout.$spacing-05;\n}\n\n.noteInput {\n width: 100%;\n}\n\n.errorNotification {\n margin: layout.$spacing-03 0;\n}\n\n.errorContainer {\n margin: layout.$spacing-05;\n}\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),l.locals={productiveHeading03:"-esm-patient-vitals__vitals-biometrics-form__productiveHeading03___yqMgj",title:"-esm-patient-vitals__vitals-biometrics-form__title___8Mi2I",danger:"-esm-patient-vitals__vitals-biometrics-form__danger___dTfPs",button:"-esm-patient-vitals__vitals-biometrics-form__button___bbh1u",tablet:"-esm-patient-vitals__vitals-biometrics-form__tablet___pL3A8",desktop:"-esm-patient-vitals__vitals-biometrics-form__desktop___w3eIh",form:"-esm-patient-vitals__vitals-biometrics-form__form___WuYae",grid:"-esm-patient-vitals__vitals-biometrics-form__grid___pCnFw",row:"-esm-patient-vitals__vitals-biometrics-form__row___A1HYJ",spacer:"-esm-patient-vitals__vitals-biometrics-form__spacer___VDuA2",noteInput:"-esm-patient-vitals__vitals-biometrics-form__noteInput___H39Wr",errorNotification:"-esm-patient-vitals__vitals-biometrics-form__errorNotification___MBPx1",errorContainer:"-esm-patient-vitals__vitals-biometrics-form__errorContainer___dSLBv"};const r=l},75415:(e,n,t)=>{t.r(n),t.d(n,{default:()=>J});var a=t(1343),i=t.n(a),o=t(80824),l=t(72339),r=t(81160),s=t(20299),p=t(54440),c=t(36274),u=t(60986),d=t.n(u);function f(e,n,t){var a=null==e?void 0:e.find((function(e){return e.uuid===n}));return void 0===t||""===t||void 0===a||!d()(null==a?void 0:a.lowAbsolute)||!d()(null==a?void 0:a.hiAbsolute)||Number(t)>=Number(a.lowAbsolute)&&Number(t)<=Number(a.hiAbsolute)}var g=t(31806),m=t(85487),b=t(87684),h=t(46195),y=h.z.object({systolicBloodPressure:h.z.number(),diastolicBloodPressure:h.z.number(),respiratoryRate:h.z.number(),oxygenSaturation:h.z.number(),pulse:h.z.number(),temperature:h.z.number(),generalPatientNote:h.z.string(),weight:h.z.number(),height:h.z.number(),midUpperArmCircumference:h.z.number(),computedBodyMassIndex:h.z.number()}).partial().refine((function(e){return Object.values(e).some((function(e){return Boolean(e)}))}),{message:"Please fill at least one field",path:["oneFieldRequired"]}),$=t(53373),v=t.n($),_=t(74632),A=t(72591),w=t.n(A),x=t(1740),k=t.n(x),C=t(88128),z=t.n(C),E=t(30855),M=t.n(E),B=t(93051),I=t.n(B),N=t(73656),S=t.n(N),R=t(99995),F={};F.styleTagTransform=S(),F.setAttributes=M(),F.insert=z().bind(null,"head"),F.domAPI=k(),F.insertStyleElement=I(),w()(R.A,F);const U=R.A&&R.A.locals?R.A.locals:void 0;function D(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function V(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(n){V(e,n,t[n])}))}return e}function T(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],l=!0,r=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);l=!0);}catch(e){r=!0,i=e}finally{try{l||null==t.return||t.return()}finally{if(r)throw i}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return D(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?D(e,n):void 0}}(e,n)||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 W=function(e){var n,t,r=e.control,c=e.fieldProperties,u=e.fieldStyles,d=e.fieldWidth,f=e.interpretation,m=e.isValueWithinReferenceRange,b=void 0===m||m,h=e.label,y=e.muacColorCode,$=e.placeholder,A=e.readOnly,w=e.showErrorMessage,x=e.unitSymbol,k=e.useMuacColors,C=function(e){F(e)},z=(0,l.useTranslation)().t,E=(0,a.useId)(),M="tablet"===(0,p.useLayoutType)(),B=T((0,a.useState)(!1),2),I=B[0],N=B[1],S=T((0,a.useState)(!1),2),R=S[0],F=S[1],D=!R&&f&&["critically_low","critically_high","high","low"].includes(f),W=Boolean(w&&(!b||I)),q=W?U.invalidInput:"",O=v()(U.container,(V(n={},U.inputInTabletView,M),V(n,U.inputWithAbnormalValue,D),n)),G=v()(U.inputContainer,(V(t={},U["critical-value"],D),V(t,U.focused,R),V(t,U.readonly,A),V(t,y,k),V(t,q,!0),t));return i().createElement(i().Fragment,null,i().createElement("div",{className:O,style:{width:d}},i().createElement("section",{className:U.labelContainer},i().createElement("span",{className:U.label},h),Boolean(D)?i().createElement("span",{className:U[f.replace("_","-")],title:z("abnormalValue","Abnormal value")}):null,W?i().createElement("span",{className:U.invalidInputIcon},i().createElement(_.N5,null)):null),i().createElement("section",{className:G,style:P({},u)},i().createElement("div",{className:v()(V({},U.centered,!M||"mmHg"===x))},c.map((function(e){if("number"===e.type){var n=v()(U.numberInput,e.className);return i().createElement(a.Fragment,{key:e.id},i().createElement(p.ResponsiveWrapper,null,i().createElement(o.xI,{name:e.id,control:r,render:function(t){var a,o,l=t.field,r=l.onChange,p=l.ref,c=l.value;return i().createElement(s.Q7x,{allowEmpty:!0,className:n,defaultValue:"",disableWheel:!0,hideSteppers:!0,id:"".concat(E,"-").concat(e.id),max:null!==(a=e.max)&&void 0!==a?a:void 0,min:null!==(o=e.min)&&void 0!==o?o:void 0,name:e.name,onBlur:function(){return C(!1)},onChange:function(e,n){return function(e,n){N(!(Number(e)||""===e)),I||n(""===e?void 0:Number(e))}(n.value,r)},onFocus:function(){return C(!0)},placeholder:(0,g.$i)(e.name),readOnly:A,ref:p,style:P({},u),title:e.name,type:"number",value:c})}})),null==e?void 0:e.separator)}if("textarea"===e.type)return i().createElement(p.ResponsiveWrapper,{key:e.id},i().createElement(o.xI,{name:e.id,control:r,render:function(n){var t=n.field,a=t.onChange,o=t.ref,l=t.value;return i().createElement(s.fs1,{className:U.textarea,id:"".concat(E,"-").concat(e.id),labelText:"",maxCount:100,name:e.name,onBlur:function(){return C(!1)},onChange:a,onFocus:function(){return C(!0)},placeholder:$,ref:o,rows:2,style:P({},u),title:e.name,value:l})}}))}))),Boolean(x)&&i().createElement("p",{className:U.unitName},x))),W&&i().createElement(s.lRv,{className:U.invalidInputError},z("validationInputError","Value must be between {{min}} and {{max}}",{min:c[0].min,max:c[0].max})))};var q=t(51771),O={};O.styleTagTransform=S(),O.setAttributes=M(),O.insert=z().bind(null,"head"),O.domAPI=k(),O.insertStyleElement=I(),w()(q.A,O);const G=q.A&&q.A.locals?q.A.locals:void 0;function j(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function Z(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],l=!0,r=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);l=!0);}catch(e){r=!0,i=e}finally{try{l||null==t.return||t.return()}finally{if(r)throw i}}return o}}(e,n)||L(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,n){if(e){if("string"==typeof e)return j(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?j(e,n):void 0}}const J=function(e){var n,t,u,d,h,$,v,_,A,w,x,k,C,z,E,M,B,I,N,S,R,F=e.patientUuid,U=e.patient,D=e.editEncounterUuid,V=e.formContext,P=void 0===V?"creating":V,T=e.closeWorkspace,q=e.closeWorkspaceWithSavedChanges,O=e.promptBeforeClosing,j=(0,l.useTranslation)().t,L="tablet"===(0,p.useLayoutType)(),J=(0,p.useConfig)(),Y=J.biometrics,K=J.vitals.useMuacColors,Q=(0,p.useSession)(),X=(0,p.useVisit)(F).currentVisit,ee=(0,g.Nb)(),ne=ee.conceptUnits,te=ee.isLoading,ae=(0,b.M1)(F),ie=ae.conceptRanges,oe=ae.conceptRangeMap,le=(0,g.m)("editing"===P?D:null),re=le.getRefinedInitialValues,se=le.isLoading,pe=le.mutate,ce=le.vitalsAndBiometrics,ue=Z((0,a.useState)(!1),2),de=ue[0],fe=ue[1],ge=Z((0,a.useState)(""),2),me=ge[0],be=ge[1],he=Z((0,a.useState)(!1),2),ye=he[0],$e=he[1],ve=Z((0,a.useState)(!1),2),_e=ve[0],Ae=ve[1],we=(0,p.useAbortController)(),xe=(0,c.useOptimisticVisitMutations)(F).invalidateVisitRelatedData,ke=(0,a.useMemo)((function(){return"creating"!==P&&se}),[P,se]),Ce=(0,o.mN)({mode:"all",resolver:(0,r.u)(y)}),ze=Ce.control,Ee=Ce.handleSubmit,Me=Ce.watch,Be=Ce.setValue,Ie=Ce.formState,Ne=Ie.isDirty,Se=Ie.isSubmitting,Re=Ie.dirtyFields,Fe=Ce.reset;(0,a.useEffect)((function(){"editing"===P&&!ke&&ce&&Fe(re())}),[P,ke,ce,re,Fe]),(0,a.useEffect)((function(){return O((function(){return Ne}))}),[Ne,O]);var Ue=null==X||null===(t=X.encounters)||void 0===t||null===(n=t.find((function(e){var n;return(null==e||null===(n=e.form)||void 0===n?void 0:n.uuid)===J.vitals.formUuid})))||void 0===n?void 0:n.uuid,De=Me("midUpperArmCircumference"),Ve=Me("systolicBloodPressure"),Pe=Me("diastolicBloodPressure"),Te=Me("respiratoryRate"),We=Me("oxygenSaturation"),qe=Me("temperature"),Oe=Me("pulse"),Ge=Me("weight"),je=Me("height");(0,a.useEffect)((function(){var e,n=null==U?void 0:U.birthDate;n&&De&&function(e,n,t){switch(!0){case e<=5&&n<=11.5&&n>0:t("red");break;case e<5&&n>11.5&&n<12.5:t("yellow");break;case e<5&&n>12.5:t("green");break;case e>5&&e<10&&n<=13.5&&n>0:t("red");break;case e>5&&e<10&&n>13.5&&n<14.5:t("yellow");break;case e>5&&e<10&&n>14.5:t("green");break;case e>10&&e<18&&n<=16.5&&n>0:t("red");break;case e>10&&e<18&&n>16.5&&n<19:t("yellow");break;case e>10&&e<18&&n>19:t("green");break;case e>18&&n<=19.5&&n>0:t("red");break;case e>18&&n>19&&n<22:t("yellow");break;case e>18&&n>22:t("green")}}((e=(0,p.age)(n).match(/\d+/g))?parseInt(e[0],10):null,De,be)}),[Me,null==U?void 0:U.birthDate,De]),(0,a.useEffect)((function(){if(je&&Ge){var e=function(e,n,t,a){if(e&&n)return e>0&&n>0?("lb"!==t&&"lbs"!==t||(e*=.45359237),"g"===t&&(e/=1e3),"cm"===a&&(n/=100),"in"===a&&(n*=.0254),Number((e/Math.pow(n,2)).toFixed(1))):void 0}(Ge,je,ne.get(J.concepts.weightUuid),ne.get(J.concepts.heightUuid));Be("computedBodyMassIndex",e)}}),[Ge,je,Be,ne,J.concepts.weightUuid,J.concepts.heightUuid]);var Ze,He,Le,Je,Ye,Ke,Qe,Xe,en,nn=(0,a.useMemo)((function(){return{midUpperArmCircumferenceRange:oe.get(J.concepts.midUpperArmCircumferenceUuid),diastolicBloodPressureRange:oe.get(J.concepts.diastolicBloodPressureUuid),systolicBloodPressureRange:oe.get(J.concepts.systolicBloodPressureUuid),oxygenSaturationRange:oe.get(J.concepts.oxygenSaturationUuid),respiratoryRateRange:oe.get(J.concepts.respiratoryRateUuid),temperatureRange:oe.get(J.concepts.temperatureUuid),weightRange:oe.get(J.concepts.weightUuid),heightRange:oe.get(J.concepts.heightUuid),pulseRange:oe.get(J.concepts.pulseUuid)}}),[oe,J.concepts]),tn=(0,a.useCallback)((function(e){var n=e;Ae(!0),$e(!1),(null==e?void 0:e.computedBodyMassIndex)&&delete e.computedBodyMassIndex;var t=Object.entries(n).filter((function(e){var n=Z(e,2)[1];return Boolean(n)})).every((function(e){var n=Z(e,2),t=n[0],a=n[1];return f(ie,J.concepts["".concat(t,"Uuid")],a)}));if(t){var a;Ae(!1);var i=(0,m.z3)(n,Re,P,ce,J.concepts),o=i.newObs,l=i.toBeVoided;(0,g._E)(F,J.vitals.encounterTypeUuid,D,null==Q||null===(a=Q.sessionLocation)||void 0===a?void 0:a.uuid,H(o).concat(H(l)),we).then((function(){pe&&pe(),xe({observations:!0,encounters:!0}),(0,g.vt)(),q(),(0,p.showSnackbar)({isLowContrast:!0,kind:"success",title:"creating"===P?j("vitalsAndBiometricsSaved","Vitals and Biometrics saved"):j("vitalsAndBiometricsUpdated","Vitals and Biometrics updated"),subtitle:j("vitalsAndBiometricsNowAvailable","They are now visible on the Vitals and Biometrics page")})})).catch((function(){(0,p.showSnackbar)({title:"creating"===P?j("vitalsAndBiometricsSaveError","Error saving Vitals and Biometrics"):j("vitalsAndBiometricsUpdateError","Error updating Vitals and Biometrics"),kind:"error",isLowContrast:!1,subtitle:j("checkForValidity","Some of the values entered are invalid")})}))}else fe(!0)}),[we,q,J.concepts,J.vitals.encounterTypeUuid,Re,D,ie,P,ce,pe,xe,F,null==Q||null===(u=Q.sessionLocation)||void 0===u?void 0:u.uuid,j]);return J.vitals.useFormEngine?i().createElement(p.ExtensionSlot,{name:"form-widget-slot",state:{view:"form",formUuid:J.vitals.formUuid,visitUuid:null==X?void 0:X.uuid,visitTypeUuid:null==X||null===(Ze=X.visitType)||void 0===Ze?void 0:Ze.uuid,patientUuid:null!=F?F:null,patient:U,encounterUuid:Ue,closeWorkspaceWithSavedChanges:q}}):te||ke?i().createElement(s.lVW,{className:G.form},i().createElement(p.ExtensionSlot,{name:"visit-context-header-slot",state:{patientUuid:F}}),i().createElement("div",{className:G.grid},i().createElement(s.BJc,null,i().createElement(s.VPZ,null,i().createElement("p",{className:G.title},j("recordVitals","Record vitals"))),i().createElement(s.fI1,{className:G.row},i().createElement(s.VPZ,null,i().createElement(s.Rzj,null)),i().createElement(s.VPZ,null,i().createElement(s.Rzj,null)),i().createElement(s.VPZ,null,i().createElement(s.Rzj,null)),i().createElement(s.VPZ,null,i().createElement(s.Rzj,null))))),i().createElement(s.Te$,{className:L?G.tablet:G.desktop},i().createElement(s.k_N,{className:G.button}),i().createElement(s.k_N,{className:G.button}))):i().createElement(s.lVW,{className:G.form,"data-openmrs-role":"Vitals and Biometrics Form"},i().createElement(p.ExtensionSlot,{name:"visit-context-header-slot",state:{patientUuid:F}}),i().createElement("div",{className:G.grid},i().createElement(s.BJc,null,i().createElement(s.VPZ,null,i().createElement("p",{className:G.title},j("recordVitals","Record vitals"))),i().createElement(s.fI1,{className:G.row},i().createElement(s.VPZ,null,i().createElement(W,{control:ze,fieldProperties:[{id:"temperature",max:null===(d=nn.temperatureRange)||void 0===d?void 0:d.hiAbsolute,min:null===(h=nn.temperatureRange)||void 0===h?void 0:h.lowAbsolute,name:j("temperature","Temperature"),type:"number"}],interpretation:qe&&(0,g.EF)(qe,(0,g.be)(J.concepts.temperatureUuid,ie)),isValueWithinReferenceRange:!qe||f(ie,J.concepts.temperatureUuid,qe),showErrorMessage:_e,label:j("temperature","Temperature"),unitSymbol:null!==(He=ne.get(J.concepts.temperatureUuid))&&void 0!==He?He:""})),i().createElement(s.VPZ,null,i().createElement(W,{control:ze,fieldProperties:[{name:j("systolic","systolic"),separator:"/",type:"number",min:null===($=nn.systolicBloodPressureRange)||void 0===$?void 0:$.lowAbsolute,max:null===(v=nn.systolicBloodPressureRange)||void 0===v?void 0:v.hiAbsolute,id:"systolicBloodPressure"},{name:j("diastolic","diastolic"),type:"number",min:null===(_=nn.diastolicBloodPressureRange)||void 0===_?void 0:_.lowAbsolute,max:null===(A=nn.diastolicBloodPressureRange)||void 0===A?void 0:A.hiAbsolute,id:"diastolicBloodPressure"}],interpretation:Ve&&Pe&&(0,g.Z_)(Ve,Pe,J.concepts,ie),isValueWithinReferenceRange:Ve&&Pe&&f(ie,J.concepts.systolicBloodPressureUuid,Ve)&&f(ie,J.concepts.diastolicBloodPressureUuid,Pe),showErrorMessage:_e,label:j("bloodPressure","Blood pressure"),unitSymbol:null!==(Le=ne.get(J.concepts.systolicBloodPressureUuid))&&void 0!==Le?Le:""})),i().createElement(s.VPZ,null,i().createElement(W,{control:ze,fieldProperties:[{name:j("pulse","Pulse"),type:"number",min:null===(w=nn.pulseRange)||void 0===w?void 0:w.lowAbsolute,max:null===(x=nn.pulseRange)||void 0===x?void 0:x.hiAbsolute,id:"pulse"}],interpretation:Oe&&(0,g.EF)(Oe,(0,g.be)(J.concepts.pulseUuid,ie)),isValueWithinReferenceRange:Oe&&f(ie,J.concepts.pulseUuid,Oe),label:j("heartRate","Heart rate"),showErrorMessage:_e,unitSymbol:null!==(Je=ne.get(J.concepts.pulseUuid))&&void 0!==Je?Je:""})),i().createElement(s.VPZ,null,i().createElement(W,{control:ze,fieldProperties:[{name:j("respirationRate","Respiration rate"),type:"number",min:null===(k=nn.respiratoryRateRange)||void 0===k?void 0:k.lowAbsolute,max:null===(C=nn.respiratoryRateRange)||void 0===C?void 0:C.hiAbsolute,id:"respiratoryRate"}],interpretation:Te&&(0,g.EF)(Te,(0,g.be)(J.concepts.respiratoryRateUuid,ie)),isValueWithinReferenceRange:Te&&f(ie,J.concepts.respiratoryRateUuid,Te),showErrorMessage:_e,label:j("respirationRate","Respiration rate"),unitSymbol:null!==(Ye=ne.get(J.concepts.respiratoryRateUuid))&&void 0!==Ye?Ye:""})),i().createElement(s.VPZ,null,i().createElement(W,{control:ze,fieldProperties:[{name:j("oxygenSaturation","Oxygen saturation"),type:"number",min:null===(z=nn.oxygenSaturationRange)||void 0===z?void 0:z.lowAbsolute,max:null===(E=nn.oxygenSaturationRange)||void 0===E?void 0:E.hiAbsolute,id:"oxygenSaturation"}],interpretation:We&&(0,g.EF)(We,(0,g.be)(J.concepts.oxygenSaturationUuid,ie)),isValueWithinReferenceRange:We&&f(ie,J.concepts.oxygenSaturationUuid,We),showErrorMessage:_e,label:j("spo2","SpO2"),unitSymbol:null!==(Ke=ne.get(J.concepts.oxygenSaturationUuid))&&void 0!==Ke?Ke:""}))),i().createElement(s.fI1,{className:G.row},i().createElement(s.VPZ,{className:G.noteInput},i().createElement(W,{control:ze,fieldWidth:L?"70%":"100%",fieldProperties:[{name:j("notes","N