1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="61c6e602-5e05-5fea-a2b2-c046546cc98c")}catch(e){}}(); 3import{n as l,h as i,t as r}from"./client-DZ-TyKlL.js";import{P as d}from"./check-BKW0WlM6.js";import{A as u,i as _}from"./AdminUserMixin-Cd6cGgf4.js";import{S as p}from"./SimplerDropdown-BNnf_vBG.js";import{L as h}from"./LoaderSpinner-C0tWqaCB.js";import"./SimpleDropdown-CZqUkgyf.js";import"./vue-clickaway.common-CVAig5zn.js";const f={components:{PrettyCheck:d,SimplerDropdown:p,LoaderSpinner:h},head(){return{title:"Dashboard"}},middleware:["auth","airpay"],mixins:[u],methods:{appointmentsLink(a){let t=new URLSearchParams;return t.set("dateFrom",i(this.dateRange.start).format("MM/DD/YYYY")),t.set("dateTo",i(this.dateRange.end).format("MM/DD/YYYY")),t.set("locationId",this.selectedLocationIds.join(",")),t.set("statuses",a.status),a.insuranceId&&t.set("payers",a.insuranceId),"/manager/appointments?"+t.toString()},keyColor(a){switch(a){case"No insurance":return"#d9d9d9";case"Verifiable":return"#b4a7d6";case"Successful":return"#b6d7a8";case"Unsupported":return"#f9cb9c";case"Carrier Issues":return"#ffe599";case"Data Issues":return"#a4c2f4";case"Unknown":return"#ed8080";default:return"gray"}},async showTab(a){this.needMoreFilters?this.dataIsReady=!1:this.view==="summary"&&a==="detail"&&!this.haveDetails?(this.dataIsReady=!1,this.fetchData("detail")):this.dataIsReady=!0,this.view=a},async groupsChanged(){if(this.isAdmin&&(this.practiceGroups=await this.getPracticeGroups()),this.locationsWaiting=!0,this.$axios.post("/ManagerInsurances/Locations",{practiceGroupIds:this.selectedGroupIds}).then(a=>{this.locations=a.data,this.locationsWaiting=!1}),this.isAdmin&&!this.selectedGroupIds.length){this.rows=[];return}await this.fetchData()},async fetchData(a){a||(a=this.view),this.dataIsLoading=!0;try{const{data:t}=await this.$axios.post("/ManagerInsurances/Dashboard/VerificationCrosstab",{dateFrom:i(this.dateRange.start).format("MM/DD/YYYY"),dateTo:i(this.dateRange.end).format("MM/DD/YYYY"),practiceGroupIds:this.selectedGroupIds,locationIds:this.selectedLocationIds,codes:this.selectedCodes,view:a});this.haveDetails=t.view==="detail",this.needMoreFilters=t.view==="summary",this.dataIsReady=!0,this.view=a,this.rows=t.rows.map(e=>({...e,count:parseInt(e.count)}))}catch(t){console.error("Dashboard fetch error",t)}finally{this.dataIsLoading=!1}},pct(a,t,e=1){const s=r(a),o=r(t);return s===null||!o?0 .toFixed(e):(s/o*100).toFixed(e)},statusPct(a){const t=a.level?this.verifiable_total:this.total_count;return t?a.count/t*100:0}},computed:{unknown_count(){let a=0;for(let t of this.rows)t.code==="Unknown"&&(a+=t.count);return a},total_count(){return this.rows.reduce((a,t)=>a+t.count,0)},verifiable_total(){return this.rows.reduce((a,t)=>a+(t.code==="No insurance"?0:t.count),0)},status_counts_by_location(){const a=[],t={};for(let e of this.rows){const s=e.location;if(!t[s]){const n={};t[s]=n,a.push([s,n])}const o=e.code;t[s][o]||(t[s][o]=0),t[s][o]+=e.count}for(let[e,s]of a){for(let o of this.codes)s[o]||(s[o]=0);s.Total=Object.values(s).reduce((o,n)=>o+n,0),s.Verifiable=s.Total-s["No insurance"]}return a},status_count_summary(){const a=[],t={};for(let e of this.codes.toSpliced(1,0,"Verifiable")){const s={code:e,count:0,level:e==="No insurance"||e==="Verifiable"?0:1};t[e]=s,a.push(s)}for(let e of this.rows)t[e.code].count+=e.count,e.code!=="No insurance"&&(t.Verifiable.count+=e.count);return t.Unknown.count===0&&a.pop(),a},status_count_detail(){const a=[],t={};var e=new URLSearchParams;e.set("dateFrom",i(this.dateRange.start).format("MM/DD/YYYY")),e.set("dateTo",i(this.dateRange.end).format("MM/DD/YYYY"));for(let s of this.rows){const o=s.status;if(t[o])t[o].count+=s.count;else{e.set("statuses",s.status);const n={code:s.code,status:s.status,count:s.count,qs:e.toString()};t[o]=n,a.push(n)}}return a},status_counts_by_payer(){const a={};for(let e of this.rows){const s=e.status;
3a[s]||(a[s]={TOTAL:0,code:e.code});const o=e.payer;a[s][o]||(a[s][o]={count:0,insuranceId:e.insuranceId}),a[s].TOTAL+=e.count,a[s][o].count+=e.count}return Object.entries(a).toSorted((e,s)=>s[1].TOTAL-e[1].TOTAL).filter(([e,s])=>s.TOTAL>0).slice(0,5).map(([e,s])=>({group:e,code:s.code,total:s.TOTAL,rows:Object.entries(s).filter(([o,{count:n}])=>o!=="TOTAL"&&o!=="code").toSorted((o,n)=>n[1].count-o[1].count).slice(0,5).map(([o,{count:n,insuranceId:c}])=>({status:e,payer:o,count:n,insuranceId:c}))}))},verifiable_codes(){return this.codes.filter(a=>a!=="No insurance")}},async mounted(){await this.groupsChanged()},watch:{dateRange:{handler:function(){this.fetchData()},deep:!0},selectedGroupIds:{handler:"groupsChanged",deep:!0}},asyncData({query:a}){const t=_(a.dateFrom,a.dateTo,7);let e={rows:[],locations:[],locationsWaiting:!0,view:a.view||"summary",codes:["No insurance","Successful","Unsupported","Carrier Issues","Data Issues","Unknown"],selectedCodes:a.code?a.code.split(","):[],selectedGroupIds:a.groups?a.groups.split(",").map(s=>parseInt(s)):[],selectedLocationIds:a.location?a.location.split(",").map(s=>parseInt(s)):[],dateMasks:{input:"MM/DD/YYYY"},dateRange:{start:new Date(t.dateFrom),end:new Date(t.dateTo)},dataIsLoading:!1,dataIsReady:!1,showLocationPercentages:!1};return e.needMoreFilters=e.selectedLocationIds.length===0&&e.selectedCodes.length===0,e}};var m=function(){var t=this,e=t._self._c;return e("main",{staticClass:"text-center"},[e("div",{staticClass:"inputGroup",staticStyle:{"padding-top":"24px",margin:"auto"}},[t.isAdmin?e("div",{staticClass:"pure-form__group"},[e("label",{staticClass:"pure-form__label filter-label"},[t._v("Practice Group: "),e("simpler-dropdown",{attrs:{list:t.practiceGroups,"multi-select":!0},model:{value:t.selectedGroupIds,callback:function(s){t.selectedGroupIds=s},expression:"selectedGroupIds"}})],1)]):t._e(),e("div",{staticClass:"pure-form__group date"},[e("label",{staticClass:"pure-form__label filter-label",attrs:{for:"date-from-input"}},[t._v("Appointment Dates")]),e("v-date-picker",{attrs:{mode:"date",attributes:[{highlight:{color:"grey",fillMode:"outline"},dates:new Date}],"is-range":"",masks:t.dateMasks},scopedSlots:t._u([{key:"default",fn:function({inputValue:s,inputEvents:o}){return[e("div",{staticClass:"row align-items-center"},[e("input",t._g({staticClass:"pure-form__input text-center date-picker-input left",domProps:{value:s&&s.start}},o&&o.start)),e("i",{staticClass:"fas fa-long-arrow-alt-right"}),e("input",t._g({staticClass:"pure-form__input text-center date-picker-input right",domProps:{value:s&&s.end}},o&&o.end))])]}}]),model:{value:t.dateRange,callback:function(s){t.dateRange=s},expression:"dateRange"}})],1),e("div",{staticClass:"pure-form__group gap"}),e("div",{staticClass:"pure-form__group"},[e("label",{staticClass:"pure-form__label filter-label"},[t._v("Location: "),e("simpler-dropdown",{attrs:{list:t.locations,waiting:t.locationsWaiting,"multi-select":!0},model:{value:t.selectedLocationIds,callback:function(s){t.selectedLocationIds=s},expression:"selectedLocationIds"}})],1)]),e("div",{staticClass:"pure-form__group"},[e("label",{staticClass:"pure-form__label filter-label"},[t._v("Status code: "),e("simpler-dropdown",{attrs:{list:t.codes.map(s=>({id:s,name:s})),"multi-select":!0},model:{value:t.selectedCodes,callback:function(s){t.selectedCodes=s},expression:"selectedCodes"}})],1)]),e("div",{staticClass:"pure-form__group"},[e("button",{staticClass:"btn btn--sm btn--primary btn--rounded btn--bolded",staticStyle:{"margin-top":"36px"},on:{click:function(s){return t.fetchData()}}},[t._v(" Update ")])])]),t.isAdmin&&t.selectedGroupIds.length===0?e("div",{staticClass:"no-data-message"},[e("p",[t._v("Select at least one practice group to view data.")])]):t.needMoreFilters&&t.view==="detail"?e("div",{staticClass:"no-data-message"},[e("p",[t._v("Select at least one location or status code to view data.")])]):t._e(),t.dataIsLoading?e("div",{staticClass:"loading"},[e("LoaderSpinner",{key:"loader",attrs:{text:""}})],1):t._e(),t.dataIsReady&&!t.rows.length?e("div",{staticClass:"no-data-message"},[e("p",[t._v("No appointments matched the selection.")])]):t._e(),t.dataIsReady&&t.rows.length?e("div",{staticClass:"tabs"},[e("button",{staticClass:"tab",class:{active:t.view==="summary"},attrs:{disabled:t.view=="summary"},on:{click:function(s){return t.showTab("summary")}
3}},[t._v(" Locations ")]),e("button",{staticClass:"tab",class:{active:t.view==="detail"},on:{click:function(s){return t.showTab("detail")}}},[t._v(" Statuses ")])]):t._e(),t.dataIsReady&&t.rows.length&&t.view==="summary"?e("span",[e("section",[e("h1",[t._v("Status Count Summary")]),e("table",[t._m(0),e("tbody",[t._l(t.status_count_summary,function(s){return e("tr",{style:{background:s.level?"#fff":"#eee"}},[e("td",{staticClass:"text",style:{backgroundColor:t.keyColor(s.code),paddingLeft:4+10*s.level+"px"}},[t._v(" "+t._s(s.code)+" ")]),e("td",[t._v(t._s(s.count))]),e("td",{staticClass:"chart",staticStyle:{position:"relative"}},[e("span",{style:{width:t.statusPct(s)+"%",backgroundColor:t.keyColor(s.code)}}),e("span",{staticStyle:{position:"absolute",left:"2px"}},[t._v(" "+t._s(t.statusPct(s).toFixed(1))+"% ")])])])}),e("tr",[e("th",[t._v("Total")]),e("td",{staticClass:"total"},[t._v(t._s(t.total_count))]),e("td",{staticClass:"total"})])],2)])]),e("section",[e("div",{staticClass:"section-header"},[e("h1",[t._v("Status Counts by Location")]),e("label",{staticClass:"show-percentages"},[e("PrettyCheck",{staticClass:"pretty",model:{value:t.showLocationPercentages,callback:function(s){t.showLocationPercentages=s},expression:"showLocationPercentages"}}),t._v(" Show percentages ")],1)]),e("table",[e("thead",[e("tr",[e("th",[t._v("Location")]),e("th",[t._v("Total")]),e("th",[t._v("No insurance")]),e("th",{staticStyle:{"border-left":"solid #666 2px"}},[t._v("Verifiable")]),e("th",{staticClass:"chart",staticStyle:{"border-left":"solid #666 2px"}},[t._v("Distribution")]),t._l(t.verifiable_codes,function(s){return t.unknown_count||s!=="Unknown"?e("th",[t._v(" "+t._s(s)+" ")]):t._e()})],2)]),e("tbody",t._l(t.status_counts_by_location,function([s,o]){return e("tr",[e("th",[t._v(t._s(s))]),e("td",{staticClass:"total"},[t._v(t._s(o.Total))]),e("td",{staticClass:"total"},[t.showLocationPercentages?e("span",[t._v(t._s(t.pct(o["No insurance"],o.Total))+"%")]):e("span",[t._v(t._s(o["No insurance"]))])]),e("td",{staticClass:"total",staticStyle:{"border-left":"solid #666 2px"}},[e("span",[t._v(t._s(o.Verifiable))])]),e("td",{staticClass:"chart",staticStyle:{"border-left":"solid #666 2px"}},t._l(t.verifiable_codes,function(n){return e("span",{style:{width:o[n]/o.Verifiable*100+"%",backgroundColor:t.keyColor(n)}})}),0),t._l(t.verifiable_codes,function(n){return t.unknown_count||n!=="Unknown"?e("td",[t.showLocationPercentages?e("span",[t._v(t._s(t.pct(o[n],o.Verifiable))+"%")]):e("span",[t._v(t._s(o[n]))])]):t._e()})],2)}),0)])])]):t.dataIsReady&&t.rows.length&&t.view==="detail"?e("span",[e("section",[e("h1",[t._v("Status Counts by Payer")]),e("table",{staticStyle:{"min-width":"600px"}},[t._m(1),t._l(t.status_counts_by_payer,function(s){return e("tbody",[e("tr",{staticClass:"group"},[e("th",{staticClass:"text",style:{backgroundColor:t.keyColor(s.code)}},[e("a",{attrs:{href:t.appointmentsLink({status:s.group})}},[t._v(t._s(s.group))])]),e("th",{staticClass:"total",style:{backgroundColor:t.keyColor(s.code)}},[t._v(" "+t._s(s.total)+" ")]),e("th",{style:{backgroundColor:t.keyColor(s.code)}},[t._v("Â ")]),e("th",{style:{backgroundColor:t.keyColor(s.code)}},[t._v(" "+t._s(t.pct(s.total,t.total_count))+"% ")])]),t._l(s.rows,function(o){return e("tr",[e("td",{staticClass:"text"},[t._v(t._s(o.payer))]),e("td",[o.insuranceId>0?e("a",{attrs:{href:t.appointmentsLink(o)}},[t._v(t._s(o.count))]):e("span",[t._v(t._s(o.count))])]),e("td",[t._v(t._s(t.pct(o.count,s.total))+"%")]),e("td",[t._v(t._s(t.pct(o.count,t.total_count))+"%")])])})],2)})],2)]),e("section",[e("h1",[t._v("Status Count Detail")]),e("table",[t._m(2),e("tbody",t._l(t.status_count_detail,function(s){return e("tr",[e("td",{staticClass:"text",style:{backgroundColor:t.keyColor(s.code)}},[t._v(" "+t._s(s.code)+" ")]),e("td",{staticClass:"text"},[t._v(t._s(s.status))]),e("td",[e("a",{attrs:{href:t.appointmentsLink(s)}},[t._v(t._s(s.count))])]),e("td",[t._v(t._s(t.pct(s.count,t.total_count))+"%")])])}),0)])])]):t._e()])},v=[function(){var a=this,t=a._self._c;return t("thead",[t("tr",[t("th",[a._v("Status")]),t("th",[a._v("C
3ount")]),t("th",[a._v("Distribution")])])])},function(){var a=this,t=a._self._c;return t("thead",[t("tr",[t("th",[a._v("Payer")]),t("th",[a._v("Count")]),t("th",[a._v("% Status")]),t("th",[a._v("% Total")])])])},function(){var a=this,t=a._self._c;return t("thead",[t("tr",[t("th",[a._v("Code")]),t("th",[a._v("Status")]),t("th",[a._v("Count")]),t("th",[a._v("% Total")])])])}],b=l(f,m,v,!1,null,"fb63769c");const D=b.exports;export{D as default}; 4 5//# debugId=61c6e602-5e05-5fea-a2b2-c046546cc98c
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.