Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

import { Component, Input, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
import { TableColumnModel } from '../../../shared/table';
import { EwvViewerService } from '../../ewv-viewer/ewv-viewer.service';
import { Subscription } from 'rxjs/Subscription';

@Component({
selector: 'app-billing-info',
templateUrl: './billing-info.component.html',
styleUrls: ['../../ewv-viewer/ewv-viewer.component.scss']
})
export class BillingInfoComponent implements OnInit, OnChanges, OnDestroy {
@Input() data;
@Input() compareData;
@Input() viewType;
@Input() accordionId;
@Input() isRightSide = false;
@Input() isSplitView = false;
@Input() tabbable = true;
collapseState = true;
claimType;
eCodes = [];
dx = [];
px = [];
doneComparing = false;
collapseStateSubscription: Subscription = new Subscription();

get tabbableIdx() {
return this.tabbable ? '0' : '-1';
}

frequencyValues = {
0: 'Non-Payment/Zero Claim',
1: 'Admit Through Discharge Claim',
2: 'Interim-First Claim',
3: 'Interim-Continuing Claims',
4: 'Interim-Last Claim',
5: 'Late Charge Only',
// 6: 'Adjustment of Prior Claim',
7: 'Replacement of Prior Claim',
8: 'Void/Cancel of Prior Claim'
};

serviceLinesTableColumns: TableColumnModel[] = [
new TableColumnModel('Line #', 'lineNumber'),
new TableColumnModel('Service From', 'beginDateOfService'),
new TableColumnModel('Service To', 'endDateOfService'),
new TableColumnModel('POS', 'pos'),
new TableColumnModel('DX Pointer', 'dxDtPointers'),
new TableColumnModel('PROC/NDC', 'procedureCode'),
new TableColumnModel('Modifiers', 'modifiers'),
new TableColumnModel('Qty. / Type', 'quantityOrType'),
new TableColumnModel('Amount', 'charge')
];
modserviceLinesTableColumns = [...this.serviceLinesTableColumns];
constructor(private ewvService: EwvViewerService) {}
ngOnInit() {
this.collapseStateSubscription = this.ewvService
.getCollapseState()
.subscribe(state => {
this.collapseState = state;
});
}

ngOnChanges(change: SimpleChanges) {
if (change.data && change.data.currentValue) {
this.serviceLinesTableColumns = [...this.modserviceLinesTableColumns];
this.claimType = this.data.patientHeaderInfo.claimType;
// if (change.data['dx']) {
// change.data['dx'].shift();
// }

if (this.claimType === 'INSTITUTIONAL') {
this.serviceLinesTableColumns.splice(2, 2);
this.serviceLinesTableColumns.splice(2, 0, new TableColumnModel('REV', 'revCode'));
} else {
this.serviceLinesTableColumns = [...this.modserviceLinesTableColumns];
}
if (this.data && this.compareData) {
// avoid NPE
// this.data.eCodes may be null
// this.compareData.eCodes may be null
try {
this.eCodes = this.data.eCodes.length > this.compareData.eCodes.length
? this.data.eCodes
: this.compareData.eCodes;
} catch (err) {console.log('billing info error', err ); }
// if (change.compareData['dx']) {
// change.compareData['dx'].shift();
// }
if (this.data.dx.length > 0 && this.compareData.dx.length > 0) {
this.dx = this.data.dx.length > this.compareData.dx.length
? this.data.dx : this.compareData.dx;
}
if (this.data.px && this.compareData.px) {
this.px = this.data.px.length > this.compareData.px.length
? this.data.px : this.compareData.px;
}
}
}
}
ngOnDestroy() {
this.collapseStateSubscription.unsubscribe();
}
}