{"version":3,"file":"default-src_app_modules_features_results_results-routing_module_ts.0958ccbdb7692bf8.js","mappings":"uhBAcMA,sBAAqG,QAArGA,CAAqG,QAE7FA,0BAAcA,QAClBA,kBAEFA,QACAA,kBACEA,6BAEFA,gCAFkBA,+BAAgB,oEAIpCA,sBAAqG,QAArGA,CAAqG,QAE7FA,gCAAoBA,QACxBA,kBAEFA,QACAA,kBACEA,6BAEFA,gCAFkBA,+BAAgB,yDAoB9BA,kBACEA,mCACFA,+BADwBA,8DAF1BA,kBACEA,wBAGFA,8BAHQA,yFAKNA,kBAA6E,+BAEnDA,2EAAyBA,kDAA8C,GAC/FA,mCAFwBA,8DAF5BA,eACEA,wBAKFA,8BALQA,4EAONA,kBACEA,uCACFA,+BAD4BA,+DAF9BA,kBACEA,wBAGFA,8BAHQA,+EAKNA,kBACEA,oCACFA,+BADyBA,oCAAmB,wDAF9CA,kBACEA,yBAGFA,8BAHQA,udCjDX,IAAMC,GAAb,MAAM,MAAOA,EAiBXC,YACSC,EACCC,EACAC,EACAC,EACAC,EACAC,GACAC,IANDC,qBACCA,iBACAA,cACAA,kBACAA,gBACAA,eACAA,2BAvBMA,cAAU,EACVA,gBAAoC,IAAIC,SAAsBC,GAC9DF,mBAAgB,GACzBA,8BAA2B,IAAIG,KAC/BH,gBAAY,EACZA,sBAA2B,EAC3BA,cAAmB,EACnBA,6BAAyB,EACzBA,+BAA2B,EAC3BA,iCAA6B,EAC7BA,8BAA0B,EAC1BA,sCAAkC,EAClCA,kBAAc,EACbA,gBAA4B,IAAII,KACjCJ,WAAQ,IAAIK,IAWlB,CAEMC,gBACL,GAAIN,KAAKD,mBAAmBQ,QAC1BP,KAAKF,OAAOU,SAAS,CAAC,yBAA0B,CAACC,GAAIT,KAAKU,WAAWC,WAChE,CACL,MAAMC,EAAMZ,KAAKF,OAAOe,aACtBb,KAAKF,OAAOgB,cAAc,CAAC,yBAA0B,CAACL,GAAIT,KAAKU,YAEjEK,OAAOC,KAAKJ,EAAK,SAClB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,KAAOtO,KAAKkH,kBAAkBoC,QAAQc,cAAc,GAAGC,MAAM,GAE7DrK,KAAKuS,OACNvS,KAAKwS,SACLxS,KAAKuS,MAAO,GAEhBvS,KAAK0C,WAAY,IAEjB1C,KAAK0C,WAAY,KACjBT,QACKoB,QACGC,KAAK,IAAD,EACJmG,KAAa,MAEhBlG,UAAU,IAAMvD,KAAKgS,iBAEjC,CAEMS,QACHzS,KAAK6R,kBAAkBa,QACvB1S,KAAKwS,QACR,CAEMG,gBACC3S,KAAK6R,kBAAkBe,OACvB5S,KAAKwS,QAEZ,CAEOA,SACJxS,KAAK6S,cAAcC,KAAK9S,KAAK6R,kBAAkBpK,MAClD,CAEMnB,cACHtG,KAAKuG,WAAWC,OAChBxG,KAAKuG,WAAWE,UACnB,+CA1EQkL,GAAuBrS,wEAAvBqS,EAAuBjL,4fCdpCpH,iBAAgF,UAAhFA,CAAgF,UAAhFA,CAAgF,QAGhEA,gDAAoCA,YAGhDA,iBACIA,yCAEJA,iBAFiCA,mDAAkC,qQDO1DqS,CAAb,KDCQF,YAAa,CAACC,KACdnH,KAAM,CAAEF,MAAO,CAAC,YAAa,eAAgB,eAAgB,UAAW,eAE5E,CACIiH,KAAM,QACNC,UAAWwB,IACXtB,YAAa,CAACC,KACdnH,KAAM,CAAEF,MAAO,CAAC,YAAa,eAAgB,eAAgB,UAAW,eAE5E,CACIiH,KAAM,aACNC,UAAWyB,IACXvB,YAAa,CAACC,KACdnH,KAAM,CAAEF,MAAO,CAAC,YAAa,eAAgB,eAAgB,UAAW,gBAQzE,IAAM4I,GAAb,MAAM,MAAOA,kDAAoB,0BAApBA,gCAHDC,cAAsB7B,IACtB6B,QAECD,CAAb","names":["i0","DrawerOrderComponent","constructor","ordersService","sanitizer","screen","domService","renderer","router","pwaDetectorService","this","BehaviorSubject","undefined","UntypedFormControl","Subject","Order","sendToPreview","isPWA","navigate","id","orderId","then","url","serializeUrl","createUrlTree","window","open","responsiveValues","isPhoneOrTablet","sizes","isPhone","shader","getElementsByClassname","item","button","querySelector","click","config","floatingActionButtonConfig","icon","shading","direction","position","of","my","at","offset","repaintFloatingActionButton","ngOnChanges","changes","currentValue","previousValue","isLoading","selectedTab","getResults","loadOrder","scrollTo","$element","scrollIntoView","behavior","block","inline","getOrderTestsTypes","pipe","take","subscribe","response","clinicalResultsVisible","hasClinicalResult","microbiologyResultsVisible","hasMicrobiologyResult","toxicologyResultsVisible","hasToxicologyResult","pathologyResultsVisible","hasPathologyResult","alert","IsCancelled","order","status","OrderStatus","CancellationReasons","cancellationReasons","map","c","name","join","onToolbarReady","e","items","element","children","setStyle","hasToxicologyUnexpectedPositiveResults","hasResults","hasToxicologyUnexpectedPositive","Status","color","orderAlert","toUpperCase","hasAlert","abnormalLabel","bypassSecurityTrustHtml","getOder","reportCommentFormControl","setValue","reportComment","OrderPatient","patient","PatientSearchWithoutCollections","OrderPhysician","physician","Physician","ngOnDestroy","onDestroy$","next","complete","selectors","ctx","AdvancedSearchContentComponent","service","clientService","patientService","testService","route","fusionAuthService","reportsService","settingsService","fusionAuthManagement","allowSearch","dataSource","text","value","EventEmitter","environment","ngOnInit","dxDataGridComponent","instance","beginCustomLoading","closeDrawer","drawerOpened","changed","takeUntil","clearSelection","getWebResultSettings","x","webResultSettings","getResultSettings","results","endCustomLoading","abnormalResult","waitByUser","parameterUser","queryParams","user","JSON","parse","AES","toString","enc","Sentry","Profile","initGridHeaderFilters","filtersSubmitted","debounceTime","filters","setFilters","ButtonsDisabled","selectedItemsIds","length","ack","queryString","acknowledgeOrder","getDataSource","reload","registrations","roles","loggedClientIds","data","clients","loggedPatientIds","patients","loggedPhysicianIds","physicians","DataSource","store","advancedSearchStore","printLabResults","generateOrderResults","blob","FileUtils","printOrderLog","generateOrderLog","printOrderDetails","generateOrderDetails","openEmailFax","type","emailFaxVisible","openUpdateBillTo","updateBillToVisible","closeUpdateBillTo","FABDisabled","showColumnChooser","onContentReady","itemsSelected","ids","ackFilter","getSelectedRowsData","filter","r","onlineAckUser","Array","isArray","acknowledgeOrderSelected","pendingOrderFiler","pendingOrderSelected","signedOrderSelected","hasSignature","testResult","testId","test","orderResults","find","reportAs","flag","closeMissingInfo","canceled","missingInfoPopupVisible","signOrders","signDialogVisible","signDialogClosed","signatureDialogResponse","signature","MultipleOrdersSignature","image","username","ordersIds","signImage","request","registration","applicationId","role","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","updateUser","CREATED","SignatureImage","notify","refresh","openMissingInfo","getOrderBillingInfo","res","missingInfoData","orderCode","codeValue","openPreview","UserRole","UserClients","userRoleInArray","UserPhysicians","UserPatients","getStatus","container","getCriticalResultStatus","criticalToxResults","criticalMicResults","criticalResults","clientHeaderFilterDataSource","clientHeaderFilter","lastNameHeaderFilterDataSource","lastNameHeaderFilter","getPatientField","firstNameHeaderFilterDataSource","firstNameHeaderFilter","testsHeaderFilterDataSource","testsHeaderFilter","arr","includes","formatDate","date","tz","Moment","format","DxDataGridComponent","DxDrawerComponent","routes","path","component","LabResultsComponent","canActivate","FusionAuthGuard","AdvancedSearchComponent","fb","resultsSearchForm","group","missingInfo","initialSubmit","bind","ngAfterViewInit","IsMissingInfoEnabled","showMissingInfo","localStorage","getItem","sent","submit","clear","reset","searchResults","valid","formSubmitted","emit","OrderResultsComponent","CumulativeResultsComponent","ResultsRoutingModule","RouterModule"],"sourceRoot":"webpack:///","sources":["./src/app/modules/features/results/components/advanced-search-content/drawer-order/drawer-order.component.html","./src/app/modules/features/results/components/advanced-search-content/drawer-order/drawer-order.component.ts","./src/app/modules/features/results/components/advanced-search-content/advanced-search-content.component.html","./src/app/modules/features/results/components/advanced-search-content/advanced-search-content.component.ts","./src/app/modules/features/results/results-routing.module.ts","./src/app/modules/features/results/pages/advanced-search/advanced-search.component.ts","./src/app/modules/features/results/pages/advanced-search/advanced-search.component.html"],"sourcesContent":["
\r\n \r\n
\r\n

Order {{order.codeValue}} Results

\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Order Comments

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n

Cancellation Reasons

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n","import {Component, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport {Router} from '@angular/router';\r\nimport config from 'devextreme/core/config';\r\nimport {alert} from 'devextreme/ui/dialog';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {take} from 'rxjs/operators';\r\nimport {Physician} from 'src/app/modules/shared/models/order-entry/physician';\r\nimport {DOMService, PWADetectorService, ScreenService} from '../../../../../../shared/services/general';\r\nimport {PatientSearchWithoutCollections} from '../../../../../shared/models/order-entry/patient';\r\nimport {OrdersService} from '../../../../../shared/services/orders.service';\r\nimport {Order, OrderStatus} from '../../../models/order';\r\n\r\n@Component({\r\n selector: 'app-drawer-order',\r\n templateUrl: './drawer-order.component.html',\r\n styleUrls: ['./drawer-order.component.scss'],\r\n})\r\nexport class DrawerOrderComponent implements OnChanges, OnDestroy {\r\n @Input() public orderId = -1;\r\n @Input() public closeEvent: BehaviorSubject = new BehaviorSubject(undefined);\r\n @Input() public abnormalLabel = '';\r\n public reportCommentFormControl = new UntypedFormControl();\r\n public isLoading = false;\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n public clinicalResultsVisible = false;\r\n public toxicologyResultsVisible = false;\r\n public microbiologyResultsVisible = false;\r\n public pathologyResultsVisible = false;\r\n public hasToxicologyUnexpectedPositive = false;\r\n public selectedTab = -1;\r\n private onDestroy$: Subject = new Subject();\r\n public order = new Order();\r\n\r\n constructor(\r\n public ordersService: OrdersService,\r\n private sanitizer: DomSanitizer,\r\n private screen: ScreenService,\r\n private domService: DOMService,\r\n private renderer: Renderer2,\r\n private router: Router,\r\n private pwaDetectorService: PWADetectorService,\r\n ) {\r\n }\r\n\r\n public sendToPreview() {\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['/secured/results/order', {id: this.orderId}]).then();\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/results/order', {id: this.orderId}]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const shader = this.domService.getElementsByClassname('dx-overlay-shader').item(0) as HTMLElement;\r\n if (shader) {\r\n const button = shader.querySelector('.dx-fa-button-icon-close') as HTMLElement;\r\n if (button) {\r\n button.click();\r\n }\r\n }\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId && changes.orderId.currentValue !== changes.orderId.previousValue) {\r\n const id = changes.orderId.currentValue;\r\n if (id !== -1) {\r\n this.isLoading = true;\r\n this.selectedTab = -1;\r\n this.getResults(id);\r\n this.loadOrder(id);\r\n this.responsiveValues();\r\n }\r\n }\r\n }\r\n\r\n public scrollTo($element: any) {\r\n $element.scrollIntoView({behavior: 'smooth', block: 'start', inline: 'nearest'});\r\n }\r\n\r\n private getResults(orderId: number) {\r\n this.ordersService\r\n .getOrderTestsTypes(orderId)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n this.clinicalResultsVisible = response.hasClinicalResult;\r\n this.microbiologyResultsVisible = response.hasMicrobiologyResult;\r\n this.toxicologyResultsVisible = response.hasToxicologyResult;\r\n this.pathologyResultsVisible = response.hasPathologyResult;\r\n if (!this.clinicalResultsVisible && !this.microbiologyResultsVisible && !this.toxicologyResultsVisible && !this.pathologyResultsVisible) {\r\n alert('There is no result to display.', 'No results').then();\r\n } else {\r\n this.selectedTab = this.clinicalResultsVisible\r\n ? 0\r\n : this.toxicologyResultsVisible\r\n ? 2\r\n : this.microbiologyResultsVisible\r\n ? 1\r\n : this.pathologyResultsVisible\r\n ? 3\r\n : -1;\r\n }\r\n });\r\n }\r\n\r\n public get IsCancelled() {\r\n return this.order ? this.order.status === OrderStatus.Canceled : false;\r\n }\r\n\r\n public get CancellationReasons() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.cancellationReasons) {\r\n return '';\r\n }\r\n return this.order ? this.order.cancellationReasons.map(c => c.name).join(', ') : '';\r\n }\r\n\r\n public onToolbarReady(e: any) {\r\n if (this.isPhone) {\r\n const items = e.element.querySelector('.dx-toolbar-before').children as HTMLCollection[];\r\n if (items[1]) {\r\n this.renderer.setStyle(items[1], 'vertical-align', 'baseline');\r\n this.renderer.setStyle(items[1], 'padding-top', '25px');\r\n }\r\n }\r\n }\r\n\r\n public hasToxicologyUnexpectedPositiveResults(hasResults: boolean) {\r\n this.hasToxicologyUnexpectedPositive = hasResults;\r\n }\r\n\r\n public get Status() {\r\n let color;\r\n let status = OrderStatus[OrderStatus.None];\r\n switch (this.order.status) {\r\n case OrderStatus.Canceled:\r\n color = 'ocl-status-black';\r\n status = OrderStatus[OrderStatus.Canceled];\r\n break;\r\n case OrderStatus.Final:\r\n color = 'ocl-status-green';\r\n status = OrderStatus[OrderStatus.Final];\r\n break;\r\n case OrderStatus.Partial:\r\n case OrderStatus.PartiallyReleased:\r\n case OrderStatus.Preliminary:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Partial];\r\n break;\r\n case OrderStatus.Pending:\r\n case OrderStatus.Unreleased:\r\n color = 'ocl-status-yellow';\r\n status = OrderStatus[OrderStatus.Pending];\r\n break;\r\n }\r\n\r\n let orderAlert = `
\r\n
\r\n ${status.toUpperCase()}
`;\r\n\r\n if (this.order.hasAlert) {\r\n if (this.order.hasToxicologyUnexpectedPositive) {\r\n orderAlert += `
\r\n ${this.abnormalLabel !== undefined && this.abnormalLabel !== null && this.abnormalLabel !== '' ?\r\n this.abnormalLabel.toUpperCase() :\r\n this.order.alert?.toUpperCase()}
`;\r\n }\r\n if (this.order.alert?.toUpperCase() === 'CRITICAL') {\r\n orderAlert += `
${this.order.alert}
`;\r\n }\r\n }\r\n orderAlert += `
`;\r\n return this.sanitizer.bypassSecurityTrustHtml(orderAlert);\r\n }\r\n\r\n public loadOrder(orderId: number) {\r\n this.ordersService.getOder(orderId)\r\n .pipe(take(1))\r\n .subscribe((order: Order) => {\r\n this.isLoading = false;\r\n this.order = order;\r\n this.reportCommentFormControl.setValue(this.order.reportComment);\r\n });\r\n }\r\n\r\n public get OrderPatient() {\r\n return this.order.patient ? this.order.patient : new PatientSearchWithoutCollections();\r\n }\r\n\r\n public get OrderPhysician() {\r\n return this.order.physician ? this.order.physician : new Physician();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ webResultSettings[0].testName }}\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[0].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[1].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[1].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[2].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[2].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[3].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[3].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[4].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[4].testId, order.data) }}\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n

User: {{ order.data.onlineAckUser }}

\r\n

Date: {{ formatDate(order.data.onlineAckDateTime) }}

\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { AES, enc } from 'crypto-js';\r\nimport { DxDataGridComponent } from 'devextreme-angular';\r\nimport { DxDrawerComponent } from 'devextreme-angular';\r\nimport config from 'devextreme/core/config';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport * as Moment from 'moment-timezone';\r\nimport { BehaviorSubject, of, Subject } from 'rxjs';\r\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\r\nimport { ReportsService } from 'src/app/modules/shared/services/reports.service';\r\nimport { environment } from '../../../../../../environments/environment';\r\nimport { IAdvancedOrderSearchParams } from '../../../../../shared/models/ocl';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport { PWADetectorService, ScreenService } from '../../../../../shared/services/general';\r\nimport { FileUtils } from '../../../../../shared/utils';\r\nimport { ClientService } from '../../../../shared/services';\r\nimport { PatientService } from '../../../../shared/services';\r\nimport { OrdersService } from '../../../../shared/services/orders.service';\r\nimport { SettingsService } from '../../../../shared/services/settings.service';\r\nimport { TestService } from '../../../../shared/services/test.service';\r\nimport { OrderStatus, WebOrder } from '../../models/order';\r\nimport { OrderBillingInformation } from '../../models/order-billing-information';\r\nimport * as Sentry from \"@sentry/angular-ivy\";\r\nimport {SignatureRepresentation} from \"../../../requisitions/components/signature-dialog/signature-dialog.component\";\r\nimport {MultipleOrdersSignature, MultipleRequisitionsSignature} from \"../../../../shared/models/signature\";\r\nimport notify from \"devextreme/ui/notify\";\r\nimport {RegistrationRequest} from \"../../../../../shared/models/fusion-auth\";\r\nimport {CREATED} from \"http-status-codes\";\r\n\r\n@Component({\r\n selector: 'app-advanced-search-content',\r\n templateUrl: './advanced-search-content.component.html',\r\n styleUrls: ['./advanced-search-content.component.scss'],\r\n})\r\nexport class AdvancedSearchContentComponent implements OnInit, OnDestroy {\r\n public signDialogVisible = false;\r\n public signedOrderSelected = false;\r\n public abnormalLabel: string = '';\r\n public drawerOpened = false;\r\n public orderId = -1;\r\n @Input() public showMissingInfo = false;\r\n private clientHeaderFilterDataSource = new BehaviorSubject(null);\r\n public clientHeaderFilter = {\r\n allowSearch: true,\r\n dataSource: null,\r\n };\r\n private lastNameHeaderFilterDataSource = new BehaviorSubject(null);\r\n public lastNameHeaderFilter = {\r\n allowSearch: true,\r\n dataSource: null,\r\n };\r\n private firstNameHeaderFilterDataSource = new BehaviorSubject(null);\r\n public firstNameHeaderFilter = {\r\n allowSearch: true,\r\n dataSource: null,\r\n };\r\n private testsHeaderFilterDataSource = new BehaviorSubject(null);\r\n public testsHeaderFilter = {\r\n allowSearch: true,\r\n dataSource: null,\r\n };\r\n\r\n public ackHeaderFilter = [\r\n {\r\n text: 'Acknowledged',\r\n value: ['!', ['onlineAckUser', '=', null]],\r\n },\r\n {\r\n text: 'Not Acknowledged',\r\n value: ['onlineAckUser', '=', null],\r\n },\r\n ];\r\n public statusHeaderFilter = [\r\n {\r\n text: 'PENDING',\r\n value: [['status', '=', OrderStatus.Pending], 'or', ['status', '=', OrderStatus.Unreleased]],\r\n },\r\n {\r\n text: 'PARTIAL',\r\n value: [['status', '=', OrderStatus.Partial], 'or', ['status', '=', OrderStatus.PartiallyReleased], 'or', ['status', '=', OrderStatus.Preliminary]],\r\n },\r\n {\r\n text: 'CANCELED',\r\n value: ['status', '=', OrderStatus.Canceled],\r\n },\r\n {\r\n text: 'FINAL',\r\n value: ['status', '=', OrderStatus.Final],\r\n },\r\n ];\r\n public criticalResultHeaderFilter = [\r\n {\r\n text: 'TOXICOLOGY RESULTS ALERTS',\r\n value: ['criticalToxResults', '=', true],\r\n },\r\n {\r\n text: 'MICROBIOLOGY RESULTS ALERTS',\r\n value: ['criticalMicResults', '=', true],\r\n },\r\n {\r\n text: 'CLINICAL RESULTS ALERTS',\r\n value: ['criticalResults', '=', true],\r\n }\r\n ];\r\n public editHeaderFilter = [\r\n {\r\n text: 'MISSING INFORMATION',\r\n value: ['hasMissingInfo', '=', true],\r\n }\r\n ];\r\n\r\n\r\n @ViewChild(DxDataGridComponent, { static: true }) public dxDataGridComponent?: DxDataGridComponent;\r\n @ViewChild(DxDrawerComponent, { static: true }) public drawer?: DxDrawerComponent;\r\n @Input() public filtersSubmitted: EventEmitter = new EventEmitter();\r\n public isInterpretationEnabled: boolean = environment.aiAnalysis.enabled;\r\n public selectedItemsIds: number[] = [];\r\n public acknowledgeOrderSelected = false;\r\n public pendingOrderSelected = false;\r\n public missingInfoPopupVisible = false;\r\n public missingInfoData: OrderBillingInformation = {} as OrderBillingInformation;\r\n public isLoading = false;\r\n public closeDrawer: BehaviorSubject = new BehaviorSubject(undefined);\r\n // public labResultsStore: CustomStore;\r\n // @ts-ignore\r\n public dataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public filters: IAdvancedOrderSearchParams = {} as IAdvancedOrderSearchParams;\r\n public emailFaxVisible = false;\r\n public type: string = '';\r\n public isPhoneOrTablet: boolean = true;\r\n public isPhone: boolean = true;\r\n public webResultSettings: any;\r\n public user: any;\r\n public updateBillToVisible = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private service: OrdersService,\r\n private clientService: ClientService,\r\n private patientService: PatientService,\r\n private testService: TestService,\r\n private router: Router,\r\n private pwaDetectorService: PWADetectorService,\r\n public route: ActivatedRoute,\r\n private sanitizer: DomSanitizer,\r\n public fusionAuthService: FusionAuthService,\r\n private reportsService: ReportsService,\r\n private screen: ScreenService,\r\n public settingsService: SettingsService,\r\n private fusionAuthManagement: FusionAuthManagementService,\r\n ) {\r\n\r\n }\r\n\r\n public ngOnInit() {\r\n if (this.dxDataGridComponent?.instance !== undefined) {\r\n this.dxDataGridComponent.instance.beginCustomLoading('');\r\n }\r\n\r\n this.closeDrawer.subscribe(() => this.drawerOpened = false);\r\n\r\n this.responsiveValues();\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.responsiveValues();\r\n });\r\n\r\n this.settingsService.getWebResultSettings()\r\n .pipe(take(1))\r\n .subscribe(x => {\r\n this.webResultSettings = x;\r\n });\r\n\r\n this.settingsService.getResultSettings()\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n this.abnormalLabel = results.abnormalResult;\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n private waitByUser() {\r\n const parameterUser = (this.route.queryParams as any).value.user;\r\n\r\n if (parameterUser) {\r\n try {\r\n this.user = JSON.parse(AES.decrypt(parameterUser, environment.cryptoPassphrase).toString(enc.Utf8));\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n }\r\n\r\n if (!this.user) {\r\n this.user = this.fusionAuthService.Profile;\r\n }\r\n\r\n if (this.user) {\r\n this.initGridHeaderFilters();\r\n this.filtersSubmitted\r\n .pipe(\r\n takeUntil(this.onDestroy$),\r\n debounceTime(1000),\r\n )\r\n .subscribe(filters => {\r\n this.filters = filters;\r\n this.setFilters(this.filters, this.user);\r\n });\r\n } else {\r\n of()\r\n .pipe(\r\n debounceTime(1000),\r\n take(1),\r\n )\r\n .subscribe(() => this.waitByUser());\r\n }\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] ||\r\n this.screen.sizes['screen-small'] ||\r\n this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public get ButtonsDisabled() {\r\n return this.selectedItemsIds.length === 0;\r\n }\r\n\r\n public ack() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Acknowledging');\r\n let queryString = '';\r\n this.selectedItemsIds.map(x => {\r\n queryString += `ids=${x}&`;\r\n });\r\n this.service.acknowledgeOrder(queryString)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.selectedItemsIds = [];\r\n this.dxDataGridComponent?.instance.getDataSource().reload();\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n });\r\n }\r\n\r\n public setFilters(filters: IAdvancedOrderSearchParams, user: any) {\r\n const role = user.registrations[0].roles[0];\r\n switch (role) {\r\n case 'Client Admin':\r\n case 'Client Basic':\r\n const clientIds = user ? user.data.clients : this.fusionAuthService.Profile.data.clients;\r\n this.filters.loggedClientIds = clientIds;\r\n break;\r\n case 'Patient':\r\n const patientIds = user ? user.data.patients : this.fusionAuthService.Profile.data.patients;\r\n this.filters.loggedPatientIds = patientIds;\r\n break;\r\n case 'Physician':\r\n const physicianIds = user ? user.data.physicians : this.fusionAuthService.Profile.data.physicians;\r\n this.filters.loggedPhysicianIds = physicianIds;\r\n break;\r\n }\r\n this.dataSource.next(new DataSource({\r\n store:\r\n this.service.advancedSearchStore(filters),\r\n }));\r\n }\r\n\r\n public printLabResults() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderResults(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public printOrderLog() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderLog(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public printOrderDetails() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderDetails(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public openEmailFax(type: string) {\r\n this.type = type;\r\n this.emailFaxVisible = true;\r\n }\r\n\r\n public openUpdateBillTo() {\r\n this.updateBillToVisible = true;\r\n }\r\n\r\n public closeUpdateBillTo() {\r\n this.updateBillToVisible = false;\r\n this.setFilters(this.filters, this.user);\r\n }\r\n\r\n public get FABDisabled() {\r\n return this.isPhoneOrTablet && this.selectedItemsIds ? this.selectedItemsIds.length > 0 : false;\r\n }\r\n\r\n public showColumnChooser() {\r\n this.dxDataGridComponent?.instance.showColumnChooser();\r\n }\r\n\r\n public onContentReady(): void {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n }\r\n\r\n public itemsSelected(ids: number[]) {\r\n this.selectedItemsIds = ids;\r\n if (!this.dxDataGridComponent?.instance) {\r\n return;\r\n }\r\n const ackFilter = this.dxDataGridComponent.instance.getSelectedRowsData().filter((r: WebOrder) => r.onlineAckUser);\r\n if (Array.isArray(ackFilter)) {\r\n this.acknowledgeOrderSelected = ackFilter.length !== 0;\r\n }\r\n\r\n const pendingOrderFiler = this.dxDataGridComponent.instance.getSelectedRowsData()\r\n .filter((r: WebOrder) => r.status === OrderStatus.Pending || r.status === OrderStatus.Unreleased);\r\n if (Array.isArray(pendingOrderFiler)) {\r\n this.pendingOrderSelected = pendingOrderFiler.length !== 0;\r\n }\r\n\r\n this.signedOrderSelected =\r\n this.dxDataGridComponent.instance.getSelectedRowsData().filter(r => r.hasSignature).length !== 0;\r\n }\r\n\r\n public testResult(testId: number, order: any) {\r\n const test = order.orderResults.find((x: any) => x.testId === testId);\r\n if (test) {\r\n if (test.reportAs) {\r\n return test.flag === null || test.flag === '' ? test.reportAs : `${test.reportAs} (${test.flag})`;\r\n } else {\r\n return test.flag === null || test.flag === '' ? test.results : `${test.results} (${test.flag})`;\r\n }\r\n\r\n } else {\r\n return 'NOT ORDERED';\r\n }\r\n }\r\n\r\n public closeMissingInfo(canceled: boolean) {\r\n this.missingInfoPopupVisible = false;\r\n if (!canceled) {\r\n this.setFilters(this.filters, this.user);\r\n }\r\n }\r\n\r\n public signOrders() {\r\n this.signDialogVisible = true;\r\n }\r\n\r\n public signDialogClosed(signatureDialogResponse: SignatureRepresentation) {\r\n if (signatureDialogResponse) {\r\n const signature = new MultipleOrdersSignature();\r\n signature.image = signatureDialogResponse.image;\r\n signature.username = signatureDialogResponse.username;\r\n signature.ordersIds = this.selectedItemsIds;\r\n\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\r\n this.selectedItemsIds.length === 1 ? 'Signing order' : 'Signing orders',\r\n );\r\n\r\n const user = this.fusionAuthService.Profile;\r\n user.data = {\r\n signImage: signatureDialogResponse.image,\r\n clients: user.data !== undefined ? user.data.clients : [],\r\n patients: user.data !== undefined ? user.data.patients : [],\r\n physicians: user.data !== undefined ? user.data.physicians : [],\r\n };\r\n const request: RegistrationRequest = {\r\n user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [user.role],\r\n username: user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.fusionAuthManagement\r\n .updateUser(user.id, request)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === CREATED) {\r\n this.service.signOrders(signature)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.fusionAuthService.SignatureImage = signatureDialogResponse.image;\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n notify(this.selectedItemsIds.length === 1 ? 'Order Signed!' : 'Orders Signed!', 'success');\r\n this.dxDataGridComponent?.instance.refresh();\r\n });\r\n }\r\n });\r\n\r\n /*this.service.signOrders(signature)\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n notify(this.selectedItemsIds.length === 1 ? 'Order Signed!' : 'Orders Signed!', 'success');\r\n this.dxDataGridComponent?.instance.refresh();\r\n });*/\r\n }\r\n\r\n this.signDialogVisible = false;\r\n }\r\n\r\n public openMissingInfo({ data }: { data: any}) {\r\n this.isLoading = true;\r\n this.service.getOrderBillingInfo(data.id)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.missingInfoData = res;\r\n this.missingInfoData.orderCode = data.codeValue;\r\n this.missingInfoPopupVisible = true;\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n public openPreview(id: number) {\r\n this.drawerOpened = !this.drawerOpened;\r\n this.orderId = id;\r\n }\r\n\r\n public get UserRole() {\r\n const user = this.user ? this.user : this.fusionAuthService.Profile;\r\n return user.registrations[0].roles[0];\r\n }\r\n\r\n public get UserClients() {\r\n if (!this.UserRole) {\r\n return [];\r\n }\r\n if (!this.userRoleInArray(['Client Admin', 'Client Basic'])) {\r\n return [];\r\n }\r\n return this.user ? this.user.data.clients : this.fusionAuthService.Profile.data.clients;\r\n }\r\n\r\n public get UserPhysicians() {\r\n if (!this.UserRole) {\r\n return [];\r\n }\r\n if (!this.userRoleInArray(['Physician'])) {\r\n return [];\r\n }\r\n return this.user ? this.user.data.physicians : this.fusionAuthService.Profile.data.physicians;\r\n }\r\n\r\n public get UserPatients() {\r\n if (!this.UserRole) {\r\n return [];\r\n }\r\n if (!this.userRoleInArray(['Patient'])) {\r\n return [];\r\n }\r\n return this.user ? this.user.data.physicians : this.fusionAuthService.Profile.data.physicians;\r\n }\r\n\r\n public getStatus(order: WebOrder) {\r\n let color;\r\n let status: string = OrderStatus[OrderStatus.None];\r\n switch (order.status) {\r\n case OrderStatus.Canceled:\r\n color = 'ocl-status-black';\r\n status = OrderStatus[OrderStatus.Canceled];\r\n break;\r\n case OrderStatus.Final:\r\n color = 'ocl-status-green';\r\n status = OrderStatus[OrderStatus.Final];\r\n break;\r\n case OrderStatus.Partial:\r\n case OrderStatus.PartiallyReleased:\r\n case OrderStatus.Preliminary:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Partial];\r\n break;\r\n case OrderStatus.Pending:\r\n case OrderStatus.Unreleased:\r\n color = 'ocl-status-yellow';\r\n status = OrderStatus[OrderStatus.Pending];\r\n break;\r\n case OrderStatus.None:\r\n color = 'ocl-status-black';\r\n status = OrderStatus[OrderStatus.None];\r\n break;\r\n }\r\n\r\n let container = `\r\n
\r\n
\r\n ${status.toUpperCase()}
\r\n `;\r\n container += `
`;\r\n return this.sanitizer.bypassSecurityTrustHtml(container);\r\n }\r\n\r\n public getCriticalResultStatus(order: WebOrder) {\r\n let alert = `\r\n
\r\n `;\r\n\r\n if (order.hasAlert) {\r\n if (order.criticalToxResults) {\r\n alert += `
\r\n ${this.abnormalLabel.toUpperCase()}
`;\r\n }\r\n if (order.criticalMicResults || order.criticalResults) {\r\n alert += `
CRITICAL
`;\r\n }\r\n }\r\n alert += `
`;\r\n return this.sanitizer.bypassSecurityTrustHtml(alert);\r\n }\r\n\r\n public initGridHeaderFilters() {\r\n this.clientHeaderFilterDataSource\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(dataSource => {\r\n if (dataSource) {\r\n this.clientHeaderFilter.dataSource = dataSource;\r\n }\r\n });\r\n // @ts-ignore\r\n this.clientHeaderFilterDataSource.next({\r\n // @ts-ignore\r\n store: this.clientService.advancedSearchStore(this.clientHeaderFilterDataSource, this.UserRole, this.UserClients),\r\n });\r\n\r\n this.lastNameHeaderFilterDataSource\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(dataSource => {\r\n if (dataSource) {\r\n this.lastNameHeaderFilter.dataSource = dataSource;\r\n }\r\n });\r\n // @ts-ignore\r\n this.lastNameHeaderFilterDataSource.next({\r\n // @ts-ignore\r\n store: this.patientService.getPatientField(this.lastNameHeaderFilterDataSource, this.UserRole, 'lastname', this.UserClients, this.UserPatients, this.UserPhysicians),\r\n });\r\n\r\n this.firstNameHeaderFilterDataSource\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(dataSource => {\r\n if (dataSource) {\r\n this.firstNameHeaderFilter.dataSource = dataSource;\r\n }\r\n });\r\n // @ts-ignore\r\n this.firstNameHeaderFilterDataSource.next({\r\n // @ts-ignore\r\n store: this.patientService.getPatientField(this.firstNameHeaderFilterDataSource, this.UserRole, 'firstname', this.UserClients, this.UserPatients, this.UserPhysicians),\r\n });\r\n\r\n this.testsHeaderFilterDataSource\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(dataSource => {\r\n if (dataSource) {\r\n this.testsHeaderFilter.dataSource = dataSource;\r\n }\r\n });\r\n // @ts-ignore\r\n this.testsHeaderFilterDataSource.next({\r\n // @ts-ignore\r\n store: this.testService.advancedSearchStore(this.testsHeaderFilterDataSource, this.UserRole, this.UserClients),\r\n });\r\n }\r\n\r\n public userRoleInArray(arr: any[]) {\r\n if (!arr) {\r\n return false;\r\n }\r\n const role = this.UserRole;\r\n return arr.includes(role);\r\n }\r\n\r\n public formatDate(date: Date) {\r\n const tz = Moment.tz.guess();\r\n return Moment.utc(date).tz(tz).format('LLLL');\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { FusionAuthGuard } from '../../../shared/guard';\r\nimport { AdvancedSearchComponent, CumulativeResultsComponent, LabResultsComponent, OrderResultsComponent } from './pages';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: 'lab',\r\n component: LabResultsComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n },\r\n {\r\n path: 'advanced-search',\r\n component: AdvancedSearchComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n },\r\n {\r\n path: 'order',\r\n component: OrderResultsComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n },\r\n {\r\n path: 'cumulative',\r\n component: CumulativeResultsComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class ResultsRoutingModule { }\r\n","import { AfterViewInit, Component, EventEmitter, OnDestroy, Output, ViewChild } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { BehaviorSubject, of, Subject } from 'rxjs';\r\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { ClientService } from '../../../../shared/services';\r\nimport { SettingsService } from '../../../../shared/services/settings.service';\r\n\r\n@Component({\r\n selector: 'app-advanced-search',\r\n templateUrl: './advanced-search.component.html',\r\n styleUrls: ['./advanced-search.component.scss'],\r\n})\r\nexport class AdvancedSearchComponent implements AfterViewInit, OnDestroy {\r\n @Output() public formSubmitted = new EventEmitter();\r\n public resultsSearchForm: UntypedFormGroup;\r\n private sent = false;\r\n public role: string = '';\r\n public isLoading = false;\r\n public showMissingInfo = false;\r\n\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private fusionAuthService: FusionAuthService,\r\n private clientService: ClientService,\r\n private settingsService: SettingsService,\r\n ) {\r\n this.resultsSearchForm = this.fb.group({\r\n status: [null],\r\n missingInfo: [false],\r\n criticalResults: [false],\r\n });\r\n\r\n this.initialSubmit = this.initialSubmit.bind(this);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.settingsService\r\n .IsMissingInfoEnabled()\r\n .pipe(take(1))\r\n .subscribe(x => {\r\n this.showMissingInfo = x;\r\n });\r\n\r\n this.initialSubmit();\r\n }\r\n\r\n private initialSubmit() {\r\n if (localStorage.getItem('authtoken')) {\r\n this.role = this.fusionAuthService.Profile.registrations[0].roles[0];\r\n\r\n if (!this.sent) {\r\n this.submit();\r\n this.sent = true;\r\n }\r\n this.isLoading = false;\r\n } else {\r\n this.isLoading = true;\r\n of()\r\n .pipe(\r\n take(1),\r\n debounceTime(1000),\r\n )\r\n .subscribe(() => this.initialSubmit());\r\n }\r\n }\r\n\r\n public clear() {\r\n this.resultsSearchForm.reset();\r\n this.submit();\r\n }\r\n\r\n public searchResults(): void {\r\n if (this.resultsSearchForm.valid) {\r\n this.submit();\r\n }\r\n }\r\n\r\n private submit() {\r\n this.formSubmitted.emit(this.resultsSearchForm.value);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

Advanced Search - Laboratory Results

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n"],"x_google_ignoreList":[]}