@openmrs/esm-dispensing-app 1.6.3-pre.458 → 1.6.3-pre.459

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"hash":"da2dc0bf0577c378","duration":41615}
@@ -40,4 +40,4 @@ Entrypoints:
40
40
  main (510 KiB)
41
41
  main.js
42
42
 
43
- webpack 5.88.0 compiled with 2 warnings in 39994 ms
43
+ webpack 5.88.0 compiled with 2 warnings in 39597 ms
package/dist/626.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[626],{7626:(e,n,t)=>{t.r(n),t.d(n,{default:()=>K});var i=t(1672),a=t.n(i),o=t(3397),r=t(1352),s=t(1132),l=t(3957),c=t(6139),p=t(9820);function d(e,n,t,i,a,o,r){try{var s=e[o](r),l=s.value}catch(e){return void t(e)}s.done?n(l):Promise.resolve(l).then(i,a)}function u(){var e;return e=function(e,n){return function(e,n){var t,i,a,o,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,i=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((a=(a=r.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(6===o[0]&&r.label<a[1]){r.label=a[1],a=o;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(o);break}a[2]&&r.ops.pop(),r.trys.pop();continue}o=n.call(e,r)}catch(e){o=[6,e],i=0}finally{t=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,s.openmrsFetch)("/ws/rest/v1/stockmanagement/dispenserequest",{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({dispenseItems:[e]})})];case 1:return[2,t.sent()]}}))},u=function(){var n=this,t=arguments;return new Promise((function(i,a){var o=e.apply(n,t);function r(e){d(o,i,a,r,s,"next",e)}function s(e){d(o,i,a,r,s,"throw",e)}r(void 0)}))},u.apply(this,arguments)}var f=t(3439),g=t(2796),m=t(2653),y=t.n(m),h=t(3252),b=t(4672),v=t(3379),$=t.n(v),A=t(7795),w=t.n(A),k=t(569),x=t.n(k),_=t(3565),C=t.n(_),z=t(9216),E=t.n(z),I=t(4589),S=t.n(I),D=t(7591),M={};M.styleTagTransform=S(),M.setAttributes=C(),M.insert=x().bind(null,"head"),M.domAPI=w(),M.insertStyleElement=E(),$()(D.Z,M);const T=D.Z&&D.Z.locals?D.Z.locals:void 0,B=function(e){var n=e.medication,t=e.editAction;return a().createElement(r.n9L,{className:T.medicationTile},a().createElement("p",{className:T.medicationName},a().createElement("strong",null,(0,c.SV)(n))),t&&a().createElement(b.I8,{onClick:t}))};var q=t(4295),N={};N.styleTagTransform=S(),N.setAttributes=C(),N.insert=x().bind(null,"head"),N.domAPI=w(),N.insertStyleElement=E(),$()(q.Z,N);const R=q.Z&&q.Z.locals?q.Z.locals:void 0;function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(n){j(e,n,t[n])}))}return e}function F(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function U(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||L(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,n){if(e){if("string"==typeof e)return O(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,n):void 0}}const Z=function(e){var n,t,l,d,u,m,b,v,$,A,w,k,x,_,C,z,E,I,S,D,M,T=e.medicationDispense,q=e.updateMedicationDispense,N=e.quantityRemaining,O=(0,o.useTranslation)().t,j=(0,s.useConfig)(),L=(0,s.useSession)(),Z=U((0,i.useState)(!1),2),W=Z[0],Y=Z[1],Q=U((0,i.useState)(!1),2),H=Q[0],K=Q[1],V=U((0,i.useState)([]),2),J=V[0],X=V[1],ee=U((0,i.useState)([]),2),ne=ee[0],te=ee[1],ie=U((0,i.useState)([]),2),ae=ie[0],oe=ie[1],re=U((0,i.useState)([]),2),se=re[0],le=re[1],ce=U((0,i.useState)([]),2),pe=ce[0],de=ce[1],ue=U((0,i.useState)([]),2),fe=ue[0],ge=ue[1],me=U((0,i.useState)(!1),2),ye=me[0],he=me[1],be="tablet"===(0,s.useLayoutType)(),ve=j.dispenseBehavior.allowModifyingPrescription,$e=(0,f.Ng)().orderConfigObject,Ae=(0,f.dW)(j.valueSets.substitutionType.uuid).substitutionTypeValueSet,we=(0,f.hg)(j.valueSets.substitutionReason.uuid).substitutionReasonValueSet,ke=(0,f.ko)(j.dispenserProviderRoles),xe=(0,g.QW)(T.authorizingPrescription?T.authorizingPrescription[0].reference:null,j.refreshInterval).medicationRequest,_e=(0,g.ud)(xe?xe.encounter.reference:null).prescriptionDate;(0,i.useEffect)((function(){if($e){var e=ae.map((function(e){return e.id})),n=[];$e.drugRoutes.forEach((function(t){return e.includes(t.uuid)||n.push({id:t.uuid,text:t.display})})),oe(P(ae).concat(P(n)));var t=J.map((function(e){return e.id})),i=[];$e.drugDosingUnits.forEach((function(e){return t.includes(e.uuid)||i.push({id:e.uuid,text:e.display})})),X(P(J).concat(P(i)));var a=ne.map((function(e){return e.id})),o=[];$e.drugDispensingUnits.forEach((function(e){return a.includes(e.uuid)||o.push({id:e.uuid,text:e.display})})),te(P(ne).concat(P(o)));var r=se.map((function(e){return e.id})),s=[];$e.orderFrequencies.forEach((function(e){return r.includes(e.uuid)||s.push({id:e.uuid,text:e.display})})),le(P(se).concat(P(s)))}}),[ne,J,ae,$e,se]),(0,i.useEffect)((function(){var e,n,t=[];if(null===(n=Ae)||void 0===n||null===(e=n.compose)||void 0===e?void 0:e.include){var i,a=Ae.compose.include.find((function(e){return!e.system}));a&&(null===(i=a.concept)||void 0===i||i.forEach((function(e){return t.push({id:e.code,text:e.display})}))),t.sort((function(e,n){return e.text.localeCompare(n.text)}))}de(t)}),[Ae]),(0,i.useEffect)((function(){var e,n,t=[];if(null===(n=we)||void 0===n||null===(e=n.compose)||void 0===e?void 0:e.include){var i,a=we.compose.include.find((function(e){return!e.system}));a&&(null===(i=a.concept)||void 0===i||i.forEach((function(e){return t.push({id:e.code,text:e.display})}))),t.sort((function(e,n){return e.text.localeCompare(n.text)}))}ge(t)}),[we]);var Ce,ze,Ee,Ie,Se=(0,c.Rc)(null===(t=(0,c.mL)(T))||void 0===t||null===(n=t.medicationCodeableConcept)||void 0===n?void 0:n.coding),De=function(e,n){var t=(0,p.ZP)(e||!n?null:"".concat(s.fhirBaseUrl,"/").concat(n),s.openmrsFetch).data;return{medicationCodeableConceptUuid:t?(0,c.Rc)(t.data.code.coding):null}}(Se,null===(l=(0,c.mL)(T).medicationReference)||void 0===l?void 0:l.reference).medicationCodeableConceptUuid,Me=(Ce=Se||De||null,Ie=(0,p.ZP)(Ce?(0,c.uj)(Ce):null,s.openmrsFetch).data,(null===(Ee=Ie)||void 0===Ee||null===(ze=Ee.data)||void 0===ze?void 0:ze.entry)?{medicationFormulations:Ie.data.entry.map((function(e){return e.resource}))}:{}).medicationFormulations;return(0,i.useEffect)((function(){var e,n,t,i;(null===(n=xe)||void 0===n||null===(e=n.medicationReference)||void 0===e?void 0:e.reference)&&(null===(i=T)||void 0===i||null===(t=i.medicationReference)||void 0===t?void 0:t.reference)&&xe.medicationReference.reference!=T.medicationReference.reference?(K(!0),q(F(G({},T),{substitution:F(G({},T.substitution),{wasSubstituted:!0})}))):(K(!1),q(F(G({},T),{substitution:{wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}})))}),[T,xe,q]),(0,i.useEffect)((function(){var e;he((null===(e=L)||void 0===e?void 0:e.user)&&(0,s.userHasAccess)(h.FI,L.user))}),[L]),a().createElement("div",{className:R.medicationDispenseReviewContainer},a().createElement(r.Kqy,{gap:5},W?a().createElement(r.Ltx,{id:"medicationFormulation",light:be,items:Me,itemToString:function(e){return(0,c.vF)(e)},initialSelectedItem:G({},null===(d=Me)||void 0===d?void 0:d.find((function(e){var n;return e.id===(null===(n=T.medicationReference)||void 0===n?void 0:n.reference.split("/")[1])}))),onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+(null===(n=t)||void 0===n?void 0:n.id),display:(0,c.vF)(t)}})),Y(!1)},required:!0}):a().createElement(B,{medication:(0,c.mL)(T),editAction:ye&&ve?function(){return Y(!0)}:null}),H&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.CtY,{className:R.substitutionType,id:"substitutionType",light:be,items:pe,titleText:O("substitutionType","Type of substitution"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:null===(m=T.substitution.type)||void 0===m||null===(u=m.coding[0])||void 0===u?void 0:u.code,text:null===(b=T.substitution.type)||void 0===b?void 0:b.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{substitution:F(G({},T.substitution),{type:{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}})}))}})),H&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.CtY,{className:R.substitutionReason,id:"substitutionReason",light:be,items:fe,titleText:O("substitutionReason","Reason for substitution"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:null===($=T.substitution.reason[0])||void 0===$||null===(v=$.coding[0])||void 0===v?void 0:v.code,text:null===(A=T.substitution.reason[0])||void 0===A?void 0:A.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{substitution:F(G({},T.substitution),{reason:[{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}]})}))}})),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Y2U,{allowEmpty:!1,disabled:!ye,hideSteppers:!0,id:"quantity",invalidText:O("numberIsNotValid","Number is not valid"),label:O("quantity","Quantity")+(j.dispenseBehavior.restrictTotalQuantityDispensed?" ("+O("maxQuantityRemaining","Maximum quantity remaining:")+" "+N+")":""),min:0,max:j.dispenseBehavior.restrictTotalQuantityDispensed?N:void 0,value:T.quantity.value,onChange:function(e){var n;q(F(G({},T),{quantity:F(G({},T.quantity),{value:(null===(n=e.target)||void 0===n?void 0:n.value)?parseFloat(e.target.value):""})}))}}),a().createElement(r.CtY,{id:"quantityUnits",disabled:!ye||!ve,light:be,items:ne,titleText:O("drugDispensingUnit","Dispensing unit"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:T.quantity.code,text:T.quantity.unit},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{quantity:{value:T.quantity.value,code:null===(n=t)||void 0===n?void 0:n.id}}))},required:!0})),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Y2U,{allowEmpty:!1,disabled:!ye||!ve,hideSteppers:!0,id:"dosingQuanity",invalidText:O("numberIsNotValid","Number is not valid"),min:0,label:O("dose","Dose"),value:T.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:function(e){var n;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{doseAndRate:[F(G({},T.dosageInstruction[0].doseAndRate[0]),{doseQuantity:F(G({},T.dosageInstruction[0].doseAndRate[0].doseQuantity),{value:(null===(n=e.target)||void 0===n?void 0:n.value)?parseFloat(e.target.value):""})})]})]}))}}),a().createElement(r.CtY,{id:"dosingUnits",disabled:!ye||!ve,light:be,items:J,titleText:O("doseUnit","Dose unit"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:null===(w=T.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===w?void 0:w.code,text:null===(k=T.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===k?void 0:k.unit},onChange:function(e){var n,t,i=e.selectedItem;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{doseAndRate:[{doseQuantity:{value:null===(n=T.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===n?void 0:n.value,code:null===(t=i)||void 0===t?void 0:t.id}}]})]}))},required:!0}),a().createElement(r.CtY,{id:"editRoute",disabled:!ye||!ve,light:be,items:ae,initialSelectedItem:{id:null===(_=T.dosageInstruction[0].route)||void 0===_||null===(x=_.coding[0])||void 0===x?void 0:x.code,text:null===(C=T.dosageInstruction[0].route)||void 0===C?void 0:C.text},titleText:O("route","Route"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{route:{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}})]}))},required:!0})),a().createElement(r.CtY,{id:"frequency",disabled:!ye||!ve,light:be,items:se,initialSelectedItem:{id:null===(I=T.dosageInstruction[0].timing)||void 0===I||null===(E=I.code)||void 0===E||null===(z=E.coding[0])||void 0===z?void 0:z.code,text:null===(D=T.dosageInstruction[0].timing)||void 0===D||null===(S=D.code)||void 0===S?void 0:S.text},titleText:O("frequency","Frequency"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{timing:F(G({},T.dosageInstruction[0].timing),{code:{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}})})]}))},required:!0}),a().createElement(r.Kx8,{labelText:O("patientInstructions","Patient instructions"),value:T.dosageInstruction[0].text,maxLength:65535,onChange:function(e){q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{text:e.target.value})]}))}}),a().createElement(s.OpenmrsDatePicker,{id:"dispenseDate",labelText:O("dispenseDate","Date of Dispense"),minDate:_e?y()(_e).startOf("day").toDate():null,maxDate:y()().toDate(),onChange:function(e){var n,t=T.whenHandedOver?y()(T.whenHandedOver):null,i=y()(e);q(F(G({},T),{whenHandedOver:(null===(n=t)||void 0===n?void 0:n.isSame(i,"day"))?t.toISOString():i.toISOString()}))},value:y()(T.whenHandedOver).toDate()}),ke&&a().createElement(r.CtY,{id:"dispenser",light:be,initialSelectedItem:(null===(M=T)||void 0===M?void 0:M.performer[0].actor.reference)?ke.find((function(e){var n;return e.uuid===(null===(n=T)||void 0===n?void 0:n.performer[0].actor.reference.split("/")[1])})):null,onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{performer:[{actor:{reference:"Practitioner/".concat(null===(n=t)||void 0===n?void 0:n.uuid)}}]}))},items:ke,itemToString:function(e){var n,t;return null===(t=e)||void 0===t||null===(n=t.person)||void 0===n?void 0:n.display},required:!0,titleText:O("dispensedBy","Dispensed by")})))},W=function(e){var n,t,i,l=e.medicationDispense,c=e.updateInventoryItem,d=function(e,n){var t,i;return void 0!==f&&!f.validateBatch||!!((null===(t=e)||void 0===t?void 0:t.dosageInstruction)&&(null===(i=e)||void 0===i?void 0:i.dosageInstruction.length)>0)&&e.dosageInstruction.some((function(e){var t,i,a,o,r;if((null===(i=e.timing)||void 0===i||null===(t=i.repeat)||void 0===t?void 0:t.duration)&&(null===(o=e.timing)||void 0===o||null===(a=o.repeat)||void 0===a?void 0:a.durationUnit)&&n.quantity>0){var s=e.timing.repeat.durationUnit,l=e.timing.repeat.duration,c=new Date;switch(s){case"s":c.setSeconds(c.getSeconds()+l);break;case"min":c.setMinutes(c.getMinutes()+l);break;case"h":c.setHours(c.getHours()+l);break;case"d":c.setDate(c.getDate()+l);break;case"wk":c.setDate(c.getDate()+7*l);break;case"mo":c.setMonth(c.getMonth()+l);break;case"y":c.setFullYear(c.getFullYear()+l);break;default:return!1}return r=n.expiration,new Date(r)>c}return!1}))},u=(0,o.useTranslation)().t,f=(0,s.useConfig)(),g=function(e){var n,t,i,a,o,r,l,c=(0,s.useSession)(),d="/ws/rest/v1/stockmanagement/stockiteminventory?v=default&totalCount=true&drugUuid=".concat(e,"&includeBatchNo=true&groupBy=LocationStockItemBatchNo&dispenseLocationUuid=").concat(null===(t=c)||void 0===t||null===(n=t.sessionLocation)||void 0===n?void 0:n.uuid,"&includeStrength=1&includeConceptRefIds=1&emptyBatch=1&emptyBatchLocationUuid=").concat(null===(a=c)||void 0===a||null===(i=a.sessionLocation)||void 0===i?void 0:i.uuid,"&dispenseAtLocation=1"),u=(0,p.ZP)(d,s.openmrsFetch),f=u.data,g=u.error,m=u.isLoading;return{inventoryItems:null!==(l=null===(r=f)||void 0===r||null===(o=r.data)||void 0===o?void 0:o.results)&&void 0!==l?l:[],error:g,isLoading:m}}(null===(i=l)||void 0===i||null===(t=i.medicationReference)||void 0===t||null===(n=t.reference)||void 0===n?void 0:n.split("/")[1]),m=g.inventoryItems,y=g.error,h=g.isLoading,b=m.filter((function(e){return d(l,e)}));return m.filter((function(e){return d(l,e)})).sort((function(e,n){var t=new Date(e.expiration),i=new Date(n.expiration);return t.getDate()-i.getDate()})),y?a().createElement(r.K0D,{"aria-label":"closes notification",kind:"error",lowContrast:!0,statusIconDescription:"notification",subtitle:u("errorLoadingInventoryItems","Error fetching inventory items"),title:u("error","Error")}):h?a().createElement(r.lSo,{description:u("loadingInventoryItems","Loading inventory items...")}):a().createElement(r.mh4,null,a().createElement(r.CtY,{id:"stockDispense",items:b,onChange:function(e){var n=e.selectedItem;c(n)},itemToString:function(e){return e?function(e){return u("stockDispenseDetails","Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",{batchNumber:e.batchNumber,quantity:Math.floor(e.quantity),quantityUoM:e.quantityUoM,expiration:(0,s.formatDate)(new Date(e.expiration))})}(e):""},titleText:u("stockDispense","Stock Dispense"),placeholder:u("selectStockDispense","Select stock to dispense from")}))};var Y=t(1905);function Q(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function H(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return Q(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Q(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const K=function(e){var n=e.medicationDispense,t=e.medicationRequestBundle,p=e.mode,d=e.patientUuid,m=e.encounterUuid,y=e.quantityRemaining,h=e.closeWorkspace,b=e.closeWorkspaceWithSavedChanges,v=(0,o.useTranslation)().t,$=(0,s.usePatient)(d),A=$.patient,w=$.isLoading,k=(0,s.useConfig)(),x=H((0,i.useState)(),2),_=x[0],C=x[1],z=H((0,i.useState)(),2),E=z[0],I=z[1],S=H((0,i.useState)(!1),2),D=S[0],M=S[1],T=H((0,i.useState)(!1),2),B=T[0],q=T[1];(0,i.useEffect)((function(){return I(n)}),[n]),(0,i.useEffect)((function(){var e,n,t,i,a,o,r,s,l,c,p,d,u,f,g,m,h;E&&E.performer&&(null===(e=E.performer[0])||void 0===e?void 0:e.actor.reference)&&(null===(n=E.quantity)||void 0===n?void 0:n.value)&&(!y||(null===(i=E)||void 0===i||null===(t=i.quantity)||void 0===t?void 0:t.value)<=y)&&(null===(a=E.quantity)||void 0===a?void 0:a.code)&&(null===(s=E.dosageInstruction[0])||void 0===s||null===(r=s.doseAndRate[0])||void 0===r||null===(o=r.doseQuantity)||void 0===o?void 0:o.value)&&(null===(p=E.dosageInstruction[0])||void 0===p||null===(c=p.doseAndRate[0])||void 0===c||null===(l=c.doseQuantity)||void 0===l?void 0:l.code)&&(null===(u=E.dosageInstruction[0])||void 0===u||null===(d=u.route)||void 0===d?void 0:d.coding[0].code)&&(null===(g=E.dosageInstruction[0])||void 0===g||null===(f=g.timing)||void 0===f?void 0:f.code.coding[0].code)&&(!E.substitution.wasSubstituted||(null===(m=E.substitution.reason[0])||void 0===m?void 0:m.coding[0].code)&&(null===(h=E.substitution.type)||void 0===h?void 0:h.coding[0].code))?M(!0):M(!1)}),[E,y,_]);var N=!!k.enableStockDispense&&!_||!D||B,R=(0,i.useMemo)((function(){if(A)return{patient:A,patientUuid:d,hideActionsOverflow:!0}}),[A,d]);return a().createElement(r.l09,{className:Y.Z.formWrapper},a().createElement("div",null,w&&a().createElement(r.lSo,{className:Y.Z.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),A&&a().createElement(s.ExtensionSlot,{name:"patient-header-slot",state:R}),a().createElement("section",{className:Y.Z.formGroup},a().createElement(r.lXp,null,v(k.dispenseBehavior.allowModifyingPrescription?"drugHelpText":"drugHelpTextNoEdit",k.dispenseBehavior.allowModifyingPrescription?"You may edit the formulation and quantity dispensed here":"You may edit quantity dispensed here")),E?a().createElement("div",null,a().createElement(Z,{medicationDispense:E,updateMedicationDispense:I,quantityRemaining:y}),k.enableStockDispense&&a().createElement(W,{inventoryItem:_,medicationDispense:n,updateInventoryItem:C})):null)),a().createElement("section",{className:Y.Z.buttonGroup},a().createElement(r.zxk,{disabled:B,onClick:function(){return h()},kind:"secondary"},(0,s.getCoreTranslation)("cancel","Cancel")),a().createElement(r.zxk,{disabled:N,onClick:function(){if(!B){q(!0);var e=new AbortController;(0,f.VF)(E,l.jm.completed,e).then((function(e){if(e.ok){var n=(0,c.RZ)(E,t,k.dispenseBehavior.restrictTotalQuantityDispensed);if((0,c.vo)(t.request)!==n)return(0,g.XN)((0,c.i7)(E.authorizingPrescription[0].reference),n)}return e})).then((function(n){var t=n.status;if(k.enableStockDispense&&(201===t||200===t)){var i=function(e,n,t,i){var a;return{dispenseLocation:e.locationUuid,patient:n,order:(0,c.i7)(i.authorizingPrescription[0].reference),encounter:t,stockItem:null===(a=e)||void 0===a?void 0:a.stockItemUuid,stockBatch:e.stockBatchUuid,stockItemPackagingUOM:e.quantityUoMUuid,quantity:i.quantity.value}}(_,d,m,E);(function(e,n){return u.apply(this,arguments)})(i,e).then((function(){(0,s.showSnackbar)({title:v("stockDispensed","Stock dispensed"),kind:"success",subtitle:v("stockDispensedSuccessfully","Stock dispensed successfully and batch level updated.")})}),(function(e){var n;(0,s.showSnackbar)({title:"Stock dispense error",kind:"error",subtitle:null===(n=e)||void 0===n?void 0:n.message})}))}return n})).then((function(e){var n=e.status;201!==n&&200!==n||((0,c.A8)(m),(0,s.showSnackbar)({kind:"success",subtitle:v("medicationListUpdated","Medication dispense list has been updated."),title:v("enter"===p?"medicationDispensed":"medicationDispenseUpdated","enter"===p?"Medication successfully dispensed.":"Dispense record successfully updated.")}),b())}),(function(e){var n;(0,s.showSnackbar)({kind:"error",title:v("enter"===p?"medicationDispenseError":"medicationDispenseUpdatedError","enter"===p?"Error dispensing medication.":"Error updating dispense record"),subtitle:null===(n=e)||void 0===n?void 0:n.message}),q(!1)}))}}},v("enter"===p?"dispensePrescription":"saveChanges","enter"===p?"Dispense prescription":"Save changes"))))}},7591:(e,n,t)=>{t.d(n,{Z:()=>s});var i=t(4015),a=t.n(i),o=t(3645),r=t.n(o)()(a());r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-dispensing__medication-card__medicationTile___\\+t2rW{display:flex;flex-direction:row;justify-content:space-between;width:100%;margin:2px 0 8px;padding:0 8px 0 8px;background-color:#fff;border-left:4px solid var(--brand-03);color:#525252;margin-bottom:1rem !important}.-esm-dispensing__medication-card__medicationName___-EM\\+N{font-size:15px !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-card.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,2DACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,gBAAA,CACA,mBAAA,CACA,qBAAA,CACA,qCAAA,CACA,aDRQ,CCSR,6BAAA,CAGF,2DACE,yBAAA",sourcesContent:["$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: 4rem;\n --workspace-header-height: 3rem;\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/styles/scss/spacing';\n@use '@carbon/styles/scss/type';\n@import '~@openmrs/esm-styleguide/src/vars';\n\n.medicationTile {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n margin: 2px 0 8px;\n padding: 0 8px 0 8px;\n background-color: #fff;\n border-left: 4px solid var(--brand-03);\n color: $text-02;\n margin-bottom: 1rem !important;\n}\n\n.medicationName {\n font-size: 15px !important;\n}\n"],sourceRoot:""}]),r.locals={medicationTile:"-esm-dispensing__medication-card__medicationTile___+t2rW",medicationName:"-esm-dispensing__medication-card__medicationName___-EM+N"};const s=r},4295:(e,n,t)=>{t.d(n,{Z:()=>s});var i=t(4015),a=t.n(i),o=t(3645),r=t.n(o)()(a());r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ{display:flex;flex-direction:column;padding-bottom:10px}.-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ .cds--css-grid{padding-left:0 !important;padding-right:0 !important}.-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn{display:flex;flex-direction:row;flex:1;gap:1rem}.-esm-dispensing__medication-dispense-review__substitutionReason___efxL5{width:100%}.-esm-dispensing__medication-dispense-review__substitutionType___dK\\+H9{width:100%}.-esm-dispensing__medication-dispense-review__productiveHeading02___\\+\\+vqK,.-esm-dispensing__medication-dispense-review__formGroup___KjyuB span{color:#525252;font-size:var(--cds-productive-heading-02-font-size, 1rem);font-weight:var(--cds-productive-heading-02-font-weight, 600);line-height:var(--cds-productive-heading-02-line-height, 1.375);letter-spacing:var(--cds-productive-heading-02-letter-spacing, 0)}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#f4f4f4}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#fff}.-esm-dispensing__medication-dispense-review__formGroup___KjyuB{display:flex;margin-bottom:.25rem;padding:1rem}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>span{flex:1}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>div{flex:3}.-esm-dispensing__medication-dispense-review__patientInfo___BsSmN{position:sticky;z-index:1000;background-color:#fff;top:3rem;overflow-y:auto}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:row}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:column}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{display:flex;position:sticky;bottom:0;width:100%}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{padding:1rem 1.5rem;background-color:#fff}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4 button{max-width:none;width:50%;height:4rem;align-items:flex-start}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-dispense-review.scss","webpack://./node_modules/@carbon/styles/node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,wFACE,YAAA,CACA,qBAAA,CACA,mBAAA,CAEA,uGACE,yBAAA,CACA,0BAAA,CAIJ,+EACE,YAAA,CACA,kBAAA,CACA,MAAA,CACA,QCYW,CDTb,yEACE,UAAA,CAGF,wEACE,UAAA,CAGF,iJACE,aDtBc,CGy1BZ,0DAAA,CAAA,6DAAA,CAAA,+DAAA,CAAA,iEAAA,CF/zBJ,8FACE,wBDjBwB,CCoB1B,6FACE,qBDvCM,CC0CR,gEACE,YAAA,CACA,oBC7BW,CD8BX,YCfW,CDkBb,iGACE,MAAA,CAGF,gGACE,MAAA,CAOF,kEACE,eAAA,CACA,YAAA,CACA,qBD/DM,CCgEN,QAAA,CACA,eAAA,CAGF,4FACE,kBAAA,CAGF,2FACE,qBAAA,CAGF,kEACE,YAAA,CACA,eAAA,CACA,QAAA,CACA,UAAA,CAGF,8FACE,mBAAA,CACA,qBDrFM,CCwFR,yEACE,cAAA,CACA,SAAA,CACA,WCpCW,CDqCX,sBAAA",sourcesContent:["$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: 4rem;\n --workspace-header-height: 3rem;\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/styles/scss/spacing';\n@use '@carbon/styles/scss/type';\n@import '~@openmrs/esm-styleguide/src/vars';\n\n.medicationDispenseReviewContainer {\n display: flex;\n flex-direction: column;\n padding-bottom: 10px;\n\n :global(.cds--css-grid) {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n\n.dispenseDetailsContainer {\n display: flex;\n flex-direction: row;\n flex: 1;\n gap: spacing.$spacing-05;\n}\n\n.substitutionReason {\n width: 100%;\n}\n\n.substitutionType {\n width: 100%;\n}\n\n.productiveHeading02 {\n color: $color-gray-70;\n @include type.type-style('productive-heading-02');\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formWrapper {\n background-color: $openmrs-background-grey;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formWrapper {\n background-color: $ui-02;\n}\n\n.formGroup {\n display: flex;\n margin-bottom: spacing.$spacing-02;\n padding: spacing.$spacing-05;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > span {\n flex: 1;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > div {\n flex: 3;\n}\n\n.formGroup span {\n @extend .productiveHeading02;\n}\n\n.patientInfo {\n position: sticky;\n z-index: 1000;\n background-color: $ui-02;\n top: 3rem;\n overflow-y: auto;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup {\n flex-direction: row;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formGroup {\n flex-direction: column;\n}\n\n.buttonGroup {\n display: flex;\n position: sticky;\n bottom: 0;\n width: 100%;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .buttonGroup {\n padding: spacing.$spacing-05 spacing.$spacing-06;\n background-color: $ui-02;\n}\n\n.buttonGroup button {\n max-width: none;\n width: 50%;\n height: spacing.$spacing-10;\n align-items: flex-start;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n"],sourceRoot:""}]),r.locals={medicationDispenseReviewContainer:"-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ",dispenseDetailsContainer:"-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn",substitutionReason:"-esm-dispensing__medication-dispense-review__substitutionReason___efxL5",substitutionType:"-esm-dispensing__medication-dispense-review__substitutionType___dK+H9",productiveHeading02:"-esm-dispensing__medication-dispense-review__productiveHeading02___++vqK",formGroup:"-esm-dispensing__medication-dispense-review__formGroup___KjyuB",formWrapper:"-esm-dispensing__medication-dispense-review__formWrapper___NIVKI",patientInfo:"-esm-dispensing__medication-dispense-review__patientInfo___BsSmN",buttonGroup:"-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4"};const s=r}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([[626],{7626:(e,n,t)=>{t.r(n),t.d(n,{default:()=>K});var i=t(1672),a=t.n(i),o=t(3397),r=t(1352),s=t(1132),l=t(3957),c=t(6139),p=t(9820);function d(e,n,t,i,a,o,r){try{var s=e[o](r),l=s.value}catch(e){return void t(e)}s.done?n(l):Promise.resolve(l).then(i,a)}function u(){var e;return e=function(e,n){return function(e,n){var t,i,a,o,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,i=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((a=(a=r.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(6===o[0]&&r.label<a[1]){r.label=a[1],a=o;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(o);break}a[2]&&r.ops.pop(),r.trys.pop();continue}o=n.call(e,r)}catch(e){o=[6,e],i=0}finally{t=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,s.openmrsFetch)("/ws/rest/v1/stockmanagement/dispenserequest",{method:"POST",signal:n.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({dispenseItems:[e]})})];case 1:return[2,t.sent()]}}))},u=function(){var n=this,t=arguments;return new Promise((function(i,a){var o=e.apply(n,t);function r(e){d(o,i,a,r,s,"next",e)}function s(e){d(o,i,a,r,s,"throw",e)}r(void 0)}))},u.apply(this,arguments)}var f=t(3439),g=t(2796),m=t(2653),y=t.n(m),h=t(3252),b=t(4672),v=t(3379),$=t.n(v),A=t(7795),w=t.n(A),k=t(569),x=t.n(k),_=t(3565),C=t.n(_),z=t(9216),E=t.n(z),I=t(4589),S=t.n(I),D=t(7591),M={};M.styleTagTransform=S(),M.setAttributes=C(),M.insert=x().bind(null,"head"),M.domAPI=w(),M.insertStyleElement=E(),$()(D.Z,M);const T=D.Z&&D.Z.locals?D.Z.locals:void 0,B=function(e){var n=e.medication,t=e.editAction;return a().createElement(r.n9L,{className:T.medicationTile},a().createElement("p",{className:T.medicationName},a().createElement("strong",null,(0,c.SV)(n))),t&&a().createElement(b.I8,{onClick:t}))};var q=t(4295),N={};N.styleTagTransform=S(),N.setAttributes=C(),N.insert=x().bind(null,"head"),N.domAPI=w(),N.insertStyleElement=E(),$()(q.Z,N);const R=q.Z&&q.Z.locals?q.Z.locals:void 0;function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(n){j(e,n,t[n])}))}return e}function F(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function U(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||L(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,n){if(e){if("string"==typeof e)return O(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,n):void 0}}const Z=function(e){var n,t,l,d,u,m,b,v,$,A,w,k,x,_,C,z,E,I,S,D,M,T=e.medicationDispense,q=e.updateMedicationDispense,N=e.quantityRemaining,O=(0,o.useTranslation)().t,j=(0,s.useConfig)(),L=(0,s.useSession)(),Z=U((0,i.useState)(!1),2),W=Z[0],Y=Z[1],Q=U((0,i.useState)(!1),2),H=Q[0],K=Q[1],V=U((0,i.useState)([]),2),J=V[0],X=V[1],ee=U((0,i.useState)([]),2),ne=ee[0],te=ee[1],ie=U((0,i.useState)([]),2),ae=ie[0],oe=ie[1],re=U((0,i.useState)([]),2),se=re[0],le=re[1],ce=U((0,i.useState)([]),2),pe=ce[0],de=ce[1],ue=U((0,i.useState)([]),2),fe=ue[0],ge=ue[1],me=U((0,i.useState)(!1),2),ye=me[0],he=me[1],be="tablet"===(0,s.useLayoutType)(),ve=j.dispenseBehavior.allowModifyingPrescription,$e=(0,f.Ng)().orderConfigObject,Ae=(0,f.dW)(j.valueSets.substitutionType.uuid).substitutionTypeValueSet,we=(0,f.hg)(j.valueSets.substitutionReason.uuid).substitutionReasonValueSet,ke=(0,f.ko)(j.dispenserProviderRoles),xe=(0,g.QW)(T.authorizingPrescription?T.authorizingPrescription[0].reference:null,j.refreshInterval).medicationRequest,_e=(0,g.ud)(xe?xe.encounter.reference:null).prescriptionDate;(0,i.useEffect)((function(){if($e){var e=ae.map((function(e){return e.id})),n=[];$e.drugRoutes.forEach((function(t){return e.includes(t.uuid)||n.push({id:t.uuid,text:t.display})})),oe(P(ae).concat(P(n)));var t=J.map((function(e){return e.id})),i=[];$e.drugDosingUnits.forEach((function(e){return t.includes(e.uuid)||i.push({id:e.uuid,text:e.display})})),X(P(J).concat(P(i)));var a=ne.map((function(e){return e.id})),o=[];$e.drugDispensingUnits.forEach((function(e){return a.includes(e.uuid)||o.push({id:e.uuid,text:e.display})})),te(P(ne).concat(P(o)));var r=se.map((function(e){return e.id})),s=[];$e.orderFrequencies.forEach((function(e){return r.includes(e.uuid)||s.push({id:e.uuid,text:e.display})})),le(P(se).concat(P(s)))}}),[ne,J,ae,$e,se]),(0,i.useEffect)((function(){var e,n,t=[];if(null===(n=Ae)||void 0===n||null===(e=n.compose)||void 0===e?void 0:e.include){var i,a=Ae.compose.include.find((function(e){return!e.system}));a&&(null===(i=a.concept)||void 0===i||i.forEach((function(e){return t.push({id:e.code,text:e.display})}))),t.sort((function(e,n){return e.text.localeCompare(n.text)}))}de(t)}),[Ae]),(0,i.useEffect)((function(){var e,n,t=[];if(null===(n=we)||void 0===n||null===(e=n.compose)||void 0===e?void 0:e.include){var i,a=we.compose.include.find((function(e){return!e.system}));a&&(null===(i=a.concept)||void 0===i||i.forEach((function(e){return t.push({id:e.code,text:e.display})}))),t.sort((function(e,n){return e.text.localeCompare(n.text)}))}ge(t)}),[we]);var Ce,ze,Ee,Ie,Se=(0,c.Rc)(null===(t=(0,c.mL)(T))||void 0===t||null===(n=t.medicationCodeableConcept)||void 0===n?void 0:n.coding),De=function(e,n){var t=(0,p.ZP)(e||!n?null:"".concat(s.fhirBaseUrl,"/").concat(n),s.openmrsFetch).data;return{medicationCodeableConceptUuid:t?(0,c.Rc)(t.data.code.coding):null}}(Se,null===(l=(0,c.mL)(T).medicationReference)||void 0===l?void 0:l.reference).medicationCodeableConceptUuid,Me=(Ce=Se||De||null,Ie=(0,p.ZP)(Ce?(0,c.uj)(Ce):null,s.openmrsFetch).data,(null===(Ee=Ie)||void 0===Ee||null===(ze=Ee.data)||void 0===ze?void 0:ze.entry)?{medicationFormulations:Ie.data.entry.map((function(e){return e.resource}))}:{}).medicationFormulations;return(0,i.useEffect)((function(){var e,n,t,i;(null===(n=xe)||void 0===n||null===(e=n.medicationReference)||void 0===e?void 0:e.reference)&&(null===(i=T)||void 0===i||null===(t=i.medicationReference)||void 0===t?void 0:t.reference)&&xe.medicationReference.reference!=T.medicationReference.reference?(K(!0),q(F(G({},T),{substitution:F(G({},T.substitution),{wasSubstituted:!0})}))):(K(!1),q(F(G({},T),{substitution:{wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}})))}),[T,xe,q]),(0,i.useEffect)((function(){var e;he((null===(e=L)||void 0===e?void 0:e.user)&&(0,s.userHasAccess)(h.FI,L.user))}),[L]),a().createElement("div",{className:R.medicationDispenseReviewContainer},a().createElement(r.Kqy,{gap:5},W?a().createElement(r.Ltx,{id:"medicationFormulation",light:be,items:Me,itemToString:function(e){return(0,c.vF)(e)},initialSelectedItem:G({},null===(d=Me)||void 0===d?void 0:d.find((function(e){var n;return e.id===(null===(n=T.medicationReference)||void 0===n?void 0:n.reference.split("/")[1])}))),onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+(null===(n=t)||void 0===n?void 0:n.id),display:(0,c.vF)(t)}})),Y(!1)},required:!0}):a().createElement(B,{medication:(0,c.mL)(T),editAction:ye&&ve?function(){return Y(!0)}:null}),H&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.CtY,{className:R.substitutionType,id:"substitutionType",light:be,items:pe,titleText:O("substitutionType","Type of substitution"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:null===(m=T.substitution.type)||void 0===m||null===(u=m.coding[0])||void 0===u?void 0:u.code,text:null===(b=T.substitution.type)||void 0===b?void 0:b.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{substitution:F(G({},T.substitution),{type:{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}})}))}})),H&&a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.CtY,{className:R.substitutionReason,id:"substitutionReason",light:be,items:fe,titleText:O("substitutionReason","Reason for substitution"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:null===($=T.substitution.reason[0])||void 0===$||null===(v=$.coding[0])||void 0===v?void 0:v.code,text:null===(A=T.substitution.reason[0])||void 0===A?void 0:A.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{substitution:F(G({},T.substitution),{reason:[{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}]})}))}})),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Y2U,{allowEmpty:!1,disabled:!ye,hideSteppers:!0,id:"quantity",invalidText:O("numberIsNotValid","Number is not valid"),label:O("quantity","Quantity")+(j.dispenseBehavior.restrictTotalQuantityDispensed?" ("+O("maxQuantityRemaining","Maximum quantity remaining:")+" "+N+")":""),min:0,max:j.dispenseBehavior.restrictTotalQuantityDispensed?N:void 0,value:T.quantity.value,onChange:function(e){var n;q(F(G({},T),{quantity:F(G({},T.quantity),{value:(null===(n=e.target)||void 0===n?void 0:n.value)?parseFloat(e.target.value):""})}))}}),a().createElement(r.CtY,{id:"quantityUnits",disabled:!ye||!ve,light:be,items:ne,titleText:O("drugDispensingUnit","Dispensing unit"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:T.quantity.code,text:T.quantity.unit},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{quantity:{value:T.quantity.value,code:null===(n=t)||void 0===n?void 0:n.id}}))},required:!0})),a().createElement("div",{className:R.dispenseDetailsContainer},a().createElement(r.Y2U,{allowEmpty:!1,disabled:!ye||!ve,hideSteppers:!0,id:"dosingQuanity",invalidText:O("numberIsNotValid","Number is not valid"),min:0,label:O("dose","Dose"),value:T.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:function(e){var n;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{doseAndRate:[F(G({},T.dosageInstruction[0].doseAndRate[0]),{doseQuantity:F(G({},T.dosageInstruction[0].doseAndRate[0].doseQuantity),{value:(null===(n=e.target)||void 0===n?void 0:n.value)?parseFloat(e.target.value):""})})]})]}))}}),a().createElement(r.CtY,{id:"dosingUnits",disabled:!ye||!ve,light:be,items:J,titleText:O("doseUnit","Dose unit"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},initialSelectedItem:{id:null===(w=T.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===w?void 0:w.code,text:null===(k=T.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===k?void 0:k.unit},onChange:function(e){var n,t,i=e.selectedItem;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{doseAndRate:[{doseQuantity:{value:null===(n=T.dosageInstruction[0].doseAndRate[0].doseQuantity)||void 0===n?void 0:n.value,code:null===(t=i)||void 0===t?void 0:t.id}}]})]}))},required:!0}),a().createElement(r.CtY,{id:"editRoute",disabled:!ye||!ve,light:be,items:ae,initialSelectedItem:{id:null===(_=T.dosageInstruction[0].route)||void 0===_||null===(x=_.coding[0])||void 0===x?void 0:x.code,text:null===(C=T.dosageInstruction[0].route)||void 0===C?void 0:C.text},titleText:O("route","Route"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{route:{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}})]}))},required:!0})),a().createElement(r.CtY,{id:"frequency",disabled:!ye||!ve,light:be,items:se,initialSelectedItem:{id:null===(I=T.dosageInstruction[0].timing)||void 0===I||null===(E=I.code)||void 0===E||null===(z=E.coding[0])||void 0===z?void 0:z.code,text:null===(D=T.dosageInstruction[0].timing)||void 0===D||null===(S=D.code)||void 0===S?void 0:S.text},titleText:O("frequency","Frequency"),itemToString:function(e){var n;return null===(n=e)||void 0===n?void 0:n.text},onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{timing:F(G({},T.dosageInstruction[0].timing),{code:{coding:[{code:null===(n=t)||void 0===n?void 0:n.id}]}})})]}))},required:!0}),a().createElement(r.Kx8,{labelText:O("patientInstructions","Patient instructions"),value:T.dosageInstruction[0].text,maxLength:65535,onChange:function(e){q(F(G({},T),{dosageInstruction:[F(G({},T.dosageInstruction[0]),{text:e.target.value})]}))}}),a().createElement(s.OpenmrsDatePicker,{id:"dispenseDate",labelText:O("dispenseDate","Date of Dispense"),minDate:_e?y()(_e).startOf("day").toDate():null,maxDate:y()().toDate(),onChange:function(e){var n,t=T.whenHandedOver?y()(T.whenHandedOver):null,i=y()(e);q(F(G({},T),{whenHandedOver:(null===(n=t)||void 0===n?void 0:n.isSame(i,"day"))?t.toISOString():i.toISOString()}))},value:y()(T.whenHandedOver).toDate()}),ke&&a().createElement(r.CtY,{id:"dispenser",light:be,initialSelectedItem:(null===(M=T)||void 0===M?void 0:M.performer[0].actor.reference)?ke.find((function(e){var n;return e.uuid===(null===(n=T)||void 0===n?void 0:n.performer[0].actor.reference.split("/")[1])})):null,onChange:function(e){var n,t=e.selectedItem;q(F(G({},T),{performer:[{actor:{reference:"Practitioner/".concat(null===(n=t)||void 0===n?void 0:n.uuid)}}]}))},items:ke,itemToString:function(e){var n,t;return null===(t=e)||void 0===t||null===(n=t.person)||void 0===n?void 0:n.display},required:!0,titleText:O("dispensedBy","Dispensed by")})))},W=function(e){var n,t,i,l=e.medicationDispense,c=e.updateInventoryItem,d=(0,o.useTranslation)().t,u=(0,s.useConfig)(),f=function(e){var n,t,i,a,o,r,l,c=(0,s.useSession)(),d="/ws/rest/v1/stockmanagement/stockiteminventory?v=default&totalCount=true&drugUuid=".concat(e,"&includeBatchNo=true&groupBy=LocationStockItemBatchNo&dispenseLocationUuid=").concat(null===(t=c)||void 0===t||null===(n=t.sessionLocation)||void 0===n?void 0:n.uuid,"&includeStrength=1&includeConceptRefIds=1&emptyBatch=1&emptyBatchLocationUuid=").concat(null===(a=c)||void 0===a||null===(i=a.sessionLocation)||void 0===i?void 0:i.uuid,"&dispenseAtLocation=1"),u=(0,p.ZP)(d,s.openmrsFetch),f=u.data,g=u.error,m=u.isLoading;return{inventoryItems:null!==(l=null===(r=f)||void 0===r||null===(o=r.data)||void 0===o?void 0:o.results)&&void 0!==l?l:[],error:g,isLoading:m}}(null===(i=l)||void 0===i||null===(t=i.medicationReference)||void 0===t||null===(n=t.reference)||void 0===n?void 0:n.split("/")[1]),g=f.inventoryItems,m=f.error,y=f.isLoading,h=g.filter((function(e){return n=l,t=e,void 0!==u&&!u.validateBatch||!!((null===(i=n)||void 0===i?void 0:i.dosageInstruction)&&(null===(a=n)||void 0===a?void 0:a.dosageInstruction.length)>0)&&n.dosageInstruction.some((function(e){var n,i,a,o,r;if((null===(i=e.timing)||void 0===i||null===(n=i.repeat)||void 0===n?void 0:n.duration)&&(null===(o=e.timing)||void 0===o||null===(a=o.repeat)||void 0===a?void 0:a.durationUnit)&&t.quantity>0){var s=e.timing.repeat.durationUnit,l=e.timing.repeat.duration,c=new Date;switch(s){case"s":c.setSeconds(c.getSeconds()+l);break;case"min":c.setMinutes(c.getMinutes()+l);break;case"h":c.setHours(c.getHours()+l);break;case"d":c.setDate(c.getDate()+l);break;case"wk":c.setDate(c.getDate()+7*l);break;case"mo":c.setMonth(c.getMonth()+l);break;case"y":c.setFullYear(c.getFullYear()+l);break;default:return!1}return r=t.expiration,new Date(r)>c}return!1}));var n,t,i,a})).sort((function(e,n){return new Date(e.expiration).getTime()-new Date(n.expiration).getTime()}));return m?a().createElement(r.K0D,{"aria-label":"closes notification",kind:"error",lowContrast:!0,statusIconDescription:"notification",subtitle:d("errorLoadingInventoryItems","Error fetching inventory items"),title:d("error","Error")}):y?a().createElement(r.lSo,{description:d("loadingInventoryItems","Loading inventory items...")}):a().createElement(r.mh4,null,a().createElement(r.CtY,{id:"stockDispense",items:h,onChange:function(e){var n=e.selectedItem;c(n)},itemToString:function(e){return e?function(e){return d("stockDispenseDetails","Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",{batchNumber:e.batchNumber,quantity:Math.floor(e.quantity),quantityUoM:e.quantityUoM,expiration:(0,s.formatDate)(new Date(e.expiration))})}(e):""},titleText:d("stockDispense","Stock Dispense"),placeholder:d("selectStockDispense","Select stock to dispense from")}))};var Y=t(1905);function Q(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function H(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,a,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return Q(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Q(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const K=function(e){var n=e.medicationDispense,t=e.medicationRequestBundle,p=e.mode,d=e.patientUuid,m=e.encounterUuid,y=e.quantityRemaining,h=e.closeWorkspace,b=e.closeWorkspaceWithSavedChanges,v=(0,o.useTranslation)().t,$=(0,s.usePatient)(d),A=$.patient,w=$.isLoading,k=(0,s.useConfig)(),x=H((0,i.useState)(),2),_=x[0],C=x[1],z=H((0,i.useState)(),2),E=z[0],I=z[1],S=H((0,i.useState)(!1),2),D=S[0],M=S[1],T=H((0,i.useState)(!1),2),B=T[0],q=T[1];(0,i.useEffect)((function(){return I(n)}),[n]),(0,i.useEffect)((function(){var e,n,t,i,a,o,r,s,l,c,p,d,u,f,g,m,h;E&&E.performer&&(null===(e=E.performer[0])||void 0===e?void 0:e.actor.reference)&&(null===(n=E.quantity)||void 0===n?void 0:n.value)&&(!y||(null===(i=E)||void 0===i||null===(t=i.quantity)||void 0===t?void 0:t.value)<=y)&&(null===(a=E.quantity)||void 0===a?void 0:a.code)&&(null===(s=E.dosageInstruction[0])||void 0===s||null===(r=s.doseAndRate[0])||void 0===r||null===(o=r.doseQuantity)||void 0===o?void 0:o.value)&&(null===(p=E.dosageInstruction[0])||void 0===p||null===(c=p.doseAndRate[0])||void 0===c||null===(l=c.doseQuantity)||void 0===l?void 0:l.code)&&(null===(u=E.dosageInstruction[0])||void 0===u||null===(d=u.route)||void 0===d?void 0:d.coding[0].code)&&(null===(g=E.dosageInstruction[0])||void 0===g||null===(f=g.timing)||void 0===f?void 0:f.code.coding[0].code)&&(!E.substitution.wasSubstituted||(null===(m=E.substitution.reason[0])||void 0===m?void 0:m.coding[0].code)&&(null===(h=E.substitution.type)||void 0===h?void 0:h.coding[0].code))?M(!0):M(!1)}),[E,y,_]);var N=!!k.enableStockDispense&&!_||!D||B,R=(0,i.useMemo)((function(){if(A)return{patient:A,patientUuid:d,hideActionsOverflow:!0}}),[A,d]);return a().createElement(r.l09,{className:Y.Z.formWrapper},a().createElement("div",null,w&&a().createElement(r.lSo,{className:Y.Z.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),A&&a().createElement(s.ExtensionSlot,{name:"patient-header-slot",state:R}),a().createElement("section",{className:Y.Z.formGroup},a().createElement(r.lXp,null,v(k.dispenseBehavior.allowModifyingPrescription?"drugHelpText":"drugHelpTextNoEdit",k.dispenseBehavior.allowModifyingPrescription?"You may edit the formulation and quantity dispensed here":"You may edit quantity dispensed here")),E?a().createElement("div",null,a().createElement(Z,{medicationDispense:E,updateMedicationDispense:I,quantityRemaining:y}),k.enableStockDispense&&a().createElement(W,{inventoryItem:_,medicationDispense:n,updateInventoryItem:C})):null)),a().createElement("section",{className:Y.Z.buttonGroup},a().createElement(r.zxk,{disabled:B,onClick:function(){return h()},kind:"secondary"},(0,s.getCoreTranslation)("cancel","Cancel")),a().createElement(r.zxk,{disabled:N,onClick:function(){if(!B){q(!0);var e=new AbortController;(0,f.VF)(E,l.jm.completed,e).then((function(e){if(e.ok){var n=(0,c.RZ)(E,t,k.dispenseBehavior.restrictTotalQuantityDispensed);if((0,c.vo)(t.request)!==n)return(0,g.XN)((0,c.i7)(E.authorizingPrescription[0].reference),n)}return e})).then((function(n){var t=n.status;if(k.enableStockDispense&&(201===t||200===t)){var i=function(e,n,t,i){var a;return{dispenseLocation:e.locationUuid,patient:n,order:(0,c.i7)(i.authorizingPrescription[0].reference),encounter:t,stockItem:null===(a=e)||void 0===a?void 0:a.stockItemUuid,stockBatch:e.stockBatchUuid,stockItemPackagingUOM:e.quantityUoMUuid,quantity:i.quantity.value}}(_,d,m,E);(function(e,n){return u.apply(this,arguments)})(i,e).then((function(){(0,s.showSnackbar)({title:v("stockDispensed","Stock dispensed"),kind:"success",subtitle:v("stockDispensedSuccessfully","Stock dispensed successfully and batch level updated.")})}),(function(e){var n;(0,s.showSnackbar)({title:"Stock dispense error",kind:"error",subtitle:null===(n=e)||void 0===n?void 0:n.message})}))}return n})).then((function(e){var n=e.status;201!==n&&200!==n||((0,c.A8)(m),(0,s.showSnackbar)({kind:"success",subtitle:v("medicationListUpdated","Medication dispense list has been updated."),title:v("enter"===p?"medicationDispensed":"medicationDispenseUpdated","enter"===p?"Medication successfully dispensed.":"Dispense record successfully updated.")}),b())}),(function(e){var n;(0,s.showSnackbar)({kind:"error",title:v("enter"===p?"medicationDispenseError":"medicationDispenseUpdatedError","enter"===p?"Error dispensing medication.":"Error updating dispense record"),subtitle:null===(n=e)||void 0===n?void 0:n.message}),q(!1)}))}}},v("enter"===p?"dispensePrescription":"saveChanges","enter"===p?"Dispense prescription":"Save changes"))))}},7591:(e,n,t)=>{t.d(n,{Z:()=>s});var i=t(4015),a=t.n(i),o=t(3645),r=t.n(o)()(a());r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-dispensing__medication-card__medicationTile___\\+t2rW{display:flex;flex-direction:row;justify-content:space-between;width:100%;margin:2px 0 8px;padding:0 8px 0 8px;background-color:#fff;border-left:4px solid var(--brand-03);color:#525252;margin-bottom:1rem !important}.-esm-dispensing__medication-card__medicationName___-EM\\+N{font-size:15px !important}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-card.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,2DACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,gBAAA,CACA,mBAAA,CACA,qBAAA,CACA,qCAAA,CACA,aDRQ,CCSR,6BAAA,CAGF,2DACE,yBAAA",sourcesContent:["$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: 4rem;\n --workspace-header-height: 3rem;\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/styles/scss/spacing';\n@use '@carbon/styles/scss/type';\n@import '~@openmrs/esm-styleguide/src/vars';\n\n.medicationTile {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n margin: 2px 0 8px;\n padding: 0 8px 0 8px;\n background-color: #fff;\n border-left: 4px solid var(--brand-03);\n color: $text-02;\n margin-bottom: 1rem !important;\n}\n\n.medicationName {\n font-size: 15px !important;\n}\n"],sourceRoot:""}]),r.locals={medicationTile:"-esm-dispensing__medication-card__medicationTile___+t2rW",medicationName:"-esm-dispensing__medication-card__medicationName___-EM+N"};const s=r},4295:(e,n,t)=>{t.d(n,{Z:()=>s});var i=t(4015),a=t.n(i),o=t(3645),r=t.n(o)()(a());r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ{display:flex;flex-direction:column;padding-bottom:10px}.-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ .cds--css-grid{padding-left:0 !important;padding-right:0 !important}.-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn{display:flex;flex-direction:row;flex:1;gap:1rem}.-esm-dispensing__medication-dispense-review__substitutionReason___efxL5{width:100%}.-esm-dispensing__medication-dispense-review__substitutionType___dK\\+H9{width:100%}.-esm-dispensing__medication-dispense-review__productiveHeading02___\\+\\+vqK,.-esm-dispensing__medication-dispense-review__formGroup___KjyuB span{color:#525252;font-size:var(--cds-productive-heading-02-font-size, 1rem);font-weight:var(--cds-productive-heading-02-font-weight, 600);line-height:var(--cds-productive-heading-02-line-height, 1.375);letter-spacing:var(--cds-productive-heading-02-letter-spacing, 0)}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#f4f4f4}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formWrapper___NIVKI{background-color:#fff}.-esm-dispensing__medication-dispense-review__formGroup___KjyuB{display:flex;margin-bottom:.25rem;padding:1rem}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>span{flex:1}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB>div{flex:3}.-esm-dispensing__medication-dispense-review__patientInfo___BsSmN{position:sticky;z-index:1000;background-color:#fff;top:3rem;overflow-y:auto}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:row}.omrs-breakpoint-gt-tablet .-esm-dispensing__medication-dispense-review__formGroup___KjyuB{flex-direction:column}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{display:flex;position:sticky;bottom:0;width:100%}.omrs-breakpoint-lt-desktop .-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4{padding:1rem 1.5rem;background-color:#fff}.-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4 button{max-width:none;width:50%;height:4rem;align-items:flex-start}","",{version:3,sources:["webpack://./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/components/medication-dispense-review.scss","webpack://./node_modules/@carbon/styles/node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCvDF,wFACE,YAAA,CACA,qBAAA,CACA,mBAAA,CAEA,uGACE,yBAAA,CACA,0BAAA,CAIJ,+EACE,YAAA,CACA,kBAAA,CACA,MAAA,CACA,QCYW,CDTb,yEACE,UAAA,CAGF,wEACE,UAAA,CAGF,iJACE,aDtBc,CGy1BZ,0DAAA,CAAA,6DAAA,CAAA,+DAAA,CAAA,iEAAA,CF/zBJ,8FACE,wBDjBwB,CCoB1B,6FACE,qBDvCM,CC0CR,gEACE,YAAA,CACA,oBC7BW,CD8BX,YCfW,CDkBb,iGACE,MAAA,CAGF,gGACE,MAAA,CAOF,kEACE,eAAA,CACA,YAAA,CACA,qBD/DM,CCgEN,QAAA,CACA,eAAA,CAGF,4FACE,kBAAA,CAGF,2FACE,qBAAA,CAGF,kEACE,YAAA,CACA,eAAA,CACA,QAAA,CACA,UAAA,CAGF,8FACE,mBAAA,CACA,qBDrFM,CCwFR,yEACE,cAAA,CACA,SAAA,CACA,WCpCW,CDqCX,sBAAA",sourcesContent:["$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: 4rem;\n --workspace-header-height: 3rem;\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/styles/scss/spacing';\n@use '@carbon/styles/scss/type';\n@import '~@openmrs/esm-styleguide/src/vars';\n\n.medicationDispenseReviewContainer {\n display: flex;\n flex-direction: column;\n padding-bottom: 10px;\n\n :global(.cds--css-grid) {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n\n.dispenseDetailsContainer {\n display: flex;\n flex-direction: row;\n flex: 1;\n gap: spacing.$spacing-05;\n}\n\n.substitutionReason {\n width: 100%;\n}\n\n.substitutionType {\n width: 100%;\n}\n\n.productiveHeading02 {\n color: $color-gray-70;\n @include type.type-style('productive-heading-02');\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formWrapper {\n background-color: $openmrs-background-grey;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formWrapper {\n background-color: $ui-02;\n}\n\n.formGroup {\n display: flex;\n margin-bottom: spacing.$spacing-02;\n padding: spacing.$spacing-05;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > span {\n flex: 1;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup > div {\n flex: 3;\n}\n\n.formGroup span {\n @extend .productiveHeading02;\n}\n\n.patientInfo {\n position: sticky;\n z-index: 1000;\n background-color: $ui-02;\n top: 3rem;\n overflow-y: auto;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .formGroup {\n flex-direction: row;\n}\n\n:global(.omrs-breakpoint-gt-tablet) .formGroup {\n flex-direction: column;\n}\n\n.buttonGroup {\n display: flex;\n position: sticky;\n bottom: 0;\n width: 100%;\n}\n\n:global(.omrs-breakpoint-lt-desktop) .buttonGroup {\n padding: spacing.$spacing-05 spacing.$spacing-06;\n background-color: $ui-02;\n}\n\n.buttonGroup button {\n max-width: none;\n width: 50%;\n height: spacing.$spacing-10;\n align-items: flex-start;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n"],sourceRoot:""}]),r.locals={medicationDispenseReviewContainer:"-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___b9ZuZ",dispenseDetailsContainer:"-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___DjhAn",substitutionReason:"-esm-dispensing__medication-dispense-review__substitutionReason___efxL5",substitutionType:"-esm-dispensing__medication-dispense-review__substitutionType___dK+H9",productiveHeading02:"-esm-dispensing__medication-dispense-review__productiveHeading02___++vqK",formGroup:"-esm-dispensing__medication-dispense-review__formGroup___KjyuB",formWrapper:"-esm-dispensing__medication-dispense-review__formWrapper___NIVKI",patientInfo:"-esm-dispensing__medication-dispense-review__patientInfo___BsSmN",buttonGroup:"-esm-dispensing__medication-dispense-review__buttonGroup___3zwj4"};const s=r}}]);
package/dist/626.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"626.js","mappings":"wYA0BsBA,I,eAAf,SACLC,EACAC,G,qlCAGO,O,GAAMC,EAAAA,EAAAA,cADD,8CACmB,CAC7BC,OAAQ,OACRC,OAAQH,EAAgBG,OACxBC,QAAS,CACP,eAAgB,oBAElBC,KAAMC,KAAKC,UAAU,CAAEC,cAAe,CAACT,Q,OANzC,MAAO,C,EAAA,U,GAQT,EAbsBD,E,8KAAAA,EAAAA,MAAAA,KAAAA,U,CAwBf,I,sLCvCHW,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQM,OAAS,IAAQA,YAASC,ECLnE,EAXK,Y,IAAGC,EAAAA,EAAAA,WAAYC,EAAAA,EAAAA,WAClB,OACE,kBAACC,EAAAA,IAAIA,CAACC,UAAWC,EAAOC,gBACtB,kBAACC,IAAAA,CAAEH,UAAWC,EAAOG,gBACnB,kBAACC,SAAAA,MAAQC,EAAAA,EAAAA,IAAqBT,KAE/BC,GAAc,kBAACS,EAAAA,GAAIA,CAACC,QAASV,IAGpC,E,cCRI,EAAU,CAAC,EAEf,EAAQR,kBAAoB,IAC5B,EAAQC,cAAgB,IAElB,EAAQC,OAAS,SAAc,KAAM,QAE3C,EAAQC,OAAS,IACjB,EAAQC,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UAATyN,EAAmB,0BAA4B,iCACtC,UAATA,EAAmB,+BAAiC,kCAEtDb,SAAUb,QAAAA,EAAAA,SAAAA,IAAAA,OAAAA,EAAAA,EAAOsF,UAEnB/C,GAAgB,EAClB,GAEN,CACF,GAsFStO,EACU,UAATyN,EAAmB,uBAAyB,cACnC,UAATA,EAAmB,wBAA0B,kBAMzD,C,mEC7OI8D,E,MAA0B,GAA4B,KAE1DA,EAAwB7N,KAAK,CAAC8N,EAAOlO,GAAI,wrBAAyrB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,mDAAmD,MAAQ,GAAG,SAAW,wNAAwN,eAAiB,CAAC,o7DAAo7D,idAAid,WAAa,MAEpgHiO,EAAwB3S,OAAS,CAChC,eAAkB,2DAClB,eAAkB,4DAEnB,S,mECRI2S,E,MAA0B,GAA4B,KAE1DA,EAAwB7N,KAAK,CAAC8N,EAAOlO,GAAI,olFAAqlF,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,6DAA6D,mGAAmG,2DAA2D,MAAQ,GAAG,SAAW,knBAAknB,eAAiB,CAAC,o7DAAo7D,iwDAAiwD,05DAA05D,w8uBAAw8uB,WAAa,MAEpnhCiO,EAAwB3S,OAAS,CAChC,kCAAqC,yFACrC,yBAA4B,gFAC5B,mBAAsB,0EACtB,iBAAoB,wEACpB,oBAAuB,2EACvB,UAAa,iEACb,YAAe,mEACf,YAAe,mEACf,YAAe,oEAEhB,S","sources":["webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss?82c7","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss?d386","webpack://@openmrs/esm-dispensing-app/./src/forms/medication-dispense-review.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/medication/medication.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock-dispense.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/dispense-form.workspace.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss","webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss"],"names":["sendStockDispenseRequest","stockDispenseRequest","abortController","openmrsFetch","method","signal","headers","body","JSON","stringify","dispenseItems","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","undefined","medication","editAction","Tile","className","styles","medicationTile","p","medicationName","strong","getMedicationDisplay","Edit","onClick","getMedicationReferenceOrCodeableConcept","medicationFormulations","medicationDispense","updateMedicationDispense","quantityRemaining","useTranslation","t","config","useConfig","session","useSession","useState","isEditingFormulation","setIsEditingFormulation","isSubstitution","setIsSubstitution","drugDosingUnits","setDrugDosingUnits","drugDispensingUnits","setDrugDispensingUnits","drugRoutes","setDrugRoutes","orderFrequencies","setOrderFrequencies","substitutionTypes","setSubstitutionTypes","substitutionReasons","setSubstitutionReasons","userCanModify","setUserCanModify","isTablet","useLayoutType","allowEditing","dispenseBehavior","allowModifyingPrescription","useOrderConfig","orderConfigObject","useSubstitutionTypeValueSet","valueSets","substitutionType","uuid","substitutionTypeValueSet","useSubstitutionReasonValueSet","substitutionReason","substitutionReasonValueSet","providers","useProviders","dispenserProviderRoles","useMedicationRequest","authorizingPrescription","reference","refreshInterval","medicationRequest","usePrescriptionDetails","encounter","prescriptionDate","useEffect","availableRoutes","map","x","id","otherRouteOptions","forEach","includes","push","text","display","availableDosingUnits","otherDosingUnits","availableDispensingUnits","otherDispensingUnits","availableFrequencies","otherFrequencyOptions","substitutionTypeOptions","compose","include","uuidValueSet","find","system","concept","code","sort","a","b","localeCompare","substitutionReasonOptions","medicationCodeableConcept","data","existingMedicationCodeableConceptUuid","getConceptCodingUuid","coding","medicationReference","useSWR","fhirBaseUrl","medicationCodeableConceptUuid","useMedicationCodeableConcept","getMedicationsByConceptEndpoint","entry","e","resource","substitution","wasSubstituted","reason","type","user","userHasAccess","PRIVILEGE_CREATE_DISPENSE_MODIFY_DETAILS","div","medicationDispenseReviewContainer","Stack","gap","Dropdown","light","items","itemToString","item","getOpenMRSMedicineDrugName","initialSelectedItem","formulation","split","onChange","selectedItem","required","MedicationCard","dispenseDetailsContainer","ComboBox","titleText","NumberInput","allowEmpty","disabled","hideSteppers","invalidText","label","restrictTotalQuantityDispensed","min","max","value","quantity","target","parseFloat","unit","dosageInstruction","doseAndRate","doseQuantity","route","timing","TextArea","labelText","maxLength","OpenmrsDatePicker","minDate","dayjs","startOf","toDate","maxDate","input","currentDate","whenHandedOver","selectedDate","isSame","toISOString","performer","actor","provider","person","updateInventoryItem","isValidBatch","medicationToDispense","inventoryItem","validateBatch","length","some","instruction","dateString","repeat","duration","durationUnit","durationValue","lastMedicationDate","Date","setSeconds","getSeconds","setMinutes","getMinutes","setHours","getHours","setDate","getDate","setMonth","getMonth","setFullYear","getFullYear","expiration","useDispenseStock","drugUuid","url","sessionLocation","error","isLoading","inventoryItems","results","validInventoryItems","filter","dateA","dateB","InlineNotification","aria-label","kind","lowContrast","statusIconDescription","subtitle","title","InlineLoading","description","Layer","batchNumber","Math","floor","quantityUoM","formatDate","toStockDispense","placeholder","medicationRequestBundle","mode","patientUuid","encounterUuid","closeWorkspace","closeWorkspaceWithSavedChanges","usePatient","patient","setInventoryItem","medicationDispensePayload","setMedicationDispensePayload","isValid","setIsValid","isSubmitting","setIsSubmitting","isButtonDisabled","enableStockDispense","bannerState","useMemo","hideActionsOverflow","Form","formWrapper","bannerLoading","iconDescription","status","ExtensionSlot","name","state","section","formGroup","FormLabel","MedicationDispenseReview","StockDispense","buttonGroup","Button","getCoreTranslation","AbortController","saveMedicationDispense","MedicationDispenseStatus","completed","then","response","ok","newFulfillerStatus","computeNewFulfillerStatusAfterDispenseEvent","getFulfillerStatus","request","updateMedicationRequestFulfillerStatus","getUuidFromReference","stockDispenseRequestPayload","dispenseLocation","locationUuid","order","stockItem","stockItemUuid","stockBatch","stockBatchUuid","stockItemPackagingUOM","quantityUoMUuid","createStockDispenseRequestPayload","showSnackbar","message","revalidate","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""}
1
+ {"version":3,"file":"626.js","mappings":"wYA0BsBA,I,eAAf,SACLC,EACAC,G,qlCAGO,O,GAAMC,EAAAA,EAAAA,cADD,8CACmB,CAC7BC,OAAQ,OACRC,OAAQH,EAAgBG,OACxBC,QAAS,CACP,eAAgB,oBAElBC,KAAMC,KAAKC,UAAU,CAAEC,cAAe,CAACT,Q,OANzC,MAAO,C,EAAA,U,GAQT,EAbsBD,E,8KAAAA,EAAAA,MAAAA,KAAAA,U,CAwBf,I,sLCvCHW,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQM,OAAS,IAAQA,YAASC,ECLnE,EAXK,Y,IAAGC,EAAAA,EAAAA,WAAYC,EAAAA,EAAAA,WAClB,OACE,kBAACC,EAAAA,IAAIA,CAACC,UAAWC,EAAOC,gBACtB,kBAACC,IAAAA,CAAEH,UAAWC,EAAOG,gBACnB,kBAACC,SAAAA,MAAQC,EAAAA,EAAAA,IAAqBT,KAE/BC,GAAc,kBAACS,EAAAA,GAAIA,CAACC,QAASV,IAGpC,E,cCRI,EAAU,CAAC,EAEf,EAAQR,kBAAoB,IAC5B,EAAQC,cAAgB,IAElB,EAAQC,OAAS,SAAc,KAAM,QAE3C,EAAQC,OAAS,IACjB,EAAQC,mBAAqB,IAEhB,IAAI,IAAS,GAKnB,QAAe,KAAW,IAAQC,OAAS,IAAQA,YAASC,E,+lEC2gBnE,QA3gB0E,Y,IAwHtEa,EAAAA,EAMAA,EA8DaC,EA6BGC,EAAAA,EACEA,EA+BFA,EAAAA,EACEA,EAkHJA,EACEA,EA8BFA,EAAAA,EACEA,EA+BJA,EAAAA,EAAAA,EACEA,EA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MAAQ,GAAG,SAAW,wNAAwN,eAAiB,CAAC,o7DAAo7D,idAAid,WAAa,MAEpgH+N,EAAwBzS,OAAS,CAChC,eAAkB,2DAClB,eAAkB,4DAEnB,S,mECRIyS,E,MAA0B,GAA4B,KAE1DA,EAAwB3N,KAAK,CAAC4N,EAAOhO,GAAI,olFAAqlF,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,kEAAkE,6DAA6D,mGAAmG,2DAA2D,MAAQ,GAAG,SAAW,knBAAknB,eAAiB,CAAC,o7DAAo7D,iwDAAiwD,05DAA05D,w8uBAAw8uB,WAAa,MAEpnhC+N,EAAwBzS,OAAS,CAChC,kCAAqC,yFACrC,yBAA4B,gFAC5B,mBAAsB,0EACtB,iBAAoB,wEACpB,oBAAuB,2EACvB,UAAa,iEACb,YAAe,mEACf,YAAe,mEACf,YAAe,oEAEhB,S","sources":["webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss?82c7","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss?d386","webpack://@openmrs/esm-dispensing-app/./src/forms/medication-dispense-review.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/medication/medication.resource.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/stock-dispense/stock-dispense.component.tsx","webpack://@openmrs/esm-dispensing-app/./src/forms/dispense-form.workspace.tsx","webpack://@openmrs/esm-dispensing-app/./src/components/medication-card.scss","webpack://@openmrs/esm-dispensing-app/./src/components/medication-dispense-review.scss"],"names":["sendStockDispenseRequest","stockDispenseRequest","abortController","openmrsFetch","method","signal","headers","body","JSON","stringify","dispenseItems","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","undefined","medication","editAction","Tile","className","styles","medicationTile","p","medicationName","strong","getMedicationDisplay","Edit","onClick","getMedicationReferenceOrCodeableConcept","medicationFormulations","medicationDispense","updateMedicationDispense","quantityRemaining","useTranslation","t","config","useConfig","session","useSession","useState","isEditingFormulation","setIsEditingFormulation","isSubstitution","setIsSubstitution","drugDosingUnits","setDrugDosingUnits","drugDispensingUnits","setDrugDispensingUnits","drugRoutes","setDrugRoutes","orderFrequencies","setOrderFrequencies","substitutionTypes","setSubstitutionTypes","substitutionReasons","setSubstitutionReasons","userCanModify","setUserCanModify","isTablet","useLayoutType","allowEditing","dispenseBehavior","allowModifyingPrescription","useOrderConfig","orderConfigObject","useSubstitutionTypeValueSet","valueSets","substitutionType","uuid","substitutionTypeValueSet","useSubstitutionReasonValueSet","substitutionReason","substitutionReasonValueSet","providers","useProviders","dispenserProviderRoles","useMedicationRequest","authorizingPrescription","reference","refreshInterval","medicationRequest","usePrescriptionDetails","encounter","prescriptionDate","useEffect","availableRoutes","map","x","id","otherRouteOptions","forEach","includes","push","text","display","availableDosingUnits","otherDosingUnits","availableDispensingUnits","otherDispensingUnits","availableFrequencies","otherFrequencyOptions","substitutionTypeOptions","compose","include","uuidValueSet","find","system","concept","code","sort","a","b","localeCompare","substitutionReasonOptions","medicationCodeableConcept","data","existingMedicationCodeableConceptUuid","getConceptCodingUuid","coding","medicationReference","useSWR","fhirBaseUrl","medicationCodeableConceptUuid","useMedicationCodeableConcept","getMedicationsByConceptEndpoint","entry","e","resource","substitution","wasSubstituted","reason","type","user","userHasAccess","PRIVILEGE_CREATE_DISPENSE_MODIFY_DETAILS","div","medicationDispenseReviewContainer","Stack","gap","Dropdown","light","items","itemToString","item","getOpenMRSMedicineDrugName","initialSelectedItem","formulation","split","onChange","selectedItem","required","MedicationCard","dispenseDetailsContainer","ComboBox","titleText","NumberInput","allowEmpty","disabled","hideSteppers","invalidText","label","restrictTotalQuantityDispensed","min","max","value","quantity","target","parseFloat","unit","dosageInstruction","doseAndRate","doseQuantity","route","timing","TextArea","labelText","maxLength","OpenmrsDatePicker","minDate","dayjs","startOf","toDate","maxDate","input","currentDate","whenHandedOver","selectedDate","isSame","toISOString","performer","actor","provider","person","updateInventoryItem","useDispenseStock","drugUuid","url","sessionLocation","error","isLoading","inventoryItems","results","validInventoryItems","filter","medicationToDispense","inventoryItem","validateBatch","length","some","instruction","dateString","repeat","duration","durationUnit","durationValue","lastMedicationDate","Date","setSeconds","getSeconds","setMinutes","getMinutes","setHours","getHours","setDate","getDate","setMonth","getMonth","setFullYear","getFullYear","expiration","getTime","InlineNotification","aria-label","kind","lowContrast","statusIconDescription","subtitle","title","InlineLoading","description","Layer","batchNumber","Math","floor","quantityUoM","formatDate","toStockDispense","placeholder","medicationRequestBundle","mode","patientUuid","encounterUuid","closeWorkspace","closeWorkspaceWithSavedChanges","usePatient","patient","setInventoryItem","medicationDispensePayload","setMedicationDispensePayload","isValid","setIsValid","isSubmitting","setIsSubmitting","isButtonDisabled","enableStockDispense","bannerState","useMemo","hideActionsOverflow","Form","formWrapper","bannerLoading","iconDescription","status","ExtensionSlot","name","state","section","formGroup","FormLabel","MedicationDispenseReview","StockDispense","buttonGroup","Button","getCoreTranslation","AbortController","saveMedicationDispense","MedicationDispenseStatus","completed","then","response","ok","newFulfillerStatus","computeNewFulfillerStatusAfterDispenseEvent","getFulfillerStatus","request","updateMedicationRequestFulfillerStatus","getUuidFromReference","stockDispenseRequestPayload","dispenseLocation","locationUuid","order","stockItem","stockItemUuid","stockBatch","stockBatchUuid","stockItemPackagingUOM","quantityUoMUuid","createStockDispenseRequestPayload","showSnackbar","message","revalidate","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""}
@@ -537,9 +537,9 @@
537
537
  "initial": false,
538
538
  "entry": false,
539
539
  "recorded": false,
540
- "size": 111944,
540
+ "size": 111757,
541
541
  "sizes": {
542
- "javascript": 111944
542
+ "javascript": 111757
543
543
  },
544
544
  "names": [],
545
545
  "idHints": [],
@@ -553,7 +553,7 @@
553
553
  "auxiliaryFiles": [
554
554
  "626.js.map"
555
555
  ],
556
- "hash": "625cbe5ef2e6c9e9",
556
+ "hash": "f9c29d604930fcaf",
557
557
  "childrenByOrder": {}
558
558
  },
559
559
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","type":"dispense","title":"Close prescription"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","type":"dispense","title":"Pause prescription"},{"name":"dispense-workspace","component":"dispenseWorkspace","type":"dispense","title":"Dispense prescription","width":"wider"}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"}],"version":"1.6.3-pre.458"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","type":"dispense","title":"Close prescription"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","type":"dispense","title":"Pause prescription"},{"name":"dispense-workspace","component":"dispenseWorkspace","type":"dispense","title":"Dispense prescription","width":"wider"}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"}],"version":"1.6.3-pre.459"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-dispensing-app",
3
- "version": "1.6.3-pre.458",
3
+ "version": "1.6.3-pre.459",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Medication dispensing application",
6
6
  "browser": "dist/openmrs-esm-dispensing-app.js",
@@ -18,15 +18,9 @@ const StockDispense: React.FC<StockDispenseProps> = ({ medicationDispense, updat
18
18
 
19
19
  const drugUuid = medicationDispense?.medicationReference?.reference?.split('/')[1];
20
20
  const { inventoryItems, error, isLoading } = useDispenseStock(drugUuid);
21
- const validInventoryItems = inventoryItems.filter((item) => isValidBatch(medicationDispense, item));
22
- const validInventoryItemss = inventoryItems
21
+ const validInventoryItems = inventoryItems
23
22
  .filter((item) => isValidBatch(medicationDispense, item))
24
- .sort((a, b) => {
25
- const dateA = new Date(a.expiration);
26
- const dateB = new Date(b.expiration);
27
-
28
- return dateA.getDate() - dateB.getDate();
29
- });
23
+ .sort((a, b) => new Date(a.expiration).getTime() - new Date(b.expiration).getTime());
30
24
 
31
25
  function parseDate(dateString) {
32
26
  return new Date(dateString);
@@ -1 +0,0 @@
1
- {"hash":"f59b9af9f4bea6a9","duration":41990}