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 { Injectable } from '@angular/core';
import deepDiff from 'return-deep-diff';
import { Subject } from 'rxjs/Subject';
@Injectable()
export class BillingMiscellaneousService {
differences = new Subject();
firstClaimObject;
secondClaimObject;
fullObject1;
fullObject2;
samePdiLoaded: boolean;
constructor() {}
getInstance(instance) {
const myNewInstance = Object.assign({}, instance);
myNewInstance.serviceLinesService = null;
if (myNewInstance) {
if (this.firstClaimObject) {
this.secondClaimObject = myNewInstance.billingMiscellanousData;
this.fullObject2 = myNewInstance;
} else {
this.firstClaimObject = myNewInstance.billingMiscellanousData;
this.fullObject1 = myNewInstance;
}
if (this.secondClaimObject) {
this.compareServiceLine();
}
}
}
compareServiceLine() {
const obj1 = this.firstClaimObject;
const obj2 = this.secondClaimObject;
const diffs = deepDiff(obj1, obj2);
this.differences.next(diffs);
}
// destroyClaim(isRight, detail) {
// if (this.secondClaimObject) {
// this.secondClaimObject = null;
// this.firstClaimObject = null;
// }
// }
}