@openmrs/esm-ward-app 9.2.1-pre.6735 → 9.2.1-pre.6740
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/dist/1716.js +2 -0
- package/dist/1716.js.map +1 -0
- package/dist/1899.js +1 -1
- package/dist/1899.js.map +1 -1
- package/dist/2557.js +1 -1
- package/dist/2728.js +1 -1
- package/dist/281.js +2 -0
- package/dist/281.js.map +1 -0
- package/dist/283.js +1 -1
- package/dist/3365.js +1 -1
- package/dist/363.js +1 -0
- package/dist/363.js.map +1 -0
- package/dist/3737.js +1 -1
- package/dist/5670.js +1 -1
- package/dist/5885.js +1 -1
- package/dist/7179.js +1 -1
- package/dist/7512.js +1 -1
- package/dist/7512.js.map +1 -1
- package/dist/7524.js +1 -1
- package/dist/7661.js +1 -1
- package/dist/8610.js +1 -1
- package/dist/8622.js +1 -1
- package/dist/8622.js.map +1 -1
- package/dist/9045.js +1 -1
- package/dist/9775.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-ward-app.js +1 -1
- package/dist/openmrs-esm-ward-app.js.buildmanifest.json +110 -110
- package/dist/openmrs-esm-ward-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/dist/1058.js +0 -2
- package/dist/1058.js.map +0 -1
- package/dist/2810.js +0 -2
- package/dist/2810.js.map +0 -1
- package/dist/9294.js +0 -1
- package/dist/9294.js.map +0 -1
- /package/dist/{2810.js.LICENSE.txt → 1716.js.LICENSE.txt} +0 -0
- /package/dist/{1058.js.LICENSE.txt → 281.js.LICENSE.txt} +0 -0
package/dist/5670.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[5670],{3026:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)<0},4782:(e,t,r)=>{const n=r(40663);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},5717:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)>0},5950:(e,t,r)=>{const n=r(57705);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},6995:(e,t,r)=>{const n=r(57705),o=r(16632);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new n(s,r)))}),s}},7416:(e,t,r)=>{const n=r(59980),o=r(94568),s=r(5717),i=r(36102),a=r(3026),c=r(95419);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return s(e,r,l);case">=":return i(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},7566:(e,t,r)=>{const n=r(5950);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},15934:(e,t,r)=>{const n=r(79413);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(86891).SEMVER_SPEC_VERSION,SemVer:r(57705),compareIdentifiers:r(83610).compareIdentifiers,rcompareIdentifiers:r(83610).rcompareIdentifiers,parse:r(40663),valid:r(4782),clean:r(26669),inc:r(29384),diff:r(36609),major:r(41529),minor:r(75581),patch:r(29558),prerelease:r(69168),compare:r(82463),rcompare:r(82367),compareLoose:r(75488),compareBuild:r(5950),sort:r(52142),rsort:r(7566),gt:r(5717),lt:r(3026),eq:r(59980),neq:r(94568),gte:r(36102),lte:r(95419),cmp:r(7416),coerce:r(22059),Comparator:r(43473),Range:r(16632),satisfies:r(94753),toComparators:r(31752),maxSatisfying:r(6995),minSatisfying:r(99481),minVersion:r(65796),validRange:r(54623),outside:r(20650),gtr:r(89414),ltr:r(86859),intersects:r(25995),simplifyRange:r(46290),subset:r(80483)}},16632:(e,t,r)=>{class n{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=this.options.loose;e=e.trim();const r=t?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];e=e.replace(r,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),s("comparator trim",e,a[c.COMPARATORTRIM]),e=(e=(e=e.replace(a[c.TILDETRIM],p)).replace(a[c.CARETTRIM],u)).split(/\s+/).join(" ");const n=t?a[c.COMPARATORLOOSE]:a[c.COMPARATOR];return e.split(" ").map(e=>h(e,this.options)).join(" ").split(/\s+/).map(e=>S(e,this.options)).filter(this.options.loose?e=>!!e.match(n):()=>!0).map(e=>new o(e,this.options))}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>f(r,t)&&e.set.some(e=>f(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=r(43473),s=r(29306),i=r(57705),{re:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:p,caretTrimReplace:u}=r(79413),f=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},h=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=d(e,t),s("tildes",e),e=$(e,t),s("xrange",e),e=y(e,t),s("stars",e),e),m=e=>!e||"x"===e.toLowerCase()||"*"===e,d=(e,t)=>e.trim().split(/\s+/).map(e=>g(e,t)).join(" "),g=(e,t)=>{const r=t.loose?a[c.TILDELOOSE]:a[c.TILDE];return e.replace(r,(t,r,n,o,i)=>{let a;return s("tilde",e,t,r,n,o,i),m(r)?a="":m(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:m(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(s("replaceTilde pr",i),a=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,s("tilde return",a),a})},E=(e,t)=>e.trim().split(/\s+/).map(e=>I(e,t)).join(" "),I=(e,t)=>{s("caret",e,t);const r=t.loose?a[c.CARETLOOSE]:a[c.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let c;return s("caret",e,t,r,o,i,a),m(r)?c="":m(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:m(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(s("replaceCaret pr",a),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(s("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),s("caret return",c),c})},$=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>O(e,t)).join(" ")),O=(e,t)=>{e=e.trim();const r=t.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return e.replace(r,(r,n,o,i,a,c)=>{s("xRange",e,r,n,o,i,a,c);const l=m(o),p=l||m(i),u=p||m(a),f=u;return"="===n&&f&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(p&&(i=0),a=0,">"===n?(n=">=",p?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===n&&(n="<",p?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${a}${c}`):p?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:u&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),s("xRange return",r),r})},y=(e,t)=>(s("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),S=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),A=e=>(t,r,n,o,s,i,a,c,l,p,u,f,h)=>`${r=m(n)?"":m(o)?`>=${n}.0.0${e?"-0":""}`:m(s)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=m(l)?"":m(p)?`<${+l+1}.0.0-0`:m(u)?`<${l}.${+p+1}.0-0`:f?`<=${l}.${p}.${u}-${f}`:e?`<${l}.${p}.${+u+1}-0`:`<=${c}`}`.trim(),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(s(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},20650:(e,t,r)=>{const n=r(57705),o=r(43473),{ANY:s}=o,i=r(16632),a=r(94753),c=r(5717),l=r(3026),p=r(95419),u=r(36102);e.exports=(e,t,r,f)=>{let h,m,d,g,E;switch(e=new n(e,f),t=new i(t,f),r){case">":h=c,m=p,d=l,g=">",E=">=";break;case"<":h=l,m=u,d=c,g="<",E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let i=null,a=null;if(n.forEach(e=>{e.semver===s&&(e=new o(">=0.0.0")),i=i||e,a=a||e,h(e.semver,i.semver,f)?i=e:d(e.semver,a.semver,f)&&(a=e)}),i.operator===g||i.operator===E)return!1;if((!a.operator||a.operator===g)&&m(e,a.semver))return!1;if(a.operator===E&&d(e,a.semver))return!1}return!0}},22059:(e,t,r)=>{const n=r(57705),o=r(40663),{re:s,t:i}=r(79413);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=s[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),s[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[i.COERCERTL].lastIndex=-1}else r=e.match(s[i.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},25995:(e,t,r)=>{const n=r(16632);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},26669:(e,t,r)=>{const n=r(40663);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},29306:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},29384:(e,t,r)=>{const n=r(57705);e.exports=(e,t,r,o)=>{"string"==typeof r&&(o=r,r=void 0);try{return new n(e,r).inc(t,o).version}catch(e){return null}}},29558:(e,t,r)=>{const n=r(57705);e.exports=(e,t)=>new n(e,t).patch},31752:(e,t,r)=>{const n=r(16632);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},36102:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)>=0},36609:(e,t,r)=>{const n=r(40663),o=r(59980);e.exports=(e,t)=>{if(o(e,t))return null;{const r=n(e),o=n(t),s=r.prerelease.length||o.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==o[e])return i+e;return a}}},40663:(e,t,r)=>{const{MAX_LENGTH:n}=r(86891),{re:o,t:s}=r(79413),i=r(57705);e.exports=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?o[s.LOOSE]:o[s.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},41529:(e,t,r)=>{const n=r(57705);e.exports=(e,t)=>new n(e,t).major},43473:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?s[i.COMPARATORLOOSE]:s[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),c=a(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=a(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||s&&i||c||l}}e.exports=o;const{re:s,t:i}=r(79413),a=r(7416),c=r(29306),l=r(57705),p=r(16632)},46290:(e,t,r)=>{const n=r(94753),o=r(82463);e.exports=(e,t,r)=>{const s=[];let i=null,a=null;const c=e.sort((e,t)=>o(e,t,r));for(const e of c)n(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null);i&&s.push([i,null]);const l=[];for(const[e,t]of s)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const p=l.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return p.length<u.length?p:t}},52142:(e,t,r)=>{const n=r(5950);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},54623:(e,t,r)=>{const n=r(16632);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},55670:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ActionMenu:()=>G.WyE,ActionMenuButton:()=>G.EDM,ActionMenuButton2:()=>G.Wjo,ActionableNotificationComponent:()=>G.drd,ActivityIcon:()=>G.npY,AddIcon:()=>G.REV,AllergiesIcon:()=>G.UgN,AppointmentsAltPictogram:()=>G.MnZ,AppointmentsPictogram:()=>G.B1u,ArrowDownIcon:()=>G.ZLN,ArrowLeftIcon:()=>G.A60,ArrowRightIcon:()=>G.flY,ArrowUpIcon:()=>G.Kpk,Assessment1Pictogram:()=>G.IHy,Assessment2Pictogram:()=>G.$iy,AttachmentIcon:()=>G.PtA,BabyIcon:()=>G.qYP,BloodBankPictogram:()=>G.nvs,Breakpoint:()=>G.EA,CalendarHeatMapIcon:()=>G.mmM,CalendarIcon:()=>G.CTc,CardiologyPictogram:()=>G.uU$,CaretDownIcon:()=>G.bDP,CaretLeftIcon:()=>G.eCO,CaretRightIcon:()=>G.JJd,CaretUpIcon:()=>G.SwV,ChartAverageIcon:()=>G.ZHE,CheckmarkFilledIcon:()=>G.FtQ,CheckmarkOutlineIcon:()=>G.pm$,ChemistryIcon:()=>G.W4t,ChevronDownIcon:()=>G.D3D,ChevronLeftIcon:()=>G.YJP,ChevronRightIcon:()=>G.vKP,ChevronUpIcon:()=>G.Mtm,CloseFilledIcon:()=>G.oCk,CloseIcon:()=>G.USm,CloseOutlineIcon:()=>G.Wdn,ComponentContext:()=>$.zq,ConditionsIcon:()=>G.ci3,ConfigurableLink:()=>$.i_,CtScanPictogram:()=>G.DeE,CustomOverflowMenu:()=>G.TQT,DashboardExtension:()=>G.cJN,DentistryPictogram:()=>G.TNY,DiagnosisTags:()=>G.Fzf,DocumentAttachmentIcon:()=>G.Ce6,DocumentIcon:()=>G.pyG,DownloadIcon:()=>G.s3U,DrugOrderIcon:()=>G.uqj,EditIcon:()=>G.qUP,EmergencyDepartmentPictogram:()=>G.sgv,ErrorState:()=>G.W5n,EventScheduleIcon:()=>G.XaH,EventsIcon:()=>G.Jc,Extension:()=>$.YY,ExtensionSlot:()=>$.W3,FacilityPictogram:()=>G.ECF,GenderFemaleIcon:()=>G.XB2,GenderMaleIcon:()=>G.szA,GenderOtherIcon:()=>G.hXZ,GenderUnknownIcon:()=>G.x1U,GenericOrderTypeIcon:()=>G.naI,GeriatricsPictogram:()=>G.SQq,GroupAccessIcon:()=>G.Pyy,GroupIcon:()=>G.nFg,GynaecologyPictogram:()=>G.owH,HomePictogram:()=>G.KKH,HospitalBedIcon:()=>G.jMM,Icon:()=>G.Int,ImageMedicalIcon:()=>G.Ix5,InPatientPictogram:()=>G.thS,InformationFilledIcon:()=>G._e_,InformationIcon:()=>G.uQc,InformationSquareIcon:()=>G.ZrL,InventoryManagementIcon:()=>G.vFG,LabOrderIcon:()=>G.hi6,LaboratoryPictogram:()=>G.ehn,Labs2Pictogram:()=>G.rpF,LeftNavMenu:()=>G.Ojh,ListCheckedIcon:()=>G.Rt$,LocationIcon:()=>G.BT6,LocationPicker:()=>G.MTs,MaterialOrderIcon:()=>G.zZ0,MaximizeIcon:()=>G._Xm,MaybeIcon:()=>G.oy0,MaybePictogram:()=>G.bmf,MedicationIcon:()=>G.Fnj,MessageQueueIcon:()=>G.uFu,MicroscopeIcon:()=>G.u4h,MoneyIcon:()=>G.yBj,MotherIcon:()=>G.XEq,MovementIcon:()=>G.lyJ,Notification:()=>G.Eg0,ObstetricsPictogram:()=>G.Bk2,OpenmrsAppContext:()=>$.p6,OpenmrsDatePicker:()=>G.rnR,OpenmrsDateRangePicker:()=>G.Yem,OpenmrsFetchError:()=>n.$f,OverflowMenuHorizontalIcon:()=>G.rv3,OverflowMenuVerticalIcon:()=>G.Rnm,PageHeader:()=>G.zYs,PageHeaderContent:()=>G.gpz,PasswordIcon:()=>G.BGy,PatientBannerActionsMenu:()=>G.k1U,PatientBannerContactDetails:()=>G.m5G,PatientBannerPatientIdentifiers:()=>G.XIV,PatientBannerPatientInfo:()=>G.zvf,PatientBannerToggleContactDetailsButton:()=>G.Qgu,PatientListsPictogram:()=>G.$2H,PatientPhoto:()=>G.yV,PatientSearchPictogram:()=>G.cxq,PatientsPictogram:()=>G.X25,PaymentsDeskPictogram:()=>G.dNG,PedestrianFamilyIcon:()=>G.PPo,PenIcon:()=>G.rZj,Pharmacy2Pictogram:()=>G.Q92,PharmacyPictogram:()=>G.w21,Pictogram:()=>G.bF1,PrinterIcon:()=>G.wwY,ProcedureOrderIcon:()=>G.H0x,ProgramsIcon:()=>G.lq$,RadiologyIcon:()=>G.SA3,ReferralOrderIcon:()=>G.tCH,RegistrationPictogram:()=>G.et7,RenderIfValueIsTruthy:()=>$.fS,RenewIcon:()=>G.JTN,ReportIcon:()=>G.cQD,ResetIcon:()=>G.NAP,ResponsiveWrapper:()=>G.KFv,SaveIcon:()=>G.LPu,SearchIcon:()=>G.WIv,ServiceQueuesPictogram:()=>G.Y21,SettingsIcon:()=>G.Zes,ShoppingCartAddItemIcon:()=>G.Uve,ShoppingCartArrowDownIcon:()=>G.Lfm,ShoppingCartIcon:()=>G.aJF,Snackbar:()=>G.qb_,StickyNoteAddIcon:()=>G.OC$,StockManagementPictogram:()=>G.q__,SwitcherIcon:()=>G.RFy,SyringeIcon:()=>G.hZg,TableIcon:()=>G.KbA,TableOfContentsIcon:()=>G.pYV,TimeIcon:()=>G.b1c,Toast:()=>G.y8,ToolsIcon:()=>G.dwU,TransferPictogram:()=>G.SKX,TranslateIcon:()=>G.SwB,TrashCanIcon:()=>G.EJV,TreeViewAltIcon:()=>G.MO4,TriagePictogram:()=>G.XHu,Type:()=>o.ZU,UserAvatarIcon:()=>G.yDT,UserFollowIcon:()=>G.osL,UserHasAccess:()=>$.qw,UserIcon:()=>G.nys,UserXrayIcon:()=>G.feL,ViewIcon:()=>G.tCQ,ViewOffIcon:()=>G.Oi_,VisitMode:()=>i.dx,VisitStatus:()=>i.Cj,WarningIcon:()=>G.id,Workspace2:()=>G.ozP,WorkspaceContainer:()=>G.XvC,WorkspaceNotification:()=>G.tMf,XrayPictogram:()=>G.B2u,activateOfflineCapability:()=>I.nr,addRoutesOverride:()=>P,age:()=>U.K,attach:()=>m.K0,attachmentUrl:()=>i.Zu,backendDependencies:()=>n.QE,beginEditSynchronizationItem:()=>I.FO,canAccessStorage:()=>L,canBeginEditSynchronizationItemsOfType:()=>I.xN,canCloseWorkspaceWithoutPrompting:()=>G.SvQ,cancelPrompt:()=>G.zlb,changeWorkspaceContext:()=>G.JKc,checkStatus:()=>m.dO,checkStatusFor:()=>m.Ef,cleanupObsoleteFeatureFlags:()=>d.D3,clearConfigErrors:()=>o.Nh,clearCurrentUser:()=>n.g$,clearHistory:()=>E.g4,closeAllWorkspaces:()=>G.G_3,closeWorkspace:()=>G.MJ8,closeWorkspaceGroup2:()=>G.biy,compile:()=>c.wE,configExtensionStore:()=>o.hs,configInternalStore:()=>o.Rt,convertToLocaleCalendar:()=>W.d4,createAttachment:()=>i.cD,createErrorHandler:()=>a.J,createGlobalStore:()=>M.Zd,createUseStore:()=>$.rr,defaultVisitCustomRepresentation:()=>i.Rb,defineConfigSchema:()=>o.T0,defineExtensionConfigSchema:()=>o.ks,deleteAttachmentPermanently:()=>i.SY,deleteSynchronizationItem:()=>I.lY,detach:()=>m.Yo,detachAll:()=>m.No,dispatchActionableNotificationShown:()=>g.LQ,dispatchConnectivityChanged:()=>g.Yt,dispatchNotificationShown:()=>g.FI,dispatchPrecacheStaticDependencies:()=>g.pc,dispatchSnackbarShown:()=>g.$3,dispatchToastShown:()=>g.Vt,displayName:()=>V.QC,esmStyleGuideSchema:()=>G.uQD,evaluate:()=>c._3,evaluateAsBoolean:()=>c.eb,evaluateAsBooleanAsync:()=>c.Gz,evaluateAsNumber:()=>c.dX,evaluateAsNumberAsync:()=>c.$F,evaluateAsType:()=>c.Sj,evaluateAsTypeAsync:()=>c.uN,evaluateAsync:()=>c.mv,extractVariableNames:()=>u,featureFlagsStore:()=>d.jX,fetchCurrentPatient:()=>i.hG,fhirBaseUrl:()=>n.IU,filterBreadcrumbs:()=>E.D_,finishRegisteringAllApps:()=>N,formatDate:()=>W.Yq,formatDatetime:()=>W.Rt,formatDuration:()=>W.a3,formatPartialDate:()=>W.LW,formatPatientName:()=>V.Qr,formatTime:()=>W.fU,formattedName:()=>V.qK,generateOfflineUuid:()=>I.sA,getAssignedExtensions:()=>m.zx,getAsyncExtensionLifecycle:()=>$.sc,getAsyncLifecycle:()=>$.ns,getAttachmentByUuid:()=>i.KU,getAttachments:()=>i.Bv,getBreadcrumbs:()=>E.lz,getBreadcrumbsFor:()=>E.qh,getConfig:()=>o.zj,getConfigStore:()=>o.IS,getCoreTranslation:()=>j.V,getCurrentImportMap:()=>s.Ln,getCurrentOfflineMode:()=>I.wJ,getCurrentUser:()=>n.HW,getDefaultCalendar:()=>W.a7,getDefaultsFromConfigSchema:()=>_,getDynamicOfflineDataEntries:()=>I.FE,getDynamicOfflineDataEntriesFor:()=>I.WA,getDynamicOfflineDataHandlers:()=>I.qb,getExtensionConfig:()=>o.UY,getExtensionConfigFromExtensionSlotStore:()=>o.g$,getExtensionConfigFromStore:()=>o.P0,getExtensionInternalStore:()=>m.a9,getExtensionNameFromId:()=>m.ES,getExtensionRegistration:()=>m.Tj,getExtensionRegistrationFrom:()=>m.xg,getExtensionSlotConfig:()=>o.G9,getExtensionSlotConfigFromStore:()=>o.vu,getExtensionSlotsConfigStore:()=>o.YP,getExtensionStore:()=>m.zF,getExtensionsConfigStore:()=>o.GI,getFeatureFlag:()=>d.jj,getFhirServerPaginationHandlers:()=>$.mw,getFullSynchronizationItems:()=>I.C$,getFullSynchronizationItemsFor:()=>I.xc,getGlobalStore:()=>M.jf,getGroupByWindowName:()=>m.o1,getHistory:()=>E.JK,getLifecycle:()=>$.JK,getLocale:()=>B.J,getLocations:()=>i.Vs,getLoggedInUser:()=>n.xC,getModalRegistration:()=>m.Fg,getOfflineDb:()=>I.e,getOfflinePatientDataStore:()=>I.WK,getOfflineSynchronizationStore:()=>I.LM,getOmrsServiceWorker:()=>I.Rs,getOpenedWindowIndexByWorkspace:()=>m.YX,getPatientName:()=>V.Vp,getPromptBeforeClosingFcn:()=>G.OeE,getSessionLocation:()=>n.Kx,getSessionStore:()=>n.EW,getStartedVisit:()=>i.DK,getSyncLifecycle:()=>$.g9,getSynchronizationItem:()=>I.Gp,getSynchronizationItems:()=>I.pb,getSynchronizationItemsFor:()=>I.Io,getTranslationOverrides:()=>o.td,getVisitStore:()=>i.BX,getVisitTypes:()=>i.Pu,getVisitsForPatient:()=>i.BR,getWindowByWorkspaceName:()=>m.Ml,getWorkspaceGroupRegistration:()=>m.Q_,getWorkspaceGroupStore:()=>G.e_T,getWorkspaceRegistration:()=>m.Xb,getWorkspaceStore:()=>G.XzH,goBackInHistory:()=>E.tA,iconIds:()=>G.kE8,implementerToolsConfigStore:()=>o.tN,importDynamic:()=>s.rL,inRange:()=>o.r4,integrateBreakpoints:()=>G.WMK,interpolateString:()=>E.zl,interpolateUrl:()=>E.JG,isDesktop:()=>$.xl,isDevEnabled:()=>n.L7,isOfflineUuid:()=>I.bO,isOmrsDateStrict:()=>W.hl,isOmrsDateToday:()=>W.vU,isOnline:()=>H.s,isOpenmrsAppRoutes:()=>F,isOpenmrsRoutes:()=>k,isUrl:()=>o.gU,isUrlWithTemplateParameters:()=>o.qG,isVersionSatisfied:()=>J,jsep:()=>c.PQ,launchWorkspace:()=>G.TC2,launchWorkspace2:()=>G.pTx,launchWorkspaceGroup:()=>G.aN0,launchWorkspaceGroup2:()=>G.GYk,leftNavStore:()=>m.Gp,loadLifeCycles:()=>S.o,localStorageRoutesPrefix:()=>O,makeUrl:()=>n.Gm,messageOmrsServiceWorker:()=>I.ms,navigate:()=>E.oo,navigateAndLaunchWorkspace:()=>G.Fmw,offlineUuidPrefix:()=>I.jU,omrsOfflineCachingStrategyHttpHeaderName:()=>I.JC,omrsOfflineResponseBodyHttpHeaderName:()=>I.UH,omrsOfflineResponseStatusHttpHeaderName:()=>I.Gj,oneOf:()=>o.yL,openmrsComponentDecorator:()=>$.F7,openmrsFetch:()=>n.lo,openmrsObservableFetch:()=>n.ut,parseDate:()=>W._U,pictogramIds:()=>G.vJW,preloadImport:()=>s.zC,processConfig:()=>o.mq,promptBeforeClosing:()=>G.F3N,promptForClosingWorkspaces:()=>G.hLN,provide:()=>o.Gt,putDynamicOfflineData:()=>I.yD,putDynamicOfflineDataFor:()=>I.ff,queueSynchronizationItem:()=>I.Zr,queueSynchronizationItemFor:()=>I.Iq,refetchCurrentUser:()=>n.yH,registerApp:()=>w,registerBreadcrumb:()=>E.vf,registerBreadcrumbs:()=>E.MY,registerDefaultCalendar:()=>W.XE,registerExtension:()=>m.VK,registerExtensionSlot:()=>m.FY,registerFeatureFlag:()=>d.uA,registerGlobalStore:()=>M.CE,registerModal:()=>m.Ju,registerModuleLoad:()=>o.kl,registerModuleWithConfigSystem:()=>o.FL,registerOfflinePatientHandler:()=>I.KG,registerOmrsServiceWorker:()=>I.sZ,registerTranslationNamespace:()=>o.GV,registerWorkspace:()=>m.pm,registerWorkspaceGroup:()=>m.io,registerWorkspaceGroups2:()=>m.rD,registerWorkspaceWindows2:()=>m.Qb,registerWorkspaces2:()=>m.Uh,removeDynamicOfflineData:()=>I.NU,removeDynamicOfflineDataFor:()=>I.wn,removeRoutesOverride:()=>C,renderActionableNotifications:()=>G.zfR,renderExtension:()=>m.wG,renderInlineNotifications:()=>G.CU$,renderLoadingSpinner:()=>G.uWG,renderSnackbars:()=>G.ZLm,renderToasts:()=>G.f1b,renderWorkspaceWindowsAndMenu:()=>G.jCr,reportError:()=>a.N,reset:()=>m.cL,resetAllRoutesOverrides:()=>x,resetWorkspaceStore:()=>G._1W,restBaseUrl:()=>n.Jj,retry:()=>Q,runSynchronization:()=>I.AO,saveVisit:()=>i.Ds,selectPreferredName:()=>V.VO,sessionEndpoint:()=>n.Ct,sessionStore:()=>n.eA,setCurrentOfflineMode:()=>I.Og,setCurrentVisit:()=>i.NH,setFeatureFlag:()=>d.B4,setLeftNav:()=>m.Vx,setSessionLocation:()=>n.Gp,setUserLanguage:()=>n.E4,setUserProperties:()=>n.Fi,setupApiModule:()=>n.Y0,setupDynamicOfflineDataHandler:()=>I.iD,setupHistory:()=>E.Wh,setupModals:()=>G.EPe,setupOfflineSync:()=>I.cy,shallowEqual:()=>X.b,showActionableNotification:()=>G.ZyP,showModal:()=>G.toY,showNotification:()=>G.Dsh,showSnackbar:()=>G.tdF,showToast:()=>G.P0c,showWorkspacePrompts:()=>G.ctS,slugify:()=>s.Yv,subscribeActionableNotificationShown:()=>g.bK,subscribeConnectivity:()=>g.sT,subscribeConnectivityChanged:()=>g.gj,subscribeNotificationShown:()=>g.bJ,subscribePrecacheStaticDependencies:()=>g.ff,subscribeSnackbarShown:()=>g.ls,subscribeTo:()=>M.i7,subscribeToFeatureFlag:()=>d.sM,subscribeToastShown:()=>g.dX,syncAllDynamicOfflineData:()=>I.Td,syncDynamicOfflineData:()=>I.u1,syncOfflinePatientData:()=>I.sK,temporaryConfigStore:()=>o.H,toDateObjectStrict:()=>W.kQ,toLocationObject:()=>i.E$,toOmrsIsoString:()=>W.l0,toVisitTypeObject:()=>i.Qx,translateFrom:()=>j.t,tryRegisterExtension:()=>A,unsetLeftNav:()=>m.sr,updateInternalExtensionStore:()=>m.DQ,updateVisit:()=>i.xL,updateWorkspaceWindowState:()=>G._RD,useAbortController:()=>$.Ie,useAppContext:()=>$.Us,useAssignedExtensionIds:()=>$.Tt,useAssignedExtensions:()=>$.CX,useAttachments:()=>$._9,useBodyScrollLock:()=>$.yJ,useConfig:()=>$.UK,useConnectedExtensions:()=>$.zD,useConnectivity:()=>$.Fx,useDebounce:()=>$.d7,useDefineAppContext:()=>$.jn,useEmrConfiguration:()=>$.E4,useExtensionInternalStore:()=>$.$B,useExtensionSlot:()=>$.br,useExtensionSlotMeta:()=>$.Wq,useExtensionSlotStore:()=>$.uL,useExtensionStore:()=>$.Gz,useFeatureFlag:()=>$.u,useFhirFetchAll:()=>$.oq,useFhirInfinite:()=>$.vL,useFhirPagination:()=>$.to,useForceUpdate:()=>$.CH,useLayoutType:()=>$.qv,useLeftNav:()=>$.if,useLeftNavStore:()=>$.TA,useLocations:()=>$.kH,useOnClickOutside:()=>$.Wr,useOnVisible:()=>$.Jm,useOpenmrsFetchAll:()=>$.Bf,useOpenmrsInfinite:()=>$.iy,useOpenmrsPagination:()=>$.Ed,useOpenmrsSWR:()=>$.M3,usePagination:()=>$.WQ,usePatient:()=>$.tQ,usePatientPhoto:()=>G.R9n,usePrimaryIdentifierCode:()=>$.wJ,useRenderableExtensions:()=>$.oU,useSession:()=>$.wV,useStore:()=>$.Pj,useStoreWithActions:()=>$.mQ,useVisit:()=>$.fq,useVisitContextStore:()=>$.xH,useVisitTypes:()=>$.wr,useWorkspace2Store:()=>G.AkA,useWorkspaces:()=>G.CH0,userHasAccess:()=>n.st,validator:()=>o.Nc,validators:()=>o.y$,workspace2Store:()=>m.J_,workspaceStore:()=>G.x9q});var n=r(20367),o=r(95819),s=r(47709),i=r(9166),a=r(60937),c=r(87440),l=r(19758),p=r(89987);function u(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;const t=(r=p.f,{globals:{...r},isLocalExpression:!1,variables:new Set});var r;return f("string"==typeof e?(0,l.A)(e):e,t),[...t.variables]}function f(e,t){switch(e.type){case"UnaryExpression":return function(e,t){return f(e.argument,t)}(e,t);case"BinaryExpression":return function(e,t){return[f(e.left,t),f(e.right,t)].filter(Boolean)}(e,t);case"ConditionalExpression":return function(e,t){return[f(e.consequent,t),f(e.test,t),f(e.alternate,t)].filter(Boolean)}(e,t);case"CallExpression":return function(e,t){const r=f(e.callee,t);return e.arguments?.map(h(t)),r}(e,t);case"ArrowFunctionExpression":return function(e,t){const r={...t};r.isLocalExpression=!0;const n=e.params?.map(h(r))??[],o=f(e.body,r)??[];if(o&&Array.isArray(o))for(const e of o)n.includes(e)||t.variables.add(e)}(e,t);case"MemberExpression":return function(e,t){f(e.object,t);const r={...t};r.isLocalExpression=!0,f(e.property,r)}(e,t);case"ArrayExpression":return function(e,t){e.elements?.map(h(t))}(e,t);case"SequenceExpression":return function(e,t){e.expressions?.map(h(t))}(e,t);case"NewExpression":return function(e,t){e.arguments?.map(h(t))}(e,t);case"Literal":case"TemplateElement":return;case"Identifier":return function(e,t){if(!(e.name in t.globals)){if(t.isLocalExpression)return e.name;t.variables.add(e.name)}}(e,t);case"TemplateLiteral":return function(e,t){e.expressions?.map(h(t)),e.quasis?.map(h(t))}(e,t);default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function h(e){return function(t){return null===t?null:f(t,e)}}var m=r(27354),d=r(76110),g=r(23184),E=r(11305),I=r(39644),$=r(58379);const O="openmrs-routes:";var y=r(22244),S=r(55226);function A(e,t){const r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nextension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${r} from ${e} declares both a 'slots' property and\na 'slot' property. Only the 'slots' property will be honored.`);const n=t.slots?t.slots:t.slot?[t.slot]:[];if(t.component){(0,m.VK)({name:r,load:()=>(0,S.o)(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag});for(const e of n)(0,m.K0)(e,r)}else console.error(`The extension ${r} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the extension definition.`,t)}const R=[];function v(e){if(Array.isArray(e)){const t=e.map(v);return e=>t.some(t=>t(e))}return"string"==typeof e?(0,y.fz)(window.getOpenmrsSpaBase()+e):e instanceof RegExp?t=>function(e,t){return e.test(t.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,t):()=>e}function w(e,t){if(e&&t&&"object"==typeof t){(0,o.FL)(e);const n=t.extensions??[],s=t.modals??[],i=t.workspaces??[],a=t.workspaceGroups??[],c=t.featureFlags??[],l=t.workspaceGroups2??[],p=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?R.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?A(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),s.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){const r=t.name;r?t.component?(0,m.Ju)({name:r,moduleName:e,load:()=>(0,S.o)(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nmodal definition.`,t)}(e,t):console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){const r=t.name;if(!r)return void console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.`,t);const n=t.title;if(n)if(t.component){(0,m.pm)({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>(0,S.o)(e,t.component)});for(const e of t.groups||[])(0,m.io)({name:e,members:[r]})}else console.error(`The workspace ${r} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the workspace definition.`,t);else console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.\nTo fix this, ensure that you define the "title" field inside the workspace definition.`,t)}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),a.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")?function(e,t){const r=t.name;r?(0,m.io)({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.`,t)}(e,t):console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),r=l,(0,m.rD)(r),function(e,t){(0,m.Qb)(e,t)}(e,p),function(e,t){(0,m.Uh)(e,t)}(e,u),c.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"flagName")?function(e,t){t.flagName?t.label?t.description?(0,d.uA)(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the feature flag definition.`,t)}(e,t):console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}var r}function N(){R.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of R){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);const r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",s=document.getElementById(o),i=`single-spa-application:${n}`;if(!s)throw new Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);{const e=document.createElement("div");e.id=i,s?.appendChild(e)}T(n,t)}}function T(e,t){const r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);if(!1===r)return void console.warn('A registered page definition is missing a route and thus cannot be registered.\nTo fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.',e);if(!t.component)return void console.warn('A registered page definition is missing a component and thus cannot be registered.\nTo fix this, ensure that you define the "component" field inside the page definition.',e);const n=function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??1)||!navigator.onLine&&r)&&!(n&&!(0,d.jj)(n))&&e(o):e}(v(r),t);(0,y.AG)(e,()=>(0,S.o)(t.appName,t.component),n)}function L(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}const b=L();function P(e,t){if(b){if("string"==typeof t){if(t.startsWith("http"))return D(e,t);try{const r=JSON.parse(t);if(F(r))return D(e,r);console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t)}catch(t){console.error(`Could not add routes override for ${e}: `,t)}}else{if(t instanceof URL)return D(e,t.toString());if(F(t))return D(e,t)}console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t)}}function C(e){if(!b)return;const t=O+e;localStorage.removeItem(t)}function x(){if(!b)return;const e=window.localStorage;for(let t=0;t<e.length;t++){const r=e.key(t);r?.startsWith(O)&&e.removeItem(r)}}function D(e,t){const r=O+e;localStorage.setItem(r,JSON.stringify(t))}function F(e){if(e&&"object"==typeof e){const t=Object.prototype.hasOwnProperty,r=e;return!!((!t.call(e,"pages")||Boolean(r.pages)&&Array.isArray(r.pages))&&(!t.call(e,"extensions")||Boolean(r.extensions)&&Array.isArray(r.extensions))&&(!t.call(e,"workspaces")||Boolean(r.workspaces)&&Array.isArray(r.workspaces))&&(!t.call(e,"modals")||Boolean(r.modals)&&Array.isArray(r.modals)))}return!1}function k(e){if(e&&"object"==typeof e){const t=e;return Object.entries(t).every(([e,t])=>"string"==typeof e&&F(t))}return!1}var M=r(22337),G=r(22810),j=r(7661),U=r(2545),W=r(57699),B=r(4617),H=r(52834),V=r(59591),X=r(27388);function _(e){let t={};for(let r of Object.keys(e))if(z(e[r])&&e[r].hasOwnProperty("_default"))t[r]=e[r]._default;else{if(r.startsWith("_"))continue;z(e[r])?t[r]=_(e[r]):t[r]=e[r]}return t}function z(e){return!!e&&e.constructor===Object}var q=r(15934);function Y(e){const[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function J(e,t){const r=function(e){const t=e.indexOf("-");return t>=0?`${Y(e.slice(0,t))}-${e.slice(t+1)}`:Y(e)}(t);return q.satisfies(r,e,{includePrerelease:!0})}async function Q(e,t={}){let{shouldRetry:r,getDelay:n,onError:o}=t;r=r??(e=>function(e){return e<=5}(e)),n=n??(e=>function(e,t,r=!1){const n=r?e+1:e;return 1e3*Math.pow(2,n)}(e));let s,i=0;do{try{return await K(n(i)),await e()}catch(e){o?.(e,i),s=e}}while(r(i++));throw s}async function K(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},57705:(e,t,r)=>{const n=r(29306),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(86891),{re:i,t:a}=r(79413),{compareIdentifiers:c}=r(83610);class l{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},59980:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>0===n(e,t,r)},65796:(e,t,r)=>{const n=r(57705),o=r(16632),s=r(5717);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t)e.set[t].forEach(e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!s(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}});return r&&e.test(r)?r:null}},69168:(e,t,r)=>{const n=r(40663);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},75488:(e,t,r)=>{const n=r(82463);e.exports=(e,t)=>n(e,t,!0)},75581:(e,t,r)=>{const n=r(57705);e.exports=(e,t)=>new n(e,t).minor},79413:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(86891),o=r(29306),s=(t=e.exports={}).re=[],i=t.src=[],a=t.t={};let c=0;const l=(e,t,r)=>{const n=c++;o(n,t),a[e]=n,i[n]=t,s[n]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),l("FULL",`^${i[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),l("LOOSE",`^${i[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),l("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",i[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},80483:(e,t,r)=>{const n=r(16632),{ANY:o}=r(43473),s=r(94753),i=r(82463),a=(e,t,r)=>{if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;const n=new Set;let a,p,u,f,h,m,d;for(const t of e)">"===t.operator||">="===t.operator?a=c(a,t,r):"<"===t.operator||"<="===t.operator?p=l(p,t,r):n.add(t.semver);if(n.size>1)return null;if(a&&p){if(u=i(a.semver,p.semver,r),u>0)return null;if(0===u&&(">="!==a.operator||"<="!==p.operator))return null}for(const e of n){if(a&&!s(e,String(a),r))return null;if(p&&!s(e,String(p),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}for(const e of t){if(d=d||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,a)if(">"===e.operator||">="===e.operator){if(f=c(a,e,r),f===e)return!1}else if(">="===a.operator&&!s(a.semver,String(e),r))return!1;if(p)if("<"===e.operator||"<="===e.operator){if(h=l(p,e,r),h===e)return!1}else if("<="===p.operator&&!s(p.semver,String(e),r))return!1;if(!e.operator&&(p||a)&&0!==u)return!1}return!(a&&m&&!p&&0!==u||p&&d&&!a&&0!==u)},c=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r)=>{e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=a(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},82367:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(t,e,r)},82463:(e,t,r)=>{const n=r(57705);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},83610:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},86859:(e,t,r)=>{const n=r(20650);e.exports=(e,t,r)=>n(e,t,"<",r)},86891:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},89414:(e,t,r)=>{const n=r(20650);e.exports=(e,t,r)=>n(e,t,">",r)},94568:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>0!==n(e,t,r)},94753:(e,t,r)=>{const n=r(16632);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},95419:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)<=0},99481:(e,t,r)=>{const n=r(57705),o=r(16632);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new n(s,r)))}),s}}}]);
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[5670],{3026:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)<0},4782:(e,t,r)=>{const n=r(40663);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},5717:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)>0},5950:(e,t,r)=>{const n=r(57705);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},6995:(e,t,r)=>{const n=r(57705),o=r(16632);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new n(s,r)))}),s}},7416:(e,t,r)=>{const n=r(59980),o=r(94568),s=r(5717),i=r(36102),a=r(3026),c=r(95419);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return s(e,r,l);case">=":return i(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},7566:(e,t,r)=>{const n=r(5950);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},15934:(e,t,r)=>{const n=r(79413);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(86891).SEMVER_SPEC_VERSION,SemVer:r(57705),compareIdentifiers:r(83610).compareIdentifiers,rcompareIdentifiers:r(83610).rcompareIdentifiers,parse:r(40663),valid:r(4782),clean:r(26669),inc:r(29384),diff:r(36609),major:r(41529),minor:r(75581),patch:r(29558),prerelease:r(69168),compare:r(82463),rcompare:r(82367),compareLoose:r(75488),compareBuild:r(5950),sort:r(52142),rsort:r(7566),gt:r(5717),lt:r(3026),eq:r(59980),neq:r(94568),gte:r(36102),lte:r(95419),cmp:r(7416),coerce:r(22059),Comparator:r(43473),Range:r(16632),satisfies:r(94753),toComparators:r(31752),maxSatisfying:r(6995),minSatisfying:r(99481),minVersion:r(65796),validRange:r(54623),outside:r(20650),gtr:r(89414),ltr:r(86859),intersects:r(25995),simplifyRange:r(46290),subset:r(80483)}},16632:(e,t,r)=>{class n{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=this.options.loose;e=e.trim();const r=t?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];e=e.replace(r,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),s("comparator trim",e,a[c.COMPARATORTRIM]),e=(e=(e=e.replace(a[c.TILDETRIM],p)).replace(a[c.CARETTRIM],u)).split(/\s+/).join(" ");const n=t?a[c.COMPARATORLOOSE]:a[c.COMPARATOR];return e.split(" ").map(e=>h(e,this.options)).join(" ").split(/\s+/).map(e=>S(e,this.options)).filter(this.options.loose?e=>!!e.match(n):()=>!0).map(e=>new o(e,this.options))}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>f(r,t)&&e.set.some(e=>f(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=r(43473),s=r(29306),i=r(57705),{re:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:p,caretTrimReplace:u}=r(79413),f=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},h=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=d(e,t),s("tildes",e),e=$(e,t),s("xrange",e),e=y(e,t),s("stars",e),e),m=e=>!e||"x"===e.toLowerCase()||"*"===e,d=(e,t)=>e.trim().split(/\s+/).map(e=>g(e,t)).join(" "),g=(e,t)=>{const r=t.loose?a[c.TILDELOOSE]:a[c.TILDE];return e.replace(r,(t,r,n,o,i)=>{let a;return s("tilde",e,t,r,n,o,i),m(r)?a="":m(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:m(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(s("replaceTilde pr",i),a=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,s("tilde return",a),a})},E=(e,t)=>e.trim().split(/\s+/).map(e=>I(e,t)).join(" "),I=(e,t)=>{s("caret",e,t);const r=t.loose?a[c.CARETLOOSE]:a[c.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let c;return s("caret",e,t,r,o,i,a),m(r)?c="":m(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:m(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(s("replaceCaret pr",a),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(s("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),s("caret return",c),c})},$=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>O(e,t)).join(" ")),O=(e,t)=>{e=e.trim();const r=t.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return e.replace(r,(r,n,o,i,a,c)=>{s("xRange",e,r,n,o,i,a,c);const l=m(o),p=l||m(i),u=p||m(a),f=u;return"="===n&&f&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(p&&(i=0),a=0,">"===n?(n=">=",p?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===n&&(n="<",p?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${a}${c}`):p?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:u&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),s("xRange return",r),r})},y=(e,t)=>(s("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),S=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),A=e=>(t,r,n,o,s,i,a,c,l,p,u,f,h)=>`${r=m(n)?"":m(o)?`>=${n}.0.0${e?"-0":""}`:m(s)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=m(l)?"":m(p)?`<${+l+1}.0.0-0`:m(u)?`<${l}.${+p+1}.0-0`:f?`<=${l}.${p}.${u}-${f}`:e?`<${l}.${p}.${+u+1}-0`:`<=${c}`}`.trim(),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(s(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},20650:(e,t,r)=>{const n=r(57705),o=r(43473),{ANY:s}=o,i=r(16632),a=r(94753),c=r(5717),l=r(3026),p=r(95419),u=r(36102);e.exports=(e,t,r,f)=>{let h,m,d,g,E;switch(e=new n(e,f),t=new i(t,f),r){case">":h=c,m=p,d=l,g=">",E=">=";break;case"<":h=l,m=u,d=c,g="<",E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let i=null,a=null;if(n.forEach(e=>{e.semver===s&&(e=new o(">=0.0.0")),i=i||e,a=a||e,h(e.semver,i.semver,f)?i=e:d(e.semver,a.semver,f)&&(a=e)}),i.operator===g||i.operator===E)return!1;if((!a.operator||a.operator===g)&&m(e,a.semver))return!1;if(a.operator===E&&d(e,a.semver))return!1}return!0}},22059:(e,t,r)=>{const n=r(57705),o=r(40663),{re:s,t:i}=r(79413);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=s[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),s[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[i.COERCERTL].lastIndex=-1}else r=e.match(s[i.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},25995:(e,t,r)=>{const n=r(16632);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},26669:(e,t,r)=>{const n=r(40663);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},29306:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},29384:(e,t,r)=>{const n=r(57705);e.exports=(e,t,r,o)=>{"string"==typeof r&&(o=r,r=void 0);try{return new n(e,r).inc(t,o).version}catch(e){return null}}},29558:(e,t,r)=>{const n=r(57705);e.exports=(e,t)=>new n(e,t).patch},31752:(e,t,r)=>{const n=r(16632);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},36102:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)>=0},36609:(e,t,r)=>{const n=r(40663),o=r(59980);e.exports=(e,t)=>{if(o(e,t))return null;{const r=n(e),o=n(t),s=r.prerelease.length||o.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==o[e])return i+e;return a}}},40663:(e,t,r)=>{const{MAX_LENGTH:n}=r(86891),{re:o,t:s}=r(79413),i=r(57705);e.exports=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?o[s.LOOSE]:o[s.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},41529:(e,t,r)=>{const n=r(57705);e.exports=(e,t)=>new n(e,t).major},43473:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?s[i.COMPARATORLOOSE]:s[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),c=a(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=a(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||s&&i||c||l}}e.exports=o;const{re:s,t:i}=r(79413),a=r(7416),c=r(29306),l=r(57705),p=r(16632)},46290:(e,t,r)=>{const n=r(94753),o=r(82463);e.exports=(e,t,r)=>{const s=[];let i=null,a=null;const c=e.sort((e,t)=>o(e,t,r));for(const e of c)n(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null);i&&s.push([i,null]);const l=[];for(const[e,t]of s)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const p=l.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return p.length<u.length?p:t}},52142:(e,t,r)=>{const n=r(5950);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},54623:(e,t,r)=>{const n=r(16632);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},55670:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ActionMenu:()=>G.WyE,ActionMenuButton:()=>G.EDM,ActionMenuButton2:()=>G.Wjo,ActionableNotificationComponent:()=>G.drd,ActivityIcon:()=>G.npY,AddIcon:()=>G.REV,AllergiesIcon:()=>G.UgN,AppointmentsAltPictogram:()=>G.MnZ,AppointmentsPictogram:()=>G.B1u,ArrowDownIcon:()=>G.ZLN,ArrowLeftIcon:()=>G.A60,ArrowRightIcon:()=>G.flY,ArrowUpIcon:()=>G.Kpk,Assessment1Pictogram:()=>G.IHy,Assessment2Pictogram:()=>G.$iy,AttachmentIcon:()=>G.PtA,BabyIcon:()=>G.qYP,BloodBankPictogram:()=>G.nvs,Breakpoint:()=>G.EA,CalendarHeatMapIcon:()=>G.mmM,CalendarIcon:()=>G.CTc,CardiologyPictogram:()=>G.uU$,CaretDownIcon:()=>G.bDP,CaretLeftIcon:()=>G.eCO,CaretRightIcon:()=>G.JJd,CaretUpIcon:()=>G.SwV,ChartAverageIcon:()=>G.ZHE,CheckmarkFilledIcon:()=>G.FtQ,CheckmarkOutlineIcon:()=>G.pm$,ChemistryIcon:()=>G.W4t,ChevronDownIcon:()=>G.D3D,ChevronLeftIcon:()=>G.YJP,ChevronRightIcon:()=>G.vKP,ChevronUpIcon:()=>G.Mtm,CloseFilledIcon:()=>G.oCk,CloseIcon:()=>G.USm,CloseOutlineIcon:()=>G.Wdn,ComponentContext:()=>$.zq,ConditionsIcon:()=>G.ci3,ConfigurableLink:()=>$.i_,CtScanPictogram:()=>G.DeE,CustomOverflowMenu:()=>G.TQT,DashboardExtension:()=>G.cJN,DentistryPictogram:()=>G.TNY,DiagnosisTags:()=>G.Fzf,DocumentAttachmentIcon:()=>G.Ce6,DocumentIcon:()=>G.pyG,DownloadIcon:()=>G.s3U,DrugOrderIcon:()=>G.uqj,EditIcon:()=>G.qUP,EmergencyDepartmentPictogram:()=>G.sgv,ErrorState:()=>G.W5n,EventScheduleIcon:()=>G.XaH,EventsIcon:()=>G.Jc,Extension:()=>$.YY,ExtensionSlot:()=>$.W3,FacilityPictogram:()=>G.ECF,GenderFemaleIcon:()=>G.XB2,GenderMaleIcon:()=>G.szA,GenderOtherIcon:()=>G.hXZ,GenderUnknownIcon:()=>G.x1U,GenericOrderTypeIcon:()=>G.naI,GeriatricsPictogram:()=>G.SQq,GroupAccessIcon:()=>G.Pyy,GroupIcon:()=>G.nFg,GynaecologyPictogram:()=>G.owH,HomePictogram:()=>G.KKH,HospitalBedIcon:()=>G.jMM,Icon:()=>G.Int,ImageMedicalIcon:()=>G.Ix5,InPatientPictogram:()=>G.thS,InformationFilledIcon:()=>G._e_,InformationIcon:()=>G.uQc,InformationSquareIcon:()=>G.ZrL,InventoryManagementIcon:()=>G.vFG,LabOrderIcon:()=>G.hi6,LaboratoryPictogram:()=>G.ehn,Labs2Pictogram:()=>G.rpF,LeftNavMenu:()=>G.Ojh,ListCheckedIcon:()=>G.Rt$,LocationIcon:()=>G.BT6,LocationPicker:()=>G.MTs,MaterialOrderIcon:()=>G.zZ0,MaximizeIcon:()=>G._Xm,MaybeIcon:()=>G.oy0,MaybePictogram:()=>G.bmf,MedicationIcon:()=>G.Fnj,MessageQueueIcon:()=>G.uFu,MicroscopeIcon:()=>G.u4h,MoneyIcon:()=>G.yBj,MotherIcon:()=>G.XEq,MovementIcon:()=>G.lyJ,Notification:()=>G.Eg0,ObstetricsPictogram:()=>G.Bk2,OpenmrsAppContext:()=>$.p6,OpenmrsDatePicker:()=>G.rnR,OpenmrsDateRangePicker:()=>G.Yem,OpenmrsFetchError:()=>n.$f,OverflowMenuHorizontalIcon:()=>G.rv3,OverflowMenuVerticalIcon:()=>G.Rnm,PageHeader:()=>G.zYs,PageHeaderContent:()=>G.gpz,PasswordIcon:()=>G.BGy,PatientBannerActionsMenu:()=>G.k1U,PatientBannerContactDetails:()=>G.m5G,PatientBannerPatientIdentifiers:()=>G.XIV,PatientBannerPatientInfo:()=>G.zvf,PatientBannerToggleContactDetailsButton:()=>G.Qgu,PatientListsPictogram:()=>G.$2H,PatientPhoto:()=>G.yV,PatientSearchPictogram:()=>G.cxq,PatientsPictogram:()=>G.X25,PaymentsDeskPictogram:()=>G.dNG,PedestrianFamilyIcon:()=>G.PPo,PenIcon:()=>G.rZj,Pharmacy2Pictogram:()=>G.Q92,PharmacyPictogram:()=>G.w21,Pictogram:()=>G.bF1,PrinterIcon:()=>G.wwY,ProcedureOrderIcon:()=>G.H0x,ProgramsIcon:()=>G.lq$,RadiologyIcon:()=>G.SA3,ReferralOrderIcon:()=>G.tCH,RegistrationPictogram:()=>G.et7,RenderIfValueIsTruthy:()=>$.fS,RenewIcon:()=>G.JTN,ReportIcon:()=>G.cQD,ResetIcon:()=>G.NAP,ResponsiveWrapper:()=>G.KFv,SaveIcon:()=>G.LPu,SearchIcon:()=>G.WIv,ServiceQueuesPictogram:()=>G.Y21,SettingsIcon:()=>G.Zes,ShoppingCartAddItemIcon:()=>G.Uve,ShoppingCartArrowDownIcon:()=>G.Lfm,ShoppingCartIcon:()=>G.aJF,Snackbar:()=>G.qb_,StickyNoteAddIcon:()=>G.OC$,StockManagementPictogram:()=>G.q__,SwitcherIcon:()=>G.RFy,SyringeIcon:()=>G.hZg,TableIcon:()=>G.KbA,TableOfContentsIcon:()=>G.pYV,TimeIcon:()=>G.b1c,Toast:()=>G.y8,ToolsIcon:()=>G.dwU,TransferPictogram:()=>G.SKX,TranslateIcon:()=>G.SwB,TrashCanIcon:()=>G.EJV,TreeViewAltIcon:()=>G.MO4,TriagePictogram:()=>G.XHu,Type:()=>o.ZU,UserAvatarIcon:()=>G.yDT,UserFollowIcon:()=>G.osL,UserHasAccess:()=>$.qw,UserIcon:()=>G.nys,UserXrayIcon:()=>G.feL,ViewIcon:()=>G.tCQ,ViewOffIcon:()=>G.Oi_,VisitMode:()=>i.dx,VisitStatus:()=>i.Cj,WarningIcon:()=>G.id,Workspace2:()=>G.ozP,WorkspaceContainer:()=>G.XvC,WorkspaceNotification:()=>G.tMf,XrayPictogram:()=>G.B2u,activateOfflineCapability:()=>I.nr,addRoutesOverride:()=>P,age:()=>U.K,attach:()=>m.K0,attachmentUrl:()=>i.Zu,backendDependencies:()=>n.QE,beginEditSynchronizationItem:()=>I.FO,canAccessStorage:()=>L,canBeginEditSynchronizationItemsOfType:()=>I.xN,canCloseWorkspaceWithoutPrompting:()=>G.SvQ,cancelPrompt:()=>G.zlb,changeWorkspaceContext:()=>G.JKc,checkStatus:()=>m.dO,checkStatusFor:()=>m.Ef,cleanupObsoleteFeatureFlags:()=>d.D3,clearConfigErrors:()=>o.Nh,clearCurrentUser:()=>n.g$,clearHistory:()=>E.g4,closeAllWorkspaces:()=>G.G_3,closeWorkspace:()=>G.MJ8,closeWorkspaceGroup2:()=>G.biy,compile:()=>c.wE,configExtensionStore:()=>o.hs,configInternalStore:()=>o.Rt,convertToLocaleCalendar:()=>W.d4,createAttachment:()=>i.cD,createErrorHandler:()=>a.J,createGlobalStore:()=>M.Zd,createUseStore:()=>$.rr,defaultVisitCustomRepresentation:()=>i.Rb,defineConfigSchema:()=>o.T0,defineExtensionConfigSchema:()=>o.ks,deleteAttachmentPermanently:()=>i.SY,deleteSynchronizationItem:()=>I.lY,detach:()=>m.Yo,detachAll:()=>m.No,dispatchActionableNotificationShown:()=>g.LQ,dispatchConnectivityChanged:()=>g.Yt,dispatchNotificationShown:()=>g.FI,dispatchPrecacheStaticDependencies:()=>g.pc,dispatchSnackbarShown:()=>g.$3,dispatchToastShown:()=>g.Vt,displayName:()=>V.QC,esmStyleGuideSchema:()=>G.uQD,evaluate:()=>c._3,evaluateAsBoolean:()=>c.eb,evaluateAsBooleanAsync:()=>c.Gz,evaluateAsNumber:()=>c.dX,evaluateAsNumberAsync:()=>c.$F,evaluateAsType:()=>c.Sj,evaluateAsTypeAsync:()=>c.uN,evaluateAsync:()=>c.mv,extractVariableNames:()=>u,featureFlagsStore:()=>d.jX,fetchCurrentPatient:()=>i.hG,fhirBaseUrl:()=>n.IU,filterBreadcrumbs:()=>E.D_,finishRegisteringAllApps:()=>N,formatDate:()=>W.Yq,formatDatetime:()=>W.Rt,formatDuration:()=>W.a3,formatPartialDate:()=>W.LW,formatPatientName:()=>V.Qr,formatTime:()=>W.fU,formattedName:()=>V.qK,generateOfflineUuid:()=>I.sA,getAssignedExtensions:()=>m.zx,getAsyncExtensionLifecycle:()=>$.sc,getAsyncLifecycle:()=>$.ns,getAttachmentByUuid:()=>i.KU,getAttachments:()=>i.Bv,getBreadcrumbs:()=>E.lz,getBreadcrumbsFor:()=>E.qh,getConfig:()=>o.zj,getConfigStore:()=>o.IS,getCoreTranslation:()=>j.V,getCurrentImportMap:()=>s.Ln,getCurrentOfflineMode:()=>I.wJ,getCurrentUser:()=>n.HW,getDefaultCalendar:()=>W.a7,getDefaultsFromConfigSchema:()=>_,getDynamicOfflineDataEntries:()=>I.FE,getDynamicOfflineDataEntriesFor:()=>I.WA,getDynamicOfflineDataHandlers:()=>I.qb,getExtensionConfig:()=>o.UY,getExtensionConfigFromExtensionSlotStore:()=>o.g$,getExtensionConfigFromStore:()=>o.P0,getExtensionInternalStore:()=>m.a9,getExtensionNameFromId:()=>m.ES,getExtensionRegistration:()=>m.Tj,getExtensionRegistrationFrom:()=>m.xg,getExtensionSlotConfig:()=>o.G9,getExtensionSlotConfigFromStore:()=>o.vu,getExtensionSlotsConfigStore:()=>o.YP,getExtensionStore:()=>m.zF,getExtensionsConfigStore:()=>o.GI,getFeatureFlag:()=>d.jj,getFhirServerPaginationHandlers:()=>$.mw,getFullSynchronizationItems:()=>I.C$,getFullSynchronizationItemsFor:()=>I.xc,getGlobalStore:()=>M.jf,getGroupByWindowName:()=>m.o1,getHistory:()=>E.JK,getLifecycle:()=>$.JK,getLocale:()=>B.J,getLocations:()=>i.Vs,getLoggedInUser:()=>n.xC,getModalRegistration:()=>m.Fg,getOfflineDb:()=>I.e,getOfflinePatientDataStore:()=>I.WK,getOfflineSynchronizationStore:()=>I.LM,getOmrsServiceWorker:()=>I.Rs,getOpenedWindowIndexByWorkspace:()=>m.YX,getPatientName:()=>V.Vp,getPromptBeforeClosingFcn:()=>G.OeE,getSessionLocation:()=>n.Kx,getSessionStore:()=>n.EW,getStartedVisit:()=>i.DK,getSyncLifecycle:()=>$.g9,getSynchronizationItem:()=>I.Gp,getSynchronizationItems:()=>I.pb,getSynchronizationItemsFor:()=>I.Io,getTranslationOverrides:()=>o.td,getVisitStore:()=>i.BX,getVisitTypes:()=>i.Pu,getVisitsForPatient:()=>i.BR,getWindowByWorkspaceName:()=>m.Ml,getWorkspaceGroupRegistration:()=>m.Q_,getWorkspaceGroupStore:()=>G.e_T,getWorkspaceRegistration:()=>m.Xb,getWorkspaceStore:()=>G.XzH,goBackInHistory:()=>E.tA,iconIds:()=>G.kE8,implementerToolsConfigStore:()=>o.tN,importDynamic:()=>s.rL,inRange:()=>o.r4,integrateBreakpoints:()=>G.WMK,interpolateString:()=>E.zl,interpolateUrl:()=>E.JG,isDesktop:()=>$.xl,isDevEnabled:()=>n.L7,isOfflineUuid:()=>I.bO,isOmrsDateStrict:()=>W.hl,isOmrsDateToday:()=>W.vU,isOnline:()=>H.s,isOpenmrsAppRoutes:()=>F,isOpenmrsRoutes:()=>k,isUrl:()=>o.gU,isUrlWithTemplateParameters:()=>o.qG,isVersionSatisfied:()=>J,jsep:()=>c.PQ,launchWorkspace:()=>G.TC2,launchWorkspace2:()=>G.pTx,launchWorkspaceGroup:()=>G.aN0,launchWorkspaceGroup2:()=>G.GYk,leftNavStore:()=>m.Gp,loadLifeCycles:()=>S.o,localStorageRoutesPrefix:()=>O,makeUrl:()=>n.Gm,messageOmrsServiceWorker:()=>I.ms,navigate:()=>E.oo,navigateAndLaunchWorkspace:()=>G.Fmw,offlineUuidPrefix:()=>I.jU,omrsOfflineCachingStrategyHttpHeaderName:()=>I.JC,omrsOfflineResponseBodyHttpHeaderName:()=>I.UH,omrsOfflineResponseStatusHttpHeaderName:()=>I.Gj,oneOf:()=>o.yL,openmrsComponentDecorator:()=>$.F7,openmrsFetch:()=>n.lo,openmrsObservableFetch:()=>n.ut,parseDate:()=>W._U,pictogramIds:()=>G.vJW,preloadImport:()=>s.zC,processConfig:()=>o.mq,promptBeforeClosing:()=>G.F3N,promptForClosingWorkspaces:()=>G.hLN,provide:()=>o.Gt,putDynamicOfflineData:()=>I.yD,putDynamicOfflineDataFor:()=>I.ff,queueSynchronizationItem:()=>I.Zr,queueSynchronizationItemFor:()=>I.Iq,refetchCurrentUser:()=>n.yH,registerApp:()=>w,registerBreadcrumb:()=>E.vf,registerBreadcrumbs:()=>E.MY,registerDefaultCalendar:()=>W.XE,registerExtension:()=>m.VK,registerExtensionSlot:()=>m.FY,registerFeatureFlag:()=>d.uA,registerGlobalStore:()=>M.CE,registerModal:()=>m.Ju,registerModuleLoad:()=>o.kl,registerModuleWithConfigSystem:()=>o.FL,registerOfflinePatientHandler:()=>I.KG,registerOmrsServiceWorker:()=>I.sZ,registerTranslationNamespace:()=>o.GV,registerWorkspace:()=>m.pm,registerWorkspaceGroup:()=>m.io,registerWorkspaceGroups2:()=>m.rD,registerWorkspaceWindows2:()=>m.Qb,registerWorkspaces2:()=>m.Uh,removeDynamicOfflineData:()=>I.NU,removeDynamicOfflineDataFor:()=>I.wn,removeRoutesOverride:()=>C,renderActionableNotifications:()=>G.zfR,renderExtension:()=>m.wG,renderInlineNotifications:()=>G.CU$,renderLoadingSpinner:()=>G.uWG,renderSnackbars:()=>G.ZLm,renderToasts:()=>G.f1b,renderWorkspaceWindowsAndMenu:()=>G.jCr,reportError:()=>a.N,reset:()=>m.cL,resetAllRoutesOverrides:()=>x,resetWorkspaceStore:()=>G._1W,restBaseUrl:()=>n.Jj,retry:()=>Q,runSynchronization:()=>I.AO,saveVisit:()=>i.Ds,selectPreferredName:()=>V.VO,sessionEndpoint:()=>n.Ct,sessionStore:()=>n.eA,setCurrentOfflineMode:()=>I.Og,setCurrentVisit:()=>i.NH,setFeatureFlag:()=>d.B4,setLeftNav:()=>m.Vx,setSessionLocation:()=>n.Gp,setUserLanguage:()=>n.E4,setUserProperties:()=>n.Fi,setupApiModule:()=>n.Y0,setupDynamicOfflineDataHandler:()=>I.iD,setupHistory:()=>E.Wh,setupModals:()=>G.EPe,setupOfflineSync:()=>I.cy,shallowEqual:()=>X.b,showActionableNotification:()=>G.ZyP,showModal:()=>G.toY,showNotification:()=>G.Dsh,showSnackbar:()=>G.tdF,showToast:()=>G.P0c,showWorkspacePrompts:()=>G.ctS,slugify:()=>s.Yv,subscribeActionableNotificationShown:()=>g.bK,subscribeConnectivity:()=>g.sT,subscribeConnectivityChanged:()=>g.gj,subscribeNotificationShown:()=>g.bJ,subscribePrecacheStaticDependencies:()=>g.ff,subscribeSnackbarShown:()=>g.ls,subscribeTo:()=>M.i7,subscribeToFeatureFlag:()=>d.sM,subscribeToastShown:()=>g.dX,syncAllDynamicOfflineData:()=>I.Td,syncDynamicOfflineData:()=>I.u1,syncOfflinePatientData:()=>I.sK,temporaryConfigStore:()=>o.H,toDateObjectStrict:()=>W.kQ,toLocationObject:()=>i.E$,toOmrsIsoString:()=>W.l0,toVisitTypeObject:()=>i.Qx,translateFrom:()=>j.t,tryRegisterExtension:()=>A,unsetLeftNav:()=>m.sr,updateInternalExtensionStore:()=>m.DQ,updateVisit:()=>i.xL,updateWorkspaceWindowState:()=>G._RD,useAbortController:()=>$.Ie,useAppContext:()=>$.Us,useAssignedExtensionIds:()=>$.Tt,useAssignedExtensions:()=>$.CX,useAttachments:()=>$._9,useBodyScrollLock:()=>$.yJ,useConfig:()=>$.UK,useConnectedExtensions:()=>$.zD,useConnectivity:()=>$.Fx,useDebounce:()=>$.d7,useDefineAppContext:()=>$.jn,useEmrConfiguration:()=>$.E4,useExtensionInternalStore:()=>$.$B,useExtensionSlot:()=>$.br,useExtensionSlotMeta:()=>$.Wq,useExtensionSlotStore:()=>$.uL,useExtensionStore:()=>$.Gz,useFeatureFlag:()=>$.u,useFhirFetchAll:()=>$.oq,useFhirInfinite:()=>$.vL,useFhirPagination:()=>$.to,useForceUpdate:()=>$.CH,useLayoutType:()=>$.qv,useLeftNav:()=>$.if,useLeftNavStore:()=>$.TA,useLocations:()=>$.kH,useOnClickOutside:()=>$.Wr,useOnVisible:()=>$.Jm,useOpenmrsFetchAll:()=>$.Bf,useOpenmrsInfinite:()=>$.iy,useOpenmrsPagination:()=>$.Ed,useOpenmrsSWR:()=>$.M3,usePagination:()=>$.WQ,usePatient:()=>$.tQ,usePatientPhoto:()=>G.R9n,usePrimaryIdentifierCode:()=>$.wJ,useRenderableExtensions:()=>$.oU,useSession:()=>$.wV,useStore:()=>$.Pj,useStoreWithActions:()=>$.mQ,useVisit:()=>$.fq,useVisitContextStore:()=>$.xH,useVisitTypes:()=>$.wr,useWorkspace2Store:()=>G.AkA,useWorkspaces:()=>G.CH0,userHasAccess:()=>n.st,validator:()=>o.Nc,validators:()=>o.y$,workspace2Store:()=>m.J_,workspaceStore:()=>G.x9q});var n=r(20367),o=r(95819),s=r(47709),i=r(9166),a=r(60937),c=r(87440),l=r(19758),p=r(89987);function u(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;const t=(r=p.f,{globals:{...r},isLocalExpression:!1,variables:new Set});var r;return f("string"==typeof e?(0,l.A)(e):e,t),[...t.variables]}function f(e,t){switch(e.type){case"UnaryExpression":return function(e,t){return f(e.argument,t)}(e,t);case"BinaryExpression":return function(e,t){return[f(e.left,t),f(e.right,t)].filter(Boolean)}(e,t);case"ConditionalExpression":return function(e,t){return[f(e.consequent,t),f(e.test,t),f(e.alternate,t)].filter(Boolean)}(e,t);case"CallExpression":return function(e,t){const r=f(e.callee,t);return e.arguments?.map(h(t)),r}(e,t);case"ArrowFunctionExpression":return function(e,t){const r={...t};r.isLocalExpression=!0;const n=e.params?.map(h(r))??[],o=f(e.body,r)??[];if(o&&Array.isArray(o))for(const e of o)n.includes(e)||t.variables.add(e)}(e,t);case"MemberExpression":return function(e,t){f(e.object,t);const r={...t};r.isLocalExpression=!0,f(e.property,r)}(e,t);case"ArrayExpression":return function(e,t){e.elements?.map(h(t))}(e,t);case"SequenceExpression":return function(e,t){e.expressions?.map(h(t))}(e,t);case"NewExpression":return function(e,t){e.arguments?.map(h(t))}(e,t);case"Literal":case"TemplateElement":return;case"Identifier":return function(e,t){if(!(e.name in t.globals)){if(t.isLocalExpression)return e.name;t.variables.add(e.name)}}(e,t);case"TemplateLiteral":return function(e,t){e.expressions?.map(h(t)),e.quasis?.map(h(t))}(e,t);default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function h(e){return function(t){return null===t?null:f(t,e)}}var m=r(27354),d=r(76110),g=r(23184),E=r(11305),I=r(39644),$=r(58379);const O="openmrs-routes:";var y=r(22244),S=r(55226);function A(e,t){const r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nextension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${r} from ${e} declares both a 'slots' property and\na 'slot' property. Only the 'slots' property will be honored.`);const n=t.slots?t.slots:t.slot?[t.slot]:[];if(t.component){(0,m.VK)({name:r,load:()=>(0,S.o)(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag});for(const e of n)(0,m.K0)(e,r)}else console.error(`The extension ${r} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the extension definition.`,t)}const R=[];function v(e){if(Array.isArray(e)){const t=e.map(v);return e=>t.some(t=>t(e))}return"string"==typeof e?(0,y.fz)(window.getOpenmrsSpaBase()+e):e instanceof RegExp?t=>function(e,t){return e.test(t.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,t):()=>e}function w(e,t){if(e&&t&&"object"==typeof t){(0,o.FL)(e);const n=t.extensions??[],s=t.modals??[],i=t.workspaces??[],a=t.workspaceGroups??[],c=t.featureFlags??[],l=t.workspaceGroups2??[],p=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?R.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?A(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),s.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){const r=t.name;r?t.component?(0,m.Ju)({name:r,moduleName:e,load:()=>(0,S.o)(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nmodal definition.`,t)}(e,t):console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){const r=t.name;if(!r)return void console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.`,t);const n=t.title;if(n)if(t.component){(0,m.pm)({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>(0,S.o)(e,t.component)});for(const e of t.groups||[])(0,m.io)({name:e,members:[r]})}else console.error(`The workspace ${r} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the workspace definition.`,t);else console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.\nTo fix this, ensure that you define the "title" field inside the workspace definition.`,t)}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),a.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")?function(e,t){const r=t.name;r?(0,m.io)({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.`,t)}(e,t):console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),r=l,(0,m.rD)(r),function(e,t){(0,m.Qb)(e,t)}(e,p),function(e,t){(0,m.Uh)(e,t)}(e,u),c.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"flagName")?function(e,t){t.flagName?t.label?t.description?(0,d.uA)(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the feature flag definition.`,t)}(e,t):console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}var r}function N(){R.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of R){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);const r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",s=document.getElementById(o),i=`single-spa-application:${n}`;if(!s)throw new Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);{const e=document.createElement("div");e.id=i,s?.appendChild(e)}T(n,t)}}function T(e,t){const r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);if(!1===r)return void console.warn('A registered page definition is missing a route and thus cannot be registered.\nTo fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.',e);if(!t.component)return void console.warn('A registered page definition is missing a component and thus cannot be registered.\nTo fix this, ensure that you define the "component" field inside the page definition.',e);const n=function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??1)||!navigator.onLine&&r)&&!(n&&!(0,d.jj)(n))&&e(o):e}(v(r),t);(0,y.AG)(e,()=>(0,S.o)(t.appName,t.component),n)}function L(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}const b=L();function P(e,t){if(b){if("string"==typeof t){if(t.startsWith("http"))return D(e,t);try{const r=JSON.parse(t);if(F(r))return D(e,r);console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t)}catch(t){console.error(`Could not add routes override for ${e}: `,t)}}else{if(t instanceof URL)return D(e,t.toString());if(F(t))return D(e,t)}console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t)}}function C(e){if(!b)return;const t=O+e;localStorage.removeItem(t)}function x(){if(!b)return;const e=window.localStorage;for(let t=0;t<e.length;t++){const r=e.key(t);r?.startsWith(O)&&e.removeItem(r)}}function D(e,t){const r=O+e;localStorage.setItem(r,JSON.stringify(t))}function F(e){if(e&&"object"==typeof e){const t=Object.prototype.hasOwnProperty,r=e;return!!((!t.call(e,"pages")||Boolean(r.pages)&&Array.isArray(r.pages))&&(!t.call(e,"extensions")||Boolean(r.extensions)&&Array.isArray(r.extensions))&&(!t.call(e,"workspaces")||Boolean(r.workspaces)&&Array.isArray(r.workspaces))&&(!t.call(e,"modals")||Boolean(r.modals)&&Array.isArray(r.modals)))}return!1}function k(e){if(e&&"object"==typeof e){const t=e;return Object.entries(t).every(([e,t])=>"string"==typeof e&&F(t))}return!1}var M=r(22337),G=r(21716),j=r(7661),U=r(2545),W=r(57699),B=r(4617),H=r(52834),V=r(59591),X=r(27388);function _(e){let t={};for(let r of Object.keys(e))if(z(e[r])&&e[r].hasOwnProperty("_default"))t[r]=e[r]._default;else{if(r.startsWith("_"))continue;z(e[r])?t[r]=_(e[r]):t[r]=e[r]}return t}function z(e){return!!e&&e.constructor===Object}var q=r(15934);function Y(e){const[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function J(e,t){const r=function(e){const t=e.indexOf("-");return t>=0?`${Y(e.slice(0,t))}-${e.slice(t+1)}`:Y(e)}(t);return q.satisfies(r,e,{includePrerelease:!0})}async function Q(e,t={}){let{shouldRetry:r,getDelay:n,onError:o}=t;r=r??(e=>function(e){return e<=5}(e)),n=n??(e=>function(e,t,r=!1){const n=r?e+1:e;return 1e3*Math.pow(2,n)}(e));let s,i=0;do{try{return await K(n(i)),await e()}catch(e){o?.(e,i),s=e}}while(r(i++));throw s}async function K(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},57705:(e,t,r)=>{const n=r(29306),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(86891),{re:i,t:a}=r(79413),{compareIdentifiers:c}=r(83610);class l{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},59980:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>0===n(e,t,r)},65796:(e,t,r)=>{const n=r(57705),o=r(16632),s=r(5717);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t)e.set[t].forEach(e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!s(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}});return r&&e.test(r)?r:null}},69168:(e,t,r)=>{const n=r(40663);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},75488:(e,t,r)=>{const n=r(82463);e.exports=(e,t)=>n(e,t,!0)},75581:(e,t,r)=>{const n=r(57705);e.exports=(e,t)=>new n(e,t).minor},79413:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(86891),o=r(29306),s=(t=e.exports={}).re=[],i=t.src=[],a=t.t={};let c=0;const l=(e,t,r)=>{const n=c++;o(n,t),a[e]=n,i[n]=t,s[n]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),l("FULL",`^${i[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),l("LOOSE",`^${i[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),l("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",i[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},80483:(e,t,r)=>{const n=r(16632),{ANY:o}=r(43473),s=r(94753),i=r(82463),a=(e,t,r)=>{if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;const n=new Set;let a,p,u,f,h,m,d;for(const t of e)">"===t.operator||">="===t.operator?a=c(a,t,r):"<"===t.operator||"<="===t.operator?p=l(p,t,r):n.add(t.semver);if(n.size>1)return null;if(a&&p){if(u=i(a.semver,p.semver,r),u>0)return null;if(0===u&&(">="!==a.operator||"<="!==p.operator))return null}for(const e of n){if(a&&!s(e,String(a),r))return null;if(p&&!s(e,String(p),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}for(const e of t){if(d=d||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,a)if(">"===e.operator||">="===e.operator){if(f=c(a,e,r),f===e)return!1}else if(">="===a.operator&&!s(a.semver,String(e),r))return!1;if(p)if("<"===e.operator||"<="===e.operator){if(h=l(p,e,r),h===e)return!1}else if("<="===p.operator&&!s(p.semver,String(e),r))return!1;if(!e.operator&&(p||a)&&0!==u)return!1}return!(a&&m&&!p&&0!==u||p&&d&&!a&&0!==u)},c=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r)=>{e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=a(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},82367:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(t,e,r)},82463:(e,t,r)=>{const n=r(57705);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},83610:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},86859:(e,t,r)=>{const n=r(20650);e.exports=(e,t,r)=>n(e,t,"<",r)},86891:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},89414:(e,t,r)=>{const n=r(20650);e.exports=(e,t,r)=>n(e,t,">",r)},94568:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>0!==n(e,t,r)},94753:(e,t,r)=>{const n=r(16632);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},95419:(e,t,r)=>{const n=r(82463);e.exports=(e,t,r)=>n(e,t,r)<=0},99481:(e,t,r)=>{const n=r(57705),o=r(16632);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new n(s,r)))}),s}}}]);
|
package/dist/5885.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[5885],{14568:(e,n,t)=>{t.d(n,{A:()=>l});var r=t(30977),a=t.n(r),i=t(95924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85{background-color:#fff;color:#525252;padding:.125rem;display:flex;align-items:center;justify-content:space-between}.-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e{height:1px;width:30%;border-top:1px dashed #161616}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-view/materal-ward/maternal-ward-patient-card.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,sEACE,qBDFM,CCGN,aDCQ,CAAA,eEIG,CDHX,YAAA,CACA,kBAAA,CACA,6BAAA,CAGF,0EACE,UAAA,CACA,SAAA,CACA,6BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars';\n@use '@carbon/type';\n\n.motherChildBedDivider {\n background-color: vars.$ui-02;\n color: vars.$text-02;\n padding: layout.$spacing-01;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.motherChildBedDividerLine {\n height: 1px;\n width: 30%;\n border-top: 1px dashed vars.$ui-05;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={motherChildBedDivider:"-esm-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85",motherChildBedDividerLine:"-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e"};const l=o},35885:(e,n,t)=>{t.r(n),t.d(n,{default:()=>pe});var r=t(1343),a=t.n(r),i=t(54440),o=t(83773),l=t(93150);function s(e){var n,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=(n="".concat(i.restBaseUrl,"/emrapi/maternal/mothersAndChildren"),new URL((0,i.makeUrl)(n),window.location.toString())),o=e.mothers,l=e.children,s=e.requireChildBornDuringMothersActiveVisit,d=e.requireChildHasActiveVisit,c=e.requireMotherHasActiveVisit,u=!0,p=!1,m=void 0;try{for(var b,h=(null!=o?o:[])[Symbol.iterator]();!(u=(b=h.next()).done);u=!0){var g=b.value;a.searchParams.append("mother",g)}}catch(e){p=!0,m=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw m}}var v,f,y,A=!0,w=!1,$=void 0;try{for(var C,E=(null!=l?l:[])[Symbol.iterator]();!(A=(C=E.next()).done);A=!0){var _=C.value;a.searchParams.append("child",_)}}catch(e){w=!0,$=e}finally{try{A||null==E.return||E.return()}finally{if(w)throw $}}return a.searchParams.append("requireMotherHasActiveVisit",null!==(v=null==c?void 0:c.toString())&&void 0!==v?v:"false"),a.searchParams.append("requireChildHasActiveVisit",null!==(f=null==d?void 0:d.toString())&&void 0!==f?f:"false"),a.searchParams.append("requireChildBornDuringMothersActiveVisit",null!==(y=null==s?void 0:s.toString())&&void 0!==y?y:"false"),r&&a.searchParams.append("v",r),(0,i.useOpenmrsFetchAll)(t?a:null)}var d="custom:(childAdmission,mother:(person,identifiers:full,uuid),child:(person,identifiers:full,uuid),motherAdmission)",c=t(77493),u=t(35487),p=t(53373),m=t.n(p),b=t(50174),h=t(59198),g=t(91480),v=t(36110),f=t(97019),y=t(37538);const A=function(e){var n,t=e.id,r=e.patient,i=e.visit,o=(0,u.UG)("coloredObsTags",t),s=null!=o?o:{},d=s.conceptUuid,c=s.summaryLabel,p=s.summaryLabelColor,m=(0,h.e)({patient:r.uuid,concept:d},null!=d,g.Fx),A=m.data,w=m.isLoading,$=(0,l.useTranslation)().t,C=(0,g.uk)(null!==(n=null==o?void 0:o.tags)&&void 0!==n?n:[]);if(w)return a().createElement("div",{className:y.A.wardPatientCardRow},a().createElement(v.A,null));var E,_,k=null==A?void 0:A.filter(function(e){var n;return(null===(n=e.encounter.visit)||void 0===n?void 0:n.uuid)==(null==i?void 0:i.uuid)}),B=null!=c?$(c):null==k||null===(_=k[0])||void 0===_||null===(E=_.concept)||void 0===E?void 0:E.display,P=[],x=null==k?void 0:k.map(function(e){var n=e.value,t=n.display,r=n.uuid,i=null==C?void 0:C.get(r);return i?a().createElement(f.A,{tooltipContent:(0,g.Fe)(e,$)},a().createElement(b.vwO,{type:i,key:"ward-coded-obs-tag-".concat(e.uuid)},t)):(P.push(a().createElement("div",{key:r},t," (",(0,g.Fe)(e,$),")")),null)}).filter(function(e){return null!=e});return(null==x?void 0:x.length)>0||P.length>0?a().createElement("div",{className:y.A.wardPatientCardRow},a().createElement("span",{className:y.A.wardPatientObsLabel},x,P.length>0?a().createElement(f.A,{tooltipContent:P},a().createElement(b.vwO,{type:p},$("countItems","{{count}} {{item}}",{count:P.length,item:B}))):null)):null};var w=t(85132),$=t(92182);const C=function(e){var n,t,r=e.patient,i=e.id,o=null==r||null===(n=r.person)||void 0===n?void 0:n.preferredAddress,l=(0,u.UG)("patientAddress",i);return a().createElement(a().Fragment,null,null==l||null===(t=l.fields)||void 0===t?void 0:t.map(function(e,n){return(null==o?void 0:o[e])?a().createElement("div",{key:n},null==o?void 0:o[e]):a().createElement("div",{key:n})}))};var E=t(7928),_=t(56546),k=t(83183),B=t(86901);const P=function(e){var n=e.wardPatient,t=n.patient,r=n.bed,i=n.visit,o=n.inpatientAdmission,l=(null!=o?o:{}).firstAdmissionOrTransferEncounter;return a().createElement("div",{className:m()(y.A.wardPatientCardRow,y.A.wardPatientCardHeader)},r?a().createElement($.A,{bed:r}):null,a().createElement(_.A,{patient:t}),a().createElement(E.A,{id:"patient-identifier",patient:t}),a().createElement(w.A,{patient:t}),a().createElement(C,{id:"patient-address",patient:t}),a().createElement(k.A,{id:"admission-reason",patient:t,visit:i}),a().createElement(B.A,{firstAdmissionOrTransferEncounter:l}))};var x=t(72591),O=t.n(x),N=t(1740),D=t.n(N),I=t(88128),S=t.n(I),T=t(30855),M=t.n(T),R=t(93051),L=t.n(R),q=t(73656),F=t.n(q),H=t(14568),U={};U.styleTagTransform=F(),U.setAttributes=M(),U.insert=S().bind(null,"head"),U.domAPI=D(),U.insertStyleElement=L(),O()(H.A,U);const G=H.A&&H.A.locals?H.A.locals:void 0,j=function(e){var n,t=e.inpatientAdmission,r=null==t||null===(n=t.encounterAssigningToCurrentInpatientLocation.location)||void 0===n?void 0:n.display;return r?a().createElement("div",null,a().createElement("span",null,r)):a().createElement(a().Fragment,null)};var V=t(48621),W={};W.styleTagTransform=F(),W.setAttributes=M(),W.insert=S().bind(null,"head"),W.domAPI=D(),W.insertStyleElement=L(),O()(V.A,W);const X=V.A&&V.A.locals?V.A.locals:void 0;var Y=function(e){var n=e.otherPatient,t=e.otherPatientAdmission,r=e.isOtherPatientTheMother?i.MotherIcon:i.BabyIcon;return a().createElement("div",{key:n.uuid,className:m()(X.motherOrBabyRow,y.A.wardPatientCardRow)},a().createElement("div",{className:X.motherOrBabyIconDiv},a().createElement(r,{className:X.motherOrBabyIcon,size:24})),a().createElement("div",{className:m()(X.motherOrBabyRowElementsDiv,y.A.dotSeparatedChildren)},a().createElement(_.A,{patient:n}),a().createElement(E.A,{id:"patient-identifier",patient:n}),a().createElement(w.A,{patient:n}),a().createElement(j,{inpatientAdmission:t})))};const z=function(e){var n,t=e.wardPatient,r=e.childrenOfWardPatientInSameBed,o=t.patient,l=(null!==(n=(0,i.useAppContext)("maternal-ward-view-context"))&&void 0!==n?n:{}).motherChildRelationships,s=null!=l?l:{},d=s.childrenByMotherUuid,c=s.motherByChildUuid,u=null==c?void 0:c.get(o.uuid),p=null==d?void 0:d.get(o.uuid),m=null==p?void 0:p.filter(function(e){return!(null==r?void 0:r.some(function(n){return n.patient.uuid==e.patient.uuid}))});return a().createElement(a().Fragment,null,u&&a().createElement(Y,{otherPatient:u.patient,otherPatientAdmission:u.currentAdmission,isOtherPatientTheMother:!0}),null==m?void 0:m.map(function(e){return a().createElement(Y,{key:e.patient.uuid,otherPatient:e.patient,otherPatientAdmission:e.currentAdmission,isOtherPatientTheMother:!1})}))};var J=t(92058),Q=t(1248),Z=t(77),K=t(95925);function ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ne(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var te=function(){var e=(0,l.useTranslation)().t;return a().createElement("div",{className:G.motherChildBedDivider},a().createElement("div",{className:G.motherChildBedDividerLine}),a().createElement(b.vwO,{type:"purple"},e("motherChildBedShare","Mother / Child")),a().createElement("div",{className:G.motherChildBedDividerLine}))};const re=function(e){var n=e.wardPatient,t=e.childrenOfWardPatientInSameBed,r=n.patient,i=n.visit,o=n.bed,l=n.inpatientAdmission,s=(null!=l?l:{}).encounterAssigningToCurrentInpatientLocation,d=a().createElement(a().Fragment,null,a().createElement(Q.A,{wardPatient:n,relatedTransferPatients:t},a().createElement(P,{wardPatient:n}),a().createElement("div",{className:m()(y.A.wardPatientCardRow,y.A.dotSeparatedChildren)},a().createElement(Z.A,{encounterAssigningToCurrentInpatientLocation:s}),a().createElement(k.A,{id:"gravida",patient:r,visit:i})),a().createElement(K.A,{wardPatient:n}),a().createElement(J.A,{id:"pending-items",wardPatient:n}),a().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){ne(e,n,t[n])})}return e}({id:"pregnancy-complications"},n)),a().createElement(z,e)),null==t?void 0:t.map(function(e){var r,i=[n].concat(function(e){if(Array.isArray(e))return ee(e)}(r=t.filter(function(n){return n.patient.uuid!==e.patient.uuid}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,n){if(e){if("string"==typeof e)return ee(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ee(e,n):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return a().createElement(a().Fragment,{key:e.patient.uuid},a().createElement(te,null),a().createElement(Q.A,{wardPatient:e,relatedTransferPatients:i},a().createElement(P,{wardPatient:e}),a().createElement(J.A,{id:"pending-items",wardPatient:e})))}));return o?d:a().createElement("div",{className:y.A.unassignedPatient},a().createElement("div",{key:"unassigned-bed-pt-"+n.patient.uuid},d))},ae=function(e){var n,t=null!=e?e:{},r=t.motherByChildUuid,o=t.isLoading,l=(null!==(n=(0,i.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,s=null!=l?l:{},d=s.bedLayouts,p=s.wardAdmittedPatientsWithBed,m=s.inpatientAdmissionsByPatientUuid,b=null==d?void 0:d.map(function(e){var n=e.patients,t=(0,u.yZ)(e),i=new Map,l=n.map(function(e){var n=null==p?void 0:p.get(e.uuid);if(n){var r=n.patient,a=n.visit,i=n.currentInpatientRequest;return{patient:r,visit:a,bed:t,inpatientAdmission:n,inpatientRequest:i||null}}var o=m.get(e.uuid);return{patient:e,visit:null==o?void 0:o.visit,bed:t,inpatientAdmission:o,inpatientRequest:null}}).filter(function(e){var t,a=e.patient.uuid,o=(null!==(t=null==r?void 0:r.get(a))&&void 0!==t?t:{}).patient,l=n.some(function(e){return e.uuid==(null==o?void 0:o.uuid)});return l&&(i.has(o.uuid)||i.set(o.uuid,[]),i.get(o.uuid).push(e)),!l}).map(function(e){return a().createElement(re,{key:e.patient.uuid,wardPatient:e,childrenOfWardPatientInSameBed:i.get(e.patient.uuid)})});return a().createElement(c.A,{key:t.uuid,bed:t,patientCards:l,isLoadingDivider:o})});return a().createElement(a().Fragment,null,b)};var ie=t(18359),oe=t(60607);function le(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const se=function(){var e,n=(null!==(e=(0,i.useAppContext)("ward-view-context"))&&void 0!==e?e:{}).wardPatientGroupDetails,t=(0,l.useTranslation)().t,r=(null!=n?n:{}).inpatientRequestResponse,o=null!=r?r:{},s=o.inpatientRequests,d=o.isLoading,c=o.error;return d?a().createElement(v.A,null):c?a().createElement(i.ErrorState,{headerTitle:t("admissionRequests","Admission requests"),error:c}):a().createElement(a().Fragment,null,null==s?void 0:s.map(function(e,n){var t={patient:e.patient,visit:e.visit,bed:null,inpatientRequest:e,inpatientAdmission:null};return a().createElement(oe.A,{key:"admission-request-card-".concat(n),wardPatient:t},a().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){le(e,n,t[n])})}return e}({id:"pregnancy-complications"},t)),a().createElement(z,{wardPatient:t,childrenOfWardPatientInSameBed:[]}),a().createElement(ie.A,{id:"admission-request-note",wardPatient:t}))}))},de=function(){var e,n=(null!==(e=(0,i.useAppContext)("ward-view-context"))&&void 0!==e?e:{}).wardPatientGroupDetails,t=(null!=n?n:{}).wardUnassignedPatientsList,r=null==t?void 0:t.map(function(e){return a().createElement(re,{wardPatient:{patient:e.patient,visit:e.visit,bed:null,inpatientAdmission:e,inpatientRequest:e.currentInpatientRequest},childrenOfWardPatientInSameBed:[],key:e.patient.uuid})});return a().createElement(a().Fragment,null,r)};var ce=t(75546),ue=t(18010);const pe=function(){var e=(0,o.u)();(0,i.useDefineAppContext)("ward-view-context",{wardPatientGroupDetails:e,WardPatientHeader:P});var n=e.allWardPatientUuids,t=e.isLoading,c=function(e,n){var t=(0,l.useTranslation)().t,a={children:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},o=s({mothers:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},n&&e.length>0,d),c=o.data,u=o.isLoading,p=o.error,m=s(a,n&&e.length>0,d),b=m.data,h=m.isLoading,g=m.error;return p&&(0,i.showNotification)({title:t("errorLoadingChildren","Error loading children info"),kind:"error",critical:!0,description:null==p?void 0:p.message}),g&&(0,i.showNotification)({title:t("errorLoadingMother","Error loading mother info"),kind:"error",critical:!0,description:null==g?void 0:g.message}),(0,r.useMemo)(function(){var e=new Map,n=new Map,t=u||h,r=!0,a=!1,i=void 0;try{for(var o,l=(null!=b?b:[])[Symbol.iterator]();!(r=(o=l.next()).done);r=!0){var s=o.value,d=s.child,p=s.childAdmission,m=s.mother,g=s.motherAdmission;e.set(d.uuid,{patient:m,currentAdmission:g}),n.has(m.uuid)||n.set(m.uuid,[]),n.get(m.uuid).push({patient:d,currentAdmission:p})}}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}var v=!0,f=!1,y=void 0;try{for(var A,w=function(){var t=A.value,r=t.child,a=t.childAdmission,i=t.mother,o=t.motherAdmission;e.set(r.uuid,{patient:i,currentAdmission:o}),n.has(i.uuid)||n.set(i.uuid,[]);var l=n.get(i.uuid);l.some(function(e){return e.patient.uuid==r.uuid})||l.push({patient:r,currentAdmission:a})},$=(null!=c?c:[])[Symbol.iterator]();!(v=(A=$.next()).done);v=!0)w()}catch(e){f=!0,y=e}finally{try{v||null==$.return||$.return()}finally{if(f)throw y}}return{motherByChildUuid:e,childrenByMotherUuid:n,isLoading:t}},[c,b,u,h])}(Array.from(n),!t);(0,i.useDefineAppContext)("maternal-ward-view-context",{motherChildRelationships:c});var u=a().createElement(ae,c),p=a().createElement(de,null),m=a().createElement(se,null);return a().createElement(a().Fragment,null,a().createElement(ue.A,{wardPendingPatients:m}),a().createElement(ce.A,{wardBeds:u,wardUnassignedPatients:p}))}},48621:(e,n,t)=>{t.d(n,{A:()=>l});var r=t(30977),a=t.n(r),i=t(95924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__mother-child-row__motherOrBabyRow___9fHo5{display:flex}.-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7{flex:1}.-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC{display:flex;align-items:center}.-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a{padding:.25rem;border-radius:50%;background-color:#e0e0e0;margin-right:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-patient-card/card-rows/mother-child-row.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,sDACE,YAAA,CAGF,iEACE,MAAA,CAGF,0DACE,YAAA,CACA,kBAAA,CAGF,uDACE,cCDW,CDEX,iBAAA,CACA,wBDMO,CCLP,kBCCW",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.motherOrBabyRow {\n display: flex;\n}\n\n.motherOrBabyRowElementsDiv {\n flex: 1;\n}\n\n.motherOrBabyIconDiv {\n display: flex;\n align-items: center;\n}\n\n.motherOrBabyIcon {\n padding: layout.$spacing-02;\n border-radius: 50%;\n background-color: $grey-2;\n margin-right: layout.$spacing-03;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={motherOrBabyRow:"-esm-ward__mother-child-row__motherOrBabyRow___9fHo5",motherOrBabyRowElementsDiv:"-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7",motherOrBabyIconDiv:"-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC",motherOrBabyIcon:"-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a"};const l=o}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[5885],{14568:(e,n,t)=>{t.d(n,{A:()=>l});var r=t(30977),a=t.n(r),i=t(95924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85{background-color:#fff;color:#525252;padding:.125rem;display:flex;align-items:center;justify-content:space-between}.-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e{height:1px;width:30%;border-top:1px dashed #161616}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-view/materal-ward/maternal-ward-patient-card.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,sEACE,qBDFM,CCGN,aDCQ,CAAA,eEIG,CDHX,YAAA,CACA,kBAAA,CACA,6BAAA,CAGF,0EACE,UAAA,CACA,SAAA,CACA,6BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars';\n@use '@carbon/type';\n\n.motherChildBedDivider {\n background-color: vars.$ui-02;\n color: vars.$text-02;\n padding: layout.$spacing-01;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.motherChildBedDividerLine {\n height: 1px;\n width: 30%;\n border-top: 1px dashed vars.$ui-05;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={motherChildBedDivider:"-esm-ward__maternal-ward-patient-card__motherChildBedDivider___1dB85",motherChildBedDividerLine:"-esm-ward__maternal-ward-patient-card__motherChildBedDividerLine___NXm0e"};const l=o},35885:(e,n,t)=>{t.r(n),t.d(n,{default:()=>pe});var r=t(1343),a=t.n(r),i=t(54440),o=t(83773),l=t(93150);function s(e){var n,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=(n="".concat(i.restBaseUrl,"/emrapi/maternal/mothersAndChildren"),new URL((0,i.makeUrl)(n),window.location.toString())),o=e.mothers,l=e.children,s=e.requireChildBornDuringMothersActiveVisit,d=e.requireChildHasActiveVisit,c=e.requireMotherHasActiveVisit,u=!0,p=!1,m=void 0;try{for(var b,h=(null!=o?o:[])[Symbol.iterator]();!(u=(b=h.next()).done);u=!0){var g=b.value;a.searchParams.append("mother",g)}}catch(e){p=!0,m=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw m}}var v,f,y,A=!0,w=!1,$=void 0;try{for(var C,E=(null!=l?l:[])[Symbol.iterator]();!(A=(C=E.next()).done);A=!0){var _=C.value;a.searchParams.append("child",_)}}catch(e){w=!0,$=e}finally{try{A||null==E.return||E.return()}finally{if(w)throw $}}return a.searchParams.append("requireMotherHasActiveVisit",null!==(v=null==c?void 0:c.toString())&&void 0!==v?v:"false"),a.searchParams.append("requireChildHasActiveVisit",null!==(f=null==d?void 0:d.toString())&&void 0!==f?f:"false"),a.searchParams.append("requireChildBornDuringMothersActiveVisit",null!==(y=null==s?void 0:s.toString())&&void 0!==y?y:"false"),r&&a.searchParams.append("v",r),(0,i.useOpenmrsFetchAll)(t?a:null)}var d="custom:(childAdmission,mother:(person,identifiers:full,uuid),child:(person,identifiers:full,uuid),motherAdmission)",c=t(77493),u=t(35487),p=t(53373),m=t.n(p),b=t(22623),h=t(59198),g=t(91480),v=t(36110),f=t(97019),y=t(37538);const A=function(e){var n,t=e.id,r=e.patient,i=e.visit,o=(0,u.UG)("coloredObsTags",t),s=null!=o?o:{},d=s.conceptUuid,c=s.summaryLabel,p=s.summaryLabelColor,m=(0,h.e)({patient:r.uuid,concept:d},null!=d,g.Fx),A=m.data,w=m.isLoading,$=(0,l.useTranslation)().t,C=(0,g.uk)(null!==(n=null==o?void 0:o.tags)&&void 0!==n?n:[]);if(w)return a().createElement("div",{className:y.A.wardPatientCardRow},a().createElement(v.A,null));var E,_,k=null==A?void 0:A.filter(function(e){var n;return(null===(n=e.encounter.visit)||void 0===n?void 0:n.uuid)==(null==i?void 0:i.uuid)}),B=null!=c?$(c):null==k||null===(_=k[0])||void 0===_||null===(E=_.concept)||void 0===E?void 0:E.display,P=[],x=null==k?void 0:k.map(function(e){var n=e.value,t=n.display,r=n.uuid,i=null==C?void 0:C.get(r);return i?a().createElement(f.A,{tooltipContent:(0,g.Fe)(e,$)},a().createElement(b.vwO,{type:i,key:"ward-coded-obs-tag-".concat(e.uuid)},t)):(P.push(a().createElement("div",{key:r},t," (",(0,g.Fe)(e,$),")")),null)}).filter(function(e){return null!=e});return(null==x?void 0:x.length)>0||P.length>0?a().createElement("div",{className:y.A.wardPatientCardRow},a().createElement("span",{className:y.A.wardPatientObsLabel},x,P.length>0?a().createElement(f.A,{tooltipContent:P},a().createElement(b.vwO,{type:p},$("countItems","{{count}} {{item}}",{count:P.length,item:B}))):null)):null};var w=t(85132),$=t(92182);const C=function(e){var n,t,r=e.patient,i=e.id,o=null==r||null===(n=r.person)||void 0===n?void 0:n.preferredAddress,l=(0,u.UG)("patientAddress",i);return a().createElement(a().Fragment,null,null==l||null===(t=l.fields)||void 0===t?void 0:t.map(function(e,n){return(null==o?void 0:o[e])?a().createElement("div",{key:n},null==o?void 0:o[e]):a().createElement("div",{key:n})}))};var E=t(7928),_=t(56546),k=t(83183),B=t(86901);const P=function(e){var n=e.wardPatient,t=n.patient,r=n.bed,i=n.visit,o=n.inpatientAdmission,l=(null!=o?o:{}).firstAdmissionOrTransferEncounter;return a().createElement("div",{className:m()(y.A.wardPatientCardRow,y.A.wardPatientCardHeader)},r?a().createElement($.A,{bed:r}):null,a().createElement(_.A,{patient:t}),a().createElement(E.A,{id:"patient-identifier",patient:t}),a().createElement(w.A,{patient:t}),a().createElement(C,{id:"patient-address",patient:t}),a().createElement(k.A,{id:"admission-reason",patient:t,visit:i}),a().createElement(B.A,{firstAdmissionOrTransferEncounter:l}))};var x=t(72591),O=t.n(x),N=t(1740),D=t.n(N),I=t(88128),S=t.n(I),T=t(30855),M=t.n(T),R=t(93051),L=t.n(R),q=t(73656),F=t.n(q),H=t(14568),U={};U.styleTagTransform=F(),U.setAttributes=M(),U.insert=S().bind(null,"head"),U.domAPI=D(),U.insertStyleElement=L(),O()(H.A,U);const G=H.A&&H.A.locals?H.A.locals:void 0,j=function(e){var n,t=e.inpatientAdmission,r=null==t||null===(n=t.encounterAssigningToCurrentInpatientLocation.location)||void 0===n?void 0:n.display;return r?a().createElement("div",null,a().createElement("span",null,r)):a().createElement(a().Fragment,null)};var V=t(48621),W={};W.styleTagTransform=F(),W.setAttributes=M(),W.insert=S().bind(null,"head"),W.domAPI=D(),W.insertStyleElement=L(),O()(V.A,W);const X=V.A&&V.A.locals?V.A.locals:void 0;var Y=function(e){var n=e.otherPatient,t=e.otherPatientAdmission,r=e.isOtherPatientTheMother?i.MotherIcon:i.BabyIcon;return a().createElement("div",{key:n.uuid,className:m()(X.motherOrBabyRow,y.A.wardPatientCardRow)},a().createElement("div",{className:X.motherOrBabyIconDiv},a().createElement(r,{className:X.motherOrBabyIcon,size:24})),a().createElement("div",{className:m()(X.motherOrBabyRowElementsDiv,y.A.dotSeparatedChildren)},a().createElement(_.A,{patient:n}),a().createElement(E.A,{id:"patient-identifier",patient:n}),a().createElement(w.A,{patient:n}),a().createElement(j,{inpatientAdmission:t})))};const z=function(e){var n,t=e.wardPatient,r=e.childrenOfWardPatientInSameBed,o=t.patient,l=(null!==(n=(0,i.useAppContext)("maternal-ward-view-context"))&&void 0!==n?n:{}).motherChildRelationships,s=null!=l?l:{},d=s.childrenByMotherUuid,c=s.motherByChildUuid,u=null==c?void 0:c.get(o.uuid),p=null==d?void 0:d.get(o.uuid),m=null==p?void 0:p.filter(function(e){return!(null==r?void 0:r.some(function(n){return n.patient.uuid==e.patient.uuid}))});return a().createElement(a().Fragment,null,u&&a().createElement(Y,{otherPatient:u.patient,otherPatientAdmission:u.currentAdmission,isOtherPatientTheMother:!0}),null==m?void 0:m.map(function(e){return a().createElement(Y,{key:e.patient.uuid,otherPatient:e.patient,otherPatientAdmission:e.currentAdmission,isOtherPatientTheMother:!1})}))};var J=t(92058),Q=t(1248),Z=t(77),K=t(95925);function ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ne(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var te=function(){var e=(0,l.useTranslation)().t;return a().createElement("div",{className:G.motherChildBedDivider},a().createElement("div",{className:G.motherChildBedDividerLine}),a().createElement(b.vwO,{type:"purple"},e("motherChildBedShare","Mother / Child")),a().createElement("div",{className:G.motherChildBedDividerLine}))};const re=function(e){var n=e.wardPatient,t=e.childrenOfWardPatientInSameBed,r=n.patient,i=n.visit,o=n.bed,l=n.inpatientAdmission,s=(null!=l?l:{}).encounterAssigningToCurrentInpatientLocation,d=a().createElement(a().Fragment,null,a().createElement(Q.A,{wardPatient:n,relatedTransferPatients:t},a().createElement(P,{wardPatient:n}),a().createElement("div",{className:m()(y.A.wardPatientCardRow,y.A.dotSeparatedChildren)},a().createElement(Z.A,{encounterAssigningToCurrentInpatientLocation:s}),a().createElement(k.A,{id:"gravida",patient:r,visit:i})),a().createElement(K.A,{wardPatient:n}),a().createElement(J.A,{id:"pending-items",wardPatient:n}),a().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){ne(e,n,t[n])})}return e}({id:"pregnancy-complications"},n)),a().createElement(z,e)),null==t?void 0:t.map(function(e){var r,i=[n].concat(function(e){if(Array.isArray(e))return ee(e)}(r=t.filter(function(n){return n.patient.uuid!==e.patient.uuid}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,n){if(e){if("string"==typeof e)return ee(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ee(e,n):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return a().createElement(a().Fragment,{key:e.patient.uuid},a().createElement(te,null),a().createElement(Q.A,{wardPatient:e,relatedTransferPatients:i},a().createElement(P,{wardPatient:e}),a().createElement(J.A,{id:"pending-items",wardPatient:e})))}));return o?d:a().createElement("div",{className:y.A.unassignedPatient},a().createElement("div",{key:"unassigned-bed-pt-"+n.patient.uuid},d))},ae=function(e){var n,t=null!=e?e:{},r=t.motherByChildUuid,o=t.isLoading,l=(null!==(n=(0,i.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,s=null!=l?l:{},d=s.bedLayouts,p=s.wardAdmittedPatientsWithBed,m=s.inpatientAdmissionsByPatientUuid,b=null==d?void 0:d.map(function(e){var n=e.patients,t=(0,u.yZ)(e),i=new Map,l=n.map(function(e){var n=null==p?void 0:p.get(e.uuid);if(n){var r=n.patient,a=n.visit,i=n.currentInpatientRequest;return{patient:r,visit:a,bed:t,inpatientAdmission:n,inpatientRequest:i||null}}var o=m.get(e.uuid);return{patient:e,visit:null==o?void 0:o.visit,bed:t,inpatientAdmission:o,inpatientRequest:null}}).filter(function(e){var t,a=e.patient.uuid,o=(null!==(t=null==r?void 0:r.get(a))&&void 0!==t?t:{}).patient,l=n.some(function(e){return e.uuid==(null==o?void 0:o.uuid)});return l&&(i.has(o.uuid)||i.set(o.uuid,[]),i.get(o.uuid).push(e)),!l}).map(function(e){return a().createElement(re,{key:e.patient.uuid,wardPatient:e,childrenOfWardPatientInSameBed:i.get(e.patient.uuid)})});return a().createElement(c.A,{key:t.uuid,bed:t,patientCards:l,isLoadingDivider:o})});return a().createElement(a().Fragment,null,b)};var ie=t(18359),oe=t(60607);function le(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const se=function(){var e,n=(null!==(e=(0,i.useAppContext)("ward-view-context"))&&void 0!==e?e:{}).wardPatientGroupDetails,t=(0,l.useTranslation)().t,r=(null!=n?n:{}).inpatientRequestResponse,o=null!=r?r:{},s=o.inpatientRequests,d=o.isLoading,c=o.error;return d?a().createElement(v.A,null):c?a().createElement(i.ErrorState,{headerTitle:t("admissionRequests","Admission requests"),error:c}):a().createElement(a().Fragment,null,null==s?void 0:s.map(function(e,n){var t={patient:e.patient,visit:e.visit,bed:null,inpatientRequest:e,inpatientAdmission:null};return a().createElement(oe.A,{key:"admission-request-card-".concat(n),wardPatient:t},a().createElement(A,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){le(e,n,t[n])})}return e}({id:"pregnancy-complications"},t)),a().createElement(z,{wardPatient:t,childrenOfWardPatientInSameBed:[]}),a().createElement(ie.A,{id:"admission-request-note",wardPatient:t}))}))},de=function(){var e,n=(null!==(e=(0,i.useAppContext)("ward-view-context"))&&void 0!==e?e:{}).wardPatientGroupDetails,t=(null!=n?n:{}).wardUnassignedPatientsList,r=null==t?void 0:t.map(function(e){return a().createElement(re,{wardPatient:{patient:e.patient,visit:e.visit,bed:null,inpatientAdmission:e,inpatientRequest:e.currentInpatientRequest},childrenOfWardPatientInSameBed:[],key:e.patient.uuid})});return a().createElement(a().Fragment,null,r)};var ce=t(75546),ue=t(18010);const pe=function(){var e=(0,o.u)();(0,i.useDefineAppContext)("ward-view-context",{wardPatientGroupDetails:e,WardPatientHeader:P});var n=e.allWardPatientUuids,t=e.isLoading,c=function(e,n){var t=(0,l.useTranslation)().t,a={children:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},o=s({mothers:e,requireMotherHasActiveVisit:!0,requireChildHasActiveVisit:!0,requireChildBornDuringMothersActiveVisit:!0},n&&e.length>0,d),c=o.data,u=o.isLoading,p=o.error,m=s(a,n&&e.length>0,d),b=m.data,h=m.isLoading,g=m.error;return p&&(0,i.showNotification)({title:t("errorLoadingChildren","Error loading children info"),kind:"error",critical:!0,description:null==p?void 0:p.message}),g&&(0,i.showNotification)({title:t("errorLoadingMother","Error loading mother info"),kind:"error",critical:!0,description:null==g?void 0:g.message}),(0,r.useMemo)(function(){var e=new Map,n=new Map,t=u||h,r=!0,a=!1,i=void 0;try{for(var o,l=(null!=b?b:[])[Symbol.iterator]();!(r=(o=l.next()).done);r=!0){var s=o.value,d=s.child,p=s.childAdmission,m=s.mother,g=s.motherAdmission;e.set(d.uuid,{patient:m,currentAdmission:g}),n.has(m.uuid)||n.set(m.uuid,[]),n.get(m.uuid).push({patient:d,currentAdmission:p})}}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}var v=!0,f=!1,y=void 0;try{for(var A,w=function(){var t=A.value,r=t.child,a=t.childAdmission,i=t.mother,o=t.motherAdmission;e.set(r.uuid,{patient:i,currentAdmission:o}),n.has(i.uuid)||n.set(i.uuid,[]);var l=n.get(i.uuid);l.some(function(e){return e.patient.uuid==r.uuid})||l.push({patient:r,currentAdmission:a})},$=(null!=c?c:[])[Symbol.iterator]();!(v=(A=$.next()).done);v=!0)w()}catch(e){f=!0,y=e}finally{try{v||null==$.return||$.return()}finally{if(f)throw y}}return{motherByChildUuid:e,childrenByMotherUuid:n,isLoading:t}},[c,b,u,h])}(Array.from(n),!t);(0,i.useDefineAppContext)("maternal-ward-view-context",{motherChildRelationships:c});var u=a().createElement(ae,c),p=a().createElement(de,null),m=a().createElement(se,null);return a().createElement(a().Fragment,null,a().createElement(ue.A,{wardPendingPatients:m}),a().createElement(ce.A,{wardBeds:u,wardUnassignedPatients:p}))}},48621:(e,n,t)=>{t.d(n,{A:()=>l});var r=t(30977),a=t.n(r),i=t(95924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__mother-child-row__motherOrBabyRow___9fHo5{display:flex}.-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7{flex:1}.-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC{display:flex;align-items:center}.-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a{padding:.25rem;border-radius:50%;background-color:#e0e0e0;margin-right:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-patient-card/card-rows/mother-child-row.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,sDACE,YAAA,CAGF,iEACE,MAAA,CAGF,0DACE,YAAA,CACA,kBAAA,CAGF,uDACE,cCDW,CDEX,iBAAA,CACA,wBDMO,CCLP,kBCCW",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.motherOrBabyRow {\n display: flex;\n}\n\n.motherOrBabyRowElementsDiv {\n flex: 1;\n}\n\n.motherOrBabyIconDiv {\n display: flex;\n align-items: center;\n}\n\n.motherOrBabyIcon {\n padding: layout.$spacing-02;\n border-radius: 50%;\n background-color: $grey-2;\n margin-right: layout.$spacing-03;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),o.locals={motherOrBabyRow:"-esm-ward__mother-child-row__motherOrBabyRow___9fHo5",motherOrBabyRowElementsDiv:"-esm-ward__mother-child-row__motherOrBabyRowElementsDiv___bHVH7",motherOrBabyIconDiv:"-esm-ward__mother-child-row__motherOrBabyIconDiv___mENJC",motherOrBabyIcon:"-esm-ward__mother-child-row__motherOrBabyIcon___8SN9a"};const l=o}}]);
|
package/dist/7179.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7179.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[7179],{13002:(e,n,t)=>{t.d(n,{E:()=>s,R_:()=>o,Tb:()=>u,tf:()=>d});var r=t(54440),i=t(65980),a=t(92891);function o(){var e=(0,a.A)().location,n=(0,r.useSession)().currentProvider,t=(0,i.A)(),o=t.emrConfiguration,s=t.isLoadingEmrConfiguration,d=t.errorFetchingEmrConfiguration;return{createEncounter:function(t,i,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],d={patient:t.uuid,encounterType:i,location:null==e?void 0:e.uuid,encounterProviders:[{provider:null==n?void 0:n.uuid,encounterRole:o.clinicianEncounterRole.uuid}],obs:s,visit:a};return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/encounter"),{method:"POST",headers:{"content-type":"application/json"},body:d})},emrConfiguration:o,isLoadingEmrConfiguration:s,errorFetchingEmrConfiguration:d}}function s(){var e=o(),n=e.createEncounter,t=e.emrConfiguration;return{admitPatient:function(e,r,i){var a="ADMIT"===r?t.admissionEncounterType:"TRANSFER"===r?t.transferWithinHospitalEncounterType:null;return n(e,a,i)},isLoadingEmrConfiguration:e.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:e.errorFetchingEmrConfiguration}}function d(e,n,t){return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/beds/").concat(e),{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:n,encounterUuid:t}})}function u(e,n){return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/beds/").concat(e,"?patientUuid=").concat(n),{method:"DELETE"})}},27179:(e,n,t)=>{t.r(n),t.d(n,{default:()=>A});var r=t(1343),i=t.n(r),a=t(93150),o=t(50174),s=t(54440),d=t(83209),u=t(42880);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["ADMIT","TRANSFER"],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"custom:(dispositionLocation,dispositionType,disposition,dispositionEncounter:full,patient:(uuid,identifiers,voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),dispositionObsGroup,visit)",r=new URLSearchParams;r.set("dispositionType",n.join(",")),r.set("patients",null==e?void 0:e.join(",")),r.set("v",t);var i=(0,s.useOpenmrsFetchAll)((null==e?void 0:e.length)>0?"".concat(s.restBaseUrl,"/emrapi/inpatient/request?").concat(r.toString()):null);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){c(e,n,t[n])})}return e}({inpatientRequests:i.data},function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(i,["data"]))}var f=t(88010),p=t.n(f);function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom:(uuid,identifiers,voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate))",t=p()(e?"".concat(s.restBaseUrl,"/patient/").concat(e,"?v=").concat(n):null,s.openmrsFetch),i=t.data,a=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,["data"]),o=(0,r.useMemo)(function(){return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){m(e,n,t[n])})}return e}({patient:null==i?void 0:i.data},a)},[i,a]);return o}var v=t(92891),b=t(99244),h=t(81776);function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){y(e,n,t[n])})}return e}const A=function(e){var n=e.patientUuid,t=e.handleReturnToSearchList,r=e.closeWorkspaceWithSavedChanges,c=(0,v.A)().location,f=g(n),p=f.patient,m=f.isLoading,y=f.error,A=(0,s.useVisit)(n),w=A.activeVisit,k=A.isLoading,T=A.error,C=(0,a.useTranslation)().t,S=(0,d.r)(n),P=S.data,O=S.isLoading,L=S.error,R=(0,u.k)([n]),$=R.data,U=R.isLoading,D=R.error,F=l([n]),I=F.inpatientRequests,_=F.isLoading,j=F.error,x=y||T||L||D||j;if(m||k||O||U||_)return i().createElement(o.rrI,null);if(x)return i().createElement("div",null,i().createElement(o.jeF,{kind:"error",lowContrast:!0,title:C("errorLoadingPatientInfo","Error loading patient info")}),i().createElement(o.$nd,{kind:"ghost",renderIcon:function(e){return i().createElement(s.ArrowLeftIcon,E({size:24},e))},iconDescription:C("backToSearchResults","Back to search results"),size:"sm",onClick:function(){return null==t?void 0:t()}},i().createElement("span",null,C("backToSearchResults","Back to search results"))));var B,V,N,W=P.data.results[0],M=(null==W||null===(B=W.physicalLocation)||void 0===B?void 0:B.uuid)==c.uuid,q=(null===(N=$[0])||void 0===N||null===(V=N.currentInpatientLocation)||void 0===V?void 0:V.uuid)==c.uuid,G=$[0]&&!q,H={patient:p,visit:w,bed:M?{id:W.bedId,bedNumber:W.bedNumber,bedType:W.bedType}:null,inpatientAdmission:$[0],inpatientRequest:null};return i().createElement("div",null,i().createElement(h.default,{wardPatient:H}),w?i().createElement("div",null,q&&i().createElement(o.jeF,{kind:"warning",lowContrast:!0,hideCloseButton:!0,title:C("patientAlreadyAdmittedToCurrentLocation","Patient already admitted to current location")}),G&&i().createElement(o.jeF,{kind:"warning",lowContrast:!0,hideCloseButton:!0,title:C("patientCurrentlyAdmittedToWardLocation","Patient currently admitted to {{wardLocation}}",{wardLocation:$[0].currentInpatientLocation.display})}),I[0]&&i().createElement(o.jeF,{kind:"warning",lowContrast:!0,hideCloseButton:!0,title:C("patientHasPendingAdmissionRequest","Patient already has a pending admission request to location {{location}}",{location:I[0].dispositionLocation.display})}),i().createElement(b.A,{wardPatient:H,dispositionType:$[0]?"TRANSFER":"ADMIT",onAdmitPatientSuccess:function(){return r()},disabled:q})):i().createElement("div",null,C("patienthasNoActiveVisit","Patient has no active visit")),i().createElement(o.$nd,{kind:"ghost",renderIcon:function(e){return i().createElement(s.ArrowLeftIcon,E({size:24},e))},iconDescription:C("backToSearchResults","Back to search results"),size:"sm",onClick:function(){return null==t?void 0:t()}},i().createElement("span",null,C("backToSearchResults","Back to search results"))))}},42880:(e,n,t)=>{t.d(n,{k:()=>i});var r=t(54440);function i(e){var n=(null==e?void 0:e.length)>0,t=new URLSearchParams;t.append("v","custom:(visit,patient:(uuid,identifiers:(uuid,display,identifier,identifierType),voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),encounterAssigningToCurrentInpatientLocation:(encounterDatetime),currentInpatientRequest:(dispositionLocation,dispositionType,disposition:(uuid,display),dispositionEncounter:(uuid,display),dispositionObsGroup:(uuid,display),visit:(uuid),patient:(uuid)),firstAdmissionOrTransferEncounter:(encounterDatetime),currentInpatientLocation,)");var i=!0,a=!1,o=void 0;try{for(var s,d=(null!=e?e:[])[Symbol.iterator]();!(i=(s=d.next()).done);i=!0){var u=s.value;t.append("patients",u)}}catch(e){a=!0,o=e}finally{try{i||null==d.return||d.return()}finally{if(a)throw o}}return(0,r.useOpenmrsFetchAll)(n?"".concat(r.restBaseUrl,"/emrapi/inpatient/admission?").concat(t.toString()):null)}},58139:(e,n,t)=>{e.exports=t(93296)},65980:(e,n,t)=>{t.d(n,{A:()=>d});var r=t(54440),i=t(1343),a=t(88010),o=t.n(a),s="custom:".concat([["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["admissionDecisionConcept","ref"],["denyAdmissionConcept","ref"]].map(function(e){return e.join(":")}).join(","));function d(){var e=o()("".concat(r.restBaseUrl,"/emrapi/configuration?v=").concat(s),r.openmrsFetch);return(0,i.useMemo)(function(){var n;return{emrConfiguration:null===(n=e.data)||void 0===n?void 0:n.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}},[e])}},71123:(e,n,t)=>{t.d(n,{Ay:()=>u,BE:()=>d});var r=t(1343),i=t(58139),a=t(55434);const o=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(n=>{e.status="fulfilled",e.value=n},n=>{e.status="rejected",e.reason=n}),e)}),s={dedupe:!0},d=a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig}),u=(0,a.withArgs)((e,n,t)=>{const{cache:d,compare:u,suspense:c,fallbackData:l,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:m,refreshWhenHidden:g,refreshWhenOffline:v,keepPreviousData:b}=t,[h,y,E,A]=a.SWRGlobalState.get(d),[w,k]=(0,a.serialize)(e),T=(0,r.useRef)(!1),C=(0,r.useRef)(!1),S=(0,r.useRef)(w),P=(0,r.useRef)(n),O=(0,r.useRef)(t),L=()=>O.current,R=()=>L().isVisible()&&L().isOnline(),[$,U,D,F]=(0,a.createCacheHelper)(d,w),I=(0,r.useRef)({}).current,_=(0,a.isUndefined)(l)?t.fallback[w]:l,j=(e,n)=>{for(const t in I){const r=t;if("data"===r){if(!u(e[r],n[r])){if(!(0,a.isUndefined)(e[r]))return!1;if(!u(H,n[r]))return!1}}else if(n[r]!==e[r])return!1}return!0},x=(0,r.useMemo)(()=>{const e=!!w&&!!n&&((0,a.isUndefined)(f)?!L().isPaused()&&!c&&(!!(0,a.isUndefined)(p)||p):f),t=n=>{const t=(0,a.mergeObjects)(n);return delete t._k,e?{isValidating:!0,isLoading:!0,...t}:t},r=$(),i=F(),o=t(r),s=r===i?o:t(i);let d=o;return[()=>{const e=t($());return j(e,d)?(d.data=e.data,d.isLoading=e.isLoading,d.isValidating=e.isValidating,d.error=e.error,d):(d=e,e)},()=>s]},[d,w]),B=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>D(w,(n,t)=>{j(t,n)||e()}),[d,w]),x[0],x[1]),V=!T.current,N=h[w]&&h[w].length>0,W=B.data,M=(0,a.isUndefined)(W)?_:W,q=B.error,G=(0,r.useRef)(M),H=b?(0,a.isUndefined)(W)?G.current:W:M,z=!(N&&!(0,a.isUndefined)(q))&&(V&&!(0,a.isUndefined)(f)?f:!L().isPaused()&&(c?!(0,a.isUndefined)(M)&&p:(0,a.isUndefined)(M)||p)),K=!!(w&&n&&V&&z),Y=(0,a.isUndefined)(B.isValidating)?K:B.isValidating,J=(0,a.isUndefined)(B.isLoading)?K:B.isLoading,Q=(0,r.useCallback)(async e=>{const n=P.current;if(!w||!n||C.current||L().isPaused())return!1;let r,i,o=!0;const s=e||{},d=!E[w]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!C.current&&w===S.current&&T.current:w===S.current,l={isValidating:!1,isLoading:!1},f=()=>{U(l)},p=()=>{const e=E[w];e&&e[1]===i&&delete E[w]},m={isValidating:!0};(0,a.isUndefined)($().data)&&(m.isLoading=!0);try{if(d&&(U(m),t.loadingTimeout&&(0,a.isUndefined)($().data)&&setTimeout(()=>{o&&c()&&L().onLoadingSlow(w,t)},t.loadingTimeout),E[w]=[n(k),(0,a.getTimestamp)()]),[r,i]=E[w],r=await r,d&&setTimeout(p,t.dedupingInterval),!E[w]||E[w][1]!==i)return d&&c()&&L().onDiscarded(w),!1;l.error=a.UNDEFINED;const e=y[w];if(!(0,a.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),d&&c()&&L().onDiscarded(w),!1;const s=$().data;l.data=u(s,r)?s:r,d&&c()&&L().onSuccess(r,w,t)}catch(e){p();const n=L(),{shouldRetryOnError:t}=n;n.isPaused()||(l.error=e,d&&c()&&(n.onError(e,w,n),(!0===t||(0,a.isFunction)(t)&&t(e))&&(L().revalidateOnFocus&&L().revalidateOnReconnect&&!R()||n.onErrorRetry(e,w,n,e=>{const n=h[w];n&&n[0]&&n[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0}))))}return o=!1,f(),!0},[w,d]),X=(0,r.useCallback)((...e)=>(0,a.internalMutate)(d,S.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{P.current=n,O.current=t,(0,a.isUndefined)(W)||(G.current=W)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!w)return;const e=Q.bind(a.UNDEFINED,s);let n=0;const t=(0,a.subscribeCallback)(w,h,(t,r={})=>{if(t==a.revalidateEvents.FOCUS_EVENT){const t=Date.now();L().revalidateOnFocus&&t>n&&R()&&(n=t+L().focusThrottleInterval,e())}else if(t==a.revalidateEvents.RECONNECT_EVENT)L().revalidateOnReconnect&&R()&&e();else{if(t==a.revalidateEvents.MUTATE_EVENT)return Q();if(t==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return C.current=!1,S.current=w,T.current=!0,U({_k:k}),z&&((0,a.isUndefined)(M)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{C.current=!0,t()}},[w]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function n(){const n=(0,a.isFunction)(m)?m($().data):m;n&&-1!==e&&(e=setTimeout(t,n))}function t(){$().error||!g&&!L().isVisible()||!v&&!L().isOnline()?n():Q(s).then(n)}return n(),()=>{e&&(clearTimeout(e),e=-1)}},[m,g,v,w]),(0,r.useDebugValue)(H),c&&(0,a.isUndefined)(M)&&w){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");P.current=n,O.current=t,C.current=!1;const e=A[w];if(!(0,a.isUndefined)(e)){const n=X(e);o(n)}if(!(0,a.isUndefined)(q))throw q;{const e=Q(s);(0,a.isUndefined)(H)||(e.status="fulfilled",e.value=!0),o(e)}}return{mutate:X,get data(){return I.data=!0,H},get error(){return I.error=!0,q},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,J}}})},71296:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(30977),i=t.n(r),a=t(95924),o=t.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__style__wardWorkspacePatientBanner___2KnUU>div{background:#f4f4f4}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/patient-banner/style.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DA,0DACE,kBDFI",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.wardWorkspacePatientBanner {\n > div {\n background: $ui-01;\n }\n}\n"],sourceRoot:""}]),o.locals={wardWorkspacePatientBanner:"-esm-ward__style__wardWorkspacePatientBanner___2KnUU"};const s=o},81776:(e,n,t)=>{t.r(n),t.d(n,{default:()=>A});var r=t(54440),i=t(1343),a=t.n(i),o=t(72591),s=t.n(o),d=t(1740),u=t.n(d),c=t(88128),l=t.n(c),f=t(30855),p=t.n(f),m=t(93051),g=t.n(m),v=t(73656),b=t.n(v),h=t(71296),y={};y.styleTagTransform=b(),y.setAttributes=p(),y.insert=l().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=g(),s()(h.A,y);const E=h.A&&h.A.locals?h.A.locals:void 0,A=function(e){var n,t=e.wardPatient,i=(null!=t?t:{}).patient,o=(null!==(n=(0,r.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).WardPatientHeader;return i?o?a().createElement("div",{className:E.wardWorkspacePatientBanner},a().createElement(o,{wardPatient:t})):a().createElement(a().Fragment,null):(console.warn("Patient details were not received by the ward workspace"),null)}},83209:(e,n,t)=>{t.d(n,{r:()=>a});var r=t(54440),i=t(71123);function a(e){var n="".concat(r.restBaseUrl,"/beds?patientUuid=").concat(e);return(0,i.Ay)(n,r.openmrsFetch)}},92891:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(54440),i=t(8877),a=t(88010),o=t.n(a);function s(){var e=(0,i.useParams)().locationUuid,n=(0,r.useSession)().sessionLocation,t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom:(display,uuid)";return o()(e?"".concat(r.restBaseUrl,"/location/").concat(e,"?v=").concat(n):null,r.openmrsFetch)}(e||null),a=t.data,s=t.isLoading,d=t.error,u=e&&d;return{location:e?null==a?void 0:a.data:n,isLoadingLocation:s,errorFetchingLocation:d,invalidLocation:u}}},93296:(e,n,t)=>{var r=t(1343),i="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,d=r.useDebugValue;function u(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!i(e,t)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,n){return n()}:function(e,n){var t=n(),r=a({inst:{value:t,getSnapshot:n}}),i=r[0].inst,c=r[1];return s(function(){i.value=t,i.getSnapshot=n,u(i)&&c({inst:i})},[e,t,n]),o(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),d(t),t};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},99244:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(50174),i=t(54440),a=t(1343),o=t.n(a),s=t(93150),d=t(92891),u=t(13002);const c=function(e){var n,t=e.wardPatient,a=e.onAdmitPatientSuccess,c=e.disabled,l=e.dispositionType,f=null!=t?t:{},p=f.patient,m=f.visit,g=f.bed,v=(0,s.useTranslation)().t,b=(0,d.A)().location,h="tablet"===(0,i.useLayoutType)()?"lg":"md",y=(null!==(n=(0,i.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,E=(0,u.E)(),A=E.admitPatient,w=E.isLoadingEmrConfiguration,k=E.errorFetchingEmrConfiguration,T=(0,i.useFeatureFlag)("bedmanagement-module"),C=w||k||c;return o().createElement(r.$nd,{kind:"ghost",renderIcon:i.ArrowRightIcon,size:h,disabled:C,onClick:function(){T&&!g?(0,i.launchWorkspace)("admit-patient-form-workspace",{wardPatient:t}):A(p,l,m.uuid).then(function(e){e&&(null==e?void 0:e.ok)&&(0,i.showSnackbar)({kind:"success",title:v("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:v("patientAdmittedWoBed","Patient admitted successfully to {{location}}",{location:null==b?void 0:b.display})})},function(e){(0,i.showSnackbar)({kind:"error",title:v("errorCreatingEncounter","Failed to admit patient"),subtitle:e.message})}).finally(function(){var e;null==y||null===(e=y.mutate)||void 0===e||e.call(y),a()})}},"ADMIT"==l||C?v("admitPatient","Admit patient"):v("transferPatient","Transfer patient"))}}}]);
|
|
2
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[7179],{13002:(e,n,t)=>{t.d(n,{E:()=>s,R_:()=>o,Tb:()=>u,tf:()=>d});var r=t(54440),i=t(65980),a=t(92891);function o(){var e=(0,a.A)().location,n=(0,r.useSession)().currentProvider,t=(0,i.A)(),o=t.emrConfiguration,s=t.isLoadingEmrConfiguration,d=t.errorFetchingEmrConfiguration;return{createEncounter:function(t,i,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],d={patient:t.uuid,encounterType:i,location:null==e?void 0:e.uuid,encounterProviders:[{provider:null==n?void 0:n.uuid,encounterRole:o.clinicianEncounterRole.uuid}],obs:s,visit:a};return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/encounter"),{method:"POST",headers:{"content-type":"application/json"},body:d})},emrConfiguration:o,isLoadingEmrConfiguration:s,errorFetchingEmrConfiguration:d}}function s(){var e=o(),n=e.createEncounter,t=e.emrConfiguration;return{admitPatient:function(e,r,i){var a="ADMIT"===r?t.admissionEncounterType:"TRANSFER"===r?t.transferWithinHospitalEncounterType:null;return n(e,a,i)},isLoadingEmrConfiguration:e.isLoadingEmrConfiguration,errorFetchingEmrConfiguration:e.errorFetchingEmrConfiguration}}function d(e,n,t){return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/beds/").concat(e),{method:"POST",headers:{"content-type":"application/json"},body:{patientUuid:n,encounterUuid:t}})}function u(e,n){return(0,r.openmrsFetch)("".concat(r.restBaseUrl,"/beds/").concat(e,"?patientUuid=").concat(n),{method:"DELETE"})}},27179:(e,n,t)=>{t.r(n),t.d(n,{default:()=>A});var r=t(1343),i=t.n(r),a=t(93150),o=t(22623),s=t(54440),d=t(83209),u=t(42880);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["ADMIT","TRANSFER"],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"custom:(dispositionLocation,dispositionType,disposition,dispositionEncounter:full,patient:(uuid,identifiers,voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),dispositionObsGroup,visit)",r=new URLSearchParams;r.set("dispositionType",n.join(",")),r.set("patients",null==e?void 0:e.join(",")),r.set("v",t);var i=(0,s.useOpenmrsFetchAll)((null==e?void 0:e.length)>0?"".concat(s.restBaseUrl,"/emrapi/inpatient/request?").concat(r.toString()):null);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){c(e,n,t[n])})}return e}({inpatientRequests:i.data},function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(i,["data"]))}var f=t(88010),p=t.n(f);function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom:(uuid,identifiers,voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate))",t=p()(e?"".concat(s.restBaseUrl,"/patient/").concat(e,"?v=").concat(n):null,s.openmrsFetch),i=t.data,a=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,["data"]),o=(0,r.useMemo)(function(){return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){m(e,n,t[n])})}return e}({patient:null==i?void 0:i.data},a)},[i,a]);return o}var v=t(92891),b=t(99244),h=t(81776);function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){y(e,n,t[n])})}return e}const A=function(e){var n=e.patientUuid,t=e.handleReturnToSearchList,r=e.closeWorkspaceWithSavedChanges,c=(0,v.A)().location,f=g(n),p=f.patient,m=f.isLoading,y=f.error,A=(0,s.useVisit)(n),w=A.activeVisit,k=A.isLoading,T=A.error,C=(0,a.useTranslation)().t,S=(0,d.r)(n),P=S.data,O=S.isLoading,L=S.error,R=(0,u.k)([n]),$=R.data,U=R.isLoading,D=R.error,F=l([n]),I=F.inpatientRequests,_=F.isLoading,j=F.error,x=y||T||L||D||j;if(m||k||O||U||_)return i().createElement(o.rrI,null);if(x)return i().createElement("div",null,i().createElement(o.jeF,{kind:"error",lowContrast:!0,title:C("errorLoadingPatientInfo","Error loading patient info")}),i().createElement(o.$nd,{kind:"ghost",renderIcon:function(e){return i().createElement(s.ArrowLeftIcon,E({size:24},e))},iconDescription:C("backToSearchResults","Back to search results"),size:"sm",onClick:function(){return null==t?void 0:t()}},i().createElement("span",null,C("backToSearchResults","Back to search results"))));var B,V,N,W=P.data.results[0],M=(null==W||null===(B=W.physicalLocation)||void 0===B?void 0:B.uuid)==c.uuid,q=(null===(N=$[0])||void 0===N||null===(V=N.currentInpatientLocation)||void 0===V?void 0:V.uuid)==c.uuid,G=$[0]&&!q,H={patient:p,visit:w,bed:M?{id:W.bedId,bedNumber:W.bedNumber,bedType:W.bedType}:null,inpatientAdmission:$[0],inpatientRequest:null};return i().createElement("div",null,i().createElement(h.default,{wardPatient:H}),w?i().createElement("div",null,q&&i().createElement(o.jeF,{kind:"warning",lowContrast:!0,hideCloseButton:!0,title:C("patientAlreadyAdmittedToCurrentLocation","Patient already admitted to current location")}),G&&i().createElement(o.jeF,{kind:"warning",lowContrast:!0,hideCloseButton:!0,title:C("patientCurrentlyAdmittedToWardLocation","Patient currently admitted to {{wardLocation}}",{wardLocation:$[0].currentInpatientLocation.display})}),I[0]&&i().createElement(o.jeF,{kind:"warning",lowContrast:!0,hideCloseButton:!0,title:C("patientHasPendingAdmissionRequest","Patient already has a pending admission request to location {{location}}",{location:I[0].dispositionLocation.display})}),i().createElement(b.A,{wardPatient:H,dispositionType:$[0]?"TRANSFER":"ADMIT",onAdmitPatientSuccess:function(){return r()},disabled:q})):i().createElement("div",null,C("patienthasNoActiveVisit","Patient has no active visit")),i().createElement(o.$nd,{kind:"ghost",renderIcon:function(e){return i().createElement(s.ArrowLeftIcon,E({size:24},e))},iconDescription:C("backToSearchResults","Back to search results"),size:"sm",onClick:function(){return null==t?void 0:t()}},i().createElement("span",null,C("backToSearchResults","Back to search results"))))}},42880:(e,n,t)=>{t.d(n,{k:()=>i});var r=t(54440);function i(e){var n=(null==e?void 0:e.length)>0,t=new URLSearchParams;t.append("v","custom:(visit,patient:(uuid,identifiers:(uuid,display,identifier,identifierType),voided,person:(uuid,display,gender,age,birthdate,birthtime,preferredName,preferredAddress,dead,deathDate)),encounterAssigningToCurrentInpatientLocation:(encounterDatetime),currentInpatientRequest:(dispositionLocation,dispositionType,disposition:(uuid,display),dispositionEncounter:(uuid,display),dispositionObsGroup:(uuid,display),visit:(uuid),patient:(uuid)),firstAdmissionOrTransferEncounter:(encounterDatetime),currentInpatientLocation,)");var i=!0,a=!1,o=void 0;try{for(var s,d=(null!=e?e:[])[Symbol.iterator]();!(i=(s=d.next()).done);i=!0){var u=s.value;t.append("patients",u)}}catch(e){a=!0,o=e}finally{try{i||null==d.return||d.return()}finally{if(a)throw o}}return(0,r.useOpenmrsFetchAll)(n?"".concat(r.restBaseUrl,"/emrapi/inpatient/admission?").concat(t.toString()):null)}},58139:(e,n,t)=>{e.exports=t(93296)},65980:(e,n,t)=>{t.d(n,{A:()=>d});var r=t(54440),i=t(1343),a=t(88010),o=t.n(a),s="custom:".concat([["metadataSourceName","ref"],["orderingProviderEncounterRole","ref"],["supportsTransferLocationTag","(uuid,display,name,links)"],["unknownLocation","ref"],["denyAdmissionConcept","ref"],["admissionForm","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["consultFreeTextCommentsConcept","ref"],["sameAsConceptMapType","ref"],["testPatientPersonAttributeType","ref"],["admissionDecisionConcept","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["checkInEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["suppressedDiagnosisConcepts","ref"],["primaryIdentifierType","ref"],["nonDiagnosisConceptSets","ref"],["fullPrivilegeLevel","ref"],["unknownProvider","ref"],["diagnosisSets","ref"],["personImageDirectory","ref"],["visitNoteEncounterType","ref"],["inpatientNoteEncounterType","ref"],["transferRequestEncounterType","ref"],["consultEncounterType","ref"],["diagnosisMetadata","ref"],["narrowerThanConceptMapType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["patientDiedConcept","ref"],["emrApiConceptSource","ref"],["lastViewedPatientSizeLimit","ref"],["identifierTypesToSearch","ref"],["telephoneAttributeType","ref"],["checkInClerkEncounterRole","ref"],["dischargeForm","ref"],["unknownCauseOfDeathConcept","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["atFacilityVisitType","ref"],["visitExpireHours","ref"],["admissionEncounterType","ref"],["motherChildRelationshipType","ref"],["dispositions","ref"],["dispositionDescriptor","ref"],["highPrivilegeLevel","ref"],["supportsLoginLocationTag","(uuid,display,name,links)"],["unknownPatientPersonAttributeType","ref"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["transferForm","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["admissionDecisionConcept","ref"],["denyAdmissionConcept","ref"]].map(function(e){return e.join(":")}).join(","));function d(){var e=o()("".concat(r.restBaseUrl,"/emrapi/configuration?v=").concat(s),r.openmrsFetch);return(0,i.useMemo)(function(){var n;return{emrConfiguration:null===(n=e.data)||void 0===n?void 0:n.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}},[e])}},71123:(e,n,t)=>{t.d(n,{Ay:()=>u,BE:()=>d});var r=t(1343),i=t(58139),a=t(55434);const o=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(n=>{e.status="fulfilled",e.value=n},n=>{e.status="rejected",e.reason=n}),e)}),s={dedupe:!0},d=a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig}),u=(0,a.withArgs)((e,n,t)=>{const{cache:d,compare:u,suspense:c,fallbackData:l,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:m,refreshWhenHidden:g,refreshWhenOffline:v,keepPreviousData:b}=t,[h,y,E,A]=a.SWRGlobalState.get(d),[w,k]=(0,a.serialize)(e),T=(0,r.useRef)(!1),C=(0,r.useRef)(!1),S=(0,r.useRef)(w),P=(0,r.useRef)(n),O=(0,r.useRef)(t),L=()=>O.current,R=()=>L().isVisible()&&L().isOnline(),[$,U,D,F]=(0,a.createCacheHelper)(d,w),I=(0,r.useRef)({}).current,_=(0,a.isUndefined)(l)?t.fallback[w]:l,j=(e,n)=>{for(const t in I){const r=t;if("data"===r){if(!u(e[r],n[r])){if(!(0,a.isUndefined)(e[r]))return!1;if(!u(H,n[r]))return!1}}else if(n[r]!==e[r])return!1}return!0},x=(0,r.useMemo)(()=>{const e=!!w&&!!n&&((0,a.isUndefined)(f)?!L().isPaused()&&!c&&(!!(0,a.isUndefined)(p)||p):f),t=n=>{const t=(0,a.mergeObjects)(n);return delete t._k,e?{isValidating:!0,isLoading:!0,...t}:t},r=$(),i=F(),o=t(r),s=r===i?o:t(i);let d=o;return[()=>{const e=t($());return j(e,d)?(d.data=e.data,d.isLoading=e.isLoading,d.isValidating=e.isValidating,d.error=e.error,d):(d=e,e)},()=>s]},[d,w]),B=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>D(w,(n,t)=>{j(t,n)||e()}),[d,w]),x[0],x[1]),V=!T.current,N=h[w]&&h[w].length>0,W=B.data,M=(0,a.isUndefined)(W)?_:W,q=B.error,G=(0,r.useRef)(M),H=b?(0,a.isUndefined)(W)?G.current:W:M,z=!(N&&!(0,a.isUndefined)(q))&&(V&&!(0,a.isUndefined)(f)?f:!L().isPaused()&&(c?!(0,a.isUndefined)(M)&&p:(0,a.isUndefined)(M)||p)),K=!!(w&&n&&V&&z),Y=(0,a.isUndefined)(B.isValidating)?K:B.isValidating,J=(0,a.isUndefined)(B.isLoading)?K:B.isLoading,Q=(0,r.useCallback)(async e=>{const n=P.current;if(!w||!n||C.current||L().isPaused())return!1;let r,i,o=!0;const s=e||{},d=!E[w]||!s.dedupe,c=()=>a.IS_REACT_LEGACY?!C.current&&w===S.current&&T.current:w===S.current,l={isValidating:!1,isLoading:!1},f=()=>{U(l)},p=()=>{const e=E[w];e&&e[1]===i&&delete E[w]},m={isValidating:!0};(0,a.isUndefined)($().data)&&(m.isLoading=!0);try{if(d&&(U(m),t.loadingTimeout&&(0,a.isUndefined)($().data)&&setTimeout(()=>{o&&c()&&L().onLoadingSlow(w,t)},t.loadingTimeout),E[w]=[n(k),(0,a.getTimestamp)()]),[r,i]=E[w],r=await r,d&&setTimeout(p,t.dedupingInterval),!E[w]||E[w][1]!==i)return d&&c()&&L().onDiscarded(w),!1;l.error=a.UNDEFINED;const e=y[w];if(!(0,a.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),d&&c()&&L().onDiscarded(w),!1;const s=$().data;l.data=u(s,r)?s:r,d&&c()&&L().onSuccess(r,w,t)}catch(e){p();const n=L(),{shouldRetryOnError:t}=n;n.isPaused()||(l.error=e,d&&c()&&(n.onError(e,w,n),(!0===t||(0,a.isFunction)(t)&&t(e))&&(L().revalidateOnFocus&&L().revalidateOnReconnect&&!R()||n.onErrorRetry(e,w,n,e=>{const n=h[w];n&&n[0]&&n[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0}))))}return o=!1,f(),!0},[w,d]),X=(0,r.useCallback)((...e)=>(0,a.internalMutate)(d,S.current,...e),[]);if((0,a.useIsomorphicLayoutEffect)(()=>{P.current=n,O.current=t,(0,a.isUndefined)(W)||(G.current=W)}),(0,a.useIsomorphicLayoutEffect)(()=>{if(!w)return;const e=Q.bind(a.UNDEFINED,s);let n=0;const t=(0,a.subscribeCallback)(w,h,(t,r={})=>{if(t==a.revalidateEvents.FOCUS_EVENT){const t=Date.now();L().revalidateOnFocus&&t>n&&R()&&(n=t+L().focusThrottleInterval,e())}else if(t==a.revalidateEvents.RECONNECT_EVENT)L().revalidateOnReconnect&&R()&&e();else{if(t==a.revalidateEvents.MUTATE_EVENT)return Q();if(t==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return C.current=!1,S.current=w,T.current=!0,U({_k:k}),z&&((0,a.isUndefined)(M)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{C.current=!0,t()}},[w]),(0,a.useIsomorphicLayoutEffect)(()=>{let e;function n(){const n=(0,a.isFunction)(m)?m($().data):m;n&&-1!==e&&(e=setTimeout(t,n))}function t(){$().error||!g&&!L().isVisible()||!v&&!L().isOnline()?n():Q(s).then(n)}return n(),()=>{e&&(clearTimeout(e),e=-1)}},[m,g,v,w]),(0,r.useDebugValue)(H),c&&(0,a.isUndefined)(M)&&w){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");P.current=n,O.current=t,C.current=!1;const e=A[w];if(!(0,a.isUndefined)(e)){const n=X(e);o(n)}if(!(0,a.isUndefined)(q))throw q;{const e=Q(s);(0,a.isUndefined)(H)||(e.status="fulfilled",e.value=!0),o(e)}}return{mutate:X,get data(){return I.data=!0,H},get error(){return I.error=!0,q},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,J}}})},71296:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(30977),i=t.n(r),a=t(95924),o=t.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-ward__style__wardWorkspacePatientBanner___2KnUU>div{background:#f4f4f4}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/ward-workspace/patient-banner/style.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DA,0DACE,kBDFI",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.wardWorkspacePatientBanner {\n > div {\n background: $ui-01;\n }\n}\n"],sourceRoot:""}]),o.locals={wardWorkspacePatientBanner:"-esm-ward__style__wardWorkspacePatientBanner___2KnUU"};const s=o},81776:(e,n,t)=>{t.r(n),t.d(n,{default:()=>A});var r=t(54440),i=t(1343),a=t.n(i),o=t(72591),s=t.n(o),d=t(1740),u=t.n(d),c=t(88128),l=t.n(c),f=t(30855),p=t.n(f),m=t(93051),g=t.n(m),v=t(73656),b=t.n(v),h=t(71296),y={};y.styleTagTransform=b(),y.setAttributes=p(),y.insert=l().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=g(),s()(h.A,y);const E=h.A&&h.A.locals?h.A.locals:void 0,A=function(e){var n,t=e.wardPatient,i=(null!=t?t:{}).patient,o=(null!==(n=(0,r.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).WardPatientHeader;return i?o?a().createElement("div",{className:E.wardWorkspacePatientBanner},a().createElement(o,{wardPatient:t})):a().createElement(a().Fragment,null):(console.warn("Patient details were not received by the ward workspace"),null)}},83209:(e,n,t)=>{t.d(n,{r:()=>a});var r=t(54440),i=t(71123);function a(e){var n="".concat(r.restBaseUrl,"/beds?patientUuid=").concat(e);return(0,i.Ay)(n,r.openmrsFetch)}},92891:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(54440),i=t(8877),a=t(88010),o=t.n(a);function s(){var e=(0,i.useParams)().locationUuid,n=(0,r.useSession)().sessionLocation,t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom:(display,uuid)";return o()(e?"".concat(r.restBaseUrl,"/location/").concat(e,"?v=").concat(n):null,r.openmrsFetch)}(e||null),a=t.data,s=t.isLoading,d=t.error,u=e&&d;return{location:e?null==a?void 0:a.data:n,isLoadingLocation:s,errorFetchingLocation:d,invalidLocation:u}}},93296:(e,n,t)=>{var r=t(1343),i="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,d=r.useDebugValue;function u(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!i(e,t)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,n){return n()}:function(e,n){var t=n(),r=a({inst:{value:t,getSnapshot:n}}),i=r[0].inst,c=r[1];return s(function(){i.value=t,i.getSnapshot=n,u(i)&&c({inst:i})},[e,t,n]),o(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),d(t),t};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},99244:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(22623),i=t(54440),a=t(1343),o=t.n(a),s=t(93150),d=t(92891),u=t(13002);const c=function(e){var n,t=e.wardPatient,a=e.onAdmitPatientSuccess,c=e.disabled,l=e.dispositionType,f=null!=t?t:{},p=f.patient,m=f.visit,g=f.bed,v=(0,s.useTranslation)().t,b=(0,d.A)().location,h="tablet"===(0,i.useLayoutType)()?"lg":"md",y=(null!==(n=(0,i.useAppContext)("ward-view-context"))&&void 0!==n?n:{}).wardPatientGroupDetails,E=(0,u.E)(),A=E.admitPatient,w=E.isLoadingEmrConfiguration,k=E.errorFetchingEmrConfiguration,T=(0,i.useFeatureFlag)("bedmanagement-module"),C=w||k||c;return o().createElement(r.$nd,{kind:"ghost",renderIcon:i.ArrowRightIcon,size:h,disabled:C,onClick:function(){T&&!g?(0,i.launchWorkspace)("admit-patient-form-workspace",{wardPatient:t}):A(p,l,m.uuid).then(function(e){e&&(null==e?void 0:e.ok)&&(0,i.showSnackbar)({kind:"success",title:v("patientAdmittedSuccessfully","Patient admitted successfully"),subtitle:v("patientAdmittedWoBed","Patient admitted successfully to {{location}}",{location:null==b?void 0:b.display})})},function(e){(0,i.showSnackbar)({kind:"error",title:v("errorCreatingEncounter","Failed to admit patient"),subtitle:e.message})}).finally(function(){var e;null==y||null===(e=y.mutate)||void 0===e||e.call(y),a()})}},"ADMIT"==l||C?v("admitPatient","Admit patient"):v("transferPatient","Transfer patient"))}}}]);
|
package/dist/7512.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[7512],{7512:(e,t,n)=>{"use strict";n.r(t),n.d(t,{admissionRequestWorkspace:()=>m,admissionRequestsWorkspaceSideRailIcon:()=>C,admitPatientFormWorkspace:()=>_,cancelAdmissionRequestWorkspace:()=>P,clinicalFormWorkspaceSideRailIcon:()=>S,createAdmissionEncounterWorkspace:()=>W,createAdmissionEncounterWorkspaceSideRailIcon:()=>U,defaultWardView:()=>O,importTranslation:()=>p,maternalWardView:()=>R,patientClinicalFormsWorkspace:()=>L,patientDischargeWorkspace:()=>v,patientDischargeWorkspaceSideRailIcon:()=>I,patientTransferAndSwapWorkspace:()=>T,patientTransferAndSwapWorkspaceSiderailIcon:()=>j,patientTransferRequestWorkspace:()=>k,root:()=>y,startupApp:()=>D,wardDashboardLink:()=>f,wardPatientActionButtonExtension:()=>b,wardPatientNotesActionButtonExtension:()=>w,wardPatientNotesWorkspace:()=>A,wardPatientWorkspace:()=>g,wardPatientWorkspaceBanner:()=>q,wardView:()=>h});var i,s=n(54440),o={patientCardElements:{_description:"Configuration of various patient card elements. Each configured element must have a unique id, defined in the ward React component being used.",obs:{_type:s.Type.Array,_default:[],_description:"Configures obs values to display.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:s.Type.UUID,_description:"Identifies the concept to use to identify the desired observations."},label:{_type:s.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display. If not provided, defaults to the concept's name. (Note that this can be set to an empty string to not show a label)"},orderBy:{_type:s.Type.String,_default:"descending",_description:"One of 'ascending' or 'descending', specifying whether to display the obs by obsDatetime ascendingly or descendingly.",_validators:[s.validators.oneOf(["ascending","descending"])]},limit:{_type:s.Type.Number,_default:1,_description:"If set to a number greater than one, this will show multiple obs for this concept, which will appear as a list. Set to 0 for unlimited."},onlyWithinCurrentVisit:{_type:s.Type.Boolean,_default:!1,_description:"Optional. If true, limits display to only observations within current visit. Defaults to false"}}},pendingItems:{_type:s.Type.Array,_default:[{id:"pending-items",orders:{orderTypes:[{label:"Labs",uuid:"52a447d3-a64a-11e3-9aeb-50e549534c5e"}]},showPendingItems:!0}],_description:"Configures pending orders and transfers to display.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},orders:{orderTypes:{_type:s.Type.Array,_description:"Configures pending orders and transfers to display.",_elements:{uuid:{_type:s.Type.UUID,_description:"Identifies the order type."},label:{_type:s.Type.String,_default:"",_description:"The label or i18n key to the translated label to display. If not provided, defaults to 'Orders'"}}}},showPendingItems:{_type:s.Type.Boolean,_description:"Optional. If true, pending items (e.g., number of pending orders) will be displayed on the patient card."}}},patientIdentifier:{_type:s.Type.Array,_default:[{id:"patient-identifier",showIdentifierLabel:!1}],_description:"Configures patient identifier to display. An unconfigured element displays the preferred identifier.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},showIdentifierLabel:{_type:s.Type.Boolean,_description:'If true, the identifier type (eg: "OpenMRS ID") is shown along with the identifier itself. Defaults to false'}}},patientAddress:{_type:s.Type.Array,_default:[{id:"patient-address",fields:["cityVillage","country"]}],_description:"Configures patient address elements.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},fields:{_type:s.Type.Array,_description:"The fields of the address to display",_elements:{_type:s.Type.String,_validators:[s.validators.oneOf(["cityVillage","stateProvince","country","postalCode","countyDistrict","latitude","longitude","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","address13","address14","address15"])]}}}},admissionRequestNote:{_type:s.Type.Array,_default:[{id:"admission-request-note",conceptUuid:"161011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}],_description:"Configures admission request notes to display.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:s.Type.UUID,_description:"Required. Identifies the concept for the admission request note."}}},coloredObsTags:{_type:s.Type.Array,_default:[],_description:"Configures observation values to display as Carbon tags.",_elements:{conceptUuid:{_type:s.Type.UUID,_default:"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",_description:"Required. Identifies the concept to use to identify the desired observations."},summaryLabel:{_type:s.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag shows the count of the number of answers that are present but not configured to show as their own tags. If not provided, defaults to the name of the concept."},summaryLabelI18nModule:{_type:s.Type.String,_default:"",_description:"Optional. The custom module to use for translation of the summary label"},summaryLabelColor:{_type:s.Type.String,_default:"",_description:"The color of the summary tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors"},tags:{_type:s.Type.Array,_default:[],_description:"An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets will be displayed as their own tags with the specified color. Any observation with coded values not belonging to any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times, the first matching applied-to rule takes precedence.",_elements:{color:{_type:s.Type.String,_description:"Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors."},appliedToConceptSets:{_type:s.Type.Array,_description:"The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets will be displayed as their own tag with the specified color. If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.",_elements:{_type:s.Type.UUID}}}}}}},wards:{_type:s.Type.Array,_default:[{id:"default-ward"}],_description:"Configuration of what type of ward to use at different ward locations.",_elements:{id:{_type:s.Type.String,_description:'The ward type to use. Currently, "default-ward" and "maternal-ward" are supported. This string also serves as the extension slot name for the ward view.'},appliedTo:{_type:s.Type.Array,_description:"Optional. Conditions under which this card definition should be used. If not provided, the configuration is applied to all wards.",_elements:{location:{_type:s.Type.UUID,_default:"",_description:"The UUID of the location. If not provided, applies to all wards."}}}}},hideWorkspaceVitalsLinks:{_type:s.Type.Boolean,_default:!1,_description:"Configure whether to hide vital history and record vital links in the ward patient workspace."}},r=n(11340),a=n(1343),d=n.n(a),l=n(8877),c={path:"ward",slot:"ward-dashboard-slot",title:"wards",basePath:"".concat(window.spaBase,"/home")},p=n(84767),u={featureName:"ward",moduleName:r.A},y=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(3150),n.e(8010),n.e(9775)]).then(n.bind(n,99775))},u),f=(0,s.getSyncLifecycle)((i=c,function(){return d().createElement(l.BrowserRouter,null,d().createElement(s.DashboardExtension,{path:i.path,title:i.title,basePath:i.basePath,icon:i.icon}))}),u),h=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(3150),n.e(8010),n.e(7524)]).then(n.bind(n,27524))},u),m=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(3150),n.e(8010),n.e(3737)]).then(n.bind(n,23737))},u),_=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(9559),n.e(3150),n.e(8010),n.e(5434),n.e(2728)]).then(n.bind(n,12728))},u),g=(0,s.getAsyncLifecycle)(function(){return n.e(8501).then(n.bind(n,88501))},u),A=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(9559),n.e(3150),n.e(8010),n.e(9045)]).then(n.bind(n,49045))},u),b=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(89)]).then(n.bind(n,20089))},u),w=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(7886)]).then(n.bind(n,57886))},u),T=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(9559),n.e(3150),n.e(8010),n.e(380),n.e(7661),n.e(3365)]).then(n.bind(n,23365))},u),v=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(3150),n.e(8010),n.e(283)]).then(n.bind(n,80283))},u),j=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(3413)]).then(n.bind(n,23413))},u),k=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(9559),n.e(3150),n.e(8010),n.e(380),n.e(7661),n.e(2948)]).then(n.bind(n,12948))},u),I=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(8622),n.e(3150),n.e(3982)]).then(n.bind(n,33982))},u),L=(0,s.getAsyncLifecycle)(function(){return n.e(1663).then(n.bind(n,71663))},u),P=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(9559),n.e(3150),n.e(8010),n.e(2557)]).then(n.bind(n,2557))},u),S=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(1899),n.e(3150),n.e(1741)]).then(n.bind(n,71741))},u),C=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(8522)]).then(n.bind(n,48522))},u),U=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(9117)]).then(n.bind(n,59117))},u),W=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(3150),n.e(8010),n.e(5434),n.e(7179)]).then(n.bind(n,27179))},u),O=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(2810),n.e(9294),n.e(3150),n.e(8010),n.e(5434),n.e(380),n.e(8394),n.e(8610),n.e(1326)]).then(n.bind(n,61326))},{featureName:"default-ward-view",moduleName:r.A,swrConfig:{refreshInterval:6e4}}),R=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(1058),n.e(2810),n.e(9294),n.e(3150),n.e(8010),n.e(5434),n.e(380),n.e(8394),n.e(8610),n.e(5885)]).then(n.bind(n,35885))},{featureName:"maternal-ward-view",moduleName:r.A,swrConfig:{refreshInterval:6e4}}),q=(0,s.getAsyncLifecycle)(function(){return n.e(1776).then(n.bind(n,81776))},u);function D(){(0,s.registerBreadcrumbs)([]),(0,s.defineConfigSchema)(r.A,o),(0,s.registerFeatureFlag)("bedmanagement-module","Bed management module","Enables features related to bed management / assignment. Requires the backend bed management module to be installed.")}},11340:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var i="@openmrs/esm-ward-app"},84767:(e,t,n)=>{var i={"./am.json":[81197,1197],"./ar.json":[14132,4132],"./ar_SY.json":[37617,7617],"./bn.json":[77159,7159],"./de.json":[34944,4944],"./en.json":[34300,4300],"./en_US.json":[59569,9569],"./es.json":[93099,3099],"./es_MX.json":[88349,8349],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./hi.json":[36840,6840],"./hi_IN.json":[55442,5442],"./id.json":[72690,2690],"./it.json":[9538,9538],"./ka.json":[70795,795],"./km.json":[54335,4335],"./ku.json":[9895,9895],"./ky.json":[88163,8163],"./lg.json":[64618,4618],"./ne.json":[12146,2146],"./pl.json":[41119,1119],"./pt.json":[96679,6679],"./pt_BR.json":[36468,6468],"./qu.json":[35173,5173],"./ro_RO.json":[46022,6022],"./ru_RU.json":[60986,986],"./si.json":[56859,6859],"./sw.json":[89913,9913],"./sw_KE.json":[88618,8618],"./tr.json":[55241,5241],"./tr_TR.json":[99900,9900],"./uk.json":[60723,723],"./uz.json":[43584,3584],"./uz@Latn.json":[27097,7097],"./uz_UZ.json":[70890,890],"./vi.json":[79214,9214],"./zh.json":[35661,5661],"./zh_CN.json":[99879,9879]};function s(e){if(!n.o(i,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=i[e],s=t[0];return n.e(t[1]).then(()=>n(s))}s.keys=()=>Object.keys(i),s.id=84767,e.exports=s}}]);
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[7512],{7512:(e,t,n)=>{"use strict";n.r(t),n.d(t,{admissionRequestWorkspace:()=>m,admissionRequestsWorkspaceSideRailIcon:()=>C,admitPatientFormWorkspace:()=>_,cancelAdmissionRequestWorkspace:()=>P,clinicalFormWorkspaceSideRailIcon:()=>S,createAdmissionEncounterWorkspace:()=>W,createAdmissionEncounterWorkspaceSideRailIcon:()=>U,defaultWardView:()=>O,importTranslation:()=>p,maternalWardView:()=>R,patientClinicalFormsWorkspace:()=>L,patientDischargeWorkspace:()=>v,patientDischargeWorkspaceSideRailIcon:()=>I,patientTransferAndSwapWorkspace:()=>T,patientTransferAndSwapWorkspaceSiderailIcon:()=>j,patientTransferRequestWorkspace:()=>k,root:()=>y,startupApp:()=>D,wardDashboardLink:()=>f,wardPatientActionButtonExtension:()=>b,wardPatientNotesActionButtonExtension:()=>w,wardPatientNotesWorkspace:()=>A,wardPatientWorkspace:()=>g,wardPatientWorkspaceBanner:()=>q,wardView:()=>h});var i,s=n(54440),o={patientCardElements:{_description:"Configuration of various patient card elements. Each configured element must have a unique id, defined in the ward React component being used.",obs:{_type:s.Type.Array,_default:[],_description:"Configures obs values to display.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:s.Type.UUID,_description:"Identifies the concept to use to identify the desired observations."},label:{_type:s.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display. If not provided, defaults to the concept's name. (Note that this can be set to an empty string to not show a label)"},orderBy:{_type:s.Type.String,_default:"descending",_description:"One of 'ascending' or 'descending', specifying whether to display the obs by obsDatetime ascendingly or descendingly.",_validators:[s.validators.oneOf(["ascending","descending"])]},limit:{_type:s.Type.Number,_default:1,_description:"If set to a number greater than one, this will show multiple obs for this concept, which will appear as a list. Set to 0 for unlimited."},onlyWithinCurrentVisit:{_type:s.Type.Boolean,_default:!1,_description:"Optional. If true, limits display to only observations within current visit. Defaults to false"}}},pendingItems:{_type:s.Type.Array,_default:[{id:"pending-items",orders:{orderTypes:[{label:"Labs",uuid:"52a447d3-a64a-11e3-9aeb-50e549534c5e"}]},showPendingItems:!0}],_description:"Configures pending orders and transfers to display.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},orders:{orderTypes:{_type:s.Type.Array,_description:"Configures pending orders and transfers to display.",_elements:{uuid:{_type:s.Type.UUID,_description:"Identifies the order type."},label:{_type:s.Type.String,_default:"",_description:"The label or i18n key to the translated label to display. If not provided, defaults to 'Orders'"}}}},showPendingItems:{_type:s.Type.Boolean,_description:"Optional. If true, pending items (e.g., number of pending orders) will be displayed on the patient card."}}},patientIdentifier:{_type:s.Type.Array,_default:[{id:"patient-identifier",showIdentifierLabel:!1}],_description:"Configures patient identifier to display. An unconfigured element displays the preferred identifier.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},showIdentifierLabel:{_type:s.Type.Boolean,_description:'If true, the identifier type (eg: "OpenMRS ID") is shown along with the identifier itself. Defaults to false'}}},patientAddress:{_type:s.Type.Array,_default:[{id:"patient-address",fields:["cityVillage","country"]}],_description:"Configures patient address elements.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},fields:{_type:s.Type.Array,_description:"The fields of the address to display",_elements:{_type:s.Type.String,_validators:[s.validators.oneOf(["cityVillage","stateProvince","country","postalCode","countyDistrict","latitude","longitude","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","address13","address14","address15"])]}}}},admissionRequestNote:{_type:s.Type.Array,_default:[{id:"admission-request-note",conceptUuid:"161011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}],_description:"Configures admission request notes to display.",_elements:{id:{_type:s.Type.String,_description:"The unique identifier for this patient card element"},conceptUuid:{_type:s.Type.UUID,_description:"Required. Identifies the concept for the admission request note."}}},coloredObsTags:{_type:s.Type.Array,_default:[],_description:"Configures observation values to display as Carbon tags.",_elements:{conceptUuid:{_type:s.Type.UUID,_default:"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",_description:"Required. Identifies the concept to use to identify the desired observations."},summaryLabel:{_type:s.Type.String,_default:"",_description:"Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag shows the count of the number of answers that are present but not configured to show as their own tags. If not provided, defaults to the name of the concept."},summaryLabelI18nModule:{_type:s.Type.String,_default:"",_description:"Optional. The custom module to use for translation of the summary label"},summaryLabelColor:{_type:s.Type.String,_default:"",_description:"The color of the summary tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors"},tags:{_type:s.Type.Array,_default:[],_description:"An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets will be displayed as their own tags with the specified color. Any observation with coded values not belonging to any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times, the first matching applied-to rule takes precedence.",_elements:{color:{_type:s.Type.String,_description:"Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors."},appliedToConceptSets:{_type:s.Type.Array,_description:"The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets will be displayed as their own tag with the specified color. If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.",_elements:{_type:s.Type.UUID}}}}}}},wards:{_type:s.Type.Array,_default:[{id:"default-ward"}],_description:"Configuration of what type of ward to use at different ward locations.",_elements:{id:{_type:s.Type.String,_description:'The ward type to use. Currently, "default-ward" and "maternal-ward" are supported. This string also serves as the extension slot name for the ward view.'},appliedTo:{_type:s.Type.Array,_description:"Optional. Conditions under which this card definition should be used. If not provided, the configuration is applied to all wards.",_elements:{location:{_type:s.Type.UUID,_default:"",_description:"The UUID of the location. If not provided, applies to all wards."}}}}},hideWorkspaceVitalsLinks:{_type:s.Type.Boolean,_default:!1,_description:"Configure whether to hide vital history and record vital links in the ward patient workspace."}},r=n(11340),a=n(1343),d=n.n(a),l=n(8877),c={path:"ward",slot:"ward-dashboard-slot",title:"wards",basePath:"".concat(window.spaBase,"/home")},p=n(84767),u={featureName:"ward",moduleName:r.A},y=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(3150),n.e(8010),n.e(9775)]).then(n.bind(n,99775))},u),f=(0,s.getSyncLifecycle)((i=c,function(){return d().createElement(l.BrowserRouter,null,d().createElement(s.DashboardExtension,{path:i.path,title:i.title,basePath:i.basePath,icon:i.icon}))}),u),h=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(3150),n.e(8010),n.e(7524)]).then(n.bind(n,27524))},u),m=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(3150),n.e(8010),n.e(3737)]).then(n.bind(n,23737))},u),_=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(9559),n.e(3150),n.e(8010),n.e(5434),n.e(2728)]).then(n.bind(n,12728))},u),g=(0,s.getAsyncLifecycle)(function(){return n.e(8501).then(n.bind(n,88501))},u),A=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(9559),n.e(3150),n.e(8010),n.e(9045)]).then(n.bind(n,49045))},u),b=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(89)]).then(n.bind(n,20089))},u),w=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(7886)]).then(n.bind(n,57886))},u),T=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(9559),n.e(3150),n.e(8010),n.e(380),n.e(7661),n.e(3365)]).then(n.bind(n,23365))},u),v=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(3150),n.e(8010),n.e(283)]).then(n.bind(n,80283))},u),j=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(3413)]).then(n.bind(n,23413))},u),k=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(9559),n.e(3150),n.e(8010),n.e(380),n.e(7661),n.e(2948)]).then(n.bind(n,12948))},u),I=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(8622),n.e(3150),n.e(3982)]).then(n.bind(n,33982))},u),L=(0,s.getAsyncLifecycle)(function(){return n.e(1663).then(n.bind(n,71663))},u),P=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(9559),n.e(3150),n.e(8010),n.e(2557)]).then(n.bind(n,2557))},u),S=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(1899),n.e(3150),n.e(1741)]).then(n.bind(n,71741))},u),C=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(8522)]).then(n.bind(n,48522))},u),U=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3150),n.e(9117)]).then(n.bind(n,59117))},u),W=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(3150),n.e(8010),n.e(5434),n.e(7179)]).then(n.bind(n,27179))},u),O=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(1716),n.e(363),n.e(3150),n.e(8010),n.e(5434),n.e(380),n.e(8394),n.e(8610),n.e(1326)]).then(n.bind(n,61326))},{featureName:"default-ward-view",moduleName:r.A,swrConfig:{refreshInterval:6e4}}),R=(0,s.getAsyncLifecycle)(function(){return Promise.all([n.e(3144),n.e(8622),n.e(281),n.e(1716),n.e(363),n.e(3150),n.e(8010),n.e(5434),n.e(380),n.e(8394),n.e(8610),n.e(5885)]).then(n.bind(n,35885))},{featureName:"maternal-ward-view",moduleName:r.A,swrConfig:{refreshInterval:6e4}}),q=(0,s.getAsyncLifecycle)(function(){return n.e(1776).then(n.bind(n,81776))},u);function D(){(0,s.registerBreadcrumbs)([]),(0,s.defineConfigSchema)(r.A,o),(0,s.registerFeatureFlag)("bedmanagement-module","Bed management module","Enables features related to bed management / assignment. Requires the backend bed management module to be installed.")}},11340:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var i="@openmrs/esm-ward-app"},84767:(e,t,n)=>{var i={"./am.json":[81197,1197],"./ar.json":[14132,4132],"./ar_SY.json":[37617,7617],"./bn.json":[77159,7159],"./de.json":[34944,4944],"./en.json":[34300,4300],"./en_US.json":[59569,9569],"./es.json":[93099,3099],"./es_MX.json":[88349,8349],"./fr.json":[94055,4055],"./he.json":[84652,4652],"./hi.json":[36840,6840],"./hi_IN.json":[55442,5442],"./id.json":[72690,2690],"./it.json":[9538,9538],"./ka.json":[70795,795],"./km.json":[54335,4335],"./ku.json":[9895,9895],"./ky.json":[88163,8163],"./lg.json":[64618,4618],"./ne.json":[12146,2146],"./pl.json":[41119,1119],"./pt.json":[96679,6679],"./pt_BR.json":[36468,6468],"./qu.json":[35173,5173],"./ro_RO.json":[46022,6022],"./ru_RU.json":[60986,986],"./si.json":[56859,6859],"./sw.json":[89913,9913],"./sw_KE.json":[88618,8618],"./tr.json":[55241,5241],"./tr_TR.json":[99900,9900],"./uk.json":[60723,723],"./uz.json":[43584,3584],"./uz@Latn.json":[27097,7097],"./uz_UZ.json":[70890,890],"./vi.json":[79214,9214],"./zh.json":[35661,5661],"./zh_CN.json":[99879,9879]};function s(e){if(!n.o(i,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=i[e],s=t[0];return n.e(t[1]).then(()=>n(s))}s.keys=()=>Object.keys(i),s.id=84767,e.exports=s}}]);
|