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AtBqd,EAAsBpd,QAAtBod,EAAsB,qBAFrB,SAEDA,CAAb,MDAElI,KAAM,CAAE8I,MAAO,CAAC,YAAa,eAAgB,mBAOxC,IAAMI,GAAb,MAAM,MAAOA,kDAAwB,0BAAxBA,gCAHDC,cAAsBrB,IACtBqB,QAECD,CAAb,6CE8KME,SAAN,MAAMA,GAEaA,SAA0BC,UAAO,SAA2C/M,GAAK,OAAO,IAAKA,GAAK8M,EAA+B,EACjIA,EAA0BE,UAAiCze,MAAoB,CAAE0e,KAAMH,IACvFA,EAA0BI,UAAiC3e,MAAoB,CAAE4e,QAAS,CAAC,CAClGC,MACAC,KACAC,KACAC,MACDH,MACHE,QAVFR,8CC5HC,IAAMU,GAAb,MAAM,MAAOA,kDAAiB,0BAAjBA,iCALA,CACTliB,EACA8P,IACD+R,SA5BCM,KACAC,KACAC,KACAC,IACAC,IACAC,KACAC,KACAC,MACAC,KACAC,KACAC,KACArB,GACAsB,IACAC,IACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAX,MACApB,GACAgC,KACAC,oBAOSrB,CAAb","names":["OrderService","constructor","urlProvider","httpClient","store","fusionAuthService","router","this","searchStore","params","dataSource","ds","paramsKey","Array","isArray","ObjectUtils","length","clients","start","Moment","format","end","SECURED_STORE","loadParams","tokenRefresh","exchangeRefreshTokenForJWT","routerService","loadUrl","ApiUrl","getOrdersConfigurations","clientsIds","orderIds","testIds","showOnlyPending","httpRequestBuilder","HttpRequestBuilder","setUrl","getOptions","reportProgress","setMethod","setUrlParameter","setJsonBody","ordersIds","testsIds","build","pipe","retry","saveResults","results","i0","factory","OrderStatusSelectorComponent","ref","Subject","statuses","Object","values","OrderStatus","filter","i","map","toString","toUpperCase","selectionChange","bind","ngOnInit","control","setValue","selection","detectChanges","ngAfterViewInit","valueChanges","takeUntil","onDestroy$","subscribe","value","ngOnDestroy","next","complete","selectors","OrderPrioritySelectorComponent","priorities","OrderPriority","SearchPanelComponent","formBuilder","EventEmitter","BehaviorSubject","form","group","Validators","DateMoreThan","search","valid","submit","collapsed","clear","get","collapsibleChange","event","addedItems","convertToFormControl","absCtrl","formSubmitted","emit","c","id","p","upperFirst","camelCase","s","$destroy","isCollapsed","accordion","instance","collapseItem","expandItem","DxAccordionComponent","ctx","OrdersGridComponent","orderService","clientService","sanitizer","pwaDetectorService","changeDetector","reportsService","text","_OrdersGridComponent_selectedOrders","undefined","ngOnChanges","changes","handleFiltersChange","clean","currentValue","dxDataGridComponent","clearSelection","beginCustomLoading","getDataSource","reload","refresh","optionChanged","name","selectedOrderIds","__classPrivateFieldSet","selectionChanged","__classPrivateFieldGet","handleSelectionChange","getSelectedRowsData","filters","excludedOrders","DataSource","on","endCustomLoading","showColumnChooser","getStatus","order","color","status","container","bypassSecurityTrustHtml","excludeOrders","idsToExclude","push","printLabels","printDialogVisible","printOrderDetails","generateOrderDetails","o","take","blob","FileUtils","cleanExcluded","DxDataGridComponent","NormalTestRun","parentId","isTheOne","runNumber","result","resultEnteredDate","comments","flag","reportAs","cutoff","specialResult","symbol","PreviewNormalTestRun","orderId","testId","unitOfMeasure","referenceRange","clinicalRangeComment","resultType","super","ResultFlag","ResultFlagNumeric","ResultFlagNumericConverter","static","enumValue","Abnormal","High","HighCritical","InconsistentData","Low","LowCritical","Normal","None","Age","years","months","days","age","otherAge","Gender","NumericClinicalRange","maxAge","minAge","normalFrom","normalTo","criticalFrom","criticalTo","reportComment","effectiveDate","gender","PatientHelpers","birthDate","Date","now","dobYear","getFullYear","dobMonth","getMonth","dobDate","getDate","currentYear","currentMonth","currentDate","ResultMode","ResultType","SpecificCutSign","SpecificCutOffClinicalRange","internalComment","resultComparer","sign","cr","Number","MAX_SAFE_INTEGER","SpecificCutOffFlag","TiterClinicalRange","normalSign","normal","criticalSign","critical","OrderDictionary","toList","searchFor","OrdersDictionaryService","orderQueue","dic","orders","code","enqueueOrders","queueIds","arrayIds","toRemove","difference","toAdd","removeFormDictionary","includes","addToDictionary","added","removed","dequeueOrders","Orders","CommentsDialogComponent","close","popupVisible","hidden","closeEvent","TestType","MassResultEntryDialogComponent","fb","UntypedFormGroup","numeric","alpha","titer","titerRegex","open","validateItem","getAlphaResults","test","alphaClinicalRanges","IsNumeric","TestResultType","IsTiter","IsOpen","IsAlpha","res","validator","option","reset","markAsPristine","GridData","item","sort","resultScale","editing","orderCode","editable","testCode","testName","mode","clinicalRange","cutOff","ResultManagerComponent","orderDictionary","htmlSanitizer","ArrayStore","key","UntypedFormControl","performRequest","save","onCommentsDialogClose","onDialogClose","handleOrdersSelectionChanges","destroyPreviousSubscription","conf","callback","requestSubscription","changeCheckBoxValue","showPendingResults","tests","t","clientId","clientsConfigurations","testsConfigurations","orderResultsCalculationInformation","body","clientsTests","showOnlyWithAccess","addTests","addOrdersInformation","handleGridLoad","then","catch","e","console","log","alert","clearAll","newOrders","ordersInformation","queueResponse","removeOrders","handlerOrderQueueChanges","closed","unsubscribe","index","findIndex","removedOrders","splice","orderTests","removeTests","testsId","flatten","idsToAdd","testsToAdd","idsToUpdate","intersection","toUpdate","find","informationToAdd","cellFocused","rowType","window","navigator","maxTouchPoints","msMaxTouchPoints","cell","getCellElement","rowIndex","column","dataField","focus","numericControlEnterKey","cellData","alphaControlEnterKey","alphaControlKeyPressed","component","cellInfo","data","clinicalRanges","startsWith","onSaving","change","onRowValidation","isValid","gridDataOrderIds","_this","gridData","createQuery","toArray","d","changesOrderIds","removeFromGrid","addToGrid","updateToGrid","getGridKey","toRemoveIds","_this2","remove","toAddIds","_this3","info","orderTest","resultConfiguration","configureResult","clientCanAccessTest","validRun","refRange","insert","sanitizeComments","_this4","showOnlyWithClientAccess","clearFilter","confirm","_this5","commentsControl","decimalPlaces","withValidResults","modified","withValidResult","ot","testRun","_this6","notify","resultsSaved","preview","calculateFlag","generateOrderPreview","getNumericClinicalRange","orderInformation","ranges","numericClinicalRanges","a","b","getUTCDate","matchesByAge","patientAge","patientBirthDate","min","Math","r","max","clinicalRangeByGender","getAlphaClinicalRange","getOpenClinicalRange","openClinicalRanges","getTiterClinicalRange","titerClinicalRanges","limit","matchesForGenderAny","patientGender","getSpecificCutOffClinicalRange","specificCutOffClinicalRanges","getSpecificCutOffClinicalRangeByResult","isNaN","bestRange","bestDistance","MAX_VALUE","bestRangeElement","distance","abs","virtualCutoffWithoutMeasuringUnit","expression","signToString","resultMode","calculateNumericFlag","orderInfo","numericResultFlagFromResult","parseFloat","calculateTiterFlag","titerResultFlagFromResult","calculateSpecificCutOffFlag","calculateAlphaFlagAndReferenceRange","parseInt","split","NaN","normalComparisonFlag","criticalComparisonFlag","setEditedValue","valueChangedEventArg","openDialog","isDialogVisible","openCommentsDialog","isCommentsDialogVisible","isMassResultEnabled","selectedData","every","array","massResultTest","onSaved","ResultEntryComponent","settingsService","getResultSettings","abnormalLabel","abnormalResult","closeDrawer","drawerOpened","setFilters","openPreviewDrawer","ordersSelectionChanged","selectedOrders","saved","of","debounceTime","routes","path","canActivate","FusionAuthGuard","ResultEntryAccessGuard","labSettingService","route","state","Promise","resolve","getResultEntrySettings","config","resultEntryEnabled","registrations","Profile","resultEntrySuperUser","roles","resultEntryClientAdmin","resultEntryClientBasic","navigateByUrl","ResultEntryRoutingModule","RouterModule","DxValidationSummaryModule","ɵfac","ɵmod","type","ɵinj","imports","DxiItemModule","DxIntegrationModule","DxTemplateModule","BrowserTransferStateModule","ResultEntryModule","CommonModule","FormsModule","ReactiveFormsModule","DxAccordionModule","DxDataGridModule","DxPopupModule","DxScrollViewModule","FlexLayoutModule","DxTextAreaModule","DxFormModule","DxValidatorModule","DxButtonModule","DxToolbarModule","DxCheckBoxModule","DxSelectBoxModule","DxPopoverModule","DxNumberBoxModule","DxTextBoxModule","DxDrawerModule","SharedModule","ResultsModule"],"sourceRoot":"webpack:///","sources":["./src/app/modules/features/result-entry/services/order.service.ts","./src/app/modules/features/results/components/order-status-selector/order-status-selector.component.html","./src/app/modules/features/results/components/order-status-selector/order-status-selector.component.ts","./src/app/modules/features/results/components/order-priority-selector/order-priority-selector.component.html","./src/app/modules/features/results/components/order-priority-selector/order-priority-selector.component.ts","./src/app/modules/features/result-entry/components/search-panel/search-panel.component.html","./src/app/modules/features/result-entry/components/search-panel/search-panel.component.ts","./src/app/modules/features/result-entry/components/orders-grid/orders-grid.component.html","./src/app/modules/features/result-entry/components/orders-grid/orders-grid.component.ts","./src/app/modules/features/result-entry/models/test-run.ts","./src/app/modules/features/result-entry/enums/result-flag.ts","./src/app/modules/features/result-entry/models/clinical-ranges/age.ts","./src/app/modules/features/result-entry/enums/gender.ts","./src/app/modules/features/result-entry/models/clinical-ranges/numeric-clinical-range.ts","./src/app/modules/features/result-entry/helpers/patient-helpers.ts","./src/app/modules/features/result-entry/enums/result-mode.ts","./src/app/modules/features/result-entry/enums/result-type.ts","./src/app/modules/features/result-entry/enums/specific-cut-sign.ts","./src/app/modules/features/result-entry/models/clinical-ranges/specific-cut-off-clinical-range.ts","./src/app/modules/features/result-entry/enums/specific-cut-off-flag.ts","./src/app/modules/features/result-entry/models/clinical-ranges/titer-clinical-range.ts","./src/app/modules/features/result-entry/components/result-manager/orders-dictionary.service.ts","./src/app/modules/shared/components/comments-dialog/comments-dialog.component.html","./src/app/modules/shared/components/comments-dialog/comments-dialog.component.ts","./src/app/modules/features/result-entry/enums/test-type.ts","./src/app/modules/features/result-entry/components/mass-result-entry-dialog/mass-result-entry-dialog.component.html","./src/app/modules/features/result-entry/components/mass-result-entry-dialog/mass-result-entry-dialog.component.ts","./src/app/modules/features/result-entry/components/result-manager/result-manager.component.html","./src/app/modules/features/result-entry/components/result-manager/result-manager.component.ts","./src/app/modules/features/result-entry/pages/result-entry/result-entry.component.html","./src/app/modules/features/result-entry/pages/result-entry/result-entry.component.ts","./src/app/modules/features/result-entry/result-entry-routing.module.ts","./src/app/modules/features/result-entry/guards/result-entry-access.guard.ts","./node_modules/devextreme-angular/fesm2015/devextreme-angular-ui-validation-summary.js","./src/app/modules/features/result-entry/result-entry.module.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\r\nimport {DateHelperService, UrlProviderService} from \"../../../../shared/services/general\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\nimport {Store} from \"@ngrx/store\";\r\nimport {AppState} from \"../../../../stores/app.state\";\r\nimport {FusionAuthService} from \"../../../../shared/services/fusion-auth\";\r\nimport {Router} from \"@angular/router\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\nimport * as Moment from \"moment\";\r\nimport {HttpRequestBuilder, ObjectUtils, SECURED_STORE} from \"../../../../shared/utils\";\r\nimport {ResultEntrySearchFilter} from \"../models/SearchFilter\";\r\nimport DevExpress from \"devextreme\";\r\nimport DataSource = DevExpress.data.DataSource;\r\nimport {BehaviorSubject} from \"rxjs\";\r\nimport {xor} from 'lodash';\r\nimport {NormalTestRun} from \"../models/test-run\";\r\nimport {retry} from \"rxjs/operators\";\r\n\r\n@Injectable()\r\nexport class OrderService {\r\n constructor(\r\n private urlProvider: UrlProviderService,\r\n private httpClient: HttpClient,\r\n private store: Store,\r\n private fusionAuthService: FusionAuthService,\r\n private router: Router\r\n ) {\r\n }\r\n\r\n public searchStore(params: ResultEntrySearchFilter, dataSource: BehaviorSubject): CustomStore {\r\n const ds = dataSource as BehaviorSubject;\r\n for (const paramsKey in params) {\r\n if (Array.isArray(ObjectUtils.getKeyValue(params, paramsKey)) && (ObjectUtils.getKeyValue(params, paramsKey) as any[]).length === 0) {\r\n // @ts-ignore\r\n delete params[paramsKey];\r\n }\r\n }\r\n\r\n if (params.clients === undefined || params.clients === null) params.clients = [];\r\n\r\n /*if (this.fusionAuthService.Profile?.registrations[0]?.roles[0]?.includes(\"Client\")) {\r\n const clients = xor(params.clients, this.fusionAuthService.Profile.data.clients);\r\n params.clients.push(...clients);\r\n }*/\r\n\r\n if (params.start) {\r\n params.start = Moment(params.start).format('MM/DD/YYYY');\r\n }\r\n\r\n if (params.end) {\r\n params.end = Moment(params.end).format('MM/DD/YYYY');\r\n }\r\n\r\n return SECURED_STORE({\r\n dataSource: ds,\r\n loadParams: params,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n routerService: this.router,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/result-entry/orders-search`,\r\n });\r\n }\r\n\r\n public getOrdersConfigurations({\r\n clientsIds,\r\n orderIds,\r\n testIds,\r\n showOnlyPending\r\n }: { orderIds: number[], testIds: number[], clientsIds: number[], showOnlyPending: boolean }) {\r\n const httpRequestBuilder = new HttpRequestBuilder(this.httpClient)\r\n .setUrl(`${this.urlProvider.ApiUrl}/v2/result-entry/orders-configuration`);\r\n httpRequestBuilder.getOptions().reportProgress = true;\r\n httpRequestBuilder.setMethod('POST')\r\n httpRequestBuilder.setUrlParameter('showOnlyPending', showOnlyPending)\r\n httpRequestBuilder.setJsonBody({\r\n clientsIds,\r\n ordersIds: orderIds,\r\n testsIds: testIds\r\n })\r\n return httpRequestBuilder.build().pipe(retry(2));\r\n }\r\n\r\n public saveResults(results: NormalTestRun[]) {\r\n const httpRequestBuilder = new HttpRequestBuilder(this.httpClient)\r\n .setUrl(`${this.urlProvider.ApiUrl}/v2/result-entry/save-results`);\r\n httpRequestBuilder.getOptions().reportProgress = true;\r\n httpRequestBuilder.setMethod('POST');\r\n httpRequestBuilder.setJsonBody({\r\n results\r\n })\r\n return httpRequestBuilder.build();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n Status\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n
\r\n {{status.data}}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\r\nimport {AbstractControl, FormControl} from \"@angular/forms\";\r\nimport {isEmpty, xor} from 'lodash';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport {OrderStatus} from \"../../models/order\";\r\n\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: '[app-order-status-selector]',\r\n templateUrl: './order-status-selector.component.html',\r\n styleUrls: ['./order-status-selector.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class OrderStatusSelectorComponent implements OnInit {\r\n @Input() public control?: AbstractControl | null;\r\n public statuses: string[];\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private ref: ChangeDetectorRef) {\r\n this.statuses = Object.values(OrderStatus)\r\n .filter((i: string | number) => typeof i === 'string' && i !== 'None' && i !== 'Preliminary' && i !== 'Canceled')\r\n .map(i => i == OrderStatus[OrderStatus.PartiallyReleased] ? 'Partially Released' : i)\r\n .map(i => i.toString().toUpperCase());\r\n this.selectionChange = this.selectionChange.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.control?.setValue([OrderStatus[OrderStatus.Pending].toUpperCase()]);\r\n }\r\n\r\n public selectionChange(selection: string[]) {\r\n this.control?.setValue(selection);\r\n this.ref.detectChanges();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.control?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(value => this.ref.detectChanges())\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 Priority\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n
\r\n {{priority.data}}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n} from '@angular/core';\r\nimport {AbstractControl} from \"@angular/forms\";\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport {OrderPriority} from \"../../models/order\";\r\n\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: '[app-order-priority-selector]',\r\n templateUrl: './order-priority-selector.component.html',\r\n styleUrls: ['./order-priority-selector.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class OrderPrioritySelectorComponent implements OnInit, AfterViewInit, OnDestroy {\r\n @Input() public control?: AbstractControl | null;\r\n public priorities: string[];\r\n private onDestroy$: Subject = new Subject();\r\n \r\n constructor(private ref: ChangeDetectorRef) {\r\n this.selectionChange = this.selectionChange.bind(this);\r\n this.priorities = Object.values(OrderPriority)\r\n .filter((i: string | number) => typeof i === 'string' && i !== 'None')\r\n .map(i => i.toString().toUpperCase());\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.control?.setValue([]);\r\n }\r\n\r\n public selectionChange(selection: string[]) {\r\n this.control?.setValue(selection);\r\n this.ref.detectChanges();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.control?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(value => this.ref.detectChanges())\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

{{title}}

\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 {\r\n AfterViewInit,\r\n ChangeDetectionStrategy, ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n OnDestroy,\r\n Output,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {BehaviorSubject, Subject} from \"rxjs\";\r\nimport {takeUntil} from \"rxjs/operators\";\r\nimport * as Moment from 'moment';\r\nimport {DxAccordionComponent} from \"devextreme-angular\";\r\nimport {AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from \"@angular/forms\";\r\nimport {DateMoreThan} from \"../../../../../shared/custom-validations/date-validations\";\r\nimport {OrderPriority, OrderStatus} from '../../../results/models/order';\r\nimport {SelectionChangedEvent} from \"devextreme/ui/accordion\";\r\nimport {ResultEntrySearchFilter} from \"../../models/SearchFilter\";\r\nimport {camelCase, upperFirst} from \"lodash\";\r\nimport {Client} from \"../../../../shared/models/order-entry/client\";\r\n\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: '[app-search-panel]',\r\n templateUrl: './search-panel.component.html',\r\n styleUrls: ['./search-panel.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SearchPanelComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild(DxAccordionComponent, {static: false}) public accordion?: DxAccordionComponent;\r\n @Output() public formSubmitted = new EventEmitter();\r\n\r\n public statusEnum: OrderStatus = OrderStatus.All;\r\n public title: string = \"Standard Result Entry\";\r\n public collapsed: BehaviorSubject = new BehaviorSubject(false);\r\n public form: UntypedFormGroup;\r\n public $destroy: Subject = new Subject();\r\n\r\n constructor(private formBuilder: UntypedFormBuilder, private ref: ChangeDetectorRef) {\r\n this.form = this.formBuilder.group({\r\n start: [Moment().format('MM/DD/YYYY'), [Validators.required]],\r\n end: [Moment().format('MM/DD/YYYY'), [Validators.required, DateMoreThan('start')]],\r\n clients: [[]],\r\n statuses: [[], [Validators.required]],\r\n priorities: [[OrderStatus[OrderStatus.Pending].toUpperCase()]]\r\n });\r\n }\r\n\r\n public search() {\r\n if (this.form?.valid) {\r\n this.submit();\r\n this.collapsed.next(true);\r\n }\r\n }\r\n\r\n public clear() {\r\n this.form?.get('start')?.setValue(null);\r\n this.form?.get('end')?.setValue(null);\r\n this.form?.get('clients')?.setValue([]);\r\n this.form?.get('statuses')?.setValue([OrderStatus[OrderStatus.Pending].toUpperCase()]);\r\n this.form?.get('priorities')?.setValue([OrderStatus[OrderStatus.Pending].toUpperCase()]);\r\n this.submit();\r\n }\r\n\r\n public collapsibleChange(event: SelectionChangedEvent) {\r\n if (event.addedItems.length > 0) {\r\n this.collapsed.next(false);\r\n } else {\r\n this.collapsed.next(true);\r\n }\r\n }\r\n\r\n public convertToFormControl(absCtrl?: AbstractControl | null): UntypedFormControl {\r\n return absCtrl as UntypedFormControl;\r\n }\r\n\r\n private submit() {\r\n if (!this.form?.get('start')?.value) {\r\n this.form?.get('start')?.setValue(Moment().format('MM/DD/YYYY'));\r\n }\r\n\r\n if (!this.form?.get('end')?.value) {\r\n this.form?.get('end')?.setValue(Moment().format('MM/DD/YYYY'));\r\n }\r\n\r\n this.formSubmitted.emit({\r\n ...this.form.value,\r\n clients: this.form.value.clients.map((c: number | Client) => typeof c === 'number' ? c : c.id),\r\n priorities: this.form.value.priorities.map((p: string) => OrderPriority[upperFirst(camelCase(p)) as keyof typeof OrderPriority]),\r\n statuses: this.form.value.statuses.map((s: string) => OrderStatus[upperFirst(camelCase(s)) as keyof typeof OrderStatus]),\r\n });\r\n this.ref.detectChanges();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.collapsed\r\n .pipe(takeUntil(this.$destroy))\r\n .subscribe(isCollapsed => {\r\n if (!this.accordion) return;\r\n if (isCollapsed) {\r\n this.accordion.instance.collapseItem(0);\r\n } else {\r\n this.accordion.instance.expandItem(0);\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.$destroy.next();\r\n this.$destroy.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","import {\r\n AfterViewChecked,\r\n AfterViewInit,\r\n ChangeDetectionStrategy, ChangeDetectorRef,\r\n Component, EventEmitter,\r\n Input,\r\n OnChanges, Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {ResultEntrySearchFilter} from \"../../models/SearchFilter\";\r\nimport {BehaviorSubject, Subject} from \"rxjs\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport {OrderService} from \"../../services/order.service\";\r\nimport {DxDataGridComponent} from \"devextreme-angular\";\r\nimport {OrderStatus} from \"../../../results/models/order\";\r\nimport {Order} from \"../../models/order\";\r\nimport {DomSanitizer} from \"@angular/platform-browser\";\r\nimport {FusionAuthService} from \"../../../../../shared/services/fusion-auth\";\r\nimport {ClientService} from \"../../../../shared/services\";\r\nimport {OptionChangedEvent, SelectionChangedEvent} from \"devextreme/ui/data_grid\";\r\nimport {take, takeUntil} from \"rxjs/operators\";\r\nimport {FileUtils} from \"../../../../../shared/utils\";\r\nimport {ReportsService} from \"../../../../shared/services/reports.service\";\r\nimport {PWADetectorService} from \"../../../../../shared/services/general\";\r\n\r\n@Component({\r\n selector: 'app-orders-grid',\r\n templateUrl: './orders-grid.component.html',\r\n styleUrls: ['./orders-grid.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class OrdersGridComponent implements OnChanges {\r\n @Input() public filters?: ResultEntrySearchFilter;\r\n @Input() public clean?: boolean;\r\n @Output() public selectionChanged: EventEmitter = new EventEmitter();\r\n @Output() public previewClicked: EventEmitter = new EventEmitter();\r\n @ViewChild(DxDataGridComponent, {static: true}) public dxDataGridComponent?: DxDataGridComponent;\r\n public printDialogVisible = false;\r\n public excludedOrders: number[] = [];\r\n public statusHeaderFilter = [\r\n {\r\n text: 'PENDING',\r\n value: ['status', '=', OrderStatus.Pending],\r\n },\r\n {\r\n text: 'UNRELEASED',\r\n value: ['status', '=', OrderStatus.Unreleased],\r\n },\r\n {\r\n text: 'PARTIAL',\r\n value: ['status', '=', OrderStatus.Partial],\r\n },\r\n {\r\n text: 'PARTIALLY RELEASED',\r\n value: ['status', '=', OrderStatus.PartiallyReleased],\r\n },\r\n {\r\n text: 'FINAL',\r\n value: ['status', '=', OrderStatus.Final],\r\n },\r\n ];\r\n public selectedOrderIds: number[] = [];\r\n #selectedOrders: Order[] = [];\r\n public dataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public onDestroy$: BehaviorSubject = new BehaviorSubject(undefined);\r\n\r\n constructor(\r\n private orderService: OrderService,\r\n private clientService: ClientService,\r\n private fusionAuthService: FusionAuthService,\r\n private sanitizer: DomSanitizer,\r\n private pwaDetectorService: PWADetectorService,\r\n public changeDetector: ChangeDetectorRef,\r\n private reportsService: ReportsService\r\n ) {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.handleFiltersChange(changes);\r\n if (changes.clean && changes.clean.currentValue) {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Loading...\");\r\n this.dxDataGridComponent?.instance.getDataSource().reload();\r\n this.dxDataGridComponent?.instance.refresh();\r\n }\r\n }\r\n\r\n public optionChanged(event: OptionChangedEvent) {\r\n if (event.name === \"paging\") {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.selectedOrderIds = [];\r\n this.#selectedOrders = [];\r\n this.selectionChanged.emit(this.#selectedOrders);\r\n }\r\n }\r\n\r\n public handleSelectionChange() {\r\n this.#selectedOrders = this.dxDataGridComponent?.instance.getSelectedRowsData() as Order[];\r\n this.selectionChanged.emit(this.#selectedOrders);\r\n }\r\n\r\n private handleFiltersChange(changes: SimpleChanges) {\r\n if (changes.filters && changes.filters.currentValue) {\r\n this.excludedOrders = [];\r\n this.dataSource.next(new DataSource({\r\n store: this.orderService.searchStore(changes.filters.currentValue, this.dataSource)\r\n }));\r\n\r\n this.selectedOrderIds = [];\r\n this.selectionChanged.next([]);\r\n\r\n if (this.dxDataGridComponent?.instance) {\r\n this.dxDataGridComponent.instance.beginCustomLoading(\"Loading...\");\r\n this.dataSource.value?.on(\"changed\", () => this.dxDataGridComponent?.instance.endCustomLoading());\r\n }\r\n }\r\n }\r\n\r\n public get DataSource() {\r\n return this.dataSource.value ? this.dataSource.value : [];\r\n }\r\n\r\n public showColumnChooser() {\r\n this.dxDataGridComponent?.instance.showColumnChooser();\r\n }\r\n\r\n public getStatus(order: Order) {\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 color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Partial];\r\n break;\r\n case OrderStatus.PartiallyReleased:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.PartiallyReleased];\r\n break;\r\n case OrderStatus.Preliminary:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Preliminary];\r\n break;\r\n case OrderStatus.Pending:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Pending];\r\n break;\r\n case OrderStatus.Unreleased:\r\n color = 'ocl-status-yellow';\r\n status = OrderStatus[OrderStatus.Unreleased];\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 excludeOrders() {\r\n const idsToExclude = this.selectedOrderIds;\r\n if (this.excludedOrders.length > 0)\r\n idsToExclude.push(...this.excludedOrders);\r\n\r\n this.#selectedOrders = [];\r\n this.selectedOrderIds = [];\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Loading...\");\r\n const filters: any[] = [];\r\n for (let i = 0; i < idsToExclude.length; i++) {\r\n filters.push([\"!\", [\"id\", \"=\", idsToExclude[i]]])\r\n if (i < idsToExclude.length -1 ) {\r\n filters.push(\"and\")\r\n }\r\n this.excludedOrders.push(idsToExclude[i]);\r\n }\r\n this.dxDataGridComponent?.instance.getDataSource().filter(filters);\r\n this.dxDataGridComponent?.instance.getDataSource().reload();\r\n }\r\n\r\n public printLabels() {\r\n this.printDialogVisible = true;\r\n }\r\n\r\n public printOrderDetails() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderDetails(this.#selectedOrders.map(o => o.id))\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public cleanExcluded() {\r\n this.excludedOrders = [];\r\n this.selectedOrderIds = [];\r\n this.excludeOrders();\r\n }\r\n}\r\n","import {ResultType} from \"../enums/result-type\";\r\n\r\nexport class NormalTestRun {\r\n id?: number;\r\n parentId: number;\r\n isTheOne: boolean;\r\n runNumber: number;\r\n result: string;\r\n specialResult?: string;\r\n symbol?: string;\r\n resultEnteredDate: Date;\r\n comments: string;\r\n flag: string;\r\n reportAs: string;\r\n cutoff: string;\r\n\r\n constructor(parentId: number, isTheOne: boolean, runNumber: number, result: string, resultEnteredDate: Date, comments: string, flag: string, reportAs: string, cutoff: string, id?: number, specialResult?: string, symbol?: string) {\r\n this.id = id;\r\n this.parentId = parentId;\r\n this.isTheOne = isTheOne;\r\n this.runNumber = runNumber;\r\n this.result = result;\r\n this.specialResult = specialResult;\r\n this.symbol = symbol;\r\n this.resultEnteredDate = resultEnteredDate;\r\n this.comments = comments;\r\n this.flag = flag;\r\n this.reportAs = reportAs;\r\n this.cutoff = cutoff;\r\n }\r\n}\r\n\r\n\r\nexport class PreviewNormalTestRun extends NormalTestRun {\r\n orderId: number;\r\n testId: number;\r\n unitOfMeasure: string;\r\n referenceRange: string;\r\n clinicalRangeComment: string;\r\n resultType: ResultType;\r\n\r\n constructor(orderId: number, testId: number, unitOfMeasure: string, referenceRange: string, clinicalRangeComment: string, resultType: ResultType, parentId: number, isTheOne: boolean, runNumber: number, result: string, resultEnteredDate: Date, comments: string, flag: string, reportAs: string, cutoff: string, id?: number, specialResult?: string, symbol?: string) {\r\n super(parentId, isTheOne, runNumber, result, resultEnteredDate, comments, flag, reportAs, cutoff, id, specialResult, symbol);\r\n this.orderId = orderId;\r\n this.testId = testId;\r\n this.unitOfMeasure = unitOfMeasure;\r\n this.referenceRange = referenceRange;\r\n this.clinicalRangeComment = clinicalRangeComment;\r\n this.resultType = resultType;\r\n }\r\n}\r\n","export enum ResultFlag {\r\n Normal = 1,\r\n Abnormal = 2,\r\n Acceptable = 4,\r\n Negative = 8,\r\n Positive = 16, // 0x00000010\r\n Critical = 32, // 0x00000020\r\n Alert = 64, // 0x00000040\r\n In = 128, // 0x00000080\r\n Out = 256, // 0x00000100\r\n None = 512, // 0x00000200\r\n Unacceptable = 1024, // 0x00000400\r\n}\r\n\r\nexport enum ResultFlagNumeric\r\n{\r\n LowCritical = 1,\r\n Low = 2,\r\n Normal = 4,\r\n High = 8,\r\n HighCritical = 16, // 0x00000010\r\n InconsistentData = 32, // 0x00000020\r\n Abnormal = 128, // 0x00000080\r\n None = 256, // 0x00000100\r\n}\r\n\r\nexport class ResultFlagNumericConverter {\r\n public static convert(enumValue: ResultFlagNumeric) {\r\n switch (enumValue) {\r\n case ResultFlagNumeric.Abnormal: return \"ABNORMAL\";\r\n case ResultFlagNumeric.High: return \"HIGH\";\r\n case ResultFlagNumeric.HighCritical: return \"HIGH CRITICAL\";\r\n case ResultFlagNumeric.InconsistentData: return \"INCONSISTENT\";\r\n case ResultFlagNumeric.Low: return \"LOW\";\r\n case ResultFlagNumeric.LowCritical: return \"LOW CRITICAL\";\r\n case ResultFlagNumeric.Normal: return \"NORMAL\";\r\n case ResultFlagNumeric.None: return \"NONE\";\r\n }\r\n }\r\n}\r\n","export class Age {\r\n years: number;\r\n months: number;\r\n days: number;\r\n\r\n constructor(years: number, months: number, days: number) {\r\n this.years = years;\r\n this.months = months;\r\n this.days = days;\r\n }\r\n\r\n public static isZero(age: Age): boolean {\r\n return age.years == 0 && age.months == 0 && age.days == 0;\r\n }\r\n\r\n public static compareTo(age: Age, otherAge: Age) {\r\n if (age.years === otherAge.years && age.months === otherAge.months && age.days === otherAge.days) return 0;\r\n return -1;\r\n }\r\n\r\n public static lessOrEqualsThan(age: Age, otherAge: Age) {\r\n if (age.years < otherAge.years) return true;\r\n if (age.years > otherAge.years) return false;\r\n if (age.months < otherAge.months) return true;\r\n return age.months <= otherAge.months && age.days <= otherAge.days;\r\n }\r\n\r\n public static greaterOrEqualsTo(age: Age, otherAge: Age) {\r\n if (age.years > otherAge.years) return true;\r\n if (age.years < otherAge.years) return false;\r\n if (age.months > otherAge.months) return true;\r\n return age.months >= otherAge.months && age.days >= otherAge.days;\r\n }\r\n}\r\n","export enum Gender {\r\n Male = 1,\r\n Female = 2,\r\n Any = Female | Male, // 0x00000003\r\n Unknown = 4\r\n}\r\n","import {Age} from \"./age\";\r\nimport {Gender} from \"../../enums/gender\";\r\nimport {ResultType} from \"../../enums/result-type\";\r\n\r\nexport class NumericClinicalRange {\r\n maxAge: Age;\r\n minAge: Age;\r\n normalFrom: number;\r\n normalTo: number;\r\n criticalFrom: number;\r\n criticalTo: number;\r\n unitOfMeasure: string;\r\n reportComment: string;\r\n effectiveDate: Date;\r\n gender: Gender;\r\n resultType: ResultType;\r\n\r\n constructor({\r\n maxAge,\r\n minAge,\r\n normalFrom,\r\n normalTo,\r\n criticalFrom,\r\n criticalTo,\r\n unitOfMeasure,\r\n reportComment,\r\n effectiveDate,\r\n gender,\r\n resultType\r\n }: NumericClinicalRange) {\r\n this.maxAge = maxAge;\r\n this.minAge = minAge;\r\n this.normalFrom = normalFrom;\r\n this.normalTo = normalTo;\r\n this.criticalFrom = criticalFrom;\r\n this.criticalTo = criticalTo;\r\n this.unitOfMeasure = unitOfMeasure;\r\n this.reportComment = reportComment;\r\n this.effectiveDate = effectiveDate;\r\n this.gender = gender;\r\n this.resultType = resultType;\r\n }\r\n\r\n}\r\n","import {Age} from \"../models/clinical-ranges/age\";\r\n\r\nexport class PatientHelpers {\r\n public static calculateAge(birthDate: Date | string | number): Age {\r\n const age = new Age(0,0,0);\r\n\r\n if (!birthDate) return age;\r\n\r\n if (typeof birthDate === 'string' || typeof birthDate === 'number') {\r\n birthDate = new Date(birthDate);\r\n }\r\n\r\n const now = new Date();\r\n const dobYear = birthDate.getFullYear();\r\n const dobMonth = birthDate.getMonth();\r\n const dobDate = birthDate.getDate();\r\n\r\n const currentYear = now.getFullYear();\r\n const currentMonth = now.getMonth();\r\n const currentDate = now.getDate();\r\n\r\n age.years = currentYear - dobYear;\r\n\r\n if (currentMonth >= dobMonth)\r\n age.months = currentMonth - dobMonth;\r\n else {\r\n age.years--;\r\n age.months = 12 + currentMonth - dobMonth;\r\n }\r\n\r\n if (currentDate >= dobDate)\r\n age.days = currentDate - dobDate;\r\n else {\r\n age.months--;\r\n age.days = 31 + currentDate - dobDate;\r\n\r\n if (age.months < 0) {\r\n age.months = 11;\r\n age.years--;\r\n }\r\n }\r\n\r\n return age;\r\n }\r\n}\r\n\r\n","export enum ResultMode {\r\n Alpha = 1,\r\n Numeric = 2,\r\n Open= 3,\r\n Titer = 4,\r\n CutOff = 5,\r\n None = 6\r\n}\r\n","export enum ResultType {\r\n ValueValue = 1,\r\n GreaterEqualValue = 2,\r\n LessEqualValue = 4,\r\n GreaterThanValue = 8,\r\n LessThanValue = 16, // 0x00000010\r\n AlphaResults = 32, // 0x00000020\r\n Microbiology = 64, // 0x00000040\r\n AlphaMicrobiology = 128, // 0x00000080\r\n OpenResultWithoutUnit = 256, // 0x00000100\r\n OpenResultWithUnit = 512, // 0x00000200\r\n SpecificCutOff = 1024, // 0x00000400\r\n Titer = 2048, // 0x00000800\r\n None = 4096, // 0x00001000\r\n}\r\n","export enum SpecificCutSign {\r\n LessThan,\r\n GreaterThan,\r\n LessThanOrEqual,\r\n GreaterThanOrEqual,\r\n Equal\r\n}\r\n","import {SpecificCutResultType} from \"../../enums/specific-cut-result-type\";\r\nimport {SpecificCutOffFlag} from \"../../enums/specific-cut-off-flag\";\r\nimport {SpecificCutSign} from \"../../enums/specific-cut-sign\";\r\n\r\nexport class SpecificCutOffClinicalRange {\r\n result: SpecificCutResultType;\r\n flag: SpecificCutOffFlag;\r\n reportAs: string;\r\n cutoff: string;\r\n internalComment: string;\r\n resultComparer: number;\r\n reportComment: string;\r\n unitOfMeasure: string;\r\n sign: SpecificCutSign;\r\n\r\n\r\n constructor(result: SpecificCutResultType, flag: SpecificCutOffFlag, reportAs: string, cutoff: string, internalComment: string, resultComparer: number, unitOfMeasure: string, sign: SpecificCutSign, reportComment: string) {\r\n this.result = result;\r\n this.flag = flag;\r\n this.reportAs = reportAs;\r\n this.cutoff = cutoff;\r\n this.internalComment = internalComment;\r\n this.reportComment = reportComment;\r\n this.resultComparer = resultComparer;\r\n this.unitOfMeasure = unitOfMeasure;\r\n this.sign = sign;\r\n }\r\n\r\n public static matches(cr: SpecificCutOffClinicalRange, result: number) {\r\n switch (cr.sign)\r\n {\r\n case SpecificCutSign.LessThan:\r\n return result < cr.resultComparer;\r\n case SpecificCutSign.GreaterThan:\r\n return result > cr.resultComparer;\r\n case SpecificCutSign.LessThanOrEqual:\r\n return result <= cr.resultComparer;\r\n case SpecificCutSign.GreaterThanOrEqual:\r\n return result >= cr.resultComparer;\r\n case SpecificCutSign.Equal:\r\n return result == cr.resultComparer;\r\n default:\r\n return undefined;\r\n }\r\n }\r\n\r\n public static getSignRank(cr: SpecificCutOffClinicalRange)\r\n {\r\n switch (cr.sign)\r\n {\r\n case SpecificCutSign.Equal:\r\n return 0;\r\n case SpecificCutSign.LessThanOrEqual:\r\n return 1;\r\n case SpecificCutSign.GreaterThanOrEqual:\r\n return 2;\r\n case SpecificCutSign.LessThan:\r\n return 3;\r\n case SpecificCutSign.GreaterThan:\r\n return 4;\r\n default:\r\n return Number.MAX_SAFE_INTEGER;\r\n }\r\n }\r\n}\r\n","export enum SpecificCutOffFlag {\r\n Normal = 1,\r\n Abnormal = 2,\r\n Indeterminate = 4,\r\n None = 8,\r\n}\r\n","import {Gender} from \"../../enums/gender\";\r\nimport {Age} from \"./age\";\r\n\r\nexport class TiterClinicalRange {\r\n normalSign: string;\r\n normal: string;\r\n criticalSign: string;\r\n critical: string;\r\n gender: Gender;\r\n effectiveDate: Date;\r\n minAge: Age;\r\n maxAge: Age;\r\n unitOfMeasure: string;\r\n reportComment: string;\r\n\r\n constructor({\r\n normalSign,\r\n normal,\r\n criticalSign,\r\n critical,\r\n gender,\r\n effectiveDate,\r\n minAge,\r\n maxAge,\r\n unitOfMeasure,\r\n reportComment\r\n }: TiterClinicalRange) {\r\n this.normalSign = normalSign;\r\n this.normal = normal;\r\n this.criticalSign = criticalSign;\r\n this.critical = critical;\r\n this.gender = gender;\r\n this.effectiveDate = effectiveDate;\r\n this.minAge = minAge;\r\n this.maxAge = maxAge;\r\n this.unitOfMeasure = unitOfMeasure;\r\n this.reportComment = reportComment;\r\n }\r\n}\r\n","import {Injectable, OnDestroy} from '@angular/core';\r\nimport {Dictionary} from \"../../../../../shared/utils\";\r\nimport {Order} from \"../../models/order\";\r\nimport {difference} from \"lodash\";\r\n\r\nclass OrderDictionary {\r\n searchFor: Dictionary = {}\r\n\r\n toList(): Order[] {\r\n return Object.values(this.searchFor);\r\n }\r\n\r\n clean(): void {\r\n this.searchFor = {};\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class OrdersDictionaryService {\r\n private orderQueue: OrderDictionary;\r\n\r\n constructor() {\r\n this.orderQueue = new OrderDictionary();\r\n }\r\n\r\n private static addToDictionary(dic: OrderDictionary, orders: Order[]) {\r\n for (const order of orders) {\r\n dic.searchFor[order.code] = order;\r\n }\r\n }\r\n\r\n private static removeFormDictionary(dic: OrderDictionary, orders: Order[]) {\r\n for (const order of orders) {\r\n delete dic.searchFor[order.code];\r\n }\r\n }\r\n\r\n public enqueueOrders(orders: Order[]): { added: number[], removed: number[]} {\r\n const queueIds = this.orderQueue.toList().map(o => o.id);\r\n const arrayIds = orders.map(o => o.id);\r\n const toRemove = difference(queueIds, arrayIds);\r\n const toAdd = difference(arrayIds, queueIds);\r\n\r\n OrdersDictionaryService.removeFormDictionary(this.orderQueue, orders.filter(o => toRemove.includes(o.id)));\r\n OrdersDictionaryService.addToDictionary(this.orderQueue, orders.filter(o => toAdd.includes(o.id)));\r\n\r\n return { added: toAdd, removed: toRemove };\r\n }\r\n\r\n public dequeueOrders(orders: Order[]) {\r\n this.orderQueue.clean();\r\n }\r\n\r\n public get Orders(): Order[] {\r\n return this.orderQueue.toList();\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n","import {ChangeDetectionStrategy, Component, EventEmitter, Input, Output} from '@angular/core';\r\nimport {AbstractControl} from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: 'app-comments-dialog',\r\n templateUrl: './comments-dialog.component.html',\r\n styleUrls: ['./comments-dialog.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CommentsDialogComponent {\r\n @Input() public popupVisible: boolean = false;\r\n @Input() public control: AbstractControl | null = null;\r\n @Output() public closeEvent = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n public close() {\r\n this.popupVisible = false;\r\n }\r\n\r\n public hidden(){\r\n this.closeEvent.emit();\r\n }\r\n}\r\n","export enum TestType {\r\n Normal = 1,\r\n Ratio = 2,\r\n BillOnly = 4,\r\n Panel = 8,\r\n SuperPanel = 16, // 0x00000010\r\n Microbiology = 32, // 0x00000020\r\n Toxicology = 64, // 0x00000040\r\n ToxicologyRatio = 128, // 0x00000080\r\n Pathology = 256, // 0x00000100\r\n None = 512, // 0x00000200\r\n All = Pathology | ToxicologyRatio | Toxicology | Microbiology | SuperPanel | Panel | BillOnly | Ratio | Normal, // 0x000001FF\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
Numeric
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Titer
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Alpha
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Open
\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 {ChangeDetectionStrategy, Component, EventEmitter, Input, Output} from '@angular/core';\r\nimport {TestType} from '../../enums/test-type';\r\nimport {NormalTest} from \"../../models/test\";\r\nimport {ResultType} from \"../../enums/result-type\";\r\nimport {ValidationCallbackData} from \"devextreme/ui/validation_rules\";\r\nimport {UntypedFormBuilder, UntypedFormGroup, Validators} from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: 'app-mass-result-entry-dialog',\r\n templateUrl: './mass-result-entry-dialog.component.html',\r\n styleUrls: ['./mass-result-entry-dialog.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class MassResultEntryDialogComponent {\r\n @Input() public popupVisible: boolean = false;\r\n @Input() public test?: NormalTest;\r\n @Output() public closeEvent = new EventEmitter();\r\n public titerRegex = /^\\d{1,3}(:\\d+)$/\r\n public form: UntypedFormGroup = new UntypedFormGroup({\r\n numeric: this.fb.control(''),\r\n alpha: this.fb.control(''),\r\n titer: this.fb.control('', [Validators.pattern(this.titerRegex)]),\r\n open: this.fb.control('')\r\n });\r\n\r\n constructor(private fb: UntypedFormBuilder) {\r\n this.validateItem = this.validateItem.bind(this);\r\n }\r\n\r\n public close(): void {\r\n this.clean();\r\n this.closeEvent.emit();\r\n }\r\n\r\n public getAlphaResults(): string[] {\r\n if (!this.test) return [];\r\n if (!this.test.alphaClinicalRanges) return [];\r\n return this.test.alphaClinicalRanges?.map(cr => cr.result);\r\n }\r\n\r\n public get IsNumeric() {\r\n return this.TestResultType === ResultType.ValueValue || this.TestResultType === ResultType.GreaterEqualValue ||\r\n this.TestResultType === ResultType.LessEqualValue || this.TestResultType === ResultType.GreaterThanValue ||\r\n this.TestResultType === ResultType.LessThanValue || this.TestResultType === ResultType.SpecificCutOff;\r\n }\r\n\r\n public get IsTiter() {\r\n return this.TestResultType === ResultType.Titer;\r\n }\r\n\r\n public get IsOpen() {\r\n return this.TestResultType === ResultType.OpenResultWithoutUnit || this.TestResultType === ResultType.OpenResultWithUnit;\r\n }\r\n\r\n public get IsAlpha() {\r\n return this.TestResultType === ResultType.AlphaResults;\r\n }\r\n\r\n public get TestResultType() {\r\n if (!this.test) return TestType.None;\r\n return this.test.resultType;\r\n }\r\n\r\n public validateItem(event: ValidationCallbackData) {\r\n if (event.value === '') return true;\r\n\r\n switch (this.test?.resultType) {\r\n case ResultType.ValueValue:\r\n case ResultType.GreaterEqualValue:\r\n case ResultType.LessEqualValue:\r\n case ResultType.GreaterThanValue:\r\n case ResultType.LessThanValue: {\r\n const res = Number(event.value);\r\n const message = res ? \"\" : \"The result value is not valid.\";\r\n event.validator.option(\"validationRules[0].message\", message);\r\n\r\n return res;\r\n }\r\n case ResultType.AlphaResults:\r\n return true;\r\n case ResultType.OpenResultWithUnit:\r\n case ResultType.OpenResultWithoutUnit:\r\n return true;\r\n case ResultType.Titer: {\r\n const res = this.titerRegex.test(event.value as string);\r\n const message = !res ? \"\" : \"The titer value is not valid.\";\r\n event.validator.option(\"validationRules[0].message\", message);\r\n\r\n return res;\r\n }\r\n case ResultType.SpecificCutOff: {\r\n const res = Number(event.value);\r\n const message = res ? \"\" : \"The result value is not valid.\";\r\n event.validator.option(\"validationRules[0].message\", message);\r\n\r\n return res;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public clean() {\r\n this.form.reset({\r\n numeric: '',\r\n alpha: '',\r\n titer: '',\r\n open: ''\r\n });\r\n this.form.markAsPristine();\r\n }\r\n\r\n public submit() {\r\n if (this.form.valid) {\r\n this.popupVisible = false;\r\n }\r\n }\r\n\r\n public hidden() {\r\n const values = this.form.value;\r\n this.clean();\r\n const result = values.numeric !== '' ? values.numeric : values.alpha !== '' ? values.alpha : values.titer !== '' ? values.titer : values.open;\r\n this.closeEvent.emit(result);\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 {{cellInfo.data.testName}}\r\n {{cellInfo.data.testName}}\r\n
\r\n\r\n
\r\n

\r\n
\r\n\r\n
\r\n \r\n {{calculateAlphaFlagAndReferenceRange(cellInfo.data)}}\r\n {{calculateNumericFlag(cellInfo.data)}}\r\n {{calculateTiterFlag(cellInfo.data)}}\r\n {{calculateSpecificCutOffFlag(cellInfo.data)}}\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 {CellClickEvent, FocusedCellChangedEvent, RowValidatingEvent, SavingEvent} from \"devextreme/ui/data_grid\";\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {DomSanitizer, SafeHtml} from \"@angular/platform-browser\";\r\nimport {HttpResponse, HttpStatusCode} from \"@angular/common/http\";\r\nimport {NormalTestRun, PreviewNormalTestRun} from \"../../models/test-run\";\r\nimport {Order, OrderResultInformation} from \"../../models/order\";\r\nimport {ResultFlag, ResultFlagNumeric, ResultFlagNumericConverter} from \"../../enums/result-flag\";\r\nimport {Subject, Subscription} from \"rxjs\";\r\nimport {alert, confirm} from \"devextreme/ui/dialog\";\r\nimport {difference, flatten, intersection} from \"lodash\";\r\n\r\nimport {Age} from \"../../models/clinical-ranges/age\";\r\nimport {AlphaClinicalRange} from \"../../models/clinical-ranges/alpha-clinical-range\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport {ClientTests} from \"../../models/client-tests\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport DevExpress from \"devextreme\";\r\nimport {DxDataGridComponent} from \"devextreme-angular\";\r\nimport {FileUtils} from \"../../../../../shared/utils\";\r\nimport {UntypedFormControl} from \"@angular/forms\";\r\nimport {Gender} from \"../../enums/gender\";\r\nimport {KeyDownEvent} from \"devextreme/ui/select_box\";\r\nimport {NormalTest} from \"../../models/test\";\r\nimport {NumericClinicalRange} from \"../../models/clinical-ranges/numeric-clinical-range\";\r\nimport {OpenClinicalRange} from \"../../models/clinical-ranges/open-clinical-range\";\r\nimport {OrderService} from \"../../services/order.service\";\r\nimport {OrderTest} from \"../../models/order-test\";\r\nimport {OrdersDictionaryService} from \"./orders-dictionary.service\";\r\nimport {PWADetectorService} from \"../../../../../shared/services/general\";\r\nimport {PatientHelpers} from \"../../helpers/patient-helpers\";\r\nimport {ReportsService} from \"../../../../shared/services/reports.service\";\r\nimport {ResultMode} from \"../../enums/result-mode\";\r\nimport {ResultType} from \"../../enums/result-type\";\r\nimport {SpecificCutOffClinicalRange} from \"../../models/clinical-ranges/specific-cut-off-clinical-range\";\r\nimport {SpecificCutOffFlag} from \"../../enums/specific-cut-off-flag\";\r\nimport {SpecificCutSign} from \"../../enums/specific-cut-sign\";\r\nimport {TiterClinicalRange} from \"../../models/clinical-ranges/titer-clinical-range\";\r\nimport {ValidationCallbackData} from \"devextreme/ui/validation_rules\";\r\nimport {ValueChangedEvent} from \"devextreme/ui/check_box\";\r\nimport notify from \"devextreme/ui/notify\";\r\nimport {take} from \"rxjs/operators\";\r\nimport CellInfo = DevExpress.ui.dxTreeList.CellInfo;\r\n\r\nclass GridData {\r\n id: string;\r\n sort: number;\r\n orderId: number;\r\n resultScale: number;\r\n orderCode: string;\r\n testId: number;\r\n editing: boolean = false;\r\n testCode: string;\r\n testName: string;\r\n result?: string;\r\n cutOff?: string;\r\n reportAs?: string;\r\n editable: boolean = false;\r\n modified?: boolean = false;\r\n flag?: string;\r\n referenceRange?: string;\r\n unitOfMeasure?: string;\r\n comments?: string;\r\n resultType?: ResultType;\r\n mode?: ResultMode;\r\n clinicalRange?: NumericClinicalRange | AlphaClinicalRange | TiterClinicalRange | OpenClinicalRange | SpecificCutOffClinicalRange;\r\n\r\n constructor(item: GridData) {\r\n this.id = item.id;\r\n this.sort = item.sort;\r\n this.resultScale = item.resultScale;\r\n this.editing = item.editing;\r\n this.orderId = item.orderId;\r\n this.orderCode = item.orderCode;\r\n this.editable = item.editable;\r\n this.testId = item.testId;\r\n this.testCode = item.testCode;\r\n this.testName = item.testName;\r\n this.result = item.result ? item.result : '';\r\n this.flag = item.flag ? item.flag : '';\r\n this.comments = item.comments ? item.comments : '';\r\n this.unitOfMeasure = item.unitOfMeasure ? item.unitOfMeasure : '';\r\n this.resultType = item.resultType ? item.resultType : ResultType.None;\r\n this.mode = item.mode ? item.mode : ResultMode.None;\r\n this.clinicalRange = item.clinicalRange ? item.clinicalRange : undefined;\r\n this.referenceRange = item.referenceRange;\r\n this.cutOff = item.cutOff;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'app-result-manager',\r\n templateUrl: './result-manager.component.html',\r\n styleUrls: ['./result-manager.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ResultManagerComponent implements OnChanges, OnDestroy {\r\n @Input() public orders: Order[] = [];\r\n @Output() public resultsSaved: EventEmitter = new EventEmitter();\r\n @ViewChild(DxDataGridComponent, {static: false}) public dxDataGridComponent?: DxDataGridComponent;\r\n\r\n public showPendingResults?: boolean = false;\r\n public showOnlyWithAccess?: boolean = false;\r\n public gridData = new DataSource({\r\n store: new ArrayStore({\r\n key: 'id'\r\n })\r\n });\r\n public changes: GridData[] = [];\r\n public selectedKeys: any[] = [];\r\n public commentsControl: UntypedFormControl = new UntypedFormControl();\r\n public titerRegex = /^\\d{1,3}(:\\d+)$/\r\n public isDialogVisible = false;\r\n public isCommentsDialogVisible = false;\r\n public valid = false;\r\n private requestSubscription?: Subscription;\r\n private tests: NormalTest[] = [];\r\n private clientsTests: ClientTests[] = [];\r\n private ordersInformation: OrderResultInformation[] = [];\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private pwaDetectorService: PWADetectorService, private reportsService: ReportsService, private orderService: OrderService, private orderDictionary: OrdersDictionaryService, private htmlSanitizer: DomSanitizer, private ref: ChangeDetectorRef) {\r\n this.performRequest = this.performRequest.bind(this);\r\n this.validateItem = this.validateItem.bind(this);\r\n this.save = this.save.bind(this);\r\n this.onCommentsDialogClose = this.onCommentsDialogClose.bind(this);\r\n this.onDialogClose = this.onDialogClose.bind(this);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.handleOrdersSelectionChanges(changes);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyPreviousSubscription();\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n private performRequest(conf: { clientsIds: number[], orderIds: number[], testIds: number[], showOnlyPending: boolean }, callback: (res: HttpResponse<{ testsConfigurations: NormalTest[], orderResultsCalculationInformation: OrderResultInformation[] }>) => void) {\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Loading orders data...\");\r\n this.requestSubscription = this.orderService.getOrdersConfigurations(conf)\r\n .pipe(take(1))\r\n // @ts-ignore\r\n .subscribe(callback);\r\n }\r\n\r\n //region order events methods\r\n\r\n public changeCheckBoxValue(event: ValueChangedEvent) {\r\n this.showPendingResults = event.value;\r\n this.performRequest({\r\n orderIds: this.orders.map(o => o.id),\r\n testIds: this.tests.map(t => t.id),\r\n clientsIds: this.orders.map(o => o.clientId),\r\n showOnlyPending: this.showPendingResults as boolean\r\n },\r\n res => {\r\n try {\r\n if (res.status !== HttpStatusCode.Ok) return;\r\n const {\r\n clientsConfigurations,\r\n testsConfigurations,\r\n orderResultsCalculationInformation\r\n } = res.body as { clientsConfigurations: ClientTests[], testsConfigurations: NormalTest[], orderResultsCalculationInformation: OrderResultInformation[] };\r\n this.clientsTests = clientsConfigurations;\r\n this.showOnlyWithAccess = false;\r\n this.addTests(testsConfigurations);\r\n this.addOrdersInformation(orderResultsCalculationInformation);\r\n this.handleGridLoad().then().catch(e => console.log(e));\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n } catch {\r\n alert(\"There was an error trying to load orders information. Please, try to search again.\", \"Loading orders error\").then().catch(e => console.log(e));\r\n }\r\n });\r\n }\r\n\r\n public handleOrdersSelectionChanges(changes: SimpleChanges) {\r\n if (changes.orders && changes.orders.currentValue) {\r\n if (changes.orders.currentValue.length === 0) {\r\n this.clearAll();\r\n this.handleGridLoad().then().catch(e => console.log(e));\r\n return;\r\n }\r\n\r\n const newOrders = difference(changes.orders.currentValue.map((o: Order) => o.id), this.ordersInformation.map(o => o.orderId));\r\n const queueResponse = this.orderDictionary.enqueueOrders(changes.orders.currentValue.filter((o: Order) => newOrders.includes(o.id)));\r\n\r\n if (queueResponse.removed && queueResponse.removed.length > 0) {\r\n this.removeOrders(queueResponse.removed);\r\n }\r\n\r\n this.handlerOrderQueueChanges();\r\n }\r\n }\r\n\r\n private destroyPreviousSubscription() {\r\n if (this.requestSubscription && !this.requestSubscription.closed) {\r\n this.requestSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n private removeOrders(ordersIds: number[]) {\r\n for (const orderId of ordersIds) {\r\n const index = this.ordersInformation.findIndex(o => o.orderId === orderId);\r\n const removedOrders = this.ordersInformation.splice(index, 1);\r\n\r\n if (removedOrders && removedOrders.length === 1) {\r\n const testsIds = removedOrders[0].orderTests?.map(t => t.id);\r\n this.removeTests(testsIds);\r\n }\r\n }\r\n }\r\n\r\n private removeTests(testsIds: number[]) {\r\n for (const testsId of testsIds) {\r\n const ordersTests = flatten(this.ordersInformation.map(o => o.orderTests)) as OrderTest[];\r\n const ordersTestsIds = ordersTests.map(o => o.testId);\r\n if (!ordersTestsIds.includes(testsId)) {\r\n const index = this.tests.findIndex(t => t.id === testsId);\r\n this.tests.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n private clearAll() {\r\n this.ordersInformation = [];\r\n this.tests = [];\r\n }\r\n\r\n private addTests(tests: NormalTest[]) {\r\n const idsToAdd = difference(tests.map(t => t.id), this.tests.map(t => t.id));\r\n const testsToAdd = tests.filter(t => idsToAdd.includes(t.id));\r\n\r\n this.tests.push(...testsToAdd);\r\n }\r\n\r\n private addOrdersInformation(ordersInformation: OrderResultInformation[]) {\r\n const idsToAdd = difference(ordersInformation.map(o => o.orderId), this.ordersInformation.map(t => t.orderId));\r\n const idsToUpdate = intersection(ordersInformation.map(o => o.orderId), this.ordersInformation.map(t => t.orderId));\r\n\r\n for (const toUpdate of idsToUpdate) {\r\n const index = this.ordersInformation.findIndex(o => o.orderId === toUpdate);\r\n this.ordersInformation[index] = ordersInformation.find(o => o.orderId === toUpdate) as OrderResultInformation;\r\n }\r\n\r\n const informationToAdd = ordersInformation.filter(o => idsToAdd.includes(o.orderId));\r\n this.ordersInformation.push(...informationToAdd);\r\n }\r\n\r\n private handlerOrderQueueChanges() {\r\n this.destroyPreviousSubscription();\r\n\r\n const orders = this.orderDictionary.Orders;\r\n\r\n this.performRequest({\r\n orderIds: orders.map(o => o.id),\r\n testIds: this.tests.map(t => t.id),\r\n clientsIds: this.orders.map(o => o.clientId),\r\n showOnlyPending: this.showPendingResults as boolean\r\n }, res => {\r\n try {\r\n if (res.status !== HttpStatusCode.Ok) return;\r\n const {\r\n clientsConfigurations,\r\n testsConfigurations,\r\n orderResultsCalculationInformation\r\n } = res.body as { clientsConfigurations: ClientTests[], testsConfigurations: NormalTest[], orderResultsCalculationInformation: OrderResultInformation[] };\r\n this.clientsTests = clientsConfigurations;\r\n this.showOnlyWithAccess = false;\r\n this.addTests(testsConfigurations);\r\n this.addOrdersInformation(orderResultsCalculationInformation);\r\n this.orderDictionary.dequeueOrders(orders);\r\n this.handleGridLoad().then();\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n } catch {\r\n alert(\"There was an error trying to load orders information. Please, try to search again.\", \"Loading orders error\").then().catch(e => console.log(e));\r\n }\r\n });\r\n }\r\n\r\n //endregion\r\n\r\n //region grid events methods\r\n\r\n public cellFocused(event: CellClickEvent) {\r\n if (event.rowType !== 'data') return;\r\n const isTouchDevice = () => {\r\n return (('ontouchstart' in window) ||\r\n (navigator.maxTouchPoints > 0) ||\r\n ///@ts-ignore\r\n (navigator.msMaxTouchPoints > 0));\r\n }\r\n if (!isTouchDevice()) {\r\n const cell = this.dxDataGridComponent?.instance.getCellElement(event.rowIndex, event.column?.dataField as string);\r\n this.dxDataGridComponent?.instance.focus(cell as HTMLElement);\r\n }\r\n }\r\n\r\n public numericControlEnterKey(event: KeyDownEvent, cellData: CellInfo) {\r\n if ((event as any).code === 'Enter') {\r\n const cell = this.dxDataGridComponent?.instance.getCellElement(cellData.rowIndex + 1, cellData.column.dataField as string);\r\n this.dxDataGridComponent?.instance.focus(cell as HTMLElement);\r\n }\r\n }\r\n\r\n public alphaControlEnterKey(event: KeyDownEvent, cellData: CellInfo) {\r\n const cell = this.dxDataGridComponent?.instance.getCellElement(cellData.rowIndex + 1, cellData.column.dataField as string);\r\n this.dxDataGridComponent?.instance.focus(cell as HTMLElement);\r\n }\r\n\r\n public alphaControlKeyPressed({event, component}: KeyDownEvent, cellInfo: CellInfo) {\r\n const key = (event as any)?.key;\r\n if ((event as any).code === 'Enter') return this.alphaControlEnterKey({event, component} as KeyDownEvent, cellInfo);\r\n const cellData: GridData = cellInfo.data;\r\n const test = this.tests.find(t => t.id === cellData.testId);\r\n if (!test) return;\r\n const clinicalRanges = test.alphaClinicalRanges.filter(cr => cr.result.toUpperCase().startsWith(key.toUpperCase()));\r\n if (clinicalRanges.length === 1) {\r\n cellData.result = clinicalRanges[0]?.result\r\n component.option(\"value\", cellData.result);\r\n }\r\n }\r\n\r\n public validateItem(event: ValidationCallbackData) {\r\n if (event.value === '') return true;\r\n\r\n switch ((event.data as GridData).resultType) {\r\n case ResultType.ValueValue:\r\n case ResultType.GreaterEqualValue:\r\n case ResultType.LessEqualValue:\r\n case ResultType.GreaterThanValue:\r\n case ResultType.LessThanValue: {\r\n const res = Number(event.value);\r\n const message = res ? \"\" : \"The result value is not valid.\";\r\n event.validator.option(\"validationRules[0].message\", message);\r\n\r\n return res;\r\n }\r\n case ResultType.AlphaResults:\r\n return true;\r\n case ResultType.OpenResultWithUnit:\r\n case ResultType.OpenResultWithoutUnit:\r\n return true;\r\n case ResultType.Titer: {\r\n const res = this.titerRegex.test(event.value as string);\r\n const message = !res ? \"\" : \"The titer value is not valid.\";\r\n event.validator.option(\"validationRules[0].message\", message);\r\n\r\n return res;\r\n }\r\n case ResultType.SpecificCutOff: {\r\n const res = Number(event.value);\r\n const message = res ? \"\" : \"The result value is not valid.\";\r\n event.validator.option(\"validationRules[0].message\", message);\r\n\r\n return res;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public onSaving(event: SavingEvent) {\r\n const changes = event.changes.map(c => (c.data as GridData));\r\n\r\n for (const change of changes) {\r\n const index = this.changes.findIndex(c => c.id === change.id);\r\n if (index === -1) {\r\n this.changes.push(change);\r\n continue;\r\n }\r\n if (change.result === '') {\r\n this.changes.splice(index, 1);\r\n continue;\r\n }\r\n this.changes[index] = change;\r\n }\r\n }\r\n\r\n public onRowValidation(event: RowValidatingEvent) {\r\n this.valid = event.isValid;\r\n }\r\n\r\n private async handleGridLoad() {\r\n const gridDataOrderIds = (this.gridData.store() as ArrayStore).createQuery().toArray().map((d: GridData) => d.orderId);\r\n const changesOrderIds = this.ordersInformation.map((o: OrderResultInformation) => o.orderId);\r\n\r\n const toRemove = difference(gridDataOrderIds, changesOrderIds) as number[];\r\n const toAdd = difference(changesOrderIds, gridDataOrderIds) as number[];\r\n const toUpdate = intersection(changesOrderIds, gridDataOrderIds) as number[];\r\n\r\n this.removeFromGrid(toRemove).then().catch(e => console.log(e));\r\n this.addToGrid(toAdd).then().catch(e => console.log(e));\r\n this.updateToGrid(toUpdate).then().catch(e => console.log(e));\r\n\r\n await this.gridData.reload();\r\n this.ref.detectChanges();\r\n }\r\n\r\n private getGridKey(orderId: string | number, testId: string | number) {\r\n return `${orderId}_${testId}`;\r\n }\r\n\r\n private async removeFromGrid(toRemoveIds: number[]) {\r\n const gridData = (this.gridData.store() as ArrayStore).createQuery().toArray().filter((d: GridData) => toRemoveIds.includes(d.orderId)) as GridData[];\r\n\r\n for (const data of gridData) {\r\n await this.gridData.store().remove(this.getGridKey(data.orderId, data.testId));\r\n }\r\n }\r\n\r\n private async addToGrid(toAddIds: number[]) {\r\n const ordersInformation = this.ordersInformation.filter(o => toAddIds.includes(o.orderId));\r\n for (const info of ordersInformation) {\r\n const order = this.orders.find(o => o.id === info.orderId);\r\n\r\n if (!order) continue;\r\n\r\n for (const orderTest of info.orderTests) {\r\n const test = this.tests.find(t => t.id === orderTest.testId);\r\n\r\n if (!test) continue;\r\n\r\n const resultConfiguration = this.configureResult(info, orderTest, test);\r\n const client = this.clientsTests.find(c => c.clientId === order.clientId);\r\n const clientCanAccessTest = client?.testsIds.includes(test.id) || false;\r\n\r\n const data = new GridData({\r\n id: this.getGridKey(info.orderId, test.id),\r\n testId: test.id,\r\n sort: test.sort,\r\n orderId: info.orderId,\r\n resultScale: test.resultScale,\r\n testName: test.name,\r\n testCode: test.code,\r\n editable: clientCanAccessTest,\r\n orderCode: order.code,\r\n result: orderTest.validRun ? orderTest.validRun.result : '',\r\n resultType: test.resultType,\r\n editing: orderTest.validRun !== undefined && orderTest.validRun !== null,\r\n comments: orderTest.validRun ? orderTest.validRun.comments : '',\r\n flag: orderTest.validRun ? orderTest.validRun.flag?.toUpperCase() : '',\r\n unitOfMeasure: resultConfiguration.unitOfMeasure, // TODO CHECK WHAT HAPPENS WHEN IT'S BEING UPDATED\r\n clinicalRange: resultConfiguration.clinicalRange,\r\n referenceRange: resultConfiguration.refRange, // TODO CHECK WHAT HAPPENS WHEN IT'S BEING UPDATED\r\n mode: resultConfiguration.mode\r\n });\r\n\r\n await this.gridData.store().insert(data);\r\n }\r\n }\r\n }\r\n\r\n public sanitizeComments(cellData: GridData): string | SafeHtml {\r\n if (!cellData) return '';\r\n if (!cellData.comments || cellData.comments === '') return '';\r\n return this.htmlSanitizer.bypassSecurityTrustHtml(cellData.comments.toUpperCase());\r\n }\r\n\r\n private async updateToGrid(toUpdate: number[]) {\r\n await this.removeFromGrid(toUpdate);\r\n await this.addToGrid(toUpdate);\r\n }\r\n\r\n //endregion\r\n\r\n //region buttons events\r\n\r\n public showOnlyWithClientAccess(event: ValueChangedEvent) {\r\n this.showOnlyWithAccess = event.value;\r\n if (this.showOnlyWithAccess) {\r\n this.dxDataGridComponent?.instance.filter([\"editable\", '=', true]);\r\n this.dxDataGridComponent?.instance.refresh();\r\n } else {\r\n this.dxDataGridComponent?.instance.clearFilter();\r\n this.dxDataGridComponent?.instance.refresh();\r\n }\r\n }\r\n\r\n public async clear() {\r\n const result = await confirm(\"Are you sure you want to clear all results?\", \"Confirm Clear\");\r\n if (result)\r\n this.performRequest({\r\n orderIds: this.orders.map(o => o.id),\r\n testIds: this.tests.map(t => t.id),\r\n clientsIds: this.orders.map(o => o.clientId),\r\n showOnlyPending: this.showPendingResults as boolean\r\n },\r\n res => {\r\n try {\r\n if (res.status !== HttpStatusCode.Ok) return;\r\n const {\r\n clientsConfigurations,\r\n testsConfigurations,\r\n orderResultsCalculationInformation\r\n } = res.body as { clientsConfigurations: ClientTests[], testsConfigurations: NormalTest[], orderResultsCalculationInformation: OrderResultInformation[] };\r\n this.clientsTests = clientsConfigurations;\r\n this.addTests(testsConfigurations);\r\n this.commentsControl.reset();\r\n this.showOnlyWithAccess = false;\r\n this.addOrdersInformation(orderResultsCalculationInformation);\r\n this.handleGridLoad();\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n } catch {\r\n alert(\"There was an error trying to load orders information. Please, try to search again.\", \"Loading orders error\").then().catch(e => console.log(e));\r\n }\r\n });\r\n }\r\n\r\n public showColumnChooser() {\r\n this.dxDataGridComponent?.instance.showColumnChooser();\r\n }\r\n\r\n public format(data: GridData) {\r\n const decimalPlaces = data.resultScale >= 0 ? data.resultScale : 9;\r\n let format = decimalPlaces === 0 ? \"#0\" : \"#0.\";\r\n for (let i = 0; i < decimalPlaces; i++) {\r\n format += \"0#0\";\r\n }\r\n return format;\r\n }\r\n\r\n public save() {\r\n // TODO CHECK IF A RESULT IS BEING UPDATED AND SHOW DIALOG\r\n\r\n const withValidResults: GridData[] = (this.dxDataGridComponent?.instance.getDataSource()\r\n .store() as ArrayStore).createQuery()\r\n .toArray()\r\n .filter((data: GridData) => data.result !== undefined && data.result !== null && data.result !== '' && data.editable && data.modified);\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Saving results data...\");\r\n const results: NormalTestRun[] = [];\r\n for (const withValidResult of withValidResults) {\r\n const order = this.ordersInformation.find(o => o.orderId === withValidResult.orderId);\r\n if (!order) continue;\r\n const orderTest = order.orderTests.find(ot => ot.testId === withValidResult.testId);\r\n if (!orderTest) continue;\r\n const testRun = new NormalTestRun(orderTest.id, false, (orderTest.validRun ? orderTest.validRun.runNumber : 1), withValidResult.result as string,\r\n new Date(), withValidResult.comments as string, withValidResult.flag as string, withValidResult.reportAs as string, withValidResult.cutOff as string);\r\n results.push(testRun);\r\n }\r\n this.orderService.saveResults(results)\r\n .pipe(take(1))\r\n .subscribe(async res => {\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n if (res.status === HttpStatusCode.Ok) {\r\n notify(\"Results saved.\", \"success\");\r\n\r\n for (const result of withValidResults) {\r\n await (this.dxDataGridComponent?.instance.getDataSource().store() as ArrayStore).remove(this.getGridKey(result.orderId, result.testId));\r\n }\r\n await this.gridData.reload();\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.resultsSaved.emit();\r\n } else {\r\n notify(\"There was an error saving the results, check if there is data entry errors and then try again.\", \"error\");\r\n }\r\n });\r\n }\r\n\r\n public preview() {\r\n const withValidResults: GridData[] = (this.dxDataGridComponent?.instance.getDataSource()\r\n .store() as ArrayStore).createQuery()\r\n .toArray().filter((data: GridData) => data.result !== undefined && data.result !== null && data.result !== '');\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Generating preview report...\");\r\n const results: PreviewNormalTestRun[] = [];\r\n for (const withValidResult of withValidResults) {\r\n const order = this.ordersInformation.find(o => o.orderId === withValidResult.orderId);\r\n if (!order) continue;\r\n const orderTest = order.orderTests.find(ot => ot.testId === withValidResult.testId);\r\n if (!orderTest) continue;\r\n const test = this.tests.find(t => t.id === orderTest.testId);\r\n if (!test) continue;\r\n\r\n const testRun = new PreviewNormalTestRun(order.orderId, test.id, withValidResult.unitOfMeasure as string, withValidResult.referenceRange as string,\r\n withValidResult.clinicalRange?.reportComment as string, test.resultType, orderTest.id, true, 1, withValidResult.result as string, new Date(),\r\n withValidResult.comments as string, withValidResult.flag as string, withValidResult.reportAs as string, withValidResult.cutOff as string);\r\n testRun.flag = this.calculateFlag(withValidResult);\r\n\r\n results.push(testRun);\r\n }\r\n\r\n this.reportsService.generateOrderPreview(results)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n //endregion\r\n\r\n //region result methods\r\n\r\n private getNumericClinicalRange(orderInformation: OrderResultInformation, test: NormalTest): NumericClinicalRange | undefined {\r\n const ranges = test.numericClinicalRanges\r\n .filter(cr => new Date(cr.effectiveDate) <= new Date())\r\n .sort((a, b) => new Date(b.effectiveDate).getUTCDate() - new Date(a.effectiveDate).getUTCDate())\r\n if (ranges.length === 0) return undefined;\r\n\r\n let matchesByAge: NumericClinicalRange[];\r\n const patientAge = PatientHelpers.calculateAge(orderInformation.patientBirthDate);\r\n\r\n if (orderInformation.patientBirthDate)\r\n matchesByAge = ranges.filter(cr => (Age.isZero(cr.minAge) || Age.lessOrEqualsThan(cr.minAge, patientAge)) && (Age.isZero(cr.maxAge) || Age.greaterOrEqualsTo(cr.maxAge, patientAge)));\r\n else {\r\n matchesByAge = ranges.filter(cr => Age.isZero(cr.minAge) && Age.isZero(cr.maxAge));\r\n if (matchesByAge.length === 0) {\r\n const min = Math.min(...ranges.map(r => r.normalFrom));\r\n const max = Math.max(...ranges.map(r => r.normalTo));\r\n return new NumericClinicalRange({\r\n normalFrom: min,\r\n normalTo: max,\r\n gender: Gender.Any,\r\n } as NumericClinicalRange);\r\n }\r\n }\r\n return this.clinicalRangeByGender(matchesByAge, orderInformation);\r\n }\r\n\r\n private getAlphaClinicalRange(test: NormalTest): AlphaClinicalRange | undefined {\r\n const ranges = test.alphaClinicalRanges\r\n .filter(cr => new Date(cr.effectiveDate) <= new Date())\r\n .sort((a, b) => new Date(b.effectiveDate).getUTCDate() - new Date(a.effectiveDate).getUTCDate())\r\n\r\n return ranges.find(cr => cr);\r\n }\r\n\r\n private getOpenClinicalRange(test: NormalTest): OpenClinicalRange | undefined {\r\n const ranges = test.openClinicalRanges\r\n .filter(cr => new Date(cr.effectiveDate) <= new Date())\r\n .sort((a, b) => new Date(b.effectiveDate).getUTCDate() - new Date(a.effectiveDate).getUTCDate())\r\n\r\n return ranges.find(cr => cr);\r\n }\r\n\r\n private getTiterClinicalRange(orderInformation: OrderResultInformation, test: NormalTest): TiterClinicalRange | undefined {\r\n const ranges = test.titerClinicalRanges.filter(c => new Date(c.effectiveDate) <= new Date())\r\n .sort((a, b) => new Date(b.effectiveDate).getUTCDate() - new Date(a.effectiveDate).getUTCDate())\r\n\r\n if (ranges.length === 0) return undefined;\r\n\r\n let matchesByAge: TiterClinicalRange[];\r\n const patientAge = PatientHelpers.calculateAge(orderInformation.patientBirthDate);\r\n\r\n if (orderInformation.patientBirthDate)\r\n matchesByAge = ranges.filter(cr => (Age.isZero(cr.minAge) || Age.lessOrEqualsThan(cr.minAge, patientAge))\r\n && (Age.isZero(cr.maxAge) || Age.greaterOrEqualsTo(cr.maxAge, patientAge)));\r\n else {\r\n matchesByAge = ranges.filter(cr => Age.isZero(cr.minAge) && Age.isZero(cr.maxAge));\r\n if (matchesByAge.length === 0) {\r\n const min = ranges.map(r => r.normal).sort().find(r => r);\r\n const limit = ranges.map(r => {\r\n return {normal: r.normal, normalSign: r.normalSign}\r\n }).find(r => r.normal === min);\r\n\r\n return new TiterClinicalRange({\r\n normalSign: limit?.normalSign,\r\n normal: limit?.normal,\r\n gender: Gender.Any,\r\n } as TiterClinicalRange);\r\n }\r\n }\r\n return this.clinicalRangeByGender(matchesByAge, orderInformation);\r\n }\r\n\r\n private clinicalRangeByGender(matchesByAge: any[], orderInformation: OrderResultInformation) {\r\n const matchesForGenderAny = matchesByAge.find(cr => cr.gender === Gender.Any);\r\n if (!orderInformation.patientGender)\r\n return matchesForGenderAny;\r\n\r\n switch (orderInformation.patientGender.toUpperCase()) {\r\n case 'MALE':\r\n const matchesForGenderMale = matchesByAge.find(cr => cr.gender == Gender.Male);\r\n return matchesForGenderMale ?? matchesForGenderAny;\r\n case 'FEMALE':\r\n const matchesForFemale = matchesByAge.find(cr => cr.gender == Gender.Female);\r\n return matchesForFemale ?? matchesForGenderAny;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private getSpecificCutOffClinicalRange(test: NormalTest): SpecificCutOffClinicalRange | undefined {\r\n const ranges = test.specificCutOffClinicalRanges\r\n .sort((a, b) => b.resultComparer - a.resultComparer)\r\n\r\n return ranges.find(cr => cr);\r\n }\r\n\r\n private getSpecificCutOffClinicalRangeByResult(result: number, test: NormalTest): SpecificCutOffClinicalRange | undefined {\r\n if (Number.isNaN(result)) {\r\n return this.getSpecificCutOffClinicalRange(test);\r\n }\r\n\r\n const ranges = test.specificCutOffClinicalRanges\r\n .sort((a, b) => b.resultComparer - a.resultComparer);\r\n\r\n let bestDistance = Number.MAX_VALUE;\r\n let bestRange: SpecificCutOffClinicalRange | undefined;\r\n for (const bestRangeElement of ranges) {\r\n if (!SpecificCutOffClinicalRange.matches(bestRangeElement, result))\r\n continue;\r\n const distance = Math.abs(bestRangeElement.resultComparer - result);\r\n if (distance < bestDistance || (distance == bestDistance && bestRange !== undefined &&\r\n SpecificCutOffClinicalRange.getSignRank(bestRangeElement) < SpecificCutOffClinicalRange.getSignRank(bestRange))) {\r\n bestRange = bestRangeElement;\r\n bestDistance = distance;\r\n }\r\n }\r\n\r\n return bestRange;\r\n }\r\n\r\n public virtualCutoffWithoutMeasuringUnit(cr: SpecificCutOffClinicalRange) {\r\n const expression = `${this.signToString(cr)} ${cr.resultComparer}`;\r\n return cr.cutoff ? `${cr.cutoff}` : `Cutoff: ${expression}`;\r\n }\r\n\r\n public signToString(cr: SpecificCutOffClinicalRange) {\r\n return cr.sign == SpecificCutSign.LessThan ? \"<\" : cr.sign == SpecificCutSign.GreaterThan ? \">\" :\r\n cr.sign == SpecificCutSign.LessThanOrEqual ? \"<=\" : cr.sign == SpecificCutSign.GreaterThanOrEqual ? \">=\" :\r\n cr.sign == SpecificCutSign.Equal ? \"=\" : \"\";\r\n }\r\n\r\n private configureResult(orderInformation: OrderResultInformation, orderTest: OrderTest, test: NormalTest): { unitOfMeasure: string; flag: string, refRange: string, mode: ResultMode, clinicalRange: NumericClinicalRange | AlphaClinicalRange | TiterClinicalRange | OpenClinicalRange | SpecificCutOffClinicalRange | undefined } {\r\n let resultMode: ResultMode = ResultMode.None;\r\n let flag: string = '';\r\n let unitOfMeasure: string = '';\r\n let refRange: string = '';\r\n let clinicalRange: NumericClinicalRange | AlphaClinicalRange | TiterClinicalRange | OpenClinicalRange | SpecificCutOffClinicalRange | undefined = undefined;\r\n\r\n switch (test.resultType) {\r\n case ResultType.ValueValue:\r\n case ResultType.GreaterEqualValue:\r\n case ResultType.LessEqualValue:\r\n case ResultType.GreaterThanValue:\r\n case ResultType.LessThanValue: {\r\n resultMode = ResultMode.Numeric;\r\n clinicalRange = this.getNumericClinicalRange(orderInformation, test);\r\n switch (test.resultType) {\r\n case ResultType.ValueValue:\r\n refRange = clinicalRange ? `${clinicalRange.normalFrom}-${clinicalRange.normalTo}` : '';\r\n break;\r\n case ResultType.GreaterEqualValue:\r\n refRange = clinicalRange ? `>=${clinicalRange.normalTo}` : '';\r\n break;\r\n case ResultType.LessEqualValue:\r\n refRange = clinicalRange ? `<=${clinicalRange.normalTo}` : '';\r\n break;\r\n case ResultType.GreaterThanValue:\r\n refRange = clinicalRange ? `>${clinicalRange.normalTo}` : '';\r\n break;\r\n case ResultType.LessThanValue:\r\n refRange = clinicalRange ? `<${clinicalRange.normalTo}` : '';\r\n break;\r\n }\r\n unitOfMeasure = clinicalRange ? `${clinicalRange.unitOfMeasure ? clinicalRange.unitOfMeasure?.toUpperCase() : ''}` : '';\r\n }\r\n break;\r\n case ResultType.AlphaResults: {\r\n resultMode = ResultMode.Alpha;\r\n }\r\n break;\r\n case ResultType.OpenResultWithUnit:\r\n case ResultType.OpenResultWithoutUnit: {\r\n resultMode = ResultMode.Open;\r\n clinicalRange = this.getOpenClinicalRange(test);\r\n unitOfMeasure = clinicalRange ? clinicalRange?.unitOfMeasure : '';\r\n }\r\n break;\r\n case ResultType.Titer: {\r\n resultMode = ResultMode.Titer;\r\n clinicalRange = this.getTiterClinicalRange(orderInformation, test);\r\n refRange = clinicalRange ? `${clinicalRange.normalSign}${clinicalRange.normal}` : '';\r\n unitOfMeasure = clinicalRange ? clinicalRange.unitOfMeasure : '';\r\n }\r\n break;\r\n case ResultType.SpecificCutOff: {\r\n resultMode = ResultMode.CutOff;\r\n clinicalRange = this.getSpecificCutOffClinicalRange(test);\r\n refRange = clinicalRange ? this.virtualCutoffWithoutMeasuringUnit(clinicalRange) : '';\r\n unitOfMeasure = clinicalRange ? clinicalRange.unitOfMeasure : '';\r\n }\r\n break;\r\n case ResultType.None: {\r\n resultMode = ResultMode.None;\r\n }\r\n break;\r\n }\r\n\r\n return {\r\n mode: resultMode,\r\n flag,\r\n unitOfMeasure,\r\n refRange,\r\n clinicalRange\r\n };\r\n }\r\n\r\n public getAlphaResults(testId: number): string[] {\r\n const test = this.tests.find(t => t.id === testId);\r\n if (!test) return [];\r\n if (!test.alphaClinicalRanges) return [];\r\n return test.alphaClinicalRanges?.map(cr => cr.result);\r\n }\r\n\r\n public calculateNumericFlag(cellInfo: GridData): string {\r\n if (cellInfo.result === undefined || cellInfo.result === null || cellInfo.result === '') return '';\r\n cellInfo.flag = '';\r\n\r\n const test = this.tests.find(t => t.id === cellInfo.testId);\r\n\r\n if (!test) return '';\r\n if (!test.numericClinicalRanges) return '';\r\n\r\n const orderInfo = this.ordersInformation.find(o => o.orderId === cellInfo.orderId);\r\n if (!orderInfo) return '';\r\n const cr = this.getNumericClinicalRange(orderInfo, test) as NumericClinicalRange;\r\n cellInfo.flag = this.numericResultFlagFromResult(cr, Number.parseFloat(cellInfo.result), test.resultType)?.toUpperCase();\r\n return cellInfo.flag;\r\n }\r\n\r\n public calculateTiterFlag(cellInfo: GridData): string {\r\n if (cellInfo.result === undefined || cellInfo.result === null || cellInfo.result === '') return '';\r\n cellInfo.flag = '';\r\n\r\n const test = this.tests.find(t => t.id === cellInfo.testId);\r\n\r\n if (!test) return '';\r\n if (!test.titerClinicalRanges) return '';\r\n\r\n const orderInfo = this.ordersInformation.find(o => o.orderId === cellInfo.orderId);\r\n if (!orderInfo) return '';\r\n\r\n const cr = this.getTiterClinicalRange(orderInfo, test) as TiterClinicalRange;\r\n cellInfo.flag = this.titerResultFlagFromResult(cr, cellInfo.result)?.toUpperCase();\r\n\r\n return cellInfo.flag;\r\n }\r\n\r\n public calculateSpecificCutOffFlag(cellInfo: GridData): string {\r\n if (cellInfo.result === undefined || cellInfo.result === null || cellInfo.result === '') return '';\r\n cellInfo.flag = '';\r\n cellInfo.reportAs = '';\r\n cellInfo.cutOff = '';\r\n\r\n const test = this.tests.find(t => t.id === cellInfo.testId);\r\n\r\n if (!test) return '';\r\n if (!test.specificCutOffClinicalRanges) return '';\r\n\r\n const cr = this.getSpecificCutOffClinicalRangeByResult(Number.parseFloat(cellInfo.result), test);\r\n if (!cr) {\r\n cellInfo.flag = '';\r\n cellInfo.reportAs = '';\r\n cellInfo.cutOff = '';\r\n return '';\r\n }\r\n cellInfo.flag = cr.flag ? SpecificCutOffFlag[cr.flag] : '';\r\n cellInfo.cutOff = cr.cutoff ? `${cr.cutoff}${cr.unitOfMeasure}` : `${cr.resultComparer}${cr.unitOfMeasure}`;\r\n cellInfo.reportAs = !Number.isNaN(cellInfo.result) ? cr.reportAs && cr.reportAs !== '' ? cr.reportAs.toUpperCase() : cellInfo.result : '';\r\n\r\n return cellInfo.flag?.toUpperCase();\r\n }\r\n\r\n public calculateFlag(data: GridData): string {\r\n switch (data.mode) {\r\n case ResultMode.Titer:\r\n return this.calculateTiterFlag(data);\r\n case ResultMode.CutOff:\r\n return this.calculateSpecificCutOffFlag(data);\r\n case ResultMode.Alpha:\r\n return this.calculateAlphaFlagAndReferenceRange(data);\r\n case ResultMode.Numeric:\r\n return this.calculateNumericFlag(data);\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n private numericResultFlagFromResult(clinicalRange: NumericClinicalRange, result: number, resultType: ResultType): string {\r\n if (clinicalRange == null) return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n\r\n const normalFrom = clinicalRange.normalFrom;\r\n const normalTo = clinicalRange.normalTo;\r\n\r\n const criticalFrom = clinicalRange.criticalFrom;\r\n const criticalTo = clinicalRange.criticalTo;\r\n\r\n switch (resultType) {\r\n case ResultType.ValueValue:\r\n if (Number.isNaN(normalFrom) || Number.isNaN(normalTo))\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n if (result < normalFrom || (result == normalFrom /*&& Symbol == \"<\"*/))\r\n return (!Number.isNaN(criticalFrom) && (result < criticalFrom /*|| (result == criticalFrom /!*&& Symbol == \"<\"*!/)*/))\r\n ? ResultFlagNumericConverter.convert(ResultFlagNumeric.LowCritical)\r\n : ResultFlagNumericConverter.convert(ResultFlagNumeric.Low);\r\n if (result > normalTo || (result == normalTo /*&& Symbol == \">\"*/))\r\n return (!Number.isNaN(criticalTo) && (result > criticalTo /*|| (result == criticalTo /!*&& Symbol == \">\"*!/)*/))\r\n ? ResultFlagNumericConverter.convert(ResultFlagNumeric.HighCritical)\r\n : ResultFlagNumericConverter.convert(ResultFlagNumeric.High);\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.Normal);\r\n\r\n case ResultType.GreaterEqualValue:\r\n if (Number.isNaN(normalFrom))\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n if (result < normalFrom || (result == normalFrom /*&& Symbol == \"<\"*/))\r\n return (!Number.isNaN(criticalFrom) && (result < criticalFrom /*|| (criticalFrom == result/!* && Symbol == \"<\"*!/)*/))\r\n ? ResultFlagNumericConverter.convert(ResultFlagNumeric.LowCritical)\r\n : ResultFlagNumericConverter.convert(ResultFlagNumeric.Low);\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.Normal);\r\n\r\n case ResultType.GreaterThanValue:\r\n if (Number.isNaN(normalFrom))\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n if (result < normalFrom || (result == normalFrom /*&& (Symbol == \"<\" || Symbol == \">=\" || Symbol == \"<=\" || string.IsNullOrEmpty(Symbol))*/))\r\n return (!Number.isNaN(criticalFrom) && (result < criticalFrom /*|| (criticalFrom == result /!*&& Symbol == \"<\"*!/)*/))\r\n ? ResultFlagNumericConverter.convert(ResultFlagNumeric.LowCritical)\r\n : ResultFlagNumericConverter.convert(ResultFlagNumeric.Low);\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.Normal);\r\n\r\n case ResultType.LessEqualValue:\r\n if (Number.isNaN(normalTo))\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n if (result > normalTo /*|| (result == normalTo && Symbol == \">\")*/)\r\n return (!Number.isNaN(criticalTo) && (result > criticalTo /*|| (criticalTo == result && Symbol == \">\")*/))\r\n ? ResultFlagNumericConverter.convert(ResultFlagNumeric.HighCritical)\r\n : ResultFlagNumericConverter.convert(ResultFlagNumeric.High);\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.Normal);\r\n\r\n\r\n case ResultType.LessThanValue:\r\n if (Number.isNaN(normalTo))\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n if (result > normalTo || (result == normalTo /*&& (Symbol == \">\" || Symbol == \">=\" || Symbol == \"<=\" || string.IsNullOrEmpty(Symbol))*/))\r\n return (!Number.isNaN(criticalTo) /*&& (result > criticalTo || (criticalTo == result && Symbol == \">\"))*/)\r\n ? ResultFlagNumericConverter.convert(ResultFlagNumeric.HighCritical)\r\n : ResultFlagNumericConverter.convert(ResultFlagNumeric.High);\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.Normal);\r\n\r\n default:\r\n return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n }\r\n }\r\n\r\n private titerResultFlagFromResult(clinicalRange: TiterClinicalRange, result: string) {\r\n if (clinicalRange == null) return ResultFlagNumericConverter.convert(ResultFlagNumeric.InconsistentData);\r\n\r\n const value = Number.parseInt(result.split(':')[1]);\r\n\r\n const normalSign = clinicalRange.normalSign;\r\n const normal = Number.parseInt(clinicalRange.normal.split(':')[1]);\r\n\r\n const criticalSign = clinicalRange.criticalSign;\r\n const critical = !clinicalRange.critical\r\n ? Number.parseInt(clinicalRange.critical.split(':')[1])\r\n : Number.NaN;\r\n\r\n let normalComparisonFlag: ResultFlagNumeric = ResultFlagNumeric.InconsistentData;\r\n switch (normalSign) {\r\n case \"<\":\r\n normalComparisonFlag = value < normal /*||(value==normal && Symbol==\"<\")*/ ? ResultFlagNumeric.Normal : ResultFlagNumeric.High;\r\n break;\r\n case \"<=\":\r\n normalComparisonFlag = value <= normal ? ResultFlagNumeric.Normal : ResultFlagNumeric.High;\r\n break;\r\n case \">\":\r\n normalComparisonFlag = value > normal /*|| (value == normal && Symbol == \">\")*/ ? ResultFlagNumeric.Normal : ResultFlagNumeric.Low;\r\n break;\r\n case \">=\":\r\n normalComparisonFlag = value >= normal ? ResultFlagNumeric.Normal : ResultFlagNumeric.Low;\r\n break;\r\n }\r\n\r\n if (normalComparisonFlag == ResultFlagNumeric.Normal || Number.isNaN(critical)) return ResultFlagNumericConverter.convert(normalComparisonFlag);\r\n\r\n let criticalComparisonFlag: ResultFlagNumeric = ResultFlagNumeric.InconsistentData;\r\n switch (criticalSign) {\r\n case \"<\":\r\n criticalComparisonFlag = value < critical /*|| (value == critical.Value && Symbol == \"<\")*/ ? ResultFlagNumeric.LowCritical : normalComparisonFlag;\r\n break;\r\n case \"<=\":\r\n criticalComparisonFlag = value <= critical ? ResultFlagNumeric.LowCritical : normalComparisonFlag;\r\n break;\r\n case \">\":\r\n criticalComparisonFlag = value > critical /*|| (value == critical.Value && Symbol == \">\")*/ ? ResultFlagNumeric.HighCritical : normalComparisonFlag;\r\n break;\r\n case \">=\":\r\n criticalComparisonFlag = value >= critical ? ResultFlagNumeric.HighCritical : normalComparisonFlag;\r\n break;\r\n default:\r\n criticalComparisonFlag = ResultFlagNumeric.InconsistentData;\r\n break;\r\n }\r\n\r\n return ResultFlagNumericConverter.convert(criticalComparisonFlag);\r\n }\r\n\r\n public calculateAlphaFlagAndReferenceRange(cellInfo: GridData): string {\r\n if (cellInfo.result === undefined || cellInfo.result === null || cellInfo.result === '') return '';\r\n cellInfo.flag = '';\r\n cellInfo.referenceRange = '';\r\n\r\n const test = this.tests.find(t => t.id === cellInfo.testId);\r\n\r\n if (!test) return '';\r\n if (!test.alphaClinicalRanges) return '';\r\n\r\n const cr = test.alphaClinicalRanges.find(cr => cr.result === cellInfo.result);\r\n cellInfo.flag = cr ? ResultFlag[cr.flag].toUpperCase() : '';\r\n cellInfo.referenceRange = cr ? cr.referenceRange.toUpperCase() : '';\r\n\r\n return cellInfo.flag?.toUpperCase();\r\n }\r\n\r\n //endregion\r\n\r\n //region cell editing methods\r\n\r\n setEditedValue(valueChangedEventArg: any, cellInfo: any) {\r\n cellInfo.setValue(valueChangedEventArg.value);\r\n cellInfo.data.result = valueChangedEventArg.value;\r\n cellInfo.data.modified = true;\r\n }\r\n\r\n //endregion\r\n\r\n //region dialog methods\r\n\r\n public openDialog() {\r\n this.isDialogVisible = true;\r\n }\r\n\r\n public openCommentsDialog() {\r\n this.isCommentsDialogVisible = true;\r\n }\r\n\r\n public onCommentsDialogClose() {\r\n this.isCommentsDialogVisible = false;\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Adding comments...\");\r\n if (this.commentsControl.value) {\r\n const data = this.dxDataGridComponent?.instance.getSelectedRowsData() as GridData[];\r\n for (const item of data) {\r\n if (item.editable) {\r\n item.comments = this.commentsControl.value;\r\n }\r\n }\r\n\r\n this.commentsControl.setValue('');\r\n this.valid = true;\r\n }\r\n this.ref.detectChanges();\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n }\r\n\r\n public onDialogClose(result: string) {\r\n this.isDialogVisible = false;\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\"Adding results...\");\r\n if (result) {\r\n const data = this.dxDataGridComponent?.instance.getSelectedRowsData() as GridData[];\r\n for (const item of data) {\r\n if (item.editable) {\r\n item.result = result;\r\n item.flag = this.calculateFlag(item);\r\n item.modified = true;\r\n }\r\n }\r\n this.valid = true;\r\n }\r\n this.ref.detectChanges();\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n }\r\n\r\n public isMassResultEnabled(): boolean {\r\n if (!this.dxDataGridComponent?.instance) return false;\r\n const selectedData: GridData[] = this.dxDataGridComponent?.instance.getSelectedRowsData();\r\n if (!selectedData || selectedData.length === 0) return false;\r\n return selectedData.every((item, index, array) => item?.testId === array[0].testId);\r\n }\r\n\r\n public massResultTest(): NormalTest | undefined {\r\n if (!this.dxDataGridComponent?.instance) return undefined;\r\n const selectedData: GridData[] = this.dxDataGridComponent?.instance.getSelectedRowsData();\r\n if (!selectedData || selectedData.length === 0) return undefined;\r\n const testId = selectedData.find(item => item.testId)?.testId;\r\n return this.tests.find(t => t.id === testId);\r\n }\r\n\r\n public onSaved() {\r\n this.ref.detectChanges();\r\n }\r\n//endregion\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 {ChangeDetectorRef, Component, OnInit} from '@angular/core';\r\nimport {ResultEntrySearchFilter} from \"../../models/SearchFilter\";\r\nimport {OrderService} from \"../../services/order.service\";\r\nimport {BehaviorSubject, of, Subject} from \"rxjs\";\r\nimport {debounceTime, take} from \"rxjs/operators\";\r\nimport {SettingsService} from \"../../../../shared/services/settings.service\";\r\nimport {Order} from \"../../models/order\";\r\n\r\n@Component({\r\n selector: 'app-result-entry',\r\n templateUrl: './result-entry.component.html',\r\n styleUrls: ['./result-entry.component.scss']\r\n})\r\nexport class ResultEntryComponent implements OnInit {\r\n public saved: boolean = false;\r\n public filters?: ResultEntrySearchFilter;\r\n public orderId: number = -1;\r\n public selectedOrders: Order[] = [];\r\n public abnormalLabel: string = '';\r\n public drawerOpened: boolean = false;\r\n public closeDrawer: BehaviorSubject = new BehaviorSubject(undefined);\r\n\r\n constructor(private orderService: OrderService, private settingsService: SettingsService, private changeDetector: ChangeDetectorRef) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getResultSettings()\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.abnormalLabel = results.abnormalResult;\r\n });\r\n this.closeDrawer.subscribe(() => this.drawerOpened = false);\r\n }\r\n\r\n setFilters(filters: ResultEntrySearchFilter) {\r\n this.filters = filters;\r\n }\r\n\r\n openPreviewDrawer(id: number) {\r\n this.drawerOpened = !this.drawerOpened;\r\n this.orderId = id;\r\n }\r\n\r\n ordersSelectionChanged(orders: Order[]) {\r\n this.selectedOrders = orders;\r\n }\r\n\r\n onSaved() {\r\n this.saved = true;\r\n this.changeDetector.detectChanges();\r\n of(null)\r\n .pipe(take(1), debounceTime(1000))\r\n .subscribe(() => {\r\n this.saved = false;\r\n });\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 {ResultEntryComponent} from \"./pages\";\r\nimport {ResultEntryAccessGuard} from \"./guards/result-entry-access.guard\";\r\n\r\nconst routes: Routes = [ {\r\n path: '',\r\n component: ResultEntryComponent,\r\n canActivate: [FusionAuthGuard, ResultEntryAccessGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic'] },\r\n}];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class ResultEntryRoutingModule { }\r\n","import {Injectable} from '@angular/core';\r\nimport { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';\r\nimport {Observable} from 'rxjs';\r\nimport {take} from \"rxjs/operators\";\r\nimport {FusionAuthService} from \"../../../../shared/services/fusion-auth\";\r\nimport {LabSettingsService} from \"../../../../shared/services/ocl\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ResultEntryAccessGuard {\r\n constructor(private router: Router, private fusionAuthService: FusionAuthService, public labSettingService: LabSettingsService) { }\r\n\r\n canActivate(\r\n route: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree {\r\n return new Promise(resolve => {\r\n this.labSettingService.getResultEntrySettings().pipe(take(1))\r\n .subscribe(async config => {\r\n if (config.resultEntryEnabled) {\r\n const registrations = this.fusionAuthService.Profile.registrations;\r\n if (config.resultEntrySuperUser && registrations[0].roles.includes(\"Superuser\")) {\r\n return resolve(true);\r\n }\r\n if (config.resultEntryClientAdmin && registrations[0].roles.includes(\"Client Admin\")) {\r\n return resolve(true);\r\n }\r\n if (config.resultEntryClientBasic && registrations[0].roles.includes(\"Client Basic\")) {\r\n return resolve(true);\r\n }\r\n await this.router.navigateByUrl('/login');\r\n return resolve(false);\r\n } else {\r\n await this.router.navigateByUrl('/login');\r\n return resolve(false);\r\n }\r\n });\r\n });\r\n }\r\n}\r\n","import * as i2 from '@angular/platform-browser';\nimport { BrowserTransferStateModule } from '@angular/platform-browser';\nimport * as i0 from '@angular/core';\nimport { PLATFORM_ID, Component, Inject, Input, Output, ContentChildren, NgModule } from '@angular/core';\nimport DxValidationSummary from 'devextreme/ui/validation_summary';\nimport * as i1 from 'devextreme-angular/core';\nimport { DxComponent, DxTemplateHost, WatcherHelper, NestedOptionHost, IterableDifferHelper, DxIntegrationModule, DxTemplateModule } from 'devextreme-angular/core';\nimport { DxiItemComponent, DxiItemModule } from 'devextreme-angular/ui/nested';\n\n/*!\r\n * devextreme-angular\r\n * Version: 22.2.6\r\n * Build date: Tue Apr 18 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n *\r\n * This software may be modified and distributed under the terms\r\n * of the MIT license. See the LICENSE file in the root of the project for details.\r\n *\r\n * https://github.com/DevExpress/devextreme-angular\r\n */\r\n/**\r\n * A UI component for displaying the result of checking validation rules for editors.\r\n\r\n */\r\nclass DxValidationSummaryComponent extends DxComponent {\r\n constructor(elementRef, ngZone, templateHost, _watcherHelper, _idh, optionHost, transferState, platformId) {\r\n super(elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId);\r\n this._watcherHelper = _watcherHelper;\r\n this._idh = _idh;\r\n this._createEventEmitters([\r\n { subscribe: 'contentReady', emit: 'onContentReady' },\r\n { subscribe: 'disposing', emit: 'onDisposing' },\r\n { subscribe: 'initialized', emit: 'onInitialized' },\r\n { subscribe: 'itemClick', emit: 'onItemClick' },\r\n { subscribe: 'optionChanged', emit: 'onOptionChanged' },\r\n { emit: 'elementAttrChange' },\r\n { emit: 'hoverStateEnabledChange' },\r\n { emit: 'itemsChange' },\r\n { emit: 'itemTemplateChange' },\r\n { emit: 'validationGroupChange' }\r\n ]);\r\n this._idh.setHost(this);\r\n optionHost.setHost(this);\r\n }\r\n /**\r\n * Specifies the global attributes to be attached to the UI component's container element.\r\n \r\n */\r\n get elementAttr() {\r\n return this._getOption('elementAttr');\r\n }\r\n set elementAttr(value) {\r\n this._setOption('elementAttr', value);\r\n }\r\n /**\r\n * Specifies whether the UI component changes its state when a user pauses on it.\r\n \r\n */\r\n get hoverStateEnabled() {\r\n return this._getOption('hoverStateEnabled');\r\n }\r\n set hoverStateEnabled(value) {\r\n this._setOption('hoverStateEnabled', value);\r\n }\r\n /**\r\n * An array of items displayed by the UI component.\r\n \r\n */\r\n get items() {\r\n return this._getOption('items');\r\n }\r\n set items(value) {\r\n this._setOption('items', value);\r\n }\r\n /**\r\n * Specifies a custom template for items.\r\n \r\n */\r\n get itemTemplate() {\r\n return this._getOption('itemTemplate');\r\n }\r\n set itemTemplate(value) {\r\n this._setOption('itemTemplate', value);\r\n }\r\n /**\r\n * Specifies the validation group for which summary should be generated.\r\n \r\n */\r\n get validationGroup() {\r\n return this._getOption('validationGroup');\r\n }\r\n set validationGroup(value) {\r\n this._setOption('validationGroup', value);\r\n }\r\n get itemsChildren() {\r\n return this._getOption('items');\r\n }\r\n set itemsChildren(value) {\r\n this.setChildren('items', value);\r\n }\r\n _createInstance(element, options) {\r\n return new DxValidationSummary(element, options);\r\n }\r\n ngOnDestroy() {\r\n this._destroyWidget();\r\n }\r\n ngOnChanges(changes) {\r\n super.ngOnChanges(changes);\r\n this.setupChanges('items', changes);\r\n }\r\n setupChanges(prop, changes) {\r\n if (!(prop in this._optionsToUpdate)) {\r\n this._idh.setup(prop, changes);\r\n }\r\n }\r\n ngDoCheck() {\r\n this._idh.doCheck('items');\r\n this._watcherHelper.checkWatchers();\r\n super.ngDoCheck();\r\n super.clearChangedOptions();\r\n }\r\n _setOption(name, value) {\r\n let isSetup = this._idh.setupSingle(name, value);\r\n let isChanged = this._idh.getChanges(name, value) !== null;\r\n if (isSetup || isChanged) {\r\n super._setOption(name, value);\r\n }\r\n }\r\n}\r\n/** @nocollapse */ DxValidationSummaryComponent.ɵfac = function DxValidationSummaryComponent_Factory(t) { return new (t || DxValidationSummaryComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1.DxTemplateHost), i0.ɵɵdirectiveInject(i1.WatcherHelper), i0.ɵɵdirectiveInject(i1.IterableDifferHelper), i0.ɵɵdirectiveInject(i1.NestedOptionHost), i0.ɵɵdirectiveInject(i2.TransferState), i0.ɵɵdirectiveInject(PLATFORM_ID)); };\r\n/** @nocollapse */ DxValidationSummaryComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DxValidationSummaryComponent, selectors: [[\"dx-validation-summary\"]], contentQueries: function DxValidationSummaryComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\r\n i0.ɵɵcontentQuery(dirIndex, DxiItemComponent, 4);\r\n } if (rf & 2) {\r\n let _t;\r\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemsChildren = _t);\r\n } }, inputs: { elementAttr: \"elementAttr\", hoverStateEnabled: \"hoverStateEnabled\", items: \"items\", itemTemplate: \"itemTemplate\", validationGroup: \"validationGroup\" }, outputs: { onContentReady: \"onContentReady\", onDisposing: \"onDisposing\", onInitialized: \"onInitialized\", onItemClick: \"onItemClick\", onOptionChanged: \"onOptionChanged\", elementAttrChange: \"elementAttrChange\", hoverStateEnabledChange: \"hoverStateEnabledChange\", itemsChange: \"itemsChange\", itemTemplateChange: \"itemTemplateChange\", validationGroupChange: \"validationGroupChange\" }, features: [i0.ɵɵProvidersFeature([\r\n DxTemplateHost,\r\n WatcherHelper,\r\n NestedOptionHost,\r\n IterableDifferHelper\r\n ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function DxValidationSummaryComponent_Template(rf, ctx) { }, encapsulation: 2 });\r\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(DxValidationSummaryComponent, [{\r\n type: Component,\r\n args: [{\r\n selector: 'dx-validation-summary',\r\n template: '',\r\n providers: [\r\n DxTemplateHost,\r\n WatcherHelper,\r\n NestedOptionHost,\r\n IterableDifferHelper\r\n ]\r\n }]\r\n }], function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.DxTemplateHost }, { type: i1.WatcherHelper }, { type: i1.IterableDifferHelper }, { type: i1.NestedOptionHost }, { type: i2.TransferState }, { type: undefined, decorators: [{\r\n type: Inject,\r\n args: [PLATFORM_ID]\r\n }] }]; }, { elementAttr: [{\r\n type: Input\r\n }], hoverStateEnabled: [{\r\n type: Input\r\n }], items: [{\r\n type: Input\r\n }], itemTemplate: [{\r\n type: Input\r\n }], validationGroup: [{\r\n type: Input\r\n }], onContentReady: [{\r\n type: Output\r\n }], onDisposing: [{\r\n type: Output\r\n }], onInitialized: [{\r\n type: Output\r\n }], onItemClick: [{\r\n type: Output\r\n }], onOptionChanged: [{\r\n type: Output\r\n }], elementAttrChange: [{\r\n type: Output\r\n }], hoverStateEnabledChange: [{\r\n type: Output\r\n }], itemsChange: [{\r\n type: Output\r\n }], itemTemplateChange: [{\r\n type: Output\r\n }], validationGroupChange: [{\r\n type: Output\r\n }], itemsChildren: [{\r\n type: ContentChildren,\r\n args: [DxiItemComponent]\r\n }] }); })();\r\nclass DxValidationSummaryModule {\r\n}\r\n/** @nocollapse */ DxValidationSummaryModule.ɵfac = function DxValidationSummaryModule_Factory(t) { return new (t || DxValidationSummaryModule)(); };\r\n/** @nocollapse */ DxValidationSummaryModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: DxValidationSummaryModule });\r\n/** @nocollapse */ DxValidationSummaryModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ imports: [[\r\n DxiItemModule,\r\n DxIntegrationModule,\r\n DxTemplateModule,\r\n BrowserTransferStateModule\r\n ], DxiItemModule,\r\n DxTemplateModule] });\r\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(DxValidationSummaryModule, [{\r\n type: NgModule,\r\n args: [{\r\n imports: [\r\n DxiItemModule,\r\n DxIntegrationModule,\r\n DxTemplateModule,\r\n BrowserTransferStateModule\r\n ],\r\n declarations: [\r\n DxValidationSummaryComponent\r\n ],\r\n exports: [\r\n DxValidationSummaryComponent,\r\n DxiItemModule,\r\n DxTemplateModule\r\n ]\r\n }]\r\n }], null, null); })();\r\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && i0.ɵɵsetNgModuleScope(DxValidationSummaryModule, { declarations: [DxValidationSummaryComponent], imports: [DxiItemModule,\r\n DxIntegrationModule,\r\n DxTemplateModule,\r\n BrowserTransferStateModule], exports: [DxValidationSummaryComponent, DxiItemModule,\r\n DxTemplateModule] }); })();\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { DxValidationSummaryComponent, DxValidationSummaryModule };\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { ResultEntryRoutingModule } from './result-entry-routing.module';\r\nimport { ResultEntryComponent } from './pages';\r\nimport { SearchPanelComponent } from './components/search-panel/search-panel.component';\r\nimport {FlexLayoutModule} from \"@angular/flex-layout\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDrawerModule, DxFormModule,\r\n DxNumberBoxModule, DxPopoverModule, DxPopupModule, DxScrollViewModule,\r\n DxSelectBoxModule, DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxToolbarModule, DxValidationSummaryModule, DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport {FormsModule, ReactiveFormsModule} from \"@angular/forms\";\r\nimport {SharedModule} from \"../../shared/shared.module\";\r\nimport {ResultsModule} from \"../results/results.module\";\r\nimport { OrdersGridComponent } from './components/orders-grid/orders-grid.component';\r\nimport { ResultManagerComponent } from './components/result-manager/result-manager.component';\r\nimport {OrderService} from \"./services/order.service\";\r\nimport {OrdersDictionaryService} from \"./components/result-manager/orders-dictionary.service\";\r\nimport { MassResultEntryDialogComponent } from './components/mass-result-entry-dialog/mass-result-entry-dialog.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n ResultEntryComponent,\r\n SearchPanelComponent,\r\n OrdersGridComponent,\r\n ResultManagerComponent,\r\n MassResultEntryDialogComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n DxAccordionModule,\r\n DxDataGridModule,\r\n DxPopupModule,\r\n DxScrollViewModule,\r\n FlexLayoutModule,\r\n DxTextAreaModule,\r\n DxFormModule,\r\n DxValidatorModule,\r\n DxValidationSummaryModule,\r\n DxButtonModule,\r\n DxToolbarModule,\r\n DxCheckBoxModule,\r\n DxSelectBoxModule,\r\n DxPopoverModule,\r\n DxNumberBoxModule,\r\n DxTextBoxModule,\r\n DxDrawerModule,\r\n FlexLayoutModule,\r\n ResultEntryRoutingModule,\r\n SharedModule,\r\n ResultsModule\r\n ],\r\n providers: [\r\n OrderService,\r\n OrdersDictionaryService\r\n ]\r\n})\r\nexport class ResultEntryModule { }\r\n"],"x_google_ignoreList":[33]}