@openmrs/esm-ward-app 10.0.3-pre.8686 → 10.0.3-pre.8689

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.
@@ -3,4 +3,4 @@
3
3
  │ 4064.js (1.701 MiB)
4
4
  
5
5
 
6
- Rspack compiled with 1 warning in 31.35 s
6
+ Rspack compiled with 1 warning in 37.95 s
package/dist/5117.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["5117"],{4300(e){e.exports=JSON.parse('{"addPatientToWard":"Add patient to ward","admissionRequestCancelledForPatient":"Admission request cancelled for {{patientName}}","admissionRequests":"Admission requests","admissionRequestsCount_one":"{{count}} admission request","admissionRequestsCount_other":"{{count}} admission requests","admissionRequestsEmptyHelperText":"Admission requests from other departments will appear here when patients are referred to this ward. You can also directly admit patients using the button below.","admit":"Admit","admitElsewhere":"Admit elsewhere","admitPatient":"Admit patient","admittedTo":"Admitted to {{locationName}}","admitting":"Admitting...","alsoAdmitOrCancel":"Also admit / cancel:","alsoSwap":"Also swap:","alsoTransfer":"Also transfer:","alsoTransferOrCancel":"Also transfer / cancel:","backToSearchResults":"Back to search results","bedShare":"Bed share","bedSwap":"Bed swap","cancel":"Cancel","cancelAdmissionRequest":"Cancel admission request","chooseAnOption":"Choose an option","clinicalForms":"Clinical forms","clinicalNoteLabel":"Write your notes","clinicalNotes":"Clinical notes","countItems_one":"{{count}} {{item}}","countItems_other":"{{count}} {{item}}","days_one":"{{count}} day","days_other":"{{count}} days","deleteNote":"Delete note","deleteNoteConfirmationText":"Are you sure you want to delete this note? This action can\'t be undone.","discharge":"Discharge","editNote":"Edit note","emptyBed":"Empty bed","emptyText":"Empty","encounterDisplay":"{{encounterType}} {{encounterDate}}","errorAdmittingPatient":"Failed to admit {{patientName}}","errorCancellingAdmissionRequest":"Error cancelling admission request for {{patientName}}","errorChangingPatientBedAssignment":"Error changing patient bed assignment","errorConfiguringPatientCard":"Error configuring patient card","errorConfiguringPatientCardMessage":"Unable to find configuration for {{elementType}}, id: {{id}}","errorCreatingTransferRequest":"Error creating transfer request for {{patientName}}","errorDeletingNote":"Error deleting note","errorDischargingPatient":"Error discharging patient","errorLoadingBedDetails":"Error loading bed details","errorLoadingChildren":"Error loading children info","errorLoadingMother":"Error loading mother info","errorLoadingPatientAdmissionRequests":"Error loading patient admission requests","errorLoadingPatientInfo":"Error loading patient info","errorLoadingPatients":"Error loading admitted patients","errorLoadingWardLocation":"Error loading ward location","errorSavingPatientNote":"Error saving patient note","errorTransferringPatient":"Failed to transfer {{patientName}}","female":"Female","fetchingEmrConfigurationFailed":"Fetching EMR configuration failed. Try refreshing the page or contact your system administrator.","fetchingPatientNotesFailed":"Fetching patient notes failed. Try refreshing the page or contact your system administrator.","freeBeds":"Free beds","hours_one":"{{count}} hour","hours_other":"{{count}} hours","infants":"Infants","inpatientNotesWorkspaceTitle":"In-patient notes","invalidLocationSpecified":"Invalid location specified","invalidWardLocation":"Invalid ward location: {{location}}","labelColon":"{{label}}:","lastEditedBy":"Last edited by: {{name}}, {{date}}","male":"Male","manage":"Manage","minutes_one":"{{count}} minutes","minutes_other":"{{count}} minutes","motherChildBedShare":"Mother / Child","mothers":"Mothers","nextPage":"Next page","noActiveVisit":"No active visit","noAdmission":"No admission found","noBed":"No bed","noBedsConfigured":"No beds configured for this location","noBedsConfiguredForLocation":"No beds configured for {{location}} location","noLocationsFound":"No locations found","noPendingAdmissionRequests":"No pending admission requests","note":"Note","noteDeletedSuccessfully":"Note deleted successfully","noteEditHistory":"Note edit history","notes":"Notes","notesRequiredForCancellingRequest":"Notes required for cancelling admission or transfer request","orderBasket":"Order basket","Orders":"Orders","other":"Other","patient":"Patient","patientAdmittedButBedNotAssigned":"{{patientName}} admitted successfully but failed to assign bed","patientAdmittedSuccessfully":"Patient admitted successfully","patientAdmittedSuccessfullySubtitle":"{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}","patientAdmittedToLocation":"{{patientName}} admitted successfully to {{location}}","patientAdmittedWoBed":"{{patientName}} admitted successfully to {{location}}","patientAlreadyAdmittedToCurrentLocation":"Patient already admitted to current location","patientAssignedNewBed":"Patient assigned to new bed","patientAssignedNewBedDetail":"{{patientName}} assigned to bed {{bedNumber}}","patientCurrentlyAdmittedToWardLocation":"Patient currently admitted to {{wardLocation}}","patientCurrentlyNotAdmitted":"Patient currently not admitted","patienthasNoActiveVisit":"Patient has no active visit","patientHasPendingAdmissionRequest":"Patient already has a pending admission request to location {{location}}","PatientNote":"Patient Note","patientNoteNowVisible":"It should be now visible in the notes history","patientNoteSaveError":"Error saving patient note","patientNotesDidntLoad":"Patient notes didn\'t load","patients":"Patients","patientTransferredSuccessfully":"Patient transferred successfully","patientTransferredToLocation":"{{patientName}} transferred successfully to {{location}}","patientTransferRequestCreatedForPatient":"Transfer request created for {{patientName}}","patientUnassignedFromBed":"Patient unassigned from bed","patientUnassignedFromBedDetail":"{{patientName}} is now unassigned from bed","patientWasDischarged":"Patient was discharged","pendingDischarge":"Pending Discharge","pendingOut":"Pending out","pendingTransfer":"Pending Transfer","pleaseSelectBed":"Please select a bed","pleaseSelectTransferLocation":"Please select transfer location","pleaseSelectTransferType":"Please select transfer type","previousPage":"Previous page","proceedWithPatientDischarge":"Proceed with patient discharge","save":"Save","saveEdit":"Save edit","saving":"Saving...","searchLocations":"Search locations","seconds_one":"{{count}} second","seconds_other":"{{count}} seconds","selectABed":"Select a bed","selectALocation":"Select a location","showingLocations_one":"{{start}}-{{end}} of {{count}} locations","showingLocations_other":"{{start}}-{{end}} of {{count}} locations","somePartsOfTheFormDidntLoad":"Some parts of the form didn\'t load","timeOnWard":"Time on this ward: {{timeOnWard}}","timeSinceAdmission":"Admitted: {{timeSinceAdmission}}","totalBeds":"Total beds","transfer":"Transfer","transferElsewhere":"Transfer elsewhere","transferPatient":"Transfer patient","transfers":"Transfers","transferToDispositionLocation":"Transfer to {{location}}","transferType":"Transfer type","typeOfTransfer":"Type of transfer","unknown":"Unknown","unknownError":"An unknown error occurred","viewEditHistory":"View edit history","visitNoteSaved":"Patient note saved","wardClinicalNotePlaceholder":"Write any notes here","wardPatient":"Ward patient","wards":"Wards","writtenBy":"Written by: {{name}}, {{date}}"}')}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["5117"],{4300(e){e.exports=JSON.parse('{"addPatientToWard":"Add patient to ward","admissionRequestCancelledForPatient":"Admission request cancelled for {{patientName}}","admissionRequests":"Admission requests","admissionRequestsCount_one":"{{count}} admission request","admissionRequestsCount_other":"{{count}} admission requests","admissionRequestsEmptyHelperText":"Admission requests from other departments will appear here when patients are referred to this ward. You can also directly admit patients using the button below.","admit":"Admit","admitElsewhere":"Admit elsewhere","admitPatient":"Admit patient","admittedTo":"Admitted to {{locationName}}","admitting":"Admitting...","alsoAdmitOrCancel":"Also admit / cancel:","alsoSwap":"Also swap:","alsoTransfer":"Also transfer:","alsoTransferOrCancel":"Also transfer / cancel:","backToSearchResults":"Back to search results","bedShare":"Bed share","bedSwap":"Bed swap","cancel":"Cancel","cancelAdmissionRequest":"Cancel admission request","chooseAnOption":"Choose an option","clinicalForms":"Clinical forms","clinicalNoteLabel":"Write your notes","clinicalNotes":"Clinical notes","confirmDischarge":"Confirm discharge","countItems_one":"{{count}} {{item}}","countItems_other":"{{count}} {{item}}","days_one":"{{count}} day","days_other":"{{count}} days","deleteNote":"Delete note","deleteNoteConfirmationText":"Are you sure you want to delete this note? This action can\'t be undone.","discharge":"Discharge","dischargeNote":"Discharge note (optional)","dischargeNotePlaceholder":"Write any notes here","discharging":"Discharging...","editNote":"Edit note","emptyBed":"Empty bed","emptyText":"Empty","encounterDisplay":"{{encounterType}} {{encounterDate}}","errorAdmittingPatient":"Failed to admit {{patientName}}","errorCancellingAdmissionRequest":"Error cancelling admission request for {{patientName}}","errorChangingPatientBedAssignment":"Error changing patient bed assignment","errorConfiguringPatientCard":"Error configuring patient card","errorConfiguringPatientCardMessage":"Unable to find configuration for {{elementType}}, id: {{id}}","errorCreatingTransferRequest":"Error creating transfer request for {{patientName}}","errorDeletingNote":"Error deleting note","errorDischargingPatient":"Error discharging patient","errorLoadingBedDetails":"Error loading bed details","errorLoadingChildren":"Error loading children info","errorLoadingMother":"Error loading mother info","errorLoadingPatientAdmissionRequests":"Error loading patient admission requests","errorLoadingPatientInfo":"Error loading patient info","errorLoadingPatients":"Error loading admitted patients","errorLoadingWardLocation":"Error loading ward location","errorSavingPatientNote":"Error saving patient note","errorTransferringPatient":"Failed to transfer {{patientName}}","female":"Female","fetchingEmrConfigurationFailed":"Fetching EMR configuration failed. Try refreshing the page or contact your system administrator.","fetchingPatientNotesFailed":"Fetching patient notes failed. Try refreshing the page or contact your system administrator.","freeBeds":"Free beds","hours_one":"{{count}} hour","hours_other":"{{count}} hours","infants":"Infants","inpatientNotesWorkspaceTitle":"In-patient notes","invalidLocationSpecified":"Invalid location specified","invalidWardLocation":"Invalid ward location: {{location}}","labelColon":"{{label}}:","lastEditedBy":"Last edited by: {{name}}, {{date}}","male":"Male","manage":"Manage","minutes_one":"{{count}} minutes","minutes_other":"{{count}} minutes","motherChildBedShare":"Mother / Child","mothers":"Mothers","nextPage":"Next page","noActiveVisit":"No active visit","noAdmission":"No admission found","noBed":"No bed","noBedsConfigured":"No beds configured for this location","noBedsConfiguredForLocation":"No beds configured for {{location}} location","noLocationsFound":"No locations found","noPendingAdmissionRequests":"No pending admission requests","note":"Note","noteDeletedSuccessfully":"Note deleted successfully","noteEditHistory":"Note edit history","notes":"Notes","notesRequiredForCancellingRequest":"Notes required for cancelling admission or transfer request","orderBasket":"Order basket","Orders":"Orders","other":"Other","patient":"Patient","patientAdmittedButBedNotAssigned":"{{patientName}} admitted successfully but failed to assign bed","patientAdmittedSuccessfully":"Patient admitted successfully","patientAdmittedSuccessfullySubtitle":"{{patientName}} has been successfully admitted and assigned to bed {{bedNumber}}","patientAdmittedToLocation":"{{patientName}} admitted successfully to {{location}}","patientAdmittedWoBed":"{{patientName}} admitted successfully to {{location}}","patientAlreadyAdmittedToCurrentLocation":"Patient already admitted to current location","patientAssignedNewBed":"Patient assigned to new bed","patientAssignedNewBedDetail":"{{patientName}} assigned to bed {{bedNumber}}","patientCurrentlyAdmittedToWardLocation":"Patient currently admitted to {{wardLocation}}","patientCurrentlyNotAdmitted":"Patient currently not admitted","patienthasNoActiveVisit":"Patient has no active visit","patientHasPendingAdmissionRequest":"Patient already has a pending admission request to location {{location}}","PatientNote":"Patient Note","patientNoteNowVisible":"It should be now visible in the notes history","patientNoteSaveError":"Error saving patient note","patientNotesDidntLoad":"Patient notes didn\'t load","patients":"Patients","patientTransferredSuccessfully":"Patient transferred successfully","patientTransferredToLocation":"{{patientName}} transferred successfully to {{location}}","patientTransferRequestCreatedForPatient":"Transfer request created for {{patientName}}","patientUnassignedFromBed":"Patient unassigned from bed","patientUnassignedFromBedDetail":"{{patientName}} is now unassigned from bed","patientWasDischarged":"Patient was discharged","pendingDischarge":"Pending Discharge","pendingOut":"Pending out","pendingTransfer":"Pending Transfer","pleaseSelectBed":"Please select a bed","pleaseSelectTransferLocation":"Please select transfer location","pleaseSelectTransferType":"Please select transfer type","previousPage":"Previous page","save":"Save","saveEdit":"Save edit","saving":"Saving...","searchLocations":"Search locations","seconds_one":"{{count}} second","seconds_other":"{{count}} seconds","selectABed":"Select a bed","selectALocation":"Select a location","showingLocations_one":"{{start}}-{{end}} of {{count}} locations","showingLocations_other":"{{start}}-{{end}} of {{count}} locations","somePartsOfTheFormDidntLoad":"Some parts of the form didn\'t load","timeOnWard":"Time on this ward: {{timeOnWard}}","timeSinceAdmission":"Admitted: {{timeSinceAdmission}}","totalBeds":"Total beds","transfer":"Transfer","transferElsewhere":"Transfer elsewhere","transferPatient":"Transfer patient","transfers":"Transfers","transferToDispositionLocation":"Transfer to {{location}}","transferType":"Transfer type","typeOfTransfer":"Type of transfer","unableToDischargePatient":"Unable to discharge patient. Please try again.","unknown":"Unknown","unknownError":"An unknown error occurred","viewEditHistory":"View edit history","visitNoteSaved":"Patient note saved","wardClinicalNotePlaceholder":"Write any notes here","wardPatient":"Ward patient","wards":"Wards","writtenBy":"Written by: {{name}}, {{date}}"}')}}]);
package/dist/5117.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"5117.js","sources":["webpack://@openmrs/esm-ward-app/json|/home/runner/work/openmrs-esm-patient-management/openmrs-esm-patient-management/packages/esm-ward-app/translations/en.json"],"names":["JSON"],"mappings":"qIAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,y9N"}
1
+ {"version":3,"file":"5117.js","sources":["webpack://@openmrs/esm-ward-app/json|/home/runner/work/openmrs-esm-patient-management/openmrs-esm-patient-management/packages/esm-ward-app/translations/en.json"],"names":["JSON"],"mappings":"qIAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,0oO"}
package/dist/9983.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["9983"],{962(n,e,t){t.d(e,{A:()=>s});var a=t(1452),i=t.n(a),r=t(4567),o=t.n(r)()(i());o.push([n.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__style__wardWorkspacePatientBanner___2KnUU>div{background:#f4f4f4}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/patient-banner/style.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DA,0DACE,kBDFI",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 '@openmrs/esm-styleguide/src/vars' as *;\n\n.wardWorkspacePatientBanner {\n > div {\n background: $ui-01;\n }\n}\n"],sourceRoot:""}]),o.locals={wardWorkspacePatientBanner:"-esm-ward__style__wardWorkspacePatientBanner___2KnUU"};let s=o},6869(n,e,t){t.d(e,{A:()=>s});var a=t(1452),i=t.n(a),r=t(4567),o=t.n(r)()(i());o.push([n.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__patient-discharge__workspaceContent___EOT5D{padding:1rem;height:100%;display:flex;flex-direction:column;color:#393939}.-esm-ward__patient-discharge__patientWorkspaceBanner___RR6fN{margin:-1rem -1rem 1rem -1rem}.-esm-ward__patient-discharge__contentSwitcher___8-nco{margin-top:.5rem}.-esm-ward__patient-discharge__workspaceForm___vYwC8{margin-top:1rem;flex:1}.-esm-ward__patient-discharge__productiveHeading02___brCET{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-ward__patient-discharge__buttonSet___c7pe2{margin:0 -1rem -1rem -1rem}.-esm-ward__patient-discharge__buttonSet___c7pe2 button{max-width:unset !important;width:auto !important}.-esm-ward__patient-discharge__buttonSet___c7pe2 button>svg{fill:currentColor !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/patient-discharge/patient-discharge.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,wDACE,YC0BW,CDzBX,WAAA,CACA,YAAA,CACA,qBAAA,CACA,aAAA,CAGF,8DACE,6BAAA,CAGF,uDACE,gBCIW,CDDb,qDACE,eCUW,CDTX,MAAA,CAGF,2DEy0BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFr0BJ,iDACE,0BAAA,CAEA,wDACE,0BAAA,CACA,qBAAA,CAEA,4DACE,4BAAA",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/type';\n@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.workspaceContent {\n padding: layout.$spacing-05;\n height: 100%;\n display: flex;\n flex-direction: column;\n color: #393939;\n}\n\n.patientWorkspaceBanner {\n margin: (-(layout.$spacing-05)) (-(layout.$spacing-05)) layout.$spacing-05 (-(layout.$spacing-05));\n}\n\n.contentSwitcher {\n margin-top: layout.$spacing-03;\n}\n\n.workspaceForm {\n margin-top: layout.$spacing-05;\n flex: 1;\n}\n\n.productiveHeading02 {\n @include type.type-style('heading-compact-02');\n}\n\n.buttonSet {\n margin: 0 (-(layout.$spacing-05)) (-(layout.$spacing-05)) (-(layout.$spacing-05));\n\n button {\n max-width: unset !important;\n width: auto !important;\n\n > svg {\n fill: currentColor !important;\n }\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\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:""}]),o.locals={workspaceContent:"-esm-ward__patient-discharge__workspaceContent___EOT5D",patientWorkspaceBanner:"-esm-ward__patient-discharge__patientWorkspaceBanner___RR6fN",contentSwitcher:"-esm-ward__patient-discharge__contentSwitcher___8-nco",workspaceForm:"-esm-ward__patient-discharge__workspaceForm___vYwC8",productiveHeading02:"-esm-ward__patient-discharge__productiveHeading02___brCET",buttonSet:"-esm-ward__patient-discharge__buttonSet___c7pe2"};let s=o},4567(n){n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var t=n(e);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t}).join("")},e.i=function(n,t,a){"string"==typeof n&&(n=[[null,n,""]]);var i={};if(a)for(var r=0;r<this.length;r++){var o=this[r][0];null!=o&&(i[o]=!0)}for(var s=0;s<n.length;s++){var p=[].concat(n[s]);a&&i[p[0]]||(t&&(p[2]?p[2]="".concat(t," and ").concat(p[2]):p[2]=t),e.push(p))}},e}},1452(n){function e(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=Array(e);t<e;t++)a[t]=n[t];return a}n.exports=function(n){var t=function(n){if(Array.isArray(n))return n}(n)||function(n){var e,t,a=n&&("u">typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null!=a){var i=[],r=!0,o=!1;try{for(a=a.call(n);!(r=(e=a.next()).done)&&(i.push(e.value),4!==i.length);r=!0);}catch(n){o=!0,t=n}finally{try{r||null==a.return||a.return()}finally{if(o)throw t}}return i}}(n)||function(n){if(n){if("string"==typeof n)return e(n,4);var t=Object.prototype.toString.call(n).slice(8,-1);if("Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e(n,4)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=t[1],i=t[3];if(!i)return a;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(i))));return[a].concat(i.sources.map(function(n){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(n," */")})).concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r)," */")]).join("\n")}return[a].join("\n")}},2591(n){var e=[];function t(n){for(var t=-1,a=0;a<e.length;a++)if(e[a].identifier===n){t=a;break}return t}function a(n,a){for(var i={},r=[],o=0;o<n.length;o++){var s=n[o],p=a.base?s[0]+a.base:s[0],c=i[p]||0,l="".concat(p," ").concat(c);i[p]=c+1;var u=t(l),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==u)e[u].references++,e[u].updater(d);else{var f=function(n,e){var t=e.domAPI(e);return t.update(n),function(e){e?(e.css!==n.css||e.media!==n.media||e.sourceMap!==n.sourceMap||e.supports!==n.supports||e.layer!==n.layer)&&t.update(n=e):t.remove()}}(d,a);a.byIndex=o,e.splice(o,0,{identifier:l,updater:f,references:1})}r.push(l)}return r}n.exports=function(n,i){var r=a(n=n||[],i=i||{});return function(n){n=n||[];for(var o=0;o<r.length;o++){var s=t(r[o]);e[s].references--}for(var p=a(n,i),c=0;c<r.length;c++){var l=t(r[c]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}r=p}}},8128(n){var e={};n.exports=function(n,t){var a=function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}e[n]=t}return e[n]}(n);if(!a)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}},3051(n){n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},855(n,e,t){n.exports=function(n){var e=t.nc;e&&n.setAttribute("nonce",e)}},1740(n){n.exports=function(n){if("u"<typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(t){var a,i,r;a="",t.supports&&(a+="@supports (".concat(t.supports,") {")),t.media&&(a+="@media ".concat(t.media," {")),(i=void 0!==t.layer)&&(a+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),a+=t.css,i&&(a+="}"),t.media&&(a+="}"),t.supports&&(a+="}"),(r=t.sourceMap)&&"u">typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),n.styleTagTransform(a,e,n.options)},remove:function(){var n;null===(n=e).parentNode||n.parentNode.removeChild(n)}}}},3656(n){n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},3724(n,e,t){t.d(e,{A:()=>p});var a=t(2735),i=t(7125),r=t(4498),o=t.n(r),s="custom:".concat([["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["admissionDecisionConcept","ref"],["denyAdmissionConcept","ref"]].map(function(n){return n.join(":")}).join(","));function p(){var n=o()("".concat(a.restBaseUrl,"/emrapi/configuration?v=").concat(s),a.openmrsFetch);return(0,i.useMemo)(function(){var e;return{emrConfiguration:null==(e=n.data)?void 0:e.data,isLoadingEmrConfiguration:n.isLoading,mutateEmrConfiguration:n.mutate,errorFetchingEmrConfiguration:n.error}},[n])}},9656(n,e,t){t.d(e,{A:()=>s});var a=t(2735),i=t(2745),r=t(4498),o=t.n(r);function s(){var n=(0,i.useParams)().locationUuid,e=(0,a.useSession)().sessionLocation,t=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom:(display,uuid)";return o()(n?"".concat(a.restBaseUrl,"/location/").concat(n,"?v=").concat(e):null,a.openmrsFetch)}(n||null),r=t.data,s=t.isLoading,p=t.error,c=n&&p;return{location:n?null==r?void 0:r.data:e,isLoadingLocation:s,errorFetchingLocation:p,invalidLocation:c}}},1378(n,e,t){t.r(e),t.d(e,{default:()=>w});var a=t(7125),i=t.n(a),r=t(2735),o=t(2591),s=t.n(o),p=t(1740),c=t.n(p),l=t(8128),u=t.n(l),d=t(855),f=t.n(d),g=t(3051),h=t.n(g),y=t(3656),m=t.n(y),b=t(962),$={};$.styleTagTransform=m(),$.setAttributes=f(),$.insert=u().bind(null,"head"),$.domAPI=c(),$.insertStyleElement=h(),s()(b.A,$);let v=b.A&&b.A.locals?b.A.locals:void 0,w=function(n){var e,t=n.wardPatient,a=(null!=t?t:{}).patient,o=(null!=(e=(0,r.useAppContext)("ward-view-context"))?e:{}).WardPatientHeader;return a?o?i().createElement("div",{className:v.wardWorkspacePatientBanner},i().createElement(o,{wardPatient:t})):i().createElement(i().Fragment,null):(console.warn("Patient details were not received by the ward workspace"),null)}},1858(n,e,t){t.r(e),t.d(e,{default:()=>z});var a=t(7125),i=t.n(a),r=t(5921),o=t(7768),s=t(8622),p=t(2735),c=t(6794),l=t(1378),u=t(2591),d=t.n(u),f=t(1740),g=t.n(f),h=t(8128),y=t.n(h),m=t(855),b=t.n(m),$=t(3051),v=t.n($),w=t(3656),k=t.n(w),A=t(6869),x={};x.styleTagTransform=k(),x.setAttributes=b(),x.insert=y().bind(null,"head"),x.domAPI=g(),x.insertStyleElement=v(),d()(A.A,x);let C=A.A&&A.A.locals?A.A.locals:void 0;function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=Array(e);t<e;t++)a[t]=n[t];return a}function z(n){var e,t,u=n.groupProps.wardPatient,d=n.closeWorkspace,f=(0,r.useTranslation)().t,g=function(n){if(Array.isArray(n))return n}(e=(0,a.useState)(!1))||function(n){var e,t,a=null==n?null:"u">typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=a){var i=[],r=!0,o=!1;try{for(a=a.call(n);!(r=(e=a.next()).done)&&(i.push(e.value),2!==i.length);r=!0);}catch(n){o=!0,t=n}finally{try{r||null==a.return||a.return()}finally{if(o)throw t}}return i}}(e)||function(n){if(n){if("string"==typeof n)return _(n,2);var e=Object.prototype.toString.call(n).slice(8,-1);if("Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _(n,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=g[0],y=g[1],m=(0,c.R_)(),b=m.createEncounter,$=m.emrConfiguration,v=m.isLoadingEmrConfiguration,w=m.errorFetchingEmrConfiguration,k=(null!=(t=(0,p.useAppContext)("ward-view-context"))?t:{}).wardPatientGroupDetails,A=(0,a.useCallback)(function(){var n;y(!0),b(null==u?void 0:u.patient,$.exitFromInpatientEncounterType,null==u||null==(n=u.visit)?void 0:n.uuid).then(function(n){if(null==n?void 0:n.ok){var e,t;return(null==u||null==(e=u.bed)?void 0:e.id)?(0,c.Tb)(u.bed.id,null==u||null==(t=u.patient)?void 0:t.uuid):n}}).then(function(n){(null==n?void 0:n.ok)&&((0,p.showSnackbar)({title:f("patientWasDischarged","Patient was discharged"),kind:"success"}),d({discardUnsavedChanges:!0}),(0,p.closeWorkspaceGroup2)())}).catch(function(n){var e,t,a,i,r;(0,p.showSnackbar)({title:f("errorDischargingPatient","Error discharging patient"),subtitle:null!=(e=null==n||null==(r=n.responseBody)||null==(i=r.error)||null==(a=i.globalErrors)||null==(t=a[0])?void 0:t.message)?e:n.message,kind:"error"})}).finally(function(){var n;y(!1),null==k||null==(n=k.mutate)||n.call(k)})},[b,u,$,f,d,k]);return k?i().createElement(p.Workspace2,{title:f("discharge","Discharge")},i().createElement("div",{className:C.workspaceContent},i().createElement("div",{className:C.patientWorkspaceBanner},i().createElement(l.default,{wardPatient:u})),i().createElement("div",{className:C.workspaceForm},i().createElement("div",null,w&&i().createElement("div",{className:C.formError},i().createElement(o.jeF,{kind:"error",title:f("somePartsOfTheFormDidntLoad","Some parts of the form didn't load"),subtitle:f("fetchingEmrConfigurationFailed","Fetching EMR configuration failed. Try refreshing the page or contact your system administrator."),lowContrast:!0,hideCloseButton:!0}))),i().createElement(p.ExtensionSlot,{name:"ward-patient-discharge-slot"}),i().createElement(o.Te$,{className:C.buttonSet},i().createElement(o.$nd,{size:"sm",kind:"ghost",renderIcon:function(n){return i().createElement(s.Jc,function(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),a.forEach(function(e){var a;a=t[e],e in n?Object.defineProperty(n,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[e]=a})}return n}({size:16},n))},disabled:v||h||w||!(null==u?void 0:u.patient),onClick:A},f("proceedWithPatientDischarge","Proceed with patient discharge")))))):null}},6794(n,e,t){t.d(e,{E:()=>p,R_:()=>o,S6:()=>u,Tb:()=>l,ZJ:()=>s,tf:()=>c});var a=t(2735),i=t(3724),r=t(9656);function o(){var n=(0,r.A)().location,e=(0,a.useSession)().currentProvider,t=(0,i.A)(),o=t.emrConfiguration;return{createEncounter:function(t,i,r){var s,p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c={patient:t.uuid,encounterType:i,location:null==n?void 0:n.uuid,encounterProviders:[{provider:null==e?void 0:e.uuid,encounterRole:null==o||null==(s=o.clinicianEncounterRole)?void 0:s.uuid}],obs:p,visit:r};return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/encounter"),{method:"POST",headers:{"content-type":"application/json"},body:c})},emrConfiguration:o,isLoadingEmrConfiguration:t.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:t.errorFetchingEmrConfiguration}}function s(n){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/encounter/").concat(n),{method:"DELETE"})}function p(){var n=o(),e=n.createEncounter,t=n.emrConfiguration;return{admitPatient:function(n,a,i){return e(n,"ADMIT"===a?t.admissionEncounterType:"TRANSFER"===a?t.transferWithinHospitalEncounterType:null,i)},isLoadingEmrConfiguration:n.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:n.errorFetchingEmrConfiguration}}function c(n,e,t){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds/").concat(n),{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:e,encounterUuid:t}})}function l(n,e){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds/").concat(n,"?patientUuid=").concat(e),{method:"DELETE"})}function u(n){return(0,a.openmrsFetch)("".concat(a.restBaseUrl,"/beds?patientUuid=").concat(n))}}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["9983"],{962(e,n,r){r.d(n,{A:()=>s});var t=r(1452),a=r.n(t),o=r(4567),i=r.n(o)()(a());i.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__style__wardWorkspacePatientBanner___2KnUU>div{background:#f4f4f4}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/patient-banner/style.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DA,0DACE,kBDFI",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 '@openmrs/esm-styleguide/src/vars' as *;\n\n.wardWorkspacePatientBanner {\n > div {\n background: $ui-01;\n }\n}\n"],sourceRoot:""}]),i.locals={wardWorkspacePatientBanner:"-esm-ward__style__wardWorkspacePatientBanner___2KnUU"};let s=i},6869(e,n,r){r.d(n,{A:()=>s});var t=r(1452),a=r.n(t),o=r(4567),i=r.n(o)()(a());i.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__patient-discharge__workspaceContent___EOT5D{padding:1rem;height:100%;display:flex;flex-direction:column;color:#393939}.-esm-ward__patient-discharge__patientWorkspaceBanner___RR6fN{margin:-1rem -1rem 1rem -1rem}.-esm-ward__patient-discharge__workspaceForm___vYwC8{margin-top:1rem;flex:1}.-esm-ward__patient-discharge__buttonSet___c7pe2{display:flex;align-items:center;margin:1rem -1rem -1rem -1rem}.-esm-ward__patient-discharge__buttonSet___c7pe2 button{max-width:unset !important;width:50% !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/patient-discharge/patient-discharge.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,wDACE,YC2BW,CD1BX,WAAA,CACA,YAAA,CACA,qBAAA,CACA,aAAA,CAGF,8DACE,6BAAA,CAGF,qDACE,eCeW,CDdX,MAAA,CAGF,iDACE,YAAA,CACA,kBAAA,CACA,6BAAA,CAEA,wDACE,0BAAA,CACA,oBAAA",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 '@openmrs/esm-styleguide/src/vars' as *;\n\n.workspaceContent {\n padding: layout.$spacing-05;\n height: 100%;\n display: flex;\n flex-direction: column;\n color: #393939;\n}\n\n.patientWorkspaceBanner {\n margin: (-(layout.$spacing-05)) (-(layout.$spacing-05)) layout.$spacing-05 (-(layout.$spacing-05));\n}\n\n.workspaceForm {\n margin-top: layout.$spacing-05;\n flex: 1;\n}\n\n.buttonSet {\n display: flex;\n align-items: center;\n margin: (layout.$spacing-05) (-(layout.$spacing-05)) (-(layout.$spacing-05)) (-(layout.$spacing-05));\n\n button {\n max-width: unset !important;\n width: 50% !important;\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),i.locals={workspaceContent:"-esm-ward__patient-discharge__workspaceContent___EOT5D",patientWorkspaceBanner:"-esm-ward__patient-discharge__patientWorkspaceBanner___RR6fN",workspaceForm:"-esm-ward__patient-discharge__workspaceForm___vYwC8",buttonSet:"-esm-ward__patient-discharge__buttonSet___c7pe2"};let s=i},4567(e){e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var r=e(n);return n[2]?"@media ".concat(n[2]," {").concat(r,"}"):r}).join("")},n.i=function(e,r,t){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(t)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);t&&a[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),n.push(c))}},n}},1452(e){function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=Array(n);r<n;r++)t[r]=e[r];return t}e.exports=function(e){var r=function(e){if(Array.isArray(e))return e}(e)||function(e){var n,r,t=e&&("u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var a=[],o=!0,i=!1;try{for(t=t.call(e);!(o=(n=t.next()).done)&&(a.push(n.value),4!==a.length);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==t.return||t.return()}finally{if(i)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return n(e,4);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,4)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),t=r[1],a=r[3];if(!a)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(a))));return[t].concat(a.sources.map(function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")})).concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o)," */")]).join("\n")}return[t].join("\n")}},2591(e){var n=[];function r(e){for(var r=-1,t=0;t<n.length;t++)if(n[t].identifier===e){r=t;break}return r}function t(e,t){for(var a={},o=[],i=0;i<e.length;i++){var s=e[i],c=t.base?s[0]+t.base:s[0],u=a[c]||0,l="".concat(c," ").concat(u);a[c]=u+1;var p=r(l),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)n[p].references++,n[p].updater(d);else{var f=function(e,n){var r=n.domAPI(n);return r.update(e),function(n){n?(n.css!==e.css||n.media!==e.media||n.sourceMap!==e.sourceMap||n.supports!==e.supports||n.layer!==e.layer)&&r.update(e=n):r.remove()}}(d,t);t.byIndex=i,n.splice(i,0,{identifier:l,updater:f,references:1})}o.push(l)}return o}e.exports=function(e,a){var o=t(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var s=r(o[i]);n[s].references--}for(var c=t(e,a),u=0;u<o.length;u++){var l=r(o[u]);0===n[l].references&&(n[l].updater(),n.splice(l,1))}o=c}}},8128(e){var n={};e.exports=function(e,r){var t=function(e){if(void 0===n[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}n[e]=r}return n[e]}(e);if(!t)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");t.appendChild(r)}},3051(e){e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},855(e,n,r){e.exports=function(e){var n=r.nc;n&&e.setAttribute("nonce",n)}},1740(e){e.exports=function(e){if("u"<typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(r){var t,a,o;t="",r.supports&&(t+="@supports (".concat(r.supports,") {")),r.media&&(t+="@media ".concat(r.media," {")),(a=void 0!==r.layer)&&(t+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),t+=r.css,a&&(t+="}"),r.media&&(t+="}"),r.supports&&(t+="}"),(o=r.sourceMap)&&"u">typeof btoa&&(t+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(t,n,e.options)},remove:function(){var e;null===(e=n).parentNode||e.parentNode.removeChild(e)}}}},3656(e){e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},3724(e,n,r){r.d(n,{A:()=>c});var t=r(2735),a=r(7125),o=r(4498),i=r.n(o),s="custom:".concat([["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["admissionDecisionConcept","ref"],["denyAdmissionConcept","ref"]].map(function(e){return e.join(":")}).join(","));function c(){var e=i()("".concat(t.restBaseUrl,"/emrapi/configuration?v=").concat(s),t.openmrsFetch);return(0,a.useMemo)(function(){var n;return{emrConfiguration:null==(n=e.data)?void 0:n.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}},[e])}},9656(e,n,r){r.d(n,{A:()=>s});var t=r(2735),a=r(2745),o=r(4498),i=r.n(o);function s(){var e=(0,a.useParams)().locationUuid,n=(0,t.useSession)().sessionLocation,r=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom:(display,uuid)";return i()(e?"".concat(t.restBaseUrl,"/location/").concat(e,"?v=").concat(n):null,t.openmrsFetch)}(e||null),o=r.data,s=r.isLoading,c=r.error,u=e&&c;return{location:e?null==o?void 0:o.data:n,isLoadingLocation:s,errorFetchingLocation:c,invalidLocation:u}}},1378(e,n,r){r.r(n),r.d(n,{default:()=>$});var t=r(7125),a=r.n(t),o=r(2735),i=r(2591),s=r.n(i),c=r(1740),u=r.n(c),l=r(8128),p=r.n(l),d=r(855),f=r.n(d),m=r(3051),g=r.n(m),b=r(3656),h=r.n(b),y=r(962),v={};v.styleTagTransform=h(),v.setAttributes=f(),v.insert=p().bind(null,"head"),v.domAPI=u(),v.insertStyleElement=g(),s()(y.A,v);let A=y.A&&y.A.locals?y.A.locals:void 0,$=function(e){var n,r=e.wardPatient,t=(null!=r?r:{}).patient,i=(null!=(n=(0,o.useAppContext)("ward-view-context"))?n:{}).WardPatientHeader;return t?i?a().createElement("div",{className:A.wardWorkspacePatientBanner},a().createElement(i,{wardPatient:r})):a().createElement(a().Fragment,null):(console.warn("Patient details were not received by the ward workspace"),null)}},1858(e,n,r){r.r(n),r.d(n,{default:()=>T});var t=r(7125),a=r.n(t),o=r(5921),i=r(7768),s=r(2735),c=r(6794),u=r(1378),l=r(2591),p=r.n(l),d=r(1740),f=r.n(d),m=r(8128),g=r.n(m),b=r(855),h=r.n(b),y=r(3051),v=r.n(y),A=r(3656),$=r.n(A),C=r(6869),w={};w.styleTagTransform=$(),w.setAttributes=h(),w.insert=g().bind(null,"head"),w.domAPI=f(),w.insertStyleElement=v(),p()(C.A,w);let k=C.A&&C.A.locals?C.A.locals:void 0;function _(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=Array(n);r<n;r++)t[r]=e[r];return t}function E(e,n,r,t,a,o,i){try{var s=e[o](i),c=s.value}catch(e){r(e);return}s.done?n(c):Promise.resolve(c).then(t,a)}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r,t,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!n||o.length!==n);i=!0);}catch(e){s=!0,t=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw t}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return _(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){var n,r=e.groupProps.wardPatient,l=e.closeWorkspace,p=(0,o.useTranslation)().t,d=x((0,t.useState)(!1),2),f=d[0],m=d[1],g=x((0,t.useState)(""),2),b=g[0],h=g[1],y=(0,c.R_)(),v=y.createEncounter,A=y.emrConfiguration,$=y.isLoadingEmrConfiguration,C=y.errorFetchingEmrConfiguration,w=(null!=(n=(0,s.useAppContext)("ward-view-context"))?n:{}).wardPatientGroupDetails,_=(0,t.useCallback)(function(e){var n;return(n=function(){var n,t,a,o,i,u,d,f,g,h,y,$,C,k,_;return function(e,n){var r,t,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(i,"next",{value:c(0)}),s(i,"throw",{value:c(1)}),s(i,"return",{value:c(2)}),"function"==typeof Symbol&&s(i,Symbol.iterator,{value:function(){return this}}),i;function c(s){return function(c){var u=[s,c];if(r)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,t&&(a=2&u[0]?t.return:u[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,u[1])).done)return a;switch(t=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,t=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=n.call(e,o)}catch(e){u=[6,e],t=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(E){switch(E.label){case 0:e.preventDefault(),m(!0),E.label=1;case 1:return E.trys.push([1,5,6,7]),a=b.trim(),o=[],a&&o.push({concept:null==A||null==(i=A.consultFreeTextCommentsConcept)?void 0:i.uuid,value:a}),[4,v(null==r?void 0:r.patient,A.exitFromInpatientEncounterType,null==r||null==(n=r.visit)?void 0:n.uuid,o)];case 2:if(E.sent(),!(null==r||null==(t=r.bed)?void 0:t.id))return[3,4];return[4,(0,c.Tb)(r.bed.id,null==r||null==(u=r.patient)?void 0:u.uuid)];case 3:E.sent(),E.label=4;case 4:return(0,s.showSnackbar)({title:p("patientWasDischarged","Patient was discharged"),kind:"success"}),l({discardUnsavedChanges:!0}),(0,s.closeWorkspaceGroup2)(),[3,7];case 5:return k=(null==(d=E.sent())||null==(y=d.responseBody)||null==(h=y.error)||null==(g=h.globalErrors)||null==(f=g[0])?void 0:f.message)||(null==d||null==(C=d.responseBody)||null==($=C.error)?void 0:$.message)||(null==d?void 0:d.message)||p("unableToDischargePatient","Unable to discharge patient. Please try again."),(0,s.showSnackbar)({title:p("errorDischargingPatient","Error discharging patient"),subtitle:k,kind:"error"}),[3,7];case 6:return m(!1),null==w||null==(_=w.mutate)||_.call(w),[7];case 7:return[2]}})},function(){var e=this,r=arguments;return new Promise(function(t,a){var o=n.apply(e,r);function i(e){E(o,t,a,i,s,"next",e)}function s(e){E(o,t,a,i,s,"throw",e)}i(void 0)})})()},[v,r,A,b,p,l,w]);return w?a().createElement(s.Workspace2,{title:p("discharge","Discharge"),hasUnsavedChanges:b.trim().length>0},a().createElement("div",{className:k.workspaceContent},a().createElement("div",{className:k.patientWorkspaceBanner},a().createElement(u.default,{wardPatient:r})),a().createElement(i.lVW,{"aria-label":p("discharge","Discharge"),className:k.workspaceForm,onSubmit:_},a().createElement("div",null,C&&a().createElement("div",null,a().createElement(i.jeF,{kind:"error",title:p("somePartsOfTheFormDidntLoad","Some parts of the form didn't load"),subtitle:p("fetchingEmrConfigurationFailed","Fetching EMR configuration failed. Try refreshing the page or contact your system administrator."),lowContrast:!0,hideCloseButton:!0}))),a().createElement(s.ExtensionSlot,{name:"ward-patient-discharge-slot"}),a().createElement("div",null,a().createElement(s.ResponsiveWrapper,null,a().createElement(i.fs1,{value:b,onChange:function(e){return h(e.target.value)},labelText:p("dischargeNote","Discharge note (optional)"),placeholder:p("dischargeNotePlaceholder","Write any notes here")}))),a().createElement(i.Te$,{className:k.buttonSet},a().createElement(i.$nd,{size:"xl",kind:"secondary",onClick:function(){return l()},disabled:f},p("cancel","Cancel")),a().createElement(i.$nd,{type:"submit",size:"xl",disabled:$||f||C||!(null==r?void 0:r.patient)},f?a().createElement(i.OuH,{description:p("discharging","Discharging...")}):a().createElement("span",null,p("confirmDischarge","Confirm discharge"))))))):null}},6794(e,n,r){r.d(n,{E:()=>c,R_:()=>i,S6:()=>p,Tb:()=>l,ZJ:()=>s,tf:()=>u});var t=r(2735),a=r(3724),o=r(9656);function i(){var e=(0,o.A)().location,n=(0,t.useSession)().currentProvider,r=(0,a.A)(),i=r.emrConfiguration;return{createEncounter:function(r,a,o){var s,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],u={patient:r.uuid,encounterType:a,location:null==e?void 0:e.uuid,encounterProviders:[{provider:null==n?void 0:n.uuid,encounterRole:null==i||null==(s=i.clinicianEncounterRole)?void 0:s.uuid}],obs:c,visit:o};return(0,t.openmrsFetch)("".concat(t.restBaseUrl,"/encounter"),{method:"POST",headers:{"content-type":"application/json"},body:u})},emrConfiguration:i,isLoadingEmrConfiguration:r.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:r.errorFetchingEmrConfiguration}}function s(e){return(0,t.openmrsFetch)("".concat(t.restBaseUrl,"/encounter/").concat(e),{method:"DELETE"})}function c(){var e=i(),n=e.createEncounter,r=e.emrConfiguration;return{admitPatient:function(e,t,a){return n(e,"ADMIT"===t?r.admissionEncounterType:"TRANSFER"===t?r.transferWithinHospitalEncounterType:null,a)},isLoadingEmrConfiguration:e.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:e.errorFetchingEmrConfiguration}}function u(e,n,r){return(0,t.openmrsFetch)("".concat(t.restBaseUrl,"/beds/").concat(e),{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:n,encounterUuid:r}})}function l(e,n){return(0,t.openmrsFetch)("".concat(t.restBaseUrl,"/beds/").concat(e,"?patientUuid=").concat(n),{method:"DELETE"})}function p(e){return(0,t.openmrsFetch)("".concat(t.restBaseUrl,"/beds?patientUuid=").concat(e))}}}]);
package/dist/9983.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"9983.js","sources":["webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-banner/style.scss","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-discharge/patient-discharge.scss","webpack://@openmrs/esm-ward-app/../../node_modules/@openmrs/rspack-config/node_modules/css-loader/dist/runtime/api.js","webpack://@openmrs/esm-ward-app/../../node_modules/@openmrs/rspack-config/node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://@openmrs/esm-ward-app/./src/hooks/useEmrConfiguration.ts","webpack://@openmrs/esm-ward-app/./src/hooks/useWardLocation.ts","webpack://@openmrs/esm-ward-app/./src/hooks/useLocation.ts","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-banner/style.scss?6592","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-banner/patient-banner.component.tsx","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-discharge/patient-discharge.scss?958b","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-discharge/patient-discharge.workspace.tsx","webpack://@openmrs/esm-ward-app/./src/ward.resource.ts"],"names":["a","Array","Symbol","Object","TypeError","btoa","unescape","encodeURIComponent","JSON","i","c","n","document","window","Error","e","customRep","customRepProps","prop","useEmrConfiguration","swrData","useSWRImmutable","restBaseUrl","openmrsFetch","useMemo","_swrData_data","useWardLocation","locationUuidFromUrl","_useParams","sessionLocation","useSession","_useLocation","locationUuid","rep","locationResponse","isLoadingLocation","errorFetchingLocation","invalidLocation","_useAppContext","wardPatient","patient","WardPatientHeader","styles","console","PatientDischargeWorkspace","param","closeWorkspace","t","useTranslation","_useState","isSubmitting","setIsSubmitting","_useCreateEncounter","createEncounter","emrConfiguration","isLoadingEmrConfiguration","errorFetchingEmrConfiguration","wardPatientGroupDetails","submitDischarge","useCallback","_wardPatient_visit","response","_wardPatient_bed","_wardPatient_patient","removePatientFromBed","showSnackbar","closeWorkspaceGroup2","err","_err_responseBody_error_globalErrors_","Workspace2","WardPatientWorkspaceBanner","InlineNotification","ExtensionSlot","ButtonSet","Button","renderIcon","props","Exit","useCreateEncounter","location","currentProvider","_useEmrConfiguration","encounterType","visitUuid","_emrConfiguration_clinicianEncounterRole","obs","encounterPayload","deleteEncounter","encounterUuid","useAdmitPatient","admitPatient","dispositionType","assignPatientToBed","bedUuid","patientUuid","bedId","getAssignedBedByPatient"],"mappings":"0LAGI,EAA0B,A,SAA4B,KAE1D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,6ZAA8Z,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,2DAA2D,CAAC,MAAQ,EAAE,CAAC,SAAW,uGAAuG,eAAiB,CAAC,g/DAAg/D,+HAA+H,CAAC,WAAa,EAAE,EAAE,EAEt3F,EAAwB,MAAM,CAAG,CAChC,2BAA8B,sDAC/B,EACA,MAAe,C,gECPX,EAA0B,A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CAAEC,CAAmB,CAAEN,CAAqB,EAC5F,MAAOjE,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAc,GAAsBsE,MAAAA,CAApBvE,EAAAA,WAAWA,CAAC,UAAgB,OAARuE,GAAW,CACpD,OAAQ,OACR,QAAS,CACP,eAAgB,kBAClB,EACA,KAAM,CACJC,YAAAA,EACAN,cAAAA,CACF,CACF,EACF,CAEO,SAASxB,EAAqB+B,CAAa,CAAED,CAAmB,EACrE,MAAOvE,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAc,GAAsBwE,MAAAA,CAApBzE,EAAAA,WAAWA,CAAC,UAA6BwE,MAAAA,CAArBC,EAAM,iBAA2B,OAAZD,GAAe,CAC7E,OAAQ,QACV,EACF,CAEO,SAASE,EAAwBF,CAAmB,EACzD,MAAOvE,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAqD,GAAkCuE,MAAAA,CAAhCxE,EAAAA,WAAWA,CAAC,sBAAgC,OAAZwE,GAChG,C"}
1
+ {"version":3,"file":"9983.js","sources":["webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-banner/style.scss","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-discharge/patient-discharge.scss","webpack://@openmrs/esm-ward-app/../../node_modules/@openmrs/rspack-config/node_modules/css-loader/dist/runtime/api.js","webpack://@openmrs/esm-ward-app/../../node_modules/@openmrs/rspack-config/node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@openmrs/esm-ward-app/../../node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://@openmrs/esm-ward-app/./src/hooks/useEmrConfiguration.ts","webpack://@openmrs/esm-ward-app/./src/hooks/useWardLocation.ts","webpack://@openmrs/esm-ward-app/./src/hooks/useLocation.ts","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-banner/style.scss?6592","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-banner/patient-banner.component.tsx","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-discharge/patient-discharge.scss?958b","webpack://@openmrs/esm-ward-app/./src/ward-workspace/patient-discharge/patient-discharge.workspace.tsx","webpack://@openmrs/esm-ward-app/./src/ward.resource.ts"],"names":["a","i","Array","Symbol","e","Object","TypeError","btoa","unescape","encodeURIComponent","JSON","r","n","t","document","window","Error","customRep","customRepProps","prop","useEmrConfiguration","swrData","useSWRImmutable","restBaseUrl","openmrsFetch","useMemo","_swrData_data","useWardLocation","locationUuidFromUrl","_useParams","sessionLocation","useSession","_useLocation","locationUuid","rep","locationResponse","isLoadingLocation","errorFetchingLocation","invalidLocation","_useAppContext","wardPatient","patient","WardPatientHeader","styles","console","PatientDischargeWorkspace","param","closeWorkspace","useTranslation","_useState","isSubmitting","setIsSubmitting","_useState1","dischargeNote","setDischargeNote","_useCreateEncounter","createEncounter","emrConfiguration","isLoadingEmrConfiguration","errorFetchingEmrConfiguration","wardPatientGroupDetails","onSubmit","useCallback","_wardPatient_visit","_wardPatient_bed","note","obs","_emrConfiguration_consultFreeTextCommentsConcept","_wardPatient_patient","err","_err_responseBody_error_globalErrors_","_err_responseBody_error1","message","removePatientFromBed","showSnackbar","closeWorkspaceGroup2","Workspace2","WardPatientWorkspaceBanner","Form","InlineNotification","ExtensionSlot","ResponsiveWrapper","TextArea","onChange","ButtonSet","Button","onClick","InlineLoading","useCreateEncounter","location","currentProvider","_useEmrConfiguration","encounterType","visitUuid","_emrConfiguration_clinicianEncounterRole","encounterPayload","deleteEncounter","encounterUuid","useAdmitPatient","admitPatient","disp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AAmBC,CAAe,CAAEC,CAAmB,CAAEN,CAAqB,EAC5F,MAAOzE,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAc,GAAsB8E,MAAAA,CAApB/E,EAAAA,WAAWA,CAAC,UAAgB,OAAR+E,GAAW,CACpD,OAAQ,OACR,QAAS,CACP,eAAgB,kBAClB,EACA,KAAM,CACJC,YAAAA,EACAN,cAAAA,CACF,CACF,EACF,CAEO,SAASxB,EAAqB+B,CAAa,CAAED,CAAmB,EACrE,MAAO/E,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAc,GAAsBgF,MAAAA,CAApBjF,EAAAA,WAAWA,CAAC,UAA6BgF,MAAAA,CAArBC,EAAM,iBAA2B,OAAZD,GAAe,CAC7E,OAAQ,QACV,EACF,CAEO,SAASE,EAAwBF,CAAmB,EACzD,MAAO/E,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAqD,GAAkC+E,MAAAA,CAAhChF,EAAAA,WAAWA,CAAC,sBAAgC,OAAZgF,GAChG,C"}
@@ -886,9 +886,9 @@
886
886
  "rendered": true,
887
887
  "initial": false,
888
888
  "entry": false,
889
- "size": 7123,
889
+ "size": 7300,
890
890
  "sizes": {
891
- "javascript": 7123
891
+ "javascript": 7300
892
892
  },
893
893
  "names": [],
894
894
  "idHints": [],
@@ -902,7 +902,7 @@
902
902
  "auxiliaryFiles": [
903
903
  "5117.js.map"
904
904
  ],
905
- "hash": "63fc5e06ff1722d5",
905
+ "hash": "ea1a85351098b567",
906
906
  "childrenByOrder": {}
907
907
  },
908
908
  {
@@ -2260,9 +2260,9 @@
2260
2260
  "rendered": true,
2261
2261
  "initial": false,
2262
2262
  "entry": false,
2263
- "size": 68207,
2263
+ "size": 49515,
2264
2264
  "sizes": {
2265
- "javascript": 68207
2265
+ "javascript": 49515
2266
2266
  },
2267
2267
  "names": [],
2268
2268
  "idHints": [],
@@ -2276,7 +2276,7 @@
2276
2276
  "auxiliaryFiles": [
2277
2277
  "9983.js.map"
2278
2278
  ],
2279
- "hash": "912c6c38cd7a12fb",
2279
+ "hash": "0d644267229a2130",
2280
2280
  "childrenByOrder": {}
2281
2281
  }
2282
2282
  ]
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">3.3.0 <4.0.0","emrapi":">=2.0.0 <4.0.0"},"optionalBackendDependencies":{"bedmanagement":{"version":">=6.0.0 <8.0.0","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardView","name":"ward-view","slot":"ward-view-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"component":"defaultWardView","name":"default-ward","slot":"default-ward"},{"component":"maternalWardView","name":"maternal-ward","slot":"maternal-ward"},{"component":"wardPatientWorkspaceBanner","name":"ward-patient-workspace-banner","slot":"ward-workspace-patient-banner-slot"}],"modals":[{"name":"delete-note-modal","component":"deleteNoteModal"},{"name":"note-history-modal","component":"noteHistoryModal"}],"workspaces2":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","window":"ward-manage-admissions-window"},{"name":"transfer-elsewhere-workspace","component":"patientTransferRequestWorkspace","window":"ward-manage-admissions-window"},{"name":"cancel-admission-request-workspace","component":"cancelAdmissionRequestWorkspace","window":"ward-manage-admissions-window"},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","window":"ward-manage-admissions-window"},{"name":"ward-app-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"ward-manage-admissions-window"},{"name":"ward-app-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"ward-manage-admissions-window"},{"name":"create-admission-encounter-workspace","component":"createAdmissionEncounterWorkspace","window":"ward-manage-admissions-window"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","window":"ward-patient"},{"name":"ward-patient-vitals-workspace","component":"@openmrs/esm-patient-vitals-app#exportedVitalsBiometricsFormWorkspace","window":"ward-patient"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","window":"ward-patient-notes"},{"name":"ward-patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","window":"ward-patient-transfer-swap"},{"name":"patient-discharge-workspace","component":"patientDischargeWorkspace","window":"ward-patient-discharge"},{"name":"ward-patient-clinical-forms-workspace","component":"@openmrs/esm-patient-forms-app#exportedClinicalFormsWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-cancel-admission-request-workspace","component":"wardPatientCancelAdmissionRequestWorkspace","window":"ward-patient-cancel-admission-request"},{"name":"ward-patient-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-lab-order-workspace","component":"@openmrs/esm-patient-tests-app#exportedAddLabOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-general-order-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"}],"workspaceWindows2":[{"name":"ward-manage-admissions-window","width":"wider","group":"ward-manage-admissions"},{"name":"ward-patient","group":"ward-patient","icon":"wardPatientActionButton","width":"wider"},{"name":"ward-patient-notes","group":"ward-patient","icon":"wardPatientNotesActionButton"},{"name":"ward-patient-transfer-swap","group":"ward-patient","icon":"patientTransferAndSwapWorkspaceSiderailIcon"},{"name":"ward-patient-discharge","group":"ward-patient","icon":"patientDischargeWorkspaceSideRailIcon"},{"name":"ward-patient-clinical-forms","group":"ward-patient","icon":"clinicalFormWorkspaceSideRailIcon"},{"name":"ward-patient-order-basket","group":"ward-patient","icon":"orderBasketWorkspaceSideRailIcon"},{"name":"ward-patient-cancel-admission-request","group":"ward-patient"}],"workspaceGroups2":[{"name":"ward-manage-admissions","scopePattern":"/home/ward","overlay":true},{"name":"ward-patient","scopePattern":"/home/ward","overlay":true,"persistence":"closable"}],"version":"10.0.3-pre.8686"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">3.3.0 <4.0.0","emrapi":">=2.0.0 <4.0.0"},"optionalBackendDependencies":{"bedmanagement":{"version":">=6.0.0 <8.0.0","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardView","name":"ward-view","slot":"ward-view-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"component":"defaultWardView","name":"default-ward","slot":"default-ward"},{"component":"maternalWardView","name":"maternal-ward","slot":"maternal-ward"},{"component":"wardPatientWorkspaceBanner","name":"ward-patient-workspace-banner","slot":"ward-workspace-patient-banner-slot"}],"modals":[{"name":"delete-note-modal","component":"deleteNoteModal"},{"name":"note-history-modal","component":"noteHistoryModal"}],"workspaces2":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","window":"ward-manage-admissions-window"},{"name":"transfer-elsewhere-workspace","component":"patientTransferRequestWorkspace","window":"ward-manage-admissions-window"},{"name":"cancel-admission-request-workspace","component":"cancelAdmissionRequestWorkspace","window":"ward-manage-admissions-window"},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","window":"ward-manage-admissions-window"},{"name":"ward-app-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"ward-manage-admissions-window"},{"name":"ward-app-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"ward-manage-admissions-window"},{"name":"create-admission-encounter-workspace","component":"createAdmissionEncounterWorkspace","window":"ward-manage-admissions-window"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","window":"ward-patient"},{"name":"ward-patient-vitals-workspace","component":"@openmrs/esm-patient-vitals-app#exportedVitalsBiometricsFormWorkspace","window":"ward-patient"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","window":"ward-patient-notes"},{"name":"ward-patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","window":"ward-patient-transfer-swap"},{"name":"patient-discharge-workspace","component":"patientDischargeWorkspace","window":"ward-patient-discharge"},{"name":"ward-patient-clinical-forms-workspace","component":"@openmrs/esm-patient-forms-app#exportedClinicalFormsWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"ward-patient-clinical-forms"},{"name":"ward-patient-cancel-admission-request-workspace","component":"wardPatientCancelAdmissionRequestWorkspace","window":"ward-patient-cancel-admission-request"},{"name":"ward-patient-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-lab-order-workspace","component":"@openmrs/esm-patient-tests-app#exportedAddLabOrderWorkspace","window":"ward-patient-order-basket"},{"name":"ward-patient-order-basket-add-general-order-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"ward-patient-order-basket"}],"workspaceWindows2":[{"name":"ward-manage-admissions-window","width":"wider","group":"ward-manage-admissions"},{"name":"ward-patient","group":"ward-patient","icon":"wardPatientActionButton","width":"wider"},{"name":"ward-patient-notes","group":"ward-patient","icon":"wardPatientNotesActionButton"},{"name":"ward-patient-transfer-swap","group":"ward-patient","icon":"patientTransferAndSwapWorkspaceSiderailIcon"},{"name":"ward-patient-discharge","group":"ward-patient","icon":"patientDischargeWorkspaceSideRailIcon"},{"name":"ward-patient-clinical-forms","group":"ward-patient","icon":"clinicalFormWorkspaceSideRailIcon"},{"name":"ward-patient-order-basket","group":"ward-patient","icon":"orderBasketWorkspaceSideRailIcon"},{"name":"ward-patient-cancel-admission-request","group":"ward-patient"}],"workspaceGroups2":[{"name":"ward-manage-admissions","scopePattern":"/home/ward","overlay":true},{"name":"ward-patient","scopePattern":"/home/ward","overlay":true,"persistence":"closable"}],"version":"10.0.3-pre.8689"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-ward-app",
3
- "version": "10.0.3-pre.8686",
3
+ "version": "10.0.3-pre.8689",
4
4
  "description": "Ward and bed management module for O3",
5
5
  "browser": "dist/openmrs-esm-ward-app.js",
6
6
  "main": "src/index.ts",
@@ -1,4 +1,3 @@
1
- @use '@carbon/type';
2
1
  @use '@carbon/layout';
3
2
  @use '@openmrs/esm-styleguide/src/vars' as *;
4
3
 
@@ -14,28 +13,18 @@
14
13
  margin: (-(layout.$spacing-05)) (-(layout.$spacing-05)) layout.$spacing-05 (-(layout.$spacing-05));
15
14
  }
16
15
 
17
- .contentSwitcher {
18
- margin-top: layout.$spacing-03;
19
- }
20
-
21
16
  .workspaceForm {
22
17
  margin-top: layout.$spacing-05;
23
18
  flex: 1;
24
19
  }
25
20
 
26
- .productiveHeading02 {
27
- @include type.type-style('heading-compact-02');
28
- }
29
-
30
21
  .buttonSet {
31
- margin: 0 (-(layout.$spacing-05)) (-(layout.$spacing-05)) (-(layout.$spacing-05));
22
+ display: flex;
23
+ align-items: center;
24
+ margin: (layout.$spacing-05) (-(layout.$spacing-05)) (-(layout.$spacing-05)) (-(layout.$spacing-05));
32
25
 
33
26
  button {
34
27
  max-width: unset !important;
35
- width: auto !important;
36
-
37
- > svg {
38
- fill: currentColor !important;
39
- }
28
+ width: 50% !important;
40
29
  }
41
30
  }
@@ -0,0 +1,353 @@
1
+ import React from 'react';
2
+ import userEvent from '@testing-library/user-event';
3
+ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
4
+ import { closeWorkspaceGroup2, showSnackbar, useAppContext, type FetchResponse } from '@openmrs/esm-framework';
5
+ import { useCreateEncounter, removePatientFromBed } from '../../ward.resource';
6
+ import PatientDischargeWorkspace from './patient-discharge.workspace';
7
+ import { mockInpatientRequestAlice, mockPatientAlice, mockVisitAlice } from '__mocks__';
8
+ import type { WardPatient, WardPatientWorkspaceDefinition, WardViewContext } from '../../types';
9
+ import type { EmrApiConfigurationResponse } from '../../hooks/useEmrConfiguration';
10
+ import { expect, vi, describe, it, beforeEach } from 'vitest';
11
+
12
+ const mockShowSnackbar = vi.mocked(showSnackbar);
13
+ const mockUseCreateEncounter = vi.mocked(useCreateEncounter);
14
+ const mockRemovePatientFromBed = vi.mocked(removePatientFromBed);
15
+ const mockUseAppContext = vi.mocked(useAppContext);
16
+ const mockCloseWorkspaceGroup2 = vi.mocked(closeWorkspaceGroup2);
17
+
18
+ vi.mock('../../ward.resource', () => ({
19
+ useCreateEncounter: vi.fn(),
20
+ removePatientFromBed: vi.fn(),
21
+ }));
22
+
23
+ vi.mock('../patient-banner/patient-banner.component', () => ({
24
+ default: () => <div>patient-banner</div>,
25
+ }));
26
+
27
+ function submitDischargeForm() {
28
+ fireEvent.submit(screen.getByRole('form', { name: /discharge/i }));
29
+ }
30
+
31
+ const mockWardPatient: WardPatient = {
32
+ patient: mockPatientAlice,
33
+ visit: mockVisitAlice,
34
+ bed: {
35
+ id: 1,
36
+ uuid: 'bed-1',
37
+ bedNumber: 'Bed 1',
38
+ bedType: {
39
+ uuid: 'bed-type',
40
+ name: 'General',
41
+ displayName: 'General',
42
+ description: '',
43
+ resourceVersion: '',
44
+ },
45
+ row: 1,
46
+ column: 1,
47
+ status: 'OCCUPIED',
48
+ },
49
+ inpatientAdmission: null,
50
+ inpatientRequest: mockInpatientRequestAlice,
51
+ };
52
+
53
+ const testProps: WardPatientWorkspaceDefinition = {
54
+ groupProps: { wardPatient: mockWardPatient },
55
+ closeWorkspace: vi.fn(),
56
+ launchChildWorkspace: vi.fn(),
57
+ showActionMenu: false,
58
+ workspaceProps: null,
59
+ windowProps: null,
60
+ workspaceName: 'discharge',
61
+ windowName: 'discharge',
62
+ isRootWorkspace: false,
63
+ };
64
+
65
+ describe('PatientDischargeWorkspace', () => {
66
+ const mockCreateEncounter = vi.fn();
67
+ const mockWardPatientMutate = vi.fn();
68
+
69
+ beforeEach(() => {
70
+ mockUseCreateEncounter.mockReturnValue({
71
+ createEncounter: mockCreateEncounter,
72
+ emrConfiguration: {
73
+ consultFreeTextCommentsConcept: { uuid: 'consult-concept', display: '' },
74
+ exitFromInpatientEncounterType: { uuid: 'exit-encounter', display: '' },
75
+ } as EmrApiConfigurationResponse,
76
+ isLoadingEmrConfiguration: false,
77
+ errorFetchingEmrConfiguration: null,
78
+ });
79
+
80
+ mockUseAppContext.mockReturnValue({
81
+ wardPatientGroupDetails: { mutate: mockWardPatientMutate },
82
+ } as unknown as WardViewContext);
83
+ });
84
+
85
+ it('renders discharge workspace with note field and action buttons', () => {
86
+ render(<PatientDischargeWorkspace {...testProps} />);
87
+
88
+ expect(screen.getByText(/Discharge note \(optional\)/i)).toBeInTheDocument();
89
+ expect(screen.getByPlaceholderText(/write any notes here/i)).toBeInTheDocument();
90
+ expect(screen.getByRole('button', { name: /cancel/i })).toBeInTheDocument();
91
+ expect(screen.getByRole('button', { name: /Confirm discharge/i })).toBeInTheDocument();
92
+ });
93
+
94
+ it('calls closeWorkspace when cancel button is clicked', async () => {
95
+ const user = userEvent.setup();
96
+
97
+ render(<PatientDischargeWorkspace {...testProps} />);
98
+
99
+ await user.click(screen.getByRole('button', { name: /cancel/i }));
100
+
101
+ expect(testProps.closeWorkspace).toHaveBeenCalled();
102
+ });
103
+
104
+ it('submits discharge with note, removes patient from bed, and shows success snackbar', async () => {
105
+ const user = userEvent.setup();
106
+
107
+ mockCreateEncounter.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
108
+ mockRemovePatientFromBed.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
109
+
110
+ render(<PatientDischargeWorkspace {...testProps} />);
111
+
112
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
113
+ await user.clear(noteInput);
114
+ await user.type(noteInput, 'Patient recovered');
115
+
116
+ submitDischargeForm();
117
+
118
+ await waitFor(() => {
119
+ expect(mockCreateEncounter).toHaveBeenCalledWith(
120
+ mockWardPatient.patient,
121
+ { uuid: 'exit-encounter', display: '' },
122
+ mockWardPatient.visit.uuid,
123
+ [
124
+ {
125
+ concept: 'consult-concept',
126
+ value: 'Patient recovered',
127
+ },
128
+ ],
129
+ );
130
+ });
131
+
132
+ // Then verify all other calls happened
133
+ expect(mockRemovePatientFromBed).toHaveBeenCalledWith(mockWardPatient.bed.id, mockWardPatient.patient.uuid);
134
+ expect(mockWardPatientMutate).toHaveBeenCalled();
135
+ expect(mockShowSnackbar).toHaveBeenCalledWith({
136
+ title: 'Patient was discharged',
137
+ kind: 'success',
138
+ });
139
+ expect(testProps.closeWorkspace).toHaveBeenCalledWith({ discardUnsavedChanges: true });
140
+ expect(mockCloseWorkspaceGroup2).toHaveBeenCalled();
141
+ });
142
+
143
+ it('submits discharge without note, removes patient from bed, and shows success snackbar', async () => {
144
+ mockCreateEncounter.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
145
+ mockRemovePatientFromBed.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
146
+
147
+ render(<PatientDischargeWorkspace {...testProps} />);
148
+
149
+ submitDischargeForm();
150
+
151
+ await waitFor(() => {
152
+ expect(mockCreateEncounter).toHaveBeenCalledWith(
153
+ mockWardPatient.patient,
154
+ { uuid: 'exit-encounter', display: '' },
155
+ mockWardPatient.visit.uuid,
156
+ [],
157
+ );
158
+ });
159
+
160
+ // Then verify all other calls happened
161
+ expect(mockRemovePatientFromBed).toHaveBeenCalledWith(mockWardPatient.bed.id, mockWardPatient.patient.uuid);
162
+ expect(mockWardPatientMutate).toHaveBeenCalled();
163
+ expect(mockShowSnackbar).toHaveBeenCalledWith({
164
+ title: 'Patient was discharged',
165
+ kind: 'success',
166
+ });
167
+ expect(testProps.closeWorkspace).toHaveBeenCalledWith({ discardUnsavedChanges: true });
168
+ expect(mockCloseWorkspaceGroup2).toHaveBeenCalled();
169
+ });
170
+
171
+ it('submits discharge with whitespace-only note as empty obs, removes patient from bed, and shows success snackbar', async () => {
172
+ const user = userEvent.setup();
173
+
174
+ mockCreateEncounter.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
175
+ mockRemovePatientFromBed.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
176
+
177
+ render(<PatientDischargeWorkspace {...testProps} />);
178
+
179
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
180
+ await user.clear(noteInput);
181
+ await user.type(noteInput, ' ');
182
+
183
+ submitDischargeForm();
184
+
185
+ await waitFor(() => {
186
+ expect(mockCreateEncounter).toHaveBeenCalledWith(
187
+ mockWardPatient.patient,
188
+ { uuid: 'exit-encounter', display: '' },
189
+ mockWardPatient.visit.uuid,
190
+ [],
191
+ );
192
+ });
193
+
194
+ // Then verify all other calls happened
195
+ expect(mockRemovePatientFromBed).toHaveBeenCalledWith(mockWardPatient.bed.id, mockWardPatient.patient.uuid);
196
+ expect(mockWardPatientMutate).toHaveBeenCalled();
197
+ expect(mockShowSnackbar).toHaveBeenCalledWith({
198
+ title: 'Patient was discharged',
199
+ kind: 'success',
200
+ });
201
+ expect(testProps.closeWorkspace).toHaveBeenCalledWith({ discardUnsavedChanges: true });
202
+ expect(mockCloseWorkspaceGroup2).toHaveBeenCalled();
203
+ });
204
+
205
+ it('disables discharge button during submission', async () => {
206
+ const user = userEvent.setup();
207
+
208
+ mockCreateEncounter.mockImplementation(
209
+ () => new Promise((resolve) => setTimeout(() => resolve({ ok: true }), 100)),
210
+ );
211
+ mockRemovePatientFromBed.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
212
+
213
+ render(<PatientDischargeWorkspace {...testProps} />);
214
+
215
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
216
+ await user.type(noteInput, 'Patient recovered');
217
+
218
+ expect(screen.getByRole('button', { name: /Confirm discharge/i })).toBeEnabled();
219
+
220
+ submitDischargeForm();
221
+
222
+ // Button should show loading state
223
+ await waitFor(() => {
224
+ expect(screen.getByText(/Discharging/i)).toBeInTheDocument();
225
+ });
226
+
227
+ await waitFor(() => {
228
+ expect(testProps.closeWorkspace).toHaveBeenCalled();
229
+ });
230
+ });
231
+
232
+ it('disables cancel button during submission', async () => {
233
+ const user = userEvent.setup();
234
+
235
+ mockCreateEncounter.mockImplementation(
236
+ () => new Promise((resolve) => setTimeout(() => resolve({ ok: true }), 100)),
237
+ );
238
+ mockRemovePatientFromBed.mockResolvedValueOnce({ ok: true } as unknown as FetchResponse);
239
+
240
+ render(<PatientDischargeWorkspace {...testProps} />);
241
+
242
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
243
+ await user.type(noteInput, 'Patient recovered');
244
+
245
+ submitDischargeForm();
246
+
247
+ // Wait for loading state to appear, then check if cancel button is disabled
248
+ await waitFor(() => {
249
+ expect(screen.getByText(/Discharging/i)).toBeInTheDocument();
250
+ });
251
+
252
+ const cancelButton = screen.getByRole('button', { name: /cancel/i });
253
+ expect(cancelButton).toBeDisabled();
254
+
255
+ await waitFor(() => {
256
+ expect(testProps.closeWorkspace).toHaveBeenCalled();
257
+ });
258
+ });
259
+
260
+ it('shows globalErrors message when available in error response', async () => {
261
+ mockCreateEncounter.mockRejectedValueOnce({
262
+ responseBody: { error: { globalErrors: [{ message: 'Global validation error' }] } },
263
+ });
264
+
265
+ render(<PatientDischargeWorkspace {...testProps} />);
266
+
267
+ submitDischargeForm();
268
+
269
+ await waitFor(() => {
270
+ expect(mockShowSnackbar).toHaveBeenCalledWith({
271
+ title: 'Error discharging patient',
272
+ subtitle: 'Global validation error',
273
+ kind: 'error',
274
+ });
275
+ });
276
+ });
277
+
278
+ it('shows error snackbar when discharge fails', async () => {
279
+ const user = userEvent.setup();
280
+ mockCreateEncounter.mockRejectedValueOnce({ message: 'Discharge failed' });
281
+
282
+ render(<PatientDischargeWorkspace {...testProps} />);
283
+
284
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
285
+ await user.type(noteInput, 'Patient recovered');
286
+ submitDischargeForm();
287
+
288
+ await waitFor(() => {
289
+ expect(mockShowSnackbar).toHaveBeenCalledWith({
290
+ title: 'Error discharging patient',
291
+ subtitle: 'Discharge failed',
292
+ kind: 'error',
293
+ });
294
+ });
295
+ });
296
+
297
+ it('shows fallback error message when error has no message', async () => {
298
+ const user = userEvent.setup();
299
+
300
+ mockCreateEncounter.mockRejectedValueOnce({});
301
+
302
+ render(<PatientDischargeWorkspace {...testProps} />);
303
+
304
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
305
+ await user.type(noteInput, 'Patient recovered');
306
+ submitDischargeForm();
307
+
308
+ await waitFor(() => {
309
+ expect(mockShowSnackbar).toHaveBeenCalledWith({
310
+ title: 'Error discharging patient',
311
+ subtitle: 'Unable to discharge patient. Please try again.',
312
+ kind: 'error',
313
+ });
314
+ });
315
+ });
316
+
317
+ it('calls mutate when discharge fails', async () => {
318
+ const user = userEvent.setup();
319
+ mockCreateEncounter.mockRejectedValueOnce({ message: 'Network issue' });
320
+
321
+ render(<PatientDischargeWorkspace {...testProps} />);
322
+
323
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
324
+ await user.type(noteInput, 'Patient recovered');
325
+ submitDischargeForm();
326
+
327
+ await waitFor(() => {
328
+ expect(mockShowSnackbar).toHaveBeenCalledWith(expect.objectContaining({ kind: 'error' }));
329
+ });
330
+
331
+ expect(mockWardPatientMutate).toHaveBeenCalled();
332
+ });
333
+
334
+ it('re-enables buttons after failed discharge', async () => {
335
+ const user = userEvent.setup();
336
+ mockCreateEncounter.mockRejectedValueOnce({ message: 'Network issue' });
337
+
338
+ render(<PatientDischargeWorkspace {...testProps} />);
339
+
340
+ const noteInput = screen.getByPlaceholderText(/write any notes here/i);
341
+ await user.type(noteInput, 'Patient recovered');
342
+
343
+ const dischargeButton = screen.getByRole('button', { name: /Confirm discharge/i });
344
+ submitDischargeForm();
345
+
346
+ await waitFor(() => {
347
+ expect(mockShowSnackbar).toHaveBeenCalledWith(expect.objectContaining({ kind: 'error' }));
348
+ });
349
+
350
+ expect(dischargeButton).toBeEnabled();
351
+ expect(screen.getByRole('button', { name: /cancel/i })).toBeEnabled();
352
+ });
353
+ });
@@ -1,9 +1,15 @@
1
1
  import React, { useCallback, useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { Button, ButtonSet, InlineNotification } from '@carbon/react';
4
- import { Exit } from '@carbon/react/icons';
5
- import { closeWorkspaceGroup2, ExtensionSlot, showSnackbar, useAppContext, Workspace2 } from '@openmrs/esm-framework';
6
- import { type WardPatientWorkspaceDefinition, type WardPatientWorkspaceProps, type WardViewContext } from '../../types';
3
+ import { Button, ButtonSet, Form, InlineNotification, InlineLoading, TextArea } from '@carbon/react';
4
+ import {
5
+ closeWorkspaceGroup2,
6
+ ExtensionSlot,
7
+ ResponsiveWrapper,
8
+ showSnackbar,
9
+ useAppContext,
10
+ Workspace2,
11
+ } from '@openmrs/esm-framework';
12
+ import { type ObsPayload, type WardPatientWorkspaceDefinition, type WardViewContext } from '../../types';
7
13
  import { removePatientFromBed, useCreateEncounter } from '../../ward.resource';
8
14
  import WardPatientWorkspaceBanner from '../patient-banner/patient-banner.component';
9
15
  import styles from './patient-discharge.scss';
@@ -14,62 +20,79 @@ export default function PatientDischargeWorkspace({
14
20
  }: WardPatientWorkspaceDefinition) {
15
21
  const { t } = useTranslation();
16
22
  const [isSubmitting, setIsSubmitting] = useState(false);
23
+ const [dischargeNote, setDischargeNote] = useState('');
17
24
  const { createEncounter, emrConfiguration, isLoadingEmrConfiguration, errorFetchingEmrConfiguration } =
18
25
  useCreateEncounter();
19
26
  const { wardPatientGroupDetails } = useAppContext<WardViewContext>('ward-view-context') ?? {};
20
27
 
21
- const submitDischarge = useCallback(() => {
22
- setIsSubmitting(true);
28
+ const onSubmit = useCallback(
29
+ async (e: React.FormEvent) => {
30
+ e.preventDefault();
31
+ setIsSubmitting(true);
23
32
 
24
- createEncounter(wardPatient?.patient, emrConfiguration.exitFromInpatientEncounterType, wardPatient?.visit?.uuid)
25
- .then((response) => {
26
- if (response?.ok) {
27
- if (wardPatient?.bed?.id) {
28
- return removePatientFromBed(wardPatient.bed.id, wardPatient?.patient?.uuid);
29
- }
30
- return response;
31
- }
32
- })
33
- .then((response) => {
34
- if (response?.ok) {
35
- showSnackbar({
36
- title: t('patientWasDischarged', 'Patient was discharged'),
37
- kind: 'success',
33
+ try {
34
+ const note = dischargeNote.trim();
35
+ const obs: Array<ObsPayload> = [];
36
+
37
+ if (note) {
38
+ obs.push({
39
+ concept: emrConfiguration?.consultFreeTextCommentsConcept?.uuid,
40
+ value: note,
38
41
  });
42
+ }
43
+
44
+ await createEncounter(
45
+ wardPatient?.patient,
46
+ emrConfiguration.exitFromInpatientEncounterType,
47
+ wardPatient?.visit?.uuid,
48
+ obs,
49
+ );
39
50
 
40
- closeWorkspace({ discardUnsavedChanges: true });
41
- closeWorkspaceGroup2();
51
+ if (wardPatient?.bed?.id) {
52
+ await removePatientFromBed(wardPatient.bed.id, wardPatient?.patient?.uuid);
42
53
  }
43
- })
44
- .catch((err) => {
45
- // TODO: better way to handle / display error messages
46
- // https://openmrs.atlassian.net/browse/O3-5423
54
+
55
+ showSnackbar({
56
+ title: t('patientWasDischarged', 'Patient was discharged'),
57
+ kind: 'success',
58
+ });
59
+
60
+ closeWorkspace({ discardUnsavedChanges: true });
61
+ closeWorkspaceGroup2();
62
+ } catch (err) {
63
+ const message =
64
+ err?.responseBody?.error?.globalErrors?.[0]?.message ||
65
+ err?.responseBody?.error?.message ||
66
+ err?.message ||
67
+ t('unableToDischargePatient', 'Unable to discharge patient. Please try again.');
68
+
47
69
  showSnackbar({
48
70
  title: t('errorDischargingPatient', 'Error discharging patient'),
49
- subtitle: err?.responseBody?.error?.globalErrors?.[0]?.message ?? err.message,
71
+ subtitle: message,
50
72
  kind: 'error',
51
73
  });
52
- })
53
- .finally(() => {
74
+ } finally {
54
75
  setIsSubmitting(false);
55
76
  wardPatientGroupDetails?.mutate?.();
56
- });
57
- }, [createEncounter, wardPatient, emrConfiguration, t, closeWorkspace, wardPatientGroupDetails]);
77
+ }
78
+ },
79
+ [createEncounter, wardPatient, emrConfiguration, dischargeNote, t, closeWorkspace, wardPatientGroupDetails],
80
+ );
58
81
 
59
82
  if (!wardPatientGroupDetails) {
60
83
  return null;
61
84
  }
62
85
 
63
86
  return (
64
- <Workspace2 title={t('discharge', 'Discharge')}>
87
+ <Workspace2 title={t('discharge', 'Discharge')} hasUnsavedChanges={dischargeNote.trim().length > 0}>
65
88
  <div className={styles.workspaceContent}>
66
89
  <div className={styles.patientWorkspaceBanner}>
67
90
  <WardPatientWorkspaceBanner wardPatient={wardPatient} />
68
91
  </div>
69
- <div className={styles.workspaceForm}>
92
+ <Form aria-label={t('discharge', 'Discharge')} className={styles.workspaceForm} onSubmit={onSubmit}>
70
93
  <div>
71
94
  {errorFetchingEmrConfiguration && (
72
- <div className={styles.formError}>
95
+ <div>
73
96
  <InlineNotification
74
97
  kind="error"
75
98
  title={t('somePartsOfTheFormDidntLoad', "Some parts of the form didn't load")}
@@ -83,20 +106,37 @@ export default function PatientDischargeWorkspace({
83
106
  </div>
84
107
  )}
85
108
  </div>
109
+
86
110
  <ExtensionSlot name="ward-patient-discharge-slot" />
111
+
112
+ <div>
113
+ <ResponsiveWrapper>
114
+ <TextArea
115
+ value={dischargeNote}
116
+ onChange={(e) => setDischargeNote(e.target.value)}
117
+ labelText={t('dischargeNote', 'Discharge note (optional)')}
118
+ placeholder={t('dischargeNotePlaceholder', 'Write any notes here')}
119
+ />
120
+ </ResponsiveWrapper>
121
+ </div>
87
122
  <ButtonSet className={styles.buttonSet}>
123
+ <Button size="xl" kind="secondary" onClick={() => closeWorkspace()} disabled={isSubmitting}>
124
+ {t('cancel', 'Cancel')}
125
+ </Button>
88
126
  <Button
89
- size="sm"
90
- kind="ghost"
91
- renderIcon={(props) => <Exit size={16} {...props} />}
127
+ type="submit"
128
+ size="xl"
92
129
  disabled={
93
130
  isLoadingEmrConfiguration || isSubmitting || errorFetchingEmrConfiguration || !wardPatient?.patient
94
- }
95
- onClick={submitDischarge}>
96
- {t('proceedWithPatientDischarge', 'Proceed with patient discharge')}
131
+ }>
132
+ {isSubmitting ? (
133
+ <InlineLoading description={t('discharging', 'Discharging...')} />
134
+ ) : (
135
+ <span>{t('confirmDischarge', 'Confirm discharge')}</span>
136
+ )}
97
137
  </Button>
98
138
  </ButtonSet>
99
- </div>
139
+ </Form>
100
140
  </div>
101
141
  </Workspace2>
102
142
  );
@@ -23,6 +23,7 @@
23
23
  "clinicalForms": "Clinical forms",
24
24
  "clinicalNoteLabel": "Write your notes",
25
25
  "clinicalNotes": "Clinical notes",
26
+ "confirmDischarge": "Confirm discharge",
26
27
  "countItems_one": "{{count}} {{item}}",
27
28
  "countItems_other": "{{count}} {{item}}",
28
29
  "days_one": "{{count}} day",
@@ -30,6 +31,9 @@
30
31
  "deleteNote": "Delete note",
31
32
  "deleteNoteConfirmationText": "Are you sure you want to delete this note? This action can't be undone.",
32
33
  "discharge": "Discharge",
34
+ "dischargeNote": "Discharge note (optional)",
35
+ "dischargeNotePlaceholder": "Write any notes here",
36
+ "discharging": "Discharging...",
33
37
  "editNote": "Edit note",
34
38
  "emptyBed": "Empty bed",
35
39
  "emptyText": "Empty",
@@ -116,7 +120,6 @@
116
120
  "pleaseSelectTransferLocation": "Please select transfer location",
117
121
  "pleaseSelectTransferType": "Please select transfer type",
118
122
  "previousPage": "Previous page",
119
- "proceedWithPatientDischarge": "Proceed with patient discharge",
120
123
  "save": "Save",
121
124
  "saveEdit": "Save edit",
122
125
  "saving": "Saving...",
@@ -138,6 +141,7 @@
138
141
  "transferToDispositionLocation": "Transfer to {{location}}",
139
142
  "transferType": "Transfer type",
140
143
  "typeOfTransfer": "Type of transfer",
144
+ "unableToDischargePatient": "Unable to discharge patient. Please try again.",
141
145
  "unknown": "Unknown",
142
146
  "unknownError": "An unknown error occurred",
143
147
  "viewEditHistory": "View edit history",