@kenyaemr/esm-ward-app 8.1.1-pre.118 → 8.1.1-pre.119

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 (149) hide show
  1. package/.turbo/turbo-build.log +16 -20
  2. package/dist/124.js +1 -0
  3. package/dist/124.js.map +1 -0
  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 -0
  9. package/dist/153.js.map +1 -0
  10. package/dist/372.js +1 -1
  11. package/dist/372.js.map +1 -1
  12. package/dist/471.js +1 -0
  13. package/dist/471.js.map +1 -0
  14. package/dist/481.js +1 -0
  15. package/dist/481.js.map +1 -0
  16. package/dist/53.js +1 -1
  17. package/dist/53.js.map +1 -1
  18. package/dist/559.js +1 -1
  19. package/dist/559.js.map +1 -1
  20. package/dist/574.js +1 -1
  21. package/dist/{500.js → 576.js} +1 -1
  22. package/dist/576.js.map +1 -0
  23. package/dist/577.js +1 -1
  24. package/dist/577.js.map +1 -1
  25. package/dist/649.js +2 -0
  26. package/dist/{161.js.LICENSE.txt → 649.js.LICENSE.txt} +0 -6
  27. package/dist/649.js.map +1 -0
  28. package/dist/{659.js → 662.js} +1 -1
  29. package/dist/662.js.map +1 -0
  30. package/dist/67.js +2 -0
  31. package/dist/67.js.LICENSE.txt +5 -0
  32. package/dist/67.js.map +1 -0
  33. package/dist/920.js +1 -0
  34. package/dist/920.js.map +1 -0
  35. package/dist/921.js +1 -0
  36. package/dist/921.js.map +1 -0
  37. package/dist/922.js +1 -1
  38. package/dist/922.js.map +1 -1
  39. package/dist/kenyaemr-esm-ward-app.js +1 -1
  40. package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +148 -165
  41. package/dist/kenyaemr-esm-ward-app.js.map +1 -1
  42. package/dist/main.js +1 -1
  43. package/dist/main.js.LICENSE.txt +0 -10
  44. package/dist/main.js.map +1 -1
  45. package/dist/routes.json +1 -1
  46. package/mock.tsx +8 -0
  47. package/package.json +1 -1
  48. package/src/beds/empty-bed-skeleton.tsx +3 -3
  49. package/src/beds/empty-bed.component.tsx +3 -3
  50. package/src/beds/ward-bed.component.tsx +41 -0
  51. package/src/beds/ward-bed.scss +45 -0
  52. package/src/beds/{occupied-bed.test.tsx → ward-bed.test.tsx} +27 -16
  53. package/src/config-schema.ts +196 -75
  54. package/src/hooks/useAssignedBedByPatient.ts +9 -0
  55. package/src/hooks/useInpatientAdmission.ts +1 -1
  56. package/src/hooks/useMotherAndChildren.ts +2 -2
  57. package/src/hooks/useObs.ts +2 -2
  58. package/src/hooks/useWardPatientGrouping.ts +2 -0
  59. package/src/index.ts +10 -29
  60. package/src/root.component.tsx +3 -0
  61. package/src/routes.json +6 -11
  62. package/src/types/index.ts +29 -14
  63. package/src/ward-patient-card/card-rows/admission-request-note-row.component.tsx +38 -0
  64. package/src/ward-patient-card/card-rows/coded-obs-tags-row.component.tsx +108 -0
  65. package/src/ward-patient-card/card-rows/mother-child-row.component.tsx +84 -0
  66. package/src/ward-patient-card/card-rows/{pending-items-car-row.extension.tsx → pending-items-row.component.tsx} +12 -8
  67. package/src/ward-patient-card/row-elements/ward-patient-coded-obs-tags.tsx +12 -7
  68. package/src/ward-patient-card/row-elements/ward-patient-header-address.tsx +5 -5
  69. package/src/ward-patient-card/row-elements/ward-patient-identifier.tsx +18 -40
  70. package/src/ward-patient-card/row-elements/ward-patient-obs.resource.ts +2 -2
  71. package/src/ward-patient-card/row-elements/ward-patient-obs.tsx +15 -8
  72. package/src/ward-patient-card/ward-patient-card.component.tsx +16 -54
  73. package/src/ward-patient-card/ward-patient-card.scss +7 -1
  74. package/src/ward-view/default-ward/default-ward-beds.component.tsx +42 -0
  75. package/src/ward-view/default-ward/default-ward-patient-card-header.component.tsx +32 -0
  76. package/src/ward-view/default-ward/default-ward-patient-card.component.tsx +31 -0
  77. package/src/ward-view/default-ward/default-ward-pending-patients.component.tsx +52 -0
  78. package/src/ward-view/default-ward/default-ward-unassigned-patients.component.tsx +32 -0
  79. package/src/ward-view/default-ward/default-ward-view.component.tsx +31 -0
  80. package/src/ward-view/materal-ward/maternal-ward-beds.component.tsx +65 -0
  81. package/src/ward-view/materal-ward/maternal-ward-patient-card-header.component.tsx +30 -0
  82. package/src/ward-view/materal-ward/maternal-ward-patient-card.component.tsx +93 -0
  83. package/src/{beds/occupied-bed.scss → ward-view/materal-ward/maternal-ward-patient-card.scss} +4 -10
  84. package/src/ward-view/materal-ward/maternal-ward-patient-card.test.tsx +47 -0
  85. package/src/ward-view/materal-ward/maternal-ward-pending-patients.component.tsx +48 -0
  86. package/src/ward-view/materal-ward/maternal-ward-unassigned-patients.component.tsx +33 -0
  87. package/src/ward-view/materal-ward/maternal-ward-view.component.tsx +38 -0
  88. package/src/ward-view/materal-ward/maternal-ward-view.resource.ts +89 -0
  89. package/src/ward-view/ward-view.component.tsx +11 -151
  90. package/src/ward-view/ward-view.resource.ts +78 -6
  91. package/src/ward-view/ward-view.scss +1 -0
  92. package/src/ward-view/ward-view.test.tsx +10 -8
  93. package/src/ward-view/ward.component.tsx +106 -0
  94. package/src/ward-view-header/admission-requests-bar.component.tsx +10 -6
  95. package/src/ward-view-header/admission-requests-bar.test.tsx +5 -4
  96. package/src/ward-view-header/ward-metrics.component.tsx +12 -11
  97. package/src/ward-view-header/ward-metrics.test.tsx +4 -58
  98. package/src/ward-view-header/ward-view-header.component.tsx +6 -4
  99. package/src/ward-workspace/admission-request-card/admission-request-card-actions.component.tsx +7 -4
  100. package/src/ward-workspace/admission-request-card/admission-request-card-header.component.tsx +9 -21
  101. package/src/ward-workspace/admission-request-card/admission-request-card.component.tsx +9 -3
  102. package/src/ward-workspace/admission-request-card/admission-request-card.scss +6 -1
  103. package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.test.tsx +11 -38
  104. package/src/ward-workspace/admission-request-workspace/admission-requests.workspace.tsx +8 -38
  105. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.test.tsx +80 -89
  106. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx +21 -13
  107. package/src/ward-workspace/patient-banner/patient-banner.component.tsx +5 -12
  108. package/src/ward-workspace/patient-details/ward-patient-action-button.extension.tsx +2 -2
  109. package/src/ward-workspace/patient-details/ward-patient.workspace.tsx +13 -6
  110. package/src/ward-workspace/patient-discharge/patient-discharge.workspace.tsx +6 -6
  111. package/src/ward-workspace/patient-transfer-bed-swap/patient-bed-swap-form.component.tsx +7 -7
  112. package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-request-form.component.tsx +6 -6
  113. package/translations/en.json +7 -1
  114. package/dist/126.js +0 -1
  115. package/dist/126.js.map +0 -1
  116. package/dist/161.js +0 -2
  117. package/dist/161.js.map +0 -1
  118. package/dist/2.js +0 -1
  119. package/dist/2.js.map +0 -1
  120. package/dist/269.js +0 -1
  121. package/dist/269.js.map +0 -1
  122. package/dist/466.js +0 -1
  123. package/dist/466.js.map +0 -1
  124. package/dist/500.js.map +0 -1
  125. package/dist/557.js +0 -1
  126. package/dist/557.js.map +0 -1
  127. package/dist/659.js.map +0 -1
  128. package/dist/701.js +0 -1
  129. package/dist/701.js.map +0 -1
  130. package/dist/749.js +0 -1
  131. package/dist/749.js.map +0 -1
  132. package/dist/908.js +0 -1
  133. package/dist/908.js.map +0 -1
  134. package/src/beds/empty-bed.scss +0 -24
  135. package/src/beds/occupied-bed.component.tsx +0 -35
  136. package/src/beds/unassigned-patient.component.tsx +0 -20
  137. package/src/beds/unassigned-patient.scss +0 -6
  138. package/src/config-schema-admission-request-note.ts +0 -9
  139. package/src/config-schema-extension-colored-obs-tags.ts +0 -91
  140. package/src/config-schema-mother-child-row.ts +0 -26
  141. package/src/config-schema-pending-items-extension.ts +0 -29
  142. package/src/hooks/useCurrentWardCardConfig.ts +0 -32
  143. package/src/ward-patient-card/card-rows/admission-request-note.extension.tsx +0 -32
  144. package/src/ward-patient-card/card-rows/colored-obs-tags-card-row.extension.tsx +0 -13
  145. package/src/ward-patient-card/card-rows/mother-child-row.extension.tsx +0 -110
  146. package/src/ward-patient-card/ward-patient-card-element.component.tsx +0 -69
  147. package/src/ward-patient-card/ward-patient-resource.ts +0 -15
  148. package/src/ward-view/ward-bed.component.tsx +0 -14
  149. /package/src/ward-patient-card/row-elements/{ward-pateint-skeleton-text.tsx → ward-patient-skeleton-text.tsx} +0 -0
package/dist/749.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([[749],{2620:(n,e,a)=>{a.d(e,{Z:()=>o});var t=a(5698),i=a.n(t),s=a(9613),r=a.n(s)()(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__admission-request-card__admissionRequestCard___ArwhY{background-color:#e0e0e0;border:1px solid #c6c6c6;height:fit-content;color:#525252;margin-bottom:1rem}.-esm-ward__admission-request-card__admissionRequestCardHeaderContainer___2Fwc1{padding:.5rem}.-esm-ward__admission-request-card__admissionRequestCardHeader___u1aB6{display:flex;align-items:center;flex-wrap:wrap}.-esm-ward__admission-request-card__admissionRequestCardHeader___u1aB6>div:not(:first-of-type):not(:empty)::before{content:"·";padding:.25rem}.-esm-ward__admission-request-card__admissionRequestCardExtensionSlot___FgYAY{display:none}.-esm-ward__admission-request-card__admissionRequestCardExtensionSlot___FgYAY:has(div:not(:empty)){display:block;margin:.5rem 0;background-color:#fff}.-esm-ward__admission-request-card__admissionEncounterDetails___5Ou26{font-size:var(--cds-helper-text-01-font-size, 0.75rem);line-height:var(--cds-helper-text-01-line-height, 1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing, 0.32px);color:#525252;margin-top:.5rem}.-esm-ward__admission-request-card__admissionRequestActionBar___wKdx-{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #a8a8a8}.-esm-ward__admission-request-card__admissionRequestActionBar___wKdx- svg{fill:#0f62fe !important}',"",{version:3,sources:["webpack://./src/ward-workspace/admission-request-card/admission-request-card.scss","webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAAA,MCoDA,mBACE,CAAA,mBACA,CAAA,mBACA,CAAA,yBACA,CAAA,+BACA,CAAA,oGACA,CAAA,2GACA,CAAA,iEDvDF,wBCFQ,CAAA,wBDIN,CAAA,kBACA,CAAA,aCEc,CAAA,kBCsBH,CAAA,gFFnBb,aESa,CAAA,uEFLb,YACE,CAAA,kBACA,CAAA,cACA,CAAA,mHAEA,WACE,CAAA,cENS,CAAA,8EFWb,YACE,CAAA,mGAEA,aACE,CAAA,cACA,CAAA,qBACA,CAAA,sEAIJ,sDG6zBI,CAAA,0DAAA,CAAA,+DAAA,CAAA,aF71BM,CAAA,gBCgBG,CAAA,sEFsBb,YACE,CAAA,kBACA,CAAA,6BACA,CAAA,4BACA,CAAA,0EAEA,uBACE",sourcesContent:["@use '@carbon/type';\n@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.admissionRequestCard {\n background-color: $ui-03;\n border: 1px solid $color-gray-30;\n height: fit-content;\n color: $color-gray-70;\n margin-bottom: layout.$spacing-05;\n}\n\n.admissionRequestCardHeaderContainer {\n padding: layout.$spacing-03;\n}\n\n.admissionRequestCardHeader {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n > div:not(:first-of-type):not(:empty)::before {\n content: '·';\n padding: layout.$spacing-02;\n }\n}\n\n.admissionRequestCardExtensionSlot {\n display: none;\n\n &:has(div:not(:empty)) {\n display: block; \n margin: layout.$spacing-03 0;\n background-color: white;\n }\n}\n\n.admissionEncounterDetails {\n @include type.type-style('helper-text-01');\n color: $text-02;\n margin-top: layout.$spacing-03;\n}\n\n.admissionRequestActionBar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid $text-03;\n\n svg {\n fill: $interactive-01 !important;\n }\n}\n","$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: 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","// 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={admissionRequestCard:"-esm-ward__admission-request-card__admissionRequestCard___ArwhY",admissionRequestCardHeaderContainer:"-esm-ward__admission-request-card__admissionRequestCardHeaderContainer___2Fwc1",admissionRequestCardHeader:"-esm-ward__admission-request-card__admissionRequestCardHeader___u1aB6",admissionRequestCardExtensionSlot:"-esm-ward__admission-request-card__admissionRequestCardExtensionSlot___FgYAY",admissionEncounterDetails:"-esm-ward__admission-request-card__admissionEncounterDetails___5Ou26",admissionRequestActionBar:"-esm-ward__admission-request-card__admissionRequestActionBar___wKdx-"};const o=r},285:(n,e,a)=>{a.d(e,{Z:()=>o});var t=a(5698),i=a.n(t),s=a(9613),r=a.n(s)()(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__admission-requests-workspace__admissionRequestsWorkspace___K0FPC{padding:.75rem;display:grid;grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));gap:1rem}.-esm-ward__admission-requests-workspace__content___HN5ng{padding:1rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/admission-request-workspace/admission-requests-workspace.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,6EACE,cCsBW,CDrBX,YAAA,CACA,2DAAA,CACA,QCwBW,CDtBb,0DACE,YCqBW",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.admissionRequestsWorkspace {\n padding: layout.$spacing-04;\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: layout.$spacing-05;\n}\n.content {\n padding: layout.$spacing-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:""}]),r.locals={admissionRequestsWorkspace:"-esm-ward__admission-requests-workspace__admissionRequestsWorkspace___K0FPC",content:"-esm-ward__admission-requests-workspace__content___HN5ng"};const o=r},2749:(n,e,a)=>{a.r(e),a.d(e,{default:()=>I});var t=a(5206),i=a.n(t),s=a(6062),r=a.n(s),o=a(4036),p=a.n(o),l=a(6793),c=a.n(l),d=a(7892),u=a.n(d),g=a(1173),f=a.n(g),y=a(2464),h=a.n(y),b=a(285),m={};m.styleTagTransform=h(),m.setAttributes=u(),m.insert=c().bind(null,"head"),m.domAPI=p(),m.insertStyleElement=f(),r()(b.Z,m);const $=b.Z&&b.Z.locals?b.Z.locals:void 0;var v=a(379),w=a(2870),A=a(4924),k=a(2620),x={};x.styleTagTransform=h(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=f(),r()(k.Z,x);const _=k.Z&&k.Z.locals?k.Z.locals:void 0,C=function(n){var e=n.patient,a=n.inpatientRequest.dispositionType,s=(0,A.useTranslation)().t,r="tablet"===(0,w.useLayoutType)()?"lg":"md",o=(0,t.useCallback)((function(){return(0,w.launchWorkspace)("admit-patient-form-workspace",{patient:e,dispositionType:a})}),[]),p=(0,t.useCallback)((function(){(0,w.launchWorkspace)("patient-transfer-request-workspace",{wardPatient:n})}),[n]);return i().createElement("div",{className:_.admissionRequestActionBar},i().createElement(v.zxk,{kind:"ghost",size:r,onClick:p},s("transferElsewhere","Transfer elsewhere")),i().createElement(v.zxk,{kind:"ghost",renderIcon:w.ArrowRightIcon,size:r,onClick:o},s("admitPatient","Admit patient")))};var z=a(2524),q=a.n(z),M=a(5196),E=a(1337),N=a(2613);function B(n,e,a){return e in n?Object.defineProperty(n,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[e]=a,n}const R=function(n){var e,a,t,s,r,o=n.inpatientRequest.dispositionEncounter,p=(0,M.O)(),l=p.id,c=p.headerRowElements,d=n.patient,u=n,g="default"==l?"ward-patient-card-slot":"ward-patient-card-".concat(l,"-slot");return i().createElement("div",{className:_.admissionRequestCardHeaderContainer},i().createElement("div",{className:_.admissionRequestCardHeader},i().createElement(E.Z,{patient:d}),c.map((function(e,a){return i().createElement(N.L,function(n){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},t=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(a).filter((function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})))),t.forEach((function(e){B(n,e,a[e])}))}return n}({key:"ward-card-".concat(d.uuid,"-header-").concat(a),elementId:e},n))}))),i().createElement("div",{className:q()(_.admissionRequestCardHeader,_.admissionEncounterDetails)},i().createElement("div",null,(0,w.formatDatetime)(new Date(null===(e=o)||void 0===e?void 0:e.encounterDatetime),{locale:(0,w.getLocale)(),mode:"standard"})),i().createElement("div",null,null===(t=o)||void 0===t||null===(a=t.encounterProviders)||void 0===a?void 0:a.map((function(n){var e,a;return null===(a=n)||void 0===a||null===(e=a.provider)||void 0===e?void 0:e.display})).join(",")),i().createElement("div",null,null===(r=o)||void 0===r||null===(s=r.location)||void 0===s?void 0:s.display)),i().createElement(w.ExtensionSlot,{name:g,state:u,className:_.admissionRequestCardExtensionSlot}))},T=function(n){return i().createElement("div",{className:_.admissionRequestCard},i().createElement(R,n),i().createElement(C,n))};var S=a(8591);function D(n,e){(null==e||e>n.length)&&(e=n.length);for(var a=0,t=new Array(e);a<e;a++)t[a]=n[a];return t}const I=function(){var n,e,a=(0,S.o)(["ADMIT","TRANSFER"]),t=a.inpatientRequests,s=a.isLoading,r=a.error,o=(0,A.useTranslation)().t,p=(n=i().useState(""),e=2,function(n){if(Array.isArray(n))return n}(n)||function(n,e){var a=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=a){var t,i,s=[],r=!0,o=!1;try{for(a=a.call(n);!(r=(t=a.next()).done)&&(s.push(t.value),!e||s.length!==e);r=!0);}catch(n){o=!0,i=n}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return s}}(n,e)||function(n,e){if(n){if("string"==typeof n)return D(n,e);var a=Object.prototype.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?D(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.")}()),l=p[0],c=p[1];return i().createElement("div",{className:$.admissionRequestsWorkspaceContainer},i().createElement(v.olm,{labelText:"",value:l,onChange:function(n){c(n.target.value)},size:"lg",placeholder:o("searchForPatient","Search for a patient"),disabled:!0}),i().createElement("div",{className:$.content},s?i().createElement(i().Fragment,null,"Loading"):r?i().createElement(w.ErrorState,{headerTitle:o("admissionRequests","Admission requests"),error:r}):i().createElement(i().Fragment,null,t.map((function(n,e){return i().createElement(T,{key:"admission-request-card-".concat(e),patient:n.patient,visit:n.visit,bed:null,inpatientRequest:n,inpatientAdmission:null})})))))}}}]);
package/dist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,UAAAA,IAGF,kBAAC3D,MAAAA,CAAIC,UAAWC,EAAO0D,SACpBC,EACC,oCAAE,WACAC,EACF,kBAACC,EAAAA,WAAUA,CACTC,YAAavE,EAAE,oBAAqB,sBACpCsD,MAAOe,IAGT,oCACGjB,EAAkB3B,KAAI,SAAC+C,EAA2B7C,G,OACjD,kBAAC8C,EAAoBA,CACnB5C,IAAK,0BAA4B,OAAFF,GAC/B/B,QAAS4E,EAAQ5E,QACjB8E,MAAOF,EAAQE,MACfC,IAAK,KACL9E,iBAAkB2E,EAClBI,mBAAoB,M,MAQpC,C","sources":["webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-card/admission-request-card.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-workspace/admission-requests-workspace.scss","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-workspace/admission-requests-workspace.scss?c1c2","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-card/admission-request-card.scss?1720","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-card/admission-request-card-actions.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-card/admission-request-card-header.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-card/admission-request-card.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-workspace/admission-request-workspace/admission-requests.workspace.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","wardPatient","patient","inpatientRequest","dispositionType","useTranslation","t","responsiveSize","useLayoutType","launchPatientAdmissionForm","useCallback","launchWorkspace","launchPatientTransferForm","div","className","styles","admissionRequestActionBar","Button","kind","size","onClick","renderIcon","ArrowRightIcon","dispositionEncounter","useCurrentWardCardConfig","headerRowElements","extensionSlotState","rowsExtensionSlotName","admissionRequestCardHeaderContainer","admissionRequestCardHeader","WardPatientName","map","elementId","i","WardPatientCardElement","key","uuid","classNames","admissionEncounterDetails","formatDatetime","Date","encounterDatetime","locale","getLocale","mode","encounterProviders","provider","display","join","location","ExtensionSlot","name","state","admissionRequestCardExtensionSlot","admissionRequestCard","AdmissionRequestCardHeader","AdmissionRequestCardActions","useInpatientRequest","inpatientRequests","isLoading","error","React","searchTerm","setSearchTerm","admissionRequestsWorkspaceContainer","Search","labelText","value","onChange","event","target","placeholder","disabled","content","isLoadingInpatientRequests","errorFetchingInpatientRequests","ErrorState","headerTitle","request","AdmissionRequestCard","visit","bed","inpatientAdmission"],"sourceRoot":""}
package/dist/908.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([[908],{5908:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(5206),a=n.n(r),o=n(8557),i=n(2870),l=n(2074),u=n(3338),c=n(4924),s=n(3649);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n){var r,a,o=e&&t&&n?"".concat(i.restBaseUrl,"/order?includeNullFulfillerStatus=true&patient=").concat(e,"&orderTypes=").concat(t,"&activatedOnOrAfterDate=").concat(n):null,l=(0,s.ZP)(o,i.openmrsFetch),u=l.data,c=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(l,["data"]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}({orders:null===(r=u)||void 0===r?void 0:r.data.results,count:null===(a=u)||void 0===a?void 0:a.data.results.length},c)}var p=function(e){var t,n,o,i,s=e.wardPatient,d=e.orderUuid,p=e.label,v=e.onOrderCount,m=(0,c.useTranslation)().t,y=f(null===(n=s)||void 0===n||null===(t=n.patient)||void 0===t?void 0:t.uuid,d,null===(i=s)||void 0===i||null===(o=i.visit)||void 0===o?void 0:o.startDatetime.split("T")[0]),b=y.count,g=y.isLoading;if((0,r.useEffect)((function(){g||v(b)}),[b,g,v]),g||!b||0==b)return null;var h=p?m(p):m("Orders","Orders");return a().createElement("div",{className:u.Z.wardPatientCardDispositionTypeContainer},a().createElement(l.lP,{className:u.Z.chemistryReferenceIcon,size:"24"}),b," ",h)},v=n(8043);const m=function(e){var t,n=e.wardPatient,o=(0,c.useTranslation)().t,i=null===(t=n)||void 0===t?void 0:t.inpatientRequest,l=i.dispositionType,s=i.dispositionLocation,d=(0,r.useMemo)((function(){return"TRANSFER"===l?s?o("transferToDispositionLocation","Transfer to {{location}}",{location:s.name}):o("pendingTransfer","Pending Transfer"):"DISCHARGE"===l?o("pendingDischarge","Pending Discharge"):""}),[l,s]);return"TRANSFER"!==l&&"DISCHARGE"!==l?null:a().createElement("div",{className:u.Z.wardPatientCardDispositionTypeContainer},a().createElement(v.i5,{className:u.Z.movementIcon,size:"24"}),d)};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const b=function(e){var t,n,l,c,s,d=(0,i.useConfig)(),f=d.orders,v=d.showPendingItems,b=(c=a().useState(!1),s=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(c,s)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(c,s)||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.")}()),g=b[0],h=b[1],O=!!(null===(t=e)||void 0===t?void 0:t.inpatientRequest)||g,w=(0,r.useCallback)((function(e){e>0&&h(!0)}),[]);return(0,r.useEffect)((function(){var e,t;(null===(t=f)||void 0===t||null===(e=t.orderTypes)||void 0===e?void 0:e.length)||h(!1)}),[f]),a().createElement("div",{className:u.Z.wardPatientCardPendingItemsRow},v&&O?a().createElement(a().Fragment,null,a().createElement(o.t3,{className:u.Z.hourGlassIcon,size:"16"}),":"):null,null===(n=f)||void 0===n?void 0:n.orderTypes.map((function(t){var n=t.uuid,r=t.label;return a().createElement(p,{key:"pending-order-type-".concat(n),wardPatient:e,orderUuid:n,label:r,onOrderCount:w})})),(null===(l=e)||void 0===l?void 0:l.inpatientRequest)?a().createElement(m,{wardPatient:e}):null)}}}]);
package/dist/908.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"908.js","mappings":"oXAGO,SAASA,EAAwBC,EAAqBC,EAAuBC,G,IAQxEC,EACDA,EARHC,EACJJ,GAAeC,GAAiBC,EAC5B,GAAgEF,OAA7DK,EAAAA,YAAY,mDAA2EJ,OAA1BD,EAAY,gBAAsDE,OAAxCD,EAAc,4BAAyC,OAAfC,GAClI,KACoBI,GAAAA,EAAAA,EAAAA,IAAkEF,EAAQG,EAAAA,cAA9F,EAAoBD,EAAlBH,KAASK,E,kXAAAA,CAASF,EAAAA,CAAlBH,SAER,O,sUAAO,EACLM,OAAQN,Q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AALpC,GAC3BP,YAAaA,EACbC,UAAWM,EACXL,MAAOA,EACPC,aAAciC,G,KAGjBpC,QAAAA,EAAAA,SAAAA,IAAAA,OAAAA,EAAAA,EAAaqB,kBAAmB,kBAACuB,EAA0BA,CAAC5C,YAAaA,IAAkB,KAGlG,C","sources":["webpack://@kenyaemr/esm-ward-app/./src/hooks/usePatientPendingOrders.ts","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/row-elements/ward-patient-pending-order.component.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/row-elements/ward-patient-pending-transfer.tsx","webpack://@kenyaemr/esm-ward-app/./src/ward-patient-card/card-rows/pending-items-car-row.extension.tsx"],"names":["usePatientPendingOrders","patientUuid","orderTypeUUid","visitStartDate","data","apiUrl","restBaseUrl","useSWR","openmrsFetch","rest","orders","results","count","length","WardPatientPendingOrder","wardPatient","orderUuid","label","onOrderCount","useTranslation","t","patient","uuid","visit","startDatetime","split","isLoading","useEffect","labelToDisplay","div","className","styles","wardPatientCardDispositionTypeContainer","ChemistryReference","chemistryReferenceIcon","size","inpatientRequest","dispositionType","dispositionLocation","message","useMemo","location","name","Movement","movementIcon","useConfig","showPendingItems","React","hasPendingOrders","setHasPendingOrders","hasPendingItems","handlePendingOrderCount","useCallback","orderTypes","wardPatientCardPendingItemsRow","Hourglass","hourGlassIcon","map","key","WardPatientPendingTransfer"],"sourceRoot":""}
@@ -1,24 +0,0 @@
1
- @use '@carbon/layout';
2
- @use '@carbon/type';
3
- @use '@openmrs/esm-styleguide/src/vars' as *;
4
-
5
- .container {
6
- display: flex;
7
- gap: layout.$spacing-04;
8
- justify-content: center;
9
- align-items: center;
10
- border: 1px dashed $ui-04;
11
- padding: layout.$spacing-03 layout.$spacing-04;
12
- height: fit-content;
13
- }
14
-
15
- .container:hover:not(.skeleton) {
16
- border: 1px solid transparent;
17
- box-shadow: inset 0px 0px 0px 2px $color-blue-60-2;
18
- cursor: pointer;
19
- }
20
-
21
- .emptyBed {
22
- @include type.type-style('heading-compact-01');
23
- color: $text-02;
24
- }
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
- import { Tag } from '@carbon/react';
4
- import { type WardBedProps } from '../ward-view/ward-bed.component';
5
- import WardPatientCard from '../ward-patient-card/ward-patient-card.component';
6
- import styles from './occupied-bed.scss';
7
-
8
- const OccupiedBed: React.FC<WardBedProps> = ({ wardPatients, bed }) => {
9
- return (
10
- <div className={styles.occupiedBed}>
11
- {wardPatients.map((wardPatient, index: number) => {
12
- const last = index === wardPatients.length - 1;
13
- return (
14
- <div key={'occupied-bed-pt-' + wardPatient.patient.uuid}>
15
- <WardPatientCard {...wardPatient} bed={bed} />
16
- {!last && <BedShareDivider />}
17
- </div>
18
- );
19
- })}
20
- </div>
21
- );
22
- };
23
-
24
- const BedShareDivider = () => {
25
- const { t } = useTranslation();
26
- return (
27
- <div className={styles.bedDivider}>
28
- <div className={styles.bedDividerLine}></div>
29
- <Tag>{t('bedShare', 'Bed share')}</Tag>
30
- <div className={styles.bedDividerLine}></div>
31
- </div>
32
- );
33
- };
34
-
35
- export default OccupiedBed;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import WardPatientCard from '../ward-patient-card/ward-patient-card.component';
3
- import styles from './unassigned-patient.scss';
4
- import { type WardPatient } from '../types';
5
-
6
- export interface UnassignedPatientProps {
7
- wardPatient: WardPatient;
8
- }
9
-
10
- const UnassignedPatient: React.FC<UnassignedPatientProps> = ({ wardPatient }) => {
11
- return (
12
- <div className={styles.unassignedPatient}>
13
- <div key={'unassigned-bed-pt-' + wardPatient.patient.uuid}>
14
- <WardPatientCard {...wardPatient} />
15
- </div>
16
- </div>
17
- );
18
- };
19
-
20
- export default UnassignedPatient;
@@ -1,6 +0,0 @@
1
- @use '@openmrs/esm-styleguide/src/vars';
2
-
3
- .unassignedPatient {
4
- display: flex;
5
- flex-direction: column;
6
- }
@@ -1,9 +0,0 @@
1
- import { Type } from '@openmrs/esm-framework';
2
-
3
- export const admissionRequestNoteRowConfigSchema = {
4
- conceptUuid: {
5
- _type: Type.UUID,
6
- _description: 'Required. Identifies the concept for the admission request note.',
7
- _default: '161011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
8
- },
9
- };
@@ -1,91 +0,0 @@
1
- import { Type } from '@openmrs/esm-framework';
2
-
3
- export const coloredObsTagsCardRowConfigSchema = {
4
- conceptUuid: {
5
- _type: Type.UUID,
6
- _description: 'Required. Identifies the concept to use to identify the desired observations.',
7
- // Problem list
8
- _default: '1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
9
- },
10
- summaryLabel: {
11
- _type: Type.String,
12
- _description: `Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag shows the count of the number of answers that are present but not configured to show as their own tags. If not provided, defaults to the name of the concept.`,
13
- _default: null,
14
- },
15
- summaryLabelI18nModule: {
16
- _type: Type.String,
17
- _description: 'Optional. The custom module to use for translation of the summary label',
18
- _default: null,
19
- },
20
- summaryLabelColor: {
21
- _type: Type.String,
22
- _description:
23
- 'The color of the summary tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors',
24
- _default: null,
25
- },
26
- tags: {
27
- _type: Type.Array,
28
- _description: `An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets will be displayed as their own tags with the specified color. Any observation with coded values not belonging to any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times, the first matching applied-to rule takes precedence.`,
29
- _default: [],
30
- _elements: {
31
- color: {
32
- _type: Type.String,
33
- _description:
34
- 'Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors.',
35
- },
36
- appliedToConceptSets: {
37
- _type: Type.Array,
38
- _description: `The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets will be displayed as their own tag with the specified color. If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.`,
39
- _elements: {
40
- _type: Type.UUID,
41
- },
42
- },
43
- },
44
- },
45
- };
46
-
47
- export interface ColoredObsTagsCardRowConfigObject {
48
- /**
49
- * Required. Identifies the concept to use to identify the desired observations.
50
- */
51
- conceptUuid: string;
52
-
53
- /**
54
- * Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag
55
- * shows the count of the number of answers that are present but not configured to show as their own tags. If not
56
- * provided, defaults to the name of the concept.
57
- */
58
- summaryLabel?: string;
59
- /**
60
- * Optional. The custom module to use for translation of the summary label
61
- */
62
- summaryLabelI18nModule?: string;
63
-
64
- /**
65
- * The color of the summary tag.
66
- * See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors
67
- */
68
- summaryLabelColor?: string;
69
-
70
- /**
71
- * An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets
72
- * will be displayed as their own tags with the specified color. Any observation with coded values not belonging to
73
- * any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times,
74
- * the first matching applied-to rule takes precedence.
75
- */
76
- tags: Array<TagConfigObject>;
77
- }
78
-
79
- export interface TagConfigObject {
80
- /**
81
- * Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors.
82
- */
83
- color: string;
84
-
85
- /**
86
- * The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets
87
- * will be displayed as their own tag with the specified color.
88
- * If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.
89
- */
90
- appliedToConceptSets: Array<string>;
91
- }
@@ -1,26 +0,0 @@
1
- import { Type } from '@openmrs/esm-framework';
2
-
3
- export const motherChildRowConfigSchema = {
4
- maternalLocations: {
5
- _type: Type.Array,
6
- _description: 'Defines obs display elements that can be included in the card header or footer.',
7
- _default: [],
8
- _elements: {
9
- id: {
10
- _type: Type.UUID,
11
- _description: 'The unique identifier for this ward location',
12
- },
13
- }
14
- },
15
- childLocations: {
16
- _type: Type.Array,
17
- _description: 'Defines obs display elements that can be included in the card header or footer.',
18
- _default: [],
19
- _elements: {
20
- id: {
21
- _type: Type.UUID,
22
- _description: 'The unique identifier for this ward location',
23
- },
24
- }
25
- }
26
- };
@@ -1,29 +0,0 @@
1
- import { Type } from '@openmrs/esm-framework';
2
-
3
- export const pendingItemsExtensionConfigSchema = {
4
- orders: {
5
- orderTypes: {
6
- _type: Type.Array,
7
- _description: 'Defines order types displayed on the ward patient card pending items section.',
8
- _default: [{ label: 'Labs', uuid: '52a447d3-a64a-11e3-9aeb-50e549534c5e' }],
9
- _elements: {
10
- uuid: {
11
- _type: Type.UUID,
12
- _description: 'Identifies the order type.',
13
- },
14
- label: {
15
- _type: Type.String,
16
- _description:
17
- "The label or i18n key to the translated label to display. If not provided, defaults to 'Orders'",
18
- _default: null,
19
- },
20
- },
21
- },
22
- },
23
- showPendingItems: {
24
- _type: Type.Boolean,
25
- _description:
26
- 'Optional. If true, pending items (e.g., number of pending orders) will be displayed on the patient card.',
27
- _default: true,
28
- },
29
- };
@@ -1,32 +0,0 @@
1
- import { useConfig } from '@openmrs/esm-framework';
2
- import { useMemo } from 'react';
3
- import { type WardConfigObject, defaultWardPatientCard } from '../config-schema';
4
- import useWardLocation from './useWardLocation';
5
-
6
- export function useCurrentWardCardConfig() {
7
- const { wardPatientCards } = useConfig<WardConfigObject>();
8
- const {
9
- location: { uuid: locationUuid },
10
- } = useWardLocation();
11
-
12
- const currentWardCardConfig = useMemo(() => {
13
- const cardDefinition = wardPatientCards.cardDefinitions.find((cardDef) => {
14
- return (
15
- cardDef.appliedTo == null ||
16
- cardDef.appliedTo?.length == 0 ||
17
- cardDef.appliedTo.some((criteria) => criteria.location == locationUuid)
18
- );
19
- });
20
-
21
- return cardDefinition;
22
- }, [wardPatientCards, locationUuid]);
23
-
24
- if (!currentWardCardConfig) {
25
- console.warn(
26
- 'No ward card configuration has `appliedTo` criteria that matches the current location. Using the default configuration.',
27
- );
28
- return defaultWardPatientCard;
29
- }
30
-
31
- return currentWardCardConfig;
32
- }
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { type ObsElementDefinition } from '../../config-schema';
3
- import { type WardPatientCard } from '../../types';
4
- import WardPatientObs from '../row-elements/ward-patient-obs';
5
- import { useConfig } from '@openmrs/esm-framework';
6
- import styles from '../ward-patient-card.scss';
7
-
8
- const AdmissionRequestNoteRowExtension: WardPatientCard = ({ patient, visit, inpatientAdmission }) => {
9
- const { conceptUuid } = useConfig<ObsElementDefinition>();
10
- const config: ObsElementDefinition = {
11
- conceptUuid,
12
- limit: 0,
13
- id: 'admission-note',
14
- onlyWithinCurrentVisit: true,
15
- orderBy: 'ascending',
16
- label: 'Admission Note',
17
- };
18
-
19
- // only show if the patient has not been admitted yet
20
- const admitted = inpatientAdmission != null;
21
- if (admitted) {
22
- return null;
23
- } else {
24
- return (
25
- <div className={styles.wardPatientCardRow}>
26
- <WardPatientObs config={config} patient={patient} visit={visit} />
27
- </div>
28
- );
29
- }
30
- };
31
-
32
- export default AdmissionRequestNoteRowExtension;
@@ -1,13 +0,0 @@
1
- import { useConfig } from '@openmrs/esm-framework';
2
- import React from 'react';
3
- import { type ColoredObsTagsCardRowConfigObject } from '../../config-schema-extension-colored-obs-tags';
4
- import { type WardPatientCard } from '../../types';
5
- import WardPatientCodedObsTags from '../row-elements/ward-patient-coded-obs-tags';
6
-
7
- const ColoredObsTagsCardRowExtension: WardPatientCard = ({ patient, visit }) => {
8
- const config = useConfig<ColoredObsTagsCardRowConfigObject>();
9
-
10
- return <WardPatientCodedObsTags config={config} patient={patient} visit={visit} />;
11
- };
12
-
13
- export default ColoredObsTagsCardRowExtension;
@@ -1,110 +0,0 @@
1
- import { InlineNotification } from '@carbon/react';
2
- import { BabyIcon, MotherIcon } from '@openmrs/esm-framework';
3
- import classNames from 'classnames';
4
- import React from 'react';
5
- import { useTranslation } from 'react-i18next';
6
- import { type MothersAndChildrenSearchCriteria, useMotherAndChildren } from '../../hooks/useMotherAndChildren';
7
- import { type WardPatientCard } from '../../types';
8
- import WardPatientSkeletonText from '../row-elements/ward-pateint-skeleton-text';
9
- import WardPatientAge from '../row-elements/ward-patient-age';
10
- import WardPatientIdentifier from '../row-elements/ward-patient-identifier';
11
- import WardPatientLocation from '../row-elements/ward-patient-location';
12
- import WardPatientName from '../row-elements/ward-patient-name';
13
- import wardPatientCardStyles from '../ward-patient-card.scss';
14
- import styles from './mother-child-row.scss';
15
-
16
- const motherAndChildrenRep =
17
- 'custom:(childAdmission,mother:(person,identifiers:full,uuid),child:(person,identifiers:full,uuid),motherAdmission)';
18
-
19
- /**
20
- * This extension displays the mother or children of the patient in the patient card.
21
- *
22
- * @param param0
23
- * @returns
24
- */
25
- const MotherChildRowExtension: WardPatientCard = ({ patient }) => {
26
- const { t } = useTranslation();
27
-
28
- const getChildrenRequestParams: MothersAndChildrenSearchCriteria = {
29
- mothers: [patient.uuid],
30
- requireMotherHasActiveVisit: true,
31
- requireChildHasActiveVisit: true,
32
- requireChildBornDuringMothersActiveVisit: true,
33
- };
34
-
35
- const getMotherRequestParams: MothersAndChildrenSearchCriteria = {
36
- children: [patient.uuid],
37
- requireMotherHasActiveVisit: true,
38
- requireChildHasActiveVisit: true,
39
- requireChildBornDuringMothersActiveVisit: true,
40
- };
41
-
42
- const {
43
- data: childrenData,
44
- isLoading: isLoadingChildrenData,
45
- error: childrenDataError,
46
- } = useMotherAndChildren(getChildrenRequestParams, true, motherAndChildrenRep);
47
- const {
48
- data: motherData,
49
- isLoading: isLoadingMotherData,
50
- error: motherDataError,
51
- } = useMotherAndChildren(getMotherRequestParams, true, motherAndChildrenRep);
52
-
53
- if (isLoadingChildrenData || isLoadingMotherData) {
54
- return (
55
- <div className={classNames(styles.motherOrBabyRow, wardPatientCardStyles.wardPatientCardRow)}>
56
- <WardPatientSkeletonText />
57
- </div>
58
- );
59
- } else if (childrenDataError) {
60
- return (
61
- <InlineNotification
62
- kind="warning"
63
- lowContrast={true}
64
- title={t('errorLoadingChildren', 'Error loading children info')}
65
- />
66
- );
67
- } else if (motherDataError) {
68
- return (
69
- <InlineNotification
70
- kind="warning"
71
- lowContrast={true}
72
- title={t('errorLoadingChildren', 'Error loading mother info')}
73
- />
74
- );
75
- }
76
-
77
- return (
78
- <>
79
- {[...childrenData, ...motherData]?.map(({ mother, motherAdmission, child, childAdmission }) => {
80
- // patient A is the patient card's patient
81
- const patientA = patient;
82
- // patient B is either the mother or the child of patient A
83
- const isPatientBTheMother = mother.uuid != patientA.uuid;
84
- const patientB = isPatientBTheMother ? mother : child;
85
-
86
- // we display patient B here
87
- const Icon = isPatientBTheMother ? MotherIcon : BabyIcon;
88
- const patientBAdmission = isPatientBTheMother ? motherAdmission : childAdmission;
89
-
90
- return (
91
- <div
92
- key={patientB.uuid}
93
- className={classNames(styles.motherOrBabyRow, wardPatientCardStyles.wardPatientCardRow)}>
94
- <div className={styles.motherOrBabyIconDiv}>
95
- <Icon className={styles.motherOrBabyIcon} size={24} />
96
- </div>
97
- <div className={classNames(styles.motherOrBabyRowElementsDiv, wardPatientCardStyles.dotSeparatedChildren)}>
98
- <WardPatientName patient={patientB} />
99
- <WardPatientIdentifier patient={patientB} />
100
- <WardPatientAge patient={patientB} />
101
- <WardPatientLocation inpatientAdmission={patientBAdmission} />
102
- </div>
103
- </div>
104
- );
105
- })}
106
- </>
107
- );
108
- };
109
-
110
- export default MotherChildRowExtension;