@openmrs/esm-dispensing-app 1.8.1-pre.656 → 1.8.1-pre.658

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.
@@ -0,0 +1 @@
1
+ {"hash":"b23894c6bbc4e929","duration":41976}
@@ -17,10 +17,10 @@ orphan modules 9.03 MiB [orphan] 3068 modules
17
17
  runtime modules 43 KiB 28 modules
18
18
  built modules 8.17 MiB (javascript) 378 bytes (share-init) 378 bytes (consume-shared) [built]
19
19
  modules by path ./node_modules/ 7.49 MiB 605 modules
20
- modules by path ./translations/ 137 KiB
20
+ modules by path ./translations/ 138 KiB
21
21
  ./translations/ lazy nonrecursive .json$ 160 bytes [built] [code generated]
22
22
  + 39 modules
23
- modules by path ./src/ 557 KiB 28 modules
23
+ modules by path ./src/ 558 KiB 28 modules
24
24
  provide-module modules 378 bytes 9 modules
25
25
  consume-shared-module modules 378 bytes
26
26
  modules by path consume shared module (default) @openmrs/ 84 bytes 2 modules
@@ -40,4 +40,4 @@ Entrypoints:
40
40
  main (556 KiB)
41
41
  main.js
42
42
 
43
- webpack 5.99.9 compiled with 2 warnings in 41167 ms
43
+ webpack 5.99.9 compiled with 2 warnings in 39747 ms
package/dist/4099.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[4099],{10452:(e,n,t)=>{t.d(n,{A:()=>s});var i=t(54991),a=t.n(i),o=t(76314),r=t.n(o)()(a());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-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ{display:flex;flex-direction:column;padding-bottom:10px}.-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ .cds--css-grid{padding-left:0 !important;padding-right:0 !important}.-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn{display:flex;flex-direction:row;flex:1;gap:1rem}.-esm-dispensing__medication-dispense-review__substitutionReason___efxL5{width:100%}.-esm-dispensing__medication-dispense-review__substitutionType___dK\\+H9{width:100%}.-esm-dispensing__medication-dispense-review__productiveHeading02___\\+\\+vqK,.-esm-dispensing__medication-dispense-review__formGroup___KjyuB span{color:#525252;font-size:var(--cds-heading-02-font-size, 1rem);font-weight:var(--cds-heading-02-font-weight, 600);line-height:var(--cds-heading-02-line-height, 1.5);letter-spacing:var(--cds-heading-02-letter-spacing, 0)}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#f4f4f4}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#fff}.-esm-dispensing__medication-dispense-review__formGroup___KjyuB{display:flex;margin-bottom:.25rem;padding:1rem}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>span{flex:1}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>div{flex:3}.-esm-dispensing__medication-dispense-review__patientInfo___BsSmN{position:sticky;z-index:1000;background-color:#fff;top:3rem;overflow-y:auto}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:row}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:column}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{display:flex;position:sticky;bottom:0;width:100%}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{padding:1rem 1.5rem;background-color:#fff}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4 button{max-width:none;width:50%;height:4rem;align-items:flex-start}.-esm-dispensing__medication-dispense-review__quantitySummary___WanAL{display:flex;flex-direction:column;font-size:.8rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-dispense-review.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,wFACE,YAAA,CACA,qBAAA,CACA,mBAAA,CAEA,uGACE,yBAAA,CACA,0BAAA,CAIJ,+EACE,YAAA,CACA,kBAAA,CACA,MAAA,CACA,QCYW,CDTb,yEACE,UAAA,CAGF,wEACE,UAAA,CAGF,iJACE,aDpBc,CGu1BZ,+CAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CF/zBJ,8FACE,wBDfwB,CCkB1B,6FACE,qBDrCM,CCwCR,gEACE,YAAA,CACA,oBC7BW,CD8BX,YCfW,CDkBb,iGACE,MAAA,CAGF,gGACE,MAAA,CAOF,kEACE,eAAA,CACA,YAAA,CACA,qBD7DM,CC8DN,QCdW,CDeX,eAAA,CAGF,4FACE,kBAAA,CAGF,2FACE,qBAAA,CAGF,kEACE,YAAA,CACA,eAAA,CACA,QAAA,CACA,UAAA,CAGF,8FACE,mBAAA,CACA,qBDnFM,CCsFR,yEACE,cAAA,CACA,SAAA,CACA,WCpCW,CDqCX,sBAAA,CAGF,sEACE,YAAA,CACA,qBAAA,CACA,eAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.medicationDispenseReviewContainer {\n display: flex;\n flex-direction: column;\n padding-bottom: 10px;\n\n :global(.cds--css-grid) {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n\n.dispenseDetailsContainer {\n display: flex;\n flex-direction: row;\n flex: 1;\n gap: layout.$spacing-05;\n}\n\n.substitutionReason {\n width: 100%;\n}\n\n.substitutionType {\n width: 100%;\n}\n\n.productiveHeading02 {\n color: $color-gray-70;\n @include type.type-style('heading-02');\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formWrapper {\n background-color: $openmrs-background-grey;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formWrapper {\n background-color: $ui-02;\n}\n\n.formGroup {\n display: flex;\n margin-bottom: layout.$spacing-02;\n padding: layout.$spacing-05;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > span {\n flex: 1;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > div {\n flex: 3;\n}\n\n.formGroup span {\n @extend .productiveHeading02;\n}\n\n.patientInfo {\n position: sticky;\n z-index: 1000;\n background-color: $ui-02;\n top: layout.$spacing-09;\n overflow-y: auto;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup {\n flex-direction: row;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formGroup {\n flex-direction: column;\n}\n\n.buttonGroup {\n display: flex;\n position: sticky;\n bottom: 0;\n width: 100%;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .buttonGroup {\n padding: layout.$spacing-05 layout.$spacing-06;\n background-color: $ui-02;\n}\n\n.buttonGroup button {\n max-width: none;\n width: 50%;\n height: layout.$spacing-10;\n align-items: flex-start;\n}\n\n.quantitySummary {\n display: flex;\n flex-direction: column;\n font-size: 0.8rem;\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={medicationDispenseReviewContainer:"-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ",dispenseDetailsContainer:"-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn",substitutionReason:"-esm-dispensing__medication-dispense-review__substitutionReason___efxL5",substitutionType:"-esm-dispensing__medication-dispense-review__substitutionType___dK+H9",productiveHeading02:"-esm-dispensing__medication-dispense-review__productiveHeading02___++vqK",formGroup:"-esm-dispensing__medication-dispense-review__formGroup___KjyuB",formWrapper:"-esm-dispensing__medication-dispense-review__formWrapper___NIVKI",patientInfo:"-esm-dispensing__medication-dispense-review__patientInfo___BsSmN",buttonGroup:"-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4",quantitySummary:"-esm-dispensing__medication-dispense-review__quantitySummary___WanAL"};const s=r},54099:(e,n,t)=>{t.r(n),t.d(n,{default:()=>V});var i=t(16072),a=t.n(i),o=t(53941),r=t(78792),s=t(25987),l=t(27042),c=t(9806),p=t(92177);function d(e,n,t,i,a,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(i,a)}function u(e,n){return(t=function(){return function(e,n){var t,i,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=s(0),r.throw=s(1),r.return=s(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(o=0)),o;)try{if(t=1,i&&(a=2&s[0]?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],i=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,s.openmrsFetch)("/ws/rest/v1/stockmanagement/dispenserequest",{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({dispenseItems:[e]})})];case 1:return[2,t.sent()]}}))},function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function r(e){d(o,i,a,r,s,"next",e)}function s(e){d(o,i,a,r,s,"throw",e)}r(void 0)}))})();var t}var f=t(24756),g=t(85316),m=t(70231),y=t.n(m),h=t(50930),b=t(40771),v=t(85072),$=t.n(v),A=t(97825),w=t.n(A),k=t(77659),x=t.n(k),_=t(55056),C=t.n(_),z=t(10540),E=t.n(z),S=t(41113),D=t.n(S),I=t(61888),M={};M.styleTagTransform=D(),M.setAttributes=C(),M.insert=x().bind(null,"head"),M.domAPI=w(),M.insertStyleElement=E(),$()(I.A,M);const T=I.A&&I.A.locals?I.A.locals:void 0,q=function(e){var n=e.medication,t=e.editAction;return a().createElement(r.FAs,{className:T.medicationTile},a().createElement("p",{className:T.medicationName},a().createElement("strong",null,(0,c.Q0)(n))),t&&a().createElement(b.ff,{onClick:t}))};var B=t(10452),N={};N.styleTagTransform=D(),N.setAttributes=C(),N.insert=x().bind(null,"head"),N.domAPI=w(),N.insertStyleElement=E(),$()(B.A,N);const R=B.A&&B.A.locals?B.A.locals:void 0;function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(n){j(e,n,t[n])}))}return e}function G(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function P(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 i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||W(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 U(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,n){if(e){if("string"==typeof e)return O(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)?O(e,n):void 0}}const Q=function(e){var n,t,l,d,u,m,b,v,$,A,w,k,x,_,C,z,E,S,D,I,M,T,B=e.medicationDispense,N=e.updateMedicationDispense,O=e.quantityRemaining,j=e.quantityDispensed,W=(0,o.useTranslation)().t,Q=(0,s.useConfig)(),L=(0,s.useSession)(),H=P((0,i.useState)(!1),2),K=H[0],Y=H[1],V=P((0,i.useState)(!1),2),Z=V[0],J=V[1],X=P((0,i.useState)([]),2),ee=X[0],ne=X[1],te=P((0,i.useState)([]),2),ie=te[0],ae=te[1],oe=P((0,i.useState)([]),2),re=oe[0],se=oe[1],le=P((0,i.useState)([]),2),ce=le[0],pe=le[1],de=P((0,i.useState)([]),2),ue=de[0],fe=de[1],ge=P((0,i.useState)([]),2),me=ge[0],ye=ge[1],he=P((0,i.useState)(B.quantity.value),2),be=he[0],ve=(he[1],P((0,i.useState)(!1),2)),$e=ve[0],Ae=ve[1],we=((0,s.useLayoutType)(),Q.dispenseBehavior.allowModifyingPrescription),ke=(0,f.E)().orderConfigObject,xe=(0,f.ij)(Q.valueSets.substitutionType.uuid).substitutionTypeValueSet,_e=(0,f.Sj)(Q.valueSets.substitutionReason.uuid).substitutionReasonValueSet,Ce=(0,f.u9)(Q.dispenserProviderRoles),ze=(0,g.uc)(B.authorizingPrescription?B.authorizingPrescription[0].reference:null,Q.refreshInterval).medicationRequest,Ee=(0,g.IQ)(ze?ze.encounter.reference:null).prescriptionDate;(0,i.useEffect)((function(){if(ke){var e=re.map((function(e){return e.id})),n=[];ke.drugRoutes.forEach((function(t){return e.includes(t.uuid)||n.push({id:t.uuid,text:t.display})})),se(U(re).concat(U(n)));var t=ee.map((function(e){return e.id})),i=[];ke.drugDosingUnits.forEach((function(e){return t.includes(e.uuid)||i.push({id:e.uuid,text:e.display})})),ne(U(ee).concat(U(i)));var a=ie.map((function(e){return e.id})),o=[];ke.drugDispensingUnits.forEach((function(e){return a.includes(e.uuid)||o.push({id:e.uuid,text:e.display})})),ae(U(ie).concat(U(o)));var r=ce.map((function(e){return e.id})),s=[];ke.orderFrequencies.forEach((function(e){return r.includes(e.uuid)||s.push({id:e.uuid,text:e.display})})),pe(U(ce).concat(U(s)))}}),[ie,ee,re,ke,ce]),(0,i.useEffect)((function(){var e,n=[];if(null==xe||null===(e=xe.compose)||void 0===e?void 0:e.include){var t,i=xe.compose.include.find((function(e){return!e.system}));i&&(null===(t=i.concept)||void 0===t||t.forEach((function(e){return n.push({id:e.code,text:e.display})}))),n.sort((function(e,n){return e.text.localeCompare(n.text)}))}fe(n)}),[xe]),(0,i.useEffect)((function(){var e,n=[];if(null==_e||null===(e=_e.compose)||void 0===e?void 0:e.include){var t,i=_e.compose.include.find((function(e){return!e.system}));i&&(null===(t=i.concept)||void 0===t||t.forEach((function(e){return n.push({id:e.code,text:e.display})}))),n.sort((function(e,n){return e.text.localeCompare(n.text)}))}ye(n)}),[_e]);var Se,De,Ie,Me=(0,c.M$)(null===(t=(0,c.H_)(B))||void 0===t||null===(n=t.medicationCodeableConcept)||void 0===n?void 0:n.coding),Te=function(e,n){var t=(0,p.Ay)(e||!n?null:"".concat(s.fhirBaseUrl,"/").concat(n),s.openmrsFetch).data;return{medicationCodeableConceptUuid:t?(0,c.M$)(t.data.code.coding):null}}(Me,null===(l=(0,c.H_)(B).medicationReference)||void 0===l?void 0:l.reference).medicationCodeableConceptUuid,qe=(Se=Me||Te||null,Ie=(0,p.Ay)(Se?(0,c.bP)(Se):null,s.openmrsFetch).data,(null==Ie||null===(De=Ie.data)||void 0===De?void 0:De.entry)?{medicationFormulations:Ie.data.entry.map((function(e){return e.resource}))}:{}).medicationFormulations;(0,i.useEffect)((function(){var e,n;(null==ze||null===(e=ze.medicationReference)||void 0===e?void 0:e.reference)&&(null==B||null===(n=B.medicationReference)||void 0===n?void 0:n.reference)&&ze.medicationReference.reference!=B.medicationReference.reference?(J(!0),N(G(F({},B),{substitution:G(F({},B.substitution),{wasSubstituted:!0})}))):(J(!1),N(G(F({},B),{substitution:{wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}})))}),[B,ze,N]),(0,i.useEffect)((function(){Ae((null==L?void 0:L.user)&&(0,s.userHasAccess)(h.py,L.user))}),[L]);var Be=(0,i.useMemo)((function(){var e,n,t,i,a,o,r;return(null==B||null===(t=B.performer)||void 0===t||null===(n=t[0])||void 0===n||null===(e=n.actor)||void 0===e?void 0:e.reference)?null==Ce?void 0:Ce.find((function(e){return e.uuid===B.performer[0].actor.reference.split("/")[1]})):(null==L||null===(i=L.currentProvider)||void 0===i?void 0:i.uuid)?{uuid:L.currentProvider.uuid,person:{display:null!==(r=null==L||null===(o=L.user)||void 0===o||null===(a=o.person)||void 0===a?void 0:a.display)&&void 0!==r?r:""}}:void 0}),[null==B?void 0:B.performer,Ce,null==L||null===(d=L.currentProvider)||void 0===d?void 0:d.uuid,null==L||null===(m=L.user)||void 0===m||null===(u=m.person)||void 0===u?void 0:u.display]);return(0,i.useEffect)((function(){(null==Be?void 0:Be.uuid)&&N(G(F({},B),{performer:[{actor:{reference:"Practitioner/".concat(Be.uuid)}}]}))}),[Be,B,N]),a().createElement("div",{className:R.medicationDispenseReviewContainer},a().createElement(r.BJc,{gap:5},K?a().createElement(s.ResponsiveWrapper,null,a().createElement(r.msM,{id:"medicationFormulation",items:qe,itemToString:function(e){return(0,c.Qz)(e)},initialSelectedItem:F({},null==qe?void 0:qe.find((function(e){var n;return e.id===(null===(n=B.medicationReference)||void 0===n?void 0:n.reference.split("/")[1])}))),titleText:W("medicationFormulation","Medication Formulation"),label:W("medicationFormulation","Medication Formulation"),onChange:function(e){var n=e.selectedItem;N(G(F({},B),{medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+(null==n?void 0:n.id),display:(0,c.Qz)(n)}})),Y(!1)}})):a().createElement(q,{medication:(0,c.H_)(B),editAction:$e&&we?function(){return Y(!0)}:null}),Z&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{className:R.substitutionType,id:"substitutionType",items:ue,titleText:W("substitutionType","Type of substitution"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(v=B.substitution.type)||void 0===v||null===(b=v.coding[0])||void 0===b?void 0:b.code,text:null===($=B.substitution.type)||void 0===$?void 0:$.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{substitution:G(F({},B.substitution),{type:{coding:[{code:null==n?void 0:n.id}]}})}))}}))),Z&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{className:R.substitutionReason,id:"substitutionReason",items:me,titleText:W("substitutionReason","Reason for substitution"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(w=B.substitution.reason[0])||void 0===w||null===(A=w.coding[0])||void 0===A?void 0:A.code,text:null===(k=B.substitution.reason[0])||void 0===k?void 0:k.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{substitution:G(F({},B.substitution),{reason:[{coding:[{code:null==n?void 0:n.id}]}]})}))}}))),a().createElement(s.ResponsiveWrapper,null,a().createElement("div",null,a().createElement("p",{className:R.quantitySummary},W("quantityPrescribed","Quantity Prescribed"),":",be),a().createElement("p",{className:R.quantitySummary},W("quantityDispensed","Quantity Dispensed"),": ",j),Q.dispenseBehavior.restrictTotalQuantityDispensed?a().createElement("p",{className:R.quantitySummary},W("quantityRemaining","Quantity Remaining to Dispense"),":",O):null)),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Q7x,{allowEmpty:!0,value:0,disabled:!$e,hideSteppers:!0,id:"quantity",invalidText:W("numberIsNotValid","Number is not valid"),label:a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"}},W("quantity","Quantity")),min:0,max:Q.dispenseBehavior.restrictTotalQuantityDispensed?O:void 0,onChange:function(e,n){N(G(F({},B),{quantity:G(F({},B.quantity),{value:n.value?parseFloat(n.value.toString()):""})}))}}),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"quantityUnits",disabled:!$e||!we,items:ie,titleText:W("drugDispensingUnit","Dispensing unit"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:B.quantity.code,text:B.quantity.unit},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{quantity:{value:B.quantity.value,code:null==n?void 0:n.id}}))},required:!0}))),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Q7x,{allowEmpty:!1,disabled:!$e||!we,hideSteppers:!0,id:"dosingQuanity",invalidText:W("numberIsNotValid","Number is not valid"),min:0,label:W("dose","Dose"),value:B.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:function(e,n){N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{doseAndRate:[G(F({},B.dosageInstruction[0].doseAndRate[0]),{doseQuantity:G(F({},B.dosageInstruction[0].doseAndRate[0].doseQuantity),{value:n.value?parseFloat(n.value.toString()):""})})]})]}))}}),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"dosingUnits",disabled:!$e||!we,items:ee,titleText:W("doseUnit","Dose unit"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(x=B.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===x?void 0:x.code,text:null===(_=B.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===_?void 0:_.unit},onChange:function(e){var n,t=e.selectedItem;N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{doseAndRate:[{doseQuantity:{value:null===(n=B.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===n?void 0:n.value,code:null==t?void 0:t.id}}]})]}))},required:!0})),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"editRoute",disabled:!$e||!we,items:re,initialSelectedItem:{id:null===(z=B.dosageInstruction[0].route)||void 0===z||null===(C=z.coding[0])||void 0===C?void 0:C.code,text:null===(E=B.dosageInstruction[0].route)||void 0===E?void 0:E.text},titleText:W("route","Route"),itemToString:function(e){return null==e?void 0:e.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{route:{coding:[{code:null==n?void 0:n.id}]}})]}))},required:!0}))),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"frequency",disabled:!$e||!we,items:ce,initialSelectedItem:{id:null===(I=B.dosageInstruction[0].timing)||void 0===I||null===(D=I.code)||void 0===D||null===(S=D.coding[0])||void 0===S?void 0:S.code,text:null===(T=B.dosageInstruction[0].timing)||void 0===T||null===(M=T.code)||void 0===M?void 0:M.text},titleText:W("frequency","Frequency"),itemToString:function(e){return null==e?void 0:e.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{timing:G(F({},B.dosageInstruction[0].timing),{code:{coding:[{code:null==n?void 0:n.id}]}})})]}))},required:!0})),a().createElement(r.fs1,{labelText:W("patientInstructions","Patient instructions"),value:B.dosageInstruction[0].text,maxLength:65535,onChange:function(e){N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{text:e.target.value})]}))}}),a().createElement(s.OpenmrsDatePicker,{id:"dispenseDate",labelText:W("dispenseDate","Date of Dispense"),minDate:Ee?y()(Ee).startOf("day").toDate():null,maxDate:y()().toDate(),onChange:function(e){var n=B.whenHandedOver?y()(B.whenHandedOver):null,t=y()(e);N(G(F({},B),{whenHandedOver:(null==n?void 0:n.isSame(t,"day"))?n.toISOString():t.toISOString()}))},value:y()(B.whenHandedOver).toDate()}),Ce&&a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"dispenser",initialSelectedItem:Be,onChange:function(e){var n=e.selectedItem;N(G(F({},B),{performer:[{actor:{reference:"Practitioner/".concat(null==n?void 0:n.uuid)}}]}))},items:Ce,itemToString:function(e){var n;return null==e||null===(n=e.person)||void 0===n?void 0:n.display},required:!0,titleText:W("dispensedBy","Dispensed by")}))))},L=function(e){var n,t,i=e.medicationDispense,l=e.updateInventoryItem,c=(0,o.useTranslation)().t,d=(0,s.useConfig)(),u=function(e){var n,t,i,a,o=(0,s.useSession)(),r="/ws/rest/v1/stockmanagement/stockiteminventory?v=default&totalCount=true&drugUuid=".concat(e,"&includeBatchNo=true&groupBy=LocationStockItemBatchNo&dispenseLocationUuid=").concat(null==o||null===(n=o.sessionLocation)||void 0===n?void 0:n.uuid,"&includeStrength=1&includeConceptRefIds=1&emptyBatch=1&emptyBatchLocationUuid=").concat(null==o||null===(t=o.sessionLocation)||void 0===t?void 0:t.uuid,"&dispenseAtLocation=1"),l=(0,p.Ay)(r,s.openmrsFetch),c=l.data,d=l.error,u=l.isLoading;return{inventoryItems:null!==(a=null==c||null===(i=c.data)||void 0===i?void 0:i.results)&&void 0!==a?a:[],error:d,isLoading:u}}(null==i||null===(t=i.medicationReference)||void 0===t||null===(n=t.reference)||void 0===n?void 0:n.split("/")[1]),f=u.inventoryItems,g=u.error,m=u.isLoading,y=f.filter((function(e){return n=i,t=e,void 0!==d&&!d.validateBatch||!!((null==n?void 0:n.dosageInstruction)&&(null==n?void 0:n.dosageInstruction.length)>0)&&n.dosageInstruction.some((function(e){var n,i,a,o,r;if((null===(i=e.timing)||void 0===i||null===(n=i.repeat)||void 0===n?void 0:n.duration)&&(null===(o=e.timing)||void 0===o||null===(a=o.repeat)||void 0===a?void 0:a.durationUnit)&&t.quantity>0){var s=e.timing.repeat.durationUnit,l=e.timing.repeat.duration,c=new Date;switch(s){case"s":c.setSeconds(c.getSeconds()+l);break;case"min":c.setMinutes(c.getMinutes()+l);break;case"h":c.setHours(c.getHours()+l);break;case"d":c.setDate(c.getDate()+l);break;case"wk":c.setDate(c.getDate()+7*l);break;case"mo":c.setMonth(c.getMonth()+l);break;case"y":c.setFullYear(c.getFullYear()+l);break;default:return!1}return r=t.expiration,new Date(r)>c}return!1}));var n,t})).sort((function(e,n){return new Date(e.expiration).getTime()-new Date(n.expiration).getTime()}));return g?a().createElement(r.jeF,{"aria-label":"closes notification",kind:"error",lowContrast:!0,statusIconDescription:"notification",subtitle:c("errorLoadingInventoryItems","Error fetching inventory items"),title:c("error","Error")}):m?a().createElement(r.OuH,{description:c("loadingInventoryItems","Loading inventory items...")}):a().createElement(r.Wdr,null,a().createElement(r.a32,{id:"stockDispense",items:y,onChange:function(e){var n=e.selectedItem;l(n)},itemToString:function(e){return e?function(e){return c("stockDispenseDetails","Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",{batchNumber:e.batchNumber,quantity:Math.floor(e.quantity),quantityUoM:e.quantityUoM,expiration:(0,s.formatDate)(new Date(e.expiration))})}(e):""},titleText:c("stockDispense","Stock Dispense"),placeholder:c("selectStockDispense","Select stock to dispense from")}))};var H=t(40609);function K(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Y(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 i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return K(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)?K(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const V=function(e){var n=e.medicationDispense,t=e.medicationRequestBundle,p=e.mode,d=e.patientUuid,m=e.encounterUuid,y=e.quantityRemaining,h=e.quantityDispensed,b=e.closeWorkspace,v=e.closeWorkspaceWithSavedChanges,$=(0,o.useTranslation)().t,A=(0,s.usePatient)(d),w=A.patient,k=A.isLoading,x=(0,s.useConfig)(),_=Y((0,i.useState)(),2),C=_[0],z=_[1],E=Y((0,i.useState)(),2),S=E[0],D=E[1],I=Y((0,i.useState)(!1),2),M=I[0],T=I[1],q=Y((0,i.useState)(!1),2),B=q[0],N=q[1];(0,i.useEffect)((function(){return D(n)}),[n]),(0,i.useEffect)((function(){var e,n,t,i,a,o,r,s,l,c,p,d,u,f,g,m;S&&S.performer&&(null===(e=S.performer[0])||void 0===e?void 0:e.actor.reference)&&(null===(n=S.quantity)||void 0===n?void 0:n.value)&&(!y||(null==S||null===(t=S.quantity)||void 0===t?void 0:t.value)<=y)&&(null===(i=S.quantity)||void 0===i?void 0:i.code)&&(null===(r=S.dosageInstruction[0])||void 0===r||null===(o=r.doseAndRate[0])||void 0===o||null===(a=o.doseQuantity)||void 0===a?void 0:a.value)&&(null===(c=S.dosageInstruction[0])||void 0===c||null===(l=c.doseAndRate[0])||void 0===l||null===(s=l.doseQuantity)||void 0===s?void 0:s.code)&&(null===(d=S.dosageInstruction[0])||void 0===d||null===(p=d.route)||void 0===p?void 0:p.coding[0].code)&&(null===(f=S.dosageInstruction[0])||void 0===f||null===(u=f.timing)||void 0===u?void 0:u.code.coding[0].code)&&(!S.substitution.wasSubstituted||(null===(g=S.substitution.reason[0])||void 0===g?void 0:g.coding[0].code)&&(null===(m=S.substitution.type)||void 0===m?void 0:m.coding[0].code))?T(!0):T(!1)}),[S,y,C]);var R=!!x.enableStockDispense&&!C||!M||B,O=(0,i.useMemo)((function(){if(w)return{patient:w,patientUuid:d,hideActionsOverflow:!0}}),[w,d]);return a().createElement(r.lVW,{className:H.A.formWrapper},a().createElement("div",null,k&&a().createElement(r.OuH,{className:H.A.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),w&&a().createElement(s.ExtensionSlot,{name:"patient-header-slot",state:O}),a().createElement("section",{className:H.A.formGroup},a().createElement(r.lRv,null,$(x.dispenseBehavior.allowModifyingPrescription?"drugHelpText":"drugHelpTextNoEdit",x.dispenseBehavior.allowModifyingPrescription?"You may edit the formulation and quantity dispensed here":"You may edit quantity dispensed here")),S?a().createElement("div",null,a().createElement(Q,{medicationDispense:S,updateMedicationDispense:D,quantityRemaining:y,quantityDispensed:h}),x.enableStockDispense&&a().createElement(L,{inventoryItem:C,medicationDispense:n,updateInventoryItem:z})):null)),a().createElement("section",{className:H.A.buttonGroup},a().createElement(r.$nd,{disabled:B,onClick:function(){return b()},kind:"secondary"},(0,s.getCoreTranslation)("cancel","Cancel")),a().createElement(r.$nd,{disabled:R,onClick:function(){if(!B){N(!0);var e=new AbortController;(0,f.A7)(S,l.NV.completed,e).then((function(e){if(e.ok){var n=(0,c._e)(S,t,x.dispenseBehavior.restrictTotalQuantityDispensed);if((0,c.Qm)(t.request)!==n)return(0,g.NT)((0,c.vj)(S.authorizingPrescription[0].reference),n)}return e})).then((function(n){var t=n.status;if(x.enableStockDispense&&(201===t||200===t)){var i=function(e,n,t,i){return{dispenseLocation:e.locationUuid,patient:n,order:(0,c.vj)(i.authorizingPrescription[0].reference),encounter:t,stockItem:null==e?void 0:e.stockItemUuid,stockBatch:e.stockBatchUuid,stockItemPackagingUOM:e.quantityUoMUuid,quantity:i.quantity.value}}(C,d,m,S);u(i,e).then((function(){(0,s.showSnackbar)({title:$("stockDispensed","Stock dispensed"),kind:"success",subtitle:$("stockDispensedSuccessfully","Stock dispensed successfully and batch level updated.")})}),(function(e){(0,s.showSnackbar)({title:"Stock dispense error",kind:"error",subtitle:null==e?void 0:e.message})}))}return n})).then((function(e){var n=e.status;201!==n&&200!==n||((0,c.Yi)(m),(0,s.showSnackbar)({kind:"success",subtitle:$("medicationListUpdated","Medication dispense list has been updated."),title:$("enter"===p?"medicationDispensed":"medicationDispenseUpdated","enter"===p?"Medication successfully dispensed.":"Dispense record successfully updated.")}),v())}),(function(e){(0,s.showSnackbar)({kind:"error",title:$("enter"===p?"medicationDispenseError":"medicationDispenseUpdatedError","enter"===p?"Error dispensing medication.":"Error updating dispense record"),subtitle:null==e?void 0:e.message}),N(!1)}))}}},$("enter"===p?"dispensePrescription":"saveChanges","enter"===p?"Dispense prescription":"Save changes"))))}},61888:(e,n,t)=>{t.d(n,{A:()=>s});var i=t(54991),a=t.n(i),o=t(76314),r=t.n(o)()(a());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-dispensing__medication-card__medicationTile___\\+t2rW{display:flex;flex-direction:row;justify-content:space-between;width:100%;margin:.125rem 0 .5rem;padding:0 .5rem 0 .5rem;background-color:#fff;border-left:.25rem solid var(--brand-03);color:#525252;margin-bottom:1rem !important}.-esm-dispensing__medication-card__medicationName___-EM\\+N{font-size:1rem !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-card.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,2DACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,sBAAA,CACA,uBAAA,CACA,qBAAA,CACA,wCAAA,CACA,aDNQ,CCOR,6BAAA,CAGF,2DACE,yBAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.medicationTile {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n margin: layout.$spacing-01 0 layout.$spacing-03;\n padding: 0 layout.$spacing-03 0 layout.$spacing-03;\n background-color: #fff;\n border-left: layout.$spacing-02 solid var(--brand-03);\n color: $text-02;\n margin-bottom: layout.$spacing-05 !important;\n}\n\n.medicationName {\n font-size: layout.$spacing-05 !important;\n}\n"],sourceRoot:""}]),r.locals={medicationTile:"-esm-dispensing__medication-card__medicationTile___+t2rW",medicationName:"-esm-dispensing__medication-card__medicationName___-EM+N"};const s=r}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[4099],{10452:(e,n,t)=>{t.d(n,{A:()=>s});var i=t(54991),a=t.n(i),o=t(76314),r=t.n(o)()(a());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-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ{display:flex;flex-direction:column;padding-bottom:10px}.-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ .cds--css-grid{padding-left:0 !important;padding-right:0 !important}.-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn{display:flex;flex-direction:row;flex:1;gap:1rem}.-esm-dispensing__medication-dispense-review__substitutionReason___efxL5{width:100%}.-esm-dispensing__medication-dispense-review__substitutionType___dK\\+H9{width:100%}.-esm-dispensing__medication-dispense-review__productiveHeading02___\\+\\+vqK,.-esm-dispensing__medication-dispense-review__formGroup___KjyuB span{color:#525252;font-size:var(--cds-heading-02-font-size, 1rem);font-weight:var(--cds-heading-02-font-weight, 600);line-height:var(--cds-heading-02-line-height, 1.5);letter-spacing:var(--cds-heading-02-letter-spacing, 0)}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#f4f4f4}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#fff}.-esm-dispensing__medication-dispense-review__formGroup___KjyuB{display:flex;margin-bottom:.25rem;padding:1rem}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>span{flex:1}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>div{flex:3}.-esm-dispensing__medication-dispense-review__patientInfo___BsSmN{position:sticky;z-index:1000;background-color:#fff;top:3rem;overflow-y:auto}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:row}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:column}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{display:flex;position:sticky;bottom:0;width:100%}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{padding:1rem 1.5rem;background-color:#fff}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4 button{max-width:none;width:50%;height:4rem;align-items:flex-start}.-esm-dispensing__medication-dispense-review__quantitySummary___WanAL{display:flex;flex-direction:column;font-size:.8rem}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-dispense-review.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,wFACE,YAAA,CACA,qBAAA,CACA,mBAAA,CAEA,uGACE,yBAAA,CACA,0BAAA,CAIJ,+EACE,YAAA,CACA,kBAAA,CACA,MAAA,CACA,QCYW,CDTb,yEACE,UAAA,CAGF,wEACE,UAAA,CAGF,iJACE,aDpBc,CGu1BZ,+CAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CF/zBJ,8FACE,wBDfwB,CCkB1B,6FACE,qBDrCM,CCwCR,gEACE,YAAA,CACA,oBC7BW,CD8BX,YCfW,CDkBb,iGACE,MAAA,CAGF,gGACE,MAAA,CAOF,kEACE,eAAA,CACA,YAAA,CACA,qBD7DM,CC8DN,QCdW,CDeX,eAAA,CAGF,4FACE,kBAAA,CAGF,2FACE,qBAAA,CAGF,kEACE,YAAA,CACA,eAAA,CACA,QAAA,CACA,UAAA,CAGF,8FACE,mBAAA,CACA,qBDnFM,CCsFR,yEACE,cAAA,CACA,SAAA,CACA,WCpCW,CDqCX,sBAAA,CAGF,sEACE,YAAA,CACA,qBAAA,CACA,eAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.medicationDispenseReviewContainer {\n display: flex;\n flex-direction: column;\n padding-bottom: 10px;\n\n :global(.cds--css-grid) {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n\n.dispenseDetailsContainer {\n display: flex;\n flex-direction: row;\n flex: 1;\n gap: layout.$spacing-05;\n}\n\n.substitutionReason {\n width: 100%;\n}\n\n.substitutionType {\n width: 100%;\n}\n\n.productiveHeading02 {\n color: $color-gray-70;\n @include type.type-style('heading-02');\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formWrapper {\n background-color: $openmrs-background-grey;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formWrapper {\n background-color: $ui-02;\n}\n\n.formGroup {\n display: flex;\n margin-bottom: layout.$spacing-02;\n padding: layout.$spacing-05;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > span {\n flex: 1;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > div {\n flex: 3;\n}\n\n.formGroup span {\n @extend .productiveHeading02;\n}\n\n.patientInfo {\n position: sticky;\n z-index: 1000;\n background-color: $ui-02;\n top: layout.$spacing-09;\n overflow-y: auto;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup {\n flex-direction: row;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formGroup {\n flex-direction: column;\n}\n\n.buttonGroup {\n display: flex;\n position: sticky;\n bottom: 0;\n width: 100%;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .buttonGroup {\n padding: layout.$spacing-05 layout.$spacing-06;\n background-color: $ui-02;\n}\n\n.buttonGroup button {\n max-width: none;\n width: 50%;\n height: layout.$spacing-10;\n align-items: flex-start;\n}\n\n.quantitySummary {\n display: flex;\n flex-direction: column;\n font-size: 0.8rem;\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={medicationDispenseReviewContainer:"-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ",dispenseDetailsContainer:"-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn",substitutionReason:"-esm-dispensing__medication-dispense-review__substitutionReason___efxL5",substitutionType:"-esm-dispensing__medication-dispense-review__substitutionType___dK+H9",productiveHeading02:"-esm-dispensing__medication-dispense-review__productiveHeading02___++vqK",formGroup:"-esm-dispensing__medication-dispense-review__formGroup___KjyuB",formWrapper:"-esm-dispensing__medication-dispense-review__formWrapper___NIVKI",patientInfo:"-esm-dispensing__medication-dispense-review__patientInfo___BsSmN",buttonGroup:"-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4",quantitySummary:"-esm-dispensing__medication-dispense-review__quantitySummary___WanAL"};const s=r},54099:(e,n,t)=>{t.r(n),t.d(n,{default:()=>V});var i=t(16072),a=t.n(i),o=t(53941),r=t(78792),s=t(25987),l=t(27042),c=t(9806),p=t(92177);function d(e,n,t,i,a,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(i,a)}function u(e,n){return(t=function(){return function(e,n){var t,i,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=s(0),r.throw=s(1),r.return=s(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(o=0)),o;)try{if(t=1,i&&(a=2&s[0]?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],i=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,s.openmrsFetch)("/ws/rest/v1/stockmanagement/dispenserequest",{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({dispenseItems:[e]})})];case 1:return[2,t.sent()]}}))},function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function r(e){d(o,i,a,r,s,"next",e)}function s(e){d(o,i,a,r,s,"throw",e)}r(void 0)}))})();var t}var f=t(24756),g=t(85316),m=t(70231),y=t.n(m),h=t(50930),b=t(40771),v=t(85072),$=t.n(v),A=t(97825),w=t.n(A),k=t(77659),x=t.n(k),_=t(55056),C=t.n(_),z=t(10540),E=t.n(z),S=t(41113),D=t.n(S),I=t(61888),M={};M.styleTagTransform=D(),M.setAttributes=C(),M.insert=x().bind(null,"head"),M.domAPI=w(),M.insertStyleElement=E(),$()(I.A,M);const T=I.A&&I.A.locals?I.A.locals:void 0,q=function(e){var n=e.medication,t=e.editAction;return a().createElement(r.FAs,{className:T.medicationTile},a().createElement("p",{className:T.medicationName},a().createElement("strong",null,(0,c.Q0)(n))),t&&a().createElement(b.ff,{onClick:t}))};var B=t(10452),N={};N.styleTagTransform=D(),N.setAttributes=C(),N.insert=x().bind(null,"head"),N.domAPI=w(),N.insertStyleElement=E(),$()(B.A,N);const R=B.A&&B.A.locals?B.A.locals:void 0;function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(n){j(e,n,t[n])}))}return e}function G(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function P(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 i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||U(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 W(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||U(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,n){if(e){if("string"==typeof e)return O(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)?O(e,n):void 0}}const Q=function(e){var n,t,l,d,u,m,b,v,$,A,w,k,x,_,C,z,E,S,D,I,M,T,B=e.medicationDispense,N=e.updateMedicationDispense,O=e.quantityRemaining,j=e.quantityDispensed,U=(0,o.useTranslation)().t,Q=(0,s.useConfig)(),L=(0,s.useSession)(),H=P((0,i.useState)(!1),2),K=H[0],Y=H[1],V=P((0,i.useState)(!1),2),Z=V[0],J=V[1],X=P((0,i.useState)([]),2),ee=X[0],ne=X[1],te=P((0,i.useState)([]),2),ie=te[0],ae=te[1],oe=P((0,i.useState)([]),2),re=oe[0],se=oe[1],le=P((0,i.useState)([]),2),ce=le[0],pe=le[1],de=P((0,i.useState)([]),2),ue=de[0],fe=de[1],ge=P((0,i.useState)([]),2),me=ge[0],ye=ge[1],he=P((0,i.useState)(B.quantity.value),2),be=he[0],ve=(he[1],P((0,i.useState)(!1),2)),$e=ve[0],Ae=ve[1],we=((0,s.useLayoutType)(),Q.dispenseBehavior.allowModifyingPrescription),ke=(0,f.E)().orderConfigObject,xe=(0,f.ij)(Q.valueSets.substitutionType.uuid).substitutionTypeValueSet,_e=(0,f.Sj)(Q.valueSets.substitutionReason.uuid).substitutionReasonValueSet,Ce=(0,f.u9)(Q.dispenserProviderRoles),ze=(0,g.uc)(B.authorizingPrescription?B.authorizingPrescription[0].reference:null,Q.refreshInterval).medicationRequest,Ee=(0,g.IQ)(ze?ze.encounter.reference:null).prescriptionDate;(0,i.useEffect)((function(){if(ke){var e=re.map((function(e){return e.id})),n=[];ke.drugRoutes.forEach((function(t){return e.includes(t.uuid)||n.push({id:t.uuid,text:t.display})})),se(W(re).concat(W(n)));var t=ee.map((function(e){return e.id})),i=[];ke.drugDosingUnits.forEach((function(e){return t.includes(e.uuid)||i.push({id:e.uuid,text:e.display})})),ne(W(ee).concat(W(i)));var a=ie.map((function(e){return e.id})),o=[];ke.drugDispensingUnits.forEach((function(e){return a.includes(e.uuid)||o.push({id:e.uuid,text:e.display})})),ae(W(ie).concat(W(o)));var r=ce.map((function(e){return e.id})),s=[];ke.orderFrequencies.forEach((function(e){return r.includes(e.uuid)||s.push({id:e.uuid,text:e.display})})),pe(W(ce).concat(W(s)))}}),[ie,ee,re,ke,ce]),(0,i.useEffect)((function(){var e,n=[];if(null==xe||null===(e=xe.compose)||void 0===e?void 0:e.include){var t,i=xe.compose.include.find((function(e){return!e.system}));i&&(null===(t=i.concept)||void 0===t||t.forEach((function(e){return n.push({id:e.code,text:e.display})}))),n.sort((function(e,n){return e.text.localeCompare(n.text)}))}fe(n)}),[xe]),(0,i.useEffect)((function(){var e,n=[];if(null==_e||null===(e=_e.compose)||void 0===e?void 0:e.include){var t,i=_e.compose.include.find((function(e){return!e.system}));i&&(null===(t=i.concept)||void 0===t||t.forEach((function(e){return n.push({id:e.code,text:e.display})}))),n.sort((function(e,n){return e.text.localeCompare(n.text)}))}ye(n)}),[_e]);var Se,De,Ie,Me=(0,c.M$)(null===(t=(0,c.H_)(B))||void 0===t||null===(n=t.medicationCodeableConcept)||void 0===n?void 0:n.coding),Te=function(e,n){var t=(0,p.Ay)(e||!n?null:"".concat(s.fhirBaseUrl,"/").concat(n),s.openmrsFetch).data;return{medicationCodeableConceptUuid:t?(0,c.M$)(t.data.code.coding):null}}(Me,null===(l=(0,c.H_)(B).medicationReference)||void 0===l?void 0:l.reference).medicationCodeableConceptUuid,qe=(Se=Me||Te||null,Ie=(0,p.Ay)(Se?(0,c.bP)(Se):null,s.openmrsFetch).data,(null==Ie||null===(De=Ie.data)||void 0===De?void 0:De.entry)?{medicationFormulations:Ie.data.entry.map((function(e){return e.resource}))}:{}).medicationFormulations;(0,i.useEffect)((function(){var e,n;(null==ze||null===(e=ze.medicationReference)||void 0===e?void 0:e.reference)&&(null==B||null===(n=B.medicationReference)||void 0===n?void 0:n.reference)&&ze.medicationReference.reference!=B.medicationReference.reference?(J(!0),N(G(F({},B),{substitution:G(F({},B.substitution),{wasSubstituted:!0})}))):(J(!1),N(G(F({},B),{substitution:{wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}})))}),[B,ze,N]),(0,i.useEffect)((function(){Ae((null==L?void 0:L.user)&&(0,s.userHasAccess)(h.py,L.user))}),[L]);var Be=(0,i.useMemo)((function(){var e,n,t,i,a,o,r;return(null==B||null===(t=B.performer)||void 0===t||null===(n=t[0])||void 0===n||null===(e=n.actor)||void 0===e?void 0:e.reference)?null==Ce?void 0:Ce.find((function(e){return e.uuid===B.performer[0].actor.reference.split("/")[1]})):(null==L||null===(i=L.currentProvider)||void 0===i?void 0:i.uuid)?{uuid:L.currentProvider.uuid,person:{display:null!==(r=null==L||null===(o=L.user)||void 0===o||null===(a=o.person)||void 0===a?void 0:a.display)&&void 0!==r?r:""}}:void 0}),[null==B?void 0:B.performer,Ce,null==L||null===(d=L.currentProvider)||void 0===d?void 0:d.uuid,null==L||null===(m=L.user)||void 0===m||null===(u=m.person)||void 0===u?void 0:u.display]);return(0,i.useEffect)((function(){(null==Be?void 0:Be.uuid)&&N(G(F({},B),{performer:[{actor:{reference:"Practitioner/".concat(Be.uuid)}}]}))}),[Be,B,N]),a().createElement("div",{className:R.medicationDispenseReviewContainer},a().createElement(r.BJc,{gap:5},K?a().createElement(s.ResponsiveWrapper,null,a().createElement(r.msM,{id:"medicationFormulation",items:qe,itemToString:function(e){return(0,c.Qz)(e)},initialSelectedItem:F({},null==qe?void 0:qe.find((function(e){var n;return e.id===(null===(n=B.medicationReference)||void 0===n?void 0:n.reference.split("/")[1])}))),titleText:U("medicationFormulation","Medication Formulation"),label:U("medicationFormulation","Medication Formulation"),onChange:function(e){var n=e.selectedItem;N(G(F({},B),{medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+(null==n?void 0:n.id),display:(0,c.Qz)(n)}})),Y(!1)}})):a().createElement(q,{medication:(0,c.H_)(B),editAction:$e&&we?function(){return Y(!0)}:null}),Z&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{className:R.substitutionType,id:"substitutionType",items:ue,titleText:U("substitutionType","Type of substitution"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(v=B.substitution.type)||void 0===v||null===(b=v.coding[0])||void 0===b?void 0:b.code,text:null===($=B.substitution.type)||void 0===$?void 0:$.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{substitution:G(F({},B.substitution),{type:{coding:[{code:null==n?void 0:n.id}]}})}))}}))),Z&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{className:R.substitutionReason,id:"substitutionReason",items:me,titleText:U("substitutionReason","Reason for substitution"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(w=B.substitution.reason[0])||void 0===w||null===(A=w.coding[0])||void 0===A?void 0:A.code,text:null===(k=B.substitution.reason[0])||void 0===k?void 0:k.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{substitution:G(F({},B.substitution),{reason:[{coding:[{code:null==n?void 0:n.id}]}]})}))}}))),a().createElement(s.ResponsiveWrapper,null,a().createElement("div",null,a().createElement("p",{className:R.quantitySummary},U("quantityPrescribed","Quantity Prescribed"),":",be),a().createElement("p",{className:R.quantitySummary},U("quantityDispensed","Quantity Dispensed"),": ",j),Q.dispenseBehavior.restrictTotalQuantityDispensed?a().createElement("p",{className:R.quantitySummary},U("quantityRemaining","Quantity Remaining to Dispense"),":",O):null)),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Q7x,{allowEmpty:!0,value:0,disabled:!$e,hideSteppers:!0,id:"quantity",invalidText:U("numberIsNotValid","Number is not valid"),label:a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"}},U("quantity","Quantity")),min:0,max:Q.dispenseBehavior.restrictTotalQuantityDispensed?O:void 0,onChange:function(e,n){N(G(F({},B),{quantity:G(F({},B.quantity),{value:n.value?parseFloat(n.value.toString()):""})}))}}),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"quantityUnits",disabled:!$e||!we,items:ie,titleText:U("drugDispensingUnit","Dispensing unit"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:B.quantity.code,text:B.quantity.unit},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{quantity:{value:B.quantity.value,code:null==n?void 0:n.id}}))},required:!0}))),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Q7x,{allowEmpty:!1,disabled:!$e||!we,hideSteppers:!0,id:"dosingQuanity",invalidText:U("numberIsNotValid","Number is not valid"),min:0,label:U("dose","Dose"),value:B.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:function(e,n){N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{doseAndRate:[G(F({},B.dosageInstruction[0].doseAndRate[0]),{doseQuantity:G(F({},B.dosageInstruction[0].doseAndRate[0].doseQuantity),{value:n.value?parseFloat(n.value.toString()):""})})]})]}))}}),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"dosingUnits",disabled:!$e||!we,items:ee,titleText:U("doseUnit","Dose unit"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(x=B.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===x?void 0:x.code,text:null===(_=B.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===_?void 0:_.unit},onChange:function(e){var n,t=e.selectedItem;N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{doseAndRate:[{doseQuantity:{value:null===(n=B.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===n?void 0:n.value,code:null==t?void 0:t.id}}]})]}))},required:!0})),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"editRoute",disabled:!$e||!we,items:re,initialSelectedItem:{id:null===(z=B.dosageInstruction[0].route)||void 0===z||null===(C=z.coding[0])||void 0===C?void 0:C.code,text:null===(E=B.dosageInstruction[0].route)||void 0===E?void 0:E.text},titleText:U("route","Route"),itemToString:function(e){return null==e?void 0:e.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{route:{coding:[{code:null==n?void 0:n.id}]}})]}))},required:!0}))),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"frequency",disabled:!$e||!we,items:ce,initialSelectedItem:{id:null===(I=B.dosageInstruction[0].timing)||void 0===I||null===(D=I.code)||void 0===D||null===(S=D.coding[0])||void 0===S?void 0:S.code,text:null===(T=B.dosageInstruction[0].timing)||void 0===T||null===(M=T.code)||void 0===M?void 0:M.text},titleText:U("frequency","Frequency"),itemToString:function(e){return null==e?void 0:e.text},onChange:function(e){var n=e.selectedItem;N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{timing:G(F({},B.dosageInstruction[0].timing),{code:{coding:[{code:null==n?void 0:n.id}]}})})]}))},required:!0})),a().createElement(r.fs1,{labelText:U("patientInstructions","Patient instructions"),value:B.dosageInstruction[0].text,maxLength:65535,onChange:function(e){N(G(F({},B),{dosageInstruction:[G(F({},B.dosageInstruction[0]),{text:e.target.value})]}))}}),a().createElement(s.OpenmrsDatePicker,{id:"dispenseDate",labelText:U("dispenseDate","Date of Dispense"),minDate:Ee?y()(Ee).startOf("day").toDate():null,maxDate:y()().toDate(),onChange:function(e){var n=B.whenHandedOver?y()(B.whenHandedOver):null,t=y()(e);N(G(F({},B),{whenHandedOver:(null==n?void 0:n.isSame(t,"day"))?n.toISOString():t.toISOString()}))},value:y()(B.whenHandedOver).toDate()}),Ce&&a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"dispenser",initialSelectedItem:Be,onChange:function(e){var n=e.selectedItem;N(G(F({},B),{performer:[{actor:{reference:"Practitioner/".concat(null==n?void 0:n.uuid)}}]}))},items:Ce,itemToString:function(e){var n;return null==e||null===(n=e.person)||void 0===n?void 0:n.display},required:!0,titleText:U("dispensedBy","Dispensed by")}))))},L=function(e){var n,t,i=e.medicationDispense,l=e.updateInventoryItem,c=(0,o.useTranslation)().t,d=(0,s.useConfig)(),u=function(e){var n,t,i,a,o=(0,s.useSession)(),r="/ws/rest/v1/stockmanagement/stockiteminventory?v=default&totalCount=true&drugUuid=".concat(e,"&includeBatchNo=true&groupBy=LocationStockItemBatchNo&dispenseLocationUuid=").concat(null==o||null===(n=o.sessionLocation)||void 0===n?void 0:n.uuid,"&includeStrength=1&includeConceptRefIds=1&emptyBatch=1&emptyBatchLocationUuid=").concat(null==o||null===(t=o.sessionLocation)||void 0===t?void 0:t.uuid,"&dispenseAtLocation=1"),l=(0,p.Ay)(r,s.openmrsFetch),c=l.data,d=l.error,u=l.isLoading;return{inventoryItems:null!==(a=null==c||null===(i=c.data)||void 0===i?void 0:i.results)&&void 0!==a?a:[],error:d,isLoading:u}}(null==i||null===(t=i.medicationReference)||void 0===t||null===(n=t.reference)||void 0===n?void 0:n.split("/")[1]),f=u.inventoryItems,g=u.error,m=u.isLoading,y=f.filter((function(e){return n=i,t=e,void 0!==d&&!d.validateBatch||!!((null==n?void 0:n.dosageInstruction)&&(null==n?void 0:n.dosageInstruction.length)>0)&&n.dosageInstruction.some((function(e){var n,i,a,o,r;if((null===(i=e.timing)||void 0===i||null===(n=i.repeat)||void 0===n?void 0:n.duration)&&(null===(o=e.timing)||void 0===o||null===(a=o.repeat)||void 0===a?void 0:a.durationUnit)&&t.quantity>0){var s=e.timing.repeat.durationUnit,l=e.timing.repeat.duration,c=new Date;switch(s){case"s":c.setSeconds(c.getSeconds()+l);break;case"min":c.setMinutes(c.getMinutes()+l);break;case"h":c.setHours(c.getHours()+l);break;case"d":c.setDate(c.getDate()+l);break;case"wk":c.setDate(c.getDate()+7*l);break;case"mo":c.setMonth(c.getMonth()+l);break;case"y":c.setFullYear(c.getFullYear()+l);break;default:return!1}return r=t.expiration,new Date(r)>c}return!1}));var n,t})).sort((function(e,n){return new Date(e.expiration).getTime()-new Date(n.expiration).getTime()}));return g?a().createElement(r.jeF,{"aria-label":"closes notification",kind:"error",lowContrast:!0,statusIconDescription:"notification",subtitle:c("errorLoadingInventoryItems","Error fetching inventory items"),title:c("error","Error")}):m?a().createElement(r.OuH,{description:c("loadingInventoryItems","Loading inventory items...")}):a().createElement(r.Wdr,null,a().createElement(r.a32,{id:"stockDispense",items:y,onChange:function(e){var n=e.selectedItem;l(n)},itemToString:function(e){return e?function(e){return c("stockDispenseDetails","Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",{batchNumber:e.batchNumber,quantity:Math.floor(e.quantity),quantityUoM:e.quantityUoM,expiration:(0,s.formatDate)(new Date(e.expiration))})}(e):""},titleText:c("stockDispense","Stock Dispense"),placeholder:c("selectStockDispense","Select stock to dispense from")}))};var H=t(40609);function K(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Y(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 i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return K(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)?K(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const V=function(e){var n=e.medicationDispense,t=e.medicationRequestBundle,p=e.mode,d=e.patientUuid,m=e.encounterUuid,y=e.quantityRemaining,h=e.quantityDispensed,b=e.closeWorkspace,v=e.closeWorkspaceWithSavedChanges,$=(0,o.useTranslation)().t,A=(0,s.usePatient)(d),w=A.patient,k=A.isLoading,x=(0,s.useConfig)(),_=Y((0,i.useState)(),2),C=_[0],z=_[1],E=Y((0,i.useState)(),2),S=E[0],D=E[1],I=Y((0,i.useState)(!1),2),M=I[0],T=I[1],q=Y((0,i.useState)(!1),2),B=q[0],N=q[1],R=Y((0,i.useState)(!1),2),O=R[0],j=R[1];(0,i.useEffect)((function(){return D(n)}),[n]),(0,i.useEffect)((function(){var e,n,t,i,a,o,r,s,l,c,p,d,u,f,g,m;S&&S.performer&&(null===(e=S.performer[0])||void 0===e?void 0:e.actor.reference)&&(null===(n=S.quantity)||void 0===n?void 0:n.value)&&(!y||(null==S||null===(t=S.quantity)||void 0===t?void 0:t.value)<=y)&&(null===(i=S.quantity)||void 0===i?void 0:i.code)&&(null===(r=S.dosageInstruction[0])||void 0===r||null===(o=r.doseAndRate[0])||void 0===o||null===(a=o.doseQuantity)||void 0===a?void 0:a.value)&&(null===(c=S.dosageInstruction[0])||void 0===c||null===(l=c.doseAndRate[0])||void 0===l||null===(s=l.doseQuantity)||void 0===s?void 0:s.code)&&(null===(d=S.dosageInstruction[0])||void 0===d||null===(p=d.route)||void 0===p?void 0:p.coding[0].code)&&(null===(f=S.dosageInstruction[0])||void 0===f||null===(u=f.timing)||void 0===u?void 0:u.code.coding[0].code)&&(!S.substitution.wasSubstituted||(null===(g=S.substitution.reason[0])||void 0===g?void 0:g.coding[0].code)&&(null===(m=S.substitution.type)||void 0===m?void 0:m.coding[0].code))?T(!0):T(!1)}),[S,y,C]);var F=!!x.enableStockDispense&&!C||!M||B,G=(0,i.useMemo)((function(){if(w)return{patient:w,patientUuid:d,hideActionsOverflow:!0}}),[w,d]);return a().createElement(r.lVW,{className:H.A.formWrapper},a().createElement("div",null,k&&a().createElement(r.OuH,{className:H.A.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),w&&a().createElement(s.ExtensionSlot,{name:"patient-header-slot",state:G}),a().createElement("section",{className:H.A.formGroup},a().createElement(r.lRv,null,$(x.dispenseBehavior.allowModifyingPrescription?"drugHelpText":"drugHelpTextNoEdit",x.dispenseBehavior.allowModifyingPrescription?"You may edit the formulation and quantity dispensed here":"You may edit quantity dispensed here")),S?a().createElement("div",null,a().createElement(Q,{medicationDispense:S,updateMedicationDispense:D,quantityRemaining:y,quantityDispensed:h}),x.completeOrderWithThisDispense&&a().createElement(r.Sc0,{id:"completeOrder",labelText:$("completeOrderWithThisDispense","Complete order with this dispense"),checked:O,onChange:function(){return j(!O)}}),x.enableStockDispense&&a().createElement(L,{inventoryItem:C,medicationDispense:n,updateInventoryItem:z})):null)),a().createElement("section",{className:H.A.buttonGroup},a().createElement(r.$nd,{disabled:B,onClick:function(){return b()},kind:"secondary"},(0,s.getCoreTranslation)("cancel","Cancel")),a().createElement(r.$nd,{disabled:F,onClick:function(){if(!B){N(!0);var e=new AbortController;(0,f.A7)(S,l.NV.completed,e).then((function(e){if(e.ok){if(x.completeOrderWithThisDispense&&O)return(0,g.NT)((0,c.vj)(S.authorizingPrescription[0].reference),l.O7.completed);var n=(0,c._e)(S,t,x.dispenseBehavior.restrictTotalQuantityDispensed);if((0,c.Qm)(t.request)!==n)return(0,g.NT)((0,c.vj)(S.authorizingPrescription[0].reference),n)}return e})).then((function(n){var t=n.status;if(x.enableStockDispense&&(201===t||200===t)){var i=function(e,n,t,i){return{dispenseLocation:e.locationUuid,patient:n,order:(0,c.vj)(i.authorizingPrescription[0].reference),encounter:t,stockItem:null==e?void 0:e.stockItemUuid,stockBatch:e.stockBatchUuid,stockItemPackagingUOM:e.quantityUoMUuid,quantity:i.quantity.value}}(C,d,m,S);u(i,e).then((function(){(0,s.showSnackbar)({title:$("stockDispensed","Stock dispensed"),kind:"success",subtitle:$("stockDispensedSuccessfully","Stock dispensed successfully and batch level updated.")})}),(function(e){(0,s.showSnackbar)({title:"Stock dispense error",kind:"error",subtitle:null==e?void 0:e.message})}))}return n})).then((function(e){var n=e.status;201!==n&&200!==n||((0,c.Yi)(m),(0,s.showSnackbar)({kind:"success",subtitle:$("medicationListUpdated","Medication dispense list has been updated."),title:$("enter"===p?"medicationDispensed":"medicationDispenseUpdated","enter"===p?"Medication successfully dispensed.":"Dispense record successfully updated.")}),v())}),(function(e){(0,s.showSnackbar)({kind:"error",title:$("enter"===p?"medicationDispenseError":"medicationDispenseUpdatedError","enter"===p?"Error dispensing medication.":"Error updating dispense record"),subtitle:null==e?void 0:e.message}),N(!1)}))}}},$("enter"===p?"dispensePrescription":"saveChanges","enter"===p?"Dispense prescription":"Save changes"))))}},61888:(e,n,t)=>{t.d(n,{A:()=>s});var i=t(54991),a=t.n(i),o=t(76314),r=t.n(o)()(a());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-dispensing__medication-card__medicationTile___\\+t2rW{display:flex;flex-direction:row;justify-content:space-between;width:100%;margin:.125rem 0 .5rem;padding:0 .5rem 0 .5rem;background-color:#fff;border-left:.25rem solid var(--brand-03);color:#525252;margin-bottom:1rem !important}.-esm-dispensing__medication-card__medicationName___-EM\\+N{font-size:1rem !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-card.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,2DACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,sBAAA,CACA,uBAAA,CACA,qBAAA,CACA,wCAAA,CACA,aDNQ,CCOR,6BAAA,CAGF,2DACE,yBAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.medicationTile {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n margin: layout.$spacing-01 0 layout.$spacing-03;\n padding: 0 layout.$spacing-03 0 layout.$spacing-03;\n background-color: #fff;\n border-left: layout.$spacing-02 solid var(--brand-03);\n color: $text-02;\n margin-bottom: layout.$spacing-05 !important;\n}\n\n.medicationName {\n font-size: layout.$spacing-05 !important;\n}\n"],sourceRoot:""}]),r.locals={medicationTile:"-esm-dispensing__medication-card__medicationTile___+t2rW",medicationName:"-esm-dispensing__medication-card__medicationName___-EM+N"};const s=r}}]);
package/dist/4099.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"4099.js","mappings":"2MAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,+pFAAgqF,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC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DI,IAEJ,IACA,SAACvD,IACC4G,EAAAA,EAAAA,cAAa,CACXzE,KAAM,QACNI,MAAOnN,EACI,UAAT+N,EAAmB,0BAA4B,iCACtC,UAATA,EAAmB,+BAAiC,kCAEtDb,SAAUtC,aAAAA,EAAAA,EAAO6G,UAEnB7C,GAAgB,EAClB,GAEN,CACF,GAuFS5O,EACU,UAAT+N,EAAmB,uBAAyB,cACnC,UAATA,EAAmB,wBAA0B,kBAMzD,C,sEChPIzQ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,qsBAAssB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,mDAAmD,MAAQ,GAAG,SAAW,wNAAwN,eAAiB,CAAC,g/DAAg/D,giBAAgiB,WAAa,MAE5pHH,EAAwBI,OAAS,CAChC,eAAkB,2DAClB,eAAkB,4DAEnB,S","sources":["webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss","webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss?82c7","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss?d386","webpack://@openmrs/esm-dispensing-app/./src/forms/medication-dispense-review.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/medication/medication.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock-dispense.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/dispense-form.workspace.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","sendStockDispenseRequest","stockDispenseRequest","abortController","openmrsFetch","method","signal","headers","body","JSON","stringify","dispenseItems","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","medication","editAction","Tile","className","styles","medicationTile","p","medicationName","strong","getMedicationDisplay","Edit","onClick","getMedicationReferenceOrCodeableConcept","session","medicationDispense","updateMedicationDispense","quantityRemaining","quantityDispensed","useTranslation","t","config","useConfig","useSession","useState","isEditingFormulation","setIsEditingFormulation","isSubstitution","setIsSubstitution","drugDosingUnits","setDrugDosingUnits","drugDispensingUnits","setDrugDispensingUnits","drugRoutes","setDrugRoutes","orderFrequencies","setOrderFrequencies","substitutionTypes","setSubstitutionTypes","substitutionReasons","setSubstitutionReasons","quantity","value","quantityPrescribed","userCanModify","setUserCanModify","allowEditing","useLayoutType","dispenseBehavior","allowModifyingPrescription","useOrderConfig","orderConfigObject","useSubstitutionTypeValueSet","valueSets","substitutionType","uuid","substitutionTypeValueSet","useSubstitutionReasonValueSet","substitutionReason","substitutionReasonValueSet","providers","useProviders","dispenserProviderRoles","useMedicationRequest","authorizingPrescription","reference","refreshInterval","medicationRequest","usePrescriptionDetails","encounter","prescriptionDate","useEffect","availableRoutes","map","x","otherRouteOptions","forEach","includes","text","display","availableDosingUnits","otherDosingUnits","availableDispensingUnits","otherDispensingUnits","availableFrequencies","otherFrequencyOptions","substitutionTypeOptions","compose","include","uuidValueSet","find","system","concept","code","sort","a","b","localeCompare","substitutionReasonOptions","medicationCodeableConcept","data","existingMedicationCodeableConceptUuid","getConceptCodingUuid","coding","medicationReference","useSWR","fhirBaseUrl","medicationCodeableConceptUuid","useMedicationCodeableConcept","getMedicationsByConceptEndpoint","entry","medicationFormulations","e","resource","substitution","wasSubstituted","reason","type","user","userHasAccess","PRIVILEGE_CREATE_DISPENSE_MODIFY_DETAILS","initialDispenser","useMemo","performer","actor","provider","split","currentProvider","person","div","medicationDispenseReviewContainer","Stack","gap","ResponsiveWrapper","Dropdown","items","itemToString","item","getOpenMRSMedicineDrugName","initialSelectedItem","formulation","titleText","label","onChange","typedItem","selectedItem","MedicationCard","dispenseDetailsContainer","ComboBox","quantitySummary","restrictTotalQuantityDispensed","NumberInput","allowEmpty","disabled","hideSteppers","invalidText","style","alignItems","min","max","event","state","parseFloat","toString","unit","required","dosageInstruction","doseAndRate","doseQuantity","route","timing","TextArea","labelText","maxLength","target","OpenmrsDatePicker","minDate","dayjs","startOf","toDate","maxDate","input","currentDate","whenHandedOver","selectedDate","isSame","toISOString","updateInventoryItem","useDispenseStock","drugUuid","url","sessionLocation","error","isLoading","inventoryItems","results","validInventoryItems","filter","medicationToDispense","inventoryItem","validateBatch","length","some","instruction","dateString","repeat","duration","durationUnit","durationValue","lastMedicationDate","Date","setSeconds","getSeconds","setMinutes","getMinutes","setHours","getHours","setDate","getDate","setMonth","getMonth","setFullYear","getFullYear","expiration","getTime","InlineNotification","aria-label","kind","lowContrast","statusIconDescription","subtitle","title","InlineLoading","description","Layer","batchNumber","Math","floor","quantityUoM","formatDate","toStockDispense","placeholder","medicationRequestBundle","mode","patientUuid","encounterUuid","closeWorkspace","closeWorkspaceWithSavedChanges","usePatient","patient","setInventoryItem","medicationDispensePayload","setMedicationDispensePayload","isValid","setIsValid","isSubmitting","setIsSubmitting","isButtonDisabled","enableStockDispense","bannerState","hideActionsOverflow","Form","formWrapper","bannerLoading","iconDescription","status","ExtensionSlot","name","section","formGroup","FormLabel","MedicationDispenseReview","StockDispense","buttonGroup","Button","getCoreTranslation","AbortController","saveMedicationDispense","MedicationDispenseStatus","completed","then","response","ok","newFulfillerStatus","computeNewFulfillerStatusAfterDispenseEvent","getFulfillerStatus","request","updateMedicationRequestFulfillerStatus","getUuidFromReference","stockDispenseRequestPayload","dispenseLocation","locationUuid","order","stockItem","stockItemUuid","stockBatch","stockBatchUuid","stockItemPackagingUOM","quantityUoMUuid","createStockDispenseRequestPayload","showSnackbar","message","revalidate"],"sourceRoot":""}
1
+ {"version":3,"file":"4099.js","mappings":"2MAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,+pFAAgqF,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,6DAA6D,uEAAuE,2DAA2D,MAAQ,GAAG,SAAW,spBAAspB,eAAiB,CA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AM,QACNG,SAAUtC,aAAAA,EAAAA,EAAOmH,SAErB,GAEJ,CACA,OAAOrB,CACT,IACCD,MACC,Y,IAAGlB,EAAAA,EAAAA,OACc,MAAXA,GAA6B,MAAXA,KACpByC,EAAAA,EAAAA,IAAW/D,IACX6D,EAAAA,EAAAA,cAAa,CACX/E,KAAM,UACNG,SAAUlN,EAAE,wBAAyB,8CACrCmN,MAAOnN,EACI,UAAT+N,EAAmB,sBAAwB,4BAClC,UAATA,EAAmB,qCAAuC,2CAG9DI,IAEJ,IACA,SAACvD,IACCkH,EAAAA,EAAAA,cAAa,CACX/E,KAAM,QACNI,MAAOnN,EACI,UAAT+N,EAAmB,0BAA4B,iCACtC,UAATA,EAAmB,+BAAiC,kCAEtDb,SAAUtC,aAAAA,EAAAA,EAAOmH,UAEnBnD,GAAgB,EAClB,GAEN,CACF,GA+FS5O,EACU,UAAT+N,EAAmB,uBAAyB,cACnC,UAATA,EAAmB,wBAA0B,kBAMzD,C,sECnQIzQ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,qsBAAssB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,mDAAmD,MAAQ,GAAG,SAAW,wNAAwN,eAAiB,CAAC,g/DAAg/D,giBAAgiB,WAAa,MAE5pHH,EAAwBI,OAAS,CAChC,eAAkB,2DAClB,eAAkB,4DAEnB,S","sources":["webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss","webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss?82c7","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss?d386","webpack://@openmrs/esm-dispensing-app/./src/forms/medication-dispense-review.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/medication/medication.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock-dispense.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/dispense-form.workspace.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","sendStockDispenseRequest","stockDispenseRequest","abortController","openmrsFetch","method","signal","headers","body","JSON","stringify","dispenseItems","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","medication","editAction","Tile","className","styles","medicationTile","p","medicationName","strong","getMedicationDisplay","Edit","onClick","getMedicationReferenceOrCodeableConcept","session","medicationDispense","updateMedicationDispense","quantityRemaining","quantityDispensed","useTranslation","t","config","useConfig","useSession","useState","isEditingFormulation","setIsEditingFormulation","isSubstitution","setIsSubstitution","drugDosingUnits","setDrugDosingUnits","drugDispensingUnits","setDrugDispensingUnits","drugRoutes","setDrugRoutes","orderFrequencies","setOrderFrequencies","substitutionTypes","setSubstitutionTypes","substitutionReasons","setSubstitutionReasons","quantity","value","quantityPrescribed","userCanModify","setUserCanModify","allowEditing","useLayoutType","dispenseBehavior","allowModifyingPrescription","useOrderConfig","orderConfigObject","useSubstitutionTypeValueSet","valueSets","substitutionType","uuid","substitutionTypeValueSet","useSubstitutionReasonValueSet","substitutionReason","substitutionReasonValueSet","providers","useProviders","dispenserProviderRoles","useMedicationRequest","authorizingPrescription","reference","refreshInterval","medicationRequest","usePrescriptionDetails","encounter","prescriptionDate","useEffect","availableRoutes","map","x","otherRouteOptions","forEach","includes","text","display","availableDosingUnits","otherDosingUnits","availableDispensingUnits","otherDispensingUnits","availableFrequencies","otherFrequencyOptions","substitutionTypeOptions","compose","include","uuidValueSet","find","system","concept","code","sort","a","b","localeCompare","substitutionReasonOptions","medicationCodeableConcept","data","existingMedicationCodeableConceptUuid","getConceptCodingUuid","coding","medicationReference","useSWR","fhirBaseUrl","medicationCodeableConceptUuid","useMedicationCodeableConcept","getMedicationsByConceptEndpoint","entry","medicationFormulations","e","resource","substitution","wasSubstituted","reason","type","user","userHasAccess","PRIVILEGE_CREATE_DISPENSE_MODIFY_DETAILS","initialDispenser","useMemo","performer","actor","provider","split","currentProvider","person","div","medicationDispenseReviewContainer","Stack","gap","ResponsiveWrapper","Dropdown","items","itemToString","item","getOpenMRSMedicineDrugName","initialSelectedItem","formulation","titleText","label","onChange","typedItem","selectedItem","MedicationCard","dispenseDetailsContainer","ComboBox","quantitySummary","restrictTotalQuantityDispensed","NumberInput","allowEmpty","disabled","hideSteppers","invalidText","style","alignItems","min","max","event","state","parseFloat","toString","unit","required","dosageInstruction","doseAndRate","doseQuantity","route","timing","TextArea","labelText","maxLength","target","OpenmrsDatePicker","minDate","dayjs","startOf","toDate","maxDate","input","currentDate","whenHandedOver","selectedDate","isSame","toISOString","updateInventoryItem","useDispenseStock","drugUuid","url","sessionLocation","error","isLoading","inventoryItems","results","validInventoryItems","filter","medicationToDispense","inventoryItem","validateBatch","length","some","instruction","dateString","repeat","duration","durationUnit","durationValue","lastMedicationDate","Date","setSeconds","getSeconds","setMinutes","getMinutes","setHours","getHours","setDate","getDate","setMonth","getMonth","setFullYear","getFullYear","expiration","getTime","InlineNotification","aria-label","kind","lowContrast","statusIconDescription","subtitle","title","InlineLoading","description","Layer","batchNumber","Math","floor","quantityUoM","formatDate","toStockDispense","placeholder","medicationRequestBundle","mode","patientUuid","encounterUuid","closeWorkspace","closeWorkspaceWithSavedChanges","usePatient","patient","setInventoryItem","medicationDispensePayload","setMedicationDispensePayload","isValid","setIsValid","isSubmitting","setIsSubmitting","shouldCompleteOrder","setShouldCompleteOrder","isButtonDisabled","enableStockDispense","bannerState","hideActionsOverflow","Form","formWrapper","bannerLoading","iconDescription","status","ExtensionSlot","name","section","formGroup","FormLabel","MedicationDispenseReview","completeOrderWithThisDispense","Checkbox","checked","StockDispense","buttonGroup","Button","getCoreTranslation","AbortController","saveMedicationDispense","MedicationDispenseStatus","completed","then","response","ok","updateMedicationRequestFulfillerStatus","getUuidFromReference","MedicationRequestFulfillerStatus","newFulfillerStatus","computeNewFulfillerStatusAfterDispenseEvent","getFulfillerStatus","request","stockDispenseRequestPayload","dispenseLocation","locationUuid","order","stockItem","stockItemUuid","stockBatch","stockBatchUuid","stockItemPackagingUOM","quantityUoMUuid","createStockDispenseRequestPayload","showSnackbar","message","revalidate"],"sourceRoot":""}
package/dist/4300.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[4300],{34300:e=>{e.exports=JSON.parse('{"active":"Active","activecondition":"Active Condition","activeConditions":"Active Condition","activePrescriptions":"Active prescriptions","age":"Age","allergiesCount_one":"{{count}} allergy","allergiesCount_other":"{{count}} allergies","allPrescriptions":"All prescriptions","appName":"Pharmacy","cancelled":"Cancelled","checkFilters":"Check the filters above","clearSearchInput":"Clear search input","close":"Close","closed":"Closed","closedDispense":"closed dispense","closePrescription":"Close prescription","completed":"Completed","conditions":"Condition","conditionsAndDiagnoses":"Conditions and diagnoses","created":"Created","datePrescribed":"Date prescribed","delete":"Delete","diagnosis":"Diagnosis","dispense":"Dispense","dispensed":"Dispensed","dispenseDate":"Date of Dispense","dispensedBy":"Dispensed by","dispensedMedication":"dispensed medication","dispensePrescription":"Dispense prescription","dispensing":"Dispensing","dispensingAppError":"Dispensing App Error","dispensingAppMisconfigurationMessage":"Please contact your system administration: Misconfiguration - \'restrictTotalQuantityDispensed\' cannot be enabled if \'allowModifyingPrescription\' is enabled.","dose":"Dose","doseUnit":"Dose unit","drugDispensingUnit":"Dispensing unit","drugs":"Drugs","editCloseeRecord":"Edit Close Record","editDispenseRecord":"Edit Dispense Record","editPauseRecord":"Edit Pause Record","editRecord":"Edit Record","error":"Error","errorLoadingInventoryItems":"Error fetching inventory items","expired":"Expired","filterByLocation":"Filter by location","finalDiagnoses":"Final Diagnoses","for":"for","frequency":"Frequency","historyComments":"History and comments","home":"Home","last14Days":"Last 14 days","lastDispenser":"Last dispenser","loadingInventoryItems":"Loading inventory items...","location":"Location","maxQuantityRemaining":"Maximum quantity remaining:","medicationDispenseActionMenu":"Medication Dispense Action Menu","medicationListUpdated":"Medication dispense list has been updated.","missedCollections":"Missed collections","noAllergyDetailsFound":"No allergy details found","noPrescriptionsToDisplay":"No prescriptions to display","noRefills":"No refills","numberIsNotValid":"Number is not valid","onsetDate":"Onset Date","ordered":"Ordered","orderedMedication ":"ordered medication","orders":"Orders","ordersForHomeDelivery":"Orders for home delivery","patientInstructions":"Patient instructions","patientName":"Patient name","pause":"Pause","paused":"Paused","pausedDispense":"paused dispense","pausePrescription":"Pause prescription","prescribed":"Prescribed","prescriber":"Prescriber","prescriptionDetails":"Prescription details","prescriptionInstructions":"Prescription instructions","prescriptionsToFillToday":"Prescriptions to fill today","print":"Print","printPrescriptions":"Print prescriptions","quantity":"Quantity","reasonForClose":"Reason for close","reasonForPause":"Reason for pause","refills":"Refills","route":"Route","searchByPatientIdOrName":"Search by patient ID or name","selectPrescriptions":"Check prescriptions to print","selectStockDispense":"Select stock to dispense from","status":"Status","stockDispense":"Stock Dispense","stockDispensed":"Stock dispensed","stockDispenseDetails":"Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}","stockDispensedSuccessfully":"Stock dispensed successfully and batch level updated.","substitutionReason":"Reason for substitution","substitutionType":"Type of substitution","tabList":"Tab List","today":"Today","view":"View","visitFinalDiagnoses":"Visit final diagnoses"}')}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[4300],{34300:e=>{e.exports=JSON.parse('{"active":"Active","activecondition":"Active Condition","activeConditions":"Active Condition","activePrescriptions":"Active prescriptions","age":"Age","allergiesCount_one":"{{count}} allergy","allergiesCount_other":"{{count}} allergies","allPrescriptions":"All prescriptions","appName":"Pharmacy","cancelled":"Cancelled","checkFilters":"Check the filters above","clearSearchInput":"Clear search input","close":"Close","closed":"Closed","closedDispense":"closed dispense","closePrescription":"Close prescription","completed":"Completed","completeOrderWithThisDispense":"Complete order with this dispense","conditions":"Condition","conditionsAndDiagnoses":"Conditions and diagnoses","couldNotDeleteMedicationDispense":"Could not delete medication dispense","couldNotUpdateMedicationRequestStatus":"Could not update medication request status","created":"Created","datePrescribed":"Date prescribed","delete":"Delete","deleteDispenseRecord":"Delete Dispense Record","deleteDispenseRecordMessage":"Are you sure you want to delete this dispense record?","deleteFailed":"Delete Failed","diagnosis":"Diagnosis","dispense":"Dispense","dispensed":"Dispensed","dispenseDate":"Date of Dispense","dispensedBy":"Dispensed by","dispensedMedication":"dispensed medication","dispensePrescription":"Dispense prescription","dispensing":"Dispensing","dispensingAppError":"Dispensing App Error","dispensingAppMisconfigurationMessage":"Please contact your system administration: Misconfiguration - \'restrictTotalQuantityDispensed\' cannot be enabled if \'allowModifyingPrescription\' is enabled.","dose":"Dose","doseUnit":"Dose unit","drugDispensingUnit":"Dispensing unit","drugs":"Drugs","editCloseeRecord":"Edit Close Record","editDispenseRecord":"Edit Dispense Record","editPauseRecord":"Edit Pause Record","editRecord":"Edit Record","error":"Error","errorLoadingInventoryItems":"Error fetching inventory items","expired":"Expired","filterByLocation":"Filter by location","finalDiagnoses":"Final Diagnoses","for":"for","frequency":"Frequency","historyComments":"History and comments","home":"Home","last14Days":"Last 14 days","lastDispenser":"Last dispenser","loadingInventoryItems":"Loading inventory items...","location":"Location","medicationDispenseActionMenu":"Medication Dispense Action Menu","medicationDispenseDeleted":"Medication dispense was deleted successfully","medicationFormulation":"Medication Formulation","medicationListUpdated":"Medication dispense list has been updated.","missedCollections":"Missed collections","noAllergyDetailsFound":"No allergy details found","noPrescriptionsToDisplay":"No prescriptions to display","noRefills":"No refills","numberIsNotValid":"Number is not valid","onsetDate":"Onset Date","ordered":"Ordered","orderedMedication ":"ordered medication","orders":"Orders","ordersForHomeDelivery":"Orders for home delivery","patientInstructions":"Patient instructions","patientName":"Patient name","pause":"Pause","paused":"Paused","pausedDispense":"paused dispense","pausePrescription":"Pause prescription","prescribed":"Prescribed","prescribedBy":"Prescribed By","prescriber":"Prescriber","prescriptionDetails":"Prescription details","prescriptionInstructions":"Prescription instructions","prescriptionsToFillToday":"Prescriptions to fill today","print":"Print","printPrescriptions":"Print prescriptions","quantity":"Quantity","quantityDispensed":"Quantity Dispensed","quantityPrescribed":"Quantity Prescribed","quantityRemaining":"Quantity Remaining to Dispense","reasonForClose":"Reason for close","reasonForPause":"Reason for pause","refills":"Refills","route":"Route","searchByPatientIdOrName":"Search by patient ID or name","selectPrescriptions":"Check prescriptions to print","selectStockDispense":"Select stock to dispense from","status":"Status","stockDispense":"Stock Dispense","stockDispensed":"Stock dispensed","stockDispenseDetails":"Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}","stockDispensedSuccessfully":"Stock dispensed successfully and batch level updated.","substitutionReason":"Reason for substitution","substitutionType":"Type of substitution","success":"Success","tabList":"Tab List","today":"Today","updateStatusFailed":"Update Status Failed","view":"View","visitFinalDiagnoses":"Visit final diagnoses"}')}}]);