@openmrs/esm-patient-notes-app 13.0.2-pre.12774 → 13.0.2-pre.12788

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.
@@ -4,4 +4,4 @@
4
4
  │ 5.js (638.965 KiB)
5
5
  
6
6
 
7
- Rspack compiled with 1 warning in 29.04 s
7
+ Rspack compiled with 1 warning in 28.01 s
package/dist/2932.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_app||[]).push([["2932"],{8447(e,t,a){a.d(t,{A:()=>V});var s=a(5399),n=a.n(s),i=a(3373),o=a.n(i),r=a(222),l=a.n(r),m=a(3892),d=a(7807),c=a(1619),u=a(6195),_=a(4049),g=a(824),p=a(324),v=a(4632),f=a(5848),h=a(529),E=a(2664),y=a(6717),N=a(1273);let b=0;function k(){let{t:e}=(0,d.useTranslation)();return n().createElement("div",{"aria-hidden":"true",className:"-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H"},n().createElement("span",null,e("primary","Primary")))}function C({canMarkProvisional:e,diagnosis:t,onRemove:a,onUpdate:s}){let{t:i}=(0,d.useTranslation)(),o="PROVISIONAL"===t.certainty;return n().createElement("div",{className:"-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6",role:"group","aria-label":t.display},n().createElement(p.Checkbox,{"aria-describedby":"primary-diagnosis-requirement",checked:1===t.rank,hideLabel:!0,id:`diagnosis-${t.draftId}-primary`,labelText:i("primary","Primary"),onChange:(e,{checked:a})=>s(t,{rank:a?1:2})}),n().createElement("span",{className:"-esm-patient-notes__selected-diagnosis-card__diagnosisName___MjgaG"},o&&n().createElement(n().Fragment,null,n().createElement("span",{"aria-hidden":"true",className:"-esm-patient-notes__selected-diagnosis-card__provisionalMark___pSs51"},"?"),n().createElement("span",{className:"cds--visually-hidden"},i("provisional","Provisional")," ")),t.display),n().createElement("div",{className:"-esm-patient-notes__selected-diagnosis-card__actionsCell___ugf7H"},e&&n().createElement(p.OverflowMenu,{align:"left","aria-label":i("diagnosisActions","Actions for {{diagnosis}}",{diagnosis:t.display}),flipped:!0,iconDescription:i("diagnosisActions","Actions for {{diagnosis}}",{diagnosis:t.display}),menuOptionsClass:"-esm-patient-notes__selected-diagnosis-card__diagnosisActionsMenu___8AWXe",size:"sm"},n().createElement(p.OverflowMenuItem,{itemText:o?i("markAsConfirmed","Mark as confirmed"):i("markAsProvisional","Mark as provisional"),onClick:()=>s(t,{certainty:o?"CONFIRMED":"PROVISIONAL"})}))),n().createElement(p.Button,{hasIconOnly:!0,iconDescription:i("removeDiagnosisNamed","Remove {{diagnosis}}",{diagnosis:t.display}),kind:"ghost",onClick:()=>a(t),renderIcon:e=>n().createElement(h.R9,{size:16,...e}),size:"sm",tooltipAlignment:"end"}))}let I="-esm-patient-notes__visit-notes-form__columnLabel___EwgDF",S="-esm-patient-notes__visit-notes-form__imgThumbnailContainer___6-ih6",w="-esm-patient-notes__visit-notes-form__imgThumbnail___PGisE",D="-esm-patient-notes__visit-notes-form__savedImagesLoading___06xRV",A="-esm-patient-notes__visit-notes-form__imgThumbnailItem___XkrUE",R="-esm-patient-notes__visit-notes-form__removeButton___O7iSI",T="-esm-patient-notes__visit-notes-form__button___tic-m",x="-esm-patient-notes__visit-notes-form__row___+Ncuq",B=e=>e.some(e=>1===e.rank),L=e=>!!(e.diagnosis?.coded?.uuid||e.diagnosis?.nonCoded),M=new Set(["jpg","jpeg","png","gif","webp","bmp"]);function P({name:e,control:t,labelText:a,placeholder:s,handleSearch:i,setIsSearching:o}){let r="tablet"===(0,E.useLayoutType)();return n().createElement(g.xI,{name:e,control:t,render:({field:{value:t,onChange:l,onBlur:m}})=>n().createElement(E.ResponsiveWrapper,null,n().createElement(p.Search,{size:r?"lg":"md",id:e,labelText:a,placeholder:s,onChange:e=>{o(!0),l(e),i()},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){let a=document.getElementById(`${e}-results`)?.querySelectorAll("button");a?.length&&(t.preventDefault(),a["ArrowDown"===t.key?0:a.length-1].focus())}},value:t,onBlur:m}))})}function F({isDiagnosisNotSelected:e,isLoading:t,isSearching:a,onAddDiagnosis:i,searchResults:o,t:r,value:l}){let m=(0,s.useRef)(null),d=(0,s.useCallback)(e=>{!e&&m.current?.contains(document.activeElement)&&document.getElementById("diagnosisSearch")?.focus(),m.current=e},[]);return l?a||t?n().createElement(O,null):!a&&o?.length>0?n().createElement("ul",{ref:d,id:"diagnosisSearch-results",className:"-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY","aria-label":r("diagnosisSearchResults","Diagnosis search results"),onKeyDown:e=>{if("Escape"===e.key)e.preventDefault(),document.getElementById("diagnosisSearch")?.focus();else if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)){let t=Array.from(e.currentTarget.querySelectorAll("button")),a=t.findIndex(e=>e===document.activeElement);if(a<0)return;e.preventDefault();let s="Home"===e.key?0:"End"===e.key?t.length-1:(a+("ArrowDown"===e.key?1:-1)+t.length)%t.length;t[s].focus()}}},o.filter(e).map(e=>n().createElement("li",{className:"-esm-patient-notes__visit-notes-form__diagnosis___XsPGM",key:e.uuid},n().createElement("button",{type:"button",className:"-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E",onClick:()=>{i(e),document.getElementById("diagnosisSearch")?.focus()}},e.display)))):o?.length===0?n().createElement(E.ResponsiveWrapper,null,n().createElement(p.Tile,{className:"-esm-patient-notes__visit-notes-form__emptyResults___fCV44"},n().createElement("span",null,r("noMatchingDiagnoses","No diagnoses found matching")," ",n().createElement("strong",null,'"',l,'"')))):void 0:null}function O(){return n().createElement(n().Fragment,null,Array.from({length:5}).map((e,t)=>n().createElement(p.SkeletonText,{key:t,className:"-esm-patient-notes__visit-notes-form__skeleton___Wp-mM"})))}let V=({encounter:e,formContext:t,patientUuid:a,patient:i,visitContext:r,closeWorkspace:O})=>{let V=!!("editing"===t&&e?.uuid),{t:z}=(0,d.useTranslation)(),H="tablet"===(0,E.useLayoutType)(),U=(0,E.useSession)(),{isPrimaryDiagnosisRequired:W,...q}=(0,E.useConfig)(),j=(0,s.useMemo)(()=>({patientUuid:a}),[a]),G=(0,s.useMemo)(()=>({patientUuid:a,patient:i}),[a,i]),{clinicianEncounterRole:X,encounterNoteTextConceptUuid:K,encounterTypeUuid:$,formConceptUuid:J}=q.visitNoteConfig,[Z,Q]=(0,s.useState)(!1),[Y,ee]=(0,s.useState)(!1),[et,ea]=(0,s.useState)(null),[es,en]=(0,s.useState)(),[ei,eo]=(0,s.useState)([]),[er,el]=(0,s.useState)(),[em,ed]=(0,s.useState)(null),{allowedFileExtensions:ec,error:eu,isLoading:e_}=(0,y.useAllowedFileExtensions)(),eg=(0,s.useMemo)(()=>{let e=ec?.map(e=>e.trim().toLowerCase()).filter(Boolean);return e?.length?e.filter(e=>M.has(e)):[...M]},[ec]),ep=e_||!!eu||0===eg.length,ev=(0,E.useFeatureFlag)("rde"),ef=(0,s.useMemo)(()=>u.z.object({noteDate:ev?u.z.date():u.z.date().optional(),diagnosisSearch:u.z.string().optional(),diagnoses:u.z.array(u.z.custom()).refine(e=>!W||B(e),{message:z("atLeastOnePrimaryDiagnosis","At least one diagnosis must be selected as primary")}),clinicalNote:u.z.string().optional(),images:u.z.array(u.z.any()).optional(),removedImageIds:u.z.array(u.z.string())}),[z,ev,W]),[eh]=(0,s.useState)(()=>(e?.diagnoses??[]).filter(L).map(e=>({draftId:++b,patient:a,diagnosis:e.diagnosis.coded?.uuid?{coded:e.diagnosis.coded.uuid}:{nonCoded:e.diagnosis.nonCoded},certainty:"PROVISIONAL"===e.certainty?"PROVISIONAL":"CONFIRMED",rank:e.rank??2,display:e.display})).sort((e,t)=>Number(1===t.rank)-Number(1===e.rank))),{control:eE,formState:{dirtyFields:ey,isSubmitted:eN,isSubmitting:eb},getValues:ek,handleSubmit:eC,setValue:eI,watch:eS}=(0,g.mN)({mode:"onSubmit",resolver:(0,_.u)(ef),defaultValues:{images:[],removedImageIds:[],diagnosisSearch:"",diagnoses:eh,noteDate:V?new Date(e.encounterDatetime):new Date,clinicalNote:V?String(e?.obs?.find(e=>e.concept.uuid===K)?.value||""):""}}),{field:{value:ew,onChange:eD}}=(0,g.as)({name:"diagnoses",control:eE}),eA=eS("images"),eR=eS("removedImageIds"),{images:eT,isLoading:ex,error:eB}=(0,N.Vm)(a,V?e.uuid:void 0),{mutateVisitNotes:eL}=(0,N.aw)(a),{mutate:eM}=(0,c.useSWRConfig)(),eP=(0,s.useCallback)(()=>eM(e=>"string"==typeof e&&e.startsWith(`${E.restBaseUrl}/attachment`)),[eM]),eF=U?.sessionLocation?.uuid,eO=U?.currentProvider?.uuid,eV=(0,s.useMemo)(()=>(0,m.A)(e=>{e&&(Q(!0),(0,N.ph)(e,q.diagnosisConceptClass).then(e=>{ea(e),Q(!1)}).catch(e=>{ed(e),(0,E.createErrorHandler)()}))},500),[q.diagnosisConceptClass]),ez=(0,s.useCallback)(()=>{let e=eS("diagnosisSearch");e&&eV(e),ee(!1)},[eV,eS]),eH=(0,s.useCallback)(e=>({draftId:++b,display:e.display,diagnosis:{coded:e.uuid},patient:a,rank:2,certainty:"CONFIRMED",conceptClassUuid:q.diagnosisConceptClass}),[q.diagnosisConceptClass,a]),eU=(0,s.useMemo)(()=>Array.from(new Set(eh.flatMap(e=>e.diagnosis.coded?[e.diagnosis.coded]:[]))),[eh]),{conceptClassByUuid:eW,error:eq}=(0,N.J_)(eU),ej=(0,s.useCallback)(e=>{if(!e.diagnosis.coded)return!0;let t=e.conceptClassUuid??eW[e.diagnosis.coded];return void 0===t?!!eq:null===t||t===q.diagnosisConceptClass},[eW,eq,q.diagnosisConceptClass]),eG=(0,s.useCallback)(e=>{eI("diagnosisSearch","",{shouldDirty:!0}),ea([]);let t=ek("diagnoses");t.some(t=>t.diagnosis.coded===e.uuid)||eD([eH(e),...t])},[eH,ek,eD,eI]),eX=(0,s.useCallback)(e=>{eD(ek("diagnoses").filter(t=>t.draftId!==e.draftId)),document.getElementById("diagnosisSearch")?.focus()},[ek,eD]),eK=(0,s.useCallback)((e,t)=>{eD(ek("diagnoses").map(a=>a.draftId===e.draftId?{...a,...t}:a))},[ek,eD]),e$=(0,s.useCallback)(()=>{if(ep)return;let e=(0,E.showModal)("capture-photo-modal",{saveFile:t=>(t.capturedFromWebcam&&!t.fileName.includes(".")&&(t.fileName=`${t.fileName}.png`),eI("images",[...ek("images"),t],{shouldDirty:!0}),e(),Promise.resolve()),closeModal:()=>{e()},allowedExtensions:eg,collectDescription:!0,multipleFiles:!0,showUploadSnackbar:!1})},[eg,ek,ep,eI]),eJ=(0,s.useCallback)(t=>{let{noteDate:s,clinicalNote:n,images:i,removedImageIds:o,diagnoses:m}=t;el(void 0);let d=l()(s),c=new Date;30>=d.diff(c,"minute")&&(d=null);let u=e?.obs?.find(e=>e.concept.uuid===K),_={encounterDatetime:d?.format(),form:J,patient:a,location:eF,encounterProviders:[{encounterRole:X,provider:eO}],encounterType:$,obs:n?[{concept:{uuid:K,display:""},value:n,...u&&{uuid:u.uuid}}]:[],...!V&&r?.uuid&&{visit:r.uuid}},g=new AbortController;return Promise.resolve().then(async()=>{let t=!1,s=!1;try{for(let e of o)await (0,N.XH)(e),t=!0,eo(t=>[...t,e]),eI("removedImageIds",ek("removedImageIds").filter(t=>t!==e),{shouldDirty:!0});if(!V||Object.keys(ey).some(e=>"removedImageIds"!==e))return s=!0,await (V?(0,N.HE)(g,e.uuid,_):(0,N.v_)(g,_)).then(t=>{if(201===t.status||200===t.status){let a=e?.uuid||t.data.uuid,s=e?.diagnoses?.filter(L)??[];return V&&s.length?Promise.all(s.map(e=>(0,N.k7)(g,e.uuid))).then(()=>a):a}}).then(e=>Promise.all(m.map(t=>{let s={encounter:e,patient:a,condition:null,diagnosis:t.diagnosis,certainty:t.certainty,rank:t.rank};return(0,N.mN)(g,s)})).then(()=>e)).then(e=>i?.length?Promise.allSettled(i.map(t=>{let s={base64Content:t.base64Content,file:t.file,fileName:t.fileName,fileType:t.fileType,fileDescription:t.fileDescription||""};return(0,E.createAttachment)(a,s,e)})).then(e=>e.flatMap((e,t)=>"rejected"===e.status?[{image:i[t],reason:e.reason}]:[])):[])}finally{(t||s)&&((0,y.invalidateVisitAndEncounterData)(eM,a),eL(),(t||s&&i?.length)&&eP())}}).then((e=[])=>{if(O({discardUnsavedChanges:!0}),e.length){let[{reason:t}]=e,a=e.map(({image:e})=>e.fileDescription?.trim()||e.fileName?.trim()).filter(Boolean).join(", ");(0,E.showSnackbar)({isLowContrast:!1,kind:"warning",title:z("visitNoteSavedImagesFailed","Visit note saved, but {{count}} image was not uploaded",{count:e.length}),subtitle:[a,t?.responseBody?.error?.message??t?.message].filter(Boolean).join(": ").concat(" ",z("reAddImagesFromNote","Open the note to add it again.",{count:e.length}))});return}(0,E.showSnackbar)({isLowContrast:!0,subtitle:z("visitNoteNowVisible","It is now visible on the Visits page"),kind:"success",title:z("visitNoteSaved","Visit note saved")})}).catch(e=>{el(z("visitNotePartialSaveError","Could not save all changes. Some changes may already be saved. Try saving again.")),(0,E.createErrorHandler)(),(0,E.showSnackbar)({title:z("visitNoteSaveError","Error saving visit note"),kind:"error",isLowContrast:!1,subtitle:e?.responseBody?.error?.message??e.message})})},[ey,ek,eI,r?.uuid,X,O,e?.diagnoses,e?.uuid,e?.obs,K,$,J,eM,V,eF,eP,eL,a,eO,z]),eZ=(0,s.useCallback)(e=>{if(console.error(e),e.diagnoses){let e=ek("diagnoses")[0]?.draftId,t=void 0===e?document.getElementById("diagnosisSearch"):document.getElementById(`diagnosis-${e}-primary`);t?.focus()}},[ek]),eQ=Object.keys(ey).length>0,eY=W&&!B(ew)&&(ew.length>0||eN),e0=eY&&eN;return n().createElement(E.Workspace2,{title:V?z("editVisitNote","Edit visit note"):z("addVisitNote","Add visit note"),hasUnsavedChanges:eQ},n().createElement(p.Form,{className:"-esm-patient-notes__visit-notes-form__form___WXW3i",onSubmit:eC(eJ,eZ)},n().createElement(E.ExtensionSlot,{name:"visit-context-header-slot",state:j}),H&&n().createElement(p.Row,{className:"-esm-patient-notes__visit-notes-form__headerGridRow___jAAax"},n().createElement(E.ExtensionSlot,{name:"visit-form-header-slot",className:"-esm-patient-notes__visit-notes-form__dataGridRow___wKV9H",state:G})),n().createElement("div",{className:"-esm-patient-notes__visit-notes-form__formContainer___INxGb"},n().createElement(p.Stack,{gap:2},H?n().createElement("h2",{className:"-esm-patient-notes__visit-notes-form__heading___ZDibC"},V?z("editVisitNote","Edit visit note"):z("addVisitNote","Add visit note")):null,ev&&n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},z("date","Date"))),n().createElement(p.Column,{sm:3},n().createElement(g.xI,{name:"noteDate",control:eE,render:({field:e,fieldState:t})=>n().createElement(E.ResponsiveWrapper,null,n().createElement(E.OpenmrsDatePicker,{...e,"data-testid":"visitDateTimePicker",id:"visitDateTimePicker",invalid:!!t?.error?.message,invalidText:t?.error?.message,isDisabled:V,labelText:z("visitDate","Visit date"),maxDate:new Date}))}))),n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},z("diagnosis","Diagnosis"),W&&n().createElement("span",{title:z("required","Required"),className:"-esm-patient-notes__visit-notes-form__required___Unklu"},"*"))),n().createElement(p.Column,{sm:3},n().createElement(p.FormGroup,{legendText:""},n().createElement(P,{name:"diagnosisSearch",control:eE,labelText:z("searchForDiagnosis","Search for a diagnosis to add"),placeholder:z("diagnosisInputPlaceholder","Search for a diagnosis"),handleSearch:ez,setIsSearching:ee}),em?n().createElement(p.InlineNotification,{className:"-esm-patient-notes__visit-notes-form__errorNotification___K-xrU",lowContrast:!0,title:z("error","Error"),subtitle:z("errorFetchingConcepts","There was a problem fetching concepts")+".",onClose:()=>ed(null)}):null,n().createElement(F,{isDiagnosisNotSelected:e=>!ew.some(t=>e.uuid===t.diagnosis.coded),isLoading:Z,isSearching:Y,onAddDiagnosis:eG,searchResults:et,t:z,value:eS("diagnosisSearch")}),ew.length>0&&n().createElement(n().Fragment,null,n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__diagnosisHelperText___R+a2V"},z("diagnosisCertaintyHelperText","Diagnoses are recorded as confirmed unless marked provisional.")),n().createElement(k,null),ew.map(e=>n().createElement(C,{key:e.draftId,canMarkProvisional:ej(e),diagnosis:e,onRemove:eX,onUpdate:eK}))),eY&&n().createElement("p",{id:"primary-diagnosis-requirement",className:o()("-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv",{"-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh":e0}),role:e0?"alert":"status"},e0?n().createElement(v.BF,{"aria-hidden":"true",size:16}):n().createElement(v.OR,{"aria-hidden":"true",size:16}),z("atLeastOnePrimaryDiagnosis","At least one diagnosis must be selected as primary"))))),n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},z("note","Note"))),n().createElement(p.Column,{sm:3},n().createElement(g.xI,{name:"clinicalNote",control:eE,render:({field:{onChange:e,onBlur:t,value:a}})=>n().createElement(E.ResponsiveWrapper,null,n().createElement(p.TextArea,{id:"additionalNote",rows:es,labelText:z("clinicalNoteLabel","Write your notes"),placeholder:z("clinicalNotePlaceholder","Write any notes here"),value:a,onBlur:t,onChange:t=>{e(t),en(Math.ceil(t.target.scrollHeight/24))}}))}))),n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},z("image","Image"))),n().createElement(p.Column,{sm:3},n().createElement(p.FormGroup,{legendText:""},n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__imgUploadHelperText___+VxXT"},z("imageUploadHelperText","Upload images or use this device's camera to capture images")),n().createElement(p.Button,{className:"-esm-patient-notes__visit-notes-form__uploadButton___bTplo",disabled:ep,kind:H?"ghost":"tertiary",onClick:e$,renderIcon:e=>n().createElement(f.OM,{size:16,...e})},z("addImage","Add image")),eu&&n().createElement(p.InlineNotification,{className:D,kind:"error",lowContrast:!0,hideCloseButton:!0,title:z("allowedFileExtensionsLoadError","Couldn't load the allowed image formats"),subtitle:z("allowedFileExtensionsLoadErrorHint","Reload the page to add images to this note.")}),ex&&n().createElement(p.InlineLoading,{className:D,description:z("loadingSavedImages","Loading saved images")+"..."}),eB&&n().createElement(p.InlineNotification,{className:D,kind:"error",lowContrast:!0,hideCloseButton:!0,title:z("savedImagesLoadError","Couldn't load the images saved on this note"),subtitle:z("savedImagesLoadErrorHint","Check the Attachments page before adding them again.")}),n().createElement("div",{className:"-esm-patient-notes__visit-notes-form__imgThumbnailGrid___Tbu9Z"},eT.filter(e=>!ei.includes(e.id)).map(e=>{let t=eR.includes(e.id),a=e.description||e.filename||z("savedImage","Saved image");return n().createElement("div",{key:e.id,className:A},n().createElement("div",{className:S},n().createElement("img",{className:o()(w,{"-esm-patient-notes__visit-notes-form__pendingImage___nyrho":t}),src:e.src,alt:a})),t&&n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__removalStatus___9l-fi"},z("imageMarkedForRemoval","Marked for removal")),n().createElement(p.Button,{kind:t?"ghost":"secondary",size:"sm",disabled:eb,"aria-label":t?z("undoRemoveImage","Undo removal: {{name}}",{name:a}):z("removeImage","Remove image: {{name}}",{name:a}),className:t?"-esm-patient-notes__visit-notes-form__undoButton___-74Gv":R,onClick:()=>eI("removedImageIds",t?eR.filter(t=>t!==e.id):[...eR,e.id],{shouldDirty:!0})},t?z("undo","Undo"):n().createElement(h.bm,{size:16})))}),eA?.map((e,t)=>n().createElement("div",{key:t,className:A},n().createElement("div",{className:S},n().createElement("img",{className:w,src:e.base64Content,alt:e.fileDescription||e.fileName})),n().createElement(p.Button,{kind:"secondary",size:"sm","aria-label":z("removeImage","Remove image: {{name}}",{name:e.fileDescription?.trim()||e.fileName?.trim()||t+1}),className:R,onClick:()=>{let e;(e=[...eA]).splice(t,1),eI("images",e,{shouldDirty:!0}),(0,E.showSnackbar)({title:z("imageRemoved","Image removed"),kind:"success",isLowContrast:!0})}},n().createElement(h.bm,{size:16}))))),eR.length>0&&n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__removalHint___a6VpP"},z("imageRemovalSaveHint","Images marked for removal will be deleted when you save."))))))),er&&n().createElement(p.InlineNotification,{kind:"error",lowContrast:!0,hideCloseButton:!0,title:z("visitNoteSaveError","Error saving visit note"),subtitle:er}),n().createElement(p.ButtonSet,{className:o()({"-esm-patient-notes__visit-notes-form__tablet___R5OWW":H,"-esm-patient-notes__visit-notes-form__desktop___q-E7d":!H})},n().createElement(p.Button,{className:T,kind:"secondary",onClick:()=>O()},z("discard","Discard")),n().createElement(p.Button,{className:T,kind:"primary",disabled:!eQ||eb,type:"submit"},eb?n().createElement(p.InlineLoading,{className:"-esm-patient-notes__visit-notes-form__spinner___nX4VV",description:z("saving","Saving")+"..."}):n().createElement("span",null,z("saveAndClose","Save and close"))))))}}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_app||[]).push([["2932"],{8447(e,t,a){a.d(t,{A:()=>V});var s=a(5399),n=a.n(s),i=a(3373),o=a.n(i),r=a(222),l=a.n(r),m=a(3892),d=a(7807),c=a(1619),u=a(6195),_=a(4049),g=a(824),p=a(324),v=a(4632),f=a(5848),h=a(529),E=a(2664),y=a(6717),N=a(1273);let b=0;function k(){let{t:e}=(0,d.useTranslation)();return n().createElement("div",{"aria-hidden":"true",className:"-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H"},n().createElement("span",null,e("primary","Primary")))}function C({canMarkProvisional:e,diagnosis:t,onRemove:a,onUpdate:s}){let{t:i}=(0,d.useTranslation)(),o="PROVISIONAL"===t.certainty;return n().createElement("div",{className:"-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6",role:"group","aria-label":t.display},n().createElement(p.Checkbox,{"aria-describedby":"primary-diagnosis-requirement",checked:1===t.rank,hideLabel:!0,id:`diagnosis-${t.draftId}-primary`,labelText:i("primary","Primary"),onChange:(e,{checked:a})=>s(t,{rank:a?1:2})}),n().createElement("span",{className:"-esm-patient-notes__selected-diagnosis-card__diagnosisName___MjgaG"},o&&n().createElement(n().Fragment,null,n().createElement("span",{"aria-hidden":"true",className:"-esm-patient-notes__selected-diagnosis-card__provisionalMark___pSs51"},"?"),n().createElement("span",{className:"cds--visually-hidden"},i("provisional","Provisional")," ")),t.display),n().createElement("div",{className:"-esm-patient-notes__selected-diagnosis-card__actionsCell___ugf7H"},e&&n().createElement(p.OverflowMenu,{align:"left","aria-label":i("diagnosisActions","Actions for {{diagnosis}}",{diagnosis:t.display}),flipped:!0,iconDescription:i("diagnosisActions","Actions for {{diagnosis}}",{diagnosis:t.display}),menuOptionsClass:"-esm-patient-notes__selected-diagnosis-card__diagnosisActionsMenu___8AWXe",size:"sm"},n().createElement(p.OverflowMenuItem,{itemText:o?i("markAsConfirmed","Mark as confirmed"):i("markAsProvisional","Mark as provisional"),onClick:()=>s(t,{certainty:o?"CONFIRMED":"PROVISIONAL"})}))),n().createElement(p.Button,{hasIconOnly:!0,iconDescription:i("removeDiagnosisNamed","Remove {{diagnosis}}",{diagnosis:t.display}),kind:"ghost",onClick:()=>a(t),renderIcon:e=>n().createElement(h.R9,{size:16,...e}),size:"sm",tooltipAlignment:"end"}))}let I="-esm-patient-notes__visit-notes-form__columnLabel___EwgDF",S="-esm-patient-notes__visit-notes-form__imgThumbnailContainer___6-ih6",w="-esm-patient-notes__visit-notes-form__imgThumbnail___PGisE",D="-esm-patient-notes__visit-notes-form__savedImagesLoading___06xRV",A="-esm-patient-notes__visit-notes-form__imgThumbnailItem___XkrUE",R="-esm-patient-notes__visit-notes-form__removeButton___O7iSI",T="-esm-patient-notes__visit-notes-form__button___tic-m",x="-esm-patient-notes__visit-notes-form__row___+Ncuq",B=e=>e.some(e=>1===e.rank),L=e=>!!(e.diagnosis?.coded?.uuid||e.diagnosis?.nonCoded),P=new Set(["jpg","jpeg","png","gif","webp","bmp"]);function M({name:e,control:t,labelText:a,placeholder:s,handleSearch:i,setIsSearching:o}){let r="tablet"===(0,E.useLayoutType)();return n().createElement(g.xI,{name:e,control:t,render:({field:{value:t,onChange:l,onBlur:m}})=>n().createElement(E.ResponsiveWrapper,null,n().createElement(p.Search,{size:r?"lg":"md",id:e,labelText:a,placeholder:s,onChange:e=>{o(!0),l(e),i()},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){let a=document.getElementById(`${e}-results`)?.querySelectorAll("button");a?.length&&(t.preventDefault(),a["ArrowDown"===t.key?0:a.length-1].focus())}},value:t,onBlur:m}))})}function F({isDiagnosisNotSelected:e,isLoading:t,isSearching:a,onAddDiagnosis:i,searchResults:o,t:r,value:l}){let m=(0,s.useRef)(null),d=(0,s.useCallback)(e=>{!e&&m.current?.contains(document.activeElement)&&document.getElementById("diagnosisSearch")?.focus(),m.current=e},[]);return l?a||t?n().createElement(O,null):!a&&o?.length>0?n().createElement("ul",{ref:d,id:"diagnosisSearch-results",className:"-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY","aria-label":r("diagnosisSearchResults","Diagnosis search results"),onKeyDown:e=>{if("Escape"===e.key)e.preventDefault(),document.getElementById("diagnosisSearch")?.focus();else if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)){let t=Array.from(e.currentTarget.querySelectorAll("button")),a=t.findIndex(e=>e===document.activeElement);if(a<0)return;e.preventDefault();let s="Home"===e.key?0:"End"===e.key?t.length-1:(a+("ArrowDown"===e.key?1:-1)+t.length)%t.length;t[s].focus()}}},o.filter(e).map(e=>n().createElement("li",{className:"-esm-patient-notes__visit-notes-form__diagnosis___XsPGM",key:e.uuid},n().createElement("button",{type:"button",className:"-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E",onClick:()=>{i(e),document.getElementById("diagnosisSearch")?.focus()}},e.display)))):o?.length===0?n().createElement(E.ResponsiveWrapper,null,n().createElement(p.Tile,{className:"-esm-patient-notes__visit-notes-form__emptyResults___fCV44"},n().createElement("span",null,r("noMatchingDiagnoses","No diagnoses found matching")," ",n().createElement("strong",null,'"',l,'"')))):void 0:null}function O(){return n().createElement(n().Fragment,null,Array.from({length:5}).map((e,t)=>n().createElement(p.SkeletonText,{key:t,className:"-esm-patient-notes__visit-notes-form__skeleton___Wp-mM"})))}let V=({encounter:e,formContext:t,patientUuid:a,patient:i,visitContext:r,closeWorkspace:O,showPatientHeader:V=!1})=>{let z=!!("editing"===t&&e?.uuid),{t:H}=(0,d.useTranslation)(),U="tablet"===(0,E.useLayoutType)(),W=(0,E.useSession)(),{isPrimaryDiagnosisRequired:q,...j}=(0,E.useConfig)(),G=a??i?.id,X=(0,y.usePatientForBanner)(i,G),K=!!(V&&(0,y.hasPatientBannerData)(X)&&G),$=(0,s.useMemo)(()=>({patientUuid:G}),[G]),J=(0,s.useMemo)(()=>({patientUuid:G,patient:X}),[G,X]),{clinicianEncounterRole:Z,encounterNoteTextConceptUuid:Q,encounterTypeUuid:Y,formConceptUuid:ee}=j.visitNoteConfig,[et,ea]=(0,s.useState)(!1),[es,en]=(0,s.useState)(!1),[ei,eo]=(0,s.useState)(null),[er,el]=(0,s.useState)(),[em,ed]=(0,s.useState)([]),[ec,eu]=(0,s.useState)(),[e_,eg]=(0,s.useState)(null),{allowedFileExtensions:ep,error:ev,isLoading:ef}=(0,y.useAllowedFileExtensions)(),eh=(0,s.useMemo)(()=>{let e=ep?.map(e=>e.trim().toLowerCase()).filter(Boolean);return e?.length?e.filter(e=>P.has(e)):[...P]},[ep]),eE=ef||!!ev||0===eh.length,ey=(0,E.useFeatureFlag)("rde"),eN=(0,s.useMemo)(()=>u.z.object({noteDate:ey?u.z.date():u.z.date().optional(),diagnosisSearch:u.z.string().optional(),diagnoses:u.z.array(u.z.custom()).refine(e=>!q||B(e),{message:H("atLeastOnePrimaryDiagnosis","At least one diagnosis must be selected as primary")}),clinicalNote:u.z.string().optional(),images:u.z.array(u.z.any()).optional(),removedImageIds:u.z.array(u.z.string())}),[H,ey,q]),[eb]=(0,s.useState)(()=>(e?.diagnoses??[]).filter(L).map(e=>({draftId:++b,patient:G,diagnosis:e.diagnosis.coded?.uuid?{coded:e.diagnosis.coded.uuid}:{nonCoded:e.diagnosis.nonCoded},certainty:"PROVISIONAL"===e.certainty?"PROVISIONAL":"CONFIRMED",rank:e.rank??2,display:e.display})).sort((e,t)=>Number(1===t.rank)-Number(1===e.rank))),{control:ek,formState:{dirtyFields:eC,isSubmitted:eI,isSubmitting:eS},getValues:ew,handleSubmit:eD,setValue:eA,watch:eR}=(0,g.mN)({mode:"onSubmit",resolver:(0,_.u)(eN),defaultValues:{images:[],removedImageIds:[],diagnosisSearch:"",diagnoses:eb,noteDate:z?new Date(e.encounterDatetime):new Date,clinicalNote:z?String(e?.obs?.find(e=>e.concept.uuid===Q)?.value||""):""}}),{field:{value:eT,onChange:ex}}=(0,g.as)({name:"diagnoses",control:ek}),eB=eR("images"),eL=eR("removedImageIds"),{images:eP,isLoading:eM,error:eF}=(0,N.Vm)(G,z?e.uuid:void 0),{mutateVisitNotes:eO}=(0,N.aw)(G),{mutate:eV}=(0,c.useSWRConfig)(),ez=(0,s.useCallback)(()=>eV(e=>"string"==typeof e&&e.startsWith(`${E.restBaseUrl}/attachment`)),[eV]),eH=W?.sessionLocation?.uuid,eU=W?.currentProvider?.uuid,eW=(0,s.useMemo)(()=>(0,m.A)(e=>{e&&(ea(!0),(0,N.ph)(e,j.diagnosisConceptClass).then(e=>{eo(e),ea(!1)}).catch(e=>{eg(e),(0,E.createErrorHandler)()}))},500),[j.diagnosisConceptClass]),eq=(0,s.useCallback)(()=>{let e=eR("diagnosisSearch");e&&eW(e),en(!1)},[eW,eR]),ej=(0,s.useCallback)(e=>({draftId:++b,display:e.display,diagnosis:{coded:e.uuid},patient:G,rank:2,certainty:"CONFIRMED",conceptClassUuid:j.diagnosisConceptClass}),[j.diagnosisConceptClass,G]),eG=(0,s.useMemo)(()=>Array.from(new Set(eb.flatMap(e=>e.diagnosis.coded?[e.diagnosis.coded]:[]))),[eb]),{conceptClassByUuid:eX,error:eK}=(0,N.J_)(eG),e$=(0,s.useCallback)(e=>{if(!e.diagnosis.coded)return!0;let t=e.conceptClassUuid??eX[e.diagnosis.coded];return void 0===t?!!eK:null===t||t===j.diagnosisConceptClass},[eX,eK,j.diagnosisConceptClass]),eJ=(0,s.useCallback)(e=>{eA("diagnosisSearch","",{shouldDirty:!0}),eo([]);let t=ew("diagnoses");t.some(t=>t.diagnosis.coded===e.uuid)||ex([ej(e),...t])},[ej,ew,ex,eA]),eZ=(0,s.useCallback)(e=>{ex(ew("diagnoses").filter(t=>t.draftId!==e.draftId)),document.getElementById("diagnosisSearch")?.focus()},[ew,ex]),eQ=(0,s.useCallback)((e,t)=>{ex(ew("diagnoses").map(a=>a.draftId===e.draftId?{...a,...t}:a))},[ew,ex]),eY=(0,s.useCallback)(()=>{if(eE)return;let e=(0,E.showModal)("capture-photo-modal",{saveFile:t=>(t.capturedFromWebcam&&!t.fileName.includes(".")&&(t.fileName=`${t.fileName}.png`),eA("images",[...ew("images"),t],{shouldDirty:!0}),e(),Promise.resolve()),closeModal:()=>{e()},allowedExtensions:eh,collectDescription:!0,multipleFiles:!0,showUploadSnackbar:!1})},[eh,ew,eE,eA]),e0=(0,s.useCallback)(t=>{let{noteDate:a,clinicalNote:s,images:n,removedImageIds:i,diagnoses:o}=t;eu(void 0);let m=l()(a),d=new Date;30>=m.diff(d,"minute")&&(m=null);let c=e?.obs?.find(e=>e.concept.uuid===Q),u={encounterDatetime:m?.format(),form:ee,patient:G,location:eH,encounterProviders:[{encounterRole:Z,provider:eU}],encounterType:Y,obs:s?[{concept:{uuid:Q,display:""},value:s,...c&&{uuid:c.uuid}}]:[],...!z&&r?.uuid&&{visit:r.uuid}},_=new AbortController;return Promise.resolve().then(async()=>{let t=!1,a=!1;try{for(let e of i)await (0,N.XH)(e),t=!0,ed(t=>[...t,e]),eA("removedImageIds",ew("removedImageIds").filter(t=>t!==e),{shouldDirty:!0});if(!z||Object.keys(eC).some(e=>"removedImageIds"!==e))return a=!0,await (z?(0,N.HE)(_,e.uuid,u):(0,N.v_)(_,u)).then(t=>{if(201===t.status||200===t.status){let a=e?.uuid||t.data.uuid,s=e?.diagnoses?.filter(L)??[];return z&&s.length?Promise.all(s.map(e=>(0,N.k7)(_,e.uuid))).then(()=>a):a}}).then(e=>Promise.all(o.map(t=>{let a={encounter:e,patient:G,condition:null,diagnosis:t.diagnosis,certainty:t.certainty,rank:t.rank};return(0,N.mN)(_,a)})).then(()=>e)).then(e=>n?.length?Promise.allSettled(n.map(t=>{let a={base64Content:t.base64Content,file:t.file,fileName:t.fileName,fileType:t.fileType,fileDescription:t.fileDescription||""};return(0,E.createAttachment)(G,a,e)})).then(e=>e.flatMap((e,t)=>"rejected"===e.status?[{image:n[t],reason:e.reason}]:[])):[])}finally{(t||a)&&((0,y.invalidateVisitAndEncounterData)(eV,G),eO(),(t||a&&n?.length)&&ez())}}).then((e=[])=>{if(O({discardUnsavedChanges:!0}),e.length){let[{reason:t}]=e,a=e.map(({image:e})=>e.fileDescription?.trim()||e.fileName?.trim()).filter(Boolean).join(", ");(0,E.showSnackbar)({isLowContrast:!1,kind:"warning",title:H("visitNoteSavedImagesFailed","Visit note saved, but {{count}} image was not uploaded",{count:e.length}),subtitle:[a,t?.responseBody?.error?.message??t?.message].filter(Boolean).join(": ").concat(" ",H("reAddImagesFromNote","Open the note to add it again.",{count:e.length}))});return}(0,E.showSnackbar)({isLowContrast:!0,subtitle:H("visitNoteNowVisible","It is now visible on the Visits page"),kind:"success",title:H("visitNoteSaved","Visit note saved")})}).catch(e=>{eu(H("visitNotePartialSaveError","Could not save all changes. Some changes may already be saved. Try saving again.")),(0,E.createErrorHandler)(),(0,E.showSnackbar)({title:H("visitNoteSaveError","Error saving visit note"),kind:"error",isLowContrast:!1,subtitle:e?.responseBody?.error?.message??e.message})})},[eC,ew,eA,r?.uuid,Z,O,e?.diagnoses,e?.uuid,e?.obs,Q,Y,ee,eV,z,eH,ez,eO,G,eU,H]),e1=(0,s.useCallback)(e=>{if(console.error(e),e.diagnoses){let e=ew("diagnoses")[0]?.draftId,t=void 0===e?document.getElementById("diagnosisSearch"):document.getElementById(`diagnosis-${e}-primary`);t?.focus()}},[ew]),e2=Object.keys(eC).length>0,e6=q&&!B(eT)&&(eT.length>0||eI),e4=e6&&eI;return n().createElement(E.Workspace2,{title:z?H("editVisitNote","Edit visit note"):H("addVisitNote","Add visit note"),hasUnsavedChanges:e2},K&&G&&X&&n().createElement(E.ExtensionSlot,{name:"patient-header-slot",state:{patient:X,patientUuid:G,hideActionsOverflow:!0}}),n().createElement(p.Form,{className:"-esm-patient-notes__visit-notes-form__form___WXW3i",onSubmit:eD(e0,e1)},n().createElement(E.ExtensionSlot,{name:"visit-context-header-slot",state:$}),U&&n().createElement(p.Row,{className:"-esm-patient-notes__visit-notes-form__headerGridRow___jAAax"},n().createElement(E.ExtensionSlot,{name:"visit-form-header-slot",className:"-esm-patient-notes__visit-notes-form__dataGridRow___wKV9H",select:K?e=>e.filter(e=>"patient-details-tile"!==e.name):void 0,state:J})),n().createElement("div",{className:"-esm-patient-notes__visit-notes-form__formContainer___INxGb"},n().createElement(p.Stack,{gap:2},U?n().createElement("h2",{className:"-esm-patient-notes__visit-notes-form__heading___ZDibC"},z?H("editVisitNote","Edit visit note"):H("addVisitNote","Add visit note")):null,ey&&n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},H("date","Date"))),n().createElement(p.Column,{sm:3},n().createElement(g.xI,{name:"noteDate",control:ek,render:({field:e,fieldState:t})=>n().createElement(E.ResponsiveWrapper,null,n().createElement(E.OpenmrsDatePicker,{...e,"data-testid":"visitDateTimePicker",id:"visitDateTimePicker",invalid:!!t?.error?.message,invalidText:t?.error?.message,isDisabled:z,labelText:H("visitDate","Visit date"),maxDate:new Date}))}))),n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},H("diagnosis","Diagnosis"),q&&n().createElement("span",{title:H("required","Required"),className:"-esm-patient-notes__visit-notes-form__required___Unklu"},"*"))),n().createElement(p.Column,{sm:3},n().createElement(p.FormGroup,{legendText:""},n().createElement(M,{name:"diagnosisSearch",control:ek,labelText:H("searchForDiagnosis","Search for a diagnosis to add"),placeholder:H("diagnosisInputPlaceholder","Search for a diagnosis"),handleSearch:eq,setIsSearching:en}),e_?n().createElement(p.InlineNotification,{className:"-esm-patient-notes__visit-notes-form__errorNotification___K-xrU",lowContrast:!0,title:H("error","Error"),subtitle:H("errorFetchingConcepts","There was a problem fetching concepts")+".",onClose:()=>eg(null)}):null,n().createElement(F,{isDiagnosisNotSelected:e=>!eT.some(t=>e.uuid===t.diagnosis.coded),isLoading:et,isSearching:es,onAddDiagnosis:eJ,searchResults:ei,t:H,value:eR("diagnosisSearch")}),eT.length>0&&n().createElement(n().Fragment,null,n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__diagnosisHelperText___R+a2V"},H("diagnosisCertaintyHelperText","Diagnoses are recorded as confirmed unless marked provisional.")),n().createElement(k,null),eT.map(e=>n().createElement(C,{key:e.draftId,canMarkProvisional:e$(e),diagnosis:e,onRemove:eZ,onUpdate:eQ}))),e6&&n().createElement("p",{id:"primary-diagnosis-requirement",className:o()("-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv",{"-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh":e4}),role:e4?"alert":"status"},e4?n().createElement(v.BF,{"aria-hidden":"true",size:16}):n().createElement(v.OR,{"aria-hidden":"true",size:16}),H("atLeastOnePrimaryDiagnosis","At least one diagnosis must be selected as primary"))))),n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},H("note","Note"))),n().createElement(p.Column,{sm:3},n().createElement(g.xI,{name:"clinicalNote",control:ek,render:({field:{onChange:e,onBlur:t,value:a}})=>n().createElement(E.ResponsiveWrapper,null,n().createElement(p.TextArea,{id:"additionalNote",rows:er,labelText:H("clinicalNoteLabel","Write your notes"),placeholder:H("clinicalNotePlaceholder","Write any notes here"),value:a,onBlur:t,onChange:t=>{e(t),el(Math.ceil(t.target.scrollHeight/24))}}))}))),n().createElement(p.Row,{className:x},n().createElement(p.Column,{sm:1},n().createElement("span",{className:I},H("image","Image"))),n().createElement(p.Column,{sm:3},n().createElement(p.FormGroup,{legendText:""},n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__imgUploadHelperText___+VxXT"},H("imageUploadHelperText","Upload images or use this device's camera to capture images")),n().createElement(p.Button,{className:"-esm-patient-notes__visit-notes-form__uploadButton___bTplo",disabled:eE,kind:U?"ghost":"tertiary",onClick:eY,renderIcon:e=>n().createElement(f.OM,{size:16,...e})},H("addImage","Add image")),ev&&n().createElement(p.InlineNotification,{className:D,kind:"error",lowContrast:!0,hideCloseButton:!0,title:H("allowedFileExtensionsLoadError","Couldn't load the allowed image formats"),subtitle:H("allowedFileExtensionsLoadErrorHint","Reload the page to add images to this note.")}),eM&&n().createElement(p.InlineLoading,{className:D,description:H("loadingSavedImages","Loading saved images")+"..."}),eF&&n().createElement(p.InlineNotification,{className:D,kind:"error",lowContrast:!0,hideCloseButton:!0,title:H("savedImagesLoadError","Couldn't load the images saved on this note"),subtitle:H("savedImagesLoadErrorHint","Check the Attachments page before adding them again.")}),n().createElement("div",{className:"-esm-patient-notes__visit-notes-form__imgThumbnailGrid___Tbu9Z"},eP.filter(e=>!em.includes(e.id)).map(e=>{let t=eL.includes(e.id),a=e.description||e.filename||H("savedImage","Saved image");return n().createElement("div",{key:e.id,className:A},n().createElement("div",{className:S},n().createElement("img",{className:o()(w,{"-esm-patient-notes__visit-notes-form__pendingImage___nyrho":t}),src:e.src,alt:a})),t&&n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__removalStatus___9l-fi"},H("imageMarkedForRemoval","Marked for removal")),n().createElement(p.Button,{kind:t?"ghost":"secondary",size:"sm",disabled:eS,"aria-label":t?H("undoRemoveImage","Undo removal: {{name}}",{name:a}):H("removeImage","Remove image: {{name}}",{name:a}),className:t?"-esm-patient-notes__visit-notes-form__undoButton___-74Gv":R,onClick:()=>eA("removedImageIds",t?eL.filter(t=>t!==e.id):[...eL,e.id],{shouldDirty:!0})},t?H("undo","Undo"):n().createElement(h.bm,{size:16})))}),eB?.map((e,t)=>n().createElement("div",{key:t,className:A},n().createElement("div",{className:S},n().createElement("img",{className:w,src:e.base64Content,alt:e.fileDescription||e.fileName})),n().createElement(p.Button,{kind:"secondary",size:"sm","aria-label":H("removeImage","Remove image: {{name}}",{name:e.fileDescription?.trim()||e.fileName?.trim()||t+1}),className:R,onClick:()=>{let e;(e=[...eB]).splice(t,1),eA("images",e,{shouldDirty:!0}),(0,E.showSnackbar)({title:H("imageRemoved","Image removed"),kind:"success",isLowContrast:!0})}},n().createElement(h.bm,{size:16}))))),eL.length>0&&n().createElement("p",{className:"-esm-patient-notes__visit-notes-form__removalHint___a6VpP"},H("imageRemovalSaveHint","Images marked for removal will be deleted when you save."))))))),ec&&n().createElement(p.InlineNotification,{kind:"error",lowContrast:!0,hideCloseButton:!0,title:H("visitNoteSaveError","Error saving visit note"),subtitle:ec}),n().createElement(p.ButtonSet,{className:o()({"-esm-patient-notes__visit-notes-form__tablet___R5OWW":U,"-esm-patient-notes__visit-notes-form__desktop___q-E7d":!U})},n().createElement(p.Button,{className:T,kind:"secondary",onClick:()=>O()},H("discard","Discard")),n().createElement(p.Button,{className:T,kind:"primary",disabled:!e2||eS,type:"submit"},eS?n().createElement(p.InlineLoading,{className:"-esm-patient-notes__visit-notes-form__spinner___nX4VV",description:H("saving","Saving")+"..."}):n().createElement("span",null,H("saveAndClose","Save and close"))))))}}}]);
package/dist/2932.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"2932.js","sources":["webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.scss?4a9a","webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.component.tsx","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.scss?988c","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.component.tsx"],"names":["lastDraftId","DiagnosisListHeader","t","useTranslation","SelectedDiagnosisCard","canMarkProvisional","diagnosis","onRemove","onUpdate","isProvisional","Checkbox","_","checked","OverflowMenu","OverflowMenuItem","Button","props","CloseFilled","hasPrimaryDiagnosis","diagnoses","hasDiagnosisContent","Boolean","imageExtensions","Set","DiagnosisSearch","name","control","labelText","placeholder","handleSearch","setIsSearching","isTablet","useLayoutType","Controller","value","onChange","onBlur","ResponsiveWrapper","Search","e","event","results","document","DiagnosesDisplay","isDiagnosisNotSelected","isLoading","isSearching","onAddDiagnosis","searchResults","resultsRef","useRef","setResultsRef","useCallback","node","Loader","Array","index","result","nextIndex","Tile","SkeletonText","encounter","formContext","patientUuid","patient","visitContext","closeWorkspace","isEditing","session","useSession","isPrimaryDiagnosisRequired","config","useConfig","visitContextHeaderState","useMemo","memoizedState","clinicianEncounterRole","encounterNoteTextConceptUuid","encounterTypeUuid","formConceptUuid","isLoadingDiagnoses","setIsLoadingDiagnoses","useState","setSearchResults","rows","setRows","removedImages","setRemovedImages","saveError","setSaveError","error","setError","allowedFileExtensions","allowedFileExtensionsError","isLoadingAllowedFileExtensions","useAllowedFileExtensions","allowedImageExtensions","extensions","extension","isImageCaptureDisabled","isRetrospectiveDataEntryEnabled","useFeatureFlag","visitNoteFormSchema","z","initialDiagnoses","d","a","b","Number","dirtyFields","isSubmitted","isSubmitting","getValues","handleSubmit","setValue","watch","useForm","zodResolver","Date","String","obs","selectedDiagnoses","setSelectedDiagnoses","useController","currentImages","removedImageIds","savedImages","isLoadingSavedImages","savedImagesError","useVisitNoteImages","undefined","mutateVisitNotes","useVisitNotes","globalMutate","useSWRConfig","mutateAttachments","key","restBaseUrl","locationUuid","providerUuid","debouncedSearch","debounce","fieldQuery","fetchDiagnosisConceptsByName","matchingConceptDiagnoses","createErrorHandler","createDiagnosis","concept","prefilledCodedConceptUuids","conceptClassByUuid","conceptClassLookupError","useDiagnosisConceptClasses","conceptClassUuid","handleAddDiagnosis","conceptDiagnosisToAdd","handleRemoveDiagnosis","diagnosisToRemove","handleUpdateDiagnosis","diagnosisToUpdate","patch","showImageCaptureModal","close","showModal","file","Promise","onSubmit","data","noteDate","clinicalNote","images","finalNoteDate","dayjs","now","existingClinicalNoteObs","visitNotePayload","abortController","AbortController","removedAny","noteSaveAttempted","imageId","removeVisitNoteImage","removed","id","Object","field","savePromise","updateVisitNote","saveVisitNote","response","encounterUuid","storedDiagnoses","deletePatientDiagnosis","diagnosesPayload","savePatientDiagnosis","image","imageToUpload","createAttachment","invalidateVisitAndEncounterData","failedUploads","reason","names","showSnackbar","err","onError","errors","console","firstDraftId","target","hasUserUnsavedChanges","showPrimaryRequiredWarning","primaryRequiredBlockedSave","Workspace2","Form","ExtensionSlot","Row","Stack","Column","fieldState","OpenmrsDatePicker","FormGroup","InlineNotification","selectedDiagnosis","classnames","WarningFilled","WarningAltFilled","TextArea","Math","Add","InlineLoading","isMarkedForRemoval","Close","updatedImages","ButtonSet"],"mappings":"uWACA,ICiBIA,EAAc,EAKX,SAASC,IACd,GAAM,CAAEC,EAAAA,CAAC,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,IAEd,OACE,kBAAC,OAAI,cAAY,OAAO,UD1BU,0E,EC2BhC,kBAAC,YAAMD,EAAE,UAAW,YAG1B,CASe,SAASE,EAAsB,CAC5CC,mBAAAA,CAAkB,CAClBC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CACmB,EAC3B,GAAM,CAAEN,EAAAA,CAAC,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,IACRM,EAAgBH,AAAwB,gBAAxBA,EAAU,SAAS,CAEzC,OACE,kBAAC,OAAI,UDjDuH,oECiDvF,KAAK,QAAQ,aAAYA,EAAU,OAAO,A,EAC7E,kBAACI,EAAAA,QAAQA,CAAAA,CACP,mBAAiB,gCACjB,QAASJ,AAAmB,IAAnBA,EAAU,IAAI,CACvB,aACA,GAAI,CA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GAAS,SAAUqH,EAAe,CAAE,YAAa,EAAK,GAEtD9B,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAa,CACX,MAAOvM,EAAE,eAAgB,iBACzB,KAAM,UACN,cAAe,EACjB,G,EA0fsB,kBAACoO,EAAAA,EAAKA,CAAAA,CAAC,KAAM,E,OAKpBzG,GAAgB,MAAM,CAAG,GACxB,kBAAC,KAAE,UDh4Bm9E,2D,ECi4Bn9E3H,EAAE,uBAAwB,kEAQxCsF,IACC,kBAACoI,EAAAA,kBAAkBA,CAAAA,CACjB,KAAK,QACL,eACA,mBACA,MAAO1N,EAAE,qBAAsB,2BAC/B,SAAUsF,E,GAGd,kBAACgJ,EAAAA,SAASA,CAAAA,CAAC,UAAWV,IAAW,CDl5BosC,uDCk5BjrC/L,EDl5BkvC,wDCk5BttC,CAACA,CAAS,E,EACxF,kBAAChB,EAAAA,MAAMA,CAAAA,CAAC,SAAS,GAAiB,KAAK,YAAY,QAAS,IAAMmD,G,EAC/DhE,EAAE,UAAW,YAEhB,kBAACa,EAAAA,MAAMA,CAAAA,CACL,SAAS,GACT,KAAK,UACL,SAAU,CAACiM,IAAyBjG,GACpC,KAAK,Q,EAEJA,GACC,kBAACqH,EAAAA,aAAaA,CAAAA,CAAC,UD75B+oC,wDC65BpnC,YAAalO,EAAE,SAAU,UAAY,K,GAE/E,kBAAC,YAAMA,EAAE,eAAgB,sBAOvC,C"}
1
+ {"version":3,"file":"2932.js","sources":["webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.scss?4a9a","webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.component.tsx","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.scss?988c","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.component.tsx"],"names":["lastDraftId","DiagnosisListHeader","t","useTranslation","SelectedDiagnosisCard","canMarkProvisional","diagnosis","onRemove","onUpdate","isProvisional","Checkbox","_","checked","OverflowMenu","OverflowMenuItem","Button","props","CloseFilled","hasPrimaryDiagnosis","diagnoses","hasDiagnosisContent","Boolean","imageExtensions","Set","DiagnosisSearch","name","control","labelText","placeholder","handleSearch","setIsSearching","isTablet","useLayoutType","Controller","value","onChange","onBlur","ResponsiveWrapper","Search","e","event","results","document","DiagnosesDisplay","isDiagnosisNotSelected","isLoading","isSearching","onAddDiagnosis","searchResults","resultsRef","useRef","setResultsRef","useCallback","node","Loader","Array","index","result","nextIndex","Tile","SkeletonText","encounter","formContext","propPatientUuid","patientProp","visitContext","closeWorkspace","showPatientHeader","isEditing","session","useSession","isPrimaryDiagnosisRequired","config","useConfig","patientUuid","patient","usePatientForBanner","showWorkspacePatientHeader","hasPatientBannerData","visitContextHeaderState","useMemo","memoizedState","clinicianEncounterRole","encounterNoteTextConceptUuid","encounterTypeUuid","formConceptUuid","isLoadingDiagnoses","setIsLoadingDiagnoses","useState","setSearchResults","rows","setRows","removedImages","setRemovedImages","saveError","setSaveError","error","setError","allowedFileExtensions","allowedFileExtensionsError","isLoadingAllowedFileExtensions","useAllowedFileExtensions","allowedImageExtensions","extensions","extension","isImageCaptureDisabled","isRetrospectiveDataEntryEnabled","useFeatureFlag","visitNoteFormSchema","z","initialDiagnoses","d","a","b","Number","dirtyFields","isSubmitted","isSubmitting","getValues","handleSubmit","setValue","watch","useForm","zodResolver","Date","String","obs","selectedDiagnoses","setSelectedDiagnoses","useController","currentImages","removedImageIds","savedImages","isLoadingSavedImages","savedImagesError","useVisitNoteImages","undefined","mutateVisitNotes","useVisitNotes","globalMutate","useSWRConfig","mutateAttachments","key","restBaseUrl","locationUuid","providerUuid","debouncedSearch","debounce","fieldQuery","fetchDiagnosisConceptsByName","matchingConceptDiagnoses","createErrorHandler","createDiagnosis","concept","prefilledCodedConceptUuids","conceptClassByUuid","conceptClassLookupError","useDiagnosisConceptClasses","conceptClassUuid","handleAddDiagnosis","conceptDiagnosisToAdd","handleRemoveDiagnosis","diagnosisToRemove","handleUpdateDiagnosis","diagnosisToUpdate","patch","showImageCaptureModal","close","showModal","file","Promise","onSubmit","data","noteDate","clinicalNote","images","finalNoteDate","dayjs","now","existingClinicalNoteObs","visitNotePayload","abortController","AbortController","removedAny","noteSaveAttempted","imageId","removeVisitNoteImage","removed","id","Object","field","savePromise","updateVisitNote","saveVisitNote","response","encounterUuid","storedDiagnoses","deletePatientDiagnosis","diagnosesPayload","savePatientDiagnosis","image","imageToUpload","createAttachment","invalidateVisitAndEncounterData","failedUploads","reason","names","showSnackbar","err","onError","errors","console","firstDraftId","target","hasUserUnsavedChanges","showPrimaryRequiredWarning","primaryRequiredBlockedSave","Workspace2","ExtensionSlot","Form","Row","Stack","Column","fieldState","OpenmrsDatePicker","FormGroup","InlineNotification","selectedDiagnosis","classnames","WarningFilled","WarningAltFilled","TextArea","Math","Add","InlineLoading","isMarkedForRemoval","Close","updatedImages","ButtonSet"],"mappings":"uWACA,ICiBIA,EAAc,EAKX,SAASC,IACd,GAAM,CAAEC,EAAAA,CAAC,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,IAEd,OACE,kBAAC,OAAI,cAAY,OAAO,UD1BU,0E,EC2BhC,kBAAC,YAAMD,EAAE,UAAW,YAG1B,CASe,SAASE,EAAsB,CAC5CC,mBAAAA,CAAkB,CAClBC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CACmB,EAC3B,GAAM,CAAEN,EAAAA,CAAC,CAAE,CAAGC,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,IACRM,EAAgBH,AAAwB,gBAAxBA,EAAU,SAAS,CAEzC,OACE,kBAAC,OAAI,UDjDuH,oECiDvF,KAAK,QAAQ,aAAYA,EAAU,OAAO,A,EAC7E,kBAACI,EAAAA,QAAQA,CAAAA,CACP,mBAAiB,gCACjB,QAASJ,AAAmB,IAAnBA,EAAU,IAAI,CACvB,aACA,GAAI,CAAC,UAAU,EAAEA,EAAU,OAAO,CAAC,QAAQ,CAAC,CAC5C,UA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C,YAAaxO,EAAE,SAAU,UAAY,K,GAE/E,kBAAC,YAAMA,EAAE,eAAgB,sBAOvC,C"}
package/dist/6742.css CHANGED
@@ -1 +1 @@
1
- :root{--brand-01:#005d5d;--brand-02:#004144;--brand-03:#007d79;--bottom-nav-height:4rem;--workspace-header-height:3rem;--tablet-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H{grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:end;column-gap:.25rem;margin-top:.5rem;padding:0 .5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H>span{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6{background-color:#f4f4f4;border-radius:4px;grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:center;column-gap:.25rem;margin-top:.25rem;padding:.5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--form-item{justify-self:center;margin:0}.-esm-patient-notes__selected-diagnosis-card__actionsCell___ugf7H{justify-content:center;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label{min-block-size:2rem;min-inline-size:2rem;padding-inline-start:2rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:.5rem .375rem}[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:-.5rem .375rem}.-esm-patient-notes__selected-diagnosis-card__diagnosisActionsMenu___8AWXe .cds--overflow-menu-options__btn{max-inline-size:none}.-esm-patient-notes__selected-diagnosis-card__diagnosisName___MjgaG{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);overflow-wrap:anywhere;min-width:0}.-esm-patient-notes__selected-diagnosis-card__provisionalMark___pSs51{font-size:var(--cds-heading-compact-01-font-size,.875rem);font-weight:var(--cds-heading-compact-01-font-weight,600);line-height:var(--cds-heading-compact-01-line-height,1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing,.16px);color:#525252;margin-inline-end:.25rem}.-esm-patient-notes__visit-notes-form__heading___ZDibC{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);line-height:var(--cds-heading-03-line-height,1.4);letter-spacing:var(--cds-heading-03-letter-spacing,0);margin-bottom:.5rem}.-esm-patient-notes__visit-notes-form__columnLabel___EwgDF{font-size:var(--cds-heading-compact-02-font-size,1rem);font-weight:var(--cds-heading-compact-02-font-weight,600);line-height:var(--cds-heading-compact-02-line-height,1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing,0);color:#525252}.-esm-patient-notes__visit-notes-form__required___Unklu{color:#da1e28;margin-left:.125rem}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM{border-top:.0625rem solid #e0e0e0}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{width:100%;color:inherit;font:inherit;text-align:start;cursor:pointer;background:0 0;border:0;padding:.75rem}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E:focus-visible{outline-offset:-2px;outline:2px solid #0f62fe}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:first-of-type{border-top:none}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:last-of-type{border-bottom:none}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY{background-color:#fff;border:1px solid #e0e0e0;max-height:13.5rem;overflow-y:auto}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY li:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__emptyResults___fCV44{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252;min-height:1rem}.-esm-patient-notes__visit-notes-form__imgUploadHelperText___\+VxXT{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252}.-esm-patient-notes__visit-notes-form__imgThumbnailContainer___6-ih6{width:7rem;height:7rem}.-esm-patient-notes__visit-notes-form__imgThumbnail___PGisE{object-fit:cover;width:100%;height:100%}.-esm-patient-notes__visit-notes-form__savedImagesLoading___06xRV{margin-top:1rem}.-esm-patient-notes__visit-notes-form__imgThumbnailGrid___Tbu9Z{grid-template-columns:repeat(auto-fill,7rem);gap:1rem;margin-top:1rem;display:grid}.-esm-patient-notes__visit-notes-form__imgThumbnailItem___XkrUE{flex-direction:column;align-items:center;display:flex;position:relative}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn{color:#262626;background-color:#fff;border:1px solid #a8a8a8;border-radius:50%;justify-content:center;align-items:center;width:1.5rem;min-width:0;height:1.5rem;min-height:0;padding:0;padding-block:0;position:absolute;top:.25rem;right:.25rem}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{color:#262626}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus{background-color:#fff}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{background-color:#c6c6c6}.-esm-patient-notes__visit-notes-form__button___tic-m{align-content:flex-start;align-items:baseline;min-width:50%;height:4rem;display:flex}.-esm-patient-notes__visit-notes-form__spinner___nX4VV.cds--inline-loading{min-height:1rem}.-esm-patient-notes__visit-notes-form__tablet___R5OWW{background-color:#fff;padding:1.5rem 1rem}.-esm-patient-notes__visit-notes-form__desktop___q-E7d{padding:0}.-esm-patient-notes__visit-notes-form__headerGridRow___jAAax{border-bottom:.0625rem solid #e0e0e0;margin:0}.-esm-patient-notes__visit-notes-form__dataGridRow___wKV9H{grid-template-columns:50% 10% 1fr;margin:.5rem 1rem;display:grid}.-esm-patient-notes__visit-notes-form__formContainer___INxGb{flex:1;margin:1rem}.-esm-patient-notes__visit-notes-form__form___WXW3i{flex-direction:column;justify-content:space-between;height:100%;display:flex}.-esm-patient-notes__visit-notes-form__grid___mG3uC{margin:0;padding:0}.-esm-patient-notes__visit-notes-form__row___\+Ncuq{margin:.5rem 0 2.5rem}.-esm-patient-notes__visit-notes-form__row___\+Ncuq:has(.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY){margin-bottom:1rem}.-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2rem;margin-top:.25rem}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#161616;align-items:center;gap:.25rem;margin-top:.5rem;display:flex}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg{fill:#f1c21b;flex-shrink:0}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg [data-icon-path=inner-path]{fill:#161616;opacity:1}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh{color:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg{fill:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg [data-icon-path=inner-path]{opacity:0}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__form___WXW3i{height:100%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq{gap:4rem;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-1{text-align:left;flex-basis:30%;min-width:8rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-3{flex-basis:70%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{padding:1rem .75rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2.5rem}.-esm-patient-notes__visit-notes-form__errorNotification___K-xrU{margin-top:.25rem}.-esm-patient-notes__visit-notes-form__diagnosisHelperText___R\+a2V{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-top:.5rem}.-esm-patient-notes__visit-notes-form__uploadButton___bTplo{margin-top:1rem}.-esm-patient-notes__visit-notes-form__pendingImage___nyrho{opacity:.4}.-esm-patient-notes__visit-notes-form__removalStatus___9l-fi{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center;margin-block-start:.5rem}.-esm-patient-notes__visit-notes-form__undoButton___-74Gv.cds--btn{flex-shrink:0;margin-block:.5rem 0}.-esm-patient-notes__visit-notes-form__removalHint___a6VpP{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-block-start:.5rem}
1
+ :root{--brand-01:#005d5d;--brand-02:#004144;--brand-03:#007d79;--bottom-nav-height:4rem;--workspace-header-height:3rem;--tablet-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H{grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:end;column-gap:.25rem;margin-top:.5rem;padding:0 .5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H>span{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6{background-color:#f4f4f4;border-radius:4px;grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:center;column-gap:.25rem;margin-top:.25rem;padding:.5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--form-item{justify-self:center;margin:0}.-esm-patient-notes__selected-diagnosis-card__actionsCell___ugf7H{justify-content:center;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label{min-block-size:2rem;min-inline-size:2rem;padding-inline-start:2rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:.5rem .375rem}[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:-.5rem .375rem}.-esm-patient-notes__selected-diagnosis-card__diagnosisActionsMenu___8AWXe .cds--overflow-menu-options__btn{max-inline-size:none}.-esm-patient-notes__selected-diagnosis-card__diagnosisName___MjgaG{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);overflow-wrap:anywhere;min-width:0}.-esm-patient-notes__selected-diagnosis-card__provisionalMark___pSs51{font-size:var(--cds-heading-compact-01-font-size,.875rem);font-weight:var(--cds-heading-compact-01-font-weight,600);line-height:var(--cds-heading-compact-01-line-height,1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing,.16px);color:#525252;margin-inline-end:.25rem}.-esm-patient-notes__visit-notes-form__heading___ZDibC{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);line-height:var(--cds-heading-03-line-height,1.4);letter-spacing:var(--cds-heading-03-letter-spacing,0);margin-bottom:.5rem}.-esm-patient-notes__visit-notes-form__columnLabel___EwgDF{font-size:var(--cds-heading-compact-02-font-size,1rem);font-weight:var(--cds-heading-compact-02-font-weight,600);line-height:var(--cds-heading-compact-02-line-height,1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing,0);color:#525252}.-esm-patient-notes__visit-notes-form__required___Unklu{color:#da1e28;margin-left:.125rem}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM{border-top:.0625rem solid #e0e0e0}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{width:100%;color:inherit;font:inherit;text-align:start;cursor:pointer;background:0 0;border:0;padding:.75rem}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E:focus-visible{outline-offset:-2px;outline:2px solid #0f62fe}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:first-of-type{border-top:none}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:last-of-type{border-bottom:none}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY{background-color:#fff;border:1px solid #e0e0e0;max-height:13.5rem;overflow-y:auto}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY li:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__emptyResults___fCV44{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252;min-height:1rem}.-esm-patient-notes__visit-notes-form__imgUploadHelperText___\+VxXT{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252}.-esm-patient-notes__visit-notes-form__imgThumbnailContainer___6-ih6{width:7rem;height:7rem}.-esm-patient-notes__visit-notes-form__imgThumbnail___PGisE{object-fit:cover;width:100%;height:100%}.-esm-patient-notes__visit-notes-form__savedImagesLoading___06xRV{margin-top:1rem}.-esm-patient-notes__visit-notes-form__imgThumbnailGrid___Tbu9Z{grid-template-columns:repeat(auto-fill,7rem);gap:1rem;margin-top:1rem;display:grid}.-esm-patient-notes__visit-notes-form__imgThumbnailItem___XkrUE{flex-direction:column;align-items:center;display:flex;position:relative}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn{color:#262626;background-color:#fff;border:1px solid #a8a8a8;border-radius:50%;justify-content:center;align-items:center;width:1.5rem;min-width:0;height:1.5rem;min-height:0;padding:0;padding-block:0;position:absolute;top:.25rem;right:.25rem}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{color:#262626}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus{background-color:#fff}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{background-color:#c6c6c6}.-esm-patient-notes__visit-notes-form__button___tic-m{align-content:flex-start;align-items:baseline;min-width:50%;height:4rem;display:flex}.-esm-patient-notes__visit-notes-form__spinner___nX4VV.cds--inline-loading{min-height:1rem}.-esm-patient-notes__visit-notes-form__tablet___R5OWW{background-color:#fff;padding:1.5rem 1rem}.-esm-patient-notes__visit-notes-form__desktop___q-E7d{padding:0}.-esm-patient-notes__visit-notes-form__tablet___R5OWW,.-esm-patient-notes__visit-notes-form__desktop___q-E7d{position:sticky;bottom:0}.-esm-patient-notes__visit-notes-form__headerGridRow___jAAax{border-bottom:.0625rem solid #e0e0e0;margin:0}.-esm-patient-notes__visit-notes-form__dataGridRow___wKV9H{grid-template-columns:50% 10% 1fr;margin:.5rem 1rem;display:grid}.-esm-patient-notes__visit-notes-form__formContainer___INxGb{flex:1;margin:1rem}.-esm-patient-notes__visit-notes-form__form___WXW3i{flex-direction:column;justify-content:space-between;height:100%;display:flex}.-esm-patient-notes__visit-notes-form__grid___mG3uC{margin:0;padding:0}.-esm-patient-notes__visit-notes-form__row___\+Ncuq{margin:.5rem 0 2.5rem}.-esm-patient-notes__visit-notes-form__row___\+Ncuq:has(.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY){margin-bottom:1rem}.-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2rem;margin-top:.25rem}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#161616;align-items:center;gap:.25rem;margin-top:.5rem;display:flex}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg{fill:#f1c21b;flex-shrink:0}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg [data-icon-path=inner-path]{fill:#161616;opacity:1}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh{color:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg{fill:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg [data-icon-path=inner-path]{opacity:0}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__form___WXW3i{height:100%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq{gap:4rem;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-1{text-align:left;flex-basis:30%;min-width:8rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-3{flex-basis:70%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{padding:1rem .75rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2.5rem}.-esm-patient-notes__visit-notes-form__errorNotification___K-xrU{margin-top:.25rem}.-esm-patient-notes__visit-notes-form__diagnosisHelperText___R\+a2V{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-top:.5rem}.-esm-patient-notes__visit-notes-form__uploadButton___bTplo{margin-top:1rem}.-esm-patient-notes__visit-notes-form__pendingImage___nyrho{opacity:.4}.-esm-patient-notes__visit-notes-form__removalStatus___9l-fi{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center;margin-block-start:.5rem}.-esm-patient-notes__visit-notes-form__undoButton___-74Gv.cds--btn{flex-shrink:0;margin-block:.5rem 0}.-esm-patient-notes__visit-notes-form__removalHint___a6VpP{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-block-start:.5rem}
package/dist/6742.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"6742.css","sources":["webpack://@openmrs/esm-patient-notes-app/../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.scss"],"names":[],"mappings":"AAsDA,sUC/CA,6MAQE,0TAOF,mPAYE,gHAMF,sGAQA,uLAKE,6QAQA,kSAQF,iIAIA,+UAMA,iWC3EA,uRAKA,oTAMA,0FAKA,2FAIA,4KAUE,2HAMF,uFAIA,yFAIA,+IAOA,+FAIA,kUAMA,0TAKA,4FAKA,oGAMA,kFAIA,mJAOA,wIAQE,sTAiBE,gPAMA,iGAIA,oGAIA,qGAMJ,2IASE,2FAKF,gGAKA,iEAIA,2GAKA,4HAMA,gFAKA,iIAOA,uEAKA,0EAGE,yIAKF,sFAQA,wXAQE,qGAIE,6HAOJ,kFAGE,qFAGE,8GAOF,4FAIA,sGAIE,6IAMA,8GAKF,+GAIA,kGAKF,mFAIA,gRAMA,4EAIA,uEAIA,iUAOA,sGAKA"}
1
+ {"version":3,"file":"6742.css","sources":["webpack://@openmrs/esm-patient-notes-app/../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.scss"],"names":[],"mappings":"AAsDA,sUC/CA,6MAQE,0TAOF,mPAYE,gHAMF,sGAQA,uLAKE,6QAQA,kSAQF,iIAIA,+UAMA,iWC3EA,uRAKA,oTAMA,0FAKA,2FAIA,4KAUE,2HAMF,uFAIA,yFAIA,+IAOA,+FAIA,kUAMA,0TAKA,4FAKA,oGAMA,kFAIA,mJAOA,wIAQE,sTAiBE,gPAMA,iGAIA,oGAIA,qGAMJ,2IASE,2FAKF,gGAKA,iEAIA,sIAMA,2GAKA,4HAMA,gFAKA,iIAOA,uEAKA,0EAGE,yIAKF,sFAQA,wXAQE,qGAIE,6HAOJ,kFAGE,qFAGE,8GAOF,4FAIA,sGAIE,6IAMA,8GAKF,+GAIA,kGAKF,mFAIA,gRAMA,4EAIA,uEAIA,iUAOA,sGAKA"}
package/dist/6994.css CHANGED
@@ -1 +1 @@
1
- :root{--brand-01:#005d5d;--brand-02:#004144;--brand-03:#007d79;--bottom-nav-height:4rem;--workspace-header-height:3rem;--tablet-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H{grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:end;column-gap:.25rem;margin-top:.5rem;padding:0 .5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H>span{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6{background-color:#f4f4f4;border-radius:4px;grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:center;column-gap:.25rem;margin-top:.25rem;padding:.5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--form-item{justify-self:center;margin:0}.-esm-patient-notes__selected-diagnosis-card__actionsCell___ugf7H{justify-content:center;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label{min-block-size:2rem;min-inline-size:2rem;padding-inline-start:2rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:.5rem .375rem}[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:-.5rem .375rem}.-esm-patient-notes__selected-diagnosis-card__diagnosisActionsMenu___8AWXe .cds--overflow-menu-options__btn{max-inline-size:none}.-esm-patient-notes__selected-diagnosis-card__diagnosisName___MjgaG{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);overflow-wrap:anywhere;min-width:0}.-esm-patient-notes__selected-diagnosis-card__provisionalMark___pSs51{font-size:var(--cds-heading-compact-01-font-size,.875rem);font-weight:var(--cds-heading-compact-01-font-weight,600);line-height:var(--cds-heading-compact-01-line-height,1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing,.16px);color:#525252;margin-inline-end:.25rem}.-esm-patient-notes__visit-notes-form__heading___ZDibC{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);line-height:var(--cds-heading-03-line-height,1.4);letter-spacing:var(--cds-heading-03-letter-spacing,0);margin-bottom:.5rem}.-esm-patient-notes__visit-notes-form__columnLabel___EwgDF{font-size:var(--cds-heading-compact-02-font-size,1rem);font-weight:var(--cds-heading-compact-02-font-weight,600);line-height:var(--cds-heading-compact-02-line-height,1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing,0);color:#525252}.-esm-patient-notes__visit-notes-form__required___Unklu{color:#da1e28;margin-left:.125rem}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM{border-top:.0625rem solid #e0e0e0}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{width:100%;color:inherit;font:inherit;text-align:start;cursor:pointer;background:0 0;border:0;padding:.75rem}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E:focus-visible{outline-offset:-2px;outline:2px solid #0f62fe}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:first-of-type{border-top:none}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:last-of-type{border-bottom:none}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY{background-color:#fff;border:1px solid #e0e0e0;max-height:13.5rem;overflow-y:auto}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY li:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__emptyResults___fCV44{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252;min-height:1rem}.-esm-patient-notes__visit-notes-form__imgUploadHelperText___\+VxXT{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252}.-esm-patient-notes__visit-notes-form__imgThumbnailContainer___6-ih6{width:7rem;height:7rem}.-esm-patient-notes__visit-notes-form__imgThumbnail___PGisE{object-fit:cover;width:100%;height:100%}.-esm-patient-notes__visit-notes-form__savedImagesLoading___06xRV{margin-top:1rem}.-esm-patient-notes__visit-notes-form__imgThumbnailGrid___Tbu9Z{grid-template-columns:repeat(auto-fill,7rem);gap:1rem;margin-top:1rem;display:grid}.-esm-patient-notes__visit-notes-form__imgThumbnailItem___XkrUE{flex-direction:column;align-items:center;display:flex;position:relative}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn{color:#262626;background-color:#fff;border:1px solid #a8a8a8;border-radius:50%;justify-content:center;align-items:center;width:1.5rem;min-width:0;height:1.5rem;min-height:0;padding:0;padding-block:0;position:absolute;top:.25rem;right:.25rem}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{color:#262626}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus{background-color:#fff}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{background-color:#c6c6c6}.-esm-patient-notes__visit-notes-form__button___tic-m{align-content:flex-start;align-items:baseline;min-width:50%;height:4rem;display:flex}.-esm-patient-notes__visit-notes-form__spinner___nX4VV.cds--inline-loading{min-height:1rem}.-esm-patient-notes__visit-notes-form__tablet___R5OWW{background-color:#fff;padding:1.5rem 1rem}.-esm-patient-notes__visit-notes-form__desktop___q-E7d{padding:0}.-esm-patient-notes__visit-notes-form__headerGridRow___jAAax{border-bottom:.0625rem solid #e0e0e0;margin:0}.-esm-patient-notes__visit-notes-form__dataGridRow___wKV9H{grid-template-columns:50% 10% 1fr;margin:.5rem 1rem;display:grid}.-esm-patient-notes__visit-notes-form__formContainer___INxGb{flex:1;margin:1rem}.-esm-patient-notes__visit-notes-form__form___WXW3i{flex-direction:column;justify-content:space-between;height:100%;display:flex}.-esm-patient-notes__visit-notes-form__grid___mG3uC{margin:0;padding:0}.-esm-patient-notes__visit-notes-form__row___\+Ncuq{margin:.5rem 0 2.5rem}.-esm-patient-notes__visit-notes-form__row___\+Ncuq:has(.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY){margin-bottom:1rem}.-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2rem;margin-top:.25rem}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#161616;align-items:center;gap:.25rem;margin-top:.5rem;display:flex}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg{fill:#f1c21b;flex-shrink:0}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg [data-icon-path=inner-path]{fill:#161616;opacity:1}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh{color:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg{fill:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg [data-icon-path=inner-path]{opacity:0}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__form___WXW3i{height:100%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq{gap:4rem;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-1{text-align:left;flex-basis:30%;min-width:8rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-3{flex-basis:70%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{padding:1rem .75rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2.5rem}.-esm-patient-notes__visit-notes-form__errorNotification___K-xrU{margin-top:.25rem}.-esm-patient-notes__visit-notes-form__diagnosisHelperText___R\+a2V{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-top:.5rem}.-esm-patient-notes__visit-notes-form__uploadButton___bTplo{margin-top:1rem}.-esm-patient-notes__visit-notes-form__pendingImage___nyrho{opacity:.4}.-esm-patient-notes__visit-notes-form__removalStatus___9l-fi{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center;margin-block-start:.5rem}.-esm-patient-notes__visit-notes-form__undoButton___-74Gv.cds--btn{flex-shrink:0;margin-block:.5rem 0}.-esm-patient-notes__visit-notes-form__removalHint___a6VpP{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-block-start:.5rem}
1
+ :root{--brand-01:#005d5d;--brand-02:#004144;--brand-03:#007d79;--bottom-nav-height:4rem;--workspace-header-height:3rem;--tablet-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height:calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H{grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:end;column-gap:.25rem;margin-top:.5rem;padding:0 .5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisListHeader___h-S7H>span{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6{background-color:#f4f4f4;border-radius:4px;grid-template-columns:3rem minmax(0,1fr) 2rem 2rem;align-items:center;column-gap:.25rem;margin-top:.25rem;padding:.5rem;display:grid}.-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--form-item{justify-self:center;margin:0}.-esm-patient-notes__selected-diagnosis-card__actionsCell___ugf7H{justify-content:center;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label{min-block-size:2rem;min-inline-size:2rem;padding-inline-start:2rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,.omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:.5rem .375rem}[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:before,[dir=rtl] .omrs-breakpoint-lt-desktop .-esm-patient-notes__selected-diagnosis-card__diagnosisRow___vAKJ6 .cds--checkbox-label:after{translate:-.5rem .375rem}.-esm-patient-notes__selected-diagnosis-card__diagnosisActionsMenu___8AWXe .cds--overflow-menu-options__btn{max-inline-size:none}.-esm-patient-notes__selected-diagnosis-card__diagnosisName___MjgaG{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);overflow-wrap:anywhere;min-width:0}.-esm-patient-notes__selected-diagnosis-card__provisionalMark___pSs51{font-size:var(--cds-heading-compact-01-font-size,.875rem);font-weight:var(--cds-heading-compact-01-font-weight,600);line-height:var(--cds-heading-compact-01-line-height,1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing,.16px);color:#525252;margin-inline-end:.25rem}.-esm-patient-notes__visit-notes-form__heading___ZDibC{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);line-height:var(--cds-heading-03-line-height,1.4);letter-spacing:var(--cds-heading-03-letter-spacing,0);margin-bottom:.5rem}.-esm-patient-notes__visit-notes-form__columnLabel___EwgDF{font-size:var(--cds-heading-compact-02-font-size,1rem);font-weight:var(--cds-heading-compact-02-font-weight,600);line-height:var(--cds-heading-compact-02-line-height,1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing,0);color:#525252}.-esm-patient-notes__visit-notes-form__required___Unklu{color:#da1e28;margin-left:.125rem}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM{border-top:.0625rem solid #e0e0e0}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{width:100%;color:inherit;font:inherit;text-align:start;cursor:pointer;background:0 0;border:0;padding:.75rem}.-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E:focus-visible{outline-offset:-2px;outline:2px solid #0f62fe}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:first-of-type{border-top:none}.-esm-patient-notes__visit-notes-form__diagnosis___XsPGM:last-of-type{border-bottom:none}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY{background-color:#fff;border:1px solid #e0e0e0;max-height:13.5rem;overflow-y:auto}.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY li:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__emptyResults___fCV44{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252;min-height:1rem}.-esm-patient-notes__visit-notes-form__imgUploadHelperText___\+VxXT{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#525252}.-esm-patient-notes__visit-notes-form__imgThumbnailContainer___6-ih6{width:7rem;height:7rem}.-esm-patient-notes__visit-notes-form__imgThumbnail___PGisE{object-fit:cover;width:100%;height:100%}.-esm-patient-notes__visit-notes-form__savedImagesLoading___06xRV{margin-top:1rem}.-esm-patient-notes__visit-notes-form__imgThumbnailGrid___Tbu9Z{grid-template-columns:repeat(auto-fill,7rem);gap:1rem;margin-top:1rem;display:grid}.-esm-patient-notes__visit-notes-form__imgThumbnailItem___XkrUE{flex-direction:column;align-items:center;display:flex;position:relative}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn{color:#262626;background-color:#fff;border:1px solid #a8a8a8;border-radius:50%;justify-content:center;align-items:center;width:1.5rem;min-width:0;height:1.5rem;min-height:0;padding:0;padding-block:0;position:absolute;top:.25rem;right:.25rem}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus,.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{color:#262626}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:focus{background-color:#fff}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:hover{background-color:#e0e0e0}.-esm-patient-notes__visit-notes-form__removeButton___O7iSI.cds--btn:active{background-color:#c6c6c6}.-esm-patient-notes__visit-notes-form__button___tic-m{align-content:flex-start;align-items:baseline;min-width:50%;height:4rem;display:flex}.-esm-patient-notes__visit-notes-form__spinner___nX4VV.cds--inline-loading{min-height:1rem}.-esm-patient-notes__visit-notes-form__tablet___R5OWW{background-color:#fff;padding:1.5rem 1rem}.-esm-patient-notes__visit-notes-form__desktop___q-E7d{padding:0}.-esm-patient-notes__visit-notes-form__tablet___R5OWW,.-esm-patient-notes__visit-notes-form__desktop___q-E7d{position:sticky;bottom:0}.-esm-patient-notes__visit-notes-form__headerGridRow___jAAax{border-bottom:.0625rem solid #e0e0e0;margin:0}.-esm-patient-notes__visit-notes-form__dataGridRow___wKV9H{grid-template-columns:50% 10% 1fr;margin:.5rem 1rem;display:grid}.-esm-patient-notes__visit-notes-form__formContainer___INxGb{flex:1;margin:1rem}.-esm-patient-notes__visit-notes-form__form___WXW3i{flex-direction:column;justify-content:space-between;height:100%;display:flex}.-esm-patient-notes__visit-notes-form__grid___mG3uC{margin:0;padding:0}.-esm-patient-notes__visit-notes-form__row___\+Ncuq{margin:.5rem 0 2.5rem}.-esm-patient-notes__visit-notes-form__row___\+Ncuq:has(.-esm-patient-notes__visit-notes-form__diagnosisList___KvUlY){margin-bottom:1rem}.-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2rem;margin-top:.25rem}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);line-height:var(--cds-body-compact-01-line-height,1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);color:#161616;align-items:center;gap:.25rem;margin-top:.5rem;display:flex}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg{fill:#f1c21b;flex-shrink:0}.-esm-patient-notes__visit-notes-form__primaryRequiredWarning___nkuiv svg [data-icon-path=inner-path]{fill:#161616;opacity:1}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh{color:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg{fill:#da1e28}.-esm-patient-notes__visit-notes-form__primaryRequiredError___PFQdh svg [data-icon-path=inner-path]{opacity:0}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__form___WXW3i{height:100%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq{gap:4rem;display:flex}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-1{text-align:left;flex-basis:30%;min-width:8rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__row___\+Ncuq .cds--col-sm-3{flex-basis:70%}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__diagnosisButton___gSR4E{padding:1rem .75rem}.omrs-breakpoint-lt-desktop .-esm-patient-notes__visit-notes-form__skeleton___Wp-mM{height:2.5rem}.-esm-patient-notes__visit-notes-form__errorNotification___K-xrU{margin-top:.25rem}.-esm-patient-notes__visit-notes-form__diagnosisHelperText___R\+a2V{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-top:.5rem}.-esm-patient-notes__visit-notes-form__uploadButton___bTplo{margin-top:1rem}.-esm-patient-notes__visit-notes-form__pendingImage___nyrho{opacity:.4}.-esm-patient-notes__visit-notes-form__removalStatus___9l-fi{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);line-height:var(--cds-label-01-line-height,1.33333);letter-spacing:var(--cds-label-01-letter-spacing,.32px);color:#525252;text-align:center;margin-block-start:.5rem}.-esm-patient-notes__visit-notes-form__undoButton___-74Gv.cds--btn{flex-shrink:0;margin-block:.5rem 0}.-esm-patient-notes__visit-notes-form__removalHint___a6VpP{font-size:var(--cds-helper-text-01-font-size,.75rem);line-height:var(--cds-helper-text-01-line-height,1.33333);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);color:#525252;margin-block-start:.5rem}
package/dist/6994.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"6994.css","sources":["webpack://@openmrs/esm-patient-notes-app/../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.scss"],"names":[],"mappings":"AAsDA,sUC/CA,6MAQE,0TAOF,mPAYE,gHAMF,sGAQA,uLAKE,6QAQA,kSAQF,iIAIA,+UAMA,iWC3EA,uRAKA,oTAMA,0FAKA,2FAIA,4KAUE,2HAMF,uFAIA,yFAIA,+IAOA,+FAIA,kUAMA,0TAKA,4FAKA,oGAMA,kFAIA,mJAOA,wIAQE,sTAiBE,gPAMA,iGAIA,oGAIA,qGAMJ,2IASE,2FAKF,gGAKA,iEAIA,2GAKA,4HAMA,gFAKA,iIAOA,uEAKA,0EAGE,yIAKF,sFAQA,wXAQE,qGAIE,6HAOJ,kFAGE,qFAGE,8GAOF,4FAIA,sGAIE,6IAMA,8GAKF,+GAIA,kGAKF,mFAIA,gRAMA,4EAIA,uEAIA,iUAOA,sGAKA"}
1
+ {"version":3,"file":"6994.css","sources":["webpack://@openmrs/esm-patient-notes-app/../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/selected-diagnosis-card.scss","webpack://@openmrs/esm-patient-notes-app/./src/notes/visit-notes-form.scss"],"names":[],"mappings":"AAsDA,sUC/CA,6MAQE,0TAOF,mPAYE,gHAMF,sGAQA,uLAKE,6QAQA,kSAQF,iIAIA,+UAMA,iWC3EA,uRAKA,oTAMA,0FAKA,2FAIA,4KAUE,2HAMF,uFAIA,yFAIA,+IAOA,+FAIA,kUAMA,0TAKA,4FAKA,oGAMA,kFAIA,mJAOA,wIAQE,sTAiBE,gPAMA,iGAIA,oGAIA,qGAMJ,2IASE,2FAKF,gGAKA,iEAIA,sIAMA,2GAKA,4HAMA,gFAKA,iIAOA,uEAKA,0EAGE,yIAKF,sFAQA,wXAQE,qGAIE,6HAOJ,kFAGE,qFAGE,8GAOF,4FAIA,sGAIE,6IAMA,8GAKF,+GAIA,kGAKF,mFAIA,gRAMA,4EAIA,uEAIA,iUAOA,sGAKA"}
package/dist/6994.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_app||[]).push([["6994"],{9615(e,t,n){n.r(t),n.d(t,{default:()=>o});var p=n(5399),s=n.n(p),a=n(8447);let o=({closeWorkspace:e,workspaceProps:{encounter:t,formContext:n,patientUuid:p,patient:o,visitContext:r}})=>s().createElement(a.A,{encounter:t,formContext:n,patientUuid:p,patient:o,visitContext:r,closeWorkspace:e})}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_app||[]).push([["6994"],{9615(e,t,a){a.r(t),a.d(t,{default:()=>o});var n=a(5399),s=a.n(n),p=a(8447);let o=({closeWorkspace:e,workspaceProps:{encounter:t,formContext:a,patientUuid:n,patient:o,visitContext:r,showPatientHeader:i=!0}})=>s().createElement(p.A,{encounter:t,formContext:a,patientUuid:n,patient:o,visitContext:r,closeWorkspace:e,showPatientHeader:i})}}]);
package/dist/6994.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"6994.js","sources":["webpack://@openmrs/esm-patient-notes-app/./src/notes/exported-visit-notes-form.workspace.tsx"],"names":["closeWorkspace","encounter","formContext","patientUuid","patient","visitContext","VisitNotesForm"],"mappings":"0NA+BA,MAbI,CAAC,CAAEA,eAAAA,CAAc,CAAE,eAAgB,CAAEC,UAAAA,CAAS,CAAEC,YAAAA,CAAW,CAAEC,YAAAA,CAAW,CAAEC,QAAAA,CAAO,CAAEC,aAAAA,CAAY,CAAE,CAAE,GAEnG,kBAACC,EAAAA,CAAcA,CAAAA,CACb,UAAWL,EACX,YAAaC,EACb,YAAaC,EACb,QAASC,EACT,aAAcC,EACd,eAAgBL,C"}
1
+ {"version":3,"file":"6994.js","sources":["webpack://@openmrs/esm-patient-notes-app/./src/notes/exported-visit-notes-form.workspace.tsx"],"names":["closeWorkspace","encounter","formContext","patientUuid","patient","visitContext","showPatientHeader","VisitNotesForm"],"mappings":"0NAoCA,MAjBI,CAAC,CACHA,eAAAA,CAAc,CACd,eAAgB,CAAEC,UAAAA,CAAS,CAAEC,YAAAA,CAAW,CAAEC,YAAAA,CAAW,CAAEC,QAAAA,CAAO,CAAEC,aAAAA,CAAY,CAAEC,kBAAAA,EAAoB,EAAI,CAAE,CACzG,GAEG,kBAACC,EAAAA,CAAcA,CAAAA,CACb,UAAWN,EACX,YAAaC,EACb,YAAaC,EACb,QAASC,EACT,aAAcC,EACd,eAAgBL,EAChB,kBAAmBM,C"}
@@ -1,3 +1,3 @@
1
- var _openmrs_esm_patient_notes_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-patient-notes-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-patient-notes-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,o,i={8143(e,t,r){"use strict";var n,o,i,a,s,l,u,p,c,d,f,h,m=r(523),g=r.n(m);let b=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),y={};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!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},M=null!=(i=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?i:{},_=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},O=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(O))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-patient-notes-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:o,factory:i,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:o,scope:[t],shareConfig:p,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(y).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>b),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>y),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=y[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:_,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})}},9188(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},1772(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=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=i(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=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},9837(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(1772);let n=r(7789),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},3738(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(1772);let n=r(7789),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.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,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},7789(e,t,r){r(1772);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-patient-notes-app:13.0.2-pre.12774";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)}},223(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=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=i(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=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3545(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)}},6917(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},1864(e,t,r){let n=r(3545),o=r(1092),i=r(2677),a=r(85),s=r(6781);t.consumes=function(e){o.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:o}=c[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=i.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:[o.options.name]});let b=o.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});b.then?r.push(l[e]=b.then(t).catch(n)):t(b)}catch(e){n(e)}})}},85(e,t){t.RUNTIME_012="RUNTIME-012"},6781(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
1
+ var _openmrs_esm_patient_notes_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-patient-notes-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-patient-notes-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,o,i={8143(e,t,r){"use strict";var n,o,i,a,s,l,u,p,c,d,f,h,m=r(523),g=r.n(m);let b=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),y={};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!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},M=null!=(i=null==(p=r.initializeSharingData)?void 0:p.scopeToSharingDataMapping)?i:{},_=null!=(a=null==(c=r.consumesLoadingData)?void 0:c.chunkMapping)?a:{},O=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(O))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-patient-notes-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:o,factory:i,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:o,scope:[t],shareConfig:p,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(y).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>b),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>y),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=y[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:_,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})}},9188(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},1772(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=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=i(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=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},9837(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(1772);let n=r(7789),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},3738(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(1772);let n=r(7789),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.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,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},7789(e,t,r){r(1772);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@openmrs/esm-patient-notes-app:13.0.2-pre.12788";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)}},223(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=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=i(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=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3545(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)}},6917(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},1864(e,t,r){let n=r(3545),o=r(1092),i=r(2677),a=r(85),s=r(6781);t.consumes=function(e){o.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:o}=c[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:p,getter:d,shareInfo:f,treeShakingGetter:h}=c[e],m=i.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:[o.options.name]});let b=o.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});b.then?r.push(l[e]=b.then(t).catch(n)):t(b)}catch(e){n(e)}})}},85(e,t){t.RUNTIME_012="RUNTIME-012"},6781(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
2
2
  ${n}`),o.join("\n")}},1315(e,t){t.getSharedFallbackGetter=({shareKey:e,factory:t,version:r,webpackRequire:n,libraryType:o="global"})=>{let{runtime:i,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()=>i.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:p[2],entry:`${n.p}${p[0]}`,type:o,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())})}},2677(e,t){t.getUsedExports=function(e,t){let r=e.federation.usedExports;if(r)return r[t]}},523(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let n=r(223),o=r(3545),i=r(3586),a=r(1864),s=r(2221),l=r(4307),u=r(1180),p=r(367),c=r(1315),d=r(3738);d=n.__toESM(d);let f={remotes:i.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:o.attachShareScopeMap,bundlerRuntimeOptions:{}},m=h.instance,g=h.initOptions,b=h.bundlerRuntimeOptions;t.attachShareScopeMap=o.attachShareScopeMap,t.bundlerRuntime=f,t.bundlerRuntimeOptions=b,t.default=h,t.initOptions=g,t.instance=m,Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return d}})},367(e,t,r){let n=r(223),o=r(3738),i=r(9837);i=n.__toESM(i),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=i.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:i}=t;if(!i)return;let{secondarySharedTreeShakingName:a,secondarySharedTreeShakingEntry:s,treeShakingStatus:p}=n;i.status!==p&&(i.status=p,s&&l&&a&&(i.get=async()=>{let e=await (0,o.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)}},1180(e,t){t.initContainerEntry=function(e){let{webpackRequire:t,shareScope:r,initScope:n,shareScopeKey:o,remoteEntryInitOptions:i}=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:[],...i});let s=i?.shareScopeKeys,l=i?.shareScopeMap;if(o&&"string"!=typeof o)o.forEach(e=>{if(!s||!l)return void a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}});l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})});else{let e=o||"default";Array.isArray(s)?s.forEach(e=>{l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})}):a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}})}return(t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),Array.isArray(o))?t.federation.initOptions.shared?t.I(o,n):Promise.all(o.map(e=>t.I(e,n))).then(()=>!0):t.I(o||"default",n)}},2221(e,t,r){let n=r(3545),o=r(6917);t.initializeSharing=function({shareScopeName:e,webpackRequire:t,initPromises:r,initTokens:i,initScope:a}){let s=Array.isArray(e)?e:[e];var l=[],u=function(s){a||(a=[]);let l=t.federation.instance;var u=i[s];if(u||(u=i[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 o=t(r);if(!o)return;var i=r=>r&&r.init&&r.init(t.S[s],a,{shareScopeMap:t.S||{},shareScopeKeys:e});if(o.then)return d.push(o.then(i,n));var l=i(o);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];o.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)}},4307(e,t,r){let n=r(1092),o=r(2677);t.installInitialConsumes=function(e){n.updateConsumeOptions(e);let{moduleToHandlerMapping:t,webpackRequire:r,installedModules:i,initialConsumes:a,asyncLoad:s}=e,l=[];a.forEach(e=>{l.push([e,()=>(function(e){let{moduleId:t,moduleToHandlerMapping:r,webpackRequire:n,asyncLoad:i}=e,a=n.federation.instance;if(!a)throw Error("Federation instance not found!");let{shareKey:s,shareInfo:l}=r[t];try{let e=o.getUsedExports(n,s),t={...l};if(e&&(t.treeShaking={usedExports:e,useIn:[a.options.name]}),i)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]=o=>{i[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){}o.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)})}},3586(e,t,r){r(223);let n=r(3545),o=r(6917),i=r(1092),a=r(1853);t.remotes=function(e){i.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],i=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,o,i,a,s)=>{try{let u=e(t,o);if(!u||!u.then)return a(u,i,s);{let e=u.then(e=>a(e,i),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,o)=>c(r.get,n[1],t,0,f,o),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===i.length&&o.FEDERATION_SUPPORTED_TYPES.includes(i[0].externalType)&&i[0].name?c(()=>{try{let e=(0,a.decodeName)(i[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)})}},1092(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:o}=t,{sharedFallback:i,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:o={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(o).forEach(([e,n])=>{r[e]||(r[e]={getter:i?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:i?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:i?{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(o&&!o._updated){let{federation:e}=t;if(!e.instance||!o.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(o.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={requiredVersion:`^${o}`},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:o,scope:[e],shareConfig:p,get:i};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),o._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:o={}}=e,{remotesLoadingData:i}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!i||i._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=i;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)})}o&&Object.entries(s).forEach(([e,t])=>{o[e]||(o[e]=[]),t.forEach(t=>{o[e].includes(t)||o[e].push(t)})}),i._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e].call(r.exports,r,r.exports,s),r.exports}s.m=i,s.c=a,s.x=()=>s(9188),s.federation||(s.federation={chunkMatcher:function(e){return!/^(50(59|80)|(231|315|746)8|6544|6961|8652)$/.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 o,i,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-patient-notes-app:"+r){o=p;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@openmrs/esm-patient-notes-app:"+r),o.src=e),l[e]=[t];var c=function(t,r){o.onerror=o.onload=null,clearTimeout(d);var n=l[e];if(delete l[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@carbon/react",version:"1.92.1",factory:()=>Promise.all([s.e("4669"),s.e("9488"),s.e("5"),s.e("8652"),s.e("7468"),s.e("3390")]).then(()=>()=>s(6020)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"11.0.1-pre.5799",factory:()=>Promise.all([s.e("4669"),s.e("7621"),s.e("3187"),s.e("8652"),s.e("7468"),s.e("6544"),s.e("5059"),s.e("5080"),s.e("3158")]).then(()=>()=>s(2430)),eager:0,singleton:1,requiredVersion:"11.x",strictVersion:0},{name:"@openmrs/esm-patient-common-lib",version:"13.0.2-pre.12774",factory:()=>Promise.all([s.e("7621"),s.e("8652"),s.e("6544"),s.e("5080"),s.e("9353"),s.e("6961"),s.e("5267")]).then(()=>()=>s(7840)),eager:0,singleton:1,requiredVersion:"13.x",strictVersion:0},{name:"dayjs",version:"1.11.13",factory:()=>s.e("5697").then(()=>()=>s(3464)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([s.e("689"),s.e("8652")]).then(()=>()=>s(3144)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("1789"),s.e("8652")]).then(()=>()=>s(2348)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react-router-dom",version:"6.30.4",factory:()=>Promise.all([s.e("9712"),s.e("8652"),s.e("7468")]).then(()=>()=>s(7059)),eager:0,singleton:1,requiredVersion:"6.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("466").then(()=>()=>s(4041)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("8652")]).then(()=>()=>s(2372)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("8652"),s.e("9061")]).then(()=>()=>s(9876)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("8652"),s.e("9771")]).then(()=>()=>s(2470)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("8652"),s.e("7209")]).then(()=>()=>s(5216)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@openmrs/esm-patient-notes-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:{8652:["5399"],7468:["8439"],5059:["222"],6544:["5571"],6961:["2664"],8800:["6717"],5080:["7807","3660","324","1619"],3158:["682","3432"]},moduleIdToConsumeDataMapping:{682:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("2152")]).then(()=>()=>s(2470))},6717:{shareScope:"default",shareKey:"@openmrs/esm-patient-common-lib",import:"@openmrs/esm-patient-common-lib",requiredVersion:"13.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6544"),s.e("9353"),s.e("2318")]).then(()=>()=>s(7840))},3432:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3989").then(()=>()=>s(2372))},2664:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"11.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4669"),s.e("3187"),s.e("7468"),s.e("6544"),s.e("5059"),s.e("3158")]).then(()=>()=>s(2430))},3660:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("1442")]).then(()=>()=>s(9876))},8439:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("689").then(()=>()=>s(3144))},5571:{shareScope:"default",shareKey:"react-router-dom",import:"react-router-dom",requiredVersion:"6.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("9712"),s.e("7468")]).then(()=>()=>s(7059))},5399:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("466").then(()=>()=>s(4041))},222:{shareScope:"default",shareKey:"dayjs",import:"dayjs",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("5697").then(()=>()=>s(3464))},7807:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("1789").then(()=>()=>s(2348))},324:{shareScope:"default",shareKey:"@carbon/react",import:"@carbon/react",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4669"),s.e("9488"),s.e("5"),s.e("7468")]).then(()=>()=>s(6020))},1619:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("9590")]).then(()=>()=>s(5216))}},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,o){var i=document.createElement("link");return i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.href=t,i.onerror=i.onload=function(r){if(i.onerror=i.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,i.parentNode&&i.parentNode.removeChild(i),o(l)}},r?r.parentNode.insertBefore(i,r.nextSibling):document.head.appendChild(i),i},h=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=r[n],i=o.getAttribute("data-href")||o.getAttribute("href");if(i&&(i=i.split("?")[0]),"stylesheet"===o.rel&&(i===e||i===t))return o}for(var a=document.getElementsByTagName("style"),n=0;n<a.length;n++){var o=a[n],i=o.getAttribute("data-href");if(i===e||i===t)return o}},m={2190:0};s.f.miniCss=function(e,t){if(m[e])t.push(m[e]);else 0!==m[e]&&({2318:1,2842:1,3187:1,5267:1,5861:1,6742:1,6994:1,8800:1})[e]&&t.push(m[e]=new Promise(function(t,r){var n=s.miniCssF(e),o=s.p+n;if(h(n,o))return t();f(e,o,null,t,r)}).then(function(){m[e]=0},function(t){throw delete m[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("7621"),s.e("7682"),s.e("8652"),s.e("5080"),s.e("6961"),s.e("8800")]).then(()=>()=>s(7251))},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={2190: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(/^(50(59|80)|(231|315|746)8|6544|6961|8652)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=o);var i=s.p+s.u(t),a=Error();s.l(i,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,o,[i,a,l]=r,u=0;if(i.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<i.length;u++)o=i[u],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},(r=globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_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,o=!1,s.x=function(){if(o||(o=!0,s(8143)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_openmrs_esm_patient_notes_app=s.x()})();
3
+ while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},c=(e,t,o,i,a,s)=>{try{let u=e(t,o);if(!u||!u.then)return a(u,i,s);{let e=u.then(e=>a(e,i),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,o)=>c(r.get,n[1],t,0,f,o),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===i.length&&o.FEDERATION_SUPPORTED_TYPES.includes(i[0].externalType)&&i[0].name?c(()=>{try{let e=(0,a.decodeName)(i[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)})}},1092(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:o}=t,{sharedFallback:i,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:o={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(o).forEach(([e,n])=>{r[e]||(r[e]={getter:i?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:i?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:i?{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(o&&!o._updated){let{federation:e}=t;if(!e.instance||!o.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(o.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,p={requiredVersion:`^${o}`},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:o,scope:[e],shareConfig:p,get:i};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),o._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:o={}}=e,{remotesLoadingData:i}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!i||i._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=i;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)})}o&&Object.entries(s).forEach(([e,t])=>{o[e]||(o[e]=[]),t.forEach(t=>{o[e].includes(t)||o[e].push(t)})}),i._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e].call(r.exports,r,r.exports,s),r.exports}s.m=i,s.c=a,s.x=()=>s(9188),s.federation||(s.federation={chunkMatcher:function(e){return!/^(50(59|80)|(231|315|746)8|6544|6961|8652)$/.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 o,i,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-patient-notes-app:"+r){o=p;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@openmrs/esm-patient-notes-app:"+r),o.src=e),l[e]=[t];var c=function(t,r){o.onerror=o.onload=null,clearTimeout(d);var n=l[e];if(delete l[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@carbon/react",version:"1.92.1",factory:()=>Promise.all([s.e("4669"),s.e("9488"),s.e("5"),s.e("8652"),s.e("7468"),s.e("3390")]).then(()=>()=>s(6020)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"@openmrs/esm-framework",version:"11.0.1-pre.5799",factory:()=>Promise.all([s.e("4669"),s.e("7621"),s.e("3187"),s.e("8652"),s.e("7468"),s.e("6544"),s.e("5059"),s.e("5080"),s.e("3158")]).then(()=>()=>s(2430)),eager:0,singleton:1,requiredVersion:"11.x",strictVersion:0},{name:"@openmrs/esm-patient-common-lib",version:"13.0.2-pre.12788",factory:()=>Promise.all([s.e("7621"),s.e("8652"),s.e("6544"),s.e("5080"),s.e("9353"),s.e("6961"),s.e("5267")]).then(()=>()=>s(7840)),eager:0,singleton:1,requiredVersion:"13.x",strictVersion:0},{name:"dayjs",version:"1.11.13",factory:()=>s.e("5697").then(()=>()=>s(3464)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([s.e("689"),s.e("8652")]).then(()=>()=>s(3144)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("1789"),s.e("8652")]).then(()=>()=>s(2348)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react-router-dom",version:"6.30.4",factory:()=>Promise.all([s.e("9712"),s.e("8652"),s.e("7468")]).then(()=>()=>s(7059)),eager:0,singleton:1,requiredVersion:"6.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("466").then(()=>()=>s(4041)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("8652")]).then(()=>()=>s(2372)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("8652"),s.e("9061")]).then(()=>()=>s(9876)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("8652"),s.e("9771")]).then(()=>()=>s(2470)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("8652"),s.e("7209")]).then(()=>()=>s(5216)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@openmrs/esm-patient-notes-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:{8652:["5399"],7468:["8439"],5059:["222"],6544:["5571"],6961:["2664"],8800:["6717"],5080:["7807","3660","324","1619"],3158:["682","3432"]},moduleIdToConsumeDataMapping:{682:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("2152")]).then(()=>()=>s(2470))},6717:{shareScope:"default",shareKey:"@openmrs/esm-patient-common-lib",import:"@openmrs/esm-patient-common-lib",requiredVersion:"13.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6544"),s.e("9353"),s.e("2318")]).then(()=>()=>s(7840))},3432:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3989").then(()=>()=>s(2372))},2664:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"11.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4669"),s.e("3187"),s.e("7468"),s.e("6544"),s.e("5059"),s.e("3158")]).then(()=>()=>s(2430))},3660:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("1442")]).then(()=>()=>s(9876))},8439:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("689").then(()=>()=>s(3144))},5571:{shareScope:"default",shareKey:"react-router-dom",import:"react-router-dom",requiredVersion:"6.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("9712"),s.e("7468")]).then(()=>()=>s(7059))},5399:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("466").then(()=>()=>s(4041))},222:{shareScope:"default",shareKey:"dayjs",import:"dayjs",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("5697").then(()=>()=>s(3464))},7807:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("1789").then(()=>()=>s(2348))},324:{shareScope:"default",shareKey:"@carbon/react",import:"@carbon/react",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("4669"),s.e("9488"),s.e("5"),s.e("7468")]).then(()=>()=>s(6020))},1619:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("3989"),s.e("4560"),s.e("9590")]).then(()=>()=>s(5216))}},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,o){var i=document.createElement("link");return i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.href=t,i.onerror=i.onload=function(r){if(i.onerror=i.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,i.parentNode&&i.parentNode.removeChild(i),o(l)}},r?r.parentNode.insertBefore(i,r.nextSibling):document.head.appendChild(i),i},h=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=r[n],i=o.getAttribute("data-href")||o.getAttribute("href");if(i&&(i=i.split("?")[0]),"stylesheet"===o.rel&&(i===e||i===t))return o}for(var a=document.getElementsByTagName("style"),n=0;n<a.length;n++){var o=a[n],i=o.getAttribute("data-href");if(i===e||i===t)return o}},m={2190:0};s.f.miniCss=function(e,t){if(m[e])t.push(m[e]);else 0!==m[e]&&({2318:1,2842:1,3187:1,5267:1,5861:1,6742:1,6994:1,8800:1})[e]&&t.push(m[e]=new Promise(function(t,r){var n=s.miniCssF(e),o=s.p+n;if(h(n,o))return t();f(e,o,null,t,r)}).then(function(){m[e]=0},function(t){throw delete m[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("7621"),s.e("7682"),s.e("8652"),s.e("5080"),s.e("6961"),s.e("8800")]).then(()=>()=>s(7251))},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={2190: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(/^(50(59|80)|(231|315|746)8|6544|6961|8652)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=o);var i=s.p+s.u(t),a=Error();s.l(i,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,o,[i,a,l]=r,u=0;if(i.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<i.length;u++)o=i[u],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},(r=globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_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,o=!1,s.x=function(){if(o||(o=!0,s(8143)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_openmrs_esm_patient_notes_app=s.x()})();
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"attachments":">=3.1.0","fhir2":">=1.2","webservices.rest":">=2.23.0"},"extensions":[{"name":"notes-overview-widget","component":"notesOverview","meta":{"fullWidth":false},"order":5},{"name":"sticky-notes-button","component":"stickyNotesButton","slot":"patient-info-slot","order":1}],"modals":[{"name":"delete-sticky-note-modal","component":"deleteStickyNoteModal"},{"name":"sticky-note-modal","component":"stickyNoteModal"}],"workspaces2":[{"name":"visit-notes-form-workspace","component":"visitNotesFormWorkspace","window":"visit-note"}],"workspaceWindows2":[{"name":"visit-note","icon":"visitNotesActionButton","group":"patient-chart","order":2}],"version":"13.0.2-pre.12774"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"attachments":">=3.1.0","fhir2":">=1.2","webservices.rest":">=2.23.0"},"extensions":[{"name":"notes-overview-widget","component":"notesOverview","meta":{"fullWidth":false},"order":5},{"name":"sticky-notes-button","component":"stickyNotesButton","slot":"patient-info-slot","order":1}],"modals":[{"name":"delete-sticky-note-modal","component":"deleteStickyNoteModal"},{"name":"sticky-note-modal","component":"stickyNoteModal"}],"workspaces2":[{"name":"visit-notes-form-workspace","component":"visitNotesFormWorkspace","window":"visit-note"}],"workspaceWindows2":[{"name":"visit-note","icon":"visitNotesActionButton","group":"patient-chart","order":2}],"version":"13.0.2-pre.12788"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-notes-app",
3
- "version": "13.0.2-pre.12774",
3
+ "version": "13.0.2-pre.12788",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient notes microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-notes-app.js",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@carbon/react": "^1.92.1",
58
- "@openmrs/esm-patient-common-lib": "13.0.2-pre.12774",
58
+ "@openmrs/esm-patient-common-lib": "13.0.2-pre.12788",
59
59
  "openmrs": "next",
60
60
  "vitest": "^4.1.2"
61
61
  },
@@ -8,6 +8,7 @@ export interface ExportedVisitNotesFormWorkspaceProps {
8
8
  patientUuid: string;
9
9
  patient: fhir.Patient;
10
10
  visitContext: Visit;
11
+ showPatientHeader?: boolean;
11
12
  }
12
13
 
13
14
  /**
@@ -16,7 +17,10 @@ export interface ExportedVisitNotesFormWorkspaceProps {
16
17
  */
17
18
  const ExportedVisitNotesFormWorkspace: React.FC<
18
19
  Workspace2DefinitionProps<ExportedVisitNotesFormWorkspaceProps, {}, {}>
19
- > = ({ closeWorkspace, workspaceProps: { encounter, formContext, patientUuid, patient, visitContext } }) => {
20
+ > = ({
21
+ closeWorkspace,
22
+ workspaceProps: { encounter, formContext, patientUuid, patient, visitContext, showPatientHeader = true },
23
+ }) => {
20
24
  return (
21
25
  <VisitNotesForm
22
26
  encounter={encounter}
@@ -25,6 +29,7 @@ const ExportedVisitNotesFormWorkspace: React.FC<
25
29
  patient={patient}
26
30
  visitContext={visitContext}
27
31
  closeWorkspace={closeWorkspace}
32
+ showPatientHeader={showPatientHeader}
28
33
  />
29
34
  );
30
35
  };
@@ -43,7 +43,12 @@ import {
43
43
  type Visit,
44
44
  type Workspace2DefinitionProps,
45
45
  } from '@openmrs/esm-framework';
46
- import { invalidateVisitAndEncounterData, useAllowedFileExtensions } from '@openmrs/esm-patient-common-lib';
46
+ import {
47
+ hasPatientBannerData,
48
+ invalidateVisitAndEncounterData,
49
+ useAllowedFileExtensions,
50
+ usePatientForBanner,
51
+ } from '@openmrs/esm-patient-common-lib';
47
52
  import type { ConfigObject } from '../config-schema';
48
53
  import type { Concept, DiagnosisCertainty, DiagnosisPayload, VisitNotePayload } from '../types';
49
54
  import {
@@ -140,6 +145,7 @@ export interface VisitNotesFormProps {
140
145
  patient: fhir.Patient;
141
146
  visitContext: Visit;
142
147
  closeWorkspace: Workspace2DefinitionProps['closeWorkspace'];
148
+ showPatientHeader?: boolean;
143
149
  }
144
150
 
145
151
  /**
@@ -149,16 +155,20 @@ export interface VisitNotesFormProps {
149
155
  const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
150
156
  encounter,
151
157
  formContext,
152
- patientUuid,
153
- patient,
158
+ patientUuid: propPatientUuid,
159
+ patient: patientProp,
154
160
  visitContext,
155
161
  closeWorkspace,
162
+ showPatientHeader = false,
156
163
  }) => {
157
164
  const isEditing: boolean = Boolean(formContext === 'editing' && encounter?.uuid);
158
165
  const { t } = useTranslation();
159
166
  const isTablet = useLayoutType() === 'tablet';
160
167
  const session = useSession();
161
168
  const { isPrimaryDiagnosisRequired, ...config } = useConfig<ConfigObject>();
169
+ const patientUuid = propPatientUuid ?? patientProp?.id;
170
+ const patient = usePatientForBanner(patientProp, patientUuid);
171
+ const showWorkspacePatientHeader = Boolean(showPatientHeader && hasPatientBannerData(patient) && patientUuid);
162
172
  const visitContextHeaderState = useMemo(() => ({ patientUuid }), [patientUuid]);
163
173
  const memoizedState = useMemo(() => ({ patientUuid, patient }), [patientUuid, patient]);
164
174
  const { clinicianEncounterRole, encounterNoteTextConceptUuid, encounterTypeUuid, formConceptUuid } =
@@ -628,12 +638,31 @@ const VisitNotesForm: React.FC<VisitNotesFormProps> = ({
628
638
  title={isEditing ? t('editVisitNote', 'Edit visit note') : t('addVisitNote', 'Add visit note')}
629
639
  hasUnsavedChanges={hasUserUnsavedChanges}
630
640
  >
641
+ {showWorkspacePatientHeader && patientUuid && patient && (
642
+ <ExtensionSlot
643
+ name="patient-header-slot"
644
+ state={{
645
+ patient,
646
+ patientUuid,
647
+ hideActionsOverflow: true,
648
+ }}
649
+ />
650
+ )}
631
651
  <Form className={styles.form} onSubmit={handleSubmit(onSubmit, onError)}>
632
652
  <ExtensionSlot name="visit-context-header-slot" state={visitContextHeaderState} />
633
653
 
634
654
  {isTablet && (
635
655
  <Row className={styles.headerGridRow}>
636
- <ExtensionSlot name="visit-form-header-slot" className={styles.dataGridRow} state={memoizedState} />
656
+ <ExtensionSlot
657
+ name="visit-form-header-slot"
658
+ className={styles.dataGridRow}
659
+ select={
660
+ showWorkspacePatientHeader
661
+ ? (extensions) => extensions.filter((extension) => extension.name !== 'patient-details-tile')
662
+ : undefined
663
+ }
664
+ state={memoizedState}
665
+ />
637
666
  </Row>
638
667
  )}
639
668
 
@@ -158,6 +158,12 @@
158
158
  padding: 0;
159
159
  }
160
160
 
161
+ .tablet,
162
+ .desktop {
163
+ position: sticky;
164
+ bottom: 0;
165
+ }
166
+
161
167
  .headerGridRow {
162
168
  border-bottom: 0.0625rem solid colors.$gray-20;
163
169
  margin: 0;
@@ -6,11 +6,12 @@
6
6
  * fails the cross-realm equality check used here.
7
7
  */
8
8
  import React from 'react';
9
- import { vi, expect, test, beforeEach, afterEach } from 'vitest';
9
+ import { vi, describe, it, expect, test, beforeEach, afterEach } from 'vitest';
10
10
  import userEvent from '@testing-library/user-event';
11
11
  import { screen, render, waitFor, within, act } from '@testing-library/react';
12
12
  import {
13
13
  type Encounter,
14
+ type AssignedExtension,
14
15
  type UploadedFile,
15
16
  createAttachment,
16
17
  ExtensionSlot,
@@ -18,6 +19,8 @@ import {
18
19
  getDefaultsFromConfigSchema,
19
20
  showSnackbar,
20
21
  useConfig,
22
+ useLayoutType,
23
+ usePatient,
21
24
  useSession,
22
25
  useFeatureFlag,
23
26
  Workspace2,
@@ -97,7 +100,7 @@ function renderExportedVisitNotesForm(workspaceProps: Partial<ExportedVisitNotes
97
100
  ...workspaceProps,
98
101
  },
99
102
  };
100
- render(<ExportedVisitNotesFormWorkspace {...props} />);
103
+ return render(<ExportedVisitNotesFormWorkspace {...props} />);
101
104
  }
102
105
 
103
106
  function actionsMenuFor(card: HTMLElement) {
@@ -159,6 +162,9 @@ const mockShowSnackbar = vi.mocked(showSnackbar);
159
162
  const mockUpdateVisitNote = vi.mocked(updateVisitNote);
160
163
  const mockUseDiagnosisConceptClasses = vi.mocked(useDiagnosisConceptClasses);
161
164
  const mockUseConfig = vi.mocked(useConfig<ConfigObject>);
165
+ const mockExtensionSlot = vi.mocked(ExtensionSlot);
166
+ const mockUseLayoutType = vi.mocked(useLayoutType);
167
+ const mockUsePatient = vi.mocked(usePatient);
162
168
 
163
169
  const { diagnosisConceptClass } = getDefaultsFromConfigSchema(configSchema) as ConfigObject;
164
170
  const symptomConceptClass = 'symptom-concept-class-uuid';
@@ -1863,3 +1869,77 @@ test('describes every Primary checkbox with the primary-required message while i
1863
1869
  await user.click(checkbox);
1864
1870
  expect(checkbox).not.toHaveAccessibleDescription();
1865
1871
  });
1872
+
1873
+ describe('Patient header banner', () => {
1874
+ beforeEach(() => {
1875
+ mockUseLayoutType.mockReturnValue('large-desktop');
1876
+ mockUsePatient.mockReturnValue({ patient: null, patientUuid: null, isLoading: false, error: null });
1877
+ });
1878
+
1879
+ it('shows the patient header by default in the exported visit notes form', () => {
1880
+ renderExportedVisitNotesForm();
1881
+
1882
+ expect(
1883
+ mockExtensionSlot.mock.calls.some(
1884
+ ([props]) => props.name === 'patient-header-slot' && props.state.patientUuid === mockPatient.id,
1885
+ ),
1886
+ ).toBe(true);
1887
+ });
1888
+
1889
+ it('does not show the patient header in the in-chart visit notes form', () => {
1890
+ renderVisitNotesForm();
1891
+
1892
+ expect(mockExtensionSlot.mock.calls.some(([props]) => props.name === 'patient-header-slot')).toBe(false);
1893
+ });
1894
+
1895
+ it('does not show the patient header until the full patient is available', () => {
1896
+ const partialPatient = { id: mockPatient.id, birthDate: mockPatient.birthDate } as fhir.Patient;
1897
+
1898
+ renderExportedVisitNotesForm({ patient: partialPatient });
1899
+
1900
+ expect(mockExtensionSlot.mock.calls.some(([props]) => props.name === 'patient-header-slot')).toBe(false);
1901
+ });
1902
+
1903
+ it('shows the patient header once the full patient is fetched for a partial patient', () => {
1904
+ const partialPatient = { id: mockPatient.id, birthDate: mockPatient.birthDate } as fhir.Patient;
1905
+ mockUsePatient.mockReturnValue({
1906
+ patient: mockPatient,
1907
+ patientUuid: mockPatient.id,
1908
+ isLoading: false,
1909
+ error: null,
1910
+ });
1911
+
1912
+ renderExportedVisitNotesForm({ patient: partialPatient });
1913
+
1914
+ expect(
1915
+ mockExtensionSlot.mock.calls.some(
1916
+ ([props]) =>
1917
+ props.name === 'patient-header-slot' &&
1918
+ props.state.patientUuid === mockPatient.id &&
1919
+ props.state.patient === mockPatient,
1920
+ ),
1921
+ ).toBe(true);
1922
+ });
1923
+
1924
+ it('keeps the weight tile while hiding the duplicate patient details on tablet', () => {
1925
+ mockUseLayoutType.mockReturnValue('tablet');
1926
+
1927
+ renderExportedVisitNotesForm();
1928
+
1929
+ const headerSlot = mockExtensionSlot.mock.calls.find(([props]) => props.name === 'visit-form-header-slot')?.[0];
1930
+ expect(headerSlot).toBeDefined();
1931
+
1932
+ const extensions = [{ name: 'patient-details-tile' }, { name: 'weight-tile' }] as Array<AssignedExtension>;
1933
+
1934
+ expect(headerSlot.select(extensions).map((extension) => extension.name)).toEqual(['weight-tile']);
1935
+ });
1936
+
1937
+ it('keeps the patient details tile on tablet when the patient header is not shown', () => {
1938
+ mockUseLayoutType.mockReturnValue('tablet');
1939
+
1940
+ renderVisitNotesForm();
1941
+
1942
+ const headerSlot = mockExtensionSlot.mock.calls.find(([props]) => props.name === 'visit-form-header-slot')?.[0];
1943
+ expect(headerSlot.select).toBeUndefined();
1944
+ });
1945
+ });