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IAAMhnE,KAAK+mE,QAAQliE,QAC/DoiE,MAAO9T,YAAD,EACN3gC,MAAI,IACKxyB,KAAK+L,kBAAkBo6C,WAD7B,EAGH3zB,MAAI,IAAMxyB,KAAKR,OAAOmL,cAAc,YACnC,CAACmrD,UAAU,GAOT,+CAnEMgR,GAAiB3nE,6EAAjB2nE,EAAiB75C,QAAjB65C,EAAiB,qBAFhB,SAEDA,CAAb,KCuMaO,GAAb,MAAM,MAAOA,EACXhoE,YAAYioE,IACV14D,QAAO,CACL24D,qBAAqB,GAExB,+CALUF,GAASloE,sCAATkoE,EAASG,WAFRhD,mCA5CD,CACTjc,KACAsB,KACAnC,KACA5K,MACA2qB,KACA,CACEC,QAASC,MACTC,SAAUtB,IAEZ,CACEoB,QAASG,KACTD,SAAUf,GACViB,OAAO,GAET,CACEJ,QAASG,KACTD,SAAU9B,GACVgC,OAAO,GAET,CACEJ,QAASG,KACTD,SAAUnB,GACVqB,OAAO,GACN,CACDJ,QAASK,MAETC,WAAY,IAAM,OAElBF,OAAO,GAET,CACEJ,QAASC,MACTM,SAAU5tD,KAA0B,CAClC6tD,YAAY,KAGhB,CACER,QAASrtD,KACT8tD,KAAM,CAACC,SAEV7oB,SAnGC8oB,KACAnS,KACAzW,KACAD,KACAE,KACA4oB,KACAlE,GACAzL,GACAG,GACAnZ,IACAC,IACAC,KACAC,KACAC,IACAC,IACAC,IACAC,IACAC,KACAC,IACAC,KACAC,KACAC,IACAC,IACAC,IACAC,IACA/G,IACAgH,KACAC,IACA70B,KACA80B,IACAC,KACAC,IACAV,KACAW,IACAC,IACAC,IACAC,IACAn1B,KACAo1B,IACAC,IACAC,IACAinB,IACArV,GACA8C,GACAwS,eAIAC,aAAoBpM,GAAU,IAC9BqM,aAAsB,CAAC5B,KACvB6B,cAA6B,iBAAkB,CAAEjW,QAASphD,iBAC1DguC,KACA5F,KACAivB,cAA6B,iBAAkB,CAC7CjW,QAASphD,eACTs3D,qBAAsB,gCAiDfvB,CAAb,wDCnLI/1D,iBACF+I,KAAY,CACVwuD,IAAKv3D,eACLw3D,aAAc,CACZ,IAAIC,MACJ,IAAIC,KAMJ,IAAIC,MAAe,CACjBC,eAAgB,CAAC,KACjBC,uBAAwB9uD,OAE1B,IAAIA,kBAAgC,CAClCH,SAAS,EACTkvD,KAAK,EACLC,OAAO,EACP5/D,SAAS,EACTqpD,QAAQ,EACR/B,KAAK,KAGTuY,iBAAkB,GAClBC,kBAAkB,EAClBC,qBAAqB,EACrBC,eAAgB,IAChBC,OAAO,EACPC,QAAS,uBACTr4D,YAAcA,eAAwC,UAAf,gBA7BzC,EA+BAs4D,SACAvvD,MAAc,eAAgB,QAGhCwvD,OAAyBC,gBAAgBzC,IACtCp9D,KAAK,KACA,kBAAmBugD,WAAal5C,gBAClCk5C,UAAUuf,cAAcC,SAAS,kBAC9B//D,KAAK,KACJoQ,MAAqB,CACnBmrD,SAAUjB,UACVzhB,QAAS,6BACT95B,MAAO,QAHT,GAMD5O,MAAOsb,IACNrb,MAAqB,CACnBmrD,SAAUjB,UACVzhB,QAAS,qDACT95B,MAAO,UAET3O,MAAwBqb,EAAxB,EAdJ,GAkBHtb,MAAMsb,IACLrb,MAAqB,CACnBmrD,SAAUjB,UACVzhB,QAAS,+CACT95B,MAAO,UAET3O,MAAwBqb,EAAxB,EA3BJ,oBCxEA,OACA,aACA,gBACA,WACA,eACA,kBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,cACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,WACA,cACA,aACA,gBACA,aACA,gBACA,YACA,eACA,mBACA,sBACA,kBACA,qBACA,aACA,gBACA,aACA,gBACA,WACA,cACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,iBACA,oBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,iBACA,oBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,cACA,iBACA,aACA,gBACA,cACA,iBACA,cACA,kBACA,qBACA,iBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,mBACA,sBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,oBAIA,cACA,WACA,WACA,CACA,cACA,cACA,8CACA,gCACA7qB,CACA,CACA,WACA,CACAo/D,kBACA,qBACA,EACAA,YACAC,aACAD","names":["Races","i0","PatientFormComponent","constructor","fb","route","router","renderer","clientService","medicationService","diagnosisService","recentPatientService","service","changeDetectorRef","this","group","dob","UntypedFormControl","gender","client","Validators","unit","room","bed","lastName","firstName","medicalRecordId","middleName","phone","email","mobile","physician","diagnoses","medications","responsibleParties","sameAsClient","address","ssn","zipCode","zipCodeExtra","insuranceInformation","sexualOrientation","genderIdentity","race","ethnicity","X","Date","caption","dataField","BehaviorSubject","EventEmitter","Subject","ssnHasError","bind","handleRoomChanges","handleUnitChanges","ngOnInit","isLoading","handleRouteParametersChanges","handleClientChanges","checkPatientIdThenFetchIt","diagnosisDataSource","next","DataSource","store","customStore","medicationsDataSource","sexualOrientationDataSource","sexualOrientations","genderIdentityDataSource","genderIdentities","raceDataSource","ethnicGroupsDataSource","EthnicGroups","tabChanged","detectChanges","snapshot","paramMap","get","patientId","parseFloat","redirectToPath","patientForm","setValue","Number","isInteger","eth","x","value","parseInt","valueChanges","pipe","takeUntil","onDestroy$","subscribe","markAsDirty","unitRequired","unitsCount","unitsDataSource","clientUnitsCustomStore","id","selectRooms","clientRoomsCustomStore","paginate","pageSize","roomUnit","undefined","updateValueAndValidity","PatientClient","unitId","clientRoomsByUnitCustomStore","getPatient","take","patient","birthDate","primaryPhysician","socialSecurityNumber","sort","a","b","order","sameAsClientAddress","code","zipCodePlus4","loadAddressInformation","emit","canDeactivate","notAlert","dirty","medicationChanged","medicationsIds","responsiblePartiesChanged","billingInfoChanged","billingInfo","diagnoseChanged","diagnosesIds","submit","_this","ValidationEngine","isValid","PatientEditable","clientId","roomId","zipCodeName","primaryPhysicianId","sexualOrientationId","genderIdentityId","length","bi","differentThanPatient","relationship","toUpperCase","rp","createPatient","updatePatient","p","forkJoin","of","saveMedications","saveDiagnoses","saveBillingInformation","saveResponsibleParties","r","notify","addRecentPatient","redirect","window","history","back","params","promise","isSsnUnique","toPromise","setErrors","uniqueSSN","then","Promise","resolve","goBack","_this2","navigate","hasParams","_this3","indexOf","hasPatient","navigateByUrl","onDateReady","e","element","component","_pickerType","button","querySelector","input","setStyle","convertToFormControl","absCtrl","ngOnDestroy","complete","selectors","ctx","RequisitionSearchContentComponent","pwaDetectorService","requisitionService","elRef","fusionAuthService","fusionAuthManagement","reportsService","screen","ButtonsDisabled","selectedItemsIds","itemsSelected","ids","dxDataGridComponent","instance","signedRequisitionSelected","getSelectedRowsData","filter","hasSignature","rowClick","rowType","isPhoneOrTablet","sendToPreview","data","waitByUser","user","Profile","responsiveValues","changed","clearSelection","filtersSubmitted","filters","setTimeout","setFilters","role","registrations","roles","startDate","endDate","dataSource","requisitionStore","externalFilters","clientIds","clients","patientIds","patients","physicianIds","physicians","sizes","isPhone","config","floatingActionButtonConfig","icon","shading","direction","maxSpeedDialActionCount","position","my","at","offset","repaintFloatingActionButton","getStatus","requisition","color","status","RequisitionStatus","ngAfterViewInit","storageString","localStorage","getItem","storageName","storedConfig","JSON","parse","selectedRowKeys","setItem","stringify","FABDisabled","signRequisitions","signRequisitionDialogVisible","signDialogClosed","signatureDialogResponse","signature","MultipleRequisitionsSignature","image","username","requisitionsIds","beginCustomLoading","signImage","request","registration","applicationId","environment","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","updateUser","response","CREATED","SignatureImage","endCustomLoading","refresh","isPWA","url","serializeUrl","createUrlTree","open","printRequisitions","generateRequisitionReport","blob","FileUtils","printRequisitionLog","generateRequisitionLog","openEmailFax","type","emailFaxVisible","openUpdateBillTo","updateBillToVisible","closeUpdateBillTo","printLabels","printDialogVisible","onContentReady","DxDataGridComponent","SignatureDialogComponent","close","closeEvent","clear","Username","password","selectedFile","callback","ngOnChanges","changes","popupVisible","currentValue","passwordControl","focus","ready","onFileChanged","event","target","file","files","includes","size","toFixed","imageString","popupComponent","repaint","sign","IsLoggedIn","login","loginId","imageChanged","signedBy","signedAt","now","SignatureUnsingDialogComponent","throwError","ClinicalInfo","Requisition","BaseDataTransferObject","RequisitionBillingInfo","BillToComponent","patientService","ArrayStore","key","buttons","name","disabled","gridHeight","controlsDiv","nativeElement","clientHeight","convertRequisitionBillingInfoPositionToPatientBillingInfoOrder","pbi","i","defaultBillTo","ClientDefaultBillTo","billTypeChanged","onItemClick","itemData","changeUp","changeDown","remove","billTo","selectedBillTo","changeStateButtons","billToChanged","BillTo","selectionChange","debounceTime","DisableUpBtn","DisableDownBtn","getPatientBillingInformation","isEdit","selectedBillingInfo","map","s","patientBillingInformationId","selectedIndex","findIndex","grid","createQuery","toArray","undo","index","forEach","selectedId","DisableChangePositionsBtn","filtered","getIndexesOfSelected","indexes","billTypeId","payerId","insuranceId","push","prev","Math","max","array","min","PrinterDialogComponent","urlProvider","JSPM","JSPrintManager","license_url","ServerUrl","auto_reconnect","start","console","log","catch","Sentry","stop","checkPrinterClientApp","requisitionId","getLabels","labels","requisitionLabels","closing","LoadingPrinters","loading","printers","WS","onStatusChanged","websocket_status","WSStatus","Open","getPrintersInfo","printersList","Closed","showingConfirm","confirm","result","clientAppUpAndRunning","Blocked","clientAppBlocked","sendToPrinter","cpjg","ClientPrintJobGroup","label","cpj2","ClientPrintJob","clientPrinter","InstalledPrinter","selectedPrinter","printerCommands","zpl","epl","jobs","sendToClient","printerChanged","printer","printerString","RecentRequisitionsComponent","recentRequisitionService","recentRequisitions","getRecentRequisitions","lastRequisitionBtnClicked","lastId","RequisitionDoneDialogComponent","redirectToNew","redirectToHome","redirectToEdit","faxPattern","AdditionalCopiesComponent","ref","typeControl","destinationControl","validators","validateDestination","fg","test","pattern","IsEmail","formGroup","IsFax","add","valid","additionalCopy","destination","additionalCopiesControl","reset","selectedKeys","additionalCopies","item","ac","splice","maxHeight","CancelDialogComponent","comment","cancel","commentTextArea","TestPickerComponent","testService","textCodeChanged","cleanLookup","initResponsive","gridSize","GridSize","testControl","tests","resizePickerDropDown","parentElement","style","width","height","dropDownGrid","clearFilter","allTestsCheckboxValueChanged","allTestsInPicker","showAllTestsInPicker","lookup","getDataSource","load","cb","Object","create","pickerDataSource","v","option","codeTextBox","addFoundTests","items","getTestWithChildren","t","text","removeSelectedTest","child","children","childIndex","childId","containerDiv","getBoundingClientRect","pickerEnterKeyEvent","markNodeAsHidden","node","isConfidential","visible","nodesInitialized","nodes","root","RequisitionCreateComponent","allowFiltering","allowSorting","allowResizing","requisitionCreateForm","collectionDate","fasting","priority","additionalTestsDxCodes","diagnosisCodes","billingInformation","comments","moreOptions","hint","saveButtonOptions","IsNotEditable","onClick","openUnsignDialog","cancelButtonOptions","IsRequisitionCancelable","openCancelRequisitionDialog","clearButtonOptions","formData","isReadOnly","testPickerDataSource","selectedClient","switchMap","mode","getRequisition","getRequisitionBillingInformation","getRequisitionSignature","currentDate","setHours","setMinutes","setSeconds","selectedDefaultBillToOnlyForEdit","selectedBillToOnlyForEdit","Moment","treeTests","clinicalInfo","getRequisitionDocuments","docs","Signature","imageSignature","signBtn","unsignBtn","userName","allTests","configureResponsive","IsCancelled","IsPatientSelected","openSignDialog","electronicSignaturePopupVisible","cancelPopupVisible","cancelRequisitionDialogClosed","cancelRequisition","openSignatureDialog","beforeUnloadHandler","canNavigate","returnValue","Status","location","replace","printRequisition","openLabelPrinter","printerDialogVisible","preventDefault","onButtonReady","labelButtons","actionElement","onCollectionDateReady","electronicSignatureUnsignPopupVisible","unsignDialogClosed","unsign","signedDateTime","documentClick","downloadRequisitionDocuments","documentRemove","dialog","custom","title","messageHtml","show","dialogResult","removeRequisitionDocument","hide","fileString","uploadDocument","res","isUploading","itemClick","buttonGroup","resetOption","patientSelectionChanged","selectedPatientChange","alternateDiagnosisDataSource","customStoreFilteredByPatientId","alternateMedicationsDataSource","patientBillingInfo","temp","recentRequisition","req","update","codeValue","clientName","level","join","updateRecentRecentRequisitions","addRecentRecentRequisitions","requisitionDoneVisible","toLocaleString","physicianId","TestUtils","startCase","toLowerCase","diagnoseIds","medicationIds","wasUpdated","DxButtonGroupComponent","$event","RequisitionStatusRadioButtonsComponent","valueChanged","control","selected","values","ElectronicSignatureRadioButtonComponent","today","format","RequisitionSearchComponent","requisitionSearchForm","DateMoreThan","sent","unitDataSource","searchRequisitions","formSubmitted","ClientSelectorComponent","AiAnalysisViewerComponent","orderCode","exists$","checkIfOrderHasBeenAnalyzed","clientEnabled$","checkClient","clientCode","analyzes$","getOrderAnalyzes","CommonModule","i2","i3","AiResultIndicatorComponent","changesDetector","hasBeenAnalyzed","DxTemplateModule","DxTooltipModule","DxLoadIndicatorModule","FlexModule","i4","ResultAnalyzerClientService","http","getAnalysis","builder","HttpRequestBuilder","setUrl","AiAnalyzerUrl","setMethod","getOptions","reportProgress","build","retry","setHeader","checkIfClientIsEnabled","factory","ResultAnalyzerService","userService","IsFeatureEnabled","body","y","analysis","ClinicalResultsComponent","ordersService","sanitizer","getOrderClinicalResults","orderId","results","expandedKeys","calculateNameFilter","selectedFilterOperations","defaultCalculateFilterExpression","apply","arguments","conditionalRendering","isAbnormal","addClass","cellElement","column","updateDimensions","transformYourHtml","htmlTextWithStyle","bypassSecurityTrustHtml","LaboratoryResultsContentComponent","settingsService","OrderBillingInformation","getPatientRoomBed","patientRoom","patientBed","OrderStatus","alert","hasAlert","criticalToxResults","abnormalLabel","criticalMicResults","criticalResults","getWebResultSettings","webResultSettings","getResultSettings","abnormalResult","ack","queryString","acknowledgeOrder","reload","labResultsStore","formatDate","date","tz","printLabResults","generateOrderResults","printOrderLog","generateOrderLog","printOrderDetails","generateOrderDetails","showColumnChooser","ackFilter","onlineAckUser","Array","isArray","acknowledgeOrderSelected","pendingOrderFiler","pendingOrderSelected","signedOrderSelected","testResult","testId","orderResults","find","reportAs","flag","signOrders","signDialogVisible","MultipleOrdersSignature","ordersIds","closeMissingInfo","canceled","missingInfoPopupVisible","openMissingInfo","getOrderBillingInfo","missingInfoData","MicrobiologyResultsComponent","orderService","getMicrobiologyResults","tap","pureMicResults","resultType","ResultType","alphaMicResults","preliminaryReleased","TestStatus","parsedDate","isAfter","viewerReady","removeClass","missingInfoJson","Gender","NPI","Mobile","Fax","Address","City","State","ZipCode","Comments","questions","MissingInfoAutocompleteService","physicianService","addressService","billingService","MissingInfoJson","Questions","IsLoading","isLoading$","Autocompleted","itemAutocompleted","MissingInfoForm","missingInfoForm","onJsonChange","json","keys","hasChanges","handleDiagnoses","handleInsuranceInformation","handleResponsibleParties","handleComments","HandleBirthday","handleGender","handlePhysician","insuranceInfo","info","BillingInformation","isNaN","getTime","error","groupNumber","getZipCodeByCode","zipCodeId","payer","getBestMatch","billType","existingInsuranceInfo","maxSort","reduce","current","information","handlePhysicianByNpi","handlePhysicianByName","rpList","responsibleParty","ResponsibleParty","fax","_this4","existingResponsibleParties","match","_this5","existingDiagnoses","newDiagnoses","npi","_this6","getBestMatchByNpi","_this7","getBestMatchByName","MissingInfoComponent","diagnoseService","dateHelper","elem","autocompleteService","orderingPhysician","hasDiagnosis","commentControl","setHtmlValue","PatientDate","dateWithFormat","onShown","disable","enable","orderEntryAlert","hasOrderingPhysician","hasBillingInformation","birthDateChange","genderChange","hasMissingDiagnosis","some","city","cityId","state","stateId","hasMissingBillingInformation","micButton","orderBillingInformation","OrderBillingInformationEditable","updateMissingInfo","deselectAllBillingInfo","OrderHeaderComponent","Order","ClientWithExtras","PatientSearchWithoutCollections","Physician","dateString","utc","dateWithFormatWithoutUtc","Client","PatientFullName","DOB","Room","Unit","CollectionSites","collectionSites","cs","PatientPrimaryPhysician","PatientAddress","ClientAddress","PathologyResultsComponent","elementRef","getPathologyResults","aux","PathologyReportStatus","sanitize","countAddendum","countRevision","forTracker","html","ToxicologyAlphaComponent","getOrderToxicologyAlphaResults","hasResults","ToxicologyExpectedComponent","getOrderToxicologyConsistentResults","ToxicologyOtherMedicationsComponent","getOrderToxicologyOtherMedications","medicationName","ToxicologyUnexpectedNegativeComponent","getOrderToxicologyInconsistentNegativeResults","ToxicologyUnexpectedPositiveComponent","getOrderToxicologyInconsistentPositiveResults","hasResultEvent","ToxicologyResultsComponent","hasUnexpectedPositiveResults","hasUnexpectedPositive","OrderPriority","OrderPatientInformation","CumulativeResultsComponent","end","clientSelector","startDateControl","endDateControl","handleResponsive","getOrderPatientInformation","orderInfo","getOrderTestsTypes","clinicalResultsVisible","hasClinicalResult","microbiologyResultsVisible","hasMicrobiologyResult","toxicologyResultsVisible","hasToxicologyResult","selectedTab","searchResults","patientLastName","patientFirstName","patientMiddleName","patientBirthDate","patientGender","patientAddress","patientCity","patientState","patientZipCode","toDate","search","filterClients","toxicologyResultsLoading","clinicalResultsLoading","microbiologyResultsLoading","records","loadClinicalResults","loadToxicologyResults","loadMicrobiologyResults","clinicalSelection","clinicalGraph","visibleScroll","clinicalSeriesGraph","selectedRowsData","valueField","clinicalResults","slice","reverse","cr","dateResults","isSame","lastOrder","orders","graphResult","graphTooltip","argument","o","seriesName","getCumulativeResults","clinicalResultsColumns","generateColumns","clinicalRows","generateRows","c","columns","clinicalRow","cells","cell","columnIndex","setProperty","getOrder","ObjectUtils","cellValue","cellIndex","toxicologyResults","toxicologyResultsColumns","toxicologyRows","toxicologyRow","microbiologyResults","microbiologyResultsColumns","microbiologyRows","microbiologyRow","organisms","unshift","columnsCount","testsNames","rows","unmatchedTests","ot","testName","row","toString","recordsValueChanged","onZoomEnd","shift","customizeText","pointInfo","OrderStatusRadioButtonsComponent","fromAlerts","LabResultsComponent","resultsSearchForm","missingInfo","initialSubmit","IsMissingInfoEnabled","showMissingInfo","Units","units","OrderResultsComponent","domService","labSettingsService","urlProviderService","hasToxicologyUnexpectedPositive","getResults","getOder","getOderDocuments","reportCommentFormControl","reportComment","getToxicologySettings","shader","getElementsByClassname","click","CancellationReasons","cancellationReasons","OrderPatient","OrderPhysician","downloadOrderDocuments","removeOrderDocument","printResults","openCumulativeResults","Patient","transformHtml","hasToxicologyUnexpectedPositiveResults","onToolbarReady","PatientCode","CollectionDate","ReceivedDate","receivedDate","ReportedDate","reported","pathologyResultsVisible","hasPathologyResult","patientClient","StandingOrderSearchContentComponent","standingOrderService","editPatient","newStandingOrder","queryParams","editStandingOrder","cancelStandingOrder","patientsStore","getExtremeStore","onRowExpanding","collapseAll","StandingOrderDoneDialogComponent","redirectToNewWithPatient","redirectToSearch","StandingOrderFormComponent","standingOrderForm","testIds","repeatEvery","generateInAdvance","repeatOnMonthlyByDay","endType","after","toISOString","displayTestExpresion","repeatOnMonthlyByDateDataSource","from","_","repeatDataSource","isPhoneLandscape","isTablet","standingOrderId","getStandingOrder","standingOrder","pickerSelectedTestsKey","requisitionComments","selectedDiagnosisOnlyForEdit","scheduler","isMinute","repeat","beforeNotificationValue","schedulerId","sunday","dayOfWeek","monday","tuesday","wednesday","thursday","friday","saturday","first","second","third","fourth","last","days","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","c11","c12","c13","c14","c15","c16","c17","c18","c19","c20","c21","c22","c23","c24","c25","c26","c27","c28","c29","c30","c31","repeatOnMonthlyByDateSelectedEdit","canSave","repeatSelected","repeatOnMonthlyByDateSelected","dayOfWeekSelected","standingOrderDoneVisible","firstChild","onRepeatChange","repeatTypeSelected","selectedItem","repeatType","initialValueGenerateInAdvance","dayOfWeekChange","addedItems","removedItems","endTypeChange","startDateChange","endDateChange","testSelectionChanged","testDropdown","StandingOrderSearchComponent","standingOrderSearchForm","clientsIds","searchStandingOrders","AddressComponent","calculateAddress","zipCodeExtraControl","isSameAsClientControl","setSameAsClientAddress","clean","loadInformation","setDataControl","isSameAsClient","addressControl","clientAddress","zipCodeControl","clientZipCode","concatMap","calculateZipCodePlus4","IsDisabled","BillToTypeComponent","selection","defaultValue","EditBillingInformationComponent","BillType","patientBillingInformation","Payer","InsuranceId","updateAddressControl","differentThanPatientValueChanged","hasInformation","assignBillingInformation","assignInfoPatient","patientBillingInformationTemp","save","patientData","confirmationDialog","BillingInformationComponent","billingInfoService","responsiveButtons","payerChanged","ngAfterViewChecked","billingInfoGrid","closeDialog","deselectAll","selectRowsByIndexes","editingRowInfo","rowIndex","saveEditData","isEditVisible","patientBillingInfoChanged","billTypesDataSource","billingInfoCustomStore","payersDataSource","payerCustomStore","addBtnClicked","removeBtnClicked","selectedRows","allPayers","selectedPayer","selectedBillType","calculateOrder","editBtnClicked","rowInfo","assignPatientData","verifyMissingInformation","loadData","reloadPatientData","saveBtnClicked","selectedRowIndex","payerSelector","loadInfoToUpdate","tempPayer","disableUp","disableDown","ClearAllBtnComponent","UntypedFormGroup","populateClients","clientDropDown","resultEntry","getByRange","limit","customStoreFilteredByClientIds","customStoreFilteredByPhysicianIds","customStoreFilteredByPatientIds","editorElement","onCellPrepared","DxDropDownBoxComponent","CommentsControlComponent","editor","elements","getElementsByClassName","flags","RendererStyleFlags2","containerElement","valueChange","htmlChanged","EmailFaxDialogComponent","emailFaxForm","onTitleRendered","titleElement","validForm","transmission","sendTransmission","FormRelationSelectorComponent","selectRows","every","formRelation","onShowing","currentDataSource","truncatedMode","alternateDataSource","selectionChanged","getSelectedRowKeys","submitSelection","DxPopupComponent","FormRelationGlassComponent","updateDataSource","k","keyExpr","isPopupVisible","textSelector","searchService","removeItem","selectedKey","truncated","FormRelationTitle","IsSelected","FromToDateRangeSelectorComponent","handleChanges","startGroupControl","endGroupControl","LoadingHeaderComponent","PatientInfoPopupComponent","togglePatientInfo","patientInfoVisible","selectedPatient","PatientBirthDate","moment","PatientGender","PatientSSN","PatientPhysicianHeaderComponent","innerSignature","patientControl","physicianControl","sameAsPrimaryPhysician","sameAsPrimary","lastPhysician","PatientResponsiblePartyFormDialogComponent","country","responsiblePartiesForm","closed","PatientResponsiblePartiesComponent","showForm","isEditorVisible","formClosed","getNextOrder","lastLame","removeClicked","ClientPhysicianSelectorDialogComponent","clientPhysicianDialogForm","selectedRoom","selectedUnit","updatePatientClientPhysician","PatientSelectorDialogComponent","_ref","patientDialogForm","newPatientButtonOptions","searched","newPatient","closeButtonOptions","getRecentPatientsDropDownGridElement","resizeDropDown","display","checkRecent","keyEvent","fromSearch","submitSearch","recentPatients","getRecentPatients","recentAvailable","getBody","lastNameTextBox","resultSelected","searchedPatients","subtitle","webAccess","clientPopupVisible","checkPatientClients","closeForm","searchPatient","onBirthDateReady","dropdownButtonReady","PatientSelectorComponent","host","buttonMode","showSearch","SearchBtnText","PhysicianSelectorDialogComponent","physicianDialogForm","overflow","searchedPhysicians","patientClientId","searchCustomStore","PhysicianSelectorComponent","selectedPhysician","SearchPhysicianText","PhysicianFullName","PrinterDialogMultipleComponent","arrayRequest","requisitionIds","isOrder","concat","SearchBtnComponent","SelectorComponent","dropDown","DxSelectBoxComponent","SignatureViewerComponent","SignatureDate","HasImage","bypassSecurityTrustResourceUrl","requisitionSignature","orderSignature","SingleCardComponent","SingleCardModule","DxScrollViewModule","UpdateBillToComponent","changeBillTo","BillingService","httpClient","SECURED_STORE","tokenRefresh","exchangeRefreshTokenForJWT","loadParams","routerService","loadUrl","ApiUrl","DiagnosisService","codes","requests","arr","MedicationService","AddressService","ClientService","advancedSearchStore","clientIdsArray","patientIdsArray","getClientsByIds","OrdersService","post","alertResults","ordersIdsOnQueryString","put","documentName","httpOptions","headers","HttpHeaders","responseType","append","getToken","fileBase64","fileName","capitalize","documentId","delete","clientsId","PatientService","getPatientField","field","InsuranceInformation","getByIds","PhysicianService","customStoreByClientsIds","physicianIdsArray","firstname","lastname","RecentPatientService","verifyRecentPatients","static","Worker","recent","patientsIds","deleteDate","shouldBeDeletedDate","isBefore","isLocalStorageAvailable","exists","recentDate","patientsString","hasAny","RecentRequisitionService","verifyRecentRequisitions","requisitions","reqString","ReportsService","generateRequest","requisitionIdsArray","generateOrderPreview","orderIds","orderIdsArray","generateCumulativeResults","TreeTest","RequisitionService","treeTest","alternateNames","parentId","parentTestId","SettingsService","TestService","ownerId","treeBuilder","allTest","treeCustomStore","onLoaded","testIdsArray","getIdsTestWithChildren","SharedModule","imports","FormsModule","FlexLayoutModule","ReactiveFormsModule","DxTextBoxModule","DxSelectBoxModule","DxValidatorModule","DxTreeListModule","DxPopupModule","DxDateBoxModule","DxHtmlEditorModule","DxButtonModule","DxTextAreaModule","DxAccordionModule","DxLookupModule","DxNumberBoxModule","DxChartModule","DxCheckBoxModule","DxTabPanelModule","DxFormModule","DxPopoverModule","DxListModule","DxToolbarModule","DxLoadPanelModule","DxButtonGroupModule","DxSpeedDialActionModule","DxRadioGroupModule","DxDropDownButtonModule","DxDropDownBoxModule","DxDataGridModule","DxTagBoxModule","DxSwitchModule","MicToJsonService","mediaService","handleRecording","configureMicListener","RecordingAvailable","transcriptionAvailable$","jsonAvailable$","JsonAvailable","TranscriptionAvailable","Area","area","FileName","handleMicClick","IsMicListening","stopRecording","startRecording","JsonObject","jsonStructure","generateJsonFromTranscript","isDocumentGenerationEnabledForArea","transcript","FormData","enctype","message","chunks","Blob","MicToJsonButtonComponent","detectionSubscription","unsubscribe","transcriptionAvailableSubscription","Changes","isPopUpVisible","jsonParsingSubscription","jsonAvailable","IsEnabled","discard","generateDocument","styles","thanControlName","parent","thanControl","controls","day","month","year","split","day2","month2","year2","mustBeMoreThan","DirtyCheckGuard","FusionAuthGuard","fusionAuth","canActivate","routeRoles","validateJWT","getRefreshToken","FusionAuthService","storage","handler","baseUrl","changePassword","setUri","setJsonBody","refreshToken","HttpStatusCode","token","cleanCredentials","setLoggedIn","forgotPassword","skipInterceptor","imageUrl","generateGravatarUrl","String","hasBeenLogged","clearHasBeenLogged","logout","globalLogout","setUrlParameter","skipInter","httpRequestBuilder","HttpClient","FusionAuthManagementService","appInfo","getFusionAuthApplication","getApplicationRoles","application","getUsers","users","setRoleToUsers","existUser","deleteUser","userId","observe","createUser","registrationRequest","addUriSegment","createPatientUser","DateHelperService","AppInfoService","_AppInfoService_config","applicationTitle","applicationLogo","laboratoryName","laboratoryAddress","laboratoryPhone","laboratoryEmail","__classPrivateFieldGet","logo","lab","labAddress","labPhone","AuthService","logIn","loggedIn","logOut","isLoggedIn","DOMService","document","className","DOCUMENT","StorageService","cookieService","getDeviceId","deviceId","makeDeviceId","set","floor","random","getCookie","prefix","storeCookie","fullKey","removeStorage","ScreenService","breakpointObserver","Breakpoints","isMatched","isLargeScreen","isDesktop","isLarge","isXLarge","PWADetectorService","matchMedia","matches","navigator","standalone","referrer","UrlProviderService","ContactService","sendEmail","LabSettingsService","getSettings","logoRequest","licenseRequest","billingRequest","reportRequest","logoResponse","billingResponse","reportResponse","licenseResponse","getWebSupplyCategorySettings","getResultEntrySettings","StandingOrderService","createStore","onBeforeSend","operation","ajaxSettings","authorization","method","standingOrderIds","SupplyService","supply","MediaService","_MediaService_stream","_MediaService_recorder","initializeMicButton","Timer","timer","recordingAvailable$","IsMicAvailable","micAvailable","isListening$","timerSeconds","Error","takeWhile","startListening","__classPrivateFieldSet","MediaRecorder","mimeType","ondataavailable","onstop","stopListening","openMediaDevices","constraints","mediaDevices","getUserMedia","captureException","hasMediaDevices","enumerateDevices","device","kind","audio","noiseSuppression","echoCancellation","video","preferCurrentTab","getTracks","track","reader","FileReader","onloadend","readAsDataURL","windowRef","htmlInputElement","convertFileToBase64","invokedFromGrid","FileSaver","ie","userAgent","ie11","ieEDGE","ieVer","msSaveBlob","webkitURL","fileURL","createObjectURL","handlePopupBlocker","URL","emailHash","MD5","HttpSimpleEncodingCodec","encodeKey","encodeURIComponent","encodeValue","decodeKey","decodeURIComponent","decodeValue","parameters","HttpParams","encoder","segment","uri","charAt","getFullUrl","withCredentials","errorHandler","onAjaxError","xhr","StatusCodes","obj","flat","toFlatten","flatten","objects","allKeys","object","union","Set","Map","RequisitionTest","requisitionTests","requisitionTest","parentTest","getId","serverUrl","production","aiEnabled","cryptoPassphrase","frontendUrl","apiUrl","apiKey","tenantId","portalBackend","aiAnalysis","enabled","enabledRoles","aiCommands","areas","sentry","dns","FooterComponent","Year","FooterModule","FusionAuthActionTypes","LogIn","payload","LOGIN","LogInSuccess","LOGIN_SUCCESS","LogInFailure","LOGIN_FAILURE","LogOut","LOGOUT","ThemeToggleComponent","theme","themes","toggleChange","isDarkTheme","changeTheme","UserProfileComponent","userForm","oldPassword","newPassword","passwordButton","passwordMode","currentPassword","UserPanelComponent","profile","UserPanelModule","DxContextMenuModule","navigation","path","hiddenInMobile","hidden","TopNavigationMenuComponent","labSettingService","waitForUser","resultEntryEnabled","routes","resultEntrySuperUser","resultEntryClientAdmin","resultEntryClientBasic","isChildrenActivated","RouteTarget","HeaderComponent","userProfilePopup","dispatch","menuToggle","HeaderModule","RouterModule","LayoutModule","SideNavigationMenuComponent","menu","selectItem","compactMode","_compactMode","val","updateSelection","nodeClass","selectedClass","rootNodes","querySelectorAll","classList","selectedNode","contains","selectedItemChanged","onMenuInitialized","events","openMenu","DxTreeViewComponent","SideNavigationMenuModule","DxTreeViewModule","SideNavInnerToolbarComponent","applicationInfo","menuOpened","stopPropagation","NavigationEnd","selectedRoute","urlAfterRedirects","updateDrawer","isXSmall","menuMode","menuRevealMode","minMenuSize","shaderEnabled","hideMenuAfterNavigation","temporaryMenuOpened","showMenuAfterClick","navigationChanged","pointerEvent","navigationClick","SideNavInnerToolbarModule","DxDrawerModule","TopNavigationToolbarComponent","TopNavigationToolbarModule","EmptyLayoutFooterComponent","EmptyLayoutComponent","MainLayoutComponent","idle","keepalive","setIdle","setInterrupts","DEFAULT_INTERRUPTSOURCES","onIdleEnd","idleState","onTimeout","timedOut","onIdleStart","onTimeoutWarning","countdown","interval","onPing","lastPing","getClass","cl","IsAlmostTimedOut","startsWith","watch","IsDesktop","ContactUsComponent","authService","contactService","contactForm","onInitialized","NOT_FOUND","PrivacyComponent","SupplyRequestComponent","supplyService","settingService","supplyRequestForm","supplies","getFilteredConfigs","configDataSource","initForm","supplyCategories","options","quantity","configSelected","TermsConditionsComponent","LoadingComponent","LoginViewModel","_loginId","_password","ip","_ip","_applicationId","initialState","isAuthenticated","errorMessage","reducers","auth","reducer","action","selectAuthState","createFeatureSelector","TrackCapsDirective","onKeyDown","capsOn","getModifierState","capsLock","onKeyUp","LoginComponent","render","handleKeyboardEvent","renderCapsLockMessage","changeCapsOn","insertAdjacentHTML","getElementById","removeChild","renderResponseErrorMessage","errorElement","select","DxFormComponent","PasswordRecoveryComponent","form","validate","sendForgotPasswordEmail","redirectToLogin","Logo","Lab","PatientSignUpComponent","patientSignUpForm","active","catchError","err","BAD_REQUEST","GlassComponent","populateGridData","selectedItemsKeys","fromRemove","gridItems","disableInEdit","selectedItemsRowsOnlyEdit","itemsToAdd","selectedItemNoAccess","populateDropDownData","dropDownSelectedRow","dropDownSelectionChanged","dropDownSelectedItemValue","gridSelectedRow","canRemove","disabledKeys","currentSelectedRowKeys","deselectRows","onRowPrepared","rowElement","command","UserFormComponent","initClientsGlass","initPatientsGlass","initPhysiciansGlass","roleChanged","onTabSelectionChange","clientsGlassDropDownColumns","hidingPriority","clientsGlassGridColumns","physiciansGlassDropDownColumns","physiciansGlassGridColumns","patientsGlassDropDownColumns","dataType","patientsGlassGridColumns","activeTab","tab","roleIndex","toLocaleLowerCase","isBackgroundLoading","lastClientsSelected","clientsOnlyForEdit","lastPhysiciansSelected","physiciansOnlyForEdit","lastPatientsSelected","patientsOnlyForEdit","tabIndex","lastTabIndex","authenticatedUser","authenticatedRole","formVisible","emailControl","clearDataSelected","resetValues","formResult","clientSelected","patientSelected","physicianSelected","notifyError","createOrUpdateUser","clientsGlassChanged","selectedClients","patientsGlassChanged","selectedPatients","physiciansGlassChanged","selectedPhysicians","selectorRoles","UserComponent","onToolbarPreparing","toolbarOptions","widget","sendToEdit","selectedUser","submitted","parseDate","resendEmail","selectedRowData","redirectTo","pathMatch","loadChildren","m","ResultsModule","ResultEntryModule","loadComponent","__webpack_require__","mod","OrderExportComponent","RequisitionsModule","StandingOrdersModule","PatientModule","AppRoutingModule","preloadingStrategy","PreloadAllModules","SentryBreadcrumbCategory","AppComponent","titleService","laboratorySettings","swUpdate","onRightClick","metaKey","ctrlKey","serviceWorkerInit","versionUpdates","currentVersion","hash","versionAvailable","latestVersion","setInterval","isEnabled","checkForUpdate","category","activateUpdate","settings","setTitle","onMouseMove","onKeyPress","GlobalHttpInterceptorService","intercept","handle","HttpErrorResponse","onLine","clone","setHeaders","Authorization","GlobalInterceptorService","handleError","href","HttpHeaderInterceptor","jwtToken","has","We","CacheInterceptorService","FusionAuthEffects","actions","createEffect","ofType","scope","setUser","isUserLogged","AppModule","trace","forceIsoDateParsing","bootstrap","CookieService","provide","ErrorHandler","useClass","HTTP_INTERCEPTORS","multi","APP_INITIALIZER","useFactory","useValue","showDialog","deps","Router","BrowserModule","HttpClientModule","DxToastModule","NgIdleKeepaliveModule","StoreModule","EffectsModule","ServiceWorkerModule","registrationStrategy","dsn","integrations","Dedupe","ExtraErrorData","BrowserTracing","tracingOrigins","routingInstrumentation","dom","fetch","tracesSampleRate","attachStacktrace","autoSessionTracking","maxBreadcrumbs","debug","release","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","serviceWorker","register","webpackContext","module"],"sourceRoot":"webpack:///","sources":["./src/app/modules/shared/models/common/race.ts","./src/app/modules/features/patient/pages/patient-form/patient-form.component.html","./src/app/modules/features/patient/pages/patient-form/patient-form.component.ts","./src/app/modules/features/requisitions/components/requisition-search-content/requisition-search-content.component.html","./src/app/modules/features/requisitions/components/requisition-search-content/requisition-search-content.component.ts","./src/app/modules/features/requisitions/components/signature-dialog/signature-dialog.component.html","./src/app/modules/features/requisitions/components/signature-dialog/signature-dialog.component.ts","./src/app/modules/features/requisitions/components/signature-unsing-dialog/signature-unsing-dialog.component.html","./src/app/modules/features/requisitions/components/signature-unsing-dialog/signature-unsing-dialog.component.ts","./src/app/modules/features/requisitions/models/requisition-search.ts","./src/app/modules/features/requisitions/models/requisition.ts","./src/app/modules/features/requisitions/models/requisition-billing-infog.ts","./src/app/modules/shared/components/bill-to/bill-to.component.ts","./src/app/modules/shared/components/bill-to/bill-to.component.html","./src/app/modules/shared/components/printer-dialog/printer-dialog.component.html","./src/app/modules/shared/components/printer-dialog/printer-dialog.component.ts","./src/app/modules/features/requisitions/components/recent-requisitions/recent-requisitions.component.html","./src/app/modules/features/requisitions/components/recent-requisitions/recent-requisitions.component.ts","./src/app/modules/features/requisitions/components/requisition-done-dialog/requisition-done-dialog.component.html","./src/app/modules/features/requisitions/components/requisition-done-dialog/requisition-done-dialog.component.ts","./src/app/modules/features/requisitions/components/additional-copies/additional-copies.component.html","./src/app/modules/features/requisitions/components/additional-copies/additional-copies.component.ts","./src/app/modules/features/requisitions/components/cancel-dialog/cancel-dialog.component.html","./src/app/modules/features/requisitions/components/cancel-dialog/cancel-dialog.component.ts","./src/app/modules/features/requisitions/components/test-picker/test-picker.component.html","./src/app/modules/features/requisitions/components/test-picker/test-picker.component.ts","./src/app/modules/features/requisitions/pages/requisition-create/requisition-create.component.html","./src/app/modules/features/requisitions/pages/requisition-create/requisition-create.component.ts","./src/app/modules/features/requisitions/components/requisition-status-radio-buttons/requisition-status-radio-buttons.component.ts","./src/app/modules/features/requisitions/components/requisition-status-radio-buttons/requisition-status-radio-buttons.component.html","./src/app/modules/features/requisitions/components/electronic-signature-radio-button/electronic-signature-radio-button.component.ts","./src/app/modules/features/requisitions/components/electronic-signature-radio-button/electronic-signature-radio-button.component.html","./src/app/modules/features/requisitions/pages/requisition-search/requisition-search.component.html","./src/app/modules/features/requisitions/pages/requisition-search/requisition-search.component.ts","./src/app/modules/features/result-ai/components/ai-analysis-viewer/ai-analysis-viewer.component.html","./src/app/modules/features/result-ai/components/ai-analysis-viewer/ai-analysis-viewer.component.ts","./src/app/modules/features/result-ai/components/ai-result-indicator/ai-result-indicator.component.html","./src/app/modules/features/result-ai/components/ai-result-indicator/ai-result-indicator.component.ts","./src/app/modules/features/result-ai/services/result-analyzer-client.service.ts","./src/app/modules/features/result-ai/services/result-analyzer.service.ts","./src/app/modules/features/results/components/clinical-results/clinical-results.component.html","./src/app/modules/features/results/components/clinical-results/clinical-results.component.ts","./src/app/modules/features/results/components/laboratory-results-content/laboratory-results-content.component.html","./src/app/modules/features/results/components/laboratory-results-content/laboratory-results-content.component.ts","./src/app/modules/features/results/components/microbiology-results/microbiology-results.component.html","./src/app/modules/features/results/components/microbiology-results/microbiology-results.component.ts","./src/app/modules/features/results/components/missing-info/missing-info-autocomplete.service.ts","./src/app/modules/features/results/components/missing-info/missing-info.component.html","./src/app/modules/features/results/components/missing-info/missing-info.component.ts","./src/app/modules/features/results/components/order-header/order-header.component.ts","./src/app/modules/features/results/components/order-header/order-header.component.html","./src/app/modules/features/results/components/pathology-results/pathology-results.component.html","./src/app/modules/features/results/components/pathology-results/pathology-results.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-alpha/toxicology-alpha.component.html","./src/app/modules/features/results/components/toxicology-results/toxicology-alpha/toxicology-alpha.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-expected/toxicology-expected.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-expected/toxicology-expected.component.html","./src/app/modules/features/results/components/toxicology-results/toxicology-other-medications/toxicology-other-medications.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-other-medications/toxicology-other-medications.component.html","./src/app/modules/features/results/components/toxicology-results/toxicology-unexpected-negative/toxicology-unexpected-negative.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-unexpected-negative/toxicology-unexpected-negative.component.html","./src/app/modules/features/results/components/toxicology-results/toxicology-unexpected-positive/toxicology-unexpected-positive.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-unexpected-positive/toxicology-unexpected-positive.component.html","./src/app/modules/features/results/components/toxicology-results/toxicology-results.component.ts","./src/app/modules/features/results/components/toxicology-results/toxicology-results.component.html","./src/app/modules/features/results/models/order-billing-information.ts","./src/app/modules/features/results/models/order.ts","./src/app/modules/features/results/models/results.ts","./src/app/modules/features/results/models/cumulative-result.ts","./src/app/modules/features/results/pages/cumulative-results/cumulative-results.component.html","./src/app/modules/features/results/pages/cumulative-results/cumulative-results.component.ts","./src/app/modules/features/results/components/order-status-radio-buttons/order-status-radio-buttons.component.ts","./src/app/modules/features/results/components/order-status-radio-buttons/order-status-radio-buttons.component.html","./src/app/modules/features/results/pages/lab-results/lab-results.component.html","./src/app/modules/features/results/pages/lab-results/lab-results.component.ts","./src/app/modules/features/results/pages/order-results/order-results.component.html","./src/app/modules/features/results/pages/order-results/order-results.component.ts","./src/app/modules/features/standing-orders/components/standing-order-search-content/standing-order-search-content.component.html","./src/app/modules/features/standing-orders/components/standing-order-search-content/standing-order-search-content.component.ts","./src/app/modules/features/standing-orders/components/standing-order-done-dialog/standing-order-done-dialog.component.html","./src/app/modules/features/standing-orders/components/standing-order-done-dialog/standing-order-done-dialog.component.ts","./src/app/modules/features/standing-orders/pages/standing-order-form/standing-order-form.component.html","./src/app/modules/features/standing-orders/pages/standing-order-form/standing-order-form.component.ts","./src/app/modules/features/standing-orders/pages/standing-order-search/standing-order-search.component.html","./src/app/modules/features/standing-orders/pages/standing-order-search/standing-order-search.component.ts","./src/app/modules/shared/components/address/address.component.html","./src/app/modules/shared/components/address/address.component.ts","./src/app/modules/shared/components/bill-to-type/bill-to-type.component.ts","./src/app/modules/shared/components/bill-to-type/bill-to-type.component.html","./src/app/modules/shared/components/billing-information/edit-billing-information/edit-billing-information.component.html","./src/app/modules/shared/components/billing-information/edit-billing-information/edit-billing-information.component.ts","./src/app/modules/shared/components/billing-information/billing-information.component.html","./src/app/modules/shared/components/billing-information/billing-information.component.ts","./src/app/modules/shared/components/clear-all-btn/clear-all-btn.component.ts","./src/app/modules/shared/components/clear-all-btn/clear-all-btn.component.html","./src/app/modules/shared/components/client-selector/client-selector.component.html","./src/app/modules/shared/components/client-selector/client-selector.component.ts","./src/app/modules/shared/components/comments-control/comments-control.component.html","./src/app/modules/shared/components/comments-control/comments-control.component.ts","./src/app/modules/shared/components/email-fax-dialog/email-fax-dialog.component.html","./src/app/modules/shared/components/email-fax-dialog/email-fax-dialog.component.ts","./src/app/modules/shared/components/form-relation-selector/form-relation-selector.component.html","./src/app/modules/shared/components/form-relation-selector/form-relation-selector.component.ts","./src/app/modules/shared/components/form-relation-glass/form-relation-glass.component.html","./src/app/modules/shared/components/form-relation-glass/form-relation-glass.component.ts","./src/app/modules/shared/components/from-to-date-range-selector/from-to-date-range-selector.component.ts","./src/app/modules/shared/components/from-to-date-range-selector/from-to-date-range-selector.component.html","./src/app/modules/shared/components/loading-header/loading-header.component.ts","./src/app/modules/shared/components/loading-header/loading-header.component.html","./src/app/modules/shared/components/patient-info-popup/patient-info-popup.component.html","./src/app/modules/shared/components/patient-info-popup/patient-info-popup.component.ts","./src/app/modules/shared/components/patient-physician-header/patient-physician-header.component.html","./src/app/modules/shared/components/patient-physician-header/patient-physician-header.component.ts","./src/app/modules/shared/components/patient-responsible-parties/patient-responsible-party-form-dialog/patient-responsible-party-form-dialog.component.html","./src/app/modules/shared/components/patient-responsible-parties/patient-responsible-party-form-dialog/patient-responsible-party-form-dialog.component.ts","./src/app/modules/shared/components/patient-responsible-parties/patient-responsible-parties.component.html","./src/app/modules/shared/components/patient-responsible-parties/patient-responsible-parties.component.ts","./src/app/modules/shared/components/client-selector/client-physician-selector-dialog/client-physician-selector-dialog.component.html","./src/app/modules/shared/components/client-selector/client-physician-selector-dialog/client-physician-selector-dialog.component.ts","./src/app/modules/shared/components/patient-selector/patient-selector-dialog/patient-selector-dialog.component.html","./src/app/modules/shared/components/patient-selector/patient-selector-dialog/patient-selector-dialog.component.ts","./src/app/modules/shared/components/patient-selector/patient-selector.component.html","./src/app/modules/shared/components/patient-selector/patient-selector.component.ts","./src/app/modules/shared/components/physician-selector/physician-selector-dialog/physician-selector-dialog.component.html","./src/app/modules/shared/components/physician-selector/physician-selector-dialog/physician-selector-dialog.component.ts","./src/app/modules/shared/components/physician-selector/physician-selector.component.html","./src/app/modules/shared/components/physician-selector/physician-selector.component.ts","./src/app/modules/shared/components/printer-dialog-multiple/printer-dialog-multiple.component.html","./src/app/modules/shared/components/printer-dialog-multiple/printer-dialog-multiple.component.ts","./src/app/modules/shared/components/search-btn/search-btn.component.ts","./src/app/modules/shared/components/search-btn/search-btn.component.html","./src/app/modules/shared/components/selector/selector.component.html","./src/app/modules/shared/components/selector/selector.component.ts","./src/app/modules/shared/components/signature-viewer/signature-viewer.component.html","./src/app/modules/shared/components/signature-viewer/signature-viewer.component.ts","./src/app/modules/shared/components/single-card/single-card.component.ts","./src/app/modules/shared/components/single-card/single-card.component.html","./src/app/modules/shared/components/update-bill-to/update-bill-to.component.html","./src/app/modules/shared/components/update-bill-to/update-bill-to.component.ts","./src/app/modules/shared/models/base-data-transfer-object.ts","./src/app/modules/shared/models/billing/bill-type.ts","./src/app/modules/shared/models/billing/billing-information.ts","./src/app/modules/shared/models/common/ethnicity.ts","./src/app/modules/shared/models/order-entry/reponsible-party.ts","./src/app/modules/shared/models/order-entry/client.ts","./src/app/modules/shared/models/order-entry/patient.ts","./src/app/modules/shared/models/order-entry/physician.ts","./src/app/modules/shared/models/signature.ts","./src/app/modules/shared/services/billing.service.ts","./src/app/modules/shared/services/diagnosis.service.ts","./src/app/modules/shared/services/medication.service.ts","./src/app/modules/shared/services/address.service.ts","./src/app/modules/shared/services/client.service.ts","./src/app/modules/shared/services/orders.service.ts","./src/app/modules/shared/services/patient.service.ts","./src/app/modules/shared/services/physician.service.ts","./src/app/modules/shared/services/recent-patient.service.ts","./src/app/modules/shared/services/recent-requisition.service.ts","./src/app/modules/shared/services/reports.service.ts","./src/app/modules/shared/models/order-entry/test.ts","./src/app/modules/shared/services/requisition.service.ts","./src/app/modules/shared/services/settings.service.ts","./src/app/modules/shared/services/test.service.ts","./src/app/modules/shared/shared.module.ts","./src/app/shared/components/ocl/mic-to-json-button/mic-to-json.service.ts","./src/app/shared/components/ocl/mic-to-json-button/mic-to-json-button.component.html","./src/app/shared/components/ocl/mic-to-json-button/mic-to-json-button.component.ts","./src/app/shared/custom-validations/date-validations.ts","./src/app/shared/guard/dirty-check-guard.ts","./src/app/shared/guard/fusion-auth.guard.ts","./src/app/shared/services/fusion-auth/fusion-auth.service.ts","./src/app/shared/services/fusion-auth/fusion-auth-management.service.ts","./src/app/shared/services/general/date-helper.service.ts","./src/app/shared/services/general/app-info.service.ts","./src/app/shared/services/general/auth.service.ts","./src/app/shared/services/general/dom.service.ts","./src/app/shared/services/general/storage.service.ts","./src/app/shared/services/general/screen.service.ts","./src/app/shared/services/general/pwa-detector.service.ts","./src/app/shared/services/general/url-provider.service.ts","./src/app/shared/services/ocl/contact.service.ts","./src/app/shared/services/ocl/lab-settings.service.ts","./src/app/shared/services/ocl/standing-order.service.ts","./src/app/shared/services/ocl/supply-service.ts","./src/app/shared/services/ocl/media.service.ts","./src/app/shared/utils/file-utils.ts","./src/app/shared/utils/gravatar.ts","./src/app/shared/utils/http-utils.ts","./src/app/shared/utils/object-utils.ts","./src/app/modules/features/requisitions/models/requisition-test.ts","./src/app/shared/utils/test-utils.ts","./src/environments/environment.prod.ts","./src/app/shared/components/layout/footer/footer.component.ts","./src/app/stores/actions/fusion-auth.actions.ts","./src/app/shared/components/layout/theme-toggle/theme-toggle.component.ts","./src/app/shared/components/layout/theme-toggle/theme-toggle.component.html","./src/app/shared/components/ocl/user-profile/user-profile.component.html","./src/app/shared/components/ocl/user-profile/user-profile.component.ts","./src/app/shared/components/layout/user-panel/user-panel.component.html","./src/app/shared/components/layout/user-panel/user-panel.component.ts","./src/app/app-navigation.ts","./src/app/shared/components/layout/top-navigation-menu/top-navigation-menu.component.html","./src/app/shared/components/layout/top-navigation-menu/top-navigation-menu.component.ts","./src/app/shared/components/layout/header/header.component.html","./src/app/shared/components/layout/header/header.component.ts","./src/app/shared/components/layout/side-navigation-menu/side-navigation-menu.component.ts","./src/app/shared/components/layout/side-navigation-menu/side-navigation-menu.component.html","./src/app/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.component.html","./src/app/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.component.ts","./src/app/layouts/top-navigation-toolbar/top-navigation-toolbar.component.ts","./src/app/layouts/top-navigation-toolbar/top-navigation-toolbar.component.html","./src/app/layouts/empty-layout/emty-layout-footer/empty-layout-footer.component.html","./src/app/layouts/empty-layout/emty-layout-footer/empty-layout-footer.component.ts","./src/app/layouts/empty-layout/empty-layout.component.ts","./src/app/layouts/empty-layout/empty-layout.component.html","./src/app/layouts/main-layout/main-layout.component.html","./src/app/layouts/main-layout/main-layout.component.ts","./src/app/pages/general/contact-us/contact-us.component.ts","./src/app/pages/general/contact-us/contact-us.component.html","./src/app/pages/general/privacy/privacy.component.ts","./src/app/pages/general/privacy/privacy.component.html","./src/app/pages/general/supply-request/supply-request.component.html","./src/app/pages/general/supply-request/supply-request.component.ts","./src/app/pages/general/terms-conditions/terms-conditions.component.ts","./src/app/pages/general/terms-conditions/terms-conditions.component.html","./src/app/pages/loading/loading.component.ts","./src/app/pages/loading/loading.component.html","./src/app/shared/models/general/login-view-model.ts","./src/app/stores/state/fusion-auth.state.ts","./src/app/stores/app.state.ts","./src/app/shared/directive/track-caps.directive.ts","./src/app/pages/security/login/login.component.ts","./src/app/pages/security/login/login.component.html","./src/app/pages/security/password-recovery/password-recovery.component.html","./src/app/pages/security/password-recovery/password-recovery.component.ts","./src/app/pages/security/patient-sign-up/patient-sign-up.component.ts","./src/app/pages/security/patient-sign-up/patient-sign-up.component.html","./src/app/modules/shared/components/glass/glass.component.html","./src/app/modules/shared/components/glass/glass.component.ts","./src/app/pages/system/user/user-form/user-form.component.html","./src/app/pages/system/user/user-form/user-form.component.ts","./src/app/pages/system/user/user.component.html","./src/app/pages/system/user/user.component.ts","./src/app/app-routing.module.ts","./src/enum/sentry-breadcrumb-category.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/shared/interceptor/fusion-auth-refresh-token-interceptor.service.ts","./src/app/shared/interceptor/global-http-interceptor.service.ts","./src/app/shared/interceptor/global-interceptor.service.ts","./src/app/shared/interceptor/http.interceptor.ts","./src/app/shared/interceptor/cache-interceptor.service.ts","./src/app/stores/effects/fusion-auth.effects.ts","./src/app/app.module.ts","./src/main.ts","./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["export const Races = [\r\n 'ALASKA NATIVE',\r\n 'AMERICAN INDIAN',\r\n 'ASIAN',\r\n 'BLACK OR AFRICAN AMERICAN',\r\n 'NATIVE HAWAIIAN',\r\n 'WHITE',\r\n 'MULTIRACIAL',\r\n 'OTHER PACIFIC ISLANDER',\r\n 'OTHER RACE',\r\n 'ASKED BUT UNKNOWN',\r\n 'DOES NOT WISH TO DISCLOSE',\r\n 'HISPANIC OR LATINO',\r\n 'NOT PROVIDED',\r\n];\r\n","
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n New Patient\r\n \r\n \r\n Edit Patient\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n

Client Information

\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
Bed
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Medical Record Id\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n

Patient Information

\r\n \r\n
\r\n
\r\n
Last Name
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
First Name
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Middle Name
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
Birth Date
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Social Security Number
\r\n
\r\n \r\n \r\n \r\n SSN already in use!\r\n

\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Gender
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
Phone
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Mobile
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Email
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n

Slide tabs to see all options

\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\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 AbstractControl,\r\n UntypedFormBuilder,\r\n UntypedFormControl,\r\n UntypedFormGroup,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { BehaviorSubject, Subject, forkJoin, of } from 'rxjs';\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n OnDestroy,\r\n OnInit,\r\n Renderer2,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {\r\n ClientService,\r\n DiagnosisService,\r\n MedicationService,\r\n} from '../../../../shared/services';\r\nimport {\r\n PatientEditable,\r\n TransientPatient,\r\n} from '../../../../shared/models/order-entry/patient';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\n\r\nimport { BillingInformation } from '../../../../shared/models/billing/billing-information';\r\nimport { Client } from '../../../../shared/models/order-entry/client';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { DiagnosisViewModel } from 'src/app/shared/models/ocl/diagnosis-view-model';\r\nimport { DirtyComponent } from '../../../../../shared/utils';\r\nimport { EthnicGroups } from 'src/app/modules/shared/models/common/ethnicity';\r\nimport { PatientService } from '../../../../shared/services';\r\nimport { Races } from 'src/app/modules/shared/models/common/race';\r\nimport { RecentPatientService } from '../../../../../shared/services/ocl';\r\nimport { ResponsibleParty } from '../../../../shared/models/order-entry/reponsible-party';\r\nimport { Room } from '../../../../shared/models/order-entry/room';\r\nimport { Unit } from '../../../../shared/models/order-entry/unit';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport notify from 'devextreme/ui/notify';\r\n\r\n@Component({\r\n selector: 'app-patient-form',\r\n templateUrl: './patient-form.component.html',\r\n styleUrls: ['./patient-form.component.scss'],\r\n})\r\nexport class PatientFormComponent implements OnInit, OnDestroy, DirtyComponent {\r\n @ViewChild('diagnosesGlassControl', { static: true })\r\n public diagnosesGlassControl?: ElementRef;\r\n @ViewChild('medicationsContainer', { static: true })\r\n public medicationsContainer?: ElementRef;\r\n @ViewChild('diagnosesContainer', { static: true })\r\n public diagnosesContainer?: ElementRef;\r\n @ViewChild('medicationsGlassControl', { static: true })\r\n public medicationsGlassControl?: ElementRef;\r\n public patientForm: UntypedFormGroup = this.fb.group({\r\n dob: new UntypedFormControl(null),\r\n gender: new UntypedFormControl(null),\r\n client: new UntypedFormControl(null, [Validators.required]),\r\n unit: new UntypedFormControl(null),\r\n room: new UntypedFormControl(null),\r\n bed: new UntypedFormControl(null),\r\n lastName: new UntypedFormControl(null, [Validators.required]),\r\n firstName: new UntypedFormControl(null, [Validators.required]),\r\n medicalRecordId: new UntypedFormControl(null),\r\n middleName: new UntypedFormControl(null),\r\n phone: new UntypedFormControl(null),\r\n email: new UntypedFormControl(null),\r\n mobile: new UntypedFormControl(null),\r\n physician: new UntypedFormControl(null),\r\n diagnoses: new UntypedFormControl([] as DiagnosisViewModel[]),\r\n medications: new UntypedFormControl(null),\r\n responsibleParties: new UntypedFormControl([]),\r\n sameAsClient: new UntypedFormControl(false),\r\n address: new UntypedFormControl(null, [Validators.required]),\r\n ssn: new UntypedFormControl(null, []),\r\n zipCode: new UntypedFormControl(null, [Validators.required]),\r\n zipCodeExtra: new UntypedFormControl('', [Validators.required]),\r\n insuranceInformation: new UntypedFormControl([]),\r\n sexualOrientation: new UntypedFormControl(null),\r\n genderIdentity: new UntypedFormControl(null),\r\n race: new UntypedFormControl(''),\r\n ethnicity: new UntypedFormControl(null),\r\n });\r\n public ssnMaskRule = { X: /[0-9]/ };\r\n public phoneMaskRule = { X: /[0-9]/ };\r\n public today = new Date();\r\n public firstDate = new Date('1/1/1900');\r\n public diagnosticColumns = [\r\n {\r\n caption: 'Code',\r\n dataField: 'code',\r\n },\r\n {\r\n caption: 'Name',\r\n dataField: 'shortName',\r\n },\r\n ];\r\n public gender = ['MALE', 'FEMALE', 'UNKNOWN'];\r\n public selectRooms: BehaviorSubject =\r\n // @ts-ignore\r\n new BehaviorSubject(null);\r\n public patientId = -1;\r\n\r\n public unitsDataSource: BehaviorSubject =\r\n // @ts-ignore\r\n new BehaviorSubject(null);\r\n\r\n public genderIdentityDataSource: BehaviorSubject =\r\n // @ts-ignore\r\n new BehaviorSubject(null);\r\n\r\n public sexualOrientationDataSource: BehaviorSubject =\r\n // @ts-ignore\r\n new BehaviorSubject(null);\r\n public raceDataSource: BehaviorSubject =\r\n // @ts-ignore\r\n new BehaviorSubject(null);\r\n public ethnicGroupsDataSource: BehaviorSubject =\r\n // @ts-ignore\r\n new BehaviorSubject(null);\r\n private redirectToPath?: string;\r\n private roomUnit?: number;\r\n public isLoading = false;\r\n public loadAddressInformation = new EventEmitter();\r\n public notAlert = false;\r\n public unitRequired = false;\r\n // @ts-ignore\r\n public diagnosisDataSource = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public medicationsDataSource = new BehaviorSubject(null);\r\n public medicationsHeight = 100;\r\n public diagnosesHeight = 100;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private renderer: Renderer2,\r\n private clientService: ClientService,\r\n public medicationService: MedicationService,\r\n public diagnosisService: DiagnosisService,\r\n public recentPatientService: RecentPatientService,\r\n public service: PatientService,\r\n public changeDetectorRef: ChangeDetectorRef\r\n ) {\r\n this.ssnHasError = this.ssnHasError.bind(this);\r\n this.handleRoomChanges = this.handleRoomChanges.bind(this);\r\n this.handleUnitChanges = this.handleUnitChanges.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.handleRouteParametersChanges();\r\n this.handleClientChanges();\r\n this.handleUnitChanges();\r\n this.handleRoomChanges();\r\n this.checkPatientIdThenFetchIt();\r\n this.diagnosisDataSource.next(\r\n new DataSource({\r\n store: this.diagnosisService.customStore(this.diagnosisDataSource),\r\n })\r\n );\r\n this.medicationsDataSource.next(\r\n new DataSource({\r\n store: this.medicationService.customStore(this.medicationsDataSource),\r\n })\r\n );\r\n this.sexualOrientationDataSource.next(\r\n new DataSource({\r\n store: this.service.sexualOrientations(\r\n this.sexualOrientationDataSource\r\n ),\r\n })\r\n );\r\n this.genderIdentityDataSource.next(\r\n new DataSource({\r\n store: this.service.genderIdentities(this.genderIdentityDataSource),\r\n })\r\n );\r\n this.raceDataSource.next(\r\n new DataSource({\r\n store: Races,\r\n })\r\n );\r\n this.ethnicGroupsDataSource.next(\r\n new DataSource({\r\n store: EthnicGroups,\r\n })\r\n );\r\n }\r\n\r\n public tabChanged() {\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n private handleRouteParametersChanges() {\r\n const dob =\r\n this.route.snapshot.paramMap.get('dob') !== 'null'\r\n ? this.route.snapshot.paramMap.get('dob')\r\n : null;\r\n const lastName =\r\n this.route.snapshot.paramMap.get('lastName') !== 'null'\r\n ? this.route.snapshot.paramMap.get('lastName')\r\n : '';\r\n const firstName =\r\n this.route.snapshot.paramMap.get('firstName') !== 'null'\r\n ? this.route.snapshot.paramMap.get('firstName')\r\n : '';\r\n const ssn =\r\n this.route.snapshot.paramMap.get('ssn') !== 'null'\r\n ? this.route.snapshot.paramMap.get('ssn')\r\n : null;\r\n const race =\r\n this.route.snapshot.paramMap.get('race') !== 'null'\r\n ? this.route.snapshot.paramMap.get('race')\r\n : null;\r\n const genderIdentity =\r\n this.route.snapshot.paramMap.get('genderIdentity') !== 'null'\r\n ? this.route.snapshot.paramMap.get('genderIdentity')\r\n : null;\r\n const ethnicity =\r\n this.route.snapshot.paramMap.get('ethnicity') !== 'null'\r\n ? this.route.snapshot.paramMap.get('ethnicity')\r\n : null;\r\n const sexualOrientation =\r\n this.route.snapshot.paramMap.get('sexualOrientation') !== 'null'\r\n ? this.route.snapshot.paramMap.get('sexualOrientation')\r\n : null;\r\n this.patientId = this.route.snapshot.paramMap.get('id')\r\n ? (parseFloat(this.route.snapshot.paramMap.get('id') as string) as number)\r\n : -1;\r\n this.redirectToPath = this.route.snapshot.paramMap.get('redirectToPath') as\r\n | string\r\n | undefined;\r\n\r\n if (dob) {\r\n this.patientForm.get('dob')?.setValue(dob);\r\n }\r\n if (lastName) {\r\n this.patientForm.get('lastName')?.setValue(lastName);\r\n }\r\n if (firstName) {\r\n this.patientForm.get('firstName')?.setValue(firstName);\r\n }\r\n if (ssn) {\r\n this.patientForm.get('ssn')?.setValue(ssn);\r\n }\r\n if (race) {\r\n this.patientForm.get('race')?.setValue(race);\r\n }\r\n if (genderIdentity) {\r\n this.patientForm.get('genderIdentity')?.setValue(genderIdentity);\r\n }\r\n if (ethnicity && Number.isInteger(ethnicity)) {\r\n const eth = EthnicGroups.find(\r\n (x) => x.value == Number.parseInt(ethnicity)\r\n );\r\n this.patientForm.get('ethnicity')?.setValue(eth);\r\n }\r\n if (sexualOrientation) {\r\n this.patientForm.get('sexualOrientation')?.setValue(sexualOrientation);\r\n }\r\n }\r\n\r\n private handleClientChanges() {\r\n this.patientForm\r\n .get('client')\r\n ?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe((client: Client) => {\r\n if (!this.isLoading) {\r\n this.patientForm.markAsDirty();\r\n }\r\n if (!client) {\r\n return;\r\n }\r\n\r\n this.unitRequired = client && client.unitsCount > 0;\r\n\r\n if (client) {\r\n this.unitsDataSource.next(\r\n new DataSource({\r\n store: this.clientService.clientUnitsCustomStore(\r\n client.id,\r\n this.unitsDataSource\r\n ),\r\n })\r\n );\r\n // if (this.unitRequired) {\r\n this.selectRooms.next(\r\n new DataSource({\r\n store: this.clientService.clientRoomsCustomStore(\r\n client.id,\r\n this.selectRooms\r\n ),\r\n paginate: true,\r\n pageSize: 10,\r\n })\r\n );\r\n //}\r\n } else {\r\n // @ts-ignore\r\n this.unitsDataSource.next(null);\r\n // @ts-ignore\r\n this.selectRooms.next(null);\r\n }\r\n\r\n if (this.patientForm.get('client')?.value?.id !== client.id) {\r\n this.roomUnit = undefined;\r\n this.patientForm.get('unit')?.setValue(null);\r\n this.patientForm.get('room')?.setValue(null);\r\n this.patientForm.get('unit')?.updateValueAndValidity();\r\n this.patientForm.get('room')?.updateValueAndValidity();\r\n }\r\n\r\n this.changeDetectorRef.detectChanges();\r\n });\r\n }\r\n\r\n public get PatientClient() {\r\n return this.patientForm.get('client')?.value &&\r\n this.patientForm.get('client')?.value.id\r\n ? this.patientForm.get('client')?.value.id\r\n : -1;\r\n }\r\n\r\n private handleRoomChanges() {\r\n this.patientForm\r\n .get('room')\r\n ?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe((room: Room) => {\r\n if (!this.isLoading) {\r\n this.patientForm.markAsDirty();\r\n }\r\n\r\n if (\r\n room !== null &&\r\n room !== undefined &&\r\n !this.patientForm.get('unit')?.value\r\n ) {\r\n this.roomUnit = room.unitId;\r\n this.patientForm.get('unit')?.setValue(room.unitId);\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n private handleUnitChanges() {\r\n this.patientForm\r\n .get('unit')\r\n ?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe((unit: Unit | number) => {\r\n if (!this.isLoading) {\r\n this.patientForm.markAsDirty();\r\n }\r\n if (unit !== null && unit !== undefined) {\r\n this.selectRooms.next(\r\n new DataSource({\r\n store: this.clientService.clientRoomsByUnitCustomStore(\r\n typeof unit === 'number' ? unit : unit.id,\r\n this.selectRooms\r\n ),\r\n paginate: true,\r\n pageSize: 10,\r\n })\r\n );\r\n\r\n if (\r\n this.patientForm.get('room')?.value &&\r\n this.roomUnit !== (typeof unit === 'number' ? unit : unit.id)\r\n ) {\r\n this.patientForm.get('room')?.setValue(null);\r\n }\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n private checkPatientIdThenFetchIt() {\r\n this.isLoading = true;\r\n if (this.patientId !== -1) {\r\n this.service\r\n .getPatient(this.patientId)\r\n .pipe(take(1))\r\n .subscribe((patient) => {\r\n this.patientForm.get('bed')?.setValue(patient.bed);\r\n this.patientForm.get('dob')?.setValue(patient.birthDate);\r\n this.patientForm\r\n .get('medicalRecordId')\r\n ?.setValue(patient.medicalRecordId);\r\n this.patientForm.get('firstName')?.setValue(patient.firstName);\r\n this.patientForm.get('lastName')?.setValue(patient.lastName);\r\n this.patientForm.get('middleName')?.setValue(patient.middleName);\r\n this.patientForm.get('gender')?.setValue(patient.gender);\r\n this.patientForm.get('physician')?.setValue(patient.primaryPhysician);\r\n this.patientForm.get('ssn')?.setValue(patient.socialSecurityNumber);\r\n this.patientForm.get('medications')?.setValue(patient.medications);\r\n this.patientForm.get('diagnoses')?.setValue(patient.diagnoses);\r\n this.patientForm\r\n .get('responsibleParties')\r\n ?.setValue(patient.responsibleParties);\r\n this.patientForm.get('insuranceInformation')?.setValue(\r\n patient.insuranceInformation\r\n // @ts-ignore\r\n .sort((a, b) => a.order - b.order)\r\n );\r\n this.patientForm.get('phone')?.setValue(patient.phone);\r\n this.patientForm.get('mobile')?.setValue(patient.mobile);\r\n this.patientForm.get('email')?.setValue(patient.email);\r\n this.patientForm.get('client')?.setValue(patient.client);\r\n this.patientForm.get('race')?.setValue(patient.race);\r\n this.patientForm\r\n .get('genderIdentity')\r\n ?.setValue(patient.genderIdentity);\r\n\r\n if (patient.ethnicity != null) {\r\n const eth = EthnicGroups.find((x) => x.value == patient.ethnicity);\r\n this.patientForm.get('ethnicity')?.setValue(eth);\r\n }\r\n this.patientForm\r\n .get('sexualOrientation')\r\n ?.setValue(patient.sexualOrientation);\r\n\r\n if (patient.sameAsClientAddress) {\r\n this.patientForm\r\n .get('sameAsClient')\r\n ?.setValue(patient.sameAsClientAddress);\r\n } else {\r\n if (patient.zipCode) {\r\n this.patientForm.get('zipCode')?.setValue(patient.zipCode.code);\r\n }\r\n this.patientForm\r\n .get('zipCodeExtra')\r\n ?.setValue(patient.zipCodePlus4);\r\n this.patientForm.get('address')?.setValue(patient.address);\r\n }\r\n this.loadAddressInformation.emit(true);\r\n\r\n if (patient.room) {\r\n this.patientForm.get('room')?.setValue(patient.room);\r\n }\r\n if (patient.unit && !patient.room?.unitId) {\r\n this.patientForm.get('unit')?.setValue(patient.unit);\r\n }\r\n\r\n this.changeDetectorRef.detectChanges();\r\n this.isLoading = !this.isLoading;\r\n });\r\n } else {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public canDeactivate() {\r\n return this.notAlert ? false : this.patientForm.dirty;\r\n }\r\n\r\n public medicationChanged(medicationsIds: number[]) {\r\n this.patientForm.get('medications')?.setValue(medicationsIds);\r\n }\r\n\r\n public responsiblePartiesChanged(responsibleParties: ResponsibleParty[]) {\r\n this.patientForm.get('responsibleParties')?.setValue(responsibleParties);\r\n }\r\n\r\n public billingInfoChanged(billingInfo: BillingInformation[]) {\r\n this.patientForm.get('insuranceInformation')?.setValue(billingInfo);\r\n }\r\n\r\n public diagnoseChanged(diagnosesIds: number[]) {\r\n this.patientForm.get('diagnoses')?.setValue(diagnosesIds);\r\n }\r\n\r\n public async submit() {\r\n this.notAlert = true;\r\n const patientForm = ValidationEngine.validateGroup('patient');\r\n if (patientForm.isValid) {\r\n this.isLoading = true;\r\n\r\n const patient = new PatientEditable();\r\n patient.address = this.patientForm.value.address;\r\n patient.bed = this.patientForm.value.bed;\r\n patient.birthDate = this.patientForm.value.dob\r\n ? this.patientForm.value.dob\r\n : null;\r\n patient.medicalRecordId = this.patientForm.value.medicalRecordId;\r\n patient.clientId = this.patientForm.value.client.id;\r\n patient.firstName = this.patientForm.value.firstName;\r\n patient.middleName = this.patientForm.value.middleName;\r\n patient.lastName = this.patientForm.value.lastName;\r\n patient.email = this.patientForm.value.email;\r\n patient.socialSecurityNumber = this.patientForm.value.ssn;\r\n patient.phone = this.patientForm.value.phone;\r\n patient.mobile = this.patientForm.value.mobile;\r\n patient.gender = this.patientForm.value.gender;\r\n patient.roomId = this.patientForm.value.room\r\n ? this.patientForm.value.room.id\r\n : null;\r\n patient.unitId = this.patientForm.value.unit\r\n ? this.patientForm.value.unit.id\r\n : null;\r\n patient.zipCodePlus4 = this.patientForm.value.zipCodeExtra;\r\n patient.sameAsClientAddress = this.patientForm.value.sameAsClient;\r\n patient.zipCodeName = this.patientForm.value.zipCode;\r\n patient.primaryPhysicianId = this.patientForm.value.physician\r\n ? this.patientForm.value.physician.id\r\n : null;\r\n\r\n patient.ethnicity = this.patientForm.value.ethnicity\r\n ? this.patientForm.value.ethnicity.value\r\n : null;\r\n patient.sexualOrientationId = this.patientForm.value.sexualOrientation\r\n ? this.patientForm.value.sexualOrientation.id\r\n : null;\r\n patient.genderIdentityId = this.patientForm.value.genderIdentity\r\n ? this.patientForm.value.genderIdentity.id\r\n : null;\r\n patient.race = this.patientForm.value.race;\r\n\r\n if (this.patientForm.value.insuranceInformation.length > 0) {\r\n for (const bi of this.patientForm.value.insuranceInformation) {\r\n if (bi.differentThanPatient) {\r\n bi.zipCodeName =\r\n typeof bi.zipCode === 'string' ? bi.zipCode : bi.zipCode.code;\r\n } else {\r\n bi.zipCodeName = this.patientForm.value.zipCode;\r\n bi.zipCodePlus4 = this.patientForm.value.zipCodeExtra;\r\n }\r\n if (bi.relationship === 'SELF') {\r\n bi.zipCodeName = patient.zipCodeName;\r\n bi.address = patient.address;\r\n bi.birthDate = patient.birthDate;\r\n bi.firstName = patient.firstName\r\n ? patient.firstName.toUpperCase()\r\n : null;\r\n bi.lastName = patient.lastName\r\n ? patient.lastName.toUpperCase()\r\n : null;\r\n bi.gender = patient.gender;\r\n bi.middleName = patient.middleName\r\n ? patient.middleName.toUpperCase()\r\n : null;\r\n }\r\n }\r\n }\r\n\r\n if (this.patientForm.value.responsibleParties.length > 0) {\r\n for (const rp of this.patientForm.value.responsibleParties) {\r\n rp.zipCodeName =\r\n typeof rp.zipCode === 'string' ? rp.zipCode : rp.zipCode.code;\r\n rp.address = rp.address ? rp.address.toUpperCase() : null;\r\n }\r\n }\r\n\r\n if (this.patientId !== -1) {\r\n patient.id = this.patientId;\r\n }\r\n const request =\r\n this.patientId === -1\r\n ? this.service.createPatient(patient)\r\n : this.service.updatePatient(this.patientId, patient);\r\n\r\n request.pipe(take(1)).subscribe((p) => {\r\n forkJoin([\r\n of(p),\r\n this.service.saveMedications(\r\n p.id,\r\n this.patientForm.value.medications\r\n ),\r\n this.service.saveDiagnoses(p.id, this.patientForm.value.diagnoses),\r\n this.service.saveBillingInformation(\r\n p.id,\r\n this.patientForm.value.insuranceInformation\r\n ),\r\n this.service.saveResponsibleParties(\r\n p.id,\r\n this.patientForm.value.responsibleParties\r\n ),\r\n ]).subscribe((r) => {\r\n notify('Patient saved successfully!', 'success');\r\n if (this.patientId === -1) {\r\n this.recentPatientService.addRecentPatient(\r\n r[0] as TransientPatient\r\n );\r\n } else {\r\n this.recentPatientService.updatePatient(r[0] as TransientPatient);\r\n }\r\n\r\n this.patientId = r[0].id;\r\n\r\n if (this.redirectToPath) {\r\n this.redirect();\r\n } else {\r\n window.history.back();\r\n }\r\n });\r\n });\r\n }\r\n }\r\n\r\n public ssnHasError(params: any) {\r\n if (params.value) {\r\n const promise = this.service\r\n .isSsnUnique(params.value, this.patientId)\r\n .toPromise();\r\n this.patientForm.get('ssn')?.setErrors({ uniqueSSN: true });\r\n\r\n promise.then((value) => {\r\n if (value) {\r\n this.patientForm.get('ssn')?.setErrors({ uniqueSSN: true });\r\n } else {\r\n this.patientForm.get('ssn')?.setErrors(null);\r\n }\r\n });\r\n\r\n return promise;\r\n }\r\n this.patientForm.get('ssn')?.setErrors(null);\r\n return new Promise((resolve) => resolve(true));\r\n }\r\n\r\n public async goBack() {\r\n if (this.redirectToPath) {\r\n if (this.patientId === -1) {\r\n await this.router.navigate([this.redirectToPath]);\r\n } else {\r\n await this.redirect();\r\n }\r\n } else {\r\n window.history.back();\r\n }\r\n }\r\n\r\n private async redirect() {\r\n const hasParams = this.redirectToPath?.indexOf(';');\r\n const hasPatient = this.redirectToPath?.indexOf('patientId');\r\n if (hasParams === -1 && hasPatient === -1 && this.patientId !== -1) {\r\n await this.router.navigate([\r\n this.redirectToPath,\r\n { patientId: this.patientId },\r\n ]);\r\n } else {\r\n await this.router.navigateByUrl(this.redirectToPath as string);\r\n }\r\n }\r\n\r\n /* @HostListener('window:beforeunload', ['$event'])\r\n public beforeUnloadHandler(event) {\r\n if (this.patientForm.dirty) {\r\n const returnValue = 'There are unsaved changes. Do you want to continue and lose these changes?';\r\n event.returnValue = returnValue;\r\n return returnValue;\r\n }\r\n }*/\r\n\r\n public onDateReady(e: any) {\r\n const element = e.element;\r\n if (e.component._pickerType === 'native') {\r\n const button = element.querySelector('.dx-texteditor-buttons-container');\r\n const input = element.querySelector('.dx-texteditor-input');\r\n this.renderer.setStyle(button, 'display', 'none');\r\n this.renderer.setStyle(input, 'padding-right', '5px');\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 public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{requisition.data.room}} - {{requisition.data.bed}}\r\n {{requisition.data.room}}{{requisition.data.bed}}\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n {{ requisition.data.tests?.join(', ') }}\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \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 Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Renderer2,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport config from 'devextreme/core/config';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport notify from 'devextreme/ui/notify';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\nimport {ReportsService} from 'src/app/modules/shared/services/reports.service';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {PWADetectorService, ScreenService} from '../../../../../shared/services/general';\r\nimport {FileUtils} from '../../../../../shared/utils';\r\nimport {RequisitionService} from '../../../../shared/services/requisition.service';\r\nimport {RequisitionSearch, RequisitionStatus} from '../../models/requisition-search';\r\nimport {MultipleRequisitionsSignature} from '../../../../shared/models/signature';\r\nimport {SignatureRepresentation} from '../signature-dialog/signature-dialog.component';\r\nimport {RegistrationRequest} from \"../../../../../shared/models/fusion-auth\";\r\nimport {environment} from \"../../../../../../environments/environment\";\r\nimport {CREATED} from \"http-status-codes\";\r\n\r\n@Component({\r\n selector: 'app-requisition-search-content',\r\n templateUrl: './requisition-search-content.component.html',\r\n styleUrls: ['./requisition-search-content.component.scss'],\r\n})\r\nexport class RequisitionSearchContentComponent implements OnInit, AfterViewInit, OnDestroy {\r\n @ViewChild(DxDataGridComponent, {static: true}) public dxDataGridComponent?: DxDataGridComponent;\r\n @Input() public filtersSubmitted: EventEmitter = new EventEmitter();\r\n public storageName = 'requisitionGridStorage';\r\n public signRequisitionDialogVisible = false;\r\n public selectedItemsIds: number[] = [];\r\n public signedRequisitionSelected = false;\r\n public isLoading = false;\r\n // @ts-ignore\r\n public dataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public emailFaxVisible = false;\r\n public type: string = '';\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n public printDialogVisible = false;\r\n public filters: any;\r\n public user: any;\r\n public updateBillToVisible = false;\r\n private onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private pwaDetectorService: PWADetectorService,\r\n private requisitionService: RequisitionService,\r\n private router: Router,\r\n public route: ActivatedRoute,\r\n private elRef: ElementRef,\r\n public fusionAuthService: FusionAuthService,\r\n private fusionAuthManagement: FusionAuthManagementService,\r\n private reportsService: ReportsService,\r\n private renderer: Renderer2,\r\n private screen: ScreenService,\r\n ) {\r\n }\r\n\r\n public get ButtonsDisabled() {\r\n return this.selectedItemsIds.length === 0;\r\n }\r\n\r\n public itemsSelected(ids: number[]) {\r\n this.selectedItemsIds = ids;\r\n if (this.dxDataGridComponent?.instance) {\r\n this.signedRequisitionSelected =\r\n this.dxDataGridComponent.instance.getSelectedRowsData().filter(r => r.hasSignature).length !== 0;\r\n }\r\n }\r\n\r\n public async rowClick(e: any) {\r\n if (e.rowType === 'data' && !this.isPhoneOrTablet) {\r\n await this.sendToPreview(e.data.id);\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n this.waitByUser();\r\n }\r\n\r\n private waitByUser() {\r\n this.user = this.fusionAuthService.Profile;\r\n\r\n this.responsiveValues();\r\n this.screen.changed\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.responsiveValues();\r\n });\r\n\r\n if (this.user) {\r\n this.filtersSubmitted\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(filters => {\r\n this.filters = filters;\r\n setTimeout(() => {\r\n this.setFilters(this.filters, this.user);\r\n }, 500);\r\n });\r\n } else {\r\n setTimeout(() => {\r\n this.waitByUser();\r\n }, 1000);\r\n }\r\n }\r\n\r\n public setFilters(filters: any, user: any) {\r\n const role = user.registrations[0].roles[0];\r\n if (typeof filters.startDate === 'number') {\r\n filters.startDate = new Date(filters.startDate);\r\n }\r\n\r\n if (typeof filters.endDate === 'number') {\r\n filters.endDate = new Date(filters.endDate);\r\n }\r\n\r\n switch (role) {\r\n case 'Client Admin':\r\n case 'Client Basic':\r\n const clientIds = user ? user.data.clients : this.fusionAuthService.Profile.data.clients;\r\n this.dataSource.next(new DataSource({\r\n store: this.requisitionService.requisitionStore({\r\n externalFilters: filters,\r\n clientIds,\r\n dataSource: this.dataSource,\r\n }),\r\n }));\r\n break;\r\n case 'Patient':\r\n const patientIds = user ? user.data.patients : this.fusionAuthService.Profile.data.patients;\r\n this.dataSource.next(new DataSource({\r\n store: this.requisitionService.requisitionStore({\r\n externalFilters: filters,\r\n patientIds,\r\n dataSource: this.dataSource,\r\n }),\r\n }));\r\n break;\r\n case 'Physician':\r\n const physicianIds = user ? user.data.physicians : this.fusionAuthService.Profile.data.physicians;\r\n this.dataSource.next(new DataSource({\r\n store: this.requisitionService.requisitionStore({\r\n externalFilters: filters,\r\n physicianIds,\r\n dataSource: this.dataSource,\r\n }),\r\n }));\r\n break;\r\n default:\r\n this.dataSource.next(new DataSource({\r\n store: this.requisitionService.requisitionStore({\r\n externalFilters: filters,\r\n dataSource: this.dataSource,\r\n }),\r\n }));\r\n }\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n maxSpeedDialActionCount: 6,\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public getStatus(requisition: RequisitionSearch) {\r\n let color;\r\n let status;\r\n switch (requisition.status) {\r\n case RequisitionStatus.Canceled:\r\n color = 'ocl-status-black';\r\n status = 'CANCELED';\r\n break;\r\n case RequisitionStatus.Done:\r\n color = 'ocl-status-green';\r\n status = 'DONE';\r\n break;\r\n case RequisitionStatus.Pending:\r\n color = 'ocl-status-yellow';\r\n status = 'PENDING';\r\n break;\r\n default:\r\n color = 'ocl-status-black';\r\n status = 'NONE';\r\n break;\r\n }\r\n\r\n return `
${status}
`;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n const storageString = localStorage.getItem(this.storageName);\r\n const storedConfig = JSON.parse(storageString as string);\r\n if (storedConfig) {\r\n storedConfig.selectedRowKeys = [];\r\n localStorage.setItem(this.storageName, JSON.stringify(storedConfig));\r\n }\r\n }\r\n\r\n public get FABDisabled() {\r\n return this.isPhoneOrTablet && this.selectedItemsIds ? this.selectedItemsIds.length > 0 : false;\r\n }\r\n\r\n public signRequisitions() {\r\n this.signRequisitionDialogVisible = true;\r\n }\r\n\r\n public signDialogClosed(signatureDialogResponse: SignatureRepresentation) {\r\n if (signatureDialogResponse) {\r\n const signature = new MultipleRequisitionsSignature();\r\n signature.image = signatureDialogResponse.image;\r\n signature.username = signatureDialogResponse.username;\r\n signature.requisitionsIds = this.selectedItemsIds;\r\n\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\r\n this.selectedItemsIds.length === 1 ? 'Signing requisition' : 'Signing requisitions',\r\n );\r\n const user = this.fusionAuthService.Profile;\r\n user.data = {\r\n signImage: signatureDialogResponse.image,\r\n clients: user.data !== undefined ? user.data.clients : [],\r\n patients: user.data !== undefined ? user.data.patients : [],\r\n physicians: user.data !== undefined ? user.data.physicians : [],\r\n };\r\n const request: RegistrationRequest = {\r\n user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [user.role],\r\n username: user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.fusionAuthManagement\r\n .updateUser(user.id, request)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === CREATED) {\r\n this.requisitionService.signRequisitions(signature)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.fusionAuthService.SignatureImage = signatureDialogResponse.image;\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n notify(this.selectedItemsIds.length === 1 ? 'Requisition Signed!' : 'Requisitions Signed!', 'success');\r\n this.dxDataGridComponent?.instance.refresh();\r\n });\r\n }\r\n });\r\n\r\n /*this.requisitionService.signRequisitions(signature)\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n notify(this.selectedItemsIds.length === 1 ? 'Requisition Signed!' : 'Requisitions Signed!', 'success');\r\n this.dxDataGridComponent?.instance.refresh();\r\n });*/\r\n }\r\n\r\n this.signRequisitionDialogVisible = false;\r\n }\r\n\r\n public async sendToPreview(id: number) {\r\n if (this.pwaDetectorService.isPWA()) {\r\n await this.router.navigate(['/secured/requisitions/create', {id}]);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/requisitions/create', {id}]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n public printRequisitions() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateRequisitionReport(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public printRequisitionLog() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateRequisitionLog(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public openEmailFax(type: string) {\r\n this.type = type;\r\n this.emailFaxVisible = true;\r\n }\r\n\r\n public openUpdateBillTo() {\r\n this.updateBillToVisible = true;\r\n }\r\n\r\n public closeUpdateBillTo() {\r\n this.updateBillToVisible = false;\r\n this.setFilters(this.filters, this.user);\r\n }\r\n\r\n public printLabels() {\r\n this.printDialogVisible = true;\r\n }\r\n\r\n public onContentReady(): void {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
User
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
Password
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
Signature's Image
\r\n
\r\n \"signature\"\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 Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {DxPopupComponent} from 'devextreme-angular';\r\nimport notify from 'devextreme/ui/notify';\r\nimport {Moment} from 'moment';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {environment} from '../../../../../../environments/environment';\r\nimport {LoginViewModel} from '../../../../../shared/models/general';\r\nimport {FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {FileUtils} from '../../../../../shared/utils';\r\nimport {RequisitionSignature} from '../../../../shared/models/signature';\r\n\r\nexport interface SignatureRepresentation {\r\n username: string;\r\n signedBy: string;\r\n signedAt: number | Moment;\r\n imageChanged: boolean;\r\n image: string;\r\n}\r\n\r\n@Component({\r\n selector: 'app-signature-dialog',\r\n templateUrl: './signature-dialog.component.html',\r\n styleUrls: ['./signature-dialog.component.scss'],\r\n})\r\nexport class SignatureDialogComponent implements OnInit, OnDestroy, OnChanges {\r\n @ViewChild('popupComponent', {static: true}) public popupComponent?: DxPopupComponent;\r\n @Input() public popupVisible = false;\r\n @Output() public closeEvent = new EventEmitter();\r\n @Input() public signatureToEdit ?: RequisitionSignature;\r\n public image: string = '';\r\n public username = '';\r\n public password = '';\r\n public selectedFile: File = {} as File;\r\n public passwordControl: any;\r\n public user: any;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fusionAuthService: FusionAuthService, private router: Router) {\r\n }\r\n\r\n public close() {\r\n this.closeEvent.emit();\r\n }\r\n\r\n public clear() {\r\n this.image = this.user.data === undefined || this.user.data.signImage === undefined || this.user.data.signImage === null ?\r\n environment.frontendUrl + 'assets/images/signature.png' : this.user.data.signImage;\r\n this.username = this.Username;\r\n this.password = '';\r\n this.selectedFile = {} as File;\r\n }\r\n\r\n public get Username() {\r\n return this.fusionAuthService.Profile !== undefined && this.fusionAuthService.Profile !== null\r\n ? this.fusionAuthService.Profile.email : 'You Are Not Logged In';\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.username = this.Username;\r\n }\r\n\r\n private waitByUser(callback: Function) {\r\n this.user = this.fusionAuthService.Profile;\r\n if (this.user) {\r\n callback();\r\n } else {\r\n setTimeout(() => {\r\n this.waitByUser(callback);\r\n }, 1000);\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n if (this.passwordControl !== undefined) {\r\n setTimeout(() => {\r\n this.passwordControl.instance().focus();\r\n }, 500);\r\n }\r\n\r\n\r\n this.waitByUser(() => {\r\n this.image = this.user.data === undefined || this.user.data.signImage === undefined || this.user.data.signImage === null ?\r\n environment.frontendUrl + 'assets/images/signature.png' : this.user.data.signImage;\r\n });\r\n }\r\n }\r\n\r\n public ready(e: any) {\r\n this.passwordControl = e.component;\r\n }\r\n\r\n public onFileChanged(event: Event) {\r\n const element = (event.target as HTMLInputElement);\r\n const file = element.files && element.files.length > 0 && element.files[0];\r\n if (!file) {\r\n return notify('No file found.', 'error');\r\n }\r\n\r\n if (!file.type.includes('image')) {\r\n return notify('Only images allowed.', 'error');\r\n }\r\n\r\n // tslint:disable-next-line:radix\r\n if (Number.parseInt((file.size / 1024 / 1024).toFixed(4)) > 10) {\r\n return notify('Only 10 MB files allowed.', 'error');\r\n }\r\n\r\n this.selectedFile = file;\r\n\r\n FileUtils.convertFileToBase64(this.selectedFile)\r\n .then(imageString => this.image = imageString);\r\n\r\n this.popupComponent?.instance.repaint();\r\n }\r\n\r\n public sign() {\r\n if (!this.fusionAuthService.IsLoggedIn) {\r\n notify('Your session expired. You must login to continue.');\r\n this.router.navigateByUrl('/login').then();\r\n }\r\n this.fusionAuthService.login({\r\n loginId: this.fusionAuthService.Profile.email,\r\n password: this.password,\r\n applicationId: ''\r\n } as LoginViewModel, true)\r\n .pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n if (this.image === environment.frontendUrl + 'assets/images/signature.png') {\r\n // @ts-ignore\r\n this.closeEvent.emit({\r\n image: null,\r\n imageChanged: false,\r\n // tslint:disable-next-line:max-line-length\r\n signedBy: `${this.fusionAuthService.Profile.firstName} ${this.fusionAuthService.Profile.lastName}`,\r\n username: `${this.fusionAuthService.Profile.firstName} ${this.fusionAuthService.Profile.lastName}`,\r\n signedAt: Date.now(),\r\n } as SignatureRepresentation);\r\n } else {\r\n this.closeEvent.emit({\r\n image: this.image,\r\n imageChanged: true,\r\n // tslint:disable-next-line:max-line-length\r\n signedBy: `${this.fusionAuthService.Profile.firstName} ${this.fusionAuthService.Profile.lastName}`,\r\n username: `${this.fusionAuthService.Profile.firstName} ${this.fusionAuthService.Profile.lastName}`,\r\n signedAt: Date.now(),\r\n } as SignatureRepresentation);\r\n }\r\n this.clear();\r\n }, () => {\r\n notify('Invalid password.', 'error');\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
User
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
Password
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { DxPopupComponent } from 'devextreme-angular';\r\nimport notify from 'devextreme/ui/notify';\r\nimport { Subject, throwError } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { LoginViewModel } from '../../../../../shared/models/general';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport {FormControl} from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: 'app-signature-unsing-dialog',\r\n templateUrl: './signature-unsing-dialog.component.html',\r\n styleUrls: ['./signature-unsing-dialog.component.scss']\r\n})\r\nexport class SignatureUnsingDialogComponent implements OnInit, OnDestroy {\r\n @ViewChild('popupComponent', { static: true }) public popupComponent?: DxPopupComponent;\r\n @Input() public popupVisible = false;\r\n @Output() public closeEvent = new EventEmitter();\r\n public username = '';\r\n public password = '';\r\n public passwordControl: any;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fusionAuthService: FusionAuthService) {\r\n }\r\n\r\n public close() {\r\n this.closeEvent.emit(false);\r\n }\r\n\r\n public clear() {\r\n this.username = this.Username;\r\n this.password = '';\r\n }\r\n\r\n public get Username() {\r\n return this.fusionAuthService.Profile !== undefined && this.fusionAuthService.Profile !== null\r\n ? this.fusionAuthService.Profile.email : 'You Are Not Logged In';\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.username = this.Username;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n if (this.passwordControl === undefined) {\r\n setTimeout(() => {\r\n this.passwordControl?.instance().focus();\r\n }, 500);\r\n } else {\r\n setTimeout(() => {\r\n this.passwordControl?.instance().focus();\r\n }, 500);\r\n }\r\n }\r\n }\r\n\r\n public ready(e: any) {\r\n this.passwordControl = e.component;\r\n }\r\n\r\n public sign() {\r\n this.fusionAuthService.login({\r\n loginId: this.fusionAuthService.Profile.email,\r\n password: this.password,\r\n applicationId: ''\r\n } as LoginViewModel, true)\r\n .pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.closeEvent.emit(true);\r\n this.clear();\r\n }, (e) => {\r\n notify('Invalid password.', 'error');\r\n return throwError(e);\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next(); this.onDestroy$.complete()\r\n }\r\n}\r\n","import { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\n\r\nexport enum RequisitionStatus {\r\n None = 0,\r\n Pending = 1,\r\n Canceled = 2,\r\n Done = 4,\r\n All = 0x00000007 // Done | Canceled | Pending,\r\n}\r\n\r\nexport class RequisitionSearch extends BaseDataTransferObject {\r\n public code?: string;\r\n public collectionDate?: Date;\r\n public patientLastName?: string;\r\n public bed?: string;\r\n public unit?: string;\r\n public room?: string;\r\n public patientFirstName?: string;\r\n public patientBirthDate?: Date;\r\n public clientName?: string;\r\n public patientId?: number;\r\n public clientId?: number;\r\n public tests?: string[];\r\n public hasSignature?: boolean;\r\n public status?: RequisitionStatus;\r\n}\r\n","import { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\nimport { BillTo, BillType } from '../../../shared/models/billing/bill-type';\r\nimport { Patient } from '../../../shared/models/order-entry/patient';\r\nimport { Physician } from '../../../shared/models/order-entry/physician';\r\nimport { TreeTest } from '../../../shared/models/order-entry/test';\r\nimport { RequisitionAdditionalCopy } from './requisition-additional-copy';\r\nimport { RequisitionStatus } from './requisition-search';\r\nimport { RequisitionTest } from './requisition-test';\r\n\r\nexport enum ClinicalInfo {\r\n Unknown,\r\n Fasting,\r\n NonFasting,\r\n}\r\n\r\nexport class Requisition extends BaseDataTransferObject {\r\n public patientId?: number;\r\n public physicianId?: number;\r\n public code?: string;\r\n public additionalTestsDxCodes?: string;\r\n public comments?: string;\r\n public fasting?: ClinicalInfo;\r\n public priority?: string;\r\n public hasSignature?: boolean;\r\n public collectionDate?: Date | string;\r\n public billTo?: BillTo;\r\n public status?: RequisitionStatus;\r\n public patient?: Patient;\r\n public physician?: Physician;\r\n public medications?: number[];\r\n public diagnoses?: number[];\r\n public additionalCopies?: RequisitionAdditionalCopy[];\r\n public tests?: RequisitionTest[];\r\n public treeTests?: TreeTest[];\r\n}\r\n","import { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\n\r\nexport class RequisitionBillingInfo extends BaseDataTransferObject {\r\n public requisitionId?: number;\r\n public patientBillingInformationId: number = -1;\r\n public position: number = 1;\r\n}\r\n","import {\r\n AfterViewInit, ChangeDetectorRef,\r\n Component,\r\n ElementRef, EventEmitter,\r\n Input,\r\n OnChanges, OnDestroy, OnInit, Output,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport ArrayStore from 'devextreme/data/array_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {of, Subject} from 'rxjs';\r\nimport {debounceTime, take, takeUntil} from 'rxjs/operators';\r\nimport {ScreenService} from '../../../../shared/services/general';\r\nimport {BillTo} from '../../models/billing/bill-type';\r\nimport {BillingInformation} from '../../models/billing/billing-information';\r\nimport {PatientEditable} from '../../models/order-entry/patient';\r\nimport {PatientService} from '../../services';\r\n\r\n@Component({\r\n selector: 'app-bill-to',\r\n templateUrl: './bill-to.component.html',\r\n styleUrls: ['./bill-to.component.scss'],\r\n})\r\nexport class BillToComponent implements AfterViewInit, OnChanges, OnInit, OnDestroy {\r\n @ViewChild('grid', {static: true}) public grid?: DxDataGridComponent;\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n\r\n @Input() public disabled = false;\r\n @Input() public patient ?: PatientEditable;\r\n @Input() public selectedBillingInfo: any[] = [];\r\n @Input() public isEdit = false;\r\n @Input() public defaultBillTo = 'INSURANCE';\r\n\r\n @Output() public billToChanged = new EventEmitter();\r\n @Output() public billingInfoChanged = new EventEmitter();\r\n\r\n public selectedBillTo?: string;\r\n public selectedRowKeys: number[] | BillingInformation[] = [];\r\n public dataSource: DataSource;\r\n public buttons: any;\r\n public isPhone: boolean = false;\r\n public gridHeight: number = 100;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private patientService: PatientService, private screen: ScreenService, public changeDetectorRef: ChangeDetectorRef) {\r\n this.dataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: 'id',\r\n data: [],\r\n }),\r\n });\r\n\r\n this.buttons = [\r\n {\r\n name: 'Up',\r\n icon: 'chevronup',\r\n disabled: true\r\n },\r\n {\r\n name: 'Down',\r\n icon: 'chevrondown',\r\n disabled: true\r\n },\r\n {\r\n name: 'Refresh',\r\n icon: 'refresh',\r\n disabled: true\r\n },\r\n {\r\n name: 'Undo',\r\n icon: 'undo',\r\n disabled: true,\r\n },\r\n {\r\n name: 'Remove',\r\n icon: 'trash',\r\n disabled: true\r\n }\r\n ];\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.gridHeight = 240 - this.controlsDiv?.nativeElement.clientHeight;\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n public convertRequisitionBillingInfoPositionToPatientBillingInfoOrder(pbi: BillingInformation[]) {\r\n // THIS NEEDS TO BE DONE BECAUSE REQUISITION BILLING INFORMATION POSITION STARTS IN ZERO AND PATIENT BILLING INFO ORDER STARTS IN ONE\r\n for (let i = 0; i < pbi.length; i++) {\r\n pbi[i].order = i + 1;\r\n }\r\n return pbi;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.defaultBillTo = this.ClientDefaultBillTo;\r\n this.billTypeChanged(this.ClientDefaultBillTo);\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.screen.changed\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n });\r\n }\r\n\r\n public onItemClick(e: any) {\r\n switch (e.itemData.name) {\r\n case 'Up':\r\n this.changeUp();\r\n break;\r\n case 'Down':\r\n this.changeDown();\r\n break;\r\n case 'Refresh':\r\n this.refresh(false);\r\n break;\r\n case 'Undo':\r\n this.refresh(true);\r\n break;\r\n case 'Remove':\r\n this.remove();\r\n break;\r\n }\r\n }\r\n\r\n public billTypeChanged(billTo: string) {\r\n this.selectedBillTo = billTo;\r\n this.changeStateButtons();\r\n this.billToChanged.emit(this.selectedBillTo);\r\n }\r\n\r\n public get ClientDefaultBillTo() {\r\n if (this.patient !== undefined && this.patient !== null && this.patient.client !== undefined\r\n && this.patient.client !== null && this.patient.client.defaultBillTo) {\r\n return BillTo[this.patient.client.defaultBillTo].toUpperCase();\r\n } else {\r\n return 'INSURANCE';\r\n }\r\n }\r\n\r\n public selectionChange() {\r\n of(null)\r\n .pipe(debounceTime(1000))\r\n .subscribe(() => this.changeStateButtons());\r\n }\r\n\r\n public changeStateButtons() {\r\n this.buttons = [\r\n {\r\n name: 'Up',\r\n icon: 'chevronup',\r\n disabled: this.DisableUpBtn\r\n },\r\n {\r\n name: 'Down',\r\n icon: 'chevrondown',\r\n disabled: this.DisableDownBtn\r\n },\r\n {\r\n name: 'Refresh',\r\n icon: 'refresh',\r\n disabled: this.patient === undefined || this.patient === null || this.selectedBillTo !== 'INSURANCE' || this.disabled\r\n },\r\n {\r\n name: 'Remove',\r\n icon: 'trash',\r\n disabled: this.disabled || this.selectedBillTo !== 'INSURANCE' || this.selectedRowKeys.length === 0\r\n }\r\n ];\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.defaultBillTo) {\r\n if (changes.defaultBillTo.currentValue) {\r\n this.billTypeChanged(changes.defaultBillTo.currentValue);\r\n }\r\n }\r\n if (changes.patient && changes.patient.currentValue) {\r\n this.changeStateButtons();\r\n if (changes.patient.currentValue.id !== undefined\r\n && changes.patient.currentValue.id !== null) {\r\n\r\n this.patientService.getPatientBillingInformation(changes.patient.currentValue.id)\r\n .pipe(take(1))\r\n .subscribe(pbi => {\r\n if (this.isEdit) {\r\n pbi = pbi\r\n .filter(i => this.selectedBillingInfo?.map((s: any) => s.patientBillingInformationId).includes(i.id))\r\n .map(i => {\r\n const selectedIndex = this.selectedBillingInfo?.findIndex((s: any) => s.patientBillingInformationId === i.id) as number;\r\n // @ts-ignore\r\n i.order = this.selectedBillingInfo[selectedIndex].position;\r\n return i;\r\n });\r\n // @ts-ignore\r\n pbi.sort((a, b) => a.order - b.order);\r\n pbi = this.convertRequisitionBillingInfoPositionToPatientBillingInfoOrder(pbi);\r\n } else {\r\n // @ts-ignore\r\n pbi.sort((a, b) => a.order - b.order);\r\n }\r\n this.dataSource = new DataSource({store: new ArrayStore({key: 'id', data: pbi})});\r\n this.grid?.instance.refresh();\r\n this.billingInfoChanged.emit((this.dataSource.store() as ArrayStore).createQuery().toArray());\r\n });\r\n }\r\n }\r\n }\r\n\r\n public refresh(undo: boolean = false) {\r\n if (this.patient)\r\n this.patientService.getPatientBillingInformation(this.patient?.id)\r\n .pipe(take(1))\r\n .subscribe(pbi => {\r\n pbi = pbi\r\n .filter(i => !undo || this.selectedBillingInfo.map(s => s.patientBillingInformationId).includes(i.id))\r\n .map((i, index) => {\r\n if (undo) {\r\n const selectedIndex = this.selectedBillingInfo.findIndex(s => s.patientBillingInformationId === i.id);\r\n i.order = this.selectedBillingInfo[selectedIndex].position;\r\n } else {\r\n i.order = index;\r\n }\r\n return i;\r\n });\r\n // @ts-ignore\r\n pbi.sort((a, b) => a.order - b.order);\r\n pbi = this.convertRequisitionBillingInfoPositionToPatientBillingInfoOrder(pbi);\r\n this.dataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: 'id',\r\n data: pbi,\r\n }),\r\n });\r\n this.grid?.instance.refresh();\r\n this.billingInfoChanged.emit((this.dataSource.store() as ArrayStore).createQuery().toArray());\r\n });\r\n }\r\n\r\n public remove() {\r\n this.selectedRowKeys.forEach(x => {\r\n const selectedId = typeof x === 'number' ? x : (x as BillingInformation).id;\r\n this.dataSource.store().remove(selectedId);\r\n });\r\n this.selectedRowKeys = [];\r\n this.convertRequisitionBillingInfoPositionToPatientBillingInfoOrder((this.dataSource.store() as ArrayStore).createQuery().toArray());\r\n this.grid?.instance.refresh();\r\n this.billingInfoChanged.emit((this.dataSource.store() as ArrayStore).createQuery().toArray());\r\n }\r\n\r\n public get DisableUpBtn() {\r\n if (this.DisableChangePositionsBtn) {\r\n return true;\r\n }\r\n\r\n const selectedId = typeof this.selectedRowKeys[0] === 'number' ?\r\n this.selectedRowKeys[0] :\r\n (this.selectedRowKeys[0] as BillingInformation).id;\r\n const filtered = (this.dataSource.store() as ArrayStore).createQuery().filter(['id', '=', selectedId]).toArray();\r\n if (filtered.length === 0) {\r\n return true;\r\n }\r\n return filtered[0].order === 1;\r\n }\r\n\r\n public get DisableDownBtn() {\r\n if (this.DisableChangePositionsBtn) {\r\n return true;\r\n }\r\n\r\n const selectedId = typeof this.selectedRowKeys[0] === 'number' ?\r\n this.selectedRowKeys[0] :\r\n (this.selectedRowKeys[0] as BillingInformation).id;\r\n const filtered = (this.dataSource.store() as ArrayStore).createQuery().filter(['id', '=', selectedId]).toArray();\r\n if (filtered.length === 0) {\r\n return true;\r\n }\r\n return filtered[0].order === (this.dataSource.store() as ArrayStore).createQuery().toArray().length;\r\n }\r\n\r\n private get DisableChangePositionsBtn() {\r\n return this.disabled || this.selectedBillTo !== 'INSURANCE' || this.selectedRowKeys.length !== 1 ||\r\n this.dataSource === undefined || (this.dataSource.store() as ArrayStore).createQuery().toArray().length <= 1;\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 private getIndexesOfSelected() {\r\n const indexes: number[] = [];\r\n\r\n this.grid?.instance.getSelectedRowsData()\r\n .forEach((rp: BillingInformation) => {\r\n const index = (this.dataSource.store() as ArrayStore).createQuery().toArray()\r\n .findIndex((r: any) =>\r\n r.billTypeId === rp.billTypeId &&\r\n r.payerId === rp.payerId &&\r\n r.insuranceId === rp.insuranceId,\r\n );\r\n\r\n indexes.push(index);\r\n });\r\n\r\n return indexes;\r\n }\r\n\r\n public changeDown() {\r\n const prev = Math.max(...this.getIndexesOfSelected()) + 1;\r\n const array = (this.dataSource.store() as ArrayStore).createQuery().toArray();\r\n\r\n if (prev < array.length) {\r\n array[prev].order = array[Math.min(...this.getIndexesOfSelected())].order;\r\n this.getIndexesOfSelected().forEach(index => array[index].order++);\r\n array.sort((a: any, b: any) => a.order - b.order);\r\n this.dataSource = new DataSource({store: new ArrayStore({data: array}), key: 'id'});\r\n this.billingInfoChanged.emit(array);\r\n this.grid?.instance.refresh();\r\n }\r\n }\r\n\r\n public changeUp() {\r\n const prev = Math.min(...this.getIndexesOfSelected()) - 1;\r\n const array = (this.dataSource.store() as ArrayStore).createQuery().toArray();\r\n\r\n if (prev >= 0) {\r\n array[prev].order = array[Math.max(...this.getIndexesOfSelected())].order;\r\n this.getIndexesOfSelected().forEach(index => array[index].order--);\r\n array.sort((a: any, b: any) => a.order - b.order);\r\n this.dataSource = new DataSource({store: new ArrayStore({data: array}), key: 'id'});\r\n this.billingInfoChanged.emit(array);\r\n this.grid?.instance.refresh();\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n Bill To\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
Printer
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n {{label.title}}\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport {confirm} from 'devextreme/ui/dialog';\r\nimport {take} from 'rxjs/operators';\r\nimport {RequisitionLabelViewModel} from '../../../../shared/models/ocl';\r\nimport {UrlProviderService} from '../../../../shared/services/general';\r\nimport {RequisitionService} from '../../services/requisition.service';\r\n\r\n@Component({\r\n selector: 'app-printer-dialog',\r\n templateUrl: './printer-dialog.component.html',\r\n styleUrls: ['./printer-dialog.component.scss'],\r\n})\r\n\r\nexport class PrinterDialogComponent implements OnInit, OnChanges {\r\n @Input() public popupVisible = false;\r\n @Input() public requisitionId?: number;\r\n @Output() public closeEvent = new EventEmitter();\r\n\r\n public isLoading = false;\r\n private clientAppUpAndRunning = false;\r\n private clientAppBlocked = false;\r\n private showingConfirm = false;\r\n public loading = false;\r\n public printers: [] = [];\r\n public selectedPrinter: any = undefined;\r\n public requisitionLabels: RequisitionLabelViewModel[] = [] as any[];\r\n\r\n constructor(private requisitionService: RequisitionService, private urlProvider: UrlProviderService) {\r\n }\r\n\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n JSPM.JSPrintManager.license_url = `${this.urlProvider.ServerUrl}jspm`;\r\n JSPM.JSPrintManager.auto_reconnect = true;\r\n JSPM.JSPrintManager.start()\r\n .then(() => console.log('Printer tool connected'))\r\n .catch(e => {\r\n Sentry.captureException(e);\r\n JSPM.JSPrintManager.stop();\r\n });\r\n\r\n this.checkPrinterClientApp();\r\n }\r\n\r\n if (changes.requisitionId && changes.requisitionId.currentValue) {\r\n this.isLoading = true;\r\n this.requisitionService.getLabels(this.requisitionId as number)\r\n .pipe(take(1))\r\n .subscribe(labels => {\r\n this.requisitionLabels = labels;\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n JSPM.JSPrintManager.auto_reconnect = false;\r\n }\r\n\r\n public closing() {\r\n this.closeEvent.emit();\r\n }\r\n\r\n public get LoadingPrinters() {\r\n return this.loading && this.printers.length === 0;\r\n }\r\n\r\n private checkPrinterClientApp() {\r\n this.loading = true;\r\n JSPM.JSPrintManager.WS.onStatusChanged = (() => {\r\n const instance = this;\r\n return function WSStatusChanged() {\r\n try {\r\n if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Open) {\r\n JSPM.JSPrintManager.getPrintersInfo().then(printersList => {\r\n // @ts-ignore\r\n instance.printers = printersList;\r\n instance.loading = false;\r\n }).catch(e => {\r\n Sentry.captureException(e);\r\n JSPM.JSPrintManager.stop();\r\n });\r\n } else if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Closed) {\r\n if (!instance.showingConfirm && instance.popupVisible) {\r\n const response = confirm(\r\n // tslint:disable-next-line:max-line-length\r\n `Printer Client App is not running. Restart app to use feature or download it. \\n Would you like to be redirected to download site?`,\r\n 'Download Confirmation',\r\n );\r\n instance.showingConfirm = true;\r\n instance.loading = false;\r\n\r\n const closeEvent = instance.closeEvent;\r\n response.then(result => {\r\n instance.clientAppUpAndRunning = false;\r\n instance.showingConfirm = false;\r\n if (result) {\r\n window.open('https://www.dropbox.com/t/b04SMciBx6QJefst', '_blank');\r\n }\r\n closeEvent.emit();\r\n });\r\n }\r\n } else if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Blocked) {\r\n console.log('JSPM has blacklisted this website!');\r\n instance.clientAppBlocked = true;\r\n instance.clientAppUpAndRunning = true;\r\n }\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n JSPM.JSPrintManager.stop();\r\n }\r\n };\r\n })();\r\n }\r\n\r\n public sendToPrinter() {\r\n JSPM.JSPrintManager.start()\r\n .then(() => console.log('Printer tool connected'))\r\n .catch(e => {\r\n Sentry.captureException(e);\r\n JSPM.JSPrintManager.stop();\r\n });\r\n JSPM.JSPrintManager.WS.onStatusChanged = () => {\r\n if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Open) {\r\n const cpjg = new JSPM.ClientPrintJobGroup();\r\n this.requisitionLabels?.forEach(label => {\r\n const cpj2 = new JSPM.ClientPrintJob();\r\n cpj2.clientPrinter = new JSPM.InstalledPrinter(this.selectedPrinter.name);\r\n if (this.selectedPrinter.name.toUpperCase().includes('ZPL') || this.selectedPrinter.name.toUpperCase().includes('ZEBRA')) {\r\n cpj2.printerCommands = label.zpl;\r\n }\r\n\r\n if (this.selectedPrinter.name.toUpperCase().includes('EPL')) {\r\n cpj2.printerCommands = label.epl;\r\n }\r\n\r\n cpjg.jobs.push(cpj2);\r\n });\r\n cpjg.sendToClient()\r\n .then(() => console.log('Printer tool connected'))\r\n .catch(e => {\r\n Sentry.captureException(e);\r\n JSPM.JSPrintManager.stop();\r\n });\r\n }\r\n };\r\n }\r\n\r\n public printerChanged(printer: any) {\r\n if (printer.value) {\r\n const printerString = JSON.stringify(printer.value);\r\n localStorage.setItem('printer', printerString);\r\n this.selectedPrinter = printer.value;\r\n } else {\r\n // @ts-ignore\r\n localStorage.setItem('printer', undefined);\r\n }\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","import {Component, OnInit} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {RecentRequisitionViewModel} from '../../../../../shared/models/ocl';\r\nimport {PWADetectorService} from '../../../../../shared/services/general';\r\nimport {RecentRequisitionService} from '../../../../shared/services/recent-requisition.service';\r\n\r\n@Component({\r\n selector: 'app-recent-requisitions',\r\n templateUrl: './recent-requisitions.component.html',\r\n styleUrls: ['./recent-requisitions.component.scss'],\r\n})\r\nexport class RecentRequisitionsComponent implements OnInit {\r\n public recentRequisitions: RecentRequisitionViewModel[] = [];\r\n\r\n constructor(private recentRequisitionService: RecentRequisitionService, private pwaDetectorService: PWADetectorService, private router: Router) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.recentRequisitions = this.recentRequisitionService.getRecentRequisitions();\r\n // @ts-ignore\r\n this.recentRequisitions.sort((a, b) => b.id - a.id);\r\n }\r\n\r\n public lastRequisitionBtnClicked() {\r\n const lastId = this.recentRequisitions[0].id;\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['/secured/requisitions/create', {id: lastId}]).then();\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/requisitions/create', {id: lastId}]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n public rowClick(e: any) {\r\n const lastId = this.recentRequisitions[0].id;\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['/secured/requisitions/create', {id: lastId}]).then();\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/requisitions/create', {id: e.data.id}]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n}\r\n","\r\n
\r\n

The requisition was {{mode === 'create' ? 'created' : 'updated'}} successfully, what do you like to do next?

\r\n

The requisition was {{mode === 'create' ? 'created' : 'updated'}}

\r\n

successfully, what do you like to do next?

\r\n
\r\n

Create New Requisition

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

Print Requisition

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

Print Labels

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

Sign/Unsign Requisition

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

Attach Documents

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

Go to Home Page

\r\n \r\n
\r\n
\r\n\r\n\r\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {PWADetectorService, ScreenService} from '../../../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-requisition-done-dialog',\r\n templateUrl: './requisition-done-dialog.component.html',\r\n styleUrls: ['./requisition-done-dialog.component.scss']\r\n})\r\nexport class RequisitionDoneDialogComponent implements OnInit, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Input() public mode: 'create' | 'update' = 'create';\r\n @Input() public requisitionId: number = -1;\r\n @Output() public closeEvent = new EventEmitter();\r\n public isPhone: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private router: Router,\r\n private pwaDetectorService: PWADetectorService,\r\n private screen: ScreenService\r\n ) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n });\r\n }\r\n\r\n public redirectToNew() {\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['/secured/requisitions/create']);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/requisitions/create']),\r\n );\r\n window.open(url, '_self');\r\n }\r\n }\r\n\r\n public redirectToHome() {\r\n this.router.navigateByUrl('/secured/results/lab');\r\n }\r\n\r\n public redirectToEdit() {\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['/secured/requisitions/create', {id: this.requisitionId}]);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/requisitions/create', {id: this.requisitionId}]),\r\n );\r\n window.open(url, '_self');\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n Additional Copies\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n\r\n \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,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { RequisitionAdditionalCopy } from '../../../../../shared/models/ocl/requisition-additional-copy';\r\n\r\nconst faxPattern = /^\\d*$/;\r\n\r\n@Component({\r\n selector: 'app-additional-copies',\r\n templateUrl: './additional-copies.component.html',\r\n styleUrls: ['./additional-copies.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AdditionalCopiesComponent implements AfterViewInit {\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n public type = 'EMAIL';\r\n @Input() public maxHeight: string | number = '100%';\r\n public gridHeight: string | number = '100%';\r\n public faxPattern: RegExp = faxPattern;\r\n public selectedKeys: any[] = [];\r\n\r\n public formGroup = this.fb.group({\r\n typeControl: ['EMAIL'],\r\n destinationControl: ['', [Validators.required]],\r\n }, {\r\n validators: [this.validateDestination],\r\n });\r\n @Input() public additionalCopiesControl: UntypedFormControl = new UntypedFormControl();\r\n\r\n constructor(private fb: UntypedFormBuilder, private ref: ChangeDetectorRef) {\r\n this.validateDestination = this.validateDestination.bind(this);\r\n }\r\n\r\n public validateDestination(fg: UntypedFormGroup): { [key: string]: boolean } | null {\r\n return fg.get('typeControl')?.value === 'FAX' && !faxPattern.test(fg.get('destinationControl')?.value) ? { pattern: true } : null;\r\n }\r\n\r\n public get IsEmail(): boolean {\r\n return this.formGroup.get('typeControl')?.value === 'EMAIL';\r\n }\r\n\r\n public get IsFax(): boolean {\r\n return this.formGroup.get('typeControl')?.value === 'FAX';\r\n }\r\n\r\n public add() {\r\n if (this.formGroup.get('destinationControl')?.valid) {\r\n const additionalCopy = {\r\n destination: this.formGroup.get('destinationControl')?.value,\r\n type: this.formGroup.get('typeControl')?.value,\r\n } as RequisitionAdditionalCopy;\r\n\r\n (this.additionalCopiesControl.value as RequisitionAdditionalCopy[]).push(additionalCopy);\r\n\r\n this.formGroup.get('destinationControl')?.reset('');\r\n this.selectedKeys = [];\r\n }\r\n this.refresh();\r\n }\r\n\r\n public remove() {\r\n const additionalCopies = (this.additionalCopiesControl.value as RequisitionAdditionalCopy[]);\r\n const indexes = this.selectedKeys.map(item => additionalCopies.findIndex(ac => ac.destination === item.destination));\r\n indexes.forEach(index => additionalCopies.splice(index, 1));\r\n this.additionalCopiesControl.setValue(additionalCopies);\r\n\r\n this.selectedKeys = [];\r\n this.refresh();\r\n }\r\n\r\n public refresh() {\r\n if (this.ref) {\r\n this.ref.detectChanges();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (typeof this.maxHeight === 'number' && this.controlsDiv) {\r\n this.gridHeight = this.maxHeight - this.controlsDiv.nativeElement.clientHeight - 32;\r\n } else {\r\n this.gridHeight = '100%';\r\n }\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
Comment *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import {Component, EventEmitter, Input, OnChanges, Output, ViewChild} from '@angular/core';\r\nimport {DxPopupComponent} from 'devextreme-angular';\r\n\r\n@Component({\r\n selector: 'app-cancel-dialog',\r\n templateUrl: './cancel-dialog.component.html',\r\n styleUrls: ['./cancel-dialog.component.scss']\r\n})\r\nexport class CancelDialogComponent implements OnChanges {\r\n @ViewChild('popupComponent', {static: true}) public popupComponent?: DxPopupComponent;\r\n public commentTextArea: any;\r\n public comment = '';\r\n @Input() public popupVisible = false;\r\n @Output() public closeEvent = new EventEmitter();\r\n public username = '';\r\n public password = '';\r\n\r\n public close() {\r\n this.closeEvent.emit();\r\n }\r\n\r\n public clear() {\r\n this.comment = '';\r\n }\r\n\r\n public cancel() {\r\n this.closeEvent.emit({comment: this.comment});\r\n }\r\n\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges) {\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n if (this.commentTextArea === undefined) {\r\n setTimeout(() => {\r\n this.commentTextArea.instance().focus();\r\n }, 500);\r\n } else {\r\n setTimeout(() => {\r\n this.commentTextArea.instance().focus();\r\n }, 500);\r\n }\r\n }\r\n }\r\n\r\n public ready(e: any) {\r\n this.commentTextArea = e.component;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n Test Selection\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\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 ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnDestroy,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {BehaviorSubject, Subject, pipe} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\n\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport {DxLookupComponent} from 'devextreme-angular';\r\nimport {DxTextBoxComponent} from 'devextreme-angular';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {ScreenService} from '../../../../../shared/services/general';\r\nimport {TestService} from '../../../../shared/services/test.service';\r\nimport {TreeTest} from '../../../../shared/models/order-entry/test';\r\nimport notify from 'devextreme/ui/notify';\r\n\r\n@Component({\r\n selector: 'app-test-picker',\r\n templateUrl: './test-picker.component.html',\r\n styleUrls: ['./test-picker.component.scss'],\r\n})\r\nexport class TestPickerComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild('dropDownGrid', {static: false}) public dropDownGrid?: DxDataGridComponent;\r\n @ViewChild('codeTextBox', {static: true}) public codeTextBox?: DxTextBoxComponent;\r\n @ViewChild('testLookup', {static: false}) public lookup?: DxLookupComponent;\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n\r\n //@ts-ignore\r\n @Input() public pickerDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n @Input() public allTestsInPicker: BehaviorSubject = new BehaviorSubject(false);\r\n @Input() public testControl: UntypedFormControl = new UntypedFormControl();\r\n @Input() public disabled = true;\r\n\r\n public pickerSelectedKeys: number[] = [];\r\n public showAllTestsInPicker: boolean | null | undefined = false;\r\n public gridSize: number = -1;\r\n public isPhone: boolean = false;\r\n public tests: TreeTest[] = [];\r\n public selectedKeys: number[] = [];\r\n\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private testService: TestService,\r\n private screen: ScreenService,\r\n private elRef: ElementRef,\r\n private ref: ChangeDetectorRef,\r\n ) {\r\n this.textCodeChanged = this.textCodeChanged.bind(this);\r\n this.cleanLookup = this.cleanLookup.bind(this);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.initResponsive();\r\n this.gridSize = this.GridSize;\r\n this.testControl.valueChanges.pipe(take(1))\r\n .subscribe(tests => {\r\n this.tests = tests;\r\n });\r\n this.ref.detectChanges();\r\n }\r\n\r\n public resizePickerDropDown() {\r\n if (\r\n this.elRef.nativeElement.querySelector('#testsPickerContainer') &&\r\n this.elRef.nativeElement.querySelector('#testsPickerContainer').parentElement &&\r\n this.elRef.nativeElement.querySelector('#testsPickerContainer').parentElement.parentElement\r\n ) {\r\n // @ts-ignore\r\n (this.elRef.nativeElement.querySelector('#testsPickerContainer') as HTMLElement).parentElement.parentElement.style.width = this.isPhone ? '250px' : '580px';\r\n // @ts-ignore\r\n (this.elRef.nativeElement.querySelector('#testsPickerContainer') as HTMLElement).parentElement.parentElement.style.height = '50vh';\r\n // @ts-ignore\r\n (this.elRef.nativeElement.querySelector('#testsPickerContainer') as HTMLElement).parentElement.style.height = '100%';\r\n }\r\n\r\n if (this.dropDownGrid !== undefined) {\r\n this.dropDownGrid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public allTestsCheckboxValueChanged() {\r\n this.allTestsInPicker.next(this.showAllTestsInPicker ? this.showAllTestsInPicker : false);\r\n }\r\n\r\n public cleanLookup() {\r\n this.lookup?.instance.getDataSource().filter(null);\r\n this.lookup?.instance.getDataSource().load();\r\n }\r\n\r\n public textCodeChanged({value}: any, cb?: () => void) {\r\n if (value === '') {\r\n return;\r\n }\r\n this.cleanLookup();\r\n const dataSource = Object.create(this.pickerDataSource.value);\r\n dataSource.filter(['code', '=', value.toUpperCase()]);\r\n dataSource.load().then((v: TreeTest[]) => {\r\n this.cleanLookup();\r\n if (v.length === 0) {\r\n this.lookup?.instance.option('value', '');\r\n return notify(`Test with code ${this.codeTextBox?.value} not found`);\r\n }\r\n if (v && v.length === 1) {\r\n this.lookup?.instance.option('value', v[0].id);\r\n return cb && cb();\r\n } else {\r\n return notify(`More than one test with code ${this.codeTextBox?.value} matched`);\r\n }\r\n });\r\n }\r\n\r\n public addFoundTests() {\r\n const items = this.lookup?.instance.option('value');\r\n if (items) {\r\n this.testService.getTestWithChildren(typeof items === 'number' ? [items] : items)\r\n .pipe(take(1))\r\n .subscribe((tests: TreeTest[]) => {\r\n if (this.tests.length > 0) {\r\n for (const test of tests) {\r\n if (this.tests.findIndex(t => t.id === test.id) === -1) {\r\n this.tests.push(test);\r\n }\r\n }\r\n } else {\r\n this.tests.push(...tests);\r\n }\r\n this.testControl.setValue(this.tests);\r\n this.cleanLookup();\r\n this.lookup?.instance.option('value', null);\r\n if (this.codeTextBox) {\r\n this.codeTextBox.text = '';\r\n }\r\n\r\n this.ref.detectChanges();\r\n });\r\n }\r\n }\r\n\r\n public removeSelectedTest() {\r\n for (const key of this.selectedKeys) {\r\n const index = this.tests.findIndex(t => t.id === key);\r\n if (index !== -1) {\r\n const t = this.tests[index];\r\n this.tests.splice(index, 1);\r\n for (const child of t.children) {\r\n const childIndex = this.tests.findIndex(test => test.id === child.childId);\r\n if (childIndex !== -1) {\r\n this.tests.splice(childIndex, 1);\r\n }\r\n }\r\n }\r\n }\r\n this.selectedKeys = [];\r\n this.testControl.setValue(this.tests);\r\n this.ref.detectChanges();\r\n }\r\n\r\n public get GridSize() {\r\n return (this.containerDiv?.nativeElement as HTMLElement).getBoundingClientRect().height -\r\n 16 - (this.controlsDiv?.nativeElement as HTMLElement).getBoundingClientRect().height;\r\n }\r\n\r\n public async pickerEnterKeyEvent() {\r\n const afterItemLoaded = () => {\r\n this.addFoundTests();\r\n this.cleanLookup();\r\n this.codeTextBox?.instance.reset();\r\n };\r\n this.textCodeChanged({value: this.codeTextBox?.text}, afterItemLoaded);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n public initResponsive() {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.screen.changed\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n });\r\n }\r\n\r\n private markNodeAsHidden(node: any) {\r\n for (let child of node.children) {\r\n this.markNodeAsHidden(child);\r\n }\r\n\r\n if (node.data && node.data.isConfidential) {\r\n node.visible = false;\r\n }\r\n }\r\n\r\n public nodesInitialized(nodes: any) {\r\n this.markNodeAsHidden(nodes.root);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n

New Requisition

\r\n

Edit Requisition: {{requisitionCreateForm.get('code')?.value}}

\r\n \r\n
\r\n
\r\n
New Requisition
\r\n
Edit Requisition: {{requisitionCreateForm.get('code')?.value}}
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n Requisition Details\r\n
\r\n
\r\n
\r\n
Collection Date
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Fasting *
\r\n
\r\n \r\n \r\n \r\n \r\n \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
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Requisition Documents

\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{document.name}}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\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 ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n HostListener, OnChanges,\r\n OnInit,\r\n Output,\r\n Renderer2, SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport {DxButtonComponent} from 'devextreme-angular';\r\nimport {DxButtonGroupComponent} from 'devextreme-angular';\r\nimport config from 'devextreme/core/config';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {dxDataGridColumn} from 'devextreme/ui/data_grid';\r\nimport {custom} from 'devextreme/ui/dialog';\r\nimport notify from 'devextreme/ui/notify';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport {CREATED} from 'http-status-codes';\r\nimport {startCase} from 'lodash';\r\nimport * as Moment from 'moment-timezone';\r\nimport {BehaviorSubject, forkJoin, Observable, of} from 'rxjs';\r\nimport {switchMap, take} from 'rxjs/operators';\r\nimport {ReportsService} from 'src/app/modules/shared/services/reports.service';\r\nimport {environment} from '../../../../../../environments/environment';\r\nimport {RegistrationRequest} from '../../../../../shared/models/fusion-auth';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {PWADetectorService, ScreenService} from '../../../../../shared/services/general';\r\nimport {RecentRequisitionService} from '../../../../../shared/services/ocl';\r\nimport {DirtyComponent, FileUtils, TestUtils} from '../../../../../shared/utils';\r\nimport {BillTo} from '../../../../shared/models/billing/bill-type';\r\nimport {BillingInformation} from '../../../../shared/models/billing/billing-information';\r\nimport {Document} from '../../../../shared/models/common/document';\r\nimport {PatientEditable} from '../../../../shared/models/order-entry/patient';\r\nimport {DiagnosisService, MedicationService, PatientService} from '../../../../shared/services';\r\nimport {RequisitionService} from '../../../../shared/services/requisition.service';\r\nimport {TestService} from '../../../../shared/services/test.service';\r\nimport {SignatureRepresentation} from '../../components/signature-dialog/signature-dialog.component';\r\nimport {ClinicalInfo, Requisition} from '../../models/requisition';\r\nimport {RequisitionBillingInfo} from '../../models/requisition-billing-infog';\r\nimport {RequisitionStatus} from '../../models/requisition-search';\r\nimport {MultipleRequisitionsSignature, RequisitionSignature, Signature} from '../../../../shared/models/signature';\r\nimport {RecentRequisitionViewModel} from \"../../../../../shared/models/ocl\";\r\n\r\n@Component({\r\n selector: 'app-requisition-create',\r\n templateUrl: './requisition-create.component.html',\r\n styleUrls: ['./requisition-create.component.scss'],\r\n})\r\nexport class RequisitionCreateComponent implements OnInit, AfterViewInit, DirtyComponent {\r\n @ViewChild('unsignBtn', {static: false}) public unsignBtn?: DxButtonComponent;\r\n @ViewChild('signBtn', {static: false}) public signBtn?: DxButtonComponent;\r\n @ViewChild(DxButtonGroupComponent, {static: false}) public buttonGroup?: DxButtonGroupComponent;\r\n\r\n @Output() public selectedPatientChange = new EventEmitter();\r\n\r\n public requisitionCreateForm: UntypedFormGroup;\r\n public electronicSignaturePopupVisible = false;\r\n public electronicSignatureUnsignPopupVisible = false;\r\n public cancelPopupVisible = false;\r\n public clinicalInfo = [{value: ClinicalInfo.Unknown, text: 'UNKNOWN'}, {\r\n value: ClinicalInfo.Fasting,\r\n text: 'FASTING',\r\n }, {value: ClinicalInfo.NonFasting, text: 'NON FASTING'}];\r\n public priorities = ['STAT', 'ROUTINE', 'RUSH', 'PRE-OPERATORY'];\r\n public isLoading = false;\r\n public selectedBillToOnlyForEdit: any[] = [];\r\n public selectedDefaultBillToOnlyForEdit: string = BillTo[BillTo.Insurance].toUpperCase();\r\n public printerDialogVisible = false;\r\n public docs: Document[] = [];\r\n public requisitionId = -1;\r\n public isUploading = false;\r\n public requisitionDoneVisible = false;\r\n public mode: 'create' | 'update' = 'create';\r\n // @ts-ignore\r\n public diagnosisDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public alternateDiagnosisDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public medicationsDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public alternateMedicationsDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public diagnosesFormRelationColumns: Array = [\r\n {\r\n dataField: 'code',\r\n width: 100,\r\n caption: 'Code',\r\n allowFiltering: true,\r\n allowSorting: true,\r\n allowResizing: true,\r\n } as dxDataGridColumn,\r\n {\r\n dataField: 'shortName',\r\n caption: 'Name',\r\n allowFiltering: true,\r\n allowSorting: true,\r\n allowResizing: true,\r\n } as dxDataGridColumn,\r\n ];\r\n public medicationsFormRelationColumns: Array = [\r\n {\r\n dataField: 'code',\r\n width: 100,\r\n caption: 'Code',\r\n allowFiltering: true,\r\n allowSorting: true,\r\n allowResizing: true,\r\n } as dxDataGridColumn,\r\n {\r\n dataField: 'name',\r\n caption: 'Name',\r\n allowFiltering: true,\r\n allowSorting: true,\r\n allowResizing: true,\r\n } as dxDataGridColumn,\r\n ];\r\n public showAllTestsInPicker: BehaviorSubject = new BehaviorSubject(false);\r\n public selectedClient: BehaviorSubject = new BehaviorSubject(0);\r\n // @ts-ignore\r\n public testPickerDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n\r\n public moreOptions: any;\r\n public saveButtonOptions: any;\r\n public cancelButtonOptions: any;\r\n public clearButtonOptions: any;\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n public canNavigate = false;\r\n public isReadOnly = false;\r\n public role: string = '';\r\n\r\n public onDestroy$: BehaviorSubject = new BehaviorSubject(null);\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private pwaDetectorService: PWADetectorService,\r\n public medicationService: MedicationService,\r\n public diagnosisService: DiagnosisService,\r\n public fusionAuthService: FusionAuthService,\r\n public requisitionService: RequisitionService,\r\n public patientService: PatientService,\r\n public router: Router,\r\n public route: ActivatedRoute,\r\n public reportsService: ReportsService,\r\n public recentRequisitionService: RecentRequisitionService,\r\n private renderer: Renderer2,\r\n private fusionAuthManagement: FusionAuthManagementService,\r\n private screen: ScreenService,\r\n private testService: TestService,\r\n private ref: ChangeDetectorRef,\r\n ) {\r\n this.requisitionCreateForm = this.fb.group({\r\n id: [null],\r\n code: [null],\r\n patient: [null, [Validators.required]],\r\n collectionDate: [null, [Validators.required]],\r\n fasting: [ClinicalInfo.Unknown, [Validators.required]],\r\n priority: ['ROUTINE', [Validators.required]],\r\n physician: [null],\r\n status: [null],\r\n tests: [null, [Validators.required]],\r\n additionalTestsDxCodes: [null],\r\n diagnosisCodes: [[]],\r\n medications: [[]],\r\n billTo: [null],\r\n billingInformation: [null],\r\n signature: [null],\r\n comments: [null],\r\n additionalCopies: [[]],\r\n });\r\n this.moreOptions = [\r\n {\r\n icon: 'fa fa-barcode',\r\n text: 'Labels',\r\n hint: 'Print Requisition Labels',\r\n disabled: true,\r\n },\r\n {\r\n icon: 'fa fa-print',\r\n text: 'Print',\r\n hint: 'Print Requisition',\r\n disabled: true,\r\n },\r\n ];\r\n\r\n this.saveButtonOptions = {\r\n text: 'Save',\r\n disabled: this.IsNotEditable,\r\n onClick: () => {\r\n this.openUnsignDialog();\r\n },\r\n };\r\n\r\n this.cancelButtonOptions = {\r\n text: 'Cancel',\r\n disabled: !this.IsRequisitionCancelable || this.IsNotEditable,\r\n onClick: () => {\r\n this.openCancelRequisitionDialog();\r\n },\r\n };\r\n\r\n this.clearButtonOptions = {\r\n text: 'Clear',\r\n onClick: () => {\r\n this.clear();\r\n },\r\n };\r\n\r\n this.requisitionCreateForm.valueChanges\r\n .subscribe(formData => {\r\n if (formData.id) {\r\n this.moreOptions = [\r\n {\r\n icon: 'fa fa-barcode',\r\n text: 'Labels',\r\n hint: 'Print Requisition Labels',\r\n disabled: false,\r\n },\r\n {\r\n icon: 'fa fa-print',\r\n text: 'Print',\r\n hint: 'Print Requisition',\r\n disabled: false,\r\n },\r\n {\r\n icon: 'fa fa-pen-alt',\r\n text: formData.signature === null ? 'Sign' : 'Unsign',\r\n hint: formData.signature === null ? 'Sign Requisition' : 'Unsign Requisition',\r\n disabled: this.isReadOnly,\r\n },\r\n ];\r\n } else {\r\n this.moreOptions = [\r\n {\r\n icon: 'fa fa-barcode',\r\n text: 'Labels',\r\n hint: 'Print Requisition Labels',\r\n disabled: true,\r\n },\r\n {\r\n icon: 'fa fa-print',\r\n text: 'Print',\r\n hint: 'Print Requisition',\r\n disabled: true,\r\n }, /*,\r\n {\r\n icon: 'fa fa-pen-alt',\r\n text: 'Sign',\r\n hint: 'Sign Requisition',\r\n disabled: true,\r\n },*/\r\n ];\r\n }\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.initResponsive();\r\n this.diagnosisDataSource.next(new DataSource({store: this.diagnosisService.customStore(this.diagnosisDataSource)}));\r\n this.medicationsDataSource.next(new DataSource({store: this.medicationService.customStore(this.medicationsDataSource)}));\r\n this.testPickerDataSource.next(new DataSource({\r\n store: this.testService.customStore(this.testPickerDataSource, this.selectedClient.value, this.showAllTestsInPicker.value),\r\n }));\r\n this.isLoading = true;\r\n\r\n const request = this.route.paramMap.pipe(\r\n switchMap(params => {\r\n if (params.get('id')) {\r\n // @ts-ignore\r\n this.requisitionId = +params.get('id');\r\n this.isLoading = true;\r\n this.mode = 'update';\r\n return forkJoin([\r\n this.requisitionService.getRequisition(this.requisitionId),\r\n this.requisitionService.getRequisitionBillingInformation(this.requisitionId),\r\n this.requisitionService.getRequisitionSignature(this.requisitionId),\r\n ]);\r\n } else {\r\n const currentDate = new Date();\r\n currentDate.setHours(0);\r\n currentDate.setMinutes(0);\r\n currentDate.setSeconds(0);\r\n this.requisitionCreateForm.get('collectionDate')?.setValue(currentDate);\r\n return forkJoin([of(null), of(null), of(null)]);\r\n }\r\n }),\r\n );\r\n\r\n request.pipe(take(1))\r\n // @ts-ignore\r\n .subscribe(([requisition, billingInfo, signature]: [Requisition, RequisitionBillingInfo[], RequisitionSignature]) => {\r\n if (!requisition) {\r\n this.isLoading = false;\r\n return;\r\n }\r\n\r\n this.isReadOnly = requisition.status === RequisitionStatus.Canceled || requisition.status === RequisitionStatus.Done;\r\n switch (requisition.billTo) {\r\n case BillTo.Client:\r\n this.selectedDefaultBillToOnlyForEdit = BillTo[BillTo.Client].toUpperCase();\r\n break;\r\n case BillTo.Patient:\r\n this.selectedDefaultBillToOnlyForEdit = BillTo[BillTo.Patient].toUpperCase();\r\n break;\r\n default:\r\n this.selectedDefaultBillToOnlyForEdit = BillTo[BillTo.Insurance].toUpperCase();\r\n break;\r\n }\r\n if (billingInfo) {\r\n billingInfo.forEach(b => b.position = b.position + 1);\r\n this.selectedBillToOnlyForEdit = billingInfo;\r\n }\r\n\r\n this.requisitionCreateForm.get('id')?.setValue(requisition.id);\r\n this.requisitionCreateForm.get('code')?.setValue(requisition.code);\r\n this.requisitionCreateForm.get('patient')?.setValue(requisition.patient);\r\n this.requisitionCreateForm.get('additionalCopies')?.setValue(requisition.additionalCopies);\r\n this.requisitionCreateForm.get('collectionDate')?.setValue(Moment(requisition.collectionDate));\r\n this.requisitionCreateForm.get('priority')?.setValue(requisition.priority);\r\n this.requisitionCreateForm.get('physician')?.setValue(requisition.physician);\r\n this.requisitionCreateForm.get('tests')?.setValue(requisition.treeTests);\r\n this.requisitionCreateForm.get('additionalTestsDxCodes')?.setValue(requisition.additionalTestsDxCodes);\r\n this.requisitionCreateForm.get('status')?.setValue(requisition.status);\r\n this.requisitionCreateForm.get('diagnosisCodes')?.setValue(requisition.diagnoses);\r\n this.requisitionCreateForm.get('medications')?.setValue(requisition.medications);\r\n // @ts-ignore\r\n this.requisitionCreateForm.get('billTo')?.setValue(BillTo[requisition.billTo]);\r\n this.requisitionCreateForm.get('billingInformation')?.setValue(billingInfo);\r\n this.requisitionCreateForm.get('comments')?.setValue(requisition.comments);\r\n this.requisitionCreateForm.get('fasting')?.setValue(requisition.fasting === ClinicalInfo.NonFasting\r\n ? this.clinicalInfo[2].value\r\n : requisition.fasting);\r\n\r\n this.requisitionService.getRequisitionDocuments(this.requisitionId).pipe(take(1)).subscribe(docs => this.docs = docs);\r\n\r\n if (signature) {\r\n if (!signature.signature) {\r\n signature.signature = new Signature();\r\n }\r\n\r\n if (!signature.signature.imageSignature) {\r\n signature.signature.imageSignature = '';\r\n }\r\n this.requisitionCreateForm.get('signature')?.setValue(signature);\r\n if (this.signBtn && this.unsignBtn) {\r\n this.signBtn.disabled = true;\r\n this.unsignBtn.disabled =\r\n this.requisitionCreateForm.get('signature')?.value.signature.userName ===\r\n `${this.fusionAuthService.Profile.firstName} ${this.fusionAuthService.Profile.lastName}`;\r\n }\r\n }\r\n\r\n this.isLoading = false;\r\n this.ref.detectChanges();\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.signBtn && this.unsignBtn) {\r\n this.signBtn.disabled = false;\r\n this.unsignBtn.disabled = true;\r\n }\r\n\r\n this.selectedClient\r\n .subscribe(clientId => this.testPickerDataSource.next(new DataSource({\r\n store: this.testService.customStore(this.testPickerDataSource, clientId, this.showAllTestsInPicker.value),\r\n })));\r\n\r\n this.showAllTestsInPicker\r\n .subscribe(allTests => this.testPickerDataSource.next(new DataSource({\r\n store: this.testService.customStore(this.testPickerDataSource, this.selectedClient.value, allTests),\r\n })));\r\n }\r\n\r\n public initResponsive() {\r\n const configureResponsive = () => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n };\r\n configureResponsive();\r\n this.screen.changed.subscribe(() => {\r\n configureResponsive();\r\n });\r\n }\r\n\r\n public get IsNotEditable() {\r\n return this.requisitionCreateForm.get('status')?.value\r\n ? this.requisitionCreateForm.get('status')?.value === RequisitionStatus.Canceled\r\n : false;\r\n }\r\n\r\n public get IsCancelled() {\r\n return this.requisitionCreateForm.get('status')?.value === RequisitionStatus.Canceled;\r\n }\r\n\r\n public get IsPatientSelected() {\r\n return this.requisitionCreateForm.get('patient')?.value !== null;\r\n }\r\n\r\n public openSignDialog() {\r\n this.electronicSignaturePopupVisible = true;\r\n }\r\n\r\n public openCancelRequisitionDialog() {\r\n if (this.IsRequisitionCancelable) {\r\n this.cancelPopupVisible = true;\r\n }\r\n }\r\n\r\n public cancelRequisitionDialogClosed(response: { comment: string }) {\r\n if (response && response.comment) {\r\n this.isLoading = true;\r\n this.requisitionService\r\n .cancelRequisition(this.requisitionCreateForm.get('id')?.value, response.comment)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n notify('Requisition canceled', 'success');\r\n this.requisitionCreateForm.get('status')?.setValue(RequisitionStatus.Canceled);\r\n this.isReadOnly = true;\r\n this.isLoading = false;\r\n this.cancelPopupVisible = false;\r\n });\r\n } else {\r\n this.cancelPopupVisible = false;\r\n }\r\n }\r\n\r\n public billToChanged(billTo: string) {\r\n this.requisitionCreateForm.get('billTo')?.setValue(billTo);\r\n }\r\n\r\n public get IsRequisitionCancelable() {\r\n return (\r\n this.requisitionCreateForm.get('id')?.value !== undefined &&\r\n this.requisitionCreateForm.get('id')?.value !== null &&\r\n this.requisitionCreateForm.get('id')?.value !== -1 &&\r\n this.requisitionCreateForm.get('id')?.value !== 0\r\n );\r\n }\r\n\r\n public openSignatureDialog() {\r\n if (!this.signBtn?.disabled) {\r\n this.openSignDialog();\r\n } else {\r\n this.openUnsignDialog();\r\n }\r\n }\r\n\r\n public waitByUser() {\r\n const user = this.fusionAuthService.Profile;\r\n if (user) {\r\n this.role = user.registrations[0].roles[0];\r\n } else {\r\n setTimeout(() => {\r\n this.waitByUser();\r\n }, 1000);\r\n }\r\n }\r\n\r\n @HostListener('window:beforeunload', ['$event'])\r\n // @ts-ignore\r\n public beforeUnloadHandler(event: any) {\r\n if (!this.canNavigate && this.requisitionCreateForm.dirty) {\r\n const returnValue = 'There are unsaved changes. Do you want to continue and lose these changes?';\r\n event.returnValue = returnValue;\r\n return returnValue;\r\n }\r\n }\r\n\r\n public canDeactivate() {\r\n return this.canNavigate ? false : this.requisitionCreateForm.dirty;\r\n }\r\n\r\n public get Status() {\r\n let color;\r\n let status = '';\r\n switch (this.requisitionCreateForm.get('status')?.value) {\r\n case RequisitionStatus.Canceled:\r\n color = 'ocl-status-black';\r\n status = RequisitionStatus[RequisitionStatus.Canceled];\r\n break;\r\n case RequisitionStatus.Done:\r\n color = 'ocl-status-green';\r\n status = RequisitionStatus[RequisitionStatus.Done];\r\n break;\r\n case RequisitionStatus.Pending:\r\n color = 'ocl-status-yellow';\r\n status = RequisitionStatus[RequisitionStatus.Pending];\r\n break;\r\n }\r\n\r\n return `
\r\n
\r\n ${status ? status !== '' ? status.toUpperCase() : '' : ''}\r\n
\r\n
`;\r\n }\r\n\r\n public clear() {\r\n if (this.requisitionCreateForm.get('patient')?.value) {\r\n location.replace('/secured/requisitions/create');\r\n }\r\n }\r\n\r\n public printRequisition() {\r\n this.isLoading = true;\r\n this.reportsService.generateRequisitionReport([this.requisitionCreateForm.get('id')?.value])\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this));\r\n }\r\n\r\n public openLabelPrinter() {\r\n this.printerDialogVisible = true;\r\n }\r\n\r\n public preventDefault(e: any) {\r\n e.preventDefault();\r\n }\r\n\r\n public onButtonReady(e: any) {\r\n const parent = e.actionElement[0];\r\n const labelButtons = parent.querySelector('.dx-overlay-content');\r\n if (labelButtons !== undefined) {\r\n this.renderer.setStyle(labelButtons, 'overflow', 'visible');\r\n }\r\n }\r\n\r\n public onCollectionDateReady(e: any) {\r\n const element = e.element;\r\n if (e.component._pickerType === 'native') {\r\n const button = element.querySelector('.dx-texteditor-buttons-container');\r\n const input = element.querySelector('.dx-texteditor-input');\r\n this.renderer.setStyle(button, 'display', 'none');\r\n this.renderer.setStyle(input, 'padding-right', '5px');\r\n }\r\n }\r\n\r\n public openUnsignDialog() {\r\n this.electronicSignatureUnsignPopupVisible = true;\r\n }\r\n\r\n public unsignDialogClosed(reset: any) {\r\n if (reset) {\r\n this.requisitionCreateForm.get('signature')?.setValue(null);\r\n if (this.requisitionCreateForm.get('id')?.value) {\r\n this.requisitionService.unsign(this.requisitionCreateForm.get('id')?.value)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n if(this.signBtn?.disabled && this.unsignBtn?.disabled) {\r\n this.signBtn.disabled = false;\r\n this.unsignBtn.disabled = true;\r\n }\r\n this.electronicSignatureUnsignPopupVisible = false;\r\n notify('Requisition Unsigned!', 'success');\r\n });\r\n }\r\n }\r\n this.electronicSignatureUnsignPopupVisible = false;\r\n }\r\n\r\n public signDialogClosed(signatureDialogResponse: SignatureRepresentation) {\r\n if (signatureDialogResponse) {\r\n const signature = new MultipleRequisitionsSignature();\r\n signature.image = signatureDialogResponse.image;\r\n signature.username = signatureDialogResponse.username;\r\n signature.requisitionsIds = [this.requisitionCreateForm.get('id')?.value];\r\n const user = this.fusionAuthService.Profile;\r\n user.data = {\r\n signImage: signatureDialogResponse.image,\r\n clients: user.data !== undefined ? user.data.clients : [],\r\n patients: user.data !== undefined ? user.data.patients : [],\r\n physicians: user.data !== undefined ? user.data.physicians : [],\r\n };\r\n const request: RegistrationRequest = {\r\n user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [user.role],\r\n username: user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.fusionAuthManagement\r\n .updateUser(user.id, request)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === CREATED) {\r\n if (this.signBtn?.disabled && this.unsignBtn?.disabled) {\r\n this.signBtn.disabled = true;\r\n this.unsignBtn.disabled = false;\r\n }\r\n\r\n this.requisitionService.signRequisitions(signature)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n const sign = {\r\n signature: {\r\n imageSignature: signatureDialogResponse.image,\r\n userName: signatureDialogResponse.username,\r\n signedDateTime: Date.now(),\r\n },\r\n };\r\n this.fusionAuthService.SignatureImage = signatureDialogResponse.image;\r\n this.requisitionCreateForm.get('signature')?.setValue(sign);\r\n this.ref.detectChanges();\r\n notify('Requisition Signed!', 'success');\r\n });\r\n }\r\n });\r\n }\r\n this.electronicSignaturePopupVisible = false;\r\n }\r\n\r\n public documentClick(name: string) {\r\n this.isLoading = true;\r\n this.requisitionService.downloadRequisitionDocuments(this.requisitionId, name)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this));\r\n }\r\n\r\n public documentRemove(id: number) {\r\n const dialog = custom({\r\n title: 'Delete Document',\r\n messageHtml: 'Are you sure you want to remove the document from the requisition?',\r\n buttons: [{\r\n text: 'Yes',\r\n onClick: (e) => {\r\n return e.component.option('text');\r\n },\r\n }, {\r\n text: 'No',\r\n onClick: (e) => {\r\n return e.component.option('text');\r\n },\r\n }],\r\n });\r\n\r\n dialog.show().then((dialogResult: string) => {\r\n if (dialogResult === 'Yes') {\r\n this.isLoading = true;\r\n this.requisitionService.removeRequisitionDocument(this.requisitionId, id)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.requisitionService.getRequisitionDocuments(this.requisitionId).pipe(take(1)).subscribe(docs => this.docs = docs);\r\n this.isLoading = false;\r\n dialog.hide();\r\n });\r\n } else {\r\n dialog.hide();\r\n }\r\n });\r\n\r\n }\r\n\r\n public onFileChanged(event: Event) {\r\n const response = FileUtils.validateFile(event as InputEvent, this);\r\n if (typeof response !== 'boolean') {\r\n response.then(fileString => {\r\n // @ts-ignore\r\n this.requisitionService.uploadDocument(this.requisitionId, fileString, (event.target as HTMLInputElement).files[0].name)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.isUploading = false;\r\n this.isLoading = false;\r\n if (res.id) {\r\n notify('File uploaded successfully', 'success');\r\n this.requisitionService.getRequisitionDocuments(this.requisitionId).pipe(take(1)).subscribe(docs => this.docs = docs);\r\n }\r\n\r\n }, () => {\r\n notify('There was an error uploading your file', 'error');\r\n });\r\n });\r\n }\r\n }\r\n\r\n public itemClick(e: any) {\r\n this.buttonGroup?.instance.resetOption('selectedItemKeys');\r\n this.buttonGroup?.instance.resetOption('selectedItems');\r\n switch (e.itemData.icon) {\r\n case 'fa fa-barcode':\r\n return this.openLabelPrinter();\r\n case 'fa fa-print':\r\n return this.printRequisition();\r\n case 'fa fa-pen-alt': {\r\n if (!this.signBtn?.disabled) {\r\n return this.openSignDialog();\r\n }\r\n\r\n if (!this.unsignBtn?.disabled) {\r\n return this.openUnsignDialog();\r\n }\r\n\r\n return;\r\n }\r\n }\r\n }\r\n\r\n public patientSelectionChanged(patient: PatientEditable): void {\r\n if (patient) {\r\n this.isLoading = true;\r\n this.patientService.getPatient(patient.id).pipe(\r\n take(1),\r\n )\r\n .subscribe(p => {\r\n this.isLoading = false;\r\n this.selectedClient.next(p.clientId);\r\n this.ref.detectChanges();\r\n this.selectedPatientChange.emit(p);\r\n });\r\n this.alternateDiagnosisDataSource.next(new DataSource({\r\n store:\r\n this.diagnosisService.customStoreFilteredByPatientId(patient.id, this.alternateDiagnosisDataSource),\r\n }));\r\n this.alternateMedicationsDataSource.next(new DataSource({\r\n store:\r\n this.medicationService.customStoreFilteredByPatientId(patient.id, this.alternateMedicationsDataSource),\r\n }));\r\n }\r\n }\r\n\r\n public billingInfoChanged(patientBillingInfo: BillingInformation[]) {\r\n const billingInfo = patientBillingInfo.map((bi: BillingInformation) => {\r\n const temp = new RequisitionBillingInfo();\r\n temp.position = bi.order ? bi.order : 1;\r\n temp.patientBillingInformationId = bi.id;\r\n return temp;\r\n });\r\n this.requisitionCreateForm.get('billingInformation')?.setValue(billingInfo);\r\n }\r\n\r\n private recentRequisition(req: Requisition, patient: PatientEditable, client: string, update: boolean) {\r\n const requisition = {\r\n id: req.id,\r\n birthDate: Moment(patient.birthDate),\r\n codeValue: req.code,\r\n clientName: client,\r\n firstName: patient.firstName,\r\n lastName: patient.lastName,\r\n tests: (req.tests ? req.tests : [])\r\n .filter(t => t.level === 0)\r\n .map((t: any) => t.test.name)\r\n .join(', '),\r\n };\r\n this.requisitionCreateForm.get('id')?.setValue(requisition.id);\r\n\r\n if (update) {\r\n this.recentRequisitionService.updateRecentRecentRequisitions(requisition as RecentRequisitionViewModel);\r\n } else {\r\n this.recentRequisitionService.addRecentRecentRequisitions(requisition as RecentRequisitionViewModel);\r\n }\r\n\r\n\r\n this.canNavigate = true;\r\n this.requisitionDoneVisible = true;\r\n }\r\n\r\n public submit() {\r\n const requisitionForm = ValidationEngine.validateGroup('requisitionForm');\r\n if (requisitionForm.isValid && this.requisitionCreateForm.get('tests')?.value !== null\r\n && this.requisitionCreateForm.get('tests')?.value.length > 0) {\r\n this.isLoading = true;\r\n const req = new Requisition();\r\n req.additionalCopies = this.requisitionCreateForm.get('additionalCopies')?.value;\r\n req.additionalTestsDxCodes = this.requisitionCreateForm.get('additionalTestsDxCodes')?.value;\r\n req.patientId = this.requisitionCreateForm.get('patient')?.value.id;\r\n req.patient = this.requisitionCreateForm.get('patient')?.value;\r\n req.priority = this.requisitionCreateForm.get('priority')?.value;\r\n req.collectionDate = new Date(this.requisitionCreateForm.get('collectionDate')?.value).toLocaleString();\r\n req.comments = this.requisitionCreateForm.get('comments')?.value;\r\n req.physicianId = this.requisitionCreateForm.get('physician')?.value && this.requisitionCreateForm.get('physician')?.value.id;\r\n req.fasting = this.requisitionCreateForm.get('fasting')?.value as ClinicalInfo;\r\n req.tests = TestUtils.generateTestTreeForRequisition(this.requisitionCreateForm.get('tests')?.value);\r\n req.id = this.requisitionCreateForm.get('id')?.value;\r\n\r\n const selectedBillTo: string = this.requisitionCreateForm.get('billTo')?.value;\r\n if (selectedBillTo) {\r\n // @ts-ignore\r\n req.billTo = BillTo[startCase(selectedBillTo.toLowerCase())];\r\n }\r\n\r\n const diagnoseIds = this.requisitionCreateForm.get('diagnosisCodes')?.value;\r\n const medicationIds = this.requisitionCreateForm.get('medications')?.value;\r\n const billingInfo: RequisitionBillingInfo[] = this.requisitionCreateForm.get('billingInformation')?.value;\r\n\r\n const saveRequest = !this.requisitionCreateForm.get('id')?.value ?\r\n this.requisitionService.create(req) :\r\n this.requisitionService.update(req);\r\n\r\n saveRequest\r\n .pipe(take(1))\r\n .subscribe(r => {\r\n forkJoin([\r\n of(r),\r\n this.requisitionService.saveMedications(r.id, medicationIds),\r\n this.requisitionService.saveDiagnoses(r.id, diagnoseIds),\r\n this.requisitionService.saveBillingInformation(r.id, billingInfo),\r\n ])\r\n .subscribe((response) => {\r\n notify('Requisition Saved!', 'success');\r\n const patient: PatientEditable = this.requisitionCreateForm.get('patient')?.value;\r\n const clientName = patient.client.name;\r\n const wasUpdated = this.requisitionCreateForm.get('id')?.value !== null;\r\n this.recentRequisition(response[0], patient, clientName, wasUpdated);\r\n this.isLoading = false;\r\n });\r\n });\r\n } else {\r\n if (this.requisitionCreateForm.get('patient')?.value === null) {\r\n notify('A Patient should by selected', 'error', 3000);\r\n } else if (this.requisitionCreateForm.get('tests')?.value === null || this.requisitionCreateForm.get('tests')?.value.length === 0) {\r\n notify('At least one test should by selected', 'error', 3000);\r\n }\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","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { UntypedFormControl } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-requisition-status-radio-buttons',\r\n templateUrl: './requisition-status-radio-buttons.component.html',\r\n styleUrls: ['./requisition-status-radio-buttons.component.scss']\r\n})\r\nexport class RequisitionStatusRadioButtonsComponent implements OnInit, OnDestroy {\r\n public status: string[];\r\n public selected: string = '';\r\n @Input() public control: UntypedFormControl = new UntypedFormControl();\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor() {\r\n this.status = [\r\n 'Pending',\r\n 'Done',\r\n 'All'\r\n ];\r\n }\r\n\r\n public valueChanged() {\r\n this.control.setValue(this.selected);\r\n }\r\n\r\n public ngOnInit() {\r\n this.selected = this.status[0];\r\n this.valueChanged();\r\n\r\n this.control.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((values) => {\r\n if (values === undefined || values === null) {\r\n this.selected = this.status[2];\r\n }\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n}\r\n","
\r\n
Requisition Status
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-electronic-signature-radio-button',\r\n templateUrl: './electronic-signature-radio-button.component.html',\r\n styleUrls: ['./electronic-signature-radio-button.component.scss'],\r\n})\r\nexport class ElectronicSignatureRadioButtonComponent implements OnInit, OnDestroy {\r\n public signature: string[] = [];\r\n public selected: string = '';\r\n @Input() public control: UntypedFormControl = new UntypedFormControl();\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor() {\r\n this.signature = [\r\n 'Signed',\r\n 'Not Signed',\r\n 'All',\r\n ];\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.selected = this.signature[2];\r\n this.valueChanged();\r\n\r\n this.control.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe((values) => {\r\n if (values === undefined || values === null) {\r\n this.selected = this.signature[2];\r\n }\r\n });\r\n\r\n }\r\n\r\n public valueChanged() {\r\n this.control.setValue(this.selected);\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
Electronic Signature
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n","
\r\n
\r\n
\r\n

Search Requisitions

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \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 {AfterViewInit, Component, EventEmitter, OnDestroy, Output, ViewChild} from '@angular/core';\r\nimport {AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport * as Moment from 'moment';\r\nimport {BehaviorSubject, of, Subject} from 'rxjs';\r\nimport {debounceTime, take, takeUntil} from 'rxjs/operators';\r\nimport {DateMoreThan} from '../../../../../shared/custom-validations/date-validations';\r\nimport {FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {ClientSelectorComponent} from '../../../../shared/components/client-selector/client-selector.component';\r\nimport {Unit} from '../../../../shared/models/order-entry/unit';\r\nimport {ClientService} from '../../../../shared/services';\r\n\r\nfunction today() {\r\n return Moment().format('MM/DD/YYYY');\r\n}\r\n\r\n@Component({\r\n selector: 'app-requisition-search',\r\n templateUrl: './requisition-search.component.html',\r\n styleUrls: ['./requisition-search.component.scss'],\r\n})\r\nexport class RequisitionSearchComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild(ClientSelectorComponent, {static: true}) public clientSelector?: ClientSelectorComponent;\r\n public requisitionSearchForm: UntypedFormGroup;\r\n public role: string;\r\n private sent = false;\r\n @Output() public formSubmitted = new EventEmitter();\r\n private onDestroy$ = new Subject();\r\n // @ts-ignore\r\n public unitDataSource: BehaviorSubject = new BehaviorSubject(undefined);\r\n\r\n constructor(private fb: UntypedFormBuilder, private fusionAuthService: FusionAuthService, private clientService: ClientService) {\r\n this.requisitionSearchForm = this.fb.group({\r\n startDate: [today(), [Validators.required]],\r\n endDate: [today(), [Validators.required, DateMoreThan('startDate')]],\r\n client: [null],\r\n unit: [null],\r\n patient: [null],\r\n status: [null],\r\n signature: [null],\r\n });\r\n\r\n this.role = fusionAuthService.Profile.registrations[0].roles[0];\r\n }\r\n\r\n public convertToFormControl(absCtrl: AbstractControl | null): UntypedFormControl {\r\n return absCtrl as UntypedFormControl;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n of(null)\r\n .pipe(\r\n take(1),\r\n debounceTime(2000),\r\n )\r\n .subscribe(() => {\r\n if (!this.sent) {\r\n this.submit();\r\n this.sent = true;\r\n }\r\n this.requisitionSearchForm.get('client')?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(client => {\r\n if (client) {\r\n this.unitDataSource.next(new DataSource({\r\n store: this.clientService.clientUnitsCustomStore(client.id, this.unitDataSource),\r\n }));\r\n } else {\r\n // @ts-ignore\r\n this.unitDataSource.next(undefined);\r\n }\r\n });\r\n });\r\n }\r\n\r\n public clear() {\r\n this.requisitionSearchForm.reset();\r\n this.submit();\r\n }\r\n\r\n public searchRequisitions(): void {\r\n if (this.requisitionSearchForm.valid) {\r\n this.submit();\r\n }\r\n }\r\n\r\n private submit() {\r\n if (!this.requisitionSearchForm.get('startDate')?.value) {\r\n this.requisitionSearchForm.get('startDate')?.setValue(today());\r\n }\r\n\r\n if (!this.requisitionSearchForm.get('endDate')?.value) {\r\n this.requisitionSearchForm.get('endDate')?.setValue(today());\r\n }\r\n\r\n this.formSubmitted.emit(this.requisitionSearchForm.value);\r\n }\r\n\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n"," 0 || (clientEnabled$ | async) ?? false)\">\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n

{{analysis.testName}}

\r\n

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

Disclaimer

\r\n

These result interpretations are intended for\r\n educational purposes only and should not replace medical advice or consultation with a licensed\r\n healthcare provider.

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

Good news!

\r\n

All your laboratory results are within normal ranges. No further action is required at this time.\r\n Please continue with your current\r\n health regimen. Regular monitoring remains important for overall health.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import {Component, Input, OnChanges, SimpleChanges} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {ResultAnalyzerService} from \"../../services/result-analyzer.service\";\r\nimport {DxAccordionModule, DxScrollViewModule} from \"devextreme-angular\";\r\nimport {take} from \"rxjs/operators\";\r\nimport {Observable} from \"rxjs\";\r\nimport {ResultAnalysis} from \"../../models/result-analysis\";\r\n\r\n\r\n@Component({\r\n selector: 'app-ai-analysis-viewer',\r\n standalone: true,\r\n imports: [CommonModule, DxAccordionModule, DxScrollViewModule],\r\n templateUrl: './ai-analysis-viewer.component.html',\r\n styleUrls: ['./ai-analysis-viewer.component.scss']\r\n})\r\nexport class AiAnalysisViewerComponent implements OnChanges {\r\n @Input() orderCode?: string;\r\n @Input() clientCode?: string;\r\n exists$?: Observable;\r\n clientEnabled$?: Observable;\r\n analyzes$?: Observable;\r\n\r\n constructor(public service: ResultAnalyzerService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderCode && changes.orderCode.currentValue) {\r\n this.exists$ = this.service.checkIfOrderHasBeenAnalyzed(changes.orderCode.currentValue)\r\n .pipe(take(1));\r\n\r\n this.clientEnabled$ = this.service.checkClient(changes.clientCode.currentValue)\r\n .pipe(take(1));\r\n\r\n this.analyzes$ = this.service.getOrderAnalyzes(changes.orderCode.currentValue)\r\n .pipe(take(1));\r\n }\r\n }\r\n\r\n}\r\n","\r\n
\r\n \r\n
\r\n INTERPRETATION\r\n
\r\n
\r\n
\r\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, SimpleChanges} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {DxLoadIndicatorModule, DxTemplateModule, DxTooltipModule} from \"devextreme-angular\";\r\nimport {take} from \"rxjs/operators\";\r\nimport {FlexModule} from \"@angular/flex-layout\";\r\nimport {ResultAnalyzerService} from \"../../services/result-analyzer.service\";\r\n\r\n@Component({\r\n selector: 'app-ai-result-indicator',\r\n standalone: true,\r\n imports: [CommonModule, DxTemplateModule, DxTooltipModule, DxLoadIndicatorModule, FlexModule],\r\n templateUrl: './ai-result-indicator.component.html',\r\n styleUrls: ['./ai-result-indicator.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AiResultIndicatorComponent implements OnChanges {\r\n @Input() orderCode?: string;\r\n hasBeenAnalyzed: boolean = false;\r\n isLoading: boolean = true;\r\n\r\n constructor(public service: ResultAnalyzerService, private changesDetector: ChangeDetectorRef) {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderCode && changes.orderCode.currentValue) {\r\n this.service.checkIfOrderHasBeenAnalyzed(changes.orderCode.currentValue)\r\n .pipe(take(1))\r\n .subscribe(x => {\r\n this.isLoading = false;\r\n this.hasBeenAnalyzed = x;\r\n this.changesDetector.detectChanges();\r\n });\r\n }\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {HttpClient, HttpResponse} from \"@angular/common/http\";\r\nimport {HttpRequestBuilder} from \"../../../../shared/utils\";\r\nimport {UrlProviderService} from \"../../../../shared/services/general\";\r\nimport {map, retry} from \"rxjs/operators\";\r\nimport {Observable} from \"rxjs\";\r\nimport {ResultAnalysis} from \"../models/result-analysis\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ResultAnalyzerClientService {\r\n\r\n constructor(private http: HttpClient, private urlProvider: UrlProviderService) {\r\n }\r\n\r\n getAnalysis(orderCode: string): Observable> {\r\n const builder = new HttpRequestBuilder(this.http)\r\n .setUrl(`${this.urlProvider.AiAnalyzerUrl}/orders/${orderCode}/result-analysis`)\r\n .setMethod('GET');\r\n\r\n builder.getOptions().reportProgress = true;\r\n return builder.build().pipe(retry(2), map(x => x as HttpResponse));\r\n }\r\n\r\n checkIfOrderHasBeenAnalyzed(orderCode: string): Observable> {\r\n const builder = new HttpRequestBuilder(this.http)\r\n .setUrl(`${this.urlProvider.AiAnalyzerUrl}/orders/${orderCode}/result-analysis-exists`)\r\n .setMethod('GET')\r\n .setHeader('Accept', 'application/json')\r\n .setHeader('Content-Type', 'application/json');\r\n\r\n builder.getOptions().reportProgress = true;\r\n return builder.build().pipe(retry(2), map(x => x as HttpResponse));\r\n }\r\n\r\n checkIfClientIsEnabled(clientCode: string): Observable> {\r\n const builder = new HttpRequestBuilder(this.http)\r\n .setUrl(`${this.urlProvider.AiAnalyzerUrl}/exists-client-code/${clientCode}`)\r\n .setMethod('GET')\r\n .setHeader('Accept', 'application/json')\r\n .setHeader('Content-Type', 'application/json');\r\n\r\n builder.getOptions().reportProgress = true;\r\n return builder.build().pipe(retry(2), map(x => x as HttpResponse));\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {environment} from \"../../../../../environments/environment\";\r\nimport {ResultAnalyzerClientService} from \"./result-analyzer-client.service\";\r\nimport {Observable} from \"rxjs\";\r\nimport {map} from \"rxjs/operators\";\r\nimport {ResultAnalysis} from \"../models/result-analysis\";\r\nimport {FusionAuthService} from \"../../../../shared/services/fusion-auth\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ResultAnalyzerService {\r\n\r\n constructor(private clientService: ResultAnalyzerClientService, private userService: FusionAuthService){\r\n }\r\n\r\n get IsFeatureEnabled(): boolean {\r\n if (!environment.aiAnalysis.enabled) return false;\r\n if (environment.aiAnalysis.enabledRoles.includes(\"*\")) return true;\r\n\r\n const userRole = this.userService.Profile.role;\r\n\r\n return environment.aiAnalysis.enabledRoles.includes(userRole);\r\n }\r\n\r\n checkClient(clientCode: string): Observable {\r\n return this.clientService.checkIfClientIsEnabled(clientCode)\r\n .pipe(map(x => x.body ?? false));\r\n }\r\n\r\n checkIfOrderHasBeenAnalyzed(orderCode: string): Observable {\r\n return this.clientService.checkIfOrderHasBeenAnalyzed(orderCode)\r\n .pipe(map(x => x.body ?? false));\r\n }\r\n\r\n getOrderAnalyzes(orderCode: string): Observable {\r\n return this.clientService.getAnalysis(orderCode)\r\n .pipe(\r\n map(x => x.body ?? []),\r\n map(x => {\r\n x.forEach(y => {\r\n y.analysis = y.analysis.replace(/\\r\\n|\\r|\\n/g, '
');\r\n });\r\n x.sort((a, b) => a.sort - b.sort);\r\n return x;\r\n })\r\n );\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{result.data.name}}\r\n \r\n

\r\n
\r\n
\r\n\r\n
\r\n {{result.data.result}}\r\n \r\n

\r\n
\r\n
\r\n\r\n
\r\n {{result.data.referenceRange}}\r\n \r\n

\r\n
\r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n Input, OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Renderer2,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { DxTreeListComponent } from 'devextreme-angular';\r\nimport { Subject } from 'rxjs';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { ScreenService, UrlProviderService } from '../../../../../shared/services/general';\r\nimport { OrdersService } from '../../../../shared/services/orders.service';\r\nimport { ResultBase } from '../../models/results';\r\n\r\n@Component({\r\n selector: 'app-clinical-results',\r\n templateUrl: './clinical-results.component.html',\r\n styleUrls: ['./clinical-results.component.scss'],\r\n})\r\nexport class ClinicalResultsComponent implements OnInit, OnDestroy, OnChanges {\r\n @ViewChild('tree', { static: true }) private tree?: DxTreeListComponent;\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public dataSource: ResultBase[] = [];\r\n public expandedKeys: any[] = [];\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private ordersService: OrdersService,\r\n private urlProvider: UrlProviderService,\r\n private renderer: Renderer2,\r\n private sanitizer: DomSanitizer,\r\n private fusionAuthService: FusionAuthService,\r\n private screen: ScreenService,\r\n ) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.ordersService.getOrderClinicalResults(this.orderId)\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.dataSource = results;\r\n this.expandedKeys = results.map(r => r.key);\r\n });\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.ordersService.getOrderClinicalResults(changes.orderId.currentValue)\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.dataSource = results;\r\n this.expandedKeys = results.map(r => r.key);\r\n });\r\n }\r\n }\r\n\r\n public calculateNameFilter(value: any, selectedFilterOperations: any, target: any) {\r\n const column = this as any;\r\n if (target === 'filterRow') {\r\n return [['name', 'contains', value.toUpperCase()]];\r\n }\r\n return column.defaultCalculateFilterExpression.apply(this, arguments);\r\n }\r\n\r\n public conditionalRendering(e: any) {\r\n if (e.rowType === 'data' && e.data.isAbnormal === true && e.data.result !== 'PENDING') {\r\n this.renderer.addClass(e.cellElement, 'ocl-red-text');\r\n if (e.column.caption === 'Flag') {\r\n this.renderer.setStyle(e.cellElement, 'font-weight', '500');\r\n }\r\n }\r\n }\r\n\r\n public onContentReady(e: any) {\r\n /*if (this.isPhoneOrTablet) {\r\n const itemsWithChildren = e.element.querySelectorAll('tr[aria-expanded]') as HTMLCollection[];\r\n itemsWithChildren.forEach(x => {\r\n const columnAdaptive = (x as any).lastChild;\r\n if (columnAdaptive.firstChild) {\r\n columnAdaptive.firstChild.hidden = true;\r\n }\r\n });\r\n }*/\r\n e.component.updateDimensions();\r\n }\r\n\r\n public transformYourHtml(htmlTextWithStyle: any) {\r\n return this.sanitizer.bypassSecurityTrustHtml(htmlTextWithStyle);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n = 1\"\r\n *ngIf=\"webResultSettings !== undefined && webResultSettings.length >= 1\"\r\n headerCellTemplate=\"firstTestHeaderTemplate\" caption=\"First Test\" cellTemplate=\"firstTestTemplate\"\r\n [showInColumnChooser]=\"!isPhoneOrTablet && webResultSettings !== undefined && webResultSettings.length >= 1\">\r\n = 2\"\r\n *ngIf=\"webResultSettings !== undefined && webResultSettings.length >= 2\"\r\n headerCellTemplate=\"secondTestHeaderTemplate\" caption=\"Second Test\" cellTemplate=\"secondTestTemplate\"\r\n [showInColumnChooser]=\"!isPhoneOrTablet && webResultSettings !== undefined && webResultSettings.length >= 2\">\r\n = 3\"\r\n *ngIf=\"webResultSettings !== undefined && webResultSettings.length >= 3\"\r\n headerCellTemplate=\"thirdTestHeaderTemplate\" caption=\"Third Test\" cellTemplate=\"thirdTestTemplate\"\r\n [showInColumnChooser]=\"!isPhoneOrTablet && webResultSettings !== undefined && webResultSettings.length >= 3\">\r\n = 4\"\r\n *ngIf=\"webResultSettings !== undefined && webResultSettings.length >= 4\"\r\n headerCellTemplate=\"fourthTestHeaderTemplate\" caption=\"Fourth Test\" cellTemplate=\"fourthTestTemplate\"\r\n [showInColumnChooser]=\"!isPhoneOrTablet && webResultSettings !== undefined && webResultSettings.length >= 4\">\r\n = 5\"\r\n headerCellTemplate=\"fifthTestHeaderTemplate\" caption=\"Fifth Test\" cellTemplate=\"fifthTestTemplate\"\r\n [showInColumnChooser]=\"!isPhoneOrTablet && webResultSettings !== undefined && webResultSettings.length === 5\">\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{order.data.codeValue}}
\r\n missing information\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n

User: {{ order.data.onlineAckUser }}

\r\n

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

\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n {{ getPatientRoomBed(order.data) }}\r\n
\r\n\r\n\r\n
\r\n {{ webResultSettings[0].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[0].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[1].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[1].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[2].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[2].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[3].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[3].testId, order.data)}}\r\n
\r\n\r\n
\r\n {{ webResultSettings[4].testName }}\r\n
\r\n\r\n
\r\n {{ testResult(webResultSettings[4].testId, order.data) }}\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport config from 'devextreme/core/config';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport * as Moment from 'moment-timezone';\r\nimport {BehaviorSubject, of, Subject} from 'rxjs';\r\nimport {debounceTime, take, takeUntil} from 'rxjs/operators';\r\nimport {ReportsService} from 'src/app/modules/shared/services/reports.service';\r\nimport {IOrderSearch} from '../../../../../shared/models/ocl';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {PWADetectorService, ScreenService} from '../../../../../shared/services/general';\r\nimport {FileUtils} from '../../../../../shared/utils';\r\nimport {SettingsService} from '../../../../shared/services/settings.service';\r\nimport {OrderStatus, WebOrder} from '../../models/order';\r\nimport {OrderBillingInformation} from '../../models/order-billing-information';\r\nimport {OrdersService} from '../../../../shared/services/orders.service';\r\nimport { Store } from 'devextreme/data';\r\nimport {environment} from \"../../../../../../environments/environment\";\r\nimport {SignatureRepresentation} from \"../../../requisitions/components/signature-dialog/signature-dialog.component\";\r\nimport {MultipleOrdersSignature} from \"../../../../shared/models/signature\";\r\nimport notify from \"devextreme/ui/notify\";\r\nimport {RegistrationRequest} from \"../../../../../shared/models/fusion-auth\";\r\nimport {CREATED} from \"http-status-codes\";\r\n\r\n@Component({\r\n selector: 'app-laboratory-results-content',\r\n templateUrl: './laboratory-results-content.component.html',\r\n styleUrls: ['./laboratory-results-content.component.scss'],\r\n})\r\nexport class LaboratoryResultsContentComponent implements OnInit, OnDestroy {\r\n @ViewChild(DxDataGridComponent, {static: true}) public dxDataGridComponent?: DxDataGridComponent;\r\n @Input() public filtersSubmitted: EventEmitter = new EventEmitter();\r\n @Input() public showMissingInfo = false;\r\n public signDialogVisible = false;\r\n public signedOrderSelected = false;\r\n public selectedItemsIds: number[] = [];\r\n public acknowledgeOrderSelected = false;\r\n public pendingOrderSelected = false;\r\n public missingInfoPopupVisible = false;\r\n public missingInfoData: OrderBillingInformation = new OrderBillingInformation();\r\n public ackHeaderFilter = [\r\n {\r\n text: 'Acknowledged',\r\n value: ['!', ['onlineAckUser', '=', null]],\r\n },\r\n {\r\n text: 'Not Acknowledged',\r\n value: ['onlineAckUser', '=', null],\r\n },\r\n ];\r\n public abnormalLabel: string = '';\r\n public isLoading = false;\r\n public labResultsStore: Store | [] = [];\r\n // @ts-ignore\r\n public dataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public filters: IOrderSearch = {} as IOrderSearch;\r\n public emailFaxVisible = false;\r\n public type: string = '';\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n public webResultSettings: any;\r\n public user: any;\r\n public updateBillToVisible = false;\r\n public isInterpretationEnabled: boolean = environment.aiAnalysis.enabled;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private service: OrdersService,\r\n private router: Router,\r\n private pwaDetectorService: PWADetectorService,\r\n public route: ActivatedRoute,\r\n private sanitizer: DomSanitizer,\r\n public fusionAuthService: FusionAuthService,\r\n private reportsService: ReportsService,\r\n private screen: ScreenService,\r\n public settingsService: SettingsService,\r\n private fusionAuthManagement: FusionAuthManagementService,\r\n ) {\r\n }\r\n\r\n public getPatientRoomBed(order: WebOrder): string {\r\n if (order.patientRoom) {\r\n if (order.patientBed) {\r\n return `${order.patientRoom} - ${order.patientBed}`;\r\n } else {\r\n return `${order.patientRoom}`;\r\n }\r\n } else {\r\n return `-`;\r\n }\r\n }\r\n\r\n public getStatus(order: WebOrder) {\r\n let color;\r\n let status: string = OrderStatus[OrderStatus.None];\r\n switch (order.status) {\r\n case OrderStatus.Canceled:\r\n color = 'ocl-status-black';\r\n status = OrderStatus[OrderStatus.Canceled];\r\n break;\r\n case OrderStatus.Final:\r\n color = 'ocl-status-green';\r\n status = OrderStatus[OrderStatus.Final];\r\n break;\r\n case OrderStatus.Partial:\r\n case OrderStatus.PartiallyReleased:\r\n case OrderStatus.Preliminary:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Partial];\r\n break;\r\n case OrderStatus.Pending:\r\n case OrderStatus.Unreleased:\r\n color = 'ocl-status-yellow';\r\n status = OrderStatus[OrderStatus.Pending];\r\n break;\r\n case OrderStatus.None:\r\n color = 'ocl-status-black';\r\n status = OrderStatus[OrderStatus.None];\r\n break;\r\n }\r\n\r\n let alert = `\r\n
\r\n
\r\n ${status.toUpperCase()}
\r\n `;\r\n\r\n if (order.hasAlert) {\r\n if (order.criticalToxResults) {\r\n alert += `
\r\n ${this.abnormalLabel}
`;\r\n }\r\n if (order.criticalMicResults || order.criticalResults) {\r\n alert += `
CRITICAL
`;\r\n }\r\n }\r\n alert += `
`;\r\n return this.sanitizer.bypassSecurityTrustHtml(alert);\r\n }\r\n\r\n public ngOnInit() {\r\n if (this.dxDataGridComponent?.instance !== undefined) {\r\n this.dxDataGridComponent.instance.beginCustomLoading('');\r\n }\r\n\r\n this.responsiveValues();\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.responsiveValues();\r\n });\r\n\r\n this.settingsService.getWebResultSettings()\r\n .pipe(take(1))\r\n .subscribe(x => {\r\n this.webResultSettings = x;\r\n });\r\n\r\n this.settingsService.getResultSettings()\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n this.abnormalLabel = results.abnormalResult;\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n private waitByUser() {\r\n this.user = this.fusionAuthService.Profile;\r\n\r\n if (this.user) {\r\n this.filtersSubmitted\r\n .pipe(\r\n takeUntil(this.onDestroy$),\r\n debounceTime(1000),\r\n )\r\n .subscribe(filters => {\r\n this.filters = filters;\r\n this.setFilters(this.filters, this.user);\r\n });\r\n } else {\r\n of()\r\n .pipe(\r\n debounceTime(1000),\r\n take(1),\r\n )\r\n .subscribe(() => this.waitByUser());\r\n }\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] ||\r\n this.screen.sizes['screen-small'] ||\r\n this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public get ButtonsDisabled() {\r\n return this.selectedItemsIds.length === 0;\r\n }\r\n\r\n public ack() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Acknowledging');\r\n let queryString = '';\r\n this.selectedItemsIds.map(x => {\r\n queryString += `ids=${x}&`;\r\n });\r\n this.service.acknowledgeOrder(queryString)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.selectedItemsIds = [];\r\n this.dxDataGridComponent?.instance.getDataSource().reload();\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n });\r\n }\r\n\r\n public rowClick(e: any) {\r\n if (e.rowType === 'data' && !this.isPhoneOrTablet) {\r\n this.sendToPreview(e.data.id).then();\r\n }\r\n }\r\n\r\n public setFilters(filters: IOrderSearch, user: any) {\r\n if (typeof filters.startDate === 'number') {\r\n filters.startDate = new Date(filters.startDate);\r\n }\r\n\r\n if (typeof filters.endDate === 'number') {\r\n filters.endDate = new Date(filters.endDate);\r\n }\r\n\r\n const role = user.registrations[0].roles[0];\r\n switch (role) {\r\n case 'Client Admin':\r\n case 'Client Basic':\r\n const clientIds = user ? user.data.clients : this.fusionAuthService.Profile.data.clients;\r\n this.dataSource.next(new DataSource({\r\n store:\r\n this.service.customStore(filters, false, clientIds, undefined, undefined, this.dataSource)\r\n }));\r\n this.labResultsStore = this.dataSource.value.store();\r\n break;\r\n case 'Patient':\r\n const patientIds = user ? user.data.patients : this.fusionAuthService.Profile.data.patients;\r\n this.dataSource.next(new DataSource({\r\n store:\r\n this.service.customStore(filters, false, undefined, patientIds, undefined, this.dataSource)\r\n }));\r\n this.labResultsStore = this.dataSource.value.store();\r\n break;\r\n case 'Physician':\r\n const physicianIds = user ? user.data.physicians : this.fusionAuthService.Profile.data.physicians;\r\n this.dataSource.next(new DataSource({\r\n store:\r\n this.service.customStore(filters, false, undefined, undefined, physicianIds, this.dataSource)\r\n }));\r\n this.labResultsStore = this.dataSource.value.store();\r\n break;\r\n default:\r\n this.dataSource.next(new DataSource({\r\n store:\r\n this.service.customStore(filters, false, undefined, undefined, undefined, this.dataSource)\r\n }));\r\n this.labResultsStore = this.dataSource.value.store();\r\n }\r\n }\r\n\r\n public formatDate(date: Date) {\r\n const tz = Moment.tz.guess();\r\n return Moment.utc(date).tz(tz).format('LLLL');\r\n }\r\n\r\n public async sendToPreview(id: number) {\r\n if (this.pwaDetectorService.isPWA()) {\r\n await this.router.navigate(['/secured/results/order', {id}]);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/results/order', {id}]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n public printLabResults() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderResults(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public printOrderLog() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderLog(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public printOrderDetails() {\r\n this.dxDataGridComponent?.instance.beginCustomLoading('Generating Report');\r\n this.reportsService.generateOrderDetails(this.selectedItemsIds)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this, true));\r\n }\r\n\r\n public openEmailFax(type: string) {\r\n this.type = type;\r\n this.emailFaxVisible = true;\r\n }\r\n\r\n public openUpdateBillTo() {\r\n this.updateBillToVisible = true;\r\n }\r\n\r\n public closeUpdateBillTo() {\r\n this.updateBillToVisible = false;\r\n this.setFilters(this.filters, this.user);\r\n }\r\n\r\n public get FABDisabled() {\r\n return this.isPhoneOrTablet && this.selectedItemsIds ? this.selectedItemsIds.length > 0 : false;\r\n }\r\n\r\n public showColumnChooser() {\r\n this.dxDataGridComponent?.instance.showColumnChooser();\r\n }\r\n\r\n public onContentReady(): void {\r\n this.dxDataGridComponent?.instance.clearSelection();\r\n }\r\n\r\n public itemsSelected(ids: number[]) {\r\n this.selectedItemsIds = ids;\r\n if (!this.dxDataGridComponent?.instance) {\r\n return;\r\n }\r\n const ackFilter = this.dxDataGridComponent.instance.getSelectedRowsData().filter((r: WebOrder) => r.onlineAckUser);\r\n if (Array.isArray(ackFilter)) {\r\n this.acknowledgeOrderSelected = ackFilter.length !== 0;\r\n }\r\n\r\n const pendingOrderFiler = this.dxDataGridComponent.instance.getSelectedRowsData()\r\n .filter((r: WebOrder) => r.status === OrderStatus.Pending || r.status === OrderStatus.Unreleased);\r\n if (Array.isArray(pendingOrderFiler)) {\r\n this.pendingOrderSelected = pendingOrderFiler.length !== 0;\r\n }\r\n this.signedOrderSelected =\r\n this.dxDataGridComponent.instance.getSelectedRowsData().filter(r => r.hasSignature).length !== 0;\r\n }\r\n\r\n public testResult(testId: number, order: any) {\r\n const test = order.orderResults.find((x: any) => x.testId === testId);\r\n if (test) {\r\n if (test.reportAs) {\r\n return test.flag === null || test.flag === '' ? test.reportAs : `${test.reportAs} (${test.flag})`;\r\n } else {\r\n return test.flag === null || test.flag === '' ? test.results : `${test.results} (${test.flag})`;\r\n }\r\n\r\n } else {\r\n return 'NOT ORDERED';\r\n }\r\n }\r\n\r\n public signOrders() {\r\n this.signDialogVisible = true;\r\n }\r\n\r\n public signDialogClosed(signatureDialogResponse: SignatureRepresentation) {\r\n if (signatureDialogResponse) {\r\n const signature = new MultipleOrdersSignature();\r\n signature.image = signatureDialogResponse.image;\r\n signature.username = signatureDialogResponse.username;\r\n signature.ordersIds = this.selectedItemsIds;\r\n\r\n this.dxDataGridComponent?.instance.beginCustomLoading(\r\n this.selectedItemsIds.length === 1 ? 'Signing order' : 'Signing orders',\r\n );\r\n const user = this.fusionAuthService.Profile;\r\n user.data = {\r\n signImage: signatureDialogResponse.image,\r\n clients: user.data !== undefined ? user.data.clients : [],\r\n patients: user.data !== undefined ? user.data.patients : [],\r\n physicians: user.data !== undefined ? user.data.physicians : [],\r\n };\r\n const request: RegistrationRequest = {\r\n user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [user.role],\r\n username: user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.fusionAuthManagement\r\n .updateUser(user.id, request)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === CREATED) {\r\n this.service.signOrders(signature)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.fusionAuthService.SignatureImage = signatureDialogResponse.image;\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n notify(this.selectedItemsIds.length === 1 ? 'Order Signed!' : 'Orders Signed!', 'success');\r\n this.dxDataGridComponent?.instance.refresh();\r\n });\r\n }\r\n });\r\n\r\n /*this.service.signOrders(signature)\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.dxDataGridComponent?.instance.endCustomLoading();\r\n notify(this.selectedItemsIds.length === 1 ? 'Order Signed!' : 'Orders Signed!', 'success');\r\n this.dxDataGridComponent?.instance.refresh();\r\n });*/\r\n }\r\n\r\n this.signDialogVisible = false;\r\n }\r\n\r\n public closeMissingInfo(canceled: boolean) {\r\n this.missingInfoPopupVisible = false;\r\n if (!canceled) {\r\n this.setFilters(this.filters, this.user);\r\n }\r\n }\r\n\r\n public openMissingInfo({data}: { data: any }) {\r\n this.isLoading = true;\r\n this.service.getOrderBillingInfo(data.id)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.missingInfoData = res;\r\n this.missingInfoData.orderCode = data.codeValue;\r\n this.missingInfoPopupVisible = true;\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n
0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ result.data.name }}\r\n \r\n

\r\n
\r\n
\r\n\r\n
\r\n {{ result.data?.result }}\r\n \r\n

\r\n
\r\n
\r\n\r\n
\r\n {{ result.data?.referenceRange }}\r\n \r\n

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

{{ result?.name }}

\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n Status: {{ status(result?.status ?? 0, result?.preliminaryReleased ?? false) }}\r\n \r\n Source: {{ result?.sources }}\r\n Collection Site: {{ result?.collectionSite }}\r\n Collected: {{ formatDate(result?.collected) }}\r\n
\r\n
\r\n\r\n
0 && ((result?.organisms?.length ?? 0) === 0)\"\r\n style=\"margin-top: 8px; padding-left: 16px; padding-right: 16px;\">\r\n \r\n
\r\n
\r\n
{{ item?.name }}
\r\n
{{ item?.cultureQuantityName }}
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
0\">\r\n
\r\n
\r\n {{ organism?.name }} {{ organism?.cultureQuantityName }}\r\n
\r\n

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

\r\n
\r\n 0\"\r\n [items]=\"(organism?.sensitivity ?? [])\" [noDataText]=\"''\">\r\n
\r\n
\r\n
{{ item?.antibioticName }}
\r\n
{{ item?.mic }}
\r\n
{{ item?.microbiologyInterpretationType }}
\r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import {Component, Input, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges} from '@angular/core';\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport * as Moment from 'moment-timezone';\r\nimport {Subject} from 'rxjs';\r\nimport {take, takeUntil, tap} from 'rxjs/operators';\r\nimport {ScreenService} from '../../../../../shared/services/general';\r\nimport {OrdersService} from '../../../../shared/services/orders.service';\r\nimport {MicrobiologyResult, ResultType, TestStatus} from '../../models/results';\r\n\r\n@Component({\r\n selector: 'app-microbiology-results',\r\n templateUrl: './microbiology-results.component.html',\r\n styleUrls: ['./microbiology-results.component.scss'],\r\n})\r\nexport class MicrobiologyResultsComponent implements OnInit, OnDestroy, OnChanges {\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public pureMicResults: MicrobiologyResult[] = [];\r\n public alphaMicResults: any[] = [];\r\n public expandedKeys: any[] = [];\r\n public rowOperation = false;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private orderService: OrdersService, private screen: ScreenService, private renderer: Renderer2, private sanitizer: DomSanitizer) {\r\n }\r\n\r\n public calculateNameFilter(value: any, selectedFilterOperations: any, target: any) {\r\n const column = this as any;\r\n if (target === 'filterRow') {\r\n return [['name', 'contains', value.toUpperCase()]];\r\n }\r\n return column.defaultCalculateFilterExpression.apply(this, arguments);\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n\r\n this.orderService.getMicrobiologyResults(this.orderId)\r\n .pipe(\r\n take(1),\r\n tap(r => this.pureMicResults = r.filter(x => x.resultType === ResultType.Microbiology)),\r\n tap(r => this.alphaMicResults = r.filter(x => x.resultType === ResultType.AlphaMicrobiology))\r\n )\r\n .subscribe(() => this.expandedKeys = this.alphaMicResults.map(r => r.key));\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public status(status: TestStatus, preliminaryReleased: boolean): string {\r\n if (preliminaryReleased) return TestStatus[TestStatus.Preliminary].toUpperCase();\r\n return status == TestStatus.Unreleased ? TestStatus[TestStatus.Pending].toUpperCase() : TestStatus[status].toUpperCase();\r\n }\r\n\r\n public formatDate(date?: Date) {\r\n if (date == null) return '';\r\n\r\n const parsedDate = Moment(date);\r\n\r\n if (parsedDate.isValid() && parsedDate.isAfter('1900-01-01'))\r\n return Moment(date).format('MM/DD/YYYY');\r\n return '';\r\n }\r\n\r\n\r\n public viewerReady(element: any) {\r\n this.renderer.removeClass(element.element, 'dx-state-disabled');\r\n }\r\n\r\n public transformYourHtml(htmlTextWithStyle: string) {\r\n return this.sanitizer.bypassSecurityTrustHtml(htmlTextWithStyle);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n\r\n this.orderService.getMicrobiologyResults(changes.orderId.currentValue)\r\n .pipe(\r\n take(1),\r\n tap(r => this.pureMicResults = r.filter(x => x.resultType === ResultType.Microbiology)),\r\n tap(r => this.alphaMicResults = r.filter(x => x.resultType === ResultType.AlphaMicrobiology))\r\n )\r\n .subscribe(() => this.expandedKeys = this.alphaMicResults.map(r => r.key));\r\n }\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {UntypedFormGroup} from \"@angular/forms\";\r\nimport {BehaviorSubject} from \"rxjs\";\r\nimport {AddressService, DiagnosisService} from \"../../../../shared/services\";\r\nimport * as Sentry from '@sentry/angular-ivy'\r\nimport {PhysicianService} from \"../../../../shared/services/physician.service\";\r\nimport {BillingInformation, ResponsibleParty, ZipCode} from \"../../../../shared/models\";\r\nimport {BillingService} from \"../../../../shared/services/billing.service\";\r\n\r\nconst missingInfoJson = {\r\n \"Patient Birth Date\": \"\",\r\n \"Gender\": \"\",\r\n \"Ordering Physician\": {\r\n \"Last Name\": \"\",\r\n \"First Name\": \"\",\r\n \"NPI\": \"\"\r\n },\r\n \"Diagnoses ICD-10 Codes\": [{\r\n \"code\": \"\",\r\n \"name\": \"\"\r\n }],\r\n \"Insurance Information\": [{\r\n \"Payer or Insurance Company or Name\": \"\",\r\n \"Insurance Id or Policy or Member Id\": \"\",\r\n \"Group Number\": \"\",\r\n \"Insured Last Name\": \"\",\r\n \"Insured First Name\": \"\",\r\n \"Insured Middle Name\": \"\",\r\n \"Insured Birth Date\": \"\",\r\n \"Insured Gender or Sex\": \"\",\r\n \"Insured Relationship\": \"\",\r\n \"Insured Address\": \"\",\r\n \"Insured City\": \"\",\r\n \"Insured State\": \"\",\r\n \"Insured ZipCode\": \"\",\r\n \"Insured Phone Number\": \"\"\r\n }],\r\n \"Responsible Parties or Contacts\": [{\r\n \"Last Name\": \"\",\r\n \"First Name\": \"\",\r\n \"Phone Number\": \"\",\r\n \"Mobile\": \"\",\r\n \"Fax\": \"\",\r\n \"Address\": \"\",\r\n \"City\": \"\",\r\n \"State\": \"\",\r\n \"ZipCode\": \"\"\r\n }],\r\n \"Comments\": \"\"\r\n};\r\n\r\nconst questions = [\r\n `Fill the following json [jsonString] extracting the information from the following text, it's important to return always the provided json even if you can't perform the action (provide the json only, no text added): `,\r\n `Fill the ICD-10 codes [jsonString] include all possible ICD-10 codes strictly from existing symptoms and diagnoses in the following text, it's important to return always the provided json even if you can't perform the action (provide the json only, no text added): `\r\n];\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MissingInfoAutocompleteService {\r\n private missingInfoForm?: UntypedFormGroup;\r\n private itemAutocompleted: BehaviorSubject = new BehaviorSubject(undefined);\r\n private isLoading$: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n constructor(private diagnosisService: DiagnosisService, private physicianService: PhysicianService,\r\n private addressService: AddressService, private billingService: BillingService) {\r\n }\r\n\r\n get MissingInfoJson(): any {\r\n return missingInfoJson;\r\n }\r\n\r\n get Questions(): string[] {\r\n return questions;\r\n }\r\n\r\n get IsLoading(): BehaviorSubject {\r\n return this.isLoading$;\r\n }\r\n\r\n get Autocompleted(): BehaviorSubject {\r\n return this.itemAutocompleted;\r\n }\r\n\r\n set MissingInfoForm(value: UntypedFormGroup) {\r\n this.missingInfoForm = value;\r\n }\r\n\r\n async onJsonChange(json: any, patientId: number): Promise {\r\n try {\r\n this.isLoading$.next(true);\r\n if (Object.keys(json).length == 0) return;\r\n let hasChanges = false;\r\n\r\n if (json[\"Diagnoses ICD-10 Codes\"]) {\r\n const diagnoses = (json[\"Diagnoses ICD-10 Codes\"] as []).map((x: { code: string, name: string }) => x.code);\r\n if (diagnoses.length > 0 && await this.handleDiagnoses(diagnoses)) {\r\n hasChanges = true;\r\n }\r\n }\r\n\r\n if ((json[\"Insurance Information\"] as []).length > 0) {\r\n if (await this.handleInsuranceInformation(json[\"Insurance Information\"], patientId))\r\n hasChanges = true;\r\n }\r\n\r\n if ((json[\"Responsible Parties or Contacts\"] as []).length > 0) {\r\n if (await this.handleResponsibleParties(json[\"Responsible Parties or Contacts\"], patientId))\r\n hasChanges = true;\r\n }\r\n\r\n if (json[\"Comments\"] && json[\"Comments\"] !== \"\") {\r\n if (this.handleComments(json))\r\n hasChanges = true;\r\n }\r\n\r\n if (json[\"Patient Birth Date\"] && json[\"Patient Birth Date\"] !== \"\") {\r\n if (this.HandleBirthday(json, hasChanges))\r\n hasChanges = true;\r\n }\r\n\r\n if (json[\"Gender\"] && json[\"Gender\"] !== \"\") {\r\n if (this.handleGender(json, hasChanges))\r\n hasChanges = true;\r\n }\r\n\r\n if (json[\"Ordering Physician\"]) {\r\n if (await this.handlePhysician(json, hasChanges))\r\n hasChanges = true;\r\n }\r\n\r\n if (hasChanges) {\r\n this.itemAutocompleted.next();\r\n }\r\n } catch (e) {\r\n Sentry.captureException(e)\r\n } finally {\r\n this.isLoading$.next(false);\r\n }\r\n }\r\n\r\n private async handleInsuranceInformation(insuranceInfo: [], patientId: number): Promise {\r\n const insuranceInformation: BillingInformation[] = [];\r\n\r\n for (const info of insuranceInfo) {\r\n\r\n try {\r\n const item = new BillingInformation();\r\n item.patientId = patientId;\r\n\r\n const gender = (info[\"Insured Gender or Sex\"] as string).toUpperCase();\r\n if (gender == \"MALE\" || gender == \"FEMALE\") {\r\n item.gender = gender;\r\n }\r\n\r\n item.firstName = info[\"Insured First Name\"];\r\n item.lastName = info[\"Insured Last Name\"];\r\n item.middleName = info[\"Insured Middle Name\"];\r\n\r\n try {\r\n const date = new Date(info[\"Insured Birth Date\"]);\r\n if (!isNaN(date.getTime()))\r\n item.birthDate = date;\r\n } catch (e) {\r\n console.error(\"Invalid date format to assign to Insured Birth Date in auto-complete\");\r\n }\r\n\r\n const relationship = info[\"Insured Relationship\"];\r\n\r\n switch ((relationship as string ?? '').toLowerCase()) {\r\n case 'self':\r\n item.relationship = \"SELF\";\r\n break;\r\n case 'spouse':\r\n item.relationship = \"SPOUSE\";\r\n break;\r\n case 'father':\r\n item.relationship = \"FATHER\";\r\n break;\r\n case 'mother':\r\n item.relationship = \"MOTHER\";\r\n break;\r\n case 'son':\r\n item.relationship = \"SON\";\r\n break;\r\n case 'daughter':\r\n item.relationship = \"DAUGHTER\";\r\n break;\r\n }\r\n\r\n item.address = info[\"Insured Address\"];\r\n item.phone = info[\"Insured Phone Number\"];\r\n item.groupNumber = info[\"Group Number\"];\r\n item.insuranceId = info[\"Insurance Id or Policy or Member Id\"];\r\n item.differentThanPatient = (item.relationship as string ?? '').toLowerCase() !== 'self';\r\n\r\n let zipCode: ZipCode | null = null;\r\n\r\n if (info[\"Insured ZipCode\"] !== '') {\r\n zipCode = await this.addressService.getZipCodeByCode(info[\"Insured ZipCode\"]).toPromise()\r\n }\r\n\r\n if (zipCode == null) {\r\n item.address = `${item.address} ${info[\"Insured City\"]} ${info[\"Insured State\"]} ${info[\"Insured ZipCode\"]}`;\r\n } else {\r\n item.zipCode = zipCode;\r\n item.zipCodeId = zipCode.id;\r\n item.zipCodeName = zipCode.code;\r\n }\r\n\r\n const payer = await this.billingService.getBestMatch((info[\"Payer or Insurance Company or Name\"] as string).toUpperCase()).toPromise();\r\n item.payer = payer.name;\r\n item.payerId = payer.id;\r\n item.billTypeId = payer.billType?.id;\r\n item.billType = payer.billType?.code;\r\n\r\n if (item.payerId == null || item.billTypeId == null) continue;\r\n\r\n insuranceInformation.push(item);\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n }\r\n\r\n if (insuranceInformation.length > 0) {\r\n const existingInsuranceInfo = this.missingInfoForm?.get('insuranceInformation')?.value ?? [];\r\n const maxSort = (existingInsuranceInfo as BillingInformation[] ?? []).reduce((prev, current) => {\r\n return ((prev as any).order ?? 0) > ((current as any).order ?? 0) ? prev : current;\r\n });\r\n\r\n for (const information of insuranceInformation) {\r\n (information as any).order = (maxSort as any).order + 1;\r\n }\r\n\r\n this.missingInfoForm?.get('insuranceInformation')?.setValue([...existingInsuranceInfo, ...insuranceInformation]);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n private handleComments(json: any) {\r\n //todo do not override the comment\r\n const comment = `${json[\"Comments\"]}`\r\n this.missingInfoForm?.get('comment')?.setValue(comment);\r\n return true;\r\n }\r\n\r\n private HandleBirthday(json: any, hasChanges: boolean) {\r\n if (this.missingInfoForm?.get(\"birthDate\")?.value == null) {\r\n try {\r\n const date = new Date(json[\"Patient Birth Date\"]);\r\n if (!isNaN(date.getTime()))\r\n this.missingInfoForm?.get('birthDate')?.setValue(date);\r\n hasChanges = true;\r\n } catch (e) {\r\n console.error(\"Invalid date format to assign to Patient Birth Date in auto-complete\");\r\n }\r\n }\r\n return hasChanges;\r\n }\r\n\r\n private handleGender(json: any, hasChanges: boolean) {\r\n if (this.missingInfoForm?.get(\"gender\")?.value == null) {\r\n const gender = json[\"Gender\"].toUpperCase();\r\n if (gender == \"MALE\" || gender == \"FEMALE\") {\r\n this.missingInfoForm?.get(\"gender\")?.setValue(gender);\r\n hasChanges = true;\r\n }\r\n }\r\n return hasChanges;\r\n }\r\n\r\n private async handlePhysician(json: any, hasChanges: boolean) {\r\n if (this.missingInfoForm?.get('orderingPhysician')?.value == null) {\r\n const physician = json[\"Ordering Physician\"];\r\n\r\n if (physician[\"NPI\"] && physician[\"NPI\"] !== \"\") {\r\n hasChanges = await this.handlePhysicianByNpi(physician[\"NPI\"]);\r\n } else if (physician[\"Last Name\"] && physician[\"Last Name\"] !== \"\" && physician[\"First Name\"] && physician[\"First Name\"] !== \"\") {\r\n hasChanges = await this.handlePhysicianByName(physician[\"Last Name\"], physician[\"First Name\"]);\r\n }\r\n }\r\n return hasChanges;\r\n }\r\n\r\n private async handleResponsibleParties(responsibleParties: [], patientId: number): Promise {\r\n const rpList = [];\r\n for (const responsibleParty of responsibleParties) {\r\n if (responsibleParty[\"Last Name\"] === '' || responsibleParty[\"First Name\"] === '') continue;\r\n\r\n try {\r\n const rp = new ResponsibleParty();\r\n rp.lastName = responsibleParty[\"Last Name\"];\r\n rp.firstName = responsibleParty[\"First Name\"];\r\n rp.phone = responsibleParty[\"Phone Number\"];\r\n rp.mobile = responsibleParty[\"Mobile\"];\r\n rp.fax = responsibleParty[\"Fax\"];\r\n rp.address = responsibleParty[\"Address\"];\r\n rp.patientId = patientId;\r\n\r\n let zipCode: ZipCode | null = null;\r\n\r\n if (responsibleParty[\"ZipCode\"] !== '') {\r\n zipCode = await this.addressService.getZipCodeByCode(responsibleParty[\"ZipCode\"]).toPromise()\r\n }\r\n\r\n if (zipCode == null) {\r\n rp.address = `${rp.address} ${responsibleParty[\"City\"]} ${responsibleParty[\"State\"]} ${responsibleParty[\"ZipCode\"]}`;\r\n } else {\r\n rp.zipCode = zipCode;\r\n rp.zipCodeId = zipCode.id;\r\n rp.zipCodeName = zipCode.code;\r\n }\r\n rpList.push(rp);\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n }\r\n\r\n if (rpList.length > 0) {\r\n const existingResponsibleParties = this.missingInfoForm?.get('responsibleParties')?.value ?? [];\r\n this.missingInfoForm?.get('responsibleParties')?.setValue([...existingResponsibleParties, ...rpList]);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n private async handleDiagnoses(diagnoses: string[]): Promise {\r\n try {\r\n const match = await this.diagnosisService.getBestMatch(diagnoses).toPromise();\r\n const existingDiagnoses = this.missingInfoForm?.get('diagnoses')?.value ?? [];\r\n const newDiagnoses = match.filter(x => !existingDiagnoses.includes(x.id));\r\n\r\n if (newDiagnoses.length > 0) {\r\n this.missingInfoForm?.get('diagnoses')?.setValue([...existingDiagnoses, ...newDiagnoses.map(x => x.id)]);\r\n return true;\r\n }\r\n\r\n return false;\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n return false;\r\n }\r\n }\r\n\r\n private async handlePhysicianByNpi(npi: string): Promise {\r\n try {\r\n const match = await this.physicianService.getBestMatchByNpi(npi).toPromise();\r\n this.missingInfoForm?.get('orderingPhysician')?.setValue(match);\r\n return true;\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n return false;\r\n }\r\n }\r\n\r\n private async handlePhysicianByName(lastName: string, firstName: string): Promise {\r\n try {\r\n const match = await this.physicianService.getBestMatchByName(firstName, lastName).toPromise();\r\n this.missingInfoForm?.get('orderingPhysician')?.setValue(match);\r\n return true;\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n return false;\r\n }\r\n }\r\n}\r\n","\r\n \r\n

Missing Information

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Patient: \r\n {{ order.patient?.firstName + ', ' + order.patient?.lastName}}
\r\n BirthDate: \r\n {{ PatientDate }}
\r\n Client: \r\n {{ order.patient?.client?.name }}\r\n
\r\n
\r\n
\r\n
\r\n Unit: \r\n {{ order.patient?.unit?.name }}
\r\n Room: \r\n {{ order.patient?.room?.name }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
BirthDate *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Gender *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{content.title}}\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{content.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
\r\n
\r\n
\r\n
\r\n\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n Renderer2, ViewChild,\r\n} from '@angular/core';\r\nimport { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport { BehaviorSubject, Subject } from 'rxjs';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { DateHelperService, ScreenService } from '../../../../../shared/services/general';\r\nimport { ResponsibleParty, ZipCode, BillingInformation } from '../../../../shared/models';\r\nimport { DiagnosisService } from '../../../../shared/services';\r\nimport { OrdersService } from '../../../../shared/services/orders.service';\r\nimport { OrderBillingInformation, OrderBillingInformationEditable } from '../../models/order-billing-information';\r\nimport {MissingInfoAutocompleteService} from \"./missing-info-autocomplete.service\";\r\nimport {CommentsControlComponent} from \"../../../../shared/components/comments-control/comments-control.component\";\r\nimport {environment} from \"../../../../../../environments/environment\";\r\nimport {\r\n MicToJsonButtonComponent\r\n} from \"../../../../../shared/components/ocl/mic-to-json-button/mic-to-json-button.component\";\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-missing-info',\r\n templateUrl: './missing-info.component.html',\r\n styleUrls: ['./missing-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class MissingInfoComponent implements OnInit, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Input() public order: OrderBillingInformation = new OrderBillingInformation();\r\n @Output() public closeEvent = new EventEmitter();\r\n @ViewChild('commentControl', { static: true }) public commentControl?: CommentsControlComponent;\r\n // @ts-ignore\r\n public diagnosisDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public missingInfoForm: UntypedFormGroup;\r\n public isLoading = false;\r\n public today = new Date();\r\n public gender = ['MALE', 'FEMALE', 'UNKNOWN'];\r\n public hasMissingDiagnosis = false;\r\n public hasMissingBillingInformation = false;\r\n public hasOrderingPhysician = false;\r\n public isPhone: boolean = false;\r\n public isPhoneOrTablet: boolean = false;\r\n public isAudioRecordingEnabled: boolean = environment.aiCommands.enabled;\r\n @ViewChild('micButton', { static: false }) public micButton?: MicToJsonButtonComponent;\r\n public deselectAllBillingInfo = new EventEmitter();\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n public diagnoseService: DiagnosisService,\r\n public dateHelper: DateHelperService,\r\n private ordersService: OrdersService,\r\n private renderer: Renderer2,\r\n private elem: ElementRef,\r\n private screen: ScreenService,\r\n private fusionAuthService: FusionAuthService,\r\n public autocompleteService: MissingInfoAutocompleteService,\r\n private ref: ChangeDetectorRef\r\n ) {\r\n this.missingInfoForm = this.fb.group({\r\n birthDate: new UntypedFormControl(null, Validators.required),\r\n gender: new UntypedFormControl(null, Validators.required),\r\n orderingPhysician: new UntypedFormControl(null, Validators.required),\r\n diagnoses: new UntypedFormControl([]),\r\n insuranceInformation: new UntypedFormControl([]),\r\n responsibleParties: new UntypedFormControl([]),\r\n comment: new UntypedFormControl(null),\r\n });\r\n this.autocompleteService.MissingInfoForm = this.missingInfoForm;\r\n }\r\n\r\n public convertToFormControl(absCtrl: AbstractControl | null): UntypedFormControl {\r\n return absCtrl as UntypedFormControl;\r\n }\r\n\r\n public ngOnInit() {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n\r\n this.diagnosisDataSource.next(new DataSource({\r\n store: this.diagnoseService.customStore(this.diagnosisDataSource),\r\n }));\r\n\r\n this.missingInfoForm.get('diagnoses')?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(diagnoses => {\r\n this.hasDiagnosis(diagnoses);\r\n this.ref.detectChanges();\r\n });\r\n this.ref.detectChanges();\r\n\r\n this.autocompleteService.Autocompleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n try {\r\n ValidationEngine.validateGroup('missingInfo');\r\n this.commentControl?.setHtmlValue(this.missingInfoForm.get('comment')?.value);\r\n } catch {}\r\n this.ref.detectChanges();\r\n });\r\n }\r\n\r\n public get PatientDate () {\r\n if (!this.order.patient) return '';\r\n if (!this.order.patient?.birthDate) return '';\r\n return this.dateHelper.dateWithFormat(this.order.patient?.birthDate as Date,\r\n \"MM/DD/YYYY\");\r\n }\r\n\r\n public onShown() {\r\n this.isLoading = true;\r\n\r\n if (this.order !== undefined && this.order !== null) {\r\n this.missingInfoForm.get('birthDate')?.setValue(this.order?.patient?.birthDate);\r\n this.missingInfoForm.get('gender')?.setValue(this.order?.patient?.gender);\r\n this.missingInfoForm.get('orderingPhysician')?.setValue(this.order.physician);\r\n this.missingInfoForm.get('diagnoses')?.setValue(this.order.diagnoses);\r\n // @ts-ignore\r\n this.missingInfoForm.get('insuranceInformation')?.setValue(this.order.patient?.insuranceInformation.sort((a, b) => a.order - b.order));\r\n this.missingInfoForm.get('responsibleParties')?.setValue(this.order.patient?.responsibleParties);\r\n this.missingInfoForm.get('comment')?.setValue('');\r\n\r\n if (this.order.patient?.birthDate != null) {\r\n this.missingInfoForm.get('birthDate')?.disable();\r\n } else {\r\n this.missingInfoForm.get('birthDate')?.enable();\r\n }\r\n if (this.order?.patient?.gender != null && this.order.patient.gender !== '') {\r\n this.missingInfoForm.get('gender')?.disable();\r\n } else {\r\n this.missingInfoForm.get('gender')?.enable();\r\n }\r\n if (this.order.orderEntryAlert != null) {\r\n this.missingInfoForm.get('comment')?.disable();\r\n } else {\r\n this.missingInfoForm.get('comment')?.enable();\r\n }\r\n this.hasOrderingPhysician = this.missingInfoForm.get('orderingPhysician')?.value !== null;\r\n\r\n this.hasDiagnosis(this.missingInfoForm.get('diagnoses')?.value);\r\n this.hasBillingInformation(this.missingInfoForm.get('insuranceInformation')?.value);\r\n }\r\n this.isLoading = false;\r\n ValidationEngine.validateGroup('missingInfo');\r\n this.ref.detectChanges();\r\n }\r\n\r\n public birthDateChange(e: any) {\r\n if (this.order.patient)\r\n this.order.patient.birthDate = e.value;\r\n this.ref.detectChanges();\r\n }\r\n\r\n public genderChange(e: any) {\r\n if (this.order.patient)\r\n this.order.patient.gender = e.value;\r\n this.ref.detectChanges();\r\n }\r\n\r\n public billingInfoChanged(billingInfo: BillingInformation[]) {\r\n this.missingInfoForm.get('insuranceInformation')?.setValue(billingInfo);\r\n this.hasBillingInformation(this.missingInfoForm.get('insuranceInformation')?.value);\r\n this.ref.detectChanges();\r\n }\r\n\r\n public responsiblePartiesChanged(responsibleParties: ResponsibleParty[]) {\r\n this.missingInfoForm.get('responsibleParties')?.setValue(responsibleParties);\r\n this.ref.detectChanges();\r\n }\r\n\r\n public hasDiagnosis(diagnoses: number[] = []) {\r\n this.hasMissingDiagnosis = diagnoses.length === 0;\r\n }\r\n\r\n public hasBillingInformation(billingInfo: BillingInformation[] = []) {\r\n const some = billingInfo.length === 0 || billingInfo.filter((x: BillingInformation) => {\r\n return !x.lastName || x.lastName === '' || !x.firstName || x.firstName === '' || !x.birthDate ||\r\n !x.address || x.address === '' || !x.zipCode || x.id === 0 || !(x.zipCode as ZipCode).city || !(x.zipCode as ZipCode).cityId ||\r\n !(x.zipCode as ZipCode).state || !(x.zipCode as ZipCode).stateId || !x.gender || x.gender === '' || !x.relationship ||\r\n x.relationship === '' || !x.insuranceId || x.insuranceId === ''\r\n }).length > 0;\r\n this.hasMissingBillingInformation = some;\r\n this.ref.detectChanges();\r\n }\r\n\r\n public close(): void {\r\n if (this.micButton) {\r\n this.micButton.close(true);\r\n }\r\n\r\n this.missingInfoForm.get('birthDate')?.setValue(null);\r\n this.missingInfoForm.get('gender')?.setValue(null);\r\n this.missingInfoForm.get('orderingPhysician')?.setValue(null);\r\n this.missingInfoForm.get('comment')?.setValue(null);\r\n this.missingInfoForm.get('diagnoses')?.setValue([]);\r\n this.missingInfoForm.get('insuranceInformation')?.setValue([]);\r\n this.missingInfoForm.get('responsibleParties')?.setValue([]);\r\n this.closeEvent.emit(true);\r\n }\r\n\r\n public submit() {\r\n this.isLoading = true;\r\n const user = this.fusionAuthService.Profile;\r\n\r\n const orderBillingInformation = new OrderBillingInformationEditable();\r\n\r\n orderBillingInformation.orderId = this.order.id;\r\n orderBillingInformation.patientId = this.order.patient?.id;\r\n orderBillingInformation.birthDate = this.missingInfoForm.get('birthDate')?.value;\r\n orderBillingInformation.gender = this.missingInfoForm.get('gender')?.value;\r\n orderBillingInformation.physicianId = this.missingInfoForm.get('orderingPhysician')?.value ?\r\n this.missingInfoForm.get('orderingPhysician')?.value.id : 0;\r\n orderBillingInformation.diagnoses = this.missingInfoForm.get('diagnoses')?.value;\r\n orderBillingInformation.insuranceInformation = this.missingInfoForm.get('insuranceInformation')?.value;\r\n orderBillingInformation.responsibleParties = this.missingInfoForm.get('responsibleParties')?.value;\r\n orderBillingInformation.username = user.lastName + ', ' + user.firstName;\r\n orderBillingInformation.comments = (this.missingInfoForm.get('comment')?.value === null || this.missingInfoForm.get('comment')?.value === '' ||\r\n this.missingInfoForm.get('comment')?.value.indexOf('

') === -1) ? '' : this.missingInfoForm.get('comment')?.value;\r\n\r\n for (const rp of orderBillingInformation.responsibleParties ? orderBillingInformation.responsibleParties : []) {\r\n rp.zipCodeName = typeof rp.zipCode === 'string' ? rp.zipCode : rp.zipCode.code;\r\n rp.address = rp.address ? rp.address.toUpperCase() : '';\r\n }\r\n\r\n for (const bi of orderBillingInformation.insuranceInformation ? orderBillingInformation.insuranceInformation : []) {\r\n bi.zipCodeName = typeof bi.zipCode === 'string' ? bi.zipCode : bi.zipCode?.code;\r\n /* if (bi.relationship === 'SELF') {\r\n bi.zipCodeName = this.order?.patient?.zipCodeName;\r\n bi.address = this.order.patient?.address;\r\n bi.birthDate = this.order.patient?.birthDate ? this.order.patient?.birthDate : '';\r\n bi.firstName = this.order.patient?.firstName ? this.order.patient?.firstName.toUpperCase() : '';\r\n bi.lastName = this.order.patient?.lastName ? this.order.patient?.lastName.toUpperCase() : '';\r\n bi.gender = this.order.patient?.gender;\r\n bi.middleName = this.order.patient?.middleName ? this.order.patient?.middleName.toUpperCase() : '';\r\n }*/\r\n }\r\n\r\n this.ordersService.updateMissingInfo(this.order.id, orderBillingInformation)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.deselectAllBillingInfo.emit();\r\n this.missingInfoForm.reset({\r\n birthDate: null,\r\n gender: null,\r\n orderingPhysician: null,\r\n diagnoses: [],\r\n insuranceInformation: [],\r\n responsibleParties: [],\r\n comment: null,\r\n });\r\n this.closeEvent.emit(false);\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","import {Component, Input} from '@angular/core';\r\nimport {DateHelperService} from '../../../../../shared/services/general';\r\nimport {ClientWithExtras} from '../../../../shared/models/order-entry/client';\r\nimport {PatientSearchWithoutCollections} from '../../../../shared/models/order-entry/patient';\r\nimport {Physician} from '../../../../shared/models/order-entry/physician';\r\nimport {Order} from '../../models/order';\r\n\r\n@Component({\r\n selector: 'app-order-header',\r\n templateUrl: './order-header.component.html',\r\n styleUrls: ['./order-header.component.scss'],\r\n})\r\nexport class OrderHeaderComponent {\r\n @Input() public order = new Order();\r\n @Input() public client = new ClientWithExtras();\r\n @Input() public patient = new PatientSearchWithoutCollections();\r\n @Input() public physician = new Physician();\r\n\r\n constructor(\r\n public dateHelper: DateHelperService,\r\n ) { }\r\n\r\n public format(dateString?: Date, utc: boolean = false) {\r\n if(!dateString) return '';\r\n if (utc) return this.dateHelper.dateWithFormat(dateString, \"MM/DD/YYYY hh:mm a\");\r\n return this.dateHelper.dateWithFormatWithoutUtc(dateString, \"MM/DD/YYYY hh:mm a\")\r\n }\r\n\r\n public get Client() {\r\n return this.patient ? (this.patient.client ? this.patient.client.name : '') : '';\r\n }\r\n\r\n public get PatientFullName() {\r\n return this.patient ? `${this.patient.firstName} ${this.patient.middleName\r\n ? this.patient.middleName : ''} ${this.patient.lastName}` : '';\r\n }\r\n\r\n public get DOB() {\r\n return this.patient && this.patient.birthDate ? `(${this.dateHelper.dateWithFormatWithoutUtc(this.patient.birthDate as Date, 'LL')})` : '';\r\n }\r\n\r\n public get Gender() {\r\n return this.patient ? this.patient.gender : '';\r\n }\r\n\r\n public get Room() {\r\n return this.patient ? (this.patient.room ? this.patient.room.name : '') : '';\r\n }\r\n\r\n public get Unit() {\r\n if (!this.patient) {\r\n return '';\r\n }\r\n if (!this.patient.unit) {\r\n return '';\r\n }\r\n return this.patient.unit.name;\r\n }\r\n\r\n public get CollectionSites() {\r\n return this.order.collectionSites ? this.order.collectionSites.map(cs => cs.name).join(', ') : '';\r\n }\r\n\r\n public get Physician() {\r\n if (!this.physician) {\r\n return '';\r\n }\r\n return this.physician.lastName ? `${this.physician.lastName}, ${this.physician.firstName}` : '';\r\n }\r\n\r\n public get PatientPrimaryPhysician() {\r\n if (!this.patient) {\r\n return '';\r\n }\r\n return (this.patient as any).primaryPhysician ? `${(this.patient as any).primaryPhysician.lastName}, ${(this.patient as any).primaryPhysician.firstName}` : '';\r\n }\r\n\r\n public get PatientAddress() {\r\n if (!this.patient) {\r\n return '';\r\n }\r\n if (!this.patient.zipCode) {\r\n return this.patient.address ? this.patient.address : '';\r\n }\r\n return `${this.patient.address}, ${this.patient.zipCode.city},\r\n ${this.patient.zipCode.state} ${this.patient.zipCode ? this.patient.zipCode.code : ''}`;\r\n }\r\n\r\n public get ClientAddress() {\r\n if (!this.client) {\r\n return '';\r\n }\r\n if (!this.client.zipCode) {\r\n return this.client.address ? this.client.address : '';\r\n }\r\n return `${this.client.address}, ${this.client.zipCode.city},\r\n ${this.client.zipCode.state} ${this.client.zipCode ? this.client.zipCode.code : ''}`;\r\n }\r\n}\r\n","

\r\n
\r\n
\r\n
Client Information
\r\n
\r\n Name: {{ client? client.name : ''}}
\r\n Address: {{ ClientAddress }}
\r\n Phone: {{ client? client.phone : '' }}
\r\n Fax: {{ client? client.fax : ''}}
\r\n
\r\n
\r\n\r\n
\r\n
Patient Information
\r\n
\r\n Patient ID: {{ patient ? patient.code : '' }}
\r\n Patient: {{ PatientFullName }} {{ DOB }} {{ Gender }}
\r\n Primary Physician: {{ PatientPrimaryPhysician }}
\r\n Room: {{ Room }} Unit: {{ Unit }}
\r\n Address: {{ PatientAddress }}
\r\n Phone: {{ patient? patient.phone : '' }}
\r\n
\r\n
\r\n\r\n
\r\n
Order Information
\r\n
\r\n Collected: {{ format(order.collectionDate) }}
\r\n Received: {{ format(order.receivedDate) }}
\r\n Reported: {{ format(order.reported, true) }}
\r\n Collection Site: {{CollectionSites}}
\r\n Ordering Physician: {{Physician}}\r\n
\r\n
\r\n
\r\n
\r\n","\r\n\r\n
\r\n
\r\n
{{ result.name }} {{ isCancelled ? '- CANCELED' : result.results?.length === 0 ? '- ' + result.status : ''}}
\r\n
\r\n
\r\n
\r\n
{{ pathologyResult.title }}
\r\n
\r\n

\r\n
\r\n
\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Renderer2,\r\n SimpleChanges,\r\n} from '@angular/core';\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport {take, tap} from 'rxjs/operators';\r\nimport {UrlProviderService} from '../../../../../shared/services/general';\r\nimport {PathologyReportStatus, PathologyResult} from '../../models/results';\r\nimport {OrdersService} from '../../../../shared/services/orders.service';\r\n\r\n@Component({\r\n selector: 'app-pathology-results',\r\n templateUrl: './pathology-results.component.html',\r\n styleUrls: ['./pathology-results.component.scss'],\r\n})\r\nexport class PathologyResultsComponent implements OnInit, AfterViewInit, OnChanges {\r\n @Input() public orderId: number = -1;\r\n @Input() public isCancelled: boolean = false;\r\n public isLoading = false;\r\n public results: PathologyResult[] = [];\r\n\r\n constructor(\r\n private orderService: OrdersService,\r\n private urlProvider: UrlProviderService,\r\n private elementRef: ElementRef,\r\n private renderer: Renderer2,\r\n private sanitizer: DomSanitizer,\r\n ) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.isLoading = true;\r\n\r\n this.orderService.getPathologyResults(this.orderId)\r\n .pipe(\r\n take(1),\r\n tap(results => {\r\n const aux: any[] = [];\r\n results.forEach(result => {\r\n if (result.results) {\r\n result.results.forEach(r => {\r\n switch (r.status) {\r\n case PathologyReportStatus.NormalRelease:\r\n r.title = 'Result Report';\r\n r.comment = this.sanitize(r.comment as string);\r\n break;\r\n case PathologyReportStatus.AddendumRelease:\r\n const countAddendum = aux.filter(y => y.status === PathologyReportStatus.AddendumRelease).length;\r\n r.title = 'Addendum ' + (countAddendum + 1);\r\n r.comment = this.sanitize(r.comment as string);\r\n break;\r\n case PathologyReportStatus.RevicedRelease:\r\n const countRevision = aux.filter(y => y.status === PathologyReportStatus.RevicedRelease).length;\r\n r.title = 'Revision ' + (countRevision + 1);\r\n r.comment = this.sanitize(r.comment as string);\r\n break;\r\n }\r\n });\r\n }\r\n });\r\n },\r\n ),\r\n )\r\n .subscribe(results => {\r\n this.results = results;\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n public forTracker(index: number, result: any) {\r\n return result;\r\n }\r\n\r\n public sanitize(html: string) {\r\n return this.sanitizer.bypassSecurityTrustHtml(html);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.orderService.getPathologyResults(changes.orderId.currentValue)\r\n .pipe(\r\n take(1),\r\n tap(results => {\r\n const aux: any[] = [];\r\n results.forEach(result => {\r\n if (result.results) {\r\n result.results.forEach(r => {\r\n switch (r.status) {\r\n case PathologyReportStatus.NormalRelease:\r\n r.title = 'Result Report';\r\n r.comment = this.sanitize(r.comment as string);\r\n break;\r\n case PathologyReportStatus.AddendumRelease:\r\n const countAddendum = aux.filter(y => y.status === PathologyReportStatus.AddendumRelease).length;\r\n r.title = 'Addendum ' + (countAddendum + 1);\r\n r.comment = this.sanitize(r.comment as string);\r\n break;\r\n case PathologyReportStatus.RevicedRelease:\r\n const countRevision = aux.filter(y => y.status === PathologyReportStatus.RevicedRelease).length;\r\n r.title = 'Revision ' + (countRevision + 1);\r\n r.comment = this.sanitize(r.comment as string);\r\n break;\r\n }\r\n });\r\n }\r\n });\r\n },\r\n ),\r\n )\r\n .subscribe(results => {\r\n this.results = results;\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
Results
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{result.data.name}}\r\n \r\n

\r\n
\r\n
\r\n\r\n
\r\n {{result.data.result}}\r\n \r\n

\r\n
\r\n
\r\n\r\n \r\n
\r\n","import {Component, Input, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewChild} from '@angular/core';\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport {DxTreeListComponent} from 'devextreme-angular';\r\nimport {Subject} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../../../../shared/services/fusion-auth';\r\nimport {ScreenService, UrlProviderService} from '../../../../../../shared/services/general';\r\nimport {ResultBase} from '../../../models/results';\r\nimport {OrdersService} from '../../../../../shared/services/orders.service';\r\n\r\n@Component({\r\n selector: 'app-toxicology-alpha',\r\n templateUrl: './toxicology-alpha.component.html',\r\n styleUrls: ['./toxicology-alpha.component.scss'],\r\n})\r\nexport class ToxicologyAlphaComponent implements OnInit, OnDestroy, OnChanges {\r\n @ViewChild('tree', {static: true}) private tree?: DxTreeListComponent;\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public dataSource: ResultBase[] = [];\r\n public expandedKeys: any[] = [];\r\n public hasResults = false;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private ordersService: OrdersService,\r\n private urlProvider: UrlProviderService,\r\n private fusionAuthService: FusionAuthService,\r\n private screen: ScreenService,\r\n private renderer: Renderer2,\r\n private sanitizer: DomSanitizer) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.ordersService.getOrderToxicologyAlphaResults(this.orderId)\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.dataSource = results;\r\n this.expandedKeys = results.map(r => r.key);\r\n this.hasResults = results.length > 0;\r\n });\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n\r\n }\r\n\r\n public calculateNameFilter(value: any, selectedFilterOperations: any, target: any) {\r\n const column = this as any;\r\n if (target === 'filterRow') {\r\n return [['name', 'contains', value.toUpperCase()]];\r\n }\r\n return column.defaultCalculateFilterExpression.apply(this, arguments);\r\n }\r\n\r\n public onContentReady(e: any) {\r\n /*if (this.isPhoneOrTablet) {\r\n const itemsWithChildren = e.element.querySelectorAll('tr[aria-expanded]') as HTMLCollection[];\r\n itemsWithChildren.forEach(x => {\r\n const columnAdaptive = (x as any).lastChild;\r\n if (columnAdaptive.firstChild) {\r\n columnAdaptive.firstChild.hidden = true;\r\n }\r\n });\r\n }*/\r\n e.component.updateDimensions();\r\n }\r\n\r\n public transformYourHtml(htmlTextWithStyle: string) {\r\n return this.sanitizer.bypassSecurityTrustHtml(htmlTextWithStyle);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.ordersService.getOrderToxicologyAlphaResults(changes.orderId.currentValue)\r\n .pipe(take(1))\r\n .subscribe(results => {\r\n this.dataSource = results;\r\n this.expandedKeys = results.map(r => r.key);\r\n this.hasResults = results.length > 0;\r\n });\r\n }\r\n }\r\n}\r\n","import {Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild} from '@angular/core';\r\nimport {DxTreeListComponent} from 'devextreme-angular';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../../../../shared/services/fusion-auth';\r\nimport {ScreenService, UrlProviderService} from '../../../../../../shared/services/general';\r\nimport {ResultBase} from '../../../models/results';\r\nimport {OrdersService} from '../../../../../shared/services/orders.service';\r\n\r\n@Component({\r\n selector: 'app-toxicology-expected',\r\n templateUrl: './toxicology-expected.component.html',\r\n styleUrls: ['./toxicology-expected.component.scss']\r\n})\r\nexport class ToxicologyExpectedComponent implements OnInit, OnDestroy, OnChanges {\r\n @ViewChild('toxiExpectedTree', {static: true}) private tree?: DxTreeListComponent;\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public dataSource: ResultBase[] = [];\r\n public hasResults = false;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private ordersService: OrdersService,\r\n private urlProvider: UrlProviderService,\r\n private fusionAuthService: FusionAuthService,\r\n private screen: ScreenService\r\n ) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.ordersService.getOrderToxicologyConsistentResults(this.orderId)\r\n .subscribe(result => {\r\n if (result.length > 0) {\r\n this.hasResults = true;\r\n this.dataSource = result;\r\n } else {\r\n this.hasResults = false;\r\n }\r\n });\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete()\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.ordersService.getOrderToxicologyConsistentResults(changes.orderId.currentValue)\r\n .subscribe(result => {\r\n if (result.length > 0) {\r\n this.hasResults = true;\r\n this.dataSource = result;\r\n } else {\r\n this.hasResults = false;\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
Consistent Result - Reported Medication Detected
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\r\nimport {take} from 'rxjs/operators';\r\nimport {OrdersService} from '../../../../../shared/services/orders.service';\r\n\r\n@Component({\r\n selector: 'app-toxicology-other-medications',\r\n templateUrl: './toxicology-other-medications.component.html',\r\n styleUrls: ['./toxicology-other-medications.component.scss']\r\n})\r\nexport class ToxicologyOtherMedicationsComponent implements OnInit, OnChanges {\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public hasResults = false;\r\n public results: string | undefined = '';\r\n\r\n constructor(private orderService: OrdersService) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.orderService.getOrderToxicologyOtherMedications(this.orderId)\r\n .pipe(take(1)).subscribe(results => {\r\n if (results.length > 0) {\r\n this.results = results.length === 1 ? results[0].medicationName : results.map(r => r.medicationName).join(', ');\r\n if (!this.results) this.results = '';\r\n this.hasResults = true;\r\n } else {\r\n this.hasResults = false;\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.orderService.getOrderToxicologyOtherMedications(changes.orderId.currentValue)\r\n .pipe(take(1)).subscribe(results => {\r\n if (results.length > 0) {\r\n this.results = results.length === 1 ? results[0].medicationName : results.map(r => r.medicationName).join(', ');\r\n this.hasResults = true;\r\n } else {\r\n this.hasResults = false;\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
Other Reported Medications
\r\n
\r\n \r\n
\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { DxTreeListComponent } from 'devextreme-angular';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../../shared/services/fusion-auth';\r\nimport { ScreenService, UrlProviderService } from '../../../../../../shared/services/general';\r\nimport { ResultBase } from '../../../models/results';\r\nimport { OrdersService } from '../../../../../shared/services/orders.service';\r\n\r\n@Component({\r\n selector: 'app-toxicology-unexpected-negative',\r\n templateUrl: './toxicology-unexpected-negative.component.html',\r\n styleUrls: ['./toxicology-unexpected-negative.component.scss']\r\n})\r\nexport class ToxicologyUnexpectedNegativeComponent implements OnInit, OnChanges {\r\n @ViewChild('toxiUnexpectedNegativeTree', { static: true }) private tree?: DxTreeListComponent;\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public dataSource: ResultBase[] = [];\r\n public hasResults = false;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private orderService: OrdersService, private urlProvider: UrlProviderService, private fusionAuthService: FusionAuthService, private screen: ScreenService) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.orderService.getOrderToxicologyInconsistentNegativeResults(this.orderId)\r\n .subscribe(result => {\r\n this.hasResults = result.length > 0;\r\n this.dataSource = result;\r\n });\r\n\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.orderService.getOrderToxicologyInconsistentNegativeResults(changes.orderId.currentValue)\r\n .subscribe(result => {\r\n this.hasResults = result.length > 0;\r\n this.dataSource = result;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
Inconsistent Result - Negative Results For Reported Medications
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {DxTreeListComponent} from 'devextreme-angular';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../../../../shared/services/fusion-auth';\r\nimport {ScreenService, UrlProviderService} from '../../../../../../shared/services/general';\r\nimport {OrdersService} from '../../../../../shared/services/orders.service';\r\nimport {ResultBase} from '../../../models/results';\r\n\r\n@Component({\r\n selector: 'app-toxicology-unexpected-positive',\r\n templateUrl: './toxicology-unexpected-positive.component.html',\r\n styleUrls: ['./toxicology-unexpected-positive.component.scss'],\r\n})\r\nexport class ToxicologyUnexpectedPositiveComponent implements OnInit, OnDestroy, OnChanges {\r\n @ViewChild('toxiUnexpectedPositiveTree', {static: true}) private tree?: DxTreeListComponent;\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n public dataSource: ResultBase[] = [];\r\n public hasResults = false;\r\n public isPhoneOrTablet: boolean = false;\r\n @Output() public hasResultEvent = new EventEmitter();\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private orderService: OrdersService, private urlProvider: UrlProviderService,\r\n private fusionAuthService: FusionAuthService, private screen: ScreenService) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.orderService.getOrderToxicologyInconsistentPositiveResults(this.orderId)\r\n .subscribe(result => {\r\n this.hasResults = result.length > 0;\r\n this.dataSource = result;\r\n this.hasResultEvent.emit(result.length > 0);\r\n });\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.orderId.currentValue) {\r\n this.isLoading = true;\r\n this.orderService.getOrderToxicologyInconsistentPositiveResults(changes.orderId.currentValue)\r\n .subscribe(result => {\r\n this.hasResults = result.length > 0;\r\n this.dataSource = result;\r\n this.hasResultEvent.emit(result.length > 0);\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
Inconsistent Results - Positive Results For Drugs Not Reported
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-toxicology-results',\r\n templateUrl: './toxicology-results.component.html',\r\n styleUrls: ['./toxicology-results.component.scss']\r\n})\r\nexport class ToxicologyResultsComponent implements OnInit {\r\n\r\n @Input() public orderId: number = -1;\r\n public isLoading = false;\r\n @Output() public hasUnexpectedPositive = new EventEmitter();\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n }\r\n\r\n public hasUnexpectedPositiveResults(hasResults: boolean) {\r\n this.hasUnexpectedPositive.emit(hasResults);\r\n }\r\n\r\n}\r\n","\r\n\r\n\r\n\r\n\r\n","import { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\nimport { BillingInformation } from '../../../shared/models/billing/billing-information';\r\nimport { PatientEditable } from '../../../shared/models/order-entry/patient';\r\nimport { Physician } from '../../../shared/models/order-entry/physician';\r\nimport { ResponsibleParty } from '../../../shared/models/order-entry/reponsible-party';\r\n\r\nexport class OrderBillingInformation extends BaseDataTransferObject {\r\n public orderCode?: string;\r\n public patientLastName?: string;\r\n public patientFirstName?: string;\r\n public orderEntryAlert?: string;\r\n public patient?: PatientEditable;\r\n public diagnoses?: number[];\r\n public physician?: Physician;\r\n}\r\n\r\nexport class OrderBillingInformationEditable extends BaseDataTransferObject {\r\n public orderId?: number;\r\n public patientId?: number;\r\n public birthDate?: Date;\r\n public gender?: string;\r\n public physicianId?: number;\r\n public diagnoses?: number[];\r\n public insuranceInformation?: BillingInformation[];\r\n public responsibleParties?: ResponsibleParty[];\r\n public comments?: string;\r\n public username?: string;\r\n}\r\n","import { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\nimport { Client, ClientWithExtras } from '../../../shared/models/order-entry/client';\r\nimport { Patient, PatientEditable, PatientSearchWithoutCollections } from '../../../shared/models/order-entry/patient';\r\nimport { Physician } from '../../../shared/models/order-entry/physician';\r\nimport { Room, RoomWithUnit } from '../../../shared/models/order-entry/room';\r\nimport { CancellationReason } from './cancellation-reason';\r\nimport { CollectionSite } from './collection-site';\r\nimport { OrderSearchResult } from './results';\r\n\r\nexport enum OrderStatus {\r\n None = 0,\r\n Pending = 1,\r\n Unreleased = 2,\r\n PartiallyReleased = 4,\r\n Partial = 8,\r\n Final = 16, // 0x00000010\r\n Canceled = 32, // 0x00000020\r\n Preliminary = 64, // 0x00000040\r\n All = 0x0000007F\r\n}\r\n\r\nexport enum OrderPriority {\r\n Preoperatory = 2,\r\n Routine = 4,\r\n Stat = 8,\r\n Rush = 16,\r\n None = 32\r\n}\r\n\r\nexport class WebOrder extends BaseDataTransferObject {\r\n public codeValue?: string;\r\n public orderDate?: Date;\r\n public orderCollectionDate?: Date;\r\n public status?: OrderStatus;\r\n public hasAlert?: boolean;\r\n public criticalResults?: boolean;\r\n public criticalToxResults?: boolean;\r\n public criticalMicResults?: boolean;\r\n public patientLastName?: string;\r\n public patientFirstName?: string;\r\n public patientDoB?: Date;\r\n public patientRoom?: string;\r\n public patientBed?: string;\r\n public client?: string;\r\n public onlineAckDateTime?: Date;\r\n public onlineAckUser?: string;\r\n public testNames?: string;\r\n public hasMissingInfo?: boolean;\r\n public orderResults?: OrderSearchResult[];\r\n}\r\n\r\nexport class Order extends BaseDataTransferObject {\r\n public codeValue?: string;\r\n public orderDate?: Date;\r\n public collectionDate?: Date;\r\n public status?: OrderStatus;\r\n public hasAlert: boolean = false;\r\n public hasSignature: boolean = false;\r\n public alert?: string;\r\n public patientLastName?: string;\r\n public patientFirstName?: string;\r\n public patient?: PatientSearchWithoutCollections;\r\n public physician?: Physician;\r\n public patientRoom?: RoomWithUnit;\r\n public patientClient: ClientWithExtras = new ClientWithExtras();\r\n public onlineAckDateTime?: Date;\r\n public onlineAckUser?: string;\r\n public receivedDate?: Date;\r\n public reported ?: Date;\r\n public reportComment: string = '';\r\n public cancellationReasons?: CancellationReason[];\r\n public collectionSites?: CollectionSite[];\r\n public hasToxicologyUnexpectedPositive: boolean = false;\r\n}\r\n","import { SafeHtml } from '@angular/platform-browser';\r\nimport { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\nimport { TestType } from '../../../shared/models/order-entry/test';\r\n\r\nexport class OrderSearchResult {\r\n public orderId?: number;\r\n public testId?: number;\r\n public results?: string;\r\n public flag?: string;\r\n public specialResult?: string;\r\n public reportAs?: string;\r\n}\r\n\r\nexport 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\r\nexport enum TestStatus {\r\n Pending = 1,\r\n Preliminary = 2,\r\n Unreleased = 4,\r\n None = 8,\r\n Final = 16, // 0x00000010\r\n Canceled = 32, // 0x00000020\r\n NA = 0x00000021\r\n}\r\n\r\nexport class ResultBase extends BaseDataTransferObject {\r\n public code?: string;\r\n public name?: string;\r\n public order?: number;\r\n public key?: number;\r\n public parentKey?: number;\r\n}\r\n\r\nexport class Result extends ResultBase {\r\n public parentId?: number;\r\n public level?: number;\r\n public testGroupId?: number;\r\n public canceled?: boolean;\r\n public resultType?: ResultType;\r\n public testType?: TestType;\r\n public result?: string;\r\n}\r\n\r\nexport class ClinicalResult extends Result {\r\n public flag?: string;\r\n public unit?: string;\r\n public referenceRange?: string;\r\n public comment?: string;\r\n public resultReportComments?: string;\r\n public clinicalRangeComment?: string;\r\n public released?: string;\r\n public testCancelled?: string;\r\n public isAbnormal?: boolean;\r\n}\r\n\r\nexport class ToxicologyResult extends Result {\r\n public detectionWindow?: string;\r\n public flag?: string;\r\n public unit?: string;\r\n public referenceRange?: string;\r\n public comment?: string;\r\n public resultReportComments?: string;\r\n public clinicalRangeComment?: string;\r\n public released?: boolean;\r\n public testCancelled?: string;\r\n public isAbnormal?: string;\r\n public cutOff?: string;\r\n public rxVerification?: string;\r\n}\r\n\r\nexport class MedicationResult extends Result {\r\n public medicationId?: number;\r\n public medicationName?: string;\r\n public detectionWindow?: string;\r\n}\r\n\r\nexport enum PathologyReportStatus {\r\n Normal,\r\n NormalRelease,\r\n Addendum,\r\n AddendumRelease,\r\n Reviced,\r\n RevicedRelease\r\n}\r\n\r\nexport class Pathology {\r\n public order?: number;\r\n public title?: string;\r\n public comment?: string | SafeHtml;\r\n public status?: PathologyReportStatus;\r\n}\r\n\r\nexport class PathologyResult extends ResultBase {\r\n public status?: TestStatus;\r\n public results?: Pathology[];\r\n}\r\n\r\nexport class Sensitivity {\r\n public mic?: string;\r\n public microbiologyInterpretationType?: string;\r\n public antibioticName?: string;\r\n public comment?: string;\r\n public microbiologyInterpretationTypeShort?: string;\r\n}\r\n\r\nexport class Organism {\r\n public name?: string;\r\n public cultureQuantityName?: string;\r\n public comment?: string;\r\n public organismComment?: string;\r\n public haveSensitivity?: boolean;\r\n public sensitivity?: Sensitivity[];\r\n}\r\n\r\nexport class Source {\r\n public name?: string;\r\n public cultureQuantityName?: string;\r\n}\r\n\r\nexport class MicrobiologyResult extends Result {\r\n public collected?: Date;\r\n public status?: TestStatus;\r\n public flag?: string;\r\n public microbiologyFlag?: string;\r\n public unit?: string;\r\n public referenceRange?: string;\r\n public comment?: string;\r\n public clinicalRangeComment?: string;\r\n public preliminaryResultComment?: string;\r\n public resultReportComments?: string;\r\n public preliminaryReleased?: boolean;\r\n public collectionSite?: string;\r\n public released?: boolean;\r\n public testCancelled?: boolean;\r\n public findings?: Source[];\r\n public organisms?: Organism[];\r\n public sources?: string;\r\n}\r\n","import { BaseDataTransferObject } from '../../../shared/models/base-data-transfer-object';\r\nimport { ClinicalResult, MicrobiologyResult, ToxicologyResult } from './results';\r\n\r\n\r\nexport class OrderPatientInformation extends BaseDataTransferObject {\r\n public patientId?: number;\r\n public patientFirstName?: string;\r\n public patientMiddleName?: string;\r\n public patientLastName?: string;\r\n public patientBirthDate?: Date;\r\n public patientAddress?: string;\r\n public patientZipCode?: string;\r\n public patientCity?: string;\r\n public patientState?: string;\r\n public patientGender?: string;\r\n public patientPhone?: string;\r\n}\r\n\r\nexport class CumulativeResultsCollection {\r\n public collectionDate?: Date;\r\n public orders?: CumulativeOrderWrapper[];\r\n}\r\n\r\nexport class CumulativeOrderWrapper extends BaseDataTransferObject{\r\n public code?: string;\r\n public date?: Date;\r\n public results?: ClinicalResult[] | MicrobiologyResult[] | ToxicologyResult[];\r\n}\r\n","
\r\n \r\n \r\n\r\n
\r\n
\r\n

Cumulative Results

\r\n
\r\n
\r\n
\r\n
\r\n
Patient Information
\r\n
\r\n Patient: {{ PatientFullName }} {{ DOB }} {{ Gender }}
\r\n Address: {{ PatientAddress }}
\r\n Phone: {{ orderInfo ? orderInfo.patientPhone : '' }}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
Settings
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
Records
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
0 || clinicalSeriesGraph.length > 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n

\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, OnInit, Renderer2 } from '@angular/core';\r\nimport { UntypedFormControl } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport * as Moment from 'moment-timezone';\r\nimport { of, Subject } from 'rxjs';\r\nimport { switchMap, take, takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { DateHelperService, PWADetectorService, ScreenService } from '../../../../../shared/services/general';\r\nimport { ReportsService } from '../../../../../shared/services/ocl';\r\nimport { ObjectUtils } from '../../../../../shared/utils';\r\nimport { Client } from '../../../../shared/models/order-entry/client';\r\nimport { OrdersService } from '../../../../shared/services/orders.service';\r\nimport {\r\n CumulativeOrderWrapper,\r\n CumulativeResultsCollection,\r\n OrderPatientInformation,\r\n} from '../../models/cumulative-result';\r\nimport { ResultType } from '../../models/results';\r\n\r\nconst tz = Moment.tz.guess();\r\n\r\n@Component({\r\n selector: 'app-cumulative-results',\r\n templateUrl: './cumulative-results.component.html',\r\n styleUrls: ['./cumulative-results.component.scss'],\r\n})\r\nexport class CumulativeResultsComponent implements OnInit {\r\n public isLoading = false;\r\n public orderInfo: OrderPatientInformation = new OrderPatientInformation();\r\n public clientSelector: UntypedFormControl;\r\n public startDateControl: UntypedFormControl;\r\n public endDateControl: UntypedFormControl;\r\n public records = 5;\r\n public selectedClient: number = -1;\r\n public clinicalResultsVisible = false;\r\n public clinicalResultsLoading = false;\r\n public microbiologyResultsVisible = false;\r\n public microbiologyResultsLoading = false;\r\n public toxicologyResultsVisible = false;\r\n public toxicologyResultsLoading = false;\r\n public selectedTab = -1;\r\n\r\n public clinicalResults: CumulativeResultsCollection[] = [];\r\n public clinicalRows: any[] = [];\r\n public clinicalResultsColumns: any[] = [];\r\n public clinicalGraph: any[] = [];\r\n public clinicalSeriesGraph: any[] = [];\r\n\r\n public toxicologyResults: CumulativeResultsCollection[] = [];\r\n public toxicologyRows: any[] = [];\r\n public toxicologyResultsColumns: any[] = [];\r\n\r\n public microbiologyResults: CumulativeResultsCollection[] = [];\r\n public microbiologyRows: any[] = [];\r\n public microbiologyResultsColumns: any[] = [];\r\n public isPhoneOrTablet: boolean = false;\r\n public visibleScroll = false;\r\n private onDestroy$: Subject = new Subject();\r\n private orderId: number = -1;\r\n public user: any;\r\n public role: string = '';\r\n public clientIds: number[] = [];\r\n public filterClients = new EventEmitter();\r\n public startDate: any;\r\n public endDate: any;\r\n\r\n constructor(\r\n private ordersService: OrdersService,\r\n private route: ActivatedRoute,\r\n private dateHelper: DateHelperService,\r\n private fusionAuthService: FusionAuthService,\r\n private renderer: Renderer2,\r\n private pwaDetectorService: PWADetectorService,\r\n private reportsService: ReportsService,\r\n private screen: ScreenService,\r\n ) {\r\n const start = new Date();\r\n start.setHours(0, 0, 0, 0);\r\n\r\n const end = new Date();\r\n end.setHours(23, 59, 59, 999);\r\n\r\n this.clientSelector = new UntypedFormControl({\r\n value: null,\r\n });\r\n this.startDateControl = new UntypedFormControl({\r\n value: Moment(start).tz(tz),\r\n });\r\n this.endDateControl = new UntypedFormControl({\r\n value: Moment(end).tz(tz),\r\n });\r\n }\r\n\r\n public ngOnInit() {\r\n this.handleResponsive();\r\n this.clientSelector.valueChanges\r\n .pipe(\r\n takeUntil(this.onDestroy$)\r\n )\r\n .subscribe((client: Client) => {\r\n this.selectedClient = client.id;\r\n });\r\n\r\n const request = this.route.paramMap.pipe(\r\n switchMap(params => {\r\n if (params.get('id')) {\r\n this.isLoading = true;\r\n // @ts-ignore\r\n this.orderId = +params.get('id');\r\n\r\n return this.ordersService.getOrderPatientInformation(this.orderId);\r\n } else {\r\n return of(null);\r\n }\r\n }),\r\n );\r\n\r\n\r\n request.pipe(take(1))\r\n // @ts-ignore\r\n .subscribe((order: OrderPatientInformation) => {\r\n this.isLoading = false;\r\n this.orderInfo = order;\r\n this.ordersService\r\n .getOrderTestsTypes(this.orderId)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n this.isLoading = false;\r\n this.clinicalResultsVisible = response.hasClinicalResult;\r\n this.microbiologyResultsVisible = response.hasMicrobiologyResult;\r\n this.toxicologyResultsVisible = response.hasToxicologyResult;\r\n\r\n this.selectedTab = this.clinicalResultsVisible\r\n ? 0\r\n : this.toxicologyResultsVisible\r\n ? 2\r\n : this.microbiologyResultsVisible\r\n ? 1\r\n : -1;\r\n this.searchResults();\r\n });\r\n });\r\n }\r\n\r\n private handleResponsive() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public get PatientFullName() {\r\n return this.orderInfo ? `${this.orderInfo.patientLastName}, ${this.orderInfo.patientFirstName} ${this.orderInfo.patientMiddleName\r\n ? this.orderInfo.patientMiddleName : ''} ` : '';\r\n }\r\n\r\n public get DOB() {\r\n if (!this.orderInfo.patientBirthDate) return '';\r\n return this.orderInfo ? `(${this.dateHelper.dateWithFormatWithoutUtc(this.orderInfo.patientBirthDate, 'LL')})` : '';\r\n }\r\n\r\n public get Gender() {\r\n return this.orderInfo ? this.orderInfo.patientGender : '';\r\n }\r\n\r\n public get PatientAddress() {\r\n return this.orderInfo ? `${this.orderInfo.patientAddress ? this.orderInfo.patientAddress + ',' : ''}\r\n ${this.orderInfo.patientCity ? this.orderInfo.patientCity + ',' : ''} ${this.orderInfo.patientState} ${this.orderInfo.patientZipCode}` : '';\r\n }\r\n\r\n public get start() {\r\n return Moment(this.startDateControl.value).toDate();\r\n }\r\n\r\n public get end() {\r\n return Moment(this.endDateControl.value).toDate();\r\n }\r\n\r\n public search() {\r\n if (!this.selectedClient) {\r\n this.filterClients.emit();\r\n }\r\n this.searchResults();\r\n }\r\n\r\n private searchResults() {\r\n if (!this.toxicologyResultsLoading && !this.clinicalResultsLoading && !this.microbiologyResultsLoading) {\r\n const clientsIds = this.clientSelector.value;\r\n const startDate = this.startDateControl.value;\r\n const endDate = this.endDateControl.value;\r\n const records = this.records;\r\n\r\n this.loadClinicalResults(startDate, endDate, records);\r\n this.loadToxicologyResults(startDate, endDate, records);\r\n this.loadMicrobiologyResults(startDate, endDate, records);\r\n }\r\n }\r\n\r\n public clinicalSelection(e: any) {\r\n this.clinicalGraph = [];\r\n if (e.selectedRowKeys.length === 0) {\r\n this.visibleScroll = false;\r\n }\r\n this.clinicalSeriesGraph = e.selectedRowsData.map((data: any) => {\r\n return { name: data.name, valueField: `value_${data.name}` };\r\n });\r\n const collectionDates = this.clinicalResults.slice().reverse().map(cr => cr.collectionDate);\r\n collectionDates.forEach(date => {\r\n const dateResults = this.clinicalResults.filter(cr => Moment(date).isSame(cr.collectionDate));\r\n if (dateResults.length !== 0) {\r\n const lastOrder = dateResults[0].orders?.sort((a, b) => {\r\n // @ts-ignore\r\n if (isNaN(a.code) || isNaN(b.code)) {\r\n return -1;\r\n }\r\n // @ts-ignore\r\n return +a.code + +b.code;\r\n })[0];\r\n const graphResult = {\r\n collectionDate: date,\r\n };\r\n for (const name of this.clinicalSeriesGraph.map(s => s.name)) {\r\n if (lastOrder) {\r\n const index = lastOrder.results?.findIndex(r => r.name === name);\r\n if (index === -1) {\r\n // @ts-ignore\r\n graphResult[`value_${name}`] = 0;\r\n } else {\r\n // @ts-ignore\r\n if ((lastOrder.results[index] as ClinicalCumulativeResult).resultType === ResultType.ValueValue && !isNaN(lastOrder.results[index].result)) {\r\n // @ts-ignore\r\n graphResult[`value_${name}`] = lastOrder.results[index].result;\r\n } else {\r\n // @ts-ignore\r\n graphResult[`value_${name}`] = 0;\r\n }\r\n }\r\n }\r\n }\r\n // @ts-ignore\r\n graphResult.collectionDate = new Date(graphResult.collectionDate).getTime();\r\n this.clinicalGraph.push(graphResult);\r\n }\r\n });\r\n }\r\n\r\n public graphTooltip(info: any) {\r\n\r\n const cumulativeResult = this.clinicalResults.filter(cr => Moment(info.argument).isSame(cr.collectionDate))[0];\r\n const orders = cumulativeResult.orders?.filter(o => o.results?.some(r => r.name === info.seriesName));\r\n\r\n let text = ``;\r\n\r\n orders?.forEach(o => {\r\n text += `${o.code}
`;\r\n text += `${Moment(o.date).format('LL')}
`;\r\n // @ts-ignore\r\n text += `${o.results.filter(r => r.name === info.seriesName)[0].result} ` +\r\n // @ts-ignore\r\n `${o.results.filter(r => r.name === info.seriesName)[0].unit}
`;\r\n text += `
`;\r\n });\r\n\r\n return text;\r\n }\r\n\r\n private loadClinicalResults(startDate: any, endDate: any, records: number) {\r\n if (this.clinicalResultsVisible) {\r\n this.clinicalResultsLoading = true;\r\n this.ordersService.getCumulativeResults(\r\n this.orderInfo.id,\r\n this.selectedClient,\r\n this.role === 'Physician' && this.user.data ? this.user.data.physicians : [],\r\n startDate.value ? startDate.value : startDate,\r\n endDate.value ? endDate.value : endDate,\r\n records, 'clinical')\r\n .pipe(take(1))\r\n .subscribe((results: CumulativeResultsCollection[]) => {\r\n this.clinicalResultsLoading = false;\r\n this.clinicalResults = results;\r\n\r\n this.clinicalResultsColumns = this.generateColumns(this.clinicalResults);\r\n\r\n this.clinicalRows = this.generateRows(results, this.clinicalResultsColumns.map(c => c.columns).length);\r\n });\r\n }\r\n }\r\n\r\n public clinicalRow(e: any) {\r\n e.cells.forEach((cell: any) => {\r\n if (cell.rowType && cell.columnIndex && cell.cellElement) {\r\n if (cell.rowType === 'data' && cell.columnIndex > 1) {\r\n this.renderer.setProperty(cell.cellElement, 'textContent', 'NOT ORDERED');\r\n }\r\n }\r\n });\r\n\r\n if (e.data) {\r\n e.columns.forEach((column: any) => {\r\n // @ts-ignore\r\n const order = this.getOrder(ObjectUtils.flatten(this.clinicalResults?.map(cr => cr.orders)), column.caption);\r\n if (order) {\r\n const index = order.results.findIndex(r => r.name === e.data.name);\r\n if (index !== -1) {\r\n const cellValue = `${order.results[index].result} ${(order.results[index] as ClinicalCumulativeResult).unit}`;\r\n const columnIndex = e.columns.findIndex((c: any) => c.caption === column.caption);\r\n const cellIndex = e.cells.findIndex((cell: any) => cell.columnIndex === columnIndex);\r\n this.renderer.setProperty(e.cells[cellIndex].cellElement, 'textContent', cellValue);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n private loadToxicologyResults(startDate: any, endDate: any, records: number) {\r\n if (this.toxicologyResultsVisible) {\r\n this.toxicologyResultsLoading = true;\r\n this.ordersService.getCumulativeResults(\r\n this.orderInfo.id,\r\n this.selectedClient,\r\n this.role === 'Physician' && this.user.data ? this.user.data.physicians : [],\r\n startDate.value ? startDate.value : startDate,\r\n endDate.value ? endDate.value : endDate, records,\r\n 'toxicology'\r\n )\r\n .pipe(takeUntil(this.onDestroy$)).subscribe((results: CumulativeResultsCollection[]) => {\r\n this.toxicologyResultsLoading = false;\r\n this.toxicologyResults = results;\r\n\r\n this.toxicologyResultsColumns = this.generateColumns(this.toxicologyResults);\r\n\r\n this.toxicologyRows = this.generateRows(results, this.toxicologyResultsColumns.map(c => c.columns).length);\r\n });\r\n }\r\n }\r\n\r\n public toxicologyRow(e: any) {\r\n e.cells.forEach((cell: any) => {\r\n if (cell.rowType === 'data' && cell.columnIndex !== 0 && cell.cellElement !== undefined) {\r\n this.renderer.setProperty(cell.cellElement, 'textContent', 'NOT ORDERED');\r\n }\r\n });\r\n\r\n if (e.data) {\r\n e.columns.forEach((column: any) => {\r\n // @ts-ignore\r\n const order = this.getOrder(ObjectUtils.flatten(this.toxicologyResults.map(cr => cr.orders)), column.caption);\r\n if (order) {\r\n const index = order.results.findIndex(r => r.name === e.data.name);\r\n if (index !== -1) {\r\n const cellValue = `${order.results[index].result}`;\r\n const columnIndex = e.columns.findIndex((c: any) => c.caption === column.caption);\r\n const cellIndex = e.cells.findIndex((cell: any) => cell.columnIndex === columnIndex);\r\n this.renderer.setProperty(e.cells[cellIndex].cellElement, 'textContent', cellValue);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n private loadMicrobiologyResults(startDate: any, endDate: any, records: number) {\r\n if (this.microbiologyResultsVisible) {\r\n this.microbiologyResultsLoading = true;\r\n this.ordersService.getCumulativeResults(\r\n this.orderInfo.id,\r\n this.selectedClient,\r\n this.role === 'Physician' && this.user.data ? this.user.data.physicians : [],\r\n startDate.value ? startDate.value : startDate,\r\n endDate.value ? endDate.value : endDate, records,\r\n 'microbiology',\r\n )\r\n .pipe(take(1)).subscribe((results: CumulativeResultsCollection[]) => {\r\n this.microbiologyResultsLoading = false;\r\n this.microbiologyResults = results;\r\n\r\n this.microbiologyResultsColumns = this.generateColumns(this.microbiologyResults);\r\n\r\n this.microbiologyRows = this.generateRows(results, this.microbiologyResultsColumns.map(c => c.columns).length);\r\n });\r\n }\r\n }\r\n\r\n public microbiologyRow(e: any) {\r\n e.cells.forEach((cell: any) => {\r\n if (cell.rowType && cell.columnIndex) {\r\n if (cell.rowType === 'data' && cell.columnIndex !== 0 && cell.cellElement !== undefined) {\r\n this.renderer.setProperty(cell.cellElement, 'textContent', 'NOT ORDERED');\r\n }\r\n }\r\n });\r\n\r\n if (e.data) {\r\n e.columns.forEach((column: any) => {\r\n // @ts-ignore\r\n const order = this.getOrder(ObjectUtils.flatten(this.microbiologyResults.map(cr => cr.orders)), column.caption);\r\n if (order) {\r\n const index = order.results.findIndex(r => r.name === e.data.name);\r\n if (index !== -1 && (order.results[index] as MicrobiologyCumulativeResult).organisms) {\r\n const cellValue = `${(order.results[index] as MicrobiologyCumulativeResult).organisms.map(o => o.name).join(', ')}`;\r\n const columnIndex = e.columns.findIndex((c: any) => c.caption === column.caption);\r\n const cellIndex = e.cells.findIndex((cell: any) => cell.columnIndex === columnIndex);\r\n this.renderer.setProperty(e.cells[cellIndex].cellElement, 'textContent', cellValue);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n private getOrder(orders: CumulativeOrder[], code: string) {\r\n const index = orders.findIndex(o => o.code === code);\r\n return index !== -1 ? orders[index] : null;\r\n }\r\n\r\n public generateColumns(results: CumulativeResultsCollection[]) {\r\n let columns = [] as Array<{ dataField?: string, caption: Date | string, columns?: any[] }>;\r\n for (const result of results) {\r\n const column = {\r\n caption: new Date(result?.collectionDate ? result.collectionDate : ''),\r\n columns: result.orders?.sort((a: CumulativeOrderWrapper, b: CumulativeOrderWrapper) => {\r\n // @ts-ignore\r\n if (isNaN(a.code) || isNaN(b.code)) {\r\n return -1;\r\n }\r\n // @ts-ignore\r\n return +a.code - +b.code;\r\n }).map(o => {\r\n return { caption: o.code };\r\n }),\r\n };\r\n columns.push(column);\r\n }\r\n\r\n // @ts-ignore\r\n columns = columns.slice().sort((a, b) => (a.caption as Date) - (b.caption as Date));\r\n columns.forEach(c => c.caption = Moment(c.caption).tz(tz).format('LL'));\r\n\r\n columns.unshift({\r\n dataField: 'name',\r\n caption: 'Tests',\r\n });\r\n\r\n return columns;\r\n }\r\n\r\n public generateRows(results: CumulativeResultsCollection[], columnsCount: number) {\r\n const testsNames: any[] = [];\r\n const rows = [];\r\n\r\n for (const result of results) {\r\n for (const order of result.orders ? result.orders : []) {\r\n const orderTests = (order.results as any[]).map(r => r.name);\r\n const unmatchedTests = orderTests.filter(ot => testsNames.findIndex(r => r === ot) === -1);\r\n testsNames.push(...unmatchedTests);\r\n }\r\n }\r\n\r\n for (const testName of testsNames) {\r\n const row = {\r\n name: testName,\r\n };\r\n\r\n for (let i = 1; i < columnsCount + 1; i++) {\r\n // @ts-ignore\r\n row[i.toString()] = 'NOT ORDERED';\r\n }\r\n rows.push(row);\r\n }\r\n\r\n return rows;\r\n }\r\n\r\n public recordsValueChanged(e: any) {\r\n this.records = e.value;\r\n }\r\n\r\n /*public cumulativeResults() {\r\n let queryString = '';\r\n queryString += `orderId=${this.orderInfo.id}&`;\r\n queryString += `records=${this.records}&`;\r\n if (this.clientSelector.value.value !== null) {\r\n queryString += `clientId=${this.clientSelector.value.value}&`;\r\n }\r\n if (this.startDateControl.value && this.startDateControl.value.value && this.startDateControl.value.value !== '') {\r\n queryString += `startDate=${this.dateHelper.formatDate(this.startDateControl.value.value)}&`;\r\n }\r\n if (this.endDateControl.value && this.endDateControl.value.value && this.endDateControl.value.value !== '') {\r\n queryString += `endDate=${this.dateHelper.formatDate(this.endDateControl.value.value)}&`;\r\n }\r\n\r\n this.isLoading = true;\r\n this.reportsService.generateCumulativeResults(queryString)\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this));\r\n }*/\r\n\r\n public onContentReady(e: any) {\r\n if (this.isPhoneOrTablet) {\r\n e.component.option('columns[0].fixed', true);\r\n }\r\n }\r\n\r\n public onZoomEnd(e: any) {\r\n this.visibleScroll = e.shift !== 0;\r\n }\r\n\r\n public customizeText(pointInfo: any) {\r\n return Moment(pointInfo.value).format('LL');\r\n }\r\n}\r\n\r\n\r\n\r\ninterface CumulativeOrder {\r\n id: number;\r\n code: string;\r\n date: Date;\r\n results: ClinicalCumulativeResult[] | MicrobiologyCumulativeResult[] | ToxicologyCumulativeResult[];\r\n}\r\n\r\ninterface ClinicalCumulativeResult {\r\n name: string;\r\n result: string;\r\n unit: string;\r\n resultType: string;\r\n released: boolean;\r\n}\r\n\r\ninterface MicrobiologyCumulativeResult {\r\n name: string;\r\n result: string;\r\n organisms: Organism[];\r\n}\r\n\r\ninterface Organism {\r\n name: string;\r\n}\r\n\r\ninterface ToxicologyCumulativeResult {\r\n name: string;\r\n result: string;\r\n}\r\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-order-status-radio-buttons',\r\n templateUrl: './order-status-radio-buttons.component.html',\r\n styleUrls: ['./order-status-radio-buttons.component.scss'],\r\n})\r\nexport class OrderStatusRadioButtonsComponent implements OnInit, OnDestroy {\r\n public status: string[] = [];\r\n public selected: string = '';\r\n @Input() public control: UntypedFormControl = new UntypedFormControl();\r\n @Input() public fromAlerts = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n public valueChanged() {\r\n this.control.setValue(this.selected);\r\n }\r\n\r\n public ngOnInit() {\r\n if (this.fromAlerts) {\r\n this.status = [\r\n 'Partial',\r\n 'Final',\r\n 'All',\r\n ];\r\n this.selected = this.status[2];\r\n } else {\r\n this.status = [\r\n 'Pending',\r\n 'Partial',\r\n 'Final',\r\n 'All',\r\n ];\r\n this.selected = this.status[3];\r\n }\r\n\r\n this.valueChanged();\r\n\r\n this.control.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((values) => {\r\n if (values === undefined || values === null) {\r\n this.selected = this.fromAlerts ? this.status[2] : this.status[3];\r\n }\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete()\r\n }\r\n}\r\n","
\r\n
Order Status
\r\n
\r\n \r\n \r\n
\r\n
\r\n","\r\n\r\n
\r\n
\r\n
\r\n

Laboratory Results

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\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 { AfterViewInit, Component, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\r\nimport {AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport * as Moment from 'moment';\r\nimport { BehaviorSubject, of, Subject } from 'rxjs';\r\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\r\nimport { DateMoreThan } from '../../../../../shared/custom-validations/date-validations';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { ClientSelectorComponent } from '../../../../shared/components/client-selector/client-selector.component';\r\nimport { ClientService } from '../../../../shared/services';\r\nimport { SettingsService } from '../../../../shared/services/settings.service';\r\nimport {Client} from \"../../../../shared/models/order-entry/client\";\r\n\r\nfunction today() {\r\n return Moment().format('MM/DD/YYYY');\r\n}\r\n\r\n@Component({\r\n selector: 'app-lab-results',\r\n templateUrl: './lab-results.component.html',\r\n styleUrls: ['./lab-results.component.scss'],\r\n})\r\nexport class LabResultsComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild(ClientSelectorComponent, { static: true }) public clientSelector?: ClientSelectorComponent;\r\n @Output() public formSubmitted = new EventEmitter();\r\n public resultsSearchForm: UntypedFormGroup;\r\n private sent = false;\r\n public role: string = '';\r\n public isLoading = false;\r\n public showMissingInfo = false;\r\n // @ts-ignore\r\n public unitsDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private fusionAuthService: FusionAuthService,\r\n private clientService: ClientService,\r\n private settingsService: SettingsService,\r\n ) {\r\n this.resultsSearchForm = this.fb.group({\r\n startDate: [today(), [Validators.required]],\r\n endDate: [today(), [Validators.required, DateMoreThan('startDate')]],\r\n client: [null],\r\n unit: [null],\r\n patient: [null],\r\n status: [null],\r\n missingInfo: [false],\r\n criticalResults: [false],\r\n });\r\n\r\n this.initialSubmit = this.initialSubmit.bind(this);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.settingsService\r\n .IsMissingInfoEnabled()\r\n .pipe(take(1))\r\n .subscribe(x => {\r\n this.showMissingInfo = x;\r\n });\r\n this.resultsSearchForm.get('client')?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe((client: Client) => {\r\n if (!client) {\r\n // @ts-ignore\r\n this.unitsDataSource = new BehaviorSubject(null);\r\n } else {\r\n this.unitsDataSource.next(new DataSource({\r\n store: this.clientService.clientUnitsCustomStore(client.id, this.unitsDataSource)\r\n }));\r\n }\r\n });\r\n this.initialSubmit();\r\n }\r\n\r\n private initialSubmit() {\r\n if (localStorage.getItem('authtoken')) {\r\n this.role = this.fusionAuthService.Profile.registrations[0].roles[0];\r\n\r\n if (!this.sent) {\r\n this.submit();\r\n this.sent = true;\r\n }\r\n this.isLoading = false;\r\n } else {\r\n this.isLoading = true;\r\n of()\r\n .pipe(\r\n take(1),\r\n debounceTime(1000),\r\n )\r\n .subscribe(() => this.initialSubmit());\r\n }\r\n }\r\n\r\n get Units(): number {\r\n return this.resultsSearchForm.get('client')?.value ? this.resultsSearchForm.get('client')?.value.units : null;\r\n }\r\n\r\n public clear() {\r\n this.resultsSearchForm.get('startDate')?.setValue(today());\r\n this.resultsSearchForm.get('endDate')?.setValue(today());\r\n this.resultsSearchForm.reset();\r\n this.submit();\r\n }\r\n\r\n public searchResults(): void {\r\n if (this.resultsSearchForm.valid) {\r\n this.submit();\r\n }\r\n }\r\n\r\n private submit() {\r\n if (!this.resultsSearchForm.get('startDate')?.value) {\r\n this.resultsSearchForm.get('startDate')?.setValue(today());\r\n }\r\n\r\n if (!this.resultsSearchForm.get('endDate')?.value) {\r\n this.resultsSearchForm.get('endDate')?.setValue(today());\r\n }\r\n\r\n this.formSubmitted.emit(this.resultsSearchForm.value);\r\n }\r\n\r\n public convertToFormControl(absCtrl: AbstractControl | null): UntypedFormControl {\r\n return absCtrl as UntypedFormControl;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n

\r\n Order {{order?.codeValue}} Results\r\n

\r\n \r\n
\r\n\r\n
\r\n
\r\n Order {{order?.codeValue}} Results\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n

Order Comments

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

Cancellation Reasons

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

Order Documents

\r\n\r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{document.name}}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n Patient ID: {{ PatientCode }}
\r\n Patient: {{ PatientFullName }} {{ DOB }} {{ Gender }}
\r\n Primary Physician: {{ PatientPrimaryPhysician }}
\r\n Room: {{ Room }} Unit: {{ Unit }}
\r\n Address: {{ PatientAddress }}
\r\n Phone: {{ Patient.phone }}
\r\n
\r\n
\r\n \r\n
\r\n Collected: {{ CollectionDate }}\r\n
\r\n Received: {{ ReceivedDate }}\r\n
\r\n Reported: {{ ReportedDate }}\r\n
\r\n Collection Site: {{CollectionSites}}
\r\n Ordering Physician: {{Physician}}\r\n
\r\n
\r\n \r\n
\r\n Name: {{ Patient?.client?.name }}
\r\n Address: {{ ClientAddress }}
\r\n Phone: {{ Patient?.client?.phone }}\r\n
\r\n Fax: {{ Patient?.client?.fax }}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{{document?.name}}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import {Component, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewChild} from '@angular/core';\r\nimport { UntypedFormControl } from '@angular/forms';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport config from 'devextreme/core/config';\r\nimport { custom } from 'devextreme/ui/dialog';\r\nimport { alert } from 'devextreme/ui/dialog';\r\nimport notify from 'devextreme/ui/notify';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport { Observable, of, Subject } from 'rxjs';\r\nimport {catchError, switchMap, take, takeUntil} from 'rxjs/operators';\r\nimport { Physician } from 'src/app/modules/shared/models/order-entry/physician';\r\nimport { ReportsService } from 'src/app/modules/shared/services/reports.service';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {\r\n DateHelperService,\r\n DOMService,\r\n PWADetectorService,\r\n ScreenService,\r\n UrlProviderService,\r\n} from '../../../../../shared/services/general';\r\nimport { LabSettingsService } from '../../../../../shared/services/ocl';\r\nimport { FileUtils } from '../../../../../shared/utils';\r\nimport {PatientSearchWithoutCollections} from '../../../../shared/models/order-entry/patient';\r\nimport { OrdersService } from '../../../../shared/services/orders.service';\r\nimport { Order, OrderStatus } from '../../models/order';\r\nimport {Document} from \"../../../../shared/models/common/document\";\r\nimport {SignatureRepresentation} from \"../../../requisitions/components/signature-dialog/signature-dialog.component\";\r\nimport {MultipleOrdersSignature, MultipleRequisitionsSignature} from \"../../../../shared/models/signature\";\r\nimport {RegistrationRequest} from \"../../../../../shared/models/fusion-auth\";\r\nimport {environment} from \"../../../../../../environments/environment\";\r\nimport {CREATED} from \"http-status-codes\";\r\nimport {DxButtonComponent} from \"devextreme-angular\";\r\n\r\n@Component({\r\n selector: 'app-order-results',\r\n templateUrl: './order-results.component.html',\r\n styleUrls: ['./order-results.component.scss'],\r\n})\r\nexport class OrderResultsComponent implements OnInit, OnDestroy {\r\n @ViewChild('unsignBtn', {static: false}) public unsignBtn?: DxButtonComponent;\r\n @ViewChild('signBtn', {static: false}) public signBtn?: DxButtonComponent;\r\n public isLoading = false;\r\n public docs: Document[] = [];\r\n public order = new Order();\r\n public abnormalLabel = '';\r\n public reportCommentFormControl = new UntypedFormControl();\r\n public electronicSignaturePopupVisible = false;\r\n public electronicSignatureUnsignPopupVisible = false;\r\n public clinicalResultsVisible = false;\r\n public toxicologyResultsVisible = false;\r\n public microbiologyResultsVisible = false;\r\n public pathologyResultsVisible = false;\r\n public selectedTab = -1;\r\n public orderId: number | null = -1;\r\n public isUploading = false;\r\n public emailFaxVisible = false;\r\n public type: string = '';\r\n public hasToxicologyUnexpectedPositive = false;\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n private onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private domService: DOMService,\r\n public fusionAuthService: FusionAuthService,\r\n public ordersService: OrdersService,\r\n public labSettingsService: LabSettingsService,\r\n public router: Router,\r\n private pwaDetectorService: PWADetectorService,\r\n private fusionAuthManagement: FusionAuthManagementService,\r\n private urlProviderService: UrlProviderService,\r\n private sanitizer: DomSanitizer,\r\n public route: ActivatedRoute,\r\n private reportsService: ReportsService,\r\n public dateHelper: DateHelperService,\r\n private screen: ScreenService,\r\n private renderer: Renderer2,\r\n ) {\r\n this.onFileChanged = this.onFileChanged.bind(this);\r\n }\r\n\r\n public openSignDialog() {\r\n this.electronicSignaturePopupVisible = true;\r\n }\r\n\r\n public openUnsignDialog() {\r\n this.electronicSignatureUnsignPopupVisible = true;\r\n }\r\n\r\n public unsignDialogClosed(reset: any) {\r\n if (reset) {\r\n if (this.orderId) {\r\n this.ordersService.unsign(this.orderId)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n if(this.signBtn?.disabled && this.unsignBtn?.disabled) {\r\n this.signBtn.disabled = false;\r\n this.unsignBtn.disabled = true;\r\n }\r\n this.electronicSignatureUnsignPopupVisible = false;\r\n notify('Order Unsigned!', 'success');\r\n this.order.hasSignature = false;\r\n });\r\n }\r\n }\r\n this.electronicSignatureUnsignPopupVisible = false;\r\n }\r\n\r\n public signDialogClosed(signatureDialogResponse: SignatureRepresentation) {\r\n if (signatureDialogResponse) {\r\n const signature = new MultipleOrdersSignature();\r\n signature.image = signatureDialogResponse.image;\r\n signature.username = signatureDialogResponse.username;\r\n signature.ordersIds = [this.orderId as number];\r\n const user = this.fusionAuthService.Profile;\r\n user.data = {\r\n signImage: signatureDialogResponse.image,\r\n clients: user.data !== undefined ? user.data.clients : [],\r\n patients: user.data !== undefined ? user.data.patients : [],\r\n physicians: user.data !== undefined ? user.data.physicians : [],\r\n };\r\n const request: RegistrationRequest = {\r\n user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [user.role],\r\n username: user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.fusionAuthManagement\r\n .updateUser(user.id, request)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === CREATED) {\r\n if (this.signBtn?.disabled && this.unsignBtn?.disabled) {\r\n this.signBtn.disabled = true;\r\n this.unsignBtn.disabled = false;\r\n }\r\n\r\n this.ordersService.signOrders(signature)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.fusionAuthService.SignatureImage = signatureDialogResponse.image;\r\n const sign = {\r\n signature: {\r\n imageSignature: signatureDialogResponse.image,\r\n userName: signatureDialogResponse.username,\r\n signedDateTime: Date.now(),\r\n },\r\n };\r\n\r\n notify('Order Signed!', 'success');\r\n this.order.hasSignature = true;\r\n });\r\n }\r\n });\r\n }\r\n this.electronicSignaturePopupVisible = false;\r\n }\r\n\r\n public get Status() {\r\n let color;\r\n let status = OrderStatus[OrderStatus.None];\r\n switch (this.order.status) {\r\n case OrderStatus.Canceled:\r\n color = 'ocl-status-black';\r\n status = OrderStatus[OrderStatus.Canceled];\r\n break;\r\n case OrderStatus.Final:\r\n color = 'ocl-status-green';\r\n status = OrderStatus[OrderStatus.Final];\r\n break;\r\n case OrderStatus.Partial:\r\n case OrderStatus.PartiallyReleased:\r\n case OrderStatus.Preliminary:\r\n color = 'ocl-status-orange';\r\n status = OrderStatus[OrderStatus.Partial];\r\n break;\r\n case OrderStatus.Pending:\r\n case OrderStatus.Unreleased:\r\n color = 'ocl-status-yellow';\r\n status = OrderStatus[OrderStatus.Pending];\r\n break;\r\n }\r\n\r\n let alert = `
\r\n
\r\n ${status.toUpperCase()}
`;\r\n\r\n if (this.order.hasAlert) {\r\n if (this.order.hasToxicologyUnexpectedPositive) {\r\n alert += `
\r\n ${this.abnormalLabel !== undefined && this.abnormalLabel !== null && this.abnormalLabel !== '' ?\r\n this.abnormalLabel.toUpperCase() :\r\n this.order.alert?.toUpperCase()}
`;\r\n }\r\n if (this.order.alert?.toUpperCase() === 'CRITICAL') {\r\n alert += `
${this.order.alert}
`;\r\n }\r\n }\r\n alert += `
`;\r\n return this.sanitizer.bypassSecurityTrustHtml(alert);\r\n }\r\n\r\n public ngOnInit(): void {\r\n const request = this.route.paramMap.pipe(\r\n switchMap(params => {\r\n if (params.get('id')) {\r\n this.isLoading = true;\r\n //@ts-ignore\r\n this.orderId = +params.get('id');\r\n\r\n this.getResults();\r\n\r\n return this.ordersService.getOder(this.orderId);\r\n } else {\r\n return of(null);\r\n }\r\n }),\r\n );\r\n\r\n request\r\n .pipe(take(1))\r\n .subscribe((order: any) => {\r\n this.isLoading = false;\r\n this.order = order;\r\n\r\n if (order) {\r\n this.ordersService.getOderDocuments(order.id).pipe(take(1)).subscribe(docs => this.docs = docs);\r\n this.reportCommentFormControl.setValue(this.order.reportComment);\r\n }\r\n });\r\n\r\n this.labSettingsService.getToxicologySettings().pipe(take(1)).subscribe(s => {\r\n this.abnormalLabel = s.abnormalResult;\r\n });\r\n\r\n this.responsiveValues();\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.responsiveValues();\r\n });\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const shader = this.domService.getElementsByClassname('dx-overlay-shader').item(0) as HTMLElement;\r\n if (shader) {\r\n const button = shader.querySelector('.dx-fa-button-icon-close') as HTMLElement;\r\n if (button) {\r\n button.click();\r\n }\r\n }\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public get CancellationReasons() {\r\n if (!this.order) { return ''; }\r\n if (!this.order.cancellationReasons) { return ''; }\r\n return this.order ? this.order.cancellationReasons.map(c => c.name).join(', ') : '';\r\n }\r\n\r\n public get OrderPatient() {\r\n if (!this.order) { return new PatientSearchWithoutCollections(); }\r\n if (!this.order.patient) { return new PatientSearchWithoutCollections(); }\r\n return this.order.patient ? this.order.patient : new PatientSearchWithoutCollections();\r\n }\r\n\r\n public get OrderPhysician() {\r\n if (!this.order) {\r\n return new Physician();\r\n }\r\n if (!this.order.physician) {\r\n return new Physician();\r\n }\r\n return this.order.physician ? this.order.physician : new Physician();\r\n }\r\n\r\n public documentClick(name: string) {\r\n this.isLoading = true;\r\n if (this.orderId) {\r\n this.ordersService.downloadOrderDocuments(this.orderId, name)\r\n .pipe(\r\n take(1)\r\n )\r\n .subscribe((blob) => {\r\n if (!blob || blob?.size === 0) {\r\n notify('The document you are trying to open is not available now, please try again later.', 'warning');\r\n this.isLoading = false;\r\n } else {\r\n FileUtils.pdfRequestHandler(blob, this)\r\n }\r\n });\r\n }\r\n }\r\n\r\n public documentRemove(id: number) {\r\n const dialog = custom({\r\n title: 'Delete Document',\r\n messageHtml: 'Are you sure you want to remove the document from the order?',\r\n buttons: [{\r\n text: 'Yes',\r\n onClick: (e) => {\r\n return e.component.option('text');\r\n }\r\n }, {\r\n text: 'No',\r\n onClick: (e) => {\r\n return e.component.option('text');\r\n }\r\n }]});\r\n\r\n dialog.show().then((dialogResult: any) => {\r\n if (dialogResult === 'Yes') {\r\n this.isLoading = true;\r\n if (this.orderId) {\r\n this.ordersService.removeOrderDocument(this.orderId, id)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.ordersService.getOderDocuments(this.orderId ? this.orderId : -1).pipe(take(1)).subscribe(docs => this.docs = docs);\r\n dialog.hide();\r\n });\r\n }\r\n } else {\r\n dialog.hide();\r\n }\r\n });\r\n\r\n }\r\n\r\n public printResults() {\r\n this.isLoading = true;\r\n if (this.orderId)\r\n this.reportsService.generateOrderResults([this.orderId])\r\n .pipe(take(1))\r\n .subscribe((blob) => FileUtils.pdfRequestHandler(blob, this));\r\n }\r\n\r\n public onFileChanged(event: Event) {\r\n const response = FileUtils.validateFile(event as InputEvent, this);\r\n if (typeof response !== 'boolean') {\r\n response.then(fileString => {\r\n // @ts-ignore\r\n this.ordersService.uploadDocument(this.orderId, fileString, (event.target as HTMLInputElement).files[0].name)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.isUploading = false;\r\n this.isLoading = false;\r\n if (res && res.id && this.orderId) {\r\n notify('File uploaded successfully', 'success');\r\n this.ordersService.getOderDocuments(this.orderId).pipe(take(1)).subscribe(docs => this.docs = docs);\r\n }\r\n\r\n }, () => {\r\n notify('There was an error uploading your file', 'error');\r\n });\r\n });\r\n }\r\n }\r\n\r\n public async openCumulativeResults() {\r\n if (this.pwaDetectorService.isPWA()) {\r\n await this.router.navigate(['/secured/results/cumulative', { id: this.orderId }]);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/results/cumulative', { id: this.orderId }]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n public openEmailFax(type: string) {\r\n this.type = type;\r\n this.emailFaxVisible = true;\r\n }\r\n\r\n public get Patient() {\r\n if (!this.order) return new PatientSearchWithoutCollections();\r\n if (!this.order.patient) return new PatientSearchWithoutCollections();\r\n return this.order.patient;\r\n }\r\n\r\n public viewerReady(element: any) {\r\n this.renderer.removeClass(element.element, 'dx-state-disabled');\r\n }\r\n\r\n public transformHtml(htmlTextWithStyle: string) {\r\n return this.sanitizer.bypassSecurityTrustHtml(htmlTextWithStyle);\r\n }\r\n\r\n public hasToxicologyUnexpectedPositiveResults(hasResults: boolean) {\r\n this.hasToxicologyUnexpectedPositive = hasResults;\r\n }\r\n\r\n public get IsCancelled() {\r\n return this.order ? this.order.status === OrderStatus.Canceled : false;\r\n }\r\n\r\n public onToolbarReady(e: any) {\r\n if (this.isPhone) {\r\n const items = e.element.querySelector('.dx-toolbar-before').children as HTMLCollection[];\r\n if (items[1]) {\r\n this.renderer.setStyle(items[1], 'vertical-align', 'baseline');\r\n this.renderer.setStyle(items[1], 'padding-top', '25px');\r\n }\r\n }\r\n }\r\n\r\n public get CollectionSites() {\r\n return this.order.collectionSites ? this.order.collectionSites.map(cs => cs.name).join(', ') : '';\r\n }\r\n\r\n public get Physician() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.physician) {\r\n return '';\r\n }\r\n return this.order.physician.lastName ? `${this.order.physician.lastName}, ${this.order.physician.firstName}` : '';\r\n }\r\n\r\n public get PatientPrimaryPhysician() {\r\n if (!this.order) { return ''; }\r\n if (!this.order.patient) {\r\n return '';\r\n }\r\n return this.order.patient.primaryPhysician ? `${this.order.patient.primaryPhysician.lastName},\r\n ${this.order.patient.primaryPhysician.firstName}` : '';\r\n }\r\n\r\n public get PatientAddress() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) {\r\n return '';\r\n }\r\n if (!this.order.patient.zipCode) {\r\n return this.order.patient.address ? this.order.patient.address : '';\r\n }\r\n return `${this.order.patient.address}, ${this.order.patient.zipCode.city},\r\n ${this.order.patient.zipCode.state} ${this.order.patient.zipCode ? this.order.patient.zipCode.code : ''}`;\r\n }\r\n\r\n public get PatientCode() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n return this.order.patient ? this.order.patient.code : '';\r\n }\r\n\r\n public get Room() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) { return ''; }\r\n return this.order.patient.room ? this.order.patient.room.name : '';\r\n }\r\n\r\n public get Client() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) { return ''; }\r\n return this.order.patient.client ? this.order.patient.client.name : '';\r\n }\r\n\r\n public get PatientFullName() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) { return ''; }\r\n return `${this.order.patient.firstName} ${this.order.patient.middleName ? this.order.patient.middleName : ''}\r\n ${this.order.patient.lastName}`;\r\n }\r\n\r\n public get DOB() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) { return ''; }\r\n return this.order.patient.birthDate ?\r\n `(${this.dateHelper.dateWithFormatWithoutUtc(this.order.patient.birthDate as Date, 'LL')})` : '';\r\n }\r\n\r\n public get Gender() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) { return ''; }\r\n return this.order.patient.gender;\r\n }\r\n\r\n public get Unit() {\r\n if (!this.order) {\r\n return '';\r\n }\r\n if (!this.order.patient) { return ''; }\r\n if (!this.order.patient.unit) { return ''; }\r\n return this.order.patient.unit.name;\r\n }\r\n\r\n public get CollectionDate() {\r\n if (!this.order.collectionDate) return '';\r\n return this.dateHelper.dateWithFormatWithoutUtc(this.order.collectionDate, 'MM/DD/YYYY hh:mm a');\r\n }\r\n\r\n public get ReceivedDate() {\r\n if (!this.order.receivedDate) return '';\r\n return this.dateHelper.dateWithFormatWithoutUtc(this.order.receivedDate, 'MM/DD/YYYY hh:mm a');\r\n }\r\n\r\n public get ReportedDate() {\r\n if (!this.order.reported) return '';\r\n return this.dateHelper.dateWithFormat(this.order.reported, 'MM/DD/YYYY hh:mm a');\r\n }\r\n\r\n public get IsLoading() {\r\n return this.isLoading;\r\n }\r\n\r\n public set IsLoading(loading) {\r\n this.isLoading = loading;\r\n }\r\n\r\n public onButtonReady(e: any) {\r\n if (e.actionElement && e.actionElement.length > 0) {\r\n const parent = e.actionElement[0];\r\n const labelButtons = parent.querySelector('.dx-overlay-content');\r\n if (labelButtons !== undefined) {\r\n this.renderer.setStyle(labelButtons, 'overflow', 'visible');\r\n }\r\n }\r\n }\r\n\r\n private getResults() {\r\n if(this.orderId)\r\n this.ordersService\r\n .getOrderTestsTypes(this.orderId)\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n this.clinicalResultsVisible = response.hasClinicalResult;\r\n this.microbiologyResultsVisible = response.hasMicrobiologyResult;\r\n this.toxicologyResultsVisible = response.hasToxicologyResult;\r\n this.pathologyResultsVisible = response.hasPathologyResult;\r\n if (!this.clinicalResultsVisible && !this.microbiologyResultsVisible && !this.toxicologyResultsVisible && !this.pathologyResultsVisible) {\r\n alert('There is no result to display.', 'No results').then();\r\n } else {\r\n this.selectedTab = this.clinicalResultsVisible\r\n ? 0\r\n : this.toxicologyResultsVisible\r\n ? 2\r\n : this.microbiologyResultsVisible\r\n ? 1\r\n : this.pathologyResultsVisible\r\n ? 3\r\n : -1;\r\n }\r\n });\r\n }\r\n\r\n public get ClientAddress() {\r\n if (!this.order.patientClient) {\r\n return '';\r\n }\r\n if (!this.order.patientClient.zipCode) {\r\n return this.order.patientClient.address ? this.order.patientClient.address : '';\r\n }\r\n return `${this.order.patientClient.address}, ${this.order.patientClient.zipCode.city},\r\n ${this.order.patientClient.zipCode.state} ${this.order.patientClient.zipCode ? this.order.patientClient.zipCode.code : ''}`;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n
{{ patient.data.lastName }}, {{ patient.data.firstName }}
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n DOB: {{ patient.data.birthDate !== null ? dateHelper.dateWithFormatWithoutUtc(patient.data.birthDate, \"MM/DD/YYYY hh:mm a\") : ''}}
\r\n SSN: {{ patient.data.ssn }}\r\n
\r\n
\r\n Showing only active standing orders\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, Renderer2 } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport config from 'devextreme/core/config';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport notify from 'devextreme/ui/notify';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { DateHelperService, PWADetectorService, ScreenService } from '../../../../../shared/services/general';\r\nimport { StandingOrderService } from '../../../../../shared/services/ocl';\r\n\r\n@Component({\r\n selector: 'app-standing-order-search-content',\r\n templateUrl: './standing-order-search-content.component.html',\r\n styleUrls: ['./standing-order-search-content.component.scss'],\r\n})\r\nexport class StandingOrderSearchContentComponent implements OnInit, OnDestroy {\r\n @Input() public filtersSubmitted: EventEmitter = new EventEmitter();\r\n @Output() public refreshed: EventEmitter = new EventEmitter();\r\n public filters: any;\r\n public patientsStore: CustomStore | [] = [];\r\n public selectedRowKeys: number[] = [];\r\n public role: string;\r\n public isLoading = false;\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private router: Router,\r\n private pwaDetectorService: PWADetectorService, private standingOrderService: StandingOrderService, public dateHelper: DateHelperService,\r\n private fusionAuthService: FusionAuthService, private screen: ScreenService, private renderer: Renderer2) {\r\n this.role = fusionAuthService.Profile.registrations[0].roles[0];\r\n }\r\n\r\n public ngOnInit() {\r\n this.filtersSubmitted.pipe(takeUntil(this.onDestroy$)).subscribe(filters => {\r\n this.filters = filters;\r\n this.setFilters(this.filters);\r\n });\r\n\r\n this.responsiveValues();\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.responsiveValues();\r\n });\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public onButtonReady(e: any) {\r\n const parent = e.actionElement[0];\r\n const labelButtons = parent.querySelector('.dx-overlay-content');\r\n if (labelButtons !== undefined) {\r\n this.renderer.setStyle(labelButtons, 'overflow', 'visible');\r\n }\r\n }\r\n\r\n public editPatient(patient: any) {\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['secured/patients/form', {\r\n id: patient.id, redirectToPath: this.router.url,\r\n }]);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['secured/patients/form', {\r\n id: patient.id,\r\n redirectToPath: this.router.url,\r\n }]),\r\n );\r\n window.open(url, '_blank');\r\n window.close();\r\n }\r\n }\r\n\r\n public newStandingOrder(patientId?: number) {\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['secured/standing-orders/form'], {\r\n queryParams: { patientId },\r\n });\r\n } else {\r\n let url: string;\r\n if (patientId) {\r\n url = this.router.serializeUrl(\r\n this.router.createUrlTree(['secured/standing-orders/form', {\r\n patientId,\r\n }]),\r\n );\r\n } else {\r\n url = this.router.serializeUrl(\r\n this.router.createUrlTree(['secured/standing-orders/form']),\r\n );\r\n }\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n public editStandingOrder(id: number) {\r\n if (this.pwaDetectorService.isPWA()) {\r\n this.router.navigate(['secured/standing-orders/form'], {\r\n queryParams: { id },\r\n });\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['secured/standing-orders/form', {\r\n id,\r\n }]),\r\n );\r\n window.open(url, '_blank');\r\n }\r\n }\r\n\r\n public cancelStandingOrder(ids: number[]) {\r\n this.isLoading = true;\r\n this.standingOrderService.cancel(ids).pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isLoading = false;\r\n notify('The selected Standing Order(s) has been cancelled', 'success', 3000);\r\n this.setFilters(this.filters);\r\n });\r\n }\r\n\r\n public setFilters(filters: any) {\r\n const user = this.fusionAuthService.Profile;\r\n switch (this.role) {\r\n case 'Client Admin':\r\n case 'Client Basic':\r\n const clientIds = user ? user.data.clients : this.fusionAuthService.Profile.data.clients;\r\n this.patientsStore = this.standingOrderService.getExtremeStore(filters, clientIds);\r\n break;\r\n default:\r\n this.patientsStore = this.standingOrderService.getExtremeStore(filters);\r\n }\r\n }\r\n\r\n public onRowExpanding(event: any) {\r\n if (this.isPhoneOrTablet) {\r\n event.component.collapseAll(-1);\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next(); this.onDestroy$.complete()\r\n }\r\n}\r\n","\r\n
\r\n

The standing order was {{mode === 'create' ? 'created' : 'updated'}} successfully, what do you like to do next?

\r\n

The standing order was {{mode === 'create' ? 'created' : 'updated'}}

\r\n

successfully, what do you like to do next?

\r\n
\r\n

New Standing Order Same Patient

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

New Standing Order Different Patient

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

Standing Order Search

\r\n \r\n
\r\n
\r\n\r\n\r\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { PWADetectorService, ScreenService } from '../../../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-standing-order-done-dialog',\r\n templateUrl: './standing-order-done-dialog.component.html',\r\n styleUrls: ['./standing-order-done-dialog.component.scss'],\r\n})\r\nexport class StandingOrderDoneDialogComponent implements OnInit, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Input() public patientId: number = -1;\r\n @Input() public mode: 'create' | 'update' = 'create';\r\n public isPhone: boolean = true;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private router: Router,\r\n private pwaDetectorService: PWADetectorService,\r\n private screen: ScreenService ) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n });\r\n }\r\n\r\n public async redirectToNew() {\r\n if (this.pwaDetectorService.isPWA()) {\r\n await this.router.navigate(['/secured/standing-orders/form']);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/standing-orders/form']),\r\n );\r\n window.open(url, '_self');\r\n }\r\n }\r\n\r\n public async redirectToNewWithPatient() {\r\n if (this.pwaDetectorService.isPWA()) {\r\n await this.router.navigate(['/secured/standing-orders/form', {\r\n patientId: this.patientId\r\n }]);\r\n } else {\r\n const url = this.router.serializeUrl(\r\n this.router.createUrlTree(['/secured/standing-orders/form', {\r\n patientId: this.patientId\r\n }]),\r\n );\r\n window.open(url, '_self');\r\n }\r\n }\r\n\r\n public async redirectToSearch() {\r\n await this.router.navigateByUrl('/secured/standing-orders/search');\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next(); this.onDestroy$.complete()\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n

New Standing Order

\r\n

Edit Standing Order

\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Test Selection\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n

Scheduler

\r\n
\r\n
\r\n
\r\n
\r\n
Repeat
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Repeat Every
\r\n
\r\n
\r\n \r\n \r\n
\r\n
{{ repeatType }}
\r\n
\r\n
\r\n
\r\n
On
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
On Days of Week
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
On Days of Month
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
End Repeat
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ data }} \r\n
\r\n
\r\n
\r\n
\r\n {{ data }} \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
ocurrence(s)
\r\n
\r\n
\r\n
\r\n
\r\n {{ 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
Start Date
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
Generate in Advance
\r\n
\r\n
\r\n \r\n \r\n
\r\n
{{ standingOrderForm.get('type')?.value === 'Minute' ? 'hour(s)' : repeatType }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Component, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';\r\nimport {AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup} from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { DxDropDownBoxComponent } from 'devextreme-angular';\r\nimport { DxDataGridComponent } from 'devextreme-angular';\r\nimport ArrayStore from 'devextreme/data/array_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { dxDataGridColumn } from 'devextreme/ui/data_grid';\r\nimport notify from 'devextreme/ui/notify';\r\nimport { BehaviorSubject, Subject } from 'rxjs';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\nimport { DOMService, PWADetectorService, ScreenService } from '../../../../../shared/services/general';\r\nimport { StandingOrderService } from '../../../../../shared/services/ocl';\r\nimport { Diagnosis } from '../../../../shared/models/common';\r\nimport { DiagnosisService, PatientService } from '../../../../shared/services';\r\nimport { TestService } from '../../../../shared/services/test.service';\r\nimport {DiagnosisViewModel} from \"../../../../../shared/models/ocl\";\r\n\r\n@Component({\r\n selector: 'app-standing-order-form',\r\n templateUrl: './standing-order-form.component.html',\r\n styleUrls: ['./standing-order-form.component.scss'],\r\n})\r\nexport class StandingOrderFormComponent implements OnInit, OnDestroy {\r\n @ViewChild('dropDownGrid', { static: false }) public dropDownGrid?: DxDataGridComponent;\r\n @ViewChild('testDropdown', { static: false }) public testDropdown?: DxDropDownBoxComponent;\r\n public standingOrderForm: UntypedFormGroup;\r\n public isLoading = false;\r\n public standingOrderDoneVisible = false;\r\n public mode: \"create\" | \"update\" = 'create';\r\n public standingOrderId?: number;\r\n public schedulerId?: number;\r\n // @ts-ignore\r\n public pickerDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public selectedDiagnosisOnlyForEdit: DiagnosisViewModel[] | undefined = [];\r\n // @ts-ignore\r\n public diagnosisDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public alternateDiagnosisDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public repeatType: string = '';\r\n public repeatDataSource: any;\r\n public repeatOnMonthlyByDateDataSource: number[] = [];\r\n public initialValueGenerateInAdvance: number = -1;\r\n public pickerSelectedTestsKey: number[] = [];\r\n public repeatTypeSelected: string = '';\r\n public dayOfWeek: any[] = [];\r\n public repeatOnMonthlyByDateSelected: number[] = [];\r\n public repeatOnMonthlyByDateSelectedEdit: number[] = [];\r\n public startDate: Date | number | string = Date.now();\r\n public endDate: Date | number | string = Date.now();\r\n public isPhone: boolean = false;\r\n public isTablet: boolean = false;\r\n public isPhoneLandscape: boolean = false;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n private testName: string = '';\r\n\r\n public diagnosesFormRelationColumns: Array = [\r\n {\r\n dataField: 'code',\r\n width: 100,\r\n caption: 'Code',\r\n allowFiltering: true,\r\n allowSorting: true,\r\n allowResizing: true,\r\n } as dxDataGridColumn,\r\n {\r\n dataField: 'shortName',\r\n caption: 'Name',\r\n allowFiltering: true,\r\n allowSorting: true,\r\n allowResizing: true,\r\n } as dxDataGridColumn,\r\n ];\r\n\r\n constructor(private fb: UntypedFormBuilder,\r\n private domService: DOMService,\r\n private testService: TestService,\r\n private pwaDetectorService: PWADetectorService,\r\n public diagnosisService: DiagnosisService,\r\n public standingOrderService: StandingOrderService,\r\n private patientService: PatientService,\r\n public route: ActivatedRoute,\r\n private renderer: Renderer2,\r\n private screen: ScreenService\r\n ) {\r\n this.standingOrderForm = this.fb.group({\r\n id: [null],\r\n patient: [null],\r\n physician: [null],\r\n testIds: [null],\r\n comments: [null],\r\n diagnoses: [null],\r\n type: [null],\r\n repeatEvery: [1],\r\n generateInAdvance: [null],\r\n repeatOnMonthlyByDay: [null],\r\n endType: 'Never',\r\n after: [1],\r\n startDate: [(new Date()).toISOString()],\r\n endDate: [null],\r\n });\r\n\r\n this.displayTestExpresion = this.displayTestExpresion.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n this.diagnosisDataSource.next(new DataSource({ store: this.diagnosisService.customStore(this.diagnosisDataSource) }));\r\n this.repeatOnMonthlyByDateDataSource = Array.from({ length: 31 }, (_, i) => i + 1);\r\n this.repeatDataSource = new ArrayStore({\r\n data: [{\r\n key: 'Minute',\r\n text: 'By Minutes'\r\n }, {\r\n key: 'Hour',\r\n text: 'Hourly',\r\n }, {\r\n key: 'Day',\r\n text: 'Daily'\r\n }, {\r\n key: 'Week',\r\n text: 'Weekly'\r\n }, {\r\n key: 'MonthlyByDay',\r\n text: 'Monthly by Day'\r\n }, {\r\n key: 'MonthlyByDate',\r\n text: 'Monthly by Date'\r\n }],\r\n key: 'key'\r\n });\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.isTablet = this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isTablet = this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.resizePickerDropDown();\r\n });\r\n\r\n this.standingOrderForm.get('patient')?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(x => {\r\n this.pickerDataSource.next(new DataSource({\r\n store: this.testService.customStore(this.pickerDataSource, x.clientId, false, undefined)\r\n }));\r\n this.alternateDiagnosisDataSource.next(new DataSource({\r\n store:\r\n this.diagnosisService.customStoreFilteredByPatientId(x.id, this.alternateDiagnosisDataSource),\r\n }));\r\n });\r\n\r\n this.standingOrderId = this.pwaDetectorService.isPWA() ? (this.route.queryParams as any).value.id ?\r\n // tslint:disable-next-line:radix\r\n parseInt((this.route.queryParams as any).value.id as string) : undefined :\r\n // tslint:disable-next-line:radix\r\n this.route.snapshot.paramMap.get('id') ? parseInt(this.route.snapshot.paramMap.get('id') as string) : undefined;\r\n if (this.standingOrderId) {\r\n this.isLoading = true;\r\n\r\n this.standingOrderService.getStandingOrder(this.standingOrderId)\r\n .pipe(take(1))\r\n // tslint:disable-next-line:cyclomatic-complexity\r\n .subscribe(standingOrder => {\r\n this.standingOrderForm.get('id')?.setValue(standingOrder.id);\r\n this.patientService.getPatient(standingOrder.patientId)\r\n .pipe(take(1))\r\n .subscribe(patient => this.standingOrderForm.get('patient')?.setValue(patient));\r\n this.standingOrderForm.get('physician')?.setValue(standingOrder.physician);\r\n this.pickerSelectedTestsKey.push(standingOrder.testId);\r\n this.testName = standingOrder.test;\r\n this.standingOrderForm.get('comments')?.setValue(standingOrder.requisitionComments);\r\n this.standingOrderForm.get('diagnoses')?.setValue(standingOrder.diagnosesIds);\r\n this.selectedDiagnosisOnlyForEdit = standingOrder.diagnoses;\r\n this.standingOrderForm.get('type')?.setValue(standingOrder.scheduler.isMinute ? 'Minute' : standingOrder.scheduler.type);\r\n this.standingOrderForm.get('startDate')?.setValue(standingOrder.scheduler.startDate);\r\n this.startDate = new Date(this.standingOrderForm.get('startDate')?.value);\r\n this.standingOrderForm.get('repeatEvery')?.setValue(standingOrder.scheduler.repeat);\r\n this.standingOrderForm.get('generateInAdvance')?.setValue(standingOrder.scheduler.beforeNotificationValue);\r\n this.schedulerId = standingOrder.scheduler.id;\r\n\r\n if (this.standingOrderForm.get('type')?.value === 'Week' || this.standingOrderForm.get('type')?.value === 'MonthlyByDay') {\r\n if (standingOrder.scheduler.sunday) { this.dayOfWeek.push({text: 'Sun'}); }\r\n if (standingOrder.scheduler.monday) { this.dayOfWeek.push({text: 'Mon'}); }\r\n if (standingOrder.scheduler.tuesday) { this.dayOfWeek.push({text: 'Tue'}); }\r\n if (standingOrder.scheduler.wednesday) { this.dayOfWeek.push({text: 'Wed'}); }\r\n if (standingOrder.scheduler.thursday) { this.dayOfWeek.push({text: 'Thu'}); }\r\n if (standingOrder.scheduler.friday) { this.dayOfWeek.push({text: 'Fri'}); }\r\n if (standingOrder.scheduler.saturday) { this.dayOfWeek.push({text: 'Sat'}); }\r\n }\r\n\r\n if (this.standingOrderForm.get('type')?.value === 'MonthlyByDay') {\r\n if (standingOrder.scheduler.first) { this.standingOrderForm.get('repeatOnMonthlyByDay')?.setValue('First'); }\r\n if (standingOrder.scheduler.second) { this.standingOrderForm.get('repeatOnMonthlyByDay')?.setValue('Second'); }\r\n if (standingOrder.scheduler.third) { this.standingOrderForm.get('repeatOnMonthlyByDay')?.setValue('Third'); }\r\n if (standingOrder.scheduler.fourth) { this.standingOrderForm.get('repeatOnMonthlyByDay')?.setValue('Fourth'); }\r\n if (standingOrder.scheduler.last) { this.standingOrderForm.get('repeatOnMonthlyByDay')?.setValue('Last'); }\r\n }\r\n\r\n if (this.standingOrderForm.get('type')?.value === 'MonthlyByDate') {\r\n const days = [];\r\n if (standingOrder.scheduler.c1) { days.push(1); }\r\n if (standingOrder.scheduler.c2) { days.push(2); }\r\n if (standingOrder.scheduler.c3) { days.push(3); }\r\n if (standingOrder.scheduler.c4) { days.push(4); }\r\n if (standingOrder.scheduler.c5) { days.push(5); }\r\n if (standingOrder.scheduler.c6) { days.push(6); }\r\n if (standingOrder.scheduler.c7) { days.push(7); }\r\n if (standingOrder.scheduler.c8) { days.push(8); }\r\n if (standingOrder.scheduler.c9) { days.push(9); }\r\n if (standingOrder.scheduler.c10) { days.push(10); }\r\n if (standingOrder.scheduler.c11) { days.push(11); }\r\n if (standingOrder.scheduler.c12) { days.push(12); }\r\n if (standingOrder.scheduler.c13) { days.push(13); }\r\n if (standingOrder.scheduler.c14) { days.push(14); }\r\n if (standingOrder.scheduler.c15) { days.push(15); }\r\n if (standingOrder.scheduler.c16) { days.push(16); }\r\n if (standingOrder.scheduler.c17) { days.push(17); }\r\n if (standingOrder.scheduler.c18) { days.push(18); }\r\n if (standingOrder.scheduler.c19) { days.push(19); }\r\n if (standingOrder.scheduler.c20) { days.push(20); }\r\n if (standingOrder.scheduler.c21) { days.push(21); }\r\n if (standingOrder.scheduler.c22) { days.push(22); }\r\n if (standingOrder.scheduler.c23) { days.push(23); }\r\n if (standingOrder.scheduler.c24) { days.push(24); }\r\n if (standingOrder.scheduler.c25) { days.push(25); }\r\n if (standingOrder.scheduler.c26) { days.push(26); }\r\n if (standingOrder.scheduler.c27) { days.push(27); }\r\n if (standingOrder.scheduler.c28) { days.push(28); }\r\n if (standingOrder.scheduler.c29) { days.push(29); }\r\n if (standingOrder.scheduler.c30) { days.push(30); }\r\n if (standingOrder.scheduler.c31) { days.push(31); }\r\n\r\n this.repeatOnMonthlyByDateSelectedEdit = days;\r\n }\r\n\r\n switch (standingOrder.scheduler.endType) {\r\n case 0:\r\n this.standingOrderForm.get('endType')?.setValue('Never');\r\n break;\r\n case 1:\r\n this.standingOrderForm.get('endType')?.setValue('After');\r\n this.standingOrderForm.get('after')?.setValue(standingOrder.scheduler.after);\r\n break;\r\n case 2:\r\n this.standingOrderForm.get('endType')?.setValue('On');\r\n this.standingOrderForm.get('endDate')?.setValue(standingOrder.scheduler.endDate);\r\n this.endDate = new Date(this.standingOrderForm.get('endDate')?.value);\r\n break;\r\n }\r\n\r\n this.isLoading = false;\r\n });\r\n } else {\r\n const currentDate = new Date();\r\n currentDate.setHours(0);\r\n currentDate.setMinutes(0);\r\n currentDate.setSeconds(0);\r\n this.standingOrderForm.get('startDate')?.setValue(currentDate);\r\n this.startDate = new Date(currentDate);\r\n }\r\n }\r\n\r\n public canSave(): boolean {\r\n const repeatSelected = this.standingOrderForm.get('type')?.value;\r\n return this.standingOrderForm.get('type')?.value !== null &&\r\n this.pickerDataSource !== undefined && this.pickerSelectedTestsKey !== null && this.pickerSelectedTestsKey.length > 0 &&\r\n repeatSelected !== undefined && repeatSelected !== null && this.standingOrderForm.get('repeatEvery')?.value >= 1 &&\r\n this.standingOrderForm.get('startDate')?.value !== null &&\r\n (repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? this.dayOfWeek.length > 0 : true) &&\r\n (repeatSelected === 'MonthlyByDay' ? this.standingOrderForm.get('repeatOnMonthlyByDay')?.value !== null : true) &&\r\n (repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.length > 0 : true) &&\r\n (this.standingOrderForm.get('endType')?.value === 'After' ? this.standingOrderForm.get('after')?.value > 0 : true) &&\r\n (this.standingOrderForm.get('endType')?.value === 'On' ? this.standingOrderForm.get('endDate')?.value !== null &&\r\n new Date(this.standingOrderForm.get('startDate')?.value) <= new Date(this.standingOrderForm.get('endDate')?.value) : true);\r\n }\r\n\r\n // tslint:disable-next-line:cyclomatic-complexity\r\n public submit() {\r\n this.isLoading = true;\r\n const dayOfWeekSelected = this.dayOfWeek.map(x => x.text);\r\n const repeatSelected = this.standingOrderForm.get('type')?.value;\r\n const standingOrder = {\r\n id: this.standingOrderId,\r\n patientId: this.standingOrderForm.get('patient')?.value.id,\r\n physicianId: this.standingOrderForm.get('physician')?.value ? this.standingOrderForm.get('physician')?.value.id : null,\r\n testId: this.pickerSelectedTestsKey[0],\r\n test: this.testName,\r\n diagnosesIds: this.standingOrderForm.get('diagnoses')?.value,\r\n requisitionComments: this.standingOrderForm.get('comments')?.value,\r\n scheduler: {\r\n id: this.schedulerId,\r\n startDate: new Date(this.standingOrderForm.get('startDate')?.value),\r\n type: repeatSelected === 'Minute' ? 'Hour' : repeatSelected,\r\n repeat: this.standingOrderForm.get('repeatEvery')?.value,\r\n beforeNotificationValue: this.standingOrderForm.get('generateInAdvance')?.value,\r\n isMinute: repeatSelected === 'Minute',\r\n sunday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Sun') : null,\r\n monday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Mon') : null,\r\n tuesday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Tue') : null,\r\n wednesday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Wed') : null,\r\n thursday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Thu') : null,\r\n friday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Fri') : null,\r\n saturday: repeatSelected === 'Week' || repeatSelected === 'MonthlyByDay' ? dayOfWeekSelected.includes('Sat') : null,\r\n first: repeatSelected === 'MonthlyByDay' ? this.standingOrderForm.get('repeatOnMonthlyByDay')?.value === 'First' : null,\r\n second: repeatSelected === 'MonthlyByDay' ? this.standingOrderForm.get('repeatOnMonthlyByDay')?.value === 'Second' : null,\r\n third: repeatSelected === 'MonthlyByDay' ? this.standingOrderForm.get('repeatOnMonthlyByDay')?.value === 'Third' : null,\r\n fourth: repeatSelected === 'MonthlyByDay' ? this.standingOrderForm.get('repeatOnMonthlyByDay')?.value === 'Fourth' : null,\r\n last: repeatSelected === 'MonthlyByDay' ? this.standingOrderForm.get('repeatOnMonthlyByDay')?.value === 'Last' : null,\r\n endType: this.standingOrderForm.get('endType')?.value === 'Never' ? 0 : this.standingOrderForm.get('endType')?.value === 'After' ? 1 : 2,\r\n after: this.standingOrderForm.get('endType')?.value === 'After' ? this.standingOrderForm.get('after')?.value : null,\r\n endDate: this.standingOrderForm.get('endType')?.value === 'On' ? (new Date(this.standingOrderForm.get('endDate')?.value)) : null,\r\n c1: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(1) : null,\r\n c2: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(2) : null,\r\n c3: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(3) : null,\r\n c4: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(4) : null,\r\n c5: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(5) : null,\r\n c6: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(6) : null,\r\n c7: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(7) : null,\r\n c8: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(8) : null,\r\n c9: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(9) : null,\r\n c10: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(10) : null,\r\n c11: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(11) : null,\r\n c12: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(12) : null,\r\n c13: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(13) : null,\r\n c14: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(14) : null,\r\n c15: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(15) : null,\r\n c16: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(16) : null,\r\n c17: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(17) : null,\r\n c18: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(18) : null,\r\n c19: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(19) : null,\r\n c20: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(20) : null,\r\n c21: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(21) : null,\r\n c22: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(22) : null,\r\n c23: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(23) : null,\r\n c24: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(24) : null,\r\n c25: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(25) : null,\r\n c26: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(26) : null,\r\n c27: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(27) : null,\r\n c28: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(28) : null,\r\n c29: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(29) : null,\r\n c30: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(30) : null,\r\n c31: repeatSelected === 'MonthlyByDate' ? this.repeatOnMonthlyByDateSelected.includes(31) : null\r\n }\r\n };\r\n\r\n if (this.standingOrderId) {\r\n // @ts-ignore\r\n this.standingOrderService.update(standingOrder).pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n notify('Standing Order Updated!', 'success');\r\n this.isLoading = false;\r\n this.mode = 'update';\r\n this.standingOrderDoneVisible = true;\r\n });\r\n } else {\r\n // @ts-ignore\r\n this.standingOrderService.create(standingOrder).pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n notify('Standing Order Created!', 'success');\r\n this.isLoading = false;\r\n this.standingOrderDoneVisible = true;\r\n });\r\n }\r\n\r\n\r\n }\r\n\r\n public resizePickerDropDown() {\r\n const element = this.domService.getElementsByClassname('dx-overlay-wrapper dx-dropdowneditor-overlay dx-popup-wrapper').item(0) as HTMLElement;\r\n if (element) {\r\n if (this.isTablet || this.isPhoneLandscape) {\r\n this.renderer.setStyle(element, 'width', '300px');\r\n this.renderer.setStyle(element.firstChild, 'width', '300px');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'width', '300px');\r\n } else {\r\n this.renderer.setStyle(element, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'width', '580px');\r\n }\r\n this.renderer.setStyle(element, 'height', '100%');\r\n this.renderer.setStyle(element.firstChild, 'height', '100%');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'height', '100%');\r\n }\r\n\r\n if (this.dropDownGrid !== undefined) {\r\n this.dropDownGrid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public preventDefault(e: any) {\r\n e.preventDefault();\r\n }\r\n\r\n public displayTestExpresion(item: any) {\r\n return item ? item.name : this.testName;\r\n }\r\n\r\n public onRepeatChange(e: any) {\r\n this.repeatTypeSelected = e.selectedItem.text;\r\n switch (e.selectedItem.text) {\r\n case 'By Minutes':\r\n this.repeatType = ' minutes(s)';\r\n this.initialValueGenerateInAdvance = 24;\r\n break;\r\n case 'Hourly':\r\n this.repeatType = ' hour(s)';\r\n this.initialValueGenerateInAdvance = 24;\r\n break;\r\n case 'Daily':\r\n this.repeatType = ' day(s)';\r\n this.initialValueGenerateInAdvance = 30;\r\n break;\r\n case 'Weekly':\r\n this.repeatType = ' week(s)';\r\n this.initialValueGenerateInAdvance = 12;\r\n break;\r\n case 'Monthly by Day':\r\n case 'Monthly by Date':\r\n this.repeatType = ' month(s)';\r\n this.initialValueGenerateInAdvance = 24;\r\n break;\r\n }\r\n }\r\n\r\n public dayOfWeekChange(e: any) {\r\n if (e.addedItems.length > 0) {\r\n this.dayOfWeek.push(e.addedItems[0].text);\r\n } else if (e.removedItems.length > 0) {\r\n const index = this.dayOfWeek.findIndex(x => x === e.removedItems[0].text);\r\n this.dayOfWeek.splice(index, 1);\r\n }\r\n }\r\n\r\n public diagnoseChanged(diagnoses: Diagnosis) {\r\n this.standingOrderForm.get('diagnoses')?.setValue(diagnoses);\r\n }\r\n\r\n public get IsPatientSelected(): boolean {\r\n return this.standingOrderForm.get('patient')?.value !== null;\r\n }\r\n\r\n public convertToFormControl(absCtrl: AbstractControl | null): UntypedFormControl {\r\n return absCtrl as UntypedFormControl;\r\n }\r\n\r\n public endTypeChange(e: any) {\r\n if (e === 'On') {\r\n const currentDate = new Date();\r\n currentDate.setHours(0);\r\n currentDate.setMinutes(0);\r\n currentDate.setSeconds(0);\r\n this.standingOrderForm.get('endDate')?.setValue(currentDate);\r\n this.endDate = new Date(currentDate);\r\n } else {\r\n this.standingOrderForm.get('endDate')?.setValue(null);\r\n this.endDate = Date.now();\r\n }\r\n }\r\n\r\n public startDateChange(e: any) {\r\n this.startDate = new Date(e);\r\n }\r\n\r\n public endDateChange(e: any) {\r\n this.endDate = new Date(e);\r\n }\r\n\r\n public onDateReady(e: any) {\r\n const element = e.element;\r\n if (e.component._pickerType === 'native') {\r\n const button = element.querySelector('.dx-texteditor-buttons-container');\r\n const input = element.querySelector('.dx-texteditor-input');\r\n this.renderer.setStyle(button, 'display', 'none');\r\n this.renderer.setStyle(input, 'padding-right', '5px');\r\n }\r\n }\r\n\r\n public testSelectionChanged() {\r\n this.testDropdown?.instance.close();\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

Standing Orders

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
Tests
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n\r\n \r\n \r\n\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 { AfterViewInit, Component, EventEmitter, OnDestroy, OnInit, Output, Renderer2, ViewChild } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\r\nimport { DxDataGridComponent } from 'devextreme-angular';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { BehaviorSubject, of, Subject } from 'rxjs';\r\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../../../shared/services/fusion-auth';\r\nimport { DOMService, ScreenService } from '../../../../../shared/services/general';\r\nimport { ClientService } from '../../../../shared/services';\r\nimport { TestService } from '../../../../shared/services/test.service';\r\n\r\n@Component({\r\n selector: 'app-standing-order-search',\r\n templateUrl: './standing-order-search.component.html',\r\n styleUrls: ['./standing-order-search.component.scss'],\r\n})\r\nexport class StandingOrderSearchComponent implements OnInit, OnDestroy, AfterViewInit {\r\n @ViewChild('dropDownGrid', { static: false }) public dropDownGrid?: DxDataGridComponent;\r\n @Output() public formSubmitted = new EventEmitter();\r\n public standingOrderSearchForm: UntypedFormGroup;\r\n // @ts-ignore\r\n public pickerDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public unitDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public pickerSelectedTestsKey: number[] = [];\r\n public role: string;\r\n public isPhone: boolean = false;\r\n public isTablet: boolean = false;\r\n public isPhoneLandscape: boolean = false;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private domService: DOMService,\r\n private clientService: ClientService,\r\n private testService: TestService,\r\n private fusionAuthService: FusionAuthService,\r\n private screen: ScreenService,\r\n private renderer: Renderer2,\r\n ) {\r\n this.role = fusionAuthService.Profile.registrations[0].roles[0];\r\n this.standingOrderSearchForm = this.fb.group({\r\n patient: [null],\r\n testIds: [null],\r\n client: [null],\r\n unit: [null],\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n of(null)\r\n .pipe(\r\n take(1),\r\n debounceTime(2000),\r\n )\r\n .subscribe(() => {\r\n this.standingOrderSearchForm.get('client')?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(client => {\r\n if (client) {\r\n this.unitDataSource.next(new DataSource({\r\n store: this.clientService.clientUnitsCustomStore(client.id, this.unitDataSource),\r\n }));\r\n } else {\r\n // @ts-ignore\r\n this.unitDataSource.next(null);\r\n }\r\n });\r\n });\r\n }\r\n\r\n public ngOnInit() {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isTablet = this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isTablet = this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.resizePickerDropDown();\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n private waitByUser() {\r\n const user = this.fusionAuthService.Profile;\r\n if (user) {\r\n const role = user.registrations[0].roles[0];\r\n const clientsIds = role === 'Client Admin' || role === 'Client Basic' ? user.data.clients : null;\r\n this.pickerDataSource.next(new DataSource({\r\n // @ts-ignore\r\n store: this.testService.customStore(this.pickerDataSource, null, clientsIds === null, clientsIds)\r\n }));\r\n } else {\r\n of(null)\r\n .pipe(\r\n debounceTime(1000),\r\n take(1)\r\n )\r\n .subscribe(() => this.waitByUser());\r\n }\r\n }\r\n\r\n public searchStandingOrders(): void {\r\n this.submit();\r\n }\r\n\r\n public clear() {\r\n this.standingOrderSearchForm.reset();\r\n this.pickerSelectedTestsKey = [];\r\n this.submit();\r\n }\r\n\r\n public resizePickerDropDown() {\r\n const element = this.domService.getElementsByClassname('dx-overlay-wrapper dx-dropdowneditor-overlay dx-popup-wrapper').item(0) as HTMLElement;\r\n if (element) {\r\n if (this.isPhoneOrTablet) {\r\n this.renderer.setStyle(element, 'width', '300px');\r\n this.renderer.setStyle(element.firstChild, 'width', '300px');\r\n } else {\r\n this.renderer.setStyle(element, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild, 'width', '580px');\r\n }\r\n this.renderer.setStyle(element, 'height', '50vh');\r\n this.renderer.setStyle(element.firstChild, 'height', '50vh');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'height', '50vh');\r\n }\r\n\r\n if (this.dropDownGrid !== undefined) {\r\n this.dropDownGrid.instance.clearFilter();\r\n }\r\n }\r\n\r\n private submit() {\r\n this.standingOrderSearchForm.get('testIds')?.setValue(this.pickerSelectedTestsKey);\r\n this.formSubmitted.emit(this.standingOrderSearchForm.value);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","

{{ label }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n Address *\r\n \r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
State
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
City
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
ZipCode *\r\n \r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
ZipCode +4
\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 ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n SimpleChanges,\r\n} from '@angular/core';\r\nimport {AbstractControl, UntypedFormControl} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {concatMap, take, takeUntil, tap} from 'rxjs/operators';\r\nimport {ZipCode} from '../../models/common';\r\nimport {AddressService} from '../../services';\r\nimport * as Sentry from \"@sentry/angular-ivy\";\r\n\r\n@Component({\r\n selector: 'app-address',\r\n templateUrl: './address.component.html',\r\n styleUrls: ['./address.component.scss'],\r\n})\r\nexport class AddressComponent implements OnInit, OnDestroy, OnChanges {\r\n @Input() public label ? = '';\r\n @Input() public clientAddress?: string;\r\n @Input() public clientZipCode?: ZipCode;\r\n @Input() public isSameAsClientControl: UntypedFormControl = new UntypedFormControl();\r\n @Input() public addressControl: UntypedFormControl = new UntypedFormControl();\r\n @Input() public zipCodeControl: UntypedFormControl = new UntypedFormControl();\r\n @Input() public zipCodeExtraControl: UntypedFormControl = new UntypedFormControl();\r\n @Input() public required = false;\r\n @Input() public warningIconForRequired ? = false;\r\n @Input() public loadInformation = new EventEmitter();\r\n @Input() public validationGroup: string = '';\r\n @Input() public disabled = false;\r\n public city?: string = '';\r\n public state?: string = '';\r\n public onDestroy$: Subject = new Subject();\r\n public isLoading = false;\r\n public isLoadingZipCodeExtra = false;\r\n public zipCodeMaskRule = {X: /[0-9]/};\r\n\r\n constructor(public addressService: AddressService, private ref: ChangeDetectorRef) {\r\n this.calculateAddress = this.calculateAddress.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n this.zipCodeExtraControl?.setValue('');\r\n if (this.isSameAsClientControl) {\r\n this.isSameAsClientControl.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(value => {\r\n if (value) {\r\n this.setSameAsClientAddress();\r\n } else {\r\n this.clean();\r\n }\r\n });\r\n }\r\n\r\n this.loadInformation\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(res => {\r\n if (res) {\r\n this.calculateAddress();\r\n }\r\n });\r\n }\r\n\r\n private setDataControl() {\r\n const isSameAsClient = this.isSameAsClientControl ? this.isSameAsClientControl.value : false;\r\n this.addressControl?.setValue(isSameAsClient ? this.clientAddress : this.addressControl.value);\r\n this.zipCodeControl?.setValue(isSameAsClient ? this.clientZipCode?.code : this.zipCodeControl.value);\r\n this.calculateAddress();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.clientAddress || changes.clientZipCode) {\r\n if (this.isSameAsClientControl?.value) {\r\n this.setSameAsClientAddress();\r\n }\r\n }\r\n }\r\n\r\n private setSameAsClientAddress() {\r\n const isSameAsClient = this.isSameAsClientControl ? this.isSameAsClientControl.value : false;\r\n if (isSameAsClient) {\r\n this.setDataControl();\r\n } else {\r\n this.clean();\r\n }\r\n }\r\n\r\n public clean() {\r\n this.addressControl?.setValue(null);\r\n this.zipCodeControl?.setValue(null);\r\n this.city = '';\r\n this.state = '';\r\n this.zipCodeExtraControl?.setValue('');\r\n }\r\n\r\n public calculateAddress() {\r\n if (!this.zipCodeControl?.value || !this.addressControl?.value) {\r\n return;\r\n }\r\n this.addressService.getZipCodeByCode(this.zipCodeControl.value)\r\n .pipe(\r\n take(1),\r\n tap(zipCode => {\r\n this.city = zipCode.city;\r\n this.state = zipCode.state;\r\n this.zipCodeControl?.setValue(zipCode.code);\r\n }),\r\n concatMap(zipCode => this.addressService.calculateZipCodePlus4(zipCode.id, this.addressControl?.value)))\r\n .subscribe(zipCodePlus4 => {\r\n this.zipCodeExtraControl?.setValue(zipCodePlus4);\r\n this.ref.detectChanges();\r\n }, (error => Sentry.captureException(error)));\r\n }\r\n\r\n public get IsDisabled() {\r\n return this.clientAddress === null || this.clientZipCode == null;\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","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-bill-to-type',\r\n templateUrl: './bill-to-type.component.html',\r\n styleUrls: ['./bill-to-type.component.scss'],\r\n})\r\nexport class BillToTypeComponent implements OnInit, OnChanges {\r\n public billTo: string[];\r\n public selected?: string;\r\n @Input() public disabled = false;\r\n @Output() public selection = new EventEmitter();\r\n @Input() public defaultValue = '';\r\n\r\n constructor() {\r\n this.billTo = ['INSURANCE', 'CLIENT', 'PATIENT'];\r\n }\r\n\r\n public valueChanged() {\r\n this.selection.emit(this.selected);\r\n }\r\n\r\n public ngOnInit() {\r\n if (this.selected === undefined) {\r\n this.selected = this.billTo[2];\r\n }\r\n\r\n this.valueChanged();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.defaultValue) {\r\n this.selected = changes.defaultValue.currentValue;\r\n this.valueChanged();\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n","\r\n \r\n

Edit Insured

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n Bill Type\r\n {{ BillType }}
\r\n Payer\r\n {{ Payer }}
\r\n Insurance Id\r\n {{ InsuranceId }}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
Last Name
\r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
First Name
\r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Middle Name
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Birth Date
\r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Phone
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Gender
\r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Relationship
\r\n \r\n
\r\n Missing information field.\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output, Renderer2} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {custom} from 'devextreme/ui/dialog';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {ScreenService} from '../../../../../shared/services/general';\r\nimport {BillingInformation} from '../../../models/billing/billing-information';\r\nimport {PatientEditable} from '../../../models/order-entry/patient';\r\n\r\n@Component({\r\n selector: 'app-edit-billing-information',\r\n templateUrl: './edit-billing-information.component.html',\r\n styleUrls: ['./edit-billing-information.component.scss']\r\n})\r\nexport class EditBillingInformationComponent implements OnInit, OnChanges {\r\n private onDestroy$: Subject = new Subject();\r\n\r\n public get BillType(): string {\r\n return this.patientBillingInformation && this.patientBillingInformation.billType\r\n ? this.patientBillingInformation.billType : '';\r\n }\r\n\r\n public get Payer(): string {\r\n return this.patientBillingInformation && this.patientBillingInformation.payer\r\n ? this.patientBillingInformation.payer : '';\r\n }\r\n\r\n public get InsuranceId(): string {\r\n return this.patientBillingInformation && this.patientBillingInformation.insuranceId\r\n ? this.patientBillingInformation.insuranceId : '';\r\n }\r\n\r\n @Input() public popupVisible = false;\r\n @Input() public patientBillingInformation: BillingInformation = new BillingInformation();\r\n @Output() public closeEvent = new EventEmitter();\r\n @Output() public reloadPatientEvent = new EventEmitter();\r\n public addressControl: UntypedFormControl = new UntypedFormControl();\r\n public zipCodeControl: UntypedFormControl = new UntypedFormControl();\r\n public zipCodeExtraControl: UntypedFormControl = new UntypedFormControl();\r\n public today: string | number | Date = new Date();\r\n public phoneMaskRule = {X: /[0-9]/};\r\n public loadAddressInformation = new EventEmitter();\r\n public patientBillingInformationTemp: BillingInformation = new BillingInformation();\r\n public differentThanPatient: boolean | undefined | null = false;\r\n @Input() public patient?: PatientEditable = new PatientEditable();\r\n public hasInformation = false;\r\n public isPhoneOrTablet: boolean = false;\r\n\r\n public gender = ['MALE', 'FEMALE', 'UNKNOWN'];\r\n public relationshipWithInsured = ['FATHER', 'MOTHER', 'SON', 'DAUGHTER', 'SPOUSE', 'SELF'];\r\n\r\n constructor(private screen: ScreenService, private renderer: Renderer2) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n setTimeout(() => {\r\n this.addressControl = new UntypedFormControl(\r\n this.patientBillingInformation ? this.patientBillingInformation.address : null\r\n );\r\n this.zipCodeControl = new UntypedFormControl(\r\n this.patientBillingInformation ? this.patientBillingInformation.zipCode : null\r\n );\r\n this.zipCodeExtraControl = new UntypedFormControl(\r\n this.patientBillingInformation ? this.patientBillingInformation.zipCodePlus4 : null\r\n );\r\n }, 500);\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public onShown() {\r\n ValidationEngine.validateGroup('billingInfo');\r\n ValidationEngine.validateGroup('address');\r\n this.updateAddressControl(false);\r\n }\r\n\r\n public close(): void {\r\n this.closeEvent.emit();\r\n }\r\n\r\n public differentThanPatientValueChanged(event: any) {\r\n if (!event.value) {\r\n this.assignInfoPatient(this.patient);\r\n this.updateAddressControl(false);\r\n } else {\r\n if (!this.hasInformation) {\r\n this.assignBillingInformation();\r\n this.updateAddressControl(true);\r\n }\r\n this.hasInformation = false;\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\r\n if (this.popupVisible && this.patientBillingInformation) {\r\n this.differentThanPatient = this.patientBillingInformation.differentThanPatient != undefined ? this.patientBillingInformation.differentThanPatient : false;\r\n this.assignBillingInformation(this.patientBillingInformation);\r\n this.updateAddressControl(false);\r\n if (this.differentThanPatient) {\r\n this.hasInformation = true;\r\n }\r\n }\r\n }\r\n\r\n public assignBillingInformation(billingInformation?: BillingInformation) {\r\n if (billingInformation) {\r\n this.patientBillingInformationTemp.lastName = billingInformation.lastName;\r\n this.patientBillingInformationTemp.firstName = billingInformation.firstName;\r\n this.patientBillingInformationTemp.middleName = billingInformation.middleName;\r\n if (billingInformation.birthDate) {\r\n this.patientBillingInformationTemp.birthDate = new Date(billingInformation.birthDate);\r\n } else {\r\n this.patientBillingInformationTemp.birthDate = '';\r\n }\r\n this.patientBillingInformationTemp.gender = billingInformation.gender;\r\n this.patientBillingInformationTemp.phone = billingInformation.phone;\r\n this.patientBillingInformationTemp.relationship = billingInformation.relationship;\r\n this.patientBillingInformationTemp.address = billingInformation.address;\r\n this.patientBillingInformationTemp.zipCode = billingInformation.zipCode;\r\n this.patientBillingInformationTemp.zipCodePlus4 = billingInformation.zipCodePlus4;\r\n } else {\r\n this.patientBillingInformationTemp.lastName = '';\r\n this.patientBillingInformationTemp.firstName = '';\r\n this.patientBillingInformationTemp.middleName = '';\r\n this.patientBillingInformationTemp.birthDate = '';\r\n this.patientBillingInformationTemp.gender = undefined;\r\n this.patientBillingInformationTemp.phone = '';\r\n this.patientBillingInformationTemp.relationship = undefined;\r\n this.patientBillingInformationTemp.address = undefined;\r\n this.patientBillingInformationTemp.zipCode = undefined;\r\n this.patientBillingInformationTemp.zipCodePlus4 = undefined;\r\n }\r\n }\r\n\r\n public assignInfoPatient(patient?: PatientEditable) {\r\n this.patientBillingInformationTemp.lastName = patient?.lastName ? patient.lastName : '';\r\n this.patientBillingInformationTemp.firstName = patient?.firstName ? patient.firstName : '';\r\n this.patientBillingInformationTemp.middleName = patient?.middleName ? patient.middleName : '';\r\n this.patientBillingInformationTemp.birthDate = (patient as any).dob !== null && (patient as any).dob !== undefined ? new Date((patient as any).dob) :\r\n patient?.birthDate !== null && patient?.birthDate !== undefined ? new Date(patient.birthDate) : '';\r\n this.patientBillingInformationTemp.gender = patient?.gender;\r\n this.patientBillingInformationTemp.phone = patient?.phone ? patient.phone : '';\r\n this.patientBillingInformationTemp.relationship = 'SELF';\r\n this.patientBillingInformationTemp.address = patient?.address;\r\n this.patientBillingInformationTemp.zipCode = patient?.zipCode;\r\n this.patientBillingInformationTemp.zipCodePlus4 = patient?.zipCodePlus4;\r\n }\r\n\r\n private updateAddressControl(clean: boolean) {\r\n if (clean) {\r\n this.addressControl?.setValue(null);\r\n this.zipCodeControl?.setValue(null);\r\n this.zipCodeExtraControl?.setValue('');\r\n } else {\r\n this.addressControl?.setValue(this.patientBillingInformationTemp.address);\r\n this.zipCodeControl?.setValue(this.patientBillingInformationTemp.zipCode && typeof this.patientBillingInformationTemp.zipCode === 'object' ?\r\n this.patientBillingInformationTemp.zipCode.code : this.patientBillingInformationTemp.zipCode);\r\n this.zipCodeExtraControl?.setValue(this.patientBillingInformationTemp.zipCodePlus4);\r\n this.loadAddressInformation.emit(true);\r\n }\r\n }\r\n\r\n public async save() {\r\n const patientData = ValidationEngine.validateGroup('billingInfo');\r\n const address = ValidationEngine.validateGroup('address');\r\n\r\n this.patientBillingInformation = this.patientBillingInformationTemp;\r\n this.patientBillingInformation.differentThanPatient = this.differentThanPatient ?? false;\r\n\r\n if (this.addressControl?.value) {\r\n this.patientBillingInformation.address = this.addressControl?.value;\r\n }\r\n\r\n if (this.zipCodeControl?.value) {\r\n this.patientBillingInformation.zipCode = this.zipCodeControl.value;\r\n this.patientBillingInformation.zipCodeId = this.zipCodeControl.value.id;\r\n }\r\n\r\n if (this.zipCodeExtraControl?.value) {\r\n this.patientBillingInformation.zipCodePlus4 = this.zipCodeExtraControl.value;\r\n }\r\n\r\n if (!patientData.isValid || !address.isValid) {\r\n const confirmationDialog = custom({\r\n title: 'Confirmation Save',\r\n messageHtml: 'Please note there is missing information for insurance claim, would you like to Save and continue later?',\r\n buttons: [{\r\n text: 'Save',\r\n onClick: (e) => {\r\n return e.component.option('text');\r\n }\r\n }, {\r\n text: 'Cancel',\r\n onClick: (e) => {\r\n return e.component.option('text');\r\n }\r\n }]\r\n });\r\n\r\n confirmationDialog.show().then((dialogResult: any) => {\r\n if (dialogResult === 'Cancel') {\r\n confirmationDialog.hide();\r\n } else {\r\n this.closeEvent.emit(this.patientBillingInformation);\r\n }\r\n });\r\n } else {\r\n this.closeEvent.emit(this.patientBillingInformation);\r\n }\r\n }\r\n\r\n public onContentReady(e: any) {\r\n const element = e.element;\r\n if (e.component._pickerType === 'native') {\r\n const button = element.querySelector('.dx-texteditor-buttons-container');\r\n const input = element.querySelector('.dx-texteditor-input');\r\n this.renderer.setStyle(button, 'display', 'none');\r\n this.renderer.setStyle(input, 'padding-right', '5px');\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n Insurance Information\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
Bill Type
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
Payer
\r\n
\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
Insurance Id
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
Group Number
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n

Add

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

Remove

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

Search

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

Move Up

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

Move Down

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

Save

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \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, ChangeDetectionStrategy, ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges, OnDestroy,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {DxDropDownBoxComponent} from 'devextreme-angular';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {ScreenService} from '../../../../shared/services/general';\r\nimport {BillType} from '../../models/billing/bill-type';\r\nimport {BillingInformation} from '../../models/billing/billing-information';\r\nimport {Payer} from '../../models/billing/payer';\r\nimport {PatientEditable} from '../../models/order-entry/patient';\r\nimport {BillingService} from '../../services/billing.service';\r\nimport DataSource, { DataSourceOptions } from 'devextreme/data/data_source';\r\nimport { Store } from 'devextreme/data';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\n\r\n@Component({\r\n selector: 'app-billing-information',\r\n templateUrl: './billing-information.component.html',\r\n styleUrls: ['./billing-information.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class BillingInformationComponent implements OnInit, OnChanges, AfterViewChecked, OnDestroy {\r\n @ViewChild(DxDataGridComponent, {static: true}) public billingInfoGrid?: DxDataGridComponent;\r\n @ViewChild('payerDropDown', {static: true}) public payerSelector?: DxDropDownBoxComponent;\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n @Input() public patientBillingInformation: DataSource | DataSourceOptions | Store | null | string | Array = [] as any[];\r\n @Input() public maxHeight: string | number = '100%';\r\n @Output() public patientBillingInfoChanged = new EventEmitter();\r\n @Input() public patient?: PatientEditable;\r\n @Input() public deselectAll ? = new EventEmitter();\r\n @Input() public gridHeight?: number | string;\r\n // @ts-ignore\r\n public billTypesDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n // @ts-ignore\r\n public payersDataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public isLoading = false;\r\n public selectedBillType?: BillType;\r\n public selectedPayer?: Payer;\r\n public selectedRows: BillingInformation[] = [];\r\n public insuranceId = '';\r\n public groupNumber = '';\r\n public isEditVisible = false;\r\n public editingRowInfo: any;\r\n public responsiveButtons: any;\r\n public isPhone: boolean = false\r\n public isPhoneOrTablet: boolean = false;\r\n public selectedRowIndex: number = -1;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private billingInfoService: BillingService, private screen: ScreenService, private ref: ChangeDetectorRef) {\r\n this.responsiveButtons = [{\r\n name: 'Add',\r\n icon: 'add',\r\n disabled: true,\r\n }, {\r\n name: 'Remove',\r\n icon: 'trash',\r\n disabled: true,\r\n }, {\r\n name: 'Up',\r\n icon: 'arrowup',\r\n disabled: true,\r\n }, {\r\n name: 'Save',\r\n icon: 'save',\r\n disabled: true,\r\n }, {\r\n name: 'Down',\r\n icon: 'arrowdown',\r\n disabled: true,\r\n },\r\n ];\r\n this.payerChanged = this.payerChanged.bind(this);\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n if (this.billingInfoGrid)\r\n this.billingInfoGrid.height = this.GridSize;\r\n\r\n if (typeof this.maxHeight === 'number' && this.controlsDiv) {\r\n this.gridHeight = this.maxHeight - this.controlsDiv.nativeElement.clientHeight - 32;\r\n } else {\r\n this.gridHeight = '100%';\r\n }\r\n\r\n this.refresh();\r\n }\r\n\r\n public get GridSize() {\r\n const element = this.containerDiv?.nativeElement as HTMLElement;\r\n return element?.getBoundingClientRect().height -\r\n 32 - element?.getBoundingClientRect().height;\r\n }\r\n\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\r\n if (changes.patient && changes.patient.currentValue) {\r\n if (changes.patient.currentValue.insuranceInformation) {\r\n this.patientBillingInformation = changes.patient.currentValue.insuranceInformation;\r\n this.refresh();\r\n }\r\n }\r\n }\r\n\r\n public closeDialog(billingInfo: BillingInformation): void {\r\n if (billingInfo) {\r\n this.billingInfoGrid?.instance.deselectAll()\r\n .then(() => {\r\n const index = this.editingRowInfo.rowType === 'detailAdaptive' ? this.editingRowInfo.rowIndex - 1 : this.editingRowInfo.rowIndex;\r\n this.billingInfoGrid?.instance.selectRowsByIndexes(index)\r\n .then(() => {\r\n const row = this.billingInfoGrid?.instance.getSelectedRowsData()[0];\r\n row.address = billingInfo.address;\r\n row.differentThanPatient = billingInfo.differentThanPatient;\r\n row.relationship = billingInfo.relationship;\r\n row.middleName = billingInfo.middleName;\r\n row.gender = billingInfo.gender;\r\n row.phone = billingInfo.phone;\r\n row.birthDate = billingInfo.birthDate;\r\n row.zipCodePlus4 = billingInfo.zipCodePlus4;\r\n row.zipCode = billingInfo.zipCode;\r\n row.firstName = billingInfo.firstName;\r\n row.lastName = billingInfo.lastName;\r\n this.billingInfoGrid?.instance.saveEditData()\r\n .then(() => {\r\n this.billingInfoGrid?.instance.repaint();\r\n this.billingInfoGrid?.instance.refresh();\r\n });\r\n });\r\n });\r\n }\r\n\r\n this.isEditVisible = false;\r\n this.patientBillingInfoChanged.emit(this.patientBillingInformation);\r\n this.refresh();\r\n }\r\n\r\n public ngOnInit() {\r\n this.billTypesDataSource.next(new DataSource({store: this.billingInfoService.billingInfoCustomStore(this.billTypesDataSource)}));\r\n this.payersDataSource.next(new DataSource({store: this.billingInfoService.payerCustomStore(0, false, this.payersDataSource)}));\r\n\r\n this.billTypeChanged = this.billTypeChanged.bind(this);\r\n this.addBtnClicked = this.addBtnClicked.bind(this);\r\n this.removeBtnClicked = this.removeBtnClicked.bind(this);\r\n this.changeDown = this.changeDown.bind(this);\r\n this.changeUp = this.changeUp.bind(this);\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.refresh();\r\n });\r\n\r\n this.deselectAll?.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.selectedRows = [];\r\n this.refresh();\r\n });\r\n this.refresh();\r\n }\r\n\r\n public billTypeChanged(event: any) {\r\n if (event.value) {\r\n this.payersDataSource.next(new DataSource({store: this.billingInfoService.payerCustomStore(event.value.id, event.value.allPayers, this.payersDataSource)}));\r\n }\r\n this.selectedPayer = undefined;\r\n this.changeStateButtons();\r\n this.refresh();\r\n }\r\n\r\n public addBtnClicked() {\r\n if (this.insuranceId !== '' && this.selectedPayer && this.selectedBillType) {\r\n const billingInfo = new BillingInformation();\r\n billingInfo.address = this.patient?.address ? this.patient.address.toUpperCase() : '';\r\n billingInfo.relationship = 'SELF';\r\n billingInfo.order = (this.patientBillingInformation as any[]).length + 1;\r\n billingInfo.phone = this.patient?.phone ? this.patient.phone : '';\r\n billingInfo.differentThanPatient = false;\r\n billingInfo.firstName = this.patient?.firstName ? this.patient.firstName.toUpperCase() : '';\r\n billingInfo.lastName = this.patient?.lastName ? this.patient.lastName.toUpperCase() : '';\r\n billingInfo.middleName = this.patient?.middleName ? this.patient.middleName.toUpperCase() : '';\r\n billingInfo.gender = this.patient?.gender;\r\n billingInfo.zipCodePlus4 = this.patient?.zipCodePlus4;\r\n billingInfo.billType = this.selectedBillType.name;\r\n billingInfo.billTypeId = this.selectedBillType.id;\r\n billingInfo.payer = this.selectedPayer.name;\r\n billingInfo.payerId = this.selectedPayer.id;\r\n billingInfo.insuranceId = this.insuranceId.toUpperCase();\r\n billingInfo.groupNumber = this.groupNumber ? this.groupNumber.toUpperCase() : '';\r\n billingInfo.birthDate = this.patient?.dob ? new Date(this.patient.dob) : '';\r\n (this.patientBillingInformation as any[]).push(billingInfo);\r\n this.selectedPayer = undefined;\r\n this.selectedBillType = undefined;\r\n this.insuranceId = '';\r\n this.groupNumber = '';\r\n this.patientBillingInfoChanged.emit(this.patientBillingInformation);\r\n this.refresh();\r\n }\r\n }\r\n\r\n public removeBtnClicked() {\r\n this.selectedRows.forEach(x => {\r\n const index = (this.patientBillingInformation as any[]).indexOf(x, 0);\r\n (this.patientBillingInformation as any[]).splice(index, 1);\r\n });\r\n this.selectedRows = [];\r\n this.patientBillingInfoChanged.emit(this.calculateOrder((this.patientBillingInformation as any[])));\r\n this.refresh();\r\n }\r\n\r\n public calculateOrder(pbi: BillingInformation[]) {\r\n for (let i = 0; i < pbi.length; i++) {\r\n pbi[i].order = i + 1;\r\n }\r\n return pbi;\r\n }\r\n\r\n public editBtnClicked(rowInfo: any) {\r\n this.isEditVisible = true;\r\n this.editingRowInfo = rowInfo;\r\n this.assignPatientData(rowInfo.data.differentThanPatient);\r\n this.refresh();\r\n }\r\n\r\n public verifyMissingInformation(rowInfo: any): boolean {\r\n return rowInfo.data.lastName === null || rowInfo.data.firstName === null || rowInfo.data.address === null\r\n || rowInfo.data.birthDate === null || rowInfo.data.gender === null\r\n || rowInfo.data.zipCode === null || rowInfo.data.relationship === null;\r\n }\r\n\r\n public assignPatientData(loadData: boolean) {\r\n if (!loadData && !(this.editingRowInfo.data as BillingInformation).id) {\r\n (this.editingRowInfo.data as BillingInformation).lastName = this.patient?.lastName ? this.patient.lastName : '';\r\n (this.editingRowInfo.data as BillingInformation).firstName = this.patient?.firstName ? this.patient?.firstName : '';\r\n (this.editingRowInfo.data as BillingInformation).middleName = this.patient?.middleName ? this.patient?.middleName : '';\r\n (this.editingRowInfo.data as BillingInformation).address = this.patient?.address;\r\n (this.editingRowInfo.data as BillingInformation).birthDate = (this.patient as any).dob !== null &&\r\n (this.patient as any).dob !== undefined ? new Date((this.patient as any).dob) : this.patient?.birthDate !== null &&\r\n this.patient?.birthDate !== undefined ? new Date(this.patient?.birthDate) : '';\r\n (this.editingRowInfo.data as BillingInformation).gender = this.patient?.gender;\r\n (this.editingRowInfo.data as BillingInformation).zipCode = this.patient?.zipCode;\r\n (this.editingRowInfo.data as BillingInformation).zipCodePlus4 = this.patient?.zipCodePlus4;\r\n (this.editingRowInfo.data as BillingInformation).phone = this.patient?.phone ? this.patient?.phone : '';\r\n (this.editingRowInfo.data as BillingInformation).relationship = 'SELF';\r\n this.refresh();\r\n }\r\n }\r\n\r\n public reloadPatientData(loadData: boolean) {\r\n this.assignPatientData(loadData);\r\n }\r\n\r\n public changeDown() {\r\n const prev = Math.max(...this.getIndexesOfSelected()) + 1;\r\n\r\n if (prev < (this.patientBillingInformation as any[]).length) {\r\n (this.patientBillingInformation as any[])[prev].order =\r\n (this.patientBillingInformation as any[])[Math.min(...this.getIndexesOfSelected())].order;\r\n // @ts-ignore\r\n this.getIndexesOfSelected().forEach(index => this.patientBillingInformation[index].order++);\r\n // @ts-ignore\r\n this.patientBillingInformation.sort((a, b) => a.order - b.order);\r\n this.patientBillingInfoChanged.emit(this.patientBillingInformation);\r\n }\r\n this.refresh();\r\n }\r\n\r\n public changeUp() {\r\n const prev = Math.min(...this.getIndexesOfSelected()) - 1;\r\n\r\n if (prev >= 0) {\r\n (this.patientBillingInformation as any[])[prev].order =\r\n (this.patientBillingInformation as any[])[Math.max(...this.getIndexesOfSelected())].order;\r\n // @ts-ignore\r\n this.getIndexesOfSelected().forEach(index => this.patientBillingInformation[index].order--);\r\n // @ts-ignore\r\n this.patientBillingInformation.sort((a, b) => a.order - b.order);\r\n this.patientBillingInfoChanged.emit(this.patientBillingInformation);\r\n }\r\n this.refresh();\r\n }\r\n\r\n private getIndexesOfSelected() {\r\n const indexes: number[] = [];\r\n\r\n this.selectedRows.forEach((rp: any) => {\r\n const index = (this.patientBillingInformation as any[]).findIndex(r =>\r\n r.billTypeId === (rp as BillingInformation).billTypeId &&\r\n r.payerId === (rp as BillingInformation).payerId &&\r\n r.insuranceId === (rp as BillingInformation).insuranceId &&\r\n r.groupNumber === (rp as BillingInformation).groupNumber,\r\n );\r\n indexes.push(index);\r\n });\r\n\r\n return indexes;\r\n }\r\n\r\n public onItemClick(e: any) {\r\n switch (e.itemData.name) {\r\n case 'Up':\r\n this.changeUp();\r\n break;\r\n case 'Down':\r\n this.changeDown();\r\n break;\r\n case 'Add':\r\n this.addBtnClicked();\r\n break;\r\n case 'Save':\r\n this.saveBtnClicked();\r\n break;\r\n case 'Remove':\r\n this.removeBtnClicked();\r\n break;\r\n }\r\n }\r\n\r\n public saveBtnClicked() {\r\n if (this.insuranceId !== '' && this.selectedPayer && this.selectedBillType) {\r\n (this.patientBillingInformation as any[])[this.selectedRowIndex].payer = this.selectedPayer.name;\r\n (this.patientBillingInformation as any[])[this.selectedRowIndex].payerId = this.selectedPayer.id;\r\n (this.patientBillingInformation as any[])[this.selectedRowIndex].billTypeId = this.selectedBillType.id;\r\n (this.patientBillingInformation as any[])[this.selectedRowIndex].billType = this.selectedBillType.name;\r\n (this.patientBillingInformation as any[])[this.selectedRowIndex].insuranceId = this.insuranceId.toUpperCase();\r\n (this.patientBillingInformation as any[])[this.selectedRowIndex].groupNumber = this.groupNumber ? this.groupNumber.toUpperCase() : '';\r\n this.selectedPayer = undefined;\r\n this.selectedBillType = undefined;\r\n this.insuranceId = '';\r\n this.groupNumber = '';\r\n this.selectedRows = [];\r\n this.patientBillingInfoChanged.emit(this.patientBillingInformation);\r\n }\r\n this.refresh();\r\n }\r\n\r\n public payerChanged(event: any) {\r\n this.selectedPayer = event.selectedRowsData[0];\r\n if (this.selectedPayer)\r\n this.payerSelector?.instance.close();\r\n this.selectionChange(undefined);\r\n }\r\n\r\n public selectionChange(e?: any[]) {\r\n setTimeout(() => {\r\n this.changeStateButtons();\r\n }, 1000);\r\n this.loadInfoToUpdate(e);\r\n }\r\n\r\n public loadInfoToUpdate(items?: Array) {\r\n if (items === undefined) {\r\n return;\r\n }\r\n if (items.length === 1) {\r\n this.insuranceId = items[0].insuranceId;\r\n this.groupNumber = items[0].groupNumber;\r\n this.selectedBillType = {\r\n id: items[0].billTypeId,\r\n name: items[0].billType,\r\n allPayers: items[0].allPayers ? items[0].allPayers : false,\r\n } as BillType;\r\n const tempPayer = {\r\n id: items[0].payerId,\r\n name: items[0].payer,\r\n } as Payer;\r\n this.payersDataSource.next(new DataSource({\r\n store: this.billingInfoService.payerCustomStore(this.selectedBillType.id, this.selectedBillType.allPayers, this.payersDataSource)\r\n }));\r\n this.payersDataSource.value.load()\r\n .then(() => {\r\n this.selectedPayer = tempPayer;\r\n this.refresh();\r\n }).catch(e => Sentry.captureException(e));\r\n } else {\r\n this.selectedBillType = undefined;\r\n this.selectedPayer = undefined;\r\n this.insuranceId = '';\r\n this.groupNumber = '';\r\n }\r\n this.refresh();\r\n }\r\n\r\n public changeStateButtons() {\r\n this.responsiveButtons = [{\r\n name: 'Add',\r\n icon: 'add',\r\n disabled: this.insuranceId === '' || this.selectedPayer === undefined || this.selectedBillType === undefined,\r\n }, {\r\n name: 'Remove',\r\n icon: 'trash',\r\n disabled: this.selectedRows.length === 0,\r\n }, {\r\n name: 'Up',\r\n icon: 'arrowup',\r\n disabled: this.disableUp,\r\n }, {\r\n name: 'Down',\r\n icon: 'arrowdown',\r\n disabled: this.disableDown,\r\n },\r\n ];\r\n }\r\n\r\n public refresh() {\r\n if (this.ref) {\r\n this.ref.detectChanges();\r\n }\r\n }\r\n\r\n public get disableUp() {\r\n return this.selectedRows.length !== 1 || this.patientBillingInformation === undefined || (this.patientBillingInformation as any[]).length <= 1 ||\r\n (this.selectedRows[0] as any).order === 1;\r\n }\r\n\r\n public get disableDown() {\r\n return this.selectedRows.length !== 1 || this.patientBillingInformation === undefined || (this.patientBillingInformation as any[]).length <= 1 ||\r\n (this.selectedRows[0] as any).order === (this.patientBillingInformation as any[]).length;\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","import {Component, EventEmitter, Output} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-clear-all-btn',\r\n templateUrl: './clear-all-btn.component.html',\r\n styleUrls: ['./clear-all-btn.component.scss']\r\n})\r\nexport class ClearAllBtnComponent {\r\n @Output() public btnClick = new EventEmitter();\r\n}\r\n","\r\n","
\r\n
\r\n
\r\n Client *\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \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 {AbstractControl, UntypedFormGroup} from '@angular/forms';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Renderer2,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {DOMService, ScreenService} from '../../../../shared/services/general';\r\nimport {DxDataGridComponent, DxDropDownBoxComponent} from 'devextreme-angular';\r\n\r\nimport {ClientService} from '../../services';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {FusionAuthService} from '../../../../shared/services/fusion-auth';\r\nimport {User} from '../../../../shared/models/fusion-auth';\r\nimport {takeUntil} from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-client-selector',\r\n templateUrl: './client-selector.component.html',\r\n styleUrls: ['./client-selector.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ClientSelectorComponent implements OnInit, OnDestroy {\r\n @ViewChild(DxDropDownBoxComponent, {static: true}) public clientDropDown?: DxDropDownBoxComponent;\r\n @ViewChild('grid', {static: false}) public grid?: DxDataGridComponent;\r\n @Input() public control: AbstractControl | null | undefined = new UntypedFormGroup({});\r\n @Input() public required ? = false;\r\n @Input() public validationGroup: string = '';\r\n @Input() public selection: 'single' | 'multiple' = 'single';\r\n @Input() public filterClients = new EventEmitter();\r\n @Input() public orderId ?: number;\r\n @Input() public startDate ?: any;\r\n @Input() public endDate ?: any;\r\n @Input() public limit ?: number;\r\n @Input() public resultEntry?: boolean = false;\r\n @Input() public clearBtn = true;\r\n // @ts-ignore\r\n public dataSource: BehaviorSubject = new BehaviorSubject(null);\r\n public selectedRowKeys: number[] = [];\r\n public user: User;\r\n public role?: string;\r\n public editorElement: any;\r\n public isPhoneOrTablet: boolean = false;\r\n public isLoading: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private clientService: ClientService,\r\n private fusionAuthService: FusionAuthService,\r\n private renderer: Renderer2,\r\n private screen: ScreenService,\r\n private domService: DOMService,\r\n private ref: ChangeDetectorRef,\r\n ) {\r\n this.user = fusionAuthService.Profile;\r\n this.populateClients = this.populateClients.bind(this);\r\n }\r\n\r\n private waitByUser() {\r\n this.user = this.fusionAuthService.Profile;\r\n\r\n if (this.user) {\r\n this.populateClients();\r\n } else {\r\n setTimeout(() => {\r\n this.waitByUser();\r\n }, 1000);\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.control?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(value => {\r\n if (value === undefined || value === null) {\r\n this.clientDropDown?.instance.reset();\r\n this.selectedRowKeys = [];\r\n } else {\r\n if (this.selectedRowKeys.length === 0) {\r\n this.selectedRowKeys.push(value.id);\r\n this.clientDropDown?.instance.option('value', this.selectedRowKeys);\r\n }\r\n }\r\n if ((value === undefined || value == null || value.length === 0) && this.resultEntry) {\r\n this.grid?.instance?.clearSelection();\r\n }\r\n this.ref.detectChanges();\r\n });\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n\r\n this.filterClients.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.dataSource.next(new DataSource({\r\n store: this.clientService.getByRange(this.orderId as number, this.startDate, this.endDate, this.limit as number,\r\n this.role === 'Physician' ? this.user.data.physicians : [], this.dataSource)\r\n }));\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n private populateClients(clientsIds: number[] = []) {\r\n this.isLoading = true;\r\n clientsIds = this.user.data ? this.user.data.clients : [];\r\n if (clientsIds && clientsIds.length > 0) {\r\n this.dataSource.next(new DataSource({store: this.clientService.customStoreFilteredByClientIds(clientsIds, this.dataSource)}));\r\n } else {\r\n this.role = this.user.registrations[0].roles[0];\r\n if (localStorage.getItem('authtoken')) {\r\n switch (this.role) {\r\n case 'Client Admin':\r\n case 'Client Basic':\r\n this.dataSource.next(new DataSource({store: this.clientService.customStoreFilteredByClientIds(clientsIds, this.dataSource)}));\r\n break;\r\n case 'Physician':\r\n this.dataSource.next(new DataSource({store: this.clientService.customStoreFilteredByPhysicianIds(this.user.data.physicians, this.dataSource)}));\r\n break;\r\n case 'Patient':\r\n this.dataSource.next(new DataSource({store: this.clientService.customStoreFilteredByPatientIds(this.user.data.patients, this.dataSource)}));\r\n break;\r\n default:\r\n this.dataSource.next(new DataSource({store: this.clientService.store(this.dataSource)}));\r\n break;\r\n }\r\n this.ref.detectChanges();\r\n } else {\r\n setTimeout(() => {\r\n this.populateClients();\r\n }, 1000);\r\n }\r\n }\r\n }\r\n\r\n public valueChanged(event: any) {\r\n if (!event.value) {\r\n this.control?.setValue(null);\r\n if (this.grid !== undefined) {\r\n this.grid.instance.clearSelection();\r\n }\r\n } else {\r\n if (this.selection === 'single') {\r\n this.clientDropDown?.instance.close();\r\n const client = this.grid?.instance.getSelectedRowsData()[0];\r\n if (client) {\r\n this.control?.setValue(client);\r\n }\r\n } else {\r\n this.control?.setValue(this.grid?.instance.getSelectedRowsData());\r\n }\r\n }\r\n }\r\n\r\n public resizePickerDropDown() {\r\n const element = this.domService.getElementsByClassname('dx-overlay-wrapper dx-dropdowneditor-overlay dx-popup-wrapper').item(0) as HTMLElement;\r\n if (element) {\r\n if (this.isPhoneOrTablet) {\r\n this.renderer.setStyle(element, 'width', '300px');\r\n this.renderer.setStyle(element.firstChild, 'width', '300px');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'width', '300px');\r\n } else {\r\n this.renderer.setStyle(element, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'width', '580px');\r\n }\r\n this.renderer.setStyle(element, 'height', '50vh');\r\n this.renderer.setStyle(element.firstChild, 'height', '50vh');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'height', '50vh');\r\n\r\n if (this.grid !== undefined) {\r\n this.grid.instance.clearFilter();\r\n setTimeout(() => {\r\n this.editorElement.focus();\r\n }, 300);\r\n }\r\n }\r\n }\r\n\r\n public onCellPrepared(e: any) {\r\n if (e.rowType && e.columnIndex) {\r\n if (e.rowType === 'filter' && e.columnIndex === 1) {\r\n const cellElement = e.cellElement;\r\n this.editorElement = cellElement.querySelector('.dx-texteditor-input');\r\n }\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.dataSource.complete();\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n
\r\n

{{ label }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \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, AfterViewInit,\r\n Component,\r\n ElementRef,\r\n Input, OnChanges, OnDestroy,\r\n Renderer2, RendererStyleFlags2, SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {AbstractControl, FormControl} from '@angular/forms';\r\nimport {DxHtmlEditorComponent} from 'devextreme-angular';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-comments-control',\r\n templateUrl: './comments-control.component.html',\r\n styleUrls: ['./comments-control.component.scss'],\r\n})\r\nexport class CommentsControlComponent implements AfterViewInit, AfterViewChecked, OnChanges, OnDestroy {\r\n @Input() public label?: string;\r\n @Input() public simpleMode = false;\r\n @Input() public disabled = false;\r\n @Input() public control: AbstractControl | null = null;\r\n private onDestroy$: Subject = new Subject();\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n @ViewChild('editor', {static: true}) public editor?: DxHtmlEditorComponent;\r\n @Input() public value = '';\r\n @Input() public valueChange = false;\r\n\r\n constructor(private renderer: Renderer2, private elem: ElementRef) {\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n if (this.editor)\r\n this.editor.height = this.GridSize;\r\n\r\n const elements = (this.elem.nativeElement as HTMLElement)\r\n .getElementsByClassName('dx-toolbar-items-container') as HTMLCollectionOf;\r\n\r\n // tslint:disable-next-line:no-bitwise\r\n const flags = RendererStyleFlags2.DashCase | RendererStyleFlags2.Important;\r\n if (elements) {\r\n for (let i = 0; i < elements.length; i++) {\r\n this.renderer.setStyle(elements.item(i), 'height', 'auto', flags);\r\n }\r\n }\r\n\r\n const containerElement = (this.elem.nativeElement as HTMLElement).getElementsByClassName('ql-editor') as HTMLCollectionOf;\r\n if (containerElement) {\r\n for (let i = 0; i < containerElement.length; i++) {\r\n this.renderer.setStyle(containerElement.item(i), 'text-transform', 'uppercase');\r\n }\r\n }\r\n }\r\n\r\n public setHtmlValue(value: string) {\r\n this.valueChange = true;\r\n value = `${value === null ? '' : value}`;\r\n this.control?.setValue(value);\r\n }\r\n\r\n public htmlChanged(value: any) {\r\n value = `${value === null ? '' : value}`;\r\n this.valueChange = false;\r\n this.control?.setValue(value);\r\n }\r\n\r\n public get GridSize() {\r\n const element = this.containerDiv?.nativeElement as HTMLElement;\r\n return element?.getBoundingClientRect().height -\r\n 36 - element?.getBoundingClientRect().height;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (this.editor?.instance && this.control && this.control.value) {\r\n this.editor.instance.option('value', this.control.value);\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.control?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(value => {\r\n if (this.valueChange && this.editor?.instance && this.control && this.control.value) {\r\n this.editor.instance.option('value', value);\r\n }\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n \r\n

{{'Send ' + (this.type === 'email' ? 'Email' : 'Fax')}}

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
To *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
To *
\r\n
\r\n \r\n \r\n \r\n \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 Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n Renderer2,\r\n} from '@angular/core';\r\nimport {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport {take} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../../shared/services/fusion-auth';\r\nimport {OrdersService} from '../../services/orders.service';\r\nimport {RequisitionService} from '../../services/requisition.service';\r\n\r\n@Component({\r\n selector: 'app-email-fax-dialog',\r\n templateUrl: './email-fax-dialog.component.html',\r\n styleUrls: ['./email-fax-dialog.component.scss'],\r\n})\r\nexport class EmailFaxDialogComponent {\r\n @Input() public popupVisible = false;\r\n @Input() public ids: number[] = [];\r\n @Input() public type = 'email';\r\n @Input() public from = 'order';\r\n @Output() public closeEvent = new EventEmitter();\r\n public isLoading = false;\r\n public emailFaxForm: UntypedFormGroup;\r\n public faxPattern: any = /^\\d*$/;\r\n\r\n constructor(private fb: UntypedFormBuilder, private fusionAuthService: FusionAuthService, private orderService: OrdersService,\r\n private renderer: Renderer2, private elem: ElementRef, private requisitionService: RequisitionService) {\r\n this.emailFaxForm = this.fb.group({\r\n email: [null, [Validators.required, Validators.email]],\r\n fax: [null, [Validators.required, Validators.pattern]],\r\n });\r\n }\r\n\r\n public onTitleRendered(e: any) {\r\n const elements = (e.titleElement as HTMLElement).getElementsByClassName('dx-toolbar-items-container') as HTMLCollectionOf;\r\n if (elements) {\r\n if (elements.length > 0) {\r\n this.renderer.setStyle(elements.item(0), 'height', '54px');\r\n }\r\n }\r\n }\r\n\r\n public close(): void {\r\n this.emailFaxForm.reset();\r\n if (this.type === 'email') {\r\n ValidationEngine.resetGroup('emailValidationGroup');\r\n } else {\r\n ValidationEngine.resetGroup('faxValidationGroup');\r\n }\r\n this.closeEvent.emit();\r\n }\r\n\r\n public async save() {\r\n let validForm: any;\r\n if (this.type === 'email') {\r\n validForm = ValidationEngine.validateGroup('emailValidationGroup');\r\n } else {\r\n validForm = ValidationEngine.validateGroup('faxValidationGroup');\r\n }\r\n\r\n if (validForm.isValid) {\r\n this.isLoading = true;\r\n const transmission = {\r\n ids: this.ids,\r\n type: this.type,\r\n value: this.type === 'email' ? this.emailFaxForm.get('email')?.value : this.emailFaxForm.get('fax')?.value,\r\n };\r\n\r\n const request = this.from === 'order' ? this.orderService.sendTransmission(transmission) :\r\n this.requisitionService.sendTransmission(transmission);\r\n\r\n request.pipe(take(1)).subscribe(response => {\r\n if (response) {\r\n this.isLoading = false;\r\n notify('The ' + this.type + ' was sent successfully', 'success');\r\n this.close();\r\n }\r\n }, () => {\r\n notify('We are having trouble communicating with our servers!', 'error');\r\n });\r\n }\r\n }\r\n}\r\n","\r\n \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 Component,\r\n EventEmitter,\r\n Input, OnDestroy,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {DxPopupComponent} from 'devextreme-angular';\r\n\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport DxDataGrid, {dxDataGridColumn} from 'devextreme/ui/data_grid';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {ScreenService} from '../../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-form-relation-selector',\r\n templateUrl: './form-relation-selector.component.html',\r\n styleUrls: ['./form-relation-selector.component.scss'],\r\n})\r\nexport class FormRelationSelectorComponent implements OnInit, OnDestroy {\r\n @ViewChild(DxPopupComponent, {static: true}) public popup?: DxPopupComponent;\r\n @ViewChild('formRelation', {static: false}) public formRelation?: DxDataGridComponent;\r\n @Input() public popupVisible: boolean = false;\r\n @Input() public title: string = '';\r\n @Input() public alternateDataSource: DataSource = new DataSource([]);\r\n @Input() public dataSource: DataSource = new DataSource([]);\r\n public currentDataSource: DataSource = new DataSource([]);\r\n @Input() public keyExpr = 'id';\r\n @Input() public columns: Array = [];\r\n @Output() public closeEvent = new EventEmitter();\r\n @Input() public control?: UntypedFormControl;\r\n @Input() public truncatedMode = false;\r\n public selectedKeys: number[] = [];\r\n\r\n public isPhone: boolean = false;\r\n public isLoading = false;\r\n public isPhoneLandscape: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private screen: ScreenService) {\r\n this.selectRows = this.selectRows.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.screen.changed.subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n });\r\n\r\n this.control?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(keys => {\r\n if (!keys) return;\r\n const isEquals = keys.length === this.selectedKeys.length &&\r\n this.selectedKeys.every((e, i) => e === keys[i]);\r\n if (!isEquals) {\r\n this.selectedKeys = keys;\r\n if (this.formRelation && this.formRelation.instance) {\r\n this.formRelation.instance.selectRows(this.selectedKeys, false);\r\n }\r\n }\r\n });\r\n }\r\n\r\n public onShowing() {\r\n this.currentDataSource = this.truncatedMode ?\r\n this.alternateDataSource :\r\n this.dataSource;\r\n this.currentDataSource?.load();\r\n }\r\n\r\n public selectRows(e: any) {\r\n this.formRelation?.instance.selectRows(this.selectedKeys, false);\r\n }\r\n\r\n public selectionChanged({component}: {component: any}) {\r\n this.selectedKeys = (component as DxDataGrid).getSelectedRowKeys();\r\n }\r\n\r\n public submitSelection() {\r\n this.closeEvent.emit(this.selectedKeys.length > 0 ? this.selectedKeys : undefined);\r\n }\r\n\r\n public close() {\r\n this.closeEvent.emit();\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 {{ label }}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \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, ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Output, ViewChild,\r\n} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {DxTextBoxComponent, DxDataGridComponent} from 'devextreme-angular';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {dxDataGridColumn} from 'devextreme/ui/data_grid';\r\nimport {of, Subject} from 'rxjs';\r\nimport {debounceTime, take, takeUntil} from 'rxjs/operators';\r\nimport {SearchableService} from '../../services/searchable.service';\r\n\r\n@Component({\r\n selector: 'app-form-relation-glass',\r\n templateUrl: './form-relation-glass.component.html',\r\n styleUrls: ['./form-relation-glass.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormRelationGlassComponent implements OnInit, OnDestroy, AfterViewInit {\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n @ViewChild('grid', {static: true}) public grid?: DxDataGridComponent;\r\n @ViewChild('textSelector', {static: true}) public textSelector?: DxTextBoxComponent;\r\n @Input() public optionalConfig?: {\r\n button: { text: string; icon: string; disabled: boolean; filterExpr?: () => any | null | undefined };\r\n };\r\n @Input() public label?: string;\r\n @Input() public searchEnabled = false;\r\n @Input() public searchService?: SearchableService | DataSource;\r\n @Input() public disabled = false;\r\n @Input() public maxHeight: string | number | undefined = '100%';\r\n @Input() public dataSource: DataSource = new DataSource([]);\r\n @Input() public alternateDataSource: DataSource = new DataSource([]);\r\n @Input() public controlName?: string;\r\n @Input() public keyExpr = 'id';\r\n @Input() public textSelectorPlaceholder: string = '';\r\n @Input() public textSelectorExpr?: string;\r\n @Input() public columns: Array = [];\r\n @Input() public filterPanel = false;\r\n @Input() public control?: UntypedFormControl;\r\n public currentDataSource: DataSource = new DataSource([]);\r\n @Output() public selectionChanged = new EventEmitter();\r\n private onDestroy$: Subject = new Subject();\r\n @Input() public gridHeight: number | string = '100%';\r\n\r\n public selectedKeys: number[] = [];\r\n public selectedRowKeys: number[] = [];\r\n public filter: any[] = ['id', '=', 0];\r\n public isPopupVisible = false;\r\n public truncated = false;\r\n\r\n constructor(private ref: ChangeDetectorRef) {\r\n this.updateDataSource = this.updateDataSource.bind(this);\r\n this.refresh = this.refresh.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n this.currentDataSource = new DataSource({store: this.dataSource?.store()});\r\n of(null)\r\n .pipe(take(1), debounceTime(1000))\r\n .subscribe(() => {\r\n this.control?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(keys => {\r\n if (!keys) return;\r\n const isEquals = keys.length === this.selectedKeys.length &&\r\n this.selectedKeys.every((e, i) => e === keys[i]);\r\n if (!isEquals) {\r\n this.selectedKeys = keys;\r\n this.updateDataSource();\r\n }\r\n });\r\n });\r\n\r\n this.control?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.selectedKeys = [];\r\n });\r\n }\r\n\r\n public updateDataSource() {\r\n if (!this.selectedKeys) return;\r\n const filters = this.selectedKeys?.map(k => [this.keyExpr, '=', k]);\r\n const filter: any[] = [];\r\n filters?.forEach((v, i) => {\r\n filter.push(v);\r\n if (i < filters.length - 1) {\r\n filter.push('or');\r\n }\r\n });\r\n if (filter.length > 0) {\r\n this.filter = filter;\r\n } else {\r\n this.filter = [this.keyExpr, '=', -1];\r\n }\r\n\r\n this.grid?.instance.getDataSource().filter([this.filter]);\r\n this.grid?.instance\r\n .getDataSource()\r\n .load()\r\n .then(() => {\r\n this.grid?.instance.refresh()\r\n .then(() => {\r\n if (this.ref) {\r\n this.ref.detectChanges();\r\n }\r\n });\r\n });\r\n }\r\n\r\n public closeDialog(selection: any) {\r\n if (!selection) {\r\n this.isPopupVisible = false;\r\n this.selectedKeys = this.control?.value;\r\n } else {\r\n this.isPopupVisible = false;\r\n this.selectedKeys = this.control?.value ? this.control?.value : [];\r\n for (const item of selection) {\r\n if (this.selectedKeys.indexOf(item) === -1) {\r\n this.selectedKeys.push(item);\r\n }\r\n }\r\n }\r\n this.updateDataSource();\r\n this.control?.setValue(this.selectedKeys);\r\n }\r\n\r\n public async pickerEnterKeyEvent() {\r\n const text = this.textSelector?.text.toUpperCase();/*.replace('.', '');*/\r\n // @ts-ignore\r\n const request = this.searchService?.search(text).pipe(take(1));\r\n request?.subscribe((items: any) => {\r\n if (items.data && items.data.length > 0) {\r\n const selected = this.control?.value;\r\n selected?.push(items.data[0][this.keyExpr]);\r\n this.selectedKeys = selected;\r\n this.updateDataSource();\r\n }\r\n this.textSelector?.instance.reset();\r\n });\r\n }\r\n\r\n public removeItem() {\r\n const selected = this.selectedRowKeys;\r\n const values = this.control?.value;\r\n for (const selectedKey of selected) {\r\n const index = values.findIndex((k: any) => selectedKey === k);\r\n if (index !== -1) {\r\n values.splice(index, 1);\r\n }\r\n }\r\n this.updateDataSource();\r\n this.control?.setValue(values);\r\n this.selectedRowKeys = [];\r\n }\r\n\r\n public search(truncated: boolean = false) {\r\n this.isPopupVisible = true;\r\n this.truncated = truncated;\r\n }\r\n\r\n public get FormRelationTitle() {\r\n return `Select ${this.label}`;\r\n }\r\n\r\n public get IsSelected(): boolean {\r\n return this.selectedRowKeys.length > 0;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.control?.value) {\r\n const keys = this.control?.value;\r\n const isEquals = keys.length === this.selectedKeys.length &&\r\n this.selectedKeys.every((e, i) => e === keys[i]);\r\n if (!isEquals) {\r\n this.selectedKeys = keys;\r\n }\r\n }\r\n this.updateDataSource();\r\n if (this.control?.value) {\r\n this.control.setValue(this.control.value);\r\n }\r\n this.refresh();\r\n\r\n if (typeof this.maxHeight === 'number' && this.controlsDiv) {\r\n this.gridHeight = this.maxHeight - this.controlsDiv.nativeElement.clientHeight - 32;\r\n } else {\r\n this.gridHeight = '100%';\r\n }\r\n }\r\n\r\n public refresh() {\r\n if (this.ref) {\r\n this.ref.detectChanges();\r\n }\r\n }\r\n}\r\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy, OnInit, Renderer2} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport * as Moment from 'moment';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\n\r\nfunction today() {\r\n return Moment().format('MM/DD/YYYY');\r\n}\r\n\r\n@Component({\r\n selector: 'app-from-to-date-range-selector',\r\n templateUrl: './from-to-date-range-selector.component.html',\r\n styleUrls: ['./from-to-date-range-selector.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FromToDateRangeSelectorComponent implements OnInit, OnDestroy {\r\n\r\n @Input() public startGroupControl?: UntypedFormControl;\r\n @Input() public endGroupControl?: UntypedFormControl;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n public startDate: string | number | Date | undefined = new Date();\r\n public endDate: string | number | Date | undefined = new Date();\r\n\r\n constructor(private renderer: Renderer2, private ref: ChangeDetectorRef) { }\r\n\r\n public handleChanges(value: Date, control?: UntypedFormControl) {\r\n control?.setValue(value);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.startGroupControl?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((value) => {\r\n if (value === today() || value === undefined || value === null) {\r\n this.startDate = new Date();\r\n }\r\n this.ref.detectChanges();\r\n });\r\n\r\n this.endGroupControl?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((value) => {\r\n if (value === undefined || value === null) {\r\n this.endDate = new Date();\r\n }\r\n this.ref.detectChanges();\r\n });\r\n }\r\n\r\n public onContentReady(e: any) {\r\n const element = e.element;\r\n if (e.component._pickerType === 'native') {\r\n const button = element.querySelector('.dx-texteditor-buttons-container');\r\n const input = element.querySelector('.dx-texteditor-input');\r\n this.renderer.setStyle(button, 'display', 'none');\r\n this.renderer.setStyle(input, 'padding-right', '5px');\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete()\r\n }\r\n}\r\n","
\r\n
\r\n
From
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
To
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import {Component, Input} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-loading-header',\r\n templateUrl: './loading-header.component.html',\r\n styleUrls: ['./loading-header.component.scss'],\r\n})\r\nexport class LoadingHeaderComponent {\r\n @Input() public loading: boolean = false;\r\n}\r\n","
\r\n

\r\n \r\n
\r\n","
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n Patient Id\r\n {{ PatientCode }}
\r\n Address\r\n {{ PatientAddress }}
\r\n Birthdate\r\n {{ PatientBirthDate }}
\r\n Gender\r\n {{ PatientGender }}
\r\n SSN\r\n {{ PatientSSN }}
\r\n Primary Physician\r\n {{ PatientPrimaryPhysician }}
\r\n
\r\n
\r\n\r\n","import {Component, Input} from '@angular/core';\r\nimport {DateHelperService} from '../../../../shared/services/general';\r\nimport {PatientEditable, PatientSearch} from '../../models/order-entry/patient';\r\nimport * as moment from 'moment';\r\n\r\n@Component({\r\n selector: 'app-patient-info-popup',\r\n templateUrl: './patient-info-popup.component.html',\r\n styleUrls: ['./patient-info-popup.component.scss'],\r\n})\r\nexport class PatientInfoPopupComponent {\r\n @Input() public selectedPatient?: PatientSearch | PatientEditable;\r\n public patientInfoVisible = false;\r\n\r\n constructor(public dateHelper: DateHelperService) {\r\n }\r\n\r\n public togglePatientInfo() {\r\n this.patientInfoVisible = !this.patientInfoVisible;\r\n }\r\n\r\n get PatientCode(): string {\r\n return this.selectedPatient ? this.selectedPatient.code : '';\r\n }\r\n\r\n get PatientPrimaryPhysician(): string {\r\n return this.selectedPatient && (this.selectedPatient as any).primaryPhysician ?\r\n (this.selectedPatient as any).primaryPhysician.lastName + ', ' + (this.selectedPatient as any).primaryPhysician.firstName : '';\r\n }\r\n\r\n get PatientBirthDate(): string {\r\n return this.selectedPatient ? moment(this.selectedPatient.birthDate).format('LL') : '';\r\n }\r\n\r\n get PatientGender(): string {\r\n return this.selectedPatient ? this.selectedPatient.gender : '';\r\n }\r\n\r\n get PatientSSN(): string {\r\n return this.selectedPatient ? this.selectedPatient.socialSecurityNumber : '';\r\n }\r\n\r\n get PatientAddress(): string {\r\n return this.selectedPatient\r\n ? `${this.selectedPatient.address}\r\n ${this.selectedPatient.zipCode ? '. ' + this.selectedPatient.zipCode.city : ''}\r\n ${this.selectedPatient.zipCode ? ', ' + this.selectedPatient.zipCode.state : ''}\r\n ${this.selectedPatient.zipCode ? ', ' + this.selectedPatient.zipCode.code : ''}`\r\n : '';\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n Client: {{ Client }}
\r\n Patient: {{ PatientFullName }} {{ DOB }} {{ Gender }}
\r\n Room: {{ Room }}\r\n Unit: {{ Unit }}
\r\n Ordering Physician: {{ Physician }}
\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 ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n} from '@angular/core';\r\nimport {UntypedFormControl} from '@angular/forms';\r\nimport {ActivatedRoute} from '@angular/router';\r\nimport {Subject} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\nimport {PhysicianViewModel} from 'src/app/shared/models/ocl';\r\nimport {DateHelperService} from 'src/app/shared/services/general/date-helper.service';\r\nimport {ScreenService} from '../../../../shared/services/general';\r\nimport {PatientEditable} from '../../models/order-entry/patient';\r\nimport {PatientService} from '../../services';\r\n\r\n@Component({\r\n selector: 'app-patient-physician-header',\r\n templateUrl: './patient-physician-header.component.html',\r\n styleUrls: ['./patient-physician-header.component.scss'],\r\n})\r\nexport class PatientPhysicianHeaderComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() public patientControl?: UntypedFormControl;\r\n @Input() public physicianControl?: UntypedFormControl;\r\n @Input() public signature?: any;\r\n @Output() public patientSelectionChanged = new EventEmitter();\r\n @Input() public disabled = false;\r\n public innerSignature?: any;\r\n public patient?: PatientEditable;\r\n public physician?: PhysicianViewModel;\r\n public isPhone: boolean = false;\r\n public isPhoneOrTablet: boolean = false;\r\n public lastPhysician?: PhysicianViewModel;\r\n public sameAsPrimary = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private dateHelper: DateHelperService,\r\n private route: ActivatedRoute,\r\n private patientService: PatientService,\r\n private screen: ScreenService,\r\n private ref: ChangeDetectorRef\r\n ) {\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.signature && changes.signature.currentValue !== undefined) {\r\n this.innerSignature = changes.signature.currentValue;\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n if ((this.route.snapshot.paramMap as any).params.patientId !== undefined) {\r\n this.patientService.getPatient((this.route.snapshot.paramMap as any).params.patientId)\r\n .pipe(take(1)).subscribe(patient => this.patient = patient);\r\n }\r\n this.patientControl?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(p => {\r\n this.patient = p;\r\n this.patientSelectionChanged.emit(p);\r\n });\r\n this.physicianControl?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(p => (this.physician = p));\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n public sameAsPrimaryPhysician(value: any) {\r\n this.sameAsPrimary = value;\r\n if (value) {\r\n this.lastPhysician = this.physician;\r\n const physician = this.patient && this.patient.primaryPhysician ? this.patient.primaryPhysician : undefined;\r\n this.physicianControl?.setValue(physician);\r\n } else {\r\n this.physicianControl?.setValue(this.lastPhysician);\r\n }\r\n }\r\n\r\n public get Client() {\r\n return this.patient ? (this.patient.client ? this.patient.client.name : '') : '';\r\n }\r\n\r\n public get PatientFullName() {\r\n return this.patient ? `${this.patient.firstName} ${this.patient.middleName\r\n ? this.patient.middleName : ''} ${this.patient.lastName}` : '';\r\n }\r\n\r\n public get DOB() {\r\n if (!this.patient) return '';\r\n if (!this.patient.birthDate) return '';\r\n return this.dateHelper.dateWithFormatWithoutUtc(this.patient.birthDate as Date, 'LL');\r\n }\r\n\r\n public get Gender() {\r\n return this.patient ? this.patient.gender : '';\r\n }\r\n\r\n public get Room() {\r\n return this.patient ? (this.patient.room ? this.patient.room.name : '') : '';\r\n }\r\n\r\n public get Unit() {\r\n if (!this.patient) {\r\n return '';\r\n }\r\n if (!this.patient.unit) {\r\n return '';\r\n }\r\n return this.patient ? this.patient.unit.name : '';\r\n }\r\n\r\n public get Physician() {\r\n return this.physician ? `${this.physician.lastName}, ${this.physician.firstName}` : '';\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n \r\n \r\n

\r\n {{ id === -1 ? 'Add Responsible Party' : 'Edit Responsible Party' }}\r\n

\r\n

\r\n {{ id === -1 ? 'Add Responsible Party' : 'Edit Responsible Party' }}\r\n

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Last Name *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
First Name *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Phone *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Mobile
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
Fax
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\r\nimport {AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {ScreenService} from '../../../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-patient-responsible-party-form-dialog',\r\n templateUrl: './patient-responsible-party-form-dialog.component.html',\r\n styleUrls: ['./patient-responsible-party-form-dialog.component.scss']\r\n})\r\nexport class PatientResponsiblePartyFormDialogComponent implements OnInit, OnDestroy {\r\n public responsiblePartiesForm: UntypedFormGroup = this.fb.group({\r\n firstName: new UntypedFormControl('', [Validators.required]),\r\n lastName: new UntypedFormControl('', [Validators.required]),\r\n address: new UntypedFormControl('', [Validators.required]),\r\n country: new UntypedFormControl(),\r\n state: new UntypedFormControl(),\r\n city: new UntypedFormControl(),\r\n zipCode: new UntypedFormControl(),\r\n zipCodeExtra: new UntypedFormControl('', [Validators.required]),\r\n phone: new UntypedFormControl('', [Validators.required]),\r\n mobile: new UntypedFormControl(),\r\n fax: new UntypedFormControl()\r\n });\r\n @Input() public popupVisible: boolean = false;\r\n @Input() public id = -1;\r\n @Output() public closed = new EventEmitter();\r\n public phoneMaskRule = {X: /[0-9]/};\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fb: UntypedFormBuilder, private screen: ScreenService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\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 public clear() {\r\n this.responsiblePartiesForm.get('firstName')?.setValue('');\r\n this.responsiblePartiesForm.get('lastName')?.setValue('');\r\n this.responsiblePartiesForm.get('address')?.setValue('');\r\n this.responsiblePartiesForm.get('country')?.setValue(null);\r\n this.responsiblePartiesForm.get('state')?.setValue(null);\r\n this.responsiblePartiesForm.get('city')?.setValue(null);\r\n this.responsiblePartiesForm.get('zipCode')?.setValue('');\r\n this.responsiblePartiesForm.get('zipCodeExtra')?.setValue('');\r\n this.responsiblePartiesForm.get('phone')?.setValue('');\r\n this.responsiblePartiesForm.get('mobile')?.setValue('');\r\n this.responsiblePartiesForm.get('fax')?.setValue('');\r\n }\r\n\r\n public close() {\r\n this.popupVisible = false;\r\n this.responsiblePartiesForm.reset();\r\n this.closed.emit();\r\n ValidationEngine.resetGroup('responsibleParty');\r\n ValidationEngine.resetGroup('address');\r\n }\r\n\r\n\r\n public save() {\r\n const responsibleParty = ValidationEngine.validateGroup('responsibleParty');\r\n const address = ValidationEngine.validateGroup('address');\r\n if (responsibleParty.isValid && address.isValid) {\r\n if (this.responsiblePartiesForm.get('zipCode')?.value) {\r\n const rp = this.responsiblePartiesForm.value;\r\n rp.firstName = rp.firstName.toUpperCase();\r\n rp.lastName = rp.lastName.toUpperCase();\r\n this.popupVisible = false;\r\n this.closed.emit(rp);\r\n this.clear();\r\n ValidationEngine.resetGroup('responsibleParty');\r\n ValidationEngine.resetGroup('address');\r\n } else {\r\n notify('Missing address information', 'error');\r\n }\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n Responsible Parties\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Add

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

Remove

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

Move Up

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

Move Down

\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \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, ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {PatientResponsiblePartyViewModel} from '../../../../shared/models/ocl';\r\nimport {ScreenService} from '../../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-patient-responsible-parties',\r\n templateUrl: './patient-responsible-parties.component.html',\r\n styleUrls: ['./patient-responsible-parties.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class PatientResponsiblePartiesComponent implements OnInit, AfterViewInit {\r\n @Input() public responsibleParties: PatientResponsiblePartyViewModel[] = [];\r\n @Input() public maxHeight: string | number = '100%';\r\n @Input() public gridHeight: number | string = '100%';\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n public isEditorVisible = false;\r\n public selectedRowKeys: PatientResponsiblePartyViewModel[] = [];\r\n @Output() public responsiblePartiesChanged = new EventEmitter();\r\n public gridSize: number = 120;\r\n public isPhone: boolean = false;\r\n public isPhoneOrTablet: boolean = false;\r\n public responsiveButtons: any;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private screen: ScreenService, private ref: ChangeDetectorRef) {\r\n this.responsiveButtons = [{\r\n name: 'Add',\r\n icon: 'add'\r\n }, {\r\n name: 'Remove',\r\n icon: 'trash',\r\n disabled: true\r\n }, {\r\n name: 'Up',\r\n icon: 'arrowup',\r\n disabled: true\r\n }, {\r\n name: 'Down',\r\n icon: 'arrowdown',\r\n disabled: true\r\n },\r\n ];\r\n }\r\n\r\n public showForm() {\r\n this.isEditorVisible = true;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.gridSize = this.GridSize;\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.refresh();\r\n });\r\n }\r\n\r\n public get GridSize() {\r\n const element = this.containerDiv?.nativeElement as HTMLElement;\r\n return element?.getBoundingClientRect().height -\r\n 32 - element?.getBoundingClientRect().height;\r\n }\r\n\r\n public formClosed(responsibleParty: PatientResponsiblePartyViewModel) {\r\n this.isEditorVisible = false;\r\n if (responsibleParty) {\r\n responsibleParty.order = responsibleParty.order ? responsibleParty.order : this.getNextOrder();\r\n this.responsibleParties.push(responsibleParty);\r\n this.responsiblePartiesChanged.emit(this.responsibleParties);\r\n }\r\n this.refresh();\r\n }\r\n\r\n public getNextOrder() {\r\n if (!this.responsibleParties) {\r\n return 1;\r\n }\r\n return this.responsibleParties.length > 0 ?\r\n Math.max(...this.responsibleParties.map(r => r.order)) + 1 :\r\n 1;\r\n }\r\n\r\n public changeUp() {\r\n const prev = Math.min(...this.getIndexesOfSelected()) - 1;\r\n\r\n if (prev >= 0) {\r\n this.responsibleParties[prev].order = this.responsibleParties[Math.max(...this.getIndexesOfSelected())].order;\r\n this.getIndexesOfSelected().forEach(index => this.responsibleParties[index].order--);\r\n this.responsibleParties.sort((a, b) => a.order - b.order);\r\n this.responsiblePartiesChanged.emit(this.responsibleParties);\r\n }\r\n this.refresh();\r\n }\r\n\r\n private getIndexesOfSelected() {\r\n const indexes: number[] = [];\r\n\r\n this.selectedRowKeys.forEach(rp => {\r\n // tslint:disable-next-line:max-line-length\r\n const index = this.responsibleParties.findIndex(r => r.firstName === rp.firstName && r.lastLame === rp.lastLame && r.address === rp.address && r.fax === rp.fax && r.mobile === rp.mobile && r.phone === rp.phone);\r\n indexes.push(index);\r\n });\r\n\r\n return indexes;\r\n }\r\n\r\n public changeDown() {\r\n const prev = Math.max(...this.getIndexesOfSelected()) + 1;\r\n\r\n if (prev < this.responsibleParties.length) {\r\n this.responsibleParties[prev].order = this.responsibleParties[Math.min(...this.getIndexesOfSelected())].order;\r\n this.getIndexesOfSelected().forEach(index => this.responsibleParties[index].order++);\r\n this.responsibleParties.sort((a, b) => a.order - b.order);\r\n this.responsiblePartiesChanged.emit(this.responsibleParties);\r\n }\r\n this.refresh();\r\n }\r\n\r\n public removeClicked() {\r\n this.selectedRowKeys.forEach(rp => {\r\n // tslint:disable-next-line:max-line-length\r\n const index = this.responsibleParties.findIndex(r => r.firstName === rp.firstName && r.lastLame === rp.lastLame && r.address === rp.address && r.fax === rp.fax && r.mobile === rp.mobile && r.phone === rp.phone);\r\n this.responsibleParties.splice(index, 1);\r\n });\r\n\r\n this.responsiblePartiesChanged.emit(this.responsibleParties);\r\n this.selectedRowKeys = [];\r\n this.refresh();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.selectedRowKeys = [];\r\n\r\n if (typeof this.maxHeight === 'number' && this.controlsDiv) {\r\n this.gridHeight = this.maxHeight - this.controlsDiv.nativeElement.clientHeight - 32;\r\n } else {\r\n this.gridHeight = '100%';\r\n }\r\n\r\n this.refresh();\r\n }\r\n\r\n public onItemClick(e: any) {\r\n switch (e.itemData.name) {\r\n case 'Up':\r\n this.changeUp();\r\n break;\r\n case 'Down':\r\n this.changeDown();\r\n break;\r\n case 'Add':\r\n this.showForm();\r\n break;\r\n case 'Remove':\r\n this.removeClicked();\r\n break;\r\n }\r\n }\r\n\r\n public selectionChange() {\r\n setTimeout(() => {\r\n this.changeStateButtons();\r\n }, 1000);\r\n }\r\n\r\n public changeStateButtons() {\r\n this.responsiveButtons = [{\r\n name: 'Add',\r\n icon: 'add'\r\n }, {\r\n name: 'Remove',\r\n icon: 'trash',\r\n disabled: this.selectedRowKeys.length === 0\r\n }, {\r\n name: 'Up',\r\n icon: 'arrowup',\r\n disabled: this.disableUp\r\n }, {\r\n name: 'Down',\r\n icon: 'arrowdown',\r\n disabled: this.disableDown\r\n }\r\n ];\r\n this.refresh();\r\n }\r\n\r\n public refresh() {\r\n if (this.ref) {\r\n this.ref.detectChanges();\r\n }\r\n }\r\n\r\n public get disableUp() {\r\n return this.selectedRowKeys.length !== 1 || this.responsibleParties === undefined || this.responsibleParties.length <= 1 ||\r\n (this.selectedRowKeys[0] as any).order === 1;\r\n }\r\n\r\n public get disableDown() {\r\n return this.selectedRowKeys.length !== 1 || this.responsibleParties === undefined || this.responsibleParties.length <= 1 ||\r\n (this.selectedRowKeys[0] as any).order === this.responsibleParties.length;\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n

{{subtitle}}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
Bed
\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 ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n} from '@angular/core';\r\nimport { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { BehaviorSubject, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { UnitViewModel } from '../../../../../shared/models/ocl';\r\nimport { Client } from '../../../models/order-entry/client';\r\nimport { PatientSearch } from '../../../models/order-entry/patient';\r\nimport { ClientService, PatientService } from '../../../services';\r\n\r\n@Component({\r\n selector: 'app-client-physician-selector-dialog',\r\n templateUrl: './client-physician-selector-dialog.component.html',\r\n styleUrls: ['./client-physician-selector-dialog.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class ClientPhysicianSelectorDialogComponent implements OnInit, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Input() public subtitle = '';\r\n @Input() public selectedPatient?: PatientSearch = {} as PatientSearch;\r\n @Output() public closeEvent = new EventEmitter();\r\n public clientPhysicianDialogForm: UntypedFormGroup = this.fb.group({\r\n client: [null, [Validators.required]],\r\n physician: [null],\r\n unit: [null],\r\n room: [null],\r\n bed: [''],\r\n });\r\n public role?: string;\r\n public units: BehaviorSubject = new BehaviorSubject(null as unknown as DataSource);\r\n public selectRooms: BehaviorSubject = new BehaviorSubject(null as unknown as DataSource);\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n public patientService: PatientService,\r\n public clientService: ClientService,\r\n private ref: ChangeDetectorRef,\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 public ngOnInit() {\r\n this.closeEvent.pipe(takeUntil(this.onDestroy$)).subscribe(patient => {\r\n if (patient) {\r\n this.popupVisible = false;\r\n }\r\n this.ref.detectChanges();\r\n });\r\n\r\n this.clientPhysicianDialogForm.get('client')?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe((client: Client) => {\r\n this.clientPhysicianDialogForm.get('unit')?.setValue(undefined);\r\n this.clientPhysicianDialogForm.get('room')?.setValue(undefined);\r\n\r\n if (client && client.unitsCount > 0) {\r\n this.units.next(new DataSource({\r\n store: this.clientService.clientUnitsCustomStore(client.id, this.units),\r\n }));\r\n this.selectRooms.next(new DataSource({\r\n store: this.clientService.clientRoomsCustomStore(client.id, this.selectRooms),\r\n paginate: true,\r\n pageSize: 10,\r\n }));\r\n } else {\r\n this.selectRooms.next(null as unknown as DataSource);\r\n this.units.next(null as unknown as DataSource);\r\n }\r\n this.ref.detectChanges();\r\n });\r\n\r\n this.clientPhysicianDialogForm.get('unit')?.valueChanges.pipe(takeUntil(this.onDestroy$))\r\n .subscribe((unit: UnitViewModel | number) => {\r\n if (unit) {\r\n this.selectRooms.next(new DataSource({\r\n store: this.clientService.clientRoomsByUnitCustomStore(typeof unit === 'number' ? unit : unit.id, this.selectRooms),\r\n paginate: true,\r\n pageSize: 10,\r\n }));\r\n\r\n const selectedRoom = this.clientPhysicianDialogForm.get('room')?.value;\r\n const selectedUnit = this.clientPhysicianDialogForm.get('unit')?.value;\r\n if (selectedRoom?.unitId !== selectedUnit.id) {\r\n this.clientPhysicianDialogForm.get('room')?.setValue(undefined);\r\n }\r\n }\r\n this.ref.detectChanges();\r\n });\r\n\r\n this.clientPhysicianDialogForm.get('room')?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(room => {\r\n if (room && !this.clientPhysicianDialogForm.get('unit')?.value) {\r\n this.clientPhysicianDialogForm.get('unit')?.setValue(room.unitId);\r\n }\r\n this.ref.detectChanges();\r\n });\r\n }\r\n\r\n public close(): void {\r\n this.clientPhysicianDialogForm.reset();\r\n this.closeEvent.emit();\r\n }\r\n\r\n public save() {\r\n if (this.clientPhysicianDialogForm.valid) {\r\n this.patientService.updatePatientClientPhysician({\r\n id: this.selectedPatient?.id,\r\n bed: this.clientPhysicianDialogForm.value.bed,\r\n clientId: this.clientPhysicianDialogForm.value.client.id,\r\n physicianId: this.clientPhysicianDialogForm.value.physician ? this.clientPhysicianDialogForm.value.physician.id : null,\r\n roomId: this.clientPhysicianDialogForm.value.room ? this.clientPhysicianDialogForm.value.room.id : null,\r\n })\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(patient => {\r\n this.clientPhysicianDialogForm.reset();\r\n this.ref.detectChanges();\r\n this.closeEvent.emit(patient);\r\n });\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n \r\n

\r\n Search Patient\r\n

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

Search before entering a new patient.

\r\n
\r\n
\r\n
\r\n
\r\n Last Name *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n First Name *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n DOB\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
SSN
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\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 Component,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnChanges, OnDestroy,\r\n OnInit,\r\n Output,\r\n Renderer2,\r\n SimpleChanges, ViewChild,\r\n} from '@angular/core';\r\nimport {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport {Router} from '@angular/router';\r\nimport {DxTextBoxComponent} from 'devextreme-angular';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport * as moment from 'moment';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {User} from '../../../../../shared/models/fusion-auth';\r\nimport {PatientViewModel} from '../../../../../shared/models/ocl';\r\nimport {FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {DOMService, ScreenService} from '../../../../../shared/services/general';\r\nimport {RecentPatientService} from '../../../../../shared/services/ocl';\r\nimport {PatientSearch, TransientPatient} from '../../../models/order-entry/patient';\r\nimport {PatientService} from '../../../services';\r\nimport * as Sentry from \"@sentry/angular-ivy\";\r\n\r\n\r\n@Component({\r\n selector: 'app-patient-selector-dialog',\r\n templateUrl: './patient-selector-dialog.component.html',\r\n styleUrls: ['./patient-selector-dialog.component.scss'],\r\n})\r\nexport class PatientSelectorDialogComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Input() public fromSearch = false;\r\n @Output() public closeEvent = new EventEmitter();\r\n\r\n private onDestroy$: Subject = new Subject();\r\n // @ts-ignore\r\n public searchedPatients: BehaviorSubject = new BehaviorSubject(null);\r\n @ViewChild('lastNameTextBox', {static: false}) public lastNameTextBox?: DxTextBoxComponent;\r\n public recentAvailable = false;\r\n public recentPatients?: PatientSearch[] | TransientPatient[];\r\n public patientDialogForm: UntypedFormGroup;\r\n public searched = false;\r\n public isLoading = false;\r\n public ssnMaskRule = {X: /[0-9]/};\r\n public today = Date.now();\r\n public firstDate = new Date('1/1/1900');\r\n public user?: User;\r\n public role?: string;\r\n public clientPopupVisible = false;\r\n public selectedPatient?: PatientSearch;\r\n public isPhone: boolean = false;\r\n public isPhoneLandscape: boolean = false;\r\n public isTablet: boolean = false;\r\n public clearButtonOptions: any;\r\n public newPatientButtonOptions: any;\r\n public closeButtonOptions: any;\r\n public buttons: any;\r\n public subtitle = '';\r\n\r\n constructor(\r\n private domService: DOMService,\r\n private router: Router,\r\n private fb: UntypedFormBuilder,\r\n public patientService: PatientService,\r\n public recentPatientService: RecentPatientService,\r\n private fusionAuthService: FusionAuthService,\r\n private screen: ScreenService,\r\n private renderer: Renderer2,\r\n ) {\r\n this.patientDialogForm = this.fb.group({\r\n lastName: ['', [Validators.required]],\r\n firstName: ['', [Validators.required]],\r\n dob: [''],\r\n ssn: [''],\r\n });\r\n\r\n this.clearButtonOptions = {\r\n text: 'Clear',\r\n onClick: () => {\r\n this.clear();\r\n },\r\n };\r\n\r\n this.newPatientButtonOptions = {\r\n text: 'New Patient',\r\n disabled: !this.searched,\r\n onClick: async () => {\r\n await this.newPatient();\r\n },\r\n };\r\n\r\n this.closeButtonOptions = {\r\n text: 'Close',\r\n onClick: () => {\r\n this.close();\r\n },\r\n };\r\n\r\n this.buttons = [\r\n {\r\n name: 'Clear',\r\n },\r\n {\r\n name: 'New Patient',\r\n disabled: true,\r\n },\r\n {\r\n name: 'Close',\r\n },\r\n ];\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n private getRecentPatientsDropDownGridElement(): HTMLElement {\r\n return this.domService.getElementsByClassname('dx-overlay-wrapper dx-dropdowneditor-overlay dx-popup-wrapper').item(0) as HTMLElement;\r\n }\r\n\r\n public resizeDropDown() {\r\n const element = this.getRecentPatientsDropDownGridElement();\r\n\r\n if (element.style.display === 'none') {\r\n element.style.display = 'contents';\r\n }\r\n\r\n if (element) {\r\n if (this.isTablet || this.isPhoneLandscape) {\r\n this.renderer.setStyle(element, 'width', '450px');\r\n this.renderer.setStyle(element.firstChild, 'width', '450px');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'width', '450px');\r\n } else {\r\n this.renderer.setStyle(element, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild, 'width', '580px');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'width', '580px');\r\n }\r\n this.renderer.setStyle(element, 'height', '38vh');\r\n this.renderer.setStyle(element.firstChild, 'height', '38vh');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'height', '38vh');\r\n }\r\n }\r\n\r\n public async onItemClick(e: any) {\r\n switch (e.itemData.name) {\r\n case 'Clear':\r\n this.clear();\r\n break;\r\n case 'New Patient':\r\n await this.newPatient();\r\n break;\r\n case 'Close':\r\n this.close();\r\n break;\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.isTablet = this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.isTablet = this.screen.sizes['screen-tablet'];\r\n });\r\n\r\n this.checkRecent();\r\n this.closeEvent.pipe(takeUntil(this.onDestroy$)).subscribe(patient => {\r\n if (patient) {\r\n this.recentPatientService.addRecentPatient(patient);\r\n const element = this.getRecentPatientsDropDownGridElement();\r\n if (element) {\r\n this.renderer.setStyle(element, 'display', 'none');\r\n }\r\n this.popupVisible = false;\r\n }\r\n this.clear();\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n private waitByUser() {\r\n this.user = this.fusionAuthService.Profile;\r\n if (this.user) {\r\n this.role = this.user.registrations[0].roles[0];\r\n } else {\r\n setTimeout(() => {\r\n this.waitByUser();\r\n }, 1000);\r\n }\r\n }\r\n\r\n @HostListener('window:keyup', ['$event'])\r\n public keyEvent(event: KeyboardEvent) {\r\n try {\r\n if (event.key === 'Enter' && this.popupVisible) {\r\n if (!this.fromSearch) {\r\n ValidationEngine.validateGroup('patientDialog');\r\n }\r\n this.submitSearch();\r\n }\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n }\r\n\r\n private checkRecent() {\r\n this.recentPatients = this.recentPatientService.getRecentPatients();\r\n this.recentAvailable = this.recentPatients.length > 0;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n this.renderer.setStyle(this.domService.getBody(), 'overflow', 'hidden');\r\n setTimeout(() => this.lastNameTextBox?.instance.instance().focus(), 1000);\r\n this.checkRecent();\r\n } else {\r\n this.renderer.setStyle(this.domService.getBody(), 'overflow', 'auto');\r\n }\r\n }\r\n\r\n public close(): void {\r\n this.patientDialogForm.reset();\r\n this.closeEvent.emit();\r\n }\r\n\r\n public rowClick(e: any) {\r\n if (e.rowType === 'data') {\r\n this.resultSelected(e.data);\r\n }\r\n }\r\n\r\n public clear(): void {\r\n ValidationEngine.resetGroup('patientDialog');\r\n this.patientDialogForm.reset();\r\n // @ts-ignore\r\n this.searchedPatients.next(null);\r\n }\r\n\r\n public resultSelected(patient: PatientSearch): void {\r\n if (patient) {\r\n this.selectedPatient = patient;\r\n this.role = this.user?.registrations[0].roles[0];\r\n this.subtitle = \"\";\r\n if (!patient.client.webAccess) {\r\n this.clientPopupVisible = true;\r\n //this.subtitle = \"Patient client is not allowed to be accessed from the portal.\";\r\n return;\r\n }\r\n if (this.role === 'Client Basic' || this.role === 'Client Admin') {\r\n const clientIds = this.user?.data.clients;\r\n this.patientService.checkPatientClients(patient.id as number, clientIds as number[])\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(result => {\r\n this.clientPopupVisible = !result && !this.fromSearch;\r\n if (!this.clientPopupVisible) {\r\n this.closeForm(patient);\r\n }\r\n });\r\n } else {\r\n this.closeForm(patient);\r\n }\r\n }\r\n }\r\n\r\n private closeForm(patient: PatientSearch) {\r\n this.patientDialogForm.reset();\r\n // @ts-ignore\r\n this.searchedPatients.next(null);\r\n this.closeEvent.emit(patient);\r\n }\r\n\r\n public submitSearch() {\r\n if (this.patientDialogForm.valid || this.fromSearch) {\r\n const patient = {\r\n lastName: this.patientDialogForm.value.lastName,\r\n firstName: this.patientDialogForm.value.firstName,\r\n dob: this.patientDialogForm.value.dob,\r\n ssn: this.patientDialogForm.value.ssn,\r\n };\r\n this.isLoading = true;\r\n const role = this.user?.registrations[0].roles[0];\r\n const clientIds = role === 'Client Basic' || role === 'Client Admin' ? this.user?.data.clients : [];\r\n const physicianIds = role === 'Physician' ? this.user?.data.physicians : [];\r\n\r\n if (patient.dob !== null && patient.dob !== '' && patient.dob !== undefined) {\r\n patient.dob = moment(patient.dob).format('MM/DD/YYYY');\r\n } else {\r\n patient.dob = null;\r\n }\r\n\r\n this.searchedPatients.next(new DataSource({\r\n store: this.patientService.searchPatient(\r\n patient.firstName,\r\n patient.lastName,\r\n patient.dob,\r\n patient.ssn,\r\n clientIds as number[],\r\n physicianIds as number[],\r\n this.fromSearch,\r\n this.searchedPatients\r\n )\r\n }));\r\n\r\n this.searched = true;\r\n this.isLoading = false;\r\n\r\n this.buttons = [\r\n {\r\n name: 'Clear',\r\n },\r\n {\r\n name: 'New Patient',\r\n disabled: false,\r\n },\r\n {\r\n name: 'Close',\r\n },\r\n ];\r\n }\r\n }\r\n\r\n public async newPatient() {\r\n if (this.patientDialogForm.get('dob')?.value !== '') {\r\n this.patientDialogForm.get('dob')?.setValue(moment(this.patientDialogForm.get('dob')?.value).format('MM/DD/YYYY'));\r\n }\r\n await this.router.navigate(['secured/patients/form', {\r\n ...this.patientDialogForm.value,\r\n redirectToPath: this.router.url,\r\n }]);\r\n }\r\n\r\n public closeDialog(patient: PatientSearch): void {\r\n if (patient) {\r\n this.patientDialogForm.reset();\r\n // @ts-ignore\r\n this.searchedPatients.next(null);\r\n this.closeEvent.emit(patient);\r\n this.selectedPatient = patient;\r\n }\r\n this.clientPopupVisible = false;\r\n }\r\n\r\n public onBirthDateReady(e: any) {\r\n const element = e.element;\r\n if (e.component._pickerType === 'native') {\r\n const button = element.querySelector('.dx-texteditor-buttons-container');\r\n const input = element.querySelector('.dx-texteditor-input');\r\n this.renderer.setStyle(button, 'display', 'none');\r\n this.renderer.setStyle(input, 'padding-right', '5px');\r\n }\r\n }\r\n\r\n public dropdownButtonReady(e: any) {\r\n const button = e.element.querySelector('.dx-button-content');\r\n this.renderer.setStyle(button, 'padding-left', '5px');\r\n this.renderer.setStyle(button, 'padding-right', '5px');\r\n }\r\n}\r\n","\r\n\r\n\r\n \r\n\r\n\r\n\r\n
\r\n
\r\n
Patient
\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 {AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, Renderer2} from '@angular/core';\r\nimport {AbstractControl, UntypedFormControl} from '@angular/forms';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport {confirm} from 'devextreme/ui/dialog';\r\nimport {Subject} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\nimport {DateHelperService, ScreenService} from '../../../../shared/services/general';\r\nimport {PatientEditable} from '../../models/order-entry/patient';\r\nimport {PatientService} from '../../services';\r\n\r\n@Component({\r\n selector: 'app-patient-selector',\r\n templateUrl: './patient-selector.component.html',\r\n styleUrls: ['./patient-selector.component.scss'],\r\n})\r\nexport class PatientSelectorComponent implements OnInit, AfterViewInit, OnDestroy {\r\n @Input() public control: AbstractControl | UntypedFormControl | null | undefined = null;\r\n @Input() public buttonMode = false;\r\n @Input() public disabled = false;\r\n\r\n public isPopupVisible = false;\r\n public selectedPatient?: PatientEditable;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(public dateHelper: DateHelperService,\r\n private host: ElementRef,\r\n private renderer: Renderer2,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private screen: ScreenService,\r\n private patientService: PatientService) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.control?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(value => {\r\n if (value === undefined || value === null) {\r\n this.selectedPatient = undefined;\r\n }\r\n });\r\n\r\n if ((this.route.snapshot.paramMap as any).params.patientId !== undefined) {\r\n this.patientService.getPatient((this.route.snapshot.paramMap as any).params.patientId)\r\n .pipe(take(1)).subscribe(patient => {\r\n this.control?.setValue(patient);\r\n this.selectedPatient = patient;\r\n });\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.buttonMode) {\r\n this.renderer.setStyle(this.host.nativeElement, 'width', '120px');\r\n } else {\r\n if (this.screen.sizes['screen-x-small']) {\r\n this.renderer.setStyle(this.host.nativeElement, 'width', '100%');\r\n } else {\r\n this.renderer.setStyle(this.host.nativeElement, 'width', '200px');\r\n }\r\n }\r\n this.control?.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(patient => this.selectedPatient = patient);\r\n }\r\n\r\n public showSearch(): void {\r\n if (!this.buttonMode) {\r\n this.isPopupVisible = true;\r\n } else {\r\n if (this.selectedPatient === undefined) {\r\n this.isPopupVisible = true;\r\n } else {\r\n const response = confirm('You will lose all your changes. Are you sure?', 'Lose Changes Alert');\r\n // @ts-ignore\r\n response.then(r => {\r\n if (r) {\r\n this.router.navigate(['secured/patients/form', {\r\n ...this.selectedPatient,\r\n redirectToPath: this.router.url,\r\n }]);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n get PatientFullName(): string {\r\n return this.selectedPatient ? `${this.selectedPatient.lastName}, ${this.selectedPatient.firstName}` : '';\r\n }\r\n\r\n public closeDialog(patient: PatientEditable): void {\r\n if (patient) {\r\n this.selectedPatient = patient;\r\n this.control?.setValue(patient);\r\n }\r\n this.isPopupVisible = false;\r\n }\r\n\r\n public clear() {\r\n this.selectedPatient = undefined;\r\n this.control?.setValue(null);\r\n }\r\n\r\n get SearchBtnText(): string {\r\n return this.selectedPatient ? 'Edit Patient' : 'Select Patient';\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 Search Physician\r\n

\r\n

\r\n Search Physician\r\n

\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Last Name\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n First Name\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n NPI\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\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 Component,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {UntypedFormBuilder, UntypedFormGroup} from '@angular/forms';\r\nimport {DxTextBoxComponent} from 'devextreme-angular';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {User} from '../../../../../shared/models/fusion-auth';\r\nimport {FusionAuthService} from '../../../../../shared/services/fusion-auth';\r\nimport {DOMService, ScreenService} from '../../../../../shared/services/general';\r\nimport {Physician} from '../../../models/order-entry/physician';\r\nimport {PhysicianService} from '../../../services/physician.service';\r\nimport * as Sentry from \"@sentry/angular-ivy\";\r\n\r\n@Component({\r\n selector: 'app-physician-selector-dialog',\r\n templateUrl: './physician-selector-dialog.component.html',\r\n styleUrls: ['./physician-selector-dialog.component.scss'],\r\n})\r\nexport class PhysicianSelectorDialogComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Input() public patientClientId = -1;\r\n @Output() public closeEvent = new EventEmitter();\r\n\r\n public physicianDialogForm: UntypedFormGroup;\r\n @ViewChild('lastNameTextBox', {static: false}) public lastNameTextBox?: DxTextBoxComponent;\r\n public isLoading = false;\r\n // @ts-ignore\r\n public searchedPhysicians: BehaviorSubject = new BehaviorSubject(null);\r\n public user: User;\r\n public isPhone: boolean = false;\r\n public isTablet: boolean = false;\r\n public isPhoneLandscape: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fb: UntypedFormBuilder, public physicianService: PhysicianService,\r\n private domService: DOMService,\r\n private fusionAuthService: FusionAuthService, private screen: ScreenService) {\r\n this.physicianDialogForm = this.fb.group({\r\n lastName: [''],\r\n firstName: [''],\r\n npi: [''],\r\n sameAsClient: [false],\r\n });\r\n\r\n this.user = fusionAuthService.Profile;\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.screen) {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.isTablet = this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.isTablet = this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\r\n const body = this.domService.getBody();\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n if (body) {\r\n body.style.overflow = 'hidden';\r\n }\r\n setTimeout(() => {\r\n this.lastNameTextBox?.instance.instance().focus();\r\n }, 1000);\r\n } else {\r\n if (body) {\r\n body.style.overflow = 'auto';\r\n }\r\n }\r\n }\r\n\r\n @HostListener('window:keyup', ['$event'])\r\n public keyEvent(event: KeyboardEvent) {\r\n try {\r\n if (event.key === 'Enter' && this.popupVisible) {\r\n if (this.physicianDialogForm.valid) {\r\n this.submitSearch();\r\n }\r\n }\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n }\r\n\r\n public rowClick(e: any) {\r\n if (e.rowType === 'data') {\r\n this.resultSelected(e.data);\r\n }\r\n }\r\n\r\n public close(): void {\r\n this.physicianDialogForm.reset();\r\n // @ts-ignore\r\n this.searchedPhysicians.next(undefined);\r\n this.closeEvent.emit();\r\n }\r\n\r\n public resultSelected(physician: Physician): void {\r\n if (physician) {\r\n this.physicianDialogForm.reset();\r\n // @ts-ignore\r\n this.searchedPhysicians.next(undefined);\r\n this.closeEvent.emit(physician);\r\n }\r\n }\r\n\r\n public submitSearch() {\r\n if (this.physicianDialogForm.valid) {\r\n const physician = {\r\n lastName: this.physicianDialogForm.value.lastName,\r\n firstName: this.physicianDialogForm.value.firstName,\r\n npi: this.physicianDialogForm.value.npi,\r\n patientClientId: this.physicianDialogForm.value.sameAsClient ? this.patientClientId : -1,\r\n };\r\n this.isLoading = true;\r\n\r\n /*const role = this.user.registrations[0].roles[0];\r\n const clientIds = role === 'Client Basic' || role === 'Client Admin' ? this.user.data.clients : [];*/\r\n\r\n this.searchedPhysicians.next(new DataSource({\r\n store: this.physicianService.searchCustomStore(\r\n physician.firstName,\r\n physician.lastName,\r\n physician.npi,\r\n physician.patientClientId,\r\n [],\r\n this.searchedPhysicians\r\n )\r\n }));\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public ready(e: any) {\r\n this.lastNameTextBox = e.component;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n\r\n\r\n \r\n\r\n\r\n\r\n
\r\n
\r\n
{{ label }}
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {AbstractControl} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {Physician} from '../../models/order-entry/physician';\r\n\r\n@Component({\r\n selector: 'app-physician-selector',\r\n templateUrl: './physician-selector.component.html',\r\n styleUrls: ['./physician-selector.component.scss'],\r\n})\r\nexport class PhysicianSelectorComponent implements OnInit, OnDestroy {\r\n @Input() public control: AbstractControl | null | undefined;\r\n @Input() public buttonMode = true;\r\n @Input() public label ? = 'Physician';\r\n @Input() public disabled = false;\r\n @Input() public validationGroup: string = '';\r\n @Input() public required ? = false;\r\n @Input() public patientClientId = 0;\r\n\r\n public isPopupVisible = false;\r\n public selectedPhysician?: Physician;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n public ngOnInit() {\r\n this.control?.valueChanges\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(value => {\r\n if (value === undefined || value === null) {\r\n this.selectedPhysician = undefined;\r\n } else {\r\n this.selectedPhysician = value;\r\n }\r\n });\r\n }\r\n\r\n public showSearch(): void {\r\n this.isPopupVisible = true;\r\n }\r\n\r\n public closeDialog(physician: Physician): void {\r\n if (physician) {\r\n this.selectedPhysician = physician;\r\n this.control?.setValue(physician);\r\n }\r\n this.isPopupVisible = false;\r\n }\r\n\r\n public clear() {\r\n this.selectedPhysician = undefined;\r\n this.control?.setValue(null);\r\n }\r\n\r\n public get SearchPhysicianText() {\r\n return this.selectedPhysician ? 'Edit Physician' : 'Search Physician';\r\n }\r\n\r\n get PhysicianFullName(): string {\r\n return this.selectedPhysician ? `${this.selectedPhysician.lastName}, ${this.selectedPhysician.firstName}` : '';\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
Printer
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport {confirm} from 'devextreme/ui/dialog';\r\nimport {forkJoin} from 'rxjs';\r\nimport {take} from 'rxjs/operators';\r\nimport {RequisitionLabelViewModel} from '../../../../shared/models/ocl';\r\nimport {UrlProviderService} from '../../../../shared/services/general';\r\nimport {RequisitionService} from '../../services/requisition.service';\r\nimport {OrderService} from \"../../../features/result-entry/services/order.service\";\r\nimport {OrdersService} from \"../../services/orders.service\";\r\n\r\n@Component({\r\n selector: 'app-printer-dialog-multiple',\r\n templateUrl: './printer-dialog-multiple.component.html',\r\n styleUrls: ['./printer-dialog-multiple.component.scss'],\r\n})\r\nexport class PrinterDialogMultipleComponent implements OnInit, OnChanges {\r\n @Input() public isOrder: boolean = false;\r\n @Input() public popupVisible = false;\r\n @Input() public requisitionIds?: number[];\r\n @Output() public closeEvent = new EventEmitter();\r\n\r\n public isLoading = false;\r\n private clientAppUpAndRunning = false;\r\n private clientAppBlocked = false;\r\n private showingConfirm = false;\r\n public loading = false;\r\n public printers: [] = [];\r\n public selectedPrinter: any = undefined;\r\n\r\n constructor(private requisitionService: RequisitionService, private orderService: OrdersService, private urlProvider: UrlProviderService) {\r\n }\r\n\r\n // tslint:disable-next-line:use-lifecycle-interface\r\n public ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\r\n if (changes.popupVisible && changes.popupVisible.currentValue) {\r\n JSPM.JSPrintManager.license_url = `${this.urlProvider.ServerUrl}jspm`;\r\n JSPM.JSPrintManager.auto_reconnect = true;\r\n JSPM.JSPrintManager.start()\r\n .then(() => console.log('Printer tool connected'))\r\n .catch(e => {\r\n Sentry.captureException(e);\r\n });\r\n this.checkPrinterClientApp();\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n JSPM.JSPrintManager.auto_reconnect = false;\r\n }\r\n\r\n public closing() {\r\n this.closeEvent.emit();\r\n }\r\n\r\n public get LoadingPrinters() {\r\n return this.loading && this.printers.length === 0;\r\n }\r\n\r\n private checkPrinterClientApp() {\r\n this.loading = true;\r\n JSPM.JSPrintManager.WS.onStatusChanged = (() => {\r\n const instance = this;\r\n return function WSStatusChanged() {\r\n if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Open) {\r\n JSPM.JSPrintManager.getPrintersInfo().then(printersList => {\r\n // @ts-ignore\r\n instance.printers = printersList;\r\n instance.loading = false;\r\n }).catch(e => {\r\n Sentry.captureException(e);\r\n });\r\n } else if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Closed) {\r\n if (!instance.showingConfirm && instance.popupVisible) {\r\n const response = confirm(\r\n // tslint:disable-next-line:max-line-length\r\n `Printer Client App is not running. Restart app to use feature or download it. \\n Would you like to be redirected to download site?`,\r\n 'Download Confirmation',\r\n );\r\n instance.showingConfirm = true;\r\n instance.loading = false;\r\n\r\n const closeEvent = instance.closeEvent;\r\n response.then(result => {\r\n instance.clientAppUpAndRunning = false;\r\n instance.showingConfirm = false;\r\n if (result) {\r\n window.open('https://www.dropbox.com/t/b04SMciBx6QJefst', '_blank');\r\n }\r\n closeEvent.emit();\r\n });\r\n }\r\n } else if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Blocked) {\r\n console.log('JSPM has blacklisted this website!');\r\n instance.clientAppBlocked = true;\r\n instance.clientAppUpAndRunning = true;\r\n }\r\n };\r\n })();\r\n }\r\n\r\n public sendToPrinter() {\r\n JSPM.JSPrintManager.start()\r\n .then(() => console.log('Printer tool connected'))\r\n .catch(e => {\r\n Sentry.captureException(e);\r\n });\r\n JSPM.JSPrintManager.WS.onStatusChanged = () => {\r\n if (JSPM.JSPrintManager.websocket_status === JSPM.WSStatus.Open) {\r\n this.isLoading = true;\r\n const cpjg = new JSPM.ClientPrintJobGroup();\r\n\r\n const arrayRequest: any[] = [];\r\n this.requisitionIds?.forEach(x => {\r\n const labels = this.isOrder ? this.orderService.getLabels(x) : this.requisitionService.getLabels(x);\r\n arrayRequest.push(labels);\r\n });\r\n\r\n let requisitionLabels: RequisitionLabelViewModel[] = [];\r\n forkJoin(arrayRequest).pipe(take(1)).subscribe({\r\n next: value => {\r\n // tslint:disable-next-line:prefer-for-of\r\n for (let i = 0; i < value.length; i++) {\r\n requisitionLabels = requisitionLabels.concat(value[i] as any);\r\n }\r\n },\r\n complete: () => {\r\n requisitionLabels.forEach((label) => {\r\n const cpj2 = new JSPM.ClientPrintJob();\r\n cpj2.clientPrinter = new JSPM.InstalledPrinter(this.selectedPrinter.name);\r\n if (this.selectedPrinter.name.toUpperCase().includes('ZPL') || this.selectedPrinter.name.toUpperCase().includes('ZEBRA')) {\r\n cpj2.printerCommands = label.zpl;\r\n }\r\n\r\n if (this.selectedPrinter.name.toUpperCase().includes('EPL')) {\r\n cpj2.printerCommands = label.epl;\r\n }\r\n\r\n cpjg.jobs.push(cpj2);\r\n });\r\n this.isLoading = false;\r\n cpjg.sendToClient()\r\n .then(() => console.log('Printer tool connected'))\r\n .catch(e => {\r\n Sentry.captureException(e);\r\n });\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n public printerChanged(printer: any) {\r\n if (printer.value) {\r\n const printerString = JSON.stringify(printer.value);\r\n localStorage.setItem('printer', printerString);\r\n this.selectedPrinter = printer.value;\r\n } else {\r\n // @ts-ignore\r\n localStorage.setItem('printer', null);\r\n }\r\n }\r\n}\r\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-search-btn',\r\n templateUrl: './search-btn.component.html',\r\n styleUrls: ['./search-btn.component.scss']\r\n})\r\nexport class SearchBtnComponent {\r\n @Output() public btnClick = new EventEmitter();\r\n @Input() public disabled = true;\r\n}\r\n","\r\n","
\r\n
\r\n
{{ label }}
\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 Component,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\n\r\nimport { AbstractControl } from '@angular/forms';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { DxSelectBoxComponent } from 'devextreme-angular';\r\n\r\n@Component({\r\n selector: 'app-selector',\r\n templateUrl: './selector.component.html',\r\n styleUrls: ['./selector.component.scss'],\r\n})\r\nexport class SelectorComponent implements OnInit, OnChanges {\r\n @Input() public label?: string;\r\n @Input() public remoteOperations = false;\r\n @ViewChild(DxSelectBoxComponent, { static: true })\r\n public dropDown?: DxSelectBoxComponent;\r\n @Input() public items: DataSource = new DataSource([]);\r\n @Input() public control: AbstractControl | null | undefined;\r\n @Input() public displayExpr: string = '';\r\n @Input() public keyExpr: string = '';\r\n @Input() public validationGroup: string = '';\r\n @Input() public required? = false;\r\n public selectedObject?: { id: number };\r\n\r\n public ngOnInit(): void {\r\n this.control?.valueChanges.subscribe((value) => {\r\n if (value === undefined || value === null) {\r\n this.dropDown?.instance.reset();\r\n } else {\r\n if (this.dropDown)\r\n if (typeof value === 'object') {\r\n this.dropDown.value = value[this.keyExpr];\r\n } else {\r\n this.dropDown.value = value;\r\n }\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (!changes.items && this.dropDown) {\r\n this.dropDown.items = [];\r\n return;\r\n }\r\n if (\r\n changes.items.currentValue === null ||\r\n changes.items.currentValue === undefined\r\n ) {\r\n if (this.dropDown) this.dropDown.items = [];\r\n }\r\n }\r\n\r\n public selectionChange(e: any) {\r\n if (this.control && e.selectedItem && this.dropDown?.dataSource) {\r\n this.control.setValue(e.selectedItem);\r\n }\r\n }\r\n}\r\n","
\r\n \"Signature\"
\r\n Electronically signed by: {{signature?.signature?.userName}}
{{SignatureDate}}\r\n
\r\n","import {Component, Input, OnChanges, SimpleChanges} from '@angular/core';\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport * as Moment from 'moment-timezone';\r\nimport {take} from 'rxjs/operators';\r\nimport {RequisitionSignature} from '../../models/signature';\r\nimport {RequisitionService} from '../../services/requisition.service';\r\nimport {OrdersService} from \"../../services/orders.service\";\r\n\r\n@Component({\r\n selector: 'app-signature-viewer',\r\n templateUrl: './signature-viewer.component.html',\r\n styleUrls: ['./signature-viewer.component.scss'],\r\n})\r\nexport class SignatureViewerComponent implements OnChanges {\r\n @Input() public requisitionId?: number;\r\n @Input() public orderId?: number;\r\n @Input() public signature?: RequisitionSignature;\r\n\r\n constructor(private sanitizer: DomSanitizer, private requisitionService: RequisitionService, private orderService: OrdersService) {\r\n }\r\n\r\n public get SignatureDate() {\r\n if (!this.signature) {\r\n return '';\r\n }\r\n const tz = Moment.tz.guess();\r\n return Moment(this.signature.signedDateTime).format('LLLL');\r\n }\r\n\r\n public get HasImage(): boolean {\r\n if (!this.signature) {\r\n return false;\r\n }\r\n if (!this.signature.signature) {\r\n return false;\r\n }\r\n return !(!this.signature.signature || this.signature.signature.imageSignature === '');\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.signature && changes.signature.currentValue && !this.requisitionId) {\r\n if (this.signature && this.signature.signature && this.signature.signature.imageSignature) {\r\n this.signature.signature.imageSignature = this.signature.signature.imageSignature.includes('data:image') ? this.signature.signature.imageSignature :\r\n this.sanitizer.bypassSecurityTrustResourceUrl('data:image;base64,' + this.signature.signature.imageSignature) as any;\r\n }\r\n }\r\n\r\n if (changes.requisitionId && changes.requisitionId.currentValue) {\r\n this.requisitionService.requisitionSignature(this.requisitionId as number)\r\n .pipe(take(1))\r\n .subscribe(value => {\r\n this.signature = value;\r\n if (this.signature?.signature?.imageSignature && this.signature.signature.imageSignature !== '') {\r\n this.signature.signature.imageSignature = this.sanitizer\r\n .bypassSecurityTrustResourceUrl('data:image;base64,' + this.signature.signature.imageSignature) as any;\r\n }\r\n });\r\n }\r\n\r\n if (changes.orderId && changes.orderId.currentValue) {\r\n this.orderService.orderSignature(this.orderId as number)\r\n .pipe(take(1))\r\n .subscribe(value => {\r\n this.signature = value;\r\n if (this.signature?.signature?.imageSignature && this.signature.signature.imageSignature !== '') {\r\n this.signature.signature.imageSignature = this.sanitizer\r\n .bypassSecurityTrustResourceUrl('data:image;base64,' + this.signature.signature.imageSignature) as any;\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import {CommonModule} from '@angular/common';\r\nimport {Component, NgModule} from '@angular/core';\r\nimport {DxScrollViewModule} from 'devextreme-angular';\r\n\r\n@Component({\r\n selector: 'app-single-card',\r\n templateUrl: './single-card.component.html',\r\n styleUrls: ['./single-card.component.scss']\r\n})\r\nexport class SingleCardComponent {\r\n}\r\n\r\n@NgModule({\r\n imports: [CommonModule, DxScrollViewModule],\r\n exports: [SingleCardComponent],\r\n declarations: [SingleCardComponent]\r\n})\r\nexport class SingleCardModule {\r\n}\r\n","\r\n
\r\n \r\n
\r\n
\r\n","\r\n \r\n

Update Bill To

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import {Component, EventEmitter, Input, Output, Renderer2} from '@angular/core';\r\nimport notify from 'devextreme/ui/notify';\r\nimport {take} from 'rxjs/operators';\r\nimport {OrdersService} from '../../services/orders.service';\r\nimport {RequisitionService} from '../../services/requisition.service';\r\n\r\n@Component({\r\n selector: 'app-update-bill-to',\r\n templateUrl: './update-bill-to.component.html',\r\n styleUrls: ['./update-bill-to.component.scss'],\r\n})\r\nexport class UpdateBillToComponent {\r\n @Input() public popupVisible = false;\r\n @Input() public from = 'order';\r\n @Input() public ids: number[] = [];\r\n @Output() public closeEvent = new EventEmitter();\r\n public isLoading = false;\r\n public selectedBillTo?: string;\r\n\r\n constructor(private renderer: Renderer2, private orderService: OrdersService, private requisitionService: RequisitionService) {\r\n }\r\n\r\n public close(): void {\r\n this.closeEvent.emit();\r\n }\r\n\r\n public save(): void {\r\n this.isLoading = true;\r\n const request = this.from === 'order' ? this.orderService.changeBillTo(this.selectedBillTo as string, this.ids) :\r\n this.requisitionService.changeBillTo(this.selectedBillTo as string, this.ids);\r\n\r\n request.pipe(take(1)).subscribe(() => {\r\n this.isLoading = false;\r\n notify('The bill to was updated successfully', 'success', 3000);\r\n this.closeEvent.emit();\r\n });\r\n }\r\n\r\n public billTypeChanged(billTo: any) {\r\n this.selectedBillTo = billTo;\r\n }\r\n\r\n public onTitleRendered(e: any) {\r\n const elements = (e.titleElement as HTMLElement).getElementsByClassName('dx-toolbar-items-container') as HTMLCollectionOf;\r\n if (elements) {\r\n if (elements.length > 0) {\r\n this.renderer.setStyle(elements.item(0), 'height', '54px');\r\n }\r\n }\r\n }\r\n}\r\n","export class BaseDataTransferObject {\r\n public id!: number;\r\n}\r\n","import { BaseDataTransferObject } from '../base-data-transfer-object';\r\n\r\nexport enum BillTo {\r\n Insurance,\r\n Client,\r\n Patient,\r\n None,\r\n}\r\n\r\nexport class BillType extends BaseDataTransferObject {\r\n public code: string;\r\n public name: string;\r\n public allPayers: boolean;\r\n\r\n constructor({code, name, allPayers}: {code: string, name: string, allPayers: boolean}) {\r\n super();\r\n this.code = code;\r\n this.name = name;\r\n this.allPayers = allPayers;\r\n }\r\n}\r\n\r\nexport class BillTypeWithPayers extends BillType {\r\n public payers?: number[] = undefined;\r\n}\r\n\r\n","import { BaseDataTransferObject } from '../base-data-transfer-object';\r\nimport { ZipCode } from '../common';\r\n\r\nexport class BillingInformation extends BaseDataTransferObject {\r\n public patientId?: number;\r\n public billTypeId?: number;\r\n public billType?: string;\r\n public payerId?: number;\r\n public payer?: string;\r\n public order?: number;\r\n public position?: number;\r\n public zipCodeId?: number;\r\n public insuranceId?: string;\r\n public groupNumber?: string;\r\n public lastName: string = '';\r\n public firstName: string = '';\r\n public middleName: string = '';\r\n public gender?: string;\r\n public differentThanPatient?: boolean;\r\n public birthDate: string | number | Date = '';\r\n public address?: string;\r\n public relationship?: string;\r\n public phone: string = '';\r\n public zipCode?: ZipCode | string;\r\n public zipCodeName?: string;\r\n public zipCodePlus4?: string;\r\n}\r\n","export const EthnicGroups = [\r\n {\r\n value: 0,\r\n name: 'Hispanic Or Latino',\r\n },\r\n {\r\n value: 1,\r\n name: 'Non Hispanic Or Latino',\r\n },\r\n {\r\n value: 2,\r\n name: 'Unknown',\r\n },\r\n];\r\n","import { BaseDataTransferObject } from '../base-data-transfer-object';\r\nimport { ZipCode } from '../common';\r\n\r\nexport class ResponsibleParty extends BaseDataTransferObject {\r\n public code!: string;\r\n public patientId!: number;\r\n public order!: number;\r\n public lastName!: string;\r\n public firstName!: string;\r\n public address!: string;\r\n public zipCodeId!: number;\r\n public zipCode!: ZipCode | string;\r\n public zipCodeName!: string;\r\n public zipCodePlus4!: string;\r\n public phone!: string;\r\n public mobile!: string;\r\n public fax!: string;\r\n}\r\n","import { BaseDataTransferObject } from '../base-data-transfer-object';\r\nimport { BillTo } from '../billing/bill-type';\r\nimport { ZipCode } from '../common';\r\n\r\nexport class Client extends BaseDataTransferObject {\r\n public code!: string;\r\n public name!: string;\r\n public address!: string;\r\n public zipCode!: ZipCode;\r\n public unitsCount!: number;\r\n public defaultBillTo!: BillTo;\r\n public webAccess: boolean = true;\r\n}\r\n\r\nexport class ClientWithExtras extends Client {\r\n public phone!: string;\r\n public fax!: string;\r\n public email!: string;\r\n}\r\n","import { Client, ClientWithExtras } from './client';\r\nimport { Medication, ZipCode } from '../common';\r\n\r\nimport { BaseDataTransferObject } from '../base-data-transfer-object';\r\nimport { BillingInformation } from '../billing/billing-information';\r\nimport { Physician } from './physician';\r\nimport { ResponsibleParty } from './reponsible-party';\r\nimport { Room } from './room';\r\nimport { Unit } from './unit';\r\n\r\nexport class SexualOrientation extends BaseDataTransferObject {\r\n public code!: string;\r\n public name!: string;\r\n}\r\n\r\nexport class GenderIdentity extends BaseDataTransferObject {\r\n public code!: string;\r\n public name!: string;\r\n}\r\n\r\nexport class Patient extends BaseDataTransferObject {\r\n public code!: string;\r\n public unit!: Unit;\r\n public unitId!: number;\r\n public room!: Room;\r\n public roomId!: number;\r\n public firstName!: string;\r\n public lastName!: string;\r\n public middleName!: string;\r\n public gender!: string;\r\n public medicalRecordId!: string;\r\n public socialSecurityNumber!: string;\r\n public bed!: string;\r\n public phone!: string;\r\n public mobile!: string;\r\n public email!: string;\r\n public address!: string;\r\n public zipCodePlus4!: string;\r\n public sameAsClientAddress!: boolean;\r\n public birthDate!: string | number | Date;\r\n public zipCode!: ZipCode;\r\n public zipCodeName!: string;\r\n public client!: ClientWithExtras;\r\n public clientId!: number;\r\n public primaryPhysician!: Physician;\r\n public primaryPhysicianId!: number;\r\n public ethnicity!: number;\r\n public sexualOrientationId!: number;\r\n public sexualOrientation!: SexualOrientation;\r\n public genderIdentityId!: number;\r\n public genderIdentity!: GenderIdentity;\r\n public race!: string;\r\n}\r\n\r\nexport class PatientEditable extends Patient {\r\n public dob!: Date;\r\n public medications!: Medication[];\r\n public diagnoses!: number[];\r\n public responsibleParties!: ResponsibleParty[];\r\n public insuranceInformation!: BillingInformation[];\r\n}\r\n\r\nexport class PatientSearch extends PatientEditable {\r\n public code!: string;\r\n}\r\n\r\nexport class PatientSearchWithoutCollections extends Patient {\r\n public code!: string;\r\n}\r\n\r\nexport class TransientPatient extends PatientEditable {\r\n public recentDate!: Date;\r\n public shouldBeDeletedDate!: Date;\r\n}\r\n\r\nexport class PatientClientPhysician {\r\n public id?: number;\r\n public clientId!: number;\r\n public physicianId?: number;\r\n public roomId?: number;\r\n public bed!: string;\r\n}\r\n","import { BaseDataTransferObject } from '../base-data-transfer-object';\r\n\r\nexport class Physician extends BaseDataTransferObject {\r\n public firstName!: string;\r\n public lastName!: string;\r\n public npi!: string;\r\n}\r\n\r\n","import { BaseDataTransferObject } from './base-data-transfer-object';\r\n\r\nexport class RequisitionSignature extends BaseDataTransferObject {\r\n public signatureImageId?: number;\r\n public requisitionId?: number;\r\n public signature?: Signature;\r\n public signedDateTime?: Date;\r\n}\r\n\r\nexport class Signature extends BaseDataTransferObject {\r\n public imageSignature?: string;\r\n public userName?: string;\r\n public isUserLis: boolean = false;\r\n}\r\n\r\nexport class MultipleRequisitionsSignature {\r\n public requisitionsIds?: number[];\r\n public username?: string;\r\n public image?: string;\r\n}\r\n\r\nexport class OrderSignature extends BaseDataTransferObject {\r\n public signatureImageId?: number;\r\n public orderId?: number;\r\n public signature?: Signature;\r\n public signedDateTime?: Date;\r\n}\r\n\r\nexport class MultipleOrdersSignature {\r\n public ordersIds?: number[];\r\n public username?: string;\r\n public image?: string;\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, forkJoin, Observable} from 'rxjs';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {SECURED_STORE} from '../../../shared/utils';\r\nimport {Diagnosis, Payer, PayerWithBillingType} from \"../models\";\r\nimport {map} from \"rxjs/operators\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BillingService {\r\n\r\n constructor(private urlProvider: UrlProviderService, private fusionAuthService: FusionAuthService, private router: Router, private httpClient: HttpClient) {\r\n }\r\n\r\n public billingInfoCustomStore(dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams: null,\r\n dataSource,\r\n routerService: this.router,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/billing-information/bill-types/remote-operations`\r\n });\r\n }\r\n\r\n public payerCustomStore(billTypeId: number, allPayers: boolean, dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams: null,\r\n dataSource,\r\n routerService: this.router,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/billing-information/payers/remote-operations/${billTypeId}?allPayers=${allPayers}`\r\n });\r\n }\r\n\r\n public getBestMatch(name: string): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/billing-information/payers/best-match?name=${name}`)\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, forkJoin, Observable} from 'rxjs';\r\nimport {map, retry} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {SECURED_STORE} from '../../../shared/utils';\r\nimport {Diagnosis} from '../models/common';\r\nimport {SearchableService} from './searchable.service';\r\n\r\n@Injectable()\r\nexport class DiagnosisService implements SearchableService {\r\n constructor(\r\n private urlProvider: UrlProviderService,\r\n private router: Router,\r\n private httpClient: HttpClient,\r\n private fusionAuthService: FusionAuthService,\r\n ) {\r\n this.customStore = this.customStore.bind(this);\r\n }\r\n\r\n public search(value: any): Observable {\r\n const filter = JSON.stringify(['code', '=', value]);\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/diagnoses/remote-operations?filter=${filter}`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public customStore(dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/diagnoses/remote-operations`,\r\n routerService: this.router,\r\n dataSource,\r\n loadParams: null,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT()\r\n });\r\n }\r\n\r\n public customStoreFilteredByPatientId(patientId: number, dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/diagnoses/remote-operations/filter-by-patient-id?patientId=${patientId}`,\r\n routerService: this.router,\r\n dataSource,\r\n loadParams: null,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT()\r\n });\r\n }\r\n\r\n public getBestMatch(codes: string[]): Observable {\r\n let requests = [];\r\n\r\n for (let code of codes.filter(x => x != '')) {\r\n requests.push(this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/diagnoses/best-match?code=${code}`));\r\n }\r\n\r\n return forkJoin(requests)\r\n .pipe(map(data => data.reduce((result,arr)=>[...result,...arr],[])));\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\nimport {retry} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {SECURED_STORE} from '../../../shared/utils';\r\nimport {Medication} from '../models/common';\r\nimport {SearchableService} from './searchable.service';\r\n\r\n@Injectable()\r\nexport class MedicationService implements SearchableService {\r\n constructor(\r\n private urlProvider: UrlProviderService,\r\n private httpClient: HttpClient,\r\n private router: Router,\r\n private fusionAuthService: FusionAuthService\r\n ) {\r\n this.customStore = this.customStore.bind(this);\r\n }\r\n\r\n public search(value: any): Observable {\r\n const filter = JSON.stringify(['code', '=', value]);\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/medications/remote-operations?filter=${filter}`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public customStore(dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/medications/remote-operations`,\r\n routerService: this.router,\r\n dataSource,\r\n loadParams: null,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT()\r\n });\r\n }\r\n\r\n public customStoreFilteredByPatientId(patientId: number, dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/medications/remote-operations/filter-by-patient-id?patientId=${patientId}`,\r\n routerService: this.router,\r\n dataSource,\r\n loadParams: null,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT()\r\n });\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Observable} from 'rxjs';\r\nimport {retry} from 'rxjs/operators';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {ZipCode} from '../models/common';\r\n\r\n@Injectable()\r\nexport class AddressService {\r\n\r\n constructor(private urlProvider: UrlProviderService, private httpClient: HttpClient) {\r\n }\r\n\r\n public getZipCodeByCode(code: string): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/address/zip-code?code=${code}`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public calculateZipCodePlus4(zipCodeId: number, address: string): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/address/zip-code/${zipCodeId}/zip-code-extra?address=${address}`)\r\n .pipe(retry(2));\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport DevExpress from 'devextreme';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\nimport {retry} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {DateHelperService, UrlProviderService} from '../../../shared/services/general';\r\nimport {SECURED_STORE} from '../../../shared/utils';\r\nimport {Client} from '../models/order-entry/client';\r\nimport DataSource = DevExpress.data.DataSource;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ClientService {\r\n\r\n constructor(private urlProvider: UrlProviderService,\r\n private router: Router,\r\n private httpClient: HttpClient,\r\n private fusionAuthService: FusionAuthService,\r\n private dateHelper: DateHelperService) {\r\n }\r\n\r\n private customStore(dataSource: BehaviorSubject, loadUrl: string, params: any = null, key: string = 'id'): CustomStore {\r\n return SECURED_STORE({\r\n dataSource,\r\n loadUrl,\r\n routerService: this.router,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams: params,\r\n key\r\n });\r\n }\r\n\r\n public advancedSearchStore(dataSource: BehaviorSubject, role: string, clientIds: number[]): CustomStore {\r\n return this.customStore(dataSource, `${this.urlProvider.ApiUrl}/v2/clients/advanced-search-clients`, {\r\n role,\r\n clientIds\r\n }, 'key');\r\n }\r\n\r\n public store(dataSource: BehaviorSubject) {\r\n return this.customStore(dataSource, `${this.urlProvider.ApiUrl}/v2/clients/remote-operations`);\r\n }\r\n\r\n public getByRange(orderId: number, startDate: Date, endDate: Date, limit: number, physicianIds: number[] = [], dataSource: BehaviorSubject) {\r\n let physicians = '';\r\n if (physicianIds && physicianIds.length > 0) {\r\n physicianIds.map(x => physicians += physicianIds.indexOf(x) === physicianIds.length - 1 ? `physicianIds=${x}` : `physicianIds=${x}&`);\r\n }\r\n const url = `${this.urlProvider.ApiUrl}/v2/clients/by-order-tests-in-time-range?orderId=${orderId}` +\r\n `&startDate=${this.dateHelper.formatDate(startDate)}&endDate=${this.dateHelper.formatDate(endDate)}&limit=${limit}` +\r\n `${physicianIds && physicianIds.length > 0 ? '&' + physicians : ''}`;\r\n return this.customStore(dataSource, url);\r\n }\r\n\r\n public customStoreFilteredByClientIds(ids: number[], dataSource: BehaviorSubject): CustomStore {\r\n let url = `${this.urlProvider.ApiUrl}/v2/clients/remote-operations`;\r\n if (ids.length > 0) {\r\n url += '?';\r\n }\r\n\r\n const clientIdsArray: string[] = [];\r\n ids.map(x => {\r\n clientIdsArray.push(`clientIds=${x}`);\r\n });\r\n\r\n if (clientIdsArray.length > 0) {\r\n url += clientIdsArray.join('&');\r\n }\r\n\r\n return this.customStore(dataSource, url);\r\n }\r\n\r\n public customStoreFilteredByPhysicianIds(ids: number[], dataSource: BehaviorSubject): CustomStore {\r\n let url = `${this.urlProvider.ApiUrl}/v2/clients/remote-operations`;\r\n\r\n if (ids.length > 0) {\r\n url += '?';\r\n }\r\n\r\n const patientIdsArray: string[] = [];\r\n ids.map(x => {\r\n patientIdsArray.push(`physicianIds=${x}`);\r\n });\r\n\r\n if (patientIdsArray.length > 0) {\r\n url += patientIdsArray.join('&');\r\n }\r\n\r\n return this.customStore(dataSource, url);\r\n }\r\n\r\n public customStoreFilteredByPatientIds(ids: number[], dataSource: BehaviorSubject): CustomStore {\r\n let url = `${this.urlProvider.ApiUrl}/v2/clients/remote-operations`;\r\n\r\n if (ids.length > 0) {\r\n url += '?';\r\n }\r\n\r\n const patientIdsArray: string[] = [];\r\n ids.map(x => {\r\n patientIdsArray.push(`patientIds=${x}`);\r\n });\r\n\r\n if (patientIdsArray.length > 0) {\r\n url += patientIdsArray.join('&');\r\n }\r\n\r\n return this.customStore(dataSource, url);\r\n }\r\n\r\n public clientUnitsCustomStore(id: number, dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/clients/${id}/units/remote-operations`,\r\n loadParams: undefined,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n dataSource,\r\n routerService: this.router\r\n });\r\n }\r\n\r\n public clientRoomsCustomStore(id: number, dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/clients/${id}/rooms/remote-operations`,\r\n loadParams: undefined,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n dataSource,\r\n routerService: this.router\r\n });\r\n }\r\n\r\n public clientRoomsByUnitCustomStore(id: number, dataSource: BehaviorSubject): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/clients/units/${id}/rooms/remote-operations`,\r\n loadParams: undefined,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n dataSource,\r\n routerService: this.router\r\n });\r\n }\r\n\r\n public getClientsByIds(clientIds: number[] = []): Observable {\r\n let url = `/v2/clients/by-ids?`;\r\n if (clientIds && clientIds.length > 0) {\r\n clientIds.map(x => url += `ids=${x}&`);\r\n }\r\n\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}${url}`)\r\n .pipe(retry(2));\r\n }\r\n}\r\n","import {HttpClient, HttpHeaders} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Store} from '@ngrx/store';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {capitalize} from 'lodash';\r\nimport * as Moment from 'moment';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\nimport {retry, tap} from 'rxjs/operators';\r\nimport {\r\n IAdvancedOrderSearchParams,\r\n IOrderSearch,\r\n RequisitionLabelViewModel,\r\n TransmissionModel\r\n} from '../../../shared/models/ocl';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {DateHelperService, UrlProviderService} from '../../../shared/services/general';\r\nimport {ObjectUtils, SECURED_STORE} from '../../../shared/utils';\r\nimport {AppState} from '../../../stores/app.state';\r\nimport {CumulativeResultsCollection, OrderPatientInformation} from '../../features/results/models/cumulative-result';\r\nimport {BillTo} from '../models/billing/bill-type';\r\nimport {Document} from '../models/common/document';\r\nimport {Order, OrderStatus} from '../../features/results/models/order';\r\nimport {\r\n OrderBillingInformation,\r\n OrderBillingInformationEditable\r\n} from '../../features/results/models/order-billing-information';\r\nimport {OrderTestTypes} from '../../features/results/models/order-tests';\r\nimport {MedicationResult, MicrobiologyResult, PathologyResult, ResultBase} from '../../features/results/models/results';\r\nimport {\r\n MultipleOrdersSignature,\r\n MultipleRequisitionsSignature,\r\n OrderSignature,\r\n RequisitionSignature\r\n} from \"../models/signature\";\r\n\r\n@Injectable()\r\nexport class OrdersService {\r\n\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 private dateHelper: DateHelperService\r\n ) {\r\n this.customStore = this.customStore.bind(this);\r\n }\r\n\r\n public advancedSearchStore(params: IAdvancedOrderSearchParams): CustomStore {\r\n // @ts-ignore\r\n // TODO\r\n params.status = OrderStatus[params.status];\r\n const dataSource = params.dataSource;\r\n // @ts-ignore\r\n delete params.dataSource;\r\n\r\n return SECURED_STORE({\r\n dataSource,\r\n loadParams: params,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n routerService: this.router,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/orders/advanced-search`,\r\n });\r\n }\r\n\r\n public orderSignature(orderId: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/orders/${orderId}/signature`).pipe(retry(2));\r\n }\r\n\r\n public unsign(id: number): Observable {\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/orders/${id}/unsign`, {});\r\n }\r\n\r\n public signOrders(signature: MultipleOrdersSignature): Observable {\r\n signature = ObjectUtils.capitalize(signature) as MultipleOrdersSignature;\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/orders/sign-multiple`, signature);\r\n }\r\n\r\n public getLabels(id: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/labels/orders/${id}`)\r\n .pipe(\r\n retry(2),\r\n tap(labels => {\r\n labels.forEach((label, index) => {\r\n label.id = index;\r\n return label;\r\n });\r\n })\r\n );\r\n }\r\n\r\n public customStore(externalFilters: IOrderSearch, alertResults: boolean = false, clientIds?: number[], patientIds?: number[],\r\n physicianIds?: number[], dataSource?: BehaviorSubject): CustomStore {\r\n const loadParams = {\r\n ...externalFilters,\r\n startDate: Moment(externalFilters.startDate, 'MM/DD/YYYY').format('MM/DD/YYYY'),\r\n endDate: Moment(externalFilters.endDate, 'MM/DD/YYYY').format('MM/DD/YYYY'),\r\n client: externalFilters.client ? externalFilters.client.id : undefined,\r\n unit: externalFilters.unit ? externalFilters.unit.id : undefined,\r\n patient: externalFilters.patient ? externalFilters.patient.id : undefined,\r\n clientIds,\r\n patientIds,\r\n physicianIds,\r\n alertResults,\r\n };\r\n // @ts-ignore\r\n loadParams.status = OrderStatus[loadParams.status];\r\n\r\n return SECURED_STORE({\r\n dataSource: dataSource as BehaviorSubject,\r\n loadParams,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n routerService: this.router,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/orders/remote-operations`,\r\n });\r\n }\r\n\r\n public acknowledgeOrder(ordersIdsOnQueryString: string): Observable {\r\n return this.httpClient.put(\r\n `${this.urlProvider.ApiUrl}/v2/orders/acknowledge?${ordersIdsOnQueryString}username=${this.fusionAuthService.Profile ? this.fusionAuthService.Profile.username : ''}`,\r\n {},\r\n );\r\n }\r\n\r\n public downloadOrderDocuments(orderId: number, documentName: string) {\r\n const url = `${this.urlProvider.ApiUrl}/v2/orders/${orderId}/documents/download?name=${documentName}`;\r\n const httpOptions = {\r\n headers: new HttpHeaders(),\r\n responseType: 'blob' as 'json',\r\n };\r\n httpOptions.headers.append('Authorization', this.fusionAuthService.getToken());\r\n return this.httpClient.get(url, httpOptions).pipe(retry(2));\r\n }\r\n\r\n public getOderDocuments(id: number = -1): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/documents`).pipe(retry(2));\r\n }\r\n\r\n public uploadDocument(requisitionId: number, fileBase64: string, fileName: string): Observable {\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/orders/${requisitionId}/documents`, {\r\n fileBase64,\r\n fileName,\r\n }, {\r\n reportProgress: true,\r\n },\r\n );\r\n }\r\n\r\n public sendTransmission(transmission: TransmissionModel): Observable {\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/orders/transmission`, transmission);\r\n }\r\n\r\n public changeBillTo(billTo: string, requisitionsIds: number[]) {\r\n // @ts-ignore\r\n let url = `/v2/orders/change-bill-to?billTo=${BillTo[capitalize(billTo)]}&`;\r\n const ids: string[] = [];\r\n requisitionsIds.map(x => {\r\n ids.push(`ids=${x}`);\r\n });\r\n\r\n if (ids.length > 0) {\r\n url += ids.join('&');\r\n }\r\n\r\n return this.httpClient.put(`${this.urlProvider.ApiUrl}${url}`, {reportProgress: true});\r\n }\r\n\r\n public getOder(id: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/orders/${id}`).pipe(retry(2));\r\n }\r\n\r\n public removeOrderDocument(orderId: number, documentId: number) {\r\n const url = `${this.urlProvider.ApiUrl}/v2/orders/${orderId}/documents/${documentId}`;\r\n\r\n return this.httpClient.delete(url);\r\n }\r\n\r\n\r\n public getOrderBillingInfo(id: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/billing-information`).pipe(retry(2));\r\n }\r\n\r\n public updateMissingInfo(id: number, info: OrderBillingInformationEditable): Observable {\r\n info = ObjectUtils.capitalize(info) as OrderBillingInformationEditable;\r\n return this.httpClient.put(`${this.urlProvider.ApiUrl}/v2/orders/${id}/billing-information`, info);\r\n }\r\n\r\n public getOrderTestsTypes(id: number): Observable {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/results-types`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderClinicalResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/clinical-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderToxicologyAlphaResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/toxicology-alpha-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderToxicologyConsistentResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/toxicology-expected-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderToxicologyInconsistentNegativeResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/toxicology-unexpected-negative-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderToxicologyInconsistentPositiveResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/toxicology-unexpected-positive-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderToxicologyOtherMedications(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/toxicology-other-medications`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getPathologyResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/pathology-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getMicrobiologyResults(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/microbiology-results`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getOrderPatientInformation(id: number) {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/orders/${id}/cumulative-result-info`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getCumulativeResults(orderId: number, clientsId: number, physicianIds: number[] = [], startDate: Date, endDate: Date, records: number, type: string): Observable {\r\n let queryString = `startDate=${this.dateHelper.formatDate(startDate)}&endDate=${this.dateHelper.formatDate(endDate)}` +\r\n `&records=${records}&type=NORMAL&clientId=${clientsId}` + `${physicianIds && physicianIds.length > 0 ? '&' : ''}`;\r\n if (physicianIds && physicianIds.length > 0) {\r\n physicianIds.map(x => queryString += physicianIds.indexOf(x) === physicianIds.length - 1 ? `physicianIds=${x}` : `physicianIds=${x}&`);\r\n }\r\n\r\n return this.httpClient.get(\r\n `${this.urlProvider.ApiUrl}/v2/orders/${orderId}/${type}-cumulative-results?${queryString}`,\r\n ).pipe(retry(2));\r\n }\r\n}\r\n","import * as Moment from 'moment';\r\n\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { ObjectUtils, SECURED_STORE } from '../../../shared/utils';\r\nimport {\r\n PatientClientPhysician,\r\n PatientEditable,\r\n} from '../models/order-entry/patient';\r\n\r\nimport { BillingInformation } from '../models/billing/billing-information';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { FusionAuthService } from '../../../shared/services/fusion-auth';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { ResponsibleParty } from '../models/order-entry/reponsible-party';\r\nimport { Router } from '@angular/router';\r\nimport { UrlProviderService } from '../../../shared/services/general';\r\nimport { retry } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class PatientService {\r\n constructor(\r\n private urlProvider: UrlProviderService,\r\n private httpClient: HttpClient,\r\n private fusionAuthService: FusionAuthService,\r\n private router: Router\r\n ) {}\r\n\r\n public getPatientField(\r\n dataSource: BehaviorSubject,\r\n role: string,\r\n field: string,\r\n clientIds: number[],\r\n patientIds: number[],\r\n physicianIds: number[]\r\n ) {\r\n let url = 'advanced-search-patient';\r\n switch (field) {\r\n case 'lastname':\r\n url += '-last-name';\r\n break;\r\n case 'firstname':\r\n url += '-first-name';\r\n break;\r\n default:\r\n url += '-dob';\r\n break;\r\n }\r\n\r\n return SECURED_STORE({\r\n dataSource,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/patients/${url}`,\r\n routerService: this.router,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n key: 'key',\r\n loadParams: {\r\n role,\r\n field,\r\n clientIds,\r\n physicianIds,\r\n patientIds,\r\n },\r\n });\r\n }\r\n\r\n public getPatient(id: number): Observable {\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}/v2/patients/${id}`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public checkPatientClients(\r\n patientId: number,\r\n clientIds: number[]\r\n ): Observable {\r\n let url = `/v2/patients/check-clients?`;\r\n url += `patientId=${patientId}&`;\r\n\r\n const clientIdsArray: string[] = [];\r\n clientIds.map((x) => {\r\n clientIdsArray.push(`clientIds=${x}`);\r\n });\r\n\r\n if (clientIdsArray.length > 0) {\r\n url += clientIdsArray.join('&');\r\n }\r\n\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}${url}`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public isSsnUnique(ssn: string, patientId?: number): Observable {\r\n const url = patientId\r\n ? `${this.urlProvider.ApiUrl}/v2/patients/validate-ssn?ssn=${ssn}&patientId=${patientId}`\r\n : `${this.urlProvider.ApiUrl}/records/patients/validate-ssn?ssn=${ssn}`;\r\n\r\n return this.httpClient.get(url).pipe(retry(2));\r\n }\r\n\r\n public createPatient(patient: PatientEditable): Observable {\r\n patient = ObjectUtils.capitalize(patient) as PatientEditable;\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/patients`,\r\n patient\r\n );\r\n }\r\n\r\n public updatePatient(\r\n patientId: number,\r\n patient: PatientEditable\r\n ): Observable {\r\n patient = ObjectUtils.capitalize(patient) as PatientEditable;\r\n return this.httpClient.put(\r\n `${this.urlProvider.ApiUrl}/v2/patients/${patientId}`,\r\n patient\r\n );\r\n }\r\n\r\n public saveMedications(\r\n id: number,\r\n medicationIds: number[] = []\r\n ): Observable {\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/patients/${id}/save-medications`,\r\n medicationIds\r\n );\r\n }\r\n\r\n public saveDiagnoses(\r\n id: number,\r\n diagnosesIds: number[] = []\r\n ): Observable {\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/patients/${id}/save-diagnoses`,\r\n diagnosesIds\r\n );\r\n }\r\n\r\n public saveBillingInformation(\r\n id: number,\r\n billingInformation: BillingInformation[] = []\r\n ): Observable {\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/patients/${id}/save-billing-info`,\r\n { InsuranceInformation: billingInformation }\r\n );\r\n }\r\n\r\n public saveResponsibleParties(\r\n id: number,\r\n responsibleParties: ResponsibleParty[] = []\r\n ): Observable {\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/patients/${id}/save-responsible-parties`,\r\n { responsibleParties }\r\n );\r\n }\r\n\r\n public getPatientBillingInformation(\r\n patientId: number\r\n ): Observable {\r\n return this.httpClient\r\n .get(\r\n `${this.urlProvider.ApiUrl}/v2/patients/${patientId}/billing-info`\r\n )\r\n .pipe(retry(2));\r\n }\r\n\r\n public searchPatient(\r\n firstName: string,\r\n lastName: string,\r\n birthDate: string,\r\n socialSecurityNumber: string,\r\n clientIds: number[],\r\n physicianIds: number[],\r\n fromSearch: boolean = false,\r\n dataSource: BehaviorSubject\r\n ): CustomStore {\r\n const loadParams = {\r\n firstName: firstName !== null ? firstName : null,\r\n lastName: lastName !== null ? lastName : null,\r\n birthDate: birthDate,\r\n ssn: socialSecurityNumber !== null ? socialSecurityNumber : null,\r\n fromSearch,\r\n clientIds,\r\n physicianIds,\r\n };\r\n\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/patients/remote-operations`,\r\n loadParams,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n dataSource,\r\n routerService: this.router,\r\n });\r\n }\r\n\r\n public updatePatientClientPhysician(\r\n patient: PatientClientPhysician\r\n ): Observable {\r\n patient = ObjectUtils.capitalize(patient) as PatientClientPhysician;\r\n return this.httpClient.put(\r\n `${this.urlProvider.ApiUrl}/v2/patients/client-physician`,\r\n patient\r\n );\r\n }\r\n\r\n public store(\r\n clientIds: number[],\r\n dataSource: BehaviorSubject\r\n ): CustomStore {\r\n let url = `/v2/patients/remote-operations-all-entries`;\r\n if (clientIds.length > 0) {\r\n url = url + `?`;\r\n const clientIdsArray: string[] = [];\r\n clientIds.map((x) => {\r\n clientIdsArray.push(`clientIds=${x}`);\r\n });\r\n url += clientIdsArray.join('&');\r\n }\r\n\r\n return SECURED_STORE({\r\n dataSource,\r\n loadUrl: `${this.urlProvider.ApiUrl}${url}`,\r\n routerService: this.router,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams: undefined,\r\n });\r\n }\r\n\r\n public getByIds(patientIds: number[] = []): Observable {\r\n let url = `/v2/patients/ids?`;\r\n const patientIdsArray: string[] = [];\r\n patientIds.map((x) => {\r\n patientIdsArray.push(`ids=${x}`);\r\n });\r\n\r\n if (patientIdsArray.length > 0) {\r\n url += patientIdsArray.join('&');\r\n }\r\n\r\n return this.httpClient\r\n .get(`${this.urlProvider.ApiUrl}${url}`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public sexualOrientations(\r\n dataSource: BehaviorSubject\r\n ): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/patients/sexual-orientations`,\r\n loadParams: undefined,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n dataSource,\r\n routerService: this.router,\r\n });\r\n }\r\n\r\n public genderIdentities(\r\n dataSource: BehaviorSubject\r\n ): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/patients/gender-identities`,\r\n loadParams: undefined,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n dataSource,\r\n routerService: this.router,\r\n });\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Store} from '@ngrx/store';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, forkJoin, Observable} from 'rxjs';\r\nimport {map, retry} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {SECURED_STORE} from '../../../shared/utils';\r\nimport {AppState} from '../../../stores/app.state';\r\nimport {Physician} from '../models/order-entry/physician';\r\nimport {Diagnosis} from \"../models\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class PhysicianService {\r\n constructor(private urlProvider: UrlProviderService, private httpClient: HttpClient,\r\n private router: Router,\r\n private store: Store, private fusionAuthService: FusionAuthService) {\r\n this.searchCustomStore = this.searchCustomStore.bind(this);\r\n }\r\n\r\n public searchCustomStore(firstName: string, lastName: string, npi: string, patientClientId: number, clientIds: number[], dataSource: BehaviorSubject): CustomStore {\r\n const loadParams = {\r\n firstName: firstName !== null ? firstName : null,\r\n lastName: lastName !== null ? lastName : null,\r\n npi: npi !== null ? npi : null,\r\n patientClientId,\r\n clientIds\r\n };\r\n\r\n return SECURED_STORE({\r\n routerService: this.router,\r\n dataSource,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/physicians/remote-operations`\r\n });\r\n }\r\n\r\n public customStoreByClientsIds(clientIds: number[], dataSource: BehaviorSubject) {\r\n let url = `/v2/physicians/remote-operations-all-entries`;\r\n if (clientIds.length > 0) {\r\n url = url + `?`;\r\n const clientIdsArray: string[] = [];\r\n clientIds.map(x => {\r\n clientIdsArray.push(`clientIds=${x}`);\r\n });\r\n url += clientIdsArray.join('&');\r\n }\r\n\r\n return SECURED_STORE({\r\n routerService: this.router,\r\n dataSource,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams: undefined,\r\n loadUrl: `${this.urlProvider.ApiUrl}${url}`\r\n });\r\n }\r\n\r\n public getByIds(physicianIds: number[] = []): Observable {\r\n let url = `/v2/physicians/ids?`;\r\n const physicianIdsArray: string[] = [];\r\n physicianIds.map(x => {\r\n physicianIdsArray.push(`ids=${x}`);\r\n });\r\n\r\n if (physicianIdsArray.length > 0) {\r\n url += physicianIdsArray.join('&');\r\n }\r\n\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}${url}`).pipe(retry(2));\r\n }\r\n\r\n public getBestMatchByName(firstname: string, lastname: string): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/physicians/by-name?firstname=${firstname}&lastname=${lastname}`);\r\n }\r\n\r\n public getBestMatchByNpi(npi: string): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/physicians/by-npi?npi=${npi}`);\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport * as Moment from 'moment';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport {TransientPatient} from '../models/order-entry/patient';\r\n\r\n@Injectable()\r\nexport class RecentPatientService {\r\n constructor() {\r\n this.verifyRecentPatients(this.getRecentPatients());\r\n }\r\n\r\n public static isLocalStorageAvailable(): boolean {\r\n return typeof localStorage !== 'undefined';\r\n\r\n }\r\n\r\n public static isWebWorkersAvailable(): boolean {\r\n return typeof Worker !== 'undefined';\r\n\r\n }\r\n\r\n public verifyRecentPatients(patients: any[]) {\r\n const recent = patients;\r\n const patientsIds = recent\r\n .filter(patient => {\r\n const deleteDate = Moment(patient.shouldBeDeletedDate);\r\n const currentDate = Moment();\r\n return deleteDate.isBefore(currentDate);\r\n })\r\n .map(p => p.id);\r\n\r\n if (patientsIds.length > 0) {\r\n try {\r\n patientsIds.forEach(id =>\r\n recent.splice(\r\n recent.findIndex(p => p.id === id),\r\n 1,\r\n ),\r\n );\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n this.save(patients);\r\n }\r\n }\r\n\r\n public getRecentPatients(): TransientPatient[] {\r\n if (!RecentPatientService.isLocalStorageAvailable()) {\r\n return [];\r\n }\r\n const recentPatients = localStorage.getItem('recentPatients');\r\n let result: TransientPatient[];\r\n if (recentPatients) {\r\n result = JSON.parse(recentPatients);\r\n } else {\r\n result = [];\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public addRecentPatient(patient: TransientPatient): void {\r\n if (!RecentPatientService.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (patient === undefined || patient === null) {\r\n return;\r\n }\r\n if (this.exists(patient.id)) {\r\n return;\r\n }\r\n\r\n const patients = this.getRecentPatients();\r\n patient.recentDate = Moment().toDate();\r\n patient.shouldBeDeletedDate = Moment().add('12', 'hours').toDate();\r\n patients.push(patient);\r\n this.save(patients);\r\n }\r\n\r\n public updatePatient(patient: TransientPatient) {\r\n if (!RecentPatientService.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (patient === undefined || patient === null) {\r\n return;\r\n }\r\n\r\n const patients = this.getRecentPatients();\r\n const index = patients.findIndex((p) => patient.id === p.id);\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n patients.splice(index, 1);\r\n patient.recentDate = Moment().toDate();\r\n patient.shouldBeDeletedDate = Moment().add('12', 'hours').toDate();\r\n patients.push(patient);\r\n this.save(patients);\r\n }\r\n\r\n private save(patients: any[]): void {\r\n const patientsString = JSON.stringify(patients);\r\n localStorage.setItem('recentPatients', patientsString);\r\n }\r\n\r\n public async hasAny(): Promise {\r\n if (!RecentPatientService.isLocalStorageAvailable()) {\r\n return new Promise(() => false);\r\n }\r\n return this.getRecentPatients().length > 0;\r\n }\r\n\r\n public exists(patientId: number): boolean {\r\n if (!RecentPatientService.isLocalStorageAvailable()) {\r\n return false;\r\n }\r\n const patients = this.getRecentPatients();\r\n return patients.findIndex((patient: TransientPatient) => patient.id === patientId) !== -1;\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport * as Moment from 'moment';\r\nimport {RecentRequisitionViewModel} from '../../../shared/models/ocl';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\n\r\n@Injectable()\r\nexport class RecentRequisitionService {\r\n\r\n constructor() {\r\n this.verifyRecentRequisitions(this.getRecentRequisitions());\r\n }\r\n\r\n public static isLocalStorageAvailable(): boolean {\r\n if (typeof localStorage === 'undefined') {\r\n console.log('This browser doesn\\'t support LocalStorage');\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public static isWebWorkersAvailable(): boolean {\r\n if (typeof Worker === 'undefined') {\r\n console.log('This browser doesn\\'t support WebWorkers');\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public getRecentRequisitions(): RecentRequisitionViewModel[] {\r\n if (!RecentRequisitionService.isLocalStorageAvailable()) {\r\n return [];\r\n }\r\n const recentRequisitions = localStorage.getItem('recentRequisitions');\r\n let result: RecentRequisitionViewModel[];\r\n if (recentRequisitions) {\r\n result = JSON.parse(recentRequisitions);\r\n } else {\r\n result = [];\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public verifyRecentRequisitions(requisitions: any) {\r\n const recent = requisitions;\r\n const requisitionsIds = recent\r\n .filter((requisition: any) => {\r\n const deleteDate = Moment(requisition.shouldBeDeletedDate);\r\n const currentDate = Moment();\r\n return deleteDate.isBefore(currentDate);\r\n })\r\n .map((p: any) => p.id);\r\n\r\n if (requisitionsIds.length > 0) {\r\n try {\r\n requisitionsIds.forEach((id: any) =>\r\n recent.splice(\r\n recent.findIndex((p: any) => p.id === id),\r\n 1,\r\n ),\r\n );\r\n } catch (e) {\r\n Sentry.captureException(e);\r\n }\r\n this.save(requisitions);\r\n }\r\n }\r\n\r\n public updateRecentRecentRequisitions(requisition: RecentRequisitionViewModel): void {\r\n if (!RecentRequisitionService.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (requisition === undefined || requisition === null) {\r\n return;\r\n }\r\n const requisitions = this.getRecentRequisitions();\r\n const index = requisitions.findIndex((r) => requisition.id === r.id);\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n requisitions.splice(index, 1);\r\n requisition.recentDate = Moment().toDate();\r\n requisition.shouldBeDeletedDate = Moment().add('12', 'hours').toDate();\r\n requisitions.push(requisition);\r\n this.save(requisitions);\r\n }\r\n\r\n public addRecentRecentRequisitions(requisition: RecentRequisitionViewModel): void {\r\n if (!RecentRequisitionService.isLocalStorageAvailable()) {\r\n return;\r\n }\r\n if (requisition === undefined || requisition === null) {\r\n return;\r\n }\r\n if (this.exists(requisition.id as number)) {\r\n return;\r\n }\r\n\r\n const requisitions = this.getRecentRequisitions();\r\n requisition.recentDate = Moment().toDate();\r\n requisition.shouldBeDeletedDate = Moment().add('12', 'hours').toDate();\r\n requisitions.push(requisition);\r\n this.save(requisitions);\r\n }\r\n\r\n private save(requisitions: any): void {\r\n const reqString = JSON.stringify(requisitions);\r\n localStorage.setItem('recentRequisitions', reqString);\r\n }\r\n\r\n public async hasAny(): Promise {\r\n if (!RecentRequisitionService.isLocalStorageAvailable()) {\r\n return new Promise(() => false);\r\n }\r\n return this.getRecentRequisitions().length > 0;\r\n }\r\n\r\n public exists(requisitionId: number): boolean {\r\n if (!RecentRequisitionService.isLocalStorageAvailable()) {\r\n return false;\r\n }\r\n const requisitions = this.getRecentRequisitions();\r\n return requisitions.findIndex((requisition: RecentRequisitionViewModel) => requisition.id === requisitionId) !== -1;\r\n }\r\n}\r\n","import {HttpClient, HttpHeaders} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Observable} from 'rxjs';\r\nimport {retry} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\n\r\n@Injectable()\r\nexport class ReportsService {\r\n\r\n constructor(private urlProviderService: UrlProviderService, private httpClient: HttpClient, private fusionAuthService: FusionAuthService) {\r\n }\r\n\r\n public generateRequest(url: string): Observable {\r\n const httpOptions = {\r\n headers: new HttpHeaders(),\r\n responseType: 'blob' as 'json',\r\n };\r\n httpOptions.headers.append('Authorization', this.fusionAuthService.getToken());\r\n httpOptions.headers.append('X-Authorization', this.fusionAuthService.getToken());\r\n\r\n return this.httpClient.get(`${this.urlProviderService.ApiUrl}${url}`, httpOptions).pipe(retry(2));\r\n }\r\n\r\n public generateRequisitionReport(requisitionIds: number[] = []): Observable {\r\n let url = `/v2/reports/requisition?`;\r\n const requisitionIdsArray: string[] = [];\r\n requisitionIds.map(x => {\r\n requisitionIdsArray.push(`requisitionIds=${x}`);\r\n });\r\n\r\n if (requisitionIdsArray.length > 0) {\r\n url += requisitionIdsArray.join('&');\r\n }\r\n\r\n return this.generateRequest(url);\r\n }\r\n\r\n public generateRequisitionLog(requisitionIds: number[] = []): Observable {\r\n let url = `/v2/reports/requisition/log?`;\r\n const requisitionIdsArray: string[] = [];\r\n requisitionIds.map(x => {\r\n requisitionIdsArray.push(`requisitionIds=${x}`);\r\n });\r\n\r\n if (requisitionIdsArray.length > 0) {\r\n url += requisitionIdsArray.join('&');\r\n }\r\n\r\n return this.generateRequest(url);\r\n }\r\n\r\n public generateOrderPreview(results: any[] = []): Observable {\r\n let url = `/v2/reports/order/results-preview`;\r\n\r\n const httpOptions = {\r\n headers: new HttpHeaders(),\r\n responseType: 'blob' as 'json',\r\n };\r\n httpOptions.headers.append('Authorization', this.fusionAuthService.getToken());\r\n httpOptions.headers.append('X-Authorization', this.fusionAuthService.getToken());\r\n\r\n return this.httpClient.post(`${this.urlProviderService.ApiUrl}${url}`, results, httpOptions).pipe(retry(2));\r\n }\r\n\r\n public generateOrderResults(orderIds: number[] = []): Observable {\r\n let url = `/v2/reports/order/results?`;\r\n const orderIdsArray: string[] = [];\r\n orderIds.map(x => {\r\n orderIdsArray.push(`orderIds=${x}`);\r\n });\r\n\r\n if (orderIdsArray.length > 0) {\r\n url += orderIdsArray.join('&');\r\n }\r\n\r\n return this.generateRequest(url);\r\n }\r\n\r\n public generateOrderLog(orderIds: number[] = []): Observable {\r\n let url = `/v2/reports/order/log?`;\r\n const orderIdsArray: string[] = [];\r\n orderIds.map(x => {\r\n orderIdsArray.push(`orderIds=${x}`);\r\n });\r\n\r\n if (orderIdsArray.length > 0) {\r\n url += orderIdsArray.join('&');\r\n }\r\n\r\n return this.generateRequest(url);\r\n }\r\n\r\n public generateOrderDetails(orderIds: number[] = []): Observable {\r\n let url = `/v2/reports/order/details?`;\r\n const orderIdsArray: string[] = [];\r\n orderIds.map(x => {\r\n orderIdsArray.push(`orderIds=${x}`);\r\n });\r\n\r\n if (orderIdsArray.length > 0) {\r\n url += orderIdsArray.join('&');\r\n }\r\n\r\n return this.generateRequest(url);\r\n }\r\n\r\n public generateCumulativeResults(queryString: string): Observable {\r\n return this.generateRequest(`/v2/reports/order/cumulative-results?${queryString}`);\r\n }\r\n}\r\n","import { BaseDataTransferObject } from '../base-data-transfer-object';\r\n\r\nexport 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 = 0x000001FF\r\n}\r\n\r\nexport class TestTest extends BaseDataTransferObject {\r\n public ownerId!: number;\r\n public childId!: number;\r\n public ordinalNumber!: number;\r\n public parentId!: number;\r\n}\r\n\r\nexport class TreeTest extends BaseDataTransferObject {\r\n public code!: string;\r\n public name!: string;\r\n public type!: TestType;\r\n public alternateNames!: string;\r\n public parentId?: number;\r\n public children!: TestTest[];\r\n public isConfidential?: boolean;\r\n}\r\n\r\n","import {HttpClient, HttpHeaders} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Store} from '@ngrx/store';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {capitalize} from 'lodash';\r\nimport * as Moment from 'moment';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\nimport {retry, tap} from 'rxjs/operators';\r\nimport {\r\n IRequisitionSearch, RequisitionLabelViewModel, TransmissionModel,\r\n} from '../../../shared/models/ocl';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {ObjectUtils, SECURED_STORE} from '../../../shared/utils';\r\nimport {AppState} from '../../../stores/app.state';\r\nimport {Requisition} from '../../features/requisitions/models/requisition';\r\nimport {RequisitionBillingInfo} from '../../features/requisitions/models/requisition-billing-infog';\r\nimport {MultipleRequisitionsSignature, RequisitionSignature} from '../models/signature';\r\nimport {BillTo} from '../models/billing/bill-type';\r\nimport {Document} from '../models/common/document';\r\nimport {TreeTest} from '../models/order-entry/test';\r\nimport { TestService } from './test.service';\r\n\r\nexport interface IRequisitionSearchParams {\r\n externalFilters?: IRequisitionSearch;\r\n clientIds?: number[];\r\n patientIds?: number[];\r\n physicianIds?: number[];\r\n dataSource: BehaviorSubject;\r\n}\r\n\r\n@Injectable()\r\nexport class RequisitionService {\r\n\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 testService: TestService,\r\n private router: Router\r\n ) {\r\n }\r\n\r\n public cancelRequisition(id: number, comment: string): Observable {\r\n const username = this.fusionAuthService.Profile.username;\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/${id}/cancel`, {\r\n comment,\r\n username,\r\n });\r\n }\r\n\r\n public requisitionStore(params: IRequisitionSearchParams): CustomStore {\r\n const loadParams = {\r\n ...params.externalFilters,\r\n startDate: Moment(params.externalFilters?.startDate, 'MM/DD/YYYY').format('MM/DD/YYYY'),\r\n endDate: Moment(params.externalFilters?.endDate, 'MM/DD/YYYY').format('MM/DD/YYYY'),\r\n client: params.externalFilters?.client ? params.externalFilters.client.id : undefined,\r\n unit: params.externalFilters?.unit ? params.externalFilters.unit.id : undefined,\r\n patient: params.externalFilters?.patient ? params.externalFilters.patient.id : undefined,\r\n clientIds: params.clientIds,\r\n patientIds: params.patientIds,\r\n physicianIds: params.physicianIds,\r\n };\r\n\r\n return SECURED_STORE({\r\n routerService: this.router,\r\n dataSource: params.dataSource,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadParams,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/requisitions/remote-operations`\r\n });\r\n }\r\n\r\n public requisitionSignature(requisitionId: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/signature`).pipe(retry(2));\r\n }\r\n\r\n public getRequisition(requisitionId: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}`)\r\n .pipe(\r\n tap(req => {\r\n req.treeTests = req.tests as TreeTest[];\r\n req.treeTests = [];\r\n for (const test of req.tests ? req.tests : []) {\r\n if (!test.test) continue;\r\n const treeTest = new TreeTest();\r\n treeTest.name = test.test.name;\r\n treeTest.alternateNames = test.test.alternateNames;\r\n treeTest.code = test.test.code;\r\n treeTest.type = test.test.type;\r\n treeTest.isConfidential = test.isConfidential;\r\n treeTest.id = test.test.id;\r\n treeTest.children = test.test.children;\r\n // @ts-ignore\r\n treeTest.parentId = test.parentTestId;\r\n req.treeTests.push(treeTest);\r\n }\r\n //Sentry.setContext('loaded-req', {...req});\r\n }),\r\n retry(2));\r\n }\r\n\r\n public getRequisitionBillingInformation(requisitionId: number) {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/billing-info`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getRequisitionDocuments(requisitionId: number) {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/documents`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public getRequisitionSignature(requisitionId: number) {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/signature`)\r\n .pipe(retry(2));\r\n }\r\n\r\n public unsign(id: number): Observable {\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/${id}/unsign`, {});\r\n }\r\n\r\n public downloadRequisitionDocuments(requisitionId: number, documentName: string) {\r\n const url = `${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/documents/download?name=${documentName}`;\r\n const httpOptions = {\r\n headers: new HttpHeaders(),\r\n responseType: 'blob' as 'json',\r\n };\r\n httpOptions.headers.append('Authorization', this.fusionAuthService.getToken());\r\n httpOptions.headers.append('X-Authorization', this.fusionAuthService.getToken());\r\n\r\n return this.httpClient.get(url, httpOptions);\r\n }\r\n\r\n public removeRequisitionDocument(requisitionId: number, documentId: number) {\r\n const url = `${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/documents/${documentId}`;\r\n\r\n return this.httpClient.delete(url);\r\n }\r\n\r\n public signRequisitions(signature: MultipleRequisitionsSignature): Observable {\r\n signature = ObjectUtils.capitalize(signature) as MultipleRequisitionsSignature;\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/sign-multiple`, signature);\r\n }\r\n\r\n public uploadDocument(requisitionId: number, fileBase64: string, fileName: string): Observable {\r\n return this.httpClient.post(\r\n `${this.urlProvider.ApiUrl}/v2/requisitions/${requisitionId}/documents`, {\r\n fileBase64,\r\n fileName\r\n }, {\r\n reportProgress: true\r\n }\r\n );\r\n }\r\n\r\n public create(requisition: Requisition): Observable {\r\n requisition = ObjectUtils.capitalize(requisition) as Requisition;\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions`, requisition);\r\n }\r\n\r\n public update(requisition: Requisition): Observable {\r\n requisition = ObjectUtils.capitalize(requisition) as Requisition;\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/${requisition.id}`, requisition);\r\n }\r\n\r\n public saveMedications(id: number, medicationIds: number[] = []): Observable {\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/${id}/save-medications`, medicationIds);\r\n }\r\n\r\n public saveDiagnoses(id: number, diagnosesIds: number[] = []): Observable {\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/${id}/save-diagnoses`, diagnosesIds);\r\n }\r\n\r\n public saveBillingInformation(id: number, billingInformation: RequisitionBillingInfo[] = []): Observable {\r\n billingInformation.forEach(b => b.requisitionId = id);\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/${id}/save-billing-info`, {billingInfo: billingInformation});\r\n }\r\n\r\n public changeBillTo(billTo: string, requisitionsIds: number[]) {\r\n // @ts-ignore\r\n let url = `/v2/requisitions/change-bill-to?billTo=${BillTo[capitalize(billTo)]}&`;\r\n const ids: string[] = [];\r\n requisitionsIds.map(x => {\r\n ids.push(`ids=${x}`);\r\n });\r\n\r\n if (ids.length > 0) {\r\n url += ids.join('&');\r\n }\r\n\r\n return this.httpClient.put(`${this.urlProvider.ApiUrl}${url}`, {reportProgress: true});\r\n }\r\n\r\n public sendTransmission(transmission: TransmissionModel): Observable {\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/v2/requisitions/transmission`, transmission);\r\n }\r\n\r\n public getLabels(id: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/requisitions/${id}/labels`)\r\n .pipe(\r\n retry(2),\r\n tap(labels => {\r\n labels.forEach((label, index) => {\r\n label.id = index;\r\n return label;\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Observable} from 'rxjs';\r\nimport {retry} from 'rxjs/operators';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SettingsService {\r\n\r\n constructor(\r\n private urlProvider: UrlProviderService,\r\n private httpClient: HttpClient,\r\n ) {\r\n }\r\n\r\n public getResultSettings(): Observable<{ abnormalResult: string; normalResult: string }> {\r\n return this.httpClient.get<{ abnormalResult: string; normalResult: string }>(\r\n `${this.urlProvider.ApiUrl}/v2/public-settings/toxicology-results`,\r\n ).pipe(retry(2));\r\n }\r\n\r\n public getWebResultSettings() {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/public-settings/web-results`).pipe(retry(2));\r\n }\r\n\r\n public IsMissingInfoEnabled() {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/v2/public-settings/missing-info`).pipe(retry(2));\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\nimport {retry, tap} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {UrlProviderService} from '../../../shared/services/general';\r\nimport {SECURED_STORE} from '../../../shared/utils';\r\nimport {TreeTest} from '../models/order-entry/test';\r\n//import * as Sentry from '@sentry/angular';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TestService {\r\n constructor(\r\n private urlProvider: UrlProviderService,\r\n private router: Router,\r\n private httpClient: HttpClient,\r\n private fusionAuthService: FusionAuthService,\r\n ) {\r\n this.treeBuilder = this.treeBuilder.bind(this);\r\n }\r\n\r\n public advancedSearchStore(dataSource: BehaviorSubject, role: string, clientIds: number[]) {\r\n return SECURED_STORE({\r\n dataSource,\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/tests/advanced-search`,\r\n routerService: this.router,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n key: 'key',\r\n loadParams: {\r\n role,\r\n clientIds\r\n }\r\n });\r\n }\r\n\r\n public customStore(dataSource: BehaviorSubject, clientId: number, allTest: boolean = false, clientsIds: number[] = []): CustomStore {\r\n let url = `/v2/tests/remote-operations?clientId=${clientId}&allTests=${allTest}`;\r\n\r\n if (clientsIds && clientsIds.length > 0) {\r\n url += `?`;\r\n const clientIdsArray: string[] = [];\r\n clientsIds.map(x => {\r\n clientIdsArray.push(`clientIds=${x}`);\r\n });\r\n url += clientIdsArray.join('&');\r\n }\r\n\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}${url}`,\r\n routerService: this.router,\r\n dataSource,\r\n loadParams: null,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n });\r\n }\r\n\r\n public readonly treeBuilder = (tests: TreeTest[]) => {\r\n try {\r\n for (const test of tests) {\r\n const index = tests.findIndex(t => t.children.findIndex(c => c.childId === test.id) !== -1);\r\n if (index !== -1) {\r\n const childIndex = tests[index].children.findIndex(c => c.childId === test.id);\r\n if (childIndex !== -1) {\r\n test.parentId = tests[index].children[childIndex].parentId\r\n ? tests[index].children[childIndex].parentId\r\n : tests[index].children[childIndex].ownerId;\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n //Sentry.captureException(e);\r\n }\r\n }\r\n\r\n public treeCustomStore(dataSource: BehaviorSubject, clientId: number, allTest: boolean = false): CustomStore {\r\n return SECURED_STORE({\r\n loadUrl: `${this.urlProvider.ApiUrl}/v2/tests/remote-operations?clientId=${clientId}&allTests=${allTest}`,\r\n routerService: this.router,\r\n dataSource,\r\n loadParams: null,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n onLoaded: this.treeBuilder\r\n });\r\n }\r\n\r\n public getTestWithChildren(testIds: number[]): Observable {\r\n let url = `/v2/tests/with-children?`;\r\n\r\n const testIdsArray: string[] = [];\r\n testIds.map(x => {\r\n testIdsArray.push(`testId=${x}`);\r\n });\r\n\r\n if (testIdsArray.length > 0) {\r\n url += testIdsArray.join('&');\r\n }\r\n\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}${url}`)\r\n .pipe(\r\n tap(this.treeBuilder),\r\n retry(2)\r\n );\r\n }\r\n\r\n public getIdsTestWithChildren(testIds: number[]): Observable {\r\n let url = `/v2/tests/ids-with-children?`;\r\n\r\n const testIdsArray: string[] = [];\r\n testIds.map(x => {\r\n testIdsArray.push(`testId=${x}`);\r\n });\r\n\r\n if (testIdsArray.length > 0) {\r\n url += testIdsArray.join('&');\r\n }\r\n\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}${url}`)\r\n .pipe(retry(2));\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DxSwitchModule, DxTagBoxModule } from 'devextreme-angular';\r\nimport { DxAccordionModule } from 'devextreme-angular';\r\nimport { DxButtonModule } from 'devextreme-angular';\r\nimport { DxButtonGroupModule } from 'devextreme-angular';\r\nimport { DxChartModule } from 'devextreme-angular';\r\nimport { DxCheckBoxModule } from 'devextreme-angular';\r\nimport { DxDataGridModule } from 'devextreme-angular';\r\nimport { DxDateBoxModule } from 'devextreme-angular';\r\nimport { DxDropDownBoxModule } from 'devextreme-angular';\r\nimport { DxDropDownButtonModule } from 'devextreme-angular';\r\nimport { DxFormModule } from 'devextreme-angular';\r\nimport { DxHtmlEditorModule } from 'devextreme-angular';\r\nimport { DxListModule } from 'devextreme-angular';\r\nimport { DxLoadIndicatorModule } from 'devextreme-angular';\r\nimport { DxLoadPanelModule } from 'devextreme-angular';\r\nimport { DxLookupModule } from 'devextreme-angular';\r\nimport { DxNumberBoxModule } from 'devextreme-angular';\r\nimport { DxPopoverModule } from 'devextreme-angular';\r\nimport { DxPopupModule } from 'devextreme-angular';\r\nimport { DxRadioGroupModule } from 'devextreme-angular';\r\nimport { DxScrollViewModule } from 'devextreme-angular';\r\nimport { DxSelectBoxModule } from 'devextreme-angular';\r\nimport { DxSpeedDialActionModule } from 'devextreme-angular';\r\nimport { DxTabPanelModule } from 'devextreme-angular';\r\nimport { DxTextAreaModule } from 'devextreme-angular';\r\nimport { DxTextBoxModule } from 'devextreme-angular';\r\nimport { DxToolbarModule } from 'devextreme-angular';\r\nimport { DxTooltipModule } from 'devextreme-angular';\r\nimport { DxTreeListModule } from 'devextreme-angular';\r\nimport { DxValidatorModule } from 'devextreme-angular';\r\nimport { AddressComponent } from './components/address/address.component';\r\nimport { BillToTypeComponent } from './components/bill-to-type/bill-to-type.component';\r\nimport { BillToComponent } from './components/bill-to/bill-to.component';\r\nimport { BillingInformationComponent } from './components/billing-information/billing-information.component';\r\nimport { EditBillingInformationComponent } from './components/billing-information/edit-billing-information/edit-billing-information.component';\r\n\r\nimport { ClearAllBtnComponent } from './components/clear-all-btn/clear-all-btn.component';\r\nimport { ClientPhysicianSelectorDialogComponent } from './components/client-selector/client-physician-selector-dialog/client-physician-selector-dialog.component';\r\nimport { ClientSelectorComponent } from './components/client-selector/client-selector.component';\r\nimport { CommentsControlComponent } from './components/comments-control/comments-control.component';\r\nimport { EmailFaxDialogComponent } from './components/email-fax-dialog/email-fax-dialog.component';\r\nimport { FormRelationGlassComponent } from './components/form-relation-glass/form-relation-glass.component';\r\nimport { FormRelationSelectorComponent } from './components/form-relation-selector/form-relation-selector.component';\r\nimport { FormRelationComponent } from './components/form-relation/form-relation.component';\r\nimport { FromToDateRangeSelectorComponent } from './components/from-to-date-range-selector/from-to-date-range-selector.component';\r\nimport { GlassWithOptionsComponent } from './components/glass-with-options/glass-with-options.component';\r\nimport { GlassComponent } from './components/glass/glass.component';\r\nimport { LoadingHeaderComponent } from './components/loading-header/loading-header.component';\r\nimport { PatientInfoPopupComponent } from './components/patient-info-popup/patient-info-popup.component';\r\nimport { PatientPhysicianHeaderComponent } from './components/patient-physician-header/patient-physician-header.component';\r\nimport { PatientResponsiblePartiesComponent } from './components/patient-responsible-parties/patient-responsible-parties.component';\r\nimport {\r\n PatientResponsiblePartyFormDialogComponent\r\n} from './components/patient-responsible-parties/patient-responsible-party-form-dialog/patient-responsible-party-form-dialog.component';\r\nimport { PatientResultDialogComponent } from './components/patient-selector/patient-result-dialog/patient-result-dialog.component';\r\nimport { PatientSelectorDialogComponent } from './components/patient-selector/patient-selector-dialog/patient-selector-dialog.component';\r\nimport { PatientSelectorComponent } from './components/patient-selector/patient-selector.component';\r\nimport { PhysicianSelectorDialogComponent } from './components/physician-selector/physician-selector-dialog/physician-selector-dialog.component';\r\nimport { PhysicianSelectorComponent } from './components/physician-selector/physician-selector.component';\r\nimport { PrintLogBtnComponent } from './components/print-log-btn/print-log-btn.component';\r\nimport { PrinterDialogMultipleComponent } from './components/printer-dialog-multiple/printer-dialog-multiple.component';\r\nimport { PrinterDialogComponent } from './components/printer-dialog/printer-dialog.component';\r\nimport { SearchBtnComponent } from './components/search-btn/search-btn.component';\r\nimport { SelectorComponent } from './components/selector/selector.component';\r\nimport { SignatureViewerComponent } from './components/signature-viewer/signature-viewer.component';\r\nimport { SingleCardModule } from './components/single-card/single-card.component';\r\nimport { StatusComponent } from './components/status/status.component';\r\nimport { UnitSelectorComponent } from './components/unit-selector/unit-selector.component';\r\nimport { UpdateBillToComponent } from './components/update-bill-to/update-bill-to.component';\r\nimport { AddressService, ClientService, DiagnosisService, MedicationService, PatientService } from './services';\r\nimport { BillingService } from './services/billing.service';\r\nimport { OrdersService } from './services/orders.service';\r\nimport { RecentPatientService } from './services/recent-patient.service';\r\nimport { RecentRequisitionService } from './services/recent-requisition.service';\r\nimport { ReportsService } from './services/reports.service';\r\nimport { RequisitionService } from './services/requisition.service';\r\nimport { SettingsService } from './services/settings.service';\r\nimport { MultipleClientSelectorComponent } from './components/multiple-client-selector/multiple-client-selector.component';\r\nimport { CommentsDialogComponent } from './components/comments-dialog/comments-dialog.component';\r\n\r\n@NgModule({\r\n exports: [\r\n SelectorComponent,\r\n AddressComponent,\r\n GlassComponent,\r\n PrintLogBtnComponent,\r\n StatusComponent,\r\n BillToTypeComponent,\r\n UpdateBillToComponent,\r\n BillToComponent,\r\n BillingInformationComponent,\r\n PrinterDialogComponent,\r\n PrinterDialogMultipleComponent,\r\n PhysicianSelectorComponent,\r\n PatientResponsiblePartiesComponent,\r\n GlassWithOptionsComponent,\r\n ClientSelectorComponent,\r\n CommentsControlComponent,\r\n LoadingHeaderComponent,\r\n EmailFaxDialogComponent,\r\n PatientInfoPopupComponent,\r\n PatientSelectorComponent,\r\n FromToDateRangeSelectorComponent,\r\n ClearAllBtnComponent,\r\n SearchBtnComponent,\r\n UnitSelectorComponent,\r\n PatientPhysicianHeaderComponent,\r\n SignatureViewerComponent,\r\n FormRelationGlassComponent,\r\n MultipleClientSelectorComponent,\r\n CommentsDialogComponent,\r\n ],\r\n declarations: [\r\n SignatureViewerComponent,\r\n PatientResultDialogComponent,\r\n PatientPhysicianHeaderComponent,\r\n EditBillingInformationComponent,\r\n BillingInformationComponent,\r\n BillToComponent,\r\n BillToTypeComponent,\r\n UpdateBillToComponent,\r\n PrinterDialogComponent,\r\n PrinterDialogMultipleComponent,\r\n AddressComponent,\r\n StatusComponent,\r\n SelectorComponent,\r\n PatientResponsiblePartiesComponent,\r\n PatientResponsiblePartyFormDialogComponent,\r\n PrintLogBtnComponent,\r\n FormRelationComponent,\r\n CommentsControlComponent,\r\n GlassComponent,\r\n GlassWithOptionsComponent,\r\n LoadingHeaderComponent,\r\n SelectorComponent,\r\n EmailFaxDialogComponent,\r\n ClearAllBtnComponent,\r\n PatientInfoPopupComponent,\r\n SearchBtnComponent,\r\n ClientPhysicianSelectorDialogComponent,\r\n ClientSelectorComponent,\r\n PhysicianSelectorComponent,\r\n PhysicianSelectorDialogComponent,\r\n UnitSelectorComponent,\r\n FromToDateRangeSelectorComponent,\r\n PatientSelectorComponent,\r\n PatientSelectorDialogComponent,\r\n FormRelationSelectorComponent,\r\n FormRelationGlassComponent,\r\n MultipleClientSelectorComponent,\r\n CommentsDialogComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n DxTextBoxModule,\r\n DxSelectBoxModule,\r\n DxValidatorModule,\r\n DxTreeListModule,\r\n DxPopupModule,\r\n DxDateBoxModule,\r\n DxHtmlEditorModule,\r\n DxButtonModule,\r\n DxTextAreaModule,\r\n DxAccordionModule,\r\n DxLookupModule,\r\n DxNumberBoxModule,\r\n DxChartModule,\r\n DxCheckBoxModule,\r\n DxTabPanelModule,\r\n DxFormModule,\r\n DxScrollViewModule,\r\n DxPopoverModule,\r\n DxListModule,\r\n DxTooltipModule,\r\n DxToolbarModule,\r\n DxLoadPanelModule,\r\n DxButtonGroupModule,\r\n DxLookupModule,\r\n DxSpeedDialActionModule,\r\n DxRadioGroupModule,\r\n DxDropDownButtonModule,\r\n DxDropDownBoxModule,\r\n DxLoadIndicatorModule,\r\n DxDataGridModule,\r\n DxTagBoxModule,\r\n DxSwitchModule,\r\n SingleCardModule\r\n ],\r\n providers: [\r\n DiagnosisService,\r\n MedicationService,\r\n AddressService,\r\n ClientService,\r\n PatientService,\r\n BillingService,\r\n ReportsService,\r\n RequisitionService,\r\n RecentPatientService,\r\n RecentRequisitionService,\r\n SettingsService,\r\n OrdersService\r\n ]\r\n})\r\nexport class SharedModule {\r\n}\r\n","import {Injectable, OnDestroy} from '@angular/core';\r\nimport {MediaService} from \"../../../services/ocl\";\r\nimport {BehaviorSubject, Subject} from \"rxjs\";\r\nimport {takeUntil} from \"rxjs/operators\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\nimport {environment} from \"../../../../../environments/environment\";\r\nimport notify from \"devextreme/ui/notify\";\r\n\r\nconst defaultTimer = 120;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MicToJsonService implements OnDestroy {\r\n private area?: string;\r\n private fileName?: string;\r\n private file?: Blob;\r\n private jsonStructure?: object;\r\n private questions?: string[];\r\n private isLoading$: Subject = new BehaviorSubject(false);\r\n private transcriptionAvailable$: BehaviorSubject = new BehaviorSubject('');\r\n private jsonAvailable$: BehaviorSubject = new BehaviorSubject({});\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(public mediaService: MediaService, private httpClient: HttpClient) {\r\n this.handleRecording = this.handleRecording.bind(this);\r\n this.mediaService.configureMicListener(defaultTimer);\r\n this.mediaService.RecordingAvailable\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(this.handleRecording);\r\n this.transcriptionAvailable$.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.isLoading$.next(false);\r\n });\r\n this.jsonAvailable$.pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n this.isLoading$.next(false);\r\n });\r\n }\r\n\r\n get JsonAvailable(): BehaviorSubject {\r\n return this.jsonAvailable$;\r\n }\r\n\r\n get TranscriptionAvailable(): BehaviorSubject {\r\n return this.transcriptionAvailable$;\r\n }\r\n\r\n set Area(area: string) {\r\n this.area = area;\r\n }\r\n\r\n set FileName(fileName: string) {\r\n this.fileName = fileName;\r\n }\r\n\r\n get IsLoading(): Subject {\r\n return this.isLoading$;\r\n }\r\n\r\n public async handleMicClick() {\r\n if (!this.mediaService.IsMicListening) {\r\n await this.mediaService.startRecording();\r\n } else {\r\n await this.mediaService.stopRecording();\r\n }\r\n }\r\n\r\n get FileName() {\r\n return this.fileName ? `${this.fileName}-${new Date().toISOString()}.webm` : 'audio.webm';\r\n }\r\n\r\n get JsonObject(): object {\r\n return this.jsonStructure ?? {};\r\n }\r\n\r\n set JsonObject(json: object) {\r\n this.jsonStructure = json;\r\n }\r\n\r\n get Questions(): string[] {\r\n return this.questions ?? [];\r\n }\r\n\r\n set Questions(questions: string[]) {\r\n this.questions = questions;\r\n }\r\n\r\n public async generateJsonFromTranscript(isDocumentGenerationEnabledForArea: boolean, transcript: string): Promise {\r\n if (this.file == null) {\r\n alert(\"No recording available to generate data from\");\r\n this.jsonAvailable$.next(this.JsonObject);\r\n }\r\n\r\n this.isLoading$.next(true);\r\n const formData = new FormData();\r\n formData.append('area', this.area ?? '');\r\n formData.append('transcript', transcript);\r\n formData.append('file', this.file as Blob, this.FileName);\r\n formData.append('json', JSON.stringify(this.JsonObject));\r\n formData.append('questions', JSON.stringify(this.Questions));\r\n formData.append('generateDocument', isDocumentGenerationEnabledForArea.toString());\r\n\r\n const response = await this.httpClient.post(`${environment.aiCommands.apiUrl}/transcript-to-json`, formData, {\r\n headers: {\r\n 'enctype': 'multipart/form-data'\r\n }\r\n }).toPromise();\r\n\r\n try {\r\n const json = JSON.parse(response);\r\n this.jsonAvailable$?.next(json);\r\n } catch (e) {\r\n notify({ message: \"There was an error trying to understand your audio, or there are too many requests at this moment. Please try again later.\", type: 'error'});\r\n await this.mediaService.reset();\r\n this.TranscriptionAvailable.next('');\r\n this.isLoading$.next(false);\r\n }\r\n }\r\n\r\n private async handleRecording(chunks: Blob[]) {\r\n this.isLoading$.next(true);\r\n this.file = new Blob(chunks, {type: 'audio/webm'});\r\n const formData = new FormData();\r\n formData.append('area', this.area ?? '')\r\n formData.append('file', this.file, this.FileName);\r\n const response = await this.httpClient.post(`${environment.aiCommands.apiUrl}/audio-transcript`, formData, {\r\n headers: {\r\n 'enctype': 'multipart/form-data'\r\n }\r\n }).toPromise();\r\n this.transcriptionAvailable$?.next(response);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n//todo on dialog close stop recording\r\n\r\n","\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \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 ChangeDetectorRef,\r\n Component, EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit, Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {\r\n DxButtonModule,\r\n DxHtmlEditorComponent,\r\n DxHtmlEditorModule, DxLoadIndicatorModule, DxLoadPanelModule,\r\n DxPopupModule,\r\n DxTooltipModule\r\n} from \"devextreme-angular\";\r\nimport {MicToJsonService} from \"./mic-to-json.service\";\r\nimport {Subscription} from \"rxjs\";\r\nimport {environment} from \"../../../../../environments/environment\";\r\n\r\n@Component({\r\n selector: 'app-mic-to-json-button',\r\n standalone: true,\r\n imports: [CommonModule, DxButtonModule, DxTooltipModule, DxPopupModule, DxHtmlEditorModule, DxLoadIndicatorModule, DxLoadPanelModule],\r\n templateUrl: './mic-to-json-button.component.html',\r\n styleUrls: ['./mic-to-json-button.component.scss']\r\n})\r\nexport class MicToJsonButtonComponent implements OnInit, OnDestroy, OnChanges {\r\n @Input() area?: string;\r\n @Input() fileName: string | undefined;\r\n @Input() generateDocument: boolean = true;\r\n @Input() json: any;\r\n @Input() questions: string[] = [];\r\n @Output() jsonAvailable: EventEmitter = new EventEmitter();\r\n @ViewChild('editor', {static: false}) editor: DxHtmlEditorComponent | undefined;\r\n isPopUpVisible = false;\r\n\r\n private detectionSubscription?: Subscription;\r\n private jsonParsingSubscription?: Subscription;\r\n private transcriptionAvailableSubscription?: Subscription;\r\n\r\n constructor(public service: MicToJsonService, private changesDetector: ChangeDetectorRef) {\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.detectionSubscription?.unsubscribe();\r\n this.transcriptionAvailableSubscription?.unsubscribe();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.detectionSubscription = this.service.mediaService.Changes.subscribe(() => {\r\n this.changesDetector.detectChanges();\r\n });\r\n this.transcriptionAvailableSubscription = this.service.TranscriptionAvailable?.subscribe((value) => {\r\n if (value != '')\r\n this.isPopUpVisible = true;\r\n this.changesDetector.detectChanges();\r\n this.editor?.instance?.option('value', value);\r\n this.changesDetector.detectChanges();\r\n });\r\n this.jsonParsingSubscription = this.service.JsonAvailable?.subscribe((value) => {\r\n this.jsonAvailable.emit(value);\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.area && changes.area.currentValue) {\r\n this.service.Area = changes.area.currentValue;\r\n }\r\n\r\n if (changes.fileName && changes.fileName.currentValue) {\r\n this.service.FileName = changes.fileName.currentValue;\r\n }\r\n\r\n if (changes.json && changes.json.currentValue) {\r\n this.service.JsonObject = changes.json.currentValue;\r\n }\r\n\r\n if (changes.questions && changes.questions.currentValue) {\r\n this.service.Questions = changes.questions.currentValue;\r\n }\r\n }\r\n\r\n get IsEnabled(): boolean {\r\n return environment.aiCommands.areas.includes(this.area ?? '');\r\n }\r\n\r\n public async close(discard: boolean = true) {\r\n this.isPopUpVisible = false;\r\n if (discard) {\r\n await this.service.mediaService.reset();\r\n this.service.TranscriptionAvailable.next('');\r\n } else {\r\n const value = this.editor?.instance.option('value');\r\n await this.service.generateJsonFromTranscript(this.generateDocument, value);\r\n }\r\n }\r\n}\r\n","import {UntypedFormGroup} from '@angular/forms';\r\n\r\nexport function DateMoreThan(thanControlName: string) {\r\n return (control: UntypedFormGroup) => {\r\n if (!control.parent) return null;\r\n\r\n const formGroup = control.parent as UntypedFormGroup;\r\n const thanControl = formGroup.controls[thanControlName];\r\n\r\n if (!thanControl || !control.value || thanControl.value) return null;\r\n\r\n const [day, month, year] = typeof control.value === 'object' ? control.value.toString().split('/') : control.value.split('/');\r\n const [day2, month2, year2] = typeof thanControl.value === 'object' ? thanControl.value.toString().split('/') : thanControl.value.split('/');\r\n return new Date(year2, month2 - 1, day2).getTime() > new Date(year, month - 1, day).getTime() ?\r\n {mustBeMoreThan: true} : null;\r\n };\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';\r\nimport {confirm} from 'devextreme/ui/dialog';\r\nimport {Observable} from 'rxjs';\r\nimport {DirtyComponent} from '../utils';\r\nimport {FusionAuthService} from \"../services/fusion-auth\";\r\nimport {LabSettings} from \"../models/ocl\";\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class DirtyCheckGuard {\r\n\r\n public canDeactivate(\r\n component: DirtyComponent,\r\n next: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree {\r\n\r\n\r\n\r\n return component.canDeactivate() ? confirm('There are unsaved changes. Do you want to continue and lose these changes?', 'Unsaved changes') : true;\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';\r\nimport {Observable} from 'rxjs';\r\nimport {retry} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../services/fusion-auth';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FusionAuthGuard {\r\n constructor(private router: Router, private fusionAuth: FusionAuthService) {\r\n }\r\n\r\n public canActivate(\r\n next: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot,\r\n ): Observable | Promise | boolean | UrlTree {\r\n return new Promise(async resolve => {\r\n let routeRoles, role;\r\n if (this.fusionAuth.Profile !== undefined && this.fusionAuth.Profile !== null) {\r\n try {\r\n role = this.fusionAuth.Profile?.registrations[0].roles[0];\r\n routeRoles = next.firstChild !== null && next.firstChild.firstChild !== null ? next.firstChild.firstChild.data.roles :\r\n next.firstChild !== null ? next.firstChild.data.roles : next.data.roles;\r\n if (this.fusionAuth.IsLoggedIn === 'false') {\r\n await this.router.navigateByUrl('/login');\r\n return resolve(false);\r\n }\r\n } catch {\r\n await this.router.navigateByUrl('/login');\r\n return resolve(false);\r\n }\r\n\r\n if (this.fusionAuth.getToken()) {\r\n const tokenValidation = await this.fusionAuth.validateJWT().toPromise();\r\n if (tokenValidation.status !== 200) {\r\n if (this.fusionAuth.getRefreshToken()) {\r\n await this.fusionAuth.exchangeRefreshTokenForJWT();\r\n } else if (this.router.url !== '/login') {\r\n await this.router.navigateByUrl('/login');\r\n }\r\n }\r\n } else if (this.router.url !== '/login') {\r\n await this.router.navigateByUrl('/login');\r\n }\r\n\r\n if (this.fusionAuth.IsLoggedIn === 'true' && routeRoles && routeRoles.indexOf(role) !== -1) {\r\n\r\n return resolve(true);\r\n } else {\r\n await this.router.navigateByUrl('/login');\r\n }\r\n } else {\r\n await this.router.navigateByUrl('/login');\r\n }\r\n return resolve(false);\r\n });\r\n }\r\n}\r\n","import {HttpBackend, HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport * as HttpStatusCode from 'http-status-codes';\r\nimport {retry, tap} from 'rxjs/operators';\r\nimport {environment} from '../../../../environments/environment';\r\nimport {User} from '../../models/fusion-auth';\r\nimport {generateGravatarUrl, HttpRequestBuilder} from '../../utils';\r\nimport {StorageService} from '../general';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FusionAuthService {\r\n public applicationId: string;\r\n public baseUrl: string;\r\n\r\n constructor(\r\n private storage: StorageService,\r\n public handler: HttpBackend,\r\n private http: HttpClient\r\n ) {\r\n this.applicationId = environment.fusionAuth.applicationId;\r\n this.baseUrl = environment.fusionAuth.apiUrl;\r\n }\r\n\r\n public get IsLoggedIn() {\r\n return this.storage.get('isLoggedIn', 'fusionAuth');\r\n }\r\n\r\n public get Profile(): User {\r\n const value = this.storage.get('user', 'auth');\r\n return JSON.parse(value ? value : '{}');\r\n }\r\n\r\n public getToken(): string {\r\n const value = this.storage.get('token', 'auth');\r\n return value ? value : '';\r\n }\r\n\r\n public set SignatureImage(image: string) {\r\n const value = this.storage.get('user', 'auth');\r\n const user = JSON.parse(value ? value : '{}');\r\n user.data = {\r\n ...user.data,\r\n signImage: image\r\n }\r\n\r\n this.storage.store(JSON.stringify(user), 'user', 'auth');\r\n }\r\n\r\n public getRefreshToken(): string {\r\n const value = this.storage.get('refreshToken', 'auth');\r\n return value ? value : '';\r\n }\r\n\r\n public changePassword(request: any) {\r\n return this.start()\r\n .setUri('/user/change-password')\r\n .setJsonBody(request)\r\n .setMethod('POST')\r\n .build();\r\n }\r\n\r\n public exchangeRefreshTokenForJWT() {\r\n const request = {\r\n refreshToken: this.getRefreshToken(),\r\n };\r\n\r\n return this.start()\r\n .setUri('/jwt/refresh')\r\n .setJsonBody(request)\r\n .setMethod('POST')\r\n .setHeader('X-FusionAuth-TenantId', environment.fusionAuth.tenantId)\r\n .build()\r\n .pipe(\r\n retry(2),\r\n tap((response: any) => {\r\n if (response.status === HttpStatusCode.OK) {\r\n this.storage.store(response.body.token, 'token', 'auth');\r\n }\r\n }),\r\n );\r\n }\r\n\r\n public cleanCredentials() {\r\n this.storage.remove('token', 'auth');\r\n this.storage.remove('user', 'auth');\r\n this.storage.remove('refreshToken', 'auth');\r\n this.setLoggedIn(false);\r\n }\r\n\r\n public forgotPassword(request: any) {\r\n request.applicationId = this.applicationId;\r\n\r\n return this.start()\r\n .setHeader('X-FusionAuth-TenantId', environment.fusionAuth.tenantId)\r\n .setUri('/user/forgot-password')\r\n .setJsonBody(request)\r\n .setMethod('POST')\r\n .build();\r\n }\r\n\r\n public login(request: any, skipInterceptor?: boolean) {\r\n request = {...request, applicationId: this.applicationId};\r\n\r\n return this.start(skipInterceptor)\r\n .setHeader('authorization', environment.fusionAuth.apiKey)\r\n .setUri('/login')\r\n .setJsonBody(request)\r\n .setMethod('POST')\r\n .build()\r\n .pipe(\r\n tap((response: any) => {\r\n if (response.body.user.imageUrl === null || response.body.user.imageUrl === undefined) {\r\n response.body.user.imageUrl = generateGravatarUrl(response.body.user.email);\r\n }\r\n }),\r\n tap((response: any) => {\r\n if (response.status === HttpStatusCode.OK) {\r\n this.storage.store(JSON.stringify(response.body.user), 'user', 'auth');\r\n this.storage.store(response.body.token, 'token', 'auth');\r\n this.storage.store(response.body.refreshToken, 'refreshToken', 'auth');\r\n this.storage.store(String(false), 'logged', 'fusionAuth');\r\n this.setLoggedIn(true);\r\n }\r\n }),\r\n );\r\n }\r\n\r\n public hasBeenLogged() {\r\n return this.storage.get('logged', 'fusionAuth');\r\n }\r\n\r\n public clearHasBeenLogged() {\r\n return this.storage.store(String(true), 'logged', 'fusionAuth');\r\n }\r\n\r\n public setLoggedIn(value: boolean) {\r\n return this.storage.store(String(value), 'isLoggedIn', 'fusionAuth');\r\n }\r\n\r\n public logout(globalLogout?: any, refreshToken?: string) {\r\n return this.start()\r\n .setHeader('Content-Type', 'text/plain')\r\n .setUri('/logout')\r\n .setUrlParameter('global', globalLogout)\r\n .setUrlParameter('refreshToken', refreshToken)\r\n .setMethod('POST')\r\n .build()\r\n .pipe(\r\n tap(() => {\r\n this.cleanCredentials();\r\n }),\r\n );\r\n }\r\n\r\n private start(skipInter?: boolean) {\r\n const httpRequestBuilder = skipInter ?\r\n new HttpRequestBuilder(new HttpClient(this.handler)).setUrl(this.baseUrl) :\r\n new HttpRequestBuilder(this.http).setUrl(this.baseUrl);\r\n httpRequestBuilder.getOptions().reportProgress = true;\r\n return httpRequestBuilder;\r\n }\r\n\r\n public validateJWT() {\r\n return this.start()\r\n .setHeader('Content-Type', 'text/plain')\r\n .setUri('/jwt/validate')\r\n .setMethod('GET')\r\n .build().pipe(retry(2));\r\n }\r\n}\r\n","import {HttpClient, HttpResponse} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Store} from '@ngrx/store';\r\nimport DevExpress from 'devextreme';\r\nimport CustomStore = DevExpress.data.CustomStore;\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\nimport {map, retry} from 'rxjs/operators';\r\nimport {environment} from 'src/environments/environment';\r\nimport {AppState} from '../../../stores/app.state';\r\nimport {Application, Registration, RegistrationRequest, RegistrationResponse, Role} from '../../models/fusion-auth';\r\nimport {HttpRequestBuilder, SECURED_STORE} from '../../utils';\r\nimport {AppInfoService} from '../general';\r\nimport {FusionAuthService} from './fusion-auth.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FusionAuthManagementService {\r\n constructor(\r\n private httpClient: HttpClient,\r\n private appInfo: AppInfoService,\r\n private fusionAuthService: FusionAuthService,\r\n private store: Store,\r\n private router: Router\r\n ) {\r\n }\r\n\r\n public getFusionAuthApplication(): Observable {\r\n return this.httpClient.get(`${environment.portalBackend.apiUrl}/system/application`);\r\n }\r\n\r\n public getApplicationRoles(): Observable {\r\n // @ts-ignore\r\n return this.getFusionAuthApplication().pipe(retry(2), map((application: Application) => application.roles));\r\n }\r\n\r\n public getUsers(clientIds: number[] = [], dataSource: BehaviorSubject): CustomStore {\r\n let url = clientIds.length > 0 ? `/system/users?` : `/system/users`;\r\n const clientIdsArray: string[] = [];\r\n clientIds.map(x => {\r\n clientIdsArray.push(`clientIds=${x}`);\r\n });\r\n url += clientIdsArray.join('&');\r\n\r\n return SECURED_STORE({\r\n routerService: this.router,\r\n dataSource,\r\n tokenRefresh: this.fusionAuthService.exchangeRefreshTokenForJWT(),\r\n loadUrl: `${environment.portalBackend.apiUrl}${url}`,\r\n loadParams: undefined,\r\n onLoaded: (users) => {\r\n this.setRoleToUsers(users);\r\n },\r\n });\r\n }\r\n\r\n public existUser(email: string): Observable {\r\n return this.httpClient.get(`${environment.portalBackend.apiUrl}/system/users/exist-user?email=${email}`);\r\n }\r\n\r\n private setRoleToUsers(users: any[]) {\r\n users.forEach(user => {\r\n let role: string = '';\r\n if (user.registrations.find((r: Registration) => r.applicationId === environment.fusionAuth.applicationId).roles.length > 0) {\r\n role = user.registrations.find((r: Registration) => r.applicationId === environment.fusionAuth.applicationId).roles[0];\r\n }\r\n user.role = role;\r\n });\r\n }\r\n\r\n public deleteUser(userId: string): Observable {\r\n return this.httpClient.delete(`${environment.portalBackend.apiUrl}/system/users/${userId}`, {\r\n reportProgress: true,\r\n observe: 'events',\r\n });\r\n }\r\n\r\n public createUser(registrationRequest: RegistrationRequest): Observable> {\r\n return this.start()\r\n .addUriSegment('system/users')\r\n .setJsonBody(registrationRequest)\r\n .setMethod('POST')\r\n .build() as Observable>;\r\n }\r\n\r\n public updateUser(userId: string, registrationRequest: RegistrationRequest): Observable> {\r\n return this.start()\r\n .addUriSegment(`system/users/${userId}`)\r\n .setJsonBody(registrationRequest)\r\n .setMethod('PUT')\r\n .build() as Observable>;\r\n }\r\n\r\n private start() {\r\n const httpRequestBuilder = new HttpRequestBuilder(this.httpClient).setUrl(environment.portalBackend.apiUrl);\r\n httpRequestBuilder.getOptions().reportProgress = false;\r\n return httpRequestBuilder;\r\n }\r\n\r\n public createPatientUser(patientId: string, registrationRequest: RegistrationRequest): Observable> {\r\n return this.httpClient.post(\r\n `${environment.portalBackend.apiUrl}/system/anonymous-users/sign-up/${patientId}`,\r\n registrationRequest,\r\n {\r\n observe: 'response'\r\n });\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport * as Moment from 'moment-timezone';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DateHelperService {\r\n\r\n public formatDate(date: Date | string | number): string {\r\n const tz = Moment.tz.guess();\r\n return Moment.utc(date).tz(tz).format('LL');\r\n }\r\n\r\n public dateWithFormat(date: Date, format: string): string {\r\n if (!Moment.utc(date).isValid()) {\r\n return '';\r\n }\r\n\r\n const tz = Moment.tz.guess();\r\n return Moment.utc(date).tz(tz).format(format);\r\n }\r\n\r\n public dateWithFormatWithoutUtc(date: Date, format: string): string {\r\n if (!Moment(date).isValid()) {\r\n return '';\r\n }\r\n\r\n const tz = Moment.tz.guess();\r\n return Moment(date).tz(tz).format(format);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class AppInfoService {\r\n #config = {\r\n applicationTitle: '',\r\n applicationLogo: '',\r\n laboratoryName: '',\r\n laboratoryAddress: '',\r\n laboratoryPhone: '',\r\n laboratoryEmail: ''\r\n }\r\n\r\n public get title() {\r\n return this.#config.applicationTitle;\r\n }\r\n\r\n public set title(title) {\r\n this.#config.applicationTitle = title;\r\n }\r\n\r\n\r\n public get logo() {\r\n return this.#config.applicationLogo;\r\n }\r\n\r\n public set logo(logo) {\r\n this.#config.applicationLogo = logo;\r\n }\r\n\r\n public get lab() {\r\n return this.#config.laboratoryName;\r\n }\r\n\r\n public set lab(name) {\r\n this.#config.laboratoryName = name;\r\n }\r\n\r\n public get labAddress() {\r\n return this.#config.laboratoryAddress;\r\n }\r\n\r\n public set labAddress(address) {\r\n this.#config.laboratoryAddress = address;\r\n }\r\n\r\n public get labPhone() {\r\n return this.#config.laboratoryPhone;\r\n }\r\n\r\n public set labPhone(phone) {\r\n this.#config.laboratoryPhone = phone;\r\n }\r\n\r\n public get email() {\r\n return this.#config.laboratoryEmail;\r\n }\r\n\r\n public set email(name) {\r\n this.#config.laboratoryEmail = name;\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\r\n\r\n@Injectable()\r\nexport class AuthService {\r\n public loggedIn = true;\r\n\r\n constructor(private router: Router) {\r\n }\r\n\r\n public async logIn(login: string, password: string) {\r\n this.loggedIn = true;\r\n await this.router.navigate(['/']);\r\n }\r\n\r\n public async logOut() {\r\n this.loggedIn = false;\r\n await this.router.navigate(['/login-form']);\r\n }\r\n\r\n get isLoggedIn() {\r\n return this.loggedIn;\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class AuthGuardService {\r\n constructor(private router: Router, private authService: AuthService) {\r\n }\r\n\r\n public async canActivate(route: ActivatedRouteSnapshot): Promise {\r\n const isLoggedIn = this.authService.isLoggedIn;\r\n const isLoginForm = route.routeConfig !== undefined && route.routeConfig !== null && route.routeConfig.path === 'login-form';\r\n\r\n if (isLoggedIn && isLoginForm) {\r\n await this.router.navigate(['/']);\r\n return false;\r\n }\r\n\r\n if (!isLoggedIn && !isLoginForm) {\r\n await this.router.navigate(['/login-form']);\r\n }\r\n\r\n return isLoggedIn || isLoginForm;\r\n }\r\n}\r\n","import {DOCUMENT} from '@angular/common';\r\nimport {Inject, Injectable} from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DOMService {\r\n\r\n constructor(@Inject(DOCUMENT) private document: Document) {\r\n }\r\n\r\n public getBody(): HTMLElement {\r\n return this.document.body;\r\n }\r\n\r\n public getElementsByClassname(className: string): HTMLCollection {\r\n return this.document.getElementsByClassName(className);\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CookieService} from 'ngx-cookie-service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class StorageService {\r\n constructor(private cookieService: CookieService) {\r\n if (this.getDeviceId() === null) {\r\n const deviceId = this.makeDeviceId();\r\n this.cookieService.set('deviceId', deviceId);\r\n }\r\n }\r\n\r\n private makeDeviceId() {\r\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n const deviceId = [];\r\n for (let index = 32; index; index--) {\r\n deviceId.push(alphabet[Math.floor(Math.random() * 62)]);\r\n }\r\n return deviceId.join('');\r\n }\r\n\r\n public getDeviceId() {\r\n return this.cookieService.get('deviceId');\r\n }\r\n\r\n public getCookie(key: string, prefix: string) {\r\n const fullKey = prefix + key;\r\n return this.cookieService.get(fullKey);\r\n }\r\n\r\n public get(key: string, prefix: string) {\r\n const fullKey = prefix + key;\r\n return localStorage.getItem(fullKey);\r\n }\r\n\r\n public storeCookie(value: string, key: string, prefix: string) {\r\n const fullKey = prefix + key;\r\n if (value !== null && typeof value !== 'undefined') {\r\n this.cookieService.set(fullKey, value);\r\n } else {\r\n this.cookieService.delete(fullKey);\r\n }\r\n return this;\r\n }\r\n\r\n public store(value: string, key: string, prefix: string) {\r\n const fullKey = prefix + key;\r\n if (value !== null && typeof value !== 'undefined') {\r\n localStorage.setItem(fullKey, value);\r\n } else {\r\n localStorage.removeItem(fullKey);\r\n }\r\n return this;\r\n }\r\n\r\n public remove(key: string, prefix: string) {\r\n const fullKey = prefix + key;\r\n localStorage.removeItem(fullKey);\r\n return this;\r\n }\r\n\r\n public removeStorage(key: string, prefix: string) {\r\n const fullKey = prefix + key;\r\n this.cookieService.delete(fullKey);\r\n return this;\r\n }\r\n}\r\n","import {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\r\nimport {EventEmitter, Injectable, OnDestroy, Output} from '@angular/core';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class ScreenService implements OnDestroy {\r\n private onDestroy$: Subject = new Subject();\r\n public get sizes() {\r\n return {\r\n 'screen-x-small': this.breakpointObserver.isMatched(Breakpoints.XSmall),\r\n 'screen-small': this.breakpointObserver.isMatched(Breakpoints.Small),\r\n 'screen-tablet': this.breakpointObserver.isMatched(Breakpoints.TabletPortrait),\r\n 'screen-medium': this.breakpointObserver.isMatched(Breakpoints.Medium),\r\n 'screen-large': this.isLargeScreen(),\r\n };\r\n }\r\n\r\n @Output() public changed = new EventEmitter();\r\n\r\n constructor(private breakpointObserver: BreakpointObserver) {\r\n this.breakpointObserver\r\n .observe([Breakpoints.XSmall, Breakpoints.Small, Breakpoints.Medium, Breakpoints.Large])\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => this.changed.next());\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete()\r\n }\r\n\r\n public isDesktop(): boolean {\r\n return this.sizes['screen-large'] || this.sizes['screen-medium'];\r\n }\r\n\r\n private isLargeScreen() {\r\n const isLarge = this.breakpointObserver.isMatched(Breakpoints.Large);\r\n const isXLarge = this.breakpointObserver.isMatched(Breakpoints.XLarge);\r\n\r\n return isLarge || isXLarge;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class PWADetectorService {\r\n public isPWA() {\r\n return window.matchMedia('(display-mode: standalone)').matches ||\r\n (window.navigator as any).standalone ||\r\n document.referrer.includes('android-app://');\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {environment} from '../../../../environments/environment';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UrlProviderService {\r\n\r\n public get ApiUrl(): string {\r\n return environment.portalBackend.apiUrl;\r\n }\r\n\r\n public get ServerUrl(): string {\r\n return environment.portalBackend.serverUrl;\r\n }\r\n\r\n public get AiAnalyzerUrl(): string {\r\n return environment.aiAnalysis.apiUrl;\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { retry } from 'rxjs/operators';\r\nimport { UrlProviderService } from '../general';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ContactService {\r\n\r\n constructor(private urlProviderService: UrlProviderService, private httpClient: HttpClient) {\r\n }\r\n\r\n public sendEmail(name: string, email: string, phone: string, message: string): Observable {\r\n return this.httpClient.post(`${this.urlProviderService.ApiUrl}/system/contacts/email?name=${name}&email=${email}&phone=${phone}&message=${message}`,\r\n {reportProgress: true}).pipe(retry(2));\r\n }\r\n}\r\n","import {HttpClient} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {forkJoin} from 'rxjs';\r\nimport {map, retry} from 'rxjs/operators';\r\nimport {LabSettings} from '../../models/ocl';\r\nimport {UrlProviderService} from '../general';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class LabSettingsService {\r\n\r\n constructor(private urlProvider: UrlProviderService, private httpClient: HttpClient) {\r\n }\r\n\r\n public getSettings() {\r\n const logoRequest = this.httpClient.get(`${this.urlProvider.ApiUrl}/system/settings/logo`);\r\n const licenseRequest = this.httpClient.get(`${this.urlProvider.ApiUrl}/system/settings/license`);\r\n const billingRequest = this.httpClient.get(`${this.urlProvider.ApiUrl}/system/settings/billing`);\r\n const reportRequest = this.httpClient.get(`${this.urlProvider.ApiUrl}/system/settings/report`);\r\n\r\n // TODO REPLACE IT'S DEPRECATED\r\n const observable = forkJoin(logoRequest, billingRequest, reportRequest, licenseRequest);\r\n return observable.pipe(\r\n retry(2),\r\n map(([logoResponse, billingResponse, reportResponse, licenseResponse]) => {\r\n return {\r\n logo: logoResponse.logo,\r\n address: reportResponse.address,\r\n url: reportResponse.url,\r\n email: licenseResponse.email,\r\n name: licenseResponse.name,\r\n fax: billingResponse.fax,\r\n phone: billingResponse.phone,\r\n } as LabSettings;\r\n })\r\n );\r\n }\r\n\r\n public getToxicologySettings() {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/settings/results`).pipe(retry(2));\r\n }\r\n\r\n public getWebSupplyCategorySettings() {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/settings/supply-categories`).pipe(retry(2));\r\n }\r\n\r\n public getResultEntrySettings() {\r\n return this.httpClient.get<{\r\n resultEntryEnabled: boolean,\r\n resultEntrySuperUser: boolean,\r\n resultEntryClientAdmin: boolean,\r\n resultEntryClientBasic: boolean\r\n }>(`${this.urlProvider.ApiUrl}/system/settings/result-entry`)\r\n .pipe(retry(2));\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Store } from '@ngrx/store';\r\nimport { createStore } from 'devextreme-aspnet-data-nojquery';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport { Observable } from 'rxjs';\r\nimport { retry } from 'rxjs/operators';\r\nimport { AppState } from '../../../stores/app.state';\r\nimport { IStandingOrderSearch, StandingOrderViewModel } from '../../models/ocl/standing-order-view-model';\r\nimport { ObjectUtils } from '../../utils';\r\nimport { FusionAuthService } from '../fusion-auth';\r\nimport { UrlProviderService } from '../general';\r\nimport * as Moment from 'moment';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class StandingOrderService {\r\n constructor(private urlProvider: UrlProviderService,\r\n private store: Store, private httpClient: HttpClient, private fusionAuthService: FusionAuthService) {\r\n this.getExtremeStore = this.getExtremeStore.bind(this);\r\n }\r\n\r\n public getExtremeStore(externalFilters: IStandingOrderSearch, clientIds?: number[]): CustomStore {\r\n const loadParams = {\r\n ...externalFilters,\r\n client: externalFilters.client ? externalFilters.client.id : undefined,\r\n unit: externalFilters.unit ? externalFilters.unit.id : undefined,\r\n patient: externalFilters.patient ? externalFilters.patient.id : undefined,\r\n testIds: externalFilters.testIds,\r\n clientIds\r\n };\r\n\r\n return createStore({\r\n key: 'id',\r\n loadUrl: `${this.urlProvider.ApiUrl}/standing-orders/extreme`,\r\n onBeforeSend: (operation, ajaxSettings) => {\r\n if (!ajaxSettings.headers) {\r\n ajaxSettings.headers = {};\r\n }\r\n ajaxSettings.headers.authorization = `JWT ${this.fusionAuthService.getToken()}`;\r\n ajaxSettings.method = 'GET';\r\n },\r\n loadParams,\r\n });\r\n }\r\n\r\n public create(standingOrder: StandingOrderViewModel): Observable {\r\n standingOrder = ObjectUtils.capitalize(standingOrder) as StandingOrderViewModel;\r\n // @ts-ignore\r\n standingOrder.scheduler.startDate = Moment(standingOrder.scheduler.startDate).format('YYYY/MM/DD HH:mm:ss');\r\n return this.httpClient.post(`${this.urlProvider.ApiUrl}/standing-orders`, standingOrder);\r\n }\r\n\r\n public update(standingOrder: StandingOrderViewModel): Observable {\r\n standingOrder = ObjectUtils.capitalize(standingOrder) as StandingOrderViewModel;\r\n // @ts-ignore\r\n standingOrder.scheduler.startDate = Moment(standingOrder.scheduler.startDate).format('YYYY/MM/DD HH:mm:ss');\r\n return this.httpClient.put(`${this.urlProvider.ApiUrl}/standing-orders/${standingOrder.id}`, standingOrder);\r\n }\r\n\r\n public getStandingOrder(id: number): Observable {\r\n return this.httpClient.get(`${this.urlProvider.ApiUrl}/standing-orders/${id}`).pipe(retry(2));\r\n }\r\n\r\n public cancel(standingOrderIds: number[]) {\r\n let url = `/standing-orders/cancel?`;\r\n const ids: string[] = [];\r\n standingOrderIds.map(x => {\r\n ids.push(`ids=${x}`);\r\n });\r\n\r\n if (ids.length > 0) {\r\n url += ids.join('&');\r\n }\r\n\r\n return this.httpClient.put(`${this.urlProvider.ApiUrl}${url}`, {reportProgress: true});\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { SupplyRequest } from '../../models/ocl';\r\nimport { UrlProviderService } from '../general';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupplyService {\r\n\r\n constructor(private urlProviderService: UrlProviderService, private httpClient: HttpClient) {\r\n }\r\n\r\n public sendEmail(supply: SupplyRequest): Observable {\r\n return this.httpClient.post(`${this.urlProviderService.ApiUrl}/system/supplies/email`, supply,\r\n {reportProgress: true});\r\n }\r\n}\r\n","import {Injectable, OnDestroy} from '@angular/core';\r\nimport {captureException} from \"@sentry/angular-ivy\";\r\nimport {BehaviorSubject, Subject, timer} from \"rxjs\";\r\nimport {map, takeUntil, takeWhile} from \"rxjs/operators\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MediaService implements OnDestroy {\r\n #stream?: MediaStream | null;\r\n #recorder?: MediaRecorder;\r\n private isListening$: BehaviorSubject = new BehaviorSubject(false);\r\n private micAvailable?: boolean = undefined;\r\n private timer?: number;\r\n private timerSeconds?: number;\r\n private changes: BehaviorSubject = new BehaviorSubject(undefined);\r\n private chunks: Blob[] = [];\r\n private recordingAvailable$: Subject = new Subject();\r\n private onDestroy$: Subject = new Subject();\r\n\r\n\r\n constructor() {\r\n this.initializeMicButton().then();\r\n }\r\n\r\n //region getters\r\n public get Timer(): number {\r\n return this.timer as number;\r\n }\r\n\r\n public get RecordingAvailable(): Subject {\r\n return this.recordingAvailable$;\r\n }\r\n\r\n public get IsMicAvailable(): boolean {\r\n return this.micAvailable ?? false;\r\n }\r\n\r\n public get IsMicListening(): boolean {\r\n return this.isListening$.value;\r\n }\r\n\r\n public get Changes(): BehaviorSubject {\r\n return this.changes;\r\n }\r\n\r\n //endregion\r\n\r\n //region public methods\r\n\r\n configureMicListener(timerSeconds: number): void {\r\n\r\n if (timerSeconds == null)\r\n throw new Error('timerSeconds cannot be null');\r\n\r\n this.timerSeconds = timerSeconds;\r\n\r\n this.isListening$.pipe(takeUntil(this.onDestroy$))\r\n .subscribe((value) => {\r\n if (value) {\r\n this.timer = this.timerSeconds;\r\n this.Changes.next();\r\n timer(0, 1000)\r\n .pipe(\r\n takeWhile(() => this.isListening$.value),\r\n map(x => this.timer as number - 1),\r\n )\r\n .subscribe((x) => {\r\n this.timer = x;\r\n\r\n if (this.timer === 0) {\r\n this.stopRecording();\r\n }\r\n\r\n this.Changes.next();\r\n });\r\n } else\r\n this.timer = this.timerSeconds;\r\n });\r\n }\r\n\r\n async startRecording(): Promise {\r\n await this.startListening();\r\n\r\n const options: MediaRecorderOptions = {mimeType: 'audio/webm'};\r\n this.#recorder = new MediaRecorder(this.#stream as MediaStream, options);\r\n\r\n this.#recorder.ondataavailable = (e) => {\r\n this.chunks.push(e.data);\r\n console.info(\"mic data available\");\r\n }\r\n\r\n this.#recorder.onstop = (e) => {\r\n console.log(\"recording stopped\");\r\n this.recordingAvailable$.next(this.chunks);\r\n this.chunks = [];\r\n }\r\n\r\n this.#recorder.start();\r\n }\r\n\r\n async stopRecording(): Promise {\r\n this.#recorder?.stop();\r\n this.stopListening();\r\n }\r\n\r\n async openMediaDevices(constraints: MediaStreamConstraints): Promise {\r\n try {\r\n return await navigator.mediaDevices.getUserMedia(constraints);\r\n } catch (e) {\r\n switch ((e as DOMException).name) {\r\n case 'PermissionDeniedError':\r\n case 'NotAllowedError': {\r\n alert('You must allow access to your microphone to use this feature');\r\n }\r\n break;\r\n case 'ConstraintNotSatisfiedError': {\r\n alert('Neither your browser or device support audio recording');\r\n }\r\n break;\r\n default: {\r\n console.log(e);\r\n captureException(e);\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n async reset() {\r\n await this.stopRecording();\r\n this.stopListening();\r\n this.chunks = [];\r\n this.timer = this.timerSeconds;\r\n }\r\n\r\n async hasMediaDevices(type: 'audioinput' | 'videoinput' | 'audiooutput'): Promise {\r\n const devices = await navigator.mediaDevices.enumerateDevices();\r\n return devices.some(device => device.kind === type);\r\n }\r\n\r\n //endregion\r\n\r\n //region private methods\r\n\r\n private async startListening() {\r\n this.#stream = await this.openMediaDevices({\r\n audio: {\r\n noiseSuppression: true,\r\n echoCancellation: true\r\n }, video: false, preferCurrentTab: true\r\n });\r\n\r\n if (this.#stream) {\r\n this.isListening$.next(true);\r\n this.#stream.getTracks().forEach(track => {\r\n console.log(track)\r\n });\r\n }\r\n }\r\n\r\n private stopListening() {\r\n this.isListening$.next(false);\r\n this.#stream?.getTracks().forEach(track => track.stop());\r\n }\r\n\r\n private async initializeMicButton() {\r\n try {\r\n this.micAvailable = await this.hasMediaDevices('audioinput');\r\n } catch (e) {\r\n console.log(e);\r\n captureException(e);\r\n }\r\n }\r\n\r\n //endregion\r\n\r\n //region\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n //endregion\r\n}\r\n","import * as FileSaver from 'file-saver';\r\n\r\nimport {alert} from 'devextreme/ui/dialog';\r\nimport notify from 'devextreme/ui/notify';\r\n\r\nexport class FileUtils {\r\n public static convertFileToBase64(file: File): Promise {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n\r\n reader.onloadend = () => {\r\n return resolve(reader.result as string);\r\n };\r\n\r\n reader.readAsDataURL(file);\r\n });\r\n }\r\n\r\n public static handlePopupBlocker(windowRef: Window) {\r\n if (!windowRef || windowRef.closed || typeof windowRef.closed === 'undefined') {\r\n alert(`\r\n

Your browser has prevented a popup window from opening.
\r\n Please, disable popup blocker for current site.

\r\n \r\n `, 'Popup blocker').then();\r\n }\r\n }\r\n\r\n public static validateFile(event: InputEvent, component: any): Promise | boolean {\r\n if (!event.target) {\r\n notify('No file found.', 'error');\r\n return false;\r\n }\r\n const htmlInputElement = event.target as HTMLInputElement;\r\n if (!htmlInputElement || !htmlInputElement.files || !htmlInputElement.files[0]) {\r\n notify('No file found.', 'error');\r\n return false;\r\n }\r\n const file: File = htmlInputElement.files[0];\r\n if (Number.parseInt((file.size / 1024 / 1024).toFixed(4)) > 25) {\r\n notify('Only 25 MB files allowed.', 'error');\r\n return false;\r\n }\r\n component.isUploading = true;\r\n component.isLoading = true;\r\n return FileUtils.convertFileToBase64(file);\r\n }\r\n\r\n public static pdfRequestHandler(blob: Blob, component: any, invokedFromGrid = false) {\r\n if (component.pwaDetectorService.isPWA()) {\r\n FileSaver.saveAs(blob);\r\n } else {\r\n const ie = navigator.userAgent.match(/MSIE\\s([\\d.]+)/),\r\n ie11 = navigator.userAgent.match(/Trident\\/7.0/) && navigator.userAgent.match(/rv:11/),\r\n ieEDGE = navigator.userAgent.match(/Edge/g),\r\n ieVer = (ie ? ie[1] : (ie11 ? 11 : (ieEDGE ? 12 : -1))) as number;\r\n\r\n if (ie && ieVer < 10) {\r\n window.alert('This browser doesn\\'t support this feature.');\r\n component.isLoading = false;\r\n return;\r\n }\r\n\r\n if (ieVer > -1) {\r\n //@ts-ignore\r\n window.navigator.msSaveBlob(blob, 'Results.pdf');\r\n } else {\r\n if (window.webkitURL) {\r\n const fileURL = window.webkitURL.createObjectURL(blob);\r\n const ref = window.open(fileURL, '_blank');\r\n if (ref) {\r\n FileUtils.handlePopupBlocker(ref);\r\n }\r\n } else if (window.URL) {\r\n const fileURL = URL.createObjectURL(blob);\r\n const ref = window.open(fileURL, '_blank');\r\n if (ref) {\r\n FileUtils.handlePopupBlocker(ref);\r\n }\r\n } else {\r\n window.alert('This browser doesn\\'t support this feature.');\r\n }\r\n }\r\n }\r\n component.isLoading = false;\r\n if (invokedFromGrid) {\r\n component.dxDataGridComponent.instance.endCustomLoading();\r\n }\r\n }\r\n}\r\n","import { MD5 } from 'crypto-js';\r\n\r\nexport function generateGravatarUrl(email: string): string {\r\n const emailHash = MD5(email);\r\n return 'https://www.gravatar.com/avatar/' + emailHash + '?d=identicon&s=200';\r\n}\r\n","import {\r\n HttpClient,\r\n HttpHeaders,\r\n HttpParameterCodec,\r\n HttpParams\r\n} from '@angular/common/http';\r\nimport {Router} from '@angular/router';\r\nimport {createStore} from 'devextreme-aspnet-data-nojquery';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport notify from 'devextreme/ui/notify';\r\nimport {StatusCodes} from 'http-status-codes';\r\nimport {BehaviorSubject, Observable} from 'rxjs';\r\n\r\nimport {LogOut} from '../../stores/actions/fusion-auth.actions';\r\n\r\nclass HttpSimpleEncodingCodec implements HttpParameterCodec {\r\n public encodeKey(key: string): string {\r\n return encodeURIComponent(key);\r\n }\r\n\r\n public encodeValue(value: string): string {\r\n return encodeURIComponent(value);\r\n }\r\n\r\n public decodeKey(key: string): string {\r\n return decodeURIComponent(key);\r\n }\r\n\r\n public decodeValue(value: string) {\r\n return decodeURIComponent(value);\r\n }\r\n}\r\n\r\nexport class HttpRequestBuilder {\r\n private body?: object;\r\n private headers: HttpHeaders;\r\n private method: string = '';\r\n private parameters: HttpParams;\r\n private uri: string = '';\r\n private url: string = '';\r\n\r\n constructor(private http: HttpClient) {\r\n this.headers = new HttpHeaders();\r\n this.parameters = new HttpParams({encoder: new HttpSimpleEncodingCodec()});\r\n }\r\n\r\n /**\r\n * Adds a segment to the request uri\r\n */\r\n public addUriSegment(segment: string) {\r\n if (typeof this.uri !== 'string') {\r\n this.uri = '';\r\n }\r\n if (segment !== null && typeof segment !== 'undefined') {\r\n if (this.uri.charAt(this.uri.length - 1) !== '/') {\r\n this.uri = this.uri + '/';\r\n }\r\n this.uri = this.uri + segment;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the full url + uri (if it exists)\r\n */\r\n public getFullUrl() {\r\n return this.url + (typeof this.uri === 'string' ? this.uri : '');\r\n }\r\n\r\n /**\r\n * Get the options object\r\n */\r\n public getOptions() {\r\n return {\r\n body: this.body,\r\n headers: this.headers,\r\n observe: 'response' as 'response',\r\n params: this.parameters,\r\n reportProgress: false,\r\n responseType: 'json' as 'json',\r\n withCredentials: true,\r\n };\r\n }\r\n\r\n /**\r\n * Adds a header to the request.\r\n *\r\n * @param name The name of the header.\r\n * @param value The value of the header.\r\n */\r\n public setHeader(name: string, value: string) {\r\n this.headers = this.headers.set(name, value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the body of the client request.\r\n *\r\n * @param body The object to be written to the request body as JSON.\r\n */\r\n public setJsonBody(body: any) {\r\n this.body = body;\r\n this.setHeader('Content-Type', 'application/json');\r\n // Omit the Content-Length, this is set by the browser. It is considered an un-safe header to set manually.\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the http method for the request\r\n */\r\n public setMethod(method: string) {\r\n this.method = method;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the uri of the request\r\n */\r\n public setUri(uri: string) {\r\n this.uri = uri;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the base url of the request.\r\n */\r\n public setUrl(url: string) {\r\n this.url = url;\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds url parameters to the request.\r\n *\r\n * @param name The name of the parameter.\r\n * @param value The value of the URL parameter, may be a string, object or number.\r\n */\r\n public setUrlParameter(name: string, value: any) {\r\n if (value !== null && typeof value !== 'undefined') {\r\n this.parameters = this.parameters.set(name, value);\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates the HTTP request and returns an Observable that, when subscribed, will send the request to the server.\r\n */\r\n public build() {\r\n return this.http.request(this.method, this.getFullUrl(), this.getOptions());\r\n }\r\n}\r\n\r\nexport const CustomStoreErrorHandler = (serviceInstance: any) => (event: any) => {\r\n Sentry.captureException(event);\r\n if (event.xhr.status === StatusCodes.GATEWAY_TIMEOUT || event.xhr.status === StatusCodes.FORBIDDEN || event.xhr.status === StatusCodes.UNAUTHORIZED) {\r\n notify('Your session has expired.', 'error');\r\n if (serviceInstance && serviceInstance.store) {\r\n serviceInstance.store.dispatch(new LogOut());\r\n }\r\n }\r\n};\r\n\r\nexport interface SecureStoreOptions {\r\n dataSource: BehaviorSubject;\r\n routerService: Router;\r\n tokenRefresh: Observable;\r\n loadParams: any;\r\n loadUrl: string;\r\n key?: string;\r\n onLoaded?: (response: any) => void;\r\n}\r\n\r\nexport const SECURED_STORE = ({\r\n dataSource,\r\n routerService,\r\n tokenRefresh,\r\n loadParams,\r\n loadUrl,\r\n onLoaded,\r\n key = 'id'\r\n }: SecureStoreOptions) => createStore({\r\n key,\r\n onBeforeSend: (operation, ajaxSettings) => {\r\n if (!ajaxSettings.headers) {\r\n ajaxSettings.headers = {};\r\n }\r\n ajaxSettings.headers.authorization = `JWT ${localStorage.getItem('authtoken')}`;\r\n },\r\n errorHandler: (e) => {\r\n Sentry.captureException(e);\r\n },\r\n onAjaxError: ({xhr, error}) => {\r\n if (xhr.status === StatusCodes.GATEWAY_TIMEOUT || xhr.status === StatusCodes.FORBIDDEN || xhr.status === StatusCodes.UNAUTHORIZED) {\r\n if (localStorage.getItem('authtoken') && localStorage.getItem('authrefreshToken')) {\r\n tokenRefresh\r\n .subscribe(({body}) => {\r\n localStorage.setItem('authtoken', body.token);\r\n dataSource.value.load();\r\n }, e => {\r\n //Sentry.captureException(e);\r\n notify('Your session has expired.', 'error');\r\n routerService.navigateByUrl('/login').then();\r\n });\r\n } else {\r\n notify('Your session has expired.', 'error');\r\n routerService.navigateByUrl('/login').then();\r\n }\r\n }\r\n },\r\n onLoaded,\r\n loadUrl,\r\n loadParams,\r\n});\r\n\r\n","export class ObjectUtils {\r\n // @ts-ignore\r\n public static getKeyValue(obj: T, key: string): T[string] {\r\n // @ts-ignore\r\n return obj[key];\r\n }\r\n\r\n public static capitalize(obj: any): object {\r\n Object.keys(obj)\r\n .filter(o => typeof obj[o] === 'string' || typeof obj[o] === 'object')\r\n .forEach(o => {\r\n if ((obj[o] === undefined || obj[o] === null)) {\r\n return;\r\n }\r\n if (typeof obj[o] === 'string') {\r\n if (!(obj[o] as string).includes('data:image') && !(obj[o] as string).includes('https://')) {\r\n obj[o] = (obj[o] as string).toUpperCase();\r\n }\r\n } else {\r\n obj[o] = ObjectUtils.capitalize(obj[o]);\r\n }\r\n });\r\n return obj;\r\n }\r\n\r\n public static flatten(arr: []): any[] {\r\n return arr.reduce((flat, toFlatten) => {\r\n const array = Array.isArray(toFlatten) ? ObjectUtils.flatten(toFlatten) : toFlatten;\r\n return flat.concat(array as never[]);\r\n }, []);\r\n }\r\n\r\n public static objectsHaveSameKeys(...objects: any[]) {\r\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\r\n const union = new Set(allKeys);\r\n return objects.every(object => union.size === Object.keys(object).length);\r\n }\r\n\r\n public static getUniqueListBy(arr: any[], key: string): T[] {\r\n return [...new Map(arr.map(item => [item[key], item])).values()]\r\n }\r\n}\r\n\r\nexport interface Dictionary {\r\n [Key: string]: T;\r\n}\r\n","import { TreeTest } from '../../../shared/models/order-entry/test';\r\n\r\nexport class RequisitionTest {\r\n public testId?: number;\r\n public parentTestId?: number;\r\n public requisitionId?: number;\r\n public level?: number;\r\n public test?: TreeTest;\r\n public isConfidential?: boolean;\r\n}\r\n","import {RequisitionTest} from '../../modules/features/requisitions/models/requisition-test';\r\nimport {TreeTest} from '../../modules/shared/models/order-entry/test';\r\n\r\nexport class TestUtils {\r\n public static generateTestTreeForRequisition(tests: TreeTest[]): RequisitionTest[] {\r\n const requisitionTests: RequisitionTest[] = [];\r\n\r\n tests.forEach(t => {\r\n const requisitionTest = new RequisitionTest();\r\n if (!t.parentId) {\r\n requisitionTest.level = 0;\r\n } else {\r\n requisitionTest.parentTestId = t.parentId;\r\n const parentTest = TestUtils.getId(requisitionTest.parentTestId, tests);\r\n if (parentTest) {\r\n requisitionTest.level = parentTest.parentId ? 2 : 1;\r\n } else {\r\n requisitionTest.level = 0;\r\n }\r\n }\r\n\r\n requisitionTest.testId = t.id;\r\n requisitionTests.push(requisitionTest);\r\n });\r\n\r\n return requisitionTests;\r\n }\r\n\r\n private static getId(id: number, tests: TreeTest[]) {\r\n return tests.find(t => t.id === id);\r\n }\r\n}\r\n","const serverUrl = 'https://apexqualityhealth-api.ocllis.com/';\r\n\r\nexport const environment = {\r\n production: true,\r\n aiEnabled: false,\r\n cryptoPassphrase: '42b9b632-b845-4f0c-8c2f-ab886466da8c',\r\n frontendUrl: 'https://apexqualityhealth.ocllis.com/',\r\n fusionAuth: {\r\n apiUrl: 'https://authprovider.ocllis.com/api',\r\n applicationId: 'bcfe38d1-3d64-4cb5-a899-16a9b905046c',\r\n apiKey: 'C9kWz5LowlhQBrctfRQh0IqN-D-ZHHTfcvOlYZ35YJE',\r\n tenantId: 'aa4778e7-dada-dfdd-8b27-eac4c095feff',\r\n },\r\n portalBackend: {\r\n serverUrl,\r\n apiUrl: `${serverUrl}api`,\r\n },\r\n aiAnalysis: {\r\n enabled: false,\r\n apiUrl: 'https://portal-analyzer.ocllis.com',\r\n enabledRoles: ['*']\r\n },\r\n aiCommands: {\r\n enabled: false,\r\n areas: ['missing-info'],\r\n apiUrl: 'https://portal-voice-analyzer.ocllis.com'\r\n },\r\n sentry: {\r\n dns: 'https://f8a2e380de96444fa6b36c365cf79eec@o430462.ingest.sentry.io/5440506',\r\n },\r\n};\r\n","import {Component, NgModule} from '@angular/core';\r\nimport * as moment from 'moment';\r\n\r\n@Component({\r\n selector: 'app-footer',\r\n template: `\r\n
\r\n Copyright © 2012-{{Year}}.\r\n
\r\n All trademarks or registered trademarks are property of their respective owners.
\r\n Terms & Conditions\r\n | Privacy\r\n | Help\r\n
\r\n `,\r\n styleUrls: ['./footer.component.scss']\r\n})\r\n\r\nexport class FooterComponent {\r\n\r\n get Year() {\r\n return moment().year();\r\n }\r\n}\r\n\r\n@NgModule({\r\n declarations: [FooterComponent],\r\n exports: [FooterComponent]\r\n})\r\nexport class FooterModule {\r\n}\r\n","import { Action } from '@ngrx/store';\r\nimport { LoginResponse } from 'src/app/shared/models/fusion-auth';\r\nimport { LoginViewModel } from 'src/app/shared/models/general';\r\nimport {HttpErrorResponse} from \"@angular/common/http\";\r\n\r\nexport enum FusionAuthActionTypes {\r\n LOGIN = '[Auth] Login',\r\n LOGIN_SUCCESS = '[Auth] Login Success',\r\n LOGIN_FAILURE = '[Auth] Login Failure',\r\n LOGOUT = '[Auth] Logout',\r\n}\r\n\r\nexport class LogIn implements Action {\r\n public readonly type = FusionAuthActionTypes.LOGIN;\r\n constructor(public payload: LoginViewModel) {}\r\n}\r\n\r\nexport class LogInSuccess implements Action {\r\n public readonly type = FusionAuthActionTypes.LOGIN_SUCCESS;\r\n constructor(public payload: LoginResponse) {}\r\n}\r\n\r\nexport class LogInFailure implements Action {\r\n public readonly type = FusionAuthActionTypes.LOGIN_FAILURE;\r\n constructor(public payload: { error: HttpErrorResponse }) {}\r\n}\r\n\r\nexport class LogOut implements Action {\r\n public readonly type = FusionAuthActionTypes.LOGOUT;\r\n}\r\n\r\nexport type All = LogIn | LogInSuccess | LogInFailure | LogOut;\r\n","import {Component, OnChanges, OnInit, SimpleChanges} from '@angular/core';\r\nimport themes from \"devextreme/ui/themes\";\r\nimport {values} from \"lodash\";\r\n\r\n@Component({\r\n selector: 'app-theme-toggle',\r\n templateUrl: './theme-toggle.component.html',\r\n styleUrls: ['./theme-toggle.component.scss']\r\n})\r\nexport class ThemeToggleComponent implements OnInit {\r\n\r\n public isDarkTheme = window.localStorage.getItem(\"dx-theme\") === \"generic.dark.compact\";\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit(): void {\r\n const theme = window.localStorage.getItem(\"dx-theme\") || \"generic.light.compact\";\r\n themes.current(theme);\r\n }\r\n\r\n public toggleChange(e: any) {\r\n this.isDarkTheme = e.value;\r\n if (this.isDarkTheme) {\r\n window.localStorage.setItem(\"dx-theme\", \"generic.dark.compact\");\r\n } else {\r\n window.localStorage.setItem(\"dx-theme\", \"generic.light.compact\");\r\n }\r\n this.changeTheme();\r\n }\r\n\r\n public changeTheme() {\r\n let theme = \"generic.light.compact\";\r\n if (themes.current() === \"generic.light.compact\") {\r\n theme = \"generic.dark.compact\";\r\n }\r\n\r\n window.localStorage.setItem(\"dx-theme\", theme);\r\n themes.current(theme);\r\n }\r\n}\r\n","
Dark Mode
\r\n
\r\n \r\n
\r\n","\r\n \r\n

\r\n Settings\r\n

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Email *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Last Name *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
First Name *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Old Password *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
New Password *\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\r\nimport {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport {Router} from '@angular/router';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport {StatusCodes} from 'http-status-codes';\r\nimport {Subject, throwError} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {environment} from '../../../../../environments/environment';\r\nimport {RegistrationRequest, User} from '../../../models/fusion-auth';\r\nimport {LoginViewModel} from '../../../models/general';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../services/fusion-auth';\r\n\r\n@Component({\r\n selector: 'app-user-profile',\r\n templateUrl: './user-profile.component.html',\r\n styleUrls: ['./user-profile.component.scss'],\r\n})\r\nexport class UserProfileComponent implements OnInit, OnDestroy {\r\n @Input() public popupVisible = false;\r\n @Output() public closeEvent = new EventEmitter();\r\n public isLoading = false;\r\n public userForm: UntypedFormGroup;\r\n public user?: User;\r\n public passwordMode = 'password';\r\n public passwordButton: any;\r\n public passwordPattern = /^(?=.*[0-9])(?=.*[!@#$%^\\-+&*])[a-zA-Z0-9!@#$%^\\-+&*]{8,}$/;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private router: Router, private fb: UntypedFormBuilder, public fusionAuth: FusionAuthService, private fusionAuthManagement: FusionAuthManagementService) {\r\n this.userForm = this.fb.group({\r\n email: new UntypedFormControl(null, Validators.required),\r\n lastName: new UntypedFormControl(null, Validators.required),\r\n firstName: new UntypedFormControl(null, Validators.required),\r\n oldPassword: new UntypedFormControl(null, Validators.required),\r\n newPassword: new UntypedFormControl(null, Validators.required),\r\n });\r\n\r\n this.passwordButton = {\r\n icon: 'fa fa-eye',\r\n type: 'default',\r\n onClick: () => {\r\n this.passwordMode = this.passwordMode === 'text' ? 'password' : 'text';\r\n },\r\n };\r\n }\r\n\r\n public ngOnInit() {\r\n this.user = this.fusionAuth.Profile;\r\n }\r\n\r\n public onShown() {\r\n this.userForm.get('email')?.setValue(this.user?.email);\r\n this.userForm.get('lastName')?.setValue(this.user?.lastName);\r\n this.userForm.get('firstName')?.setValue(this.user?.firstName);\r\n }\r\n\r\n public close(): void {\r\n this.userForm.reset();\r\n ValidationEngine.resetGroup('userProfileGroup');\r\n this.closeEvent.emit();\r\n }\r\n\r\n public submit() {\r\n const valid = ValidationEngine.validateGroup('userProfileGroup');\r\n if (valid) {\r\n this.isLoading = true;\r\n this.fusionAuth.login({\r\n loginId: this.user?.email,\r\n password: this.userForm.get('oldPassword')?.value,\r\n applicationId: ''\r\n } as LoginViewModel, true)\r\n .pipe(takeUntil(this.onDestroy$))\r\n .subscribe(() => {\r\n if (!this.user) this.user = {} as User;\r\n\r\n this.user.firstName = this.userForm.get('firstName')?.value;\r\n this.user.lastName = this.userForm.get('lastName')?.value;\r\n\r\n const user = this.user;\r\n\r\n const request: RegistrationRequest = {\r\n user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [user.role],\r\n username: user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n this.fusionAuthManagement.updateUser(user.id, request).pipe(takeUntil(this.onDestroy$)).subscribe(response => {\r\n if (response.status === StatusCodes.CREATED) {\r\n this.fusionAuth.changePassword({\r\n loginId: this.user?.email,\r\n currentPassword: this.userForm.get('oldPassword')?.value,\r\n password: this.userForm.get('newPassword')?.value,\r\n }).pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.closeEvent.emit();\r\n this.userForm.reset();\r\n this.isLoading = false;\r\n ValidationEngine.resetGroup('userProfileGroup');\r\n this.router.navigateByUrl('/login').then();\r\n return notify('The user information has been update.', 'success');\r\n }, () => {\r\n this.isLoading = false;\r\n return notify('There was a problem updating the user information.', 'error');\r\n });\r\n }\r\n });\r\n }, (e) => {\r\n this.isLoading = false;\r\n notify('Invalid password.', 'error');\r\n return throwError(e);\r\n });\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete()\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{{ profile?.email }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n","import {CommonModule} from '@angular/common';\r\nimport {Component, Input, NgModule, OnInit} from '@angular/core';\r\nimport {DxContextMenuModule} from 'devextreme-angular';\r\nimport {DxListModule} from 'devextreme-angular';\r\nimport {FusionAuthService} from 'src/app/shared/services/fusion-auth/fusion-auth.service';\r\nimport {User} from 'src/app/shared/models/fusion-auth';\r\nimport {ThemeToggleComponent} from \"../theme-toggle/theme-toggle.component\";\r\nimport {DxSwitchModule} from \"devextreme-angular\";\r\n\r\n@Component({\r\n selector: 'app-user-panel',\r\n templateUrl: 'user-panel.component.html',\r\n styleUrls: ['./user-panel.component.scss'],\r\n})\r\nexport class UserPanelComponent implements OnInit {\r\n @Input()\r\n public menuItems: any;\r\n public profile?: User;\r\n @Input()\r\n public menuMode?: string;\r\n\r\n constructor(private fusionAuth: FusionAuthService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.profile = this.fusionAuth.Profile;\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [DxListModule, DxContextMenuModule, CommonModule, DxSwitchModule],\r\n declarations: [UserPanelComponent],\r\n exports: [UserPanelComponent],\r\n})\r\nexport class UserPanelModule {\r\n}\r\n","import {environment} from '../environments/environment';\r\n\r\nexport const navigation = [\r\n {\r\n text: 'Results Search',\r\n icon: `${environment.frontendUrl}/assets/icons/Results.svg`,\r\n roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'],\r\n items: [\r\n {\r\n text: 'Order Search',\r\n path: 'results/lab',\r\n roles: ['Superuser', 'Client Admin', 'Patient', 'Client Basic', 'Physician']\r\n },\r\n {\r\n text: 'Advanced Order Search',\r\n path: 'results/advanced-search',\r\n hiddenInMobile: true,\r\n roles: ['Superuser', 'Client Admin', 'Patient', 'Client Basic', 'Physician']\r\n }\r\n ]\r\n },\r\n {\r\n text: 'Requisition',\r\n icon: `${environment.frontendUrl}/assets/icons/Requisitions.svg`,\r\n roles: ['Superuser', 'Client Admin', 'Client Basic', 'Physician'],\r\n items: [\r\n {\r\n text: 'Requisition Search',\r\n path: 'requisitions/search',\r\n roles: ['Superuser', 'Client Admin', 'Client Basic', 'Physician']\r\n },\r\n {\r\n text: 'New Requisition',\r\n path: 'requisitions/create',\r\n roles: ['Superuser', 'Client Admin', 'Client Basic']\r\n },\r\n ],\r\n },\r\n {\r\n text: 'Result Entry',\r\n icon: `${environment.frontendUrl}/assets/icons/Requisitions.svg`,\r\n roles: ['Superuser', 'Client Admin', 'Client Basic'],\r\n hidden: true,\r\n path: 'result-entry',\r\n },\r\n {\r\n text: 'Result Export',\r\n icon: `${environment.frontendUrl}/assets/icons/Requisitions.svg`,\r\n roles: ['Superuser', 'Client Admin', 'Client Basic'],\r\n hidden: true,\r\n path: 'result-export',\r\n },\r\n {\r\n text: 'Standing Orders',\r\n icon: `${environment.frontendUrl}/assets/icons/Standing orders.svg`,\r\n path: 'standing-orders/search',\r\n roles: ['Superuser', 'Client Admin', 'Client Basic'],\r\n },\r\n {\r\n text: 'Users',\r\n path: 'system/users',\r\n icon: `${environment.frontendUrl}/assets/icons/user.svg`,\r\n roles: ['Superuser', 'Client Admin']\r\n },\r\n {\r\n text: 'Support',\r\n icon: `${environment.frontendUrl}/assets/icons/Support.svg`,\r\n roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'],\r\n items: [\r\n {\r\n text: 'Contact us',\r\n path: 'support/contact-us',\r\n roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician']\r\n },\r\n {\r\n text: 'Supply Request',\r\n path: 'support/supply-request',\r\n roles: ['Superuser', 'Client Admin', 'Client Basic']\r\n },\r\n ],\r\n },\r\n];\r\n","
\r\n \r\n \r\n\r\n \r\n
\r\n {{item.text}}\r\n \r\n
\r\n {{route.text}}\r\n
\r\n
\r\n
\r\n\r\n \r\n {{item.text}}\r\n \r\n
\r\n
\r\n","import {Component, OnInit} from '@angular/core';\r\nimport {Route, Router} from '@angular/router';\r\nimport {navigation} from '../../../../app-navigation';\r\nimport {FusionAuthService} from '../../../services/fusion-auth';\r\nimport {PWADetectorService} from '../../../services/general';\r\nimport {LabSettingsService} from \"../../../services/ocl\";\r\nimport {take} from \"rxjs/operators\";\r\n\r\n@Component({\r\n selector: 'app-top-navigation-menu',\r\n templateUrl: './top-navigation-menu.component.html',\r\n styleUrls: ['./top-navigation-menu.component.scss']\r\n})\r\nexport class TopNavigationMenuComponent implements OnInit {\r\n public routes = navigation;\r\n public role?: string;\r\n\r\n constructor(private router: Router, private pwaDetectorService: PWADetectorService, public fusionAuthService: FusionAuthService, public labSettingService: LabSettingsService) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.waitForUser();\r\n\r\n }\r\n\r\n private waitForUser() {\r\n if (localStorage.getItem('authtoken')) {\r\n this.role = this.fusionAuthService.Profile.registrations[0].roles[0];\r\n this.labSettingService.getResultEntrySettings().pipe(take(1))\r\n .subscribe(config => {\r\n if (config.resultEntryEnabled) {\r\n const route = this.routes.find(r => r.path === 'result-entry');\r\n if (route) {\r\n const registrations = this.fusionAuthService.Profile.registrations;\r\n if (config.resultEntrySuperUser && registrations[0].roles.includes(\"Superuser\")) {\r\n route.hidden = false;\r\n } else if (config.resultEntryClientAdmin && registrations[0].roles.includes(\"Client Admin\")) {\r\n route.hidden = false;\r\n } else if (config.resultEntryClientBasic && registrations[0].roles.includes(\"Client Basic\")) {\r\n route.hidden = false;\r\n } else\r\n route.hidden = true;\r\n }\r\n }\r\n })\r\n\r\n const route = this.routes.find(r => r.path === 'result-export');\r\n if (route) {\r\n const registrations = this.fusionAuthService.Profile.registrations;\r\n\r\n if (registrations[0].roles.includes(\"Superuser\")) {\r\n route.hidden = false;\r\n } else if (registrations[0].roles.includes(\"Client Admin\")) {\r\n route.hidden = false;\r\n } else route.hidden = !registrations[0].roles.includes(\"Client Basic\");\r\n }\r\n } else {\r\n setTimeout(() => {\r\n this.waitForUser();\r\n }, 1000);\r\n }\r\n }\r\n\r\n public isChildrenActivated(routes: any[]): boolean {\r\n return routes.some((route: any) => this.router.url.includes(route.path));\r\n }\r\n\r\n public filter(items: any[]) {\r\n return items.filter(x => x.roles.indexOf(this.role) !== -1);\r\n }\r\n\r\n public RouteTarget(route: Route) {\r\n return route.path === 'requisitions/create' && !this.pwaDetectorService.isPWA() ? '_blank' : '_self';\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\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 {LayoutModule} from '@angular/cdk/layout';\r\nimport {CommonModule} from '@angular/common';\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n NgModule,\r\n Output\r\n} from '@angular/core';\r\nimport {FlexLayoutModule} from '@angular/flex-layout';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {RouterModule} from '@angular/router';\r\nimport {Store} from '@ngrx/store';\r\nimport {DxButtonModule} from 'devextreme-angular';\r\nimport {DxLoadIndicatorModule} from 'devextreme-angular';\r\nimport {DxLoadPanelModule} from 'devextreme-angular';\r\nimport {DxPopupModule} from 'devextreme-angular';\r\nimport {DxScrollViewModule} from 'devextreme-angular';\r\nimport {DxTextBoxModule} from 'devextreme-angular';\r\nimport {DxToolbarModule} from 'devextreme-angular';\r\nimport {DxValidatorModule} from 'devextreme-angular';\r\nimport {DxSwitchModule} from 'devextreme-angular';\r\nimport {LogOut} from 'src/app/stores/actions/fusion-auth.actions';\r\nimport {AppState} from 'src/app/stores/app.state';\r\nimport {AppInfoService, ScreenService} from '../../../services/general';\r\nimport {UserProfileComponent} from '../../ocl';\r\nimport {UserPanelModule} from \"../user-panel/user-panel.component\";\r\nimport {TopNavigationMenuComponent} from \"../top-navigation-menu/top-navigation-menu.component\";\r\nimport {DxContextMenuModule} from \"devextreme-angular\";\r\nimport {ThemeToggleComponent} from \"../theme-toggle/theme-toggle.component\";\r\n\r\n@Component({\r\n selector: 'app-header',\r\n templateUrl: 'header.component.html',\r\n styleUrls: ['./header.component.scss'],\r\n})\r\nexport class HeaderComponent {\r\n @Output()\r\n public menuToggle = new EventEmitter();\r\n public userProfilePopup = false;\r\n\r\n @Input()\r\n public menuToggleEnabled = false;\r\n\r\n public userMenuItems = [\r\n {\r\n text: 'Profile',\r\n icon: 'user',\r\n onClick: () => {\r\n this.userProfilePopup = true;\r\n },\r\n },\r\n {\r\n text: 'Logout',\r\n icon: 'runner',\r\n onClick: () => {\r\n this.store.dispatch(new LogOut());\r\n },\r\n },\r\n ];\r\n\r\n constructor(\r\n public screen: ScreenService,\r\n private store: Store,\r\n public appInfo: AppInfoService\r\n ) { }\r\n\r\n public toggleMenu = () => {\r\n this.menuToggle.emit();\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n LayoutModule,\r\n DxLoadIndicatorModule,\r\n DxToolbarModule,\r\n DxValidatorModule,\r\n DxPopupModule,\r\n DxTextBoxModule,\r\n DxButtonModule,\r\n DxScrollViewModule,\r\n DxLoadPanelModule,\r\n FlexLayoutModule,\r\n UserPanelModule,\r\n DxSwitchModule,\r\n DxContextMenuModule,\r\n ],\r\n declarations: [HeaderComponent, TopNavigationMenuComponent, UserProfileComponent, ThemeToggleComponent],\r\n exports: [HeaderComponent],\r\n})\r\nexport class HeaderModule { }\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n NgModule,\r\n OnDestroy,\r\n Output,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {DxTreeViewComponent, DxTreeViewModule} from 'devextreme-angular';\r\n\r\nimport * as events from 'devextreme/events';\r\nimport { ItemClickEvent, InitializedEvent } from 'devextreme/ui/tree_view';\r\n\r\n\r\n@Component({\r\n selector: 'app-side-navigation-menu',\r\n templateUrl: './side-navigation-menu.component.html',\r\n styleUrls: ['./side-navigation-menu.component.scss']\r\n})\r\nexport class SideNavigationMenuComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild(DxTreeViewComponent, {static: true}) public menu?: DxTreeViewComponent;\r\n\r\n @Output()\r\n public selectedItemChanged = new EventEmitter();\r\n\r\n @Output()\r\n public openMenu = new EventEmitter();\r\n\r\n @Input()\r\n public items: any[] = [];\r\n\r\n @Input()\r\n set selectedItem(value: string) {\r\n if (this.menu?.instance) {\r\n this.menu.instance.selectItem(value);\r\n }\r\n }\r\n\r\n private _compactMode = false;\r\n @Input()\r\n get compactMode() {\r\n return this._compactMode;\r\n }\r\n\r\n set compactMode(val) {\r\n this._compactMode = val;\r\n if (val && this.menu?.instance) {\r\n this.menu.instance.collapseAll();\r\n }\r\n }\r\n\r\n constructor(private elementRef: ElementRef) {\r\n }\r\n\r\n //TODO FIX\r\n public updateSelection(event: any) {\r\n const nodeClass = 'dx-treeview-node';\r\n const selectedClass = 'dx-state-selected';\r\n const leafNodeClass = 'dx-treeview-node-is-leaf';\r\n const element: HTMLElement = event.element;\r\n\r\n const rootNodes = element.querySelectorAll(`.${nodeClass}:not(.${leafNodeClass})`);\r\n Array.from(rootNodes).forEach(node => {\r\n node.classList.remove(selectedClass);\r\n });\r\n\r\n let selectedNode = element.querySelector(`.${nodeClass}.${selectedClass}`);\r\n while (selectedNode && selectedNode.parentElement) {\r\n if (selectedNode.classList.contains(nodeClass)) {\r\n selectedNode.classList.add(selectedClass);\r\n }\r\n\r\n selectedNode = selectedNode.parentElement;\r\n }\r\n }\r\n\r\n public onItemClick(event: ItemClickEvent) {\r\n if (event.itemData?.hiddenInMobile) {\r\n alert('This view can\\'t be opened in a mobile device.');\r\n return;\r\n }\r\n this.selectedItemChanged.emit(event);\r\n }\r\n\r\n public onMenuInitialized(event: InitializedEvent) {\r\n event?.component?.option('deferRendering', false);\r\n }\r\n\r\n public ngAfterViewInit() {\r\n events.on(this.elementRef.nativeElement, 'dxclick', (e: Event) => {\r\n this.openMenu.next(e);\r\n });\r\n }\r\n\r\n public ngOnDestroy() {\r\n events.off(this.elementRef.nativeElement, 'dxclick');\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [DxTreeViewModule],\r\n declarations: [SideNavigationMenuComponent],\r\n exports: [SideNavigationMenuComponent]\r\n})\r\nexport class SideNavigationMenuModule {\r\n}\r\n","\r\n\r\n
\r\n \r\n \r\n
\r\n","\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n\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 {CommonModule} from '@angular/common';\r\nimport {Component, Input, NgModule, OnInit} from '@angular/core';\r\nimport {NavigationEnd, Router} from '@angular/router';\r\nimport {DxDrawerModule} from 'devextreme-angular';\r\nimport {DxScrollViewModule} from 'devextreme-angular';\r\nimport {DxToolbarModule} from 'devextreme-angular';\r\nimport {HeaderModule, SideNavigationMenuModule} from 'src/app/shared/components/layout';\r\nimport {navigation} from '../../app-navigation';\r\nimport {AppInfoService, ScreenService} from '../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-side-nav-inner-toolbar',\r\n templateUrl: './side-nav-inner-toolbar.component.html',\r\n styleUrls: ['./side-nav-inner-toolbar.component.scss'],\r\n})\r\nexport class SideNavInnerToolbarComponent implements OnInit {\r\n public menuItems = navigation;\r\n public selectedRoute = '';\r\n\r\n public menuOpened: boolean = false;\r\n public temporaryMenuOpened = false;\r\n\r\n @Input()\r\n public title: string = '';\r\n\r\n public menuMode = 'shrink';\r\n public menuRevealMode = 'expand';\r\n public minMenuSize = 0;\r\n public shaderEnabled = false;\r\n\r\n constructor(private screen: ScreenService, private router: Router, public applicationInfo: AppInfoService) {\r\n }\r\n\r\n public ngOnInit() {\r\n this.menuOpened = this.screen.sizes['screen-large'];\r\n\r\n this.router.events.subscribe(val => {\r\n if (val instanceof NavigationEnd) {\r\n this.selectedRoute = val.urlAfterRedirects.split('?')[0];\r\n }\r\n });\r\n\r\n this.screen.changed.subscribe(() => this.updateDrawer());\r\n\r\n this.updateDrawer();\r\n }\r\n\r\n public updateDrawer() {\r\n const isXSmall = this.screen.sizes['screen-x-small'];\r\n const isLarge = this.screen.sizes['screen-large'];\r\n\r\n this.menuMode = isLarge ? 'shrink' : 'overlap';\r\n this.menuRevealMode = isXSmall ? 'slide' : 'expand';\r\n this.minMenuSize = 0;\r\n this.shaderEnabled = !isLarge;\r\n }\r\n\r\n public toggleMenu = (e: any) => {\r\n this.menuOpened = !this.menuOpened;\r\n e.event.stopPropagation();\r\n }\r\n\r\n get hideMenuAfterNavigation() {\r\n return this.menuMode === 'overlap' || this.temporaryMenuOpened;\r\n }\r\n\r\n get showMenuAfterClick() {\r\n return !this.menuOpened;\r\n }\r\n\r\n public async navigationChanged(event: any) {\r\n const path = event.itemData.path;\r\n const pointerEvent = event.event;\r\n\r\n if (path && this.menuOpened) {\r\n if (event.node.selected) {\r\n pointerEvent.preventDefault();\r\n } else {\r\n await this.router.navigate(['/secured/' + path]);\r\n }\r\n\r\n if (this.hideMenuAfterNavigation) {\r\n this.temporaryMenuOpened = false;\r\n this.menuOpened = false;\r\n pointerEvent.stopPropagation();\r\n }\r\n } else {\r\n pointerEvent.preventDefault();\r\n }\r\n }\r\n\r\n public navigationClick() {\r\n if (this.showMenuAfterClick) {\r\n this.temporaryMenuOpened = true;\r\n this.menuOpened = true;\r\n }\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [\r\n SideNavigationMenuModule,\r\n DxDrawerModule,\r\n HeaderModule,\r\n DxToolbarModule,\r\n DxScrollViewModule,\r\n CommonModule,\r\n ],\r\n exports: [SideNavInnerToolbarComponent],\r\n declarations: [SideNavInnerToolbarComponent],\r\n})\r\nexport class SideNavInnerToolbarModule {\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, NgModule } from '@angular/core';\r\nimport { DxDrawerModule } from 'devextreme-angular';\r\nimport { DxScrollViewModule } from 'devextreme-angular';\r\nimport { DxToolbarModule } from 'devextreme-angular';\r\nimport { HeaderModule } from 'src/app/shared/components/layout';\r\n@Component({\r\n selector: 'app-top-navigation-toolbar',\r\n templateUrl: './top-navigation-toolbar.component.html',\r\n styleUrls: ['./top-navigation-toolbar.component.scss'],\r\n})\r\nexport class TopNavigationToolbarComponent {}\r\n\r\n@NgModule({\r\n imports: [DxDrawerModule, HeaderModule, DxToolbarModule, DxScrollViewModule, CommonModule],\r\n exports: [TopNavigationToolbarComponent],\r\n declarations: [TopNavigationToolbarComponent],\r\n})\r\nexport class TopNavigationToolbarModule {}\r\n","
\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n","
\r\n Address: {{applicationInfo.labAddress}}\r\n | Phone: {{applicationInfo.labPhone}}
\r\n | Email: {{applicationInfo.email}}
\r\n Copyright © 2012-{{Year}}.\r\n
\r\n All trademarks or registered trademarks are property of their respective owners.
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport * as moment from 'moment';\r\nimport { AppInfoService } from '../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-empty-layout-footer',\r\n templateUrl: './empty-layout-footer.component.html',\r\n styleUrls: ['./empty-layout-footer.component.scss']\r\n})\r\nexport class EmptyLayoutFooterComponent {\r\n constructor(public applicationInfo: AppInfoService) {\r\n }\r\n\r\n get Year() {\r\n return moment().year();\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-empty-layout',\r\n templateUrl: './empty-layout.component.html',\r\n styleUrls: ['./empty-layout.component.scss']\r\n})\r\nexport class EmptyLayoutComponent { }\r\n","\r\n\r\n","\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n","import {Component, HostBinding, OnInit} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {FusionAuthService} from '../../shared/services/fusion-auth';\r\nimport {ScreenService} from '../../shared/services/general';\r\nimport {DEFAULT_INTERRUPTSOURCES, Idle} from \"@ng-idle/core\";\r\nimport {Keepalive} from \"@ng-idle/keepalive\";\r\nimport {environment} from \"../../../environments/environment\";\r\nimport {LogOut} from \"../../stores/actions/fusion-auth.actions\";\r\nimport {Store} from \"@ngrx/store\";\r\nimport {AppState} from \"../../stores/app.state\";\r\n\r\n@Component({\r\n selector: 'app-main-layout',\r\n templateUrl: './main-layout.component.html',\r\n styleUrls: ['./main-layout.component.scss'],\r\n})\r\nexport class MainLayoutComponent implements OnInit {\r\n public idleState = 'Not started.';\r\n private timedOut = false;\r\n private lastPing?: Date;\r\n\r\n\r\n @HostBinding('class') get getClass() {\r\n return Object.keys(this.screen.sizes)\r\n // @ts-ignore\r\n .filter(cl => this.screen.sizes[cl])\r\n .join(' ');\r\n }\r\n\r\n constructor(private router: Router, public screen: ScreenService,\r\n private idle: Idle,\r\n private store: Store,\r\n private keepalive: Keepalive) {\r\n\r\n idle.setIdle(environment.production ? 15 * 60 : 5 * 60);\r\n idle.setTimeout(environment.production ? 60 : 60);\r\n idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);\r\n\r\n idle.onIdleEnd.subscribe(() => {\r\n this.idleState = 'No longer idle.'\r\n this.reset();\r\n });\r\n\r\n idle.onTimeout.subscribe(() => {\r\n this.idleState = 'Timed out!';\r\n this.timedOut = true;\r\n\r\n if (this.router.url !== '/login') {\r\n localStorage.setItem('logoutRoute', this.router.url);\r\n }\r\n this.store.dispatch(new LogOut());\r\n });\r\n\r\n idle.onIdleStart.subscribe(() => {\r\n this.idleState = 'You\\'ve gone idle!'\r\n });\r\n\r\n idle.onTimeoutWarning.subscribe((countdown) => {\r\n this.idleState = 'You will be logged out in ' + countdown + ' seconds!'\r\n });\r\n\r\n keepalive.interval(15);\r\n\r\n keepalive.onPing.subscribe(() => this.lastPing = new Date());\r\n\r\n this.reset();\r\n }\r\n\r\n public get IsAlmostTimedOut (): boolean {\r\n return !this.idleState.startsWith('Started');\r\n }\r\n\r\n private reset() {\r\n this.idle.watch();\r\n this.idleState = 'Started.';\r\n this.timedOut = false;\r\n }\r\n\r\n public async ngOnInit(): Promise {\r\n if (localStorage.getItem('logoutRoute')) {\r\n const url = localStorage.getItem('logoutRoute');\r\n localStorage.removeItem('logoutRoute');\r\n await this.router.navigateByUrl(url as string);\r\n }\r\n }\r\n\r\n public get IsDesktop() {\r\n return this.screen.isDesktop();\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport { NOT_FOUND } from 'http-status-codes';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { FusionAuthService } from '../../../shared/services/fusion-auth';\r\nimport { ContactService } from '../../../shared/services/ocl';\r\n\r\n@Component({\r\n selector: 'app-contact-us',\r\n templateUrl: './contact-us.component.html',\r\n styleUrls: ['./contact-us.component.scss'],\r\n})\r\nexport class ContactUsComponent implements OnInit, OnDestroy {\r\n public contactForm: UntypedFormGroup;\r\n public isLoading = false;\r\n public phonePattern: any = /^\\d*$/;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fb: UntypedFormBuilder, private authService: FusionAuthService, private contactService: ContactService) {\r\n this.contactForm = this.fb.group({\r\n firstName: new UntypedFormControl('', [Validators.required]),\r\n lastName: new UntypedFormControl('', [Validators.required]),\r\n email: new UntypedFormControl('', [Validators.required]),\r\n phone: new UntypedFormControl(''),\r\n message: new UntypedFormControl('', [Validators.required]),\r\n });\r\n }\r\n\r\n public ngOnInit() {\r\n const user = this.authService.Profile;\r\n this.contactForm.get('firstName')?.setValue(user.firstName);\r\n this.contactForm.get('lastName')?.setValue(user.lastName);\r\n this.contactForm.get('email')?.setValue(user.email);\r\n }\r\n\r\n public onInitialized(e: any) {\r\n setTimeout(() => {\r\n if (e && e.component) {\r\n e.component.focus();\r\n }\r\n });\r\n }\r\n\r\n public submit() {\r\n this.isLoading = true;\r\n const name = this.contactForm.get('firstName')?.value + ' ' + this.contactForm.get('lastName')?.value;\r\n const email = this.contactForm.get('email')?.value;\r\n const phone = this.contactForm.get('phone')?.value;\r\n const message = this.contactForm.get('message')?.value;\r\n this.contactService.sendEmail(name, email, phone, message).pipe(takeUntil(this.onDestroy$)).subscribe(response => {\r\n this.isLoading = false;\r\n if (response === false) {\r\n notify('There was a problem sending the mail', 'error');\r\n } else {\r\n notify('The email was sent successfully', 'success');\r\n ValidationEngine.resetGroup('contactForm');\r\n }\r\n }, (error) => {\r\n if (error.status === NOT_FOUND) {\r\n notify('There was a problem with Google Drive Setting', 'error', 3000);\r\n } else {\r\n notify('We are having trouble communicating with our servers!', 'error', 3000);\r\n }\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next(); this.onDestroy$.complete()\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n

Contact Us

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Last Name *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
First Name *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Email *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Phone
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Message *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component } from '@angular/core';\r\nimport { AppInfoService } from '../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-privacy',\r\n templateUrl: './privacy.component.html',\r\n styleUrls: ['./privacy.component.scss']\r\n})\r\nexport class PrivacyComponent {\r\n\r\n constructor(public appInfo: AppInfoService) {\r\n\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n

Notice of Privacy Practices

\r\n

THIS NOTICE DESCRIBES HOW MEDICAL INFORMATION ABOUT YOU MAY BE USED AND DISCLOSED AND HOW YOU CAN GET\r\n ACCESS TO THIS INFORMATION. PLEASE REVIEW IT CAREFULLY.\r\n

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

\r\n {{appInfo.lab}} is a full-service, clinical reference laboratory serving thousands of\r\n clients. {{appInfo.lab}} is dedicated to compliance with all applicable federal, state and local\r\n laws and regulations regarding the use and disclosure of such information. At {{appInfo.lab}}, we\r\n are committed to protecting the confidentiality of individuals’ laboratory test results and other\r\n patient protected health information that we collect or create as part of our diagnostic testing\r\n activities.\r\n

\r\n

\r\n We urge you to read this Notice of Privacy Practices (referred to as the “Notice”) carefully so that\r\n you will understand our commitment to the privacy and protection of your confidential health care\r\n information, and learn how you can involve yourself in the protection of this information. If you\r\n have any questions about this Notice of Privacy Practices or other privacy related issues, please\r\n send an email to {{appInfo.email}}\r\n or write to us at the following address:\r\n

\r\n
{{appInfo.lab}}, Inc.
\r\n
{{appInfo.labAddress}}
\r\n
Attn: HIPAA Privacy Officer
\r\n

\r\n {{appInfo.lab}} is committed to obtaining, maintaining, using and disclosing patient protected\r\n health information (referred to as “PHI”) in a manner that protects patient privacy in compliance\r\n with all applicable local, state and federal laws and regulations. {{appInfo.lab}} is required to\r\n abide by the terms of the Notice currently in effect. Your other health care provider(s) may have\r\n different notices regarding the use and disclosure of your PHI maintained by them.\r\n

\r\n

\r\n {{appInfo.lab}} is required by law to provide you with this Notice of Privacy Practices with respect\r\n to PHI, to maintain the privacy of PHI, to state the uses and disclosures of PHI that Specialty may\r\n make, and to list the rights of individuals and our legal duties with respect to their PHI. Your PHI\r\n at {{appInfo.lab}} includes personal and medical information (such as your name, address, date of\r\n birth, test ordered, etc.) that we obtain from your physician, health plan, or other sources. Your\r\n PHI also includes the laboratory testing results that we create.\r\n

\r\n
\r\n

Our Uses and Disclosure of Your Protected Health Information

\r\n

\r\n Your PHI will be used or disclosed for treatment, payment, or healthcare operations purposes and for\r\n other purposes permitted or required by law. While we cannot list every possible use or disclosure,\r\n all of the ways we use or disclose your PHI will fall into one of the categories listed below.\r\n

\r\n

If we want to use or disclose your PHI for purposes that do not fall into these categories, we would\r\n have to obtain your written authorization first. You have the right to revoke your authorization at\r\n any time, except if we have already made a disclosure based on that authorization.

\r\n

According to law, we do not need your authorization or permission to use or disclose your PHI for the\r\n following purposes:

\r\n

Treatment: As a health care provider that provides laboratory testing for patients\r\n and requested by physicians, {{appInfo.lab}} uses your PHI as part of our testing processes\r\n and {{appInfo.lab}} discloses your PHI to physicians and other authorized health care professionals\r\n who need access to your laboratory results to treat you. In addition to your treating physician, we\r\n may provide a consulting specialist physician with information about your results to further\r\n validate the results before release to your physician. We may also disclose your PHI to another\r\n testing laboratory if we are unable to perform the testing ourselves, and need to refer your\r\n specimen to that laboratory to perform the requested testing.

\r\n

Payment: Our billing department will use and disclose your PHI to certain insurance\r\n companies, hospitals, physicians, and health plans for payment purposes, or to third parties to\r\n assist us in creating bills, claim forms, or getting paid for our services. For example, we may send\r\n your name, date of service, test performed, diagnosis code, and other information to a health plan\r\n so that the plan will pay us for the services we provided. In some cases, we may have to contact you\r\n to obtain billing information or for other billing purposes. When required, we may use an outside\r\n collection agency to obtain payment.

\r\n

Health Care Operations: We may use or disclose your PHI in the course of activities\r\n required to support our health care operations, such as performing quality checks on our testing, or\r\n for developing normal reference ranges for tests that we perform. This information will be used in\r\n an effort to continually improve the quality and effectiveness of the healthcare services we\r\n provide. We may also disclose your health information to other health care providers or payors for\r\n their health care operations, but only if they already have a relationship with you and the purpose\r\n is for quality assurance activities, peer review activities, detecting fraud, or for other limited\r\n purposes.

\r\n

Disclosures to Business Associates: {{appInfo.lab}} may disclose your PHI to other\r\n companies or individuals who need your PHI in order to provide specific services to us. These other\r\n entities, known as “business associates,” generally must comply with the terms of a contract\r\n designed to ensure that they will maintain the privacy and security of your PHI in the same manner\r\n that we do (i.e., for designated treatment, payment, or health care operations purposes that they\r\n perform for us). For example, your PHI may be disclosed to couriers we use to transport specimens to\r\n us, or to private accrediting organizations that inspect and certify the quality of our\r\n laboratories.

\r\n
\r\n

Other Possible Ways We May Use or Disclose Your PHI:

\r\n

When required by law: in order to comply with federal or state laws, the orders of a\r\n court, or the orders of a governmental agency.

\r\n

Public health: to public health authorities for preventing or controlling disease,\r\n or reporting vital information (for example, reporting certain sexually transmitted diseases).

\r\n

Health oversight activities: to a health oversight agency for oversight activities\r\n authorized by law (for example as part of our regular inspection of our laboratory by state\r\n regulators ensuring compliance with state laws).

\r\n

Judicial and administrative proceedings: to courts, parties to a lawsuit, or\r\n government agencies as may be required during the course of a judicial or administrative proceeding\r\n (for example in response to a subpoena).

\r\n

Law enforcement: to law enforcement officials relating to crimes and other law\r\n enforcement purposes.

\r\n

Research: to researchers when their research has been approved by an institutional\r\n review board that has reviewed the research proposal and established protocols to ensure the privacy\r\n of your health information.

\r\n

Threats to health or safety: to others, consistent with law, to prevent a serious\r\n threat to personal health or safety (for example, in the course of an investigation of a physician’s\r\n license).

\r\n

Specialized government functions: to military command authorities, veterans’\r\n administration, and national security and intelligence officials for activities deemed necessary to\r\n carry out their respective missions, or to law enforcement officials having custody of an inmate.\r\n

\r\n

Workers compensation: to the extent authorized by and to the extent necessary to\r\n comply with laws relating to workers compensation or similar programs established by law.

\r\n
\r\n

Your Rights Concerning Privacy and Confidentiality

\r\n

Although your health record is technically the property of the healthcare practitioner or facility\r\n that compiled it, you have certain rights relating to your health information.

\r\n

Access: Federal regulations generally grant you or your authorized or designated\r\n personal representative the right to inspect and copy your PHI. However, in cases where state law is\r\n more restrictive than federal law, we are required to follow the more restrictive state law. Under\r\n the laws of the state of Illinois, where we are located, we are only permitted to make reports of\r\n our laboratory testing results to persons licensed under the provisions of law relating to the\r\n healing arts. Thus, we are generally not permitted under Illinois law to provide your PHI to you\r\n directly, even with your written consent. We can normally only provide that information to the\r\n requesting physician. Of course, we will comply with a valid subpoena or court order to disclose\r\n your PHI.

\r\n

Amendments: You have the right to request amendments to your PHI, although we are\r\n not required to make the requested amendments.

\r\n

Accounting: You have the right to obtain an accounting of disclosures of your health\r\n information for purposes other than treatment, payment or health care operations, disclosures to you\r\n or authorized by you, incidental disclosures and certain other excluded disclosures. Your request\r\n must be in writing.

\r\n

Restrictions: You have the right to request a restriction on uses and disclosures of\r\n your PHI, although we are not required to agree to your request.

\r\n

Confidential Communications: You have the right to request that we send your PHI to\r\n an alternate address, although we are not required to agree to your request.

\r\n

Notice of Privacy Practices: You have the right to request a paper copy of this\r\n Notice.

\r\n

Complaints: If you believe your privacy rights have been violated, you have the\r\n right to register a complaint with {{appInfo.lab}} or the Secretary of the U.S. Department of Health\r\n and Human Services. {{appInfo.lab}} will not retaliate against any individual for filing a\r\n complaint. You may file a complaint by writing to us at the address located at the beginning of this\r\n Notice.

\r\n
\r\n

How to Exercise Your Rights

\r\n

Write to us at the address above with your specific written request and be sure to include sufficient\r\n information for us to identify all of your records. {{appInfo.lab}} will consider your request and\r\n provide you a response within a reasonable timeframe. Should we deny your request, you may have the\r\n right in some circumstances to ask for the denial to be reviewed by another healthcare professional\r\n designated by {{appInfo.lab}}. For additional details, or for instructions regarding how to exercise\r\n these rights, please contact us.

\r\n

Note Regarding Illinois State Law: In cases where state law is more restrictive than\r\n federal law, we are required to follow the more restrictive state law. For example, Federal\r\n regulations specify that clinical laboratories, such as {{appInfo.lab}}, are exempt from the\r\n requirements making PHI available to you directly, if providing such access to you is prohibited by\r\n law. Under the laws of the state of Illinois, where we are located, we are only permitted to make\r\n reports of our laboratory testing results to persons licensed under the provisions of law relating\r\n to the healing arts. Thus, we are not permitted under Illinois law to provide your PHI to you\r\n directly, even with your written consent. We can generally only provide that information to the\r\n requesting physician. Of course, we will comply with a valid subpoena or court order to disclose\r\n your PHI.

\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n","
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n

Supply Request

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Last Name *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
First Name *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Email *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Phone
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n

Supplies

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport { NOT_FOUND } from 'http-status-codes';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { SupplyCategory } from '../../../shared/models/ocl';\r\nimport { FusionAuthService } from '../../../shared/services/fusion-auth';\r\nimport { ScreenService } from '../../../shared/services/general';\r\nimport { LabSettingsService, SupplyService } from '../../../shared/services/ocl';\r\n\r\n@Component({\r\n selector: 'app-supply-request',\r\n templateUrl: './supply-request.component.html',\r\n styleUrls: ['./supply-request.component.scss']\r\n})\r\nexport class SupplyRequestComponent implements OnInit, OnDestroy {\r\n public supplyRequestForm: UntypedFormGroup;\r\n public isLoading = false;\r\n public role: string = '';\r\n public phonePattern: any = /^\\d*$/;\r\n public supplyCategories: SupplyCategory[] = [];\r\n public user: any;\r\n public configDataSource: any;\r\n public isPhoneOrTablet: boolean = false;\r\n private onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fb: UntypedFormBuilder, private authService: FusionAuthService, private supplyService: SupplyService,\r\n private settingService: LabSettingsService, private sanitizer: DomSanitizer, private screen: ScreenService) {\r\n this.supplyRequestForm = this.fb.group({\r\n firstName: new UntypedFormControl('', [Validators.required]),\r\n lastName: new UntypedFormControl('', [Validators.required]),\r\n email: new UntypedFormControl('', [Validators.required]),\r\n phone: new UntypedFormControl(''),\r\n message: new UntypedFormControl(''),\r\n client: new UntypedFormControl(null, [Validators.required]),\r\n supplies: new UntypedFormControl(null),\r\n });\r\n\r\n this.getFilteredConfigs = this.getFilteredConfigs.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n this.isLoading = true;\r\n this.user = this.authService.Profile;\r\n this.configDataSource = [\r\n { name: 'Count'},\r\n { name: 'Box'},\r\n { name: 'Case'}\r\n ];\r\n this.initForm();\r\n\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n });\r\n }\r\n\r\n private initForm() {\r\n this.supplyRequestForm.get('firstName')?.setValue(this.user.firstName);\r\n this.supplyRequestForm.get('lastName')?.setValue(this.user.lastName);\r\n this.supplyRequestForm.get('email')?.setValue(this.user.email);\r\n this.role = this.user.registrations[0].roles[0];\r\n\r\n this.settingService.getWebSupplyCategorySettings().pipe(takeUntil(this.onDestroy$)).subscribe(result => {\r\n this.supplyCategories = result;\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n public getFilteredConfigs(options: any) {\r\n return {\r\n store: this.configDataSource,\r\n filter: options.data ? options.data.config.length === 1 ? ['name', '=', options.data.config[0]] : options.data.config.length === 2 ?\r\n [['name', '=', options.data.config[0]], 'or' , ['name', '=', options.data.config[1]]] : options.data.config.length === 3 ?\r\n [['name', '=', options.data.config[0]], 'or' , ['name', '=', options.data.config[1]], 'or' , ['name', '=', options.data.config[2]]] : null : null\r\n };\r\n }\r\n\r\n private clear() {\r\n this.isLoading = true;\r\n this.supplyRequestForm.reset();\r\n ValidationEngine.resetGroup('supplyRequestForm');\r\n this.supplyRequestForm?.get('message')?.setValue('');\r\n this.initForm();\r\n }\r\n\r\n public submit() {\r\n const form = ValidationEngine.validateGroup('supplyRequestForm');\r\n if (form.isValid) {\r\n /*if (this.supplyRequestForm.get('message').value === null || this.supplyRequestForm.get('message').value === '' ||\r\n this.supplyRequestForm.get('message').value.indexOf('

') === -1) {\r\n notify('You need to enter a message', 'error', 3000);\r\n } else {*/\r\n this.isLoading = true;\r\n this.supplyCategories.forEach(x => {\r\n x.supplies = x.supplies.filter(y => y.quantity !== null && y.configSelected !== null);\r\n });\r\n\r\n const supply = {\r\n name: this.supplyRequestForm.get('firstName')?.value + ' ' + this.supplyRequestForm.get('lastName')?.value,\r\n email: this.supplyRequestForm.get('email')?.value,\r\n phone: this.supplyRequestForm.get('phone')?.value,\r\n client: this.supplyRequestForm.get('client')?.value.name,\r\n message: this.supplyRequestForm.get('message')?.value.toString().replace('

', '

'),\r\n supplies: this.supplyCategories.filter(x => x.supplies.length > 0)\r\n };\r\n this.supplyService.sendEmail(supply).pipe(takeUntil(this.onDestroy$)).subscribe(response => {\r\n this.isLoading = false;\r\n if (response === false) {\r\n notify('There was an error sending the mail', 'error', 3000);\r\n } else {\r\n notify('The email was sent successfully', 'success', 3000);\r\n this.clear();\r\n }\r\n }, (error) => {\r\n if (error.status === NOT_FOUND) {\r\n notify('This feature is not configured by the lab', 'error', 3000);\r\n } else {\r\n notify('We are having trouble communicating with our servers!', 'error', 3000);\r\n }\r\n });\r\n // }\r\n }\r\n }\r\n\r\n public transformYourHtml(htmlTextWithStyle: string) {\r\n return this.sanitizer.bypassSecurityTrustHtml(htmlTextWithStyle);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next(); this.onDestroy$.complete();\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { AppInfoService } from '../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-terms-conditions',\r\n templateUrl: './terms-conditions.component.html',\r\n styleUrls: ['./terms-conditions.component.scss']\r\n})\r\nexport class TermsConditionsComponent {\r\n\r\n constructor(public appInfo: AppInfoService) { }\r\n\r\n\r\n}\r\n","

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

WEBSITE TERMS OF SERVICE AGREEMENT PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY.

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

\r\n This Web Site Terms of Service Agreement (the \"Agreement\") is between you (the user)\r\n and {{appInfo.lab}}. Your use of the {{appInfo.lab}} web site known as\r\n LIS OnlineTM (the \"Web Site\") is conditioned on your acceptance of the terms and conditions\r\n contained in this Agreement. You will be requested at the end of this Agreement to indicate your\r\n acceptance of these terms and conditions. By clicking on the \"ACCEPTED and AGREED\" button, you will\r\n have accepted and agreed to be bound by these terms and conditions, and you will also have confirmed\r\n that you have authority to agree to be so bound.\r\n

\r\n
\r\n

IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT OR DO NOT HAVE AUTHORITY TO SO\r\n AGREE, YOU MUST IMMEDIATELY LOG OFF THE WEB SITE.

\r\n
\r\n

1. License.

\r\n\r\n

\r\n 1.1 Use. {{appInfo.lab}} hereby grants you a nonexclusive, nontransferable\r\n license to access and use the Web Site internally in the United States via the Internet and to view\r\n and download a copy of the text and images expressly designated to you by {{appInfo.lab}} (the\r\n \"Content\") for your internal business purposes. You may use the Web Site only for the retrieval of\r\n the Content and shall comply with all applicable laws and regulations with respect to use of the Web\r\n Site and the Content hereunder. This license only grants to you the right to use the Web Site and\r\n Content, and you do not acquire any right of ownership or title in them. All right, title and\r\n interest in and to the Web Site and Content will at all times remain the property of {{appInfo.lab}}\r\n and its licensor(s) and service providers.\r\n

\r\n

1.2 Restrictions. Your right to use the Web Site and Content is personal to you. You\r\n may not transfer or make vailable your account identification and password to others. Any\r\n distribution by you of your account identification or password may result in termination of this\r\n Agreement in {{appInfo.lab}} sole discretion. You may not: (i) use, copy or disclose the Web\r\n Site or the Content except as permitted by this Agreement; (ii) use the Web Site or the Content for\r\n time-sharing, rental or service bureau purposes; (iii) sell, sublicense, resell, or otherwise\r\n transfer your right to use the Web Site or the Content; (iv) modify, reverse engineer, decompile or\r\n disassemble any part or all of the Web Site or Content; or (v) create or attempt to create\r\n derivative works based on or of the Web Site or the Content, in whole or in part.

\r\n
\r\n

2. Confidential Information.

\r\n

\r\n The Web Site contains confidential and proprietary Information of {{appInfo.lab}} and its\r\n customers. You agree not to make available the WebSite or the Content to any person, except to your\r\n employees or contractors whose access is necessary to enable you to exercise your license and who\r\n are bound by an appropriate agreement ensuring compliance with all applicable provisions of this\r\n Agreement. You shall take all reasonable precautions to safeguard the Web Site and the Content,\r\n exercising at least a reasonable degree of care, and agree to promptly notify {{appInfo.lab}}\r\n of any unauthorized use or disclosure of the Web Site or the Content, and to take all reasonable\r\n action to prevent use of the Web Site or the Content in breach of this Agreement. Your obligations\r\n to keep confidential the Web Site, the Content, and {{appInfo.lab}} other confidential and\r\n proprietary information shall survive termination of the Agreement.\r\n

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

3. Indemnification.

\r\n

You shall indemnify {{appInfo.lab}}, its directors, employees, agents and licensors against, and\r\n hold them harmless from, any and all lawsuits, claims, expenses (including reasonable attorneys'\r\n fees), settlements, damages, judgments and the like arising from your use of the Web Site and/or the\r\n Content.

\r\n
\r\n

4. Injunctive Relief.

\r\n

\r\n You agree that, if you breach or threaten to breach this Agreement in any manner, {{appInfo.lab}}\r\n may suffer irreparable damage, money damages will be inadequate, and {{appInfo.lab}} shall\r\n be entitled to preliminary and other injunctive relief by a court of competent jurisdiction against\r\n any such breach or threatened breach, without having to wait for you to cure a breach and without\r\n having to post a bond or other security. Such injunctive relief shall be in addition to, and in no\r\n way in limitation of, any and all other remedies {{appInfo.lab}} may have in law or equity, or\r\n under this Agreement, for the enforcement of this Agreement.\r\n

\r\n
\r\n

5. Warranties and Disclaimers of Warranties.

\r\n

{{appInfo.lab}} and its licensors make no representations or warranties about the web site or\r\n the content, including without limitation the suitability of the content and other information\r\n contained on this web site for any purpose. your access to and use of the website, such content and\r\n other information are provided \"as is\" without warranty of any kind. {{appInfo.lab}} and/or its\r\n licensors hereby disclaim all warranties and conditions with regard to the web site, content and\r\n other information, including all implied warranties of merchantability, fitness for a particular\r\n purpose, title, noninfringement, and availability. {{appInfo.lab}} and its licensors do not\r\n warrant the accuracy of the content or other information contained on the web site. further,\r\n {{appInfo.lab}} does not warrant that: the web site and its content will meet your\r\n requirements; the web site and the content, including without limitation its operation, or the\r\n services will be error-free; or all defects will be corrected. {{appInfo.lab}} also does not\r\n warrant that the web site and the content will function properly in combination with your equipment.\r\n {{appInfo.lab}} does not warrant that the files available for downloading will be free of\r\n infection by viruses, worms, trojan horses or other code that manifests contaminating or destructive\r\n properties.

\r\n
\r\n

6. Limitation of Remedies and Limitation of Liabilities.

\r\n

6.1 Your sole and exclusive remedy from your inability to use or access the web site\r\n or the content, defects in the web site, or any other matter arising from your use of the web site\r\n or the content shall be that {{appInfo.lab}} shall use reasonable efforts to provide to you\r\n with a copy of the content in an electronic format compatible with microsoft corporation's\r\n then-generally available version of word or a paper copy of the content, at {{appInfo.lab}}\r\n sole discretion.

\r\n

6.2 You are responsible for the selection of software to satisfy your requirements,\r\n for your data, and for the data and other results obtained, and conclusions drawn, from operation of\r\n the web site. {{appInfo.lab}} and its licensors will have no liability to you, third parties or\r\n related parties in connection with the use of such data, results and conclusions, or arising out of\r\n any use of the web site or the content, and do not assume any responsibility for your acts or\r\n omissions which may result in any liability or damages due to malpractice, failure to warn,\r\n negligence or any other basis. in addition, actions or inactions of third parties may result in\r\n situations in which your internet connection, use of the web site, the content or other information\r\n may be impaired, disrupted or damaged. {{appInfo.lab}} does not and cannot control the flow of\r\n data to or from the internet, and so disclaims any and all liability resulting from or related to\r\n such actions or inactions.

\r\n

6.3 In no event shall {{appInfo.lab}} or its licensors be liable for direct,\r\n indirect, special, incidental, punitive or consequential damages, including but not limited to, loss\r\n resulting from business disruption, loss of data, lost profits, lost goodwill, or damage to systems\r\n or data, whether in an action for contract, tort (including negligence) or otherwise, even if\r\n {{appInfo.lab}} or its licensors have been advised of the possibility of such damages.

\r\n

6.4 The obligations of {{appInfo.lab}} and your rights and remedies set forth\r\n in this agreement are exclusive and are given in substitution for all other warranties, obligations,\r\n and liabilities of {{appInfo.lab}}.

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

7. Term and Termination.

\r\n

This Agreement is effective immediately upon your agreement to the license terms for the Web Site and\r\n shall continue until terminated as described in this section. {{appInfo.lab}} may suspend or\r\n terminate this Agreement immediately if you: (i) breach this Agreement and fail to cure such breach\r\n within 10 days after receipt of notice; (ii) terminate or suspend your business; or (iii) become\r\n subject to any federal or state bankruptcy or insolvency proceeding. Termination will not limit a\r\n party from pursuing any other remedies available to it. All rights and obligations that should by\r\n their nature survive will survive any termination of this Agreement, including the terms of Sections\r\n 2-8. Upon termination, you will make no further use of the Web Site, and, within 10 days thereafter,\r\n you will return to {{appInfo.lab}} all materials provided to you by {{appInfo.lab}}\r\n related to the Web Site.

\r\n
\r\n

8. General.

\r\n

8.1 Assignment, Successors. No right or license under this Agreement may be assigned\r\n or transferred by you nor may any duty be delegated by you without {{appInfo.lab}} prior\r\n written consent. Any assignment, transfer or delegation in contradiction of this provision shall be\r\n null and void. Subject to the foregoing, this Agreement will bind and inure to the benefit of the\r\n successors and assigns of you and {{appInfo.lab}}.

\r\n

8.2 Waiver, Severability, Amendment. Waiver of a breach of or right hereunder will\r\n not constitute a waiver of any other or subsequent breach or right. If any provision herein shall be\r\n held by a court of competent jurisdiction to be contrary to law, that provision shall be changed and\r\n interpreted so as to best accomplish the objectives of the original provision to the fullest extent\r\n allowed by law, and the remaining provisions herein will remain in full force and effect. This\r\n Agreement may be amended only in a document signed by authorized representatives of you\r\n and {{appInfo.lab}}.

\r\n

8.3 Governing Law. This Agreement shall be governed by Illinois law excluding its\r\n conflicts of laws rules. Venue for any action between the parties shall be Will County, State of\r\n Illinois.

\r\n

8.4 Entire Agreement. This Agreement is the complete and exclusive agreement between\r\n the parties and supersedes all previous and contemporaneous agreements, proposals and communications\r\n with respect to this subject matter.

\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-loading',\r\n templateUrl: './loading.component.html',\r\n styleUrls: ['./loading.component.scss']\r\n})\r\nexport class LoadingComponent {\r\n\r\n}\r\n","
\r\n \r\n
\r\n","export class LoginViewModel {\r\n get loginId(): string {\r\n return this._loginId;\r\n }\r\n\r\n set loginId(value: string) {\r\n this._loginId = value;\r\n }\r\n\r\n get password(): string {\r\n return this._password;\r\n }\r\n\r\n set password(value: string) {\r\n this._password = value;\r\n }\r\n\r\n get ip(): string {\r\n return this._ip;\r\n }\r\n\r\n set ip(value: string) {\r\n this._ip = value;\r\n }\r\n\r\n get applicationId(): string {\r\n return this._applicationId;\r\n }\r\n\r\n set applicationId(value: string) {\r\n this._applicationId = value;\r\n }\r\n private _loginId: string = '';\r\n private _password: string = '';\r\n private _ip: string = '';\r\n private _applicationId: string = '';\r\n}\r\n","import { User } from 'src/app/shared/models/fusion-auth/user';\r\nimport { All, FusionAuthActionTypes } from '../actions/fusion-auth.actions';\r\n\r\nexport interface State {\r\n isAuthenticated: boolean;\r\n isLoading: boolean;\r\n user: User | null;\r\n state: string | null;\r\n token: string | null;\r\n refreshToken: string | null;\r\n errorMessage: string | null;\r\n}\r\n\r\nexport const initialState: State = {\r\n isAuthenticated: false,\r\n isLoading: false,\r\n user: null,\r\n state: null,\r\n token: null,\r\n refreshToken: null,\r\n errorMessage: null,\r\n};\r\n\r\nexport function reducer(state = initialState, action: All): State {\r\n switch (action.type) {\r\n case FusionAuthActionTypes.LOGIN: {\r\n return {\r\n ...state,\r\n isLoading: true,\r\n };\r\n }\r\n case FusionAuthActionTypes.LOGIN_SUCCESS: {\r\n return {\r\n ...state,\r\n isAuthenticated: true,\r\n isLoading: false,\r\n user: action.payload.user,\r\n token: action.payload.token,\r\n state: action.payload.state,\r\n refreshToken: action.payload.refreshToken,\r\n errorMessage: null,\r\n };\r\n }\r\n case FusionAuthActionTypes.LOGIN_FAILURE: {\r\n return {\r\n ...state,\r\n isLoading: false,\r\n errorMessage: 'Incorrect email and/or password.',\r\n };\r\n }\r\n case FusionAuthActionTypes.LOGOUT: {\r\n return initialState;\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n","import { createFeatureSelector } from '@ngrx/store';\r\nimport * as FusionAuth from './state/fusion-auth.state';\r\n\r\nexport interface AppState {\r\n authState: FusionAuth.State;\r\n}\r\n\r\nexport const reducers = {\r\n auth: FusionAuth.reducer,\r\n};\r\n\r\nexport const selectAuthState = createFeatureSelector('auth');\r\n","import {Directive, EventEmitter, HostListener, Output} from '@angular/core';\r\n\r\n// eslint-disable-next-line @angular-eslint/directive-selector\r\n@Directive({ selector: '[capsLock]' })\r\nexport class TrackCapsDirective {\r\n @Output() capsLock = new EventEmitter();\r\n\r\n @HostListener('window:keydown', ['$event'])\r\n onKeyDown(event: KeyboardEvent): void {\r\n const capsOn = event.getModifierState && event.getModifierState('CapsLock');\r\n this.capsLock.emit(capsOn);\r\n }\r\n @HostListener('window:keyup', ['$event'])\r\n onKeyUp(event: KeyboardEvent): void {\r\n const capsOn = event.getModifierState && event.getModifierState('CapsLock');\r\n this.capsLock.emit(capsOn);\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef, HostListener, Inject,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Renderer2,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Store} from '@ngrx/store';\r\nimport {DxFormComponent} from 'devextreme-angular';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\nimport {LoginViewModel} from 'src/app/shared/models/general';\r\nimport {LogIn} from 'src/app/stores/actions/fusion-auth.actions';\r\nimport {AppState, selectAuthState} from 'src/app/stores/app.state';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {AppInfoService} from '../../../shared/services/general';\r\nimport {DOCUMENT} from \"@angular/common\";\r\n\r\n@Component({\r\n selector: 'app-login',\r\n templateUrl: './login.component.html',\r\n styleUrls: ['./login.component.scss'],\r\n})\r\nexport class LoginComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\r\n @ViewChild(DxFormComponent, {static: true}) public form?: DxFormComponent;\r\n public formData: LoginViewModel = new LoginViewModel();\r\n public capsOn: any;\r\n public errorMessage: BehaviorSubject = new BehaviorSubject('');\r\n public isLoading: BehaviorSubject = new BehaviorSubject(false);\r\n private onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private render: Renderer2,\r\n private router: Router,\r\n private fusionAuth: FusionAuthService,\r\n private store: Store,\r\n private elRef: ElementRef,\r\n public applicationInfo: AppInfoService,\r\n @Inject(DOCUMENT) private document: Document,\r\n private renderer: Renderer2\r\n ) {\r\n this.formSubmitted = this.formSubmitted.bind(this);\r\n }\r\n\r\n @HostListener('document:keypress', ['$event'])\r\n handleKeyboardEvent(event: KeyboardEvent) {\r\n this.renderCapsLockMessage();\r\n }\r\n\r\n public changeCapsOn(value: any) {\r\n this.capsOn = value;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.capsOn && changes.capsOn.currentValue !== undefined) {\r\n console.log(changes.capsOn.currentValue);\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.fusionAuth.cleanCredentials();\r\n }\r\n\r\n public async ngOnInit(): Promise {\r\n if (this.fusionAuth.IsLoggedIn === 'true') {\r\n await this.router.navigateByUrl('/secured/results/lab');\r\n return;\r\n }\r\n }\r\n\r\n private renderCapsLockMessage() {\r\n const parent = this.elRef.nativeElement.querySelector('.dx-validationsummary') as HTMLElement;\r\n\r\n if (!parent) return;\r\n\r\n for (let i = 0; i < (parent.children as HTMLCollection).length; i++) {\r\n if (parent.children.item(i) && typeof parent.children.item(i)?.remove === 'function') {\r\n parent.children.item(i)?.remove();\r\n }\r\n }\r\n\r\n if (this.capsOn) {\r\n const errorMessage = `\r\n
\r\n
\r\n Caps-lock is on\r\n
\r\n
\r\n `;\r\n if (parent) {\r\n parent.insertAdjacentHTML('beforeend', errorMessage);\r\n }\r\n } else {\r\n const element = this.document.getElementById('caps-lock-alert');\r\n if (element && parent)\r\n this.renderer.removeChild(parent, element);\r\n }\r\n }\r\n\r\n private renderResponseErrorMessage(message: string) {\r\n const parent = this.elRef.nativeElement.querySelector('.dx-validationsummary') as HTMLElement;\r\n\r\n if (!parent) return;\r\n\r\n for (let i = 0; i < (parent.children as HTMLCollection).length; i++) {\r\n if (parent.children.item(i) && typeof parent.children.item(i)?.remove === 'function') {\r\n parent.children.item(i)?.remove();\r\n }\r\n }\r\n\r\n if (message === null) {\r\n const errorElement = this.elRef.nativeElement.querySelector('#custom-error');\r\n if (errorElement) {\r\n this.render.removeChild(parent, errorElement);\r\n }\r\n } else {\r\n const errorMessage = `\r\n
\r\n
\r\n ${message}\r\n
\r\n
\r\n `;\r\n if (parent) {\r\n parent.insertAdjacentHTML('beforeend', errorMessage);\r\n }\r\n }\r\n }\r\n\r\n public async formSubmitted() {\r\n this.store.dispatch(new LogIn({loginId: this.formData.loginId, password: this.formData.password, applicationId: this.formData.applicationId} as any));\r\n this.store.select(selectAuthState).pipe(takeUntil(this.onDestroy$)).subscribe((state: any) => {\r\n this.errorMessage.next(state.errorMessage);\r\n this.isLoading.next(state.isLoading);\r\n this.renderResponseErrorMessage(state.errorMessage);\r\n });\r\n }\r\n\r\n public get IsLoading() {\r\n return this.isLoading.value;\r\n }\r\n\r\n public set IsLoading(value: boolean) {\r\n this.isLoading.next(value);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n"," \r\n
\r\n
\r\n
\r\n
\r\n \"Laboratory\r\n
\r\n
\r\n

Use your credentials to login

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","
\r\n
\r\n \r\n
\r\n \"Laboratory\r\n
\r\n
\r\n

\r\n Enter your email address and we will send you instructions to reset your password.\r\n

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

Helpful tips to access your {{ Lab }} web portal account:

\r\n
    \r\n
  • \r\n If you forgot your password, please enter your email address above and click the Send button.\r\n
  • \r\n
  • After clicking Send, check your email account for the email from {{ Lab }}.
  • \r\n
  • Click \"Reset password now\".
  • \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n

Please check your email and click on the link to change your password. Note that thins link will be valid for 10 minutes

\r\n
\r\n \r\n
\r\n
\r\n\r\n","import {Component, OnDestroy, ViewChild} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {DxFormComponent} from 'devextreme-angular';\r\nimport notify from 'devextreme/ui/notify';\r\nimport {Subject} from 'rxjs';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {RecoveryViewModel} from 'src/app/shared/models/general';\r\nimport {FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {AppInfoService} from '../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-password-recovery',\r\n templateUrl: './password-recovery.component.html',\r\n styleUrls: ['./password-recovery.component.scss'],\r\n})\r\nexport class PasswordRecoveryComponent implements OnDestroy {\r\n @ViewChild(DxFormComponent, {static: true}) public form?: DxFormComponent;\r\n public formData: RecoveryViewModel = {} as RecoveryViewModel;\r\n public popupVisible = false;\r\n private onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private applicationInfo: AppInfoService,\r\n private fusionAuth: FusionAuthService,\r\n private router: Router,\r\n ) {\r\n }\r\n\r\n public formSubmitted(event: any): void {\r\n event.preventDefault();\r\n if (this.form?.instance.validate().isValid) {\r\n this.fusionAuth.forgotPassword({\r\n loginId: this.formData.email,\r\n sendForgotPasswordEmail: true\r\n }).pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.popupVisible = true;\r\n }, (error) => {\r\n if (error.status === 404) {\r\n notify('There is not any user registered with the introduced email', 'error', 3000);\r\n } else {\r\n notify('We are having trouble to succeed your request!', 'error', 3000);\r\n }\r\n });\r\n }\r\n }\r\n\r\n public async redirectToLogin() {\r\n this.popupVisible = false;\r\n await this.router.navigateByUrl('/login');\r\n }\r\n\r\n public get Logo(): string {\r\n return this.applicationInfo.logo;\r\n }\r\n\r\n public get Lab(): string {\r\n return this.applicationInfo.lab;\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","import { Component } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { Router } from '@angular/router';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport { BAD_REQUEST, NOT_FOUND } from 'http-status-codes';\r\nimport { of } from 'rxjs';\r\nimport { catchError, take, tap } from 'rxjs/operators';\r\nimport { PatientService } from 'src/app/modules/shared/services/patient.service';\r\nimport { environment } from '../../../../environments/environment';\r\nimport { RegistrationRequest, User } from '../../../shared/models/fusion-auth';\r\nimport { FusionAuthManagementService, FusionAuthService } from '../../../shared/services/fusion-auth';\r\nimport { AppInfoService } from '../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-patient-sign-up',\r\n templateUrl: './patient-sign-up.component.html',\r\n styleUrls: ['./patient-sign-up.component.scss'],\r\n})\r\nexport class PatientSignUpComponent {\r\n public patientSignUpForm: UntypedFormGroup;\r\n public isLoading = false;\r\n public user: User = {} as User;\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private router: Router,\r\n private fusionAuth: FusionAuthService,\r\n private applicationInfo: AppInfoService,\r\n private patientService: PatientService,\r\n private fusionAuthManagement: FusionAuthManagementService) {\r\n this.patientSignUpForm = this.fb.group({\r\n lastName: new UntypedFormControl('', [Validators.required]),\r\n firstName: new UntypedFormControl('', [Validators.required]),\r\n birthDate: new UntypedFormControl('', [Validators.required]),\r\n patientId: new UntypedFormControl('', [Validators.required]),\r\n email: new UntypedFormControl('', [Validators.required]),\r\n });\r\n }\r\n\r\n public get Logo(): string {\r\n return this.applicationInfo.logo;\r\n }\r\n\r\n public submit() {\r\n const patientSignUpValidation = ValidationEngine.validateGroup('patientSignUpForm');\r\n if (patientSignUpValidation.isValid) {\r\n this.isLoading = true;\r\n const lastName = this.patientSignUpForm.get('lastName')?.value.toUpperCase();\r\n const firstName = this.patientSignUpForm.get('firstName')?.value.toUpperCase();\r\n const birthDate = this.patientSignUpForm.get('birthDate')?.value;\r\n const patientId = this.patientSignUpForm.get('patientId')?.value;\r\n const email = this.patientSignUpForm.get('email')?.value;\r\n\r\n this.user = {\r\n lastName,\r\n firstName,\r\n birthDate,\r\n email,\r\n username: email.split('@')[0] + (Math.floor(Math.random() * (99999 - 10000)) + 10000),\r\n data: {},\r\n active: true,\r\n } as any;\r\n\r\n const request: RegistrationRequest = {\r\n user: this.user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [],\r\n username: this.user.username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.fusionAuthManagement\r\n .createPatientUser(patientId, request)\r\n .pipe(\r\n take(1),\r\n tap(() => (this.isLoading = false)),\r\n catchError(err => {\r\n this.isLoading = false;\r\n if (err.status === NOT_FOUND) {\r\n notify('No patient could be match in our database', 'error', 3000);\r\n } else if (err.status === BAD_REQUEST) {\r\n notify('Email in use', 'error', 3000);\r\n } else {\r\n notify(err.message, 'error', 3000);\r\n }\r\n return of(null);\r\n }))\r\n .subscribe(async response => {\r\n if (response) {\r\n await this.router.navigateByUrl('/login');\r\n notify('A notification has been sent to created user\\'s email.', 'success', 3000);\r\n }\r\n });\r\n }\r\n }\r\n\r\n}\r\n\r\n","
\r\n
\r\n \r\n
\r\n \"Laboratory\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Last Name *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
First Name *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Birth Date *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
Lab Patient ID *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
Email *
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","
\r\n
\r\n
\r\n
{{ label }}
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \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 Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n Renderer2,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {dxDataGridColumn} from 'devextreme/ui/data_grid';\r\nimport {DOMService, ScreenService} from '../../../../shared/services/general';\r\n\r\n@Component({\r\n selector: 'app-glass',\r\n templateUrl: './glass.component.html',\r\n styleUrls: ['./glass.component.scss'],\r\n})\r\nexport class GlassComponent implements OnChanges, OnInit {\r\n @Input() public mode: 'single' | 'multiple' = 'single';\r\n @Input() public keyExpr: string = 'id';\r\n @Input() public displayExpr: string | Function = '';\r\n @Input() public label: string = '';\r\n @Input() public placeholder = 'Select an item...';\r\n @Input() public arr: any;\r\n @Input() public disabled = false;\r\n @Input() public selectedItemsKeys?: any[] = [];\r\n @Input() public selectedItemsRowsOnlyEdit?: any[] = [];\r\n @Input() public disableInEdit = false;\r\n @Input() public selectedItemNoAccess: any[] = [];\r\n @Input() public columns?: Array = [];\r\n @Input() public dropDownColumns?: Array = [];\r\n @ViewChild('container', {static: true}) public containerDiv?: ElementRef;\r\n @ViewChild('controls', {static: true}) public controlsDiv?: ElementRef;\r\n @ViewChild('grid', {static: true}) public grid?: DxDataGridComponent;\r\n @ViewChild('dropDownGrid', {static: false}) public dropDownGrid?: DxDataGridComponent;\r\n public items: DataSource = new DataSource([]);\r\n public dropDownSelectedRow: any[] = [];\r\n public dropDownSelectedItemValue?: string;\r\n public gridItems: any[] = [];\r\n public gridSelectedRow: any[] = [];\r\n @Output() public changes = new EventEmitter();\r\n public selectedRowsData: any[] = [];\r\n public fromRemove = false;\r\n public isPhone: boolean = false;\r\n public role?: string;\r\n\r\n constructor(private screen: ScreenService, private renderer: Renderer2, private domService: DOMService) {\r\n }\r\n\r\n public populateGridData() {\r\n if (this.arr && this.selectedItemsKeys && !this.fromRemove) {\r\n this.gridItems = this.selectedRowsData;\r\n if (this.disableInEdit && this.selectedItemsRowsOnlyEdit && this.selectedItemsRowsOnlyEdit.length > 0) {\r\n const itemsNoAccess = this.selectedItemsRowsOnlyEdit.filter(x => this.selectedItemNoAccess.indexOf(x.id) === -1);\r\n const itemsToAdd = itemsNoAccess.filter(x => this.gridItems.map(y => y.id).indexOf(x.id) === -1);\r\n this.gridItems.push(...itemsToAdd);\r\n }\r\n }\r\n }\r\n\r\n public get GridSize() {\r\n const element = this.containerDiv?.nativeElement as HTMLElement;\r\n return element?.getBoundingClientRect().height -\r\n 32 - element?.getBoundingClientRect().height;\r\n }\r\n\r\n public populateDropDownData() {\r\n if (this.arr && this.selectedItemsKeys) {\r\n this.items = new DataSource({ store: this.arr });\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (this.selectedItemsKeys === undefined) {\r\n this.selectedItemsKeys = [];\r\n }\r\n this.populateDropDownData();\r\n\r\n if (changes.selectedItemsRowsOnlyEdit && changes.selectedItemsRowsOnlyEdit.currentValue !== undefined && changes.selectedItemsRowsOnlyEdit.currentValue.length > 0) {\r\n this.selectedRowsData = this.selectedItemsRowsOnlyEdit as any[];\r\n this.dropDownSelectedRow = [];\r\n this.dropDownSelectedRow.push(...this.selectedItemsKeys);\r\n this.populateGridData();\r\n }\r\n }\r\n\r\n public dropDownSelectionChanged(selection: any) {\r\n if (selection && selection.selectedRowsData.length > 0 && !this.fromRemove) {\r\n this.selectedRowsData = selection.selectedRowsData;\r\n this.dropDownSelectedItemValue = selection.selectedRowsData.map((row: any) => row[this.keyExpr]);\r\n /*if (typeof this.displayExpr === 'string') {\r\n this.dropDownSelectedItemValue = selection.selectedRowsData.map((s: any) => s[this.displayExpr as string]).join(', ');\r\n } else {\r\n let expression = '';\r\n selection.selectedRowsData.forEach((e: any) => {\r\n (this.displayExpr as string[]).forEach(t => expression += ` ${e[t]}`);\r\n expression += ',';\r\n });\r\n this.dropDownSelectedItemValue = expression;\r\n }*/\r\n } else {\r\n this.fromRemove = false;\r\n this.dropDownSelectedItemValue = undefined;\r\n }\r\n }\r\n\r\n public add() {\r\n this.selectedItemsKeys?.push(...this.dropDownSelectedRow);\r\n this.populateGridData();\r\n this.populateDropDownData();\r\n this.dropDownSelectedItemValue = undefined;\r\n this.changes.emit(this.gridItems);\r\n }\r\n\r\n public remove() {\r\n this.gridSelectedRow.forEach(row => {\r\n // @ts-ignore\r\n this.gridItems.splice(this.gridItems.findIndex(i => i[this.keyExpr] === row[this.keyExpr]), 1);\r\n // @ts-ignore\r\n this.selectedItemsKeys.splice(this.selectedItemsKeys.findIndex(i => i === row[this.keyExpr]), 1);\r\n\r\n this.fromRemove = true;\r\n });\r\n\r\n this.dropDownSelectedRow = [];\r\n this.dropDownSelectedRow.push(...(this.selectedItemsKeys?this.selectedItemsKeys:[]));\r\n this.populateGridData();\r\n this.populateDropDownData();\r\n this.changes.emit(this.gridItems);\r\n }\r\n\r\n public canRemove() {\r\n return this.gridSelectedRow.length > 0;\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.grid)\r\n this.grid.height = this.GridSize;\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.screen.changed.subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n });\r\n }\r\n\r\n public resizePickerDropDown() {\r\n const element = this.domService.getElementsByClassname('dx-overlay-wrapper dx-dropdowneditor-overlay dx-popup-wrapper').item(0) as HTMLElement;\r\n if (element) {\r\n if (this.isPhone) {\r\n this.renderer.setStyle(element, 'width', '300px');\r\n this.renderer.setStyle(element.firstChild, 'width', '300px');\r\n } else {\r\n this.renderer.setStyle(element, 'width', '500px');\r\n this.renderer.setStyle(element.firstChild, 'width', '500px');\r\n }\r\n this.renderer.setStyle(element.firstChild, 'height', '38vh');\r\n this.renderer.setStyle(element.firstChild?.firstChild, 'height', '100%');\r\n }\r\n\r\n if (this.dropDownGrid !== undefined) {\r\n this.dropDownGrid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public selectionChange(e: any) {\r\n if (this.disableInEdit && this.selectedItemsRowsOnlyEdit && this.selectedItemsRowsOnlyEdit.length > 0) {\r\n const disabledKeys = e.currentSelectedRowKeys.filter((i: any) => this.selectedItemNoAccess.indexOf(i.id) === -1);\r\n if (disabledKeys.length > 0) {\r\n e.component.deselectRows(disabledKeys);\r\n }\r\n }\r\n }\r\n\r\n public onRowPrepared(e: any) {\r\n if (this.disableInEdit && this.selectedItemsRowsOnlyEdit && this.selectedItemsRowsOnlyEdit.length > 0) {\r\n if (e.rowType === 'data' && e.data && this.selectedItemNoAccess.indexOf(e.data.id) === -1) {\r\n this.renderer.addClass(e.rowElement, 'disabled-row');\r\n }\r\n }\r\n }\r\n\r\n public onCellPrepared(e: any) {\r\n if (this.disableInEdit && this.selectedItemsRowsOnlyEdit && this.selectedItemsRowsOnlyEdit.length > 0) {\r\n if (e.rowType === 'data' && e.column.command === 'select' && !this.selectedItemNoAccess.includes(e.data.id)) {\r\n this.renderer.addClass(e.cellElement.firstChild, 'dx-state-disabled');\r\n }\r\n }\r\n }\r\n}\r\n","\r\n \r\n

User Form

\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \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 Component,\r\n EventEmitter,\r\n Input, OnChanges, OnDestroy,\r\n OnInit,\r\n Output, SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport {DxFormComponent, DxTabPanelComponent} from 'devextreme-angular';\r\nimport {dxDataGridColumn} from 'devextreme/ui/data_grid';\r\nimport {DxPopupComponent} from 'devextreme-angular';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport notify from 'devextreme/ui/notify';\r\nimport ValidationEngine from 'devextreme/ui/validation_engine';\r\nimport {StatusCodes} from 'http-status-codes';\r\nimport {BehaviorSubject, forkJoin, Subject} from 'rxjs';\r\nimport {take, takeUntil, tap} from 'rxjs/operators';\r\nimport {PhysicianService} from 'src/app/modules/shared/services/physician.service';\r\nimport {RegistrationRequest, Role, User} from 'src/app/shared/models/fusion-auth';\r\nimport {environment} from 'src/environments/environment';\r\nimport {Client} from '../../../../modules/shared/models/order-entry/client';\r\nimport {Patient} from '../../../../modules/shared/models/order-entry/patient';\r\nimport {Physician} from '../../../../modules/shared/models/order-entry/physician';\r\nimport {ClientService, PatientService} from '../../../../modules/shared/services';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../../shared/services/fusion-auth';\r\nimport {ScreenService} from '../../../../shared/services/general';\r\nimport {TitleClickEvent} from \"devextreme/ui/tab_panel\";\r\nimport DevExpress from \"devextreme\";\r\nimport ReadyEvent = DevExpress.ui.dxMap.ReadyEvent;\r\nimport {ValueChangedEvent} from \"devextreme/ui/select_box\";\r\n\r\n@Component({\r\n selector: 'app-user-form',\r\n templateUrl: './user-form.component.html',\r\n styleUrls: ['./user-form.component.scss'],\r\n})\r\nexport class UserFormComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {\r\n @ViewChild(DxPopupComponent, {static: false}) public dialog?: DxPopupComponent;\r\n @ViewChild('form', {static: false}) public form?: DxFormComponent;\r\n @ViewChild('tab', {static: false}) public tab?: DxTabPanelComponent;\r\n @Input() public formVisible = false;\r\n @Input() public user?: User & {\r\n role: string;\r\n data: { clients: number[]; patients: number[]; physicians: number[] };\r\n } = {} as User & {\r\n role: string;\r\n data: { clients: number[]; patients: number[]; physicians: number[] };\r\n };\r\n @Input() public roles?: BehaviorSubject;\r\n @Input() public existentUsers: any = [];\r\n public selectorRoles?: Role[] = [];\r\n @Output() public formSubmitted = new EventEmitter();\r\n public isLoading = false;\r\n public isBackgroundLoading = false;\r\n public clients: BehaviorSubject = new BehaviorSubject(null as unknown as DataSource);\r\n public patients: BehaviorSubject = new BehaviorSubject(null as unknown as DataSource);\r\n public physicians: BehaviorSubject = new BehaviorSubject(null as unknown as DataSource);\r\n public clientsOnlyForEdit?: Client[];\r\n public patientsOnlyForEdit?: Patient[];\r\n public physiciansOnlyForEdit?: Physician[];\r\n public lastClientsSelected?: Client[];\r\n public lastPatientsSelected?: Patient[];\r\n public lastPhysiciansSelected?: Physician[];\r\n\r\n public clientsGlassDropDownColumns?: dxDataGridColumn[];\r\n public clientsGlassGridColumns?: dxDataGridColumn[];\r\n public patientsGlassDropDownColumns?: dxDataGridColumn[];\r\n public patientsGlassGridColumns?: dxDataGridColumn[];\r\n public physiciansGlassDropDownColumns?: dxDataGridColumn[];\r\n public physiciansGlassGridColumns?: dxDataGridColumn[];\r\n\r\n public emailControl?: any;\r\n //public saveBtn: DxButton;\r\n public isPhone: boolean = false;\r\n public isPhoneLandscape: boolean = false;\r\n public tabIndex = 0;\r\n public lastTabIndex = 0;\r\n public onDestroy$: Subject = new Subject();\r\n public authenticatedUser: any;\r\n public authenticatedRole: any;\r\n\r\n public physicianDisplayExp = (item: any) => item && `${item.firstName} ${item.lastName}`;\r\n public patientDisplayExp = (item: any) => item && `${item.firstName} ${item.lastName}`;\r\n\r\n constructor(\r\n private clientService: ClientService,\r\n private patientService: PatientService,\r\n private physicianService: PhysicianService,\r\n private fusionAuthManagement: FusionAuthManagementService,\r\n private fusionAuth: FusionAuthService,\r\n private screen: ScreenService,\r\n ) {\r\n /*this.saveBtn = {\r\n text: 'Save',\r\n useSubmitBehavior: true,\r\n };*/\r\n this.initClientsGlass();\r\n this.initPatientsGlass();\r\n this.initPhysiciansGlass();\r\n\r\n this.roleChanged = this.roleChanged.bind(this);\r\n this.onTabSelectionChange = this.onTabSelectionChange.bind(this);\r\n this.ready = this.ready.bind(this);\r\n this.onContentReady = this.onContentReady.bind(this);\r\n }\r\n\r\n private initClientsGlass() {\r\n this.clientsGlassDropDownColumns = [\r\n {\r\n caption: 'Code',\r\n dataField: 'code',\r\n width: '80',\r\n hidingPriority: 0,\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Name',\r\n dataField: 'name',\r\n } as dxDataGridColumn,\r\n ];\r\n\r\n this.clientsGlassGridColumns = [\r\n {\r\n caption: 'Code',\r\n dataField: 'code',\r\n width: '80',\r\n hidingPriority: 0,\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Name',\r\n dataField: 'name',\r\n } as dxDataGridColumn\r\n ];\r\n }\r\n\r\n private initPhysiciansGlass() {\r\n this.physiciansGlassDropDownColumns = [\r\n {\r\n caption: 'NPI',\r\n dataField: 'npi',\r\n width: '80',\r\n hidingPriority: 0,\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Last Name',\r\n dataField: 'lastName',\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'First Name',\r\n dataField: 'firstName',\r\n } as dxDataGridColumn\r\n ];\r\n\r\n this.physiciansGlassGridColumns = [\r\n {\r\n caption: 'NPI',\r\n dataField: 'npi',\r\n width: '80',\r\n hidingPriority: 0,\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Last Name',\r\n dataField: 'lastName',\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'First Name',\r\n dataField: 'firstName',\r\n } as dxDataGridColumn,\r\n ];\r\n }\r\n\r\n private initPatientsGlass() {\r\n this.patientsGlassDropDownColumns = [\r\n {\r\n caption: 'Last Name',\r\n dataField: 'lastName',\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'First Name',\r\n dataField: 'firstName',\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Birth Date',\r\n dataField: 'birthDate',\r\n dataType: 'date',\r\n hidingPriority: 0,\r\n } as dxDataGridColumn,\r\n ];\r\n\r\n this.patientsGlassGridColumns = [\r\n {\r\n caption: 'Code',\r\n dataField: 'code',\r\n width: '80',\r\n hidingPriority: 0,\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Last Name',\r\n dataField: 'lastName',\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'First Name',\r\n dataField: 'firstName',\r\n } as dxDataGridColumn,\r\n {\r\n caption: 'Birth Date',\r\n dataField: 'birthDate',\r\n dataType: 'date',\r\n hidingPriority: 1,\r\n } as dxDataGridColumn\r\n ];\r\n }\r\n\r\n public activeTab(): string {\r\n let tab = '';\r\n const roleIndex = this.roles?.value.findIndex(r => r.name === this.user?.role);\r\n\r\n if (roleIndex !== undefined && roleIndex !== -1) {\r\n if (this.roles?.value[roleIndex].name.toLocaleLowerCase().includes('client')) {\r\n tab = 'client';\r\n }\r\n if (this.roles?.value[roleIndex].name.toLocaleLowerCase().includes('patient')) {\r\n tab = 'patient';\r\n }\r\n if (this.roles?.value[roleIndex].name.toLocaleLowerCase().includes('physician')) {\r\n tab = 'physician';\r\n }\r\n }\r\n\r\n return tab;\r\n }\r\n\r\n public onTabSelectionChange(e: TitleClickEvent) {\r\n //this.lastTabIndex = e.itemIndex;\r\n if (e.itemData.title === 'Clients' || e.itemData.title === 'Patients' || e.itemData.title === 'Physicians') {\r\n this.isLoading = this.isBackgroundLoading;\r\n } else {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public onContentReady() {\r\n if (this.lastClientsSelected && this.lastClientsSelected.length > 0) {\r\n this.clientsOnlyForEdit = this.lastClientsSelected;\r\n }\r\n if (this.lastPhysiciansSelected && this.lastPhysiciansSelected.length > 0) {\r\n this.physiciansOnlyForEdit = this.lastPhysiciansSelected;\r\n }\r\n if (this.lastPatientsSelected && this.lastPatientsSelected.length > 0) {\r\n this.patientsOnlyForEdit = this.lastPatientsSelected;\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n this.isBackgroundLoading = true;\r\n if (this.user === undefined) {\r\n this.user = {role: [], data: {}, active: true} as any;\r\n }\r\n\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n this.isPhoneLandscape = this.screen.sizes['screen-small'];\r\n if (this.tab) {\r\n this.tabIndex = this.lastTabIndex;\r\n }\r\n });\r\n\r\n this.waitByUser();\r\n }\r\n\r\n public waitByUser() {\r\n this.authenticatedUser = this.fusionAuth.Profile;\r\n if (this.authenticatedUser) {\r\n this.authenticatedRole = this.authenticatedUser ? this.authenticatedUser.registrations[0].roles[0] : '';\r\n\r\n if (this.authenticatedRole === 'Client Admin') {\r\n this.physicians.next(new DataSource({store: this.physicianService.customStoreByClientsIds(this.authenticatedUser.data.clients, this.physicians)}));\r\n this.clients.next(new DataSource({store: this.clientService.customStoreFilteredByClientIds(this.authenticatedUser.data.clients, this.clients)}));\r\n this.patients.next(new DataSource({store: this.patientService.store(this.authenticatedUser.data.clients, this.patients)}));\r\n } else {\r\n this.physicians.next(new DataSource({store: this.physicianService.customStoreByClientsIds([], this.physicians)}));\r\n this.clients.next(new DataSource({store: this.clientService.store(this.clients)}));\r\n this.patients.next(new DataSource({store: this.patientService.store([], this.patients)}));\r\n }\r\n\r\n this.isBackgroundLoading = false;\r\n this.isLoading = false;\r\n } else {\r\n setTimeout(() => {\r\n this.waitByUser();\r\n }, 1000);\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n /*if (changes.formVisible && changes.formVisible.currentValue) {\r\n of(null)\r\n .pipe(debounceTime(500), take(1))\r\n .subscribe(() => {\r\n if (this.emailControl) {\r\n this.emailControl.instance().focus();\r\n }\r\n });\r\n }*/\r\n\r\n if (changes.formVisible && changes.formVisible.currentValue && this.user !== undefined) {\r\n this.isBackgroundLoading = true;\r\n //TODO FIX THIS\r\n forkJoin(this.clientService.getClientsByIds(this.user.data.clients),\r\n this.physicianService.getByIds(this.user.data.physicians),\r\n this.patientService.getByIds(this.user.data.patients),\r\n )\r\n .pipe(take(1))\r\n .subscribe({\r\n next: value => {\r\n this.clientsOnlyForEdit = value[0];\r\n this.physiciansOnlyForEdit = value[1];\r\n this.patientsOnlyForEdit = value[2];\r\n },\r\n\r\n complete: () => {\r\n this.isBackgroundLoading = false;\r\n this.isLoading = false;\r\n },\r\n });\r\n }\r\n }\r\n\r\n public ready(e: ReadyEvent) {\r\n this.emailControl = e.component;\r\n }\r\n\r\n public roleChanged(event: ValueChangedEvent) {\r\n if (this.user) {\r\n this.user.role = event.value;\r\n if (this.user.registrations) {\r\n this.user.registrations\r\n .filter(r => r.applicationId === environment.fusionAuth.applicationId)\r\n .forEach(r => r.roles = [event.value]);\r\n }\r\n }\r\n }\r\n\r\n public clear() {\r\n this.user = {role: [], data: {}, active: true} as any;\r\n }\r\n\r\n public close() {\r\n this.clear();\r\n this.clearDataSelected();\r\n this.formSubmitted.next();\r\n }\r\n\r\n private clearDataSelected() {\r\n this.lastClientsSelected = [];\r\n this.lastPatientsSelected = [];\r\n this.lastPhysiciansSelected = [];\r\n setTimeout(() => {\r\n this.form?.instance.resetValues();\r\n ValidationEngine.resetGroup('userData');\r\n }, 1500);\r\n }\r\n\r\n public submit(event: any): void {\r\n event.preventDefault();\r\n\r\n const formResult = ValidationEngine.validateGroup('userData');\r\n const clientSelected = (this.user?.role === 'Client Basic' || this.user?.role === 'Client Admin') &&\r\n (!this.user.data || !this.user.data.clients || this.user.data.clients.length === 0);\r\n const patientSelected = this.user?.role === 'Patient' && (!this.user.data || !this.user.data.patients || this.user.data.patients.length === 0);\r\n const physicianSelected = this.user?.role === 'Physician' && (!this.user.data || !this.user.data.physicians || this.user.data.physicians.length === 0);\r\n\r\n if (!formResult.isValid || clientSelected || patientSelected || physicianSelected) {\r\n if (clientSelected) {\r\n this.notifyError('Please select a client');\r\n } else if (patientSelected) {\r\n this.notifyError('Please select a patient');\r\n } else if (physicianSelected) {\r\n this.notifyError('Please select a physician');\r\n }\r\n return;\r\n }\r\n\r\n if (this.user?.id) {\r\n this.createOrUpdateUser();\r\n } else {\r\n this.fusionAuthManagement.existUser(this.user?.email as string).pipe(take(1)).subscribe(result => {\r\n if (result) {\r\n this.notifyError('Email in use');\r\n } else {\r\n this.createOrUpdateUser();\r\n }\r\n });\r\n }\r\n }\r\n\r\n private createOrUpdateUser() {\r\n if (!this.user) return;\r\n const username = this.user.id ? this.user?.username : this.user.email.split('@')[0] + (Math.floor(Math.random() * (99999 - 10000)) + 10000);\r\n this.user.username = username;\r\n\r\n switch (this.user.role) {\r\n case 'Patient':\r\n this.user.data = {...this.user.data, clients: [], patients: this.user.data.patients, physicians: []};\r\n break;\r\n case 'Physician':\r\n this.user.data = {...this.user.data, clients: [], patients: [], physicians: this.user.data.physicians};\r\n break;\r\n case 'Superuser':\r\n this.user.data = {...this.user.data, clients: [], patients: [], physicians: []};\r\n break;\r\n default:\r\n this.user.data = {...this.user.data, clients: this.user.data.clients, patients: [], physicians: []};\r\n break;\r\n }\r\n\r\n const request: RegistrationRequest = {\r\n user: this.user,\r\n registration: {\r\n applicationId: environment.fusionAuth.applicationId,\r\n roles: [this.user.role],\r\n username,\r\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\r\n },\r\n };\r\n\r\n this.isLoading = true;\r\n if (this.user.id) {\r\n this.fusionAuthManagement\r\n .updateUser(this.user.id, request)\r\n .pipe(tap(() => (this.isLoading = !this.isLoading)))\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === StatusCodes.CREATED) {\r\n notify('User has been updated.', 'success');\r\n this.clearDataSelected();\r\n this.formSubmitted.emit(response.body);\r\n }\r\n });\r\n } else {\r\n this.fusionAuthManagement\r\n .createUser(request)\r\n .pipe(tap(() => (this.isLoading = !this.isLoading)))\r\n .pipe(take(1))\r\n .subscribe(response => {\r\n if (response.status === StatusCodes.CREATED) {\r\n notify('A notification has been sent to created user\\'s email.', 'success');\r\n this.clearDataSelected();\r\n this.formSubmitted.emit(response.body);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private notifyError(message: string): void {\r\n notify({\r\n message,\r\n width: 400,\r\n position: {\r\n my: 'bottom center',\r\n at: 'bottom center',\r\n of: '#toast',\r\n offset: '0 0',\r\n },\r\n }, 'error', 1000);\r\n }\r\n\r\n public clientsGlassChanged(selectedClients: Client[]) {\r\n if(!this.user) return;\r\n this.lastClientsSelected = selectedClients;\r\n this.user.data.clients = selectedClients.map(c => c.id);\r\n }\r\n\r\n public patientsGlassChanged(selectedPatients: Patient[]) {\r\n if(!this.user) return;\r\n this.lastPatientsSelected = selectedPatients;\r\n this.user.data.patients = selectedPatients.map(p => p.id);\r\n }\r\n\r\n public physiciansGlassChanged(selectedPhysicians: Physician[]) {\r\n if(!this.user) return;\r\n this.lastPhysiciansSelected = selectedPhysicians;\r\n this.user.data.physicians = selectedPhysicians.map(p => p.id);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.roles?.pipe(take(1)).subscribe(roles => {\r\n switch (this.fusionAuth.Profile.role) {\r\n case 'Client Admin':\r\n this.selectorRoles?.push(\r\n ...roles.filter(\r\n r => r.name === 'Patient' ||\r\n r.name === 'Client Basic',\r\n ),\r\n );\r\n break;\r\n case 'Superuser':\r\n this.selectorRoles?.push(...roles);\r\n break;\r\n }\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n}\r\n","
\r\n
\r\n

Users

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ parseDate(cellInfo.data.lastLoginInstant) }}\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n 0\"\r\n icon=\"edit\"\r\n label=\"Edit\"\r\n [index]=\"1\"\r\n (onClick)=\"sendToEdit(selectedRowData[0])\">\r\n\r\n 0\"\r\n icon=\"trash\"\r\n label=\"Delete\"\r\n [index]=\"2\"\r\n (onClick)=\"remove(selectedRowData[0].id)\">\r\n\r\n 0\"\r\n icon=\"fa fa-repeat\"\r\n label=\"Resend\"\r\n [index]=\"3\"\r\n (onClick)=\"resendEmail(selectedRowData[0].email)\">\r\n\r\n\r\n
\r\n \r\n
\r\n","import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\r\nimport {DxDataGridComponent} from 'devextreme-angular';\r\nimport config from 'devextreme/core/config';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport {confirm} from 'devextreme/ui/dialog';\r\nimport notify from 'devextreme/ui/notify';\r\nimport repaintFloatingActionButton from 'devextreme/ui/speed_dial_action/repaint_floating_action_button';\r\nimport * as Moment from 'moment-timezone';\r\nimport {BehaviorSubject, Subject} from 'rxjs';\r\nimport {take, takeUntil} from 'rxjs/operators';\r\nimport {Role, User} from 'src/app/shared/models/fusion-auth';\r\nimport {FusionAuthManagementService, FusionAuthService} from '../../../shared/services/fusion-auth';\r\nimport {ScreenService} from '../../../shared/services/general';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport {SelectionChangedEvent, ToolbarPreparingEvent} from \"devextreme/ui/data_grid\";\r\n\r\n@Component({\r\n selector: 'app-user',\r\n templateUrl: './user.component.html',\r\n styleUrls: ['./user.component.scss'],\r\n})\r\nexport class UserComponent implements OnInit, OnDestroy {\r\n @ViewChild(DxDataGridComponent, {static: true}) public grid?: DxDataGridComponent;\r\n public store: BehaviorSubject = new BehaviorSubject(null as unknown as DataSource);\r\n public roles: BehaviorSubject = new BehaviorSubject([] as Role[]);\r\n public formVisible = false;\r\n public selectedUser?: User;\r\n public users?: CustomStore;\r\n public isPhoneOrTablet: boolean = false;\r\n public isPhone: boolean = false;\r\n public selectedRowData: any[] = [];\r\n public onDestroy$: Subject = new Subject();\r\n\r\n constructor(private fusionAuthManagement: FusionAuthManagementService, public fusionAuth: FusionAuthService,\r\n private screen: ScreenService) {\r\n }\r\n\r\n public ngOnInit() {\r\n const role = this.fusionAuth.Profile.registrations[0].roles[0];\r\n this.store.next(new DataSource({\r\n store: role === 'Client Admin' ? this.fusionAuthManagement.getUsers(this.fusionAuth.Profile.data.clients, this.store)\r\n : this.fusionAuthManagement.getUsers([], this.store)\r\n }));\r\n\r\n this.fusionAuthManagement.getApplicationRoles()\r\n .pipe(take(1))\r\n .subscribe(r => {\r\n if (role === 'Client Admin') {\r\n r = r.filter(x => x.name !== 'Superuser');\r\n r = r.filter(x => x.name !== 'Physician');\r\n r = r.filter(x => x.name !== 'Patient');\r\n }\r\n this.roles.next(r);\r\n });\r\n\r\n this.responsiveValues();\r\n this.screen.changed.pipe(takeUntil(this.onDestroy$)).subscribe(() => {\r\n this.responsiveValues();\r\n });\r\n }\r\n\r\n private responsiveValues() {\r\n this.isPhoneOrTablet = this.screen.sizes['screen-x-small'] || this.screen.sizes['screen-small'] || this.screen.sizes['screen-tablet'];\r\n this.isPhone = this.screen.sizes['screen-x-small'];\r\n\r\n const offset = this.isPhone ? '-15 75' : '-25 75';\r\n config({\r\n floatingActionButtonConfig: {\r\n icon: 'rowfield',\r\n shading: true,\r\n direction: 'down',\r\n position: {\r\n of: 'body',\r\n my: 'right top',\r\n at: 'right top',\r\n offset,\r\n },\r\n },\r\n });\r\n repaintFloatingActionButton();\r\n }\r\n\r\n public onToolbarPreparing(e: ToolbarPreparingEvent) {\r\n e?.toolbarOptions?.items?.unshift({\r\n location: 'after',\r\n widget: 'dxButton',\r\n options: {\r\n icon: 'plus',\r\n text: 'Add',\r\n onClick: () => (this.formVisible = true),\r\n },\r\n });\r\n }\r\n\r\n public sendToEdit(user: User) {\r\n this.selectedUser = user;\r\n this.formVisible = true;\r\n }\r\n\r\n public submitted() {\r\n this.formVisible = false;\r\n this.grid?.instance.getDataSource()\r\n .reload()\r\n .then(() => {\r\n this.grid?.instance.clearSelection();\r\n });\r\n }\r\n\r\n public async remove(key: string) {\r\n if (await confirm('Do you want to delete the record?', 'Delete')) {\r\n this.fusionAuthManagement.deleteUser(key)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.grid?.instance.getDataSource().reload().then(() => {\r\n this.grid?.instance.refresh().then(() => {\r\n this.grid?.instance.clearSelection();\r\n });\r\n });\r\n });\r\n }\r\n }\r\n\r\n public parseDate(date: any): string {\r\n if (date === null) {\r\n return 'Never';\r\n } else {\r\n const tz = Moment.tz.guess();\r\n return Moment.utc(date).tz(tz).format('LLLL');\r\n }\r\n }\r\n\r\n public resendEmail(email: string) {\r\n this.fusionAuth.forgotPassword({\r\n loginId: email,\r\n sendForgotPasswordEmail: true,\r\n })\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n notify('A notification has been sent to email ' + email, 'info', 3000);\r\n }, (error) => {\r\n notify(error.message, 'error', 3000);\r\n });\r\n }\r\n\r\n public itemsSelected(e: SelectionChangedEvent) {\r\n this.selectedRowData = e.selectedRowsData;\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","import { NgModule } from '@angular/core';\r\nimport {PreloadAllModules, RouterModule, Routes} from '@angular/router';\r\nimport { DxDataGridModule } from 'devextreme-angular';\r\nimport { DxFormModule } from 'devextreme-angular';\r\nimport { EmptyLayoutComponent, MainLayoutComponent } from './layouts';\r\nimport {\r\n ContactUsComponent,\r\n LoadingComponent,\r\n LoginComponent,\r\n PasswordRecoveryComponent,\r\n PatientSignUpComponent,\r\n PrivacyComponent,\r\n SupplyRequestComponent,\r\n TermsConditionsComponent,\r\n UserComponent,\r\n} from './pages';\r\nimport { FusionAuthGuard } from './shared/guard';\r\nimport {OrderExportComponent} from \"./modules/features/result-export/pages/order-export/order-export.component\";\r\nimport {ResultEntryAccessGuard} from \"./modules/features/result-entry/guards/result-entry-access.guard\";\r\n\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmptyLayoutComponent,\r\n children: [\r\n {\r\n path: 'auth-callback',\r\n component: LoadingComponent,\r\n },\r\n {\r\n path: 'login',\r\n component: LoginComponent,\r\n },\r\n {\r\n path: 'password-recovery',\r\n component: PasswordRecoveryComponent,\r\n },\r\n {\r\n path: 'patient-sign-up',\r\n component: PatientSignUpComponent,\r\n },\r\n {\r\n path: '',\r\n redirectTo: 'login',\r\n pathMatch: 'full',\r\n },\r\n ],\r\n },\r\n {\r\n path: 'secured',\r\n component: MainLayoutComponent,\r\n children: [\r\n {\r\n path: 'support',\r\n children: [\r\n {\r\n path: 'contact-us',\r\n component: ContactUsComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n },\r\n {\r\n path: 'supply-request',\r\n component: SupplyRequestComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic'] },\r\n }\r\n ],\r\n },\r\n {\r\n path: 'terms&conditions',\r\n component: TermsConditionsComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n },\r\n {\r\n path: 'privacy',\r\n component: PrivacyComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin', 'Client Basic', 'Patient', 'Physician'] },\r\n },\r\n { path: 'results', loadChildren: () => import('./modules/features/results/results.module').then(m => m.ResultsModule) },\r\n { path: 'result-entry', loadChildren: () => import('./modules/features/result-entry/result-entry.module').then(m => m.ResultEntryModule) },\r\n { path: 'result-export', loadComponent: () => import('./modules/features/result-export/pages/order-export/order-export.component').then(mod => mod.OrderExportComponent), canActivate: [FusionAuthGuard], data: { roles: ['Superuser', 'Client Admin', 'Client Basic'] } },\r\n { path: 'requisitions', loadChildren: () => import('./modules/features/requisitions/requisitions.module').then(m => m.RequisitionsModule) },\r\n { path: 'standing-orders', loadChildren: () => import('./modules/features/standing-orders/standing-orders.module').then(m => m.StandingOrdersModule) },\r\n { path: 'patients', loadChildren: () => import('./modules/features/patient/patient.module').then(m => m.PatientModule) },\r\n {\r\n path: 'system',\r\n children: [\r\n {\r\n path: 'users',\r\n component: UserComponent,\r\n canActivate: [FusionAuthGuard],\r\n data: { roles: ['Superuser', 'Client Admin'] },\r\n },\r\n ],\r\n },\r\n ],\r\n canActivate: [FusionAuthGuard],\r\n },\r\n {\r\n path: '**',\r\n redirectTo: 'secured/results/lab',\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }), DxDataGridModule, DxFormModule],\r\n exports: [RouterModule],\r\n declarations: [],\r\n})\r\nexport class AppRoutingModule {\r\n}\r\n","export enum SentryBreadcrumbCategory {\r\n config = 'configuration',\r\n serviceWorker = 'service-worker',\r\n serviceWorkerUpdate = 'service-worker-update'\r\n}\r\n","import {ApplicationRef, Component, HostListener, OnInit} from '@angular/core';\r\nimport {DomSanitizer, Title} from '@angular/platform-browser';\r\nimport {Router} from '@angular/router';\r\nimport {SwUpdate, VersionReadyEvent} from '@angular/service-worker';\r\nimport {Store} from '@ngrx/store';\r\nimport {filter, take} from 'rxjs/operators';\r\nimport {alert} from 'devextreme/ui/dialog';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\n\r\nimport {LogOut} from 'src/app/stores/actions/fusion-auth.actions';\r\nimport {AppState} from 'src/app/stores/app.state';\r\nimport {FusionAuthService} from './shared/services/fusion-auth';\r\nimport {AppInfoService} from './shared/services/general';\r\nimport {LabSettingsService} from './shared/services/ocl';\r\nimport {SentryBreadcrumbCategory} from \"../enum/sentry-breadcrumb-category\";\r\nimport themes from \"devextreme/ui/themes\";\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n})\r\nexport class AppComponent implements OnInit {\r\n\r\n constructor(\r\n private titleService: Title,\r\n private store: Store,\r\n private laboratorySettings: LabSettingsService,\r\n public applicationInfo: AppInfoService,\r\n private fusionAuth: FusionAuthService,\r\n private swUpdate: SwUpdate,\r\n private sanitizer: DomSanitizer,\r\n ) {\r\n themes.current(window.localStorage.getItem('dx-theme') || \"generic.light.compact\");\r\n }\r\n\r\n\r\n @HostListener('contextmenu', ['$event'])\r\n public onRightClick(event: Event) {\r\n event.preventDefault();\r\n }\r\n\r\n @HostListener('window:keydown', ['$event'])\r\n public onKeyDown(event: KeyboardEvent) {\r\n if ((event.metaKey || event.ctrlKey) && event.key === 's') {\r\n event.preventDefault();\r\n alert('This action is not allowed.', 'Error').then();\r\n }\r\n }\r\n\r\n private serviceWorkerInit() {\r\n if ('serviceWorker' in navigator) {\r\n this.swUpdate.versionUpdates.pipe(filter(x => x.type === 'VERSION_READY'))\r\n .subscribe(event => {\r\n Sentry.setContext(SentryBreadcrumbCategory.serviceWorkerUpdate, {\r\n currentVersion: (event as VersionReadyEvent).currentVersion.hash,\r\n versionAvailable: (event as VersionReadyEvent).latestVersion.hash\r\n });\r\n });\r\n this.swUpdate.versionUpdates.pipe(filter(x => x.type === 'VERSION_READY'))\r\n .subscribe(event => {\r\n Sentry.setContext(SentryBreadcrumbCategory.serviceWorkerUpdate, {\r\n currentVersion: (event as VersionReadyEvent).currentVersion.hash,\r\n versionAvailable: (event as VersionReadyEvent).latestVersion.hash\r\n });\r\n });\r\n\r\n setInterval(() => {\r\n try {\r\n if (this.swUpdate.isEnabled) {\r\n this.swUpdate.checkForUpdate()\r\n .then(() =>\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.serviceWorker,\r\n message: 'Service worker updated the application.',\r\n level: 'info',\r\n }))\r\n .catch(e => {\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.serviceWorker,\r\n message: 'There was an error updating the application.',\r\n level: 'error',\r\n });\r\n Sentry.captureException(e);\r\n location.reload();\r\n });\r\n }\r\n } catch (e) {\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.serviceWorker,\r\n message: 'There was an error updating the application.',\r\n level: 'error',\r\n });\r\n Sentry.captureException(e);\r\n location.reload();\r\n }\r\n }, 5 * 60 * 1000);\r\n\r\n setInterval(() => {\r\n if (this.fusionAuth.hasBeenLogged() === 'true') {\r\n alert('Your session expired. You must login to continue.', 'Logged out').then(() => {\r\n this.fusionAuth.clearHasBeenLogged();\r\n this.store.dispatch(new LogOut());\r\n });\r\n }\r\n }, 15000);\r\n\r\n this.swUpdate.versionUpdates\r\n .pipe(filter((x) => x.type === 'VERSION_READY'))\r\n .subscribe(() => {\r\n alert(\r\n 'A new version was downloaded, this window will refresh in a few seconds.',\r\n 'New Web Portal'\r\n ).then();\r\n setTimeout(\r\n () => this.swUpdate.activateUpdate().then(() => location.reload()),\r\n 15000\r\n );\r\n });\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.serviceWorkerInit();\r\n\r\n this.laboratorySettings.getSettings()\r\n .pipe(take(1))\r\n .subscribe(settings => {\r\n this.applicationInfo.logo = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image;base64,${settings.logo}`) as string;\r\n this.applicationInfo.lab = settings.name;\r\n this.applicationInfo.title = `${settings.name} - LIS Portal`;\r\n this.applicationInfo.labAddress = settings.address;\r\n this.applicationInfo.email = settings.email;\r\n this.applicationInfo.labPhone = settings.phone;\r\n this.titleService.setTitle(this.applicationInfo.title);\r\n });\r\n }\r\n\r\n @HostListener('document:mousemove')\r\n public onMouseMove() {\r\n localStorage.setItem('idleTime', '0');\r\n }\r\n\r\n @HostListener('document:keypress')\r\n public onKeyPress() {\r\n localStorage.setItem('idleTime', '0');\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n","import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {StatusCodes} from 'http-status-codes';\r\nimport {Observable, throwError} from 'rxjs';\r\nimport {catchError, flatMap, tap} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../services/fusion-auth';\r\nimport {StorageService} from '../services/general';\r\nimport {handleJWTRefresh} from \"./common\";\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FusionAuthRefreshTokenInterceptorService implements HttpInterceptor {\r\n constructor(\r\n private router: Router,\r\n private storage: StorageService,\r\n private fusionAuthService: FusionAuthService,\r\n ) {\r\n }\r\n\r\n public intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n const token = this.fusionAuthService.getToken();\r\n\r\n if (token !== undefined && token !== null && token !== '') {\r\n req = req.clone({\r\n setHeaders: {\r\n Authorization: 'JWT ' + token,\r\n },\r\n });\r\n }\r\n\r\n return next.handle(req).pipe(\r\n // @ts-ignore\r\n catchError(err => {\r\n if (err.status === StatusCodes.UNAUTHORIZED && this.router.url !== '/login' && this.fusionAuthService.getRefreshToken()) {\r\n return handleJWTRefresh(this.fusionAuthService, this.router, req, next);\r\n }\r\n\r\n this.router.navigateByUrl('/login').then();\r\n\r\n return throwError(err);\r\n }),\r\n );\r\n }\r\n}\r\n","import {\r\n HttpErrorResponse,\r\n HttpEvent,\r\n HttpHandler,\r\n HttpInterceptor,\r\n HttpRequest,\r\n HttpResponse, HttpStatusCode\r\n} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {alert} from 'devextreme/ui/dialog';\r\nimport notify from 'devextreme/ui/notify';\r\nimport {StatusCodes} from 'http-status-codes';\r\nimport {Observable, throwError} from 'rxjs';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport {catchError, flatMap, tap} from 'rxjs/operators';\r\nimport {FusionAuthService} from '../services/fusion-auth';\r\nimport {StorageService} from '../services/general';\r\nimport {handleJWTRefresh} from \"./common\";\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class GlobalHttpInterceptorService implements HttpInterceptor {\r\n constructor(\r\n private router: Router,\r\n private storage: StorageService,\r\n private fusionAuthService: FusionAuthService,\r\n ) {\r\n }\r\n\r\n public intercept(req: HttpRequest, next: HttpHandler) {\r\n return next.handle(req).pipe(\r\n // @ts-ignore\r\n catchError(error => {\r\n Sentry.setContext('global-http-interceptor', {\r\n ...req\r\n });\r\n Sentry.captureException(error);\r\n\r\n if (!(error instanceof HttpErrorResponse)) {\r\n notify('We are having trouble to succeed your request!', 'error');\r\n return throwError(error);\r\n }\r\n if (!navigator.onLine) {\r\n notify('It seems that your internet connection it\\'s not stable!', 'error');\r\n return throwError(error);\r\n }\r\n\r\n switch (error.status) {\r\n case 0:\r\n notify('We have lost communication with our servers!', 'error');\r\n break;\r\n case StatusCodes.BAD_REQUEST:\r\n notify('There was a validation error!', 'error');\r\n break;\r\n case StatusCodes.INTERNAL_SERVER_ERROR:\r\n notify('Oops, an internal error occurred!', 'error');\r\n break;\r\n case StatusCodes.REQUEST_TIMEOUT:\r\n case StatusCodes.GATEWAY_TIMEOUT:\r\n notify('It seems that you are having problems communicating with our servers!', 'error');\r\n break;\r\n case StatusCodes.NOT_FOUND:\r\n if (this.router.url !== '/login') {\r\n notify('No record found!', 'error');\r\n } else {\r\n notify('The user and password combination was not recognized.', 'error');\r\n }\r\n break;\r\n case StatusCodes.CONFLICT:\r\n notify('The record already exists!', 'error');\r\n break;\r\n case StatusCodes.SERVICE_UNAVAILABLE:\r\n notify('The record couldn\\'t be created, please try later.', 'error');\r\n break;\r\n case StatusCodes.UNAUTHORIZED:\r\n const token = this.fusionAuthService.getToken();\r\n if (token) {\r\n req = req.clone({\r\n setHeaders: {\r\n Authorization: 'JWT ' + token,\r\n },\r\n });\r\n }\r\n if (this.router.url !== '/login' && this.fusionAuthService.getRefreshToken()) {\r\n return this.fusionAuthService.exchangeRefreshTokenForJWT().pipe(\r\n tap((response: any) => {\r\n if (response.status === HttpStatusCode.Ok) {\r\n req = req.clone({\r\n setHeaders: {\r\n Authorization: 'JWT ' + response.body.token,\r\n },\r\n });\r\n\r\n return next.handle(req);\r\n } else {\r\n return this.router.navigateByUrl('/login');\r\n }\r\n }),\r\n );\r\n }\r\n break;\r\n default:\r\n alert('Sorry, we are having problems processing your request, the page will reload in a few seconds.', 'Critical Error').then();\r\n setTimeout(() => window.location.reload(), 10000);\r\n break;\r\n }\r\n\r\n return throwError(error);\r\n }),\r\n );\r\n }\r\n}\r\n","import {ErrorHandler, Injectable} from '@angular/core';\r\nimport {confirm} from 'devextreme/ui/dialog';\r\nimport {throwError} from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class GlobalInterceptorService implements ErrorHandler {\r\n public handleError(error: any): void {\r\n if (error.code === 'NS_ERROR_STORAGE_IOERR' || error.name === 'NS_ERROR_STORAGE_IOERR') {\r\n confirm('A known error occurred, do you want to see how to fix it?', 'Error')\r\n .then(response => {\r\n if (!response) {\r\n return throwError(error);\r\n }\r\n window.location.href = 'https://ocllis.atlassian.net/wiki/x/AoDtD';\r\n return;\r\n });\r\n }\r\n if (/Loading chunk [\\d]+ failed/.test(error.message) || /Unexpected token '<'/.test(error.message)) {\r\n location.reload();\r\n return;\r\n }\r\n throwError(error);\r\n }\r\n}\r\n","import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Observable} from 'rxjs';\r\nimport {FusionAuthService} from '../services/fusion-auth';\r\n\r\n@Injectable()\r\nexport class HttpHeaderInterceptor implements HttpInterceptor {\r\n constructor(private fusionAuthService: FusionAuthService) {\r\n }\r\n\r\n public intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n const jwtToken = this.fusionAuthService.getToken();\r\n let headers = {};\r\n\r\n if (request.headers.has('enctype')) {\r\n for (const key of request.headers.keys()) {\r\n headers = {\r\n ...headers,\r\n [key]: request.headers.get(key),\r\n }\r\n }\r\n } else {\r\n headers = {\r\n 'content-type': 'application/json',\r\n };\r\n }\r\n\r\n if (jwtToken !== null && jwtToken !== undefined && jwtToken !== '') {\r\n headers = {...headers, authorization: `JWT ${jwtToken}`} as any\r\n }\r\n\r\n request = request.clone({\r\n setHeaders: headers,\r\n withCredentials: false,\r\n });\r\n\r\n return next.handle(request);\r\n }\r\n}\r\n","import {HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CacheInterceptorService implements HttpInterceptor {\r\n\r\n public intercept(req: HttpRequest, next: HttpHandler) {\r\n req.headers.set('Cache-Control', 'no-cache');\r\n req.headers.set('Pragma', 'no-cache');\r\n req.headers.set('Expires', 'Sat, 01 Jan 2000 00:00:00 GMT');\r\n\r\n return next.handle(req);\r\n }\r\n}\r\n","import {HttpErrorResponse, HttpResponse} from '@angular/common/http';\r\nimport {Injectable} from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {Actions, createEffect, ofType} from '@ngrx/effects';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport {Observable, of} from 'rxjs';\r\nimport {catchError, map, switchMap, tap} from 'rxjs/operators';\r\nimport {LoginResponse} from 'src/app/shared/models/fusion-auth';\r\nimport {FusionAuthService} from '../../shared/services/fusion-auth';\r\nimport {StorageService} from '../../shared/services/general';\r\nimport {FusionAuthActionTypes, LogIn, LogInFailure, LogInSuccess} from '../actions/fusion-auth.actions';\r\nimport {SentryBreadcrumbCategory} from \"../../../enum/sentry-breadcrumb-category\";\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FusionAuthEffects {\r\n\r\n public logIn: Observable = createEffect(() => this.actions.pipe(\r\n ofType(FusionAuthActionTypes.LOGIN),\r\n map((action: LogIn) => action.payload),\r\n switchMap(payload => {\r\n return this.fusionAuthService.login(payload).pipe(\r\n map((response: HttpResponse) => {\r\n return new LogInSuccess(response.body as LoginResponse);\r\n }),\r\n catchError((error: HttpErrorResponse) => {\r\n return of(new LogInFailure({ error }));\r\n }),\r\n );\r\n }),\r\n ));\r\n\r\n public logInSuccess: Observable = createEffect(() => this.actions.pipe(\r\n ofType(FusionAuthActionTypes.LOGIN_SUCCESS),\r\n tap(async () => {\r\n Sentry.configureScope((scope) => {\r\n const value = this.storage.get('user', 'auth');\r\n if (value) {\r\n const user = JSON.parse(value);\r\n\r\n scope.setUser({\r\n id: user.id,\r\n email: user.email\r\n });\r\n\r\n Sentry.setContext('user-data', {\r\n data: user.data,\r\n registrations: JSON.stringify(user.registrations)\r\n });\r\n }\r\n });\r\n await this.router.navigate(['/secured/results/lab'], {queryParams: {isUserLogged: true}});\r\n }),\r\n ), {dispatch: false});\r\n\r\n\r\n public logInFailure: Observable = createEffect(() => this.actions.pipe(\r\n ofType(FusionAuthActionTypes.LOGIN_FAILURE),\r\n tap((error: HttpErrorResponse) => {\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.config,\r\n message: 'There was an error logging out the user.',\r\n level: 'error',\r\n });\r\n Sentry.captureException(error.error);\r\n }),\r\n ), {dispatch: false});\r\n\r\n\r\n public logOut: Observable = createEffect(() => this.actions.pipe(\r\n ofType(FusionAuthActionTypes.LOGOUT),\r\n tap(() => {\r\n return this.fusionAuthService.logout();\r\n }),\r\n tap(() => this.router.navigateByUrl('/login')),\r\n ), {dispatch: false});\r\n\r\n constructor(\r\n private fusionAuthService: FusionAuthService,\r\n private actions: Actions,\r\n private storage: StorageService,\r\n private router: Router,\r\n ) { }\r\n}\r\n","import { LayoutModule } from '@angular/cdk/layout';\r\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\r\nimport { APP_INITIALIZER, ErrorHandler, NgModule } from '@angular/core';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { ServiceWorkerModule } from '@angular/service-worker';\r\nimport { EffectsModule } from '@ngrx/effects';\r\nimport { StoreModule } from '@ngrx/store';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport { DxSwitchModule, DxTagBoxModule, DxToastModule } from 'devextreme-angular';\r\nimport { DxAccordionModule } from 'devextreme-angular';\r\nimport { DxButtonModule } from 'devextreme-angular';\r\nimport { DxButtonGroupModule } from 'devextreme-angular';\r\nimport { DxChartModule } from 'devextreme-angular';\r\nimport { DxCheckBoxModule } from 'devextreme-angular';\r\nimport { DxDataGridModule } from 'devextreme-angular';\r\nimport { DxDateBoxModule } from 'devextreme-angular';\r\nimport { DxDropDownBoxModule } from 'devextreme-angular';\r\nimport { DxDropDownButtonModule } from 'devextreme-angular';\r\nimport { DxFormModule } from 'devextreme-angular';\r\nimport { DxHtmlEditorModule } from 'devextreme-angular';\r\nimport { DxListModule } from 'devextreme-angular';\r\nimport { DxLoadIndicatorModule } from 'devextreme-angular';\r\nimport { DxLoadPanelModule } from 'devextreme-angular';\r\nimport { DxLookupModule } from 'devextreme-angular';\r\nimport { DxNumberBoxModule } from 'devextreme-angular';\r\nimport { DxPopoverModule } from 'devextreme-angular';\r\nimport { DxPopupModule } from 'devextreme-angular';\r\nimport { DxRadioGroupModule } from 'devextreme-angular';\r\nimport { DxScrollViewModule } from 'devextreme-angular';\r\nimport { DxSelectBoxModule } from 'devextreme-angular';\r\nimport { DxSpeedDialActionModule } from 'devextreme-angular';\r\nimport { DxTabPanelModule } from 'devextreme-angular';\r\nimport { DxTextAreaModule } from 'devextreme-angular';\r\nimport { DxTextBoxModule } from 'devextreme-angular';\r\nimport { DxToolbarModule } from 'devextreme-angular';\r\nimport { DxTooltipModule } from 'devextreme-angular';\r\nimport { DxTreeListModule } from 'devextreme-angular';\r\nimport { DxValidatorModule } from 'devextreme-angular';\r\nimport config from 'devextreme/core/config';\r\nimport { CookieService } from 'ngx-cookie-service';\r\nimport { environment } from '../environments/environment';\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { AppComponent } from './app.component';\r\nimport {\r\n EmptyLayoutComponent,\r\n MainLayoutComponent,\r\n SideNavInnerToolbarModule,\r\n TopNavigationToolbarModule,\r\n} from './layouts';\r\nimport { EmptyLayoutFooterComponent } from './layouts/empty-layout/emty-layout-footer/empty-layout-footer.component';\r\nimport { SingleCardModule } from './modules/shared/components/single-card/single-card.component';\r\nimport { SharedModule } from './modules/shared/shared.module';\r\nimport {\r\n ContactUsComponent,\r\n LoadingComponent,\r\n LoginComponent,\r\n PasswordRecoveryComponent,\r\n PatientSignUpComponent,\r\n PrivacyComponent,\r\n SupplyRequestComponent,\r\n TermsConditionsComponent,\r\n UserComponent,\r\n UserFormComponent,\r\n} from './pages';\r\nimport {\r\n FooterModule,\r\n HeaderModule,\r\n} from './shared/components/layout';\r\nimport { UppercaseDirective } from './shared/directive/uppercase.directive';\r\nimport {\r\n GlobalHttpInterceptorService,\r\n GlobalInterceptorService,\r\n HttpHeaderInterceptor,\r\n} from './shared/interceptor';\r\nimport { CacheInterceptorService } from './shared/interceptor/cache-interceptor.service';\r\nimport { AppInfoService, AuthService, DateHelperService, ScreenService } from './shared/services/general';\r\nimport {\r\n RecentPatientService,\r\n} from './shared/services/ocl';\r\nimport { reducers } from './stores/app.state';\r\nimport { FusionAuthEffects } from './stores/effects/fusion-auth.effects';\r\nimport {NgIdleKeepaliveModule} from \"@ng-idle/keepalive\";\r\n//import {MomentModule} from \"angular2-moment\";\r\nimport { TrackCapsDirective } from './shared/directive/track-caps.directive';\r\nimport { Router } from '@angular/router';\r\nimport {MicToJsonService} from \"./shared/components/ocl/mic-to-json-button/mic-to-json.service\";\r\nimport {NgIdleModule} from \"@ng-idle/core\";\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n UppercaseDirective,\r\n LoadingComponent,\r\n UserComponent,\r\n UserFormComponent,\r\n EmptyLayoutComponent,\r\n MainLayoutComponent,\r\n LoginComponent,\r\n PasswordRecoveryComponent,\r\n TermsConditionsComponent,\r\n PrivacyComponent,\r\n ContactUsComponent,\r\n PatientSignUpComponent,\r\n SupplyRequestComponent,\r\n EmptyLayoutFooterComponent,\r\n TrackCapsDirective\r\n ],\r\n imports: [\r\n BrowserModule,\r\n LayoutModule,\r\n FlexLayoutModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n HttpClientModule,\r\n AppRoutingModule,\r\n SideNavInnerToolbarModule,\r\n TopNavigationToolbarModule,\r\n DxTextBoxModule,\r\n DxSelectBoxModule,\r\n DxValidatorModule,\r\n DxTreeListModule,\r\n DxPopupModule,\r\n DxDateBoxModule,\r\n DxHtmlEditorModule,\r\n DxButtonModule,\r\n DxTextAreaModule,\r\n DxAccordionModule,\r\n DxLookupModule,\r\n DxNumberBoxModule,\r\n DxChartModule,\r\n DxCheckBoxModule,\r\n DxTabPanelModule,\r\n DxFormModule,\r\n DxScrollViewModule,\r\n DxPopoverModule,\r\n DxListModule,\r\n DxTooltipModule,\r\n DxToolbarModule,\r\n DxLoadPanelModule,\r\n DxButtonGroupModule,\r\n DxLookupModule,\r\n DxSpeedDialActionModule,\r\n DxRadioGroupModule,\r\n DxDropDownButtonModule,\r\n DxDropDownBoxModule,\r\n DxLoadIndicatorModule,\r\n DxDataGridModule,\r\n DxTagBoxModule,\r\n DxSwitchModule,\r\n DxToastModule,\r\n FooterModule,\r\n HeaderModule,\r\n NgIdleKeepaliveModule.forRoot(),\r\n //NgIdleModule.forRoot(),\r\n //MomentModule,\r\n //@ts-ignore\r\n StoreModule.forRoot(reducers, {}),\r\n EffectsModule.forRoot([FusionAuthEffects]),\r\n ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),\r\n SharedModule,\r\n SingleCardModule,\r\n ServiceWorkerModule.register('ngsw-worker.js', {\r\n enabled: environment.production,\r\n registrationStrategy: 'registerWhenStable:30000'\r\n }),\r\n ],\r\n providers: [\r\n AuthService,\r\n ScreenService,\r\n AppInfoService,\r\n RecentPatientService,\r\n CookieService,\r\n {\r\n provide: ErrorHandler,\r\n useClass: GlobalInterceptorService,\r\n },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: CacheInterceptorService,\r\n multi: true,\r\n },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: GlobalHttpInterceptorService,\r\n multi: true,\r\n },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: HttpHeaderInterceptor,\r\n multi: true,\r\n }, {\r\n provide: APP_INITIALIZER,\r\n // tslint:disable-next-line:no-empty\r\n useFactory: () => () => { },\r\n //deps: [Sentry.TraceService],\r\n multi: true,\r\n },\r\n {\r\n provide: ErrorHandler,\r\n useValue: Sentry.createErrorHandler({\r\n showDialog: false,\r\n }),\r\n },\r\n {\r\n provide: Sentry.TraceService,\r\n deps: [Router],\r\n },\r\n ],\r\n exports: [\r\n ],\r\n bootstrap: [AppComponent],\r\n})\r\nexport class AppModule {\r\n constructor(trace: Sentry.TraceService) {\r\n config({\r\n forceIsoDateParsing: true,\r\n });\r\n }\r\n}\r\n","import {AppModule} from './app/app.module';\r\nimport {enableProdMode} from '@angular/core';\r\nimport {environment} from './environments/environment';\r\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic';\r\n\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport {Dedupe, ReportingObserver, ExtraErrorData, CaptureConsole, Debug, Offline} from '@sentry/integrations';\r\nimport {BrowserTracing} from '@sentry/browser';\r\nimport SentryRRWeb from \"@sentry/rrweb\";\r\n\r\nimport {SentryBreadcrumbCategory} from \"./enum/sentry-breadcrumb-category\";\r\n\r\nconst sentryBeforeSend = (event: Sentry.Event) => {\r\n let isNonErrorException = false;\r\n\r\n if (!event.exception) return null;\r\n if (!event.extra) return null;\r\n if (!event.extra.__serialized__) return null;\r\n\r\n if (event.exception.values && event.exception.values.length > 0 && event.exception.values[0].value) {\r\n isNonErrorException = event.exception.values[0].value.startsWith('Non-Error exception captured');\r\n\r\n if (isNonErrorException) {\r\n const {error, message} = event.extra.__serialized__ as any;\r\n\r\n let realErrMsg = error ? error.message : null;\r\n realErrMsg = realErrMsg || message;\r\n event.exception.values[0].value = realErrMsg;\r\n event.message = realErrMsg;\r\n }\r\n }\r\n\r\n return event;\r\n};\r\n\r\n\r\nif (environment.production) {\r\n Sentry.init({\r\n dsn: environment.sentry.dns,\r\n integrations: [\r\n new Dedupe(),\r\n new ExtraErrorData(),\r\n // new SentryRRWeb({\r\n // checkoutEveryNth: 100,\r\n // checkoutEveryNms: 15 * 60 * 1000,\r\n // maskAllInputs: false\r\n // }),\r\n new BrowserTracing({\r\n tracingOrigins: ['*'],\r\n routingInstrumentation: Sentry.routingInstrumentation,\r\n }),\r\n new Sentry.Integrations.Breadcrumbs({\r\n console: true,\r\n dom: true,\r\n fetch: true,\r\n history: true,\r\n sentry: true,\r\n xhr: true,\r\n }),\r\n ],\r\n tracesSampleRate: 0.2,\r\n attachStacktrace: true,\r\n autoSessionTracking: true,\r\n maxBreadcrumbs: 100,\r\n debug: true,\r\n release: 'ocl.web.portal@1.3.0',\r\n environment: !environment.production ? 'production' : 'testing',\r\n });\r\n enableProdMode();\r\n Sentry.setTag(\"rrweb.active\", \"yes\");\r\n}\r\n\r\nplatformBrowserDynamic().bootstrapModule(AppModule)\r\n .then(() => {\r\n if ('serviceWorker' in navigator && environment.production) {\r\n navigator.serviceWorker.register('ngsw-worker.js')\r\n .then(() => {\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.config,\r\n message: 'Service worker registered.',\r\n level: 'info',\r\n });\r\n })\r\n .catch((error: Error) => {\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.config,\r\n message: 'There was an error registering the service worker.',\r\n level: 'error',\r\n });\r\n Sentry.captureException(error);\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n Sentry.addBreadcrumb({\r\n category: SentryBreadcrumbCategory.config,\r\n message: 'There was an error mounting the application.',\r\n level: 'error',\r\n });\r\n Sentry.captureException(error);\r\n });\r\n","var map = {\n\t\"./af\": 58685,\n\t\"./af.js\": 58685,\n\t\"./ar\": 254,\n\t\"./ar-dz\": 4312,\n\t\"./ar-dz.js\": 4312,\n\t\"./ar-kw\": 32614,\n\t\"./ar-kw.js\": 32614,\n\t\"./ar-ly\": 18630,\n\t\"./ar-ly.js\": 18630,\n\t\"./ar-ma\": 28674,\n\t\"./ar-ma.js\": 28674,\n\t\"./ar-ps\": 46235,\n\t\"./ar-ps.js\": 46235,\n\t\"./ar-sa\": 49032,\n\t\"./ar-sa.js\": 49032,\n\t\"./ar-tn\": 24730,\n\t\"./ar-tn.js\": 24730,\n\t\"./ar.js\": 254,\n\t\"./az\": 53052,\n\t\"./az.js\": 53052,\n\t\"./be\": 60150,\n\t\"./be.js\": 60150,\n\t\"./bg\": 63069,\n\t\"./bg.js\": 63069,\n\t\"./bm\": 13466,\n\t\"./bm.js\": 13466,\n\t\"./bn\": 18516,\n\t\"./bn-bd\": 90557,\n\t\"./bn-bd.js\": 90557,\n\t\"./bn.js\": 18516,\n\t\"./bo\": 26273,\n\t\"./bo.js\": 26273,\n\t\"./br\": 9588,\n\t\"./br.js\": 9588,\n\t\"./bs\": 19815,\n\t\"./bs.js\": 19815,\n\t\"./ca\": 83331,\n\t\"./ca.js\": 83331,\n\t\"./cs\": 21320,\n\t\"./cs.js\": 21320,\n\t\"./cv\": 72219,\n\t\"./cv.js\": 72219,\n\t\"./cy\": 68266,\n\t\"./cy.js\": 68266,\n\t\"./da\": 66427,\n\t\"./da.js\": 66427,\n\t\"./de\": 67435,\n\t\"./de-at\": 52871,\n\t\"./de-at.js\": 52871,\n\t\"./de-ch\": 12994,\n\t\"./de-ch.js\": 12994,\n\t\"./de.js\": 67435,\n\t\"./dv\": 82357,\n\t\"./dv.js\": 82357,\n\t\"./el\": 95649,\n\t\"./el.js\": 95649,\n\t\"./en-au\": 59961,\n\t\"./en-au.js\": 59961,\n\t\"./en-ca\": 19878,\n\t\"./en-ca.js\": 19878,\n\t\"./en-gb\": 3924,\n\t\"./en-gb.js\": 3924,\n\t\"./en-ie\": 70864,\n\t\"./en-ie.js\": 70864,\n\t\"./en-il\": 91579,\n\t\"./en-il.js\": 91579,\n\t\"./en-in\": 30940,\n\t\"./en-in.js\": 30940,\n\t\"./en-nz\": 16181,\n\t\"./en-nz.js\": 16181,\n\t\"./en-sg\": 44301,\n\t\"./en-sg.js\": 44301,\n\t\"./eo\": 85291,\n\t\"./eo.js\": 85291,\n\t\"./es\": 54529,\n\t\"./es-do\": 53764,\n\t\"./es-do.js\": 53764,\n\t\"./es-mx\": 12584,\n\t\"./es-mx.js\": 12584,\n\t\"./es-us\": 63425,\n\t\"./es-us.js\": 63425,\n\t\"./es.js\": 54529,\n\t\"./et\": 35203,\n\t\"./et.js\": 35203,\n\t\"./eu\": 70678,\n\t\"./eu.js\": 70678,\n\t\"./fa\": 83483,\n\t\"./fa.js\": 83483,\n\t\"./fi\": 96262,\n\t\"./fi.js\": 96262,\n\t\"./fil\": 52521,\n\t\"./fil.js\": 52521,\n\t\"./fo\": 34555,\n\t\"./fo.js\": 34555,\n\t\"./fr\": 63131,\n\t\"./fr-ca\": 88239,\n\t\"./fr-ca.js\": 88239,\n\t\"./fr-ch\": 21702,\n\t\"./fr-ch.js\": 21702,\n\t\"./fr.js\": 63131,\n\t\"./fy\": 267,\n\t\"./fy.js\": 267,\n\t\"./ga\": 23821,\n\t\"./ga.js\": 23821,\n\t\"./gd\": 71753,\n\t\"./gd.js\": 71753,\n\t\"./gl\": 4074,\n\t\"./gl.js\": 4074,\n\t\"./gom-deva\": 92762,\n\t\"./gom-deva.js\": 92762,\n\t\"./gom-latn\": 5969,\n\t\"./gom-latn.js\": 5969,\n\t\"./gu\": 82809,\n\t\"./gu.js\": 82809,\n\t\"./he\": 45402,\n\t\"./he.js\": 45402,\n\t\"./hi\": 315,\n\t\"./hi.js\": 315,\n\t\"./hr\": 10410,\n\t\"./hr.js\": 10410,\n\t\"./hu\": 38288,\n\t\"./hu.js\": 38288,\n\t\"./hy-am\": 67928,\n\t\"./hy-am.js\": 67928,\n\t\"./id\": 71334,\n\t\"./id.js\": 71334,\n\t\"./is\": 86959,\n\t\"./is.js\": 86959,\n\t\"./it\": 34864,\n\t\"./it-ch\": 51124,\n\t\"./it-ch.js\": 51124,\n\t\"./it.js\": 34864,\n\t\"./ja\": 36141,\n\t\"./ja.js\": 36141,\n\t\"./jv\": 29187,\n\t\"./jv.js\": 29187,\n\t\"./ka\": 42136,\n\t\"./ka.js\": 42136,\n\t\"./kk\": 94332,\n\t\"./kk.js\": 94332,\n\t\"./km\": 18607,\n\t\"./km.js\": 18607,\n\t\"./kn\": 84305,\n\t\"./kn.js\": 84305,\n\t\"./ko\": 70234,\n\t\"./ko.js\": 70234,\n\t\"./ku\": 16003,\n\t\"./ku-kmr\": 19619,\n\t\"./ku-kmr.js\": 19619,\n\t\"./ku.js\": 16003,\n\t\"./ky\": 75061,\n\t\"./ky.js\": 75061,\n\t\"./lb\": 32786,\n\t\"./lb.js\": 32786,\n\t\"./lo\": 66183,\n\t\"./lo.js\": 66183,\n\t\"./lt\": 50029,\n\t\"./lt.js\": 50029,\n\t\"./lv\": 24169,\n\t\"./lv.js\": 24169,\n\t\"./me\": 68577,\n\t\"./me.js\": 68577,\n\t\"./mi\": 68177,\n\t\"./mi.js\": 68177,\n\t\"./mk\": 50337,\n\t\"./mk.js\": 50337,\n\t\"./ml\": 65260,\n\t\"./ml.js\": 65260,\n\t\"./mn\": 52325,\n\t\"./mn.js\": 52325,\n\t\"./mr\": 14695,\n\t\"./mr.js\": 14695,\n\t\"./ms\": 75334,\n\t\"./ms-my\": 37151,\n\t\"./ms-my.js\": 37151,\n\t\"./ms.js\": 75334,\n\t\"./mt\": 63570,\n\t\"./mt.js\": 63570,\n\t\"./my\": 97963,\n\t\"./my.js\": 97963,\n\t\"./nb\": 88028,\n\t\"./nb.js\": 88028,\n\t\"./ne\": 86638,\n\t\"./ne.js\": 86638,\n\t\"./nl\": 50302,\n\t\"./nl-be\": 66782,\n\t\"./nl-be.js\": 66782,\n\t\"./nl.js\": 50302,\n\t\"./nn\": 33501,\n\t\"./nn.js\": 33501,\n\t\"./oc-lnc\": 50563,\n\t\"./oc-lnc.js\": 50563,\n\t\"./pa-in\": 50869,\n\t\"./pa-in.js\": 50869,\n\t\"./pl\": 65302,\n\t\"./pl.js\": 65302,\n\t\"./pt\": 49687,\n\t\"./pt-br\": 74884,\n\t\"./pt-br.js\": 74884,\n\t\"./pt.js\": 49687,\n\t\"./ro\": 79107,\n\t\"./ro.js\": 79107,\n\t\"./ru\": 33627,\n\t\"./ru.js\": 33627,\n\t\"./sd\": 30355,\n\t\"./sd.js\": 30355,\n\t\"./se\": 83427,\n\t\"./se.js\": 83427,\n\t\"./si\": 11848,\n\t\"./si.js\": 11848,\n\t\"./sk\": 54590,\n\t\"./sk.js\": 54590,\n\t\"./sl\": 20184,\n\t\"./sl.js\": 20184,\n\t\"./sq\": 56361,\n\t\"./sq.js\": 56361,\n\t\"./sr\": 78965,\n\t\"./sr-cyrl\": 81287,\n\t\"./sr-cyrl.js\": 81287,\n\t\"./sr.js\": 78965,\n\t\"./ss\": 25456,\n\t\"./ss.js\": 25456,\n\t\"./sv\": 70451,\n\t\"./sv.js\": 70451,\n\t\"./sw\": 77558,\n\t\"./sw.js\": 77558,\n\t\"./ta\": 51356,\n\t\"./ta.js\": 51356,\n\t\"./te\": 73693,\n\t\"./te.js\": 73693,\n\t\"./tet\": 21243,\n\t\"./tet.js\": 21243,\n\t\"./tg\": 42500,\n\t\"./tg.js\": 42500,\n\t\"./th\": 55768,\n\t\"./th.js\": 55768,\n\t\"./tk\": 77761,\n\t\"./tk.js\": 77761,\n\t\"./tl-ph\": 35780,\n\t\"./tl-ph.js\": 35780,\n\t\"./tlh\": 29590,\n\t\"./tlh.js\": 29590,\n\t\"./tr\": 33807,\n\t\"./tr.js\": 33807,\n\t\"./tzl\": 93857,\n\t\"./tzl.js\": 93857,\n\t\"./tzm\": 60654,\n\t\"./tzm-latn\": 8806,\n\t\"./tzm-latn.js\": 8806,\n\t\"./tzm.js\": 60654,\n\t\"./ug-cn\": 30845,\n\t\"./ug-cn.js\": 30845,\n\t\"./uk\": 19232,\n\t\"./uk.js\": 19232,\n\t\"./ur\": 47052,\n\t\"./ur.js\": 47052,\n\t\"./uz\": 77967,\n\t\"./uz-latn\": 32233,\n\t\"./uz-latn.js\": 32233,\n\t\"./uz.js\": 77967,\n\t\"./vi\": 98615,\n\t\"./vi.js\": 98615,\n\t\"./x-pseudo\": 12320,\n\t\"./x-pseudo.js\": 12320,\n\t\"./yo\": 31313,\n\t\"./yo.js\": 31313,\n\t\"./zh-cn\": 64490,\n\t\"./zh-cn.js\": 64490,\n\t\"./zh-hk\": 55910,\n\t\"./zh-hk.js\": 55910,\n\t\"./zh-mo\": 98262,\n\t\"./zh-mo.js\": 98262,\n\t\"./zh-tw\": 44223,\n\t\"./zh-tw.js\": 44223\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;"],"x_google_ignoreList":[255]}