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,
AfterViewInit,
Input,
SimpleChanges,
OnChanges,
OnDestroy
} from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { EwvViewerService } from '../../ewv-viewer/ewv-viewer.service';
@Component({
selector: 'app-health-care-procedure-codes',
templateUrl: './health-care-procedure-codes.component.html',
styleUrls: ['./../../ewv-viewer/ewv-viewer.component.scss']
})
export class HealthCareProcedureCodesComponent
implements AfterViewInit, OnChanges, OnDestroy {
@Input() data;
@Input() accordionId;
isSplitView: boolean;
isSplitSubscription = new Subscription();
collapseStateSubscription: Subscription = new Subscription();
collapseState = true;
noDataMsg = 'No Health Care Procedure Code Data Found';
procedureCodesInfo;
constructor(private ewvViewerService: EwvViewerService) {}
ngAfterViewInit() {
if (this.data) {
this.populateData();
}
}
ngOnChanges(changes: SimpleChanges): void {
this.data = changes.data.currentValue;
if (this.data) {
this.populateData();
}
}
populateData() {
this.collapseStateSubscription = this.ewvViewerService
.getCollapseState()
.subscribe(state => {
this.collapseState = state;
});
this.isSplitSubscription = this.ewvViewerService.isSplitView.subscribe(
data => (this.isSplitView = data)
);
if (this.data && this.data.procedureCodesInfo) {
this.procedureCodesInfo = this.data.procedureCodesInfo;
} else {
this.procedureCodesInfo = [];
}
}
ngOnDestroy() {
this.collapseStateSubscription.unsubscribe();
this.isSplitSubscription.unsubscribe();
}
}