@act-registry/esm-act-app 1.0.1-pre.523 → 1.0.1-pre.527

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/9152.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_act_registry_esm_act_app=globalThis.webpackChunk_act_registry_esm_act_app||[]).push([["9152"],{2898(e,t,a){a.d(t,{A:()=>n});let n={card:"-esm-act__summary-card__card___ujj+A",actions:"-esm-act__summary-card__actions___MaUnR",needsPrescription:"-esm-act__summary-card__needsPrescription___PlPRF",headerLink:"-esm-act__summary-card__headerLink___kR1wf",fields:"-esm-act__summary-card__fields___dlmMZ",field:"-esm-act__summary-card__field___KnxlR",wideField:"-esm-act__summary-card__wideField___sokeG",label:"-esm-act__summary-card__label___phTxH",value:"-esm-act__summary-card__value___L+0Ki",fieldAction:"-esm-act__summary-card__fieldAction___J5KFU",detail:"-esm-act__summary-card__detail___3IUxn",headerActions:"-esm-act__summary-card__headerActions___HHbuC",chart:"-esm-act__summary-card__chart___yYXf6",dot:"-esm-act__summary-card__dot___A4V4p",seeAll:"-esm-act__summary-card__seeAll___36jz+",note:"-esm-act__summary-card__note___EG0Fc"}},1851(e,t,a){a.d(t,{W5:()=>i,aU:()=>o,l4:()=>d,pd:()=>s});var n=a(3483),r=a.n(n),l=a(2909);function s(e){return e?.find(e=>"bpg"===e.key&&e.onHold)??null}let i=e=>`${l.restBaseUrl}/encounter?patient=${e}&for=actcore-nextsteps`;function o(e){let{data:t,error:a,isLoading:n}=r()(e?i(e):null,()=>(0,l.openmrsFetch)(`${l.restBaseUrl}/actcore/nextsteps?patient=${e}`),{shouldRetryOnError:!1});return{steps:t?.data?.steps,error:a,isLoading:n}}function d(e,t){let a=`${l.restBaseUrl}/form?patient=${e}&v=custom:(uuid,published,retired,encounterType:(editPrivilege:(display)))`,{data:n}=r()(t?a:null,l.openmrsFetch,{shouldRetryOnError:!1});return(n?.data?.results??[]).filter(e=>e.published&&!e.retired)}},9342(e,t,a){a.d(t,{z:()=>n});let n=e=>`\${openmrsSpaBase}/patient/${e}/chart`},3923(e,t,a){a.d(t,{D:()=>c,Q:()=>p});var n=a(3483),r=a.n(n),l=a(8406),s=a.n(l),i=a(2909),o=a(7928),d=a(6542);let u="custom:(uuid,encounterDatetime,location:(display),obs:(concept:(uuid),value:(uuid,display)))";function c(e){let{prophylaxisPage:t}=(0,i.useConfig)(),{concepts:a}=t,n=(0,d.T)(e,t.bpgEncounterType,u),{data:l,error:c,isLoading:p}=r()(n,async()=>(await (0,o.m)(n)).filter(e=>(0,d.t)(e,a.injectionDate).length).map(e=>{let t,[n]=(0,d.t)(e,a.injectionDate),[r]=(0,d.t)(e,a.doseGiven),[l]=(0,d.t)(e,a.facility);return{uuid:e.uuid,day:s()(String(n.value)).format("YYYY-MM-DD"),dose:r?r.value.display:null,facility:l?"object"==typeof(t=l.value)&&null!==t?t.display:String(t):null,location:e.location?.display??null,lateReasons:(0,d.t)(e,a.lateReason).map(e=>e.value.display)}}).sort((e,t)=>t.day.localeCompare(e.day)));return{injections:l??[],error:c,isLoading:p}}function p(e){let{prophylaxisPage:t}=(0,i.useConfig)(),{concepts:a}=t,n=(0,d.T)(e,t.oralEncounterType,u),{data:l,error:s,isLoading:c}=r()(e?n:null,()=>(0,o.m)(n)),p=(e,t)=>{let[a]=(0,d.t)(e,t);return null==a?null:a.value.display};return{entries:(l??[]).map(e=>{let[t]=(0,d.t)(e,a.estimateDate);return{uuid:e.uuid,date:t?String(t.value):e.encounterDatetime,encounterDatetime:e.encounterDatetime,adherence:((e,t)=>{let[a]=(0,d.t)(e,t);return null==a?null:Number(a.value)})(e,a.adherence),basedOn:(0,d.t)(e,a.basedOn).map(e=>e.value.display),lowAdherenceReason:p(e,a.lowAdherenceReason),newPrescription:p(e,a.newPrescription)}}).sort((e,t)=>t.date.localeCompare(e.date)),error:s,isLoading:c}}},7420(e,t,a){a.d(t,{AX:()=>y,Id:()=>_});var n=a(4335),r=a(3483),l=a.n(r),s=a(2909),i=a(7928);let o=e=>String(e).slice(0,10),d=e=>{let t=e??{};return{uuid:t.uuid??"",label:t.display??""}},u=(e,t)=>(e.groupMembers??[]).find(e=>e.concept.uuid===t),c=(e,t)=>o(e.obs.find(e=>e.concept.uuid===t.consultationDate)?.value??e.encounterDatetime),p=(e,t)=>e.obs.filter(e=>e.concept.uuid===t.prescription&&u(e,t.prescription));function m(e,t){let a=new Map;for(let n of e.filter(e=>p(e,t).length)){let e=c(n,t),r=a.get(e);(!r||n.encounterDatetime<r.encounterDatetime)&&a.set(e,n)}let n=[...a.keys()].sort().pop();if(!n)return null;let r=a.get(n),l=p(r,t).flatMap(e=>{let a=d(u(e,t.prescription).value),n=u(e,t.dateStarted)?.value,r=u(e,t.dateStopped);return n&&!r&&a.uuid!==t.none?[{uuid:e.uuid,regimen:a,started:o(n)}]:[]}).sort((e,t)=>e.started.localeCompare(t.started)),s=r.obs.find(e=>e.concept.uuid===t.duration);return{encounter:r,day:n,groups:l,main:l[l.length-1]??null,duration:s?{...d(s.value),obsUuid:s.uuid}:null}}function _(e,t){let a=e?`${s.restBaseUrl}/encounter?patient=${e}&v=custom:(uuid,encounterDatetime,encounterType:(uuid),obs:(uuid,concept:(uuid),value,groupMembers:(uuid,concept:(uuid),value)))`:null,{data:r,error:_,isLoading:y}=l()(a,()=>(0,i.m)(a)),{prescription:f,history:h}=(0,n.useMemo)(()=>{let e=r?m(r,t):null;return{prescription:e,history:r?function(e,t,a=m(e,t)){let n=new Set(a?.groups.map(e=>`${e.regimen.uuid} ${e.started}`)),r=new Map,l=new Map,s=new Set;for(let{encounter:a,day:i}of e.map(e=>({encounter:e,day:c(e,t)})).sort((e,t)=>e.day.localeCompare(t.day)||e.encounter.encounterDatetime.localeCompare(t.encounter.encounterDatetime)))for(let e of p(a,t)){s.add(i);let a=d(u(e,t.prescription).value),c=u(e,t.dateStarted)?.value;if(!c||a.uuid===t.none)continue;let p=`${a.uuid} ${o(c)}`,m=r.get(p)??{regimen:a.label,started:o(c),stopped:null,reasonStopped:null,replaced:null,recorded:i,current:n.has(p)},_=u(e,t.dateStopped);if(_){let a=u(e,t.reasonStopped);m.stopped=o(_.value),m.reasonStopped=a?d(a.value).label:null}r.set(p,m),l.set(p,i)}for(let[e,t]of r)t.replaced=[...s].find(t=>t>l.get(e))??null;return[...r.values()].sort((e,t)=>t.started.localeCompare(e.started))}(r,t,e):null}},[r,t]);return{prescription:f,history:h,error:_,isLoading:y}}async function y({patient:e,location:t,encounterType:a,concepts:n,current:r,edit:l,main:i,today:o}){var d;let u,c,p,m,_,f,h=(d=r?.groups??[],u=(t,a)=>({concept:t,person:e,value:a}),c=(t,a,r)=>({concept:n.prescription,person:e,groupMembers:[u(n.prescription,t),u(n.dateStarted,a),...r?[u(n.dateStopped,r.stopped),u(n.reasonStopped,r.reason)]:[]]}),p=d.find(e=>e.uuid===i),m=d.filter(e=>e.uuid!==i),_=p?.started===l.started,f=l.stop?[]:_?m:p?[p,...m]:m,[c(l.regimen.uuid,l.started,l.stop),...l.stop?m.map(e=>c(e.regimen.uuid,e.started,l.stop)):[],...f.map(e=>c(e.regimen.uuid,e.started)),...l.duration?[u(n.duration,l.duration)]:[]]),v={"Content-Type":"application/json"};if(r&&r.day===o){let e=[...r.groups.map(e=>e.uuid),...r.duration?[r.duration.obsUuid]:[]];await (0,s.openmrsFetch)(`${s.restBaseUrl}/encounter/${r.encounter.uuid}`,{method:"POST",headers:v,body:{obs:[...e.map(e=>({uuid:e,voided:!0})),...h]}});return}await (0,s.openmrsFetch)(`${s.restBaseUrl}/encounter`,{method:"POST",headers:v,body:{patient:e,encounterType:a,location:t,obs:h}})}},611(e,t,a){a.r(t),a.d(t,{default:()=>$});var n=a(4335),r=a.n(n),l=a(1943),s=a(7917),i=a(2909),o=a(9342),d=a(3923),u=a(8126),c=a(1851),p=a(3986),m=a(4435),_=a(2898);function y({patientUuid:e}){let{t}=(0,l.useTranslation)(),{prophylaxisCard:a,nextSteps:n,clinicianPrivilege:o}=(0,i.useConfig)(),{user:d}=(0,i.useSession)(),f=!!d&&(0,i.userHasAccess)(o,d),{open:h,isOpening:v}=(0,p.ee)(e),{summary:g}=(0,m.b)(e),b=(0,c.pd)((0,c.aU)(n.enabled?e:null).steps),E=g?.type;if(g?.status==="none")return r().createElement("span",{className:_.A.needsPrescription,"data-testid":"needs-prescription"},t("needsPrescription","Needs prescription"));let $=[{type:"BPG",label:t("recordBpg","Record BPG"),form:a.bpgForm},{type:"Oral",label:t("recordOral","Record oral"),form:a.oralForm}].filter(e=>f||!E||e.type===E);return r().createElement("div",{className:_.A.actions},$.map(({type:e,label:a,form:n})=>"BPG"===e&&b?r().createElement("span",{key:n,title:b.reason,"data-testid":"bpg-on-hold"},r().createElement(s.vwO,{type:"red",size:"sm"},t("bpgOnHold","BPG on hold"))):r().createElement(u.yN,{key:n,formUuid:n},r().createElement(s.$nd,{kind:"ghost",size:"sm",renderIcon:e=>r().createElement(i.AddIcon,{size:16,...e}),disabled:v,onClick:()=>h(n)},a))))}var f=a(7420),h=a(676),v=a.n(h),g=a(7003);function b({patientUuid:e}){let{t}=(0,l.useTranslation)(),{prophylaxisUpdate:a}=(0,i.useConfig)(),n=function(){let{user:e}=(0,i.useSession)(),{prophylaxisUpdate:t}=(0,i.useConfig)(),{data:a}=v()(["act-encounter-type",t.encounterType],()=>(0,i.openmrsFetch)(`${i.restBaseUrl}/encountertype/${t.encounterType}?v=custom:(uuid,editPrivilege:(display))`).then(e=>e.data));return!!(e&&a)&&(0,i.userHasAccess)([g.jy,a?.editPrivilege?.display].filter(Boolean),e)}(),{isLoading:o}=(0,f.Id)(e,a.concepts);return n?r().createElement(s.$nd,{kind:"ghost",size:"sm",renderIcon:e=>r().createElement(i.EditIcon,{size:16,...e}),disabled:o,onClick:()=>(0,i.launchWorkspace2)("act-update-prophylaxis-workspace")},t("updateProphylaxis","Update prophylaxis")):null}let E=e=>e?(0,i.formatDate)((0,i.parseDate)(e),{time:!1}):"--";function $({patientUuid:e,title:t,historyLink:a=!0}){let n,u,{t:c}=(0,l.useTranslation)(),{summary:p,error:h}=(0,m.b)(e),{prophylaxisUpdate:v}=(0,i.useConfig)(),{prescription:g}=(0,f.Id)(e,v.concepts),D=g?.main,T=function(){let{t:e}=(0,l.useTranslation)();return t=>"Oral"===t.type?t.regimen??e("oral","Oral"):"BPG"===t.type&&t.intervalDays?t.intervalDays%7==0?e("bpgEveryWeeks","BPG \xb7 every {{weeks}} weeks",{weeks:t.intervalDays/7}):e("bpgEveryDays","BPG \xb7 every {{days}} days",{days:t.intervalDays}):e("noPrescription","No prescription")}(),A=((0,i.useExtensionStore)(),(n=(0,i.useAssignedExtensions)("patient-chart-dashboard-slot").flatMap(e=>e.config?.slotName?(0,i.getAssignedExtensions)(e.config.slotName):[e]).find(e=>"act-prophylaxis-dashboard-link"===e.name))?({...n.meta,...n.config}).path:null),k=p?.type==="Oral",{entries:x}=(0,d.Q)(k?e:null),S=x.filter(e=>null!=e.adherence).sort((e,t)=>t.encounterDatetime.localeCompare(e.encounterDatetime))[0]?.adherence;if(h)return null;let C=p&&[{id:"type",label:c("type","Type"),value:T(p)},{id:"started",label:c("started","Started"),value:E(D?.started??null)},{id:"duration",label:c("duration","Duration"),value:g?.duration?.label||"--"},{id:"last-dose",label:k?c("lastReport","Last report"):c("lastDose","Last dose"),value:E(p.lastGiven)},{id:"next-due",label:k?c("nextRefill","Next refill"):c("nextDue","Next due"),value:E(p.nextDue),overdue:"overdue"===p.status},k?{id:"on-time",label:c("adherenceLastReport","Adherence (last report)"),value:null==S?"--":`${S}%`}:null!=p.adherence?{id:"on-time",label:c("adherenceTwelveMonths","Adherence (12 months)"),value:(u=p.adherence,`${Math.round(100*u)}%`),detail:p.onTime?c("onTimeCountMonths","{{given}} of {{total}} on time, {{months}} months",{given:p.onTime.given,total:p.onTime.total,months:p.onTime.months}):null}:{id:"on-time",label:c("onTimeSixMonths","On-time (6 months)"),value:p.onTime?c("onTimeCount","{{given}} of {{total}}",{given:p.onTime.given,total:p.onTime.total}):"--"}];return r().createElement("div",{className:_.A.card},r().createElement(i.CardHeader,{title:t??c("prophylaxis","Prophylaxis")},r().createElement("div",{className:_.A.actions},a&&A&&r().createElement(i.ConfigurableLink,{to:`${(0,o.z)(e)}/${A}`,className:_.A.headerLink},c("history","History")),r().createElement(b,{patientUuid:e}),r().createElement(y,{patientUuid:e}))),C?r().createElement("dl",{className:_.A.fields},C.map(e=>r().createElement("div",{key:e.id,className:_.A.field},r().createElement("dt",{className:_.A.label},e.label),r().createElement("dd",{className:_.A.value,"data-testid":`prophylaxis-${e.id}`,"data-overdue":String(!!e.overdue)},e.value,"detail"in e&&e.detail&&r().createElement("span",{className:_.A.detail,"data-testid":`prophylaxis-${e.id}-detail`},e.detail))))):r().createElement("div",{"data-testid":"prophylaxis-loading"},r().createElement(s.rrI,{paragraph:!0,lineCount:2})))}},4435(e,t,a){a.d(t,{b:()=>s});var n=a(3483),r=a.n(n),l=a(2909);function s(e){let{data:t,error:a}=r()(e?`${l.restBaseUrl}/encounter?patient=${e}&for=actcore-prophylaxis`:null,()=>(0,l.openmrsFetch)(`${l.restBaseUrl}/actcore/prophylaxis?patient=${e}`),{shouldRetryOnError:!1});return{summary:t?.data,error:a}}}}]);
1
+ "use strict";(globalThis.webpackChunk_act_registry_esm_act_app=globalThis.webpackChunk_act_registry_esm_act_app||[]).push([["9152"],{2898(e,t,a){a.d(t,{A:()=>n});let n={card:"-esm-act__summary-card__card___ujj+A",actions:"-esm-act__summary-card__actions___MaUnR",needsPrescription:"-esm-act__summary-card__needsPrescription___PlPRF",headerLink:"-esm-act__summary-card__headerLink___kR1wf",fields:"-esm-act__summary-card__fields___dlmMZ",field:"-esm-act__summary-card__field___KnxlR",wideField:"-esm-act__summary-card__wideField___sokeG",label:"-esm-act__summary-card__label___phTxH",value:"-esm-act__summary-card__value___L+0Ki",fieldAction:"-esm-act__summary-card__fieldAction___J5KFU",detail:"-esm-act__summary-card__detail___3IUxn",headerActions:"-esm-act__summary-card__headerActions___HHbuC",chart:"-esm-act__summary-card__chart___yYXf6",dot:"-esm-act__summary-card__dot___A4V4p",seeAll:"-esm-act__summary-card__seeAll___36jz+",note:"-esm-act__summary-card__note___EG0Fc"}},1851(e,t,a){a.d(t,{W5:()=>i,aU:()=>o,l4:()=>d,pd:()=>s});var n=a(3483),r=a.n(n),l=a(2909);function s(e){return e?.find(e=>"bpg"===e.key&&e.onHold)??null}let i=e=>`${l.restBaseUrl}/encounter?patient=${e}&for=actcore-nextsteps`;function o(e){let{data:t,error:a,isLoading:n}=r()(e?i(e):null,()=>(0,l.openmrsFetch)(`${l.restBaseUrl}/actcore/nextsteps?patient=${e}`),{shouldRetryOnError:!1});return{steps:t?.data?.steps,error:a,isLoading:n}}function d(e,t){let a=`${l.restBaseUrl}/form?patient=${e}&v=custom:(uuid,published,retired,encounterType:(editPrivilege:(display)))`,{data:n}=r()(t?a:null,l.openmrsFetch,{shouldRetryOnError:!1});return(n?.data?.results??[]).filter(e=>e.published&&!e.retired)}},9342(e,t,a){a.d(t,{z:()=>n});let n=e=>`\${openmrsSpaBase}/patient/${e}/chart`},3923(e,t,a){a.d(t,{D:()=>c,Q:()=>p});var n=a(3483),r=a.n(n),l=a(8406),s=a.n(l),i=a(2909),o=a(7928),d=a(6542);let u="custom:(uuid,encounterDatetime,location:(display),obs:(concept:(uuid),value:(uuid,display)))";function c(e){let{prophylaxisPage:t}=(0,i.useConfig)(),{concepts:a}=t,n=(0,d.T)(e,t.bpgEncounterType,u),{data:l,error:c,isLoading:p}=r()(n,async()=>(await (0,o.m)(n)).filter(e=>(0,d.t)(e,a.injectionDate).length).map(e=>{let t,[n]=(0,d.t)(e,a.injectionDate),[r]=(0,d.t)(e,a.doseGiven),[l]=(0,d.t)(e,a.facility);return{uuid:e.uuid,day:s()(String(n.value)).format("YYYY-MM-DD"),dose:r?r.value.display:null,facility:l?"object"==typeof(t=l.value)&&null!==t?t.display:String(t):null,location:e.location?.display??null,lateReasons:(0,d.t)(e,a.lateReason).map(e=>e.value.display)}}).sort((e,t)=>t.day.localeCompare(e.day)));return{injections:l??[],error:c,isLoading:p}}function p(e){let{prophylaxisPage:t}=(0,i.useConfig)(),{concepts:a}=t,n=(0,d.T)(e,t.oralEncounterType,u),{data:l,error:s,isLoading:c}=r()(e?n:null,()=>(0,o.m)(n)),p=(e,t)=>{let[a]=(0,d.t)(e,t);return null==a?null:a.value.display};return{entries:(l??[]).map(e=>{let[t]=(0,d.t)(e,a.estimateDate);return{uuid:e.uuid,date:t?String(t.value):e.encounterDatetime,encounterDatetime:e.encounterDatetime,adherence:((e,t)=>{let[a]=(0,d.t)(e,t);return null==a?null:Number(a.value)})(e,a.adherence),basedOn:(0,d.t)(e,a.basedOn).map(e=>e.value.display),lowAdherenceReason:p(e,a.lowAdherenceReason),newPrescription:p(e,a.newPrescription)}}).sort((e,t)=>t.date.localeCompare(e.date)),error:s,isLoading:c}}},7420(e,t,a){a.d(t,{AX:()=>y,Id:()=>_});var n=a(4335),r=a(3483),l=a.n(r),s=a(2909),i=a(7928);let o=e=>String(e).slice(0,10),d=e=>{let t=e??{};return{uuid:t.uuid??"",label:t.display??""}},u=(e,t)=>(e.groupMembers??[]).find(e=>e.concept.uuid===t),c=(e,t)=>o(e.obs.find(e=>e.concept.uuid===t.consultationDate)?.value??e.encounterDatetime),p=(e,t)=>e.obs.filter(e=>e.concept.uuid===t.prescription&&u(e,t.prescription));function m(e,t){let a=new Map;for(let n of e.filter(e=>p(e,t).length)){let e=c(n,t),r=a.get(e);(!r||n.encounterDatetime<r.encounterDatetime)&&a.set(e,n)}let n=[...a.keys()].sort().pop();if(!n)return null;let r=a.get(n),l=p(r,t).flatMap(e=>{let a=d(u(e,t.prescription).value),n=u(e,t.dateStarted)?.value,r=u(e,t.dateStopped);return n&&!r&&a.uuid!==t.none?[{uuid:e.uuid,regimen:a,started:o(n),memberUuids:(e.groupMembers??[]).map(e=>e.uuid)}]:[]}).sort((e,t)=>e.started.localeCompare(t.started)),s=r.obs.find(e=>e.concept.uuid===t.duration);return{encounter:r,day:n,groups:l,main:l[l.length-1]??null,duration:s?{...d(s.value),obsUuid:s.uuid}:null}}function _(e,t){let a=e?`${s.restBaseUrl}/encounter?patient=${e}&v=custom:(uuid,encounterDatetime,encounterType:(uuid),obs:(uuid,concept:(uuid),value,groupMembers:(uuid,concept:(uuid),value)))`:null,{data:r,error:_,isLoading:y}=l()(a,()=>(0,i.m)(a)),{prescription:f,history:h}=(0,n.useMemo)(()=>{let e=r?m(r,t):null;return{prescription:e,history:r?function(e,t,a=m(e,t)){let n=new Set(a?.groups.map(e=>`${e.regimen.uuid} ${e.started}`)),r=new Map,l=new Map,s=new Set;for(let{encounter:a,day:i}of e.map(e=>({encounter:e,day:c(e,t)})).sort((e,t)=>e.day.localeCompare(t.day)||e.encounter.encounterDatetime.localeCompare(t.encounter.encounterDatetime)))for(let e of p(a,t)){s.add(i);let a=d(u(e,t.prescription).value),c=u(e,t.dateStarted)?.value;if(!c||a.uuid===t.none)continue;let p=`${a.uuid} ${o(c)}`,m=r.get(p)??{regimen:a.label,started:o(c),stopped:null,reasonStopped:null,replaced:null,recorded:i,current:n.has(p)},_=u(e,t.dateStopped);if(_){let a=u(e,t.reasonStopped);m.stopped=o(_.value),m.reasonStopped=a?d(a.value).label:null}r.set(p,m),l.set(p,i)}for(let[e,t]of r)t.replaced=[...s].find(t=>t>l.get(e))??null;return[...r.values()].sort((e,t)=>t.started.localeCompare(e.started))}(r,t,e):null}},[r,t]);return{prescription:f,history:h,error:_,isLoading:y}}async function y({patient:e,location:t,encounterType:a,concepts:n,current:r,edit:l,main:i,today:o}){var d;let u,c,p,m,_,f,h=(d=r?.groups??[],u=(t,a)=>({concept:t,person:e,value:a}),c=(t,a,r)=>({concept:n.prescription,person:e,groupMembers:[u(n.prescription,t),u(n.dateStarted,a),...r?[u(n.dateStopped,r.stopped),u(n.reasonStopped,r.reason)]:[]]}),p=d.find(e=>e.uuid===i),m=d.filter(e=>e.uuid!==i),_=p?.started===l.started,f=l.stop?[]:_?m:p?[p,...m]:m,[c(l.regimen.uuid,l.started,l.stop),...l.stop?m.map(e=>c(e.regimen.uuid,e.started,l.stop)):[],...f.map(e=>c(e.regimen.uuid,e.started)),...l.duration?[u(n.duration,l.duration)]:[]]),v={"Content-Type":"application/json"};if(r&&r.day===o){let e=[...r.groups.flatMap(e=>[e.uuid,...e.memberUuids]),...r.duration?[r.duration.obsUuid]:[]];await (0,s.openmrsFetch)(`${s.restBaseUrl}/encounter/${r.encounter.uuid}`,{method:"POST",headers:v,body:{obs:[...e.map(e=>({uuid:e,voided:!0})),...h]}});return}await (0,s.openmrsFetch)(`${s.restBaseUrl}/encounter`,{method:"POST",headers:v,body:{patient:e,encounterType:a,location:t,obs:h}})}},611(e,t,a){a.r(t),a.d(t,{default:()=>$});var n=a(4335),r=a.n(n),l=a(1943),s=a(7917),i=a(2909),o=a(9342),d=a(3923),u=a(8126),c=a(1851),p=a(3986),m=a(4435),_=a(2898);function y({patientUuid:e}){let{t}=(0,l.useTranslation)(),{prophylaxisCard:a,nextSteps:n,clinicianPrivilege:o}=(0,i.useConfig)(),{user:d}=(0,i.useSession)(),f=!!d&&(0,i.userHasAccess)(o,d),{open:h,isOpening:v}=(0,p.ee)(e),{summary:g}=(0,m.b)(e),b=(0,c.pd)((0,c.aU)(n.enabled?e:null).steps),E=g?.type;if(g?.status==="none")return r().createElement("span",{className:_.A.needsPrescription,"data-testid":"needs-prescription"},t("needsPrescription","Needs prescription"));let $=[{type:"BPG",label:t("recordBpg","Record BPG"),form:a.bpgForm},{type:"Oral",label:t("recordOral","Record oral"),form:a.oralForm}].filter(e=>f||!E||e.type===E);return r().createElement("div",{className:_.A.actions},$.map(({type:e,label:a,form:n})=>"BPG"===e&&b?r().createElement("span",{key:n,title:b.reason,"data-testid":"bpg-on-hold"},r().createElement(s.vwO,{type:"red",size:"sm"},t("bpgOnHold","BPG on hold"))):r().createElement(u.yN,{key:n,formUuid:n},r().createElement(s.$nd,{kind:"ghost",size:"sm",renderIcon:e=>r().createElement(i.AddIcon,{size:16,...e}),disabled:v,onClick:()=>h(n)},a))))}var f=a(7420),h=a(676),v=a.n(h),g=a(7003);function b({patientUuid:e}){let{t}=(0,l.useTranslation)(),{prophylaxisUpdate:a}=(0,i.useConfig)(),n=function(){let{user:e}=(0,i.useSession)(),{prophylaxisUpdate:t}=(0,i.useConfig)(),{data:a}=v()(["act-encounter-type",t.encounterType],()=>(0,i.openmrsFetch)(`${i.restBaseUrl}/encountertype/${t.encounterType}?v=custom:(uuid,editPrivilege:(display))`).then(e=>e.data));return!!(e&&a)&&(0,i.userHasAccess)([g.jy,a?.editPrivilege?.display].filter(Boolean),e)}(),{isLoading:o}=(0,f.Id)(e,a.concepts);return n?r().createElement(s.$nd,{kind:"ghost",size:"sm",renderIcon:e=>r().createElement(i.EditIcon,{size:16,...e}),disabled:o,onClick:()=>(0,i.launchWorkspace2)("act-update-prophylaxis-workspace")},t("updateProphylaxis","Update prophylaxis")):null}let E=e=>e?(0,i.formatDate)((0,i.parseDate)(e),{time:!1}):"--";function $({patientUuid:e,title:t,historyLink:a=!0}){let n,u,{t:c}=(0,l.useTranslation)(),{summary:p,error:h}=(0,m.b)(e),{prophylaxisUpdate:v}=(0,i.useConfig)(),{prescription:g}=(0,f.Id)(e,v.concepts),D=g?.main,T=function(){let{t:e}=(0,l.useTranslation)();return t=>"Oral"===t.type?t.regimen??e("oral","Oral"):"BPG"===t.type&&t.intervalDays?t.intervalDays%7==0?e("bpgEveryWeeks","BPG \xb7 every {{weeks}} weeks",{weeks:t.intervalDays/7}):e("bpgEveryDays","BPG \xb7 every {{days}} days",{days:t.intervalDays}):e("noPrescription","No prescription")}(),A=((0,i.useExtensionStore)(),(n=(0,i.useAssignedExtensions)("patient-chart-dashboard-slot").flatMap(e=>e.config?.slotName?(0,i.getAssignedExtensions)(e.config.slotName):[e]).find(e=>"act-prophylaxis-dashboard-link"===e.name))?({...n.meta,...n.config}).path:null),k=p?.type==="Oral",{entries:x}=(0,d.Q)(k?e:null),S=x.filter(e=>null!=e.adherence).sort((e,t)=>t.encounterDatetime.localeCompare(e.encounterDatetime))[0]?.adherence;if(h)return null;let C=p&&[{id:"type",label:c("type","Type"),value:T(p)},{id:"started",label:c("started","Started"),value:E(D?.started??null)},{id:"duration",label:c("duration","Duration"),value:g?.duration?.label||"--"},{id:"last-dose",label:k?c("lastReport","Last report"):c("lastDose","Last dose"),value:E(p.lastGiven)},{id:"next-due",label:k?c("nextRefill","Next refill"):c("nextDue","Next due"),value:E(p.nextDue),overdue:"overdue"===p.status},k?{id:"on-time",label:c("adherenceLastReport","Adherence (last report)"),value:null==S?"--":`${S}%`}:null!=p.adherence?{id:"on-time",label:c("adherenceTwelveMonths","Adherence (12 months)"),value:(u=p.adherence,`${Math.round(100*u)}%`),detail:p.onTime?c("onTimeCountMonths","{{given}} of {{total}} on time, {{months}} months",{given:p.onTime.given,total:p.onTime.total,months:p.onTime.months}):null}:{id:"on-time",label:c("onTimeSixMonths","On-time (6 months)"),value:p.onTime?c("onTimeCount","{{given}} of {{total}}",{given:p.onTime.given,total:p.onTime.total}):"--"}];return r().createElement("div",{className:_.A.card},r().createElement(i.CardHeader,{title:t??c("prophylaxis","Prophylaxis")},r().createElement("div",{className:_.A.actions},a&&A&&r().createElement(i.ConfigurableLink,{to:`${(0,o.z)(e)}/${A}`,className:_.A.headerLink},c("history","History")),r().createElement(b,{patientUuid:e}),r().createElement(y,{patientUuid:e}))),C?r().createElement("dl",{className:_.A.fields},C.map(e=>r().createElement("div",{key:e.id,className:_.A.field},r().createElement("dt",{className:_.A.label},e.label),r().createElement("dd",{className:_.A.value,"data-testid":`prophylaxis-${e.id}`,"data-overdue":String(!!e.overdue)},e.value,"detail"in e&&e.detail&&r().createElement("span",{className:_.A.detail,"data-testid":`prophylaxis-${e.id}-detail`},e.detail))))):r().createElement("div",{"data-testid":"prophylaxis-loading"},r().createElement(s.rrI,{paragraph:!0,lineCount:2})))}},4435(e,t,a){a.d(t,{b:()=>s});var n=a(3483),r=a.n(n),l=a(2909);function s(e){let{data:t,error:a}=r()(e?`${l.restBaseUrl}/encounter?patient=${e}&for=actcore-prophylaxis`:null,()=>(0,l.openmrsFetch)(`${l.restBaseUrl}/actcore/prophylaxis?patient=${e}`),{shouldRetryOnError:!1});return{summary:t?.data,error:a}}}}]);
package/dist/9152.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"9152.js","sources":["webpack://@act-registry/esm-act-app/./src/styles/summary-card.scss?c2a0","webpack://@act-registry/esm-act-app/./src/next-steps/next-steps.resource.ts","webpack://@act-registry/esm-act-app/./src/patient-chart-url.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis-page/prophylaxis-page.resource.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis/prescription.resource.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis/record-prophylaxis-buttons.component.tsx","webpack://@act-registry/esm-act-app/./src/prophylaxis/update-prophylaxis.component.tsx","webpack://@act-registry/esm-act-app/./src/prophylaxis/prophylaxis-card.component.tsx","webpack://@act-registry/esm-act-app/./src/prophylaxis/prophylaxis.resource.ts"],"names":["heldBpgStep","steps","step","nextStepsKey","patientUuid","restBaseUrl","useNextSteps","data","error","isLoading","useSWR","openmrsFetch","usePublishedForms","enabled","url","form","patientChartUrl","representation","useBpgInjections","prophylaxisPage","useConfig","concepts","patientEncountersUrl","injections","encounters","fetchAll","encounter","answersTo","value","date","dose","facility","dayjs","String","o","a","b","useOralEntries","answer","concept","obs","entries","estimateDate","number","Number","dayOf","answerOf","memberOf","group","member","dayOfEncounter","one","groupsOf","currentPrescriptionOf","firstOfDay","Map","day","first","groups","regimen","started","stopped","duration","usePrescription","prescription","history","useMemo","current","prescriptionHistoryOf","inForce","Set","courses","lastCarried","prescribedDays","key","course","reason","savePrescription","patient","location","encounterType","edit","main","today","edited","others","replaced","carried","stop","headers","voided","uuid","RecordProphylaxisButtons","t","useTranslation","prophylaxisCard","nextSteps","clinicianPrivilege","user","useSession","clinician","Boolean","userHasAccess","openForm","isOpening","useOpenFormInVisit","summary","useProphylaxisSummary","held","prescribed","styles","buttons","button","type","label","Tag","MayEnterForm","Button","props","AddIcon","UpdateProphylaxis","prophylaxisUpdate","may","useMayUpdateProphylaxis","useSWRImmutable","response","PRIVILEGE_ADD_ENCOUNTERS","EditIcon","launchWorkspace2","formatDate","parseDate","ProphylaxisCard","title","historyLink","page","fraction","regimenLabel","useRegimenLabel","pagePath","useExtensionStore","useAssignedExtensions","link","getAssignedExtensions","oral","latestAdherence","entry","fields","Math","CardHeader","ConfigurableLink","field","SkeletonText"],"mappings":"kKACA,MAAe,CAAC,KAAO,uCAAuC,QAAU,0CAA0C,kBAAoB,oDAAoD,WAAa,6CAA6C,OAAS,yCAAyC,MAAQ,wCAAwC,UAAY,4CAA4C,MAAQ,wCAAwC,MAAQ,wCAAwC,YAAc,8CAA8C,OAAS,yCAAyC,cAAgB,gDAAgD,MAAQ,wCAAwC,IAAM,sCAAsC,OAAS,yCAAyC,KAAO,sCAAsC,C,4FCsBh1B,SAASA,EAAYC,CAAkC,EAC5D,OAAOA,GAAO,KAAK,AAACC,GAASA,AAAa,QAAbA,EAAK,GAAG,EAAcA,EAAK,MAAM,GAAK,IACrE,CAGO,IAAMC,EAAe,AAACC,GAC3B,CAAC,EAAEC,EAAAA,WAAWA,CAAC,mBAAmB,EAAED,EAAY,sBAAsB,CAAC,CAElE,SAASE,EAAaF,CAAmB,EAC9C,GAAM,CAAEG,KAAAA,CAAI,CAAEC,MAAAA,CAAK,CAAEC,UAAAA,CAAS,CAAE,CAAGC,IACjCN,EAAcD,EAAaC,GAAe,KAC1C,IAAMO,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAyC,CAAC,EAAEN,EAAAA,WAAWA,CAAC,2BAA2B,EAAED,EAAY,CAAC,EACxG,CAAE,mBAAoB,EAAM,GAE9B,MAAO,CAAE,MAAOG,GAAM,MAAM,MAAOC,MAAAA,EAAOC,UAAAA,CAAU,C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,OAAO,CAAC,A,EAC1EA,EAAM,MAAM,MAhBzB,kBAAC,OAAI,cAAY,qB,EACf,kBAACC,EAAAA,GAAYA,CAAAA,CAAC,aAAU,UAAW,C,IAyB7C,C,gEC3IO,SAAS5C,EAAsBvG,CAA0B,EAC9D,GAAM,CAAEG,KAAAA,CAAI,CAAEC,MAAAA,CAAK,CAAE,CAAGE,IAEtBN,EAAc,CAAC,EAAEC,EAAAA,WAAWA,CAAC,mBAAmB,EAAED,EAAY,wBAAwB,CAAC,CAAG,KAC1F,IAAMO,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAiC,CAAC,EAAEN,EAAAA,WAAWA,CAAC,6BAA6B,EAAED,EAAY,CAAC,EAElG,CAAE,mBAAoB,EAAM,GAG9B,MAAO,CAAE,QAASG,GAAM,KAAMC,MAAAA,CAAM,CACtC,C"}
1
+ {"version":3,"file":"9152.js","sources":["webpack://@act-registry/esm-act-app/./src/styles/summary-card.scss?c2a0","webpack://@act-registry/esm-act-app/./src/next-steps/next-steps.resource.ts","webpack://@act-registry/esm-act-app/./src/patient-chart-url.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis-page/prophylaxis-page.resource.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis/prescription.resource.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis/record-prophylaxis-buttons.component.tsx","webpack://@act-registry/esm-act-app/./src/prophylaxis/update-prophylaxis.component.tsx","webpack://@act-registry/esm-act-app/./src/prophylaxis/prophylaxis-card.component.tsx","webpack://@act-registry/esm-act-app/./src/prophylaxis/prophylaxis.resource.ts"],"names":["heldBpgStep","steps","step","nextStepsKey","patientUuid","restBaseUrl","useNextSteps","data","error","isLoading","useSWR","openmrsFetch","usePublishedForms","enabled","url","form","patientChartUrl","representation","useBpgInjections","prophylaxisPage","useConfig","concepts","patientEncountersUrl","injections","encounters","fetchAll","encounter","answersTo","value","date","dose","facility","dayjs","String","o","a","b","useOralEntries","answer","concept","obs","entries","estimateDate","number","Number","dayOf","answerOf","memberOf","group","member","dayOfEncounter","one","groupsOf","currentPrescriptionOf","firstOfDay","Map","day","first","groups","regimen","started","stopped","duration","usePrescription","prescription","history","useMemo","current","prescriptionHistoryOf","inForce","Set","courses","lastCarried","prescribedDays","key","course","reason","savePrescription","patient","location","encounterType","edit","main","today","edited","others","replaced","carried","stop","headers","voided","uuid","RecordProphylaxisButtons","t","useTranslation","prophylaxisCard","nextSteps","clinicianPrivilege","user","useSession","clinician","Boolean","userHasAccess","openForm","isOpening","useOpenFormInVisit","summary","useProphylaxisSummary","held","prescribed","styles","buttons","button","type","label","Tag","MayEnterForm","Button","props","AddIcon","UpdateProphylaxis","prophylaxisUpdate","may","useMayUpdateProphylaxis","useSWRImmutable","response","PRIVILEGE_ADD_ENCOUNTERS","EditIcon","launchWorkspace2","formatDate","parseDate","ProphylaxisCard","title","historyLink","page","fraction","regimenLabel","useRegimenLabel","pagePath","useExtensionStore","useAssignedExtensions","link","getAssignedExtensions","oral","latestAdherence","entry","fields","Math","CardHeader","ConfigurableLink","field","SkeletonText"],"mappings":"kKACA,MAAe,CAAC,KAAO,uCAAuC,QAAU,0CAA0C,kBAAoB,oDAAoD,WAAa,6CAA6C,OAAS,yCAAyC,MAAQ,wCAAwC,UAAY,4CAA4C,MAAQ,wCAAwC,MAAQ,wCAAwC,YAAc,8CAA8C,OAAS,yCAAyC,cAAgB,gDAAgD,MAAQ,wCAAwC,IAAM,sCAAsC,OAAS,yCAAyC,KAAO,sCAAsC,C,4FCsBh1B,SAASA,EAAYC,CAAkC,EAC5D,OAAOA,GAAO,KAAK,AAACC,GAASA,AAAa,QAAbA,EAAK,GAAG,EAAcA,EAAK,MAAM,GAAK,IACrE,CAGO,IAAMC,EAAe,AAACC,GAC3B,CAAC,EAAEC,EAAAA,WAAWA,CAAC,mBAAmB,EAAED,EAAY,sBAAsB,CAAC,CAElE,SAASE,EAAaF,CAAmB,EAC9C,GAAM,CAAEG,KAAAA,CAAI,CAAEC,MAAAA,CAAK,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AA,KAAY,A,EACzC,kBAAC,MAAG,UAAWA,EAAAA,CAAAA,CAAAA,KAAY,A,EAAGwC,EAAM,KAAK,EACzC,kBAAC,MACC,UAAWxC,EAAAA,CAAAA,CAAAA,KAAY,CACvB,cAAa,CAAC,YAAY,EAAEwC,EAAM,EAAE,CAAC,CAAC,CACtC,eAAcrH,OAAOoE,EAAQiD,EAAM,OAAO,C,EAEzCA,EAAM,KAAK,CACX,WAAYA,GAASA,EAAM,MAAM,EAChC,kBAAC,QAAK,UAAWxC,EAAAA,CAAAA,CAAAA,MAAa,CAAE,cAAa,CAAC,YAAY,EAAEwC,EAAM,EAAE,CAAC,OAAO,CAAC,A,EAC1EA,EAAM,MAAM,MAhBzB,kBAAC,OAAI,cAAY,qB,EACf,kBAACC,EAAAA,GAAYA,CAAAA,CAAC,aAAU,UAAW,C,IAyB7C,C,gEC3IO,SAAS5C,EAAsBvG,CAA0B,EAC9D,GAAM,CAAEG,KAAAA,CAAI,CAAEC,MAAAA,CAAK,CAAE,CAAGE,IAEtBN,EAAc,CAAC,EAAEC,EAAAA,WAAWA,CAAC,mBAAmB,EAAED,EAAY,wBAAwB,CAAC,CAAG,KAC1F,IAAMO,AAAAA,GAAAA,EAAAA,YAAAA,AAAAA,EAAiC,CAAC,EAAEN,EAAAA,WAAWA,CAAC,6BAA6B,EAAED,EAAY,CAAC,EAElG,CAAE,mBAAoB,EAAM,GAG9B,MAAO,CAAE,QAASG,GAAM,KAAMC,MAAAA,CAAM,CACtC,C"}
package/dist/9498.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_act_registry_esm_act_app=globalThis.webpackChunk_act_registry_esm_act_app||[]).push([["9498"],{7420(e,t,a){a.d(t,{AX:()=>h,Id:()=>g});var r=a(4335),n=a(3483),o=a.n(n),l=a(2909),u=a(7928);let i=e=>String(e).slice(0,10),d=e=>{let t=e??{};return{uuid:t.uuid??"",label:t.display??""}},s=(e,t)=>(e.groupMembers??[]).find(e=>e.concept.uuid===t),p=(e,t)=>i(e.obs.find(e=>e.concept.uuid===t.consultationDate)?.value??e.encounterDatetime),c=(e,t)=>e.obs.filter(e=>e.concept.uuid===t.prescription&&s(e,t.prescription));function m(e,t){let a=new Map;for(let r of e.filter(e=>c(e,t).length)){let e=p(r,t),n=a.get(e);(!n||r.encounterDatetime<n.encounterDatetime)&&a.set(e,r)}let r=[...a.keys()].sort().pop();if(!r)return null;let n=a.get(r),o=c(n,t).flatMap(e=>{let a=d(s(e,t.prescription).value),r=s(e,t.dateStarted)?.value,n=s(e,t.dateStopped);return r&&!n&&a.uuid!==t.none?[{uuid:e.uuid,regimen:a,started:i(r)}]:[]}).sort((e,t)=>e.started.localeCompare(t.started)),l=n.obs.find(e=>e.concept.uuid===t.duration);return{encounter:n,day:r,groups:o,main:o[o.length-1]??null,duration:l?{...d(l.value),obsUuid:l.uuid}:null}}function g(e,t){let a=e?`${l.restBaseUrl}/encounter?patient=${e}&v=custom:(uuid,encounterDatetime,encounterType:(uuid),obs:(uuid,concept:(uuid),value,groupMembers:(uuid,concept:(uuid),value)))`:null,{data:n,error:g,isLoading:h}=o()(a,()=>(0,u.m)(a)),{prescription:y,history:b}=(0,r.useMemo)(()=>{let e=n?m(n,t):null;return{prescription:e,history:n?function(e,t,a=m(e,t)){let r=new Set(a?.groups.map(e=>`${e.regimen.uuid} ${e.started}`)),n=new Map,o=new Map,l=new Set;for(let{encounter:a,day:u}of e.map(e=>({encounter:e,day:p(e,t)})).sort((e,t)=>e.day.localeCompare(t.day)||e.encounter.encounterDatetime.localeCompare(t.encounter.encounterDatetime)))for(let e of c(a,t)){l.add(u);let a=d(s(e,t.prescription).value),p=s(e,t.dateStarted)?.value;if(!p||a.uuid===t.none)continue;let c=`${a.uuid} ${i(p)}`,m=n.get(c)??{regimen:a.label,started:i(p),stopped:null,reasonStopped:null,replaced:null,recorded:u,current:r.has(c)},g=s(e,t.dateStopped);if(g){let a=s(e,t.reasonStopped);m.stopped=i(g.value),m.reasonStopped=a?d(a.value).label:null}n.set(c,m),o.set(c,u)}for(let[e,t]of n)t.replaced=[...l].find(t=>t>o.get(e))??null;return[...n.values()].sort((e,t)=>t.started.localeCompare(e.started))}(n,t,e):null}},[n,t]);return{prescription:y,history:b,error:g,isLoading:h}}async function h({patient:e,location:t,encounterType:a,concepts:r,current:n,edit:o,main:u,today:i}){var d;let s,p,c,m,g,y,b=(d=n?.groups??[],s=(t,a)=>({concept:t,person:e,value:a}),p=(t,a,n)=>({concept:r.prescription,person:e,groupMembers:[s(r.prescription,t),s(r.dateStarted,a),...n?[s(r.dateStopped,n.stopped),s(r.reasonStopped,n.reason)]:[]]}),c=d.find(e=>e.uuid===u),m=d.filter(e=>e.uuid!==u),g=c?.started===o.started,y=o.stop?[]:g?m:c?[c,...m]:m,[p(o.regimen.uuid,o.started,o.stop),...o.stop?m.map(e=>p(e.regimen.uuid,e.started,o.stop)):[],...y.map(e=>p(e.regimen.uuid,e.started)),...o.duration?[s(r.duration,o.duration)]:[]]),f={"Content-Type":"application/json"};if(n&&n.day===i){let e=[...n.groups.map(e=>e.uuid),...n.duration?[n.duration.obsUuid]:[]];await (0,l.openmrsFetch)(`${l.restBaseUrl}/encounter/${n.encounter.uuid}`,{method:"POST",headers:f,body:{obs:[...e.map(e=>({uuid:e,voided:!0})),...b]}});return}await (0,l.openmrsFetch)(`${l.restBaseUrl}/encounter`,{method:"POST",headers:f,body:{patient:e,encounterType:a,location:t,obs:b}})}},7425(e,t,a){a.r(t),a.d(t,{default:()=>y});var r=a(4335),n=a.n(r),o=a(1943),l=a(3483),u=a(8406),i=a.n(u),d=a(7917),s=a(2909),p=a(1047),c=a(7420);let m="-esm-act__update-prophylaxis__body___u-1Dn",g="-esm-act__update-prophylaxis__button___YE8F9";function h({patientUuid:e,prescription:t,closeWorkspace:a}){let u,{t:y}=(0,o.useTranslation)(),{prophylaxisUpdate:b}=(0,s.useConfig)(),{sessionLocation:f}=(0,s.useSession)(),{mutate:v}=(0,l.useSWRConfig)(),_=i()().format("YYYY-MM-DD"),x=t?.main??null,[E,S]=(0,r.useState)(x?.regimen.uuid??""),[C,T]=(0,r.useState)(x?.started??_),[k,D]=(0,r.useState)(t?.duration?.uuid??""),[w,P]=(0,r.useState)(!1),[U,$]=(0,r.useState)(_),[N,M]=(0,r.useState)(""),[R,B]=(0,r.useState)(!1),F=x&&!b.regimens.some(e=>e.uuid===x.regimen.uuid)?[x.regimen,...b.regimens]:b.regimens,W=F.find(e=>e.uuid===E),Y=!!(W&&C)&&(!w||!!(U&&N&&U>=C))&&!R,O=async()=>{if(!W||!f?.uuid)return void(0,s.showSnackbar)({kind:"error",title:y("prophylaxisNotUpdated","The prophylaxis could not be updated"),subtitle:y("prophylaxisNeedsLocation","Choose a login location first")});B(!0);try{await (0,c.AX)({patient:e,location:f.uuid,encounterType:b.encounterType,concepts:b.concepts,current:t,edit:{regimen:w&&x?x.regimen:W,started:w&&x?x.started:C,duration:k||void 0,stop:w?{stopped:U,reason:N}:void 0},main:x?.uuid??null,today:_})}catch(e){(0,s.showSnackbar)({kind:"error",title:y("prophylaxisNotUpdated","The prophylaxis could not be updated"),subtitle:(0,p.e)(e)}),B(!1);return}(0,s.showSnackbar)({kind:"success",title:w?y("prophylaxisStopped","Prophylaxis stopped"):y("prophylaxisUpdated","Prophylaxis updated")});let r=`${s.restBaseUrl}/encounter?patient=${e}`;await v(e=>"string"==typeof e&&e.startsWith(r)),a({discardUnsavedChanges:!0})},j=E!==(x?.regimen.uuid??"")||C!==(x?.started??_)||k!==(t?.duration?.uuid??"")||w;return n().createElement(s.Workspace2,{title:y("updateProphylaxis","Update prophylaxis"),hasUnsavedChanges:j},n().createElement("div",{className:"-esm-act__update-prophylaxis__form___h7U+X"},n().createElement("div",{className:m},n().createElement("dl",{className:"-esm-act__update-prophylaxis__current___WzyxP","data-testid":"current-prescription"},n().createElement("div",null,n().createElement("dt",null,y("currentRegimen","Current regimen")),n().createElement("dd",null,x?x.regimen.label:y("noPrescription","No prescription"))),n().createElement("div",null,n().createElement("dt",null,y("started","Started")),n().createElement("dd",null,x?(u=x.started,(0,s.formatDate)((0,s.parseDate)(u),{time:!1})):"--")),n().createElement("div",null,n().createElement("dt",null,y("duration","Duration")),n().createElement("dd",null,t?.duration?.label||"--"))),t?.day===_&&n().createElement(d.jeF,{kind:"info",lowContrast:!0,hideCloseButton:!0,title:y("recordedToday","Recorded today"),subtitle:y("recordedTodayExplanation","ACT counts only the first record of a day, so this changes today's record instead of adding another.")}),n().createElement(d.l6P,{id:"update-prophylaxis-regimen",labelText:y("regimen","Regimen"),value:E,onChange:e=>{var t;S(t=e.target.value),T(x&&t===x.regimen.uuid?x.started:_)}},n().createElement(d.ebT,{value:"",text:y("chooseRegimen","Choose a regimen")}),F.map(e=>n().createElement(d.ebT,{key:e.uuid,value:e.uuid,text:e.label}))),n().createElement(d.ksK,{id:"update-prophylaxis-started",type:"date",labelText:y("dateStarted","Date started"),value:C,onChange:e=>T(e.target.value)}),n().createElement(d.l6P,{id:"update-prophylaxis-duration",labelText:y("duration","Duration"),value:k,onChange:e=>D(e.target.value)},n().createElement(d.ebT,{value:"",text:y("notRecorded","Not recorded")}),b.durations.map(e=>n().createElement(d.ebT,{key:e.uuid,value:e.uuid,text:e.label}))),x&&n().createElement(d.Sc0,{id:"update-prophylaxis-stop",labelText:y("stopProphylaxisLabel","Stop this prophylaxis"),checked:w,onChange:(e,{checked:t})=>P(t)}),w&&n().createElement(n().Fragment,null,n().createElement(d.ksK,{id:"update-prophylaxis-stopped",type:"date",labelText:y("dateStopped","Date stopped"),value:U,min:C,onChange:e=>$(e.target.value)}),n().createElement(d.l6P,{id:"update-prophylaxis-reason",labelText:y("reasonStopped","Reason stopped"),value:N,onChange:e=>M(e.target.value)},n().createElement(d.ebT,{value:"",text:y("chooseReason","Choose a reason")}),b.reasons.map(e=>n().createElement(d.ebT,{key:e.uuid,value:e.uuid,text:e.label}))))),n().createElement(d.Te$,{className:"-esm-act__update-prophylaxis__footer___4VFPq"},n().createElement(d.$nd,{className:g,kind:"secondary",disabled:R,onClick:()=>a()},y("cancel","Cancel")),n().createElement(d.$nd,{className:g,kind:"primary",disabled:!Y,onClick:O},w?y("stopProphylaxis","Stop prophylaxis"):y("save","Save")))))}function y({closeWorkspace:e,groupProps:{patientUuid:t}}){let{t:a}=(0,o.useTranslation)(),{prophylaxisUpdate:r}=(0,s.useConfig)(),{prescription:l,isLoading:u}=(0,c.Id)(t,r.concepts);return u?n().createElement(s.Workspace2,{title:a("updateProphylaxis","Update prophylaxis")},n().createElement(d.OuH,{className:m,description:a("loading","Loading...")})):n().createElement(h,{key:l?.encounter.uuid,patientUuid:t,prescription:l,closeWorkspace:e})}},1047(e,t,a){a.d(t,{e:()=>r});function r(e){let t=e?.responseBody?.error,a=Object.values(t?.fieldErrors??{}).flat()[0];return t?.globalErrors?.[0]?.message??a?.message??t?.message??e?.message??String(e)}}}]);
1
+ "use strict";(globalThis.webpackChunk_act_registry_esm_act_app=globalThis.webpackChunk_act_registry_esm_act_app||[]).push([["9498"],{7420(e,t,a){a.d(t,{AX:()=>h,Id:()=>g});var r=a(4335),n=a(3483),o=a.n(n),u=a(2909),l=a(7928);let i=e=>String(e).slice(0,10),d=e=>{let t=e??{};return{uuid:t.uuid??"",label:t.display??""}},s=(e,t)=>(e.groupMembers??[]).find(e=>e.concept.uuid===t),p=(e,t)=>i(e.obs.find(e=>e.concept.uuid===t.consultationDate)?.value??e.encounterDatetime),c=(e,t)=>e.obs.filter(e=>e.concept.uuid===t.prescription&&s(e,t.prescription));function m(e,t){let a=new Map;for(let r of e.filter(e=>c(e,t).length)){let e=p(r,t),n=a.get(e);(!n||r.encounterDatetime<n.encounterDatetime)&&a.set(e,r)}let r=[...a.keys()].sort().pop();if(!r)return null;let n=a.get(r),o=c(n,t).flatMap(e=>{let a=d(s(e,t.prescription).value),r=s(e,t.dateStarted)?.value,n=s(e,t.dateStopped);return r&&!n&&a.uuid!==t.none?[{uuid:e.uuid,regimen:a,started:i(r),memberUuids:(e.groupMembers??[]).map(e=>e.uuid)}]:[]}).sort((e,t)=>e.started.localeCompare(t.started)),u=n.obs.find(e=>e.concept.uuid===t.duration);return{encounter:n,day:r,groups:o,main:o[o.length-1]??null,duration:u?{...d(u.value),obsUuid:u.uuid}:null}}function g(e,t){let a=e?`${u.restBaseUrl}/encounter?patient=${e}&v=custom:(uuid,encounterDatetime,encounterType:(uuid),obs:(uuid,concept:(uuid),value,groupMembers:(uuid,concept:(uuid),value)))`:null,{data:n,error:g,isLoading:h}=o()(a,()=>(0,l.m)(a)),{prescription:y,history:b}=(0,r.useMemo)(()=>{let e=n?m(n,t):null;return{prescription:e,history:n?function(e,t,a=m(e,t)){let r=new Set(a?.groups.map(e=>`${e.regimen.uuid} ${e.started}`)),n=new Map,o=new Map,u=new Set;for(let{encounter:a,day:l}of e.map(e=>({encounter:e,day:p(e,t)})).sort((e,t)=>e.day.localeCompare(t.day)||e.encounter.encounterDatetime.localeCompare(t.encounter.encounterDatetime)))for(let e of c(a,t)){u.add(l);let a=d(s(e,t.prescription).value),p=s(e,t.dateStarted)?.value;if(!p||a.uuid===t.none)continue;let c=`${a.uuid} ${i(p)}`,m=n.get(c)??{regimen:a.label,started:i(p),stopped:null,reasonStopped:null,replaced:null,recorded:l,current:r.has(c)},g=s(e,t.dateStopped);if(g){let a=s(e,t.reasonStopped);m.stopped=i(g.value),m.reasonStopped=a?d(a.value).label:null}n.set(c,m),o.set(c,l)}for(let[e,t]of n)t.replaced=[...u].find(t=>t>o.get(e))??null;return[...n.values()].sort((e,t)=>t.started.localeCompare(e.started))}(n,t,e):null}},[n,t]);return{prescription:y,history:b,error:g,isLoading:h}}async function h({patient:e,location:t,encounterType:a,concepts:r,current:n,edit:o,main:l,today:i}){var d;let s,p,c,m,g,y,b=(d=n?.groups??[],s=(t,a)=>({concept:t,person:e,value:a}),p=(t,a,n)=>({concept:r.prescription,person:e,groupMembers:[s(r.prescription,t),s(r.dateStarted,a),...n?[s(r.dateStopped,n.stopped),s(r.reasonStopped,n.reason)]:[]]}),c=d.find(e=>e.uuid===l),m=d.filter(e=>e.uuid!==l),g=c?.started===o.started,y=o.stop?[]:g?m:c?[c,...m]:m,[p(o.regimen.uuid,o.started,o.stop),...o.stop?m.map(e=>p(e.regimen.uuid,e.started,o.stop)):[],...y.map(e=>p(e.regimen.uuid,e.started)),...o.duration?[s(r.duration,o.duration)]:[]]),f={"Content-Type":"application/json"};if(n&&n.day===i){let e=[...n.groups.flatMap(e=>[e.uuid,...e.memberUuids]),...n.duration?[n.duration.obsUuid]:[]];await (0,u.openmrsFetch)(`${u.restBaseUrl}/encounter/${n.encounter.uuid}`,{method:"POST",headers:f,body:{obs:[...e.map(e=>({uuid:e,voided:!0})),...b]}});return}await (0,u.openmrsFetch)(`${u.restBaseUrl}/encounter`,{method:"POST",headers:f,body:{patient:e,encounterType:a,location:t,obs:b}})}},7425(e,t,a){a.r(t),a.d(t,{default:()=>y});var r=a(4335),n=a.n(r),o=a(1943),u=a(3483),l=a(8406),i=a.n(l),d=a(7917),s=a(2909),p=a(1047),c=a(7420);let m="-esm-act__update-prophylaxis__body___u-1Dn",g="-esm-act__update-prophylaxis__button___YE8F9";function h({patientUuid:e,prescription:t,closeWorkspace:a}){let l,{t:y}=(0,o.useTranslation)(),{prophylaxisUpdate:b}=(0,s.useConfig)(),{sessionLocation:f}=(0,s.useSession)(),{mutate:v}=(0,u.useSWRConfig)(),_=i()().format("YYYY-MM-DD"),x=t?.main??null,[E,S]=(0,r.useState)(x?.regimen.uuid??""),[C,T]=(0,r.useState)(x?.started??_),[k,U]=(0,r.useState)(t?.duration?.uuid??""),[D,w]=(0,r.useState)(!1),[P,$]=(0,r.useState)(_),[M,N]=(0,r.useState)(""),[R,B]=(0,r.useState)(!1),F=x&&!b.regimens.some(e=>e.uuid===x.regimen.uuid)?[x.regimen,...b.regimens]:b.regimens,W=F.find(e=>e.uuid===E),Y=!!(W&&C)&&(!D||!!(P&&M&&P>=C))&&!R,O=async()=>{if(!W||!f?.uuid)return void(0,s.showSnackbar)({kind:"error",title:y("prophylaxisNotUpdated","The prophylaxis could not be updated"),subtitle:y("prophylaxisNeedsLocation","Choose a login location first")});B(!0);try{await (0,c.AX)({patient:e,location:f.uuid,encounterType:b.encounterType,concepts:b.concepts,current:t,edit:{regimen:D&&x?x.regimen:W,started:D&&x?x.started:C,duration:k||void 0,stop:D?{stopped:P,reason:M}:void 0},main:x?.uuid??null,today:_})}catch(e){(0,s.showSnackbar)({kind:"error",title:y("prophylaxisNotUpdated","The prophylaxis could not be updated"),subtitle:(0,p.e)(e)}),B(!1);return}(0,s.showSnackbar)({kind:"success",title:D?y("prophylaxisStopped","Prophylaxis stopped"):y("prophylaxisUpdated","Prophylaxis updated")});let r=`${s.restBaseUrl}/encounter?patient=${e}`;await v(e=>"string"==typeof e&&e.startsWith(r)),a({discardUnsavedChanges:!0})},j=E!==(x?.regimen.uuid??"")||C!==(x?.started??_)||k!==(t?.duration?.uuid??"")||D;return n().createElement(s.Workspace2,{title:y("updateProphylaxis","Update prophylaxis"),hasUnsavedChanges:j},n().createElement("div",{className:"-esm-act__update-prophylaxis__form___h7U+X"},n().createElement("div",{className:m},n().createElement("dl",{className:"-esm-act__update-prophylaxis__current___WzyxP","data-testid":"current-prescription"},n().createElement("div",null,n().createElement("dt",null,y("currentRegimen","Current regimen")),n().createElement("dd",null,x?x.regimen.label:y("noPrescription","No prescription"))),n().createElement("div",null,n().createElement("dt",null,y("started","Started")),n().createElement("dd",null,x?(l=x.started,(0,s.formatDate)((0,s.parseDate)(l),{time:!1})):"--")),n().createElement("div",null,n().createElement("dt",null,y("duration","Duration")),n().createElement("dd",null,t?.duration?.label||"--"))),t?.day===_&&n().createElement(d.jeF,{kind:"info",lowContrast:!0,hideCloseButton:!0,title:y("recordedToday","Recorded today"),subtitle:y("recordedTodayExplanation","ACT counts only the first record of a day, so this changes today's record instead of adding another.")}),n().createElement(d.l6P,{id:"update-prophylaxis-regimen",labelText:y("regimen","Regimen"),value:E,onChange:e=>{var t;S(t=e.target.value),T(x&&t===x.regimen.uuid?x.started:_)}},n().createElement(d.ebT,{value:"",text:y("chooseRegimen","Choose a regimen")}),F.map(e=>n().createElement(d.ebT,{key:e.uuid,value:e.uuid,text:e.label}))),n().createElement(d.ksK,{id:"update-prophylaxis-started",type:"date",labelText:y("dateStarted","Date started"),value:C,onChange:e=>T(e.target.value)}),n().createElement(d.l6P,{id:"update-prophylaxis-duration",labelText:y("duration","Duration"),value:k,onChange:e=>U(e.target.value)},n().createElement(d.ebT,{value:"",text:y("notRecorded","Not recorded")}),b.durations.map(e=>n().createElement(d.ebT,{key:e.uuid,value:e.uuid,text:e.label}))),x&&n().createElement(d.Sc0,{id:"update-prophylaxis-stop",labelText:y("stopProphylaxisLabel","Stop this prophylaxis"),checked:D,onChange:(e,{checked:t})=>w(t)}),D&&n().createElement(n().Fragment,null,n().createElement(d.ksK,{id:"update-prophylaxis-stopped",type:"date",labelText:y("dateStopped","Date stopped"),value:P,min:C,onChange:e=>$(e.target.value)}),n().createElement(d.l6P,{id:"update-prophylaxis-reason",labelText:y("reasonStopped","Reason stopped"),value:M,onChange:e=>N(e.target.value)},n().createElement(d.ebT,{value:"",text:y("chooseReason","Choose a reason")}),b.reasons.map(e=>n().createElement(d.ebT,{key:e.uuid,value:e.uuid,text:e.label}))))),n().createElement(d.Te$,{className:"-esm-act__update-prophylaxis__footer___4VFPq"},n().createElement(d.$nd,{className:g,kind:"secondary",disabled:R,onClick:()=>a()},y("cancel","Cancel")),n().createElement(d.$nd,{className:g,kind:"primary",disabled:!Y,onClick:O},D?y("stopProphylaxis","Stop prophylaxis"):y("save","Save")))))}function y({closeWorkspace:e,groupProps:{patientUuid:t}}){let{t:a}=(0,o.useTranslation)(),{prophylaxisUpdate:r}=(0,s.useConfig)(),{prescription:u,isLoading:l}=(0,c.Id)(t,r.concepts);return l?n().createElement(s.Workspace2,{title:a("updateProphylaxis","Update prophylaxis")},n().createElement(d.OuH,{className:m,description:a("loading","Loading...")})):n().createElement(h,{key:u?.encounter.uuid,patientUuid:t,prescription:u,closeWorkspace:e})}},1047(e,t,a){a.d(t,{e:()=>r});function r(e){let t=e?.responseBody?.error,a=Object.values(t?.fieldErrors??{}).flat()[0];return t?.globalErrors?.[0]?.message??a?.message??t?.message??e?.message??String(e)}}}]);
package/dist/9498.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"9498.js","sources":["webpack://@act-registry/esm-act-app/./src/prophylaxis/prescription.resource.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis/update-prophylaxis.scss?1134","webpack://@act-registry/esm-act-app/./src/prophylaxis/update-prophylaxis.workspace.tsx","webpack://@act-registry/esm-act-app/./src/rest-error-message.ts"],"names":["dayOf","value","String","answerOf","answer","memberOf","group","concept","member","dayOfEncounter","encounter","concepts","one","groupsOf","currentPrescriptionOf","encounters","firstOfDay","Map","day","first","groups","regimen","started","stopped","a","b","duration","usePrescription","patientUuid","url","restBaseUrl","data","error","isLoading","useSWR","fetchAll","prescription","history","useMemo","current","prescriptionHistoryOf","inForce","Set","courses","lastCarried","prescribedDays","key","course","reason","savePrescription","patient","location","encounterType","edit","main","today","edited","others","replaced","carried","obs","stop","headers","voided","openmrsFetch","uuid","UpdateForm","closeWorkspace","t","useTranslation","prophylaxisUpdate","useConfig","sessionLocation","useSession","mutate","useSWRConfig","dayjs","setRegimen","useState","setStarted","setDuration","stopping","setStopping","setStopped","setReason","saving","setSaving","regimens","chosen","valid","Boolean","save","showSnackbar","undefined","e","restErrorMessage","unsaved","Workspace2","formatDate","parseDate","InlineNotification","Select","event","SelectItem","TextInput","Checkbox","_","checked","ButtonSet","Button","UpdateProphylaxisWorkspace","InlineLoading","fieldError","Object"],"mappings":"iOA8CO,IAAMA,EAAQ,AAACC,GAAmBC,OAAOD,GAAO,KAAK,CAAC,EAAG,IAE1DE,EAAW,AAACF,IAChB,IAAMG,EAAUH,GAAS,CAAC,EAC1B,MAAO,CAAE,KAAMG,EAAO,IAAI,EAAI,GAAI,MAAOA,EAAO,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GC,AAAAA,GAAAA,EAAAA,SAAAA,AAAAA,IACxB,CAAEnC,aAAAA,CAAY,CAAEH,UAAAA,CAAS,CAAE,CAAGN,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAgBC,EAAa0C,EAAkB,QAAQ,EAE3F,OAAOrC,EACL,kBAACgE,EAAAA,UAAUA,CAAAA,CAAC,MAAO7B,EAAE,oBAAqB,qB,EACxC,kBAAC2C,EAAAA,GAAaA,CAAAA,CAAC,SAAS,GAAe,YAAa3C,EAAE,UAAW,a,IAGnE,kBAACF,EAAAA,CACC,IAAK9B,GAAc,UAAU,KAC7B,YAAaR,EACb,aAAcQ,EACd,eAAgB+B,C,EAGtB,C,+BCtOO,SAAS4B,EAAiBD,CAAgB,EAC/C,IAAM9D,EAAQ8D,GAAG,cAAc,MACzBkB,EAAaC,OAAO,MAAM,CAACjF,GAAO,aAAe,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CACpE,OAAOA,GAAO,cAAc,CAAC,EAAE,EAAE,SAAWgF,GAAY,SAAWhF,GAAO,SAAW8D,GAAG,SAAW5F,OAAO4F,EAC5G,C"}
1
+ {"version":3,"file":"9498.js","sources":["webpack://@act-registry/esm-act-app/./src/prophylaxis/prescription.resource.ts","webpack://@act-registry/esm-act-app/./src/prophylaxis/update-prophylaxis.scss?1134","webpack://@act-registry/esm-act-app/./src/prophylaxis/update-prophylaxis.workspace.tsx","webpack://@act-registry/esm-act-app/./src/rest-error-message.ts"],"names":["dayOf","value","String","answerOf","answer","memberOf","group","concept","member","dayOfEncounter","encounter","concepts","one","groupsOf","currentPrescriptionOf","encounters","firstOfDay","Map","day","first","groups","regimen","started","stopped","a","b","duration","usePrescription","patientUuid","url","restBaseUrl","data","error","isLoading","useSWR","fetchAll","prescription","history","useMemo","current","prescriptionHistoryOf","inForce","Set","courses","lastCarried","prescribedDays","key","course","reason","savePrescription","patient","location","encounterType","edit","main","today","edited","others","replaced","carried","obs","stop","headers","voided","openmrsFetch","uuid","UpdateForm","closeWorkspace","t","useTranslation","prophylaxisUpdate","useConfig","sessionLocation","useSession","mutate","useSWRConfig","dayjs","setRegimen","useState","setStarted","setDuration","stopping","setStopping","setStopped","setReason","saving","setSaving","regimens","chosen","valid","Boolean","save","showSnackbar","undefined","e","restErrorMessage","unsaved","Workspace2","formatDate","parseDate","InlineNotification","Select","event","SelectItem","TextInput","Checkbox","_","checked","ButtonSet","Button","UpdateProphylaxisWorkspace","InlineLoading","fieldError","Object"],"mappings":"iOAgDO,IAAMA,EAAQ,AAACC,GAAmBC,OAAOD,GAAO,KAAK,CAAC,EAAG,IAE1DE,EAAW,AAACF,IAChB,IAAMG,EAAUH,GAAS,CAAC,EAC1B,MAAO,CAAE,KAAMG,EAAO,IAAI,EAAI,GAAI,MAAOA,EAAO,OAAO,EAAI,EAAG,CAChE,EAEMC,EAAW,CAACC,EAAwBC,IACvCD,AAAAA,CAAAA,EAAM,YAAY,EAAI,EAAC,EAAG,IAAI,CAAC,AAACE,GAAWA,EAAO,OAAO,CAAC,IAAI,GAAKD,GAEhEE,EAAiB,CAACC,EAAkCC,IACxDX,EACEU,EAAU,GAAG,CAAC,IAAI,CAAC,AAACE,GAAQA,EAAI,OAAO,CAAC,IAAI,GAAKD,EAAS,gBAAgB,GAAG,OAASD,EAAU,iBAAiB,EAG/GG,EAAW,CAACH,EAAkCC,IAClDD,EAAU,GAAG,CAAC,MAAM,CAAC,AAACE,GAAQA,EAAI,OAAO,CAAC,IAAI,GAAKD,EAAS,YAAY,EAAIN,EAASO,EAAKD,EAAS,YAAY,GAM1G,SAASG,EACdC,CAAwC,CACxCJ,CAAkB,EAElB,IAAMK,EAAa,IAAIC,IACvB,IAAK,IAAMP,KAAaK,EAAW,MAAM,CAAC,AAACH,GAAQC,EAASD,EAAKD,GAAU,MAAM,EAAG,CAClF,IAAMO,EAAMT,EAAeC,EAAWC,GAChCQ,EAAQH,EAAW,GAAG,CAACE,EAEzB,GAACC,GAAST,EAAU,iBAAiB,CAAGS,EAA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E,SAAWgF,GAAY,SAAWhF,GAAO,SAAW8D,GAAG,SAAW5F,OAAO4F,EAC5G,C"}
@@ -1,3 +1,3 @@
1
- var _act_registry_esm_act_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("@act-registry/esm-act-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("@act-registry/esm-act-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={382(e,t,r){"use strict";var n,o,i,a,s,l,u,c,p,d,f,h,m=r(7032),g=r.n(m);let y=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),b={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},_=null!=(i=null==(c=r.initializeSharingData)?void 0:c.scopeToSharingDataMapping)?i:{},O=null!=(a=null==(p=r.consumesLoadingData)?void 0:p.chunkMapping)?a:{},M=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(M))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",()=>"@act-registry/esm-act-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(_))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,c={},p=function(e){return void 0!==e};p(s)&&(c.singleton=s),p(l)&&(c.requiredVersion=l),p(a)&&(c.eager=a),p(u)&&(c.strictVersion=u);let d={version:o,scope:[t],shareConfig:c,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(b).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>y),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>b),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=b[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},6356(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},9369(e,t){var r=Object.create,n=Object.defineProperty,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,c=l.length;u<c;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))},1222(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(9369);let n=r(1146),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},7201(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(9369);let n=r(1146),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)}},1146(e,t,r){r(9369);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@act-registry/esm-act-app:1.0.1-pre.523";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},1326(e,t){var r=Object.create,n=Object.defineProperty,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,c=l.length;u<c;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))},3026(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},9592(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},5769(e,t,r){let n=r(3026),o=r(9671),i=r(9864),a=r(9296),s=r(2742);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:c,moduleToHandlerMapping:p}=e;n.attachShareScopeMap(u),u.o(c,t)&&c[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}=p[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:c,getter:d,shareInfo:f,treeShakingGetter:h}=p[e],m=i.getUsedExports(u,c),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 y=o.loadShare(c,{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:c}));return h?.()||d()}return e});y.then?r.push(l[e]=y.then(t).catch(n)):t(y)}catch(e){n(e)}})}},9296(e,t){t.RUNTIME_012="RUNTIME-012"},2742(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let 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 _act_registry_esm_act_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("@act-registry/esm-act-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("@act-registry/esm-act-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={382(e,t,r){"use strict";var n,o,i,a,s,l,u,c,p,d,f,h,m=r(7032),g=r.n(m);let y=[].filter(({plugin:e})=>e).map(({plugin:e,params:t})=>e(t)),b={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){let e=(e,t,r)=>{e&&e[t]&&(e[t]=r)},t=(e,t,r)=>{let n=r();Array.isArray(n)?(null!=e[t]||(e[t]=[]),e[t].push(...n)):"object"==typeof n&&null!==n&&(null!=e[t]||(e[t]={}),Object.assign(e[t],n))},m=(e,t,r)=>{null!=e[t]||(e[t]=r())},S=null!=(n=null==(l=r.remotesLoadingData)?void 0:l.chunkMapping)?n:{},E=null!=(o=null==(u=r.remotesLoadingData)?void 0:u.moduleIdToRemoteDataMapping)?o:{},_=null!=(i=null==(c=r.initializeSharingData)?void 0:c.scopeToSharingDataMapping)?i:{},O=null!=(a=null==(p=r.consumesLoadingData)?void 0:p.chunkMapping)?a:{},M=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(M))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",()=>"@act-registry/esm-act-app"),m(r.federation.initOptions,"shareStrategy",()=>"version-first"),m(r.federation.initOptions,"shared",()=>{let e={};for(let[t,r]of Object.entries(_))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,c={},p=function(e){return void 0!==e};p(s)&&(c.singleton=s),p(l)&&(c.requiredVersion=l),p(a)&&(c.eager=a),p(u)&&(c.strictVersion=u);let d={version:o,scope:[t],shareConfig:c,get:i};e[r]?e[r].push(d):e[r]=[d]}return e}),t(r.federation.initOptions,"remotes",()=>Object.values(b).flat().filter(e=>"script"===e.externalType)),t(r.federation.initOptions,"plugins",()=>y),m(r.federation,"bundlerRuntimeOptions",()=>({})),m(r.federation.bundlerRuntimeOptions,"remotes",()=>({})),m(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>S),m(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>b),m(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{let e={};for(let[t,r]of Object.entries(E))e[t]=[r.shareScope,r.name,r.externalModuleId,r.remoteName];return e}),m(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>r),t(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{let e={};for(let[t,r]of Object.entries(E)){let n=b[r.remoteName];n&&(e[t]=n)}return e}),e(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),e(r.f,"remotes",(e,t)=>r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:S,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})),e(r.f,"consumes",(e,t)=>r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:O,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:v,webpackRequire:r})),e(r,"I",(e,t)=>r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:R,initTokens:T,webpackRequire:r})),e(r,"initContainer",(e,t,n)=>r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:w,webpackRequire:r})),e(r,"getContainer",(e,t)=>{var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(h=r.consumesLoadingData)?void 0:h.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:v,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},6356(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},9369(e,t){var r=Object.create,n=Object.defineProperty,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,c=l.length;u<c;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))},1222(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(9369);let n=r(1146),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},7201(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(9369);let n=r(1146),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)}},1146(e,t,r){r(9369);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@act-registry/esm-act-app:1.0.1-pre.527";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},1326(e,t){var r=Object.create,n=Object.defineProperty,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,c=l.length;u<c;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))},3026(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},9592(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},5769(e,t,r){let n=r(3026),o=r(9671),i=r(9864),a=r(9296),s=r(2742);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:c,moduleToHandlerMapping:p}=e;n.attachShareScopeMap(u),u.o(c,t)&&c[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}=p[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:c,getter:d,shareInfo:f,treeShakingGetter:h}=p[e],m=i.getUsedExports(u,c),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 y=o.loadShare(c,{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:c}));return h?.()||d()}return e});y.then?r.push(l[e]=y.then(t).catch(n)):t(y)}catch(e){n(e)}})}},9296(e,t){t.RUNTIME_012="RUNTIME-012"},2742(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let 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")}},2176(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 c=r?u.find(e=>e[1]===r):u[0];if(!c)throw Error(`No fallback item found for shareKey: ${e} and version: ${r}`);return()=>i.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:c[2],entry:`${n.p}${c[0]}`,type:o,entryGlobalName:c[2],shareScope:"default"}}).then(t=>{if(!t)throw Error(`Failed to load fallback entry for shareKey: ${e} and version: ${r}`);return t.init(n.federation.instance,s).then(()=>t.get())})}},9864(e,t){t.getUsedExports=function(e,t){let r=e.federation.usedExports;if(r)return r[t]}},7032(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let n=r(1326),o=r(3026),i=r(5313),a=r(5769),s=r(2614),l=r(8066),u=r(8593),c=r(6554),p=r(2176),d=r(7201);d=n.__toESM(d);let f={remotes:i.remotes,consumes:a.consumes,I:s.initializeSharing,S:{},installInitialConsumes:l.installInitialConsumes,initContainerEntry:u.initContainerEntry,init:c.init,getSharedFallbackGetter:p.getSharedFallbackGetter},h={runtime:d,instance:void 0,initOptions:void 0,bundlerRuntime:f,attachShareScopeMap:o.attachShareScopeMap,bundlerRuntimeOptions:{}},m=h.instance,g=h.initOptions,y=h.bundlerRuntimeOptions;t.attachShareScopeMap=o.attachShareScopeMap,t.bundlerRuntime=f,t.bundlerRuntimeOptions=y,t.default=h,t.initOptions=g,t.instance=m,Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return d}})},6554(e,t,r){let n=r(1326),o=r(7201),i=r(1222);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:c}=t,p=n.version||c.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:p});return h&&"shared"in h&&(Object.keys(c.shared||{}).forEach(e=>{c.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:c}=n;i.status!==c&&(i.status=c,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)}},8593(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)}},2614(e,t,r){let n=r(3026),o=r(9592);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 c=r[s];if(c)return c;var p=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)p(r);else if(1===t.length){let e=t[0];o.FEDERATION_SUPPORTED_TYPES.includes(e.externalType)||p(r)}}),d.length)?r[s]=Promise.all(d).then(()=>r[s]=!0):r[s]=!0};return s.forEach(e=>{l.push(u(e))}),Promise.all(l).then(()=>!0)}},8066(e,t,r){let n=r(9671),o=r(9864);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)})}},5313(e,t,r){r(1326);let n=r(3026),o=r(9592),i=r(9671),a=r(1853);t.remotes=function(e){i.updateRemoteOptions(e);let{chunkId:t,promises:r,webpackRequire:s,chunkMapping:l,idToExternalAndNameMapping:u,idToRemoteMap:c}=e;n.attachShareScopeMap(s),s.o(l,t)&&l[t].forEach(e=>{let t=s.R;t||(t=[]);let n=u[e],i=c[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
3
  while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},p=(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)=>p(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?p(()=>{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):p(s,n[2],0,0,(e,t,r)=>e?p(s.I,n[0],0,e,d,r):l(),1)})}},9671(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData: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,c={requiredVersion:`^${o}`},p=function(e){return void 0!==e};p(s)&&(c.singleton=s),p(l)&&(c.requiredVersion=l),p(a)&&(c.eager=a),p(u)&&(c.strictVersion=u);let d={version:o,scope:[e],shareConfig:c,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(6356),s.federation||(s.federation={chunkMatcher:function(e){return!/^(7(077|123|494)|4516|8405|9748)$/.test(e)},rootOutputDir:""}),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},u=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);s.r(r);var n={};l=l||[null,u({}),u([]),u(u)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~l.indexOf(o);o=u(o))Object.getOwnPropertyNames(o).forEach(t=>{n[t]=()=>e[t]});return n.default=()=>e,s.d(r,n),r},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),c={},s.l=function(e,t,r,n){if(c[e])return void c[e].push(t);if(void 0!==r)for(var o,i,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var u=a[l];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@act-registry/esm-act-app:"+r){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@act-registry/esm-act-app:"+r),o.src=e),c[e]=[t];var p=function(t,r){o.onerror=o.onload=null,clearTimeout(d);var n=c[e];if(delete c[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=p.bind(null,o.onerror),o.onload=p.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:"@openmrs/esm-framework",version:"10.0.1-pre.5753",factory:()=>Promise.all([s.e("5098"),s.e("2731"),s.e("7678"),s.e("2024"),s.e("7422"),s.e("8405"),s.e("9748"),s.e("7123"),s.e("7494")]).then(()=>()=>s(1085)),eager:0,singleton:1,requiredVersion:"10.x",strictVersion:0},{name:"dayjs",version:"1.11.13",factory:()=>s.e("2538").then(()=>()=>s(4353)),eager:0,singleton:1,requiredVersion:"1.x",strictVersion:0},{name:"react-i18next",version:"16.0.0",factory:()=>Promise.all([s.e("3379"),s.e("9748")]).then(()=>()=>s(673)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react-router-dom",version:"6.30.1",factory:()=>Promise.all([s.e("5098"),s.e("749"),s.e("9748")]).then(()=>()=>s(6204)),eager:0,singleton:1,requiredVersion:"6.x",strictVersion:0},{name:"react",version:"18.3.1",factory:()=>s.e("6237").then(()=>()=>s(6540)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("9748")]).then(()=>()=>s(4993)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9748"),s.e("5898")]).then(()=>()=>s(4225)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9748"),s.e("1578")]).then(()=>()=>s(3041)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr",version:"2.5.1",factory:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9748"),s.e("8410")]).then(()=>()=>s(2177)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@act-registry/esm-act-app"},s.I=s.I||function(){throw Error("should have __webpack_require__.I")},s.g.importScripts&&(p=s.g.location+"");var l,u,c,p,d=s.g.document;if(!p&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(p=d.currentScript.src),!p)){var f=d.getElementsByTagName("script");if(f.length)for(var h=f.length-1;h>-1&&(!p||!/^http(s?):/.test(p));)p=f[h--].src}if(!p)throw Error("Automatic publicPath is not supported in this browser");if(s.p=p=p.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.consumesLoadingData={chunkMapping:{7123:["8406","3483","1943","1675"],9523:["2909"],9748:["4335"],8405:["676"],7494:["6610","5072"]},moduleIdToConsumeDataMapping:{5072:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6362").then(()=>()=>s(4993))},676:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("3517")]).then(()=>()=>s(4225))},4335:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("6237").then(()=>()=>s(6540))},8406:{shareScope:"default",shareKey:"dayjs",import:"dayjs",requiredVersion:"1.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("2538").then(()=>()=>s(4353))},3483:{shareScope:"default",shareKey:"swr",import:"swr",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("6029")]).then(()=>()=>s(2177))},6610:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("6362"),s.e("7977"),s.e("9197")]).then(()=>()=>s(3041))},2909:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"10.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("5098"),s.e("2731"),s.e("7678"),s.e("2024"),s.e("7422"),s.e("8405"),s.e("7494")]).then(()=>()=>s(1085))},1943:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("3379").then(()=>()=>s(673))},1675:{shareScope:"default",shareKey:"react-router-dom",import:"react-router-dom",requiredVersion:"6.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("5098"),s.e("749")]).then(()=>()=>s(6204))}},initialConsumes:[]},s.f.consumes=s.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},"u">typeof document){var m=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},g=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}},y={3417:0};s.f.miniCss=function(e,t){if(y[e])t.push(y[e]);else 0!==y[e]&&({1067:1,1079:1,129:1,1397:1,1691:1,1804:1,1813:1,1865:1,2279:1,2393:1,2419:1,2471:1,2662:1,27:1,2744:1,2749:1,2821:1,2854:1,2925:1,296:1,3e3:1,3385:1,3411:1,3889:1,3939:1,422:1,4376:1,4489:1,4516:1,4710:1,4720:1,4921:1,501:1,5174:1,5189:1,5223:1,5368:1,5416:1,5521:1,5693:1,5719:1,5764:1,6020:1,6131:1,6133:1,6612:1,7077:1,7173:1,7201:1,7347:1,7367:1,7422:1,7500:1,7516:1,7526:1,7559:1,7743:1,781:1,7909:1,808:1,8361:1,841:1,8431:1,8751:1,8759:1,9154:1,9498:1,9708:1})[e]&&t.push(y[e]=new Promise(function(t,r){var n=s.miniCssF(e),o=s.p+n;if(g(n,o))return t();m(e,o,null,t,r)}).then(function(){y[e]=0},function(t){throw delete y[e],t}))}}s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("9748"),s.e("7123"),s.e("9523")]).then(()=>()=>s(9758))},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={3417: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(/^(7(077|123|494)|4516|8405|9748)$/.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_act_registry_esm_act_app=globalThis.webpackChunk_act_registry_esm_act_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(382)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_act_registry_esm_act_app=s.x()})();
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.40.0","actcore":">=1.0.0-0","cohort":">=3.7.3","reportingrest":">=2.0.0","patientflags":">=3.0.10"},"extensions":[{"name":"act-home-dashboard-link","slot":"homepage-dashboard-slot","component":"actHomeDashboardLink","meta":{"name":"act-home","slot":"rhd-home-dashboard-slot","title":"actHome"},"privileges":"App: act.home"},{"name":"act-home-dashboard","slot":"rhd-home-dashboard-slot","component":"actHomeDashboard","privileges":"App: act.home"},{"name":"act-home-quick-actions","slot":"rhd-home-widgets-slot","component":"actHomeQuickActions","order":1,"privileges":"App: act.home"},{"name":"act-home-record-bpg","slot":"act-home-quick-actions-slot","component":"recordBpgQuickAction","order":1,"privileges":"Add Encounters","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-record-oral","slot":"act-home-quick-actions-slot","component":"recordOralQuickAction","order":2,"privileges":"Add Encounters","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-register-patient","slot":"act-home-quick-actions-slot","component":"registerPatientQuickAction","order":3,"privileges":"Add Patients"},{"name":"act-home-enter-prophylaxis","slot":"act-home-quick-actions-slot","component":"enterProphylaxisQuickAction","order":4,"privileges":["Add Encounters","App: act.registry"],"displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-find-patient","slot":"act-home-quick-actions-slot","component":"findPatientQuickAction","order":5,"privileges":"Get Patients"},{"name":"act-home-due-for-prophylaxis","slot":"rhd-home-widgets-slot","component":"dueForProphylaxisWidget","order":2,"privileges":"App: act.dueList","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-worklists","slot":"rhd-home-widgets-slot","component":"actHomeWorklists","order":4,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-worklists-beside-cascade","slot":"rhd-home-widgets-slot","component":"actHomeWorklists","order":4,"privileges":"App: act.worklists","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-overdue-consultation","slot":"rhd-home-widgets-slot","component":"actHomeOverdueConsultation","order":5,"privileges":"App: act.registry","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-care-cascade","slot":"rhd-home-widgets-slot","component":"actHomeCareCascade","order":6,"privileges":"App: act.registry"},{"name":"act-registry-dashboard-link","slot":"homepage-dashboard-slot","component":"registryDashboardLink","meta":{"name":"act-registry","slot":"rhd-registry-dashboard-slot","title":"registry"},"privileges":"App: act.registry"},{"name":"act-registry-dashboard","slot":"rhd-registry-dashboard-slot","component":"registryDashboard","privileges":"App: act.registry"},{"name":"act-worklists-dashboard-link","slot":"homepage-dashboard-slot","component":"worklistsDashboardLink","meta":{"name":"act-worklists","slot":"rhd-worklists-dashboard-slot","title":"worklists"},"privileges":"App: act.worklists"},{"name":"act-worklists-dashboard","slot":"rhd-worklists-dashboard-slot","component":"worklistsDashboard","privileges":"App: act.worklists"},{"name":"act-worklist-due-for-prophylaxis","slot":"act-worklists-slot","component":"dueForProphylaxisWorklist","order":1,"privileges":"App: act.worklists"},{"name":"act-worklist-confirmatory-echo","slot":"act-worklists-slot","component":"confirmatoryEchoWorklist","order":2,"privileges":"App: act.worklists"},{"name":"act-worklist-cardiology-follow-up","slot":"act-worklists-slot","component":"flagWorklist","order":3,"privileges":"App: act.worklists"},{"name":"act-worklist-lost-to-follow-up","slot":"act-worklists-slot","component":"flagWorklist","order":4,"privileges":"App: act.worklists"},{"name":"act-worklist-post-procedural-follow-up","slot":"act-worklists-slot","component":"flagWorklist","order":5,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-pregnancy-outcome","slot":"act-worklists-slot","component":"flagWorklist","order":6,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-inr-review","slot":"act-worklists-slot","component":"flagWorklist","order":7,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-referred-to-clinician","slot":"act-worklists-slot","component":"flagWorklist","order":8,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-waiting-list","slot":"act-worklists-slot","component":"waitingListWorklist","order":9,"privileges":"App: act.waitingList","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-waiting-list-dashboard-link","slot":"homepage-dashboard-slot","component":"waitingListDashboardLink","meta":{"name":"act-waiting-list","slot":"rhd-waiting-list-dashboard-slot","title":"waitingList"},"privileges":"App: act.waitingList"},{"name":"act-waiting-list-dashboard","slot":"rhd-waiting-list-dashboard-slot","component":"waitingListDashboard","privileges":"App: act.waitingList"},{"name":"act-screen-positive-dashboard-link","slot":"homepage-dashboard-slot","component":"screenPositiveDashboardLink","meta":{"name":"act-screen-positive","slot":"rhd-screen-positive-dashboard-slot","title":"screenPositive"},"privileges":"App: act.screenPositive"},{"name":"act-screen-positive-dashboard","slot":"rhd-screen-positive-dashboard-slot","component":"screenPositiveDashboard","privileges":"App: act.screenPositive"},{"name":"act-dashboard-link","slot":"homepage-dashboard-slot","component":"dashboardLink","meta":{"name":"act-dashboard","slot":"act-dashboard-slot","title":"dashboard"},"privileges":"App: act.dashboard"},{"name":"act-dashboard","slot":"act-dashboard-slot","component":"dashboard","privileges":"App: act.dashboard"},{"name":"act-run-charts-dashboard-link","slot":"homepage-dashboard-slot","component":"runChartsDashboardLink","meta":{"name":"act-run-charts","slot":"act-run-charts-dashboard-slot","title":"runCharts"},"privileges":"App: act.dashboard"},{"name":"act-run-charts-dashboard","slot":"act-run-charts-dashboard-slot","component":"runChartsDashboard","privileges":"App: act.dashboard"},{"name":"act-reports-dashboard-link","slot":"homepage-dashboard-slot","component":"reportsDashboardLink","meta":{"name":"act-reports","slot":"act-reports-dashboard-slot","title":"reports"},"privileges":"App: act.reports"},{"name":"act-reports-dashboard","slot":"act-reports-dashboard-slot","component":"reportsDashboard","privileges":"App: act.reports"},{"name":"act-report-dashboard-link","slot":"homepage-dashboard-slot","component":"reportViewDashboardLink","meta":{"name":"act-report","slot":"act-report-dashboard-slot","title":"reports"},"privileges":"App: act.reports"},{"name":"act-report-dashboard","slot":"act-report-dashboard-slot","component":"reportViewDashboard","privileges":"App: act.reports"},{"name":"act-facility-reports-dashboard-link","slot":"homepage-dashboard-slot","component":"facilityReportsDashboardLink","meta":{"name":"act-facility-reports","slot":"act-facility-reports-dashboard-slot","title":"facilityReports"},"privileges":"App: act.dataClerk"},{"name":"act-facility-reports-dashboard","slot":"act-facility-reports-dashboard-slot","component":"facilityReportsDashboard","privileges":"App: act.dataClerk"},{"name":"act-instance-admin-dashboard-link","slot":"homepage-dashboard-slot","component":"instanceAdminDashboardLink","meta":{"name":"act-instance-admin","slot":"act-instance-admin-dashboard-slot","title":"home"},"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-dashboard","slot":"act-instance-admin-dashboard-slot","component":"instanceAdminDashboard","privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-quick-actions","slot":"act-instance-admin-widgets-slot","component":"instanceAdminQuickActions","order":1,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-kpis","slot":"act-instance-admin-widgets-slot","component":"instanceAdminKpis","order":2,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-forms-and-sites","slot":"act-instance-admin-quick-actions-slot","component":"formsAndSitesQuickAction","order":1,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-role-permissions","slot":"act-instance-admin-quick-actions-slot","component":"rolePermissionsQuickAction","order":2,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-research-participation","slot":"act-instance-admin-quick-actions-slot","component":"researchParticipationQuickAction","order":3,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-nav","slot":"homepage-dashboard-slot","component":"instanceAdminNav","privileges":"App: act.instanceAdmin"},{"name":"act-users-dashboard-link","slot":"homepage-dashboard-slot","component":"usersDashboardLink","meta":{"name":"act-users","slot":"act-users-dashboard-slot","title":"usersAndRoles"},"privileges":"Edit Users"},{"name":"act-users-dashboard","slot":"act-users-dashboard-slot","component":"usersDashboard","privileges":"Edit Users"},{"name":"act-clinics-dashboard-link","slot":"homepage-dashboard-slot","component":"clinicsDashboardLink","meta":{"name":"act-clinics","slot":"act-clinics-dashboard-slot","title":"clinics"},"privileges":"Manage Locations"},{"name":"act-clinics-dashboard","slot":"act-clinics-dashboard-slot","component":"clinicsDashboard","privileges":"Manage Locations"},{"name":"act-role-permissions-dashboard-link","slot":"homepage-dashboard-slot","component":"rolePermissionsDashboardLink","meta":{"name":"act-role-permissions","slot":"act-role-permissions-dashboard-slot","title":"rolePermissions"},"privileges":"Manage Roles"},{"name":"act-role-permissions-dashboard","slot":"act-role-permissions-dashboard-slot","component":"rolePermissionsDashboard","privileges":"Manage Roles"},{"name":"act-studies-dashboard-link","slot":"homepage-dashboard-slot","component":"studiesDashboardLink","meta":{"name":"act-studies","slot":"act-studies-dashboard-slot","title":"studies"},"privileges":"App: act.studies"},{"name":"act-studies-dashboard","slot":"act-studies-dashboard-slot","component":"studiesDashboard","privileges":"App: act.studies"},{"name":"act-refresh-flags-dashboard-link","slot":"homepage-dashboard-slot","component":"refreshFlagsDashboardLink","meta":{"name":"act-refresh-flags","slot":"act-refresh-flags-dashboard-slot","title":"flagsAndAdherence"},"privileges":"Task: act.refreshFlags"},{"name":"act-refresh-flags-dashboard","slot":"act-refresh-flags-dashboard-slot","component":"refreshFlagsDashboard","privileges":"Task: act.refreshFlags"},{"name":"act-screening-counts-dashboard-link","slot":"homepage-dashboard-slot","component":"screeningCountsDashboardLink","meta":{"name":"act-screening-counts","slot":"act-screening-counts-dashboard-slot","title":"screeningCounts"},"privileges":"App: act.screeningCounts"},{"name":"act-screening-counts-dashboard","slot":"act-screening-counts-dashboard-slot","component":"screeningCountsDashboard","privileges":"App: act.screeningCounts"},{"name":"act-download-dashboard-link","slot":"homepage-dashboard-slot","component":"downloadDashboardLink","meta":{"name":"act-download","slot":"act-download-dashboard-slot","title":"downloadData"}},{"name":"act-download-dashboard","slot":"act-download-dashboard-slot","component":"downloadDashboard"},{"name":"act-logs-dashboard-link","slot":"homepage-dashboard-slot","component":"logsDashboardLink","meta":{"name":"act-logs","slot":"act-logs-dashboard-slot","title":"logs"},"displayExpression":"session.user.privileges.some((privilege) => ['View Audit Logs', 'View Read Audit Logs', 'View Security Audit Logs'].includes(privilege.display)) || session.user.roles.some((role) => role.display === 'System Developer')"},{"name":"act-logs-dashboard","slot":"act-logs-dashboard-slot","component":"logsDashboard","displayExpression":"session.user.privileges.some((privilege) => ['View Audit Logs', 'View Read Audit Logs', 'View Security Audit Logs'].includes(privilege.display)) || session.user.roles.some((role) => role.display === 'System Developer')"},{"name":"act-community-home-dashboard-link","slot":"homepage-dashboard-slot","component":"communityHomeDashboardLink","meta":{"name":"act-community-home","slot":"act-community-home-dashboard-slot","title":"home"},"privileges":"App: act.communityHome"},{"name":"act-community-home-dashboard","slot":"act-community-home-dashboard-slot","component":"communityHomeDashboard","privileges":"App: act.communityHome"},{"name":"act-community-home-quick-actions","slot":"act-community-home-widgets-slot","component":"communityHomeQuickActions","order":1,"privileges":"App: act.communityHome"},{"name":"act-community-home-record-bpg","slot":"act-community-home-quick-actions-slot","component":"recordBpgQuickAction","order":1,"privileges":"Add Encounters"},{"name":"act-community-home-record-oral","slot":"act-community-home-quick-actions-slot","component":"recordOralQuickAction","order":2,"privileges":"Add Encounters"},{"name":"act-community-home-register-patient","slot":"act-community-home-quick-actions-slot","component":"registerPatientQuickAction","order":3,"privileges":"Add Patients"},{"name":"act-community-home-find-patient","slot":"act-community-home-quick-actions-slot","component":"findPatientQuickAction","order":4,"privileges":"Get Patients"},{"name":"act-community-home-facility-report","slot":"act-community-home-quick-actions-slot","component":"facilityReportQuickAction","order":5,"privileges":"App: act.dataClerk"},{"name":"act-enter-prophylaxis-dashboard-link","slot":"homepage-dashboard-slot","component":"patientsOnProphylaxisDashboardLink","meta":{"name":"act-enter-prophylaxis","slot":"act-enter-prophylaxis-dashboard-slot","title":"enterProphylaxis"},"privileges":"App: act.registry"},{"name":"act-enter-prophylaxis-dashboard","slot":"act-enter-prophylaxis-dashboard-slot","component":"patientsOnProphylaxisDashboard","privileges":"App: act.registry"},{"name":"act-due-for-prophylaxis-dashboard-link","slot":"homepage-dashboard-slot","component":"dueForProphylaxisDashboardLink","meta":{"name":"act-due-for-prophylaxis","slot":"rhd-due-for-prophylaxis-dashboard-slot","title":"dueForProphylaxis"},"privileges":"App: act.dueList"},{"name":"act-admin-nav","slot":"homepage-dashboard-slot","component":"adminNav"},{"name":"act-due-for-prophylaxis-dashboard","slot":"rhd-due-for-prophylaxis-dashboard-slot","component":"dueForProphylaxisDashboard","privileges":"App: act.dueList"},{"name":"act-due-for-prophylaxis-widget","slot":"act-community-home-widgets-slot","component":"dueForProphylaxisWidget","order":2,"privileges":"App: act.dueList"},{"name":"act-back-to-act-link","slot":"top-of-all-patient-dashboards-slot","component":"backToActLink","privileges":"Get Patients"},{"name":"act-session-timeout","slot":"top-nav-actions-slot","component":"sessionTimeout","order":99},{"name":"act-help-contact","slot":"help-menu-slot","component":"actHelpContact"},{"name":"act-help-docs","slot":"help-menu-slot","component":"actHelpDocs"},{"name":"act-scan-patient-card-dashboard-link","slot":"homepage-dashboard-slot","component":"scanPatientCardDashboardLink","meta":{"name":"act-scan-patient-card","slot":"act-scan-patient-card-dashboard-slot","title":"scanPatientCard"},"privileges":"Task: act.enterProphylaxis"},{"name":"act-scan-patient-card-dashboard","slot":"act-scan-patient-card-dashboard-slot","component":"scanPatientCardDashboard","privileges":"Task: act.enterProphylaxis"},{"name":"act-anaphylaxis-alert","slot":"patient-banner-tags-slot","component":"anaphylaxisAlert","privileges":["Get Encounters","Get Observations"]},{"name":"act-patient-status-flags","slot":"patient-banner-tags-slot","component":"patientStatusFlags","privileges":["App: act.statusFlags","Get Encounters","Get Observations"]},{"name":"act-inr-status-flag","slot":"patient-banner-tags-slot","component":"inrStatusFlag","privileges":["App: act.statusFlags","Get Encounters","Get Observations"]},{"name":"act-allergies-pill","slot":"patient-banner-tags-slot","component":"allergiesPill","privileges":["Get Encounters","Get Observations"]},{"name":"act-clinical-flags","slot":"patient-banner-tags-slot","component":"clinicalFlags","privileges":["Get Encounters","Get Observations"]},{"name":"act-prophylaxis-dashboard-link","component":"prophylaxisPageDashboardLink","meta":{"slot":"act-prophylaxis-dashboard-slot","path":"act-prophylaxis","title":"Prophylaxis","icon":"omrs-icon-medication"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-prophylaxis-dashboard","slot":"act-prophylaxis-dashboard-slot","component":"prophylaxisPageDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-research-dashboard-link","component":"researchPageDashboardLink","meta":{"slot":"act-research-dashboard-slot","path":"act-research","title":"Research participation","icon":"omrs-icon-microscope"},"privileges":"App: act.studies"},{"name":"act-research-dashboard","slot":"act-research-dashboard-slot","component":"researchPageDashboard","meta":{"fullWidth":true},"privileges":"App: act.studies"},{"name":"act-consultations-dashboard-link","component":"consultationsDashboardLink","meta":{"slot":"act-consultations-dashboard-slot","path":"act-consultations","title":"Consultation visits","icon":"omrs-icon-calendar-heat-map"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-consultations-dashboard","slot":"act-consultations-dashboard-slot","component":"consultationsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-medications-dashboard-link","component":"medicationsDashboardLink","meta":{"slot":"act-medications-dashboard-slot","path":"act-medications","title":"Medications","icon":"omrs-icon-medication"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-medications-dashboard","slot":"act-medications-dashboard-slot","component":"medicationsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-inr-reviews-dashboard-link","component":"inrReviewsDashboardLink","meta":{"slot":"act-inr-reviews-dashboard-slot","path":"act-inr-reviews","title":"INR reviews","icon":"omrs-icon-chart-average"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-inr-reviews-dashboard","slot":"act-inr-reviews-dashboard-slot","component":"inrReviewsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-consultation-card","slot":"patient-chart-summary-dashboard-slot","component":"consultationCard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-inr-card","slot":"patient-chart-summary-dashboard-slot","component":"inrCard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-clinics-banner","slot":"patient-banner-bottom-slot","component":"clinicsBanner","privileges":["Get People"]},{"name":"act-medications-card","slot":"patient-chart-summary-dashboard-slot","component":"medicationsCard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-update-patient-status","slot":"patient-actions-slot","component":"updatePatientStatusButton","displayExpression":"session.user.privileges.some((privilege) => ['Edit Patient Programs', 'Edit People'].includes(privilege.display)) || session.user.roles.some((role) => role.display === 'System Developer')"},{"name":"act-clinicians-only-note","component":"cliniciansOnlyNote","privileges":["Get Patients"]},{"name":"act-cardiac-tests-dashboard-link","component":"cardiacTestsDashboardLink","meta":{"slot":"act-cardiac-tests-dashboard-slot","path":"act-cardiac-tests","title":"Cardiac tests","icon":"omrs-icon-activity"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-cardiac-tests-dashboard","slot":"act-cardiac-tests-dashboard-slot","component":"cardiacTestsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-next-steps-card","slot":"patient-chart-summary-dashboard-slot","component":"nextStepsCard","order":-1,"meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations","Add Encounters"]},{"name":"act-prophylaxis-card","slot":"patient-chart-summary-dashboard-slot","component":"prophylaxisCard","order":0,"meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]}],"workspaceGroups2":[{"name":"act-waiting-list","scopePattern":"/home/act-waiting-list"},{"name":"act-screen-positive","scopePattern":"/home/act-screen-positive"},{"name":"act-clinics","scopePattern":"^/home/act-clinics"},{"name":"act-studies","scopePattern":"^/home/act-studies"},{"name":"act-users","scopePattern":"^/home/act-users"},{"name":"act-dashboard","scopePattern":"^/home/act-dashboard"}],"workspaceWindows2":[{"name":"act-waiting-list-form-entry","group":"act-waiting-list","width":"extra-wide","canMaximize":true},{"name":"act-screen-positive-form-entry","group":"act-screen-positive","width":"extra-wide","canMaximize":true},{"name":"act-cardiac-test-form-entry","group":"patient-chart","width":"extra-wide","canMaximize":true},{"name":"act-update-patient-status","group":"patient-chart"},{"name":"act-update-prophylaxis","group":"patient-chart"},{"name":"act-inr-monitoring","group":"patient-chart"},{"name":"act-inr-form-entry","group":"patient-chart","width":"extra-wide","canMaximize":true},{"name":"act-vitals-form","group":"patient-chart","width":"wider"},{"name":"act-research-form","group":"patient-chart","width":"narrow"},{"name":"act-clinics-form","group":"act-clinics","width":"narrow"},{"name":"act-studies-form","group":"act-studies","width":"narrow"},{"name":"act-users-form","group":"act-users","width":"wider"},{"name":"act-reset-password","group":"act-users","width":"narrow"},{"name":"act-dashboard-export","group":"act-dashboard","width":"narrow"}],"workspaces2":[{"name":"rhd-flag-gaps-workspace","component":"flagGapsWorkspace","window":"patient-chart-clinical-forms"},{"name":"act-waiting-list-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"act-waiting-list-form-entry"},{"name":"act-screen-positive-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"act-screen-positive-form-entry"},{"name":"act-cardiac-test-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"act-cardiac-test-form-entry"},{"name":"act-vitals-form-workspace","component":"@openmrs/esm-patient-vitals-app#vitalsBiometricsFormWorkspace","window":"act-vitals-form"},{"name":"act-update-patient-status-workspace","component":"updatePatientStatusWorkspace","window":"act-update-patient-status"},{"name":"act-update-prophylaxis-workspace","component":"updateProphylaxisWorkspace","window":"act-update-prophylaxis"},{"name":"act-inr-edit-workspace","component":"inrEditWorkspace","window":"act-inr-monitoring"},{"name":"act-inr-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#patientFormEntryWorkspace","window":"act-inr-form-entry"},{"name":"act-enrollment-workspace","component":"enrollmentWorkspace","window":"act-research-form"},{"name":"act-clinic-form-workspace","component":"clinicFormWorkspace","window":"act-clinics-form"},{"name":"act-study-form-workspace","component":"studyFormWorkspace","window":"act-studies-form"},{"name":"act-user-form-workspace","component":"userFormWorkspace","window":"act-users-form"},{"name":"act-reset-password-workspace","component":"resetPasswordWorkspace","window":"act-reset-password"},{"name":"act-dashboard-export-workspace","component":"dashboardExportWorkspace","window":"act-dashboard-export"}],"version":"1.0.1-pre.523"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.40.0","actcore":">=1.0.0-0","cohort":">=3.7.3","reportingrest":">=2.0.0","patientflags":">=3.0.10"},"extensions":[{"name":"act-home-dashboard-link","slot":"homepage-dashboard-slot","component":"actHomeDashboardLink","meta":{"name":"act-home","slot":"rhd-home-dashboard-slot","title":"actHome"},"privileges":"App: act.home"},{"name":"act-home-dashboard","slot":"rhd-home-dashboard-slot","component":"actHomeDashboard","privileges":"App: act.home"},{"name":"act-home-quick-actions","slot":"rhd-home-widgets-slot","component":"actHomeQuickActions","order":1,"privileges":"App: act.home"},{"name":"act-home-record-bpg","slot":"act-home-quick-actions-slot","component":"recordBpgQuickAction","order":1,"privileges":"Add Encounters","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-record-oral","slot":"act-home-quick-actions-slot","component":"recordOralQuickAction","order":2,"privileges":"Add Encounters","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-register-patient","slot":"act-home-quick-actions-slot","component":"registerPatientQuickAction","order":3,"privileges":"Add Patients"},{"name":"act-home-enter-prophylaxis","slot":"act-home-quick-actions-slot","component":"enterProphylaxisQuickAction","order":4,"privileges":["Add Encounters","App: act.registry"],"displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-find-patient","slot":"act-home-quick-actions-slot","component":"findPatientQuickAction","order":5,"privileges":"Get Patients"},{"name":"act-home-due-for-prophylaxis","slot":"rhd-home-widgets-slot","component":"dueForProphylaxisWidget","order":2,"privileges":"App: act.dueList","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-worklists","slot":"rhd-home-widgets-slot","component":"actHomeWorklists","order":4,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-worklists-beside-cascade","slot":"rhd-home-widgets-slot","component":"actHomeWorklists","order":4,"privileges":"App: act.worklists","displayExpression":"session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-overdue-consultation","slot":"rhd-home-widgets-slot","component":"actHomeOverdueConsultation","order":5,"privileges":"App: act.registry","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-home-care-cascade","slot":"rhd-home-widgets-slot","component":"actHomeCareCascade","order":6,"privileges":"App: act.registry"},{"name":"act-registry-dashboard-link","slot":"homepage-dashboard-slot","component":"registryDashboardLink","meta":{"name":"act-registry","slot":"rhd-registry-dashboard-slot","title":"registry"},"privileges":"App: act.registry"},{"name":"act-registry-dashboard","slot":"rhd-registry-dashboard-slot","component":"registryDashboard","privileges":"App: act.registry"},{"name":"act-worklists-dashboard-link","slot":"homepage-dashboard-slot","component":"worklistsDashboardLink","meta":{"name":"act-worklists","slot":"rhd-worklists-dashboard-slot","title":"worklists"},"privileges":"App: act.worklists"},{"name":"act-worklists-dashboard","slot":"rhd-worklists-dashboard-slot","component":"worklistsDashboard","privileges":"App: act.worklists"},{"name":"act-worklist-due-for-prophylaxis","slot":"act-worklists-slot","component":"dueForProphylaxisWorklist","order":1,"privileges":"App: act.worklists"},{"name":"act-worklist-confirmatory-echo","slot":"act-worklists-slot","component":"confirmatoryEchoWorklist","order":2,"privileges":"App: act.worklists"},{"name":"act-worklist-cardiology-follow-up","slot":"act-worklists-slot","component":"flagWorklist","order":3,"privileges":"App: act.worklists"},{"name":"act-worklist-lost-to-follow-up","slot":"act-worklists-slot","component":"flagWorklist","order":4,"privileges":"App: act.worklists"},{"name":"act-worklist-post-procedural-follow-up","slot":"act-worklists-slot","component":"flagWorklist","order":5,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-pregnancy-outcome","slot":"act-worklists-slot","component":"flagWorklist","order":6,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-inr-review","slot":"act-worklists-slot","component":"flagWorklist","order":7,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-referred-to-clinician","slot":"act-worklists-slot","component":"flagWorklist","order":8,"privileges":"App: act.worklists","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-worklist-waiting-list","slot":"act-worklists-slot","component":"waitingListWorklist","order":9,"privileges":"App: act.waitingList","displayExpression":"!session.user.roles.some((role) => role.display === 'Organizational: ACT Community Clinician')"},{"name":"act-waiting-list-dashboard-link","slot":"homepage-dashboard-slot","component":"waitingListDashboardLink","meta":{"name":"act-waiting-list","slot":"rhd-waiting-list-dashboard-slot","title":"waitingList"},"privileges":"App: act.waitingList"},{"name":"act-waiting-list-dashboard","slot":"rhd-waiting-list-dashboard-slot","component":"waitingListDashboard","privileges":"App: act.waitingList"},{"name":"act-screen-positive-dashboard-link","slot":"homepage-dashboard-slot","component":"screenPositiveDashboardLink","meta":{"name":"act-screen-positive","slot":"rhd-screen-positive-dashboard-slot","title":"screenPositive"},"privileges":"App: act.screenPositive"},{"name":"act-screen-positive-dashboard","slot":"rhd-screen-positive-dashboard-slot","component":"screenPositiveDashboard","privileges":"App: act.screenPositive"},{"name":"act-dashboard-link","slot":"homepage-dashboard-slot","component":"dashboardLink","meta":{"name":"act-dashboard","slot":"act-dashboard-slot","title":"dashboard"},"privileges":"App: act.dashboard"},{"name":"act-dashboard","slot":"act-dashboard-slot","component":"dashboard","privileges":"App: act.dashboard"},{"name":"act-run-charts-dashboard-link","slot":"homepage-dashboard-slot","component":"runChartsDashboardLink","meta":{"name":"act-run-charts","slot":"act-run-charts-dashboard-slot","title":"runCharts"},"privileges":"App: act.dashboard"},{"name":"act-run-charts-dashboard","slot":"act-run-charts-dashboard-slot","component":"runChartsDashboard","privileges":"App: act.dashboard"},{"name":"act-reports-dashboard-link","slot":"homepage-dashboard-slot","component":"reportsDashboardLink","meta":{"name":"act-reports","slot":"act-reports-dashboard-slot","title":"reports"},"privileges":"App: act.reports"},{"name":"act-reports-dashboard","slot":"act-reports-dashboard-slot","component":"reportsDashboard","privileges":"App: act.reports"},{"name":"act-report-dashboard-link","slot":"homepage-dashboard-slot","component":"reportViewDashboardLink","meta":{"name":"act-report","slot":"act-report-dashboard-slot","title":"reports"},"privileges":"App: act.reports"},{"name":"act-report-dashboard","slot":"act-report-dashboard-slot","component":"reportViewDashboard","privileges":"App: act.reports"},{"name":"act-facility-reports-dashboard-link","slot":"homepage-dashboard-slot","component":"facilityReportsDashboardLink","meta":{"name":"act-facility-reports","slot":"act-facility-reports-dashboard-slot","title":"facilityReports"},"privileges":"App: act.dataClerk"},{"name":"act-facility-reports-dashboard","slot":"act-facility-reports-dashboard-slot","component":"facilityReportsDashboard","privileges":"App: act.dataClerk"},{"name":"act-instance-admin-dashboard-link","slot":"homepage-dashboard-slot","component":"instanceAdminDashboardLink","meta":{"name":"act-instance-admin","slot":"act-instance-admin-dashboard-slot","title":"home"},"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-dashboard","slot":"act-instance-admin-dashboard-slot","component":"instanceAdminDashboard","privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-quick-actions","slot":"act-instance-admin-widgets-slot","component":"instanceAdminQuickActions","order":1,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-kpis","slot":"act-instance-admin-widgets-slot","component":"instanceAdminKpis","order":2,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-forms-and-sites","slot":"act-instance-admin-quick-actions-slot","component":"formsAndSitesQuickAction","order":1,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-role-permissions","slot":"act-instance-admin-quick-actions-slot","component":"rolePermissionsQuickAction","order":2,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-research-participation","slot":"act-instance-admin-quick-actions-slot","component":"researchParticipationQuickAction","order":3,"privileges":"App: act.instanceAdmin"},{"name":"act-instance-admin-nav","slot":"homepage-dashboard-slot","component":"instanceAdminNav","privileges":"App: act.instanceAdmin"},{"name":"act-users-dashboard-link","slot":"homepage-dashboard-slot","component":"usersDashboardLink","meta":{"name":"act-users","slot":"act-users-dashboard-slot","title":"usersAndRoles"},"privileges":"Edit Users"},{"name":"act-users-dashboard","slot":"act-users-dashboard-slot","component":"usersDashboard","privileges":"Edit Users"},{"name":"act-clinics-dashboard-link","slot":"homepage-dashboard-slot","component":"clinicsDashboardLink","meta":{"name":"act-clinics","slot":"act-clinics-dashboard-slot","title":"clinics"},"privileges":"Manage Locations"},{"name":"act-clinics-dashboard","slot":"act-clinics-dashboard-slot","component":"clinicsDashboard","privileges":"Manage Locations"},{"name":"act-role-permissions-dashboard-link","slot":"homepage-dashboard-slot","component":"rolePermissionsDashboardLink","meta":{"name":"act-role-permissions","slot":"act-role-permissions-dashboard-slot","title":"rolePermissions"},"privileges":"Manage Roles"},{"name":"act-role-permissions-dashboard","slot":"act-role-permissions-dashboard-slot","component":"rolePermissionsDashboard","privileges":"Manage Roles"},{"name":"act-studies-dashboard-link","slot":"homepage-dashboard-slot","component":"studiesDashboardLink","meta":{"name":"act-studies","slot":"act-studies-dashboard-slot","title":"studies"},"privileges":"App: act.studies"},{"name":"act-studies-dashboard","slot":"act-studies-dashboard-slot","component":"studiesDashboard","privileges":"App: act.studies"},{"name":"act-refresh-flags-dashboard-link","slot":"homepage-dashboard-slot","component":"refreshFlagsDashboardLink","meta":{"name":"act-refresh-flags","slot":"act-refresh-flags-dashboard-slot","title":"flagsAndAdherence"},"privileges":"Task: act.refreshFlags"},{"name":"act-refresh-flags-dashboard","slot":"act-refresh-flags-dashboard-slot","component":"refreshFlagsDashboard","privileges":"Task: act.refreshFlags"},{"name":"act-screening-counts-dashboard-link","slot":"homepage-dashboard-slot","component":"screeningCountsDashboardLink","meta":{"name":"act-screening-counts","slot":"act-screening-counts-dashboard-slot","title":"screeningCounts"},"privileges":"App: act.screeningCounts"},{"name":"act-screening-counts-dashboard","slot":"act-screening-counts-dashboard-slot","component":"screeningCountsDashboard","privileges":"App: act.screeningCounts"},{"name":"act-download-dashboard-link","slot":"homepage-dashboard-slot","component":"downloadDashboardLink","meta":{"name":"act-download","slot":"act-download-dashboard-slot","title":"downloadData"}},{"name":"act-download-dashboard","slot":"act-download-dashboard-slot","component":"downloadDashboard"},{"name":"act-logs-dashboard-link","slot":"homepage-dashboard-slot","component":"logsDashboardLink","meta":{"name":"act-logs","slot":"act-logs-dashboard-slot","title":"logs"},"displayExpression":"session.user.privileges.some((privilege) => ['View Audit Logs', 'View Read Audit Logs', 'View Security Audit Logs'].includes(privilege.display)) || session.user.roles.some((role) => role.display === 'System Developer')"},{"name":"act-logs-dashboard","slot":"act-logs-dashboard-slot","component":"logsDashboard","displayExpression":"session.user.privileges.some((privilege) => ['View Audit Logs', 'View Read Audit Logs', 'View Security Audit Logs'].includes(privilege.display)) || session.user.roles.some((role) => role.display === 'System Developer')"},{"name":"act-community-home-dashboard-link","slot":"homepage-dashboard-slot","component":"communityHomeDashboardLink","meta":{"name":"act-community-home","slot":"act-community-home-dashboard-slot","title":"home"},"privileges":"App: act.communityHome"},{"name":"act-community-home-dashboard","slot":"act-community-home-dashboard-slot","component":"communityHomeDashboard","privileges":"App: act.communityHome"},{"name":"act-community-home-quick-actions","slot":"act-community-home-widgets-slot","component":"communityHomeQuickActions","order":1,"privileges":"App: act.communityHome"},{"name":"act-community-home-record-bpg","slot":"act-community-home-quick-actions-slot","component":"recordBpgQuickAction","order":1,"privileges":"Add Encounters"},{"name":"act-community-home-record-oral","slot":"act-community-home-quick-actions-slot","component":"recordOralQuickAction","order":2,"privileges":"Add Encounters"},{"name":"act-community-home-register-patient","slot":"act-community-home-quick-actions-slot","component":"registerPatientQuickAction","order":3,"privileges":"Add Patients"},{"name":"act-community-home-find-patient","slot":"act-community-home-quick-actions-slot","component":"findPatientQuickAction","order":4,"privileges":"Get Patients"},{"name":"act-community-home-facility-report","slot":"act-community-home-quick-actions-slot","component":"facilityReportQuickAction","order":5,"privileges":"App: act.dataClerk"},{"name":"act-enter-prophylaxis-dashboard-link","slot":"homepage-dashboard-slot","component":"patientsOnProphylaxisDashboardLink","meta":{"name":"act-enter-prophylaxis","slot":"act-enter-prophylaxis-dashboard-slot","title":"enterProphylaxis"},"privileges":"App: act.registry"},{"name":"act-enter-prophylaxis-dashboard","slot":"act-enter-prophylaxis-dashboard-slot","component":"patientsOnProphylaxisDashboard","privileges":"App: act.registry"},{"name":"act-due-for-prophylaxis-dashboard-link","slot":"homepage-dashboard-slot","component":"dueForProphylaxisDashboardLink","meta":{"name":"act-due-for-prophylaxis","slot":"rhd-due-for-prophylaxis-dashboard-slot","title":"dueForProphylaxis"},"privileges":"App: act.dueList"},{"name":"act-admin-nav","slot":"homepage-dashboard-slot","component":"adminNav"},{"name":"act-due-for-prophylaxis-dashboard","slot":"rhd-due-for-prophylaxis-dashboard-slot","component":"dueForProphylaxisDashboard","privileges":"App: act.dueList"},{"name":"act-due-for-prophylaxis-widget","slot":"act-community-home-widgets-slot","component":"dueForProphylaxisWidget","order":2,"privileges":"App: act.dueList"},{"name":"act-back-to-act-link","slot":"top-of-all-patient-dashboards-slot","component":"backToActLink","privileges":"Get Patients"},{"name":"act-session-timeout","slot":"top-nav-actions-slot","component":"sessionTimeout","order":99},{"name":"act-help-contact","slot":"help-menu-slot","component":"actHelpContact"},{"name":"act-help-docs","slot":"help-menu-slot","component":"actHelpDocs"},{"name":"act-scan-patient-card-dashboard-link","slot":"homepage-dashboard-slot","component":"scanPatientCardDashboardLink","meta":{"name":"act-scan-patient-card","slot":"act-scan-patient-card-dashboard-slot","title":"scanPatientCard"},"privileges":"Task: act.enterProphylaxis"},{"name":"act-scan-patient-card-dashboard","slot":"act-scan-patient-card-dashboard-slot","component":"scanPatientCardDashboard","privileges":"Task: act.enterProphylaxis"},{"name":"act-anaphylaxis-alert","slot":"patient-banner-tags-slot","component":"anaphylaxisAlert","privileges":["Get Encounters","Get Observations"]},{"name":"act-patient-status-flags","slot":"patient-banner-tags-slot","component":"patientStatusFlags","privileges":["App: act.statusFlags","Get Encounters","Get Observations"]},{"name":"act-inr-status-flag","slot":"patient-banner-tags-slot","component":"inrStatusFlag","privileges":["App: act.statusFlags","Get Encounters","Get Observations"]},{"name":"act-allergies-pill","slot":"patient-banner-tags-slot","component":"allergiesPill","privileges":["Get Encounters","Get Observations"]},{"name":"act-clinical-flags","slot":"patient-banner-tags-slot","component":"clinicalFlags","privileges":["Get Encounters","Get Observations"]},{"name":"act-prophylaxis-dashboard-link","component":"prophylaxisPageDashboardLink","meta":{"slot":"act-prophylaxis-dashboard-slot","path":"act-prophylaxis","title":"Prophylaxis","icon":"omrs-icon-medication"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-prophylaxis-dashboard","slot":"act-prophylaxis-dashboard-slot","component":"prophylaxisPageDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-research-dashboard-link","component":"researchPageDashboardLink","meta":{"slot":"act-research-dashboard-slot","path":"act-research","title":"Research participation","icon":"omrs-icon-microscope"},"privileges":"App: act.studies"},{"name":"act-research-dashboard","slot":"act-research-dashboard-slot","component":"researchPageDashboard","meta":{"fullWidth":true},"privileges":"App: act.studies"},{"name":"act-consultations-dashboard-link","component":"consultationsDashboardLink","meta":{"slot":"act-consultations-dashboard-slot","path":"act-consultations","title":"Consultation visits","icon":"omrs-icon-calendar-heat-map"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-consultations-dashboard","slot":"act-consultations-dashboard-slot","component":"consultationsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-medications-dashboard-link","component":"medicationsDashboardLink","meta":{"slot":"act-medications-dashboard-slot","path":"act-medications","title":"Medications","icon":"omrs-icon-medication"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-medications-dashboard","slot":"act-medications-dashboard-slot","component":"medicationsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-inr-reviews-dashboard-link","component":"inrReviewsDashboardLink","meta":{"slot":"act-inr-reviews-dashboard-slot","path":"act-inr-reviews","title":"INR reviews","icon":"omrs-icon-chart-average"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-inr-reviews-dashboard","slot":"act-inr-reviews-dashboard-slot","component":"inrReviewsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-consultation-card","slot":"patient-chart-summary-dashboard-slot","component":"consultationCard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-inr-card","slot":"patient-chart-summary-dashboard-slot","component":"inrCard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-clinics-banner","slot":"patient-banner-bottom-slot","component":"clinicsBanner","privileges":["Get People"]},{"name":"act-medications-card","slot":"patient-chart-summary-dashboard-slot","component":"medicationsCard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-update-patient-status","slot":"patient-actions-slot","component":"updatePatientStatusButton","displayExpression":"session.user.privileges.some((privilege) => ['Edit Patient Programs', 'Edit People'].includes(privilege.display)) || session.user.roles.some((role) => role.display === 'System Developer')"},{"name":"act-clinicians-only-note","component":"cliniciansOnlyNote","privileges":["Get Patients"]},{"name":"act-cardiac-tests-dashboard-link","component":"cardiacTestsDashboardLink","meta":{"slot":"act-cardiac-tests-dashboard-slot","path":"act-cardiac-tests","title":"Cardiac tests","icon":"omrs-icon-activity"},"privileges":["Get Encounters","Get Observations"]},{"name":"act-cardiac-tests-dashboard","slot":"act-cardiac-tests-dashboard-slot","component":"cardiacTestsDashboard","meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]},{"name":"act-next-steps-card","slot":"patient-chart-summary-dashboard-slot","component":"nextStepsCard","order":-1,"meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations","Add Encounters"]},{"name":"act-prophylaxis-card","slot":"patient-chart-summary-dashboard-slot","component":"prophylaxisCard","order":0,"meta":{"fullWidth":true},"privileges":["Get Encounters","Get Observations"]}],"workspaceGroups2":[{"name":"act-waiting-list","scopePattern":"/home/act-waiting-list"},{"name":"act-screen-positive","scopePattern":"/home/act-screen-positive"},{"name":"act-clinics","scopePattern":"^/home/act-clinics"},{"name":"act-studies","scopePattern":"^/home/act-studies"},{"name":"act-users","scopePattern":"^/home/act-users"},{"name":"act-dashboard","scopePattern":"^/home/act-dashboard"}],"workspaceWindows2":[{"name":"act-waiting-list-form-entry","group":"act-waiting-list","width":"extra-wide","canMaximize":true},{"name":"act-screen-positive-form-entry","group":"act-screen-positive","width":"extra-wide","canMaximize":true},{"name":"act-cardiac-test-form-entry","group":"patient-chart","width":"extra-wide","canMaximize":true},{"name":"act-update-patient-status","group":"patient-chart"},{"name":"act-update-prophylaxis","group":"patient-chart"},{"name":"act-inr-monitoring","group":"patient-chart"},{"name":"act-inr-form-entry","group":"patient-chart","width":"extra-wide","canMaximize":true},{"name":"act-vitals-form","group":"patient-chart","width":"wider"},{"name":"act-research-form","group":"patient-chart","width":"narrow"},{"name":"act-clinics-form","group":"act-clinics","width":"narrow"},{"name":"act-studies-form","group":"act-studies","width":"narrow"},{"name":"act-users-form","group":"act-users","width":"wider"},{"name":"act-reset-password","group":"act-users","width":"narrow"},{"name":"act-dashboard-export","group":"act-dashboard","width":"narrow"}],"workspaces2":[{"name":"rhd-flag-gaps-workspace","component":"flagGapsWorkspace","window":"patient-chart-clinical-forms"},{"name":"act-waiting-list-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"act-waiting-list-form-entry"},{"name":"act-screen-positive-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"act-screen-positive-form-entry"},{"name":"act-cardiac-test-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#exportedPatientFormEntryWorkspace","window":"act-cardiac-test-form-entry"},{"name":"act-vitals-form-workspace","component":"@openmrs/esm-patient-vitals-app#vitalsBiometricsFormWorkspace","window":"act-vitals-form"},{"name":"act-update-patient-status-workspace","component":"updatePatientStatusWorkspace","window":"act-update-patient-status"},{"name":"act-update-prophylaxis-workspace","component":"updateProphylaxisWorkspace","window":"act-update-prophylaxis"},{"name":"act-inr-edit-workspace","component":"inrEditWorkspace","window":"act-inr-monitoring"},{"name":"act-inr-form-entry-workspace","component":"@openmrs/esm-patient-forms-app#patientFormEntryWorkspace","window":"act-inr-form-entry"},{"name":"act-enrollment-workspace","component":"enrollmentWorkspace","window":"act-research-form"},{"name":"act-clinic-form-workspace","component":"clinicFormWorkspace","window":"act-clinics-form"},{"name":"act-study-form-workspace","component":"studyFormWorkspace","window":"act-studies-form"},{"name":"act-user-form-workspace","component":"userFormWorkspace","window":"act-users-form"},{"name":"act-reset-password-workspace","component":"resetPasswordWorkspace","window":"act-reset-password"},{"name":"act-dashboard-export-workspace","component":"dashboardExportWorkspace","window":"act-dashboard-export"}],"version":"1.0.1-pre.527"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@act-registry/esm-act-app",
3
- "version": "1.0.1-pre.523",
3
+ "version": "1.0.1-pre.527",
4
4
  "license": "MPL-2.0",
5
5
  "description": "ACT 3.0 screens for OpenMRS 3: ACT home, the registry and the missing data behind RHD flags",
6
6
  "browser": "dist/act-registry-esm-act-app.js",
@@ -26,8 +26,8 @@ const group = (regimen: object, started: string | null, stopped?: string, uuid?:
26
26
  concepts.prescription,
27
27
  null,
28
28
  [
29
- obs(concepts.prescription, regimen),
30
- ...(started ? [obs(concepts.dateStarted, started)] : []),
29
+ obs(concepts.prescription, regimen, undefined, uuid && `${uuid}-regimen`),
30
+ ...(started ? [obs(concepts.dateStarted, started, undefined, uuid && `${uuid}-started`)] : []),
31
31
  ...(stopped ? [obs(concepts.dateStopped, stopped), obs(concepts.reasonStopped, coded('r', 'Allergy'))] : []),
32
32
  ],
33
33
  uuid,
@@ -410,7 +410,12 @@ describe('savePrescription', () => {
410
410
  expect(calls()).toHaveLength(1);
411
411
  const [[url, body]] = calls() as [[string, { obs: Array<{ uuid?: string; voided?: boolean }> }]];
412
412
  expect(url).toBe(`${restBaseUrl}/encounter/today`);
413
- expect(body.obs.filter((one) => one.voided).map((one) => one.uuid)).toEqual(['main', 'duration-obs']);
413
+ expect(body.obs.filter((one) => one.voided).map((one) => one.uuid)).toEqual([
414
+ 'main',
415
+ 'main-regimen',
416
+ 'main-started',
417
+ 'duration-obs',
418
+ ]);
414
419
  expect(body.obs.filter((one) => !one.voided)).toHaveLength(3);
415
420
  });
416
421
 
@@ -428,7 +433,14 @@ describe('savePrescription', () => {
428
433
  await savePrescription({ ...common, current, main: 'main', today: '2026-10-25' });
429
434
 
430
435
  const [[, body]] = calls() as [[string, { obs: Array<Record<string, unknown>> }]];
431
- expect(body.obs.filter((one) => one.voided).map((one) => one.uuid)).toEqual(['old', 'main']);
436
+ expect(body.obs.filter((one) => one.voided).map((one) => one.uuid)).toEqual([
437
+ 'old',
438
+ 'old-regimen',
439
+ 'old-started',
440
+ 'main',
441
+ 'main-regimen',
442
+ 'main-started',
443
+ ]);
432
444
  const added = body.obs.filter((one) => !one.voided && one.concept === concepts.prescription);
433
445
  expect(
434
446
  added.map((one) => {
@@ -26,6 +26,8 @@ export interface PrescriptionGroup {
26
26
  uuid: string;
27
27
  regimen: Answer;
28
28
  started: string;
29
+ /** The group's answers, which a void of the group row leaves live. */
30
+ memberUuids: Array<string>;
29
31
  }
30
32
 
31
33
  export interface CurrentPrescription {
@@ -90,7 +92,14 @@ export function currentPrescriptionOf(
90
92
  const started = memberOf(group, concepts.dateStarted)?.value;
91
93
  const stopped = memberOf(group, concepts.dateStopped);
92
94
  return started && !stopped && regimen.uuid !== concepts.none
93
- ? [{ uuid: group.uuid, regimen, started: dayOf(started) }]
95
+ ? [
96
+ {
97
+ uuid: group.uuid,
98
+ regimen,
99
+ started: dayOf(started),
100
+ memberUuids: (group.groupMembers ?? []).map((member) => member.uuid),
101
+ },
102
+ ]
94
103
  : [];
95
104
  })
96
105
  .sort((a, b) => a.started.localeCompare(b.started));
@@ -233,8 +242,8 @@ export function prescriptionPayload(
233
242
 
234
243
  /**
235
244
  * Saves an update as a new encounter of the update type. ACT Core keeps only a day's first encounter, so one recorded
236
- * today is edited in place instead: its groups in force and duration voided, and the new answers added with the carried
237
- * groups in one request, so no earlier start is lost.
245
+ * today is edited in place instead: its groups in force, their answers and the duration voided, and the new answers
246
+ * added with the carried groups in one request, so no earlier start is lost.
238
247
  */
239
248
  export async function savePrescription({
240
249
  patient,
@@ -258,7 +267,10 @@ export async function savePrescription({
258
267
  const obs = prescriptionPayload(patient, concepts, current?.groups ?? [], edit, main);
259
268
  const headers = { 'Content-Type': 'application/json' };
260
269
  if (current && current.day === today) {
261
- const voided = [...current.groups.map((one) => one.uuid), ...(current.duration ? [current.duration.obsUuid] : [])];
270
+ const voided = [
271
+ ...current.groups.flatMap((one) => [one.uuid, ...one.memberUuids]),
272
+ ...(current.duration ? [current.duration.obsUuid] : []),
273
+ ];
262
274
  await openmrsFetch(`${restBaseUrl}/encounter/${current.encounter.uuid}`, {
263
275
  method: 'POST',
264
276
  headers,
@@ -189,7 +189,12 @@ describe('UpdateProphylaxisWorkspace', () => {
189
189
  await waitFor(() => expect(posts()).toHaveLength(1));
190
190
  const [[url, body]] = posts();
191
191
  expect(url).toBe(`${restBaseUrl}/encounter/todays`);
192
- expect(body.obs.filter((one) => one.voided).map((one) => one.uuid)).toEqual(['todays-group', 'todays-duration']);
192
+ expect(body.obs.filter((one) => one.voided).map((one) => one.uuid)).toEqual([
193
+ 'todays-group',
194
+ 'm1',
195
+ 'm2',
196
+ 'todays-duration',
197
+ ]);
193
198
  });
194
199
 
195
200
  it('offers a patient with no prescription a first one, and no stop', async () => {