1"use strict";(globalThis.webpackChunkflabs_frontend||=[]).push([[182],{83998(e,l,t){var o=t(17728);t.d(l,["u",0,e=>{var l,t,n,i;return{name:(null===(l=[null==e?void 0:e.firstName,null==e?void 0:e.lastName])||void 0===l||null===(t=l.filter(Boolean))||void 0===t||null===(n=t.join(" "))||void 0===n?void 0:n.trim())||"â",age:null!==(i=null==e?void 0:e.age)&&void 0!==i?i:"",age_type:o.Zx.YEAR,gender:null==e?void 0:e.gender}}])},5525(e,l,t){var o=t(4159),n=t.n(o);t.d(l,["m",0,(e,l)=>{const t=n()(e).startOf("day"),o=(l?n()(l):n()()).startOf("day");if(!t.isValid()||!o.isValid()||t.isAfter(o))return{years:0,months:0,days:0};const i=o.diff(t,"year"),a=t.add(i,"year"),d=o.diff(a,"month"),r=a.add(d,"month");return{years:i,months:d,days:o.diff(r,"day")}}])},96831(e,l,t){t(9950);var o=t(44820),n=t(10800),i=t(22199),a=t(44414);const d=o.StyleSheet.create({page:{padding:10,fontFamily:"Helvetica"},header:{flexDirection:"row",justifyContent:"space-between",marginBottom:10},headerLeft:{textAlign:"left",fontSize:9,gap:8},title:{fontSize:15,fontWeight:600},labEmail:{color:"#595959"},labInfo:{fontSize:9,textAlign:"right",gap:8},tableHeader:{position:"fixed",top:80,left:20,right:20,flexDirection:"row",width:"auto",justifyContent:"space-between",borderWidth:1,borderColor:"#E5EAEE",backgroundColor:"#F9FAFB",fontWeight:"bold"},table:{display:"flex",width:"auto",justifyContent:"space-between",borderWidth:1,borderColor:"#E5EAEE",marginBottom:10,borderTopWidth:0},tableRow:{flexDirection:"row",width:"100%",justifyContent:"space-between",borderBottomWidth:1,borderBottomColor:"#E5EAEE"},tableRowHeader:{backgroundColor:"#F9FAFB",fontWeight:"bold"},tableRowTotal:{backgroundColor:"#F9FAFB",fontWeight:"bold"},tableCol:{padding:6,paddingHorizontal:4},tableHeaderCol:{paddingHorizontal:4,padding:6},tableCell:{fontSize:9,textAlign:"left",lineHeight:1.2},tableCellAmount:{fontSize:9,textAlign:"left"},tableCellTotal:{fontSize:9,textAlign:"left",fontWeight:"bold"},tableCellClubbing:{fontSize:9,textAlign:"left",fontWeight:"bold"},totalRow:{flexDirection:"row",width:"100%",justifyContent:"space-between"},totalCol:{padding:6,paddingHorizontal:4},totalAmount:{fontSize:9,fontWeight:"bold",textAlign:"left"},testPackageText:{fontSize:9,textAlign:"left",lineHeight:1.3}}),r=e=>{var l,t;let{pdfHeader:n,tableHeader:i,tableBody:r,columnWidths:u,wiseType:s="",printPdfSetting:c={},clubedData:v=[],chunkNumber:m=null,totalChunks:b=null}=e;const p=null===m||1===m;return(0,a.jsx)(o.yo,{children:(0,a.jsxs)(o.YW,{size:"A4",orientation:null==c||null===(l=c[s])||void 0===l?void 0:l.viewType,style:d.page,children:[p&&(0,a.jsxs)(o.View,{style:d.header,children:[(0,a.jsxs)(o.View,{style:d.headerLeft,children:[(0,a.jsx)(o.Text,{style:d.title,children:(null==c||null===(t=c[s])||void 0===t?void 0:t.headingName)||s}),(0,a.jsxs)(o.Text,{children:["Date: ",n.dateRange]})]}),(0,a.jsxs)(o.View,{style:d.labInfo,children:[(0,a.jsx)(o.Text,{style:d.title,children:n.labName}),n.email&&(0,a.jsxs)(o.Text,{style:d.labEmail,children:["Email: ",n.email]})]})]}),(0,a.jsx)(o.View,{style:[d.tableHeader,{top:p?80:20}],fixed:!0,children:i.map((e,l)=>(0,a.jsx)(o.View,{style:[d.tableHeaderCol,{width:u[l]},l<i.length-1&&{borderRightWidth:1,borderRightColor:"#E5EAEE"}],children:(0,a.jsx)(o.Text,{style:d.tableCell,children:e})},l))}),(0,a.jsx)(o.View,{style:d.table,children:r.map((e,l)=>{var t;const n=null===(t=v[l])||void 0===t?void 0:t.isTotal;return(0,a.jsx)(o.View,{style:[d.tableRow,n&&d.tableRowTotal],wrap:!1,children:e.cells.map((l,t)=>{const r=e.metadata[t],s=(null==r?void 0:r.isClubbing)&&(null==r?void 0:r.hasValue),c=(v=i[t],["Test/Package","Tests/Packages","Test/Packages","testPackage"].some(e=>v.toLowerCase().includes(e.toLowerCase())||v.toLowerCase().includes("test")&&v.toLowerCase().includes("package")));var v;const m=c?(b=l)?"string"!=typeof b?b:b.includes(",")?b.split(",").map(e=>e.trim()).filter(e=>e.length>0).join("\n"):b:"":l;var b;return(0,a.jsx)(o.View,{style:[d.tableCol,{width:u[t]},t<e.cells.length-1&&{borderRightWidth:1,borderRightColor:"#E5EAEE"}],wrap:!1,children:(0,a.jsx)(o.Text,{style:n?d.tableCellTotal:s?d.tableCellClubbing:c?d.testPackageText:d.tableCell,children:m})},t)})},l)})})]})})},u=async e=>{let{columnToPrint:l,currentLab:t,dateRangeString:d,clubedData:u,clubbedMap:s,wiseType:c,printPdfSetting:v,clubingOption:m,chunkNumber:b=null,totalChunks:p=null,returnBlob:h=!1,downloadPdf:f=!1,fileName:g=""}=e;const y=new Map(s),C={labName:null==t?void 0:t.name,dateRange:d,email:(null==t?void 0:t.email)||""},T=null==l?void 0:l.findIndex(e=>e.value===m);if(-1!==T){const e=l[T],t=l[0];l[T]=t,l[0]=e}const w=null==l?void 0:l.filter(e=>!0===e.checked||"true"===e.checked).map(e=>e.label);let x=u.map(e=>{const t=[],o=[],i=(0,n.x)(e);return null==l||l.map(l=>{if(!0===l.checked||"true"===l.checked)if(l.value===m){const n=e[m];n&&"done"!==y.get(n)?(t.push(i[l.value]||""),o.push({isClubbing:!0,hasValue:!0}),y.set(n,"done")):e.isTotal?(t.push(i[l.value]||""),o.push({isClubbing:!0,hasValue:!0})):(t.push(""),o.push({isClubbing:!0,hasValue:!1}))}
1else e[l.value]||0===e[l.value]?t.push(i[l.value]||0===i[l.value]?i[l.value]:""):t.push(""),o.push({isClubbing:!1,hasValue:!1})}),{cells:t,metadata:o}});const A=(0,i.o)(w),D=await(0,o.x8)((0,a.jsx)(r,{pdfHeader:C,tableHeader:w,tableBody:x,columnWidths:A,wiseType:c,printPdfSetting:v,clubedData:u,chunkNumber:b,totalChunks:p})).toBlob();if(h||null!==b)return D;const k=new Blob([D],{type:"application/pdf"}),B=URL.createObjectURL(k);if(window.open(B),f){const e=document.createElement("a");e.href=B,e.download=`${g}.pdf`,document.body.appendChild(e),e.click(),document.body.removeChild(e),setTimeout(()=>URL.revokeObjectURL(B),1e3)}};t.d(l,["A",0,u])},73924(e,l,t){t.d(l,{A:()=>c});var o=t(44820),n=t(10800),i=t(22199);const a=e=>{const l=Number(e);let t="";return t=isNaN(l)?"":Math.floor(l)===l?String(l):parseFloat(l.toFixed(2)).toString(),t};var d=t(44414);const r=o.StyleSheet.create({page:{padding:7,fontFamily:"Helvetica"},header:{flexDirection:"row",justifyContent:"space-between",marginBottom:10},headerLeft:{textAlign:"left",fontSize:9,gap:8},title:{fontSize:15,fontWeight:600},subHeading:{fontSize:11,color:"#595959",marginTop:2},labEmail:{color:"#595959"},labInfo:{fontSize:9,textAlign:"right",gap:8},tableHeader:{flexDirection:"row",width:"100%",justifyContent:"space-between",borderTopWidth:1,borderLeftWidth:1,borderRightWidth:1,borderColor:"#E5EAEE",backgroundColor:"#F9FAFB",fontWeight:"bold"},tableSubHeader:{flexDirection:"row",width:"100%",justifyContent:"space-between",borderLeftWidth:1,borderRightWidth:1,borderColor:"#E5EAEE",backgroundColor:"#F9FAFB",fontWeight:"bold"},table:{display:"flex",width:"auto",marginBottom:10},tableRow:{flexDirection:"row",width:"100%",justifyContent:"space-between",borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderColor:"#E5EAEE"},tableCol:{padding:6,wrap:!0},tableHeaderCol:{padding:6,paddingHorizontal:4},tableCell:{fontSize:9,textAlign:"left"},tableCellAmount:{fontSize:9,textAlign:"left"},totalRow:{flexDirection:"row",width:"100%",justifyContent:"space-between",borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderColor:"#E5EAEE"},totalCol:{padding:6},totalAmount:{fontSize:9,fontWeight:"bold",textAlign:"left"},testPackageText:{fontSize:9,textAlign:"left"}}),u=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase())},s=e=>{var l,t,n,i,a,s,c,v,m;let{pdfHeader:b,tableHeader:p,tableBody:h,tableFooter:f,columnWidths:g,wiseType:y="",printPdfSetting:C={},chunkNumber:T=null,totalChunks:w=null,totalAmount:x,hasAtLeastOneTotal:A,showDate:D,isMultiHeader:k=!1}=e;const B=null===T||1===T,j=null===T||T===w,E=null===(l=p[1])||void 0===l?void 0:l.some(e=>null==e?void 0:e.label);return(0,d.jsx)(o.yo,{children:(0,d.jsxs)(o.YW,{size:"A4",orientation:(null==C||null===(t=C[y])||void 0===t?void 0:t.viewType)||(null==C?void 0:C.viewType),style:r.page,children:[B&&(0,d.jsxs)(o.View,{style:r.header,children:[(0,d.jsxs)(o.View,{style:r.headerLeft,children:[(0,d.jsx)(o.Text,{style:r.title,children:(null==C||null===(n=C[y])||void 0===n?void 0:n.headingName)||y}),null!=C&&null!==(i=C[y])&&void 0!==i&&i.subHeading?(0,d.jsx)(o.Text,{style:r.subHeading,children:C[y].subHeading}):null,D&&(0,d.jsxs)(o.Text,{children:["Date: ",b.dateRange]}),Object.entries(null==b?void 0:b.left).filter(e=>{let[l,t]=e;return t}).map(e=>{let[l,t]=e;return(0,d.jsx)(o.View,{children:(0,d.jsxs)(o.Text,{children:[u(l),": ",t]})},l)})]}),(0,d.jsxs)(o.View,{style:r.labInfo,children:[(0,d.jsx)(o.Text,{style:r.title,children:b.labName}),b.email&&(0,d.jsxs)(o.Text,{style:r.labEmail,children:["Email: ",b.email]}),(0,d.jsx)(o.View,{style:r.labInfo,children:null===(a=Object.entries(null==b?void 0:b.right))||void 0===a||null===(s=a.filter(e=>{let[l,t]=e;return t}))||void 0===s?void 0:s.map(e=>{let[l,t]=e;return(0,d.jsx)(o.View,{children:"labName"===l?(0,d.jsx)(o.Text,{style:r.title,children:t}):(0,d.jsxs)(o.Text,{style:r.labEmail,children:[u(l),": ",t]})},l)})})]})]}),(0,d.jsxs)(o.View,{style:r.table,children:[(0,d.jsx)(o.View,{style:r.tableHeader,fixed:!0,children:null===(c=p[
10])||void 0===c?void 0:c.map((e,l)=>(0,d.jsx)(o.View,{style:[r.tableHeaderCol,{width:(null==e?void 0:e.width)||g[l]},l<p[0].length-1&&{borderRightWidth:1,borderRightColor:"#E5EAEE"},!E&&{borderBottomWidth:1,borderBottomColor:"#E5EAEE"}],children:(0,d.jsx)(o.Text,{style:r.tableCell,children:null==e?void 0:e.label})},l))}),k&&(0,d.jsx)(o.View,{style:r.tableSubHeader,fixed:!0,children:null===(v=p[1])||void 0===v?void 0:v.map((e,l)=>{const t=null==e?void 0:e.label;return(0,d.jsx)(o.View,{style:[r.tableHeaderCol,{width:(null==e?void 0:e.width)||g[l]},l<p[1].length-1&&{borderRightWidth:1,borderRightColor:"#E5EAEE"},t&&{borderTopWidth:1,borderTopColor:"#E5EAEE"},{borderBottomWidth:1,borderBottomColor:"#E5EAEE"}],children:(0,d.jsx)(o.Text,{style:r.tableCell,children:null==e?void 0:e.label})},l)})}),h.map((e,l)=>(0,d.jsx)(o.View,{style:r.tableRow,wrap:!1,children:e.map((l,t)=>{var n,i;const a=(e=>{if(!e)return;return["Test/Package","Tests/Packages","Test/Packages","testPackage"].some(l=>e.label.toLowerCase().includes(l.toLowerCase())||e.label.toLowerCase().includes("test")&&e.label.toLowerCase().includes("package"))})(p[0][t]),u=a?(s=l)?"string"!=typeof s?s:s.includes(",")?s.split(",").map(e=>e.trim()).filter(e=>e.length>0).join("\n"):s:"":l;var s;return(0,d.jsx)(o.View,{style:[r.tableCol,{width:(null===(n=p[1])||void 0===n||null===(i=n[t])||void 0===i?void 0:i.width)||g[t]},t<e.length-1&&{borderRightWidth:1,borderRightColor:"#E5EAEE"}],children:(0,d.jsx)(o.Text,{style:a?r.testPackageText:r.tableCell,children:u})},t)})},l)),j&&A&&(0,d.jsx)(o.View,{style:r.totalRow,wrap:!1,children:f.map((e,l)=>{var t,n;return(0,d.jsx)(o.View,{style:[r.totalCol,{width:(null===(t=p[1])||void 0===t||null===(n=t[l])||void 0===n?void 0:n.width)||g[l]},l<f.length-1&&{borderRightWidth:1,borderRightColor:"#E5EAEE"}],children:(0,d.jsx)(o.Text,{style:r.totalAmount,children:e})},l)})})]}),x&&(0,d.jsx)(o.View,{style:{marginTop:10},children:null===(m=Object.entries(x))||void 0===m?void 0:m.map(e=>{let[l,t]=e;return(0,d.jsxs)(o.Text,{style:{fontSize:12,fontWeight:"bold",marginBottom:2,color:"#333",textAlign:"right"},children:[l,": ",(0,d.jsx)(o.Text,{style:{fontWeight:"normal"},children:t})]},l)})})]})})},c=async e=>{let{columnToPrint:l,currentLab:t,dateRangeString:r,data:u,order:c,totalObj:v,wiseType:m,printPdfSetting:b,chunkNumber:p=null,totalChunks:h=null,returnBlob:f=!1,onProgressStart:g=null,onProgressEnd:y=null,totalAmount:C,downloadPdf:T=!1,fileName:w="",showDate:x,isMultiHeader:A=!1,headerObj:D={left:{},right:{}}}=e;try{!f&&null===p&&g&&g("Generating PDF...");const e={labName:null==t?void 0:t.name,dateRange:r,email:(null==t?void 0:t.email)||"",left:null==D?void 0:D.left,right:null==D?void 0:D.right},{tableHeader:k,columnWidths:B}=(e=>{const l=[],t=[];e.forEach(e=>{if(1==(null==e?void 0:e.checked)||"true"==(null==e?void 0:e.checked))if(null!=e&&e.haveChildren&&Array.isArray(null==e?void 0:e.children)){var o;const n=null==e||null===(o=e.children)||void 0===o?void 0:o.filter(e=>null==e?void 0:e.checked);n.length>0&&(l.push({label:null==e?void 0:e.label,width:(null==e?void 0:e.width)||n.reduce((e,l)=>e+(l.width||0),0)}),n.forEach(e=>{t.push({label:null==e?void 0:e.label,width:null==e?void 0:e.width})}))}else l.push({label:null==e?void 0:e.label,width:null==e?void 0:e.width}),t.push({label:"",width:null==e?void 0:e.width})});let o=(0,i.o)(l);return{tableHeader:[l,t],columnWidths:o}})(l);let j=null==u?void 0:u.map(e=>{const t=[],o=(0,n.x)(e);return null==l||l.forEach(e=>{!0!==(null==e?void 0:e.checked)&&"true"!==(null==e?void 0:e.checked)||(null!=e&&e.haveChildren&&Array.isArray(null==e?void 0:e.children)?null==e||e.children.forEach(e=>{!0!==(null==e?void 0:e.checked)&&"true"!==(null==e?void 0:e.checked)||t.push(o[null==e?void 0:e.value])}):t.push(o[null==e?void 0:e.value]))}),t});j=c?j.slice().reverse():j;const{tableFooter:E,hasAtLeastOneTotal:N}=((e,l)=>{const t=[];let o=!1;const n=[];for(const t of e){var i;if(!0===(null==t?void 0:t.checked)||"true"===(null==t?void 0:t.checked))if(null!=t&&null!==(i=t.children)&&void 0!==i&&i.length)for(const e of null==t?void 0:t.children)!0!==(null==e?void 0:e.checked)&&"true"!==(null==e?void 0:e.checked)||!(null!=l&&l[null==e?void 0:e.label]||0===(null==l?void 0:l[null==e?void 0:e.label]))||n.push(null==e?void 0:e.label);else(null!=l&&l[null==t?void 0:t.label]||0===(null==l?void 0:l[null==t?void 0:t.label]))&&n.push(null==t?void 0:t.label)}const d=n.length>0;for(const n of e){var r;if(!0===(null==n?void 0:n.checked)||"true"===(null==n?void 0:n.checked))if(null!=n&&null!==(r=n.children)&&void 0!==r&&r.length){for(const e of null==n?void 0:n.children)if(!0===(null==e?void 0:e.checked)||"true"===(null==e?void 0:e.checked)){if(!o&&d){t.push("Total"),o=!0;continue}null!=l&&l[null==e?void 0:e.label]||0===(null==l?void 0:l[null==e?void 0:e.label])?t.push(a(null==l?void 0:l[null==e?void 0:e.label])):t.push("")}}else{if(!o&&d){t.push("Total"),o=!0;continue}null!=l&&l[null==n?void 0:n.label]||0===(null==l?void 0:l[null==n?void 0:n.label])?t.push(a(l[null==n?void 0:n.label])):t.push("")}}return{tableFooter:t,hasAtLeastOneTotal:d}})(l,v),P=await(0,o.x8)((0,d.jsx)(s,{pdfHeader:e,tableHeader:k,tableBody:j,tableFooter:E,columnWidths:B,wiseType:m,printPdfSetting:b,chunkNumber:p,totalChunks:h,totalAmount:C,hasAtLeastOneTotal:N,showDate:x,isMultiHeader:A})).toBlob();if(!f&&null===p&&y&&y(),f||null!==p)return P;const R=new Blob([P],{type:"application/pdf"}),L=URL.createObjectURL(R);if(window.open(L),T){const e=document.createElement("a");e.href=L,e.download=`${w}.pdf`,document.body.appendChild(e),e.click(),document.body.removeChild(e),setTimeout(()=>URL.revokeObjectURL(L),1e3)}}catch(e){throw!f&&null===p&&y&&y(),e}}},22199(e,l,t){t.d(l,["o",0,e=>{const l=8,t=10,o=13,n=15,i=20,a=25,d=5,r=["Test TAT"],u=["Reason"],s=["Tests","Test/Package","Tests/Packages","Test/Packages","testPackage","Commission Price","Test","B2B Center"],c=["Contact","Patient Name","referralDoctor","referralHospital","secondReferral","Referral Doctor","Referral Hospital","Second Referral","B2B Lab","Patients","Transaction ID","Remark","Patient Details","Collection Center"],v=["Bill Date","To Doctor","Discount","Test TAT","Completion TAT","Date & Time"],m=["Net Amount","Patient Info","Discount By"],b=["Sr. No"],p=e.map(e=>{var p;if(r.some(l=>{var t;return null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase())}))return t;if(s.some(l=>{var t,o,n;return(null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase()))||(null==e||null===(o=e.label)||void 0===o?void 0:o.toLowerCase().includes("test"))&&(null==e||null===(n=e.label)||void 0===n?void 0:n.toLowerCase().includes("package"))}))return a;
1if(u.some(l=>{var t;return null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase())}))return i;const h=c.some(l=>{var t;return null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase())}),f=null==e||null===(p=e.label)||void 0===p?void 0:p.includes("Department");if(b.some(l=>{var t;return null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase())}))return d;if(h)return n;if(f)return n;if(m.some(l=>{var t;return null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase())}))return o;return v.some(l=>{var t;return null==e||null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(l.toLowerCase())})?t:l}),h=p.reduce((e,l)=>e+l,0);if(h>100){const e=100/h;return p.map(l=>`${(l*e).toFixed(2)}%`)}const f=100-h,g=p.filter(e=>e===l).length;if(g>0&&f>0){const e=f/g;return p.map(t=>t===l?`${(t+e).toFixed(2)}%`:`${t}%`)}return p.map(e=>`${e}%`)}])},10800(e,l,t){t.d(l,{x:()=>N});var o=t(74898);const n=e=>{var l;return{labName:null==e?void 0:e.labName,dateTime:(0,o.Pn)(null==e?void 0:e.createdAt),paymentMethod:null==e?void 0:e.paymentMethod,approvedBy:null==e||null===(l=e.actionBy)||void 0===l?void 0:l.name,status:null==e?void 0:e.status,remark:null==e?void 0:e.remarks,merchantTransactionId:(null==e?void 0:e.razorpayTransferId)||(null==e?void 0:e.manualTransactionId)||""}},i=e=>{var l,t,o;return{srNo:null==e?void 0:e.srNo,transactionID:(null==e?void 0:e.manualTransactionId)||"-",billing:null==e||null===(l=e.billing)||void 0===l||null===(t=l.patient)||void 0===t?void 0:t.first_name,updatedAt:null==e||null===(o=e.billing)||void 0===o?void 0:o.reportDate,testCode:null==e?void 0:e.testCode}},a=e=>{var l,t,o,n,i,a,d,r,u;return{totalBill:null==e?void 0:e.totalBill,totalTests:null==e?void 0:e.totalTests,totalCashPayment:null===(l=Number(null==e?void 0:e.totalCashPayment))||void 0===l?void 0:l.toFixed(2),totalCardPayment:null===(t=Number(null==e?void 0:e.totalCardPayment))||void 0===t?void 0:t.toFixed(2),totalUpiPayment:null===(o=Number(null==e?void 0:e.totalUpiPayment))||void 0===o?void 0:o.toFixed(2),totalWalletPayment:null===(n=Number(null==e?void 0:e.totalWalletPayment))||void 0===n?void 0:n.toFixed(2),totalPaid:null===(i=Number(null==e?void 0:e.totalPaid))||void 0===i?void 0:i.toFixed(2),totalDue:null===(a=Number(null==e?void 0:e.totalDue))||void 0===a?void 0:a.toFixed(2),totalDiscount:null===(d=Number(null==e?void 0:e.totalDiscount))||void 0===d?void 0:d.toFixed(2),totalAmount:null===(r=Number(null==e?void 0:e.totalAmount))||void 0===r?void 0:r.toFixed(2),totalPayment:null===(u=Number(null==e?void 0:e.totalPayment))||void 0===u?void 0:u.toFixed(2)}},d=e=>({parameterName:null==e?void 0:e.parameterName,correctiveAction:null==e?void 0:e.correctiveAction,previousValue:null==e?void 0:e.previousValue,newValue:null==e?void 0:e.newValue,preventiveAction:null==e?void 0:e.preventiveAction,rootCauseAnalysis:null==e?void 0:e.rootCauseAnalysis});var r=t(94161),u=t(4159),s=t.n(u),c=t(41397),v=t(79731);const m=e=>({dateTime:s()(null==e?void 0:e.dateTime).format("DD-MM-YYYY hh:mm A"),scheduleDate:s()(null==e?void 0:e.scheduleDate).format("DD-MM-YYYY hh:mm A"),qcExecutionCreatedAt:s()(null==e?void 0:e.qcExecutionCreatedAt).format("DD-MM-YYYY hh:mm A"),parameterName:null==e?void 0:e.parameterName,sampleKitName:null==e?void 0:e.sampleKitName,value:null==e?void 0:e.value,status:(0,c.capitalize)(null==e?void 0:e.status),machineName:null==e?void 0:e.machineName,failedParametersCount:null==e?void 0:e.failedParametersCount,resultValue:null==e?void 0:e.resultValue,parameterStatus:(0,c.capitalize)(null==e?void 0:e.parameterStatus),controlLevel:v.w$[null==e?void 0:e.controlLevel]}),b=e=>{var l,t;return{remarks:null==e?void 0:e.remarks,b2bCenterObj:null==e||null===(l=e.b2bCenter)||void 0===l?void 0:l.name,actionBy:null==e||null===(t=e.actionBy)||void 0===t?void 0:t.name,creditAmount:null!=e&&e.creditAmount?Number(null==e?void 0:e.creditAmount).toFixed(2):"-",debitAmount:null!=e&&e.debitAmount?Number(null==e?void 0:e.debitAmount).toFixed(2):"-"}},p=e=>({lab:null==e?void 0:e.lab,processingLab:null==e?void 0:e.processingLab,address:null==e?void 0:e.address,contact:null==e?void 0:e.contact,username:null==e?void 0:e.username,password:null==e?void 0:e.password}),h=e=>({collectionCenter:null==e?void 0:e.collectionCenter,contact:null==e?void 0:e.contact,email:null==e?void 0:e.email,city:null==e?void 0:e.city,isActive:null==e?void 0:e.isActive}),f=e=>{var l,t,o,n,i,a,d,r,u,s,c;return{ccaName:null!=e&&e.labCollectionCenterCode?`${(null==e?void 0:e.name)||""} (${e.labCollectionCenterCode})`:(null==e?void 0:e.name)||"",ccaCity:(null==e?void 0:e.city)||"",ccaBillCount:null!==(l=null==e?void 0:e.b
1illCount)&&void 0!==l?l:0,ccaTestsCount:null!==(t=null==e?void 0:e.testsCount)&&void 0!==t?t:0,ccaTotalRevenue:null!==(o=null==e?void 0:e.totalRevenue)&&void 0!==o?o:0,ccaDiscount:null!==(n=null==e?void 0:e.discountAmount)&&void 0!==n?n:0,ccaPaid:null!==(i=null==e?void 0:e.paid)&&void 0!==i?i:0,ccaDue:null!==(a=null==e?void 0:e.due)&&void 0!==a?a:0,ccaCash:null!==(d=null==e?void 0:e.cashPayment)&&void 0!==d?d:0,ccaUpi:null!==(r=null==e?void 0:e.upiPayment)&&void 0!==r?r:0,ccaCard:null!==(u=null==e?void 0:e.cardPayment)&&void 0!==u?u:0,ccaWallet:null!==(s=null==e?void 0:e.walletPayment)&&void 0!==s?s:0,ccaOther:null!==(c=null==e?void 0:e.otherPayment)&&void 0!==c?c:0}},g=e=>({patientId:null==e?void 0:e.patientId,barcode:null==e?void 0:e.barcode,sampleType:null==e?void 0:e.sampleType,collectionTime:null==e?void 0:e.collectionTime,rejectionTime:null==e?void 0:e.rejectionTime,rejectedBy:null==e?void 0:e.rejectedBy,rejectionReason:null==e?void 0:e.rejectionReason,recollectionRequired:null==e?void 0:e.recollectionRequired}),y=e=>({patientId:null==e?void 0:e.patientId,testName:null==e?void 0:e.testName,criticalResult:null==e?void 0:e.criticalResult,repeatResult:null==e?void 0:e.repeatResult,alertGeneratedTime:null==e?void 0:e.alertGeneratedTime,informedBy:null==e?void 0:e.informedBy,doctorInformed:null==e?void 0:e.doctorInformed,communicationMode:null==e?void 0:e.communicationMode,informedTime:null==e?void 0:e.informedTime,remarks:null==e?void 0:e.remarks}),C=e=>({patientId:null==e?void 0:e.patientId,referringDoctor:null==e?void 0:e.referringDoctor,testRequested:null==e?void 0:e.testRequested,sampleType:null==e?void 0:e.sampleType,collectionTime:null==e?void 0:e.collectionTime,receivedTime:null==e?void 0:e.receivedTime,markedUrgentBy:null==e?void 0:e.markedUrgentBy,processingStart:null==e?void 0:e.processingStart,reportingTime:null==e?void 0:e.reportingTime,tat:null==e?void 0:e.tat,releasedBy:null==e?void 0:e.releasedBy,remarks:null==e?void 0:e.remarks}),T=e=>({patientId:null==e?void 0:e.patientId,testName:null==e?void 0:e.testName,department:null==e?void 0:e.department,repeatTime:null==e?void 0:e.repeatTime,repeatedBy:null==e?void 0:e.repeatedBy,verifiedBy:null==e?void 0:e.verifiedBy,reasonForRepeat:null==e?void 0:e.reasonForRepeat,analyzerUsed:null==e?void 0:e.analyzerUsed,reportModified:null==e?void 0:e.reportModified,remarks:null==e?void 0:e.remarks,changedParameters:null==e?void 0:e.changedParameters}),w=e=>({patientId:null==e?void 0:e.patientId,patientName:null==e?void 0:e.patientName,barcode:null==e?void 0:e.barcode,department:null==e?void 0:e.department,sampleType:null==e?void 0:e.sampleType,collectionTime:null==e?void 0:e.collectionTime,reportingStatus:null==e?void 0:e.reportingStatus,storageLocation:null==e?void 0:e.storageLocation,discardedBy:null==e?void 0:e.discardedBy,verifiedBy:null==e?void 0:e.verifiedBy,discardDateTime:null==e?void 0:e.discardDateTime,reason:null==e?void 0:e.reason,biohazardDisposalMethod:null==e?void 0:e.biohazardDisposalMethod,discardingStatus:null==e?void 0:e.discardingStatus}),x=e=>({recordDateTime:null==e?void 0:e.recordDateTime,patientID:null==e?void 0:e.patientID,patientName:null==e?void 0:e.patientName,sampleType:null==e?void 0:e.sampleType,barCode:null==e?void 0:e.barCode,testNames:null==e?void 0:e.testNames,machine1Name:null==e?void 0:e.machine1Name,machine2Name:null==e?void 0:e.machine2Name,enteredBy:null==e?void 0:e.enteredBy,approvedBy:null==e?void 0:e.approvedBy}),A=e=>({bulkDiscountDateTime:null==e?void 0:e.bulkDiscountDateTime,bulkDiscountB2bLab:null==e?void 0:e.bulkDiscountB2bLab,bulkDiscountTotalDue:null==e?void 0:e.bulkDiscountTotalDue,bulkDiscountValue:null==e?void 0:e.bulkDiscountValue,bulkDiscountPayment:null==e?void 0:e.bulkDiscountPayment,bulkDiscountMode:null==e?void 0:e.bulkDiscountMode,bulkDiscountBills:null==e?void 0:e.bulkDiscountBills,bulkDiscountReasonText:null==e?void 0:e.bulkDiscountReasonText,bulkDiscountUser:null==e?void 0:e.bulkDiscountUser}),D={doctor:"Doctor",hospital:"Hospital",second:"Second Referral",b2b:"B2B",corporate:"Corporate",company:"Company",collectionCenter:"Collection Center"},k="Self",B=e=>{if("string"==typeof e)return e||k;if(!e)return k;return Object.entries(D).filter(l=>{let[t]=l;return null==e?void 0:e[t]}).map(l=>{let[t,o]=l;return`${o}: ${e[t]}`}).join(", ")||k};var j=t(10779),E=t(43809);const N=e=>{var l,t,u,s,c,v,D,k,N;return{PRO:null==e?void 0:e.PRO,PROCommission:null==e?void 0:e.PROCommission,TPA:null==e?void 0:e.TPA,TPACommission:null==e?void 0:e.TPACommission,b2bCenter:null!=e&&e.b2bCenter?"Others"===(null==e?void 0:e.b2bCenter)||"Total"===(null==e?void 0:e.b2bCenter)?null==e?void 0:e.b2bCenter:null!=e&&e.b2bCenterCode?(null==e?void 0:e.b2bCenter)+" ("+(null==e?void 0:e.b2bCenterCode)+")":null==e?void 0:e.b2bCenter:"",billID:null==e?void 0:e.b
1illID,billedBy:null==e?void 0:e.billedBy,card:null==e?void 0:e.card,cash:null==e?void 0:e.cash,category:null==e?void 0:e.category,company:null==e?void 0:e.company,createdAt:(0,o.Pn)(null==e?void 0:e.createdAt),collectedAt:(0,o.Pn)(null==e?void 0:e.collectedAt),date:(0,o.Pn)(null==e?void 0:e.date),discount:null==e?void 0:e.discount,discountBy:JSON.stringify(null==e?void 0:e.discountBy),due:null==e?void 0:e.due,governmentpanel:null==e?void 0:e.governmentpanel,key:null==e?void 0:e.key,leadSource:null==e?void 0:e.leadSource,netAmount:null==e?void 0:e.netAmount,paid:null==e?void 0:e.paid,patient:null==e?void 0:e.patient,patientAge:(null==e||null===(l=e.patientDetails)||void 0===l?void 0:l.age)+" "+(null==e||null===(t=e.patientDetails)||void 0===t?void 0:t.age_type),patientBarcode:null==e?void 0:e.patientBarcode,patientContact:null==e?void 0:e.patientContact,patientGender:null==e?void 0:e.patientGender,patientUHID:null==e?void 0:e.patientUHID,insuranceNumber:null==e?void 0:e.insuranceNumber,paymentStatus:null==e?void 0:e.paymentStatus,paymentType:null==e?void 0:e.paymentType,rateList:null==e?void 0:e.rateList,reasonOfDiscount:null==e?void 0:e.reasonOfDiscount,referralDoctor:null==e?void 0:e.referralDoctor,referralHospital:null==e?void 0:e.referralHospital,referredDoctorCommission:null==e?void 0:e.referredDoctorCommission,referredHospitalCommission:null==e?void 0:e.referredHospitalCommission,sampleCollector:null==e?void 0:e.sampleCollector,secondReferral:null==e?void 0:e.secondReferral,collectionCenter:null==e?void 0:e.collectionCenter,pincode:null==e?void 0:e.pincode,district:null==e?void 0:e.district,town:null==e?void 0:e.town,address:null==e?void 0:e.address,testsTotal:null==e?void 0:e.testsTotal,otherChargesTotal:null==e?void 0:e.otherChargesTotal,barCode:null==e?void 0:e.barCode,secondReferralCommission:null==e?void 0:e.secondReferralCommission,tests:Array.isArray(null==e?void 0:e.tests)?null==e||null===(u=e.tests)||void 0===u?void 0:u.map(e=>(null==e?void 0:e.name)||e).join(", "):null==e?void 0:e.tests,code:null==e?void 0:e.code,total:null==e?void 0:e.total,transactionId:null==e?void 0:e.transactionId,upi:null==e?void 0:e.upi,sampleCollectorCenter:null==e?void 0:e.sampleCollectorCenter,toLab:null==e?void 0:e.toLab,department:null==e?void 0:e.department,corporateUser:null==e?void 0:e.corporateUser,corporatePlan:null==e?void 0:e.corporatePlan,patientID:null==e?void 0:e.patientID,doctor1:null==e?void 0:e.doctor1Text,doctor2:null==e?void 0:e.doctor2Text,b2bName:null==e?void 0:e.b2bName,referralName:null==e?void 0:e.referralName,commission:null==e?void 0:e.commission,pro:Array.isArray(null==e?void 0:e.pros)?e.pros.map(e=>null==e?void 0:e.name).filter(Boolean).join(", "):null==e||null===(s=e.pro)||void 0===s?void 0:s.name,numberOfBills:null==e?void 0:e.numberOfBills,numberOfTest:null==e?void 0:e.numberOfTest,amount:null==e?void 0:e.amount,paid:null==e?void 0:e.paid,due:null==e?void 0:e.due,testPackage:null==e?void 0:e.testPackage,volume:null==e?void 0:e.volume,netAmount:null==e?void 0:e.netAmount,billDate:(0,o.Pn)(null==e?void 0:e.billDate),fromBillId:null==e?void 0:e.fromBillId,toBillId:null==e?void 0:e.toBillId,bills:null==e?void 0:e.bills,total:null==e?void 0:e.total,discount:null==e?void 0:e.discount,paid:null==e?void 0:e.paid,due:null==e?void 0:e.due,pastDueReceived:null==e?void 0:e.pastDueReceived,cash:null==e?void 0:e.cash,upi:null==e?void 0:e.upi,card:null==e?void 0:e.card,wallet:null==e?void 0:e.wallet,other:null==e?void 0:e.other,clearDueCash:null==e?void 0:e.clearDueCash,clearDueUpi:null==e?void 0:e.clearDueUpi,clearDueCard:null==e?void 0:e.clearDueCard,clearDueWallet:null==e?void 0:e.clearDueWallet,clearDueOther:null==e?void 0:e.clearDueOther,outSourceLab:null==e?void 0:e.outSourceLab,cost:null==e?void 0:e.cost,outSourceLabPrice:null==e?void 0:e.outSourceLabPrice,testTAT:null==e?void 0:e.testTAT,completionTAT:null==e?void 0:e.completionTAT,tatStatus:null==e?void 0:e.tatStatus,outOfTATReason:null==e?void 0:e.outOfTATReason,totalBilling:null==e?void 0:e.totalBilling,urgentTestBooking:null==e?void 0:e.urgentTestBooking,ongoingWithinTat:null==e?void 0:e.ongoingWithinTat,ongoingNearbyTat:null==e?void 0:e.ongoingNearbyTat,ongoingOutOfTat:null==e?void 0:e.ongoingOutOfTat,completedWithinTat:null==e?void 0:e.completedWithinTat,completedOutOfTat:null==e?void 0:e.completedOutOfTat,statusType:null==e?void 0:e.statusType,testName:null==e?void 0:e.testName,patientName:null==e?void 0:e.patientName,totalTat:null==e?void 0:e.totalTat,urgentTat:null==e?void 0:e.urgentTat,testTatMinutes:null==e?void 0:e.testTatMinutes,tatDuration:null==e?void 0:e.tatDuration,tatMinutes:null==e?void 0:e.tatMinutes,urgentTatMinutes:null==e?void 0:e.urgentTatMinutes,preAnalyticalTatMinutes:null==e?void 0:e.preAnalyticalTatMinutes,totalTatMinutes:null==e?void 0:e.totalTatMinutes,preTatStatusLabel:null==e?void 0:e.preTatStatusLabel,postTatStatusLabel:null==e?void 0:e.postTatStatusLabel,name:null==e?void 0:e.name,count:null==e?void 0:e.count,billCount:null==e?void 0:e.b
1illCount,totalTests:null==e?void 0:e.totalTests,preExceeded:null==e?void 0:e.preExceeded,postExceeded:null==e?void 0:e.postExceeded,overallExceeded:null==e?void 0:e.overallExceeded,fullName:null==e?void 0:e.fullName,toLabAmount:null==e?void 0:e.toLabAmount,toOrganisationAmount:null==e?void 0:e.toOrganisationAmount,commissionPrice:null==e?void 0:e.commissionPrice,discountsBy:null==e?void 0:e.discountsBy,discountAmount:null==e?void 0:e.discountAmount,testsText:null==e?void 0:e.testsText,contact:null==e?void 0:e.contact,patientInfo:null==e?void 0:e.patientInfo,patientInfoInline:null==e?void 0:e.patientInfoInline,closingBalance:null==e?void 0:e.closingBalance,openingBalance:null==e?void 0:e.openingBalance,paymentCollected:null==e?void 0:e.paymentCollected,b2bCenterName:`${null==e?void 0:e.b2bCenterName} ${null!=e&&e.b2bCenterCode?`(${null==e?void 0:e.b2bCenterCode})`:""}`,b2bMrp:null==e?void 0:e.b2bMrp,paymentBy:null==e?void 0:e.paymentBy,areaManager:null==e?void 0:e.areaManager,districtManager:null==e?void 0:e.districtManager,stateManager:null==e?void 0:e.stateManager,zoneHead:null==e?void 0:e.zoneHead,cmo:null==e?void 0:e.cmo,...Object.fromEntries(Object.entries(e).filter(e=>{let[l]=e;return l.startsWith("category_")})),...Object.fromEntries(Object.entries(e).filter(e=>{let[l]=e;return l.startsWith("method_")})),dateTime:(0,o.Pn)(null==e?void 0:e.dateTime),patientDetails:null!=e&&e.patientDetails?`${(null==e||null===(c=e.patientDetails)||void 0===c?void 0:c.first_name)||""} ${(null==e||null===(v=e.patientDetails)||void 0===v?void 0:v.last_name)||""}, ${(null==e||null===(D=e.patientDetails)||void 0===D?void 0:D.age)||""} ${(null==e||null===(k=e.patientDetails)||void 0===k?void 0:k.age_type)||""}, ${(null==e||null===(N=e.patientDetails)||void 0===N?void 0:N.gender)||""}`.trim():"",contacts:null==e?void 0:e.contacts,userName:null==e?void 0:e.userName,status:null==e?void 0:e.status,reasonOfRejection:null==e?void 0:e.reasonOfRejection,referrals:B(null==e?void 0:e.referrals),...n(e),...i(e),...a(e),...d(e),...(0,r.A)(e),...m(e),...b(e),...p(e),...h(e),...f(e),...A(e),...(0,j.Jx)(e),...(0,E.zR)(e),...g(e),...y(e),...C(e),...T(e),...w(e),...x(e)}}}}]);
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.