@openmrs/esm-dispensing-app 1.11.2-pre.1987 → 1.11.2-pre.1989
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.
- package/.turbo/cache/1715972dceea1378-meta.json +1 -0
- package/.turbo/cache/{19c0175deb0704e2.tar.zst → 1715972dceea1378.tar.zst} +0 -0
- package/.turbo/turbo-build.log +1 -1
- package/dist/3438.js +1 -1
- package/dist/3877.js +1 -1
- package/dist/4302.js +1 -1
- package/dist/4318.js +1 -1
- package/dist/5212.js +1 -1
- package/dist/6983.js +1 -1
- package/dist/8453.js +1 -1
- package/dist/9331.js +1 -1
- package/dist/9866.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js +2 -2
- package/dist/openmrs-esm-dispensing-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/.turbo/cache/19c0175deb0704e2-meta.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"hash":"1715972dceea1378","duration":8479}
|
|
Binary file
|
package/.turbo/turbo-build.log
CHANGED
package/dist/3438.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["3438"],{2829(e,t,n){n.r(t),n.d(t,{default:()=>o});var a=n(2287),i=n.n(a),l=n(1399),s=n(6940),r=n(6339);let d={previousDispenseTile:"-esm-dispensing__duplicate-dispense-modal__previousDispenseTile___LtaO5",headerRow:"-esm-dispensing__duplicate-dispense-modal__headerRow___lPdjG",medicationName:"-esm-dispensing__duplicate-dispense-modal__medicationName___wDOI3",tileContent:"-esm-dispensing__duplicate-dispense-modal__tileContent___VIYKR",metaRow:"-esm-dispensing__duplicate-dispense-modal__metaRow___Kis9x",metaDivider:"-esm-dispensing__duplicate-dispense-modal__metaDivider___KfLZa"};var c=n(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["3438"],{2829(e,t,n){n.r(t),n.d(t,{default:()=>o});var a=n(2287),i=n.n(a),l=n(1399),s=n(6940),r=n(6339);let d={previousDispenseTile:"-esm-dispensing__duplicate-dispense-modal__previousDispenseTile___LtaO5",headerRow:"-esm-dispensing__duplicate-dispense-modal__headerRow___lPdjG",medicationName:"-esm-dispensing__duplicate-dispense-modal__medicationName___wDOI3",tileContent:"-esm-dispensing__duplicate-dispense-modal__tileContent___VIYKR",metaRow:"-esm-dispensing__duplicate-dispense-modal__metaRow___Kis9x",metaDivider:"-esm-dispensing__duplicate-dispense-modal__metaDivider___KfLZa"};var c=n(7796);let o=({onClose:e,onConfirm:t,title:n,message:o,medicationName:m,previousDispenseDate:p,previousQuantity:u,previousQuantityUnit:_,previousPerformer:E,previousRoute:g,previousSchedule:N,previousDispense:w})=>{let{t:v}=(0,l.useTranslation)(),[D,y]=(0,a.useState)(!1),[h,b]=(0,a.useState)(null),f=(0,a.useRef)(!0);(0,a.useEffect)(()=>()=>{f.current=!1},[]);let T=e=>{if(!e)return"";try{let t=(0,c.parseDate)(e);if(!t||Number.isNaN(t.getTime())){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return t.toLocaleString()}return(0,c.formatDatetime)(t)}catch{let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return t.toLocaleString()}},C=(0,a.useCallback)(async()=>{b(null),y(!0);try{await t(),e()}catch(e){console.error("Error during dispensing:",e),b(v("duplicateDispenseError","Error dispensing medication"))}finally{f.current&&y(!1)}},[t,e,v]),R=n??v("duplicatePrescriptionTitle","Potential duplicate dispense detected"),k=o??(w?"":v("duplicatePrescriptionMessageNoPrevious","A previous dispense could not be found."));return i().createElement(i().Fragment,null,i().createElement(s.ModalHeader,{title:R,closeModal:e}),i().createElement(s.ModalBody,null,!w&&k&&i().createElement("p",null,k),m&&!w&&i().createElement("div",{className:d.headerRow},i().createElement("span",null,v("medication","Medication")),i().createElement("span",{className:d.medicationName},m)),w?i().createElement(s.Tile,{className:d.previousDispenseTile},i().createElement("div",{className:d.headerRow},i().createElement(s.Tag,{type:"gray",size:"sm"},v("dispensed","Dispensed")),m&&i().createElement("span",{className:d.medicationName},m)),i().createElement("div",{className:d.metaRow},E&&i().createElement("span",null,v("dispensedBy","Dispensed by"),": ",i().createElement("strong",null,E)),E&&p&&i().createElement("span",{className:d.metaDivider},"•"),p&&i().createElement("span",null,T(p))),i().createElement("div",{className:d.tileContent},i().createElement(r.A,{medicationEvent:w}))):i().createElement(i().Fragment,null,p&&void 0!==u&&i().createElement("p",null,v("previousDispenseDetails","Previous dispense on")," ",i().createElement("strong",null,T(p))," ",v("withQuantity","with quantity")," ",i().createElement("strong",null,u,_?` ${_}`:""),"."),g&&i().createElement("p",null,v("route","Route"),": ",i().createElement("strong",null,g)),N&&i().createElement("p",null,v("schedule","Schedule"),": ",i().createElement("strong",null,N))),i().createElement("p",null,v("duplicateDispenseConfirmationPrompt","Do you want to proceed with dispensing? Proceeding will create another dispense record.")),h&&i().createElement("p",{className:d.error},h)),i().createElement(s.ModalFooter,null,i().createElement(s.Button,{kind:"secondary",onClick:e,disabled:D},(0,c.getCoreTranslation)("cancel","Cancel")),i().createElement(s.Button,{kind:"danger",onClick:()=>void C(),disabled:D,"aria-disabled":D,"aria-busy":D},D?i().createElement(s.InlineLoading,{description:v("dispensing","Dispensing")}):v("proceedAnyway","Proceed Anyway"))))}}}]);
|
package/dist/3877.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["3877"],{9087(e,n,s){s.d(n,{A:()=>t});let t={productiveHeading02:"-esm-dispensing__forms__productiveHeading02___auR9w",formWrapper:"-esm-dispensing__forms__formWrapper___P2kTX",formGroup:"-esm-dispensing__forms__formGroup___V03DP",bannerLoading:"-esm-dispensing__forms__bannerLoading___ufJ5H",patientInfo:"-esm-dispensing__forms__patientInfo___cMnYx",dateTimeContainer:"-esm-dispensing__forms__dateTimeContainer___p+iNn",timePickersContainer:"-esm-dispensing__forms__timePickersContainer___xC9xQ",frequencyAndDay:"-esm-dispensing__forms__frequencyAndDay___vafQx",datePickerControl:"-esm-dispensing__forms__datePickerControl___EQG5n",buttonGroup:"-esm-dispensing__forms__buttonGroup___gooeW",contentSwitcherWrapper:"-esm-dispensing__forms__contentSwitcherWrapper___w+Cl4",reviewContainer:"-esm-dispensing__forms__reviewContainer___iuZvA",prescriptionFormSectionHeader:"-esm-dispensing__forms__prescriptionFormSectionHeader___4gHgn",prescriptionFormField:"-esm-dispensing__forms__prescriptionFormField___b1R-u"}},8740(e,n,s){s.r(n),s.d(n,{default:()=>u});var t=s(2287),o=s.n(t),i=s(2059),r=s(1399),a=s(6940),_=s(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["3877"],{9087(e,n,s){s.d(n,{A:()=>t});let t={productiveHeading02:"-esm-dispensing__forms__productiveHeading02___auR9w",formWrapper:"-esm-dispensing__forms__formWrapper___P2kTX",formGroup:"-esm-dispensing__forms__formGroup___V03DP",bannerLoading:"-esm-dispensing__forms__bannerLoading___ufJ5H",patientInfo:"-esm-dispensing__forms__patientInfo___cMnYx",dateTimeContainer:"-esm-dispensing__forms__dateTimeContainer___p+iNn",timePickersContainer:"-esm-dispensing__forms__timePickersContainer___xC9xQ",frequencyAndDay:"-esm-dispensing__forms__frequencyAndDay___vafQx",datePickerControl:"-esm-dispensing__forms__datePickerControl___EQG5n",buttonGroup:"-esm-dispensing__forms__buttonGroup___gooeW",contentSwitcherWrapper:"-esm-dispensing__forms__contentSwitcherWrapper___w+Cl4",reviewContainer:"-esm-dispensing__forms__reviewContainer___iuZvA",prescriptionFormSectionHeader:"-esm-dispensing__forms__prescriptionFormSectionHeader___4gHgn",prescriptionFormField:"-esm-dispensing__forms__prescriptionFormField___b1R-u"}},8740(e,n,s){s.r(n),s.d(n,{default:()=>u});var t=s(2287),o=s.n(t),i=s(2059),r=s(1399),a=s(6940),_=s(7796),c=s(9513),d=s(1297),p=s(8035),l=s(7351),m=s(9087);let u=({workspaceProps:{medicationDispense:e,mode:n,patientUuid:s,encounterUuid:u,customWorkspaceTitle:g},closeWorkspace:f})=>{let{t:C}=(0,r.useTranslation)(),{mutate:b}=(0,i.useSWRConfig)(),E=(0,_.useConfig)(),{patient:h,isLoading:k}=(0,_.usePatient)(s),[v,S]=(0,t.useState)(),[w,x]=(0,t.useState)(!1),[A,P]=(0,t.useState)(!1),[F,T]=(0,t.useState)([]),{reasonForCloseValueSet:D}=(0,c.cE)(E.valueSets.reasonForClose.uuid);(0,t.useEffect)(()=>{let e=[];if(D?.compose?.include){let n=D.compose.include.find(e=>!e.system);n&&(n.concept?.forEach(n=>e.push({id:n.code,text:n.display})),e.sort((e,n)=>e.text.localeCompare(n.text)))}T(e)},[D]),(0,t.useEffect)(()=>S(e),[e]),(0,t.useEffect)(()=>{v&&v.statusReasonCodeableConcept?.coding[0].code?x(!0):x(!1)},[v]);let R=(0,t.useMemo)(()=>{if(h)return{patient:h,patientUuid:s,hideActionsOverflow:!0}},[h,s]);return o().createElement(_.Workspace2,{title:g??C("closePrescription","Close prescription")},o().createElement(a.Form,{className:m.A.formWrapper},o().createElement("div",null,k&&o().createElement(a.InlineLoading,{className:m.A.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),h&&o().createElement(_.ExtensionSlot,{name:"patient-header-slot",state:R}),o().createElement("section",{className:m.A.formGroup},o().createElement(_.ResponsiveWrapper,null,o().createElement(a.ComboBox,{id:"reasonForPause",items:F,titleText:C("reasonForClose","Reason for close"),itemToString:e=>e?.text,initialSelectedItem:{id:e.statusReasonCodeableConcept?.coding[0]?.code,text:e.statusReasonCodeableConcept?.text},onChange:({selectedItem:e})=>{S({...v,statusReasonCodeableConcept:{coding:[{code:e?.id}]}})}})))),o().createElement("section",{className:m.A.buttonGroup},o().createElement(a.Button,{disabled:A,onClick:()=>{f()},kind:"secondary"},(0,_.getCoreTranslation)("cancel","Cancel")),o().createElement(a.Button,{disabled:!w||A,onClick:()=>{if(!A){P(!0);let s=new AbortController;(0,l.gY)(u),(0,c.A7)(v,p.NV.declined,s).then(n=>n.ok&&!e.id?(0,d.NT)((0,l.vj)(v.authorizingPrescription[0].reference),p.O7.declined):n).then(e=>{e.ok&&((0,l.Yi)(b,u),(0,_.showSnackbar)({kind:"success",title:C("enter"===n?"medicationDispenseClosed":"medicationDispenseUpdated","enter"===n?"Medication dispense closed.":"Dispense record successfully updated.")}),f({discardUnsavedChanges:!0}))}).catch(e=>{(0,_.showSnackbar)({title:C("enter"===n?"medicationDispenseCloseError":"medicationDispenseUpdatedError","enter"===n?"Error closing medication dispense.":"Error updating dispense record"),kind:"error",subtitle:e?.message}),P(!1)})}}},C("enter"===n?"close":"saveChanges","enter"===n?"Close":"Save changes")))))}}}]);
|
package/dist/4302.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["4302"],{9087(e,t,n){n.d(t,{A:()=>i});let i={productiveHeading02:"-esm-dispensing__forms__productiveHeading02___auR9w",formWrapper:"-esm-dispensing__forms__formWrapper___P2kTX",formGroup:"-esm-dispensing__forms__formGroup___V03DP",bannerLoading:"-esm-dispensing__forms__bannerLoading___ufJ5H",patientInfo:"-esm-dispensing__forms__patientInfo___cMnYx",dateTimeContainer:"-esm-dispensing__forms__dateTimeContainer___p+iNn",timePickersContainer:"-esm-dispensing__forms__timePickersContainer___xC9xQ",frequencyAndDay:"-esm-dispensing__forms__frequencyAndDay___vafQx",datePickerControl:"-esm-dispensing__forms__datePickerControl___EQG5n",buttonGroup:"-esm-dispensing__forms__buttonGroup___gooeW",contentSwitcherWrapper:"-esm-dispensing__forms__contentSwitcherWrapper___w+Cl4",reviewContainer:"-esm-dispensing__forms__reviewContainer___iuZvA",prescriptionFormSectionHeader:"-esm-dispensing__forms__prescriptionFormSectionHeader___4gHgn",prescriptionFormField:"-esm-dispensing__forms__prescriptionFormField___b1R-u"}},3053(e,t,n){n.r(t),n.d(t,{default:()=>C});var i=n(2287),s=n.n(i),o=n(2059),a=n.n(o),r=n(1399),d=n(6940),u=n(4685),c=n(8035),l=n(7351);async function m(e,t){return await (0,u.openmrsFetch)("/ws/rest/v1/stockmanagement/dispenserequest",{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({dispenseItems:[e]})})}var p=n(9513),g=n(1297),_=n(9910),f=n.n(_),y=n(7003),v=n(771);let h=({medication:e,editAction:t})=>{let{t:n}=(0,r.useTranslation)();return s().createElement(d.Tile,{className:"-esm-dispensing__medication-card__medicationTile___dGgE8"},s().createElement("p",{className:"-esm-dispensing__medication-card__medicationName___TMWl1"},s().createElement("strong",null,(0,l.Q0)(e))),t&&s().createElement(d.IconButton,{align:"bottom-end",kind:"ghost",size:"sm",label:n("editFormulation","Edit formulation"),onClick:t},s().createElement(v.ff,null)))},b="-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___mNXjC",I="-esm-dispensing__medication-dispense-review__quantitySummary___pXs6R",x=({medicationDispense:e,updateMedicationDispense:t,isFreeTextDosage:n,setIsFreeTextDosage:o,quantityRemaining:c,quantityDispensed:m})=>{let{t:_}=(0,r.useTranslation)(),v=(0,u.useConfig)(),x=(0,u.useSession)(),[E,D]=(0,i.useState)(!1),[C,S]=(0,i.useState)([]),[k,T]=(0,i.useState)([]),[q]=(0,i.useState)(e.quantity.value),[w,R]=(0,i.useState)(!1),N=v.dispenseBehavior.allowModifyingPrescription,{orderConfigObject:P}=(0,p.E)(),{substitutionTypeValueSet:A}=(0,p.ij)(v.valueSets.substitutionType.uuid),{substitutionReasonValueSet:Q}=(0,p.Sj)(v.valueSets.substitutionReason.uuid),F=(0,p.u9)(v.dispenserProviderRoles),{medicationRequest:M,isLoading:U}=(0,g.uc)(e.authorizingPrescription?e.authorizingPrescription[0].reference:null,v.refreshInterval),{prescriptionDate:B}=(0,g.IQ)(M?M.encounter.reference:null),{drugRoutes:W,drugDosingUnits:H,drugDispensingUnits:O,orderFrequencies:L}=(0,i.useMemo)(()=>{if(!P)return{drugRoutes:[],drugDosingUnits:[],drugDispensingUnits:[],orderFrequencies:[]};{let e=P.drugRoutes.map(e=>({id:e.uuid,text:e.display})),t=P.drugDosingUnits.map(e=>({id:e.uuid,text:e.display}));return{drugRoutes:e,drugDosingUnits:t,drugDispensingUnits:P.drugDispensingUnits.map(e=>({id:e.uuid,text:e.display})),orderFrequencies:P.orderFrequencies.map(e=>({id:e.uuid,text:e.display}))}}},[P]);(0,i.useEffect)(()=>{let e=[];if(A?.compose?.include){let t=A.compose.include.find(e=>!e.system);t&&t.concept?.forEach(t=>e.push({id:t.code,text:t.display})),e.sort((e,t)=>e.text.localeCompare(t.text))}S(e)},[A]),(0,i.useEffect)(()=>{let e=[];if(Q?.compose?.include){let t=Q.compose.include.find(e=>!e.system);t&&t.concept?.forEach(t=>e.push({id:t.code,text:t.display})),e.sort((e,t)=>e.text.localeCompare(t.text))}T(e)},[Q]);let G=(0,l.M$)((0,l.H_)(e)?.medicationCodeableConcept?.coding),{medicationCodeableConceptUuid:z}=function(e,t){let{data:n}=a()(e||!t?null:`${u.fhirBaseUrl}/${t}`,u.openmrsFetch);return{medicationCodeableConceptUuid:n?(0,l.M$)(n.data.code.coding):null}}(G,(0,l.H_)(e).medicationReference?.reference),{medicationFormulations:$}=function(e){let{data:t}=a()(e?(0,l.bP)(e):null,u.openmrsFetch);return t?.data?.entry?{medicationFormulations:t.data.entry.map(e=>e.resource)}:{}}(G||z||null),j=M?.medicationReference?.reference&&e?.medicationReference?.reference&&M.medicationReference.reference!=e.medicationReference.reference,{substitution:Y}=e;(0,i.useEffect)(()=>{!U&&(j?Y.wasSubstituted||t({substitution:{...Y,wasSubstituted:!0}}):Y!=p.CG&&t({substitution:p.CG}))},[U,j,Y,t]),(0,i.useEffect)(()=>{R(x?.user&&(0,u.userHasAccess)(y.py,x.user))},[x]);let V=(0,i.useMemo)(()=>F.some(e=>e.uuid===x?.currentProvider?.uuid)?F:[...F,{uuid:x.currentProvider.uuid,person:{display:x?.user?.person?.display??""}}],[F,x]),X=(0,i.useMemo)(()=>e?.performer?.[0]?.actor?.reference?V?.find(t=>t.uuid===e.performer[0].actor.reference.split("/")[1]):void 0,[e?.performer,V]);return(0,i.useEffect)(()=>{X?.uuid&&t({performer:[{actor:{reference:`Practitioner/${X.uuid}`}}]})},[X,t]),s().createElement("div",{className:"-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___ZEBJm"},s().createElement(d.Stack,{gap:5},s().createElement("div",{className:"-esm-dispensing__medication-dispense-review__medicationCardContainer___Ivkqe"},E?s().createElement(u.ResponsiveWrapper,null,s().createElement(d.Dropdown,{id:"medicationFormulation",items:$,itemToString:e=>(0,l.Qz)(e),initialSelectedItem:{...$?.find(t=>t.id===e.medicationReference?.reference.split("/")[1])},titleText:_("medicationFormulation","Medication Formulation"),label:_("medicationFormulation","Medication Formulation"),onChange:({selectedItem:i})=>{"Medication/"+i.id!==e.medicationReference.reference&&t({medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+i?.id,display:(0,l.Qz)(i)},quantity:{...e.quantity,value:0},...n?{}:{dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{...e.dosageInstruction[0].doseAndRate[0],doseQuantity:{...e.dosageInstruction[0].doseAndRate[0].doseQuantity,value:0}}]}]}}),D(!1)}})):s().createElement(h,{medication:(0,l.H_)(e),editAction:w&&N?()=>D(!0):null})),j&&s().createElement("div",{className:b},s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{className:"-esm-dispensing__medication-dispense-review__substitutionType___tgANh",id:"substitutionType",items:C,titleText:_("substitutionType","Type of substitution"),itemToString:e=>e?.text,initialSelectedItem:{id:e.substitution.type?.coding[0]?.code,text:e.substitution.type?.text},onChange:({selectedItem:n})=>{t({substitution:{...e.substitution,type:{coding:[{code:n?.id}]}}})}}))),j&&s().createElement("div",{className:b},s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{className:"-esm-dispensing__medication-dispense-review__substitutionReason___bgNgx",id:"substitutionReason",items:k,titleText:_("substitutionReason","Reason for substitution"),itemToString:e=>e?.text,initialSelectedItem:{id:e.substitution.reason[0]?.coding[0]?.code,text:e.substitution.reason[0]?.text},onChange:({selectedItem:n})=>{t({substitution:{...e.substitution,reason:[{coding:[{code:n?.id}]}]}})}}))),v.dispenseBehavior.restrictTotalQuantityDispensed?s().createElement(u.ResponsiveWrapper,null,s().createElement("div",null,s().createElement("p",{className:I},_("quantityPrescribed","Quantity Prescribed"),": ",q),s().createElement("p",{className:I},_("quantityDispensed","Quantity Dispensed"),": ",m),s().createElement("p",{className:I},_("quantityRemaining","Quantity Remaining to Dispense"),": ",c))):null,s().createElement("div",{className:b},s().createElement(d.NumberInput,{allowEmpty:!0,value:e.quantity.value,disabled:!w,hideSteppers:!0,id:"quantity",invalidText:_("numberIsNotValid","Number is not valid"),label:s().createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"}},_("quantity","Quantity")),min:0,max:v.dispenseBehavior.restrictTotalQuantityDispensed?c:void 0,onChange:(n,i)=>{t({quantity:{...e.quantity,value:i.value?parseFloat(i.value.toString()):0}})}}),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"quantityUnits",disabled:!w||!N,items:O,titleText:_("drugDispensingUnit","Dispensing unit"),itemToString:e=>e?.text,initialSelectedItem:{id:e.quantity.code,text:e.quantity.unit},onChange:({selectedItem:n})=>{t({quantity:{value:e.quantity.value,code:n?.id}})},required:!0}))),s().createElement("div",{className:b},s().createElement(u.ResponsiveWrapper,null,s().createElement(d.Toggle,{toggled:n,disabled:!w||!N,id:"isFreeTextToggled",size:"sm",labelText:_("freeTextDosage","Free text dosage"),onToggle:n=>{o(n),n?t({dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{doseQuantity:{value:null,code:null}}],route:{coding:[{code:null}]},timing:{...e.dosageInstruction[0].timing,code:{coding:[{code:null}]}},text:""}]}):t({dosageInstruction:[{...e.dosageInstruction[0],text:""}]})}}))),!n&&s().createElement(s().Fragment,null,s().createElement("div",{className:b},s().createElement(d.NumberInput,{allowEmpty:!1,disabled:!w||!N,hideSteppers:!0,id:"dosingQuantity",invalidText:_("numberIsNotValid","Number is not valid"),min:0,label:_("dose","Dose"),value:e.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:(n,i)=>{t({dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{...e.dosageInstruction[0].doseAndRate[0],doseQuantity:{...e.dosageInstruction[0].doseAndRate[0].doseQuantity,value:i.value?parseFloat(i.value.toString()):0}}]}]})}}),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"dosingUnits",disabled:!w||!N,items:H,titleText:_("doseUnit","Dose unit"),itemToString:e=>e?.text,initialSelectedItem:{id:e.dosageInstruction[0].doseAndRate[0].doseQuantity?.code,text:e.dosageInstruction[0].doseAndRate[0].doseQuantity?.unit},onChange:({selectedItem:n})=>{t({dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{doseQuantity:{value:e.dosageInstruction[0].doseAndRate[0].doseQuantity?.value,code:n?.id}}]}]})},required:!0}))),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"editRoute",disabled:!w||!N,items:W,initialSelectedItem:{id:e.dosageInstruction[0].route?.coding[0]?.code,text:e.dosageInstruction[0].route?.text},titleText:_("route","Route"),itemToString:e=>e?.text,onChange:({selectedItem:n})=>{t({dosageInstruction:[{...e.dosageInstruction[0],route:{coding:[{code:n?.id}]}}]})},required:!0})),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"frequency",disabled:!w||!N,items:L,initialSelectedItem:{id:e.dosageInstruction[0].timing?.code?.coding[0]?.code,text:e.dosageInstruction[0].timing?.code?.text},titleText:_("frequency","Frequency"),itemToString:e=>e?.text,onChange:({selectedItem:n})=>{t({dosageInstruction:[{...e.dosageInstruction[0],timing:{...e.dosageInstruction[0].timing,code:{coding:[{code:n?.id}]}}}]})},required:!0}))),s().createElement(d.TextArea,{labelText:n?_("freeTextDosage","Free text dosage"):_("patientInstructions","Patient instructions"),value:e.dosageInstruction[0].text,maxLength:65535,onChange:n=>{t({dosageInstruction:[{...e.dosageInstruction[0],text:n.target.value}]})}}),s().createElement(u.OpenmrsDatePicker,{id:"dispenseDate",labelText:_("dispenseDate","Date of Dispense"),minDate:B?f()(B).startOf("day").toDate():null,maxDate:f()().toDate(),onChange:n=>{let i=e.whenHandedOver?f()(e.whenHandedOver):null,s=f()(n);t({whenHandedOver:i?.isSame(s,"day")?i.toISOString():s.toISOString()})},value:f()(e.whenHandedOver).toDate()}),V&&s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"dispenser",initialSelectedItem:X,onChange:({selectedItem:e})=>{let n=e?e.uuid:x.currentProvider.uuid;t({performer:[{actor:{reference:`Practitioner/${n}`}}]})},items:V,itemToString:e=>e?.person?.display,required:!0,titleText:_("dispensedBy","Dispensed by")}))))},E=({medicationDispense:e,updateInventoryItem:t})=>{let{t:n}=(0,r.useTranslation)(),i=(0,u.useConfig)(),{inventoryItems:o,error:c,isLoading:l}=(e=>{let t=(0,u.useSession)(),n=`/ws/rest/v1/stockmanagement/stockiteminventory?v=default&totalCount=true&drugUuid=${e}&includeBatchNo=true&groupBy=LocationStockItemBatchNo&dispenseLocationUuid=${t?.sessionLocation?.uuid}&includeStrength=1&includeConceptRefIds=1&emptyBatch=1&emptyBatchLocationUuid=${t?.sessionLocation?.uuid}&dispenseAtLocation=1`,{data:i,error:s,isLoading:o}=a()(n,u.openmrsFetch);return{inventoryItems:i?.data?.results??[],error:s,isLoading:o}})(e?.medicationReference?.reference?.split("/")[1]),m=o.filter(t=>{var n,s;return n=e,s=t,void 0!==i&&!i.validateBatch||!!(n?.dosageInstruction&&n?.dosageInstruction.length>0)&&n.dosageInstruction.some(e=>{if(e.timing?.repeat?.duration&&e.timing?.repeat?.durationUnit&&s.quantity>0){let t=e.timing.repeat.durationUnit,n=e.timing.repeat.duration,i=new Date;switch(t){case"s":i.setSeconds(i.getSeconds()+n);break;case"min":i.setMinutes(i.getMinutes()+n);break;case"h":i.setHours(i.getHours()+n);break;case"d":i.setDate(i.getDate()+n);break;case"wk":i.setDate(i.getDate()+7*n);break;case"mo":i.setMonth(i.getMonth()+n);break;case"y":i.setFullYear(i.getFullYear()+n);break;default:return!1}return new Date(s.expiration)>i}return!1})}).sort((e,t)=>new Date(e.expiration).getTime()-new Date(t.expiration).getTime());return c?s().createElement(d.InlineNotification,{"aria-label":"closes notification",kind:"error",lowContrast:!0,statusIconDescription:"notification",subtitle:n("errorLoadingInventoryItems","Error fetching inventory items"),title:n("error","Error")}):l?s().createElement(d.InlineLoading,{description:n("loadingInventoryItems","Loading inventory items...")}):s().createElement(d.Layer,null,s().createElement(d.ComboBox,{id:"stockDispense",items:m,onChange:({selectedItem:e})=>{t(e)},itemToString:e=>e?n("stockDispenseDetails","Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",{batchNumber:e.batchNumber,quantity:Math.floor(e.quantity),quantityUoM:e.quantityUoM,expiration:(0,u.formatDate)(new Date(e.expiration))}):"",titleText:n("stockDispense","Stock Dispense"),placeholder:n("selectStockDispense","Select stock to dispense from")}))};var D=n(9087);let C=({workspaceProps:{medicationDispense:e,medicationRequestBundle:t,mode:n,patientUuid:a,encounterUuid:_,quantityRemaining:f,quantityDispensed:y,customWorkspaceTitle:v,onWorkspaceClosed:h},closeWorkspace:b})=>{let{t:I}=(0,r.useTranslation)(),{mutate:C}=(0,o.useSWRConfig)(),{patient:S,isLoading:k}=(0,u.usePatient)(a),T=(0,u.useConfig)(),[q,w]=(0,i.useState)(),[R,N]=(0,i.useState)(e),[P,A]=(0,i.useState)(!1),[Q,F]=(0,i.useState)(!1),[M,U]=(0,i.useState)(()=>{let t=(0,l.Gp)(e?.dosageInstruction);return!!t&&(0,l.XM)(t)}),B=()=>{if(P)return Promise.resolve();A(!0);let e=new AbortController;return(0,l.gY)(_),(0,p.A7)(R,c.NV.completed,e).then(e=>{if(e.ok){if(T.completeOrderWithThisDispense&&Q)return(0,g.NT)((0,l.vj)(R.authorizingPrescription[0].reference),c.O7.completed).then(()=>e);let n=(0,l._e)(R,t,T.dispenseBehavior.restrictTotalQuantityDispensed);if((0,l.Qm)(t.request)!==n)return(0,g.NT)((0,l.vj)(R.authorizingPrescription[0].reference),n).then(()=>e)}return e}).then(t=>{let{status:n}=t;T.enableStockDispense&&(201===n||200===n)&&m({dispenseLocation:q.locationUuid,patient:a,order:(0,l.vj)(R.authorizingPrescription[0].reference),encounter:_,stockItem:q?.stockItemUuid,stockBatch:q.stockBatchUuid,stockItemPackagingUOM:q.quantityUoMUuid,quantity:R.quantity.value},e).then(()=>{(0,u.showSnackbar)({title:I("stockDispensed","Stock dispensed"),kind:"success",subtitle:I("stockDispensedSuccessfully","Stock dispensed successfully and batch level updated.")})},e=>{(0,u.showSnackbar)({title:"Stock dispense error",kind:"error",subtitle:e?.message})});return t}).then(e=>{let{status:t}=e;T.completeOrderWithThisDispense&&Q&&e?.data?.status==="completed"&&(0,u.showSnackbar)({title:I("prescriptionCompleted","Prescription completed"),kind:"success",subtitle:I("prescriptionCompletedSuccessfully","Medication dispensed and prescription marked as completed")}),(201===t||200===t)&&((0,l.Yi)(C,_),(0,u.showSnackbar)({kind:"success",subtitle:I("medicationListUpdated","Medication dispense list has been updated."),title:I("enter"===n?"medicationDispensed":"medicationDispenseUpdated","enter"===n?"Medication successfully dispensed.":"Medication dispense record successfully updated.")}),b({discardUnsavedChanges:!0}),A(!1),h?.())},e=>{(0,u.showSnackbar)({kind:"error",title:I("enter"===n?"medicationDispenseError":"medicationDispenseUpdatedError","enter"===n?"Error dispensing medication.":"Error updating dispense record"),subtitle:e?.message}),A(!1)})},W=(0,i.useCallback)(e=>{N(t=>({...t,...e}))},[]),H=(0,i.useMemo)(()=>{if(!R)return!1;let e=R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.value||R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.code||R.dosageInstruction[0]?.route?.coding[0]?.code||R.dosageInstruction[0]?.timing?.code?.coding[0].code,t=R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.value&&R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.code&&R.dosageInstruction[0]?.route?.coding[0]?.code&&R.dosageInstruction[0]?.timing?.code?.coding[0].code;return R.performer&&R.performer[0]?.actor.reference&&R.quantity?.value&&(!f||R?.quantity?.value<=f)&&R.quantity?.code&&(t&&!M||!e&&M&&R.dosageInstruction[0]?.text)&&(!R.substitution.wasSubstituted||R.substitution.reason[0]?.coding[0].code&&R.substitution.type?.coding[0].code)},[M,R,f]);(0,i.useEffect)(()=>{if("enter"===n&&t?.request?.dispenseRequest){let e=t.request.dispenseRequest.numberOfRepeatsAllowed;(0===e||null==e)&&F(!0)}},[t,n]);let O=!!T.enableStockDispense&&!q||!H||P,L=(0,i.useMemo)(()=>{if(S)return{patient:S,patientUuid:a,hideActionsOverflow:!0}},[S,a]);return s().createElement(u.Workspace2,{title:v??I("dispensePrescription","Dispense prescription")},s().createElement(d.Form,{className:D.A.formWrapper},s().createElement("div",null,k&&s().createElement(d.InlineLoading,{className:D.A.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),S&&s().createElement(u.ExtensionSlot,{name:"patient-header-slot",state:L}),s().createElement("section",{className:D.A.formGroup},s().createElement(d.FormLabel,null,T.dispenseBehavior.allowModifyingPrescription?I("drugHelpText","You may edit the formulation and quantity dispensed here"):I("drugHelpTextNoEdit","You may edit quantity dispensed here")),R?s().createElement("div",null,s().createElement(x,{medicationDispense:R,updateMedicationDispense:W,isFreeTextDosage:M,setIsFreeTextDosage:U,quantityRemaining:f,quantityDispensed:y}),T.completeOrderWithThisDispense&&"enter"===n&&!e?.id&&s().createElement(d.Checkbox,{id:"complete-order-with-this-dispense",labelText:I("completeOrderWithThisDispense","Complete order with this dispense"),checked:Q,onChange:(e,{checked:t})=>F(t)}),T.enableStockDispense&&s().createElement(E,{inventoryItem:q,medicationDispense:e,updateInventoryItem:w})):null)),s().createElement("section",{className:D.A.buttonGroup},s().createElement(d.Button,{disabled:P,onClick:()=>{b(),h?.()},kind:"secondary"},(0,u.getCoreTranslation)("cancel","Cancel")),s().createElement(d.Button,{disabled:O,onClick:()=>{let e,i,s,o,a,r=R?(e=t?.dispenses??[],i=T.duplicateCheckWindowDays,s=e=>{if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t},o=24*i*36e5,a=s(R.whenHandedOver??R.whenPrepared)??Date.now(),e.filter(e=>e.status===c.NV.completed).filter(e=>{let t=s(e.whenHandedOver??e.whenPrepared);return null!==t&&t<=a&&a-t<=o}).sort((e,t)=>s(t.whenHandedOver??t.whenPrepared)-s(e.whenHandedOver??e.whenPrepared)).find(e=>{if("edit"===n&&e.id&&R.id&&e.id===R.id)return!1;let t=e.medicationCodeableConcept?.coding?.[0]?.code===R.medicationCodeableConcept?.coding?.[0]?.code,i=e.quantity?.value===R.quantity?.value&&e.quantity?.code===R.quantity?.code,s=e.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.value===R.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.value&&e.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.code===R.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.code;return t&&i&&s})):null;if(T.enableDuplicateDispenseCheck&&r){let e;e=(0,u.showModal)("duplicate-dispense-modal",{onClose:()=>e(),medicationName:R?.medicationCodeableConcept?.text||"",previousDispense:r,previousDispenseDate:r?.whenHandedOver??r?.whenPrepared??void 0,previousSchedule:r?.dosageInstruction?.[0]?.timing?.code?.text??R?.dosageInstruction?.[0]?.timing?.code?.text,previousQuantity:r?.quantity?.value??R?.quantity?.value,previousQuantityUnit:r?.quantity?.unit??r?.quantity?.code??R?.quantity?.code,previousPerformer:r?.performer?.[0]?.actor?.display??R?.performer?.[0]?.actor?.display,onConfirm:()=>B()})}else B()}},I("enter"===n?"dispensePrescription":"saveChanges","enter"===n?"Dispense prescription":"Save changes")))))}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["4302"],{9087(e,t,n){n.d(t,{A:()=>i});let i={productiveHeading02:"-esm-dispensing__forms__productiveHeading02___auR9w",formWrapper:"-esm-dispensing__forms__formWrapper___P2kTX",formGroup:"-esm-dispensing__forms__formGroup___V03DP",bannerLoading:"-esm-dispensing__forms__bannerLoading___ufJ5H",patientInfo:"-esm-dispensing__forms__patientInfo___cMnYx",dateTimeContainer:"-esm-dispensing__forms__dateTimeContainer___p+iNn",timePickersContainer:"-esm-dispensing__forms__timePickersContainer___xC9xQ",frequencyAndDay:"-esm-dispensing__forms__frequencyAndDay___vafQx",datePickerControl:"-esm-dispensing__forms__datePickerControl___EQG5n",buttonGroup:"-esm-dispensing__forms__buttonGroup___gooeW",contentSwitcherWrapper:"-esm-dispensing__forms__contentSwitcherWrapper___w+Cl4",reviewContainer:"-esm-dispensing__forms__reviewContainer___iuZvA",prescriptionFormSectionHeader:"-esm-dispensing__forms__prescriptionFormSectionHeader___4gHgn",prescriptionFormField:"-esm-dispensing__forms__prescriptionFormField___b1R-u"}},3053(e,t,n){n.r(t),n.d(t,{default:()=>C});var i=n(2287),s=n.n(i),o=n(2059),a=n.n(o),r=n(1399),d=n(6940),u=n(7796),c=n(8035),l=n(7351);async function m(e,t){return await (0,u.openmrsFetch)("/ws/rest/v1/stockmanagement/dispenserequest",{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({dispenseItems:[e]})})}var p=n(9513),g=n(1297),_=n(9910),f=n.n(_),y=n(7003),v=n(771);let h=({medication:e,editAction:t})=>{let{t:n}=(0,r.useTranslation)();return s().createElement(d.Tile,{className:"-esm-dispensing__medication-card__medicationTile___dGgE8"},s().createElement("p",{className:"-esm-dispensing__medication-card__medicationName___TMWl1"},s().createElement("strong",null,(0,l.Q0)(e))),t&&s().createElement(d.IconButton,{align:"bottom-end",kind:"ghost",size:"sm",label:n("editFormulation","Edit formulation"),onClick:t},s().createElement(v.ff,null)))},b="-esm-dispensing__medication-dispense-review__dispenseDetailsContainer___mNXjC",I="-esm-dispensing__medication-dispense-review__quantitySummary___pXs6R",x=({medicationDispense:e,updateMedicationDispense:t,isFreeTextDosage:n,setIsFreeTextDosage:o,quantityRemaining:c,quantityDispensed:m})=>{let{t:_}=(0,r.useTranslation)(),v=(0,u.useConfig)(),x=(0,u.useSession)(),[E,D]=(0,i.useState)(!1),[C,S]=(0,i.useState)([]),[k,T]=(0,i.useState)([]),[q]=(0,i.useState)(e.quantity.value),[w,R]=(0,i.useState)(!1),N=v.dispenseBehavior.allowModifyingPrescription,{orderConfigObject:P}=(0,p.E)(),{substitutionTypeValueSet:A}=(0,p.ij)(v.valueSets.substitutionType.uuid),{substitutionReasonValueSet:Q}=(0,p.Sj)(v.valueSets.substitutionReason.uuid),F=(0,p.u9)(v.dispenserProviderRoles),{medicationRequest:M,isLoading:U}=(0,g.uc)(e.authorizingPrescription?e.authorizingPrescription[0].reference:null,v.refreshInterval),{prescriptionDate:B}=(0,g.IQ)(M?M.encounter.reference:null),{drugRoutes:W,drugDosingUnits:H,drugDispensingUnits:O,orderFrequencies:L}=(0,i.useMemo)(()=>{if(!P)return{drugRoutes:[],drugDosingUnits:[],drugDispensingUnits:[],orderFrequencies:[]};{let e=P.drugRoutes.map(e=>({id:e.uuid,text:e.display})),t=P.drugDosingUnits.map(e=>({id:e.uuid,text:e.display}));return{drugRoutes:e,drugDosingUnits:t,drugDispensingUnits:P.drugDispensingUnits.map(e=>({id:e.uuid,text:e.display})),orderFrequencies:P.orderFrequencies.map(e=>({id:e.uuid,text:e.display}))}}},[P]);(0,i.useEffect)(()=>{let e=[];if(A?.compose?.include){let t=A.compose.include.find(e=>!e.system);t&&t.concept?.forEach(t=>e.push({id:t.code,text:t.display})),e.sort((e,t)=>e.text.localeCompare(t.text))}S(e)},[A]),(0,i.useEffect)(()=>{let e=[];if(Q?.compose?.include){let t=Q.compose.include.find(e=>!e.system);t&&t.concept?.forEach(t=>e.push({id:t.code,text:t.display})),e.sort((e,t)=>e.text.localeCompare(t.text))}T(e)},[Q]);let G=(0,l.M$)((0,l.H_)(e)?.medicationCodeableConcept?.coding),{medicationCodeableConceptUuid:z}=function(e,t){let{data:n}=a()(e||!t?null:`${u.fhirBaseUrl}/${t}`,u.openmrsFetch);return{medicationCodeableConceptUuid:n?(0,l.M$)(n.data.code.coding):null}}(G,(0,l.H_)(e).medicationReference?.reference),{medicationFormulations:$}=function(e){let{data:t}=a()(e?(0,l.bP)(e):null,u.openmrsFetch);return t?.data?.entry?{medicationFormulations:t.data.entry.map(e=>e.resource)}:{}}(G||z||null),j=M?.medicationReference?.reference&&e?.medicationReference?.reference&&M.medicationReference.reference!=e.medicationReference.reference,{substitution:Y}=e;(0,i.useEffect)(()=>{!U&&(j?Y.wasSubstituted||t({substitution:{...Y,wasSubstituted:!0}}):Y!=p.CG&&t({substitution:p.CG}))},[U,j,Y,t]),(0,i.useEffect)(()=>{R(x?.user&&(0,u.userHasAccess)(y.py,x.user))},[x]);let V=(0,i.useMemo)(()=>F.some(e=>e.uuid===x?.currentProvider?.uuid)?F:[...F,{uuid:x.currentProvider.uuid,person:{display:x?.user?.person?.display??""}}],[F,x]),X=(0,i.useMemo)(()=>e?.performer?.[0]?.actor?.reference?V?.find(t=>t.uuid===e.performer[0].actor.reference.split("/")[1]):void 0,[e?.performer,V]);return(0,i.useEffect)(()=>{X?.uuid&&t({performer:[{actor:{reference:`Practitioner/${X.uuid}`}}]})},[X,t]),s().createElement("div",{className:"-esm-dispensing__medication-dispense-review__medicationDispenseReviewContainer___ZEBJm"},s().createElement(d.Stack,{gap:5},s().createElement("div",{className:"-esm-dispensing__medication-dispense-review__medicationCardContainer___Ivkqe"},E?s().createElement(u.ResponsiveWrapper,null,s().createElement(d.Dropdown,{id:"medicationFormulation",items:$,itemToString:e=>(0,l.Qz)(e),initialSelectedItem:{...$?.find(t=>t.id===e.medicationReference?.reference.split("/")[1])},titleText:_("medicationFormulation","Medication Formulation"),label:_("medicationFormulation","Medication Formulation"),onChange:({selectedItem:i})=>{"Medication/"+i.id!==e.medicationReference.reference&&t({medicationCodeableConcept:void 0,medicationReference:{reference:"Medication/"+i?.id,display:(0,l.Qz)(i)},quantity:{...e.quantity,value:0},...n?{}:{dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{...e.dosageInstruction[0].doseAndRate[0],doseQuantity:{...e.dosageInstruction[0].doseAndRate[0].doseQuantity,value:0}}]}]}}),D(!1)}})):s().createElement(h,{medication:(0,l.H_)(e),editAction:w&&N?()=>D(!0):null})),j&&s().createElement("div",{className:b},s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{className:"-esm-dispensing__medication-dispense-review__substitutionType___tgANh",id:"substitutionType",items:C,titleText:_("substitutionType","Type of substitution"),itemToString:e=>e?.text,initialSelectedItem:{id:e.substitution.type?.coding[0]?.code,text:e.substitution.type?.text},onChange:({selectedItem:n})=>{t({substitution:{...e.substitution,type:{coding:[{code:n?.id}]}}})}}))),j&&s().createElement("div",{className:b},s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{className:"-esm-dispensing__medication-dispense-review__substitutionReason___bgNgx",id:"substitutionReason",items:k,titleText:_("substitutionReason","Reason for substitution"),itemToString:e=>e?.text,initialSelectedItem:{id:e.substitution.reason[0]?.coding[0]?.code,text:e.substitution.reason[0]?.text},onChange:({selectedItem:n})=>{t({substitution:{...e.substitution,reason:[{coding:[{code:n?.id}]}]}})}}))),v.dispenseBehavior.restrictTotalQuantityDispensed?s().createElement(u.ResponsiveWrapper,null,s().createElement("div",null,s().createElement("p",{className:I},_("quantityPrescribed","Quantity Prescribed"),": ",q),s().createElement("p",{className:I},_("quantityDispensed","Quantity Dispensed"),": ",m),s().createElement("p",{className:I},_("quantityRemaining","Quantity Remaining to Dispense"),": ",c))):null,s().createElement("div",{className:b},s().createElement(d.NumberInput,{allowEmpty:!0,value:e.quantity.value,disabled:!w,hideSteppers:!0,id:"quantity",invalidText:_("numberIsNotValid","Number is not valid"),label:s().createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"}},_("quantity","Quantity")),min:0,max:v.dispenseBehavior.restrictTotalQuantityDispensed?c:void 0,onChange:(n,i)=>{t({quantity:{...e.quantity,value:i.value?parseFloat(i.value.toString()):0}})}}),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"quantityUnits",disabled:!w||!N,items:O,titleText:_("drugDispensingUnit","Dispensing unit"),itemToString:e=>e?.text,initialSelectedItem:{id:e.quantity.code,text:e.quantity.unit},onChange:({selectedItem:n})=>{t({quantity:{value:e.quantity.value,code:n?.id}})},required:!0}))),s().createElement("div",{className:b},s().createElement(u.ResponsiveWrapper,null,s().createElement(d.Toggle,{toggled:n,disabled:!w||!N,id:"isFreeTextToggled",size:"sm",labelText:_("freeTextDosage","Free text dosage"),onToggle:n=>{o(n),n?t({dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{doseQuantity:{value:null,code:null}}],route:{coding:[{code:null}]},timing:{...e.dosageInstruction[0].timing,code:{coding:[{code:null}]}},text:""}]}):t({dosageInstruction:[{...e.dosageInstruction[0],text:""}]})}}))),!n&&s().createElement(s().Fragment,null,s().createElement("div",{className:b},s().createElement(d.NumberInput,{allowEmpty:!1,disabled:!w||!N,hideSteppers:!0,id:"dosingQuantity",invalidText:_("numberIsNotValid","Number is not valid"),min:0,label:_("dose","Dose"),value:e.dosageInstruction[0].doseAndRate[0].doseQuantity.value,onChange:(n,i)=>{t({dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{...e.dosageInstruction[0].doseAndRate[0],doseQuantity:{...e.dosageInstruction[0].doseAndRate[0].doseQuantity,value:i.value?parseFloat(i.value.toString()):0}}]}]})}}),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"dosingUnits",disabled:!w||!N,items:H,titleText:_("doseUnit","Dose unit"),itemToString:e=>e?.text,initialSelectedItem:{id:e.dosageInstruction[0].doseAndRate[0].doseQuantity?.code,text:e.dosageInstruction[0].doseAndRate[0].doseQuantity?.unit},onChange:({selectedItem:n})=>{t({dosageInstruction:[{...e.dosageInstruction[0],doseAndRate:[{doseQuantity:{value:e.dosageInstruction[0].doseAndRate[0].doseQuantity?.value,code:n?.id}}]}]})},required:!0}))),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"editRoute",disabled:!w||!N,items:W,initialSelectedItem:{id:e.dosageInstruction[0].route?.coding[0]?.code,text:e.dosageInstruction[0].route?.text},titleText:_("route","Route"),itemToString:e=>e?.text,onChange:({selectedItem:n})=>{t({dosageInstruction:[{...e.dosageInstruction[0],route:{coding:[{code:n?.id}]}}]})},required:!0})),s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"frequency",disabled:!w||!N,items:L,initialSelectedItem:{id:e.dosageInstruction[0].timing?.code?.coding[0]?.code,text:e.dosageInstruction[0].timing?.code?.text},titleText:_("frequency","Frequency"),itemToString:e=>e?.text,onChange:({selectedItem:n})=>{t({dosageInstruction:[{...e.dosageInstruction[0],timing:{...e.dosageInstruction[0].timing,code:{coding:[{code:n?.id}]}}}]})},required:!0}))),s().createElement(d.TextArea,{labelText:n?_("freeTextDosage","Free text dosage"):_("patientInstructions","Patient instructions"),value:e.dosageInstruction[0].text,maxLength:65535,onChange:n=>{t({dosageInstruction:[{...e.dosageInstruction[0],text:n.target.value}]})}}),s().createElement(u.OpenmrsDatePicker,{id:"dispenseDate",labelText:_("dispenseDate","Date of Dispense"),minDate:B?f()(B).startOf("day").toDate():null,maxDate:f()().toDate(),onChange:n=>{let i=e.whenHandedOver?f()(e.whenHandedOver):null,s=f()(n);t({whenHandedOver:i?.isSame(s,"day")?i.toISOString():s.toISOString()})},value:f()(e.whenHandedOver).toDate()}),V&&s().createElement(u.ResponsiveWrapper,null,s().createElement(d.ComboBox,{id:"dispenser",initialSelectedItem:X,onChange:({selectedItem:e})=>{let n=e?e.uuid:x.currentProvider.uuid;t({performer:[{actor:{reference:`Practitioner/${n}`}}]})},items:V,itemToString:e=>e?.person?.display,required:!0,titleText:_("dispensedBy","Dispensed by")}))))},E=({medicationDispense:e,updateInventoryItem:t})=>{let{t:n}=(0,r.useTranslation)(),i=(0,u.useConfig)(),{inventoryItems:o,error:c,isLoading:l}=(e=>{let t=(0,u.useSession)(),n=`/ws/rest/v1/stockmanagement/stockiteminventory?v=default&totalCount=true&drugUuid=${e}&includeBatchNo=true&groupBy=LocationStockItemBatchNo&dispenseLocationUuid=${t?.sessionLocation?.uuid}&includeStrength=1&includeConceptRefIds=1&emptyBatch=1&emptyBatchLocationUuid=${t?.sessionLocation?.uuid}&dispenseAtLocation=1`,{data:i,error:s,isLoading:o}=a()(n,u.openmrsFetch);return{inventoryItems:i?.data?.results??[],error:s,isLoading:o}})(e?.medicationReference?.reference?.split("/")[1]),m=o.filter(t=>{var n,s;return n=e,s=t,void 0!==i&&!i.validateBatch||!!(n?.dosageInstruction&&n?.dosageInstruction.length>0)&&n.dosageInstruction.some(e=>{if(e.timing?.repeat?.duration&&e.timing?.repeat?.durationUnit&&s.quantity>0){let t=e.timing.repeat.durationUnit,n=e.timing.repeat.duration,i=new Date;switch(t){case"s":i.setSeconds(i.getSeconds()+n);break;case"min":i.setMinutes(i.getMinutes()+n);break;case"h":i.setHours(i.getHours()+n);break;case"d":i.setDate(i.getDate()+n);break;case"wk":i.setDate(i.getDate()+7*n);break;case"mo":i.setMonth(i.getMonth()+n);break;case"y":i.setFullYear(i.getFullYear()+n);break;default:return!1}return new Date(s.expiration)>i}return!1})}).sort((e,t)=>new Date(e.expiration).getTime()-new Date(t.expiration).getTime());return c?s().createElement(d.InlineNotification,{"aria-label":"closes notification",kind:"error",lowContrast:!0,statusIconDescription:"notification",subtitle:n("errorLoadingInventoryItems","Error fetching inventory items"),title:n("error","Error")}):l?s().createElement(d.InlineLoading,{description:n("loadingInventoryItems","Loading inventory items...")}):s().createElement(d.Layer,null,s().createElement(d.ComboBox,{id:"stockDispense",items:m,onChange:({selectedItem:e})=>{t(e)},itemToString:e=>e?n("stockDispenseDetails","Batch: {{batchNumber}} - Quantity: {{quantity}} ({{quantityUoM}}) - Expiry: {{expiration}}",{batchNumber:e.batchNumber,quantity:Math.floor(e.quantity),quantityUoM:e.quantityUoM,expiration:(0,u.formatDate)(new Date(e.expiration))}):"",titleText:n("stockDispense","Stock Dispense"),placeholder:n("selectStockDispense","Select stock to dispense from")}))};var D=n(9087);let C=({workspaceProps:{medicationDispense:e,medicationRequestBundle:t,mode:n,patientUuid:a,encounterUuid:_,quantityRemaining:f,quantityDispensed:y,customWorkspaceTitle:v,onWorkspaceClosed:h},closeWorkspace:b})=>{let{t:I}=(0,r.useTranslation)(),{mutate:C}=(0,o.useSWRConfig)(),{patient:S,isLoading:k}=(0,u.usePatient)(a),T=(0,u.useConfig)(),[q,w]=(0,i.useState)(),[R,N]=(0,i.useState)(e),[P,A]=(0,i.useState)(!1),[Q,F]=(0,i.useState)(!1),[M,U]=(0,i.useState)(()=>{let t=(0,l.Gp)(e?.dosageInstruction);return!!t&&(0,l.XM)(t)}),B=()=>{if(P)return Promise.resolve();A(!0);let e=new AbortController;return(0,l.gY)(_),(0,p.A7)(R,c.NV.completed,e).then(e=>{if(e.ok){if(T.completeOrderWithThisDispense&&Q)return(0,g.NT)((0,l.vj)(R.authorizingPrescription[0].reference),c.O7.completed).then(()=>e);let n=(0,l._e)(R,t,T.dispenseBehavior.restrictTotalQuantityDispensed);if((0,l.Qm)(t.request)!==n)return(0,g.NT)((0,l.vj)(R.authorizingPrescription[0].reference),n).then(()=>e)}return e}).then(t=>{let{status:n}=t;T.enableStockDispense&&(201===n||200===n)&&m({dispenseLocation:q.locationUuid,patient:a,order:(0,l.vj)(R.authorizingPrescription[0].reference),encounter:_,stockItem:q?.stockItemUuid,stockBatch:q.stockBatchUuid,stockItemPackagingUOM:q.quantityUoMUuid,quantity:R.quantity.value},e).then(()=>{(0,u.showSnackbar)({title:I("stockDispensed","Stock dispensed"),kind:"success",subtitle:I("stockDispensedSuccessfully","Stock dispensed successfully and batch level updated.")})},e=>{(0,u.showSnackbar)({title:"Stock dispense error",kind:"error",subtitle:e?.message})});return t}).then(e=>{let{status:t}=e;T.completeOrderWithThisDispense&&Q&&e?.data?.status==="completed"&&(0,u.showSnackbar)({title:I("prescriptionCompleted","Prescription completed"),kind:"success",subtitle:I("prescriptionCompletedSuccessfully","Medication dispensed and prescription marked as completed")}),(201===t||200===t)&&((0,l.Yi)(C,_),(0,u.showSnackbar)({kind:"success",subtitle:I("medicationListUpdated","Medication dispense list has been updated."),title:I("enter"===n?"medicationDispensed":"medicationDispenseUpdated","enter"===n?"Medication successfully dispensed.":"Medication dispense record successfully updated.")}),b({discardUnsavedChanges:!0}),A(!1),h?.())},e=>{(0,u.showSnackbar)({kind:"error",title:I("enter"===n?"medicationDispenseError":"medicationDispenseUpdatedError","enter"===n?"Error dispensing medication.":"Error updating dispense record"),subtitle:e?.message}),A(!1)})},W=(0,i.useCallback)(e=>{N(t=>({...t,...e}))},[]),H=(0,i.useMemo)(()=>{if(!R)return!1;let e=R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.value||R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.code||R.dosageInstruction[0]?.route?.coding[0]?.code||R.dosageInstruction[0]?.timing?.code?.coding[0].code,t=R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.value&&R.dosageInstruction[0]?.doseAndRate[0]?.doseQuantity?.code&&R.dosageInstruction[0]?.route?.coding[0]?.code&&R.dosageInstruction[0]?.timing?.code?.coding[0].code;return R.performer&&R.performer[0]?.actor.reference&&R.quantity?.value&&(!f||R?.quantity?.value<=f)&&R.quantity?.code&&(t&&!M||!e&&M&&R.dosageInstruction[0]?.text)&&(!R.substitution.wasSubstituted||R.substitution.reason[0]?.coding[0].code&&R.substitution.type?.coding[0].code)},[M,R,f]);(0,i.useEffect)(()=>{if("enter"===n&&t?.request?.dispenseRequest){let e=t.request.dispenseRequest.numberOfRepeatsAllowed;(0===e||null==e)&&F(!0)}},[t,n]);let O=!!T.enableStockDispense&&!q||!H||P,L=(0,i.useMemo)(()=>{if(S)return{patient:S,patientUuid:a,hideActionsOverflow:!0}},[S,a]);return s().createElement(u.Workspace2,{title:v??I("dispensePrescription","Dispense prescription")},s().createElement(d.Form,{className:D.A.formWrapper},s().createElement("div",null,k&&s().createElement(d.InlineLoading,{className:D.A.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),S&&s().createElement(u.ExtensionSlot,{name:"patient-header-slot",state:L}),s().createElement("section",{className:D.A.formGroup},s().createElement(d.FormLabel,null,T.dispenseBehavior.allowModifyingPrescription?I("drugHelpText","You may edit the formulation and quantity dispensed here"):I("drugHelpTextNoEdit","You may edit quantity dispensed here")),R?s().createElement("div",null,s().createElement(x,{medicationDispense:R,updateMedicationDispense:W,isFreeTextDosage:M,setIsFreeTextDosage:U,quantityRemaining:f,quantityDispensed:y}),T.completeOrderWithThisDispense&&"enter"===n&&!e?.id&&s().createElement(d.Checkbox,{id:"complete-order-with-this-dispense",labelText:I("completeOrderWithThisDispense","Complete order with this dispense"),checked:Q,onChange:(e,{checked:t})=>F(t)}),T.enableStockDispense&&s().createElement(E,{inventoryItem:q,medicationDispense:e,updateInventoryItem:w})):null)),s().createElement("section",{className:D.A.buttonGroup},s().createElement(d.Button,{disabled:P,onClick:()=>{b(),h?.()},kind:"secondary"},(0,u.getCoreTranslation)("cancel","Cancel")),s().createElement(d.Button,{disabled:O,onClick:()=>{let e,i,s,o,a,r=R?(e=t?.dispenses??[],i=T.duplicateCheckWindowDays,s=e=>{if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t},o=24*i*36e5,a=s(R.whenHandedOver??R.whenPrepared)??Date.now(),e.filter(e=>e.status===c.NV.completed).filter(e=>{let t=s(e.whenHandedOver??e.whenPrepared);return null!==t&&t<=a&&a-t<=o}).sort((e,t)=>s(t.whenHandedOver??t.whenPrepared)-s(e.whenHandedOver??e.whenPrepared)).find(e=>{if("edit"===n&&e.id&&R.id&&e.id===R.id)return!1;let t=e.medicationCodeableConcept?.coding?.[0]?.code===R.medicationCodeableConcept?.coding?.[0]?.code,i=e.quantity?.value===R.quantity?.value&&e.quantity?.code===R.quantity?.code,s=e.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.value===R.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.value&&e.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.code===R.dosageInstruction?.[0]?.doseAndRate?.[0]?.doseQuantity?.code;return t&&i&&s})):null;if(T.enableDuplicateDispenseCheck&&r){let e;e=(0,u.showModal)("duplicate-dispense-modal",{onClose:()=>e(),medicationName:R?.medicationCodeableConcept?.text||"",previousDispense:r,previousDispenseDate:r?.whenHandedOver??r?.whenPrepared??void 0,previousSchedule:r?.dosageInstruction?.[0]?.timing?.code?.text??R?.dosageInstruction?.[0]?.timing?.code?.text,previousQuantity:r?.quantity?.value??R?.quantity?.value,previousQuantityUnit:r?.quantity?.unit??r?.quantity?.code??R?.quantity?.code,previousPerformer:r?.performer?.[0]?.actor?.display??R?.performer?.[0]?.actor?.display,onConfirm:()=>B()})}else B()}},I("enter"===n?"dispensePrescription":"saveChanges","enter"===n?"Dispense prescription":"Save changes")))))}}}]);
|
package/dist/4318.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["4318"],{5645(e,t,a){a.r(t),a.d(t,{default:()=>c});var n=a(2287),i=a.n(n),s=a(6940),l=a(1399),r=a(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["4318"],{5645(e,t,a){a.r(t),a.d(t,{default:()=>c});var n=a(2287),i=a.n(n),s=a(6940),l=a(1399),r=a(7796);let o=[3,5,10,20,50,100],d="-esm-dispensing__conditions__conditionContainer___0CILg",c=({patientUuid:e})=>{let{t}=(0,l.useTranslation)(),{conditions:a,error:c,isLoading:m}=(e=>{let t=`${r.fhirBaseUrl}/Condition?patient=${e}&_summary=data&clinical-status=active`,{data:a,isLoading:i,mutate:s,error:l}=(0,r.useFhirFetchAll)(t);return{conditions:(0,n.useMemo)(()=>a?.reduce((e,t)=>{if(t?.resourceType==="Condition"){let a={id:t.id,display:t?.code?.text??t?.code?.coding?.[0]?.display,patient:t?.subject?.display,recordedDate:t?.recordedDate,recorder:t?.recorder?.display,status:t?.clinicalStatus?.coding[0]?.code,onsetDateTime:t.onsetDateTime?(0,r.formatDate)((0,r.parseDate)(t.onsetDateTime)):null};e.push(a)}return e},[]),[a]),isLoading:i,error:l,mutate:s}})(e),[u,_]=(0,n.useState)(3),{results:p,currentPage:T,goTo:y}=(0,r.usePagination)(a,u),h=(0,n.useMemo)(()=>[{header:t("conditions","Condition"),key:"display"},{header:t("onsetDate","Onset date"),key:"onsetDateTime"}],[t]),g=e=>{switch(e){case"display":return"-esm-dispensing__conditions__conditionColumn___jLv54";case"onsetDateTime":return"-esm-dispensing__conditions__onsetDateColumn___jrOjG";default:return""}},E=t("activeConditions","Active conditions"),b=(0,n.useMemo)(()=>p.map(e=>({...e,onsetDateTime:e.onsetDateTime||"--"})),[p]);return m?i().createElement(s.DataTableSkeleton,null):c?i().createElement(r.ErrorState,{headerTitle:E,error:c}):a?.length?i().createElement(s.Layer,{className:d},i().createElement(r.CardHeader,{title:E},i().createElement(i().Fragment,null)),i().createElement(s.DataTable,{useZebraStyles:!0,rows:b,headers:h},({rows:e,headers:t,getTableProps:a,getHeaderProps:n,getRowProps:l})=>i().createElement(s.Table,{...a(),className:"-esm-dispensing__conditions__table___je3Eh"},i().createElement(s.TableHead,null,i().createElement(s.TableRow,null,t.map(e=>i().createElement(s.TableHeader,{...n({header:e}),key:e.key,className:g(e.key)},e.header)))),i().createElement(s.TableBody,null,e.map(e=>i().createElement(s.TableRow,{...l({row:e}),key:e.id},e.cells.map(e=>i().createElement(s.TableCell,{key:e.id,className:g(e.info.header)},e.value))))))),i().createElement(s.Pagination,{page:T,pageSize:u,pageSizes:o,totalItems:a.length,onChange:({page:e,pageSize:t})=>{y(e),_(t)}})):i().createElement(s.Layer,{className:d},i().createElement(r.EmptyCard,{headerTitle:E,displayText:t("activeConditionsEmpty","active conditions")}))}}}]);
|
package/dist/5212.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["5212"],{4767(e,t,n){var i={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["9900","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["6468","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","3378"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["6716","5940"],"./hi.json":["6840","2881"]};function s(e){if(!n.o(i,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=i[e],s=t[0];return n.e(t[1]).then(function(){return n(s)})}s.keys=()=>Object.keys(i),s.id=4767,e.exports=s},6339(e,t,n){"use strict";n.d(t,{A:()=>m});var i=n(2287),s=n.n(i),a=n(6942),r=n.n(a),o=n(1399),l=n(6940),c=n(4685),d=n(7351);let u="-esm-dispensing__medication-event__bodyLong01___+dWdf",p="-esm-dispensing__medication-event__label01___GOwXJ",m=({medicationEvent:e,status:t=null,children:n,isDispenseEvent:i})=>{let{t:a}=(0,o.useTranslation)(),m=(0,d.Gp)(e.dosageInstruction),_=(0,d.XM)(m),f=(0,d.Qe)(e),h=(0,d.c1)(e),g=!(0,c.isDesktop)((0,c.useLayoutType)());return s().createElement(l.Tile,{className:r()({"-esm-dispensing__medication-event__medicationEventTile___aCxUk":!0,"-esm-dispensing__medication-event__dispenseEvent___pfeL9":i,"-esm-dispensing__medication-event__isTablet___tYol6":g})},s().createElement("div",null,s().createElement("p",{className:"-esm-dispensing__medication-event__medicationName___Dy9oL"},t,t&&" ",s().createElement("strong",null,(0,d.Q0)((0,d.H_)(e)))),!_&&s().createElement("p",{className:u},s().createElement("span",{className:p},a("dose","Dose").toUpperCase())," ",s().createElement("span",{className:"-esm-dispensing__medication-event__dosage___94wUZ"},m?.doseAndRate&&m.doseAndRate.map((e,t)=>s().createElement("span",{key:t},e?.doseQuantity?.value," ",e?.doseQuantity?.unit))),m?.route?.text&&s().createElement(s().Fragment,null," — ",m.route.text),m?.timing?.code?.text&&s().createElement(s().Fragment,null," — ",m.timing.code.text),m?.timing?.repeat?.duration&&s().createElement(s().Fragment,null," ","for ",m.timing.repeat.duration," ",m.timing.repeat.durationUnit)),f&&s().createElement("p",{className:u},s().createElement("span",{className:p},a("quantity","Quantity").toUpperCase())," ",s().createElement("span",{className:"-esm-dispensing__medication-event__quantity___xyD-l"},f.value," ",f.unit)),(h||0===h)&&s().createElement("p",{className:u},s().createElement("span",{className:p},a("refills","Refills").toUpperCase())," ",s().createElement("span",{className:"-esm-dispensing__medication-event__refills___sJbuJ"},h)),m?.text&&s().createElement("p",{className:u},m.text),m?.additionalInstruction?.length>0&&s().createElement("p",{className:u},m?.additionalInstruction[0].text)),n)}},7003(e,t,n){"use strict";n.d(t,{Bi:()=>o,T:()=>m,Ub:()=>f,Wz:()=>a,Yj:()=>r,Zw:()=>c,_8:()=>d,c1:()=>_,ih:()=>u,p1:()=>i,py:()=>l,w9:()=>p}),window.getOpenmrsSpaBase;let i=`${window.spaBase}/dispensing`,s="http://fhir.openmrs.org/ext",a=s+"/medicine",r=s+"/medicationrequest/fulfillerstatus",o="Task: dispensing.create.dispense",l="Task: dispensing.create.dispense.allowSubstitutions",c="Task: dispensing.edit.dispense",d="Task: dispensing.delete.dispense",u="Task: dispensing.delete.dispense.ifCreator",p="application/merge-patch+json",m="Encounter?_query=encountersWithMedicationRequests",_="MedicationRequest",f="medication-dispense-action-slot"},5831(e,t,n){"use strict";n.r(t),n.d(t,{dispenseWorkspace:()=>el,closeDispenseWorkspace:()=>eo,pauseActionButton:()=>er,printPrescriptionPreviewModal:()=>ed,dispensingDashboard:()=>en,dispensingDashboardLink:()=>ei,startupApp:()=>K,dispensingLink:()=>et,duplicateDispenseModal:()=>ep,deleteConfirmModal:()=>eu,importTranslation:()=>J,pauseDispenseWorkspace:()=>ec,dispenseActionButton:()=>ea,patientDiagnoses:()=>em,dispensing:()=>ee,onPrescriptionFilledModal:()=>ef,closeActionButton:()=>es,patientConditions:()=>e_});var i=n(4685);let s={drugOrderTypeUUID:{_type:i.Type.UUID,_description:"UUID for the 'Drug' order type, used to filter the order basket to show only drug order panels. Must match the orderTypeUuid config in @openmrs/esm-patient-medications-app.",_default:"131168f4-15f5-102d-96e4-000c29c2a5d7"},appName:{_type:i.Type.String,_default:"Pharmacy"},enableDuplicateDispenseCheck:{_type:i.Type.Boolean,_description:"Enable/Disable the duplicate dispense check feature",_default:!0},duplicateCheckWindowDays:{_type:i.Type.Number,_description:"Number of days to look back when checking for duplicate dispenses",_default:7},actionButtons:{pauseButton:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Pause button in the button action bar",_default:!0}},closeButton:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Close button in the button action bar",_default:!0}},printPrescriptionsButton:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Print Prescriptions button in the prescriptions action bar",_default:!0}}},dispenseBehavior:{allowModifyingPrescription:{_type:i.Type.Boolean,_description:"Enable/Disable editing the prescription. If Disabled, Quantity will be he only editable field on prescription form. Note that this means that quantity units will need to be mandatory and set correctly on the prescription.",_default:!0},restrictTotalQuantityDispensed:{_type:i.Type.Boolean,_description:"Enable/Disable restricting dispensing quantity greater than total quantity ordered. Marks prescription as complete when total quantity dispensed. If true, allowModifyingPrescription *must* be false, as this functionality relies solely on numeric quantity and assumes no change in formulation, dosage, unit, etc",_default:!1}},dispenserProviderRoles:{_type:i.Type.Array,_description:'Array of provider roles uuids. If specified, only providers with these roles will be listed in the "Dispensed By" dropdown. Note that this simply restricts the providers that can be recorded as Dispensers, it does not limit who can create dispense events.',_default:[]},medicationRequestExpirationPeriodInDays:{_type:i.Type.Number,_description:"Medication Requests older that this will be considered expired",_default:90},locationBehavior:{locationColumn:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Location column in the main prescriptions table showing ordering location",_default:!1}},locationFilter:{enabled:{_type:i.Type.Boolean,_description:"Enable/Disable Location filter on main prescriptions page",_default:!1},tag:{_type:i.Type.String,_description:"Only locations with this tag will appear as options in the location dropdown filter",_default:"Login Location"},associatedPharmacyLocationAttribute:{_type:i.Type.String,_description:"Name of the location attribute whose value identifies the associated pharmacy location. The location whose attribute value matches the user's login location will be pre-selected in the filter dropdown. This attribute has no effect on which locations appear as options.",_default:"Associated Pharmacy Location"}},restrictToVisitLocationDescendants:{_type:i.Type.Boolean,_description:"If true, limits prescriptions shown to locations that are descendants of the current login location's nearest ancestor tagged as a visit location. Requires the EMR API module to be installed.",_default:!1}},refreshInterval:{_type:i.Type.Number,_description:"The interval, in milliseconds, to query the backend for new/changed data",_default:6e4},valueSets:{reasonForPause:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Pause' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/168099/",_default:"2462a9d7-61fb-4bf5-9359-aedecb8d03cb"}},reasonForClose:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Close' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/168099/",_default:"2462a9d7-61fb-4bf5-9359-aedecb8d03cb"}},substitutionReason:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Substitution' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167862/",_default:"2de6e1be-f2dd-4ba0-9516-8a611aa2af9b"}},substitutionType:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Type of Substitution' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167859/",_default:"b9c5bca0-d026-4245-a4d2-e4c0a8999082"}}},enableStockDispense:{_type:i.Type.Boolean,_description:"Enable or disable stock deduction during the dispensing process. Requires the stock management module to be installed and configured.",_default:!1},validateBatch:{_type:i.Type.Boolean,_description:"Enable or disable stock item batch number validation. Requires the stock management module to be installed and configured.",_default:!0},leftNavMode:{_type:i.Type.String,_description:"Sets the left nav mode for the dispensing app.",_validators:[i.validators.oneOf(["normal","collapsed","hidden"])],_default:"collapsed"},completeOrderWithThisDispense:{_type:i.Type.Boolean,_description:'Enable or disable the "Complete order with this dispense" checkbox on the dispense form.',_default:!1},customTabs:{_type:i.Type.Array,_description:"Custom tabs to be added to the prescription panel. See README for more details.",_default:[]}};var a=n(2287),r=n.n(a),o=n(6940),l=n(1399),c=n(9513),d=n(6942),u=n.n(d);let p={dispensing:"-esm-dispensing__dispensing__dispensing___9APDl",hasLeftNav:"-esm-dispensing__dispensing__hasLeftNav___oNrBA"};var m=n(7136),_=n(3335);let f="-esm-dispensing__pharmacy-header__value___IfLyg",h=()=>{let{t:e}=(0,l.useTranslation)(),t=(0,i.useSession)(),n=(0,i.useConfig)(),s=t?.sessionLocation?.display;return r().createElement(i.PageHeader,{className:"-esm-dispensing__pharmacy-header__header___1ZXtT"},r().createElement(i.PageHeaderContent,{illustration:r().createElement(i.PharmacyPictogram,null),title:e("appName",n.appName)}),r().createElement("div",{className:"-esm-dispensing__pharmacy-header__rightJustifiedItems___YqnNm"},r().createElement("div",{className:"-esm-dispensing__pharmacy-header__dateAndLocation___4Rnjf"},r().createElement(m.aZ,{size:16}),r().createElement("span",{className:f},s),r().createElement("span",{className:"-esm-dispensing__pharmacy-header__middot___0XUIQ"},"\xb7"),r().createElement(_.Vv,{size:16}),r().createElement("span",{className:f},(0,i.formatDate)(new Date,{noToday:!0})))))};var g=n(2059),y=n.n(g);class E extends Error{constructor(e){super(e),this.name="MissingOptionalBackendDependencyError"}}function b(e){return t=>({id:t.uuid,name:t.name,associatedPharmacyLocation:t.attributes?.find(t=>t.attributeType.name===e)?.value?.uuid??null})}var v=n(1297);let T=({patient:{name:e,uuid:t}})=>{let n,{error:s,isLoading:a,age:o}=(e=>{let t=`${i.restBaseUrl}/person/${e}?v=custom:(age)`,{data:n,error:s,isLoading:a,mutate:r}=y()(t,i.openmrsFetch);return{age:n?.data?.age,error:s,isLoading:a,mutate:r}})(t),{t:c}=(0,l.useTranslation)(),d=c("age","Age");if(a||s)return r().createElement(r().Fragment,null,e);let u=-1!==(n=e.lastIndexOf(")"))?e.slice(0,n)+`, ${d}: ${o}`+e.slice(n):`${e} ${d}: ${o}`;return r().createElement(r().Fragment,null,u)};var C=n(8035),N=n(7003),D=n(7351),S=n(6339);let k="-esm-dispensing__history-and-comments__menuitem___TLhEk",P="-esm-dispensing__history-and-comments__historyHeader___+Wyzw",w=({medicationDispense:e,medicationRequestBundle:t,patientUuid:n,encounterUuid:s})=>{let{t:a}=(0,l.useTranslation)(),{mutate:d}=(0,g.useSWRConfig)(),u=(0,i.useSession)(),p=(0,i.useConfig)(),m=u?.user&&(0,i.userHasAccess)(N.Zw,u.user),_=((e,t)=>{if(e?.user){if((0,i.userHasAccess)(N._8,e.user))return!0;else if((0,i.userHasAccess)(N.ih,e.user)&&e.currentProvider?.uuid&&t.performer?.find(t=>t?.actor?.reference?.length>1&&t.actor.reference.split("/")[1]===e.currentProvider.uuid)!==void 0)return!0}return!1})(u,e);return m||_?r().createElement(o.OverflowMenu,{"aria-label":a("medicationDispenseActionMenu","Medication Dispense Action Menu"),className:"-esm-dispensing__history-and-comments__medicationEventActionMenu___HLh3V",flipped:!0},m&&r().createElement(o.OverflowMenuItem,{className:k,itemText:a("editRecord","Edit record"),onClick:()=>{var r;let{workspaceName:o,props:l}=((e,t)=>{if(e.status===C.NV.completed){let i=null,a=null;return p.dispenseBehavior.restrictTotalQuantityDispensed&&(i=(0,D.HP)(t)+(e?.quantity?e.quantity.value:0),t.dispenses&&(a=(0,D.ky)(t.dispenses))),{workspaceName:"dispense-workspace",props:{patientUuid:n,encounterUuid:s,medicationDispense:e,medicationRequestBundle:t,quantityRemaining:i,quantityDispensed:a,mode:"edit"}}}return e.status===C.NV.on_hold?{workspaceName:"pause-dispense-workspace",props:{patientUuid:n,encounterUuid:s,medicationDispense:e,mode:"edit"}}:e.status===C.NV.declined?{workspaceName:"close-dispense-workspace",props:{patientUuid:n,encounterUuid:s,medicationDispense:e,mode:"edit"}}:void 0})(e,t),c=(r=e).status===C.NV.completed?a("editDispenseRecord","Edit Dispense Record"):r.status===C.NV.on_hold?a("editPauseRecord","Edit Pause Record"):r.status===C.NV.declined?a("editCloseRecord","Edit Close Record"):void 0;(0,i.launchWorkspace2)(o,{customWorkspaceTitle:c,...l})}}),_&&r().createElement(o.OverflowMenuItem,{className:k,hasDivider:!0,isDelete:!0,itemText:a("delete","Delete"),onClick:()=>(({medicationDispense:e,medicationRequestBundle:t})=>{let n=(0,i.showModal)("delete-confirm-modal",{title:a("deleteDispenseRecord","Delete Dispense Record"),message:a("deleteDispenseRecordMessage","Are you sure you want to delete this dispense record?"),onDelete:()=>{let r,o;r=(0,D.Qm)(t.request),o=(0,D.aC)(e,t,p.dispenseBehavior.restrictTotalQuantityDispensed),(0,D.gY)(s),(0,c._D)(e.id).then(()=>{(0,i.showSnackbar)({kind:"success",title:a("success","Success"),subtitle:a("medicationDispenseDeleted","Medication dispense was deleted successfully")}),r!==o&&(0,v.NT)((0,D.vj)(e.authorizingPrescription[0].reference),o).then(()=>{(0,D.Yi)(d,s)}).catch(()=>{(0,i.showSnackbar)({kind:"error",title:a("updateStatusFailed","Update Status Failed"),subtitle:a("couldNotUpdateMedicationRequestStatus","Could not update medication request status")})}),(0,D.Yi)(d,s)}).catch(()=>{(0,i.showSnackbar)({kind:"error",title:a("deleteFailed","Delete Failed"),subtitle:a("couldNotDeleteMedicationDispense","Could not delete medication dispense")})}),n()},onClose:()=>{n()}})})({medicationDispense:e,medicationRequestBundle:t})})):null},L=({medicationDispense:e})=>{let{t}=(0,l.useTranslation)();return e.status===C.NV.completed?r().createElement(o.Tag,{type:"gray"},t("dispensed","Dispensed")):e.status===C.NV.on_hold?r().createElement(o.Tag,{type:"red"},t("paused","Paused")):e.status===C.NV.declined?r().createElement(o.Tag,{type:"red"},t("closed","Closed")):null},B=({encounterUuid:e,patientUuid:t})=>{let{t:n}=(0,l.useTranslation)(),s=(0,i.useConfig)(),{medicationRequestBundles:c,prescriptionDate:d,error:u,isLoading:p}=(0,v.IQ)(e,s.refreshInterval),{sortedDispenses:m,requests:_,hasHistory:f}=(0,a.useMemo)(()=>{let e=c?.flatMap(e=>e.dispenses)??[],t=c?.flatMap(e=>e.request)??[];return{sortedDispenses:[...e].sort(D.Fq),requests:t,hasHistory:e.length>0||t.length>0}},[c]);return r().createElement("div",{className:"-esm-dispensing__history-and-comments__historyAndCommentsContainer___at3xs"},p&&r().createElement(o.Tile,null,r().createElement(o.SkeletonText,{paragraph:!0,lineCount:2})),u&&r().createElement("p",{className:"-esm-dispensing__history-and-comments__error___d6E4w"},n("errorLoadingHistory","Error loading history"),": ",u.message),!p&&!u&&!f&&r().createElement("p",{className:"-esm-dispensing__history-and-comments__emptyState___c53py"},n("noHistoryFound","No history found")),!p&&!u&&f&&r().createElement(r().Fragment,null,m.map(s=>{var a;return r().createElement("div",{key:s.id},r().createElement("h5",{className:P},s.performer&&s.performer[0]?.actor?.display," ",(a=s).status===C.NV.completed?n("dispensedMedication","dispensed medication"):a.status===C.NV.on_hold?n("pausedDispense","paused dispense"):a.status===C.NV.declined?n("closedDispense","closed dispense"):null," —"," ",(0,i.formatDatetime)((0,i.parseDate)(s.whenHandedOver))),r().createElement(S.A,{medicationEvent:s,status:r().createElement(L,{medicationDispense:s}),isDispenseEvent:!0},r().createElement("div",{className:"-esm-dispensing__history-and-comments__dispenseEventActions___mIrli"},r().createElement(i.ExtensionSlot,{name:N.Ub,state:{medicationDispense:s,patientUuid:t,encounterUuid:e}}),r().createElement(w,{medicationDispense:s,medicationRequestBundle:(0,D.p8)(c,s),patientUuid:t,encounterUuid:e}))))}),_.map(e=>r().createElement("div",{key:e.id},r().createElement("h5",{className:P},e.requester.display," ",n("orderedMedication","ordered medication")," —"," ",(0,i.formatDatetime)(d)),r().createElement(S.A,{medicationEvent:e,status:r().createElement(o.Tag,{type:"green"},n("ordered","Ordered"))})))))};var I=n(2383);let R=({medicationRequestBundle:e,patientUuid:t,encounterUuid:n,disabled:s})=>{let a=(0,i.useConfig)(),o=(0,i.useSession)(),l=(0,c.u9)(a.dispenserProviderRoles),d=(0,D.Z_)(e.dispenses),u=(0,D.ox)(e.request,a.medicationRequestExpirationPeriodInDays),p=u===C.FA.active&&d!==C.NV.declined,m=a.actionButtons.pauseButton.enabled&&u===C.FA.active&&d!==C.NV.on_hold&&d!==C.NV.declined,_=a.actionButtons.closeButton.enabled&&u===C.FA.active&&d!==C.NV.declined,f=null;a.dispenseBehavior.restrictTotalQuantityDispensed&&(f=(0,D.HP)(e));let h=0;a.dispenseBehavior.restrictTotalQuantityDispensed&&e.dispenses&&(h=(0,D.ky)(e.dispenses));let g={dispensable:p,pauseable:m,closeable:_,quantityRemaining:f,quantityDispensed:h,patientUuid:t,encounterUuid:n,medicationRequestBundle:e,session:o,providers:l,disabled:s};return r().createElement("div",{className:"-esm-dispensing__action-buttons__actionBtns___Ci-6w"},r().createElement(i.ExtensionSlot,{className:"-esm-dispensing__action-buttons__extensionSlot___GCdJ6",name:"prescription-action-button-slot",state:g}))};var q=n(9564);let A=({encounterUuid:e,patientUuid:t})=>{let{t:n}=(0,l.useTranslation)(),s=(0,a.useCallback)(()=>{let n=(0,i.showModal)("prescription-print-preview-modal",{onClose:()=>n(),encounterUuid:e,patientUuid:t})},[e,t]);return r().createElement(o.Button,{renderIcon:q.xj,iconDescription:n("print","Print"),onClick:s,kind:"ghost"},n("printPrescriptions","Print prescriptions"))},U="-esm-dispensing__prescription-actions__actionCluster___LwZa9",M=({encounterUuid:e,patientUuid:t})=>{let n=(0,i.useConfig)();return r().createElement(o.Layer,{className:"-esm-dispensing__prescription-actions__actionsContainer___8oGYo"},r().createElement("div",{className:U},n.actionButtons.printPrescriptionsButton.enabled&&r().createElement(A,{encounterUuid:e,patientUuid:t})),r().createElement("div",{className:U}))},F="-esm-dispensing__prescription-details__error___ZNUtP",x="-esm-dispensing__prescription-details__skeletonTile___dKD-J",j=({encounterUuid:e,patientUuid:t})=>{let n,{t:s}=(0,l.useTranslation)(),a=(0,i.useConfig)(),{allergies:c,totalAllergies:d,isLoading:u,error:p}=(0,v.PA)(t,a.refreshInterval),{medicationRequestBundles:m,error:_,isLoading:f}=(0,v.IQ)(e,a.refreshInterval),{staleEncounterUuids:h}=(0,D.se)();return r().createElement("div",{className:"-esm-dispensing__prescription-details__prescriptionContainer___lDo9S"},u&&r().createElement(o.Tile,{className:x},r().createElement(o.SkeletonText,null)),!u&&r().createElement(o.Tile,{className:"-esm-dispensing__prescription-details__allergiesTile___J9wuQ"},r().createElement("div",{className:"-esm-dispensing__prescription-details__allergiesContent___cJD5c"},r().createElement("div",null,r().createElement(I.BF,{size:24,className:"-esm-dispensing__prescription-details__allergiesIcon___ldspC"}),r().createElement("p",null,p&&r().createElement("span",{className:F},s("errorLoadingAllergies","Error loading allergies"),": ",p.message),!p&&d>0&&r().createElement("span",null,r().createElement("span",{className:"-esm-dispensing__prescription-details__allergiesCount___A9wbi"},s("allergiesCount","{{ count }} allergies",{count:d}))," ",(n=s("unknownAllergy","Unknown allergy"),c.map(e=>e.code?.text?e.code.text:e.code?.coding?.length?(0,D.R9)(e.code.coding)??e.code.coding[0]?.display:n).filter(Boolean).join(", "))),!p&&"number"==typeof d&&0===d&&s("noAllergyDetailsFound","No allergy details found"))))),r().createElement("h5",{className:"-esm-dispensing__prescription-details__prescribedHeader___kvUih"},s("prescribed","Prescribed")),f&&r().createElement(o.Tile,{className:x},r().createElement(o.SkeletonText,{paragraph:!0,lineCount:2})),_&&r().createElement("p",{className:F},s("errorLoadingPrescriptionDetails","Error loading prescription details"),": ",_.message),m&&(m.length>0?m.map(n=>{let l;return r().createElement(S.A,{key:n.request.id,medicationEvent:n.request,status:(l=(0,D.Xs)(n.request,a.medicationRequestExpirationPeriodInDays))===C._z.cancelled?r().createElement(o.Tag,{type:"red"},s("cancelled","Cancelled")):l===C._z.completed?r().createElement(o.Tag,{type:"green"},s("completed","Completed")):l===C._z.expired?r().createElement(o.Tag,{type:"red"},s("expired","Expired")):l===C._z.declined?r().createElement(o.Tag,{type:"red"},s("closed","Closed")):l===C._z.on_hold?r().createElement(o.Tag,{type:"red"},s("paused","Paused")):(0,D.Z_)(n.dispenses)===C.NV.completed?r().createElement(o.Tag,{type:"gray"},s("dispensed","Dispensed")):null},r().createElement(i.UserHasAccess,{privilege:N.Bi},r().createElement(R,{patientUuid:t,encounterUuid:e,medicationRequestBundle:n,disabled:h.includes(e)})))}):r().createElement("p",{className:"-esm-dispensing__prescription-details__emptyState___2yYDA"},s("noPrescriptionsFound","No prescriptions found"))),m?.length>0&&r().createElement(M,{encounterUuid:e,patientUuid:t}))},$=({encounterUuid:e,patientUuid:t})=>{let{t:n}=(0,l.useTranslation)(),s=(0,i.getAssignedExtensions)("dispensing-condition-and-diagnoses"),a=[{name:n("prescriptionDetails","Prescription details"),component:r().createElement(j,{encounterUuid:e,patientUuid:t})},s&&s.length>0?{name:n("conditionsAndDiagnoses","Conditions and diagnoses"),component:r().createElement(i.ExtensionSlot,{name:"dispensing-condition-and-diagnoses",state:{patientUuid:t,encounterUuid:e}})}:null,{name:n("historyComments","History and comments"),component:r().createElement(B,{encounterUuid:e,patientUuid:t})}];return r().createElement("div",{className:"-esm-dispensing__prescription-expanded__expandedTabsParentContainer___Vsvf1"},r().createElement("div",{className:"-esm-dispensing__prescription-expanded__verticalTabs___iM-yu"},r().createElement(o.Tabs,null,r().createElement(o.TabList,{"aria-label":n("tabList","Tab List")},a.filter(Boolean).map((e,t)=>r().createElement(o.Tab,{key:t},e.name))),r().createElement(o.TabPanels,null,a.filter(Boolean).map((e,t)=>r().createElement(o.TabPanel,{key:t},e.component))))))},z={link:"-esm-dispensing__prescriptions__link___O-9UM",breadcrumbsSlot:"-esm-dispensing__prescriptions__breadcrumbsSlot___IuWkK",prescriptionTabsContainer:"-esm-dispensing__prescriptions__prescriptionTabsContainer___L5i4n",newListButton:"-esm-dispensing__prescriptions__newListButton___lz50j",tabsContainer:"-esm-dispensing__prescriptions__tabsContainer___j9Njd",patientListTableContainer:"-esm-dispensing__prescriptions__patientListTableContainer___1P0kM",searchContainer:"-esm-dispensing__prescriptions__searchContainer___XY-JU",addPrescriptionBtn:"-esm-dispensing__prescriptions__addPrescriptionBtn___kwZsR",patientSearch:"-esm-dispensing__prescriptions__patientSearch___EY2F3",locationFilter:"-esm-dispensing__prescriptions__locationFilter___aEgiF",search:"-esm-dispensing__prescriptions__search___9Z7xs",hiddenRow:"-esm-dispensing__prescriptions__hiddenRow___U3N1u",filterEmptyState:"-esm-dispensing__prescriptions__filterEmptyState___FafZM",filterEmptyStateTile:"-esm-dispensing__prescriptions__filterEmptyStateTile___R1a8K",filterEmptyStateContent:"-esm-dispensing__prescriptions__filterEmptyStateContent___ELI03",filterEmptyStateHelper:"-esm-dispensing__prescriptions__filterEmptyStateHelper___6iQZW",paginationContainer:"-esm-dispensing__prescriptions__paginationContainer___lw6Gt"},O=({loadData:e,debouncedSearchTerm:t,locations:n,status:s,customPrescriptionsTableEndpoint:c})=>{let{t:d}=(0,l.useTranslation)(),u=(0,i.useConfig)(),[p,m]=(0,a.useState)(1),[_,f]=(0,a.useState)(10),h=(p-1)*_,{prescriptionsTableRows:g,error:y,isLoading:E,totalOrders:b}=(0,v.JZ)(e,c,s,_,h,t,n,u.medicationRequestExpirationPeriodInDays,u.refreshInterval);(0,a.useEffect)(()=>{m(1)},[t]);let C=[{header:d("created","Created"),key:"created"},{header:d("patientName","Patient name"),key:"patient"},{header:d("prescriber","Prescriber"),key:"prescriber"},{header:d("drugs","Drugs"),key:"drugs"},{header:d("lastDispenser","Last dispenser"),key:"lastDispenser"},{header:d("status","Status"),key:"status"}];return u.locationBehavior?.locationColumn?.enabled&&(C=[...C.slice(0,3),{header:d("location","Location"),key:"location"},...C.slice(3)]),r().createElement("div",{className:z.patientListTableContainer},E&&r().createElement(o.DataTableSkeleton,{role:"progressbar"}),y&&r().createElement("div",{className:z.filterEmptyState},r().createElement(o.Layer,null,r().createElement(o.Tile,{className:z.filterEmptyStateTile},r().createElement("p",{className:z.filterEmptyStateContent},d("errorLoadingPrescriptions","Error loading prescriptions")),r().createElement("p",{className:z.filterEmptyStateHelper},y?.message)))),g&&r().createElement(r().Fragment,null,r().createElement(o.DataTable,{rows:g,headers:C,isSortable:!0},({rows:e,headers:t,getExpandHeaderProps:n,getHeaderProps:s,getRowProps:a,getTableProps:l})=>r().createElement(o.TableContainer,null,r().createElement(o.Table,{...l(),useZebraStyles:!0},r().createElement(o.TableHead,null,r().createElement(o.TableRow,null,r().createElement(o.TableExpandHeader,n()),t.map(e=>r().createElement(o.TableHeader,s({header:e}),e.header)))),r().createElement(o.TableBody,null,e.map(e=>r().createElement(r().Fragment,{key:e.id},r().createElement(o.TableExpandRow,a({row:e}),e.cells.map(e=>r().createElement(o.TableCell,{key:e.id},e.id.endsWith("created")?(0,i.formatDatetime)((0,i.parseDate)(e.value)):e.id.endsWith("patient")?r().createElement(T,{patient:e.value}):e.id.endsWith("status")?d(e.value):e.value))),e.isExpanded?r().createElement(o.TableExpandedRow,{colSpan:t.length+1},e.cells.find(e=>e.id.endsWith("patient"))?.value?.uuid&&r().createElement($,{encounterUuid:e.id,patientUuid:e.cells.find(e=>e.id.endsWith("patient")).value.uuid})):r().createElement(o.TableExpandedRow,{className:z.hiddenRow,colSpan:t.length+1}))))))),g?.length===0&&r().createElement("div",{className:z.filterEmptyState},r().createElement(o.Layer,null,r().createElement(o.Tile,{className:z.filterEmptyStateTile},r().createElement("p",{className:z.filterEmptyStateContent},d("noPrescriptionsToDisplay","No prescriptions to display")),r().createElement("p",{className:z.filterEmptyStateHelper},d("checkFilters","Check the filters above"))))),g?.length>0&&r().createElement("div",{className:z.paginationContainer},r().createElement(o.Pagination,{page:p,pageSize:_,pageSizes:[10,20,30,40,50,100],totalItems:b,onChange:({page:e,pageSize:t})=>{t!==_?m(1):m(e),f(t)}}))))},V=({locations:e})=>{let{t}=(0,l.useTranslation)(),[n,s]=(0,a.useState)(""),[c,d]=(0,a.useState)("");return r().createElement(o.TabPanel,null,r().createElement("div",{className:"-esm-dispensing__patient-search-tab-panel__searchTabPanel___pEhk7"},r().createElement("form",{className:"-esm-dispensing__patient-search-tab-panel__searchBar___+0aRo",onSubmit:e=>{e.preventDefault(),d(n)}},r().createElement(o.Search,{closeButtonLabelText:t("clearSearchInput","Clear search input"),defaultValue:n,placeholder:t("searchForPatient","Search for a patient by name or identifier number"),labelText:t("searchForPatient","Search for a patient by name or identifier number"),onChange:e=>{s(e.target.value)},onClear:()=>d(""),size:"lg"}),r().createElement(o.Button,{kind:"secondary",type:"submit"},t("search","Search"))),c?r().createElement(O,{loadData:!0,status:"ACTIVE",debouncedSearchTerm:c,locations:e}):r().createElement("div",{className:"-esm-dispensing__patient-search-tab-panel__searchForPatientPlaceholder___tb0Q3"},r().createElement("div",null,r().createElement(i.PatientSearchPictogram,null),r().createElement("h5",null,t("searchForPatientHeader","Search for a patient")),r().createElement("div",null,t("searchForPatient","Search for a patient by name or identifier number"))))))},H=({status:e,isTabActive:t,customPrescriptionsTableEndpoint:n,locations:s,isLocationsLoading:c})=>{let{t:d}=(0,l.useTranslation)(),u=(0,i.useConfig)(),p=(0,a.useRef)(!1),{sessionLocation:m}=(0,i.useSession)(),[_,f]=(0,a.useState)(""),h=(0,i.useDebounce)(_,500),[g,y]=(0,a.useState)([]);return(0,a.useEffect)(()=>{!p.current&&!c&&m?.uuid&&(y(s?.filter(e=>m?.uuid===e.associatedPharmacyLocation)||[]),p.current=!0)},[c,m,s]),r().createElement(o.TabPanel,null,r().createElement("div",{className:z.searchContainer},u.locationBehavior?.locationFilter?.enabled&&!c&&p.current&&s?.length>1&&r().createElement(o.MultiSelect,{hideLabel:!0,id:"locationFilter",label:d("filterByLocations","Filter by locations"),initialSelectedItems:g,items:s,itemToString:e=>e?.name,onChange:({selectedItems:e})=>{y(e)},className:z.locationFilter}),r().createElement(o.Search,{closeButtonLabelText:d("clearSearchInput","Clear search input"),defaultValue:_,placeholder:d("searchByPatientIdOrName","Search by patient ID or name"),labelText:d("searchByPatientIdOrName","Search by patient ID or name"),onChange:e=>{e.preventDefault(),f(e.target.value)},size:"md",className:z.patientSearch})),r().createElement(O,{loadData:t,status:e,customPrescriptionsTableEndpoint:n,debouncedSearchTerm:h,locations:u.locationBehavior.restrictToVisitLocationDescendants&&0===g.length?s:g}))},W=()=>{let{t:e}=(0,l.useTranslation)(),t=(0,i.useConfig)(),n=(0,i.useSession)(),{locations:s,isLoading:c,error:d}=function(e){let{restrictToVisitLocationDescendants:t}=e.locationBehavior,n=function(e,t){let{tag:n,associatedPharmacyLocationAttribute:s}=e.locationBehavior.locationFilter,r=t?`${i.restBaseUrl}/location?tag=${encodeURIComponent(n)}&v=custom:(uuid,name,attributes:(attributeType:(name),value:(uuid)))`:null,{data:o,...l}=y()(r,i.openmrsFetch);return{locations:(0,a.useMemo)(()=>(o?.data?.results??[]).map(b(s)).sort((e,t)=>e.name.localeCompare(t.name)),[o,s]),...l}}(e,!t),s=function(e,t){let{sessionLocation:n}=(0,i.useSession)(),{tag:s,associatedPharmacyLocationAttribute:r}=e.locationBehavior.locationFilter,o=(0,i.useFeatureFlag)("emrapi-module"),l=(0,a.useMemo)(()=>t&&!o?new E("The restrictToVisitLocationDescendants option is enabled in the configuration, but the EMR API module is not installed."):null,[t,o]),c=t&&!l&&n?.uuid?`${i.restBaseUrl}/emrapi/locationThatSupportsVisits?location=${n.uuid}&v=custom:(uuid,name,descendantLocations:(uuid,name,tags,attributes:(attributeType:(name),value:(uuid))))`:null,{data:d,...u}=y()(c,i.openmrsFetch);return{locations:(0,a.useMemo)(()=>(d?.data?.descendantLocations??[]).filter(e=>e.tags?.some(e=>e.display===s)).map(b(r)).sort((e,t)=>e.name.localeCompare(t.name)),[d,s,r]),...u,error:l??u.error}}(e,t);return t?s:n}(t);(0,a.useEffect)(()=>{d instanceof E&&(0,i.showSnackbar)({kind:"error",title:e("configurationError","Configuration error"),subtitle:e("locationFilterMisconfigured","The location filter is misconfigured. Check that the required backend module is installed.")})},[d,e]);let[u,p]=(0,a.useState)(0),m=(0,a.useMemo)(()=>t?.customTabs?.filter(e=>!e.associatedLocations||e.associatedLocations.includes(n.sessionLocation?.uuid))||[],[n,t]);return r().createElement("main",{className:"omrs-main-content"},r().createElement("section",{className:z.prescriptionTabsContainer},r().createElement(o.Tabs,{onChange:e=>{p(e.selectedIndex)}},r().createElement(o.TabList,{"aria-label":e("tabList","Tab List"),contained:!0,className:z.tabsContainer},r().createElement(o.Tab,{title:e("search","Search"),id:"tab-search",className:z.tab},e("search","Search")),r().createElement(o.Tab,{title:e("activePrescriptions","Active Prescriptions"),id:"tab-active-prescription",className:z.tab},e("activePrescriptions","Active Prescriptions")),r().createElement(o.Tab,{title:e("allPrescriptions","All Prescriptions"),id:"tab-all-prescription",className:z.tab},e("allPrescriptions","All Prescriptions")),m.map((t,n)=>r().createElement(o.Tab,{title:e(t.title),id:"custom_tab_"+n,className:z.tab},e(t.title)))),r().createElement(o.TabPanels,null,r().createElement(V,{locations:s}),r().createElement(H,{isTabActive:1===u,status:"ACTIVE",locations:s,isLocationsLoading:c}),r().createElement(H,{isTabActive:2===u,status:"",locations:s,isLocationsLoading:c}),m.map((e,t)=>r().createElement(H,{isTabActive:u===t+3,customPrescriptionsTableEndpoint:e.customPrescriptionsTableEndpoint,locations:s,isLocationsLoading:c}))))))},Q=()=>{let e="tablet"===(0,i.useLayoutType)(),{t}=(0,l.useTranslation)(),{drugOrderTypeUUID:n}=(0,i.useConfig)();return r().createElement("div",{className:"-esm-dispensing__fill-prescription-button__buttonContainer___uZrDT"},r().createElement(o.Button,{kind:"primary",renderIcon:e=>r().createElement(i.AddIcon,{size:16,...e}),size:e?"lg":"md",onClick:()=>{(0,i.launchWorkspace2)("dispensing-patient-search-workspace",{workspaceTitle:t("fillPrescriptionForPatient","Fill prescription for patient"),onPatientSelected(e,s,a,r){var o;(o=e,(0,i.openmrsFetch)(`${i.restBaseUrl}/visit?patient=${o}&v=${(void 0)??"default"}&includeInactive=false`,{signal:void 0,method:"GET",headers:{"Content-type":"application/json"}})).then(async a=>{let o=a.data.results?.[0];o?(await r(),(0,i.launchWorkspace2)("dispensing-order-basket-workspace",{},{patientUuid:e,patient:s,visitContext:o,drugOrderWorkspaceName:"dispensing-order-basket-add-drug-order-workspace",allergyFormWorkspaceName:"dispensing-order-basket-add-allergy-workspace",visibleOrderPanels:[n],onOrderBasketSubmitted:(e,t)=>{(0,i.showModal)("on-prescription-filled-modal",{patient:s,encounterUuid:e})}})):(0,i.showSnackbar)({title:t("visitRequired","Visit required"),subtitle:t("visitRequiredForPatientToFillPrescription","Visit required for patient to fill prescription"),kind:"error"})})}},{startVisitWorkspaceName:"dispensing-start-visit-workspace"})}},t("fillPrescription","Fill prescription")))};var Z=n(8651);function Y(){let{t:e}=(0,l.useTranslation)(),t=`${window.spaBase}/home`,n=(0,a.useMemo)(()=>{let e=location.pathname.split("/home");return decodeURIComponent(e[e.length-1])},[]);return r().createElement(i.ConfigurableLink,{className:u()("cds--side-nav__link",{"active-left-nav-link":n.match("dispensing")}),to:`${t}/dispensing`},e("dispensing","Dispensing"))}let J=n(4767),G="@openmrs/esm-dispensing-app",X={featureName:"dispensing",moduleName:G};function K(){(0,i.defineConfigSchema)(G,s)}let ee=(0,i.getSyncLifecycle)(function(){let{leftNavMode:e}=(0,i.useConfig)(),t=(0,i.useLayoutType)(),n=window.spaBase+"/dispensing";return(0,i.useLeftNav)({name:"homepage-dashboard-slot",basePath:n,mode:e}),r().createElement("div",{className:u()([(0,i.isDesktop)(t)?p.desktopContainer:"","normal"===e?p.hasLeftNav:""])},r().createElement(i.ExtensionSlot,{name:"dispensing-dashboard-slot"}))},X),et=(0,i.getSyncLifecycle)(function(){let{t:e}=(0,l.useTranslation)();return r().createElement(i.ConfigurableLink,{to:N.p1},e("dispensing","Dispensing"))},X),en=(0,i.getSyncLifecycle)(function(){let e=(0,i.useConfig)(),{t}=(0,l.useTranslation)();return e.dispenseBehavior.restrictTotalQuantityDispensed&&e.dispenseBehavior.allowModifyingPrescription?r().createElement("div",{className:"omrs-main-content"},r().createElement(o.InlineNotification,{title:t("dispensingAppError","Dispensing App Error"),subtitle:t("dispensingAppMisconfigurationMessage","Please contact your system administration: Misconfiguration - 'restrictTotalQuantityDispensed' cannot be enabled if 'allowModifyingPrescription' is enabled.")})):r().createElement("div",{className:"omrs-main-content"},r().createElement(h,null),r().createElement(Q,null),r().createElement(W,null))},X),ei=(0,i.getSyncLifecycle)(()=>r().createElement(Z.Kd,null,r().createElement(Y,null)),X),es=(0,i.getSyncLifecycle)(({patientUuid:e,encounterUuid:t,medicationRequestBundle:n,session:s,providers:a,closeable:d,disabled:u})=>{let{t:p}=(0,l.useTranslation)(),m={patientUuid:e,encounterUuid:t,medicationDispense:(0,c.ux)(n.request,s,a,!1),mode:"enter"};return d?r().createElement(o.Button,{kind:"danger",onClick:()=>{(0,i.launchWorkspace2)("close-dispense-workspace",m)},disabled:u},p("close","Close")):null},X),ea=(0,i.getSyncLifecycle)(({patientUuid:e,encounterUuid:t,medicationRequestBundle:n,session:s,providers:a,dispensable:d,quantityRemaining:u,quantityDispensed:p,disabled:m})=>{let{t:_}=(0,l.useTranslation)(),f={patientUuid:e,encounterUuid:t,medicationDispense:(0,c.ux)(n.request,s,a,!0),medicationRequestBundle:n,quantityRemaining:u,quantityDispensed:p,mode:"enter"};return d?r().createElement(o.Button,{kind:"primary",onClick:()=>{(0,i.launchWorkspace2)("dispense-workspace",f)},disabled:m},_("dispense","Dispense")):null},X),er=(0,i.getSyncLifecycle)(({patientUuid:e,encounterUuid:t,medicationRequestBundle:n,session:s,providers:a,pauseable:d,disabled:u})=>{let{t:p}=(0,l.useTranslation)(),m={patientUuid:e,encounterUuid:t,medicationDispense:(0,c.ux)(n.request,s,a,!1),mode:"enter"};return d?r().createElement(o.Button,{kind:"secondary",onClick:()=>{(0,i.launchWorkspace2)("pause-dispense-workspace",m)},disabled:u},p("pause","Pause")):null},X),eo=(0,i.getAsyncLifecycle)(()=>n.e("3877").then(n.bind(n,8740)),X),el=(0,i.getAsyncLifecycle)(()=>Promise.all([n.e("4480"),n.e("4302")]).then(n.bind(n,3053)),X),ec=(0,i.getAsyncLifecycle)(()=>n.e("9331").then(n.bind(n,3214)),X),ed=(0,i.getAsyncLifecycle)(()=>Promise.all([n.e("353"),n.e("7656"),n.e("6983")]).then(n.bind(n,10)),X),eu=(0,i.getAsyncLifecycle)(()=>n.e("4437").then(n.bind(n,7060)),X),ep=(0,i.getAsyncLifecycle)(()=>n.e("3438").then(n.bind(n,2829)),X),em=(0,i.getAsyncLifecycle)(()=>n.e("8453").then(n.bind(n,4452)),X),e_=(0,i.getAsyncLifecycle)(()=>n.e("4318").then(n.bind(n,5645)),X),ef=(0,i.getAsyncLifecycle)(()=>n.e("9866").then(n.bind(n,6913)),X)},9513(e,t,n){"use strict";n.d(t,{A7:()=>l,CG:()=>y,E:()=>d,M5:()=>p,Sj:()=>f,_D:()=>c,cE:()=>m,ij:()=>_,u9:()=>u,ux:()=>g});var i=n(9910),s=n.n(i),a=n(2059),r=n.n(a),o=n(4685);function l(e,t,n){let i=e.id?`${o.fhirBaseUrl}/MedicationDispense/${e.id}`:`${o.fhirBaseUrl}/MedicationDispense`,s=e.id?"PUT":"POST";return e.status=t,e.whenPrepared=e.whenHandedOver,(0,o.openmrsFetch)(i,{method:s,signal:n?.signal,headers:{"Content-Type":"application/json"},body:e})}function c(e){return(0,o.openmrsFetch)(`${o.fhirBaseUrl}/MedicationDispense/${e}`,{method:"DELETE"})}function d(){let{data:e,error:t,isValidating:n}=r()(`${o.restBaseUrl}/orderentryconfig`,o.openmrsFetch);return{orderConfigObject:e?e.data:null,error:t,isLoading:!e&&!t,isValidating:n}}function u(e){let t="custom:(uuid,person:(display)",{data:n}=r()(e&&e.length>0?`${o.restBaseUrl}/provider?providerRoles=${e.join(",")}&v=${t})`:`${o.restBaseUrl}/provider?v=${t})`,o.openmrsFetch);return n?.data?.results.sort((e,t)=>e.person?.display.localeCompare(t.person?.display))}function p(e){return{reasonForPauseValueSet:h(e)}}function m(e){return{reasonForCloseValueSet:h(e)}}function _(e){return{substitutionTypeValueSet:h(e)}}function f(e){return{substitutionReasonValueSet:h(e)}}function h(e){let{data:t}=r()(`${o.fhirBaseUrl}/ValueSet/${e}`,o.openmrsFetch);return t?t.data:null}function g(e,t,n,i){let a={resourceType:"MedicationDispense",status:null,authorizingPrescription:[{reference:"MedicationRequest/"+e.id,type:"MedicationRequest"}],medicationReference:e.medicationReference,medicationCodeableConcept:e.medicationCodeableConcept,subject:e.subject,performer:[{actor:{reference:t?.currentProvider?`Practitioner/${t.currentProvider.uuid}`:""}}],location:{reference:t?.sessionLocation?`Location/${t.sessionLocation.uuid}`:""},whenHandedOver:s()().format()};return i&&(a={...a,quantity:{value:e.dispenseRequest?.quantity?.value,code:e.dispenseRequest?.quantity?.code,unit:e.dispenseRequest?.quantity?.unit,system:e.dispenseRequest?.quantity?.system},dosageInstruction:[{text:[e.dosageInstruction[0].text,e.dosageInstruction[0].additionalInstruction?.length>0?e.dosageInstruction[0].additionalInstruction[0].text:null].filter(e=>null!=e).join(" "),timing:e.dosageInstruction[0].timing,asNeededBoolean:!1,route:e.dosageInstruction[0].route,doseAndRate:e.dosageInstruction[0].doseAndRate?e.dosageInstruction[0].doseAndRate:[{doseQuantity:{value:null,code:null,unit:null}}]}],substitution:y}),a}let y={wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}},1297(e,t,n){"use strict";n.d(t,{IQ:()=>p,JZ:()=>u,NT:()=>f,PA:()=>m,uc:()=>_});var i=n(2287),s=n(9910),a=n.n(s),r=n(2059),o=n.n(r),l=n(4685),c=n(7003),d=n(7351);function u(e,t="",n="",i=10,s=0,r="",c=[],p,m){let _,{data:f,error:h}=o()(e?(0,d.gh)(t,n,s,i,a()(new Date).startOf("day").subtract(p,"day").toISOString(),r,c?.map(e=>e.id).join(",")):null,l.openmrsFetch,{refreshInterval:m});if(f){let e=f?.data.entry;if(e){let t=e.filter(e=>e?.resource?.resourceType=="Encounter").map(e=>e.resource),n=e.filter(e=>e?.resource?.resourceType=="MedicationRequest").map(e=>e.resource),i=e.filter(e=>e?.resource?.resourceType=="MedicationDispense").map(e=>e.resource).sort(d.Fq);(_=t.map(e=>{var t,s,a,r;let o=n.filter(t=>t.encounter.reference=="Encounter/"+e.id),l=o.map(e=>"MedicationRequest/"+e.id);return t=e,s=o,a=i.filter(e=>l.includes(e.authorizingPrescription[0]?.reference)),r=p,{id:t?.id,created:t?.period?.start,patient:{name:t?.subject?.display,uuid:t?.subject?.reference?.split("/")[1]},drugs:[...new Set(s.map(e=>(0,d.Q0)((0,d.H_)(e))).sort((e,t)=>e.localeCompare(t)))].join("; "),lastDispenser:a&&a[0]?.performer&&a[0]?.performer[0]?.actor.display,prescriber:[...new Set(s.map(e=>e.requester.display))].join(", "),status:(0,d.oK)(s,r),location:t?.location?t?.location[0]?.location.display:null}})).sort((e,t)=>e.created<t.created?1:-1)}else _=[]}return{prescriptionsTableRows:_,error:h,isLoading:!_&&!h,totalOrders:f?.data.total}}function p(e,t=null){let{data:n,...s}=o()((0,d.Yo)(e),l.openmrsFetch,{refreshInterval:t}),{medicationRequestBundles:a,prescriptionDate:r}=(0,i.useMemo)(()=>n?function(e){let t,n=[],i=e?.filter(e=>e?.resource?.resourceType=="Encounter").map(e=>e.resource);if(i){t=(0,l.parseDate)(i[0]?.period.start);let s=e?.filter(e=>e?.resource?.resourceType=="MedicationRequest").map(e=>e.resource),a=e?.filter(e=>e?.resource?.resourceType=="MedicationDispense").map(e=>e.resource).sort(d.Fq);s.every(e=>n.push({request:e,dispenses:(0,d.CL)(e,a).sort(d.Fq)}))}return{medicationRequestBundles:n,prescriptionDate:t}}(n.data.entry):{medicationRequestBundles:[],prescriptionDate:null},[n]);return{medicationRequestBundles:a,prescriptionDate:r,...s}}function m(e,t){let{data:n,error:i,isLoading:s}=o()(`${l.fhirBaseUrl}/AllergyIntolerance?patient=${e}`,l.openmrsFetch,{refreshInterval:t});return{allergies:n?.data.entry?.map(e=>e.resource)??[],totalAllergies:n?.data.total,error:i,isLoading:s}}function _(e,t){e=e?e.startsWith("MedicationRequest")?e:`MedicationRequest/${e}`:null;let{data:n,isLoading:i}=o()(e?`${l.fhirBaseUrl}/${e}`:null,l.openmrsFetch,{refreshInterval:t});return{medicationRequest:n?n.data:null,isLoading:i}}function f(e,t){let n=`${l.fhirBaseUrl}/MedicationRequest/${e}`;return(0,l.openmrsFetch)(n,{method:"PATCH",headers:{"Content-Type":c.w9},body:{extension:[{url:c.Yj,valueCode:t}]}})}},8035(e,t,n){"use strict";n.d(t,{FA:()=>l,NV:()=>o,O7:()=>c,_z:()=>d});var i,s,a,r,o=((i={}).on_hold="on-hold",i.completed="completed",i.declined="declined",i),l=((s={}).active="active",s.cancelled="cancelled",s.completed="completed",s.expired="expired",s),c=((a={}).on_hold="ON_HOLD",a.declined="DECLINED",a.completed="COMPLETED",a),d=((r={}).active="active",r.cancelled="cancelled",r.completed="completed",r.expired="expired",r.on_hold="on-hold",r.declined="declined",r.unknown="unknown",r)},7351(e,t,n){"use strict";n.d(t,{CL:()=>E,Fq:()=>x,Gp:()=>C,HP:()=>g,H_:()=>k,M$:()=>T,Q0:()=>S,Qe:()=>R,Qm:()=>N,Qz:()=>L,R9:()=>v,XM:()=>j,Xs:()=>p,Yi:()=>M,Yo:()=>B,Z_:()=>P,_e:()=>_,aC:()=>f,bP:()=>D,c1:()=>A,gY:()=>F,gh:()=>I,ky:()=>y,oK:()=>h,ox:()=>m,p8:()=>w,se:()=>z,vj:()=>U});var i=n(9910),s=n.n(i),a=n(872),r=n.n(a),o=n(8035),l=n(4685),c=n(7003);let d="Misconfiguration, please contact your System Administrator: Can't calculate quantity dispensed if units don't match. Likely issue: allowModifyingPrescription and restrictTotalQuantityDispensed configuration parameters both set to true. Either set restrictTotalQuantityDispensed to false or set allowModifyingPrescription to false. If you have previously entered dispense events that modified prescriptions, you will likely need to clean up or remove that data before setting restrictTotalQuantityDispensed to true.";function u(e,t,n=!1){if(t&&0>=g(e))return o.O7.completed;let i=P(e.dispenses);return i===o.NV.declined?o.O7.declined:i===o.NV.on_hold?o.O7.on_hold:t||i!==o.NV.completed||e.request.status!==o.FA.completed||n?null:o.O7.completed}function p(e,t){let n=m(e,t),i=N(e);if(n!==o.FA.active){if(n===o.FA.expired)return o._z.expired;else if(n===o.FA.completed)return o._z.completed;else if(n===o.FA.cancelled)return o._z.cancelled}return i===o.O7.declined?o._z.declined:i===o.O7.on_hold?o._z.on_hold:o._z.active}function m(e,t){return e.status===o.FA.cancelled||e.status===o.FA.completed?e.status:e.dispenseRequest?.validityPeriod?.start&&s()(e.dispenseRequest.validityPeriod.start).isBefore(s()().startOf("day").subtract(t,"day"))?o.FA.expired:o.FA.active}function _(e,t,n){let i=[...t.dispenses];return i=e.id?i.map(t=>t.id===e.id?e:t):[e,...i],u({request:t.request,dispenses:i},n,!1)}function f(e,t,n){return u({request:t.request,dispenses:t.dispenses.filter(t=>t.id!==e.id)},n,e.status===o.NV.completed)}function h(e,t){let n=function(e,t){if(!e||0===e.length)return null;let n=e.map(e=>p(e,t));if(n.includes(o._z.active))return o._z.active;if(n.includes(o._z.on_hold))return o._z.on_hold;if(n.includes(o._z.completed))return o._z.completed;if(n.includes(o._z.declined))return o._z.declined;if(n.includes(o._z.cancelled))return o._z.cancelled;else if(n.includes(o._z.expired))return o._z.expired;return null}(e,t);if(null===n);else if(n===o._z.active)return"active";else if(n===o._z.on_hold)return"paused";else if(n===o._z.completed)return"completed";else if(n===o._z.declined)return"closed";else if(n===o._z.expired)return"expired";else if(n===o._z.cancelled)return"cancelled";return null}function g(e){if(e){var t;let n;if(!q([e.request,...e.dispenses]))throw Error(d);return n=A(t=e.request),(t.dispenseRequest?.quantity?.value?t.dispenseRequest.quantity.value*(1+(n||0)):null)-y(e.dispenses)}return 0}function y(e){if(!e)return 0;if(!q(e))throw Error(d);return e.map(e=>e.quantity?.value?e.quantity?.value:0).reduce((e,t)=>e+t,0)}function E(e,t){return t?.filter(t=>t?.authorizingPrescription?.some(t=>t.reference.endsWith(e.id)))}function b(e){return e?e.find(e=>!("system"in e)||void 0===e.system):null}function v(e){return b(e)?.display}function T(e){return b(e)?.code}function C(e){return e?.length>0?e[0]:null}function N(e){return e?.extension?.find(e=>e.url===c.Yj)?.valueCode}function D(e){return`${l.fhirBaseUrl}/Medication?code=${e}`}function S(e){return e.medicationReference?e.medicationReference.display:v(e?.medicationCodeableConcept.coding)+": "+e?.medicationCodeableConcept.text}function k(e){return{medicationReference:e.medicationReference,medicationCodeableConcept:e.medicationCodeableConcept}}function P(e){let t=e?.sort(x);return t&&t.length>0?t[0].status:null}function w(e,t){return e.find(e=>e.dispenses.find(e=>e.id===t.id))}function L(e){if(!e||!e.extension)return null;let t=e.extension.find(e=>e.url===c.Wz);if(!t||!t.extension)return null;let n=t.extension.find(e=>e.url===c.Wz+"#drugName");return n?n.valueString:null}function B(e){return`${l.fhirBaseUrl}/${c.c1}?encounter=${e}&_revinclude=MedicationDispense:prescription&_include=MedicationRequest:encounter`}function I(e,t,n,i,s,a,o){return r()(e||("ACTIVE"===t?"${fhirBaseUrl}/${PRESCRIPTIONS_TABLE_ENDPOINT}&_getpagesoffset=${pageOffset}&_count=${pageSize}&date=ge${date}&status=${status}"+(a?"&patientSearchTerm=${patientSearchTerm}":"")+(o?"&location=${location}":""):"${fhirBaseUrl}/${PRESCRIPTIONS_TABLE_ENDPOINT}&_getpagesoffset=${pageOffset}&_count=${pageSize}&status=${status}"+(a?"&patientSearchTerm=${patientSearchTerm}":"")+(o?"&location=${location}":"")))({fhirBaseUrl:l.fhirBaseUrl,PRESCRIPTIONS_TABLE_ENDPOINT:c.T,status:t,pageOffset:n,pageSize:i,date:s,patientSearchTerm:a,location:o})}function R(e){return"MedicationRequest"==e.resourceType?e.dispenseRequest?.quantity:"MedicationDispense"==e.resourceType?e.quantity:void 0}function q(e){if(!e)return!0;{let t=e.map(e=>R(e)?.code).filter(e=>e);return!(t.length>0)||t.every(e=>e===t[0])}}function A(e){return"MedicationRequest"==e.resourceType?e.dispenseRequest?.numberOfRepeatsAllowed:null}function U(e){return e?.includes("/")?e.split("/")[1]:e}async function M(e,t){await e(e=>"string"==typeof e&&(e.startsWith(`${l.fhirBaseUrl}/${c.T}`)||e.startsWith(`${l.fhirBaseUrl}/${c.c1}?encounter=${t}`))),$.setState(e=>({staleEncounterUuids:e.staleEncounterUuids.filter(e=>e!==t)}))}function F(e){$.setState(t=>({staleEncounterUuids:[...t.staleEncounterUuids,e]}))}function x(e,t){if(null===t.whenHandedOver)return 1;if(null===e.whenHandedOver)return -1;let n=(0,l.parseDate)(t.whenHandedOver).getTime()-(0,l.parseDate)(e.whenHandedOver).getTime();return 0!==n?n:e.id.localeCompare(t.id)}function j(e){return(!e?.doseAndRate||!e?.doseAndRate[0]?.doseQuantity?.value)&&!e?.timing?.code?.coding[0]?.code&&!e?.route}let $=(0,l.createGlobalStore)("dispensing-store",{staleEncounterUuids:[]});function z(){return(0,l.useStore)($)}}}]);
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["5212"],{4767(e,t,n){var i={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["9900","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["6468","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","3378"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["6716","5940"],"./hi.json":["6840","2881"]};function s(e){if(!n.o(i,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=i[e],s=t[0];return n.e(t[1]).then(function(){return n(s)})}s.keys=()=>Object.keys(i),s.id=4767,e.exports=s},6339(e,t,n){"use strict";n.d(t,{A:()=>m});var i=n(2287),s=n.n(i),a=n(6942),r=n.n(a),o=n(1399),l=n(6940),c=n(7796),d=n(7351);let u="-esm-dispensing__medication-event__bodyLong01___+dWdf",p="-esm-dispensing__medication-event__label01___GOwXJ",m=({medicationEvent:e,status:t=null,children:n,isDispenseEvent:i})=>{let{t:a}=(0,o.useTranslation)(),m=(0,d.Gp)(e.dosageInstruction),_=(0,d.XM)(m),f=(0,d.Qe)(e),h=(0,d.c1)(e),g=!(0,c.isDesktop)((0,c.useLayoutType)());return s().createElement(l.Tile,{className:r()({"-esm-dispensing__medication-event__medicationEventTile___aCxUk":!0,"-esm-dispensing__medication-event__dispenseEvent___pfeL9":i,"-esm-dispensing__medication-event__isTablet___tYol6":g})},s().createElement("div",null,s().createElement("p",{className:"-esm-dispensing__medication-event__medicationName___Dy9oL"},t,t&&" ",s().createElement("strong",null,(0,d.Q0)((0,d.H_)(e)))),!_&&s().createElement("p",{className:u},s().createElement("span",{className:p},a("dose","Dose").toUpperCase())," ",s().createElement("span",{className:"-esm-dispensing__medication-event__dosage___94wUZ"},m?.doseAndRate&&m.doseAndRate.map((e,t)=>s().createElement("span",{key:t},e?.doseQuantity?.value," ",e?.doseQuantity?.unit))),m?.route?.text&&s().createElement(s().Fragment,null," — ",m.route.text),m?.timing?.code?.text&&s().createElement(s().Fragment,null," — ",m.timing.code.text),m?.timing?.repeat?.duration&&s().createElement(s().Fragment,null," ","for ",m.timing.repeat.duration," ",m.timing.repeat.durationUnit)),f&&s().createElement("p",{className:u},s().createElement("span",{className:p},a("quantity","Quantity").toUpperCase())," ",s().createElement("span",{className:"-esm-dispensing__medication-event__quantity___xyD-l"},f.value," ",f.unit)),(h||0===h)&&s().createElement("p",{className:u},s().createElement("span",{className:p},a("refills","Refills").toUpperCase())," ",s().createElement("span",{className:"-esm-dispensing__medication-event__refills___sJbuJ"},h)),m?.text&&s().createElement("p",{className:u},m.text),m?.additionalInstruction?.length>0&&s().createElement("p",{className:u},m?.additionalInstruction[0].text)),n)}},7003(e,t,n){"use strict";n.d(t,{Bi:()=>o,T:()=>m,Ub:()=>f,Wz:()=>a,Yj:()=>r,Zw:()=>c,_8:()=>d,c1:()=>_,ih:()=>u,p1:()=>i,py:()=>l,w9:()=>p}),window.getOpenmrsSpaBase;let i=`${window.spaBase}/dispensing`,s="http://fhir.openmrs.org/ext",a=s+"/medicine",r=s+"/medicationrequest/fulfillerstatus",o="Task: dispensing.create.dispense",l="Task: dispensing.create.dispense.allowSubstitutions",c="Task: dispensing.edit.dispense",d="Task: dispensing.delete.dispense",u="Task: dispensing.delete.dispense.ifCreator",p="application/merge-patch+json",m="Encounter?_query=encountersWithMedicationRequests",_="MedicationRequest",f="medication-dispense-action-slot"},5831(e,t,n){"use strict";n.r(t),n.d(t,{dispenseWorkspace:()=>el,closeDispenseWorkspace:()=>eo,pauseActionButton:()=>er,printPrescriptionPreviewModal:()=>ed,dispensingDashboard:()=>en,dispensingDashboardLink:()=>ei,startupApp:()=>K,dispensingLink:()=>et,duplicateDispenseModal:()=>ep,deleteConfirmModal:()=>eu,importTranslation:()=>J,pauseDispenseWorkspace:()=>ec,dispenseActionButton:()=>ea,patientDiagnoses:()=>em,dispensing:()=>ee,onPrescriptionFilledModal:()=>ef,closeActionButton:()=>es,patientConditions:()=>e_});var i=n(7796);let s={drugOrderTypeUUID:{_type:i.Type.UUID,_description:"UUID for the 'Drug' order type, used to filter the order basket to show only drug order panels. Must match the orderTypeUuid config in @openmrs/esm-patient-medications-app.",_default:"131168f4-15f5-102d-96e4-000c29c2a5d7"},appName:{_type:i.Type.String,_default:"Pharmacy"},enableDuplicateDispenseCheck:{_type:i.Type.Boolean,_description:"Enable/Disable the duplicate dispense check feature",_default:!0},duplicateCheckWindowDays:{_type:i.Type.Number,_description:"Number of days to look back when checking for duplicate dispenses",_default:7},actionButtons:{pauseButton:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Pause button in the button action bar",_default:!0}},closeButton:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Close button in the button action bar",_default:!0}},printPrescriptionsButton:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Print Prescriptions button in the prescriptions action bar",_default:!0}}},dispenseBehavior:{allowModifyingPrescription:{_type:i.Type.Boolean,_description:"Enable/Disable editing the prescription. If Disabled, Quantity will be he only editable field on prescription form. Note that this means that quantity units will need to be mandatory and set correctly on the prescription.",_default:!0},restrictTotalQuantityDispensed:{_type:i.Type.Boolean,_description:"Enable/Disable restricting dispensing quantity greater than total quantity ordered. Marks prescription as complete when total quantity dispensed. If true, allowModifyingPrescription *must* be false, as this functionality relies solely on numeric quantity and assumes no change in formulation, dosage, unit, etc",_default:!1}},dispenserProviderRoles:{_type:i.Type.Array,_description:'Array of provider roles uuids. If specified, only providers with these roles will be listed in the "Dispensed By" dropdown. Note that this simply restricts the providers that can be recorded as Dispensers, it does not limit who can create dispense events.',_default:[]},medicationRequestExpirationPeriodInDays:{_type:i.Type.Number,_description:"Medication Requests older that this will be considered expired",_default:90},locationBehavior:{locationColumn:{enabled:{_type:i.Type.Boolean,_description:"Enabled/Disable including a Location column in the main prescriptions table showing ordering location",_default:!1}},locationFilter:{enabled:{_type:i.Type.Boolean,_description:"Enable/Disable Location filter on main prescriptions page",_default:!1},tag:{_type:i.Type.String,_description:"Only locations with this tag will appear as options in the location dropdown filter",_default:"Login Location"},associatedPharmacyLocationAttribute:{_type:i.Type.String,_description:"Name of the location attribute whose value identifies the associated pharmacy location. The location whose attribute value matches the user's login location will be pre-selected in the filter dropdown. This attribute has no effect on which locations appear as options.",_default:"Associated Pharmacy Location"}},restrictToVisitLocationDescendants:{_type:i.Type.Boolean,_description:"If true, limits prescriptions shown to locations that are descendants of the current login location's nearest ancestor tagged as a visit location. Requires the EMR API module to be installed.",_default:!1}},refreshInterval:{_type:i.Type.Number,_description:"The interval, in milliseconds, to query the backend for new/changed data",_default:6e4},valueSets:{reasonForPause:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Pause' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/168099/",_default:"2462a9d7-61fb-4bf5-9359-aedecb8d03cb"}},reasonForClose:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Close' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/168099/",_default:"2462a9d7-61fb-4bf5-9359-aedecb8d03cb"}},substitutionReason:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Reason for Substitution' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167862/",_default:"2de6e1be-f2dd-4ba0-9516-8a611aa2af9b"}},substitutionType:{uuid:{_type:i.Type.UUID,_description:"UUID for the Value Set of valid answers to the 'Type of Substitution' question. Defaults to CIEL value set: https://app.openconceptlab.org/#/orgs/CIEL/sources/CIEL/concepts/167859/",_default:"b9c5bca0-d026-4245-a4d2-e4c0a8999082"}}},enableStockDispense:{_type:i.Type.Boolean,_description:"Enable or disable stock deduction during the dispensing process. Requires the stock management module to be installed and configured.",_default:!1},validateBatch:{_type:i.Type.Boolean,_description:"Enable or disable stock item batch number validation. Requires the stock management module to be installed and configured.",_default:!0},leftNavMode:{_type:i.Type.String,_description:"Sets the left nav mode for the dispensing app.",_validators:[i.validators.oneOf(["normal","collapsed","hidden"])],_default:"collapsed"},completeOrderWithThisDispense:{_type:i.Type.Boolean,_description:'Enable or disable the "Complete order with this dispense" checkbox on the dispense form.',_default:!1},customTabs:{_type:i.Type.Array,_description:"Custom tabs to be added to the prescription panel. See README for more details.",_default:[]}};var a=n(2287),r=n.n(a),o=n(6940),l=n(1399),c=n(9513),d=n(6942),u=n.n(d);let p={dispensing:"-esm-dispensing__dispensing__dispensing___9APDl",hasLeftNav:"-esm-dispensing__dispensing__hasLeftNav___oNrBA"};var m=n(7136),_=n(3335);let f="-esm-dispensing__pharmacy-header__value___IfLyg",h=()=>{let{t:e}=(0,l.useTranslation)(),t=(0,i.useSession)(),n=(0,i.useConfig)(),s=t?.sessionLocation?.display;return r().createElement(i.PageHeader,{className:"-esm-dispensing__pharmacy-header__header___1ZXtT"},r().createElement(i.PageHeaderContent,{illustration:r().createElement(i.PharmacyPictogram,null),title:e("appName",n.appName)}),r().createElement("div",{className:"-esm-dispensing__pharmacy-header__rightJustifiedItems___YqnNm"},r().createElement("div",{className:"-esm-dispensing__pharmacy-header__dateAndLocation___4Rnjf"},r().createElement(m.aZ,{size:16}),r().createElement("span",{className:f},s),r().createElement("span",{className:"-esm-dispensing__pharmacy-header__middot___0XUIQ"},"\xb7"),r().createElement(_.Vv,{size:16}),r().createElement("span",{className:f},(0,i.formatDate)(new Date,{noToday:!0})))))};var g=n(2059),y=n.n(g);class E extends Error{constructor(e){super(e),this.name="MissingOptionalBackendDependencyError"}}function b(e){return t=>({id:t.uuid,name:t.name,associatedPharmacyLocation:t.attributes?.find(t=>t.attributeType.name===e)?.value?.uuid??null})}var v=n(1297);let T=({patient:{name:e,uuid:t}})=>{let n,{error:s,isLoading:a,age:o}=(e=>{let t=`${i.restBaseUrl}/person/${e}?v=custom:(age)`,{data:n,error:s,isLoading:a,mutate:r}=y()(t,i.openmrsFetch);return{age:n?.data?.age,error:s,isLoading:a,mutate:r}})(t),{t:c}=(0,l.useTranslation)(),d=c("age","Age");if(a||s)return r().createElement(r().Fragment,null,e);let u=-1!==(n=e.lastIndexOf(")"))?e.slice(0,n)+`, ${d}: ${o}`+e.slice(n):`${e} ${d}: ${o}`;return r().createElement(r().Fragment,null,u)};var C=n(8035),N=n(7003),D=n(7351),S=n(6339);let k="-esm-dispensing__history-and-comments__menuitem___TLhEk",P="-esm-dispensing__history-and-comments__historyHeader___+Wyzw",w=({medicationDispense:e,medicationRequestBundle:t,patientUuid:n,encounterUuid:s})=>{let{t:a}=(0,l.useTranslation)(),{mutate:d}=(0,g.useSWRConfig)(),u=(0,i.useSession)(),p=(0,i.useConfig)(),m=u?.user&&(0,i.userHasAccess)(N.Zw,u.user),_=((e,t)=>{if(e?.user){if((0,i.userHasAccess)(N._8,e.user))return!0;else if((0,i.userHasAccess)(N.ih,e.user)&&e.currentProvider?.uuid&&t.performer?.find(t=>t?.actor?.reference?.length>1&&t.actor.reference.split("/")[1]===e.currentProvider.uuid)!==void 0)return!0}return!1})(u,e);return m||_?r().createElement(o.OverflowMenu,{"aria-label":a("medicationDispenseActionMenu","Medication Dispense Action Menu"),className:"-esm-dispensing__history-and-comments__medicationEventActionMenu___HLh3V",flipped:!0},m&&r().createElement(o.OverflowMenuItem,{className:k,itemText:a("editRecord","Edit record"),onClick:()=>{var r;let{workspaceName:o,props:l}=((e,t)=>{if(e.status===C.NV.completed){let i=null,a=null;return p.dispenseBehavior.restrictTotalQuantityDispensed&&(i=(0,D.HP)(t)+(e?.quantity?e.quantity.value:0),t.dispenses&&(a=(0,D.ky)(t.dispenses))),{workspaceName:"dispense-workspace",props:{patientUuid:n,encounterUuid:s,medicationDispense:e,medicationRequestBundle:t,quantityRemaining:i,quantityDispensed:a,mode:"edit"}}}return e.status===C.NV.on_hold?{workspaceName:"pause-dispense-workspace",props:{patientUuid:n,encounterUuid:s,medicationDispense:e,mode:"edit"}}:e.status===C.NV.declined?{workspaceName:"close-dispense-workspace",props:{patientUuid:n,encounterUuid:s,medicationDispense:e,mode:"edit"}}:void 0})(e,t),c=(r=e).status===C.NV.completed?a("editDispenseRecord","Edit Dispense Record"):r.status===C.NV.on_hold?a("editPauseRecord","Edit Pause Record"):r.status===C.NV.declined?a("editCloseRecord","Edit Close Record"):void 0;(0,i.launchWorkspace2)(o,{customWorkspaceTitle:c,...l})}}),_&&r().createElement(o.OverflowMenuItem,{className:k,hasDivider:!0,isDelete:!0,itemText:a("delete","Delete"),onClick:()=>(({medicationDispense:e,medicationRequestBundle:t})=>{let n=(0,i.showModal)("delete-confirm-modal",{title:a("deleteDispenseRecord","Delete Dispense Record"),message:a("deleteDispenseRecordMessage","Are you sure you want to delete this dispense record?"),onDelete:()=>{let r,o;r=(0,D.Qm)(t.request),o=(0,D.aC)(e,t,p.dispenseBehavior.restrictTotalQuantityDispensed),(0,D.gY)(s),(0,c._D)(e.id).then(()=>{(0,i.showSnackbar)({kind:"success",title:a("success","Success"),subtitle:a("medicationDispenseDeleted","Medication dispense was deleted successfully")}),r!==o&&(0,v.NT)((0,D.vj)(e.authorizingPrescription[0].reference),o).then(()=>{(0,D.Yi)(d,s)}).catch(()=>{(0,i.showSnackbar)({kind:"error",title:a("updateStatusFailed","Update Status Failed"),subtitle:a("couldNotUpdateMedicationRequestStatus","Could not update medication request status")})}),(0,D.Yi)(d,s)}).catch(()=>{(0,i.showSnackbar)({kind:"error",title:a("deleteFailed","Delete Failed"),subtitle:a("couldNotDeleteMedicationDispense","Could not delete medication dispense")})}),n()},onClose:()=>{n()}})})({medicationDispense:e,medicationRequestBundle:t})})):null},L=({medicationDispense:e})=>{let{t}=(0,l.useTranslation)();return e.status===C.NV.completed?r().createElement(o.Tag,{type:"gray"},t("dispensed","Dispensed")):e.status===C.NV.on_hold?r().createElement(o.Tag,{type:"red"},t("paused","Paused")):e.status===C.NV.declined?r().createElement(o.Tag,{type:"red"},t("closed","Closed")):null},B=({encounterUuid:e,patientUuid:t})=>{let{t:n}=(0,l.useTranslation)(),s=(0,i.useConfig)(),{medicationRequestBundles:c,prescriptionDate:d,error:u,isLoading:p}=(0,v.IQ)(e,s.refreshInterval),{sortedDispenses:m,requests:_,hasHistory:f}=(0,a.useMemo)(()=>{let e=c?.flatMap(e=>e.dispenses)??[],t=c?.flatMap(e=>e.request)??[];return{sortedDispenses:[...e].sort(D.Fq),requests:t,hasHistory:e.length>0||t.length>0}},[c]);return r().createElement("div",{className:"-esm-dispensing__history-and-comments__historyAndCommentsContainer___at3xs"},p&&r().createElement(o.Tile,null,r().createElement(o.SkeletonText,{paragraph:!0,lineCount:2})),u&&r().createElement("p",{className:"-esm-dispensing__history-and-comments__error___d6E4w"},n("errorLoadingHistory","Error loading history"),": ",u.message),!p&&!u&&!f&&r().createElement("p",{className:"-esm-dispensing__history-and-comments__emptyState___c53py"},n("noHistoryFound","No history found")),!p&&!u&&f&&r().createElement(r().Fragment,null,m.map(s=>{var a;return r().createElement("div",{key:s.id},r().createElement("h5",{className:P},s.performer&&s.performer[0]?.actor?.display," ",(a=s).status===C.NV.completed?n("dispensedMedication","dispensed medication"):a.status===C.NV.on_hold?n("pausedDispense","paused dispense"):a.status===C.NV.declined?n("closedDispense","closed dispense"):null," —"," ",(0,i.formatDatetime)((0,i.parseDate)(s.whenHandedOver))),r().createElement(S.A,{medicationEvent:s,status:r().createElement(L,{medicationDispense:s}),isDispenseEvent:!0},r().createElement("div",{className:"-esm-dispensing__history-and-comments__dispenseEventActions___mIrli"},r().createElement(i.ExtensionSlot,{name:N.Ub,state:{medicationDispense:s,patientUuid:t,encounterUuid:e}}),r().createElement(w,{medicationDispense:s,medicationRequestBundle:(0,D.p8)(c,s),patientUuid:t,encounterUuid:e}))))}),_.map(e=>r().createElement("div",{key:e.id},r().createElement("h5",{className:P},e.requester.display," ",n("orderedMedication","ordered medication")," —"," ",(0,i.formatDatetime)(d)),r().createElement(S.A,{medicationEvent:e,status:r().createElement(o.Tag,{type:"green"},n("ordered","Ordered"))})))))};var I=n(2383);let R=({medicationRequestBundle:e,patientUuid:t,encounterUuid:n,disabled:s})=>{let a=(0,i.useConfig)(),o=(0,i.useSession)(),l=(0,c.u9)(a.dispenserProviderRoles),d=(0,D.Z_)(e.dispenses),u=(0,D.ox)(e.request,a.medicationRequestExpirationPeriodInDays),p=u===C.FA.active&&d!==C.NV.declined,m=a.actionButtons.pauseButton.enabled&&u===C.FA.active&&d!==C.NV.on_hold&&d!==C.NV.declined,_=a.actionButtons.closeButton.enabled&&u===C.FA.active&&d!==C.NV.declined,f=null;a.dispenseBehavior.restrictTotalQuantityDispensed&&(f=(0,D.HP)(e));let h=0;a.dispenseBehavior.restrictTotalQuantityDispensed&&e.dispenses&&(h=(0,D.ky)(e.dispenses));let g={dispensable:p,pauseable:m,closeable:_,quantityRemaining:f,quantityDispensed:h,patientUuid:t,encounterUuid:n,medicationRequestBundle:e,session:o,providers:l,disabled:s};return r().createElement("div",{className:"-esm-dispensing__action-buttons__actionBtns___Ci-6w"},r().createElement(i.ExtensionSlot,{className:"-esm-dispensing__action-buttons__extensionSlot___GCdJ6",name:"prescription-action-button-slot",state:g}))};var q=n(9564);let A=({encounterUuid:e,patientUuid:t})=>{let{t:n}=(0,l.useTranslation)(),s=(0,a.useCallback)(()=>{let n=(0,i.showModal)("prescription-print-preview-modal",{onClose:()=>n(),encounterUuid:e,patientUuid:t})},[e,t]);return r().createElement(o.Button,{renderIcon:q.xj,iconDescription:n("print","Print"),onClick:s,kind:"ghost"},n("printPrescriptions","Print prescriptions"))},U="-esm-dispensing__prescription-actions__actionCluster___LwZa9",M=({encounterUuid:e,patientUuid:t})=>{let n=(0,i.useConfig)();return r().createElement(o.Layer,{className:"-esm-dispensing__prescription-actions__actionsContainer___8oGYo"},r().createElement("div",{className:U},n.actionButtons.printPrescriptionsButton.enabled&&r().createElement(A,{encounterUuid:e,patientUuid:t})),r().createElement("div",{className:U}))},F="-esm-dispensing__prescription-details__error___ZNUtP",x="-esm-dispensing__prescription-details__skeletonTile___dKD-J",j=({encounterUuid:e,patientUuid:t})=>{let n,{t:s}=(0,l.useTranslation)(),a=(0,i.useConfig)(),{allergies:c,totalAllergies:d,isLoading:u,error:p}=(0,v.PA)(t,a.refreshInterval),{medicationRequestBundles:m,error:_,isLoading:f}=(0,v.IQ)(e,a.refreshInterval),{staleEncounterUuids:h}=(0,D.se)();return r().createElement("div",{className:"-esm-dispensing__prescription-details__prescriptionContainer___lDo9S"},u&&r().createElement(o.Tile,{className:x},r().createElement(o.SkeletonText,null)),!u&&r().createElement(o.Tile,{className:"-esm-dispensing__prescription-details__allergiesTile___J9wuQ"},r().createElement("div",{className:"-esm-dispensing__prescription-details__allergiesContent___cJD5c"},r().createElement("div",null,r().createElement(I.BF,{size:24,className:"-esm-dispensing__prescription-details__allergiesIcon___ldspC"}),r().createElement("p",null,p&&r().createElement("span",{className:F},s("errorLoadingAllergies","Error loading allergies"),": ",p.message),!p&&d>0&&r().createElement("span",null,r().createElement("span",{className:"-esm-dispensing__prescription-details__allergiesCount___A9wbi"},s("allergiesCount","{{ count }} allergies",{count:d}))," ",(n=s("unknownAllergy","Unknown allergy"),c.map(e=>e.code?.text?e.code.text:e.code?.coding?.length?(0,D.R9)(e.code.coding)??e.code.coding[0]?.display:n).filter(Boolean).join(", "))),!p&&"number"==typeof d&&0===d&&s("noAllergyDetailsFound","No allergy details found"))))),r().createElement("h5",{className:"-esm-dispensing__prescription-details__prescribedHeader___kvUih"},s("prescribed","Prescribed")),f&&r().createElement(o.Tile,{className:x},r().createElement(o.SkeletonText,{paragraph:!0,lineCount:2})),_&&r().createElement("p",{className:F},s("errorLoadingPrescriptionDetails","Error loading prescription details"),": ",_.message),m&&(m.length>0?m.map(n=>{let l;return r().createElement(S.A,{key:n.request.id,medicationEvent:n.request,status:(l=(0,D.Xs)(n.request,a.medicationRequestExpirationPeriodInDays))===C._z.cancelled?r().createElement(o.Tag,{type:"red"},s("cancelled","Cancelled")):l===C._z.completed?r().createElement(o.Tag,{type:"green"},s("completed","Completed")):l===C._z.expired?r().createElement(o.Tag,{type:"red"},s("expired","Expired")):l===C._z.declined?r().createElement(o.Tag,{type:"red"},s("closed","Closed")):l===C._z.on_hold?r().createElement(o.Tag,{type:"red"},s("paused","Paused")):(0,D.Z_)(n.dispenses)===C.NV.completed?r().createElement(o.Tag,{type:"gray"},s("dispensed","Dispensed")):null},r().createElement(i.UserHasAccess,{privilege:N.Bi},r().createElement(R,{patientUuid:t,encounterUuid:e,medicationRequestBundle:n,disabled:h.includes(e)})))}):r().createElement("p",{className:"-esm-dispensing__prescription-details__emptyState___2yYDA"},s("noPrescriptionsFound","No prescriptions found"))),m?.length>0&&r().createElement(M,{encounterUuid:e,patientUuid:t}))},$=({encounterUuid:e,patientUuid:t})=>{let{t:n}=(0,l.useTranslation)(),s=(0,i.getAssignedExtensions)("dispensing-condition-and-diagnoses"),a=[{name:n("prescriptionDetails","Prescription details"),component:r().createElement(j,{encounterUuid:e,patientUuid:t})},s&&s.length>0?{name:n("conditionsAndDiagnoses","Conditions and diagnoses"),component:r().createElement(i.ExtensionSlot,{name:"dispensing-condition-and-diagnoses",state:{patientUuid:t,encounterUuid:e}})}:null,{name:n("historyComments","History and comments"),component:r().createElement(B,{encounterUuid:e,patientUuid:t})}];return r().createElement("div",{className:"-esm-dispensing__prescription-expanded__expandedTabsParentContainer___Vsvf1"},r().createElement("div",{className:"-esm-dispensing__prescription-expanded__verticalTabs___iM-yu"},r().createElement(o.Tabs,null,r().createElement(o.TabList,{"aria-label":n("tabList","Tab List")},a.filter(Boolean).map((e,t)=>r().createElement(o.Tab,{key:t},e.name))),r().createElement(o.TabPanels,null,a.filter(Boolean).map((e,t)=>r().createElement(o.TabPanel,{key:t},e.component))))))},z={link:"-esm-dispensing__prescriptions__link___O-9UM",breadcrumbsSlot:"-esm-dispensing__prescriptions__breadcrumbsSlot___IuWkK",prescriptionTabsContainer:"-esm-dispensing__prescriptions__prescriptionTabsContainer___L5i4n",newListButton:"-esm-dispensing__prescriptions__newListButton___lz50j",tabsContainer:"-esm-dispensing__prescriptions__tabsContainer___j9Njd",patientListTableContainer:"-esm-dispensing__prescriptions__patientListTableContainer___1P0kM",searchContainer:"-esm-dispensing__prescriptions__searchContainer___XY-JU",addPrescriptionBtn:"-esm-dispensing__prescriptions__addPrescriptionBtn___kwZsR",patientSearch:"-esm-dispensing__prescriptions__patientSearch___EY2F3",locationFilter:"-esm-dispensing__prescriptions__locationFilter___aEgiF",search:"-esm-dispensing__prescriptions__search___9Z7xs",hiddenRow:"-esm-dispensing__prescriptions__hiddenRow___U3N1u",filterEmptyState:"-esm-dispensing__prescriptions__filterEmptyState___FafZM",filterEmptyStateTile:"-esm-dispensing__prescriptions__filterEmptyStateTile___R1a8K",filterEmptyStateContent:"-esm-dispensing__prescriptions__filterEmptyStateContent___ELI03",filterEmptyStateHelper:"-esm-dispensing__prescriptions__filterEmptyStateHelper___6iQZW",paginationContainer:"-esm-dispensing__prescriptions__paginationContainer___lw6Gt"},O=({loadData:e,debouncedSearchTerm:t,locations:n,status:s,customPrescriptionsTableEndpoint:c})=>{let{t:d}=(0,l.useTranslation)(),u=(0,i.useConfig)(),[p,m]=(0,a.useState)(1),[_,f]=(0,a.useState)(10),h=(p-1)*_,{prescriptionsTableRows:g,error:y,isLoading:E,totalOrders:b}=(0,v.JZ)(e,c,s,_,h,t,n,u.medicationRequestExpirationPeriodInDays,u.refreshInterval);(0,a.useEffect)(()=>{m(1)},[t]);let C=[{header:d("created","Created"),key:"created"},{header:d("patientName","Patient name"),key:"patient"},{header:d("prescriber","Prescriber"),key:"prescriber"},{header:d("drugs","Drugs"),key:"drugs"},{header:d("lastDispenser","Last dispenser"),key:"lastDispenser"},{header:d("status","Status"),key:"status"}];return u.locationBehavior?.locationColumn?.enabled&&(C=[...C.slice(0,3),{header:d("location","Location"),key:"location"},...C.slice(3)]),r().createElement("div",{className:z.patientListTableContainer},E&&r().createElement(o.DataTableSkeleton,{role:"progressbar"}),y&&r().createElement("div",{className:z.filterEmptyState},r().createElement(o.Layer,null,r().createElement(o.Tile,{className:z.filterEmptyStateTile},r().createElement("p",{className:z.filterEmptyStateContent},d("errorLoadingPrescriptions","Error loading prescriptions")),r().createElement("p",{className:z.filterEmptyStateHelper},y?.message)))),g&&r().createElement(r().Fragment,null,r().createElement(o.DataTable,{rows:g,headers:C,isSortable:!0},({rows:e,headers:t,getExpandHeaderProps:n,getHeaderProps:s,getRowProps:a,getTableProps:l})=>r().createElement(o.TableContainer,null,r().createElement(o.Table,{...l(),useZebraStyles:!0},r().createElement(o.TableHead,null,r().createElement(o.TableRow,null,r().createElement(o.TableExpandHeader,n()),t.map(e=>r().createElement(o.TableHeader,s({header:e}),e.header)))),r().createElement(o.TableBody,null,e.map(e=>r().createElement(r().Fragment,{key:e.id},r().createElement(o.TableExpandRow,a({row:e}),e.cells.map(e=>r().createElement(o.TableCell,{key:e.id},e.id.endsWith("created")?(0,i.formatDatetime)((0,i.parseDate)(e.value)):e.id.endsWith("patient")?r().createElement(T,{patient:e.value}):e.id.endsWith("status")?d(e.value):e.value))),e.isExpanded?r().createElement(o.TableExpandedRow,{colSpan:t.length+1},e.cells.find(e=>e.id.endsWith("patient"))?.value?.uuid&&r().createElement($,{encounterUuid:e.id,patientUuid:e.cells.find(e=>e.id.endsWith("patient")).value.uuid})):r().createElement(o.TableExpandedRow,{className:z.hiddenRow,colSpan:t.length+1}))))))),g?.length===0&&r().createElement("div",{className:z.filterEmptyState},r().createElement(o.Layer,null,r().createElement(o.Tile,{className:z.filterEmptyStateTile},r().createElement("p",{className:z.filterEmptyStateContent},d("noPrescriptionsToDisplay","No prescriptions to display")),r().createElement("p",{className:z.filterEmptyStateHelper},d("checkFilters","Check the filters above"))))),g?.length>0&&r().createElement("div",{className:z.paginationContainer},r().createElement(o.Pagination,{page:p,pageSize:_,pageSizes:[10,20,30,40,50,100],totalItems:b,onChange:({page:e,pageSize:t})=>{t!==_?m(1):m(e),f(t)}}))))},V=({locations:e})=>{let{t}=(0,l.useTranslation)(),[n,s]=(0,a.useState)(""),[c,d]=(0,a.useState)("");return r().createElement(o.TabPanel,null,r().createElement("div",{className:"-esm-dispensing__patient-search-tab-panel__searchTabPanel___pEhk7"},r().createElement("form",{className:"-esm-dispensing__patient-search-tab-panel__searchBar___+0aRo",onSubmit:e=>{e.preventDefault(),d(n)}},r().createElement(o.Search,{closeButtonLabelText:t("clearSearchInput","Clear search input"),defaultValue:n,placeholder:t("searchForPatient","Search for a patient by name or identifier number"),labelText:t("searchForPatient","Search for a patient by name or identifier number"),onChange:e=>{s(e.target.value)},onClear:()=>d(""),size:"lg"}),r().createElement(o.Button,{kind:"secondary",type:"submit"},t("search","Search"))),c?r().createElement(O,{loadData:!0,status:"ACTIVE",debouncedSearchTerm:c,locations:e}):r().createElement("div",{className:"-esm-dispensing__patient-search-tab-panel__searchForPatientPlaceholder___tb0Q3"},r().createElement("div",null,r().createElement(i.PatientSearchPictogram,null),r().createElement("h5",null,t("searchForPatientHeader","Search for a patient")),r().createElement("div",null,t("searchForPatient","Search for a patient by name or identifier number"))))))},H=({status:e,isTabActive:t,customPrescriptionsTableEndpoint:n,locations:s,isLocationsLoading:c})=>{let{t:d}=(0,l.useTranslation)(),u=(0,i.useConfig)(),p=(0,a.useRef)(!1),{sessionLocation:m}=(0,i.useSession)(),[_,f]=(0,a.useState)(""),h=(0,i.useDebounce)(_,500),[g,y]=(0,a.useState)([]);return(0,a.useEffect)(()=>{!p.current&&!c&&m?.uuid&&(y(s?.filter(e=>m?.uuid===e.associatedPharmacyLocation)||[]),p.current=!0)},[c,m,s]),r().createElement(o.TabPanel,null,r().createElement("div",{className:z.searchContainer},u.locationBehavior?.locationFilter?.enabled&&!c&&p.current&&s?.length>1&&r().createElement(o.MultiSelect,{hideLabel:!0,id:"locationFilter",label:d("filterByLocations","Filter by locations"),initialSelectedItems:g,items:s,itemToString:e=>e?.name,onChange:({selectedItems:e})=>{y(e)},className:z.locationFilter}),r().createElement(o.Search,{closeButtonLabelText:d("clearSearchInput","Clear search input"),defaultValue:_,placeholder:d("searchByPatientIdOrName","Search by patient ID or name"),labelText:d("searchByPatientIdOrName","Search by patient ID or name"),onChange:e=>{e.preventDefault(),f(e.target.value)},size:"md",className:z.patientSearch})),r().createElement(O,{loadData:t,status:e,customPrescriptionsTableEndpoint:n,debouncedSearchTerm:h,locations:u.locationBehavior.restrictToVisitLocationDescendants&&0===g.length?s:g}))},W=()=>{let{t:e}=(0,l.useTranslation)(),t=(0,i.useConfig)(),n=(0,i.useSession)(),{locations:s,isLoading:c,error:d}=function(e){let{restrictToVisitLocationDescendants:t}=e.locationBehavior,n=function(e,t){let{tag:n,associatedPharmacyLocationAttribute:s}=e.locationBehavior.locationFilter,r=t?`${i.restBaseUrl}/location?tag=${encodeURIComponent(n)}&v=custom:(uuid,name,attributes:(attributeType:(name),value:(uuid)))`:null,{data:o,...l}=y()(r,i.openmrsFetch);return{locations:(0,a.useMemo)(()=>(o?.data?.results??[]).map(b(s)).sort((e,t)=>e.name.localeCompare(t.name)),[o,s]),...l}}(e,!t),s=function(e,t){let{sessionLocation:n}=(0,i.useSession)(),{tag:s,associatedPharmacyLocationAttribute:r}=e.locationBehavior.locationFilter,o=(0,i.useFeatureFlag)("emrapi-module"),l=(0,a.useMemo)(()=>t&&!o?new E("The restrictToVisitLocationDescendants option is enabled in the configuration, but the EMR API module is not installed."):null,[t,o]),c=t&&!l&&n?.uuid?`${i.restBaseUrl}/emrapi/locationThatSupportsVisits?location=${n.uuid}&v=custom:(uuid,name,descendantLocations:(uuid,name,tags,attributes:(attributeType:(name),value:(uuid))))`:null,{data:d,...u}=y()(c,i.openmrsFetch);return{locations:(0,a.useMemo)(()=>(d?.data?.descendantLocations??[]).filter(e=>e.tags?.some(e=>e.display===s)).map(b(r)).sort((e,t)=>e.name.localeCompare(t.name)),[d,s,r]),...u,error:l??u.error}}(e,t);return t?s:n}(t);(0,a.useEffect)(()=>{d instanceof E&&(0,i.showSnackbar)({kind:"error",title:e("configurationError","Configuration error"),subtitle:e("locationFilterMisconfigured","The location filter is misconfigured. Check that the required backend module is installed.")})},[d,e]);let[u,p]=(0,a.useState)(0),m=(0,a.useMemo)(()=>t?.customTabs?.filter(e=>!e.associatedLocations||e.associatedLocations.includes(n.sessionLocation?.uuid))||[],[n,t]);return r().createElement("main",{className:"omrs-main-content"},r().createElement("section",{className:z.prescriptionTabsContainer},r().createElement(o.Tabs,{onChange:e=>{p(e.selectedIndex)}},r().createElement(o.TabList,{"aria-label":e("tabList","Tab List"),contained:!0,className:z.tabsContainer},r().createElement(o.Tab,{title:e("search","Search"),id:"tab-search",className:z.tab},e("search","Search")),r().createElement(o.Tab,{title:e("activePrescriptions","Active Prescriptions"),id:"tab-active-prescription",className:z.tab},e("activePrescriptions","Active Prescriptions")),r().createElement(o.Tab,{title:e("allPrescriptions","All Prescriptions"),id:"tab-all-prescription",className:z.tab},e("allPrescriptions","All Prescriptions")),m.map((t,n)=>r().createElement(o.Tab,{title:e(t.title),id:"custom_tab_"+n,className:z.tab},e(t.title)))),r().createElement(o.TabPanels,null,r().createElement(V,{locations:s}),r().createElement(H,{isTabActive:1===u,status:"ACTIVE",locations:s,isLocationsLoading:c}),r().createElement(H,{isTabActive:2===u,status:"",locations:s,isLocationsLoading:c}),m.map((e,t)=>r().createElement(H,{isTabActive:u===t+3,customPrescriptionsTableEndpoint:e.customPrescriptionsTableEndpoint,locations:s,isLocationsLoading:c}))))))},Q=()=>{let e="tablet"===(0,i.useLayoutType)(),{t}=(0,l.useTranslation)(),{drugOrderTypeUUID:n}=(0,i.useConfig)();return r().createElement("div",{className:"-esm-dispensing__fill-prescription-button__buttonContainer___uZrDT"},r().createElement(o.Button,{kind:"primary",renderIcon:e=>r().createElement(i.AddIcon,{size:16,...e}),size:e?"lg":"md",onClick:()=>{(0,i.launchWorkspace2)("dispensing-patient-search-workspace",{workspaceTitle:t("fillPrescriptionForPatient","Fill prescription for patient"),onPatientSelected(e,s,a,r){var o;(o=e,(0,i.openmrsFetch)(`${i.restBaseUrl}/visit?patient=${o}&v=${(void 0)??"default"}&includeInactive=false`,{signal:void 0,method:"GET",headers:{"Content-type":"application/json"}})).then(async a=>{let o=a.data.results?.[0];o?(await r(),(0,i.launchWorkspace2)("dispensing-order-basket-workspace",{},{patientUuid:e,patient:s,visitContext:o,drugOrderWorkspaceName:"dispensing-order-basket-add-drug-order-workspace",allergyFormWorkspaceName:"dispensing-order-basket-add-allergy-workspace",visibleOrderPanels:[n],onOrderBasketSubmitted:(e,t)=>{(0,i.showModal)("on-prescription-filled-modal",{patient:s,encounterUuid:e})}})):(0,i.showSnackbar)({title:t("visitRequired","Visit required"),subtitle:t("visitRequiredForPatientToFillPrescription","Visit required for patient to fill prescription"),kind:"error"})})}},{startVisitWorkspaceName:"dispensing-start-visit-workspace"})}},t("fillPrescription","Fill prescription")))};var Z=n(8651);function Y(){let{t:e}=(0,l.useTranslation)(),t=`${window.spaBase}/home`,n=(0,a.useMemo)(()=>{let e=location.pathname.split("/home");return decodeURIComponent(e[e.length-1])},[]);return r().createElement(i.ConfigurableLink,{className:u()("cds--side-nav__link",{"active-left-nav-link":n.match("dispensing")}),to:`${t}/dispensing`},e("dispensing","Dispensing"))}let J=n(4767),G="@openmrs/esm-dispensing-app",X={featureName:"dispensing",moduleName:G};function K(){(0,i.defineConfigSchema)(G,s)}let ee=(0,i.getSyncLifecycle)(function(){let{leftNavMode:e}=(0,i.useConfig)(),t=(0,i.useLayoutType)(),n=window.spaBase+"/dispensing";return(0,i.useLeftNav)({name:"homepage-dashboard-slot",basePath:n,mode:e}),r().createElement("div",{className:u()([(0,i.isDesktop)(t)?p.desktopContainer:"","normal"===e?p.hasLeftNav:""])},r().createElement(i.ExtensionSlot,{name:"dispensing-dashboard-slot"}))},X),et=(0,i.getSyncLifecycle)(function(){let{t:e}=(0,l.useTranslation)();return r().createElement(i.ConfigurableLink,{to:N.p1},e("dispensing","Dispensing"))},X),en=(0,i.getSyncLifecycle)(function(){let e=(0,i.useConfig)(),{t}=(0,l.useTranslation)();return e.dispenseBehavior.restrictTotalQuantityDispensed&&e.dispenseBehavior.allowModifyingPrescription?r().createElement("div",{className:"omrs-main-content"},r().createElement(o.InlineNotification,{title:t("dispensingAppError","Dispensing App Error"),subtitle:t("dispensingAppMisconfigurationMessage","Please contact your system administration: Misconfiguration - 'restrictTotalQuantityDispensed' cannot be enabled if 'allowModifyingPrescription' is enabled.")})):r().createElement("div",{className:"omrs-main-content"},r().createElement(h,null),r().createElement(Q,null),r().createElement(W,null))},X),ei=(0,i.getSyncLifecycle)(()=>r().createElement(Z.Kd,null,r().createElement(Y,null)),X),es=(0,i.getSyncLifecycle)(({patientUuid:e,encounterUuid:t,medicationRequestBundle:n,session:s,providers:a,closeable:d,disabled:u})=>{let{t:p}=(0,l.useTranslation)(),m={patientUuid:e,encounterUuid:t,medicationDispense:(0,c.ux)(n.request,s,a,!1),mode:"enter"};return d?r().createElement(o.Button,{kind:"danger",onClick:()=>{(0,i.launchWorkspace2)("close-dispense-workspace",m)},disabled:u},p("close","Close")):null},X),ea=(0,i.getSyncLifecycle)(({patientUuid:e,encounterUuid:t,medicationRequestBundle:n,session:s,providers:a,dispensable:d,quantityRemaining:u,quantityDispensed:p,disabled:m})=>{let{t:_}=(0,l.useTranslation)(),f={patientUuid:e,encounterUuid:t,medicationDispense:(0,c.ux)(n.request,s,a,!0),medicationRequestBundle:n,quantityRemaining:u,quantityDispensed:p,mode:"enter"};return d?r().createElement(o.Button,{kind:"primary",onClick:()=>{(0,i.launchWorkspace2)("dispense-workspace",f)},disabled:m},_("dispense","Dispense")):null},X),er=(0,i.getSyncLifecycle)(({patientUuid:e,encounterUuid:t,medicationRequestBundle:n,session:s,providers:a,pauseable:d,disabled:u})=>{let{t:p}=(0,l.useTranslation)(),m={patientUuid:e,encounterUuid:t,medicationDispense:(0,c.ux)(n.request,s,a,!1),mode:"enter"};return d?r().createElement(o.Button,{kind:"secondary",onClick:()=>{(0,i.launchWorkspace2)("pause-dispense-workspace",m)},disabled:u},p("pause","Pause")):null},X),eo=(0,i.getAsyncLifecycle)(()=>n.e("3877").then(n.bind(n,8740)),X),el=(0,i.getAsyncLifecycle)(()=>Promise.all([n.e("4480"),n.e("4302")]).then(n.bind(n,3053)),X),ec=(0,i.getAsyncLifecycle)(()=>n.e("9331").then(n.bind(n,3214)),X),ed=(0,i.getAsyncLifecycle)(()=>Promise.all([n.e("353"),n.e("7656"),n.e("6983")]).then(n.bind(n,10)),X),eu=(0,i.getAsyncLifecycle)(()=>n.e("4437").then(n.bind(n,7060)),X),ep=(0,i.getAsyncLifecycle)(()=>n.e("3438").then(n.bind(n,2829)),X),em=(0,i.getAsyncLifecycle)(()=>n.e("8453").then(n.bind(n,4452)),X),e_=(0,i.getAsyncLifecycle)(()=>n.e("4318").then(n.bind(n,5645)),X),ef=(0,i.getAsyncLifecycle)(()=>n.e("9866").then(n.bind(n,6913)),X)},9513(e,t,n){"use strict";n.d(t,{A7:()=>l,CG:()=>y,E:()=>d,M5:()=>p,Sj:()=>f,_D:()=>c,cE:()=>m,ij:()=>_,u9:()=>u,ux:()=>g});var i=n(9910),s=n.n(i),a=n(2059),r=n.n(a),o=n(7796);function l(e,t,n){let i=e.id?`${o.fhirBaseUrl}/MedicationDispense/${e.id}`:`${o.fhirBaseUrl}/MedicationDispense`,s=e.id?"PUT":"POST";return e.status=t,e.whenPrepared=e.whenHandedOver,(0,o.openmrsFetch)(i,{method:s,signal:n?.signal,headers:{"Content-Type":"application/json"},body:e})}function c(e){return(0,o.openmrsFetch)(`${o.fhirBaseUrl}/MedicationDispense/${e}`,{method:"DELETE"})}function d(){let{data:e,error:t,isValidating:n}=r()(`${o.restBaseUrl}/orderentryconfig`,o.openmrsFetch);return{orderConfigObject:e?e.data:null,error:t,isLoading:!e&&!t,isValidating:n}}function u(e){let t="custom:(uuid,person:(display)",{data:n}=r()(e&&e.length>0?`${o.restBaseUrl}/provider?providerRoles=${e.join(",")}&v=${t})`:`${o.restBaseUrl}/provider?v=${t})`,o.openmrsFetch);return n?.data?.results.sort((e,t)=>e.person?.display.localeCompare(t.person?.display))}function p(e){return{reasonForPauseValueSet:h(e)}}function m(e){return{reasonForCloseValueSet:h(e)}}function _(e){return{substitutionTypeValueSet:h(e)}}function f(e){return{substitutionReasonValueSet:h(e)}}function h(e){let{data:t}=r()(`${o.fhirBaseUrl}/ValueSet/${e}`,o.openmrsFetch);return t?t.data:null}function g(e,t,n,i){let a={resourceType:"MedicationDispense",status:null,authorizingPrescription:[{reference:"MedicationRequest/"+e.id,type:"MedicationRequest"}],medicationReference:e.medicationReference,medicationCodeableConcept:e.medicationCodeableConcept,subject:e.subject,performer:[{actor:{reference:t?.currentProvider?`Practitioner/${t.currentProvider.uuid}`:""}}],location:{reference:t?.sessionLocation?`Location/${t.sessionLocation.uuid}`:""},whenHandedOver:s()().format()};return i&&(a={...a,quantity:{value:e.dispenseRequest?.quantity?.value,code:e.dispenseRequest?.quantity?.code,unit:e.dispenseRequest?.quantity?.unit,system:e.dispenseRequest?.quantity?.system},dosageInstruction:[{text:[e.dosageInstruction[0].text,e.dosageInstruction[0].additionalInstruction?.length>0?e.dosageInstruction[0].additionalInstruction[0].text:null].filter(e=>null!=e).join(" "),timing:e.dosageInstruction[0].timing,asNeededBoolean:!1,route:e.dosageInstruction[0].route,doseAndRate:e.dosageInstruction[0].doseAndRate?e.dosageInstruction[0].doseAndRate:[{doseQuantity:{value:null,code:null,unit:null}}]}],substitution:y}),a}let y={wasSubstituted:!1,reason:[{coding:[{code:null}]}],type:{coding:[{code:null}]}}},1297(e,t,n){"use strict";n.d(t,{IQ:()=>p,JZ:()=>u,NT:()=>f,PA:()=>m,uc:()=>_});var i=n(2287),s=n(9910),a=n.n(s),r=n(2059),o=n.n(r),l=n(7796),c=n(7003),d=n(7351);function u(e,t="",n="",i=10,s=0,r="",c=[],p,m){let _,{data:f,error:h}=o()(e?(0,d.gh)(t,n,s,i,a()(new Date).startOf("day").subtract(p,"day").toISOString(),r,c?.map(e=>e.id).join(",")):null,l.openmrsFetch,{refreshInterval:m});if(f){let e=f?.data.entry;if(e){let t=e.filter(e=>e?.resource?.resourceType=="Encounter").map(e=>e.resource),n=e.filter(e=>e?.resource?.resourceType=="MedicationRequest").map(e=>e.resource),i=e.filter(e=>e?.resource?.resourceType=="MedicationDispense").map(e=>e.resource).sort(d.Fq);(_=t.map(e=>{var t,s,a,r;let o=n.filter(t=>t.encounter.reference=="Encounter/"+e.id),l=o.map(e=>"MedicationRequest/"+e.id);return t=e,s=o,a=i.filter(e=>l.includes(e.authorizingPrescription[0]?.reference)),r=p,{id:t?.id,created:t?.period?.start,patient:{name:t?.subject?.display,uuid:t?.subject?.reference?.split("/")[1]},drugs:[...new Set(s.map(e=>(0,d.Q0)((0,d.H_)(e))).sort((e,t)=>e.localeCompare(t)))].join("; "),lastDispenser:a&&a[0]?.performer&&a[0]?.performer[0]?.actor.display,prescriber:[...new Set(s.map(e=>e.requester.display))].join(", "),status:(0,d.oK)(s,r),location:t?.location?t?.location[0]?.location.display:null}})).sort((e,t)=>e.created<t.created?1:-1)}else _=[]}return{prescriptionsTableRows:_,error:h,isLoading:!_&&!h,totalOrders:f?.data.total}}function p(e,t=null){let{data:n,...s}=o()((0,d.Yo)(e),l.openmrsFetch,{refreshInterval:t}),{medicationRequestBundles:a,prescriptionDate:r}=(0,i.useMemo)(()=>n?function(e){let t,n=[],i=e?.filter(e=>e?.resource?.resourceType=="Encounter").map(e=>e.resource);if(i){t=(0,l.parseDate)(i[0]?.period.start);let s=e?.filter(e=>e?.resource?.resourceType=="MedicationRequest").map(e=>e.resource),a=e?.filter(e=>e?.resource?.resourceType=="MedicationDispense").map(e=>e.resource).sort(d.Fq);s.every(e=>n.push({request:e,dispenses:(0,d.CL)(e,a).sort(d.Fq)}))}return{medicationRequestBundles:n,prescriptionDate:t}}(n.data.entry):{medicationRequestBundles:[],prescriptionDate:null},[n]);return{medicationRequestBundles:a,prescriptionDate:r,...s}}function m(e,t){let{data:n,error:i,isLoading:s}=o()(`${l.fhirBaseUrl}/AllergyIntolerance?patient=${e}`,l.openmrsFetch,{refreshInterval:t});return{allergies:n?.data.entry?.map(e=>e.resource)??[],totalAllergies:n?.data.total,error:i,isLoading:s}}function _(e,t){e=e?e.startsWith("MedicationRequest")?e:`MedicationRequest/${e}`:null;let{data:n,isLoading:i}=o()(e?`${l.fhirBaseUrl}/${e}`:null,l.openmrsFetch,{refreshInterval:t});return{medicationRequest:n?n.data:null,isLoading:i}}function f(e,t){let n=`${l.fhirBaseUrl}/MedicationRequest/${e}`;return(0,l.openmrsFetch)(n,{method:"PATCH",headers:{"Content-Type":c.w9},body:{extension:[{url:c.Yj,valueCode:t}]}})}},8035(e,t,n){"use strict";n.d(t,{FA:()=>l,NV:()=>o,O7:()=>c,_z:()=>d});var i,s,a,r,o=((i={}).on_hold="on-hold",i.completed="completed",i.declined="declined",i),l=((s={}).active="active",s.cancelled="cancelled",s.completed="completed",s.expired="expired",s),c=((a={}).on_hold="ON_HOLD",a.declined="DECLINED",a.completed="COMPLETED",a),d=((r={}).active="active",r.cancelled="cancelled",r.completed="completed",r.expired="expired",r.on_hold="on-hold",r.declined="declined",r.unknown="unknown",r)},7351(e,t,n){"use strict";n.d(t,{CL:()=>E,Fq:()=>x,Gp:()=>C,HP:()=>g,H_:()=>k,M$:()=>T,Q0:()=>S,Qe:()=>R,Qm:()=>N,Qz:()=>L,R9:()=>v,XM:()=>j,Xs:()=>p,Yi:()=>M,Yo:()=>B,Z_:()=>P,_e:()=>_,aC:()=>f,bP:()=>D,c1:()=>A,gY:()=>F,gh:()=>I,ky:()=>y,oK:()=>h,ox:()=>m,p8:()=>w,se:()=>z,vj:()=>U});var i=n(9910),s=n.n(i),a=n(872),r=n.n(a),o=n(8035),l=n(7796),c=n(7003);let d="Misconfiguration, please contact your System Administrator: Can't calculate quantity dispensed if units don't match. Likely issue: allowModifyingPrescription and restrictTotalQuantityDispensed configuration parameters both set to true. Either set restrictTotalQuantityDispensed to false or set allowModifyingPrescription to false. If you have previously entered dispense events that modified prescriptions, you will likely need to clean up or remove that data before setting restrictTotalQuantityDispensed to true.";function u(e,t,n=!1){if(t&&0>=g(e))return o.O7.completed;let i=P(e.dispenses);return i===o.NV.declined?o.O7.declined:i===o.NV.on_hold?o.O7.on_hold:t||i!==o.NV.completed||e.request.status!==o.FA.completed||n?null:o.O7.completed}function p(e,t){let n=m(e,t),i=N(e);if(n!==o.FA.active){if(n===o.FA.expired)return o._z.expired;else if(n===o.FA.completed)return o._z.completed;else if(n===o.FA.cancelled)return o._z.cancelled}return i===o.O7.declined?o._z.declined:i===o.O7.on_hold?o._z.on_hold:o._z.active}function m(e,t){return e.status===o.FA.cancelled||e.status===o.FA.completed?e.status:e.dispenseRequest?.validityPeriod?.start&&s()(e.dispenseRequest.validityPeriod.start).isBefore(s()().startOf("day").subtract(t,"day"))?o.FA.expired:o.FA.active}function _(e,t,n){let i=[...t.dispenses];return i=e.id?i.map(t=>t.id===e.id?e:t):[e,...i],u({request:t.request,dispenses:i},n,!1)}function f(e,t,n){return u({request:t.request,dispenses:t.dispenses.filter(t=>t.id!==e.id)},n,e.status===o.NV.completed)}function h(e,t){let n=function(e,t){if(!e||0===e.length)return null;let n=e.map(e=>p(e,t));if(n.includes(o._z.active))return o._z.active;if(n.includes(o._z.on_hold))return o._z.on_hold;if(n.includes(o._z.completed))return o._z.completed;if(n.includes(o._z.declined))return o._z.declined;if(n.includes(o._z.cancelled))return o._z.cancelled;else if(n.includes(o._z.expired))return o._z.expired;return null}(e,t);if(null===n);else if(n===o._z.active)return"active";else if(n===o._z.on_hold)return"paused";else if(n===o._z.completed)return"completed";else if(n===o._z.declined)return"closed";else if(n===o._z.expired)return"expired";else if(n===o._z.cancelled)return"cancelled";return null}function g(e){if(e){var t;let n;if(!q([e.request,...e.dispenses]))throw Error(d);return n=A(t=e.request),(t.dispenseRequest?.quantity?.value?t.dispenseRequest.quantity.value*(1+(n||0)):null)-y(e.dispenses)}return 0}function y(e){if(!e)return 0;if(!q(e))throw Error(d);return e.map(e=>e.quantity?.value?e.quantity?.value:0).reduce((e,t)=>e+t,0)}function E(e,t){return t?.filter(t=>t?.authorizingPrescription?.some(t=>t.reference.endsWith(e.id)))}function b(e){return e?e.find(e=>!("system"in e)||void 0===e.system):null}function v(e){return b(e)?.display}function T(e){return b(e)?.code}function C(e){return e?.length>0?e[0]:null}function N(e){return e?.extension?.find(e=>e.url===c.Yj)?.valueCode}function D(e){return`${l.fhirBaseUrl}/Medication?code=${e}`}function S(e){return e.medicationReference?e.medicationReference.display:v(e?.medicationCodeableConcept.coding)+": "+e?.medicationCodeableConcept.text}function k(e){return{medicationReference:e.medicationReference,medicationCodeableConcept:e.medicationCodeableConcept}}function P(e){let t=e?.sort(x);return t&&t.length>0?t[0].status:null}function w(e,t){return e.find(e=>e.dispenses.find(e=>e.id===t.id))}function L(e){if(!e||!e.extension)return null;let t=e.extension.find(e=>e.url===c.Wz);if(!t||!t.extension)return null;let n=t.extension.find(e=>e.url===c.Wz+"#drugName");return n?n.valueString:null}function B(e){return`${l.fhirBaseUrl}/${c.c1}?encounter=${e}&_revinclude=MedicationDispense:prescription&_include=MedicationRequest:encounter`}function I(e,t,n,i,s,a,o){return r()(e||("ACTIVE"===t?"${fhirBaseUrl}/${PRESCRIPTIONS_TABLE_ENDPOINT}&_getpagesoffset=${pageOffset}&_count=${pageSize}&date=ge${date}&status=${status}"+(a?"&patientSearchTerm=${patientSearchTerm}":"")+(o?"&location=${location}":""):"${fhirBaseUrl}/${PRESCRIPTIONS_TABLE_ENDPOINT}&_getpagesoffset=${pageOffset}&_count=${pageSize}&status=${status}"+(a?"&patientSearchTerm=${patientSearchTerm}":"")+(o?"&location=${location}":"")))({fhirBaseUrl:l.fhirBaseUrl,PRESCRIPTIONS_TABLE_ENDPOINT:c.T,status:t,pageOffset:n,pageSize:i,date:s,patientSearchTerm:a,location:o})}function R(e){return"MedicationRequest"==e.resourceType?e.dispenseRequest?.quantity:"MedicationDispense"==e.resourceType?e.quantity:void 0}function q(e){if(!e)return!0;{let t=e.map(e=>R(e)?.code).filter(e=>e);return!(t.length>0)||t.every(e=>e===t[0])}}function A(e){return"MedicationRequest"==e.resourceType?e.dispenseRequest?.numberOfRepeatsAllowed:null}function U(e){return e?.includes("/")?e.split("/")[1]:e}async function M(e,t){await e(e=>"string"==typeof e&&(e.startsWith(`${l.fhirBaseUrl}/${c.T}`)||e.startsWith(`${l.fhirBaseUrl}/${c.c1}?encounter=${t}`))),$.setState(e=>({staleEncounterUuids:e.staleEncounterUuids.filter(e=>e!==t)}))}function F(e){$.setState(t=>({staleEncounterUuids:[...t.staleEncounterUuids,e]}))}function x(e,t){if(null===t.whenHandedOver)return 1;if(null===e.whenHandedOver)return -1;let n=(0,l.parseDate)(t.whenHandedOver).getTime()-(0,l.parseDate)(e.whenHandedOver).getTime();return 0!==n?n:e.id.localeCompare(t.id)}function j(e){return(!e?.doseAndRate||!e?.doseAndRate[0]?.doseQuantity?.value)&&!e?.timing?.code?.coding[0]?.code&&!e?.route}let $=(0,l.createGlobalStore)("dispensing-store",{staleEncounterUuids:[]});function z(){return(0,l.useStore)($)}}}]);
|
package/dist/6983.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["6983"],{10(e,t,n){n.r(t),n.d(t,{default:()=>y});var r=n(2287),i=n.n(r),s=n(7240),a=n(1399),l=n(6940),c=n(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["6983"],{10(e,t,n){n.r(t),n.d(t,{default:()=>y});var r=n(2287),i=n.n(r),s=n(7240),a=n(1399),l=n(6940),c=n(7796),o=n(1297),p=n(6942),u=n.n(p),m=n(7351);let d="-esm-dispensing__print-prescription__faintText___dLr0o",_="-esm-dispensing__print-prescription__prescriptionInfo___aqF7T",E=({excludedPrescription:e,medicationRequests:t})=>{let n,{t:s}=(0,a.useTranslation)(),{sessionLocation:{display:o}}=(0,c.useSession)(),p=t[0]?.request?.subject,E=(0,r.useMemo)(()=>{let n=new Set;return t?.filter(t=>!e.includes(t.request.id))?.forEach(e=>{let t=e.request?.requester?.display;t&&n.add(t)}),n},[t,e]),g=(0,r.useMemo)(()=>t?.filter(t=>!e.includes(t.request.id))||[],[t,e]);return i().createElement(l.Layer,{className:"-esm-dispensing__print-prescription__printOutContainer___-oM2u"},i().createElement(l.StructuredListWrapper,null,i().createElement(l.StructuredListBody,null,i().createElement(l.StructuredListRow,{head:!0},i().createElement(l.StructuredListCell,{head:!0},i().createElement("br",null),i().createElement("br",null),i().createElement("p",{className:"-esm-dispensing__print-prescription__printoutTitle___m4vt9"},s("prescriptionInstructions","Prescription instructions")),p&&i().createElement("p",{className:u()("-esm-dispensing__print-prescription__patientName___E4e3A",d)},(n=p.display).includes("(")?n.split("(")[0]:n),i().createElement("br",null),i().createElement("br",null))),g.map(e=>{let t=e.request,n=(0,m.Gp)(t.dosageInstruction),r=(0,m.Qe)(t),a=(0,m.c1)(t);return i().createElement("div",{key:e.request.id},n&&i().createElement(l.StructuredListRow,null,i().createElement(l.StructuredListCell,null,i().createElement("p",{className:"-esm-dispensing__print-prescription__medicationName___RpbYQ"},i().createElement("strong",null,(0,m.Q0)((0,m.H_)(t)))),i().createElement("br",null),i().createElement("p",null,i().createElement("span",{className:d},s("dose","Dose")),": ",i().createElement("span",{className:_},n?.doseAndRate?.map((t,n)=>i().createElement("span",{className:_,key:`dose-${e.request.id}-${n}`},t?.doseQuantity?.value," ",t?.doseQuantity?.unit)))," ","—"," ",i().createElement("span",{className:_},n?.route?.text," — ",n?.timing?.code?.text,n?.timing?.repeat?.duration?` ${s("for","for")} ${n?.timing?.repeat?.duration} ${n?.timing?.repeat?.durationUnit}`:""),r&&i().createElement("div",null,i().createElement("span",{className:d},s("quantity","Quantity")),": ",i().createElement("span",{className:_},r.value," ",r.unit))),i().createElement("p",null,i().createElement("span",{className:d},s("datePrescribed","Date prescribed")),": "," ",i().createElement("span",{className:_},(0,c.formatDate)((0,c.parseDate)(e.request.authoredOn),{noToday:!0}))),i().createElement("p",null,i().createElement("span",{className:d},s("refills","Refills")),": "," ",i().createElement("span",{className:_},a||0===a?a:s("noRefills","No refills"))),n?.text&&i().createElement("p",null,n.text),n?.additionalInstruction?.length>0&&i().createElement("p",null,n?.additionalInstruction.map(e=>e.text).join(", ")))))}),E.size>0&&i().createElement("p",{className:"-esm-dispensing__print-prescription__prescriber___HRj2U"},s("prescribedBy","Prescribed By"),":"," ",Array.from(E.values()).map(e=>e?.split("(")?.at(0))?.join(", ")),i().createElement("p",{className:"-esm-dispensing__print-prescription__facilityName___G0h7Q"},o))))},g=({medicationRequests:e,onExcludedPrescriptionChange:t,excludedPrescription:n})=>{let{t:s}=(0,a.useTranslation)(),c=(0,r.useCallback)((e,r)=>{e?t(n.filter(e=>e!==r)):t([...n,r])},[t,n]);return i().createElement("div",null,i().createElement("p",null,i().createElement("strong",null,s("selectPrescriptions","Check prescriptions to print"))),e?.map(e=>{let t=e.request,r=(0,m.Gp)(t.dosageInstruction);return i().createElement("div",{key:t.id},r&&i().createElement(l.Checkbox,{id:t.id,labelText:(0,m.Q0)((0,m.H_)(t)),checked:!n.includes(t.id),onChange:(e,{checked:n})=>c(n,t.id)}))}))},y=({onClose:e,encounterUuid:t})=>{let{t:n}=(0,a.useTranslation)(),{medicationRequestBundles:p,error:u,isLoading:m}=(0,o.IQ)(t),[d,_]=(0,r.useState)([]),[y,b]=(0,r.useState)(null),N=(0,r.useRef)(null),f=(0,s.useReactToPrint)({content:()=>N.current,onBeforeGetContent:()=>{b(null)},onPrintError:e=>{b(n("printError","An error occurred while printing. Please try again."))},copyStyles:!0});return i().createElement(i().Fragment,null,i().createElement(l.ModalHeader,{closeModal:e,className:"-esm-dispensing__print-prescription__title___d0XGL"},n("printPrescriptions","Print prescriptions")),i().createElement(l.ModalBody,null,m&&i().createElement(l.InlineLoading,{status:"active",iconDescription:"Loading",description:n("loading","Loading prescriptions")+"...."}),u&&i().createElement(c.ErrorState,{error:u,headerTitle:n("error","Error")}),!m&&p?.length>0&&i().createElement("div",{className:"-esm-dispensing__print-prescription__printoutSelectorRow___x3qVZ"},i().createElement(g,{medicationRequests:p,excludedPrescription:d,onExcludedPrescriptionChange:_}),i().createElement("div",{ref:N},i().createElement(E,{excludedPrescription:d,medicationRequests:p}))),y&&i().createElement(l.InlineNotification,{kind:"error",title:n("printErrorTitle","Print Error"),subtitle:y})),i().createElement(l.ModalFooter,null,i().createElement(l.ButtonSet,{className:"-esm-dispensing__print-prescription__btnSet___gRrYr"},i().createElement(l.Button,{kind:"secondary",onClick:e,type:"button"},(0,c.getCoreTranslation)("cancel","Cancel")),i().createElement(l.Button,{kind:"primary",onClick:f,type:"button",disabled:m},n("print","Print")))))}}}]);
|
package/dist/8453.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["8453"],{4452(e,a,s){s.r(a),s.d(a,{default:()=>m});var t=s(2287),n=s.n(t),i=s(1399),l=s(6940),r=s(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["8453"],{4452(e,a,s){s.r(a),s.d(a,{default:()=>m});var t=s(2287),n=s.n(t),i=s(1399),l=s(6940),r=s(7796),d=s(2059),o=s.n(d);let u="-esm-dispensing__diagnoses__diagnosesContainer___-J+er",m=({encounterUuid:e,patientUuid:a})=>{let{diagnoses:s,isLoading:d,error:m}=(e=>{let a=`${r.restBaseUrl}/encounter/${e}?v=custom:(uuid,display,visit:(uuid,encounters:(uuid,diagnoses:(uuid,display,certainty,diagnosis:(coded:(uuid,display))))))`,{data:s,error:n,isLoading:i}=o()(a,r.openmrsFetch);return{error:n,isLoading:i,diagnoses:(0,t.useMemo)(()=>s?.data?.visit?.encounters?.flatMap(e=>e.diagnoses.map(e=>({id:e.diagnosis.coded.uuid,text:e.display,certainty:e.certainty}))||[])||[],[s])??[]}})(e),[c,_]=(0,t.useState)(3),g=(0,t.useMemo)(()=>[3,5,10,20,50,100],[]),{results:p,totalPages:y,currentPage:E,goTo:h}=(0,r.usePagination)(s,c),{t:T}=(0,i.useTranslation)(),b=T("diagnoses","Diagnoses"),k=(0,t.useMemo)(()=>[{header:T("diagnosis","Diagnosis"),key:"text"},{header:T("status","Status"),key:"certainty"}],[T]),C=e=>{switch(e){case"text":return"-esm-dispensing__diagnoses__diagnosisColumn___vy6gT";case"certainty":return"-esm-dispensing__diagnoses__statusColumn___rPLeI";default:return""}};return d?n().createElement(l.DataTableSkeleton,null):m?n().createElement(r.ErrorState,{headerTitle:b,error:m}):s?.length?n().createElement(l.Layer,{className:u},n().createElement(r.CardHeader,{title:b},n().createElement(n().Fragment,null)),n().createElement(l.DataTable,{useZebraStyles:!0,rows:p,headers:k},({rows:e,headers:a,getTableProps:s,getHeaderProps:t,getRowProps:i})=>n().createElement(l.Table,{...s(),className:"-esm-dispensing__diagnoses__table___yfu2M"},n().createElement(l.TableHead,null,n().createElement(l.TableRow,null,a.map(e=>n().createElement(l.TableHeader,{...t({header:e}),key:e.key,className:C(e.key)},e.header)))),n().createElement(l.TableBody,null,e.map(e=>n().createElement(l.TableRow,{...i({row:e}),key:e.id},e.cells.map(e=>n().createElement(l.TableCell,{key:e.id,className:C(e.info.header)},e.value))))))),n().createElement(l.Pagination,{page:E,pageSize:c,pageSizes:g,totalItems:s.length,onChange:({page:e,pageSize:a})=>{h(e),_(a)}})):n().createElement(l.Layer,{className:u},n().createElement(r.EmptyCard,{headerTitle:b,displayText:T("diagnosesEmpty","diagnoses")}))}}}]);
|
package/dist/9331.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["9331"],{9087(e,n,s){s.d(n,{A:()=>t});let t={productiveHeading02:"-esm-dispensing__forms__productiveHeading02___auR9w",formWrapper:"-esm-dispensing__forms__formWrapper___P2kTX",formGroup:"-esm-dispensing__forms__formGroup___V03DP",bannerLoading:"-esm-dispensing__forms__bannerLoading___ufJ5H",patientInfo:"-esm-dispensing__forms__patientInfo___cMnYx",dateTimeContainer:"-esm-dispensing__forms__dateTimeContainer___p+iNn",timePickersContainer:"-esm-dispensing__forms__timePickersContainer___xC9xQ",frequencyAndDay:"-esm-dispensing__forms__frequencyAndDay___vafQx",datePickerControl:"-esm-dispensing__forms__datePickerControl___EQG5n",buttonGroup:"-esm-dispensing__forms__buttonGroup___gooeW",contentSwitcherWrapper:"-esm-dispensing__forms__contentSwitcherWrapper___w+Cl4",reviewContainer:"-esm-dispensing__forms__reviewContainer___iuZvA",prescriptionFormSectionHeader:"-esm-dispensing__forms__prescriptionFormSectionHeader___4gHgn",prescriptionFormField:"-esm-dispensing__forms__prescriptionFormField___b1R-u"}},3214(e,n,s){s.r(n),s.d(n,{default:()=>u});var t=s(2287),i=s.n(t),o=s(2059),r=s(1399),a=s(6940),_=s(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["9331"],{9087(e,n,s){s.d(n,{A:()=>t});let t={productiveHeading02:"-esm-dispensing__forms__productiveHeading02___auR9w",formWrapper:"-esm-dispensing__forms__formWrapper___P2kTX",formGroup:"-esm-dispensing__forms__formGroup___V03DP",bannerLoading:"-esm-dispensing__forms__bannerLoading___ufJ5H",patientInfo:"-esm-dispensing__forms__patientInfo___cMnYx",dateTimeContainer:"-esm-dispensing__forms__dateTimeContainer___p+iNn",timePickersContainer:"-esm-dispensing__forms__timePickersContainer___xC9xQ",frequencyAndDay:"-esm-dispensing__forms__frequencyAndDay___vafQx",datePickerControl:"-esm-dispensing__forms__datePickerControl___EQG5n",buttonGroup:"-esm-dispensing__forms__buttonGroup___gooeW",contentSwitcherWrapper:"-esm-dispensing__forms__contentSwitcherWrapper___w+Cl4",reviewContainer:"-esm-dispensing__forms__reviewContainer___iuZvA",prescriptionFormSectionHeader:"-esm-dispensing__forms__prescriptionFormSectionHeader___4gHgn",prescriptionFormField:"-esm-dispensing__forms__prescriptionFormField___b1R-u"}},3214(e,n,s){s.r(n),s.d(n,{default:()=>u});var t=s(2287),i=s.n(t),o=s(2059),r=s(1399),a=s(6940),_=s(7796),d=s(9513),c=s(1297),p=s(7351),m=s(8035),l=s(9087);let u=({workspaceProps:{medicationDispense:e,mode:n,patientUuid:s,encounterUuid:u,customWorkspaceTitle:g},closeWorkspace:f})=>{let{t:C}=(0,r.useTranslation)(),{mutate:b}=(0,o.useSWRConfig)(),h=(0,_.useConfig)(),{patient:E,isLoading:k}=(0,_.usePatient)(s),[P,v]=(0,t.useState)(),[S,w]=(0,t.useState)(!1),[x,A]=(0,t.useState)(!1),[F,T]=(0,t.useState)([]),{reasonForPauseValueSet:D}=(0,d.M5)(h.valueSets.reasonForPause.uuid);(0,t.useEffect)(()=>{let e=[];if(D?.compose?.include){let n=D.compose.include.find(e=>!e.system);n&&(n.concept?.forEach(n=>e.push({id:n.code,text:n.display})),e.sort((e,n)=>e.text.localeCompare(n.text)))}T(e)},[D]),(0,t.useEffect)(()=>v(e),[e]),(0,t.useEffect)(()=>{P&&P.statusReasonCodeableConcept?.coding[0].code?w(!0):w(!1)},[P]);let R=(0,t.useMemo)(()=>{if(E)return{patient:E,patientUuid:s,hideActionsOverflow:!0}},[E,s]);return i().createElement(_.Workspace2,{title:g??C("pausePrescription","Pause prescription")},i().createElement(a.Form,{className:l.A.formWrapper},i().createElement("div",null,k&&i().createElement(a.InlineLoading,{className:l.A.bannerLoading,iconDescription:"Loading",description:"Loading banner",status:"active"}),E&&i().createElement(_.ExtensionSlot,{name:"patient-header-slot",state:R}),i().createElement("section",{className:l.A.formGroup},i().createElement(_.ResponsiveWrapper,null,i().createElement(a.ComboBox,{id:"reasonForPause",items:F,titleText:C("reasonForPause","Reason for pause"),itemToString:e=>e?.text,initialSelectedItem:{id:e.statusReasonCodeableConcept?.coding[0]?.code,text:e.statusReasonCodeableConcept?.text},onChange:({selectedItem:e})=>{v({...P,statusReasonCodeableConcept:{coding:[{code:e?.id}]}})}})))),i().createElement("section",{className:l.A.buttonGroup},i().createElement(a.Button,{disabled:x,onClick:()=>{f()},kind:"secondary"},(0,_.getCoreTranslation)("cancel","Cancel")),i().createElement(a.Button,{disabled:!S||x,onClick:()=>{if(!x){A(!0);let s=new AbortController;(0,p.gY)(u),(0,d.A7)(P,m.NV.on_hold,s).then(n=>n.ok&&!e.id?(0,c.NT)((0,p.vj)(P.authorizingPrescription[0].reference),m.O7.on_hold):n).then(e=>{e.ok&&((0,p.Yi)(b,u),(0,_.showSnackbar)({kind:"success",title:C("enter"===n?"medicationDispensePaused":"medicationDispenseUpdated","enter"===n?"Medication dispense paused.":"Dispense record successfully updated.")}),f({discardUnsavedChanges:!0}))}).catch(e=>{(0,_.showSnackbar)({title:C("enter"===n?"medicationDispensePauseError":"medicationDispenseUpdatedError","enter"===n?"Error pausing medication dispense.":"Error updating dispense record"),kind:"error",subtitle:e?.message}),A(!1)})}}},C("enter"===n?"pause":"saveChanges","enter"===n?"Pause":"Save changes")))))}}}]);
|
package/dist/9866.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["9866"],{6913(e,s,t){t.r(s),t.d(s,{default:()=>g});var n=t(2287),i=t.n(n),r=t(2059),o=t(6940),l=t(1399),a=t(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).push([["9866"],{6913(e,s,t){t.r(s),t.d(s,{default:()=>g});var n=t(2287),i=t.n(n),r=t(2059),o=t(6940),l=t(1399),a=t(7796),d=t(1297),p=t(7351),c=t(9513),u=t(6339),m=t(8035);let g=({patient:e,encounterUuid:s,close:t})=>{let{dispenserProviderRoles:n}=(0,a.useConfig)(),g=(0,a.useSession)(),k=(0,c.u9)(n),{medicationRequestBundles:_,isLoading:h}=(0,d.IQ)(s),{t:b}=(0,l.useTranslation)(),{mutate:f}=(0,r.useSWRConfig)(),[E,w]=i().useState(!1),C=async()=>{w(!0),(0,p.gY)(s);try{for(let e of _){let s=(0,c.ux)(e.request,g,k,!0),t=(0,p.Q0)((0,p.H_)(e.request));await (0,c.A7)(s,m.NV.completed).then(t=>{let n=0==e.request.dispenseRequest.numberOfRepeatsAllowed;return t.ok&&n?(0,d.NT)((0,p.vj)(s.authorizingPrescription[0].reference),m.O7.completed).then(()=>t):t}).then(()=>{(0,a.showSnackbar)({title:b("stockDispensed","Stock dispensed"),subtitle:t,isLowContrast:!1})}).catch(e=>{(0,a.showSnackbar)({title:b("errorDispensingMedication","Error dispensing medication"),kind:"error",subtitle:b("errorDispensingMedicationMessage","{{medication}}: {{error}}",{medication:t,error:e?.message})})})}t()}finally{(0,p.Yi)(f,s),w(!1)}},y=(0,a.getPatientName)(e);return i().createElement(i().Fragment,null,i().createElement(o.ModalHeader,null,b("dispenseAllPrescriptions","Dispense prescriptions")),i().createElement(o.ModalBody,null,i().createElement("p",{className:"-esm-dispensing__on-prescription-filled__modalDescription___lNR6p"},i().createElement(l.Trans,{i18nKey:"dispenseAllPrescriptionsConfirmation"},"Would you like to mark prescriptions ordered for ",i().createElement("strong",null,{patientName:y})," as dispensed? Orders with no refills will be marked as completed.")),_.map(e=>i().createElement(u.A,{key:e.request.id,medicationEvent:e.request}))),i().createElement(o.ModalFooter,null,i().createElement(o.Button,{disabled:E,kind:"secondary",onClick:t},b("createOrderWithoutDispensing","Create order without dispensing")),i().createElement(o.Button,{disabled:E||h,onClick:()=>{C()}},b("dispenseAllPrescriptions","Dispense all prescriptions"))))}}}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var _openmrs_esm_dispensing_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@openmrs/esm-dispensing-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@openmrs/esm-dispensing-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,i,o={340(e,t,r){"use strict";var n,i,o,a,s,l,u,p,c,d,f,h,m=r(7032),g=r.n(m);let y=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),b={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(i=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?i:{},M=null!=(o=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?o:{},O=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},_=null!=(s=null==(d=r.consumesLoadingData)?void 0:d.moduleIdToConsumeDataMapping)?s:{},v={},R=[],T={},w=null==(f=r.initializeExposesData)?void 0:f.shareScope;for(let e in g())r.federation[e]=g()[e];m(r.federation,"consumesLoadingModuleToHandlerMapping",()=>{let e={};for(let[t,r]of Object.entries(_))e[t]={getter:r.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:r.requiredVersion,strictVersion:r.strictVersion,singleton:r.singleton,eager:r.eager},scope:[r.shareScope]},shareKey:r.shareKey};return e}),m(r.federation,"initOptions",()=>({})),m(r.federation.initOptions,"name",()=>"@openmrs/esm-dispensing-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(M))for(let n of r)if("object"==typeof n&&null!==n){let{name:r,version:i,factory:o,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:i,scope:[t],shareConfig:p,get:o};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(b).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>y),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>b),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=b[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},4196(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},9369(e,t){var r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=o(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=i(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},1222(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(9369);let n=r(1146),i=r(3054),o={...i.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=i.helpers.share,s=i.helpers.utils;t.default={global:o,share:a,utils:s},t.global=o,t.share=a,t.utils=s},7201(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(9369);let n=r(1146),i=r(3054),o=r(9170);function a(e){let t=new((0,i.getGlobalFederationConstructor)()||i.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,i.setGlobalFederationInstance)(t),t}let s=null;(0,i.setGlobalFederationConstructor)(i.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return i.Module}}),t.ModuleFederation=i.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?i.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return i.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return i.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return i.loadScriptNode}}),t.loadShare=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return i.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.registerShared.apply(s,e)}},1146(e,t,r){r(9369);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-dispensing-app:1.11.2-pre.1987";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},1326(e,t){var r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=o(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=i(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3026(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},9592(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},5769(e,t,r){let n=r(3026),i=r(9671),o=r(9864),a=r(9296),s=r(2742);t.consumes=function(e){i.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:p,moduleToHandlerMapping:c}=e;n.attachShareScopeMap(u),u.o(p,t)&&p[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:i}=c[e];if(i?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=i.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let i=u.federation.instance;if(!i)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=o.getUsedExports(u,p),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[i.options.name]});let y=i.loadShare(p,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:p}));return h?.()||d()}return e});y.then?r.push(l[e]=y.then(t).catch(n)):t(y)}catch(e){n(e)}})}},9296(e,t){t.RUNTIME_012="RUNTIME-012"},2742(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let i=[`${[t[e]]} #${e}`];return r&&i.push(`args: ${JSON.stringify(r)}`),i.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&i.push(`Original Error Message:
|
|
1
|
+
var _openmrs_esm_dispensing_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@openmrs/esm-dispensing-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@openmrs/esm-dispensing-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,i,o={340(e,t,r){"use strict";var n,i,o,a,s,l,u,p,c,d,f,h,m=r(7032),g=r.n(m);let y=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),b={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(i=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?i:{},M=null!=(o=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?o:{},O=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},_=null!=(s=null==(d=r.consumesLoadingData)?void 0:d.moduleIdToConsumeDataMapping)?s:{},v={},R=[],T={},w=null==(f=r.initializeExposesData)?void 0:f.shareScope;for(let e in g())r.federation[e]=g()[e];m(r.federation,"consumesLoadingModuleToHandlerMapping",()=>{let e={};for(let[t,r]of Object.entries(_))e[t]={getter:r.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:r.requiredVersion,strictVersion:r.strictVersion,singleton:r.singleton,eager:r.eager},scope:[r.shareScope]},shareKey:r.shareKey};return e}),m(r.federation,"initOptions",()=>({})),m(r.federation.initOptions,"name",()=>"@openmrs/esm-dispensing-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(M))for(let n of r)if("object"==typeof n&&null!==n){let{name:r,version:i,factory:o,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:i,scope:[t],shareConfig:p,get:o};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(b).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>y),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>b),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=b[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},4196(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},9369(e,t){var r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=o(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=i(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},1222(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(9369);let n=r(1146),i=r(3054),o={...i.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=i.helpers.share,s=i.helpers.utils;t.default={global:o,share:a,utils:s},t.global=o,t.share=a,t.utils=s},7201(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(9369);let n=r(1146),i=r(3054),o=r(9170);function a(e){let t=new((0,i.getGlobalFederationConstructor)()||i.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,i.setGlobalFederationInstance)(t),t}let s=null;(0,i.setGlobalFederationConstructor)(i.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return i.Module}}),t.ModuleFederation=i.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?i.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return i.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return i.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return i.loadScriptNode}}),t.loadShare=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return i.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,i.assert)(s,o.RUNTIME_009,o.runtimeDescMap),s.registerShared.apply(s,e)}},1146(e,t,r){r(9369);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-dispensing-app:1.11.2-pre.1989";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},1326(e,t){var r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=o(t),u=0,p=l.length;u<p;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=i(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3026(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},9592(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},5769(e,t,r){let n=r(3026),i=r(9671),o=r(9864),a=r(9296),s=r(2742);t.consumes=function(e){i.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:p,moduleToHandlerMapping:c}=e;n.attachShareScopeMap(u),u.o(p,t)&&p[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:i}=c[e];if(i?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=i.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let i=u.federation.instance;if(!i)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=o.getUsedExports(u,p),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[i.options.name]});let y=i.loadShare(p,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:p}));return h?.()||d()}return e});y.then?r.push(l[e]=y.then(t).catch(n)):t(y)}catch(e){n(e)}})}},9296(e,t){t.RUNTIME_012="RUNTIME-012"},2742(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let i=[`${[t[e]]} #${e}`];return r&&i.push(`args: ${JSON.stringify(r)}`),i.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&i.push(`Original Error Message:
|
|
2
2
|
${n}`),i.join("\n")}},2176(e,t){t.getSharedFallbackGetter=({shareKey:e,factory:t,version:r,webpackRequire:n,libraryType:i="global"})=>{let{runtime:o,instance:a,bundlerRuntime:s,sharedFallback:l}=n.federation;if(!l)return t;let u=l[e];if(!u)return t;let p=r?u.find(e=>e[1]===r):u[0];if(!p)throw Error(`No fallback item found for shareKey: ${e} and version: ${r}`);return()=>o.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:p[2],entry:`${n.p}${p[0]}`,type:i,entryGlobalName:p[2],shareScope:"default"}}).then(t=>{if(!t)throw Error(`Failed to load fallback entry for shareKey: ${e} and version: ${r}`);return t.init(n.federation.instance,s).then(()=>t.get())})}},9864(e,t){t.getUsedExports=function(e,t){let r=e.federation.usedExports;if(r)return r[t]}},7032(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let n=r(1326),i=r(3026),o=r(5313),a=r(5769),s=r(2614),l=r(8066),u=r(8593),p=r(6554),c=r(2176),d=r(7201);d=n.__toESM(d);let f={remotes:o.remotes,consumes:a.consumes,I:s.initializeSharing,S:{},installInitialConsumes:l.installInitialConsumes,initContainerEntry:u.initContainerEntry,init:p.init,getSharedFallbackGetter:c.getSharedFallbackGetter},h={runtime:d,instance:void 0,initOptions:void 0,bundlerRuntime:f,attachShareScopeMap:i.attachShareScopeMap,bundlerRuntimeOptions:{}},m=h.instance,g=h.initOptions,y=h.bundlerRuntimeOptions;t.attachShareScopeMap=i.attachShareScopeMap,t.bundlerRuntime=f,t.bundlerRuntimeOptions=y,t.default=h,t.initOptions=g,t.instance=m,Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return d}})},6554(e,t,r){let n=r(1326),i=r(7201),o=r(1222);o=n.__toESM(o),t.init=function({webpackRequire:e}){let{initOptions:t,runtime:n,sharedFallback:a,bundlerRuntime:s,libraryType:l}=e.federation;if(!t)throw Error("initOptions is required!");return t.plugins||=[],t.plugins.push({name:"tree-shake-plugin",beforeInit(t){let{userOptions:n,origin:u,options:p}=t,c=n.version||p.version;if(!a)return t;let d=n.shared||{},f=[];Object.keys(d).forEach(t=>{(Array.isArray(d[t])?d[t]:[d[t]]).forEach(r=>{f.push([t,r]),"get"in r&&(r.treeShaking||={},r.treeShaking.get=r.get,r.get=s.getSharedFallbackGetter({shareKey:t,factory:r.get,webpackRequire:e,libraryType:l,version:r.version}))})});let h=o.default.global.getGlobalSnapshotInfoByModuleInfo({name:u.name,version:c});return h&&"shared"in h&&(Object.keys(p.shared||{}).forEach(e=>{p.shared[e].forEach(t=>{f.push([e,t])})}),f.forEach(([e,t])=>{((e,t)=>{let n=h.shared.find(t=>t.sharedName===e);if(!n)return;let{treeShaking:o}=t;if(!o)return;let{secondarySharedTreeShakingName:a,secondarySharedTreeShakingEntry:s,treeShakingStatus:p}=n;o.status!==p&&(o.status=p,s&&l&&a&&(o.get=async()=>{let e=await (0,i.getRemoteEntry)({origin:u,remoteInfo:{name:a,entry:s,type:l,entryGlobalName:a,shareScope:"default"}});return await e.init(u,r.federation.bundlerRuntime),e.get()}))})(e,t)})),t}}),n.init(t)}},8593(e,t){t.initContainerEntry=function(e){let{webpackRequire:t,shareScope:r,initScope:n,shareScopeKey:i,remoteEntryInitOptions:o}=e;if(!t.S||!t.federation||!t.federation.instance||!t.federation.initOptions)return;let a=t.federation.instance;a.initOptions({name:t.federation.initOptions.name,remotes:[],...o});let s=o?.shareScopeKeys,l=o?.shareScopeMap;if(i&&"string"!=typeof i)i.forEach(e=>{if(!s||!l)return void a.initShareScopeMap(e,r,{hostShareScopeMap:o?.shareScopeMap||{}});l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:o?.shareScopeMap||{}})});else{let e=i||"default";Array.isArray(s)?s.forEach(e=>{l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:o?.shareScopeMap||{}})}):a.initShareScopeMap(e,r,{hostShareScopeMap:o?.shareScopeMap||{}})}return(t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),Array.isArray(i))?t.federation.initOptions.shared?t.I(i,n):Promise.all(i.map(e=>t.I(e,n))).then(()=>!0):t.I(i||"default",n)}},2614(e,t,r){let n=r(3026),i=r(9592);t.initializeSharing=function({shareScopeName:e,webpackRequire:t,initPromises:r,initTokens:o,initScope:a}){let s=Array.isArray(e)?e:[e];var l=[],u=function(s){a||(a=[]);let l=t.federation.instance;var u=o[s];if(u||(u=o[s]={from:l.name}),a.indexOf(u)>=0)return;a.push(u);let p=r[s];if(p)return p;var c=r=>{var n=e=>{let t;return t="Initialization of sharing external failed: "+e,"u">typeof console&&console.warn&&console.warn(t)};try{var i=t(r);if(!i)return;var o=r=>r&&r.init&&r.init(t.S[s],a,{shareScopeMap:t.S||{},shareScopeKeys:e});if(i.then)return d.push(i.then(o,n));var l=o(i);if(l&&"boolean"!=typeof l&&l.then)return d.push(l.catch(n))}catch(e){n(e)}};let d=l.initializeSharing(s,{strategy:l.options.shareStrategy,initScope:a,from:"build"});n.attachShareScopeMap(t);let f=t.federation.bundlerRuntimeOptions.remotes;return(f&&Object.keys(f.idToRemoteMap).forEach(e=>{let t=f.idToRemoteMap[e],r=f.idToExternalAndNameMapping[e][2];if(t.length>1)c(r);else if(1===t.length){let e=t[0];i.FEDERATION_SUPPORTED_TYPES.includes(e.externalType)||c(r)}}),d.length)?r[s]=Promise.all(d).then(()=>r[s]=!0):r[s]=!0};return s.forEach(e=>{l.push(u(e))}),Promise.all(l).then(()=>!0)}},8066(e,t,r){let n=r(9671),i=r(9864);t.installInitialConsumes=function(e){n.updateConsumeOptions(e);let{moduleToHandlerMapping:t,webpackRequire:r,installedModules:o,initialConsumes:a,asyncLoad:s}=e,l=[];a.forEach(e=>{l.push([e,()=>(function(e){let{moduleId:t,moduleToHandlerMapping:r,webpackRequire:n,asyncLoad:o}=e,a=n.federation.instance;if(!a)throw Error("Federation instance not found!");let{shareKey:s,shareInfo:l}=r[t];try{let e=i.getUsedExports(n,s),t={...l};if(e&&(t.treeShaking={usedExports:e,useIn:[a.options.name]}),o)return a.loadShare(s,{customShareInfo:t});return a.loadShareSync(s,{customShareInfo:t})}catch(e){throw console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.'),console.error("The original error message is as follows: "),e}})({moduleId:e,moduleToHandlerMapping:t,webpackRequire:r,asyncLoad:s})])});let u=(e,n)=>{r.m[e]=i=>{o[e]=0,delete r.c[e];let a=n();if("function"!=typeof a)throw Error(`Shared module is not available for eager consumption: ${e}`);let s=a(),{shareInfo:l}=t[e];if(l?.shareConfig?.layer&&s&&"object"==typeof s)try{s.hasOwnProperty("layer")&&void 0!==s.layer||(s.layer=l.shareConfig.layer)}catch(e){}i.exports=s}};if(s)return Promise.all(l.map(async([e,t])=>{let r=await t();u(e,()=>r)}));l.forEach(([e,t])=>{u(e,t)})}},5313(e,t,r){r(1326);let n=r(3026),i=r(9592),o=r(9671),a=r(1853);t.remotes=function(e){o.updateRemoteOptions(e);let{chunkId:t,promises:r,webpackRequire:s,chunkMapping:l,idToExternalAndNameMapping:u,idToRemoteMap:p}=e;n.attachShareScopeMap(s),s.o(l,t)&&l[t].forEach(e=>{let t=s.R;t||(t=[]);let n=u[e],o=p[e]||[];if(t.indexOf(n)>=0)return;if(t.push(n),n.p)return r.push(n.p);let l=t=>{t||(t=Error("Container missing")),"string"==typeof t.message&&(t.message+=`
|
|
3
|
-
while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},c=(e,t,i,o,a,s)=>{try{let u=e(t,i);if(!u||!u.then)return a(u,o,s);{let e=u.then(e=>a(e,o),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,i)=>c(r.get,n[1],t,0,f,i),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===o.length&&i.FEDERATION_SUPPORTED_TYPES.includes(o[0].externalType)&&o[0].name?c(()=>{try{let e=(0,a.decodeName)(o[0].name,a.ENCODE_NAME_PREFIX)+n[1].slice(1),t=s.federation.instance,r=()=>s.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===t.options.shareStrategy){let e=Array.isArray(n[0])?n[0]:[n[0]];return Promise.all(e.map(e=>t.sharedHandler.initializeSharing(e))).then(()=>r())}return r()}catch(e){l(e)}},n[2],0,0,f,1):c(s,n[2],0,0,(e,t,r)=>e?c(s.I,n[0],0,e,d,r):l(),1)})}},9671(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:i}=t,{sharedFallback:o,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:i={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(i).forEach(([e,n])=>{r[e]||(r[e]={getter:o?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:o?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:o?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){let{initialConsumes:t=[]}=e;l.forEach(e=>{t.includes(e)||t.push(e)})}if("chunkMapping"in e){let{chunkMapping:t={}}=e;Object.entries(u).forEach(([e,r])=>{t[e]||(t[e]=[]),r.forEach(r=>{t[e].includes(r)||t[e].push(r)})})}n._updated=1}if(i&&!i._updated){let{federation:e}=t;if(!e.instance||!i.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(i.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:i,factory:o,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={requiredVersion:`^${i}`},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:i,scope:[e],shareConfig:p,get:o};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),i._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:i={}}=e,{remotesLoadingData:o}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!o||o._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=o;if(s&&l){for(let[e,t]of Object.entries(l))if(r[e]||(r[e]=[t.shareScope,t.name,t.externalModuleId]),!n[e]&&a[t.remoteName]){let r=a[t.remoteName];n[e]||=[],r.forEach(t=>{n[e].includes(t)||n[e].push(t)})}i&&Object.entries(s).forEach(([e,t])=>{i[e]||(i[e]=[]),t.forEach(t=>{i[e].includes(t)||i[e].push(t)})}),o._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=o,s.c=a,s.x=()=>s(4196),s.federation||(s.federation={chunkMatcher:function(e){return!/^(5441|5604|7656|970)$/.test(e)},rootOutputDir:""}),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".js",s.miniCssF=e=>""+e+".css",s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l={},s.l=function(e,t,r,n){if(l[e])return void l[e].push(t);if(void 0!==r)for(var i,o,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var p=a[u];if(p.getAttribute("src")==e||p.getAttribute("data-rspack")=="@openmrs/esm-dispensing-app:"+r){i=p;break}}i||(o=!0,(i=document.createElement("script")).timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-rspack","@openmrs/esm-dispensing-app:"+r),i.src=e),l[e]=[t];var c=function(t,r){i.onerror=i.onload=null,clearTimeout(d);var n=l[e];if(delete l[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=c.bind(null,i.onerror),i.onload=c.bind(null,i.onload),o&&document.head.appendChild(i)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@carbon/react",version:"1.92.1",factory:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8891"),s.e("8881"),s.e("5604"),s.e("7656"),s.e("5461")]).then(()=>()=>s(6696)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"10.0.1-pre.5753",factory:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8776"),s.e("5186"),s.e("5604"),s.e("7656"),s.e("970"),s.e("5441")]).then(()=>()=>s(2027)),eager:0,singleton:1,requiredVersion:"10.x",strictVersion:0},{name:"dayjs",version:"1.11.13",factory:()=>s.e("2538").then(()=>()=>s(6734)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([s.e("5098"),s.e("5604")]).then(()=>()=>s(961)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("3379"),s.e("5604")]).then(()=>()=>s(673)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("6237").then(()=>()=>s(6540)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("5604")]).then(()=>()=>s(4993)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("5604"),s.e("5898")]).then(()=>()=>s(4225)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("5604"),s.e("1578")]).then(()=>()=>s(3041)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("5604"),s.e("8410")]).then(()=>()=>s(2177)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@openmrs/esm-dispensing-app"},s.I=s.I||function(){throw Error("should have __webpack_require__.I")},s.g.importScripts&&(u=s.g.location+"");var l,u,p=s.g.document;if(!u&&p&&(p.currentScript&&"SCRIPT"===p.currentScript.tagName.toUpperCase()&&(u=p.currentScript.src),!u)){var c=p.getElementsByTagName("script");if(c.length)for(var d=c.length-1;d>-1&&(!u||!/^http(s?):/.test(u));)u=c[d--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");if(s.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.consumesLoadingData={chunkMapping:{970:["6940","2059","9910","1399"],5212:["4685"],5441:["9648","6510","492"],7656:["8171"],5604:["2287"]},moduleIdToConsumeDataMapping:{2287:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6237").then(()=>()=>s(6540))},8171:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("5098").then(()=>()=>s(961))},2059:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("6029")]).then(()=>()=>s(2177))},6940:{shareScope:"default",shareKey:"@carbon/react",import:"@carbon/react",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8891"),s.e("8881"),s.e("7656")]).then(()=>()=>s(6696))},9910:{shareScope:"default",shareKey:"dayjs",import:"dayjs",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("2538").then(()=>()=>s(6734))},9648:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("3517")]).then(()=>()=>s(4225))},1399:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3379").then(()=>()=>s(673))},4685:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"10.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8776"),s.e("7656"),s.e("5441")]).then(()=>()=>s(2027))},492:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6362").then(()=>()=>s(4993))},6510:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9197")]).then(()=>()=>s(3041))}},initialConsumes:[]},s.f.consumes=s.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},"u">typeof document){var f=function(e,t,r,n,i){var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",s.nc&&(o.nonce=s.nc),o.href=t,o.onerror=o.onload=function(r){if(o.onerror=o.onload=null,"load"===r.type)n();else{var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=s,o.parentNode&&o.parentNode.removeChild(o),i(l)}},r?r.parentNode.insertBefore(o,r.nextSibling):document.head.appendChild(o),o},h=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var i=r[n],o=i.getAttribute("data-href")||i.getAttribute("href");if(o&&(o=o.split("?")[0]),"stylesheet"===i.rel&&(o===e||o===t))return i}for(var a=document.getElementsByTagName("style"),n=0;n<a.length;n++){var i=a[n],o=i.getAttribute("data-href");if(o===e||o===t)return i}},m={5215:0};s.f.miniCss=function(e,t){if(m[e])t.push(m[e]);else 0!==m[e]&&({3438:1,3877:1,4302:1,4318:1,5212:1,6983:1,8453:1,8776:1,9331:1,9866:1})[e]&&t.push(m[e]=new Promise(function(t,r){var n=s.miniCssF(e),i=s.p+n;if(h(n,i))return t();f(e,i,null,t,r)}).then(function(){m[e]=0},function(t){throw delete m[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("8891"),s.e("5186"),s.e("2754"),s.e("5604"),s.e("970"),s.e("5212")]).then(()=>()=>s(5831))},shareScope:"default"},s.getContainer=s.getContainer||function(){throw Error("should have __webpack_require__.getContainer")},s.initContainer=s.initContainer||function(){throw Error("should have __webpack_require__.initContainer")},e={5215:0},s.f.j=function(t,r){var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(5441|5604|7656|970)$/.test(t))e[t]=0;else{var i=new Promise((r,i)=>n=e[t]=[r,i]);r.push(n[2]=i);var o=s.p+s.u(t),a=Error();s.l(o,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,i,[o,a,l]=r,u=0;if(o.some(t=>0!==e[t])){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);l&&l(s)}for(t&&t(r);u<o.length;u++)i=o[u],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},(r=globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),s.ruid="bundler=rspack@1.7.9",n=s.x,i=!1,s.x=function(){if(i||(i=!0,s(340)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_openmrs_esm_dispensing_app=s.x()})();
|
|
3
|
+
while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},c=(e,t,i,o,a,s)=>{try{let u=e(t,i);if(!u||!u.then)return a(u,o,s);{let e=u.then(e=>a(e,o),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,i)=>c(r.get,n[1],t,0,f,i),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===o.length&&i.FEDERATION_SUPPORTED_TYPES.includes(o[0].externalType)&&o[0].name?c(()=>{try{let e=(0,a.decodeName)(o[0].name,a.ENCODE_NAME_PREFIX)+n[1].slice(1),t=s.federation.instance,r=()=>s.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===t.options.shareStrategy){let e=Array.isArray(n[0])?n[0]:[n[0]];return Promise.all(e.map(e=>t.sharedHandler.initializeSharing(e))).then(()=>r())}return r()}catch(e){l(e)}},n[2],0,0,f,1):c(s,n[2],0,0,(e,t,r)=>e?c(s.I,n[0],0,e,d,r):l(),1)})}},9671(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:i}=t,{sharedFallback:o,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:i={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(i).forEach(([e,n])=>{r[e]||(r[e]={getter:o?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:o?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:o?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){let{initialConsumes:t=[]}=e;l.forEach(e=>{t.includes(e)||t.push(e)})}if("chunkMapping"in e){let{chunkMapping:t={}}=e;Object.entries(u).forEach(([e,r])=>{t[e]||(t[e]=[]),r.forEach(r=>{t[e].includes(r)||t[e].push(r)})})}n._updated=1}if(i&&!i._updated){let{federation:e}=t;if(!e.instance||!i.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(i.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:i,factory:o,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={requiredVersion:`^${i}`},c=function(e){return void 0!==e};c(s)&&(p.singleton=s),c(l)&&(p.requiredVersion=l),c(a)&&(p.eager=a),c(u)&&(p.strictVersion=u);let d={version:i,scope:[e],shareConfig:p,get:o};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),i._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:i={}}=e,{remotesLoadingData:o}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!o||o._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=o;if(s&&l){for(let[e,t]of Object.entries(l))if(r[e]||(r[e]=[t.shareScope,t.name,t.externalModuleId]),!n[e]&&a[t.remoteName]){let r=a[t.remoteName];n[e]||=[],r.forEach(t=>{n[e].includes(t)||n[e].push(t)})}i&&Object.entries(s).forEach(([e,t])=>{i[e]||(i[e]=[]),t.forEach(t=>{i[e].includes(t)||i[e].push(t)})}),o._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=o,s.c=a,s.x=()=>s(4196),s.federation||(s.federation={chunkMatcher:function(e){return!/^(5441|5604|7656|970)$/.test(e)},rootOutputDir:""}),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".js",s.miniCssF=e=>""+e+".css",s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l={},s.l=function(e,t,r,n){if(l[e])return void l[e].push(t);if(void 0!==r)for(var i,o,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var p=a[u];if(p.getAttribute("src")==e||p.getAttribute("data-rspack")=="@openmrs/esm-dispensing-app:"+r){i=p;break}}i||(o=!0,(i=document.createElement("script")).timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-rspack","@openmrs/esm-dispensing-app:"+r),i.src=e),l[e]=[t];var c=function(t,r){i.onerror=i.onload=null,clearTimeout(d);var n=l[e];if(delete l[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=c.bind(null,i.onerror),i.onload=c.bind(null,i.onload),o&&document.head.appendChild(i)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@carbon/react",version:"1.92.1",factory:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8891"),s.e("8881"),s.e("5604"),s.e("7656"),s.e("5461")]).then(()=>()=>s(6696)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"10.0.1-pre.5753",factory:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8776"),s.e("5186"),s.e("5604"),s.e("7656"),s.e("970"),s.e("5441")]).then(()=>()=>s(2027)),eager:0,singleton:1,requiredVersion:"11.x",strictVersion:0},{name:"dayjs",version:"1.11.13",factory:()=>s.e("2538").then(()=>()=>s(6734)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([s.e("5098"),s.e("5604")]).then(()=>()=>s(961)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("3379"),s.e("5604")]).then(()=>()=>s(673)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("6237").then(()=>()=>s(6540)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("5604")]).then(()=>()=>s(4993)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("5604"),s.e("5898")]).then(()=>()=>s(4225)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("5604"),s.e("1578")]).then(()=>()=>s(3041)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("5604"),s.e("8410")]).then(()=>()=>s(2177)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@openmrs/esm-dispensing-app"},s.I=s.I||function(){throw Error("should have __webpack_require__.I")},s.g.importScripts&&(u=s.g.location+"");var l,u,p=s.g.document;if(!u&&p&&(p.currentScript&&"SCRIPT"===p.currentScript.tagName.toUpperCase()&&(u=p.currentScript.src),!u)){var c=p.getElementsByTagName("script");if(c.length)for(var d=c.length-1;d>-1&&(!u||!/^http(s?):/.test(u));)u=c[d--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");if(s.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.consumesLoadingData={chunkMapping:{970:["6940","2059","9910","1399"],5212:["7796"],5441:["9648","6510","492"],7656:["8171"],5604:["2287"]},moduleIdToConsumeDataMapping:{2287:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6237").then(()=>()=>s(6540))},8171:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("5098").then(()=>()=>s(961))},2059:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("6029")]).then(()=>()=>s(2177))},6940:{shareScope:"default",shareKey:"@carbon/react",import:"@carbon/react",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8891"),s.e("8881"),s.e("7656")]).then(()=>()=>s(6696))},9910:{shareScope:"default",shareKey:"dayjs",import:"dayjs",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("2538").then(()=>()=>s(6734))},7796:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"11.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4480"),s.e("2848"),s.e("8776"),s.e("7656"),s.e("5441")]).then(()=>()=>s(2027))},9648:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("3517")]).then(()=>()=>s(4225))},1399:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3379").then(()=>()=>s(673))},492:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6362").then(()=>()=>s(4993))},6510:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9197")]).then(()=>()=>s(3041))}},initialConsumes:[]},s.f.consumes=s.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},"u">typeof document){var f=function(e,t,r,n,i){var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",s.nc&&(o.nonce=s.nc),o.href=t,o.onerror=o.onload=function(r){if(o.onerror=o.onload=null,"load"===r.type)n();else{var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=s,o.parentNode&&o.parentNode.removeChild(o),i(l)}},r?r.parentNode.insertBefore(o,r.nextSibling):document.head.appendChild(o),o},h=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var i=r[n],o=i.getAttribute("data-href")||i.getAttribute("href");if(o&&(o=o.split("?")[0]),"stylesheet"===i.rel&&(o===e||o===t))return i}for(var a=document.getElementsByTagName("style"),n=0;n<a.length;n++){var i=a[n],o=i.getAttribute("data-href");if(o===e||o===t)return i}},m={5215:0};s.f.miniCss=function(e,t){if(m[e])t.push(m[e]);else 0!==m[e]&&({3438:1,3877:1,4302:1,4318:1,5212:1,6983:1,8453:1,8776:1,9331:1,9866:1})[e]&&t.push(m[e]=new Promise(function(t,r){var n=s.miniCssF(e),i=s.p+n;if(h(n,i))return t();f(e,i,null,t,r)}).then(function(){m[e]=0},function(t){throw delete m[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("8891"),s.e("5186"),s.e("2754"),s.e("5604"),s.e("970"),s.e("5212")]).then(()=>()=>s(5831))},shareScope:"default"},s.getContainer=s.getContainer||function(){throw Error("should have __webpack_require__.getContainer")},s.initContainer=s.initContainer||function(){throw Error("should have __webpack_require__.initContainer")},e={5215:0},s.f.j=function(t,r){var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(5441|5604|7656|970)$/.test(t))e[t]=0;else{var i=new Promise((r,i)=>n=e[t]=[r,i]);r.push(n[2]=i);var o=s.p+s.u(t),a=Error();s.l(o,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,i,[o,a,l]=r,u=0;if(o.some(t=>0!==e[t])){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);l&&l(s)}for(t&&t(r);u<o.length;u++)i=o[u],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},(r=globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),s.ruid="bundler=rspack@1.7.9",n=s.x,i=!1,s.x=function(){if(i||(i=!0,s(340)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_openmrs_esm_dispensing_app=s.x()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openmrs-esm-dispensing-app.js","sources":["webpack://@openmrs/esm-dispensing-app/webpack/runtime/jsonp_chunk_loading","webpack://@openmrs/esm-dispensing-app/webpack/runtime/embed_federation_runtime","webpack://@openmrs/esm-dispensing-app/==void 0","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/_virtual/_rolldown/runtime.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/helpers.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/index.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/utils.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/_virtual/_rolldown/runtime.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/attachShareScopeMap.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/constant.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/consumes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/error-codes/dist/error-codes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/error-codes/dist/getShortErrorMsg.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/getSharedFallbackGetter.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/getUsedExports.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/init.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/initContainerEntry.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/initializeSharing.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/installInitialConsumes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/remotes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/updateOptions.cjs","webpack://@openmrs/esm-dispensing-app/module_federation/runtime","webpack://@openmrs/esm-dispensing-app/webpack/runtime/compat_get_default_export","webpack://@openmrs/esm-dispensing-app/webpack/runtime/define_property_getters","webpack://@openmrs/esm-dispensing-app/webpack/runtime/ensure_chunk","webpack://@openmrs/esm-dispensing-app/webpack/runtime/get javascript chunk filename","webpack://@openmrs/esm-dispensing-app/webpack/runtime/get mini-css chunk filename","webpack://@openmrs/esm-dispensing-app/webpack/runtime/global","webpack://@openmrs/esm-dispensing-app/webpack/runtime/has_own_property","webpack://@openmrs/esm-dispensing-app/webpack/runtime/load_script","webpack://@openmrs/esm-dispensing-app/webpack/runtime/make_namespace_object","webpack://@openmrs/esm-dispensing-app/webpack/runtime/node_module_decorator","webpack://@openmrs/esm-dispensing-app/webpack/runtime/rspack_version","webpack://@openmrs/esm-dispensing-app/webpack/runtime/sharing","webpack://@openmrs/esm-dispensing-app/webpack/runtime/auto_public_path","webpack://@openmrs/esm-dispensing-app/webpack/runtime/css loading","webpack://@openmrs/esm-dispensing-app/webpack/runtime/consumes_loading","webpack://@openmrs/esm-dispensing-app/webpack/runtime/initialize_exposes","webpack://@openmrs/esm-dispensing-app/webpack/runtime/rspack_unique_id"],"names":["_ref","_ref1","_ref2","_ref3","_ref4","__webpack_require___remotesLoadingData","__webpack_require___remotesLoadingData1","__webpack_require___initializeSharingData","__webpack_require___consumesLoadingData","__webpack_require___consumesLoadingData1","__webpack_require___initializeExposesData","__webpack_require___consumesLoadingData2","__module_federation_runtime_plugins__","plugin","params","__module_federation_remote_infos__","__webpack_require__","override","obj","key","value","merge","fn","Array","_","_obj","_1","_obj1","Object","early","initial","remotesLoadingChunkMapping","remotesLoadingModuleIdToRemoteDataMapping","initializeSharingScopeToInitDataMapping","consumesLoadingChunkMapping","consumesLoadingModuleToConsumeDataMapping","consumesLoadinginstalledModules","initializeSharingInitPromises","initializeSharingInitTokens","containerShareScope","__module_federation_bundler_runtime__","consumesLoadingModuleToHandlerMapping","moduleId","data","shared","scope","stages","stage","name","version","factory","eager","singleton","requiredVersion","strictVersion","shareConfig","isValidValue","val","options","remote","remotesLoadingIdToExternalAndNameMappingMapping","idToRemoteMap","id","remoteData","info","chunkId","promises","initScope","shareScope","remoteEntryInitOptions","module1","getScope","moduleMap","Promise","Error","undefined","Symbol","r","Date","e","JSON","l","h","s","p","console","i","u","globalThis","Function","window","document","clearTimeout","setTimeout"],"mappings":"qzBAIU,EAqDN,EA2BA,ECpFA,EACA,E,+BCDgnBA,EAAKC,EAAMC,EAAMC,EAAMC,EAAUC,EAAuCC,EAAwCC,EAA0CC,EAAwCC,EAAyCC,EAA0CC,E,mBAAtsB,IAAMC,EAAwC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAEC,OAAAA,CAAM,CAAE,GAAKA,GAAQ,GAAG,CAAC,CAAC,CAAEA,OAAAA,CAAM,CAAEC,OAAAA,CAAM,CAAE,GAAKD,EAAOC,IAAeC,EAAqC,CAAC,EAA0I,GAAIC,AAAAA,CAAAA,EAAoB,qBAAqB,EAAEA,EAAoB,qBAAoB,GAAIA,EAAoB,UAAU,CAAC,CAAmU,IAAMC,EAAS,CAACC,EAAIC,EAAIC,KAAaF,GAAcA,CAAG,CAACC,EAAI,EAACD,CAAAA,CAAG,CAACC,EAAI,CAACC,CAAI,CAAC,EAAQC,EAAM,CAACH,EAAIC,EAAIG,KAAM,IAAMF,EAAME,IAAQC,MAAM,OAAO,CAACH,IAAyBI,MAAGC,AAAKP,CAAI,CAAMC,EAAG,EAAwBM,CAArCP,CAAyC,CAA/BC,EAAqC,CAAC,EAAE,AAAD,EAAED,CAAG,CAACC,EAAI,CAAC,IAAI,IAAIC,IAA8B,UAAf,OAAOA,GAAkBA,AAAQ,OAARA,IAAkCM,MAAIC,AAAMT,CAAI,CAAOC,EAAG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G,iBACb,EAAM,IAAI,CAAG,EACb,EAAM,OAAO,CAAG,EAChB,CAAkB,CAAC,EAAE,CAAC,EACvB,CAEF,EACyC,SAAW,EAAS,EAC9D,CAIM,EAEJ,EAAiB,CAAC,EAA4B,KACjD,IAGI,EAAU,EAHV,CAAC,EAAU,EAAa,EAAQ,CAAG,EAGhB,EAAI,EAC3B,GAAI,EAAS,IAAI,CAAC,AAAC,GAAQ,AAAwB,IAAxB,CAAe,CAAC,EAAG,EAAU,CACvD,IAAK,KAAY,EACZ,EAAoB,CAAC,CAAC,EAAa,IACtC,GAAoB,CAAC,CAAC,EAAS,CAAG,CAAW,CAAC,EAAS,AAAD,CAGpD,IAAsB,EAAQ,EACnC,CAEA,IADI,GAA4B,EAA2B,GACpD,EAAI,EAAS,MAAM,CAAE,IAC3B,EAAU,CAAQ,CAAC,EAAE,CAEpB,EAAoB,CAAC,CAAC,EAAiB,IACvC,CAAe,CAAC,EAAQ,EAExB,CAAe,CAAC,EAAQ,CAAC,EAAE,GAE5B,CAAe,CAAC,EAAQ,CAAG,CAG7B,EAGA,CADI,EAAqBc,WAAW,uCAA0C,CAAGA,WAAW,uCAA0C,EAAI,EAAE,EACzH,OAAO,CAAC,EAAe,IAAI,CAAC,KAAM,IACrD,EAAmB,IAAI,CAAG,EAAe,IAAI,CAAC,KAAM,EAAmB,IAAI,CAAC,IAAI,CAAC,IuCtFjF,EAAoB,IAAI,CAAG,uBtCAvB,EAAc,EAAoB,CAAC,CACnC,EAAS,GACb,EAAoB,CAAC,CAAG,WAKvB,GAJK,IACJ,EAAS,GACT,EAAoB,MAEjB,AAAuB,YAAvB,OAAO,EACV,OAAO,IAERH,QAAQ,IAAI,CAAC,2BACd,E"}
|
|
1
|
+
{"version":3,"file":"openmrs-esm-dispensing-app.js","sources":["webpack://@openmrs/esm-dispensing-app/webpack/runtime/jsonp_chunk_loading","webpack://@openmrs/esm-dispensing-app/webpack/runtime/embed_federation_runtime","webpack://@openmrs/esm-dispensing-app/==void 0","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/_virtual/_rolldown/runtime.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/helpers.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/index.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/runtime/dist/utils.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/_virtual/_rolldown/runtime.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/attachShareScopeMap.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/constant.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/consumes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/error-codes/dist/error-codes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/error-codes/dist/getShortErrorMsg.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/getSharedFallbackGetter.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/getUsedExports.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/init.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/initContainerEntry.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/initializeSharing.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/installInitialConsumes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/remotes.cjs","webpack://@openmrs/esm-dispensing-app/./node_modules/@module-federation/webpack-bundler-runtime/dist/updateOptions.cjs","webpack://@openmrs/esm-dispensing-app/module_federation/runtime","webpack://@openmrs/esm-dispensing-app/webpack/runtime/compat_get_default_export","webpack://@openmrs/esm-dispensing-app/webpack/runtime/define_property_getters","webpack://@openmrs/esm-dispensing-app/webpack/runtime/ensure_chunk","webpack://@openmrs/esm-dispensing-app/webpack/runtime/get javascript chunk filename","webpack://@openmrs/esm-dispensing-app/webpack/runtime/get mini-css chunk filename","webpack://@openmrs/esm-dispensing-app/webpack/runtime/global","webpack://@openmrs/esm-dispensing-app/webpack/runtime/has_own_property","webpack://@openmrs/esm-dispensing-app/webpack/runtime/load_script","webpack://@openmrs/esm-dispensing-app/webpack/runtime/make_namespace_object","webpack://@openmrs/esm-dispensing-app/webpack/runtime/node_module_decorator","webpack://@openmrs/esm-dispensing-app/webpack/runtime/rspack_version","webpack://@openmrs/esm-dispensing-app/webpack/runtime/sharing","webpack://@openmrs/esm-dispensing-app/webpack/runtime/auto_public_path","webpack://@openmrs/esm-dispensing-app/webpack/runtime/css loading","webpack://@openmrs/esm-dispensing-app/webpack/runtime/consumes_loading","webpack://@openmrs/esm-dispensing-app/webpack/runtime/initialize_exposes","webpack://@openmrs/esm-dispensing-app/webpack/runtime/rspack_unique_id"],"names":["_ref","_ref1","_ref2","_ref3","_ref4","__webpack_require___remotesLoadingData","__webpack_require___remotesLoadingData1","__webpack_require___initializeSharingData","__webpack_require___consumesLoadingData","__webpack_require___consumesLoadingData1","__webpack_require___initializeExposesData","__webpack_require___consumesLoadingData2","__module_federation_runtime_plugins__","plugin","params","__module_federation_remote_infos__","__webpack_require__","override","obj","key","value","merge","fn","Array","_","_obj","_1","_obj1","Object","early","initial","remotesLoadingChunkMapping","remotesLoadingModuleIdToRemoteDataMapping","initializeSharingScopeToInitDataMapping","consumesLoadingChunkMapping","consumesLoadingModuleToConsumeDataMapping","consumesLoadinginstalledModules","initializeSharingInitPromises","initializeSharingInitTokens","containerShareScope","__module_federation_bundler_runtime__","consumesLoadingModuleToHandlerMapping","moduleId","data","shared","scope","stages","stage","name","version","factory","eager","singleton","requiredVersion","strictVersion","shareConfig","isValidValue","val","options","remote","remotesLoadingIdToExternalAndNameMappingMapping","idToRemoteMap","id","remoteData","info","chunkId","promises","initScope","shareScope","remoteEntryInitOptions","module1","getScope","moduleMap","Promise","Error","undefined","Symbol","r","Date","e","JSON","l","h","s","p","console","i","u","globalThis","Function","window","document","clearTimeout","setTimeout"],"mappings":"qzBAIU,EAqDN,EA2BA,ECpFA,EACA,E,+BCDgnBA,EAAKC,EAAMC,EAAMC,EAAMC,EAAUC,EAAuCC,EAAwCC,EAA0CC,EAAwCC,EAAyCC,EAA0CC,E,mBAAtsB,IAAMC,EAAwC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAEC,OAAAA,CAAM,CAAE,GAAKA,GAAQ,GAAG,CAAC,CAAC,CAAEA,OAAAA,CAAM,CAAEC,OAAAA,CAAM,CAAE,GAAKD,EAAOC,IAAeC,EAAqC,CAAC,EAA0I,GAAIC,AAAAA,CAAAA,EAAoB,qBAAqB,EAAEA,EAAoB,qBAAoB,GAAIA,EAAoB,UAAU,CAAC,CAAmU,IAAMC,EAAS,CAACC,EAAIC,EAAIC,KAAaF,GAAcA,CAAG,CAACC,EAAI,EAACD,CAAAA,CAAG,CAACC,EAAI,CAACC,CAAI,CAAC,EAAQC,EAAM,CAACH,EAAIC,EAAIG,KAAM,IAAMF,EAAME,IAAQC,MAAM,OAAO,CAACH,IAAyBI,MAAGC,AAAKP,CAAI,CAAMC,EAAG,EAAwBM,CAArCP,CAAyC,CAA/BC,EAAqC,CAAC,EAAE,AAAD,EAAED,CAAG,CAACC,EAAI,CAAC,IAAI,IAAIC,IAA8B,UAAf,OAAOA,GAAkBA,AAAQ,OAARA,IAAkCM,MAAIC,AAAMT,CAAI,CAAOC,EAAG,EAA0BQ,CAAxCT,CAA6C,CAAlCC,EAAyC,CAAC,CAA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ChB,CAAkB,CAAC,EAAE,CAAC,EACvB,CAEF,EACyC,SAAW,EAAS,EAC9D,CAIM,EAEJ,EAAiB,CAAC,EAA4B,KACjD,IAGI,EAAU,EAHV,CAAC,EAAU,EAAa,EAAQ,CAAG,EAGhB,EAAI,EAC3B,GAAI,EAAS,IAAI,CAAC,AAAC,GAAQ,AAAwB,IAAxB,CAAe,CAAC,EAAG,EAAU,CACvD,IAAK,KAAY,EACZ,EAAoB,CAAC,CAAC,EAAa,IACtC,GAAoB,CAAC,CAAC,EAAS,CAAG,CAAW,CAAC,EAAS,AAAD,CAGpD,IAAsB,EAAQ,EACnC,CAEA,IADI,GAA4B,EAA2B,GACpD,EAAI,EAAS,MAAM,CAAE,IAC3B,EAAU,CAAQ,CAAC,EAAE,CAEpB,EAAoB,CAAC,CAAC,EAAiB,IACvC,CAAe,CAAC,EAAQ,EAExB,CAAe,CAAC,EAAQ,CAAC,EAAE,GAE5B,CAAe,CAAC,EAAQ,CAAG,CAG7B,EAGA,CADI,EAAqBc,WAAW,uCAA0C,CAAGA,WAAW,uCAA0C,EAAI,EAAE,EACzH,OAAO,CAAC,EAAe,IAAI,CAAC,KAAM,IACrD,EAAmB,IAAI,CAAG,EAAe,IAAI,CAAC,KAAM,EAAmB,IAAI,CAAC,IAAI,CAAC,IuCtFjF,EAAoB,IAAI,CAAG,uBtCAvB,EAAc,EAAoB,CAAC,CACnC,EAAS,GACb,EAAoB,CAAC,CAAG,WAKvB,GAJK,IACJ,EAAS,GACT,EAAoB,MAEjB,AAAuB,YAAvB,OAAO,EACV,OAAO,IAERH,QAAQ,IAAI,CAAC,2BACd,E"}
|
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 <4.0.0"},"optionalBackendDependencies":{"emrapi":{"version":">=3.3.0 <4.0.0","feature":{"flagName":"emrapi-module","label":"EMR API Module","description":"Required if the locationBehavior.restrictToVisitLocationDescendants config is set to true."}}},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces2":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","window":"dispensing-window"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","window":"dispensing-window"},{"name":"dispense-workspace","component":"dispenseWorkspace","window":"dispensing-window"},{"name":"dispensing-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"fill-prescription-window"},{"name":"dispensing-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"fill-prescription-window"},{"name":"dispensing-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"fill-prescription-window"},{"name":"dispensing-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"fill-prescription-window"},{"name":"dispensing-order-basket-add-allergy-workspace","component":"@openmrs/esm-patient-allergies-app#exportedAllergyFormWorkspace","window":"fill-prescription-window"}],"workspaceWindows2":[{"name":"dispensing-window","group":"dispensing-group"},{"name":"fill-prescription-window","group":"dispensing-group"}],"workspaceGroups2":[{"name":"dispensing-group","overlay":true}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"},{"name":"duplicate-dispense-modal","component":"duplicateDispenseModal"},{"name":"on-prescription-filled-modal","component":"onPrescriptionFilledModal"}],"version":"1.11.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0 <4.0.0"},"optionalBackendDependencies":{"emrapi":{"version":">=3.3.0 <4.0.0","feature":{"flagName":"emrapi-module","label":"EMR API Module","description":"Required if the locationBehavior.restrictToVisitLocationDescendants config is set to true."}}},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces2":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","window":"dispensing-window"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","window":"dispensing-window"},{"name":"dispense-workspace","component":"dispenseWorkspace","window":"dispensing-window"},{"name":"dispensing-patient-search-workspace","component":"@openmrs/esm-patient-search-app#patientSearchWorkspace2","window":"fill-prescription-window"},{"name":"dispensing-start-visit-workspace","component":"@openmrs/esm-patient-chart-app#exportedVisitForm","window":"fill-prescription-window"},{"name":"dispensing-order-basket-workspace","component":"@openmrs/esm-patient-orders-app#exportedOrderBasketWorkspace","window":"fill-prescription-window"},{"name":"dispensing-order-basket-add-drug-order-workspace","component":"@openmrs/esm-patient-medications-app#exportedAddDrugOrderWorkspace","window":"fill-prescription-window"},{"name":"dispensing-order-basket-add-allergy-workspace","component":"@openmrs/esm-patient-allergies-app#exportedAllergyFormWorkspace","window":"fill-prescription-window"}],"workspaceWindows2":[{"name":"dispensing-window","group":"dispensing-group"},{"name":"fill-prescription-window","group":"dispensing-group"}],"workspaceGroups2":[{"name":"dispensing-group","overlay":true}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"},{"name":"duplicate-dispense-modal","component":"duplicateDispenseModal"},{"name":"on-prescription-filled-modal","component":"onPrescriptionFilledModal"}],"version":"1.11.2-pre.1989"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-dispensing-app",
|
|
3
|
-
"version": "1.11.2-pre.
|
|
3
|
+
"version": "1.11.2-pre.1989",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Medication dispensing application",
|
|
6
6
|
"browser": "dist/openmrs-esm-dispensing-app.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@carbon/react": "1.x",
|
|
54
|
-
"@openmrs/esm-framework": "
|
|
54
|
+
"@openmrs/esm-framework": "11.x",
|
|
55
55
|
"dayjs": "1.x",
|
|
56
56
|
"react": "18.x",
|
|
57
57
|
"react-dom": "18.x",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"19c0175deb0704e2","duration":8528}
|