PageSourceSearch

https://app2.consentic.com/js/4504.17a878c3.js

js consentic.com collected 2026-10-07 03:02:38 UTC 62,840 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkcvue"]=self["webpackChunkcvue"]||[]).push([[4504],{38704:function(e,t,a){var s=a(92360),l=a(19360),i=a(1572),n=a(54856),o=a(67784),r=a(73800),d=a(8236);t.c=(0,r.kd)({name:"QPopupProxy",props:{...o.Y,breakpoint:{type:[String,Number],default:450}},emits:["show","hide"],setup(e,{slots:t,emit:a,attrs:r}){const{proxy:c}=(0,s._S)(),{$q:h}=c,u=(0,l.IL)(!1),m=(0,l.IL)(null),p=(0,s.S6)((()=>parseInt(e.breakpoint,10))),{canShow:f}=(0,o.c)({showing:u});function g(){return h.screen.width<p.value||h.screen.height<p.value?"dialog":"menu"}const b=(0,l.IL)(g()),w=(0,s.S6)((()=>"menu"===b.value?{maxHeight:"99vh"}:{}));function y(e){u.value=!0,a("show",e)}function v(e){u.value=!1,b.value=g(),a("hide",e)}return(0,s.Kg)((()=>g()),(e=>{!0!==u.value&&(b.value=e)})),Object.assign(c,{show(e){!0===f(e)&&m.value.show(e)},hide(e){m.value.hide(e)},toggle(e){m.value.toggle(e)}}),(0,d.s)(c,"currentComponent",(()=>({type:b.value,ref:m.value}))),()=>{const a={ref:m,...w.value,...r,onShow:y,onHide:v};let l;return"dialog"===b.value?l=i.c:(l=n.c,Object.assign(a,{target:e.target,contextMenu:e.contextMenu,noParentEvent:!0,separateClosePopup:!0})),(0,s.h)(l,a,t.default)}}})},64584:function(e,t,a){a.d(t,{c:function(){return q}});var s=a(92360),l=a(22688);const i=e=>((0,s.ED)("data-v-34432c6a"),e=e(),(0,s.ii)(),e),n={class:"q-ml-md q-mr-md q-mt-sm q-mb-md"},o={class:"q-pl-sm q-py-xs"},r=i((()=>(0,s.QD)("div",{style:{flex:"1"}}," ",-1))),d={class:"bg-primary",style:{height:"40px","border-radius":"0 5px 5px 0"}},c={style:{"max-width":"103%","text-overflow":"ellipsis","white-space":"nowrap",overflow:"hidden"}},h={style:{"max-width":"103%","text-overflow":"ellipsis","white-space":"nowrap",overflow:"hidden"}};function u(e,t,a,i,u,m){const p=(0,s.E1)("q-btn"),f=(0,s.E1)("q-tooltip"),g=(0,s.E1)("q-icon"),b=(0,s.E1)("q-badge"),w=(0,s.E1)("q-chip"),y=(0,s.E1)("DrStethescope"),v=(0,s.E1)("q-select");return(0,s.Wz)(),(0,s.An)("div",n,[((0,s.Wz)(),(0,s.An)("div",{class:"q-pa-none text-weight-bold text-h6 f-r-nw",key:u.forceRefresh,style:{height:"fit-content","border-radius":"5px","background-color":"rgb(231, 231, 231)",width:"100%"}},[(0,s.QD)("div",o,(0,l.WA)(a.title),1),r,(0,s.QD)("div",d,[a.bShowSave?((0,s.Wz)(),(0,s.Az)(p,{key:0,onClick:t[0]||(t[0]=t=>e.$emit("save")),color:"primary","no-caps":"",flat:"",style:{padding:"8px 15px"},class:"bg-primary text-white",dense:"",label:"Save",icon:"save"})):(0,s.g1)("",!0)]),"Dashboard"==e.CurrTab?((0,s.Wz)(),(0,s.Az)(g,{key:0,name:"refresh",size:"sm",class:(0,l.WN)(["q-ma-sm",a.loading?"spinning":""]),onClick:t[1]||(t[1]=t=>e.$emit("refreshDashboard")),color:"primary"},{default:(0,s.Ql)((()=>[(0,s.K2)(f,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Refresh dashboard")])),_:1})])),_:1},8,["class"])):(0,s.g1)("",!0),"Dashboard"!=e.CurrTab||e.getUserPreferences.filter_by&&"sent_by"!=e.getUserPreferences.filter_by?"Dashboard"==e.CurrTab&&"primary_physicians"==e.getUserPreferences.filter_by?((0,s.Wz)(),(0,s.Az)(v,{key:2,class:"q-mr-xs",options:m.getPhysiciansList,multiple:"",modelValue:u.rPhysFilter,"onUpdate:modelValue":t[4]||(t[4]=e=>u.rPhysFilter=e),"use-chips":"","option-value":"id","option-label":"name","stack-label":"",outlined:"",dense:"","hide-bottom-space":"",style:{flex:"1","max-width":"240px","background-color":"white",color:"#6C6F6F","border-radius":"9px"},label:"Primary Physician:"},{selected:(0,s.Ql)((()=>[u.rPhysFilter&&u.rPhysFilter.length>1?((0,s.Wz)(),(0,s.An)(s.ae,{key:0},[(0,s.K2)(b,{color:"primary",label:`${u.rPhysFilter.length} selected`,class:"q-mr-sm"},null,8,["label"]),(0,s.K2)(f,null,{default:(0,s.Ql)((()=>[((0,s.Wz)(!0),(0,s.An)(s.ae,null,(0,s.mi)(u.rPhysFilter,(e=>((0,s.Wz)(),(0,s.An)("div",{key:e.id},(0,l.WA)(e.name),1)))),128))])),_:1})],64)):((0,s.Wz)(!0),(0,s.An)(s.ae,{key:1},(0,s.mi)(u.rPhysFilter,((e,t)=>((0,s.Wz)(),(0,s.Az)(w,{key:"doc.value"+t,dense:"",removable:"",onRemove:t=>m.removePhysician(e),class:"full-width ellipsis",style:{}},{default:(0,s.Ql)((()=>[(0,s.QD)("div",h,(0,l.WA)(e.name),1)])),_:2},1032,["onRemove"])))),128))])),prepend:(0,s.Ql)((()=>[(0,s.K2)(y,{size:"20px",style:{color:"#6C6F6F"}})])),_:1},8,["options","modelValue"])):(0,s.g1)("",!0):((0,s.Wz)(),(0,s.Az)(v,{key:1,class:"q-mr-xs",options:e.getDocFilterOpts,multiple:"",modelValue:u.rDocFilter,"onUpdate:modelValue":[t[2]||(t[2]=e=>u.rDocFilter=e),t[3]||(t[3]=t=>{e.setDocFilter(t),e.$emit("refreshDashboard")})],"use-chips":"","stack-label":"",outlined:"",dense:"","hide-bottom-sp
1ace":"","map-options":"",style:{flex:"1","max-width":"240px","background-color":"white",color:"#6C6F6F","border-radius":"9px"},label:"Sent By:"},{selected:(0,s.Ql)((()=>[u.rDocFilter.length>1?((0,s.Wz)(),(0,s.An)(s.ae,{key:0},[(0,s.K2)(b,{color:"primary",label:`${u.rDocFilter.length} selected`,class:"q-mr-sm"},null,8,["label"]),(0,s.K2)(f,null,{default:(0,s.Ql)((()=>[((0,s.Wz)(!0),(0,s.An)(s.ae,null,(0,s.mi)(u.rDocFilter,(e=>((0,s.Wz)(),(0,s.An)("div",{key:e.value},(0,l.WA)(e.label),1)))),128))])),_:1})],64)):((0,s.Wz)(!0),(0,s.An)(s.ae,{key:1},(0,s.mi)(u.rDocFilter,((e,t)=>((0,s.Wz)(),(0,s.Az)(w,{key:"doc.value"+t,dense:"",removable:"",onRemove:t=>m.removeSelection(e),class:"full-width ellipsis",style:{}},{default:(0,s.Ql)((()=>[(0,s.QD)("div",c,(0,l.WA)(e.label),1)])),_:2},1032,["onRemove"])))),128))])),prepend:(0,s.Ql)((()=>[(0,s.K2)(y,{size:"20px",style:{color:"#6C6F6F"}})])),_:1},8,["options","modelValue"]))]))])}a(7544);var m=a(98560),p=a(52016),f={data(){return{rDocFilter:[],rPhysFilter:null,forceRefresh:0}},components:{DrStethescope:p.c},props:{title:String,description:String,bShowSave:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},computed:{...(0,m.gV)("consentic",["CurrTab","getDocFilterOpts","getDocFilter","getDevMode","getFilterLists","getPhysFilter"]),...(0,m.gV)("profile",["getUserPreferences","getProfileLoaded"]),getPhysiciansList:function(){return this.getFilterLists.primary_physicians||[]}},methods:{...(0,m.ae)("consentic",["setDocFilter","fetchFilterLists","setPhysFilter"]),...(0,m.ae)("profile",["fetchProfile"]),removeSelection(e){this.rDocFilter=this.rDocFilter.filter((t=>t.value!==e.value))},removePhysician(e){this.rPhysFilter=this.rPhysFilter.filter((t=>t.name!==e.name))},mSelect(e){console.warn("mSelect: ",e),this.rDocFilter.push(e)}},watch:{getProfileLoaded:{handler(){this.$emit("refreshDashboard")}},getUserPreferences:{handler(){console.log("HeaderTitle detected change in user preferences, getProfileLoaded:",this.getProfileLoaded," rPhysFilter:",this.rPhysFilter," user prefs:",this.getUserPreferences),this.getProfileLoaded&&this.rPhysFilter||(this.rPhysFilter=this.getUserPreferences.primary_physicians||[]),this.forceRefresh+=1,this.$emit("refreshDashboard")},deep:!0},rPhysFilter:{handler(e){console.log("HTitle emitted refreshDashboard"),this.setPhysFilter(e),this.$emit("refreshDashboard")},deep:!0}},mounted(){this.rDocFilter=this.getDocFilter,this.fetchFilterLists(),this.getProfileLoaded?(this.rPhysFilter=this.getPhysFilter,console.log("HeaderTitle profile already loaded, set rPhysFilter")):(this.fetchProfile(),console.error("Profile not loaded, fetching profile"),console.log("HeaderTitle fetch profile and reset rPhysFilter")),this.rPhysFilter&&3===this.rPhysFilter.length&&console.error("rPhysFilter is 3,",this.rPhysFilter),console.log("init Header Title: ",this.rDocFilter,this.rPhysFilter,this.getUserPreferences)}},g=a(25552),b=a(18368),w=a(54232),y=a(43360),v=a(61620),D=a(31067),P=a(20392),_=a(49116),x=a(83520),C=a(20896),k=a.n(C);const Q=(0,g.c)(f,[["render",u],["__scopeId","data-v-34432c6a"]]);var q=Q;k()(f,"components",{QBtn:b.c,QIcon:w.c,QTooltip:y.c,QSelect:v.c,QBadge:D.c,QChip:P.c,QItem:_.c}),k()(f,"directives",{ClosePopup:x.c})},52016:function(e,t,a){a.d(t,{c:function(){return h}});var s=a(92360);const l=["width","height","stroke-width"],i=(0,s.IL)('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 4h-1a2 2 0 0 0 -2 2v3.5h0a5.5 5.5 0 0 0 11 0v-3.5a2 2 0 0 0 -2 -2h-1"></path><path d="M8 15a6 6 0 1 0 12 0v-3"></path><path d="M11 3v2"></path><path d="M6 3v2"></path><path d="M20 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>',6),n=[i];function o(e,t,a,i,o,r){return(0,s.Wz)(),(0,s.An)("svg",{xmlns:"http://www.w3.org/2000/svg",width:a.size,height:a.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":a.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-stethoscope"},n,8,l)}var r={name:"DrStethescope",props:{size:{type:[String,Number],default:24},strokeWidth:{type:[String,Number],default:2}}},d=a(25552);const c=(0,d.c)(r,[["render",o]]);var h=c},20600:function(e,t,a){a.d(t,{c:function(){return h}});var s=a(92360);const l=["width","height","stroke-width"],i=(0,s.QD)("path",{d:"M560-120v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q8 9 12.5 20t4.5 22q0 11-4 22.5T903-340L683-120H560Zm-400-4
10v-112q0-34 17.5-62.5T224-378q62-31 126-46.5T480-440q37 0 73 4.5t72 14.5L480-276v116H160Zm663-184 37-39-37-37-38 38 38 38ZM480-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47Z"},null,-1),n=[i];function o(e,t,a,i,o,r){return(0,s.Wz)(),(0,s.An)("svg",{xmlns:"http://www.w3.org/2000/svg",width:a.size,height:a.size,viewBox:"0 -960 960 960",fill:"currentColor",stroke:"none","stroke-width":a.strokeWidth},n,8,l)}var r={name:"PersonEdit",props:{size:{type:[String,Number],default:24},strokeWidth:{type:[String,Number],default:2}}},d=a(25552);const c=(0,d.c)(r,[["render",o]]);var h=c},89173:function(e,t,a){a.r(t),a.d(t,{default:function(){return qt}});var s=a(92360),l=a(22688),i=a(82067);const n={key:0},o={key:1},r={key:2},d={class:"row q-ml-md q-mr-md q-mb-md"},c={class:"col-12 col-sm-6 col-lg-5 col-xl-3"},h={class:"col-12 col-sm-6 col-lg-7 col-xl-9"},u={class:"flex justify-end"},m={class:"row items-center no-wrap"},p={key:0,class:"q-mr-sm",style:{filter:"invert(60%)"},src:"/slider.png",width:"20px",height:"20px"},f=(0,s.QD)("span",{style:{"margin-top":"2px"}},"Participant Filter",-1),g={class:""},b={class:"row full-width"},w={class:"col relative-position"},y={key:0,class:"",style:{"max-width":"40px",display:"inline-block"}},v={style:{display:"flex","flex-flow":"row nowrap","align-items":"center",cursor:"pointer",height:"40px","padding-top":"3px"}},D={key:0},P={key:1,width:"20px",height:"20px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_=(0,s.QD)("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"},null,-1),x=(0,s.QD)("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C=(0,s.QD)("g",{id:"SVGRepo_iconCarrier"},[(0,s.QD)("path",{d:"M6 12L18 12",stroke:"#7E7E7E","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),k=[_,x,C],Q={key:1,width:"20px",height:"20px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},q=(0,s.QD)("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"},null,-1),A=(0,s.QD)("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),S=(0,s.QD)("g",{id:"SVGRepo_iconCarrier"},[(0,s.QD)("path",{d:"M6 12L18 12",stroke:"#7E7E7E","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),M=[q,A,S],z={style:{"font-weight":"bold"}},F={style:{"font-weight":"bold"}},E=(0,s.QD)("span",{style:{"font-weight":"bold"}},"0",-1),T={key:0,style:{display:"flex","flex-flow":"row nowrap","align-items":"center",position:"absolute",top:"8px",right:"10px"}},W={key:1},K={class:"row"},R={class:"col-12"},V={style:{display:"flex","flex-flow":"row nowrap","align-items":"center",width:"100%","justify-content":"space-between"}},$={class:"bg-primary text-white text-center text-h4 q-py-md q-px-md",style:{"border-radius":"5px 0px 0px 5px"}},N={class:"text-h6 text-grey-7 q-pl-sm",style:{display:"flex","flex-flow":"row nowrap","align-items":"center",flex:"1","min-width":"160px"}},B={class:"column",style:{"align-items":"center"}},Y=(0,s.QD)("div",null,"Add Request",-1),I={class:"column",style:{"align-items":"center"}},L=(0,s.QD)("div",null,"Archive",-1),U={class:"column",style:{"align-items":"center"}},O=(0,s.QD)("div",null,"Edit Participant",-1),H={class:"column",style:{"align-items":"center"}},j=(0,s.QD)("div",null,"Review Participant",-1),G={key:0};function Z(e,t,a,_,x,C){const q=(0,s.E1)("loader"),A=(0,s.E1)("HeaderTitle"),S=(0,s.E1)("q-icon"),Z=(0,s.E1)("q-input"),J=(0,s.E1)("q-badge"),X=(0,s.E1)("q-checkbox"),ee=(0,s.E1)("q-item-section"),te=(0,s.E1)("q-item-label"),ae=(0,s.E1)("q-item"),se=(0,s.E1)("q-list"),le=(0,s.E1)("q-menu"),ie=(0,s.E1)("q-btn"),ne=(0,s.E1)("q-th"),oe=(0,s.E1)("q-tr"),re=(0,s.E1)("q-tooltip"),de=(0,s.E1)("q-td"),ce=(0,s.E1)("q-avatar"),he=(0,s.E1)("PersonEdit"),ue=(0,s.E1)("AllRequests"),me=(0,s.E1)("q-table"),pe=(0,s.E1)("ArchiveIcon"),fe=(0,s.E1)("q-separator"),ge=(0,s.E1)("q-card-section"),be=(0,s.E1)("q-card"),we=(0,s.E1)("PatientAddModal"),ye=(0,s.E1)("ConfDial"),ve=(0,s.E1)("PatientOverviewTabModal"),De=(0,s.E1)("q-page"),Pe=(0,s.iS)("ripple"),_e=(0,s.iS)("close-popup");return(0,s.Wz)(),(0,s.Az)(De,{class:""},{default:(0,s.Ql)((()=>[x.isLoading?((0,s.Wz)(),(0,s.An)("div",n,[(0,s.K2)(q,{msg:"Loading Participants"}
1)])):x.bArchiving?((0,s.Wz)(),(0,s.An)("div",o,[(0,s.K2)(q,{msg:"Archiving Participants"})])):((0,s.Wz)(),(0,s.An)("div",r,[(0,s.K2)(A,{title:"Participant List"}),(0,s.QD)("div",d,[(0,s.QD)("div",c,[(0,s.K2)(Z,{clearable:"","hide-bottom-space":"",class:(0,l.WN)(["flex-break",""!=x.txtSearch?e.getBetaView?"better-field-highlight":"field-highlight":""]),outlined:"",dense:"",color:"primary",modelValue:x.txtSearch,"onUpdate:modelValue":t[0]||(t[0]=e=>x.txtSearch=e),placeholder:"Search by Participant Name, Email, or Mobile Number"},{append:(0,s.Ql)((()=>[(0,s.K2)(S,{name:"search"})])),_:1},8,["modelValue","class"])]),(0,s.QD)("div",h,[(0,s.QD)("div",u,[(0,s.QD)("div",null,[(0,s.K2)(ie,{class:"btn-filter q-mx-sm","text-color":"grey-8","no-caps":"",style:(0,l.MN)(C.filterCount?{"background-color":"#D3F4F6"}:{"background-color":"#EEEEEE"}),onClick:t[2]||(t[2]=e=>x.showFilter=!x.showFilter),unelevated:""},{default:(0,s.Ql)((()=>[(0,s.QD)("div",m,[0==C.filterCount?((0,s.Wz)(),(0,s.An)("img",p)):(0,s.g1)("",!0),C.filterCount?((0,s.Wz)(),(0,s.Az)(J,{key:1,rounded:"",color:"primary",style:{"margin-right":"10px"}},{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(C.filterCount),1)])),_:1})):(0,s.g1)("",!0),f]),(0,s.wt)((0,s.K2)(S,{size:"15px",color:"grey-8",class:"q-ml-sm rotate-enter-active",name:"fa fa-caret-down"},null,512),[[i.Ub,!x.showFilter]]),(0,s.wt)((0,s.K2)(S,{size:"15px",color:"grey-8",class:"q-ml-sm rotate-enter-active",name:"fa fa-caret-up"},null,512),[[i.Ub,x.showFilter]]),(0,s.K2)(le,{onBeforeHide:t[1]||(t[1]=e=>x.showFilter=!1)},{default:(0,s.Ql)((()=>[(0,s.K2)(se,{dense:"",style:{"min-width":"200px"}},{default:(0,s.Ql)((()=>[((0,s.Wz)(!0),(0,s.An)(s.ae,null,(0,s.mi)(x.rPatStatusOpts,((e,t)=>(0,s.wt)(((0,s.Wz)(),(0,s.Az)(ae,{dense:"",tag:"label",clickable:"",key:t},{default:(0,s.Ql)((()=>[(0,s.K2)(ee,{side:"",top:""},{default:(0,s.Ql)((()=>[(0,s.K2)(X,{modelValue:this.filterPatient[t],"onUpdate:modelValue":e=>this.filterPatient[t]=e,val:e.value,size:"sm"},null,8,["modelValue","onUpdate:modelValue","val"])])),_:2},1024),(0,s.K2)(ee,null,{default:(0,s.Ql)((()=>[(0,s.K2)(te,{class:"text-weight-regular text-grey-8"},{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(e.label),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)),[[Pe],[_e]]))),128))])),_:1})])),_:1})])),_:1},8,["style"])]),(0,s.QD)("div",g,[(0,s.K2)(ie,{"no-caps":"",unelevated:"",dense:"",class:"btn-add-patient",color:"primary",onClick:t[3]||(t[3]=e=>C.toggleModal()),icon:"person_add",label:"Add Participant"})])])])]),(0,s.QD)("div",null,[(0,s.QD)("div",b,[(0,s.QD)("div",w,[((0,s.Wz)(),(0,s.Az)(me,{"rows-per-page-options":[5,10,20,50],dense:"",flat:"",bordered:"",class:"q-mr-md q-ml-md my-sticky-header-table custom-q-table-wrap bg-white",ref:"Table","rows-per-page-label":"Participants per page","no-data-label":"No Participants found.","loading-label":"Refreshing Participants...",key:"QTable_",rows:C.filteredPatients,columns:x.rCols,pagination:x.sPages,"onUpdate:pagination":t[7]||(t[7]=e=>x.sPages=e),"row-key":"id",loading:x.isRefreshing,"binary-state-sort":"",onRequest:C.onRequest},{header:(0,s.Ql)((a=>[(0,s.K2)(oe,{props:a,style:{"background-color":"rgb(248, 249, 250)",color:"black"},class:"row-md"},{default:(0,s.Ql)((()=>[((0,s.Wz)(!0),(0,s.An)(s.ae,null,(0,s.mi)(a.cols,(i=>((0,s.Wz)(),(0,s.Az)(ne,{key:i.name,props:a,style:(0,l.MN)([{"font-size":"16px","font-weight":"bolder","margin-top":"5px"},{width:"patient_name"!==i.name&&"email"!==i.name||!(e.sScreen.xs||e.sScreen.sm||e.sScreen.md)?"":"150px !important"}])},{default:(0,s.Ql)((()=>["patient_name"==i.name?((0,s.Wz)(),(0,s.An)("div",y,[(0,s.K2)(X,{size:"xs",modelValue:x.selectAll,"onUpdate:modelValue":t[4]||(t[4]=e=>x.selectAll=e)},null,8,["modelValue"])])):(0,s.g1)("",!0),(0,s.mY)(" "+(0,l.WA)(i.label),1)])),_:2},1032,["props","style"])))),128))])),_:2},1032,["props"])])),body:(0,s.Ql)((a=>[(0,s.K2)(oe,{class:(0,l.WN)([a.row.expand?"TDBGGrey":"","row-lg"]),props:a,onClick:(0,i.Y7)((e=>{C.Collapse(a.rowIndex)}),["stop"]),onMouseenter:e=>a.row.rowHover=!0,onMouseleave:e=>a.row.rowHover=!1,style:{cursor:"pointer"}},{default:(0,s.Ql)((()=>[(0,s.K2)(de,{key:"patient_name",style:{},class:"q-py-none"},{default:(0,s.Ql)((()=>[(0,s.QD)("div",v,[(0,s.K2)(X,{size:"xs",modelValue:a.row.selected,"onUpdate:modelValue":[e=>a.row.selected=e,t[5]||(t[5]=e=>C.checkCheckAll())],value:a.row.id,number:""},null,8,["modelValue","onUpdate:modelValue","value"]),(0,s.QD)("div",{style:(0,l.MN)([{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},e.sScreen.xs||e.sScreen.sm||e.sScreen.md?{"max-width":"150px"}:{"max-width":"100%"}])},[(0,s.mY)((0,l.WA)(a.row.first_name+" "+a.row.last_name),1),e.getDevMode?((0,s.Wz)(),(0,s.An)(s.ae,{key:0},[(0,s.mY)(" - "+(0,l.WA)(a.row.id),1)],64)):(0,s.g1)("",!0),(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(C.getFullName(a.row)),1)])),_:2},1024)],4)])])),_:2},1024),(0,s.K2)(de,{key:"birthday",class:"q-py-none"},{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(C.denseFormatDate(a.row.birthday)),1)])),_:2},1024),(0,s.K2)(de,{key:"mobile",class:"q-py-none"},{default:(0,s.Ql)((()=>[a.row?.phone_number?.number?((0,s.Wz)(),(0,s.An)("span",D,(0,l.WA)(a.row.phone_number.number),1)):((0,s.Wz)(),(0,s.An)("svg",P,k))])),_:2},1024),(0,s.K2)(de,{key:"email",class:"q-py-none",style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},{default:(0,s.Ql)((()=>[a.row?.email?.address?((0,s.Wz)(),(0,s.An)("div",{key:0,style:(0,l.MN)([{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},e.sScreen.xs||e.sScreen.sm||e.sScreen.md?{"max-width":"150px"}:{"max-width":"100%"}])},(0,l.WA)(a.row.email.address),5)):((0,s.Wz)(),(0,s.An)("svg",Q,M)),a.row?.email?.address?((0,s.Wz)(),(0,s.Az)(re,{key:2},{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(a.row.email.address),1)])),_:2},1024)):(0,s.g1)("",!0)])),_:2},1024),(0,s.K2)(de,{class:"col-lg-2 q-py-none"},{default:(0,s.Ql)((()=>[a.row.email_fail?((0,s.Wz)(),(0,s.Az)(ie,{key:0,flat:"",color:"negative",icon:"warning",label:"Email",onClick:(0,i.Y7)((e=>C.editPatient(a.row)),["stop"]),dense:"","no-caps":"",size:"md"},{default:(0,s.Ql)((()=>[(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Last email failed, click to edit Participant info and resend")])),_:1})])),_:2},1032,["onClick"])):a.row.sms_fail?((0,s.Wz)(),(0,s.Az)(ie,{key:1,flat:"",color:"negative",icon:"warning",label:"SMS",onClick:(0,i.Y7)((e=>C.editPatient(a.row)),["stop"]),dense:"",size:"md"},{default:(0,s.Ql)((()=>[(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Last SMS failed, click to edit Participant info and resend")])),_:1})])),_:2},1032,["onClick"])):a.row.consent_requests.length>0?((0,s.Wz)(),(0,s.Az)(ce,{key:2,size:"sm",style:{border:"1px solid #C22C3C",color:"#C22C3C","margin-left":"25px",cursor:"pointer"},class:"",onClick:e=>C.loadConsents(a.row.id)},{default:(0,s.Ql)((()=>[(0,s.QD)("span",z,(0,l.WA)(a.row.pending_consent_requests.length),1),(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(a.row.pending_consent_requests.length)+" Pending ",1)])),_:2},1024)])),_:2},1032,["onClick"])):C.completedCount(a.row.consent_requests)?((0,s.Wz)(),(0,s.Az)(ce,{key:3,size:"sm",style:{border:"1px solid #509563",color:"#509563","margin-left":"25px",cursor:"pointer"},class:"",onClick:e=>C.loadConsents(a.row.id)},{default:(0,s.Ql)((()=>[(0,s.QD)("span",F,(0,l.WA)(C.completedCount(a.row.consent_requests)),1),(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)((0,l.WA)(C.completedCount(a.row.consent_requests))+" Completed ",1)])),_:2},1024)])),_:2},1032,["onClick"])):((0,s.Wz)(),(0,s.Az)(ce,{key:4,size:"sm",style:{border:"1px solid #878787",color:"#878787","margin-left":"25px"},class:""},{default:(0,s.Ql)((()=>[E,(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)(" No requests ")])),_:1})])),_:1}))])),_:2},1024),(0,s.K2)(de,{class:"col-lg-1 q-py-none",onMouseover:e=>a.row.hover=!0,onMouseleave:e=>a.row.hover=!1,style:{position:"relative"}}
1,{default:(0,s.Ql)((()=>[!0===a.row.hover?((0,s.Wz)(),(0,s.An)("div",T,[a.row.hover?((0,s.Wz)(),(0,s.Az)(ie,{key:0,"no-caps":"",color:"white","text-color":"primary",dense:"",flat:"",class:"q-mr-xs float-right",icon:"visibility",style:{padding:"6px"},size:"sm",onClick:(0,i.Y7)((e=>{x.currPtnt=a.row,C.showReviewPatientModal(a.row)}),["stop"])},{default:(0,s.Ql)((()=>[(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Review Participant")])),_:1})])),_:2},1032,["onClick"])):(0,s.g1)("",!0),a.row.hover?((0,s.Wz)(),(0,s.Az)(ie,{key:1,"no-caps":"",color:"white","text-color":"primary",dense:"",flat:"",class:"q-mr-none float-right",style:{padding:"6px"},size:"sm",onClick:e=>C.editPatient(a.row)},{default:(0,s.Ql)((()=>[(0,s.K2)(he,{size:"20px"}),(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Edit: "+(0,l.WA)(C.getFullName(a.row)),1)])),_:2},1024)])),_:2},1032,["onClick"])):(0,s.g1)("",!0),a.row.hover?((0,s.Wz)(),(0,s.Az)(ie,{key:2,"no-caps":"",color:"white","text-color":"primary",dense:"",flat:"",class:"q-mr-xs float-right",icon:"add",style:{padding:"6px"},size:"sm",onClick:(0,i.Y7)((e=>C.InitSoloConsent(a.row)),["stop"])},{default:(0,s.Ql)((()=>[(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Send Consent")])),_:1})])),_:2},1032,["onClick"])):(0,s.g1)("",!0)])):((0,s.Wz)(),(0,s.An)("div",W,[a.row.hover?(0,s.g1)("",!0):((0,s.Wz)(),(0,s.Az)(ie,{key:0,class:"q-pa-none q-mr-xs float-right",flat:"",color:"primary",icon:"menu",onClick:t[6]||(t[6]=(0,i.Y7)((()=>{}),["stop"])),style:{"font-size":"12px"}}))]))])),_:2},1032,["onMouseover","onMouseleave"])])),_:2},1032,["class","props","onClick","onMouseenter","onMouseleave"]),(0,s.K2)(i.Ox,{name:"fadeHeight"},{default:(0,s.Ql)((()=>[(0,s.wt)((0,s.K2)(oe,{props:a,class:"nohover",onMouseenter:e=>a.row.rowHover=!0,onMouseleave:e=>a.row.rowHover=!1},{default:(0,s.Ql)((()=>[(0,s.K2)(de,{colspan:"100%",style:{padding:"0px","padding-left":"10px"}},{default:(0,s.Ql)((()=>[(0,s.QD)("div",K,[(0,s.QD)("div",R,[(0,s.K2)(ue,{data:a.row,bLoading:x.bFetchingCRs,consentRequests:a.row.consent_requests,onDownloadPDF:e.downloadPDF,onLoadRequest:C.loadRequest},null,8,["data","bLoading","consentRequests","onDownloadPDF","onLoadRequest"])])])])),_:2},1024)])),_:2},1032,["props","onMouseenter","onMouseleave"]),[[i.Ub,a.row.expand]])])),_:2},1024)])),_:1},8,["rows","columns","pagination","loading","onRequest"])),C.patientsSelected.length?((0,s.Wz)(),(0,s.An)("div",{key:"ActionsList_"+x.fRender,style:{position:"absolute",left:"50%",bottom:"10px",transform:"translateX(-50%)",width:"650px"}},[(0,s.K2)(be,{class:"",rounded:"",style:{"box-shadow":"0 1.3px 6.5px rgba(0, 0, 0, 0.2), \n                                                          0 2.6px 2.6px rgba(0, 0, 0, 0.14), \n                                                          0 3.9px 1.3px -1px rgba(0, 0, 0, 0.12)"}},{default:(0,s.Ql)((()=>[(0,s.K2)(ge,{class:"flex items-center q-pa-none",style:{"align-items":"center"}},{default:(0,s.Ql)((()=>[(0,s.QD)("div",V,[(0,s.QD)("div",$,[(0,s.QD)("div",null,(0,l.WA)(C.patientsSelected.length),1)]),(0,s.QD)("div",N,[(0,s.QD)("div",null,"Participant"+(0,l.WA)(C.patientsSelected.length>1?"s":"")+" selected",1)]),(0,s.K2)(ie,{flat:"",dense:"",size:"md","no-caps":"",onClick:t[8]||(t[8]=e=>C.InitBulkConsent()),style:{color:"#616161","min-width":"90px",flex:"1"},class:""},{default:(0,s.Ql)((()=>[(0,s.QD)("div",B,[(0,s.K2)(S,{name:"add",color:"primary",size:"sm",style:{}}),Y])])),_:1}),(0,s.K2)(ie,{flat:"",dense:"",size:"md","no-caps":"",onClick:t[9]||(t[9]=e=>C.ConfArchPatients()),style:{color:"#616161","min-width":"80px",flex:"1"},class:""},{default:(0,s.Ql)((()=>[(0,s.QD)("div",I,[(0,s.K2)(pe,{color:"primary",size:22,style:{stroke:"#C22C3C"}}),L])])),_:1}),1===C.patientsSelected.length?((0,s.Wz)(),(0,s.Az)(ie,{key:0,flat:"",dense:"",size:"md","no-caps":"",onClick:t[10]||(t[10]=(0,i.Y7)((e=>C.editPatient(C.patientsSelected[0])),["stop"])),style:{color:"#616161","min-width":"90px",flex:"1"},class:""},{default:(0,s.Ql)((()=>[(0,s.QD)("div",U,[(0,s.K2)(S,{name:"edit",color:"primary",size:"sm",style:{}}),O])])),_:1})):(0,s.g1)("",!0),1===C.patientsSelected.length?((0,s.Wz)(),(0,s.Az)(ie,{key:1,flat:"",dense:"",size:"md","no-caps":"",onClick:t[11]||(t[11]=(0,i.Y7)((e=>C.showReviewPatientModal(C.patientsSelected[0])),["stop"])),style:{color:"#616161","min-width":"100px",flex:"1"},class:""},{default:(0,s.Ql)((()=>[(0,s.QD)("div",H,[(0,s.K2)(S,{name:"visibility",color:"primary",size:"sm",style:{}}),j])])),_:1})):(0,s.g1)("",!0),(0,s.K2)(fe,{vertical:""}),(0,s.K2)(ie,{icon:"clear",flat:"",dense:"",size:"sm",color:"black",onClick:t[12]||(t[12]=e=>C.clearChecked()),class:"",style:{width:"40px",height:"72px"}},{default:(0,s.Ql)((()=>[(0,s.K2)(re,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Clear selection")])),_:1})])),_:1})])])),_:1})])),_:1})])):(0,s.g1)("",!0)])])]),(0,s.K2)(we,{patientData:x.formData,showModal:x.showPatientModal,fetchingData:x.bFetchingPatient,title:x.modalTitle,btnText:
1x.modalButton,onSavePatient:C.resetPatientList,onClosePatientModal:t[13]||(t[13]=e=>x.showPatientModal=!1)},null,8,["patientData","showModal","fetchingData","title","btnText","onSavePatient"]),x.bShowConf?((0,s.Wz)(),(0,s.An)("div",G,[(0,s.K2)(ye,{title:"Archive Participant"+(this.patientsSelected.length>1?"s":""),message:this.patientsSelected.length>1?`Are you sure you want to archive these ${this.patientsSelected.length} patients?`:"Are you sure you want to archive this patient?",bShowConf:x.bShowConf,onConfirm:t[14]||(t[14]=e=>{C.ArchivePatients(),x.bShowConf=!1}),onCancel:t[15]||(t[15]=e=>x.bShowConf=!1)},null,8,["title","message","bShowConf"])])):(0,s.g1)("",!0),(0,s.K2)(ve,{patientData:x.currPtnt,showModal:x.reviewPatientModal,onClosePatientOverview:t[16]||(t[16]=e=>x.reviewPatientModal=!1)},null,8,["patientData","showModal"])]))])),_:1})}a(7544);var J=a(69160),X=a(60164),ee=a(31072),te=a(53240),ae=a.n(te);const se=e=>((0,s.ED)("data-v-7da7babe"),e=e(),(0,s.ii)(),e),le={class:"text-h6 full-width q-mt-sm q-mb-sm",style:{color:"#24B4BC"}},ie={class:"q-ma-sm q-mt-md",style:{display:"inline-block","vertical-align":"middle","font-size":"40px"}},ne=se((()=>(0,s.QD)("div",{class:"row"},[(0,s.QD)("div",{class:"q-mb-none text-primary col-4 text-center",style:{"border-bottom":"2px solid #24B4BC"}},"Participant Details")],-1))),oe=se((()=>(0,s.QD)("hr",{class:"q-mt-none",style:{width:"99.8%"}},null,-1))),re={class:"row full-width",style:{display:"flex","flex-flow":"row wrap"}},de={class:"",style:{flex:"1","min-width":"400px"}},ce={class:"row full-width"},he={class:"col",style:{"max-width":"140px"}},ue={class:"col"},me=se((()=>(0,s.QD)("span",{style:{"font-weight":"bold"}},[(0,s.mY)("First Name"),(0,s.QD)("span",{style:{color:"#24b4bc"}},"*")],-1))),pe={class:"col"},fe=se((()=>(0,s.QD)("span",{style:{"font-weight":"bold"}},[(0,s.mY)("Last Name"),(0,s.QD)("span",{style:{color:"#24b4bc"}},"*")],-1))),ge={class:"row full-width"},be={class:"col"},we={class:"row items-center justify-end"},ye=se((()=>(0,s.QD)("span",{style:{"font-weight":"bold"}},[(0,s.mY)("Date of Birth"),(0,s.QD)("span",{style:{color:"#24b4bc"}},"*")],-1))),ve={class:"col"},De={class:"row full-width"},Pe={class:"col"},_e={class:"row full-width"},xe={class:"col"},Ce={class:"",style:{flex:"1","min-width":"400px"}},ke={class:"row full-width"},Qe={class:"col"},qe={class:"row full-width"},Ae={class:"col"},Se={class:"col"},Me={class:"row full-width"},ze={class:"col"},Fe={class:"col"},Ee={class:"row full-width"},Te={class:"col"},We={class:"col"};function Ke(e,t,a,i,n,o){const r=(0,s.E1)("q-btn"),d=(0,s.E1)("q-card-section"),c=(0,s.E1)("q-icon"),h=(0,s.E1)("PersonEdit"),u=(0,s.E1)("q-select"),m=(0,s.E1)("ValidationError"),p=(0,s.E1)("q-input"),f=(0,s.E1)("q-date"),g=(0,s.E1)("q-popup-proxy"),b=(0,s.E1)("AddressSearch"),w=(0,s.E1)("q-tooltip"),y=(0,s.E1)("q-card-actions"),v=(0,s.E1)("loader"),D=(0,s.E1)("q-card"),P=(0,s.E1)("q-dialog"),_=(0,s.iS)("close-popup");return(0,s.Wz)(),(0,s.Az)(P,{modelValue:n.patientModal,"onUpdate:modelValue":t[19]||(t[19]=e=>n.patientModal=e),persistent:""},{default:(0,s.Ql)((()=>[(0,s.K2)(D,{style:{width:"93vw","max-width":"93vw"}},{default:(0,s.Ql)((()=>[(0,s.K2)(d,{class:"bg-primary flex justify-end q-py-none"},{default:(0,s.Ql)((()=>[(0,s.K2)(r,{flat:"",dense:"",class:"text-white",onClick:o.toggleModal,icon:"close"},null,8,["onClick"])])),_:1}),(0,s.K2)(d,{class:"row items-center text-white",style:{"text-align":"center",padding:"0"}},{default:(0,s.Ql)((()=>[(0,s.QD)("div",le,["Create"===n.btnModalText?((0,s.Wz)(),(0,s.Az)(c,{key:0,style:{display:"inline-block","vertical-align":"middle"},size:"40px",name:"person_add"})):(0,s.g1)("",!0),"Create"!=n.btnModalText?((0,s.Wz)(),(0,s.Az)(h,{key:1,class:"q-mt-sm",style:{display:"inline-block","vertical-align":"middle"},size:"40px"})):(0,s.g1)("",!0),(0,s.QD)("div",ie,(0,l.WA)(n.modalTitle)+" Participant",1)])])),_:1}),(0,s.K2)(d,{class:"q-pl-none q-pr-none"},{default:(0,s.Ql)((()=>[ne,oe])),_:1}),n.loader?((0,s.Wz)(),(0,s.Az)(d,{key:1},{default:(0,s.Ql)((()=>[(0,s.K2)(v,{msg:"Fetching patient info",height:"200px"})])),_:1})):((0,s.Wz)(),(0,s.Az)(d,{key:0},{default:(0,s.Ql)((()=>[(0,s.QD)("div",re,[(0,s.QD)("div",de,[(0,s.QD)("div",ce,[(0,s.QD)("div",he,[(0,s.K2)(u,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-sp
1ace":"",modelValue:n.formData.title,"onUpdate:modelValue":t[0]||(t[0]=e=>n.formData.title=e),options:n.patientTitles,label:"Title"},null,8,["modelValue","options"]),(0,s.K2)(m,{message:n.validation_message,input:"title"},null,8,["message"])]),(0,s.QD)("div",ue,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",modelValue:n.formData.first_name,"onUpdate:modelValue":t[1]||(t[1]=e=>n.formData.first_name=e),"lazy-rules":"","label-slot":"",ref:"First_Name",rules:[e=>e&&e.length>0||"First name is required"]},{label:(0,s.Ql)((()=>[me])),_:1},8,["modelValue","rules"]),(0,s.K2)(m,{message:n.validation_message,input:"first_name"},null,8,["message"])]),(0,s.QD)("div",pe,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","label-slot":"",modelValue:n.formData.last_name,"onUpdate:modelValue":t[2]||(t[2]=e=>n.formData.last_name=e),"lazy-rules":"","hide-bottom-space":"",ref:"Last_Name",rules:[e=>e&&e.length>0||"Last name is required"]},{label:(0,s.Ql)((()=>[fe])),_:1},8,["modelValue","rules"]),(0,s.K2)(m,{message:n.validation_message,input:"last_name"},null,8,["message"])])]),(0,s.QD)("div",ge,[(0,s.QD)("div",be,[(0,s.K2)(p,{class:"q-ma-sm",ref:"ptntBirthday",outlined:"",dense:"",modelValue:n.formData.birthday_new,"onUpdate:modelValue":t[4]||(t[4]=e=>n.formData.birthday_new=e),rules:o.birthdayRules,"label-slot":"",mask:"##/##/####",placeholder:"DD/MM/YYYY","lazy-rules":"on-demand",onBlur:t[5]||(t[5]=e=>o.validateBirthday()),"hide-bottom-space":"",style:{flex:"1","margin-right":"0px","border-radius":"10px"}},{append:(0,s.Ql)((()=>[(0,s.K2)(c,{name:"event",class:"cursor-pointer"},{default:(0,s.Ql)((()=>[(0,s.K2)(g,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:(0,s.Ql)((()=>[(0,s.K2)(f,{modelValue:n.formData.birthday_new,"onUpdate:modelValue":t[3]||(t[3]=e=>n.formData.birthday_new=e),mask:"DD/MM/YYYY","first-day-of-week":1},{default:(0,s.Ql)((()=>[(0,s.QD)("div",we,[(0,s.wt)((0,s.K2)(r,{label:"Close",color:"primary",flat:""},null,512),[[_]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),label:(0,s.Ql)((()=>[ye])),_:1},8,["modelValue","rules"]),(0,s.K2)(m,{message:n.validation_message,input:"birthday"},null,8,["message"])]),(0,s.QD)("div",ve,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"",modelValue:n.formData.mobile,"onUpdate:modelValue":t[6]||(t[6]=e=>n.formData.mobile=e),ref:"Mobile",label:"Mobile","hide-bottom-space":"",onInput:o.trimMobile,rules:[o.phoneRule],"lazy-rules":""},null,8,["modelValue","onInput","rules"])])]),(0,s.QD)("div",De,[(0,s.QD)("div",Pe,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",ref:"Email",modelValue:n.formData.email,"onUpdate:modelValue":t[7]||(t[7]=e=>n.formData.email=e),rules:[o.emailRule],"lazy-rules":"",label:"Email Address"},null,8,["modelValue","rules"])])]),(0,s.QD)("div",_e,[(0,s.QD)("div",xe,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",modelValue:n.formData.mrn,"onUpdate:modelValue":t[8]||(t[8]=e=>n.formData.mrn=e),label:"Study ID"},null,8,["modelValue"])])])]),(0,s.QD)("div",Ce,[(0,s.QD)("div",null,[(0,s.QD)("div",null,[(0,s.QD)("div",ke,[(0,s.QD)("div",Qe,[(0,s.K2)(b,{onUpdateAddress:o.handleUpdateAddress},null,8,["onUpdateAddress"])])]),(0,s.QD)("div",qe,[(0,s.QD)("div",Ae,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",modelValue:n.formData.unit,"onUpdate:modelValue":t[9]||(t[9]=e=>n.formData.unit=e),label:"Unit"},null,8,["modelValue"])]),(0,s.QD)("div",Se,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",modelValue:n.formData.address,"onUpdate:modelValue":t[10]||(t[10]=e=>n.formData.address=e),label:"Street Address"},null,8,["modelValue"]),(0,s.K2)(m,{message:n.validation_message,input:"address"},null,8,["message"])])]),(0,s.QD)("div",Me,[(0,s.QD)("div",ze,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"",modelValue:n.formData.suburb,"onUpdate:modelValue":t[11]||(t[11]=e=>n.formData.suburb=e),label:"Suburb / City","lazy-rules":"","hide-bottom-space":"",rules:[e=>e&&e.length>0||"Please type something"]},null,8,["modelValue","rules"]),(0,s.K2)(m,{message:n.validation_message,input:"suburb"},null,8,["message"])]),(0,s.QD)("div",Fe,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-sp
1ace":"",modelValue:n.formData.state_international,"onUpdate:modelValue":t[12]||(t[12]=e=>n.formData.state_international=e),label:"State"},null,8,["modelValue"])])]),(0,s.QD)("div",Ee,[(0,s.QD)("div",Te,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",modelValue:n.formData.postcode,"onUpdate:modelValue":t[13]||(t[13]=e=>n.formData.postcode=e),label:"Postcode / Zip","lazy-rules":"",rules:[e=>e&&e.length>0||"Please type something"]},null,8,["modelValue","rules"]),(0,s.K2)(m,{message:n.validation_message,input:"postcode"},null,8,["message"])]),(0,s.QD)("div",We,[(0,s.K2)(p,{class:"q-ma-sm",outlined:"",dense:"","hide-bottom-space":"",modelValue:n.formData.country,"onUpdate:modelValue":t[14]||(t[14]=e=>n.formData.country=e),label:"Country","lazy-rules":"",rules:[e=>e&&e.length>0||"Please type something"]},null,8,["modelValue","rules"]),(0,s.K2)(m,{message:n.validation_message,input:"country"},null,8,["message"])])])])])])]),(0,s.K2)(y,{align:"center",class:"q-mt-lg"},{default:(0,s.Ql)((()=>[a.brokenConsent?((0,s.Wz)(),(0,s.An)(s.ae,{key:1},[(0,s.K2)(r,{style:{"min-width":"170px"},disable:!o.validateEmailAddress(n.formData.email),"no-caps":"",class:"q-ma-sm q-pl-md q-pr-md",icon:"mail",dense:"",color:"primary",label:"Email Patient",onClick:t[17]||(t[17]=e=>{n.consentWorkflow="email",o.submitForm()})},{default:(0,s.Ql)((()=>[(0,s.K2)(w,null,{default:(0,s.Ql)((()=>[(0,s.mY)("Email to Patient")])),_:1})])),_:1},8,["disable"]),(0,s.K2)(r,{style:{"min-width":"170px"},disable:!o.validatePhoneNumber(n.formData.mobile),"no-caps":"",class:"q-ma-sm q-pl-md q-pr-md",icon:"smartphone",dense:"",color:"primary",label:"SMS Patient",onClick:t[18]||(t[18]=e=>{n.consentWorkflow="sms",o.submitForm()})},{default:(0,s.Ql)((()=>[(0,s.K2)(w,null,{default:(0,s.Ql)((()=>[(0,s.mY)("SMS to Patient mobile")])),_:1})])),_:1},8,["disable"])],64)):((0,s.Wz)(),(0,s.An)(s.ae,{key:0},[(0,s.K2)(r,{label:"Cancel",unelevated:"",style:{width:"100px"},color:"grey-5",class:"text-white q-mx-lg","no-caps":"",onClick:t[15]||(t[15]=e=>o.toggleModal())}),(0,s.K2)(r,{color:"primary",icon:"save",unelevated:"",style:{width:"100px"},"no-caps":"",onClick:t[16]||(t[16]=e=>o.submitForm()),label:n.btnModalText},null,8,["label"])],64))])),_:1})])),_:1}))])),_:1})])),_:1},8,["modelValue"])}var Re=a(72964),Ve=a(40048),$e=a(98560),Ne=a(20600),Be={props:{showModal:{type:Boolean,default:!0},nameStub:{type:String,default:""},title:{type:String,default:""},btnText:{type:String,default:""},patientData:{type:Object},fetchingData:{type:Boolean,default:!1},brokenFlow:{type:String,default:""},brokenConsent:{type:Boolean,default:!1}},data(){return{consentWorkflow:"email",localBrokenFlow:"",oldestLivingPersonBirthday:new Date(1903,11,14),CurrTeam:{},fRender:0,bShowAddy:!1,loader:!1,sPages:{sortBy:"patient_name",descending:!1,page:1,rowsPerPage:25},formDataInitialState:{id:null,title:null,first_name:null,last_name:null,birthday:null,mobile:null,email:null,address_search:null,unit:null,address:null,suburb:null,state_international:null,state:null,postcode:null,country:null},formData:{...this.formDataInitialState},validation_message:null,selectedTitle:null,rCols:[{name:"expand",label:"",field:"expand",sortable:!1},{name:"patient_name",align:"left",label:"Patient Name",field:"first_name",sortable:!0,sortOrder:"ad"},{name:"birthday",align:"left",label:"DOB",field:"birthday",sortable:!0},{name:"email",align:"left",label:"Email",field:"email",sortable:!0},{name:"mobile",align:"left",label:"Mobile",field:"mobile",sortable:!0},{name:"consent_status",label:"Consent Status",field:"consent_status",sortable:!1},{name:"action",align:"left",label:"Action",field:"action",sortable:!1}],consentCols:[{name:"consent_name",align:"left",label:"Procedure",field:"consent.name",sortable:!0},{name:"practice_name",align:"left",label:"Procedure",field:"practice.name",sortable:!0},{name:"workflow",align:"left",label:"Workflow",field:"workflow",sortable:!0},{name:"status",align:"left",label:"Status",field:"status",sortable:!0},{name:"patient_signed_ts",align:"left",label:"Action",field:"patient_signed_ts",sortable:!1}],modalTitle:"Add",modalButton:"Create",patientModal:!1,patients:[],patientTitles:[{name:"Dr",label:"Doctor"},{name:"Prof.",label:"Professor"},{name:"Assoc. Prof.",label:"Assoc. Prof."},{name:"Mr",label:"Mr."},{name:"Mrs",label:"Mrs."},{name:"Ms",label:"Ms."},{name:"Miss",label:"Miss"},{name:"Master",label:"Master"}],txtSearch:"",btnModalText:""}},components:{AddressSearch:Re.c,ValidationError:Ve.c,loader:J.c,PersonEdit:Ne.c},computed:{...(0,$e.gV)("patients",["getPatient","getPatientList"]),...(0,$e.gV)("users",["getAuthUser"]),...(0,$e.gV)("consentic",["getCurrTeamIndex"]),birthdayRules(){return[e=>!!e||"Birthday is required",e=>this.isValidDateFormat2(e)||"Birthday must be in DD/MM/YYYY format",e=>this.isBeforeToday(e)||"Birthday must be before today",e=>this.isAfterOldestLivingPerson(e)||`Birthday must be after ${this.oldestLivingPersonBirthday.toLocaleDateString()}`]},patientsSelected:function(){var e,t=[];for(e=0;e<this.filteredPatients.length;e++)this.filteredPatients[e]?.selected&&t.push(this.filteredPatients[e]);return t}},methods:{...(0,$e.ae)("patients",["storePatient","updatePatient","resubmitReqs"]),...(0,$e.ae)("alerts",["Notify"]),trimMobile(){this.formData.mobile=this.formData.mobile.replace(" ","")},emailRule(e){if("email"===this.localBrokenFlow)return"Undeliverable Email";if(this.isEmpty(e))return this.localBrokenFlow="",!0;{const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.test(e)||"Please enter a valid email address"}},phoneRule(e){if("sms"===this.localBrokenFlow)return"Undeliverable Phone Number";if(this.isEmpty(e))return this.localBrokenFlow="",!0;{const t=/^(?:\+61|0)?4\d{8}$/,a=e.length>=10&&e.length<=15&&t.test(e);return a||"Please enter a valid Australian mobile number (10-15 characters)"}},validatePhoneNumber:function(e){if(!e)return!1;e=e.replace(/[^0-9+]/g,"");const t=/^(?:\+?61|0)?[2-9]\d{8}$/;return t.test(e)},validateEmailAddress:function(e){const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.test(e)},validateDate(e,t){if(!e)return!1;const a=/^\d{2}\/\d{2}\/\d{4}$/;if(!a.test(e))return!1;const[s,l,i]=e.split("/").map(Number),n=new Date(i,l-1,s);if(n.getDate()===s&&n.getMonth()===l-1&&n.getFullYear()===i){if(!0===t){const e=new Date;return e.setHours(0,0,0,0),!(n<e)||"Date must be in the future"}{const e=new Date,t=new Date;return t.setFullYear(e.getFullYear()-120),n<t?"No one is that old":!(n>e)||"Patient birthday must be in the past"}}return!1},validateBirthday(){return""!=this.formData.birthday_new&&null!=this.formData.birthday_new&&(console.warn("Refs?",this.$refs),this.$refs?.["ptntBirthday"].validate()),!0},formatDate(e){if(!e)return"";const[t,a,s]=e.split("-");return`${s}/${a}/${t}`},parseDate(e){if(!e)return"";const[t,a,s]=e.split("/");return`${s}-${a}
1-${t}`},isValidDateFormat(e){const t=e.split("/");if(3!==t.length)return!1;const[a,s,l]=t,i=!isNaN(a)&&a>0&&a<32,n=!isNaN(s)&&s>0&&s<13,o=!isNaN(l)&&4===l.length;return i&&n&&o},isValidDateFormat2(e){const t=e.includes("-")?e.split("-"):e.split("/");if(console.warn("Parts?",t),3!==t.length)return!1;const[a,s,l]=t,i=!isNaN(a)&&Number(a)>0&&Number(a)<32,n=!isNaN(s)&&Number(s)>0&&Number(s)<13,o=!isNaN(l)&&4===l.length;return i&&n&&o},isBeforeToday(e){const t=e.includes("-")?e.split("-"):e.split("/"),[a,s,l]=t,i=new Date(`${a}-${s}-${l}`),n=new Date;return i<n},isAfterOldestLivingPerson(e){const t=e.includes("-")?e.split("-"):e.split("/"),[a,s,l]=t,i=new Date(`${a}-${s}-${l}`);return i>this.oldestLivingPersonBirthday},isEmpty(e){return"undefined"==typeof e||""==e||null==e},getFullName(e){return`${e.title} ${e.first_name} ${e.last_name}`.trim()},resetAddress(){this.formData.address=null,this.formData.suburb=null,this.formData.state_international=null,this.formData.state=null,this.formData.postcode=null,this.formData.country=null},handleUpdateAddress(e){this.resetAddress();let t={subpremise:"long_name",street_number:"long_name",route:"short_name",locality:"long_name",administrative_area_level_1:"long_name",postal_code:"short_name",country:"long_name"};for(var a=0;a<e.length;a++){var s=e[a].types[0];if(t[s]){var l=e[a][t[s]];switch(s){case"subpremise":this.formData.unit=l.replace(/\b[a-zA-Z]/g,(e=>e.toUpperCase()));break;case"street_number":this.formData.address=l||"";break;case"locality":this.formData.suburb=l;break;case"administrative_area_level_1":this.formData.state_international=l,this.formData.state=l;break;case"postal_code":this.formData.postcode=l;break;case"route":case"address":this.formData.address=l?this.formData.address?`${this.formData.address} ${l}`:l:"";break;case"country":this.formData.country=l;break}}}},toggleModal(){this.patientModal=!this.patientModal,this.patientModal||(this.formData={...this.formDataInitialState},this.$emit("closePatientModal"))},resetModal(){this.validation_message=null},async submitForm(){if(this.loader)return;this.validation_message=null;let e=null;var t,a=[];if(console.log("Attempting to submit form:",this.formData),this.isEmpty(this.formData.first_name)&&(a.push("First name field is required"),this.$refs?.["First_Name"].validate()),this.isEmpty(this.formData.last_name)&&(a.push("Last name field is required"),this.$refs?.["Last_Name"].validate()),this.isEmpty(this.formData.birthday_new))this.$refs?.["ptntBirthday"].validate(),a.push("Date of Birth field is required");else if(this.formData.birthday_new){const[e,t,a]=this.formData.birthday_new.includes("/")?this.formData.birthday_new.split("/").reverse():this.formData.birthday_new.split("-");this.formData.birthday=`${e}/${t}/${a}`}if(this.isEmpty(this.formData.email)||this.validateEmailAddress(this.formData.email)||a.push("Invalid Email: "+this.formData.email),this.isEmpty(this.formData.mobile)||this.validatePhoneNumber(this.formData.mobile)||a.push("Invalid Mobile: "+this.formData.mobile),a.length)return this.Notify({txtMsg:"Please correct problem fields before submitting:<br/>"+a.join("<br/>"),txtType:"negative"}),!1;this.loader=!0;try{this.formData.id?(t=this.formData.id,e=await this.updatePatient(this.formData),console.log(this.formData,e)):(this.bShowAddy&&this.formData.country&&this.formData.postcode||delete this.formData["postcode"],e=await this.storePatient(this.formData)),e&&200===e.status&&e.data.success?(this.toggleModal(),this.brokenConsent&&(console.log("working with:",JSON.stringify(this.formData)),this.resubmitReqs({team_id:this.CurrTeam.id,pid:t,workflow:this.consentWorkflow})),this.formData={...this.formDataInitialState},this.loader=!1,this.$emit("savePatient")):(console.log(e.data.data,"errorr"),this.validation_message=e.data.data)}catch(s){console.log(s,"error"),s.response&&(this.validation_message=s.response.data.errors),this.loader=!1}}},watch:{patientModal:function(){!1===this.patientModal&&this.resetModal()},fetchingData:function(){this.loader=this.fetchingData},showModal:function(){this.patientModal=this.showModal,this.loader=this.fetchingData,this.modalTitle=""!=this.title?this.title:"Edit",this.modalButton=""!=this.btnText?this.btnText:"Update",this.btnModalText="Add Patient"===this.modalTitle?"Create":"Save"},patientData:{handler(e){this.formData=e,this.modalTitle=this.formData.id?"Edit":"Add",this.modalButton=this.formData.id?"Update":"Create",this.localBrokenFlow=this.brokenFlow,console.log("validate?",this.localBrokenFlow),this.$nextTick((()=>{"sms"===this.localBrokenFlow?this.$refs.Mobile.validate():"email"===this.localBrokenFlow&&(console.log("Email validate?",this.$refs),this.$refs?.Email?.validate())})),this.formData.id&&this.formData.address&&(this.bShowAddy=!0)},deep:!0}},created(){this.patientData&&(this.formData=this.patientData)},mounted(){if(this.CurrTeam=this.getAuthUser.teams[this.getCurrTeamIndex],""!=this.nameStub){var e=this.nameStub.split(" ");this.formData.first_name=e[0]?e[0].trim():null,this.formData.last_name=e[1]?e[1].trim():null}}},Ye=a(25552),Ie=a(1572),Le=a(32156),Ue=a(784),Oe=a(18368),He=a(54232),je=a(61620),Ge=a(108),Ze=a(38704),Je=a(29516),Xe=
1a(2340),et=a(43360),tt=a(83520),at=a(20896),st=a.n(at);const lt=(0,Ye.c)(Be,[["render",Ke],["__scopeId","data-v-7da7babe"]]);var it=lt;st()(Be,"components",{QDialog:Ie.c,QCard:Le.c,QCardSection:Ue.c,QBtn:Oe.c,QIcon:He.c,QSelect:je.c,QInput:Ge.c,QPopupProxy:Ze.c,QDate:Je.c,QCardActions:Xe.c,QTooltip:et.c}),st()(Be,"directives",{ClosePopup:tt.c});var nt=a(49488),ot=a(5680),rt=a(64584),dt=a(40230),ct={data(){return{bWatch4Reload:!1,timeout:null,bShowAllConsentRequests:!1,reviewPatientModal:!1,patientId:null,bCustTitle:!1,CurrTeam:{},fRender:0,bShowConf:!1,bShowAddy:!0,bArchiving:!1,isLoading:!0,isRefreshing:!1,bFetchingPatient:!1,bPauseCheckAllWatcher:!1,selectAll:!1,sPages:{sortBy:"patient_name",descending:!1,page:1,rowsPerPage:10,rowsNumber:10},sSubPages:{sortBy:"procedure_date",descending:!0,page:1,rowsPerPage:25},formDataInitialState:{id:null,first_name:null,last_name:null,birthday:null,mobile:null,email:null,address_search:null,unit:null,address:null,suburb:null,state_international:null,state:null,postcode:null,country:null},formData:{...this.formDataInitialState},validation_message:null,selectedTitle:null,rCols:[{name:"patient_name",align:"left",label:"Participant Name",field:"first_name",sortable:!0,sortOrder:"ad",headerClasses:"col-lg-3"},{name:"birthday",align:"left",label:"DOB",field:"birthday",sortable:!0,headerClasses:"col-lg-2"},{name:"mobile",align:"left",label:"Mobile",field:"mobile",sortable:!0,headerClasses:"col-lg-2"},{name:"email",align:"left",label:"Email",field:"email",sortable:!0,headerClasses:"col-lg-2"},{name:"consent_status",align:"left",label:"Requests",field:"consent_status",sortable:!0,headerClasses:"col-lg-2"},{name:"action",align:"right",label:"Action",field:"action",sortable:!1,headerClasses:"col-lg-1"}],consentCols:[{name:"consent_name",align:"left",label:"Procedure",field:"consent.name",sortable:!0},{name:"procedure_date",align:"left",label:"Procedure Date",field:"datetime",sortable:!0},{name:"workflow",align:"left",label:"Workflow",field:"workflow",sortable:!0},{name:"status",align:"left",label:"Status",field:"status",sortable:!0},{name:"patient_signed_ts",align:"left",label:"Action",field:"patient_signed_ts",sortable:!1}],modalTitle:"Add",modalButton:"Create Participant",showPatientModal:!1,showPatientOverview:!1,currPtnt:{},patients:[],txtSearch:"",rPatStatusOpts:[{value:"comms_fail",label:"Requests Errors"},{value:"pending",label:"Pending Requests"},{value:"deleted",label:"Archived Participants"}],sStatusOpt:{value:"all",label:"Participant Filter"},showFilter:!1,filterPatient:[!1,!1,!1],bCheckAll:!1,bFetchingCRs:!1}},components:{HeaderTitle:rt.c,PatientAddModal:it,loader:J.c,ConfDial:X.c,PatientOverviewTabModal:nt.c,PersonEdit:Ne.c,ArchiveIcon:ot.a0,AllRequests:dt.c},computed:{...(0,$e.gV)("patients",["getPatient","getPatientList","getPatientsCount","getBFetchingData","getPagination","getPatientStoreFetchingData"]),...(0,$e.gV)("users",["getAuthUser"]),...(0,$e.gV)("consentic",["getCurrTeamIndex","getConsentTypes","getBetaView","getDevMode","getCurrTeamId","getPatientConsentRequests"]),filterCount:function(){var e=0;return this.filterPatient.forEach((t=>{t&&e++})),e},patientsSelected:function(){var e,t=[];for(e=0;e<this.filteredPatients.length;e++)this.filteredPatients[e]?.selected&&t.push(this.filteredPatients[e]);return console.log(t),t},filteredPatients:function(){return this.patients}},methods:{...(0,$e.ae)("alerts",["Notify"]),...(0,$e.ae)("patients",["CachePatients","fetchPatients","fetchPatient","downloadConsent","archivePatients","setupPagination"]),...(0,$e.ae)("consentic",["fetchConsentTypes","setCurrTab","fetchPatientConsentRequests","downloadPDF"]),loadConsents(e){this.setCurrTab("ConsentRequests"),this.$router.push({name:"ConsentRequests",query:{searchBy:e?"PID:"+e:""}})},clearChecked(){this.filteredPatients.forEach((e=>{e.selected=!1}))},sPageInfo(){var e={};e.team_id=this.getCurrTeamId,e.page=this.sPages.page,e.rows=this.sPages.rowsPerPage,""!=this.sPages.sortBy&&(e.order_by=this.sPages.sortBy,e.order=this.sPages.descending?"DESC":"ASC"),""!=this.txtSearch&&(e.txtSearch=this.txtSearch);var t=this.filterPatient.findIndex((e=>0!=e));return-1!=t&&(e.status=[],this.filterPatient.forEach(((t,a)=>{t&&e.status.push(this.rPatStatusOpts[a].value)}))),console.log("Fetching Participants with:",e,JSON.stringify(e?.status),this.sPages),e},timeAgo:function(e){const t=new Date(e),a=new Date,s=Math.round((a-t)/1e3),l=Math.round(s/60),i=Math.round(l/60),n=Math.round(i/24),o=Math.round(n/7),r=Math.round(n/30),d=Math.round(n/365);return s<60?`${s} seconds ago`:l<60?`${l} minutes ago`:i<24?`${i} hours ago`:n<7?`${n} days ago`:o<4?`${o} weeks ago`:r<12?`${r} months ago`:`${d} years ago`},lookupType:function(e){if(!this.isEmpty(e?.consent_type_id)&&this.getConsentTypes.length){var t=this.getConsentTypes.findIndex((t=>t.id==e.consent_type_id));return-1!=t?this.getConsentTypes[t].name:""}return""},editConsentRequest:function(){this.Notify("Not yet written.")},consCount(e,t){var a=e.filter((e=>e.status==t));return a.length},completedCount:function(e){var t=e.filter((e=>"Completed"==e.status));return t.length},currentConsents:function(e){var t=[],a={};const s=new Date;return s.setFullYear(s.getFullYear()-1),e.forEach((e=>{if("Completed"===e.status&&new Date(e.updated_at)>s){let t=a[e.id];(!t||new Date(e.updated_at)>new Date(t.updated_at))&&(a[e.id]=e)}})),t=Object.values(a),t.length&&t.sort(((e,t)=>e.consent.name.localeCompare(t.consent.name))),t},pendingConsents:function(e){var t=e.filter((e=>"Completed"!=e.status&&"Deleted"!=e.status));return t},ConfArchPatients(){this.bShowConf=!0},ArchivePatients(){let e=[];this.patientsSelected.forEach((t=>{e.push(t.id)}
1)),e.length?(this.bArchiving=!0,this.bWatch4Reload=!0,console.log("Archiving patients..."),this.archivePatients(e)):this.Notify({txtMsg:"Please select a patient to be archived first.",txtType:"negative"})},isEmpty(e){return"undefined"==typeof e||""==e||null==e},denseFormatDate(e){const t="DD MMM YYYY";return ae()(e).format(t)},getFullName(e){return`${"undefined"!=typeof e.title&&0!=e.title?e.title+" ":""}${e.first_name} ${e.last_name}`.trim()},Collapse2(e){for(let t=0;t<this.patients.length;t++)this.patients[t].expand=this.patients[t].id===e&&!this.patients[t].expand},loadRequest(e){this.$router.push({name:"ConsentRequests",query:{searchBy:e?"CID:"+e:""}})},async Collapse(e){var t;if(!this.$refs.Table?.filteredSortedRows?.length)return!1;for(t=0;t<this.$refs.Table.filteredSortedRows.length;t++)if(t==e)if(this.$refs.Table.filteredSortedRows[t].expand=!this.$refs.Table.filteredSortedRows[t].expand,this.patients[t].expand){this.allConsentRequests=[];var a=this.$refs.Table.filteredSortedRows[t];console.log(a,"currRequest"),this.bFetchingCRs=!0,this.allConsentRequests=[],await this.fetchPatientConsentRequests(this.patients[t].id),setTimeout((()=>{var e=this.getPatientConsentRequests;e.forEach((e=>{null!=e.deleted_at?e.status="Deleted":null!=e.discontinued_at?e.status="Discontinued":e.opened_at||e.patient_signed_ts?e.read_pdf_consent||"pdf"!=e.format?e.video_watched||"video"!=e.format?e.patient_signed_ts?e.user_sign&&!e.user_signed_ts?e.status="Pending Dr. signature":e.status="Completed":e.status="Pending Patient signature":e.status="Not yet watched":e.status="Document not read":e.status="Not yet opened",e.severity="0-normal";const t=new Date;e.datetime&&e.datetime<t||e.datetime&&e.datetime<new Date(t.getTime()+1728e5)?e.severity="1-warning":e.datetime&&e.datetime<new Date(t.getTime()+432e5)&&(e.severity="1-danger"),e.children.forEach((e=>{null!=e.deleted_at?e.status="Deleted":null!=e.discontinued_at?e.status="Discontinued":e.opened_at||e.patient_signed_ts?e.read_pdf_consent||"pdf"!=e.format?e.video_watched||"video"!=e.format?e.patient_signed_ts?e.user_sign&&!e.user_signed_ts?e.status="Pending Dr. signature":e.status="Completed":e.status="Pending Patient signature":e.status="Not yet watched":e.status="Document not read":e.status="Not yet opened",e.severity="0-normal";const t=new Date;e.datetime&&e.datetime<t||e.datetime&&e.datetime<new Date(t.getTime()+1728e5)?e.severity="1-warning":e.datetime&&e.datetime<new Date(t.getTime()+432e5)&&(e.severity="1-danger")}))})),this.bFetchingCRs=!1,this.allConsentRequests=e}),1500)}else this.allConsentRequests=[];else this.$refs.Table.filteredSortedRows[t].expand=!1},formatAddress(e){let t="";return e?.unit&&(t+=e.unit),e?.line_1&&(t+=(t?", ":"")+e.line_1),t||"No address on file"},getFullAddress(e){if(!e||"object"!==typeof e)return"No address on file";const t=["unit","line_1","line_2","suburb","state","postcode","country"];return t.filter((t=>t in e&&e[t]&&"null"!==e[t])).map((t=>e[t])).join(", ")},InitSoloConsent(e){this.CachePatients([e]),this.$router.push("addConsent")},InitBulkConsent(){console.warn("Caching:",this.patientsSelected),this.CachePatients(this.patientsSelected),this.$router.push("addConsent")},checkCheckAll:function(){this.bPauseCheckAllWatcher=!0;var e,t=0;for(e=0;e<this.$refs.Table.filteredSortedRows.length&&(0==this.sPages.rowsPerPage||e<this.sPages.rowsPerPage);e++)this.$refs.Table.filteredSortedRows[e].selected&&t++;t==this.$refs.Table.filteredSortedRows.length||t==this.sPages.rowsPerPage?this.bCheckAll=!0:this.bCheckAll=0!=t&&0,console.warn("Made it to checkCheckAll!",t,this.$refs.Table.filteredSortedRows.length,this.sPages.rowsPerPage),console.warn("Selected?",this.patientsSelected,this.patients);var a=this;this.$nextTick((function(){a.bPauseCheckAllWatcher=!1,a.fRender++}))},parseStatus(e){var t="";return t=null!=e.deleted_at?"Deleted":null!=e.discontinued_at?"Discontinued":e.read_pdf_consent||"pdf"!=e.format?e.read_text||"video"==e.format?e.video_watched||"video"!=e.format?e.patient_signed_ts?e.user_sign&&!e.user_signed_ts?"Pending Dr. signature":"Completed":"Pending Participant signature":"Not yet watched":"Not yet opened":"Document not read",t},resetAddress(){this.formData.address=null,this.formData.suburb=null,this.formData.state_international=null,this.formData.state=null,this.formData.postcode=null,this.formData.country=null},handleUpdateAddress(e){this.resetAddress();let t={subpremise:"long_name",street_number:"long_name",route:"short_name",locality:"long_name",administrative_area_level_1:"long_name",postal_code:"short_name",country:"long_name"};for(var a=0;a<e.length;a++){var s=e[a].types[0];if(t[s]){var l=e[a][t[s]];switch(s){case"subpremise":this.formData.unit=l.replace(/\b[a-zA-Z]/g,(e=>e.toUpperCase()));break;case"street_number":this.formData.address=l||"";break;case"locality":this.formData.suburb=l;break;case"administrative_area_level_1":this.formData.state_international=l,this.formData.state=l;break;case"postal_code":this.formData.postcode=l;break;case"route":case"address":this.formData.address=l?this.formData.address?`${this.formData.address} ${l}`:l:"";break;case"country":this.formData.country=l;break}}}},toggleModal(){this.bShowAddy=!1,this.showPatientModal=!this.showPatientModal,this.showPatientModal||this.resetModal()},resetModal(){this.formData={...this.formDataInitialState},this.validation_message=null,this.selectedTitle=null},showReviewPatientModal(){this.reviewPatientModal=!this.reviewPatientModal},async editPatient(e){this.modalTitle="Edit ",this.modalButton="Update ",this.bFetchingPatient=!0,this.toggleModal(),await this.fetchPatient(e.id),setTimeout((()=>{this.formData=this.getPatient,this.formData.birthday_new=ae()(this.formData.birthday,"YYYY-MM-DD").format("DD/MM/YYYY"),this.bFetchingPatient=!1}),1500)},async onRequest(e){console.log("onRequest fired!",e),this.isRefreshing=!0,this.sPages=e.pagination,this.resetPatientList()},async resetPatientList(){console.log("Fetching patients with:",this.sPageInfo()),await this.fetchPatients(this.sPageInfo())}},watch:{getPatientStoreFetchingData(){console.log("getPatientStoreFetchingData fired:",this.getPatientStoreFetchingData,this.bWatch4Reload),0==this.getPatientStoreFetchingData&&1==this.bWatch4Reload&&(this.bWatch4Reload=!1,this.fetchPatients(this.sPageInfo()))},txtSearch(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.isRefreshing=!0,this.fetchPatients(this.sPageInfo())}),400)},filterPatient:{handler:function(){this.isRefreshing=!0,this.fetchPatients(this.sPageInfo())},deep:!0},selectAll:function(e){if(1!=this.bPauseCheckAllWatcher){var t;for(console.warn("selectAll watcher still running...",this.bPauseCheckAllWatcher,this.sPages.rowsPerPage,e),console.warn("CheckAll within:",this.$refs.Table,this.sPages),t=0;t<this.$refs.Table.filteredSortedRows.length&&(0==this.sPages.rowsPerPage||t<this.sPages.rowsPerPage);t++)this.$refs.Table.filteredSortedRows[t].selected=e,console.warn("Why??",this.$refs.Table.filteredSortedRows[t].selected);console.warn("Selected ALL!",this.$refs.Table.filteredSortedRows),this.fRender++}},selectedTitle:function(){this.formData.title="undefined"!=typeof this.selectedTitle?.name?this.selectedTitle.name:this.selectedTitle,"Other"==this.formData.title&&(this.bCustTitle=!0,this.selectedTitle="")},formData:function(){if(this.modalTitle=this.formData.id?"Edit":"Add",this.modalButton=this.formData.id?"Update Participant":"Create Participant",this.formData.id){let e=this.formData.address;this.formData.address=e?.line_1,this.formData.unit=e?.unit,this.formData.suburb=e?.suburb,this.formData.state_international=e?.state,this.formData.state=e?.state,this.formData.postcode=e?.postcode,this.formData.country=e?.country,this.formData.mobile=this.formData?.phone_number?.number,this.formData.email=this.formData?.email?.address,this.selectedTitle={name:this.formData.title,label:this.formData.title}}},showPatientModal:function(){!1===this.showPatientModal&&this.resetModal()},getPatientList:{handler:function(){this.patients=JSON.parse(JSON.stringify(this.getPatientList)),this.sPages.rowsNumber=this.getPatientsCount,this.patients=this.patients.filter((e=>
1null!==e.first_name&&null!==e.last_name)),this.patients.forEach((e=>{e.selected="undefined"!=typeof e?.selected&&e.selected,e.title=this.isEmpty(e?.title)?"":e.title,e.consent_requests.forEach((e=>{null!=e.deleted_at?e.status="Deleted":null!=e.discontinued_at?e.status="Discontinued":e.read_pdf_consent||"pdf"!=e.format?e.read_text||"video"==e.format?e.video_watched||"video"!=e.format?e.patient_signed_ts?e.user_sign&&!e.user_signed_ts?e.status="Pending Dr. signature":e.status="Completed":e.status="Pending Participant signature":e.status="Not yet watched":e.status="Not yet opened":e.status="Document not read",e.severity="0-normal";const t=new Date;e.datetime&&e.datetime<t||e.datetime&&e.datetime<new Date(t.getTime()+1728e5)?e.severity="1-warning":e.datetime&&e.datetime<new Date(t.getTime()+432e5)&&(e.severity="1-danger")})),e.pending_consent_requests=this.pendingConsents(e.consent_requests),e.current_consents=this.currentConsents(e.consent_requests)})),this.isLoading=!1,this.isRefreshing=!1,this.bArchiving=!1,this.bCustTitle=!1,this.fRender++,console.warn("new patients:",this.patients)},deep:!0},getPagination:{handler:function(){this.sPages=this.getPagination},deep:!0}},created(){this.showPatientModal=!1,this.showPatientOverview=!1},mounted(){if(this.setupPagination(this.sPages),this.sScreen=ee.c,this.getConsentTypes.length||this.fetchConsentTypes(),this.CurrTeam=this.getAuthUser.teams[this.getCurrTeamIndex],console.warn("getBFetchingData:",this.getBFetchingData),this.$route.query){this.txtSearch=this.$route.query.filterBy??"";var e=this.$route.query.status??"all",t=this.rPatStatusOpts.findIndex((t=>t.value==e));-1!=t&&(this.sStatusOpt=this.rPatStatusOpts[t])}this.fetchPatients(this.sPageInfo())}},ht=a(89616),ut=a(31067),mt=a(54856),pt=a(9784),ft=a(49116),gt=a(96112),bt=a(35968),wt=a(46408),yt=a(31836),vt=a(64780),Dt=a(46848),Pt=a(50632),_t=a(93216),xt=a(64124),Ct=a(90896),kt=a(24360);const Qt=(0,Ye.c)(ct,[["render",Z]]);var qt=Qt;st()(ct,"components",{QPage:ht.c,QInput:Ge.c,QIcon:He.c,QBtn:Oe.c,QBadge:ut.c,QMenu:mt.c,QList:pt.c,QItem:ft.c,QItemSection:gt.c,QCheckbox:bt.c,QItemLabel:wt.c,QTable:yt.c,QTr:vt.c,QTh:Dt.c,QTd:Pt.c,QTooltip:et.c,QAvatar:_t.c,QCard:Le.c,QCardSection:Ue.c,QSeparator:xt.c,QField:Ct.c}),st()(ct,"directives",{Ripple:kt.c,ClosePopup:tt.c})}}]);
2//# sourceMappingURL=4504.17a878c3.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.