@openmrs/esm-dispensing-app 1.7.1-pre.347 → 1.7.1-pre.351

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":"eade13d48fbd4690","duration":41975}
@@ -20,7 +20,7 @@ built modules 7.86 MiB (javascript) 378 bytes (share-init) 378 bytes (consume-sh
20
20
  modules by path ./translations/ 137 KiB
21
21
  ./translations/ lazy nonrecursive .json$ 160 bytes [built] [code generated]
22
22
  + 39 modules
23
- modules by path ./src/ 551 KiB 28 modules
23
+ modules by path ./src/ 554 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 (553 KiB)
41
41
  main.js
42
42
 
43
- webpack 5.99.9 compiled with 2 warnings in 39082 ms
43
+ webpack 5.99.9 compiled with 2 warnings in 39856 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 U(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)||P(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)||P(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 P(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=e.medicationDispense,M=e.updateMedicationDispense,T=e.quantityRemaining,B=e.quantityDispensed,N=(0,o.useTranslation)().t,O=(0,s.useConfig)(),j=(0,s.useSession)(),P=U((0,i.useState)(!1),2),Q=P[0],L=P[1],H=U((0,i.useState)(!1),2),K=H[0],Y=H[1],V=U((0,i.useState)([]),2),Z=V[0],J=V[1],X=U((0,i.useState)([]),2),ee=X[0],ne=X[1],te=U((0,i.useState)([]),2),ie=te[0],ae=te[1],oe=U((0,i.useState)([]),2),re=oe[0],se=oe[1],le=U((0,i.useState)([]),2),ce=le[0],pe=le[1],de=U((0,i.useState)([]),2),ue=de[0],fe=de[1],ge=U((0,i.useState)(I.quantity.value),2),me=ge[0],ye=(ge[1],U((0,i.useState)(!1),2)),he=ye[0],be=ye[1],ve=((0,s.useLayoutType)(),O.dispenseBehavior.allowModifyingPrescription),$e=(0,f.E)().orderConfigObject,Ae=(0,f.ij)(O.valueSets.substitutionType.uuid).substitutionTypeValueSet,we=(0,f.Sj)(O.valueSets.substitutionReason.uuid).substitutionReasonValueSet,ke=(0,f.u9)(O.dispenserProviderRoles),xe=(0,g.uc)(I.authorizingPrescription?I.authorizingPrescription[0].reference:null,O.refreshInterval).medicationRequest,_e=(0,g.IQ)(xe?xe.encounter.reference:null).prescriptionDate;(0,i.useEffect)((function(){if($e){var e=ie.map((function(e){return e.id})),n=[];$e.drugRoutes.forEach((function(t){return e.includes(t.uuid)||n.push({id:t.uuid,text:t.display})})),ae(W(ie).concat(W(n)));var t=Z.map((function(e){return e.id})),i=[];$e.drugDosingUnits.forEach((function(e){return t.includes(e.uuid)||i.push({id:e.uuid,text:e.display})})),J(W(Z).concat(W(i)));var a=ee.map((function(e){return e.id})),o=[];$e.drugDispensingUnits.forEach((function(e){return a.includes(e.uuid)||o.push({id:e.uuid,text:e.display})})),ne(W(ee).concat(W(o)));var r=re.map((function(e){return e.id})),s=[];$e.orderFrequencies.forEach((function(e){return r.includes(e.uuid)||s.push({id:e.uuid,text:e.display})})),se(W(re).concat(W(s)))}}),[ee,Z,ie,$e,re]),(0,i.useEffect)((function(){var e,n=[];if(null==Ae||null===(e=Ae.compose)||void 0===e?void 0:e.include){var t,i=Ae.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)}))}pe(n)}),[Ae]),(0,i.useEffect)((function(){var e,n=[];if(null==we||null===(e=we.compose)||void 0===e?void 0:e.include){var t,i=we.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)}),[we]);var Ce,ze,Ee,Se=(0,c.M$)(null===(t=(0,c.H_)(I))||void 0===t||null===(n=t.medicationCodeableConcept)||void 0===n?void 0:n.coding),De=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}}(Se,null===(l=(0,c.H_)(I).medicationReference)||void 0===l?void 0:l.reference).medicationCodeableConceptUuid,Ie=(Ce=Se||De||null,Ee=(0,p.Ay)(Ce?(0,c.bP)(Ce):null,s.openmrsFetch).data,(null==Ee||null===(ze=Ee.data)||void 0===ze?void 0:ze.entry)?{medicationFormulations:Ee.data.entry.map((function(e){return e.resource}))}:{}).medicationFormulations;return(0,i.useEffect)((function(){var e,n;(null==xe||null===(e=xe.medicationReference)||void 0===e?void 0:e.reference)&&(null==I||null===(n=I.medicationReference)||void 0===n?void 0:n.reference)&&xe.medicationReference.reference!=I.medicationReference.reference?(Y(!0),M(G(F({},I),{substitution:G(F({},I.substitution),{wasSubstituted:!0})}))):(Y(!1),M(G(F({},I),{substitution:{wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}})))}),[I,xe,M]),(0,i.useEffect)((function(){be((null==j?void 0:j.user)&&(0,s.userHasAccess)(h.py,j.user))}),[j]),a().createElement("div",{className:R.medicationDispenseReviewContainer},a().createElement(r.BJc,{gap:5},Q?a().createElement(s.ResponsiveWrapper,null,a().createElement(r.msM,{id:"medicationFormulation",items:Ie,itemToString:function(e){return(0,c.Qz)(e)},initialSelectedItem:F({},null==Ie?void 0:Ie.find((function(e){var n;return e.id===(null===(n=I.medicationReference)||void 0===n?void 0:n.reference.split("/")[1])}))),titleText:N("medicationFormulation","Medication Formulation"),label:N("medicationFormulation","Medication Formulation"),onChange:function(e){var n=e.selectedItem;M(G(F({},I),{medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+(null==n?void 0:n.id),display:(0,c.Qz)(n)}})),L(!1)}})):a().createElement(q,{medication:(0,c.H_)(I),editAction:he&&ve?function(){return L(!0)}:null}),K&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{className:R.substitutionType,id:"substitutionType",items:ce,titleText:N("substitutionType","Type of substitution"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(u=I.substitution.type)||void 0===u||null===(d=u.coding[0])||void 0===d?void 0:d.code,text:null===(m=I.substitution.type)||void 0===m?void 0:m.text},onChange:function(e){var n=e.selectedItem;M(G(F({},I),{substitution:G(F({},I.substitution),{type:{coding:[{code:null==n?void 0:n.id}]}})}))}}))),K&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{className:R.substitutionReason,id:"substitutionReason",items:ue,titleText:N("substitutionReason","Reason for substitution"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(v=I.substitution.reason[0])||void 0===v||null===(b=v.coding[0])||void 0===b?void 0:b.code,text:null===($=I.substitution.reason[0])||void 0===$?void 0:$.text},onChange:function(e){var n=e.selectedItem;M(G(F({},I),{substitution:G(F({},I.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},N("quantityPrescribed","Quantity Prescribed"),":",me),a().createElement("p",{className:R.quantitySummary},N("quantityDispensed","Quantity Dispensed"),": ",B),O.dispenseBehavior.restrictTotalQuantityDispensed?a().createElement("p",{className:R.quantitySummary},N("quantityRemaining","Quantity Remaining to Dispense"),":",T):null)),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Q7x,{allowEmpty:!0,value:0,disabled:!he,hideSteppers:!0,id:"quantity",invalidText:N("numberIsNotValid","Number is not valid"),label:a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"}},N("quantity","Quantity")),min:0,max:O.dispenseBehavior.restrictTotalQuantityDispensed?T:void 0,onChange:function(e,n){M(G(F({},I),{quantity:G(F({},I.quantity),{value:n.value?parseFloat(n.value.toString()):""})}))}}),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"quantityUnits",disabled:!he||!ve,items:ee,titleText:N("drugDispensingUnit","Dispensing unit"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:I.quantity.code,text:I.quantity.unit},onChange:function(e){var n=e.selectedItem;M(G(F({},I),{quantity:{value:I.quantity.value,code:null==n?void 0:n.id}}))},required:!0}))),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Q7x,{allowEmpty:!1,disabled:!he||!ve,hideSteppers:!0,id:"dosingQuanity",invalidText:N("numberIsNotValid","Number is not valid"),min:0,label:N("dose","Dose"),value:I.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:function(e,n){M(G(F({},I),{dosageInstruction:[G(F({},I.dosageInstruction[0]),{doseAndRate:[G(F({},I.dosageInstruction[0].doseAndRate[0]),{doseQuantity:G(F({},I.dosageInstruction[0].doseAndRate[0].doseQuantity),{value:n.value?parseFloat(n.value.toString()):""})})]})]}))}}),a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"dosingUnits",disabled:!he||!ve,items:Z,titleText:N("doseUnit","Dose unit"),itemToString:function(e){return null==e?void 0:e.text},initialSelectedItem:{id:null===(A=I.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===A?void 0:A.code,text:null===(w=I.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===w?void 0:w.unit},onChange:function(e){var n,t=e.selectedItem;M(G(F({},I),{dosageInstruction:[G(F({},I.dosageInstruction[0]),{doseAndRate:[{doseQuantity:{value:null===(n=I.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:!he||!ve,items:ie,initialSelectedItem:{id:null===(x=I.dosageInstruction[0].route)||void 0===x||null===(k=x.coding[0])||void 0===k?void 0:k.code,text:null===(_=I.dosageInstruction[0].route)||void 0===_?void 0:_.text},titleText:N("route","Route"),itemToString:function(e){return null==e?void 0:e.text},onChange:function(e){var n=e.selectedItem;M(G(F({},I),{dosageInstruction:[G(F({},I.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:!he||!ve,items:re,initialSelectedItem:{id:null===(E=I.dosageInstruction[0].timing)||void 0===E||null===(z=E.code)||void 0===z||null===(C=z.coding[0])||void 0===C?void 0:C.code,text:null===(D=I.dosageInstruction[0].timing)||void 0===D||null===(S=D.code)||void 0===S?void 0:S.text},titleText:N("frequency","Frequency"),itemToString:function(e){return null==e?void 0:e.text},onChange:function(e){var n=e.selectedItem;M(G(F({},I),{dosageInstruction:[G(F({},I.dosageInstruction[0]),{timing:G(F({},I.dosageInstruction[0].timing),{code:{coding:[{code:null==n?void 0:n.id}]}})})]}))},required:!0})),a().createElement(r.fs1,{labelText:N("patientInstructions","Patient instructions"),value:I.dosageInstruction[0].text,maxLength:65535,onChange:function(e){M(G(F({},I),{dosageInstruction:[G(F({},I.dosageInstruction[0]),{text:e.target.value})]}))}}),a().createElement(s.OpenmrsDatePicker,{id:"dispenseDate",labelText:N("dispenseDate","Date of Dispense"),minDate:_e?y()(_e).startOf("day").toDate():null,maxDate:y()().toDate(),onChange:function(e){var n=I.whenHandedOver?y()(I.whenHandedOver):null,t=y()(e);M(G(F({},I),{whenHandedOver:(null==n?void 0:n.isSame(t,"day"))?n.toISOString():t.toISOString()}))},value:y()(I.whenHandedOver).toDate()}),ke&&a().createElement(s.ResponsiveWrapper,null,a().createElement(r.a32,{id:"dispenser",initialSelectedItem:(null==I?void 0:I.performer[0].actor.reference)?ke.find((function(e){return e.uuid===(null==I?void 0:I.performer[0].actor.reference.split("/")[1])})):null,onChange:function(e){var n=e.selectedItem;M(G(F({},I),{performer:[{actor:{reference:"Practitioner/".concat(null==n?void 0:n.uuid)}}]}))},items:ke,itemToString:function(e){var n;return null==e||null===(n=e.person)||void 0===n?void 0:n.display},required:!0,titleText:N("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)||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}}]);
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,kEAAkE,6DAA6D,uEAAuE,2DAA2D,MAAQ,GAAG,SAAW,spBAAspB,eAAiB,CAAC,g/DAAg/D,k0DAAk0D,05DAA05D,w8uBAAw8uB,WAAa,MAEp0hCH,EAAwBI,OAAS,CAChC,kCAAqC,yFACrC,yBAA4B,gFAC5B,mBAAsB,0EACtB,iBAAoB,wEACpB,oBAAuB,2EACvB,UAAa,iEACb,YAAe,mEACf,YAAe,mEACf,YAAe,mEACf,gBAAmB,wEAEpB,S,kQCOO,SAAeC,EACpBC,EACAC,G,usCAGO,O,GAAMC,EAAAA,EAAAA,cADD,8CACmB,CAC7BC,OAAQ,OACRC,OAAQH,EAAgBG,OACxBC,QAAS,CACP,eAAgB,oBAElBC,KAAMC,KAAKC,UAAU,CAAEC,cAAe,CAACT,Q,OANzC,MAAO,C,EAAA,U,GAQT,E,uLAWO,I,mMCvCHU,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQZ,OAAS,IAAQA,YAASkB,ECLnE,EAXK,Y,IAAGC,EAAAA,EAAAA,WAAYC,EAAAA,EAAAA,WAClB,OACE,kBAACC,EAAAA,IAAIA,CAAC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oG,gBACrC/P,SAAU+M,EAA0B/M,SAASC,MAEjD,CO6BgD+P,CAClCrG,EACA6C,EACAC,EACAM,GAEFzQ,EAAyBgT,EAA6B9S,GAAiBqS,MACrE,YACEoB,EAAAA,EAAAA,cAAa,CACXtE,MAAOjN,EAAE,iBAAkB,mBAC3B6M,KAAM,UACNG,SAAUhN,EAAE,6BAA8B,0DAE9C,IACA,SAAC0K,IACC6G,EAAAA,EAAAA,cAAa,CACXtE,MAAO,uBACPJ,KAAM,QACNG,SAAUtC,aAAAA,EAAAA,EAAO8G,SAErB,GAEJ,CACA,OAAOpB,CACT,IACCD,MACC,Y,IAAGf,EAAAA,EAAAA,OACc,MAAXA,GAA6B,MAAXA,KACpBqC,EAAAA,EAAAA,IAAW1D,IACXwD,EAAAA,EAAAA,cAAa,CACX1E,KAAM,UACNG,SAAUhN,EAAE,wBAAyB,8CACrCiN,MAAOjN,EACI,UAAT6N,EAAmB,sBAAwB,4BAClC,UAATA,EAAmB,qCAAuC,2CAG9DI,IAEJ,IACA,SAACvD,IACC6G,EAAAA,EAAAA,cAAa,CACX1E,KAAM,QACNI,MAAOjN,EACI,UAAT6N,EAAmB,0BAA4B,iCACtC,UAATA,EAAmB,+BAAiC,kCAEtDb,SAAUtC,aAAAA,EAAAA,EAAO8G,UAEnB9C,GAAgB,EAClB,GAEN,CACF,GAuFS1O,EACU,UAAT6N,EAAmB,uBAAyB,cACnC,UAATA,EAAmB,wBAA0B,kBAMzD,C,sEChPItQ,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","medicationDispense","updateMedicationDispense","quantityRemaining","quantityDispensed","useTranslation","t","config","useConfig","session","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","div","medicationDispenseReviewContainer","Stack","gap","ResponsiveWrapper","Dropdown","items","itemToString","item","getOpenMRSMedicineDrugName","initialSelectedItem","formulation","split","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","performer","actor","provider","person","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","useMemo","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,CAAC,g/DAAg/D,k0DAAk0D,05DAA05D,w8uBAAw8uB,WAAa,MAEp0hCH,EAAwBI,OAAS,CAChC,kCAAqC,yFACrC,yBAA4B,gFAC5B,mBAAsB,0EACtB,iBAAoB,wEACpB,oBAAuB,2EACvB,UAAa,iEACb,YAAe,mEACf,YAAe,mEACf,YAAe,mEACf,gBAAmB,wEAEpB,S,kQCOO,SAAeC,EACpBC,EACAC,G,usCAGO,O,GAAMC,EAAAA,EAAAA,cADD,8CACmB,CAC7BC,OAAQ,OACRC,OAAQH,EAAgBG,OACxBC,QAAS,CACP,eAAgB,oBAElBC,KAAMC,KAAKC,UAAU,CAAEC,cAAe,CAACT,Q,OANzC,MAAO,C,EAAA,U,GAQT,E,uLAWO,I,mMCvCHU,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GA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Q,EAAyBkT,EAA6BhT,GAAiBuS,MACrE,YACEoB,EAAAA,EAAAA,cAAa,CACXrE,MAAOnN,EAAE,iBAAkB,mBAC3B+M,KAAM,UACNG,SAAUlN,EAAE,6BAA8B,0DAE9C,IACA,SAAC4K,IACC4G,EAAAA,EAAAA,cAAa,CACXrE,MAAO,uBACPJ,KAAM,QACNG,SAAUtC,aAAAA,EAAAA,EAAO6G,SAErB,GAEJ,CACA,OAAOpB,CACT,IACCD,MACC,Y,IAAGf,EAAAA,EAAAA,OACc,MAAXA,GAA6B,MAAXA,KACpBqC,EAAAA,EAAAA,IAAWzD,IACXuD,EAAAA,EAAAA,cAAa,CACXzE,KAAM,UACNG,SAAUlN,EAAE,wBAAyB,8CACrCmN,MAAOnN,EACI,UAAT+N,EAAmB,sBAAwB,4BAClC,UAATA,EAAmB,qCAAuC,2CAG9DI,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":""}
package/dist/6022.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[6022],{46022: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([[6022],{46022:i=>{i.exports=JSON.parse('{"active":"Activ","activecondition":"Condiție activă","activeConditions":"Condiție activă","activePrescriptions":"Prescripții active","age":"Vârstă","allergiesCount_one":"{{count}} alergie","allergiesCount_other":"{{count}} alergii","allPrescriptions":"Toate prescripțiile","appName":"Farmacie","cancelled":"Anulat","checkFilters":"Verifică filtrele de mai sus","clearSearchInput":"Șterge căutarea","close":"Închide","closed":"Închis","closedDispense":"distribuire închisă","closePrescription":"Închide prescripția","completed":"Finalizat","conditions":"Condiție","conditionsAndDiagnoses":"Condiții și diagnostice","created":"Creat","datePrescribed":"Data prescrierii","delete":"Șterge","diagnosis":"Diagnostic","dispense":"Distribuie","dispensed":"Distribuit","dispenseDate":"Data distribuirii","dispensedBy":"Distribuit de","dispensedMedication":"medicament distribuit","dispensePrescription":"Distribuie prescripția","dispensing":"Distribuire","dispensingAppError":"Eroare aplicație distribuire","dispensingAppMisconfigurationMessage":"Contactează administratorul sistemului: Configurație greșită \'restrictTotalQuantityDispensed\' nu poate fi activat dacă \'allowModifyingPrescription\' este activ.","dose":"Doză","doseUnit":"Unitate doză","drugDispensingUnit":"Unitate de distribuire","drugs":"Medicamente","editCloseeRecord":"Editează înregistrarea de închidere","editDispenseRecord":"Editează înregistrarea de distribuire","editPauseRecord":"Editează înregistrarea de pauză","editRecord":"Editează înregistrarea","error":"Eroare","errorLoadingInventoryItems":"Eroare la preluarea elementelor din stoc","expired":"Expirat","filterByLocation":"Filtrează după locație","finalDiagnoses":"Diagnostice finale","for":"pentru","frequency":"Frecvență","historyComments":"Istoric și comentarii","home":"Acasă","last14Days":"Ultimele 14 zile","lastDispenser":"Ultimul distribuitor","loadingInventoryItems":"Se încarcă elementele din stoc...","location":"Locație","maxQuantityRemaining":"Cantitate maximă rămasă:","medicationDispenseActionMenu":"Meniu acțiuni distribuire medicament","medicationListUpdated":"Lista de medicamente distribuite a fost actualizată.","missedCollections":"Colectări ratate","noAllergyDetailsFound":"Nu s-au găsit detalii despre alergii","noPrescriptionsToDisplay":"Nu există prescripții de afișat","noRefills":"Fără reînnoiri","numberIsNotValid":"Numărul nu este valid","onsetDate":"Data debutului","ordered":"Comandat","orderedMedication ":"medicament comandat","orders":"Comenzi","ordersForHomeDelivery":"Comenzi pentru livrare la domiciliu","patientInstructions":"Instrucțiuni pentru pacient","patientName":"Nume pacient","pause":"Pauză","paused":"Pauzat","pausedDispense":"distribuire pauzată","pausePrescription":"Pauzează prescripția","prescribed":"Prescris","prescriber":"Prescriptor","prescriptionDetails":"Detalii prescripție","prescriptionInstructions":"Instrucțiuni pentru prescripție","prescriptionsToFillToday":"Prescripții de completat azi","print":"Printează","printPrescriptions":"Printează prescripții","quantity":"Cantitate","reasonForClose":"Motiv închidere","reasonForPause":"Motiv pauză","refills":"Reînnoiri","route":"Rută","searchByPatientIdOrName":"Caută după ID pacient sau nume","selectPrescriptions":"Bifează prescripțiile pentru printare","selectStockDispense":"Selectează stocul din care se distribuie","status":"Stare","stockDispense":"Distribuire din stoc","stockDispensed":"Stoc distribuit","stockDispenseDetails":"Lot: {{batchNumber}} Cantitate: {{quantity}} ({{quantityUoM}}) Expiră: {{expiration}}","stockDispensedSuccessfully":"Stocul a fost distribuit cu succes și lotul a fost actualizat.","substitutionReason":"Motiv substituire","substitutionType":"Tip substituire","tabList":"Listă taburi","today":"Astăzi","view":"Vezi","visitFinalDiagnoses":"Diagnostice finale vizită"}')}}]);
@@ -589,9 +589,9 @@
589
589
  "initial": false,
590
590
  "entry": false,
591
591
  "recorded": false,
592
- "size": 111814,
592
+ "size": 114489,
593
593
  "sizes": {
594
- "javascript": 111814
594
+ "javascript": 114489
595
595
  },
596
596
  "names": [],
597
597
  "idHints": [],
@@ -605,7 +605,7 @@
605
605
  "auxiliaryFiles": [
606
606
  "4099.js.map"
607
607
  ],
608
- "hash": "17c4feecc8485239",
608
+ "hash": "d7f9e29dce541401",
609
609
  "childrenByOrder": {}
610
610
  },
611
611
  {
@@ -905,9 +905,9 @@
905
905
  "initial": false,
906
906
  "entry": false,
907
907
  "recorded": false,
908
- "size": 3606,
908
+ "size": 3847,
909
909
  "sizes": {
910
- "javascript": 3606
910
+ "javascript": 3847
911
911
  },
912
912
  "names": [],
913
913
  "idHints": [],
@@ -919,7 +919,7 @@
919
919
  "6022.js"
920
920
  ],
921
921
  "auxiliaryFiles": [],
922
- "hash": "e34a4a3a5060b527",
922
+ "hash": "6c230c832fc37d8f",
923
923
  "childrenByOrder": {}
924
924
  },
925
925
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","type":"dispense","title":"Close prescription"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","type":"dispense","title":"Pause prescription"},{"name":"dispense-workspace","component":"dispenseWorkspace","type":"dispense","title":"Dispense prescription","width":"wider"}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"}],"version":"1.7.1-pre.347"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","type":"dispense","title":"Close prescription"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","type":"dispense","title":"Pause prescription"},{"name":"dispense-workspace","component":"dispenseWorkspace","type":"dispense","title":"Dispense prescription","width":"wider"}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"}],"version":"1.7.1-pre.351"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-dispensing-app",
3
- "version": "1.7.1-pre.347",
3
+ "version": "1.7.1-pre.351",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Medication dispensing application",
6
6
  "browser": "dist/openmrs-esm-dispensing-app.js",
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React, { useEffect, useState, useMemo } from 'react';
2
2
  import dayjs from 'dayjs';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { ComboBox, Dropdown, NumberInput, Stack, TextArea } from '@carbon/react';
@@ -208,6 +208,34 @@ const MedicationDispenseReview: React.FC<MedicationDispenseReviewProps> = ({
208
208
  setUserCanModify(session?.user && userHasAccess(PRIVILEGE_CREATE_DISPENSE_MODIFY_DETAILS, session.user));
209
209
  }, [session]);
210
210
 
211
+ const initialDispenser = useMemo(() => {
212
+ return medicationDispense?.performer?.[0]?.actor?.reference
213
+ ? providers?.find((provider) => provider.uuid === medicationDispense.performer[0].actor.reference.split('/')[1])
214
+ : session?.currentProvider?.uuid
215
+ ? {
216
+ uuid: session.currentProvider.uuid,
217
+ person: {
218
+ display: session?.user?.person?.display ?? '',
219
+ },
220
+ }
221
+ : undefined;
222
+ }, [medicationDispense?.performer, providers, session?.currentProvider?.uuid, session?.user?.person?.display]);
223
+
224
+ useEffect(() => {
225
+ if (initialDispenser?.uuid) {
226
+ updateMedicationDispense({
227
+ ...medicationDispense,
228
+ performer: [
229
+ {
230
+ actor: {
231
+ reference: `Practitioner/${initialDispenser.uuid}`,
232
+ },
233
+ },
234
+ ],
235
+ });
236
+ }
237
+ }, [initialDispenser, medicationDispense, updateMedicationDispense]);
238
+
211
239
  return (
212
240
  <div className={styles.medicationDispenseReviewContainer}>
213
241
  <Stack gap={5}>
@@ -548,13 +576,7 @@ const MedicationDispenseReview: React.FC<MedicationDispenseReviewProps> = ({
548
576
  <ResponsiveWrapper>
549
577
  <ComboBox
550
578
  id="dispenser"
551
- initialSelectedItem={
552
- medicationDispense?.performer[0].actor.reference
553
- ? providers.find(
554
- (provider) => provider.uuid === medicationDispense?.performer[0].actor.reference.split('/')[1],
555
- )
556
- : null
557
- }
579
+ initialSelectedItem={initialDispenser}
558
580
  onChange={({ selectedItem }) => {
559
581
  updateMedicationDispense({
560
582
  ...medicationDispense,
@@ -1,100 +1,100 @@
1
1
  {
2
- "active": "Active",
3
- "activecondition": "Active Condition",
4
- "activeConditions": "Active Condition",
5
- "activePrescriptions": "Active prescriptions",
6
- "age": "Age",
7
- "allergiesCount_one": "{{count}} allergy",
8
- "allergiesCount_other": "{{count}} allergies",
9
- "allPrescriptions": "All prescriptions",
10
- "appName": "Pharmacy",
11
- "cancelled": "Cancelled",
12
- "checkFilters": "Check the filters above",
13
- "clearSearchInput": "Clear search input",
14
- "close": "Close",
15
- "closed": "Closed",
16
- "closedDispense": "closed dispense",
17
- "closePrescription": "Close prescription",
18
- "completed": "Completed",
19
- "conditions": "Condition",
20
- "conditionsAndDiagnoses": "Conditions and diagnoses",
21
- "created": "Created",
22
- "datePrescribed": "Date prescribed",
23
- "delete": "Delete",
24
- "diagnosis": "Diagnosis",
25
- "dispense": "Dispense",
26
- "dispensed": "Dispensed",
27
- "dispenseDate": "Date of Dispense",
28
- "dispensedBy": "Dispensed by",
29
- "dispensedMedication": "dispensed medication",
30
- "dispensePrescription": "Dispense prescription",
31
- "dispensing": "Dispensing",
32
- "dispensingAppError": "Dispensing App Error",
33
- "dispensingAppMisconfigurationMessage": "Please contact your system administration: Misconfiguration - 'restrictTotalQuantityDispensed' cannot be enabled if 'allowModifyingPrescription' is enabled.",
34
- "dose": "Dose",
35
- "doseUnit": "Dose unit",
36
- "drugDispensingUnit": "Dispensing unit",
37
- "drugs": "Drugs",
38
- "editCloseeRecord": "Edit Close Record",
39
- "editDispenseRecord": "Edit Dispense Record",
40
- "editPauseRecord": "Edit Pause Record",
41
- "editRecord": "Edit Record",
42
- "error": "Error",
43
- "errorLoadingInventoryItems": "Error fetching inventory items",
44
- "expired": "Expired",
45
- "filterByLocation": "Filter by location",
46
- "finalDiagnoses": "Final Diagnoses",
47
- "for": "for",
48
- "frequency": "Frequency",
49
- "historyComments": "History and comments",
50
- "home": "Home",
51
- "last14Days": "Last 14 days",
52
- "lastDispenser": "Last dispenser",
53
- "loadingInventoryItems": "Loading inventory items...",
54
- "location": "Location",
55
- "maxQuantityRemaining": "Maximum quantity remaining:",
56
- "medicationDispenseActionMenu": "Medication Dispense Action Menu",
57
- "medicationListUpdated": "Medication dispense list has been updated.",
58
- "missedCollections": "Missed collections",
59
- "noAllergyDetailsFound": "No allergy details found",
60
- "noPrescriptionsToDisplay": "No prescriptions to display",
61
- "noRefills": "No refills",
62
- "numberIsNotValid": "Number is not valid",
63
- "onsetDate": "Onset Date",
64
- "ordered": "Ordered",
65
- "orderedMedication ": "ordered medication",
66
- "orders": "Orders",
67
- "ordersForHomeDelivery": "Orders for home delivery",
68
- "patientInstructions": "Patient instructions",
69
- "patientName": "Patient name",
70
- "pause": "Pause",
71
- "paused": "Paused",
72
- "pausedDispense": "paused dispense",
73
- "pausePrescription": "Pause prescription",
74
- "prescribed": "Prescribed",
75
- "prescriber": "Prescriber",
76
- "prescriptionDetails": "Prescription details",
77
- "prescriptionInstructions": "Prescription instructions",
78
- "prescriptionsToFillToday": "Prescriptions to fill today",
79
- "print": "Print",
80
- "printPrescriptions": "Print prescriptions",
81
- "quantity": "Quantity",
82
- "reasonForClose": "Reason for close",
83
- "reasonForPause": "Reason for pause",
84
- "refills": "Refills",
85
- "route": "Route",
86
- "searchByPatientIdOrName": "Search by patient ID or name",
87
- "selectPrescriptions": "Check prescriptions to print",
88
- "selectStockDispense": "Select stock to dispense from",
89
- "status": "Status",
90
- "stockDispense": "Stock Dispense",
91
- "stockDispensed": "Stock dispensed",
92
- "stockDispenseDetails": "Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",
93
- "stockDispensedSuccessfully": "Stock dispensed successfully and batch level updated.",
94
- "substitutionReason": "Reason for substitution",
95
- "substitutionType": "Type of substitution",
96
- "tabList": "Tab List",
97
- "today": "Today",
98
- "view": "View",
99
- "visitFinalDiagnoses": "Visit final diagnoses"
2
+ "active": "Activ",
3
+ "activecondition": "Condiție activă",
4
+ "activeConditions": "Condiție activă",
5
+ "activePrescriptions": "Prescripții active",
6
+ "age": "Vârstă",
7
+ "allergiesCount_one": "{{count}} alergie",
8
+ "allergiesCount_other": "{{count}} alergii",
9
+ "allPrescriptions": "Toate prescripțiile",
10
+ "appName": "Farmacie",
11
+ "cancelled": "Anulat",
12
+ "checkFilters": "Verifică filtrele de mai sus",
13
+ "clearSearchInput": "Șterge căutarea",
14
+ "close": "Închide",
15
+ "closed": "Închis",
16
+ "closedDispense": "distribuire închisă",
17
+ "closePrescription": "Închide prescripția",
18
+ "completed": "Finalizat",
19
+ "conditions": "Condiție",
20
+ "conditionsAndDiagnoses": "Condiții și diagnostice",
21
+ "created": "Creat",
22
+ "datePrescribed": "Data prescrierii",
23
+ "delete": "Șterge",
24
+ "diagnosis": "Diagnostic",
25
+ "dispense": "Distribuie",
26
+ "dispensed": "Distribuit",
27
+ "dispenseDate": "Data distribuirii",
28
+ "dispensedBy": "Distribuit de",
29
+ "dispensedMedication": "medicament distribuit",
30
+ "dispensePrescription": "Distribuie prescripția",
31
+ "dispensing": "Distribuire",
32
+ "dispensingAppError": "Eroare aplicație distribuire",
33
+ "dispensingAppMisconfigurationMessage": "Contactează administratorul sistemului: Configurație greșită 'restrictTotalQuantityDispensed' nu poate fi activat dacă 'allowModifyingPrescription' este activ.",
34
+ "dose": "Doză",
35
+ "doseUnit": "Unitate doză",
36
+ "drugDispensingUnit": "Unitate de distribuire",
37
+ "drugs": "Medicamente",
38
+ "editCloseeRecord": "Editează înregistrarea de închidere",
39
+ "editDispenseRecord": "Editează înregistrarea de distribuire",
40
+ "editPauseRecord": "Editează înregistrarea de pauză",
41
+ "editRecord": "Editează înregistrarea",
42
+ "error": "Eroare",
43
+ "errorLoadingInventoryItems": "Eroare la preluarea elementelor din stoc",
44
+ "expired": "Expirat",
45
+ "filterByLocation": "Filtrează după locație",
46
+ "finalDiagnoses": "Diagnostice finale",
47
+ "for": "pentru",
48
+ "frequency": "Frecvență",
49
+ "historyComments": "Istoric și comentarii",
50
+ "home": "Acasă",
51
+ "last14Days": "Ultimele 14 zile",
52
+ "lastDispenser": "Ultimul distribuitor",
53
+ "loadingInventoryItems": "Se încarcă elementele din stoc...",
54
+ "location": "Locație",
55
+ "maxQuantityRemaining": "Cantitate maximă rămasă:",
56
+ "medicationDispenseActionMenu": "Meniu acțiuni distribuire medicament",
57
+ "medicationListUpdated": "Lista de medicamente distribuite a fost actualizată.",
58
+ "missedCollections": "Colectări ratate",
59
+ "noAllergyDetailsFound": "Nu s-au găsit detalii despre alergii",
60
+ "noPrescriptionsToDisplay": "Nu există prescripții de afișat",
61
+ "noRefills": "Fără reînnoiri",
62
+ "numberIsNotValid": "Numărul nu este valid",
63
+ "onsetDate": "Data debutului",
64
+ "ordered": "Comandat",
65
+ "orderedMedication ": "medicament comandat",
66
+ "orders": "Comenzi",
67
+ "ordersForHomeDelivery": "Comenzi pentru livrare la domiciliu",
68
+ "patientInstructions": "Instrucțiuni pentru pacient",
69
+ "patientName": "Nume pacient",
70
+ "pause": "Pauză",
71
+ "paused": "Pauzat",
72
+ "pausedDispense": "distribuire pauzată",
73
+ "pausePrescription": "Pauzează prescripția",
74
+ "prescribed": "Prescris",
75
+ "prescriber": "Prescriptor",
76
+ "prescriptionDetails": "Detalii prescripție",
77
+ "prescriptionInstructions": "Instrucțiuni pentru prescripție",
78
+ "prescriptionsToFillToday": "Prescripții de completat azi",
79
+ "print": "Printează",
80
+ "printPrescriptions": "Printează prescripții",
81
+ "quantity": "Cantitate",
82
+ "reasonForClose": "Motiv închidere",
83
+ "reasonForPause": "Motiv pauză",
84
+ "refills": "Reînnoiri",
85
+ "route": "Rută",
86
+ "searchByPatientIdOrName": "Caută după ID pacient sau nume",
87
+ "selectPrescriptions": "Bifează prescripțiile pentru printare",
88
+ "selectStockDispense": "Selectează stocul din care se distribuie",
89
+ "status": "Stare",
90
+ "stockDispense": "Distribuire din stoc",
91
+ "stockDispensed": "Stoc distribuit",
92
+ "stockDispenseDetails": "Lot: {{batchNumber}} Cantitate: {{quantity}} ({{quantityUoM}}) Expiră: {{expiration}}",
93
+ "stockDispensedSuccessfully": "Stocul a fost distribuit cu succes și lotul a fost actualizat.",
94
+ "substitutionReason": "Motiv substituire",
95
+ "substitutionType": "Tip substituire",
96
+ "tabList": "Listă taburi",
97
+ "today": "Astăzi",
98
+ "view": "Vezi",
99
+ "visitFinalDiagnoses": "Diagnostice finale vizită"
100
100
  }
@@ -1 +0,0 @@
1
- {"hash":"c8dc908985a62257","duration":41558}