1import{a as Pt,b as Vt,c as Dt}from"./chunk-WQFKJF4M.js";import{a as Nt}from"./chunk-TOUUJD4J.js";import{a as xt}from"./chunk-ZVIT4ODB.js";import{Db as Mt,Ea as dt,Fa as gt,Ha as ut,Ka as ft,Ta as St,X as at,Y as rt,ba as lt,d as Q,da as vt,e as tt,ea as pt,ga as G,hb as Tt,i as et,k as it,n as nt,oa as st,pa as mt,pb as Et,qa as ct,ra as V,sa as B,tb as ht,ub as Ct,vb as bt,wb as It,z as ot,za as _t}from"./chunk-LOLNAVA7.js";import{$ as N,$a as u,Aa as d,Cb as R,Cc as F,Eb as v,Fa as c,Ha as j,O as I,Ra as i,S as W,Sa as n,T as M,Ta as _,Ua as h,Ub as K,Va as C,Vb as $,Xa as H,Zb as q,_ as x,_a as g,bc as Z,cb as b,fc as J,lb as r,mb as T,nb as E,qa as l,ra as P,rb as y,sb as O,tb as A,yb as U}from"./chunk-5PS2SECJ.js";import"./chunk-FVZJUPOX.js";import"./chunk-3ENMYILF.js";import{h as X}from"./chunk-TWZW5B45.js";var Y=X(vt());Vt();var Ot=X(Dt());var At=o=>({color:o});function wt(o,e){o&1&&_(0,"i",42)}function Lt(o,e){o&1&&_(0,"i",43)}function kt(o,e){o&1&&(i(0,"tr")(1,"td",44),r(2,"No visits to show"),n()())}function Ut(o,e){if(o&1&&_(0,"i",53),o&2){let t=u().$implicit;b("title",t.STATUS_NAME),c("ngStyle",U(2,At,t.STATUS_COLOR_CODE))}}function Ft(o,e){if(o&1&&(h(0),r(1),C()),o&2){let t=u().$implicit;l(),E("",t.AGE,"y")}}function Gt(o,e){if(o&1&&(h(0),r(1),C()),o&2){let t=u().$implicit;l(),E("",t.MONTHS,"m")}}function Bt(o,e){if(o&1&&(h(0),r(1),C()),o&2){let t=u().$implicit;l(),E("",t.DAYS,"d")}}function Yt(o,e){o&1&&(i(0,"span"),r(1,"Male"),n())}function zt(o,e){o&1&&(i(0,"span"),r(1,"Female"),n())}function Xt(o,e){o&1&&(i(0,"button",54),_(1,"i",55),n())}function Wt(o,e){if(o&1){let t=H();i(0,"tr",46),g("mouseout",function(){let m=x(t).$implicit,s=u(2);return N(s.hideTpa(m))})("mouseover",function(){let m=x(t).$implicit,s=u(2);return N(s.showTpa(m))}),i(1,"td",33),r(2),_(3,"br"),d(4,Ut,1,4,"i",47),n(),i(5,"td"),r(6),n(),i(7,"td",33),_(8,"app-patient-edit",48),r(9),n(),i(10,"td",33),d(11,Ft,2,1,"ng-container",38)(12,Gt,2,1,"ng-container",38)(13,Bt,2,1,"ng-container",38),n(),i(14,"td",33),d(15,Yt,2,0,"span",38)(16,zt,2,0,"span",38),n(),i(17,"td",33),r(18),n(),i(19,"td",33),r(20),n(),i(21,"td",49),r(22),n(),i(23,"td",33),d(24,Xt,2,0,"button",50),n(),i(25,"td"),r(26),n(),i(27,"td"),r(28),n(),i(29,"td",33)(30,"button",51),g("click",function(){let m=x(t).$implicit,s=u(2);return N(s.pdfexport(m.PATIENT_NO,m.PATIENT_VISIT_LIST_ID))}),_(31,"i",52),n()()()}if(o&2){let t=e.$implicit,a=u(2);j("text-danger",t.VISIT_STATUS==="2"),b("title",a.text),l(2),T(t.PATIENT_VISIT_LIST_ID),l(2),c("ngIf",t.STATUS_NAME),l(2),T(t.PATIENT_NAME),l(2),b("patientNo",t.PATIENT_NO),l(),E(" (",a.patient_no_sufix,")"),l(2),c("ngIf",t.AGE>0),l(),c("ngIf",t.AGE===0&&t.MONTHS>0),l(),c("ngIf",t.AGE===0&&t.MONTHS===0&&t.DAYS>0),l(2),c("ngIf",t.GENDER===1),l(),c("ngIf",t.GENDER===0),l(2),T(t.COUNTRY_ISO3),l(2),T(a.formatDateTime(t.VISIT_TIME)),l(2),T(t.DOCTOR_NAME),l(2),c("ngIf",t.OP_REGISTRATION_TYPE===1),l(2),T(t.DEPARTMENT_NAME),l(2),T(t.MOBILE_NO)}}function jt(o,e){if(o&1&&(i(0,"tbody"),d(1,Wt,32,19,"tr",45),R(2,"filter"),n()),o&2){let t=u();l(),c("ngForOf",v(2,1,t.visit_list,t.term))}}function Ht(o,e){if(o&1&&_(0,"i",53),o&2){let t=u(2).$implicit;b("title",t.STATUS_NAME),c("ngStyle",U(2,At,t.STATUS_COLOR_CODE))}}function Kt(o,e){if(o&1&&(h(0),i(1,"div",56),d(2,Ht,1,4,"i",47),i(3,"label",57),r(4),n(),r(5,"\xA0\xA0 "),n(),C()),o&2){let t=u().$implicit;l(2),c("ngIf",t.STATUS_NAME),l(2),T(t.STATUS_NAME)}}function $t(o,e){if(o&1&&(h(0),d(1,Kt,6,2,"ng-container",38),C()),o&2){let t=e.$implicit;l(),c("ngIf",t.STATUS==1)}}var qt=".xlsx",D=class o{constructor(e,t,a){this.Api=e;this.rest=t;this.notifier=a;this.from_date=new Date;this.to_date=new Date;this.settings=pt;this.status_id="";this.visit_list=[];this.text="";this.searchPatientId="";this.patient_id="";this.pat_data=[""];this.visit_status=[];this.visit_status_list=[];this.patient_no_sufix=G.PATIENT_NO_SUFFIX;this.collection=0;this.p=50;this.page=1;this.term="";this.config={displayKey:"STATUS_NAME",search:!0,height:"auto",placeholder:"Select Visit Status",limitTo:10,moreText:".........",noResultsFound:"No results found!",searchPlaceholder:"Search",searchOnKey:"STATUS_NAME",clearOnSelection:!1}}ngOnInit(){this.getVisitStatus(),this.from_date=B(),this.to_date=B(),this.getVisitListByDate(0),this.patient_no_sufix=G.PATIENT_NO_SUFFIX}getToday(){return new Date().toISOString().split("T")[0]}formatDateTime(e){return V(e)}formatTime(e){return ct(e)}getVisitListByDate(e=0,t=0){let m=t*50;this.start=m,this.limit=e>
1=1?0:50;let s={dateVal:this.formatDateTime(this.from_date),todate:this.formatDateTime(this.to_date),timeZone:Y.default.tz.guess(),patient_id:this.patient_id,status_id:this.status_id,limit:this.limit,start:this.start};this.rest.getVisitListByDate(s).subscribe(f=>{if(f.status==="Success"){if(this.visit_list=f.data,this.collection=f.total_count,e==1){let S=[];for(let p of f.data){let k={"Visit No":p.PATIENT_VISIT_LIST_ID,"Patient Name":p.FIRST_NAME+" "+p.MIDDLE_NAME+" "+p.LAST_NAME,"Patient No.(MRN)":(p.OP_REGISTRATION_NUMBER?p.OP_REGISTRATION_NUMBER:"")+"("+this.patient_no_sufix+")",Age:p.AGE!=null?p.AGE+"y":"",Gender:p.GENDER==1?"Male":p.GENDER==2?"Female":"",Nationality:p.COUNTRY_ISO3,"Visit.Time":V(p.VISIT_TIME),Clinician:p.DOCTOR_NAME,Type:p.OP_REGISTRATION_TYPE==1?"INS":"",Dept:p.DEPARTMENT_NAME,"Phone No.":p.MOBILE_NO};S.push(k)}let z={Sheets:{Sheet1:mt.json_to_sheet(S)},SheetNames:["Sheet1"]};st(z,"VisitReport_"+new Date().getTime()+qt)}else if(e==2){let S=[];for(let p of f.data){let k=[p.PATIENT_VISIT_LIST_ID,p.FIRST_NAME+" "+p.MIDDLE_NAME+" "+p.LAST_NAME,(p.OP_REGISTRATION_NUMBER?p.OP_REGISTRATION_NUMBER:"")+"("+this.patient_no_sufix+")",p.AGE!=null?p.AGE+"y":"",p.GENDER==1?"Male":p.GENDER==2?"Female":"",p.COUNTRY_ISO3,V(p.VISIT_TIME),p.DOCTOR_NAME,p.OP_REGISTRATION_TYPE==1?"INS":"",p.DEPARTMENT_NAME,p.MOBILE_NO];S.push(k)}let L=new Pt("l","pt","a4");(0,Ot.default)(L,{head:[["Visit No","Patient Name","Patient No.(MRN)","Age","Gender","Nationality","Visit.Time","Clinician","Type","Dept","Phone No."]],body:S}),L.save("VisitReport.pdf")}}else this.visit_list=[]})}ExportExcel(){this.getVisitListByDate(1)}getChange(e){e.change||(this.searchPatientId="",this.patient_id="")}setItem(e){this.pat_data=e.item,this.patient_id=this.pat_data.OP_REGISTRATION_ID,this.searchPatientId=e.item.OP_REGISTRATION_NUMBER}exportTopdf(){this.getVisitListByDate(2)}pdfexport(e,t){let a={timeZone:Y.default.tz.guess(),patient_id:e,visit_id:t};this.rest.downloadmedicalPdf_visitdate(a).subscribe(m=>{m.status==="Success"?window.open(this.settings.API_ENDPOINT+m.data):this.notifier.notify("error",m.message)})}clear_search(){this.term=""}showTpa(e){if(e.OP_REGISTRATION_TYPE==1&&e.PATIENT_TYPE==null||e.PATIENT_TYPE==1&&e.PATIENT_TYPE!=null)if(e.insurance!=!1){let t=[],a="";if(e.insurance.OP_INS_IS_ALL==1)a=e.insurance.OP_INS_ALL_VALUE+" "+e.insurance.OP_INS_ALL_TYPE;else if(e.insurance.co_ins&&e.insurance.co_ins.length>0){let f=0;for(let S of e.insurance.co_ins)t[f]=` 2 `+S.COIN_NAME+" : "+S.COIN_VALUE+" "+S.COIN_VALUE_TYPE+" ",f=f+1}let m=` 3Rest of all : `,s=` 4Co-Ins :`;t.length==0&&(s=""),e.insurance.OP_INS_IS_ALL==0&&(m="",a=""),this.text="TPA : "+e.insurance.TPA_ECLAIM_LINK_ID+" - "+e.insurance.TPA_NAME+` 5Company : `+e.insurance.INSURANCE_PAYERS_ECLAIM_LINK_ID+" - "+e.insurance.INSURANCE_PAYERS_NAME+` 6Network : `+e.insurance.INS_NETWORK_NAME+` 7Deductable : `+e.insurance.OP_INS_DEDUCTIBLE+" "+e.insurance.OP_INS_DEDUCT_TYPE+` 8`+m+a+s+t}else this.text="No details found"}hideTpa(e){(e.OP_REGISTRATION_TYPE==1&&e.PATIENT_TYPE==null||e.PATIENT_TYPE==1&&e.PATIENT_TYPE!=null)&&(this.text="")}getVisitStatus(){let e={limit:50,start:0};this.Api.postRequest(this.Api.visitStatus.listVisitStatus,e).subscribe(t=>{t.status=="Success"&&(this.visit_status=t.data,this.visit_status_list=t.data)})}setStatus(){this.status_id=this.status_data.STATUS_ID}static{this.\u0275fac=function(t){return new(t||o)(P(St),P(Tt),P(_t))}}static{this.\u0275cmp=W({type:o,selectors:[["app-visit-report"]],decls:92,vars:28,consts:[[3,"heading","icon"],[1,"row","form-group"],[1,"col-12","row","container"],[1,"col-md-6"],[1,"row"],[1,"col-md-2"],[1,"col-md-9"],["name","from_date","type","date",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],["name","to_date","type","date",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"col-12","row","container","mt-3"],[1,"col-2"],[1,"col-9"],[3,"get_change","set_item"],["name","sel_tpa_receiver",1,"form-control-sm",2,"padding","0",3,"change","ngModelChange","ngModel","config","multiple","options"],[1,"col-md-2","pull-left"],["type","button",1,"btn","btn-info","btn-sm",3,"click"],[1,"form-group","row"],[1,"high-light"],[1,"w-100"],[1,"row","mb-2"],[1,"col-md-3","text-left"],[1,"input-group"],["type","text",1,"form-control","form-control-sm","pull-right",2,"height","31px",3,"ngModelChange","ngModel"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["class","fa fa-search",4,"ngIf"],["class","fa fa-times",4,"ngIf"],[1,"col-md-9","text-right"],["title","Export as excel",1,"btn","btn-outline-success","btn-xs","m-1",3,"click"],[1,"fa","fa-file-excel-o"],["title","Export as pdf",1,"btn","btn-outline-danger","btn-xs","m-1",3,"click"],[1,"fa","fa-file-pdf-o"],[1,"table","tbl","table-hover","table-striped","table-bordered"],[1,"text-center"],[1,"text-center",2,"width","10%"],[1,"text-center",2,"width","5%"],[1,"text-center",2,"width","6%"],[2,"width","10%"],[4,"ngIf"],["aria-label","Default pagination",1,"d-flex","justify-content-center",3,"pageChange","page","boundaryLinks","collectionSize","directionLinks","maxSize","pageSize"],[1,"row",2,"width","100%"],[4,"ngFor","ngForOf"],[1,"fa","fa-search"],[1,"fa","fa-times"],["colspan","12",1,"text-center"],[3,"text-danger","title","mouseout","mouseover",4,"ngFor","ngForOf"],[3,"mouseout","mouseover","title"],["class","fa fa-bookmark",3,"ngStyle","title",4,"ngIf"],[3,"patientNo"],[1,"text-left"],["class","btn btn-xs btn-link",4,"ngIf"],["alt","Start Pre-consult","title","Download Pdf",1,"btn","btn-sm","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-file-pdf-o"],[1,"fa","fa-bookmark",3,"ngStyle","title"],[1,"btn","btn-xs","btn-link"],[1,"fa","fa-umbrella"],[1,"w-auto"],[1,"m-2"]],template:function(t,a){t&1&&(i(0,"div"),_(1,"app-page-header",0),i(2,"fieldset",1)(3,"legend"),r(4,"Search"),n(),i(5,"div",2)(6,"div",3)(7,"div",4)(8,"label",5),r(9,"From Date"),n(),i(10,"div",6)(11,"input",7),R(12,"date"),g("ngModelChange",function(s){return a.from_date=s}),n()()()(),i(13,"div",3)(14,"div",4)(15,"label",5),r(16,"To Date"),n(),i(17,"div",6)(18,"input",8),R(19,"date"),g("ngModelChange",function(s){return a.to_date=s}),n()()()()(),i(20,"div",9)(21,"div",3)(22,"div",4)(23,"label",10),r(24,"Patient No"),n(),i(25,"div",11)(26,"app-patient-search",12),g("get_change",function(s){return a.getChange(s)})("set_item",function(s){return a.setItem(s)}),n()()()(),i(27,"div",3)(28,"div",4)(29,"label",10),r(30,"Visit Status"),n(),i(31,"div",11)(32,"ngx-select-dropdown",13),g("change",function(){return a.setStatus()}
8),A("ngModelChange",function(s){return O(a.status_data,s)||(a.status_data=s),s}),n()()()()(),i(33,"div",9)(34,"div",14)(35,"div",4)(36,"button",15),g("click",function(){return a.getVisitListByDate()}),r(37,"Search"),n()()()()(),i(38,"fieldset",16)(39,"legend"),r(40,"Visit List "),_(41,"label",17),n(),i(42,"div",18)(43,"div",19)(44,"div",20)(45,"div",21)(46,"input",22),A("ngModelChange",function(s){return O(a.term,s)||(a.term=s),s}),n(),i(47,"div",23)(48,"button",24),g("click",function(){return a.clear_search()}),d(49,wt,1,0,"i",25)(50,Lt,1,0,"i",26),n()()()(),i(51,"div",27)(52,"button",28),g("click",function(){return a.ExportExcel()}),_(53,"i",29),n(),i(54,"button",30),g("click",function(){return a.exportTopdf()}),_(55,"i",31),n()()(),i(56,"table",32)(57,"thead")(58,"tr")(59,"th",33),r(60,"Visit No"),n(),i(61,"th"),r(62,"Patient Name"),n(),i(63,"th",34),r(64,"Patient No.(MRN)"),n(),i(65,"th",35),r(66,"Age"),n(),i(67,"th",36),r(68,"Gender"),n(),i(69,"th",33),r(70,"Nationality"),n(),i(71,"th",33),r(72,"Visit.Time"),n(),i(73,"th"),r(74,"Clinician"),n(),i(75,"th",33),r(76,"Type"),n(),i(77,"th",37),r(78,"Dept"),n(),i(79,"th",37),r(80,"Phone No."),n(),i(81,"th",33),r(82,"Report"),n()(),d(83,kt,3,0,"tr",38),n(),d(84,jt,3,4,"tbody",38),n(),i(85,"ngb-pagination",39),A("pageChange",function(s){return O(a.page,s)||(a.page=s),s}),g("pageChange",function(){return a.getVisitListByDate(0,a.page-1)}),n(),i(86,"pre"),r(87),n(),i(88,"pre"),r(89),n(),i(90,"div",40),d(91,$t,2,1,"ng-container",41),n()()()()),t&2&&(l(),c("heading","Visit Report")("icon","fa-weibo"),l(10),c("ngModel",v(12,22,a.from_date,"yyyy-MM-dd")),l(7),c("ngModel",v(19,25,a.to_date,"yyyy-MM-dd")),l(14),y("ngModel",a.status_data),c("config",a.config)("multiple",!1)("options",a.visit_status_list),l(14),y("ngModel",a.term),l(3),c("ngIf",a.term===""),l(),c("ngIf",a.term!==""),l(33),c("ngIf",a.visit_list.length===0),l(),c("ngIf",a.visit_list.length>0),l(),y("page",a.page),c("boundaryLinks",!0)("collectionSize",a.collection)("directionLinks",!0)("maxSize",3)("pageSize",a.p),l(2),E("Current page : ",a.page,""),l(2),E("Total records : ",a.collection,""),l(2),c("ngForOf",a.visit_status))},dependencies:[K,$,q,et,it,nt,at,Nt,xt,Ct,ft,Z,dt],styles:["legend[_ngcontent-%COMP%]{display:block;width:auto;max-width:100%;padding:10px;margin-bottom:.5rem;font-size:19px;line-height:inherit;color:inherit;white-space:normal}.high-light[_ngcontent-%COMP%]{font-weight:700;font-size:19px;color:#162545}fieldset[_ngcontent-%COMP%]{min-width:0;padding:10px;margin:5px;border:1px solid grey}.clearfix[_ngcontent-%COMP%]{width:100%;min-height:10px}label[_ngcontent-%COMP%], th[_ngcontent-%COMP%], input[_ngcontent-%COMP%], select[_ngcontent-%COMP%], option[_ngcontent-%COMP%]{font-size:12px}.info-td[_ngcontent-%COMP%]{text-align:center}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;margin-top:.5rem;margin-bottom:0!important}.input-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;margin-top:0rem;margin-bottom:.5rem!important}.sm-tbl[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .sm-tbl[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:2px;font-size:12px}.footer[_ngcontent-%COMP%], .footer-space[_ngcontent-%COMP%]{height:30px}.header[_ngcontent-%COMP%]{top:0}.footer[_ngcontent-%COMP%]{bottom:0}label[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%], input[_ngcontent-%COMP%], select[_ngcontent-%COMP%], option[_ngcontent-%COMP%]{font-size:12px}.tbl[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:12px;text-align:left}.custom[_ngcontent-%COMP%]{max-width:50%;margin-left:25%;margin-top:3%}.tbl[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px 8px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:middle}.btn-stk[_ngcontent-%COMP%]{color:#fff;background-color:#17a2b8;border-color:#17a2b8;font-weight:400;font-size:.875rem;line-height:1.5;border-radius:.2rem;border:1px solid transparent}
8.gst[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .gst[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;padding:1px 2px}.size[_ngcontent-%COMP%]{height:32px;padding:0;margin:0;font-size:12px}.tab-content[_ngcontent-%COMP%]{background-color:#fff;border:1px solid antiquewhite}.tab-content[_ngcontent-%COMP%] .panel-heading[_ngcontent-%COMP%]{background:linear-gradient(30deg,#1674b8 60%,#17a2b8);margin-bottom:5px;padding:1px 9px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{font-family:Arial,Helvetica,sans-serif}.tab-content[_ngcontent-%COMP%]{background-color:#fff;border:1px solid #ccc}.tab-content[_ngcontent-%COMP%] .panel-heading[_ngcontent-%COMP%]{background-color:#162545;margin-bottom:5px;padding:1px 9px;color:#fff}.tab-content[_ngcontent-%COMP%] .panel-body[_ngcontent-%COMP%]{padding:10px}"]})}};var Zt=[{path:"",component:D}],w=class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=M({type:o})}static{this.\u0275inj=I({imports:[F.forChild(Zt),F]})}};var Rt=class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=M({type:o})}static{this.\u0275inj=I({imports:[J,ot,lt,It,tt,w,Q,Et,gt,rt,ut,ht,bt,Mt]})}};export{Rt as VisitReportModule};
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.