@kenyaemr/esm-ward-app 8.1.1-pre.123 → 8.1.1-pre.124

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.
Files changed (54) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/dist/124.js +1 -1
  3. package/dist/124.js.map +1 -1
  4. package/dist/125.js +1 -1
  5. package/dist/125.js.map +1 -1
  6. package/dist/130.js +1 -1
  7. package/dist/130.js.map +1 -1
  8. package/dist/153.js +1 -1
  9. package/dist/153.js.map +1 -1
  10. package/dist/303.js +2 -0
  11. package/dist/303.js.map +1 -0
  12. package/dist/471.js +1 -1
  13. package/dist/471.js.map +1 -1
  14. package/dist/53.js +1 -1
  15. package/dist/53.js.map +1 -1
  16. package/dist/574.js +1 -1
  17. package/dist/577.js +1 -1
  18. package/dist/577.js.map +1 -1
  19. package/dist/662.js +1 -1
  20. package/dist/662.js.map +1 -1
  21. package/dist/921.js +1 -1
  22. package/dist/921.js.map +1 -1
  23. package/dist/922.js +1 -1
  24. package/dist/922.js.map +1 -1
  25. package/dist/kenyaemr-esm-ward-app.js +1 -1
  26. package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +60 -60
  27. package/dist/kenyaemr-esm-ward-app.js.map +1 -1
  28. package/dist/main.js +1 -1
  29. package/dist/main.js.map +1 -1
  30. package/dist/routes.json +1 -1
  31. package/package.json +1 -1
  32. package/src/beds/ward-bed.test.tsx +16 -5
  33. package/src/hooks/useWardPatientGrouping.ts +5 -0
  34. package/src/ward-view/materal-ward/maternal-ward-patient-card.test.tsx +11 -0
  35. package/src/ward-view/ward-view.scss +1 -1
  36. package/src/ward-view/ward-view.test.tsx +8 -0
  37. package/src/ward-view-header/ward-metric.scss +5 -5
  38. package/src/ward-view-header/ward-metrics.scss +1 -2
  39. package/src/ward-workspace/admission-request-card/admission-request-card-actions.component.tsx +59 -6
  40. package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.test.tsx +45 -1
  41. package/src/ward-workspace/admission-request-workspace/admission-requests.workspace.tsx +26 -5
  42. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.test.tsx +30 -94
  43. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx +101 -189
  44. package/src/ward-workspace/bed-selector.component.tsx +119 -0
  45. package/src/ward-workspace/bed-selector.scss +15 -0
  46. package/src/ward-workspace/patient-discharge/patient-discharge.workspace.tsx +4 -11
  47. package/src/ward-workspace/patient-transfer-bed-swap/patient-bed-swap-form.component.tsx +56 -77
  48. package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-request-form.component.tsx +3 -10
  49. package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-swap.workspace.tsx +10 -6
  50. package/src/ward.resource.ts +32 -2
  51. package/translations/en.json +6 -5
  52. package/dist/67.js +0 -2
  53. package/dist/67.js.map +0 -1
  54. /package/dist/{67.js.LICENSE.txt → 303.js.LICENSE.txt} +0 -0
package/dist/662.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([[662],{1217:(e,n,t)=>{t.d(n,{Z:()=>s});var a=t(5698),i=t.n(a),o=t(9613),r=t.n(o)()(i());r.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-ward__admit-patient-form__form___VclKa{display:flex;height:100%;justify-content:space-between;flex-direction:column}.-esm-ward__admit-patient-form__formContent___hgH4x{padding:1rem}.-esm-ward__admit-patient-form__formError___O1o8s{margin:-1rem -1rem 1rem -1rem}.-esm-ward__admit-patient-form__buttonSet___16JkQ button{max-width:unset !important;width:50% !important}.-esm-ward__admit-patient-form__bedSelectionDropdown___uHzhe{margin-top:.5rem}.-esm-ward__admit-patient-form__errorNotifications___RzKmK{margin-top:1rem}.-esm-ward__admit-patient-form__productiveHeading02___rlwO6{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)}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.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,oGAAA,CACA,2GAAA,CCvDF,6CACE,YAAA,CACA,WAAA,CACA,6BAAA,CACA,qBAAA,CAGF,oDACE,YCmBW,CDhBb,kDACE,6BAAA,CAGF,yDACE,0BAAA,CACA,oBAAA,CAGF,6DACE,gBCJW,CDOb,2DACE,eCEW,CDCb,4DEk0BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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/type';\n@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.form {\n display: flex;\n height: 100%;\n justify-content: space-between;\n flex-direction: column;\n}\n\n.formContent {\n padding: layout.$spacing-05;\n}\n\n.formError {\n margin: (-(layout.$spacing-05)) (-(layout.$spacing-05)) layout.$spacing-05 (-(layout.$spacing-05));\n}\n\n.buttonSet button {\n max-width: unset !important;\n width: 50% !important;\n}\n\n.bedSelectionDropdown {\n margin-top: layout.$spacing-03;\n}\n\n.errorNotifications {\n margin-top: layout.$spacing-05;\n}\n\n.productiveHeading02 {\n @include type.type-style('heading-compact-02');\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","//\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"],sourceRoot:""}]),r.locals={form:"-esm-ward__admit-patient-form__form___VclKa",formContent:"-esm-ward__admit-patient-form__formContent___hgH4x",formError:"-esm-ward__admit-patient-form__formError___O1o8s",buttonSet:"-esm-ward__admit-patient-form__buttonSet___16JkQ",bedSelectionDropdown:"-esm-ward__admit-patient-form__bedSelectionDropdown___uHzhe",errorNotifications:"-esm-ward__admit-patient-form__errorNotifications___RzKmK",productiveHeading02:"-esm-ward__admit-patient-form__productiveHeading02___rlwO6"};const s=r},8559:(e,n,t)=>{t.d(n,{Z:()=>l});var a=t(2870),i=t(5206),o=t(5907),r=t.n(o),s="custom:".concat([["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"]].map((function(e){return e.join(":")})).join(","));function l(){var e=r()("".concat(a.restBaseUrl,"/emrapi/configuration?v=").concat(s),a.openmrsFetch);return(0,i.useMemo)((function(){var n;return{emrConfiguration:null===(n=e.data)||void 0===n?void 0:n.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}}),[e])}},8662:(e,n,t)=>{t.r(n),t.d(n,{default:()=>I});var a=t(379),i=t(8883),o=t(2870),r=t(5206),s=t.n(r),l=t(3955),p=t(4924),c=t(195),u=t(8559),d=t(874),f=t(6352),g=t(6062),h=t.n(g),y=t(4036),m=t.n(y),b=t(6793),$=t.n(b),v=t(7892),w=t.n(v),k=t(1173),x=t.n(k),A=t(2464),z=t.n(A),_=t(1217),C={};C.styleTagTransform=z(),C.setAttributes=w(),C.insert=$().bind(null,"head"),C.domAPI=m(),C.insertStyleElement=x(),h()(_.Z,C);const M=_.Z&&_.Z.locals?_.Z.locals:void 0;var E=t(3649);function T(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 S(e,n,t,a,i,o,r){try{var s=e[o](r),l=s.value}catch(e){return void t(e)}s.done?n(l):Promise.resolve(l).then(a,i)}function N(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=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);r=!0);}catch(e){s=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(e,n)||D(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 D(e,n){if(e){if("string"==typeof e)return T(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)?T(e,n):void 0}}const I=function(e){var n,t,g,h,y,m,b,$,v,w,k,x,A=e.patient,z=e.dispositionType,_=e.closeWorkspace,C=e.closeWorkspaceWithSavedChanges,I=e.promptBeforeClosing,B=(0,p.useTranslation)().t,F=(0,d.Z)().location,P=(0,o.useSession)().currentProvider,L=N((0,r.useState)(!1),2),O=L[0],j=L[1],q=(0,u.Z)(),H=q.emrConfiguration,R=q.isLoadingEmrConfiguration,W=q.errorFetchingEmrConfiguration,U=N((0,r.useState)(!1),2),G=U[0],K=U[1],V=(null!==(m=(0,o.useAppContext)("ward-view-context"))&&void 0!==m?m:{}).wardPatientGroupDetails,Z=null!==(b=null===(n=V)||void 0===n?void 0:n.admissionLocationResponse)&&void 0!==b?b:{},X=Z.isLoading,J=Z.mutate,Q=(null!==($=null===(t=V)||void 0===t?void 0:t.inpatientRequestResponse)&&void 0!==$?$:{}).mutate,Y=(null!==(v=null===(g=V)||void 0===g?void 0:g.inpatientAdmissionResponse)&&void 0!==v?v:{}).mutate,ee=(w=A.uuid,k="".concat(o.restBaseUrl,"/beds?patientUuid=").concat(w),(0,E.ZP)(k,o.openmrsFetch)),ne=ee.data,te=ee.isLoading,ae=X?[]:null!==(x=null===(h=V)||void 0===h?void 0:h.bedLayouts)&&void 0!==x?x:[],ie=(0,o.useFeatureFlag)("bedmanagement-module"),oe=(0,r.useCallback)((function(e){var n,t=e.bedNumber,a=0===e.patients.length?[B("emptyText","Empty")]:e.patients.map((function(e){var n,t,a;return null===(a=e)||void 0===a||null===(t=a.person)||void 0===t||null===(n=t.preferredName)||void 0===n?void 0:n.display}));return[t].concat((n=a,function(e){if(Array.isArray(e))return T(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||D(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).join(" · ")}),[]),re=(0,r.useMemo)((function(){return c.z.object({bedId:c.z.number().optional()})}),[ie,ae]),se=(0,l.cI)({resolver:(0,i.F)(re)}),le=se.control,pe=se.formState,ce=pe.errors,ue=pe.isDirty,de=se.handleSubmit,fe=se.getValues;se.watch,(0,r.useEffect)((function(){I((function(){return ue}))}),[ue]);var ge=(0,r.useCallback)((function(e){var n,t;K(!1),j(!0);var a=ae.find((function(n){return n.bedId===e.bedId}));(0,f.VB)({patient:A.uuid,encounterType:"ADMIT"===z?H.admissionEncounterType.uuid:"TRANSFER"===z?H.transferWithinHospitalEncounterType.uuid:null,location:null===(n=F)||void 0===n?void 0:n.uuid,encounterProviders:[{provider:null===(t=P)||void 0===t?void 0:t.uuid,encounterRole:H.clinicianEncounterRole.uuid}],obs:[]}).then(function(){var n,t=(n=function(n){var t,i,o,r,s;return function(e,n){var t,a,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,a&&(i=2&o[0]?a.return:o[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;switch(a=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,a=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(6===o[0]&&r.label<i[1]){r.label=i[1],i=o;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(o);break}i[2]&&r.ops.pop(),r.trys.pop();continue}o=n.call(e,r)}catch(e){o=[6,e],a=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(l){return n.ok?a?[2,(0,f.Du)(e.bedId,A.uuid,n.data.uuid)]:(s=null===(r=ne)||void 0===r||null===(o=r.data)||void 0===o||null===(i=o.results)||void 0===i||null===(t=i[0])||void 0===t?void 0:t.bedId)?[2,(0,f.XH)(s,A.uuid)]:[2,n]:[2]}))},function(){var e=this,t=arguments;return new Promise((function(a,i){var o=n.apply(e,t);function r(e){S(o,a,i,r,s,"next",e)}function s(e){S(o,a,i,r,s,"throw",e)}r(void 0)}))});return function(e){return t.apply(this,arguments)}}(),(function(e){(0,o.showSnackbar)({kind:"error",title:B("errorCreatingEncounter","Failed to admit patient",{encounterType:"ADMIT"===z?H.admissionEncounterType.display:H.transferWithinHospitalEncounterType.display}),subtitle:e.message})})).then((function(e){var n,t;e&&(null===(n=e)||void 0===n?void 0:n.ok)&&(a?(0,o.showSnackbar)({kind:"success",title:B("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:B("patientAdmittedSuccessfullySubtitle","{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}",{patientName:A.person.preferredName.display,bedNumber:a.bedNumber})}):(0,o.showSnackbar)({kind:"success",title:B("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:B("patientAdmittedWoBed","Patient admitted successfully to {{location}}",{location:null===(t=F)||void 0===t?void 0:t.display})}))}),(function(){(0,o.showSnackbar)({kind:"warning",title:B("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:B("patientAdmittedButBedNotAssigned","Patient admitted successfully but fail to assign bed to patient")})})).finally((function(){j(!1),J(),Q(),Y(),C()}))}),[ae,A,H,F,C,z,P,J,Q,Y]),he=(0,r.useCallback)((function(e){K(!0),j(!1)}),[]);return V?s().createElement(a.l09,{control:le,className:M.form,onSubmit:de(ge,he)},s().createElement("div",{className:M.formContent},W&&s().createElement("div",{className:M.formError},s().createElement(a.K0D,{kind:"error",title:B("somePartsOfTheFormDidntLoad","Some parts of the form didn't load"),subtitle:B("fetchingEmrConfigurationFailed","Fetching EMR configuration failed. Try refreshing the page or contact your system administrator."),lowContrast:!0,hideCloseButton:!0})),s().createElement(a.X2j,null,s().createElement(a.sgG,null,s().createElement("h2",{className:M.productiveHeading02},B("selectABed","Select a bed")),s().createElement("div",{className:M.bedSelectionDropdown},ie?X?s().createElement(a.iTo,null):ae.length?s().createElement(l.Qr,{control:le,name:"bedId",render:function(e){var n,t=e.field.onChange,i=e.fieldState.error,o=ae.find((function(e){var n;return e.bedId===(null===(n=fe())||void 0===n?void 0:n.bedId)}));return s().createElement(a.Ltx,{id:"default",titleText:"",helperText:"",label:!o&&B("chooseAnOption","Choose an option"),items:ae,itemToString:oe,selectedItem:o,onChange:function(e){var n=e.selectedItem;return t(n.bedId)},invalid:!!i,invalidText:null===(n=i)||void 0===n?void 0:n.message})}}):s().createElement(a.K0D,{kind:"error",title:B("noBedsConfiguredForLocation","No beds configured for {{location}} location",{location:null===(y=F)||void 0===y?void 0:y.display}),lowContrast:!0,hideCloseButton:!0}):s().createElement(a.K0D,{kind:"info",title:B("unableToSelectBeds","Unable to select beds"),subtitle:B("bedManagementModuleNotInstalled","Bed management module is not present to allow bed selection"),lowContrast:!0,hideCloseButton:!0})))),s().createElement("div",{className:M.errorNotifications},G&&Object.entries(ce).map((function(e){var n=N(e,2),t=n[0],i=n[1];return s().createElement(a.X2j,{key:t},s().createElement(a.sgG,null,s().createElement(a.K0D,{kind:"error",subtitle:i.message,lowContrast:!0})))})))),s().createElement(a.uVA,{className:M.buttonSet},s().createElement(a.zxk,{size:"xl",kind:"secondary",onClick:function(){return _({ignoreChanges:!0})}},B("cancel","Cancel")),s().createElement(a.zxk,{type:"submit",size:"xl",disabled:O||R||W||X||te},O?B("admitting","Admitting..."):B("admit","Admit")))):s().createElement(s().Fragment,null)}},6352:(e,n,t)=>{t.d(n,{Du:()=>o,VB:()=>i,XH:()=>r});var a=t(2870);function i(e){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/encounter"),{method:"POST",headers:{"content-type":"application/json"},body:e})}function o(e,n,t){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds/").concat(e),{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:n,encounterUuid:t}})}function r(e,n){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds/").concat(e,"?patientUuid=").concat(n),{method:"DELETE"})}}}]);
1
+ "use strict";(globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([[662],{1217:(n,e,t)=>{t.d(e,{Z:()=>s});var a=t(5698),i=t.n(a),o=t(9613),r=t.n(o)()(i());r.push([n.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-ward__admit-patient-form__form___VclKa{display:flex;height:100%;justify-content:space-between;flex-direction:column}.-esm-ward__admit-patient-form__formContent___hgH4x{padding:1rem}.-esm-ward__admit-patient-form__formError___O1o8s{margin:-1rem -1rem 1rem -1rem}.-esm-ward__admit-patient-form__buttonSet___16JkQ button{max-width:unset !important;width:50% !important}.-esm-ward__admit-patient-form__bedSelectionDropdown___uHzhe{margin-top:.5rem}.-esm-ward__admit-patient-form__errorNotifications___RzKmK{margin-top:1rem}.-esm-ward__admit-patient-form__productiveHeading02___rlwO6{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)}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.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,oGAAA,CACA,2GAAA,CCvDF,6CACE,YAAA,CACA,WAAA,CACA,6BAAA,CACA,qBAAA,CAGF,oDACE,YCmBW,CDhBb,kDACE,6BAAA,CAGF,yDACE,0BAAA,CACA,oBAAA,CAGF,6DACE,gBCJW,CDOb,2DACE,eCEW,CDCb,4DEk0BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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/type';\n@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.form {\n display: flex;\n height: 100%;\n justify-content: space-between;\n flex-direction: column;\n}\n\n.formContent {\n padding: layout.$spacing-05;\n}\n\n.formError {\n margin: (-(layout.$spacing-05)) (-(layout.$spacing-05)) layout.$spacing-05 (-(layout.$spacing-05));\n}\n\n.buttonSet button {\n max-width: unset !important;\n width: 50% !important;\n}\n\n.bedSelectionDropdown {\n margin-top: layout.$spacing-03;\n}\n\n.errorNotifications {\n margin-top: layout.$spacing-05;\n}\n\n.productiveHeading02 {\n @include type.type-style('heading-compact-02');\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","//\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"],sourceRoot:""}]),r.locals={form:"-esm-ward__admit-patient-form__form___VclKa",formContent:"-esm-ward__admit-patient-form__formContent___hgH4x",formError:"-esm-ward__admit-patient-form__formError___O1o8s",buttonSet:"-esm-ward__admit-patient-form__buttonSet___16JkQ",bedSelectionDropdown:"-esm-ward__admit-patient-form__bedSelectionDropdown___uHzhe",errorNotifications:"-esm-ward__admit-patient-form__errorNotifications___RzKmK",productiveHeading02:"-esm-ward__admit-patient-form__productiveHeading02___rlwO6"};const s=r},6450:(n,e,t)=>{t.d(e,{Z:()=>s});var a=t(5698),i=t.n(a),o=t(9613),r=t.n(o)()(i());r.push([n.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-ward__bed-selector__radioButtonGroup___8Yn5Y{margin-top:.5rem}.-esm-ward__bed-selector__radioButtonGroup___8Yn5Y fieldset{flex-direction:column;align-items:flex-start}.-esm-ward__bed-selector__radioButtonGroup___8Yn5Y fieldset .cds--radio-button-wrapper{margin-bottom:.75rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/bed-selector.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,mDACE,gBCgBW,CDfX,4DACE,qBAAA,CACA,sBAAA,CAEA,uFACE,oBCeO",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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/type';\n@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.radioButtonGroup {\n margin-top: layout.$spacing-03;\n fieldset {\n flex-direction: column;\n align-items: flex-start;\n\n :global(.cds--radio-button-wrapper) {\n margin-bottom: layout.$spacing-04;\n }\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:""}]),r.locals={radioButtonGroup:"-esm-ward__bed-selector__radioButtonGroup___8Yn5Y"};const s=r},8559:(n,e,t)=>{t.d(e,{Z:()=>l});var a=t(2870),i=t(5206),o=t(5907),r=t.n(o),s="custom:".concat([["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"]].map((function(n){return n.join(":")})).join(","));function l(){var n=r()("".concat(a.restBaseUrl,"/emrapi/configuration?v=").concat(s),a.openmrsFetch);return(0,i.useMemo)((function(){var e;return{emrConfiguration:null===(e=n.data)||void 0===e?void 0:e.data,isLoadingEmrConfiguration:n.isLoading,mutateEmrConfiguration:n.mutate,errorFetchingEmrConfiguration:n.error}}),[n])}},8662:(n,e,t)=>{t.r(e),t.d(e,{default:()=>B});var a=t(3932),i=t(8883),o=t(2870),r=t(5206),s=t.n(r),l=t(3955),p=t(4924),c=t(195),d=t(3649),u=t(874),f=t(6352),g=t(9985),h=t(6062),y=t.n(h),m=t(4036),b=t.n(m),$=t(6793),v=t.n($),w=t(7892),k=t.n(w),A=t(1173),x=t.n(A),_=t(2464),C=t.n(_),z=t(1217),E={};E.styleTagTransform=C(),E.setAttributes=k(),E.insert=v().bind(null,"head"),E.domAPI=b(),E.insertStyleElement=x(),y()(z.Z,E);const M=z.Z&&z.Z.locals?z.Z.locals:void 0;function T(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function S(n,e,t,a,i,o,r){try{var s=n[o](r),l=s.value}catch(n){return void t(n)}s.done?e(l):Promise.resolve(l).then(a,i)}function N(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var a,i,o=[],r=!0,s=!1;try{for(t=t.call(n);!(r=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);r=!0);}catch(n){s=!0,i=n}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(n,e)||function(n,e){if(n){if("string"==typeof n)return T(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?T(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const B=function(n){var e,t,h,y,m,b,$,v=n.patient,w=n.dispositionType,k=n.closeWorkspace,A=n.closeWorkspaceWithSavedChanges,x=n.promptBeforeClosing,_=(0,p.useTranslation)().t,C=(0,u.Z)().location,z=N((0,r.useState)(!1),2),E=z[0],T=z[1],B=(0,f.CW)(),I=B.admitPatient,D=B.isLoadingEmrConfiguration,F=B.errorFetchingEmrConfiguration,P=N((0,r.useState)(!1),2),L=P[0],O=P[1],j=(null!==(h=(0,o.useAppContext)("ward-view-context"))&&void 0!==h?h:{}).wardPatientGroupDetails,G=(null!==(y=null===(e=j)||void 0===e?void 0:e.admissionLocationResponse)&&void 0!==y?y:{}).isLoading,q=(m=v.uuid,b="".concat(o.restBaseUrl,"/beds?patientUuid=").concat(m),(0,d.ZP)(b,o.openmrsFetch)),Z=q.data,W=q.isLoading,H=G?[]:null!==($=null===(t=j)||void 0===t?void 0:t.bedLayouts)&&void 0!==$?$:[],U=(0,r.useMemo)((function(){return c.z.object({bedId:c.z.number().optional()})}),[H]),R=(0,l.cI)({resolver:(0,i.F)(U)}),Y=R.control,K=R.formState,V=K.errors,X=K.isDirty,J=R.handleSubmit;(0,r.useEffect)((function(){x((function(){return X}))}),[X]);var Q=(0,r.useCallback)((function(n){O(!0),T(!1)}),[]);return j?s().createElement(a.l09,{control:Y,className:M.form,onSubmit:J((function(n){O(!1),T(!0);var e,t,a=H.find((function(e){return e.bedId===n.bedId}));I(v,w).then((e=function(e){var t,i,o,r,s;return function(n,e){var t,a,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,a&&(i=2&o[0]?a.return:o[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;switch(a=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,a=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(6===o[0]&&r.label<i[1]){r.label=i[1],i=o;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(o);break}i[2]&&r.ops.pop(),r.trys.pop();continue}o=e.call(n,r)}catch(n){o=[6,n],a=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(l){return e.ok?a?[2,(0,f.Du)(n.bedId,v.uuid,e.data.uuid)]:(s=null===(r=Z)||void 0===r||null===(o=r.data)||void 0===o||null===(i=o.results)||void 0===i||null===(t=i[0])||void 0===t?void 0:t.bedId)?[2,(0,f.XH)(s,v.uuid)]:[2,e]:[2]}))},t=function(){var n=this,t=arguments;return new Promise((function(a,i){var o=e.apply(n,t);function r(n){S(o,a,i,r,s,"next",n)}function s(n){S(o,a,i,r,s,"throw",n)}r(void 0)}))},function(n){return t.apply(this,arguments)}),(function(n){(0,o.showSnackbar)({kind:"error",title:_("errorCreatingEncounter","Failed to admit patient"),subtitle:n.message})})).then((function(n){var e,t;n&&(null===(e=n)||void 0===e?void 0:e.ok)&&(a?(0,o.showSnackbar)({kind:"success",title:_("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:_("patientAdmittedSuccessfullySubtitle","{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}",{patientName:v.person.preferredName.display,bedNumber:a.bedNumber})}):(0,o.showSnackbar)({kind:"success",title:_("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:_("patientAdmittedWoBed","Patient admitted successfully to {{location}}",{location:null===(t=C)||void 0===t?void 0:t.display})}))}),(function(){(0,o.showSnackbar)({kind:"warning",title:_("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:_("patientAdmittedButBedNotAssigned","Patient admitted successfully but fail to assign bed to patient")})})).finally((function(){var n,e;T(!1),null===(e=j)||void 0===e||null===(n=e.mutate)||void 0===n||n.call(e),A()}))}),Q)},s().createElement("div",{className:M.formContent},s().createElement(a.X2j,null,s().createElement(a.sgG,null,s().createElement("h2",{className:M.productiveHeading02},_("selectABed","Select a bed")),s().createElement("div",{className:M.bedSelectionDropdown},s().createElement(l.Qr,{control:Y,name:"bedId",render:function(n){var e=n.field,t=e.onChange,a=e.value,i=n.fieldState.error;return s().createElement(g.Z,{beds:H,isLoadingBeds:G,currentPatient:v,selectedBedId:a,error:i,control:Y,onChange:t})}})))),s().createElement("div",{className:M.errorNotifications},L&&Object.entries(V).map((function(n){var e=N(n,2),t=e[0],i=e[1];return s().createElement(a.X2j,{key:t},s().createElement(a.sgG,null,s().createElement(a.K0D,{kind:"error",subtitle:i.message,lowContrast:!0})))})))),s().createElement(a.uVA,{className:M.buttonSet},s().createElement(a.zxk,{size:"xl",kind:"secondary",onClick:function(){return k({ignoreChanges:!0})}},_("cancel","Cancel")),s().createElement(a.zxk,{type:"submit",size:"xl",disabled:E||D||F||G||W},E?_("admitting","Admitting..."):_("admit","Admit")))):s().createElement(s().Fragment,null)}},9985:(n,e,t)=>{t.d(e,{Z:()=>_});var a=t(3932),i=t(5206),o=t.n(i),r=t(4924),s=t(874),l=t(6062),p=t.n(l),c=t(4036),d=t.n(c),u=t(6793),f=t.n(u),g=t(7892),h=t.n(g),y=t(1173),m=t.n(y),b=t(2464),$=t.n(b),v=t(6450),w={};w.styleTagTransform=$(),w.setAttributes=h(),w.insert=f().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=m(),p()(v.Z,w);const k=v.Z&&v.Z.locals?v.Z.locals:void 0;function A(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function x(n){return function(n){if(Array.isArray(n))return A(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(n){if("string"==typeof n)return A(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(n,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const _=function(n){var e,t,i,l=n.selectedBedId,p=n.beds,c=n.isLoadingBeds,d=n.error,u=n.onChange,f=n.currentPatient,g=n.control,h=n.minBedCountToUseDropdown,y=void 0===h?16:h,m=(0,s.Z)().location,b=(0,r.useTranslation)().t,$=[{bedId:0,label:b("noBed","No bed"),disabled:!1}].concat(x(p.map((function(n){var e,t,a,i=n.patients.some((function(n){return n.uuid===f.uuid}));return{bedId:n.bedId,label:(e=n,t=e.bedNumber,a=0===e.patients.length?[b("emptyText","Empty")]:e.patients.map((function(n){var e,t,a;return null===(a=n)||void 0===a||null===(t=a.person)||void 0===t||null===(e=t.preferredName)||void 0===e?void 0:e.display})),[t].concat(x(a)).join(" · ")),disabled:i}})))),v=$.find((function(n){return n.bedId===l})),w=p.length>=y;return c?o().createElement(a.SYO,{className:k.radioButtonGroup,name:"bedId"},o().createElement(a.CMh,null),o().createElement(a.CMh,null),o().createElement(a.CMh,null)):p.length?w?o().createElement(a.Ltx,{id:"default",titleText:"",helperText:"",label:!v&&b("chooseAnOption","Choose an option"),items:$,itemToString:function(n){return n.label},selectedItem:v,onChange:function(n){var e=n.selectedItem;return u(e.bedId)},invalid:!!d,invalidText:null===(t=d)||void 0===t?void 0:t.message}):o().createElement(a.SYO,{name:"bedId",className:k.radioButtonGroup,onChange:u,invalid:!!d,invalidText:null===(i=d)||void 0===i?void 0:i.message},$.map((function(n){var e=n.bedId,t=n.label,i=n.disabled;return o().createElement(a.EUY,{key:e,labelText:t,control:g,value:e,checked:e===l,disabled:i})}))):o().createElement(a.K0D,{kind:"error",title:b("noBedsConfiguredForLocation","No beds configured for {{location}} location",{location:null===(e=m)||void 0===e?void 0:e.display}),lowContrast:!0,hideCloseButton:!0})}},6352:(n,e,t)=>{t.d(e,{CW:()=>s,Du:()=>l,VB:()=>r,XH:()=>p});var a=t(2870),i=t(8559),o=t(874);function r(n){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/encounter"),{method:"POST",headers:{"content-type":"application/json"},body:n})}function s(){var n=(0,o.Z)().location,e=(0,a.useSession)().currentProvider,t=(0,i.Z)(),s=t.emrConfiguration;return{admitPatient:function(t,a){var i,o;return r({patient:t.uuid,encounterType:"ADMIT"===a?s.admissionEncounterType.uuid:"TRANSFER"===a?s.transferWithinHospitalEncounterType.uuid:null,location:null===(i=n)||void 0===i?void 0:i.uuid,encounterProviders:[{provider:null===(o=e)||void 0===o?void 0:o.uuid,encounterRole:s.clinicianEncounterRole.uuid}],obs:[]})},isLoadingEmrConfiguration:t.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:t.errorFetchingEmrConfiguration}}function l(n,e,t){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds/").concat(n),{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:e,encounterUuid:t}})}function p(n,e){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds/").concat(n,"?patientUuid=").concat(e),{method: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,SAASkD,EAAgB0E,GAC9B,OAAOxJ,EAAAA,EAAAA,cAAwB,GAAe,OAAZD,EAAAA,YAAY,cAAa,CACzD0J,OAAQ,OACRC,QAAS,CACP,eAAgB,oBAElBC,KAAMH,GAEV,CAEO,SAAS5D,EAAmBgE,EAAiBxI,EAAqByI,GACvE,OAAO7J,EAAAA,EAAAA,cAAa,GAAuB4J,OAApB7J,EAAAA,YAAY,UAAgB,OAAR6J,GAAW,CACpDH,OAAQ,OACRC,QAAS,CACP,eAAgB,oBAElBC,KAAM,CACJvI,YAAAA,EACAyI,cAAAA,IAGN,CAEO,SAAS/D,EAAqBnC,EAAevC,GAClD,OAAOpB,EAAAA,EAAAA,cAAa,GAAuB2D,OAApB5D,EAAAA,YAAY,UAA6BqB,OAArBuC,EAAM,iBAA2B,OAAZvC,GAAe,CAC7EqI,OAAQ,UAEZ,C","sources":["webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.scss","webpack://@kenyaemr/esm-ward-app/./src/hooks/useEmrConfiguration.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.scss?3181","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx","webpack://@kenyaemr/esm-ward-app/./src/hooks/useAssignedBedByPatient.ts","webpack://@kenyaemr/esm-ward-app/./src/ward.resource.ts"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","customRep","map","prop","join","useEmrConfiguration","swrData","useSWRImmutable","restBaseUrl","openmrsFetch","useMemo","emrConfiguration","data","isLoadingEmrConfiguration","isLoading","mutateEmrConfiguration","mutate","errorFetchingEmrConfiguration","error","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","wardPatientGroupDetails","location","useAppContext","patientUuid","url","patient","dispositionType","closeWorkspace","closeWorkspaceWithSavedChanges","promptBeforeClosing","useTranslation","t","useWardLocation","useSession","currentProvider","useState","isSubmitting","setIsSubmitting","showErrorNotifications","setShowErrorNotifications","admissionLocationResponse","inpatientRequestResponse","inpatientAdmissionResponse","useAssignedBedByPatient","uuid","useSWR","beds","bedLayouts","isBedManagementModuleInstalled","useFeatureFlag","getBedRepresentation","useCallback","bedLayout","bedNumber","patients","length","person","preferredName","display","zodSchema","z","object","bedId","number","optional","useForm","resolver","zodResolver","control","formState","errors","isDirty","handleSubmit","getValues","watch","useEffect","onSubmit","values","bedSelected","find","bed","createEncounter","encounterType","admissionEncounterType","transferWithinHospitalEncounterType","encounterProviders","provider","encounterRole","clinicianEncounterRole","obs","then","response","bedsAssignedToPatient","assignedBedId","ok","assignPatientToBed","results","removePatientFromBed","err","showSnackbar","kind","title","subtitle","message","patientName","finally","mutateAdmissionLocation","mutateInpatientRequest","mutateInpatientAdmission","onError","Form","className","styles","form","div","formContent","formError","InlineNotification","lowContrast","hideCloseButton","Row","Column","h2","productiveHeading02","bedSelectionDropdown","DropdownSkeleton","Controller","name","render","field","onChange","fieldState","selectedItem","Dropdown","titleText","helperText","label","items","itemToString","invalid","invalidText","errorNotifications","Object","entries","key","value","ButtonSet","buttonSet","Button","size","onClick","ignoreChanges","type","disabled","isLoadingBedsAssignedToPatient","encounterPayload","method","headers","body","bedUuid","encounterUuid"],"sourceRoot":""}
1
+ {"version":3,"file":"662.js","mappings":"6LAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,woCAAyoC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,sFAAsF,6EAA6E,iEAAiE,MAAQ,GAAG,SAAW,0RAA0R,eAAiB,CAAC,o7DAAo7D,kqBAAkqB,05DAA05D,w8uBAAw8uB,WAAa,MAEhw7BH,EAAwBI,OAAS,CAChC,KAAQ,8CACR,YAAe,qDACf,UAAa,mDACb,UAAa,mDACb,qBAAwB,8DACxB,mBAAsB,4DACtB,oBAAuB,8DAExB,S,mECbIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC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space/admit-patient-form.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/bed-selector.scss","webpack://@kenyaemr/esm-ward-app/./src/hooks/useEmrConfiguration.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.scss?3181","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx","webpack://@kenyaemr/esm-ward-app/./src/hooks/useAssignedBedByPatient.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/bed-selector.scss?7287","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/bed-selector.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward.resource.ts"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","customRep","map","prop","join","useEmrConfiguration","swrData","useSWRImmutable","restBaseUrl","openmrsFetch","useMemo","emrConfiguration","data","isLoadingEmrConfiguration","isLoading","mutateEmrConfiguration","mutate","errorFetchingEmrConfiguration","error","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","wardPatientGroupDetails","useAppContext","patientUuid","url","patient","dispositionType","closeWorkspace","closeWorkspaceWithSavedChanges","promptBeforeClosing","useTranslation","t","useWardLocation","location","useState","isSubmitting","setIsSubmitting","useAdmitPatient","admitPatient","showErrorNotifications","setShowErrorNotifications","admissionLocationResponse","useAssignedBedByPatient","uuid","useSWR","beds","bedLayouts","zodSchema","z","object","bedId","number","optional","useForm","resolver","zodResolver","control","formState","errors","isDirty","handleSubmit","useEffect","onError","useCallback","values","Form","className","styles","form","onSubmit","bedSelected","find","bed","then","response","bedsAssignedToPatient","assignedBedId","ok","assignPatientToBed","results","removePatientFromBed","err","showSnackbar","kind","title","subtitle","message","patientName","person","preferredName","display","bedNumber","finally","div","formContent","Row","Column","h2","productiveHeading02","bedSelectionDropdown","Controller","name","render","field","onChange","value","fieldState","BedSelector","isLoadingBeds","currentPatient","selectedBedId","errorNotifications","Object","entries","key","InlineNotification","lowContrast","ButtonSet","buttonSet","Button","size","onClick","ignoreChanges","type","disabled","isLoadingBedsAssignedToPatient","minBedCountToUseDropdown","bedDropdownItems","label","bedLayout","patients","isPatientAssignedToBed","some","bedPatient","length","selectedItem","useDropdown","RadioButtonGroup","radioButtonGroup","RadioButtonSkeleton","Dropdown","titleText","helperText","items","itemToString","bedDropdownItem","invalid","invalidText","RadioButton","labelText","checked","hideCloseButton","createEncounter","encounterPayload","method","headers","body","useSession","currentProvider","encounterType","admissionEncounterType","transferWithinHospitalEncounterType","encounterProviders","provider","encounterRole","clinicianEncounterRole","obs","bedUuid","encounterUuid"],"sourceRoot":""}
package/dist/921.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([[921],{1319:(e,n,r)=>{r.d(n,{Z:()=>l});var t=r(5698),a=r.n(t),i=r(9613),o=r.n(i)()(a());o.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-ward__mother-child-row__motherOrBabyRow___9fHo5{display:flex}.-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7{flex:1}.-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC{display:flex;align-items:center}.-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a{padding:.25rem;border-radius:50%;background-color:#e0e0e0;margin-right:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-patient-card/card-rows/mother-child-row.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCxDF,sDACE,YAAA,CAGF,iEACE,MAAA,CAGF,0DACE,YAAA,CACA,kBAAA,CAGF,uDACE,cCDW,CDEX,iBAAA,CACA,wBDIO,CCHP,kBCCW",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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 '@openmrs/esm-styleguide/src/vars' as *;\n\n.motherOrBabyRow {\n display: flex;\n}\n\n.motherOrBabyRowElementsDiv {\n flex: 1;\n}\n\n.motherOrBabyIconDiv {\n display: flex;\n align-items: center;\n}\n\n.motherOrBabyIcon {\n padding: layout.$spacing-02;\n border-radius: 50%;\n background-color: $grey-2;\n margin-right: layout.$spacing-03;\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:""}]),o.locals={motherOrBabyRow:"-esm-ward__mother-child-row__motherOrBabyRow___9fHo5",motherOrBabyRowElementsDiv:"-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7",motherOrBabyIconDiv:"-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC",motherOrBabyIcon:"-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a"};const l=o},714:(e,n,r)=>{r.d(n,{Z:()=>l});var t=r(5698),a=r.n(t),i=r(9613),o=r.n(i)()(a());o.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-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85{background-color:#fff;color:#525252;padding:.125rem;display:flex;align-items:center;justify-content:space-between}.-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e{height:1px;width:30%;border-top:1px dashed #161616}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-view/materal-ward/maternal-ward-patient-card.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,sEACE,qBDJM,CCKN,aDDQ,CCER,eCIW,CDHX,YAAA,CACA,kBAAA,CACA,6BAAA,CAGF,0EACE,UAAA,CACA,SAAA,CACA,6BAAA",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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 '@openmrs/esm-styleguide/src/vars';\n@use '@carbon/type';\n\n.motherChildBedDivider {\n background-color: vars.$ui-02;\n color: vars.$text-02;\n padding: layout.$spacing-01;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.motherChildBedDividerLine {\n height: 1px;\n width: 30%;\n border-top: 1px dashed vars.$ui-05;\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:""}]),o.locals={motherChildBedDivider:"-esm-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85",motherChildBedDividerLine:"-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e"};const l=o},2921:(e,n,r)=>{r.r(n),r.d(n,{default:()=>ce});var t=r(2870),a=r(5206),i=r.n(a),o=r(6574),l=r(3804),d=r(5947),s=r(2127),c=r(9463),u=r(379),p=r(2524),m=r.n(p),h=r(4924),b=r(3889),v=r(3338),g=r(7670),f=r(7194),y=r(7561);const A=function(e){var n,r,t=e.id,a=e.patient,o=e.visit,l=(0,c.HK)("coloredObsTags",t),d=null!=l?l:{},s=d.conceptUuid,p=d.summaryLabel,m=d.summaryLabelColor,A=(0,b.s)({patient:a.uuid,concept:s},null!=s,f.pU),$=A.data,w=A.isLoading,C=(0,h.useTranslation)().t,E=(0,f.MN)(null!==(r=null===(n=l)||void 0===n?void 0:n.tags)&&void 0!==r?r:[]);if(w)return i().createElement("div",{className:v.Z.wardPatientCardRow},i().createElement(g.Z,null));var _,k,B,x,P,O,N=null===(_=$)||void 0===_?void 0:_.filter((function(e){var n,r;return(null===(n=e.encounter.visit)||void 0===n?void 0:n.uuid)==(null===(r=o)||void 0===r?void 0:r.uuid)})),D=null!=p?C(p):null===(x=N)||void 0===x||null===(B=x[0])||void 0===B||null===(k=B.concept)||void 0===k?void 0:k.display,Z=[],I=null===(P=N)||void 0===P?void 0:P.map((function(e){var n,r=e.value,t=r.display,a=r.uuid,o=null===(n=E)||void 0===n?void 0:n.get(a);return o?i().createElement(y.Z,{tooltipContent:(0,f.Gp)(e,C)},i().createElement(u.Vp9,{type:o,key:"ward-coded-obs-tag-".concat(e.uuid)},t)):(Z.push(i().createElement("div",{key:a},t," (",(0,f.Gp)(e,C),")")),null)})).filter((function(e){return null!=e}));return(null===(O=I)||void 0===O?void 0:O.length)>0||Z.length>0?i().createElement("div",{className:v.Z.wardPatientCardRow},i().createElement("span",{className:v.Z.wardPatientObsLabel},I,Z.length>0?i().createElement(y.Z,{tooltipContent:Z},i().createElement(u.Vp9,{type:m},C("countItems","{{count}} {{item}}",{count:Z.length,item:D}))):null)):null};var $=r(1614),w=r(8197);const C=function(e){var n,r,t=null===(r=e.inpatientAdmission)||void 0===r||null===(n=r.encounterAssigningToCurrentInpatientLocation.location)||void 0===n?void 0:n.display;return t?i().createElement("div",null,i().createElement("span",null,t)):i().createElement(i().Fragment,null)};var E=r(1337),_=r(6062),k=r.n(_),B=r(4036),x=r.n(B),P=r(6793),O=r.n(P),N=r(7892),D=r.n(N),Z=r(1173),I=r.n(Z),R=r(2464),M=r.n(R),S=r(1319),T={};T.styleTagTransform=M(),T.setAttributes=D(),T.insert=O().bind(null,"head"),T.domAPI=x(),T.insertStyleElement=I(),k()(S.Z,T);const q=S.Z&&S.Z.locals?S.Z.locals:void 0;var L=function(e){var n=e.otherPatient,r=e.otherPatientAdmission,a=e.isOtherPatientTheMother?t.MotherIcon:t.BabyIcon;return i().createElement("div",{key:n.uuid,className:m()(q.motherOrBabyRow,v.Z.wardPatientCardRow)},i().createElement("div",{className:q.motherOrBabyIconDiv},i().createElement(a,{className:q.motherOrBabyIcon,size:24})),i().createElement("div",{className:m()(q.motherOrBabyRowElementsDiv,v.Z.dotSeparatedChildren)},i().createElement(E.Z,{patient:n}),i().createElement(w.Z,{id:"patient-identifier",patient:n}),i().createElement($.Z,{patient:n}),i().createElement(C,{inpatientAdmission:r})))};const H=function(e){var n,r,a,o,l,d=e.wardPatient,s=e.childrenOfWardPatientInSameBed,c=d.patient,u=(null!==(l=(0,t.useAppContext)("maternal-ward-view-context"))&&void 0!==l?l:{}).motherChildRelationships,p=null!=u?u:{},m=p.childrenByMotherUuid,h=null===(n=p.motherByChildUuid)||void 0===n?void 0:n.get(c.uuid),b=null===(a=null===(r=m)||void 0===r?void 0:r.get(c.uuid))||void 0===a?void 0:a.filter((function(e){var n;return!(null===(n=s)||void 0===n?void 0:n.some((function(n){return n.patient.uuid==e.patient.uuid})))}));return i().createElement(i().Fragment,null,h&&i().createElement(L,{otherPatient:h.patient,otherPatientAdmission:h.currentAdmission,isOtherPatientTheMother:!0}),null===(o=b)||void 0===o?void 0:o.map((function(e){return i().createElement(L,{key:e.patient.uuid,otherPatient:e.patient,otherPatientAdmission:e.currentAdmission,isOtherPatientTheMother:!1})})))};var V=r(2166),F=r(6656),G=r(8791),U=r(6756),j=r(4854);const W=function(e){var n,r,t,a=e.patient,o=e.id,l=null===(r=a)||void 0===r||null===(n=r.person)||void 0===n?void 0:n.preferredAddress,d=(0,c.HK)("patientAddress",o);return i().createElement(i().Fragment,null,null===(t=d.fields)||void 0===t?void 0:t.map((function(e,n){var r,t;return(null===(r=l)||void 0===r?void 0:r[e])?i().createElement("div",{key:n},null===(t=l)||void 0===t?void 0:t[e]):i().createElement("div",{key:n})})))};var X=r(3389);const J=function(e){var n=e.patient,r=e.bed,t=e.visit,a=e.inpatientAdmission,o=(null!=a?a:{}).firstAdmissionOrTransferEncounter;return i().createElement("div",{className:m()(v.Z.wardPatientCardRow,v.Z.wardPatientCardHeader)},r?i().createElement(j.Z,{bed:r}):null,i().createElement(E.Z,{patient:n}),i().createElement(w.Z,{id:"patient-identifier",patient:n}),i().createElement($.Z,{patient:n}),i().createElement(W,{id:"patient-address",patient:n}),i().createElement(F.Z,{id:"admission-reason",patient:n,visit:t}),i().createElement(X.Z,{firstAdmissionOrTransferEncounter:o}))};var K=r(714),Y={};Y.styleTagTransform=M(),Y.setAttributes=D(),Y.insert=O().bind(null,"head"),Y.domAPI=x(),Y.insertStyleElement=I(),k()(K.Z,Y);const z=K.Z&&K.Z.locals?K.Z.locals:void 0;function Q(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var ee=function(){var e=(0,h.useTranslation)().t;return i().createElement("div",{className:z.motherChildBedDivider},i().createElement("div",{className:z.motherChildBedDividerLine}),i().createElement(u.Vp9,{type:"purple"},e("motherChildBedShare","Mother / Child")),i().createElement("div",{className:z.motherChildBedDividerLine}))};const ne=function(e){var n,r=e.wardPatient,t=e.childrenOfWardPatientInSameBed,a=r.patient,o=r.visit,l=r.bed,d=r.inpatientAdmission,s=(null!=d?d:{}).encounterAssigningToCurrentInpatientLocation,c=i().createElement(i().Fragment,null,i().createElement(U.Z,{wardPatient:r},i().createElement(J,r),i().createElement("div",{className:m()(v.Z.wardPatientCardRow,v.Z.dotSeparatedChildren)},i().createElement(G.Z,{encounterAssigningToCurrentInpatientLocation:s}),i().createElement(F.Z,{id:"gravida",patient:a,visit:o})),i().createElement(V.Z,{id:"pending-items",wardPatient:r}),i().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){Q(e,n,r[n])}))}return e}({id:"pregnancy-complications"},r)),i().createElement(H,e)),null===(n=t)||void 0===n?void 0:n.map((function(e){return i().createElement(i().Fragment,{key:e.patient.uuid},i().createElement(ee,null),i().createElement(U.Z,{wardPatient:e},i().createElement(J,e),i().createElement(V.Z,{id:"pending-items",wardPatient:e})))})));return l?c:i().createElement("div",{className:v.Z.unassignedPatient},i().createElement("div",{key:"unassigned-bed-pt-"+r.patient.uuid},c))},re=function(e){var n,r,a=(null!=e?e:{}).motherByChildUuid,o=(null!==(r=(0,t.useAppContext)("ward-view-context"))&&void 0!==r?r:{}).wardPatientGroupDetails,l=null!=o?o:{},d=l.bedLayouts,u=l.wardAdmittedPatientsWithBed,p=null===(n=d)||void 0===n?void 0:n.map((function(e){var n=e.patients,r=(0,c.i)(e),t=new Map,o=n.map((function(e){var n,t=null===(n=u)||void 0===n?void 0:n.get(e.uuid);if(t){var a=t.patient,i=t.visit,o=t.currentInpatientRequest;return{patient:a,visit:i,bed:r,inpatientAdmission:t,inpatientRequest:o||null}}return{patient:e,visit:null,bed:r,inpatientAdmission:null,inpatientRequest:null}})).filter((function(e){var r,i,o=e.patient.uuid,l=(null!==(i=null===(r=a)||void 0===r?void 0:r.get(o))&&void 0!==i?i:{}).patient,d=n.some((function(e){var n;return e.uuid==(null===(n=l)||void 0===n?void 0:n.uuid)}));return d&&(t.has(l.uuid)||t.set(l.uuid,[]),t.get(l.uuid).push(e)),!d})).map((function(e){return i().createElement(ne,{key:e.patient.uuid,wardPatient:e,childrenOfWardPatientInSameBed:t.get(e.patient.uuid)})}));return i().createElement(s.Z,{key:r.uuid,bed:r,patientCards:o})}));return i().createElement(i().Fragment,null,p)};var te=r(2030),ae=r(3060);function ie(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const oe=function(){var e,n,r=(null!==(n=(0,t.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,a=(0,h.useTranslation)().t,o=(null!=r?r:{}).inpatientRequestResponse,l=null!=o?o:{},d=l.inpatientRequests,s=l.isLoading,c=l.error;return s?i().createElement(g.Z,null):c?i().createElement(t.ErrorState,{headerTitle:a("admissionRequests","Admission requests"),error:c}):i().createElement(i().Fragment,null,null===(e=d)||void 0===e?void 0:e.map((function(e,n){var r={patient:e.patient,visit:e.visit,bed:null,inpatientRequest:e,inpatientAdmission:null};return i().createElement(ae.Z,{key:"admission-request-card-".concat(n),wardPatient:r},i().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){ie(e,n,r[n])}))}return e}({id:"pregnancy-complications"},r)),i().createElement(H,{wardPatient:r,childrenOfWardPatientInSameBed:[]}),i().createElement(te.Z,{id:"admission-request-note",wardPatient:r}))})))},le=function(){var e,n,r=(null!==(n=(0,t.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,a=null===(e=(null!=r?r:{}).wardUnassignedPatientsList)||void 0===e?void 0:e.map((function(e){return i().createElement(ne,{wardPatient:{patient:e.patient,visit:e.visit,bed:null,inpatientAdmission:e,inpatientRequest:e.currentInpatientRequest},childrenOfWardPatientInSameBed:[],key:e.patient.uuid})}));return i().createElement(i().Fragment,null,a)};function de(e){var n,r,a,i,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,d=(i="".concat(t.restBaseUrl,"/emrapi/maternal/mothersAndChildren"),new URL((0,t.makeUrl)(i),window.location.toString())),s=e.mothers,c=e.children,u=e.requireChildBornDuringMothersActiveVisit,p=e.requireChildHasActiveVisit,m=e.requireMotherHasActiveVisit,h=!0,b=!1,v=void 0;try{for(var g,f=(null!=s?s:[])[Symbol.iterator]();!(h=(g=f.next()).done);h=!0){var y=g.value;d.searchParams.append("mother",y)}}catch(e){b=!0,v=e}finally{try{h||null==f.return||f.return()}finally{if(b)throw v}}var A,$,w,C=!0,E=!1,_=void 0;try{for(var k,B=(null!=c?c:[])[Symbol.iterator]();!(C=(k=B.next()).done);C=!0){var x=k.value;d.searchParams.append("child",x)}}catch(e){E=!0,_=e}finally{try{C||null==B.return||B.return()}finally{if(E)throw _}}return d.searchParams.append("requireMotherHasActiveVisit",null!==(A=null===(n=m)||void 0===n?void 0:n.toString())&&void 0!==A?A:"false"),d.searchParams.append("requireChildHasActiveVisit",null!==($=null===(r=p)||void 0===r?void 0:r.toString())&&void 0!==$?$:"false"),d.searchParams.append("requireChildBornDuringMothersActiveVisit",null!==(w=null===(a=u)||void 0===a?void 0:a.toString())&&void 0!==w?w:"false"),l&&d.searchParams.append("v",l),(0,t.useOpenmrsFetchAll)(o?d:null)}var se="custom:(childAdmission,mother:(person,identifiers:full,uuid),child:(person,identifiers:full,uuid),motherAdmission)";const ce=function(){var e=(0,o.v)();(0,t.useDefineAppContext)("ward-view-context",{wardPatientGroupDetails:e,WardPatientHeader:J});var n=e.allWardPatientUuids,r=e.isLoading,s=function(e,n){var r,i,o=(0,h.useTranslation)().t,l={children:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},d=de({mothers:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},n&&e.length>0,se),s=d.data,c=d.isLoading,u=d.error,p=de(l,n&&e.length>0,se),m=p.data,b=p.isLoading,v=p.error;return u&&(0,t.showNotification)({title:o("errorLoadingChildren","Error loading children info"),kind:"error",critical:!0,description:null===(r=u)||void 0===r?void 0:r.message}),v&&(0,t.showNotification)({title:o("errorLoadingMother","Error loading mother info"),kind:"error",critical:!0,description:null===(i=v)||void 0===i?void 0:i.message}),(0,a.useMemo)((function(){if(c||b)return null;var e=new Map,n=new Map,r=!0,t=!1,a=void 0;try{for(var i,o=(null!=m?m:[])[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var l=i.value,d=l.child,u=l.childAdmission,p=l.mother,h=l.motherAdmission;e.set(d.uuid,{patient:p,currentAdmission:h}),n.has(p.uuid)||n.set(p.uuid,[]),n.get(p.uuid).push({patient:d,currentAdmission:u})}}catch(e){t=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(t)throw a}}var v=!0,g=!1,f=void 0;try{for(var y,A=function(){var r=y.value,t=r.child,a=r.childAdmission,i=r.mother,o=r.motherAdmission;e.set(t.uuid,{patient:i,currentAdmission:o}),n.has(i.uuid)||n.set(i.uuid,[]);var l=n.get(i.uuid);l.some((function(e){return e.patient.uuid==t.uuid}))||l.push({patient:t,currentAdmission:a})},$=(null!=s?s:[])[Symbol.iterator]();!(v=(y=$.next()).done);v=!0)A()}catch(e){g=!0,f=e}finally{try{v||null==$.return||$.return()}finally{if(g)throw f}}return{motherByChildUuid:e,childrenByMotherUuid:n}}),[s,m,c,b])}(Array.from(n),!r);(0,t.useDefineAppContext)("maternal-ward-view-context",{motherChildRelationships:s});var c=i().createElement(re,s),u=i().createElement(le,null),p=i().createElement(oe,null);return i().createElement(i().Fragment,null,i().createElement(l.Z,{wardPendingPatients:p}),i().createElement(d.Z,{wardBeds:c,wardUnassignedPatients:u}))}}}]);
1
+ "use strict";(globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([[921],{1319:(e,n,r)=>{r.d(n,{Z:()=>l});var t=r(5698),a=r.n(t),i=r(9613),o=r.n(i)()(a());o.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-ward__mother-child-row__motherOrBabyRow___9fHo5{display:flex}.-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7{flex:1}.-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC{display:flex;align-items:center}.-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a{padding:.25rem;border-radius:50%;background-color:#e0e0e0;margin-right:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-patient-card/card-rows/mother-child-row.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCxDF,sDACE,YAAA,CAGF,iEACE,MAAA,CAGF,0DACE,YAAA,CACA,kBAAA,CAGF,uDACE,cCDW,CDEX,iBAAA,CACA,wBDIO,CCHP,kBCCW",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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 '@openmrs/esm-styleguide/src/vars' as *;\n\n.motherOrBabyRow {\n display: flex;\n}\n\n.motherOrBabyRowElementsDiv {\n flex: 1;\n}\n\n.motherOrBabyIconDiv {\n display: flex;\n align-items: center;\n}\n\n.motherOrBabyIcon {\n padding: layout.$spacing-02;\n border-radius: 50%;\n background-color: $grey-2;\n margin-right: layout.$spacing-03;\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:""}]),o.locals={motherOrBabyRow:"-esm-ward__mother-child-row__motherOrBabyRow___9fHo5",motherOrBabyRowElementsDiv:"-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7",motherOrBabyIconDiv:"-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC",motherOrBabyIcon:"-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a"};const l=o},714:(e,n,r)=>{r.d(n,{Z:()=>l});var t=r(5698),a=r.n(t),i=r(9613),o=r.n(i)()(a());o.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-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85{background-color:#fff;color:#525252;padding:.125rem;display:flex;align-items:center;justify-content:space-between}.-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e{height:1px;width:30%;border-top:1px dashed #161616}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-view/materal-ward/maternal-ward-patient-card.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,sEACE,qBDJM,CCKN,aDDQ,CCER,eCIW,CDHX,YAAA,CACA,kBAAA,CACA,6BAAA,CAGF,0EACE,UAAA,CACA,SAAA,CACA,6BAAA",sourcesContent:["$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: 4rem;\n --workspace-header-height: 3rem;\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 '@openmrs/esm-styleguide/src/vars';\n@use '@carbon/type';\n\n.motherChildBedDivider {\n background-color: vars.$ui-02;\n color: vars.$text-02;\n padding: layout.$spacing-01;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.motherChildBedDividerLine {\n height: 1px;\n width: 30%;\n border-top: 1px dashed vars.$ui-05;\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:""}]),o.locals={motherChildBedDivider:"-esm-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85",motherChildBedDividerLine:"-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e"};const l=o},2921:(e,n,r)=>{r.r(n),r.d(n,{default:()=>ce});var t=r(2870),a=r(5206),i=r.n(a),o=r(6574),l=r(3804),d=r(5947),s=r(2127),c=r(9463),u=r(3932),p=r(2524),m=r.n(p),h=r(4924),b=r(3889),v=r(3338),g=r(7670),f=r(7194),y=r(7561);const A=function(e){var n,r,t=e.id,a=e.patient,o=e.visit,l=(0,c.HK)("coloredObsTags",t),d=null!=l?l:{},s=d.conceptUuid,p=d.summaryLabel,m=d.summaryLabelColor,A=(0,b.s)({patient:a.uuid,concept:s},null!=s,f.pU),$=A.data,w=A.isLoading,C=(0,h.useTranslation)().t,E=(0,f.MN)(null!==(r=null===(n=l)||void 0===n?void 0:n.tags)&&void 0!==r?r:[]);if(w)return i().createElement("div",{className:v.Z.wardPatientCardRow},i().createElement(g.Z,null));var _,k,B,x,P,O,N=null===(_=$)||void 0===_?void 0:_.filter((function(e){var n,r;return(null===(n=e.encounter.visit)||void 0===n?void 0:n.uuid)==(null===(r=o)||void 0===r?void 0:r.uuid)})),D=null!=p?C(p):null===(x=N)||void 0===x||null===(B=x[0])||void 0===B||null===(k=B.concept)||void 0===k?void 0:k.display,Z=[],I=null===(P=N)||void 0===P?void 0:P.map((function(e){var n,r=e.value,t=r.display,a=r.uuid,o=null===(n=E)||void 0===n?void 0:n.get(a);return o?i().createElement(y.Z,{tooltipContent:(0,f.Gp)(e,C)},i().createElement(u.Vp9,{type:o,key:"ward-coded-obs-tag-".concat(e.uuid)},t)):(Z.push(i().createElement("div",{key:a},t," (",(0,f.Gp)(e,C),")")),null)})).filter((function(e){return null!=e}));return(null===(O=I)||void 0===O?void 0:O.length)>0||Z.length>0?i().createElement("div",{className:v.Z.wardPatientCardRow},i().createElement("span",{className:v.Z.wardPatientObsLabel},I,Z.length>0?i().createElement(y.Z,{tooltipContent:Z},i().createElement(u.Vp9,{type:m},C("countItems","{{count}} {{item}}",{count:Z.length,item:D}))):null)):null};var $=r(1614),w=r(8197);const C=function(e){var n,r,t=null===(r=e.inpatientAdmission)||void 0===r||null===(n=r.encounterAssigningToCurrentInpatientLocation.location)||void 0===n?void 0:n.display;return t?i().createElement("div",null,i().createElement("span",null,t)):i().createElement(i().Fragment,null)};var E=r(1337),_=r(6062),k=r.n(_),B=r(4036),x=r.n(B),P=r(6793),O=r.n(P),N=r(7892),D=r.n(N),Z=r(1173),I=r.n(Z),R=r(2464),M=r.n(R),S=r(1319),T={};T.styleTagTransform=M(),T.setAttributes=D(),T.insert=O().bind(null,"head"),T.domAPI=x(),T.insertStyleElement=I(),k()(S.Z,T);const q=S.Z&&S.Z.locals?S.Z.locals:void 0;var L=function(e){var n=e.otherPatient,r=e.otherPatientAdmission,a=e.isOtherPatientTheMother?t.MotherIcon:t.BabyIcon;return i().createElement("div",{key:n.uuid,className:m()(q.motherOrBabyRow,v.Z.wardPatientCardRow)},i().createElement("div",{className:q.motherOrBabyIconDiv},i().createElement(a,{className:q.motherOrBabyIcon,size:24})),i().createElement("div",{className:m()(q.motherOrBabyRowElementsDiv,v.Z.dotSeparatedChildren)},i().createElement(E.Z,{patient:n}),i().createElement(w.Z,{id:"patient-identifier",patient:n}),i().createElement($.Z,{patient:n}),i().createElement(C,{inpatientAdmission:r})))};const H=function(e){var n,r,a,o,l,d=e.wardPatient,s=e.childrenOfWardPatientInSameBed,c=d.patient,u=(null!==(l=(0,t.useAppContext)("maternal-ward-view-context"))&&void 0!==l?l:{}).motherChildRelationships,p=null!=u?u:{},m=p.childrenByMotherUuid,h=null===(n=p.motherByChildUuid)||void 0===n?void 0:n.get(c.uuid),b=null===(a=null===(r=m)||void 0===r?void 0:r.get(c.uuid))||void 0===a?void 0:a.filter((function(e){var n;return!(null===(n=s)||void 0===n?void 0:n.some((function(n){return n.patient.uuid==e.patient.uuid})))}));return i().createElement(i().Fragment,null,h&&i().createElement(L,{otherPatient:h.patient,otherPatientAdmission:h.currentAdmission,isOtherPatientTheMother:!0}),null===(o=b)||void 0===o?void 0:o.map((function(e){return i().createElement(L,{key:e.patient.uuid,otherPatient:e.patient,otherPatientAdmission:e.currentAdmission,isOtherPatientTheMother:!1})})))};var V=r(2166),F=r(6656),G=r(8791),U=r(6756),j=r(4854);const W=function(e){var n,r,t,a=e.patient,o=e.id,l=null===(r=a)||void 0===r||null===(n=r.person)||void 0===n?void 0:n.preferredAddress,d=(0,c.HK)("patientAddress",o);return i().createElement(i().Fragment,null,null===(t=d.fields)||void 0===t?void 0:t.map((function(e,n){var r,t;return(null===(r=l)||void 0===r?void 0:r[e])?i().createElement("div",{key:n},null===(t=l)||void 0===t?void 0:t[e]):i().createElement("div",{key:n})})))};var X=r(3389);const J=function(e){var n=e.patient,r=e.bed,t=e.visit,a=e.inpatientAdmission,o=(null!=a?a:{}).firstAdmissionOrTransferEncounter;return i().createElement("div",{className:m()(v.Z.wardPatientCardRow,v.Z.wardPatientCardHeader)},r?i().createElement(j.Z,{bed:r}):null,i().createElement(E.Z,{patient:n}),i().createElement(w.Z,{id:"patient-identifier",patient:n}),i().createElement($.Z,{patient:n}),i().createElement(W,{id:"patient-address",patient:n}),i().createElement(F.Z,{id:"admission-reason",patient:n,visit:t}),i().createElement(X.Z,{firstAdmissionOrTransferEncounter:o}))};var K=r(714),Y={};Y.styleTagTransform=M(),Y.setAttributes=D(),Y.insert=O().bind(null,"head"),Y.domAPI=x(),Y.insertStyleElement=I(),k()(K.Z,Y);const z=K.Z&&K.Z.locals?K.Z.locals:void 0;function Q(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var ee=function(){var e=(0,h.useTranslation)().t;return i().createElement("div",{className:z.motherChildBedDivider},i().createElement("div",{className:z.motherChildBedDividerLine}),i().createElement(u.Vp9,{type:"purple"},e("motherChildBedShare","Mother / Child")),i().createElement("div",{className:z.motherChildBedDividerLine}))};const ne=function(e){var n,r=e.wardPatient,t=e.childrenOfWardPatientInSameBed,a=r.patient,o=r.visit,l=r.bed,d=r.inpatientAdmission,s=(null!=d?d:{}).encounterAssigningToCurrentInpatientLocation,c=i().createElement(i().Fragment,null,i().createElement(U.Z,{wardPatient:r},i().createElement(J,r),i().createElement("div",{className:m()(v.Z.wardPatientCardRow,v.Z.dotSeparatedChildren)},i().createElement(G.Z,{encounterAssigningToCurrentInpatientLocation:s}),i().createElement(F.Z,{id:"gravida",patient:a,visit:o})),i().createElement(V.Z,{id:"pending-items",wardPatient:r}),i().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){Q(e,n,r[n])}))}return e}({id:"pregnancy-complications"},r)),i().createElement(H,e)),null===(n=t)||void 0===n?void 0:n.map((function(e){return i().createElement(i().Fragment,{key:e.patient.uuid},i().createElement(ee,null),i().createElement(U.Z,{wardPatient:e},i().createElement(J,e),i().createElement(V.Z,{id:"pending-items",wardPatient:e})))})));return l?c:i().createElement("div",{className:v.Z.unassignedPatient},i().createElement("div",{key:"unassigned-bed-pt-"+r.patient.uuid},c))},re=function(e){var n,r,a=(null!=e?e:{}).motherByChildUuid,o=(null!==(r=(0,t.useAppContext)("ward-view-context"))&&void 0!==r?r:{}).wardPatientGroupDetails,l=null!=o?o:{},d=l.bedLayouts,u=l.wardAdmittedPatientsWithBed,p=null===(n=d)||void 0===n?void 0:n.map((function(e){var n=e.patients,r=(0,c.i)(e),t=new Map,o=n.map((function(e){var n,t=null===(n=u)||void 0===n?void 0:n.get(e.uuid);if(t){var a=t.patient,i=t.visit,o=t.currentInpatientRequest;return{patient:a,visit:i,bed:r,inpatientAdmission:t,inpatientRequest:o||null}}return{patient:e,visit:null,bed:r,inpatientAdmission:null,inpatientRequest:null}})).filter((function(e){var r,i,o=e.patient.uuid,l=(null!==(i=null===(r=a)||void 0===r?void 0:r.get(o))&&void 0!==i?i:{}).patient,d=n.some((function(e){var n;return e.uuid==(null===(n=l)||void 0===n?void 0:n.uuid)}));return d&&(t.has(l.uuid)||t.set(l.uuid,[]),t.get(l.uuid).push(e)),!d})).map((function(e){return i().createElement(ne,{key:e.patient.uuid,wardPatient:e,childrenOfWardPatientInSameBed:t.get(e.patient.uuid)})}));return i().createElement(s.Z,{key:r.uuid,bed:r,patientCards:o})}));return i().createElement(i().Fragment,null,p)};var te=r(2030),ae=r(3060);function ie(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const oe=function(){var e,n,r=(null!==(n=(0,t.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,a=(0,h.useTranslation)().t,o=(null!=r?r:{}).inpatientRequestResponse,l=null!=o?o:{},d=l.inpatientRequests,s=l.isLoading,c=l.error;return s?i().createElement(g.Z,null):c?i().createElement(t.ErrorState,{headerTitle:a("admissionRequests","Admission requests"),error:c}):i().createElement(i().Fragment,null,null===(e=d)||void 0===e?void 0:e.map((function(e,n){var r={patient:e.patient,visit:e.visit,bed:null,inpatientRequest:e,inpatientAdmission:null};return i().createElement(ae.Z,{key:"admission-request-card-".concat(n),wardPatient:r},i().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){ie(e,n,r[n])}))}return e}({id:"pregnancy-complications"},r)),i().createElement(H,{wardPatient:r,childrenOfWardPatientInSameBed:[]}),i().createElement(te.Z,{id:"admission-request-note",wardPatient:r}))})))},le=function(){var e,n,r=(null!==(n=(0,t.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,a=null===(e=(null!=r?r:{}).wardUnassignedPatientsList)||void 0===e?void 0:e.map((function(e){return i().createElement(ne,{wardPatient:{patient:e.patient,visit:e.visit,bed:null,inpatientAdmission:e,inpatientRequest:e.currentInpatientRequest},childrenOfWardPatientInSameBed:[],key:e.patient.uuid})}));return i().createElement(i().Fragment,null,a)};function de(e){var n,r,a,i,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,d=(i="".concat(t.restBaseUrl,"/emrapi/maternal/mothersAndChildren"),new URL((0,t.makeUrl)(i),window.location.toString())),s=e.mothers,c=e.children,u=e.requireChildBornDuringMothersActiveVisit,p=e.requireChildHasActiveVisit,m=e.requireMotherHasActiveVisit,h=!0,b=!1,v=void 0;try{for(var g,f=(null!=s?s:[])[Symbol.iterator]();!(h=(g=f.next()).done);h=!0){var y=g.value;d.searchParams.append("mother",y)}}catch(e){b=!0,v=e}finally{try{h||null==f.return||f.return()}finally{if(b)throw v}}var A,$,w,C=!0,E=!1,_=void 0;try{for(var k,B=(null!=c?c:[])[Symbol.iterator]();!(C=(k=B.next()).done);C=!0){var x=k.value;d.searchParams.append("child",x)}}catch(e){E=!0,_=e}finally{try{C||null==B.return||B.return()}finally{if(E)throw _}}return d.searchParams.append("requireMotherHasActiveVisit",null!==(A=null===(n=m)||void 0===n?void 0:n.toString())&&void 0!==A?A:"false"),d.searchParams.append("requireChildHasActiveVisit",null!==($=null===(r=p)||void 0===r?void 0:r.toString())&&void 0!==$?$:"false"),d.searchParams.append("requireChildBornDuringMothersActiveVisit",null!==(w=null===(a=u)||void 0===a?void 0:a.toString())&&void 0!==w?w:"false"),l&&d.searchParams.append("v",l),(0,t.useOpenmrsFetchAll)(o?d:null)}var se="custom:(childAdmission,mother:(person,identifiers:full,uuid),child:(person,identifiers:full,uuid),motherAdmission)";const ce=function(){var e=(0,o.v)();(0,t.useDefineAppContext)("ward-view-context",{wardPatientGroupDetails:e,WardPatientHeader:J});var n=e.allWardPatientUuids,r=e.isLoading,s=function(e,n){var r,i,o=(0,h.useTranslation)().t,l={children:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},d=de({mothers:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},n&&e.length>0,se),s=d.data,c=d.isLoading,u=d.error,p=de(l,n&&e.length>0,se),m=p.data,b=p.isLoading,v=p.error;return u&&(0,t.showNotification)({title:o("errorLoadingChildren","Error loading children info"),kind:"error",critical:!0,description:null===(r=u)||void 0===r?void 0:r.message}),v&&(0,t.showNotification)({title:o("errorLoadingMother","Error loading mother info"),kind:"error",critical:!0,description:null===(i=v)||void 0===i?void 0:i.message}),(0,a.useMemo)((function(){if(c||b)return null;var e=new Map,n=new Map,r=!0,t=!1,a=void 0;try{for(var i,o=(null!=m?m:[])[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var l=i.value,d=l.child,u=l.childAdmission,p=l.mother,h=l.motherAdmission;e.set(d.uuid,{patient:p,currentAdmission:h}),n.has(p.uuid)||n.set(p.uuid,[]),n.get(p.uuid).push({patient:d,currentAdmission:u})}}catch(e){t=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(t)throw a}}var v=!0,g=!1,f=void 0;try{for(var y,A=function(){var r=y.value,t=r.child,a=r.childAdmission,i=r.mother,o=r.motherAdmission;e.set(t.uuid,{patient:i,currentAdmission:o}),n.has(i.uuid)||n.set(i.uuid,[]);var l=n.get(i.uuid);l.some((function(e){return e.patient.uuid==t.uuid}))||l.push({patient:t,currentAdmission:a})},$=(null!=s?s:[])[Symbol.iterator]();!(v=(y=$.next()).done);v=!0)A()}catch(e){g=!0,f=e}finally{try{v||null==$.return||$.return()}finally{if(g)throw f}}return{motherByChildUuid:e,childrenByMotherUuid:n}}),[s,m,c,b])}(Array.from(n),!r);(0,t.useDefineAppContext)("maternal-ward-view-context",{motherChildRelationships:s});var c=i().createElement(re,s),u=i().createElement(le,null),p=i().createElement(oe,null);return i().createElement(i().Fragment,null,i().createElement(l.Z,{wardPendingPatients:p}),i().createElement(d.Z,{wardBeds:c,wardUnassignedPatients:u}))}}}]);
package/dist/921.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"921.js","mappings":"6LAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,yrBAA0rB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,oEAAoE,8EAA8E,MAAQ,GAAG,SAAW,kMAAkM,eAAiB,CAAC,o7DAAo7D,gYAAgY,25DAA25D,WAAa,MAE95KH,EAAwBI,OAAS,CAChC,gBAAmB,uDACnB,2BAA8B,kEAC9B,oBAAuB,2DACvB,iBAAoB,yDAErB,S,kECVIJ,E,MAA0B,GAA4B,KAE1DA,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WxF,EAAqB3C,IAAImG,EAAO7H,MACzB6J,EAAS/E,MAAK,Y,OAAGrF,EAAAA,QAAsBO,MAAQ6E,EAAM7E,I,KAE3E6J,EAASzK,KAAK,CAAEK,QAASoF,EAAOG,iBAAkBqG,GAEtD,EAZK,GAA4DE,QAAAA,EAAgB,IAAE,qBAA9E,6B,UAAA,Q,aAAA,6B,YAAA,E,MAAA,C,EAcL,MAAO,CAAEnH,kBAAAA,EAAmBC,qBAAAA,EAC9B,GAAG,CAACkH,EAAcH,EAAYF,EAAuBC,GAGvD,CCpEmCK,CAAwCC,MAAMC,KAAKnB,IAAuBnK,IAC3GiK,EAAAA,EAAAA,qBAA6C,6BAA8B,CACzE1F,yBAAAA,IAGF,IAAMqC,EAAW,kBAAC2E,GAAqBhH,GACjCkE,EAAyB,kBAAC+C,GAA8BA,MACxDC,EAAsB,kBAACC,GAA2BA,MAExD,OACE,oCACE,kBAACC,EAAAA,EAAmB,CAAEF,oBAAAA,IACtB,kBAACG,EAAAA,EAAS,CAAEhF,SAAAA,EAAU6B,uBAAAA,IAG5B,C","sources":["webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/mother-child-row.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/coded-obs-tags-row.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/row-elements/ward-patient-location.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/mother-child-row.scss?76e9","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/mother-child-row.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/row-elements/ward-patient-header-address.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card-header.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card.scss?af28","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-beds.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-pending-patients.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-unassigned-patients.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/hooks/useMotherAndChildren.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-view.resource.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-view.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","config","patient","visit","useElementConfig","conceptUuid","summaryLabel","summaryLabelColor","useObs","uuid","concept","obsCustomRepresentation","data","isLoading","useTranslation","t","conceptToTagColorMap","useConceptToTagColorMap","tags","div","className","styles","wardPatientCardRow","WardPatientSkeletonText","obsToDisplay","coloredOpsTags","filter","o","encounter","summaryLabelToDisplay","display","summaryTagTooltipText","map","value","color","get","WardPatientResponsiveTooltip","tooltipContent","getObsEncounterString","Tag","type","key","length","span","wardPatientObsLabel","count","item","inpatientAdmission","locationDisplay","encounterAssigningToCurrentInpatientLocation","location","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","MotherOrChild","otherPatient","otherPatientAdmission","Icon","isOtherPatientTheMother","MotherIcon","BabyIcon","classNames","motherOrBabyRow","wardPatientCardStyles","motherOrBabyIconDiv","motherOrBabyIcon","size","motherOrBabyRowElementsDiv","dotSeparatedChildren","WardPatientName","WardPatientIdentifier","WardPatientAge","WardPatientLocation","motherByChildUuid","childrenByMotherUuid","childrenOfPatient","childrenOfPatientNotInSameBed","useAppContext","wardPatient","childrenOfWardPatientInSameBed","motherChildRelationships","motherOfPatient","child","some","childInSameBed","currentAdmission","childOfPatient","preferredAddress","person","fields","field","i","bed","firstAdmissionOrTransferEncounter","wardPatientCardHeader","WardPatientBedNumber","WardPatientAddress","WardPatientObs","WardPatientTimeSinceAdmission","MotherChildBedShareDivider","maternalWardPatientCardStyles","motherChildBedDivider","motherChildBedDividerLine","props","card","WardPatientCard","MaternalWardPatientCardHeader","WardPatientTimeOnWard","PendingItemsRow","CodedObsTagsRow","MotherChildRow","childWardPatient","React","unassignedPatient","bedLayouts","wardPatientGroupDetails","wardAdmittedPatientsWithBed","wardBeds","bedLayout","patients","bedLayoutToBed","childrenInSameBedByMotherUuid","Map","patientCards","patientsInCurrentBed","currentInpatientRequest","inpatientRequest","patientUuid","motherInSameBed","p","mother","has","set","MaternalWardPatientCard","WardBed","inpatientRequests","inpatientRequestResponse","error","isLoadingInpatientRequests","errorFetchingInpatientRequests","ErrorState","headerTitle","request","AdmissionRequestCard","AdmissionRequestNoteRow","wardUnassignedPatientsList","wardUnassignedPatients","useMotherAndChildren","criteria","requireMotherHasActiveVisit","requireChildHasActiveVisit","requireChildBornDuringMothersActiveVisit","path","fetch","rep","url","restBaseUrl","URL","makeUrl","window","toString","mothers","children","m","searchParams","append","c","useOpenmrsFetchAll","motherAndChildrenRep","useWardPatientGrouping","useDefineAppContext","WardPatientHeader","allWardPatientUuids","childrenDataError","motherDataError","getMotherRequestParams","showNotification","title","kind","critical","description","message","useMemo","isLoadingChildrenData","isLoadingMotherData","motherData","childAdmission","motherAdmission","childrenData","useMotherChildrenRelationshipsByPatient","Array","from","MaternalWardBeds","MaternalWardUnassignedPatients","wardPendingPatients","MaternalWardPendingPatients","WardViewHeader","Ward"],"sourceRoot":""}
1
+ {"version":3,"file":"921.js","mappings":"6LAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,yrBAA0rB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,oEAAoE,8EAA8E,MAAQ,GAAG,SAAW,kMAAkM,eAAiB,CAAC,o7DAAo7D,gYAAgY,25DAA25D,WAAa,MAE95KH,EAAwBI,OAAS,CAChC,gBAAmB,u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IAClEjH,EAAqByD,IAAID,EAAO7H,OACnCqE,EAAqB0D,IAAIF,EAAO7H,KAAM,IAIxC,IAAM6J,EAAWxF,EAAqB3C,IAAImG,EAAO7H,MACzB6J,EAAS/E,MAAK,Y,OAAGrF,EAAAA,QAAsBO,MAAQ6E,EAAM7E,I,KAE3E6J,EAASzK,KAAK,CAAEK,QAASoF,EAAOG,iBAAkBqG,GAEtD,EAZK,GAA4DE,QAAAA,EAAgB,IAAE,qBAA9E,6B,UAAA,Q,aAAA,6B,YAAA,E,MAAA,C,EAcL,MAAO,CAAEnH,kBAAAA,EAAmBC,qBAAAA,EAC9B,GAAG,CAACkH,EAAcH,EAAYF,EAAuBC,GAGvD,CCpEmCK,CAAwCC,MAAMC,KAAKnB,IAAuBnK,IAC3GiK,EAAAA,EAAAA,qBAA6C,6BAA8B,CACzE1F,yBAAAA,IAGF,IAAMqC,EAAW,kBAAC2E,GAAqBhH,GACjCkE,EAAyB,kBAAC+C,GAA8BA,MACxDC,EAAsB,kBAACC,GAA2BA,MAExD,OACE,oCACE,kBAACC,EAAAA,EAAmB,CAAEF,oBAAAA,IACtB,kBAACG,EAAAA,EAAS,CAAEhF,SAAAA,EAAU6B,uBAAAA,IAG5B,C","sources":["webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/mother-child-row.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/coded-obs-tags-row.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/row-elements/ward-patient-location.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/mother-child-row.scss?76e9","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/mother-child-row.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/row-elements/ward-patient-header-address.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card-header.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card.scss?af28","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-patient-card.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-beds.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-pending-patients.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-unassigned-patients.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/hooks/useMotherAndChildren.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-view.resource.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-view/materal-ward/maternal-ward-view.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","config","patient","visit","useElementConfig","conceptUuid","summaryLabel","summaryLabelColor","useObs","uuid","concept","obsCustomRepresentation","data","isLoading","useTranslation","t","conceptToTagColorMap","useConceptToTagColorMap","tags","div","className","styles","wardPatientCardRow","WardPatientSkeletonText","obsToDisplay","coloredOpsTags","filter","o","encounter","summaryLabelToDisplay","display","summaryTagTooltipText","map","value","color","get","WardPatientResponsiveTooltip","tooltipContent","getObsEncounterString","Tag","type","key","length","span","wardPatientObsLabel","count","item","inpatientAdmission","locationDisplay","encounterAssigningToCurrentInpatientLocation","location","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","MotherOrChild","otherPatient","otherPatientAdmission","Icon","isOtherPatientTheMother","MotherIcon","BabyIcon","classNames","motherOrBabyRow","wardPatientCardStyles","motherOrBabyIconDiv","motherOrBabyIcon","size","motherOrBabyRowElementsDiv","dotSeparatedChildren","WardPatientName","WardPatientIdentifier","WardPatientAge","WardPatientLocation","motherByChildUuid","childrenByMotherUuid","childrenOfPatient","childrenOfPatientNotInSameBed","useAppContext","wardPatient","childrenOfWardPatientInSameBed","motherChildRelationships","motherOfPatient","child","some","childInSameBed","currentAdmission","childOfPatient","preferredAddress","person","fields","field","i","bed","firstAdmissionOrTransferEncounter","wardPatientCardHeader","WardPatientBedNumber","WardPatientAddress","WardPatientObs","WardPatientTimeSinceAdmission","MotherChildBedShareDivider","maternalWardPatientCardStyles","motherChildBedDivider","motherChildBedDividerLine","props","card","WardPatientCard","MaternalWardPatientCardHeader","WardPatientTimeOnWard","PendingItemsRow","CodedObsTagsRow","MotherChildRow","childWardPatient","React","unassignedPatient","bedLayouts","wardPatientGroupDetails","wardAdmittedPatientsWithBed","wardBeds","bedLayout","patients","bedLayoutToBed","childrenInSameBedByMotherUuid","Map","patientCards","patientsInCurrentBed","currentInpatientRequest","inpatientRequest","patientUuid","motherInSameBed","p","mother","has","set","MaternalWardPatientCard","WardBed","inpatientRequests","inpatientRequestResponse","error","isLoadingInpatientRequests","errorFetchingInpatientRequests","ErrorState","headerTitle","request","AdmissionRequestCard","AdmissionRequestNoteRow","wardUnassignedPatientsList","wardUnassignedPatients","useMotherAndChildren","criteria","requireMotherHasActiveVisit","requireChildHasActiveVisit","requireChildBornDuringMothersActiveVisit","path","fetch","rep","url","restBaseUrl","URL","makeUrl","window","toString","mothers","children","m","searchParams","append","c","useOpenmrsFetchAll","motherAndChildrenRep","useWardPatientGrouping","useDefineAppContext","WardPatientHeader","allWardPatientUuids","childrenDataError","motherDataError","getMotherRequestParams","showNotification","title","kind","critical","description","message","useMemo","isLoadingChildrenData","isLoadingMotherData","motherData","childAdmission","motherAdmission","childrenData","useMotherChildrenRelationshipsByPatient","Array","from","MaternalWardBeds","MaternalWardUnassignedPatients","wardPendingPatients","MaternalWardPendingPatients","WardViewHeader","Ward"],"sourceRoot":""}