{"version":3,"sources":["appointments/create/components/OTPModal.tsx","components/Camera.jsx","appointments/create/css/styles.js","appointments/create/store/index.ts","appointments/create/confirmationPage.tsx","appointments/create/upload.tsx","components/Verification.tsx","components/Landingpage.tsx","appointments/create/api/index.tsx","components/Importphotos.jsx","components/Capturephotos.tsx","config.js","appointments/create/actions/index.ts","appointments/create/components/Provider.tsx","appointments/create/components/Location.tsx","appointments/create/inoffice/location.tsx","appointments/create/components/Date.tsx","appointments/create/inoffice/date.tsx","appointments/create/components/Date_Telederm.tsx","appointments/create/inoffice/date_Telederm.tsx","appointments/create/inoffice/appointmentFilter.tsx","appointments/create/components/InsuranceCarrier.tsx","appointments/create/inoffice/insurance.tsx","appointments/create/inoffice/appointmentType.tsx","appointments/create/components/PatientType.tsx","appointments/create/inoffice/index.tsx","appointments/create/telederm/index.tsx","appointments/create/index.tsx","appointments/create/components/Demographics.tsx","appointments/create/inoffice/SlotsContainer.tsx","appointments/create/inoffice/ProviderScheduleRow.tsx","appointments/create/inoffice/slots_byprovider.tsx","appointments/create/inoffice/LocationScheduleRow.tsx","appointments/create/inoffice/slots_bylocation.tsx","appointments/create/inoffice/slotsByDateContainer.tsx","appointments/create/inoffice/DateScheduleRow.tsx","appointments/create/inoffice/slots_bydate.tsx","components/reviews.tsx","appointments/create/store/reducer.ts","components/Thankyou.tsx","components/Appointmentconfirm.tsx","components/Parkinglotconfirm.tsx","appointments/create/page_redirector.tsx","components/Finalpage.tsx","twilio/participant.js","twilio/room.js","twilio/videoChat.js","components/Upload.tsx","appointments/create/components/addCC.tsx","logout.tsx","App.tsx","serviceWorker.ts","index.tsx"],"names":["OTPModal","props","useState","OTP","setOTP","styles","useStyles","showModeSelection","setShowModeSelection","showOTPGrid","setShowOTPGrid","sendEmail","setSendEmail","sendText","setSendText","seconds","setSeconds","minutes","setMinutes","isOTPErrored","setIsOTPErrored","isTimeOut","setIsTimeOut","setIsCodeResent","JSAlert","require","handleSendOTP","a","SendOTP","appointment_n","then","data","catch","error","InsertPELogs","globalsettings","clientIp","handleReSendOTP","alert","Icons","Success","handleVerifyClick","GetOTP","Number","sessionStorage","setItem","encodedAppt_n","Buffer","from","toString","onCallback","selectedStep","IntakeURL","emrAPI","window","open","Uploadurl","location","origin","updateTime","useEffect","token","setTimeout","clearTimeout","container","spacing","style","display","alignContent","justifyContent","item","xs","patientContact","email","length","control","onChange","e","target","checked","color","label","replace","cellPhone","formatphone","children","className","navigationButton","onClick","fullWidth","onPaste","event","pastedValue","clipboardData","getData","trim","test","value","numInputs","separator","isInputNum","inputStyle","otp","shouldAutoFocus","hasErrored","errorStyle","otpError","marginLeft","disabledButton","disabled","Camera","takePhoto","successMessage","errorMessage","sendFile","context","canvas","getContext","setAttribute","videoPlayer","videoWidth","videoHeight","drawImage","setState","disableUpload","disableDelete","dataURLtoBlob","dataURL","Promise","resolve","reject","byteString","atob","split","arrayBuffer","ArrayBuffer","int8Array","Uint8Array","i","charCodeAt","Blob","type","UploadPhoto","callBack","toDataURL","DeletePhoto","clearRect","state","maxWidth","maxHeight","navigator","mediaDevices","enumerateDevices","cameras","this","processDevices","GetAdminSettingValue","parseInt","devices","forEach","device","console","log","setDevice","deviceId","getUserMedia","audio","video","facingMode","width","max","height","stream","srcObject","play","lg","md","sm","alignItems","playsInline","ref","startIcon","component","backgroundColor","borderRadius","marginTop","textAlign","Component","theme","createMuiTheme","palette","primary","main","makeStyles","appBar","flexDirection","appTitle","flexGrow","logo","breakpoints","down","buttonActive","textTransform","pointerEvents","buttonInactive","flexend_Grid","flexBasis","flexstart_Grid","flexcenter_Grid","provider_Card","card_Avatar","slotspage_Avatar","slotspage_Card","slotslocation_Card","slotslocation_Avatar","location_Card","minWidth","location_Cardmedia","bydateProviderCard","byDateScrollbar","dropdown","dropdown_nomargin","margin","datepickerroot","fontSize","fabButton","navigationArrows","border","outlineColor","radioGroup","disabledTextfield","autocompleteIcon","initialState","appointmentdetails","appointmenttype","appointmentfilter","patientType","isInsuranceExist","insurance","id","planId","name","planName","provider","address","region","date","Date","duration","providers","facilities","states","defaultlocation","slotDetails","employeeId","facilityId","slotDate","employeeName","facilityName","isslotexisting","patient","patient_n","patient_type","defaultprovider","InsuranceAcceptance","bio","job_title","patientDemographics","patientfirstname","patientlastname","patientDOB","citystatezip","cellphone","comments","commpref","Context","createContext","undefined","cardstyles","subheader","Confirmation","cardstyle","useContext","textMessage","setTextMessage","patientName","charAt","toUpperCase","slice","dateOptions","month","day","year","weekday","hour","minute","GetInofficeMessage","history","useHistory","addEventListener","push","handleNextClick","removeItem","appt_n","getItem","GetLicenseName","licensename","timeZone","userTimeZone","convertedSlot","ConvertTimeZone","toDateString","toTimeString","scrollIntoView","behavior","block","variant","innerWidth","toLocaleString","classes","title","toLocaleDateString","fontWeight","phone","digitalApptType","CircularProgressWithLabel","position","top","left","bottom","right","Upload","documentType","setDocumentType","otherDocument","setOtherDocument","inputList","setInputList","disableSubmit","setDisableSubmit","openDialog","setOpenDialog","React","progress","setProgress","buttonLabel","setButtonLabel","overrides","MuiFormLabel","asterisk","DocumentCategories","setDocumentCategories","timer","setInterval","prevProgress","clearInterval","useSmartphoneClick","match","params","apptId","encodedDocType","submitDocuments","decodedAppt_n","UploadDocuments","GetDocumentCategories","labels","map","includes","SelectDocumentType","required","labelId","file","files","fileSize","size","toFixed","reader","FileReader","onload","input","DocumentType","OtherDocument","FileName","FileType","FileSize","Base64EncodedFile","result","Appointment_N","readAsDataURL","Warning","addInputDocument","currentTarget","accept","hidden","multiple","marginBottom","overflow","stickyHeader","aria-label","colSpan","index","key","Question","addButton","splice","show","handleRemoveClick","disableBackdropClick","Verfication","FirstName","setFirstName","LastName","setLastName","DOB","setDOB","Gender","setGender","firstNameError","setfirstNameError","firstNameMessage","setfirstNameMessage","lastNameError","setlastNameError","lastNameMessage","setlastNameMessage","dateforDOBfield","setDateforDOBfield","DOBError","setDOBError","DOBMessage","setDOBMessage","GenderError","setGenderError","genderMessage","setGenderMessage","displayVerfiedMessage","SetdisplayVerfiedMessage","resultMessage","setResultMessage","setPatientContact","validationObj","setValidationObj","useStyle","active","buttonactive","inactive","buttonMargin","iconCSS","useForm","register","patientObj","handleSubmit","errors","PATIENT_FIRST_NAME","PATIENT_LAST_NAME","PATIENT_BIRTH_DAY","GENDER_N","buttonclick","reName","SearchPatient","PATIENT_EMAIL","PATIENT_CELL_PHONE","redirect","direction","justify","handleFirstNameChange","inputRef","pattern","autoCapitalize","helperText","handleLastNameChange","utils","DateFnsUtils","inputVariant","orientation","format","handleDOBChange","maxDate","initialFocusedDate","shrink","Landingpage","buttonDone","apptInstructions","setApptinstrunction","confirmParkingLot","setConfirmParkingLot","Styles","setReturnValue","parkingLotMessage","setParkingLotMessage","fontColor","setFontColor","assisstanceMessage","setAssisstanceMessage","pastMessage","setPastMessage","buttonsDisplay","setButtonsDisplay","displayPastMessage","setDisplayPastMessage","showPLMButton","setShowPLMButton","displayCancelledMessage","setDisplayCancelledMessage","cancelledMessage","setCancelledMessage","confirmationMessage","setConfirmationMessage","showConfirmButton","setShowConfirmButton","setSelectedStep","isIntakeAndUploadEnabled","setIsIntakeAndUploadEnabled","isParkingLotEnabled","setIsParkingLotEnabled","patN","setPatN","appt_type","setAppt_type","features","setFeatures","GetAppointmentType","adminData","GetPatientN","pat_n","response","GetFlag","GetPatient_N","GetApptType","GetFeatures","GetPatientTypeByApptID","LinkExpiry","licenseName","linkExpiryReturnData","flag","ConfirmAppt","GetSchedulingPhone","SchedulingPhoneReturnData","cleaned","confirmParkinglotClick","selected","ConfirmParkinglot","patientIntakeClick","IsPatientVerified","GetPatientContactInfo","uploadFilesClick","fontFamily","feature","GotoFeature","toLowerCase","GetProviders","insurance_id","apptType","url","union","arr1","arr2","concat","reduce","m","o","has","set","Map","values","fetch","ok","NotifyErrorOutage","json","allProviders","GetProvidersByInsurance","filteredProviders","finalList","EMPLOYEE_FIRST_NAME","EMPLOYEE_LAST_NAME","EMPLOYEE_N","facility_n","FACILITY_N","EMPLOYEE_BIO","EMPLOYEE_JOB_TITLE","configUrl","targetUrl","ipaddress","action","config","method","headers","Accept","GetAppointmentTypeFromAdmin","adminSettting","UpdateEmailCellPhone","patientId","FetchEmailCellPhone","GetFacilities","sort","b","IsInsuranceAccepted","FACILITY_NAME","Id","FACILITY_ADDRESS","FACILITY_CITY","FACILITY_STATE","SCHEDULING_PHONE","Facility_Region_N","GetLocationsByDate","GetFacilityProviders","facility","appointment_type_n","reverse","Employee_First_Name","Employee_Last_Name","Employee_N","isInsuranceAccepted","Employee_Bio","Employee_Job_Title","GetFacilityRegions","REGION_NAME","REGION_STATE","GetInsuranceCarriers","INSURANCE_CARRIER_NAME","GetInsurancePlans","carrier_id","INSURANCE_PLAN_NAME","GetAvailableSlotsByDate","startDate","GetStates","CODE","PatientUrl","GetPatientType","AppointmentCount","appointment_date","createPatient","appObj","body","JSON","stringify","PATIENT_N","APPOINTMENT_DATE","x","getTimezoneOffset","getMinutes","APPOINTMENT_CHECKIN_TIME","createAppointment","APPOINTMENT_TYPE_OF_WORK","APPOINTMENT_TYPE_NAME","UTC_Offset","moment","tz","guess","utcOffset","sendReminder","removePreRegistration","GetMessage","ratingValue","str","GetPatientName","GetPracticeName","GetLink","updateReviews","reviewStars","reviewComments","sessionId","apptdate","GetdecodedURL","urlcode","phonenumber","practicePhone","phonenumberLink","href","Documents","TokenURL","AuthenticationToken","Headers","append","Token","mode","status","NotifyVirusDetected","isPEAppt","send_email","send_text","getTwilioToken","identity","room","generateToken","AccessToken","twilio","accountSid","apiKey","apiSecret","videoToken","videoGrant","VideoGrant","addGrant","updateTelePatientDetails","toJwt","isPatientJoined","appt_id","UploadImages","Error","ExceptionMessage","Message","GetSavedCards","setting","UpdatePatientCommunicationPreference","comm_pref","encodeURIComponent","slotTime","formattedSlot","slotAsPerServer","GetPaymentToken","SID","obj","Session","PaymentToken","SaveCard","cc","postIframedata","iframedata","GetAppointmentTypes","filter","GetAllAppointmentTypes","Importphotos","decodedDocType","docType","Capturephotos","base64Img","setBase64Img","setCapturedImage","handleClose","DialogActions","withStyles","root","padding","MuiDialogActions","upload","uploadImage","FormData","onClose","aria-labelledby","dividers","gutterBottom","logoName","trackingID","isByLocationEnabled","modify_SlotDetails","dispatch","modify_AppointmentDetails","customappointmenttype","API","create_patient","create_appointment","remove_reg","ProviderComponent","setOpen","setProviders","loading","hover","get_Providers","SetSelectedProvider","selectedprovider","Grid","Typography","ThemeProvider","Autocomplete","onOpen","getOptionLabel","option","groupBy","options","ListboxProps","popupIndicator","renderInput","TextField","InputProps","borderColor","endAdornment","Fragment","CircularProgress","Card","CardMedia","Avatar","src","CardContent","Button","onCallbackType","Location","setFacilities","facilitiesopen","setFacilitiesOpen","facilitiesLoader","regions","setRegions","regionsopen","setRegionsOpen","regionsLoader","selectedfacility","setSelectedfacility","selectedregion","setSelectedRegion","isSingleRegion","setIsSingleRegion","isSingleLocation","setIsSingleLocation","get_Facilities","modifyState","localeCompare","FacilityPage","Datepage","providersopen","setProvidersOpen","providersLoader","SetSelectedfacility","selectedDate","setSelectedDate","availableSlots","setAvailableSlots","isDisabled","setIsDisabled","resetForm","splittedDate","session_ApptN","appt_type_n","handleDateChange","minDate","minDateMessage","disableClearable","Tooltip","Fab","ByDatePage","ByDateTeledermPage","AppointmentFilterPage","appointmentFilter","setAppointmentFilter","enableByProviderFilter","setByProvider","handleClick","selectedFilter","fetchProviders","fetchLocations","insuranceplan","getcomponent","setIsInsuranceExist","insurancelist","setInsuranceList","SetInsurance","SetInsurancePlanlist","SetInsurancePlan","InsurancePage","AppointmentTypePage","customApptType","setCustomAppointmentType","appointmentTypes","setAppointmentTypes","NAME","DURATION","types","fetchAppointmentTypes","InofficePage","patienttype","setPatientType","isInsuranceEnabled","setIsinsuranceEnabled","newPatient","setNewPatient","enableNewPatient","GetInsuranceAvailability","GetNewPatient","ins","extractedText","setExtractedText","disableForm","setDisableForm","onCallbackAppt","TeledermPage","Index","setAppointmenttype","isDefaulted","inOfficeAppointmentTypesCount","setInOfficeAppointmentTypesCount","teleAppointmentTypesCount","setTeleAppointmentTypesCount","aptType","apt","reg","loc","message","setMessage","disableTelehealth","setDisableTelehealth","IS_TELE_APPOINTMENT","GetTelehealthButton","GetTelehealthMessage","FetchAppointmentTypes","find","verticalAlign","inputProps","reEmail","styless","createStyles","closeButton","grey","Demographics","Email","setEmail","Address","setAddress","ZipCode","setZipCode","CellPhone","setCellPhone","City","setCity","Comments","setComments","setStates","opens","returnValue","setReturnvalue","displayvalue","setDisplayvalue","displayMessage","setDisplaymessage","disablebutton","setDisablebutton","statename","setStatename","verifydisplay","setVerifydisplay","setCount","btnDisable","SetBtnDisable","minutesLeft","setMinutesLeft","navigate","setNavigate","stateMessage","setStateMessage","StatesError","setStatesError","navigation","setNavigation","navigateWhenNotFound","setnavigateWhenNotFound","callCreatePatient","setCallCreatePatient","todaysDate","disableFields","setDisableFields","emailError","setEmailError","emailMessage","setEmailMessage","CityError","setCityError","CommentError","setCommentError","CommentMessage","setCommentMessage","CityMessage","setCityMessage","AddressError","setAddressError","AddressMessage","setAddressMessage","CellPhoneError","setCellPhoneError","CellPhoneMessage","setCellPhoneMessage","openValidationDialog","setOpenValidationDialog","patn","setPatn","openUpdateEmailDialog","setOpenUpdateEmailDialog","patientEmail","setPatientEmail","patientCellPhone","setPatientCellPhone","emailPref","setEmailPref","textPref","setTextPref","showPref","setShowPref","patientPref","setPatientPref","requireCC","setRequireCC","enableReasonForAppt","setEnableReasonForAppt","normalizeInput","currentValue","cvLength","parsedData","parseFloat","isNaN","buttonText","buttonVerifyText","cellPhoneError","cellPhoneMessage","addressError","addressMessage","cityError","cityMessage","postalCodeError","postalCodeMessage","commentError","commentMessage","setSessionAppointment_n","sessionAppointment","setSessionAppointment","sessionAppointmentDuration","setSessionAppointmentDuration","PatientDetails","patientDetailsArray","parse","dob","appt","appt_duration","getSessionStorageValues","getadminsettingCCInfo","getadminsettingEnableReasonForAppt","patType","navigationValidation","snackbarState","interval","get_States","model","setModel","getCardname","GAtracking","ReactGA","category","updateEmailCellPhoneButton","patId","handleCloseDialog","APPOINTMENT_CREATION_DATE","patientDetailsString","DialogTitle","other","disableTypography","IconButton","bookApptButtonClick","reGoodDate","ptData","PE_PATIENT_N","ptTypeData","PATIENT_COMMUNICATION_PREFERENCE","selectedGender","patientDetails","PATIENT_ADDRESS","PATIENT_CITY_STATE_ZIP","PATIENT_COMMENTS","PATIENT_INSURANCE_CARRIER","PATIENT_INSURANCE_PLAN_NAME","APPOINTMENT_EXTERNAL_ID","APPOINTMENT_IS_ACTIVE","CANCELLATION_REASON","COMMENT","COLUMN_NUMBER","APPOINTMENT_EXTERNAL_ID_TEXT","Last_Text_Sent","Last_Email_Sent","IsConfirmed","APPOINTMENT_REVIEWSTARS","APPOINTMENT_FEEDBACK","errored","vertical","horizontal","handleEmailCheckbox","handleTextCheckbox","onSubmit","Snackbar","autoHideDuration","anchorOrigin","Alert","severity","FormControl","InputLabel","NativeSelect","FormHelperText","maxLength","htmlFor","paddingLeft","FormGroup","FormControlLabel","Checkbox","goBack","Dialog","DialogContent","flexRow","alignSelf","containerRow","topBarItem","timeSlotItem","paddingRight","cursor","flexColumn","paper","boxShadow","p","addPreRegistration","preRegObj","SlotsContainer","expanded","setExpanded","itemsToShow","setItemsToShow","selectedSlot","setSelectedSlot","bookSlot","slots","isLoading","schedulesTest","ScheduleDate","preRegistrationObj","employeeid","facilityid","PRE_REGISTRATION_DATE","PRE_REGISTRATION_SLOT_TIME","facilityAddress","facilityPhone","aria-describedby","DialogContentText","limited","flexFlow","Slots","slot","Paper","centered","content","flex","large","providerRow","borderTop","ProviderScheduleRow","textValue","setTextValue","Phone","Provider","Scheduling_Phone","disableEvents","setDiableEvents","setIsLoading","insertLogs","defaultPhone","setDefaultPhone","GetSlotsMessage","Facility_N","Facility_Name","Facility_Address","Facility_Address2","Facility_Info","Link","GOOGLE_MAPS_LINK","SlotsDate","NextAvailability","availableSlotsCount","overflowX","ele","Limited","ProviderId","ProviderName","Duration","borderBottom","minHeight","borderRight","topBarItem_Day","letterSpacing","whiteSpace","navigateBackContainer","mainFilter","mainFilter_Location_Caption","slotsContainer","providerRowContainer","overflowY","scrollbar","GetAvailableSlotsByProvider","y","getWindowDimensions","innerHeight","Slots_byprovider","next7Days","setNext7Days","dateCounter","setDateCounter","setLoading","providerSchedules","setProviderSchedules","todayDate","setToday","tempdays","windowDimensions","setWindowDimensions","setLimit","constructDates","dtCounter","limit","currentDate","days","getDate","setDate","dateLabel","substring","hiddenDateValue","today","handleResize","removeEventListener","temp","slotsDate","ApptTypeSlots","LocationScheduleRow","schedulesByLocation","SchedulinPhone","FacilityId","FacilityName","GetAvailableSlotsByLocation","Slots_bylocation","setReload","part","SlotsByDateContainer","DateScheduleRow","SchedulingPhone","FacilityByDate","Facility_n","Facility_City","Facility_State","Facility_Zip","schedulesByDate","indexNumber","borderlessCard","Slots_bydate","setIndexNumber","weekDay","setWeekDay","week","Array","outofSlots","setOutofSlots","getDay","handleGoBack","scrollTo","Reviews","setRatingValue","setDisplayMessage","displaylink","setDisplaylink","displayTextarea","setdisplayTextarea","displaySend","setDisoplaysend","displaySubmit","setDisoplaysubmit","googlelink","setGoogleLink","freezeStars","setfreezeStars","practiceName","setPracticeName","buttonClick","Divider","Rating","defaultValue","newValue","readOnly","TextareaAutosize","rowsMin","placeholder","reducer","Thankyou","firstName","Appointmentconfirm","setLinkExpiryData","setSchedulingPoneData","Parkinglotconfirm","MessageData","getdecodedURL","decodedURL","Page_redirector","redirectURL","FinalPage","Participant","participant","videoTracks","setVideoTracks","audioTracks","setAudioTracks","videoRef","useRef","audioRef","trackpubsToTracks","trackMap","publication","track","on","kind","v","removeAllListeners","videoTrack","attach","current","detach","audioTrack","autoPlay","Room","roomName","handleLogout","participants","setParticipants","waitingRoom","document","getElementById","participantConnected","prevParticipants","participantDisconnected","off","remoteParticipants","localParticipant","sid","class","background","marginRight","muteAudio","unmuteAudio","disable","enable","handleMuteUnmute","showCam","hideCam","handleShowHide","VideoChat","setRoom","setConnecting","username","Video","connect","err","getToken","useCallback","prevRoom","tracks","trackPub","stop","disconnect","tidyUp","persisted","setSuccessMessage","setErrorMessage","session_n","control_name","LicenceName","tokenId","SESSION_N","ImageId","Math","floor","getTime","CONTROL_NAME","Image","MakePayment","matches","useMediaQuery","viewIframe","setViewIframe","styletwo","paddingTop","paddingBottom","stylestart","PaymentUrl","setPaymentUrl","setSessionId","setChecked","setPatientID","setEmrId","setCardOpen","paymentToken","setPaymentToken","paymentButton","setPaymentButton","patientCC","setPatientCC","saveCardModel","handleChange","patObjString","patObj","city","stateZip","zip","firstNameOnCard","lastNameOnCard","address2","PATIENT_ADDRESS2","CNP","handleInputChange","exec","handleClickOpen","validation","apptObjString","CARD_NAME","saveCardData","ValidateOrAcceptPayment","ExpirationDate","PaymentAmount","Memo","Memo2","FeeAmount","Patient_N","SAVE_CARD","IS_PORTAL_PAYMENT","patientN","isValidZip","currentYearLastTwoDigits","getFullYear","setIframe","iframe","handleIframeDetails","showSpinner","setShowSpinner","PaymentURL","SessionID","reload","valueFromSessionStorage","totalFromSessionStorage","setTotal","user","Patient_n","EMRID","PatientFirstName","Login","getDetails","getStates","Redirect","ReloadPopUp","total","ListItem","ListItemIcon","ListItemText","onLoad","text","InputLabelProps","autoComplete","button","backdropFilter","Box","LoggedOutMessage","peURL","setPEURL","usePageViews","initialize","Configurations","pageview","pathname","search","getIpDetails","timeZoneFlag","GetTimeZoneflag","clientDetails","ip","exceptionMessage","App","useReducer","DefaultPhone","TrackJS","install","enabled","hostname","version","getDefaultPhone","AppBar","Toolbar","alt","basename","exact","path","StartPage","SlotsPage","LocationSlotsPage","DateSlotsPage","addCC","apptConfirmation","parkinglotConfirmation","page_redirector","UploadPage","LandingPage","Finalpage","PatientVerificationPage","Boolean","ReactDOM","render","StrictMode","serviceWorker","ready","registration","unregister"],"mappings":"sTAee,SAASA,EAASC,GAAa,IAAD,EACnBC,mBAAS,IADU,mBAClCC,EADkC,KAC7BC,EAD6B,KAGnCC,EAASC,cAH0B,EAISJ,oBAAS,GAJlB,mBAIlCK,EAJ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rlC,MACvB,2DCZN2mC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,GAAD,OAEFnL,SAASC,eAAe,SDiIpB,kBAAmB1oC,WACrBA,UAAU6zC,cAAcC,MACrBt7C,MAAK,SAAAu7C,GACJA,EAAaC,gBAEdt7C,OAAM,SAAAC,GACLgI,QAAQhI,MAAMA,EAAMq1B,c","file":"static/js/main.cc4539c4.chunk.js","sourcesContent":["import { Button, Checkbox, FormControlLabel, FormGroup, Grid, Typography } from \"@material-ui/core\";\r\nimport useStyles from \"../css/styles\";\r\nimport React from \"react\";\r\nimport { useEffect, useState } from \"react\";\r\nimport OtpInput from 'react-otp-input';\r\nimport { formatphone, GetOTP, SendOTP, InsertPELogs } from \"../api\"; //FB 4960\r\nimport globalsettings from \"../../../config\";\r\n\r\n\r\n//Update Log\r\n// FB 4867 DK 12/27/2021 Added screen for verification\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 9664 SK 11/19/2024 verify button not properly pulling all numbers from verification code\r\n\r\n\r\nexport default function OTPModal(props: any) {\r\n const [OTP, setOTP] = useState(\"\");\r\n const validOTPlength = 4;\r\n const styles = useStyles();\r\n const [showModeSelection, setShowModeSelection] = useState(true);\r\n const [showOTPGrid, setShowOTPGrid] = useState(false);\r\n const [sendEmail, setSendEmail] = useState(0);\r\n const [sendText, setSendText] = useState(0);\r\n const [seconds, setSeconds] = useState(0);\r\n const [minutes, setMinutes] = useState(2);\r\n const [isOTPErrored, setIsOTPErrored] = useState(false);\r\n const [isTimeOut, setIsTimeOut] = useState(false);\r\n const [isCodeResent, setIsCodeResent] = useState(false);\r\n var JSAlert = require(\"js-alert\");\r\n const handleOTPChange = (value: any) => {\r\n setOTP(value);\r\n setIsOTPErrored(false);\r\n }\r\n //FB 9664 - Begin\r\n const handleOTPPaste = (event: React.ClipboardEvent) => {\r\n const pastedValue = event.clipboardData.getData(\"Text\").trim();\r\n if (/^\\d+$/.test(pastedValue) && pastedValue.length === validOTPlength) {\r\n setOTP(pastedValue);\r\n setIsOTPErrored(false);\r\n } else {\r\n setIsOTPErrored(true);\r\n }\r\n };\r\n //FB 9664 - End\r\n const handleSendOTP = async () => {\r\n await SendOTP(props.appointment_n, false, sendEmail, sendText)\r\n .then((data) => {\r\n setShowModeSelection(false);\r\n setShowOTPGrid(true);\r\n setMinutes(6);\r\n setSeconds(0);\r\n })\r\n .catch((error) => error);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Send code - OTP modal\");\r\n //FB 4960 End\r\n }\r\n const handleReSendOTP = async () => {\r\n await SendOTP(props.appointment_n, false, sendEmail, sendText)\r\n .then((data) => {\r\n setIsCodeResent(true);\r\n setIsOTPErrored(false);\r\n setIsTimeOut(false);\r\n setMinutes(6);\r\n JSAlert.alert(\"Verification code re-sent successfully\", null, JSAlert.Icons.Success);\r\n })\r\n .catch((error) => error);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Resend code - OTP modal\");\r\n //FB 4960 End\r\n }\r\n\r\n const handleEmailCheckbox = (e: any) => {\r\n if (e.target.checked) {\r\n setSendEmail(1);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Checked on Email - OTP modal\");\r\n //FB 4960 End\r\n }\r\n else {\r\n setSendEmail(0);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"UnChecked on Email - OTP modal\");\r\n //FB 4960 End\r\n }\r\n }\r\n\r\n const handlePhoneCheckbox = (e: any) => {\r\n if (e.target.checked) {\r\n setSendText(1);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Checked on Phone - OTP modal\");\r\n //FB 4960 End\r\n }\r\n else {\r\n setSendText(0);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Unchecked on Phone - OTP modal\");\r\n //FB 4960 End\r\n }\r\n }\r\n const handleVerifyClick = async () => {\r\n await GetOTP(props.appointment_n, false)\r\n .then((data) => {\r\n if (data === Number(OTP)) {\r\n sessionStorage.setItem(\"IsPatientVerified\", \"Yes\");\r\n var encodedAppt_n = Buffer.from(props.appointment_n).toString('base64');\r\n props.onCallback(false);\r\n if (props.selectedStep === \"HealthForms\") {\r\n const IntakeURL = globalsettings.emrAPI + \"patient_intake/note_add_edit.asp?app_n=\" + encodedAppt_n;\r\n window.open(IntakeURL);\r\n }\r\n else if (props.selectedStep === \"FileUpload\") {\r\n const Uploadurl = window.location.origin + \"/upload/\" + encodedAppt_n;\r\n window.open(Uploadurl);\r\n //window.open(\"http://192.168.30.246:20000/upload/\" + props.appointment_n);\r\n }\r\n }\r\n else {\r\n setOTP(\"\");\r\n setIsOTPErrored(true);\r\n }\r\n })\r\n .catch((error) => error);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Click on Verify\");\r\n //FB 4960 End\r\n }\r\n\r\n function updateTime() {\r\n if (minutes == 0 && seconds == 0) {\r\n setIsTimeOut(true);\r\n setIsOTPErrored(false);\r\n }\r\n else {\r\n if (seconds == 0) {\r\n setMinutes(minutes => minutes - 1);\r\n setSeconds(59);\r\n } else {\r\n setSeconds(seconds => seconds - 1);\r\n }\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n const token = setTimeout(updateTime, 1000)\r\n\r\n return function cleanUp() {\r\n clearTimeout(token);\r\n }\r\n }, [minutes, seconds])\r\n\r\n return (\r\n
\r\n \r\n \r\n A four digit code will be sent to the below selected option(s) for verification\r\n \r\n 0 ? \"flex\" : \"none\" }}>\r\n \r\n } label={props.patientContact.email.replace(/^(.{1})[^@]+/, \"$1******\")} />\r\n \r\n \r\n 0 ? \"flex\" : \"none\" }}>\r\n \r\n } label={formatphone(props.patientContact.cellPhone).props.children[1].replace(/^(.{0})[^-]+/, \"$1******\")} />\r\n \r\n \r\n \r\n 0 || sendText > 0 ? \"flex\" : \"none\" }}\r\n fullWidth\r\n >\r\n Send Code\r\n \r\n \r\n \r\n \r\n \r\n Please enter your code\r\n \r\n {/* FB 9664 */}\r\n \r\n -}\r\n isInputNum={true}\r\n inputStyle={styles.otp}\r\n shouldAutoFocus\r\n hasErrored={isOTPErrored}\r\n errorStyle={styles.otpError} \r\n />\r\n \r\n \r\n \r\n Entered code is invalid/expired.\r\n \r\n \r\n \r\n \r\n {minutes + \"m \" + seconds + \"s left\"}\r\n \r\n \r\n \r\n \r\n Resend\r\n \r\n\r\n \r\n Verify\r\n \r\n \r\n \r\n
\r\n )\r\n}","import React, { Component } from 'react';\r\nimport { Button, Grid, Typography } from '@material-ui/core';\r\nimport CameraAlt from \"@material-ui/icons/CameraAlt\";\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Done from \"@material-ui/icons/Done\";\r\nimport useStyles from \"../appointments/create/css/styles\";\r\nimport { GetAdminSettingValue } from \"../appointments/create/api/index\"; //FB 7264 DK\r\n\r\n//Update log\r\n// FB 6025 BR 04/26/2022 PE - Import Photos through QR code scan from smartphone\r\n// FB 6347 GS 12/23/2022 Increased the QR code picture capturing screen size\r\n// FB 6963 AS 06/11/2023 Display result/error message\r\n// FB 7264 DK 08/28/2023 Need an Admin Setting to Specify The Resolution of QR Camera Images\r\n\r\nexport default class Camera extends Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n //FB 6347 BEGIN\r\n // FB 7264 DK Begin--Commented device width\r\n // this.deviceWidth = \"0px\";\r\n // this.deviceHeight = \"0px\";\r\n // if (window.innerWidth <= 768) {\r\n // this.deviceWidth = \"270px\";\r\n // this.deviceHeight = \"350px\";\r\n // }\r\n // else {\r\n // this.deviceWidth = \"700px\";\r\n // this.deviceHeight = \"900px\";\r\n // }\r\n //FB 6347 END\r\n this.state = {\r\n disableUpload: \"none\",\r\n disableDelete: \"none\",\r\n maxWidth: 0,\r\n maxHeight: 0,\r\n };\r\n // FB 7264 DK End\r\n }\r\n\r\n // FB 7264 DK Begin\r\n async componentDidMount() {\r\n const cameras = await navigator.mediaDevices.enumerateDevices();\r\n this.processDevices(cameras);\r\n\r\n const maxWidth = await GetAdminSettingValue(\"Image_Resolution\");\r\n\r\n if (maxWidth) {\r\n this.setState({ maxWidth: parseInt(maxWidth, 10) }, async () => {\r\n const cameras = await navigator.mediaDevices.enumerateDevices();\r\n this.processDevices(cameras);\r\n });\r\n }\r\n }\r\n\r\n processDevices(devices) {\r\n devices.forEach(device => {\r\n console.log(device.label);\r\n this.setDevice(device);\r\n });\r\n }\r\n\r\n async setDevice(device) {\r\n const { deviceId } = device;\r\n const stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: { facingMode: 'environment', width: { max: this.state.maxWidth }, height: { max: this.state.maxWidth } } });\r\n this.videoPlayer.srcObject = stream;\r\n this.videoPlayer.play();\r\n }\r\n\r\n takePhoto = () => {\r\n this.props.successMessage = \"\";\r\n this.props.errorMessage = \"\";\r\n const { sendFile } = this.props;\r\n const context = this.canvas.getContext('2d');\r\n this.canvas.setAttribute(\"width\", this.videoPlayer.videoWidth);\r\n this.canvas.setAttribute(\"height\", this.videoPlayer.videoHeight);\r\n context.drawImage(this.videoPlayer, 0, 0, this.videoPlayer.videoWidth, this.videoPlayer.videoHeight);\r\n this.setState({ disableUpload: \"flex\" });\r\n this.setState({ disableDelete: \"flex\" });\r\n };\r\n\r\n dataURLtoBlob = (dataURL) => {\r\n return new Promise((resolve, reject) => {\r\n const byteString = atob(dataURL.split(',')[1]);\r\n const arrayBuffer = new ArrayBuffer(byteString.length);\r\n const int8Array = new Uint8Array(arrayBuffer);\r\n for (let i = 0; i < byteString.length; i++) {\r\n int8Array[i] = byteString.charCodeAt(i);\r\n }\r\n const blob = new Blob([int8Array], { type: 'image/png' });\r\n resolve(blob);\r\n });\r\n }\r\n \r\n UploadPhoto = () => {\r\n this.props.callBack(this.canvas.toDataURL('image/png').split(';base64,')[1]);\r\n this.DeletePhoto();\r\n this.setState({ disableUpload: \"none\" });\r\n this.setState({ disableDelete: \"none\" });\r\n }\r\n\r\n DeletePhoto = () => {\r\n const context = this.canvas.getContext('2d');\r\n context.clearRect(0, 0, this.videoPlayer.videoWidth, this.videoPlayer.videoHeight);\r\n this.setState({ disableUpload: \"none\" });\r\n this.setState({ disableDelete: \"none\" });\r\n }\r\n // FB 7264 DK End\r\n\r\n render() {\r\n return (\r\n
\r\n {/* FB 6347 GS END */}\r\n
\r\n \r\n {/* FB 6347 */}\r\n {/* FB 7264 DK Begin*/}\r\n
\r\n \r\n
\r\n {/* FB 7264 DK End*/}\r\n
\r\n
\r\n {/* FB 6347 */}\r\n {/* FB 7264 */}\r\n \r\n \r\n }\r\n component=\"label\"\r\n onClick={this.takePhoto}\r\n style={{\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n borderRadius: \"15px\",\r\n width: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#46B4C6\",\r\n }\r\n }}\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n }\r\n\r\n style={{\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n borderRadius: \"15px\",\r\n width: \"20px\",\r\n display: this.state.disableUpload,\r\n \"&:hover\": {\r\n backgroundColor: \"#46B4C6\",\r\n }\r\n }}\r\n onClick={this.UploadPhoto}\r\n\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n }\r\n style={{\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n borderRadius: \"15px\",\r\n width: \"20px\",\r\n display: this.state.disableDelete,\r\n \"&:hover\": {\r\n backgroundColor: \"#46B4C6\",\r\n }\r\n }}\r\n onClick={this.DeletePhoto}\r\n >\r\n \r\n \r\n \r\n\r\n {/* FB 6963 display upload success or error message */}\r\n\r\n {this.props.successMessage &&
{this.props.successMessage}
}\r\n\r\n {this.props.errorMessage &&
{this.props.errorMessage}
}\r\n\r\n
\r\n \r\n {/* FB 6347 */}\r\n {/* FB 7264 DK */}\r\n (this.canvas = ref)}>\r\n {/* /* */}\r\n \r\n
\r\n );\r\n }\r\n}","import { makeStyles, createMuiTheme } from \"@material-ui/core\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page to handle CSS globally\r\n// FB 4409 DK 04/28/2021 Removed hover functionality to the buttonActive class\r\n// FB 4574 DK 07/15/2021 Added new class for dropdowm icons\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n },\r\n});\r\n\r\nconst useStyles = makeStyles({\r\n appBar: {\r\n backgroundColor: \"#18a2b8\",\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n appTitle: {\r\n flexGrow: 1,\r\n color: \"white\",\r\n },\r\n logo: {\r\n maxWidth: 400,\r\n maxHeight: 150,\r\n [theme.breakpoints.down(\"xs\")]: {\r\n maxWidth: 250,\r\n maxHeight: 70,\r\n }\r\n },\r\n\r\n // FB 4409 DK - Removed hover functionality, Changed the backgroundcolor and font color to the buttonActive class\r\n buttonActive: {\r\n backgroundColor: \"#B9E3E9\",\r\n color: \"black\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n pointerEvents: \"none\",\r\n // \"&:hover\": {\r\n // backgroundColor: \"#46B4C6\",\r\n // },\r\n width: \"-webkit-fill-available\",\r\n },\r\n buttonInactive: {\r\n backgroundColor: \"white\",\r\n color: \"#18a2b8\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n width: \"-webkit-fill-available\",\r\n },\r\n navigationButton: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#46B4C6\",\r\n },\r\n },\r\n disabledButton: {\r\n backgroundColor: \"lightgray\",\r\n textTransform: \"capitalize\",\r\n color: \"grey\",\r\n borderRadius: \"15px\",\r\n },\r\n flexend_Grid: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n alignItems: \"center\",\r\n flexBasis: \"unset\",\r\n },\r\n //FB-4867 - DK - Start\r\n flexstart_Grid: {\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n alignItems: \"center\",\r\n flexBasis: \"unset\",\r\n },\r\n flexcenter_Grid: {\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n flexBasis: \"unset\",\r\n },\r\n //FB-4867 - DK - End\r\n provider_Card: {\r\n maxWidth: 450,\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n [theme.breakpoints.down(\"md\")]: {\r\n maxWidth: 300,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n [theme.breakpoints.down(\"sm\")]: {\r\n maxWidth: 250,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n [theme.breakpoints.down(\"xs\")]: {\r\n maxWidth: \"80%\",\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n },\r\n card_Avatar: {\r\n \"&.MuiAvatar-root\": {\r\n height: 170,\r\n width: 170,\r\n },\r\n },\r\n slotspage_Avatar: {\r\n \"&.MuiAvatar-root\": {\r\n height: 120,\r\n width: 120,\r\n },\r\n },\r\n slotspage_Card: {\r\n maxWidth: 450,\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n // [theme.breakpoints.down(\"xs\")]: {\r\n // maxWidth: \"80%\",\r\n // display: \"flex\",\r\n // flexDirection: \"column\",\r\n // },\r\n },\r\n slotslocation_Card: {\r\n //maxWidth: 450,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n [theme.breakpoints.down(\"xs\")]: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n },\r\n slotslocation_Avatar: {\r\n \"&.MuiAvatar-root\": {\r\n height: 120,\r\n width: 120,\r\n [theme.breakpoints.down(\"xs\")]: {\r\n height: 90,\r\n width: 90,\r\n },\r\n },\r\n },\r\n location_Card: {\r\n maxWidth: 400,\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n minWidth: \"70%\",\r\n [theme.breakpoints.down(\"md\")]: {\r\n maxWidth: 300,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n [theme.breakpoints.down(\"sm\")]: {\r\n maxWidth: 250,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n [theme.breakpoints.down(\"xs\")]: {\r\n maxWidth: \"100%\",\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n },\r\n location_Cardmedia: {\r\n height: 170,\r\n width: 170,\r\n },\r\n bydateProviderCard: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n [theme.breakpoints.down(\"xs\")]: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n },\r\n byDateScrollbar: {\r\n \"&::-webkit-scrollbar\": {\r\n width: \"4px\",\r\n height: \"10px\",\r\n backgroundColor: \"lightgray\",\r\n },\r\n\r\n \"&::-webkit-scrollbar-thumb:horizontal\": {\r\n backgroundColor: \"rgba(0,0,0,.5)\",\r\n //outline: '1px solid slategrey'\r\n },\r\n },\r\n dropdown: {\r\n maxHeight: 150,\r\n \"&:hover\": {\r\n color: \"white\",\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n dropdown_nomargin: {\r\n \"& .MuiFormControl-marginNormal\": {\r\n margin: 0,\r\n },\r\n },\r\n datepickerroot: {\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n // FB 4574 DK - Added to increase the size of icon\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n fabButton: {\r\n margin: theme.spacing(2),\r\n \"&.MuiFab-root\": {\r\n backgroundColor: \"#2FABBF\",\r\n color: \"white\",\r\n },\r\n \"&:hover\": {\r\n backgroundColor: \"#46B4C6\",\r\n },\r\n },\r\n navigationArrows: {\r\n color: \"#18a2b8\",\r\n },\r\n //FB 4867 DK - Made few changes to OTP styles - Start\r\n otp: {\r\n width: \"2rem !important\",\r\n height: \"2rem\",\r\n margin: \"0 0.5rem\",\r\n fontSize: \"1rem\",\r\n border: \"2px solid gray\",\r\n \"&:focus\": {\r\n border: \"2px solid #18a2b8\",\r\n outlineColor: \"transparent\",\r\n },\r\n },\r\n otpError: {\r\n border: \"2px solid red\",\r\n },\r\n //FB 4867 DK - Made few changes to OTP styles - End\r\n radioGroup: {\r\n \"&.MuiFormGroup-root\": {\r\n flexDirection: \"row\",\r\n },\r\n },\r\n disabledTextfield: {\r\n \"&.Mui-disabled\": {\r\n color: \"black\",\r\n },\r\n },\r\n // FB 4574 DK - Added new class to increase the size of icon\r\n autocompleteIcon: {\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n }\r\n});\r\n\r\nexport default useStyles;\r\n","import { createContext } from \"react\";\r\nimport { Actions } from \"../actions\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page to handle classes and objects\r\n// FB 4487 DK 06/07/2021 Added a new class for error log data\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific flow\r\n// FB 4769 MS 11/02/2021 Added Job title for provider\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n// FB 4959 MS 03/01/2022 Added condition to hide PI button for existing patients in landing page\r\n// FB 6039 DK 06/30/2022 QR code scan changes\r\n// FB 6963 AS 06/09/2023 renamed some fields in InputFile for clarity\r\n// FB 7802 SK 12/14/2023 PE - Supporting Office-Specific Custom Appointment Types\r\n// FB 7719 SK 02/14/2024 PE- option to add credit card on file while booking an appointment\r\n// FB 8549 DK 10/21/2024 TeleHealth re-work\r\n\r\nexport type Store = {\r\n appointmentdetails: Appointmentdetails;\r\n providers: Provider[];\r\n facilities: Facility[];\r\n states: State[];\r\n region: FacilityRegion;\r\n defaultlocation: Facility;\r\n slotDetails: SlotDetails;\r\n patient: Patient;\r\n patientDemographics: patientDemographics; //FB 7719\r\n defaultprovider: Provider;\t\t//FB 4735 DK - Added to store default provider info\r\n};\r\n\r\n//FB 7719 Begin\r\nexport type patientDemographics = {\r\n patientfirstname: string;\r\n patientlastname: string;\r\n patientDOB: Date;\r\n address: string\r\n citystatezip: string;\r\n cellphone: string;\r\n email: string;\r\n comments: string;\r\n commpref: string;\r\n}\r\n//FB 7719 End\r\n\r\nexport type Provider = {\r\n id: number;\r\n name: string;\r\n facility_n?: number;\r\n InsuranceAcceptance?: string;\r\n bio?: string;\r\n job_title?: string; //FB 4769\r\n};\r\n\r\nexport type FacilityRegion = {\r\n id: number;\r\n name: string;\r\n state: string;\r\n};\r\n\r\nexport type Facility = {\r\n id: number;\r\n name: string;\r\n address: string;\r\n phone?: string;\r\n region: number;\r\n InsuranceAcceptance?: string;\r\n};\r\n\r\nexport type State = {\r\n name: string;\r\n};\r\n\r\nexport type Patient = {\r\n name: string;\r\n //FB 4867 DK - Added new variables to class\r\n patient_n: any;\r\n appointment_n: any;\r\n patient_type: string; //FB 4959\r\n};\r\n\r\nexport type Insurance = {\r\n id: number;\r\n name: string;\r\n planId: number;\r\n planName: string;\r\n};\r\n\r\nexport type SlotDetails = {\r\n id: number;\r\n slotDate: Date;\r\n employeeId: number;\r\n facilityId: number;\r\n employeeName: string;\r\n facilityName: string;\r\n isslotexisting: boolean;\r\n duration: number; //FB 4638 added appt duration\r\n};\r\n\r\nexport type Appointmentdetails = {\r\n appointmenttype?: string;\r\n customappointmenttype?: string;//FB 7802\r\n appointmentfilter?: string;\r\n patientType: string;\r\n isInsuranceExist?: string;\r\n insurance: Insurance;\r\n provider: Provider;\r\n location: Facility;\r\n date: Date;\r\n duration: Number; //FB 4638 added appt duration\r\n};\r\n\r\n//FB 4487 DK - Added new class for error log data\r\nexport type ErrorLog = {\r\n ERROR_LOG_DATE: Date;\r\n ERROR_LOG_ERROR_CODE: number;\r\n ERROR_LOG_DESCRIPTION: string;\r\n}\r\n\r\n//FB 4867 DK - Added new class\r\nexport type SupportFile = {\r\n DocumentType: string,\r\n OtherDocument: string,\r\n FileName: string,\r\n FileType: string,\r\n FileSize: number,\r\n Base64EncodedFile: string,\r\n Appointment_N: number\r\n}\r\n\r\n//FB 6039\r\nexport type InputFile = {\r\n SESSION_N: number,\t\t//FB 6963 renamed for clarity\r\n ImageId: number,\r\n CONTROL_NAME: string,\t\t//FB 6963 renamed for clarity\r\n Image: string\r\n}\r\n\r\n//FB 7719 Begin\r\nexport type CreditCardPaymentModel = {\r\n firstNameOnCard: string;\r\n lastNameOnCard: string;\r\n PaymentToken: string;\r\n ValidateOrAcceptPayment: string;\r\n ExpirationDate: any;\r\n CNP: string;\r\n PaymentAmount: any;\r\n address: string;\r\n address2: string;\r\n city: string;\r\n state: string;\r\n month: string;\r\n year: string;\r\n zip: string;\r\n phone: string;\r\n email: string;\r\n Memo: string;\r\n Memo2: string;\r\n FeeAmount: string;\r\n Patient_N: number;\r\n SAVE_CARD: number;\r\n CARD_NAME: string;\r\n EMPLOYEE_N: number;\r\n COMMENT: string;\r\n IS_PORTAL_PAYMENT: number;// FB 7323\r\n};\r\n//FB 7719 End\r\n\r\n//FB 8549\r\nexport type AppointmentType = {\r\n Id: number;\r\n NAME: string;\r\n COLOR: string;\r\n DURATION: number;\r\n ACTIVE_FLAG: number;\r\n NO_DOUBLE_BOOKING: number;\r\n NO_DOUBLE_BOOKING_FOR_DOCTOR: number;\r\n TIME_SLOT: number;\r\n NO_FURTHER_BOOKING: number;\r\n MAX_PER_HOUR: number;\r\n LEFT_MOST_COLUMN: number;\r\n MAX_PER_HALF_HOUR: number;\r\n IS_TELE_APPOINTMENT: number;\r\n IS_PE_ENABLED: number;\r\n ENABLE_FOR_NEW_PATIENT: number;\r\n ENABLE_FOR_EXISTING_PATIENT: number;\r\n}\r\n\r\nexport const initialState: Store = {\r\n appointmentdetails: {\r\n appointmenttype: \"\",\r\n appointmentfilter: \"\",\r\n patientType: \"\",\r\n isInsuranceExist: \"\",\r\n insurance: {\r\n id: 0,\r\n planId: 0,\r\n name: \"\",\r\n planName: \"\",\r\n },\r\n provider: {\r\n id: 0,\r\n name: \"\",\r\n },\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n duration: 0, //FB 4638 added appt duration\r\n },\r\n providers: [],\r\n facilities: [],\r\n states: [],\r\n region: {\r\n id: 0,\r\n name: \"\",\r\n state: \"\",\r\n },\r\n defaultlocation: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n slotDetails: {\r\n employeeId: 0,\r\n\r\n facilityId: 0,\r\n id: 0,\r\n slotDate: new Date(),\r\n employeeName: \"\",\r\n facilityName: \"\",\r\n isslotexisting: false,\r\n duration: 0 //FB 4638 duration default vale\r\n },\r\n patient: {\r\n name: \"\",\r\n //FB 4867 DK - Setting initial values\r\n patient_n: \"\",\r\n appointment_n: \"\",\r\n patient_type: \"\" //FB 4959\r\n },\r\n //FB 4735 DK - Added to store default provider info\r\n defaultprovider: {\r\n id: 0,\r\n name: \"\",\r\n InsuranceAcceptance: \"\",\r\n bio: \"\",\r\n job_title: \"\" //FB 4769\r\n },\r\n //FB 7719 Begin\r\n patientDemographics: {\r\n patientfirstname: \"\",\r\n patientlastname: \"\",\r\n patientDOB: new Date(),\r\n address: \"\",\r\n citystatezip: \"\",\r\n cellphone: \"\",\r\n email: \"\",\r\n comments: \"\",\r\n commpref: \"\",\r\n }\r\n //FB 7719 End\r\n};\r\n\r\nexport const Context = createContext<{\r\n state: Store;\r\n dispatch: React.Dispatch;\r\n}>(undefined as any);\r\n","import {\r\n Button,\r\n Card,\r\n CardContent,\r\n CardHeader,\r\n Grid,\r\n makeStyles,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport React, { useContext, useEffect, useState } from \"react\"; // FB 6739\r\nimport useStyles from \"./css/styles\";\r\nimport { Context } from \"../create/store\";\r\nimport globalsettings from \"../../config\";\r\n//FB 4867 DK - Importing references\r\nimport { useHistory } from \"react-router\";\r\n//FB-6264\r\n//FB 7675\r\nimport { ConvertTimeZone, GetAdminSettingValue, GetLicenseName, InsertPELogs } from \"./api\"; // FB 4960 // FB 6739\r\n\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to display the appointment booking summary\r\n// FB 4574 DK 07/15/2021 Removed \"Dr.\" string from messages\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific flow\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6109 DK 08/24/2022 Consent form integration changes\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 6739 GS 04/25/2023 Message on appointment confirmation screen\r\n// FB 7675 DK 11/09/2023 Timezone handling for appointments\r\n// FB 7719 SK 02/13/2024 PE- option to add credit card on file while booking an appointment\r\n// FB 8259 SK 02/28/2024 After booking appt with card details when user click back button needs to be handled\r\n\r\n\r\nconst cardstyles = makeStyles({\r\n subheader: {\r\n color: \"white\",\r\n },\r\n});\r\n\r\nexport default function Confirmation() {\r\n const styles = useStyles();\r\n const cardstyle = cardstyles();\r\n const { state } = useContext(Context);\r\n const [textMessage, setTextMessage] = useState(\"\"); // FB 6739\r\n\r\n let apptType = \"1\";\r\n if (state.appointmentdetails.appointmenttype === \"telederm\") {\r\n apptType = \"2\";\r\n }\r\n\r\n let patientName = state.patient.name;\r\n if (patientName !== \"\") {\r\n patientName = patientName.charAt(0).toUpperCase() + patientName.slice(1);\r\n }\r\n\r\n const dateOptions = {\r\n month: \"long\",\r\n day: \"numeric\",\r\n year: \"numeric\",\r\n weekday: \"long\",\r\n hour: \"2-digit\",\r\n minute: \"2-digit\",\r\n };\r\n\r\n // FB 6739 Begin\r\n async function GetInofficeMessage() {\r\n setTextMessage(await GetAdminSettingValue(\"InOffice_Appointment_Message\"));\r\n }\r\n\r\n useEffect(() => {\r\n GetInofficeMessage();\r\n }, []);\r\n // FB 6739 End\r\n \r\n\r\n // FB 4867 DK - Added button actions for File and Healthforms screen redirection - Start\r\n const history = useHistory();\r\n const handleSupportFilesUpload = () => {\r\n history.push(\"/upload\", state);\r\n }\r\n //FB 8259 - Begin\r\n window.addEventListener('popstate', () => {\r\n history.push(\"/logout\");\r\n });\r\n //FB 8259 - End\r\n const handleIntakeUpload = async () => {\r\n const appt_n = state.patient.appointment_n; //FB-6264\r\n window.open(globalsettings.emrAPI + \"patient_intake/pi_login.asp?app_n=\" + appt_n + \"&np=1\", \"_blank\");\r\n }\r\n const handleNextClick = async () => {\r\n // FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Next - Confirmation Page\");\r\n // FB 4960 End\r\n sessionStorage.removeItem(\"IsPatientVerified\");\r\n //FB-6264\r\n // FB 7719 Begin\r\n let appt_n = state.patient.appointment_n;\r\n if(!appt_n){\r\n appt_n=sessionStorage.getItem(\"prev_appN\");\r\n }\r\n // FB 7719 End\r\n var encodedAppt_n = Buffer.from(appt_n.toString()).toString('base64');\r\n let licensename = await GetLicenseName();\r\n licensename = licensename[0].replace(' ', '+');\r\n history.push(\"/appointments/landingPage/\" + encodedAppt_n + \"/\" + licensename + \"/0\", state);\r\n }\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n // FB 4867 DK - Added button actions for File and Healthforms screen redirection - End\r\n\r\n //FB 7675\r\n var timeZone = \"America/Port-au-Prince\";\r\n var userTimeZone = sessionStorage.getItem(\"TimeZone\");\r\n if (userTimeZone != null) {\r\n timeZone = userTimeZone;\r\n }\r\n\r\n var convertedSlot = ConvertTimeZone(state.slotDetails.slotDate.toDateString(), state.slotDetails.slotDate.toTimeString(), timeZone, \"datetime\");\r\n\r\n return (\r\n
\r\n \r\n {/* FB 4867 DK - Styling changes */}\r\n \r\n \r\n {/*FB 4574 DK - Removed uneccesary syntax*/}\r\n \r\n Your Appointment has been Booked!\r\n \r\n \r\n \r\n {/* FB 4867 DK - Styling changes */}\r\n \r\n \r\n {/* FB 4867 DK - Styling changes */}\r\n \r\n

\r\n {\"Hi \" + patientName + \",\"}\r\n
\r\n {\"Your appointment has been booked with\"}{\" \"}\r\n \r\n {\" \"}\r\n {/* FB 4574 DK - Removed \"Dr.\" string from messages */}\r\n {/* FB 7675 */}\r\n {\r\n state.slotDetails.employeeName +\r\n \" on \" +\r\n new Date(convertedSlot).toLocaleString('en-US', dateOptions) +\r\n \" at \" +\r\n state.slotDetails.facilityName}\r\n \r\n

\r\n \r\n {/* FB 4867 DK - Styling changes */}\r\n \r\n

\r\n {\"Hi \" + patientName + \",\"}\r\n
\r\n {\"Your appointment has been booked with\"}{\" \"}\r\n \r\n {\" \"}\r\n {/* FB 4574 DK - Removed \"Dr.\" string from messages */}\r\n {/* FB 7675 */}\r\n {\r\n state.slotDetails.employeeName +\r\n \" on \" +\r\n new Date(convertedSlot).toLocaleString('en-US', dateOptions)}\r\n \r\n

\r\n \r\n
\r\n {/* FB 4867 DK - Button to proceed to landing page */}\r\n \r\n \r\n To speed up your appointment, Please click on the Next button to fill out the Health Forms and upload any Supporting Documents\r\n \r\n \r\n \r\n \r\n Next\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* FB 4867 DK - Styling changes */}\r\n \r\n {/* FB 4574 DK - Removed \"Dr.\" string from messages */}\r\n {state.slotDetails.employeeName}\r\n \r\n \r\n {state.appointmentdetails.location.name === null ||\r\n state.appointmentdetails.location.name === undefined\r\n ? \"\"\r\n : state.appointmentdetails.location.name + \", \"}\r\n
\r\n {state.appointmentdetails.location.address === null ||\r\n state.appointmentdetails.location.address === undefined\r\n ? \"\"\r\n : state.appointmentdetails.location.address}\r\n
\r\n {state.appointmentdetails.location.phone === null ||\r\n state.appointmentdetails.location.phone === undefined\r\n ? \"\"\r\n : state.appointmentdetails.location.phone}\r\n \r\n
\r\n {/* FB 4867 DK - Styling changes */}\r\n \r\n {state.appointmentdetails.appointmenttype === \"telederm\"\r\n ? globalsettings.digitalApptType + \" Appointment\"\r\n : \"In-office Appointment\"}\r\n \r\n {/* FB 6109 */}\r\n \r\n {state.appointmentdetails.appointmenttype === \"inoffice\" ? textMessage : \"You will receive an email with a link to join a TeleHealth Appointment. Please use the link to join a meeting 5 minutes prior to your appointment time. For a better video visit experience, we recommend that you connect to Wi-Fi/high-speed internet connection and limit your data usage. For privacy purposes, you should be in a private place during your visit and should use headphones or a headset to avoid having someone overhearing your conversation.\"} {/* FB 6739 */}\r\n \r\n
\r\n \r\n
\r\n \r\n {/* FB 4867 DK - Removed unused code */}\r\n \r\n
\r\n );\r\n}\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\nimport {\r\n Button,\r\n TextField,\r\n ThemeProvider,\r\n createMuiTheme,\r\n IconButton,\r\n Grid,\r\n Typography,\r\n TableContainer,\r\n Select,\r\n InputLabel,\r\n MenuItem,\r\n Tooltip,\r\n DialogTitle,\r\n Dialog,\r\n DialogContent,\r\n CircularProgressProps,\r\n CircularProgress,\r\n Box,\r\n DialogActions,\r\n FormControl\r\n} from \"@material-ui/core\";\r\nimport useStyles from \"./css/styles\";\r\nimport DeleteIcon from \"@material-ui/icons/Delete\";\r\nimport Table from '@material-ui/core/Table';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport { Context, SupportFile } from \"./store\";\r\nimport { GetDocumentCategories, UploadDocuments, InsertPELogs } from \"./api\"; // FB 4960\r\nimport { useHistory } from \"react-router\";\r\nimport globalsettings from \"../../config\"; //FB 4960\r\n\r\n\r\n//Update log\r\n// FB 4867 DK 12/27/2021 Added for Support files upload\r\n// FB 4955 DK 02/15/2022 UI enhancements for Mobile Version\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6025 BR 04/26/2022 PE - Import Photos through QR code scan from smartphone\r\n// FB 8666 GA 05/16/2024 Replace SQL Job for Moving Uploaded Files to Specific EMR Categories with EMR SW Which Moves the Uploaded Files Upon Receipt\r\n// FB 9672 DK 11/15/2024 Auto scroll not working properly from iphone mini\r\n// FB 9671 DK 11/29/2024 \"take photo\" option needs to allow multiple photos to be taken\r\n\r\n\r\n\r\nfunction CircularProgressWithLabel(\r\n props: CircularProgressProps & { value: number },\r\n) {\r\n return (\r\n \r\n \r\n \r\n {/* {`${Math.round(props.value)}%`} */}\r\n \r\n \r\n );\r\n}\r\n\r\nfunction Upload(props: any) {\r\n const [documentType, setDocumentType] = useState(\"\");\r\n const [otherDocument, setOtherDocument] = useState(\"\");\r\n const [inputList, setInputList] = useState([]);\r\n const { state } = useContext(Context);\r\n const [disableSubmit, setDisableSubmit] = useState(true);\r\n const [openDialog, setOpenDialog] = useState(false);\r\n const [progress, setProgress] = React.useState(10);\r\n const [buttonLabel, setButtonLabel] = useState(\"Cancel\");\r\n const styles = useStyles();\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n },\r\n overrides: {\r\n MuiFormLabel: {\r\n asterisk: {\r\n color: 'red',\r\n }\r\n }\r\n }\r\n });\r\n var JSAlert = require(\"js-alert\");\r\n const [DocumentCategories, setDocumentCategories] = useState([]);\r\n\r\n React.useEffect(() => {\r\n const timer = setInterval(() => {\r\n setProgress((prevProgress) => (prevProgress >= 100 ? 0 : prevProgress + 10));\r\n }, 800);\r\n return () => {\r\n clearInterval(timer);\r\n };\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n inputList.length > 0 ? setDisableSubmit(false) : setDisableSubmit(true);\r\n }, [inputList])\r\n \r\n // FB 6025\r\n const useSmartphoneClick = async () => {\r\n var encodedAppt_n = Buffer.from(props.match.params.apptId).toString('base64');\r\n var encodedDocType = Buffer.from(documentType).toString('base64');\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Use Smartphone - Upload files\");\r\n setDocumentType(\"\");\r\n window.open(\"/appointment/Importphotos/\" + encodedAppt_n + \"/\" + encodedDocType)\r\n }\r\n\r\n\r\n //FB 9671 Start\r\n const addInputDocument = (e: any) => {\r\n for (let i = 0; i < e.target.files.length; i++) {\r\n const file = e.target.files[i];\r\n const fileSize = Number((file.size / (1024 * 1024)).toFixed(3));\r\n if ((file.type === \"application/pdf\" || file.type === \"image/png\" || file.type === \"image/jpeg\") && fileSize > 0) {\r\n if (fileSize <= 6) {\r\n const reader = new FileReader();\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Choose file(s) - Upload files\");\r\n //FB 4960 End\r\n reader.onload = () => {\r\n const input = {\r\n DocumentType: documentType,\r\n OtherDocument: otherDocument,\r\n FileName: file.name,\r\n FileType: file.type,\r\n FileSize: fileSize,\r\n Base64EncodedFile: reader.result?.toString().split(\"base64,\")[1],\r\n Appointment_N: Number(decodedAppt_n)\r\n } as SupportFile;\r\n inputList.push(input);\r\n setDocumentType(\"\");\r\n setOtherDocument(\"\");\r\n setButtonLabel(\"Cancel\");\r\n setDisableSubmit(false);\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n else {\r\n JSAlert.alert(\"Please select a file smaller than 6MB\", null, JSAlert.Icons.Warning);\r\n }\r\n }\r\n else {\r\n JSAlert.alert(\"Invalid file type. Please select a valid file\", null, JSAlert.Icons.Warning);\r\n }\r\n }\r\n };\r\n //FB 9671 End\r\n\r\n // handle click event of the Remove button\r\n const handleRemoveClick = (index: number) => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Delete - Upload files\");\r\n //FB 4960 End\r\n var alert = new JSAlert(\"Are you sure you want to delete this file?\", \"\", JSAlert.Icons.Question);\r\n alert.addButton(\"Yes\").then(function () {\r\n inputList.splice(index, 1);\r\n setInputList([...inputList]);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on yes - Upload files\");\r\n //FB 4960 End\r\n });\r\n alert.addButton(\"No\").then(function () {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on no - Upload files\");\r\n //FB 4960 End\r\n return;\r\n });\r\n alert.show();\r\n };\r\n\r\n const submitDocuments = async () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Upload to my chart - Upload files\");\r\n //FB 4960 End\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n setDisableSubmit(true);\r\n setOpenDialog(true);\r\n const result = await UploadDocuments(inputList, Number(decodedAppt_n));\r\n if (result === 200) {\r\n setOpenDialog(false);\r\n JSAlert.alert(\"File(s) uploaded successfully!\", null, JSAlert.Icons.Success);\r\n setButtonLabel(\"Done\");\r\n setInputList([])\r\n // .then(function () {\r\n // window.location.href = \"/closure\";\r\n // });\r\n }\r\n else {\r\n setOpenDialog(false);\r\n setDisableSubmit(false);\r\n setButtonLabel(\"Cancel\");\r\n }\r\n }\r\n const history = useHistory();\r\n\r\n const handleDone = () => {\r\n //FB 4960 Start\r\n if (buttonLabel == \"Cancel\") {\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Cancel - Upload files\");\r\n }\r\n else if (buttonLabel == \"Done\") {\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Done - Upload files\");\r\n }\r\n //FB 4960 End\r\n history.replace(\"/closure\", { origin: \"upload\" });\r\n }\r\n useEffect(() => {\r\n //FB-8666 Begin\r\n GetDocumentCategories().then((data) => { \r\n var labels = data.split(\",\").map((label: string) => label.includes(':') ? label.split(':')[0] : label);\r\n setDocumentCategories(labels);\r\n });\r\n //FB 8666 End\r\n }, []);\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n //FB 4960\r\n const SelectDocumentType = async (e: any) => {\r\n setDocumentType(e.target.value);\r\n InsertPELogs(globalsettings.clientIp, \"Selected the document \" + e.target.value);\r\n }\r\n\r\n return (\r\n
\r\n {/* FB 9672 */}\r\n \r\n \r\n \r\n \r\n To reduce your time in the office, Please upload documents to your electronic chart including: Your driver's license, Insurance card or Any important medical documents such as Lab results, Pathology reports, Relevant images.\r\n \r\n \r\n \r\n\r\n
\r\n \r\n {/*FB 4955*/}\r\n \r\n \r\n Document category\r\n setDocumentType(e.target.value)}\r\n onChange={e => SelectDocumentType(e)} // FB 4960\r\n name=\"document_type\"\r\n >\r\n {\r\n DocumentCategories.map((item: string) => {item} )\r\n }\r\n \r\n \r\n \r\n \r\n {/*FB 4955*/}\r\n \r\n \r\n setOtherDocument(e.target.value)}\r\n fullWidth\r\n />\r\n \r\n \r\n {/*FB 4955*/}\r\n \r\n 0 ? false : true}\r\n >\r\n Choose File\r\n {/* FB 9671 */}\r\n addInputDocument(e)}\r\n onClick={(event) => {\r\n event.currentTarget.value = ''\r\n }}\r\n accept=\"image/*,.pdf\"\r\n hidden\r\n multiple\r\n />\r\n \r\n\r\n \r\n (Accepted file types: pdf, jpg, png. Max.size: 6 MB)\r\n \r\n \r\n\t\t\t{/* FB 6025 Start */}\r\n \r\n 0 ? false : true}\r\n style={{ display: window.innerWidth < 768 ? \"None\" : \"Initial\" }}\r\n >\r\n Use Smartphone\r\n \r\n \r\n {/* FB 6025 End */}\r\n \r\n \r\n {/*FB 4955*/}\r\n \r\n * Mandatory fields\r\n \r\n \r\n
\r\n\r\n
\r\n 0 ? \"flex\" : \"none\", alignItems: \"center\", justifyContent: \"center\" }}>\r\n {/*FB 4955*/}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Selected files\r\n \r\n \r\n \r\n Document Category\r\n Name\r\n Size\r\n Tools\r\n \r\n \r\n \r\n {inputList.map((input, index) => {\r\n return (\r\n \r\n \r\n {input.DocumentType === \"other\" ? input.OtherDocument : input.DocumentType}\r\n \r\n \r\n {input.FileName}\r\n \r\n \r\n {input.FileSize + \" MB\"}\r\n \r\n \r\n \r\n handleRemoveClick(index)} size=\"small\">\r\n \r\n \r\n \r\n \r\n )\r\n })}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n {/*FB 4955*/}\r\n \r\n \r\n Upload to my chart\r\n \r\n \r\n \r\n\r\n \r\n \r\n {/*FB 4735 DK - Added provider specific path to condition*/}\r\n \r\n {buttonLabel}\r\n \r\n \r\n \r\n\r\n \r\n \r\n Uploading...\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Upload;","import React, { useEffect, useState } from \"react\";\r\nimport TextField from \"@material-ui/core/TextField\";\r\nimport DateFnsUtils from '@date-io/date-fns';\r\nimport {\r\n MuiPickersUtilsProvider,\r\n KeyboardDatePicker,\r\n} from '@material-ui/pickers';\r\nimport { GetLicenseName, GetPatientContactInfo, SearchPatient } from \"../appointments/create/api/index\";\r\nimport {\r\n Grid,\r\n Button,\r\n makeStyles,\r\n createMuiTheme,\r\n ThemeProvider,\r\n Dialog,\r\n DialogContent,\r\n Typography,\r\n NativeSelect,\r\n DialogActions,\r\n DialogTitle,\r\n IconButton\r\n} from \"@material-ui/core\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport useStyle from \"../appointments/create/css/styles\";\r\nimport { format } from \"date-fns\";\r\nimport FormHelperText from \"@material-ui/core/FormHelperText\";\r\nimport FormControl from \"@material-ui/core/FormControl\";\r\nimport InputLabel from \"@material-ui/core/InputLabel\";\r\nimport OTPModal from \"../appointments/create/components/OTPModal\";\r\nimport { useHistory } from \"react-router\";\r\nimport CloseIcon from \"@material-ui/icons/Close\";\r\n\r\n\r\n//Update log\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n//\r\n\r\n\r\nexport default function Verfication(props: any) {\r\n const [FirstName, setFirstName] = useState(\"\");\r\n const [LastName, setLastName] = useState(\"\");\r\n const [DOB, setDOB] = useState(null);\r\n const [Gender, setGender] = useState(0);\r\n const [firstNameError, setfirstNameError] = useState(false);\r\n const [firstNameMessage, setfirstNameMessage] = useState(\"\");\r\n const [lastNameError, setlastNameError] = useState(false);\r\n const [lastNameMessage, setlastNameMessage] = useState(\"\");\r\n const [dateforDOBfield, setDateforDOBfield] = useState(null);\r\n const [DOBError, setDOBError] = useState(false);\r\n const [DOBMessage, setDOBMessage] = useState(\"\");\r\n const [GenderError, setGenderError] = useState(false);\r\n const [genderMessage, setGenderMessage] = useState(\"\");\r\n const [displayVerfiedMessage, SetdisplayVerfiedMessage] = useState(\"none\");\r\n const [resultMessage, setResultMessage] = useState(\"\");\r\n const [openDialog, setOpenDialog] = useState(false);\r\n const [patientContact, setPatientContact] = useState({ email: \"\", cellPhone: \"\" });\r\n const [validationObj, setValidationObj] = useState({\r\n firstNameError: false,\r\n firstNameMessage: \"\",\r\n lastNameError: false,\r\n lastNameMessage: \"\",\r\n DOBError: false,\r\n DOBMessage: \"\"\r\n });\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n\r\n const handleFirstNameChange = (event: any) => {\r\n setFirstName(event.target.value);\r\n const re = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (event.target.value === \"\" && re.test(event.target.value)) {\r\n setFirstName(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: true,\r\n firstNameMessage: \"Enter valid first name\",\r\n });\r\n\r\n setfirstNameError(true);\r\n setfirstNameMessage(\"Enter valid first name\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: false,\r\n firstNameMessage: \"\",\r\n });\r\n\r\n setfirstNameError(false);\r\n setfirstNameMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient last name\r\n const handleLastNameChange = (event: any) => {\r\n setLastName(event.target.value);\r\n const re = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (event.target.value === \"\" && re.test(event.target.value)) {\r\n setLastName(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: true,\r\n lastNameMessage: \"Enter valid last name\",\r\n });\r\n\r\n setlastNameError(true);\r\n setlastNameMessage(\"Enter valid last name\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: false,\r\n lastNameMessage: \"\",\r\n });\r\n\r\n setlastNameError(false);\r\n setlastNameMessage(\"\");\r\n }\r\n };\r\n\r\n const handleDOBChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setDateforDOBfield(date);\t\t//FB 4499 DK - Save the selected date\r\n setDOB(format(date, \"yyyy-MM-dd\"));\r\n if (\r\n format(date, \"yyyy-MM-dd\") < \"1800-01-01\" &&\r\n format(date, \"yyyy-MM-dd\") > \"9999-01-01\"\r\n ) {\r\n alert(format(date, \"yyyy-MM-dd\"));\r\n }\r\n if (date == null) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n if (date != null) {\r\n setDOBError(false);\r\n setDOBMessage(\"\");\r\n }\r\n }\r\n else {\r\n if (date == \"Invalid Date\") {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n }\r\n };\r\n\r\n const handleGenderChange = (event: React.ChangeEvent<{ value: any }>) => {\r\n setGender(parseInt(event.target.value));\r\n if (event.target.value === \"\") {\r\n setGenderError(true);\r\n setGenderMessage(\"Select the State\");\r\n } else {\r\n setGenderError(false);\r\n setGenderMessage(\"\");\r\n }\r\n };\r\n\r\n const styles = useStyle();\r\n\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n buttonactive: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n width: \"160px\",\r\n },\r\n inactive: {\r\n backgroundColor: \"white\",\r\n color: \"#18a2b8\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n },\r\n buttonMargin: {\r\n marginLeft: \"100px\",\r\n },\r\n datepickerroot: {\r\n \"&.MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n },\r\n dropdown_nomargin: {\r\n \"&.MuiFormControl-marginNormal\": {\r\n color: \"#18a2b8\",\r\n },\r\n //FB 4574 DK - Added styling for dropdown icon\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n //FB 4574 DK - Added a new class for calender icon\r\n iconCSS: {\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"1.8rem\"\r\n },\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n }\r\n });\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n const { register, handleSubmit, errors } = useForm();\r\n\r\n\r\n const patientObj = {\r\n PATIENT_FIRST_NAME: FirstName,\r\n PATIENT_LAST_NAME: LastName,\r\n PATIENT_BIRTH_DAY: DOB,\r\n GENDER_N: Gender,\r\n }\r\n\r\n const buttonclick = async () => {\r\n const reName = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (!reName.test(FirstName)) {\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: true,\r\n firstNameMessage: \"Enter valid first name\",\r\n });\r\n setfirstNameError(true);\r\n setfirstNameMessage(\"Enter valid first name\");\r\n }\r\n if (!reName.test(LastName)) {\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: true,\r\n lastNameMessage: \"Enter valid last name\",\r\n });\r\n setlastNameError(true);\r\n setlastNameMessage(\"Enter valid last name\");\r\n }\r\n //FB 4371: Bindu:Start - Bug fix for the DOB\r\n if (DOB == null) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n var reGoodDate = /^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$/;\r\n if (!reGoodDate.test(DOB)) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0\r\n ) {\r\n\r\n const data = await SearchPatient(patientObj).then(async (data) => {\r\n if (data.length == 0 || data[0] == undefined) {\r\n SetdisplayVerfiedMessage(\"flex\");\r\n setResultMessage(\"Patient record not found\")\r\n } else {\r\n SetdisplayVerfiedMessage(\"flex\");\r\n setResultMessage(\"\");\r\n setPatientContact({ email: data[0].PATIENT_EMAIL, cellPhone: data[0].PATIENT_CELL_PHONE });\r\n setOpenDialog(true);\r\n }\r\n }).catch((error) => error);\r\n\r\n } else {\r\n if (Gender == 0) {\r\n setGenderError(true);\r\n setGenderMessage(\"Select the gender\");\r\n }\r\n }\r\n };\r\n\r\n const history = useHistory();\r\n useEffect(() => {\r\n async function redirect() {\r\n var IsPatientVerified = sessionStorage.getItem(\"IsPatientVerified\");\r\n if (IsPatientVerified === \"Yes\") {\r\n let licensename = await GetLicenseName();\r\n licensename = licensename[0].replace(' ', '+');\r\n history.push(\"/appointments/landingPage/\" + props.match.params.apptId + \"/\" + licensename + \"/1\");\r\n }\r\n }\r\n redirect();\r\n }, [openDialog]);\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n setResultMessage(\"\");\r\n }, [FirstName, LastName, DOB, Gender])\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n Please identify yourself\r\n \r\n \r\n \r\n \r\n \r\n \r\n {resultMessage}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n handleFirstNameChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n label=\"First Name *\"\r\n inputRef={register({\r\n required: true,\r\n pattern: /^[A-Za-z0-9 ]+$/i,\r\n })}\r\n autoCapitalize=\"none\"\r\n helperText={firstNameMessage}\r\n error={firstNameError}\r\n />\r\n \r\n \r\n handleLastNameChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n inputRef={register({\r\n required: true,\r\n pattern: /^[A-Za-z0-9]+$/i,\r\n })}\r\n autoCapitalize=\"none\"\r\n helperText={lastNameMessage}\r\n error={lastNameError}\r\n label=\"Last Name *\"\r\n />\r\n \r\n \r\n \r\n \r\n {/* FB 4371 : Bindu:Start - Below date control has been changed for the dat of birth field*/}\r\n \r\n \r\n handleDOBChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n maxDate={new Date()}\r\n initialFocusedDate={null}\r\n helperText={DOBMessage}\r\n error={DOBError} //FB 4409 DK - Added to disable the DOB field after existing patient verified\r\n className={classes.iconCSS} //FB 4574 DK - Added styling for icon\r\n />\r\n \r\n \r\n {/* FB 4371 : Bindu:End - Below date control has been changed for the dat of birth field*/}\r\n \r\n \r\n \r\n \r\n Gender *\r\n \r\n \r\n \r\n \r\n \t\t//FB 4567 DK - Modified gender option from 'Other' to 'Unknown'\r\n \r\n {genderMessage}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {/* */}\r\n \r\n Verify\r\n \r\n {/* */}\r\n\r\n \r\n\r\n \r\n \r\n \r\n Verification\r\n \r\n setOpenDialog(false)}\r\n style={{\r\n position: 'absolute',\r\n right: 8,\r\n top: 8,\r\n }}\r\n >\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 React, { useState, useEffect, useContext } from \"react\"; //FB 4959\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport { Grid, Button, makeStyles, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, CircularProgress } from \"@material-ui/core\"; //FB 9964\r\nimport { useHistory } from \"react-router-dom\";\r\n//FB 6109\r\n//FB-6264\r\nimport { ConfirmAppt, ConfirmParkinglot, LinkExpiry, GetSchedulingPhone, GetPatientContactInfo, GetPatientTypeByApptID, InsertPELogs, GetPatientN, GetAppointmentType, GetAdminSettingValue } from '../appointments/create/api'; //FB 4941\t//FB 4959 //FB 4960\r\nimport OTPModal from \"../appointments/create/components/OTPModal\";\r\nimport CloseIcon from \"@material-ui/icons/Close\";\r\nimport Styles from \"../appointments/create/css/styles\";\r\nimport globalsettings from \"../config\";\r\nimport { Context } from \"../appointments/create/store\"; //FB 4959\r\n\r\n\r\n//Update log\r\n// FB 4867 DK 12/27/2021 Added for the File and Health forms upload feature\r\n// FB 4941 DK 02/07/2022 Logic to Enable/Disable parkinglot\r\n// FB 4959 MS 03/01/2022 Added condition to hide PI button for existing patients in landing page\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6109 DK 08/24/2022 Consent form integration changes\r\n// FB 6158 GS 09/19/2022 Added fix to hide the button displayed when admin parameter \"LandingPageFeatures\" has no value\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 6950 KK 06/08/2023 Admin setting to enable/disable Intake or File upload or both\r\n// FB 8088 SK 01/30/2024 Make the PE Confirm Appointment Landing Page Text Customizable\r\n// FB 9964 KI 01/22/2025 Portal - health forms and document upload are unavailable\r\n\r\nconst Landingpage = (props: any) => {\r\n const useStyles = makeStyles({\r\n buttonActive: {\r\n backgroundColor: \"#B9E3E9\",\r\n color: \"black\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n pointerEvents: \"none\",\r\n width: \"350px\",\r\n height: \"40px\"\r\n },\r\n buttonInactive: {\r\n backgroundColor: \"white\",\r\n color: \"#18a2b8\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n width: \"350px\",\r\n height: \"40px\"\r\n },\r\n buttonDone: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n fontWeight: \"bold\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n }\r\n },\r\n })\r\n\r\n const { state } = useContext(Context); //FB 4959 \r\n const [confirmAppt, setConfirmAppt] = useState(\"\");\r\n const [apptInstructions, setApptinstrunction] = useState(\"\"); //FB 8088\r\n const [confirmParkingLot, setConfirmParkingLot] = useState(\"\");\r\n const [patientIntake, setPatientIntake] = useState(\"\");\r\n const [uploadFiles, setUploadFiles] = useState(\"none\");\r\n const classes = useStyles();\r\n const styles = Styles();\r\n const history = useHistory();\r\n const [returnValue, setReturnValue] = useState(\"\");\r\n const [displayMessage, setDisplayMessage] = useState(\"\");\r\n const [parkingLotMessage, setParkingLotMessage] = useState(\"\");\r\n const [fontColor, setFontColor] = useState(\"limegreen\");\r\n const [assisstanceMessage, setAssisstanceMessage] = useState(\"\");\r\n const [pastMessage, setPastMessage] = useState(\"none\");\r\n const [buttonsDisplay, setButtonsDisplay] = useState(\"initial\");\r\n const [displayPastMessage, setDisplayPastMessage] = useState(\"\");\r\n const [showPLMButton, setShowPLMButton] = useState(false); //FB 4941\r\n const [displayCancelledMessage, setDisplayCancelledMessage] = useState(\"\");\r\n const [cancelledMessage, setCancelledMessage] = useState(\"none\");\r\n const [confirmationMessage, setConfirmationMessage] = useState(\"\");\r\n const [showConfirmButton, setShowConfirmButton] = useState(\"flex\");\r\n const [openDialog, setOpenDialog] = useState(false);\r\n const [selectedStep, setSelectedStep] = useState(\"\");\r\n const [isIntakeAndUploadEnabled, setIsIntakeAndUploadEnabled] = useState(null); // 9964 //FB 6950 \r\n const [isParkingLotEnabled, setIsParkingLotEnabled] = useState(true); //FB 4941\r\n const [patientContact, setPatientContact] = useState(\"\");\r\n const [patN, setPatN] = React.useState(\"\"); //FB 4960\r\n //FB 6109 Start\r\n const [appt_type, setAppt_type] = useState(\"In-Office\");\r\n const [features, setFeatures] = useState([]);\r\n\r\n async function GetApptType() {\r\n let decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n const appt_type = await GetAppointmentType(decodedAppt_n);\r\n setAppt_type(appt_type[0]);\r\n }\r\n\r\n async function GetFeatures() {\r\n const data = await GetAdminSettingValue(\"LandingPageFeatures\");\r\n if (data != null && data != \"\") { //FB 6158\r\n setFeatures(data.split(\";\"));\r\n }\r\n //FB 8088 - Begin\r\n const adminData = await GetAdminSettingValue(\"PE_Post_Appt_Instructions\");\r\n if (adminData != null && adminData != \"\") {\r\n setApptinstrunction(adminData);\r\n }\r\n //FB 8088 - End\r\n }\r\n\r\n useEffect(() => {\r\n GetFlag();\r\n GetPatient_N(); //FB 4960\r\n GetApptType();\r\n GetFeatures();\r\n }, []); //FB 4810\r\n\r\n //FB 6109 End\r\n\r\n //FB 4960\r\n async function GetPatient_N() {\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n const pat_n = await GetPatientN(decodedAppt_n);\r\n setPatN(pat_n);\r\n }\r\n\r\n //FB 4941 DK - Start\r\n async function GetFlag() {\r\n //FB-6264\r\n let response = await GetAdminSettingValue(\"Enable_PatientIntake_And_FileUpload_on_PE\");\r\n if (response.length != 0) {\r\n //FB 6950 KK\r\n setIsIntakeAndUploadEnabled(Number(response));\r\n //FB-6264\r\n // if (response == 1) {\r\n // setIsIntakeAndUploadEnabled(true);\r\n // }\r\n // else {\r\n // setIsIntakeAndUploadEnabled(false);\r\n // }\r\n }\r\n //FB-6264\r\n let result = await GetAdminSettingValue(\"Enable_Parking_Lot_Management\");\r\n if (result.length != 0) {\r\n //FB-6264\r\n if (result == 1) {\r\n setIsParkingLotEnabled(true);\r\n }\r\n else {\r\n setIsParkingLotEnabled(false);\r\n }\r\n }\r\n onload();\r\n }\r\n //FB 4941 DK - End\r\n\r\n\r\n const onload = async () => {\r\n //sessionStorage.removeItem(\"IsPatientVerified\");\r\n props.match.params.apptId = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n //FB 4959 MS BEGIN\r\n const ptTypeData = await GetPatientTypeByApptID(props.match.params.apptId);\r\n if (ptTypeData == 1)\r\n state.patient.patient_type = \"existing\";\r\n //FB 4959 MS END \r\n const linkExpiryReturnData = await LinkExpiry(props.match.params.apptId, props.match.params.licenseName);\r\n if (props.match.params.flag == 0) {\r\n setShowConfirmButton(\"none\");\r\n setShowPLMButton(false); //FB 4941\r\n }\r\n if (props.match.params.flag == 1) {\r\n const data = await ConfirmAppt(props.match.params.apptId, props.match.params.licenseName);\r\n\r\n if (linkExpiryReturnData == \"Appointment is today\") {\r\n if (props.match.params.flag == 1) {\r\n setShowPLMButton(true); //FB 4941\r\n }\r\n if (data == \"Appointment is confirmed\") {\r\n setConfirmationMessage(\"Your appointment is confirmed\")\r\n }\r\n }\r\n if (linkExpiryReturnData == \"Appointment is in the present or future date\") {\r\n setShowPLMButton(false); //FB 4941\r\n if (data == \"Appointment is confirmed\") {\r\n setConfirmationMessage(\"Your appointment is confirmed\")\r\n }\r\n }\r\n }\r\n const SchedulingPhoneReturnData = await GetSchedulingPhone(props.match.params.apptId, props.match.params.licenseName);\r\n var cleaned = ('' + SchedulingPhoneReturnData).replace(/\\D/g, '');\r\n var match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\r\n var phone = \"\";\r\n if (match) {\r\n phone = '(' + match[1] + ') ' + match[2] + '-' + match[3];\r\n }\r\n\r\n if (linkExpiryReturnData == \"Appointment is in the past\") {\r\n setPastMessage(\"flex\");\r\n setButtonsDisplay(\"none\")\r\n setDisplayPastMessage(\"The link you clicked on, is for the appointment that is already occured.\");\r\n setAssisstanceMessage(\"For further assistance please call :\" + phone);\r\n setFontColor(\"black\");\r\n }\r\n if (linkExpiryReturnData == \"Appointment is cancelled\") {\r\n setCancelledMessage(\"flex\");\r\n setButtonsDisplay(\"none\")\r\n setDisplayCancelledMessage(\"The link you clicked on, is for the appointment that is already cancelled.\");\r\n setAssisstanceMessage(\"For further assistance please call :\" + phone);\r\n setFontColor(\"black\");\r\n }\r\n }\r\n\r\n const confirmApptClick = async (selected: string) => {\r\n setConfirmAppt(selected);\r\n const data = await ConfirmAppt(props.match.params.apptId, props.match.params.licenseName);\r\n setReturnValue(data);\r\n if (data == \"Appointment is confirmed\") { // FB 4831\r\n setDisplayMessage(\"Confirmed\");\r\n setFontColor(\"limegreen\");\r\n }\r\n }\r\n\r\n const confirmParkinglotClick = async (selected: string) => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Check-in from office parking lot for patient\" + patN + \" - Landing Page\");\r\n //FB 4960 End\r\n setConfirmParkingLot(selected);\r\n const data = await ConfirmParkinglot(props.match.params.apptId, props.match.params.licenseName);\r\n setReturnValue(data);\r\n if (data == \"Patient Arrival is confirmed\") { // FB 4831\r\n setParkingLotMessage(\"Our office will be notified of your arrival\");\r\n setFontColor(\"limegreen\");\r\n }\r\n }\r\n\r\n const patientIntakeClick = async () => {\r\n var IsPatientVerified = sessionStorage.getItem(\"IsPatientVerified\");\r\n var encodedAppt_n = Buffer.from(props.match.params.apptId).toString('base64');\r\n setSelectedStep(\"HealthForms\");\r\n if (props.match.params.flag == 0) {\r\n if (IsPatientVerified === \"Yes\") {\r\n const IntakeURL = globalsettings.emrAPI + \"patient_intake/note_add_edit.asp?app_n=\" + encodedAppt_n;\r\n window.open(IntakeURL);\r\n }\r\n else {\r\n const data = await GetPatientContactInfo(props.match.params.apptId);\r\n if (data.length > 0) {\r\n setPatientContact(data[0]);\r\n setOpenDialog(true);\r\n }\r\n }\r\n }\r\n else {\r\n if (IsPatientVerified === \"Yes\") {\r\n var encodedAppt_n = Buffer.from(props.match.params.apptId).toString('base64');\r\n const IntakeURL = globalsettings.emrAPI + \"patient_intake/note_add_edit.asp?app_n=\" + encodedAppt_n;\r\n window.open(IntakeURL);\r\n }\r\n else {\r\n history.push(\"/VerifyPatient/\" + encodedAppt_n, { selectedStep: \"HealthForms\" });\r\n }\r\n }\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Patient Intake for patient \" + patN + \"- Landing page\");\r\n //FB 4960 End\r\n }\r\n\r\n const uploadFilesClick = async () => {\r\n setSelectedStep(\"FileUpload\");\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Upload clinical/demographic documents \" + patN + \" - Landing Page\");\r\n //FB 4960 End\r\n var IsPatientVerified = sessionStorage.getItem(\"IsPatientVerified\");\r\n var encodedAppt_n = Buffer.from(props.match.params.apptId).toString('base64');\r\n if (props.match.params.flag == 0) {\r\n if (IsPatientVerified === \"Yes\") {\r\n const Uploadurl = window.location.origin + \"/upload/\" + encodedAppt_n;\r\n window.open(Uploadurl);\r\n }\r\n else {\r\n const data = await GetPatientContactInfo(props.match.params.apptId);\r\n if (data.length > 0) {\r\n setPatientContact(data[0]);\r\n setOpenDialog(true);\r\n }\r\n }\r\n } else {\r\n if (IsPatientVerified === \"Yes\") {\r\n const Uploadurl = window.location.origin + \"/upload/\" + encodedAppt_n;\r\n window.open(Uploadurl);\r\n }\r\n else {\r\n history.push(\"/VerifyPatient/\" + encodedAppt_n, { selectedStep: \"FileUpload\" });\r\n }\r\n }\r\n }\r\n\r\n //FB 6109\r\n function GotoFeature(feature: string) {\r\n var encodedAppt_n = Buffer.from(props.match.params.apptId).toString('base64');\r\n const IntakeURL = globalsettings.emrAPI + \"patient_intake/note_add_edit.asp?app_n=\" + encodedAppt_n + \"&template=\" + feature;\r\n window.open(IntakeURL);\r\n }\r\n\r\n const handleDone = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Done - Landing Page\");\r\n //FB 4960 End\r\n history.replace(\"/closure\", { origin: \"landingPage\" });\r\n }\r\n\r\n //FB 4960\r\n const CloseDialog = () => {\r\n setOpenDialog(false);\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Close\");\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n {/* */}\r\n \r\n

\r\n {displayPastMessage}\r\n
\r\n {/*
*/}\r\n \r\n \r\n \r\n

\r\n {assisstanceMessage}\r\n
\r\n \r\n \r\n\r\n \r\n

\r\n {displayCancelledMessage}\r\n
\r\n \r\n \r\n \r\n {assisstanceMessage}\r\n \r\n \r\n
\r\n \r\n {/*FB 4574 DK - Removed uneccesary syntax*/}\r\n {/*FB 8088*/}\r\n {/*FB 9964 added loader*/}\r\n \r\n {isIntakeAndUploadEnabled === null\r\n ? \r\n : isIntakeAndUploadEnabled === 0\r\n ? \"Patient health forms and Document upload features are temporarily disabled. Apologies for the inconvenience.\"\r\n : apptInstructions}\r\n \r\n\r\n \r\n
\r\n {/* \r\n confirmApptClick(\"confirm\")}\r\n className={\r\n confirmAppt === \"confirm\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n >\r\n Confirm Appointment\r\n \r\n \r\n {displayMessage}\r\n \r\n \r\n */}\r\n \r\n \r\n {confirmationMessage}\r\n \r\n \r\n
\r\n {/* FB 4959 MS BEGIN */}\r\n {/* FB 6950 KK --included patient intake condition */}\r\n {state.patient.patient_type != \"existing\" ? (\r\n \r\n patientIntakeClick()}\r\n className={classes.buttonInactive}\r\n >\r\n Complete Health Forms\r\n \r\n \r\n ) : (<>)}\r\n {/* FB 4959 MS END */}\r\n {/* FB 6950 KK --included file upload condition */}\r\n
\r\n \r\n uploadFilesClick()}\r\n className={classes.buttonInactive}\r\n >\r\n Upload clinical/demographic documents\r\n \r\n \r\n
\r\n\r\n {/* FB 6109 */}\r\n {features.length > 0 ? (features.map((feature: string) => ( //FB 6158\r\n <>\r\n \r\n GotoFeature(feature.split(\":\")[1])}\r\n className={classes.buttonInactive}\r\n style={{ display: feature.toLowerCase().includes(\"tele\") ? (appt_type.toLowerCase().includes(\"tele\") ? \"flex\" : \"none\") : \"flex\" }}\r\n >\r\n {feature.split(\":\")[0]}\r\n \r\n \r\n
\r\n \r\n ))) : <>} {/*FB 6158 */}\r\n\r\n {/* FB 4941 */}\r\n \r\n confirmParkinglotClick(\"confirmParkingLot\")}\r\n className={\r\n confirmParkingLot === \"confirmParkingLot\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n\r\n >\r\n Check-in from office parking lot\r\n \r\n \r\n \r\n \r\n {parkingLotMessage}\r\n \r\n \r\n \r\n \r\n \r\n Done\r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n Verification\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Landingpage;\r\n","import { format } from \"date-fns\";\r\n//FB 4867 DK - Importing missing classes\r\n//FB 8549\r\nimport { ErrorLog, Facility, FacilityRegion, Provider, State, SupportFile, InputFile, CreditCardPaymentModel, AppointmentType } from \"../store\"; //FB 4487 DK - importing ErrorLog class //FB 6039 //FB 7719\r\n//FB 6036\r\nimport AccessToken, { VideoGrant } from \"twilio/lib/jwt/AccessToken\";\r\nimport globalsettings from \"../../../config\";\r\nimport React from \"react\";\t//FB 4867\r\nimport moment from \"moment-timezone\"; //FB 7675\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page to handle API calls\r\n// FB 4371 DK 04/20/2021 Added a new parameter to identify the appointments created by PE\r\n// FB 4371 DK 04/20/2021 Added new param to send appointment type\r\n// FB 4487 DK 06/07/2021 Implemented error logging for API calls\r\n// FB 4499 DK 06/09/2021\t Fix for appointment creation failure\r\n// FB 4498 BR 06/10/2021\t Review email for note creation\r\n// FB 4556 DK 07/07/2021 Implement client side error handling on PE\r\n// FB 4653 BR 08/23/2021 PE - Text message changed in review emails\r\n// FB 4660 BR 08/30/2021 PE - Appointment confirmation url\r\n// FB 4661 BR 08/30/2021 PE - ParkingLot confirmation url\r\n// FB 4696 DK 09/16/2021 Fixed \"insurance accepted locations are seen under out-of-network on location dropdown\" issue\r\n// FB 4769 MS 11/02/2021 Added Job title Info for Provider\r\n// FB 4780 BR 11/02/2021 In PE, Getting Email/Cell for Existing Patients\r\n// FB 4763 DK 10/21/2021 Added new function to get decoded url's\r\n// FB 4810 MS 11/22/2021 Fixed multiple calls to API issue\r\n// FB 4831 BR 11/26/2021 Appointment Confirmation - it refreshs every sec when the page is still open.\r\n// FB 4774 DK 11/24/2021 Added new function to format phone numbers\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n// FB 4941 DK 02/07/2022 Added method to get parkinglot enable/disable flag\r\n// FB 4949 DK 02/11/2022 Added method to get insurance enable/disable flag\r\n// FB 4959 MS 03/01/2022 Added condition to hide PI button for existing patients in landing page\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6036 MS 05/20/2022 Telehealth Changes\r\n// FB 6039 DK 06/30/2022 QR code scan changes\r\n// FB 6109 DK 08/24/2022 Consent form integration changes\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 6361 DK\t01/03/2023 Employee Bio missing on ByDate workflow\r\n// FB 6752 DK 05/16/2023 Manage communication preference on PE\r\n// FB 6963 AS 06/11/2023 Handle upload errors properly\r\n// FB 7675 DK 11/09/2023 Timezone handling for appointments\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7802 SK 12/14/2023 PE - Supporting Office-Specific Custom Appointment Types\r\n// FB 7917 DK 12/15/2023 Timezone handling with admin setting\r\n// FB 7997 SK 12/28/2023 PE- When an inactive appointment is mentioned in the admin parameter we should show that in PE\r\n// FB 7719 SK 02/14/2024 PE- option to add credit card on file while booking an appointment\r\n// FB 8108 KI 02/15/2024 Scanning the virus using clamAV antivirus while uploading the pdf file in portal\r\n// FB 8680 DK 05/21/2024 Practice phone related changes\r\n// FB 8549 DK 10/21/2024 TeleHealth re-work\r\n// FB 9735 DK \t12/05/2024 On PE Sites, In Office vs TeleHealh is the First Patient Choice. These Must be Restictions Here\r\n\r\n//FB 6264\r\nconst EMRbaseURL = globalsettings.emrAPI;\r\n\r\n//FB 4371 DK Added to get providers list\r\n//FB 4487 DK Optimized the code to avoid multiple API calls - Start \r\nexport async function GetProviders(insurance_id: number, apptType: any): Promise {\r\n let url: string = \"\";\r\n let finalList: any;\r\n let filteredProviders, allProviders;\r\n const union = (arr1: any, arr2: any, key: any) => [\r\n ...arr1\r\n .concat(arr2) // concat the arrays\r\n .reduce(\r\n (m: any, o: any) => (m.has(o[key]) ? m : m.set(o[key], o)),\r\n new Map()\r\n ) // reduce to a map by value of key\r\n .values(),\r\n ];\r\n\r\n // FB 4371 DK - Added condition to check the appointment type and change the end point\r\n if (apptType === \"telederm\") {\r\n // FB-6264\r\n url = globalsettings.emrAPI + \"api/Provider/TeleHealth/GetAllProviders\";\r\n }\r\n else {\r\n // FB-6264\r\n url = globalsettings.emrAPI + \"api/Provider/GetAllProviders\";\r\n }\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(url);\r\n if (!response.ok) {\r\n // FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n allProviders = await response.json();\r\n\r\n if (insurance_id > 0) {\r\n allProviders = allProviders.map((key: any) => ({\r\n ...key,\r\n InsuranceAcceptance: \"Out-of-Network\",\r\n }));\r\n filteredProviders = await GetProvidersByInsurance(insurance_id);\r\n finalList = union(filteredProviders, allProviders, \"EMPLOYEE_N\");\r\n }\r\n else {\r\n finalList = allProviders;\r\n }\r\n return finalList.map((key: any) => {\r\n return {\r\n name: `${key.EMPLOYEE_FIRST_NAME} ${key.EMPLOYEE_LAST_NAME}`,\r\n id: key.EMPLOYEE_N,\r\n facility_n: key.FACILITY_N,\r\n InsuranceAcceptance: key.InsuranceAcceptance,\r\n bio: key.EMPLOYEE_BIO,\r\n job_title: key.EMPLOYEE_JOB_TITLE //FB 4769\r\n } as Provider;\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n//FB 4487 DK Optimized the code to avoid multiple API calls - End\r\n\r\n//FB 4960 BR Start-Logging all actions on PE\r\nexport async function GetPatientN(apptId: any) {\r\n const configUrl = globalsettings.emrAPI;\r\n const targetUrl = configUrl + \"api/GetPatient_N?id=\" + apptId; //FB-6264\r\n return fetch(targetUrl).then((response) => response.json());\r\n}\r\n\r\nconst insertLogs = async () => {\r\n InsertPELogs(globalsettings.clientIp, \"Click on Phone Number\");\r\n}\r\n\r\nexport async function InsertPELogs(ipaddress: string, action: string) {\r\n const url = globalsettings.emrAPI;\r\n\r\n //FB 6264\r\n const targetUrl =\r\n url +\r\n \"api/AddPELogs?ipaddress=\" +\r\n ipaddress + \"&action=\" + action;\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n return fetch(targetUrl, config).then((response) => response.ok);\r\n}\r\n//FB 4960 BR End-Logging all actions on PE\r\n\r\n//FB 7802 - Begin\r\nexport async function GetAppointmentTypeFromAdmin(adminSettting: string) {\r\n let url = globalsettings.emrAPI + `api/Provider/GetAppointment?appointmentType=` + adminSettting;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n //FB 8549\r\n let data = await response.json();\r\n return data.map((type: any) => {\r\n return type as AppointmentType;\r\n });\r\n }\r\n}\r\n//FB 7802 End\r\n\r\n//FB 7997 - Begin\r\nexport async function ValidateAppointmentType(appointmentTypes: string) {\r\n let url = globalsettings.emrAPI + `api/Provider/ValidateAppointmentType?appointmentTypes=` + appointmentTypes;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n//FB 7997 End\r\n\r\n\r\n//FB 4487 DK - Added method to get list of providers accept the selected insurance\r\nexport async function GetProvidersByInsurance(insurance_id: number): Promise {\r\n const url = globalsettings.emrAPI + \"api/Provider/GetProvidersByInsurance/\" + insurance_id; //FB-6264\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let filteredProviders = await response.json();\r\n filteredProviders = filteredProviders.map((key: any) => ({\r\n ...key,\r\n InsuranceAcceptance: \"\",\r\n }));\r\n\r\n return filteredProviders as Provider[];\r\n }\r\n}\r\n\r\n//FB 4780 BR-Start In PE, Getting Email/Cell for Existing Patients\r\nexport async function UpdateEmailCellPhone(patientId: number, email: string, cellphone: string) {\r\n const url = globalsettings.emrAPI;\r\n\r\n //FB-6264\r\n const targetUrl =\r\n url +\r\n \"api/Reminder/UpdatePatientContactInfo?patientId=\" +\r\n patientId + \"&email=\" + email + \"&cellphone=\" + cellphone;\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n return fetch(targetUrl, config).then((response) => response.ok);\r\n}\r\n\r\nexport async function FetchEmailCellPhone(patientId: number) {\r\n const url = globalsettings.emrAPI;\r\n\r\n //FB 4867 - Changed the API path\r\n //FB-6264\r\n const targetUrl =\r\n url +\r\n \"api/Reminder/GetPatientContactInfoByPatient_N?id=\" +\r\n patientId;\r\n\r\n return fetch(targetUrl).then((response) => response.json());\r\n}\r\n//FB 4780 BR-End In PE, Getting Email/Cell for Existing Patients\r\n\r\n//FB 4371 DK Added to get facility list\r\nexport async function GetFacilities(insurance_id: number) {\r\n let url: string =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetFacilitiesByInsurance/${insurance_id}`; //FB-6264\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(url);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n //FB 4696 DK - Added logic to sort the insurance accepted locations to top of the list\r\n let data = await response.json();\r\n data = data.sort((a: any, b: any) => b.IsInsuranceAccepted - a.IsInsuranceAccepted);\r\n\r\n return data.map((key: any) => {\r\n return {\r\n name: key.FACILITY_NAME,\r\n id: key.Id,\r\n address:\r\n key.FACILITY_ADDRESS +\r\n \", \" +\r\n key.FACILITY_CITY +\r\n \", \" +\r\n key.FACILITY_STATE,\r\n phone:\r\n key.SCHEDULING_PHONE != null\r\n ? key.SCHEDULING_PHONE.replace(/[^0-9]/g, \"\")\r\n : \"\",\r\n region: key.Facility_Region_N,\r\n InsuranceAcceptance: key.IsInsuranceAccepted ? \"\" : \"Out-of-Network\",\r\n } as Facility;\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get facilities available for a date\r\nexport async function GetLocationsByDate(\r\n date: string,\r\n insurance_id: number\r\n): Promise<[]> {\r\n let url: string =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetFacilitiesByDate/${date}/${insurance_id}`; //FB-6264\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n\r\n return data.map((key: any) => {\r\n return {\r\n name: key.FACILITY_NAME,\r\n id: key.Id,\r\n address:\r\n key.FACILITY_ADDRESS +\r\n \", \" +\r\n key.FACILITY_CITY +\r\n \", \" +\r\n key.FACILITY_STATE,\r\n InsuranceAcceptance: key.IsInsuranceAccepted ? \"\" : \"Out-of-Network\",\r\n phone: key.SCHEDULING_PHONE //FB-4867\r\n } as Facility;\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n//FB 4487 DK - Removed GetProviderFacilities method since it's no longer used\r\n\r\n//FB 4371 DK Added to get providers available at specific location on particular date\r\nexport async function GetFacilityProviders(\r\n date: string,\r\n facility: number,\r\n insurance_id: number,\t//FB 7801\r\n appointment_type_n: number //FB 7801\r\n): Promise {\r\n let url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetSlotsByDate/${facility}/${date}/1/${insurance_id}/${appointment_type_n}`; //FB-6264\t//FB-7801\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(url);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n data = data.reverse();\r\n\r\n return data.map((key: any) => {\r\n return {\r\n name: `${key.Employee_First_Name} ${key.Employee_Last_Name}`,\r\n id: key.Employee_N,\r\n InsuranceAcceptance: key.isInsuranceAccepted ? \"\" : \"Out-of-Network\",\r\n bio: key.Employee_Bio,\t//FB 6361\r\n job_title: key.Employee_Job_Title //FB 4769\r\n } as Provider;\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get regions list\r\nexport async function GetFacilityRegions(): Promise {\r\n let url: string = globalsettings.emrAPI + \"api/Provider/GetFacilityRegions\"; //FB-6264\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n\r\n return data.map((key: any) => {\r\n return {\r\n id: key.Id,\r\n name: key.REGION_NAME,\r\n state: key.REGION_STATE,\r\n } as FacilityRegion;\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get insurance carriers list\r\nexport async function GetInsuranceCarriers(): Promise<[]> {\r\n let url: string =\r\n globalsettings.emrAPI + \"api/Provider/GetInsuranceCarriers\"; //FB-6264\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n\r\n return data.map((key: any) => {\r\n return {\r\n id: key.Id,\r\n name: key.INSURANCE_CARRIER_NAME,\r\n };\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get plans for the selected insurance\r\nexport async function GetInsurancePlans(carrier_id: number): Promise<[]> {\r\n let url: string =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetInsurancePlans/${carrier_id}`; //FB-6264\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n\r\n return data.map((key: any) => {\r\n return {\r\n id: key.Id,\r\n name: key.INSURANCE_PLAN_NAME,\r\n };\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get available slots on particular date\r\nexport async function GetAvailableSlotsByDate(\r\n startDate: string,\r\n location: number,\r\n provider: number\r\n): Promise {\r\n let url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetSlotsForProviderByDate/${startDate}/${location}/${provider}`; //FB-6264\r\n //alert(\"limited:\" + url);\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n const data = await response.json();\r\n return data;\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get US states list\r\nexport async function GetStates(): Promise {\r\n let url: string = globalsettings.emrAPI + \"api/Provider/GetAllStates\"; //FB-6264\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n const data = await response.json();\r\n\r\n return data.map((key: any) => {\r\n return {\r\n name: key.CODE,\r\n };\r\n });\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to search patient\r\nexport async function SearchPatient(patientObj: any): Promise {\r\n //FB-6264\r\n const PatientUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/GetPatient?firstName=\" +\r\n patientObj.PATIENT_FIRST_NAME +\r\n \"&lastName=\" +\r\n patientObj.PATIENT_LAST_NAME +\r\n \"&dob=\" +\r\n patientObj.PATIENT_BIRTH_DAY +\r\n \"&gender=\" +\r\n patientObj.GENDER_N;\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(PatientUrl);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n//FB 4959 MS BEGIN\r\nexport async function GetPatientType(patientId: any): Promise {\r\n const PatientUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/GetPatientType?patientId=\" + patientId; //FB-6264\r\n\r\n const response = await fetch(PatientUrl);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n}\r\n\r\nexport async function GetPatientTypeByApptID(apptId: number): Promise {\r\n const PatientUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/GetPatientTypeByApptID?apptId=\" + apptId; //FB-6264\r\n\r\n const response = await fetch(PatientUrl);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n}\r\n//FB 4959 MS END\r\n//FB 4487 DK - Removed SearchExistingPatient method since it's no longer used\r\n\r\n//FB 4371 DK Added to get number of appointments booked by the patient\r\nexport async function AppointmentCount(\r\n appointment_date: any,\r\n FirstName: any,\r\n LastName: any,\r\n DOB: any,\r\n Gender: any\r\n) {\r\n //FB-6264\r\n const targetUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/GetAppointmentCount?date=\" +\r\n format(appointment_date, \"MM-dd-yyyy\") +\r\n \"&patient_first_name=\" +\r\n FirstName +\r\n \"&patient_last_name=\" +\r\n LastName +\r\n \"&dob=\" +\r\n DOB +\r\n \"&gender=\" +\r\n Gender;\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(targetUrl);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to create patient\r\nexport async function createPatient(patientObj: any, appObj: any) {\r\n //FB-6264\r\n const targetUrl = globalsettings.emrAPI + \"api/Provider/Schedule/Patient/AddPatient\";\r\n\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n\r\n body: JSON.stringify(patientObj),\r\n };\r\n const response = await fetch(targetUrl, config);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n let appt_n = 0;\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n //FB-6264\r\n let data = await response.json();\t\t//FB 4499 DK - changed the type from constant to reuse the variable\r\n sessionStorage.setItem(\"patient_n\", data);//FB 7719\r\n //FB-6264\r\n appObj.PATIENT_N = data;\r\n var date = new Date(appObj.APPOINTMENT_DATE);\r\n var x = date.getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - x);\r\n appObj.APPOINTMENT_DATE = date;\r\n appObj.APPOINTMENT_CHECKIN_TIME = date;\r\n if (appObj.PATIENT_N != 0) {\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n appt_n = await createAppointment(appObj);\r\n sessionStorage.setItem(\"prev_appN\", appt_n.toString());//FB 7719\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n }\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n return appt_n;\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to create appointment\r\nexport async function createAppointment(appObj: any) {\r\n //FB-6264\r\n appObj.APPOINTMENT_TYPE_OF_WORK = appObj.APPOINTMENT_TYPE_NAME;\r\n //FB 7675\r\n appObj.UTC_Offset = moment.tz(new Date(appObj.APPOINTMENT_DATE), moment.tz.guess(true)).utcOffset().toString();\r\n const targetUrl = globalsettings.emrAPI + \"api/Provider/Schedule/BookAppointment\";\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n\r\n body: JSON.stringify(appObj),\r\n };\r\n const response = await fetch(targetUrl, config);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n return 0;\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n }\r\n else {\r\n let data = await response.json();\t\t//FB 4499 DK - changed the type from constant to reuse the variable\r\n //FB-6264\r\n //FB 7675\r\n sendReminder(data, appObj.APPOINTMENT_DATE);\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB-6264\r\n return data;\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to remove slot from preregistration table after Appt. is booked\r\nexport async function removePreRegistration(id: number) {\r\n //FB-6264\r\n const targetUrl = globalsettings.emrAPI + `api/Provider/Schedule/Preregistration/RemoveSlot?id=${id}`;\r\n const config = {\r\n method: \"DELETE\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n };\r\n const response = await fetch(targetUrl, config);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n const data = await response.json();\r\n return data;\t//FB 6264\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get the message based on the rating\r\n//FB 4653 BR PE - Text message changed in review emails\r\nexport async function GetMessage(ratingValue: any, id: any) {\r\n let url: string =\r\n globalsettings.emrAPI +\r\n \"api/Provider/GetFeedbackAcknowledgement?stars=\" +\r\n ratingValue + \"&id=\" + id;\t//FB 4867 DK - Added new parameter //FB-6264\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(url);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4661 BR - PE - ParkingLot confirmation url\r\nexport async function ConfirmParkinglot(apptId: any, licenseName: string) {\r\n //FB 4867\r\n var str = licenseName;\r\n const configUrl = (globalsettings as any)[str].emrAPI;\r\n const targetUrl =\r\n configUrl +\r\n \"api/Reminder/ParkingLotConfirmation?appointmentID=\" +\r\n apptId;\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n return await fetch(targetUrl, config).then((response) => response.json()); //FB 4810\r\n}\r\n\r\n//FB 4660 BR PE - Appointment confirmation url\r\nexport async function ConfirmAppt(apptId: number, licenseName: any) {\r\n var str = licenseName;\r\n const url = (globalsettings as any)[str].emrAPI;\r\n\r\n const targetUrl =\r\n url +\r\n \"api/Reminder/ReminderConfirmation?appointmentID=\" +\r\n apptId;\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n\r\n //FB 4867 - Added error logging\r\n const response = await fetch(targetUrl, config);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n}\r\n\r\n//FB 4660 BR PE - Appointment confirmation url\r\nexport async function LinkExpiry(apptId: any, licenseName: string) {\r\n //FB 4867\r\n var str = licenseName;\r\n const configUrl = (globalsettings as any)[str].emrAPI;\r\n const targetUrl =\r\n configUrl +\r\n \"api/parkinglot/linkexpiry?id=\" +\r\n apptId;\r\n return await fetch(targetUrl).then((response) => response.json()); //FB 4810\r\n}\r\n\r\n//FB 4660 BR PE - Appointment confirmation url\r\nexport async function GetSchedulingPhone(apptId: any, licenseName: string) {\r\n const configUrl = (globalsettings as any)[licenseName].emrAPI;\r\n const targetUrl =\r\n configUrl +\r\n \"api/parkinglot/fetchSchedulingPhone?id=\" +\r\n apptId;\r\n\r\n return await fetch(targetUrl).then((response) => response.json()); //FB 4810\r\n}\r\n\r\n//FB 4653 BR - PE - Text message changed in review emails\r\nexport async function GetPatientName(apptId: any) {\r\n const configUrl = globalsettings.emrAPI;\r\n const targetUrl =\r\n configUrl +\r\n \"api/parkinglot/fetchPatientName?id=\" +\r\n apptId;\r\n return fetch(targetUrl).then((response) => response.json());\r\n}\r\n\r\n//FB 4867\r\nexport async function GetPracticeName() {\r\n const configUrl = globalsettings.emrAPI;\r\n //FB 6264\r\n const targetUrl =\r\n configUrl +\r\n \"api/Provider/GetPracticeName\"\r\n return fetch(targetUrl).then((response) => response.json());\r\n}\r\n\r\n//FB 4371 DK Added to get review link\r\n//FB 4498 BR Review email for note creation\r\nexport async function GetLink(id: any, flag: any) {\r\n let url: string =\r\n globalsettings.emrAPI + \"api/Provider/GetReviewLink?id=\" + id + \"&flag=\" + flag; //FB-6264\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(url);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4498 BR Review email for note creation\r\nexport async function updateReviews(reviewStars: number | null, reviewComments: string, sessionId: number) {\r\n //FB-6264\r\n const targetUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/AddReview?reviewStars=\" +\r\n reviewStars +\r\n \"&reviewComments=\" +\r\n reviewComments +\r\n \"&sessionId=\" +\r\n sessionId;\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n const response = await fetch(targetUrl, config);\r\n}\r\n\r\n//FB 4371 DK Added to send reminder notifications\r\n//FB 7675\r\nexport async function sendReminder(id: number, apptdate: Date) {\r\n //FB 4371 DK - Added a new parameter to identify the appointments created by PE\r\n const targetUrl =\r\n globalsettings.emrAPI +\r\n \"api/Reminder/ImmediateReminderNotification?appointment_n=\" +\r\n id +\r\n \"&isPEAppt=\" +\r\n true;\r\n\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(targetUrl, config);\r\n if (!response.ok) {\r\n //FB 6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB 4371 DK Added to get patient phone number\r\nexport async function PatientCellPhone(\r\n firstname: string,\r\n lastname: string,\r\n gender: any,\r\n dob: any\r\n) {\r\n //FB-6264\r\n const cellphoneAPIUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/GetPatientPhoneNumber?first_name=\" +\r\n firstname +\r\n \"&last_name=\" +\r\n lastname +\r\n \"&gender_n=\" +\r\n gender +\r\n \"&dateOfBirth=\" +\r\n dob;\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n const response = await fetch(cellphoneAPIUrl);\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return response.json();\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\n//FB-6264 - Removed unused code\r\n\r\n//FB 4763 DK - Added new function to get decoded url's - Start\r\nexport async function GetdecodedURL(urlcode: string): Promise {\r\n let url = globalsettings.emrAPI + `api/Provider/GetShortURL/${urlcode}`; //FB-6264\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n//FB 4763 DK - Added new function to get decoded url's - End\r\n\r\n//FB 4774 DK - Added new function to format phone numbers - Start\r\n//FB 4867 DK = Return formatted phone number as link\r\nexport function formatphone(phonenumber: any) {\r\n let practicePhone = sessionStorage.getItem(\"DefaultPhone\"); //FB 8680\r\n let phonenumberLink = \"\";\r\n if (phonenumber != \"\" && phonenumber != null && phonenumber != undefined) {\r\n phonenumber = phonenumber.replace(/[^0-9]/g, \"\");\r\n phonenumberLink = \"tel:+1\" + phonenumber;\r\n phonenumber = \"(\" + phonenumber.slice(0, 3) + \") \" + phonenumber.slice(3, 6) + \"-\" + phonenumber.slice(6, 10);\r\n //FB 8680\r\n } else if (practicePhone != \"\" && practicePhone != null && practicePhone != undefined) {\r\n phonenumber = practicePhone;\r\n phonenumber = phonenumber.replace(/[^0-9]/g, \"\");\r\n phonenumberLink = \"tel:+1\" + phonenumber;\r\n phonenumber = \"(\" + phonenumber.slice(0, 3) + \") \" + phonenumber.slice(3, 6) + \"-\" + phonenumber.slice(6, 10);\r\n }\r\n else {\r\n phonenumber = \"\";\r\n }\r\n return ( {phonenumber});\r\n}\r\n//FB 4774 DK - Added new function to format phone numbers - End\r\n\r\n//FB 4867 DK - Added new functions for File upload and Health forms - Start\r\nexport async function UploadDocuments(Documents: SupportFile[], appointment_n: number) {\r\n const TokenURL = globalsettings.emrAPI + \"api/GetAuthenticationToken/\" + appointment_n;\r\n const response = await fetch(TokenURL);\r\n const AuthenticationToken = await response.json();\r\n\r\n if (!response.ok || AuthenticationToken.length <= 0) {\r\n var JSAlert = require(\"js-alert\");\r\n JSAlert.alert(\"Authentication failed. Please try again later.\", null, JSAlert.Icons.Warning);\r\n }\r\n else {\r\n const targetUrl = globalsettings.emrAPI + \"api/Convertbase64ToImage\";\r\n\r\n const headers = new Headers();\r\n headers.append(\"Content-Type\", \"application/json\");\r\n headers.append(\"token\", AuthenticationToken[0].Token);\r\n\r\n const response = await fetch(targetUrl, {\r\n mode: 'cors',\r\n method: 'POST',\r\n headers: headers,\r\n body: JSON.stringify(Documents),\r\n });\r\n\r\n if (!response.ok) {\r\n //FB 8108 start\r\n if (response.status === 400) {\r\n NotifyVirusDetected();\r\n } else {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n }\r\n //FB-8108 end\r\n else {\r\n return response.status;\r\n }\r\n }\r\n}\r\n\r\n//FB 6264\r\n\r\nexport async function GetDocumentCategories() {\r\n let url = globalsettings.emrAPI + \"api/GetDocumentCategories/FileUpload\";\r\n const response = await fetch(url).then((data) => data.json()).catch((error) => error);\r\n\r\n return response;\r\n}\r\n\r\nexport async function GetLicenseName() {\r\n let url = globalsettings.emrAPI + `api/Provider/GetLicenseName`; //FB-6264\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n\r\nexport async function GetPatientContactInfo(appointment_n: number) {\r\n //FB-6264\r\n let url = globalsettings.emrAPI + `api/Reminder/GetPatientContactInfoByAppt_N?id=${appointment_n}`;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n\r\nexport async function SendOTP(appointment_n: number, isPEAppt: boolean, send_email: number, send_text: number) {\r\n let url = globalsettings.emrAPI + `api/PatientIntake/UpdateVerificationCode?appointment_n=${appointment_n}\r\n&isPEAppt=${isPEAppt}&emailSelect=${send_email}&phoneSelect=${send_text}`;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB 6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n\r\nexport async function GetOTP(appointment_n: number, isPEAppt: boolean) {\r\n let url = globalsettings.emrAPI + `api/PatientIntake/GetVerificationCode?appointment_n=${appointment_n}&isPEAppt=${isPEAppt}`;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB 6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n\r\n//FB-6264\r\n\r\n//FB 6036 BEGIN\r\nexport async function getTwilioToken(identity: string, room: string) {\r\n\r\n const generateToken = (config: any) => {\r\n return new AccessToken(\r\n globalsettings.twilio.accountSid,\r\n globalsettings.twilio.apiKey,\r\n globalsettings.twilio.apiSecret\r\n );\r\n };\r\n\r\n const videoToken = (identity: any, room: any, config: any) => {\r\n let videoGrant;\r\n if (typeof room !== 'undefined') {\r\n videoGrant = new VideoGrant({ room });\r\n } else {\r\n videoGrant = new VideoGrant();\r\n }\r\n const token = generateToken(config);\r\n token.addGrant(videoGrant);\r\n token.identity = identity;\r\n return token;\r\n };\r\n\r\n const token = videoToken(identity, room, globalsettings);\r\n // return JSON.stringify({\r\n // token: token.toJwt()\r\n // });\r\n if (identity == \"patient\")\r\n updateTelePatientDetails(1, parseInt(room));\r\n return token.toJwt();\r\n}\r\n\r\nexport async function updateTelePatientDetails(isPatientJoined: number, appt_id: number) {\r\n //FB-6264\r\n const targetUrl =\r\n globalsettings.emrAPI +\r\n \"api/Provider/TeleHealth/UpdatePatientCallStatus?isPatientJoined=\" +\r\n isPatientJoined +\r\n \"&appt_id=\" +\r\n appt_id;\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"*/*\",\r\n },\r\n };\r\n const response = await fetch(targetUrl, config);\r\n return response;\r\n}\r\n//FB 6036 End\r\n\r\n//FB 6039 Start\r\n//QR code scan to import photos in EMR\r\nexport async function UploadImages(Documents: InputFile, token: string) {\r\n\r\n const targetUrl = globalsettings.emrAPI + \"api/yii/saveimage\";\r\n const headers = new Headers();\r\n headers.append(\"Content-Type\", \"application/json\");\r\n headers.append(\"token\", token);\r\n headers.append(\"X-Requested-With\", \"ajax\"); //FB 6963 this will tell API that this is AJAX so that it returns errors as JSON objects\r\n const response = await fetch(targetUrl, {\r\n mode: 'cors',\r\n method: 'POST',\r\n headers: headers,\r\n body: JSON.stringify(Documents),\r\n });\r\n\r\n if (!response.ok) {\r\n //FB 6963 throw instead of rejecting\r\n const result = await response.json();\r\n throw new Error(result.ExceptionMessage || result.Message);\r\n }\r\n else {\r\n return response.status;\r\n }\r\n}\r\n//FB 6039 End\r\n\r\n//FB 6109 Start\r\nexport async function GetAppointmentType(appt_id: string) {\r\n //FB-6264\r\n let url = globalsettings.emrAPI + `api/Provider/GetAppointmentType?appt_id=` + appt_id;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n//FB 7719 Begin\r\nexport async function GetSavedCards(patient_n: number) {\r\n let url = globalsettings.emrAPI + `api/getCardName?patient_n=` + patient_n;\r\n\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n } else {\r\n const data = await response.json();\r\n return data;\r\n }\r\n}\r\n//FB 7719 End\r\n\r\nexport async function GetAdminSettingValue(setting: string) {\r\n //FB-6264\r\n let url = globalsettings.emrAPI + `api/Provider/GetAdminSettingValue?settingName=` + setting;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data;\r\n }\r\n}\r\n//FB 6109 End\r\n\r\n//FB 6452\r\nexport async function UpdatePatientCommunicationPreference(patient_n: number, comm_pref: string) {\r\n let url = globalsettings.emrAPI + \"api/Provider/Schedule/Patient/UpdateCommunicationPreference?patient_n=\" + patient_n + \"&comm_pref=\" + encodeURIComponent(comm_pref);\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n return \"Updated!\";\r\n }\r\n}\r\n\r\n//FB 7675\r\nexport function ConvertTimeZone(slotDate: string, slotTime: string, userTimeZone: string, type: string) {\r\n //FB 7917 - Start\r\n var convertedSlot = type == \"datetime\" ? slotDate + \" \" + slotTime : slotTime;\r\n\r\n if (sessionStorage.getItem(\"timeZoneFlag\") == \"true\") {\r\n var formattedSlot = moment(new Date(slotDate + \" \" + slotTime)).format(\"YYYY-MM-DD HH:mm\");\r\n var slotAsPerServer = moment.tz(formattedSlot, \"America/Port-au-Prince\");\r\n convertedSlot = type == \"datetime\" ? slotAsPerServer.tz(userTimeZone).format() : slotAsPerServer.tz(userTimeZone).format(\"hh:mm A\");\r\n }\r\n //FB 7917 - End\r\n return convertedSlot;\r\n}\r\n\r\n//FB-6264\r\nexport async function NotifyErrorOutage() {\r\n var JSAlert = require(\"js-alert\");\r\n JSAlert.alert(\"Something went wrong. Please try again later.\", null, JSAlert.Icons.Warning);\r\n}\r\n\r\n//FB 8108\r\nexport async function NotifyVirusDetected() {\r\n var JSAlert = require(\"js-alert\");\r\n JSAlert.alert(\"Virus detected - file cannot be uploaded\", null, JSAlert.Icons.Warning);\r\n}\r\n\r\n//FB 7719 Begin\r\nexport async function GetPaymentToken(SID: string) {\r\n let obj = globalsettings.emrAPI;\r\n if (obj != null) {\r\n //let emrConfig = JSON.parse(obj) as EMRConfig;\r\n const targetUrl = obj + \"/api/cc/paymentToken?SID=\" + SID;\r\n const result = await fetch(targetUrl);\r\n if (result.ok) {\r\n var data = await result.json();\r\n if (data != null) {\r\n return data.Session.PaymentToken;\r\n }\r\n } else {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n }\r\n}\r\n\r\nexport async function SaveCard(cc: CreditCardPaymentModel) {\r\n let obj = globalsettings.emrAPI;\r\n if (obj != null) {\r\n //let emrConfig = JSON.parse(obj) as EMRConfig;\r\n const targetUrl = obj + \"/api/cc/saveCard\";\r\n\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n\r\n body: JSON.stringify(cc),\r\n };\r\n const response = await fetch(targetUrl, config);\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n } else {\r\n return response;\r\n }\r\n }\r\n\r\n}\r\n\r\n\r\nexport async function postIframedata() {\r\n\r\n let obj = globalsettings.emrAPI;\r\n if (obj != null) {\r\n const targetUrl = obj + \"api/cc/paymentUrl\";\r\n const config = {\r\n method: \"POST\",\r\n };\r\n const response = await fetch(targetUrl, config);\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n } else {\r\n var iframedata = await response.json();\r\n return iframedata;\r\n }\r\n }\r\n}\r\n//FB 7719 End\r\n\r\n//FB 8549\r\nexport async function GetAppointmentTypes(filter: string, patientType: string) {\r\n let url = globalsettings.emrAPI + `api/Provider/Schedule/GetAppointmentTypes?filter=` + filter + `&patientType=` + patientType;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data.map((key: any) => {\r\n return key as AppointmentType;\r\n });\r\n }\r\n}\r\n\r\n//FB 9735\r\nexport async function GetAllAppointmentTypes() {\r\n let url = globalsettings.emrAPI + `api/Provider/Schedule/GetAllAppointmentTypes`;\r\n const response = await fetch(url);\r\n\r\n if (!response.ok) {\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n return data.map((key: any) => {\r\n return key as AppointmentType;\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport QRCode from \"qrcode.react\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\r\n\r\n//Update log\r\n// FB 6025 BR 04/26/2022 PE - Import Photos through QR code scan from smartphone\r\n// FB 6985 DK 06/20/2023 QR code link should be dynamic\r\n\r\nexport default function Importphotos(props) {\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n var decodedDocType = Buffer.from(props.match.params.docType, \"base64\").toString();\r\n var encodedDocType = Buffer.from(decodedDocType).toString('base64');\r\n //FB 6985\r\n const url = window.location.origin + \"/appointment/Capturephotos/\" + decodedAppt_n + \"/\" + encodedDocType;\r\n\r\n return (\r\n
\r\n \r\n \r\n Scan the below QR code to upload photos and close this tab once the file(s) uploaded\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n}","import React, { Fragment , useState } from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Camera from './Camera';\r\nimport {SupportFile } from \"../appointments/create/store\";\r\nimport { UploadDocuments } from \"../appointments/create/api\";\r\nimport { useEffect } from 'react';\r\nimport {\r\n Dialog,\r\n DialogContent,\r\n Typography,\r\n Button,\r\n makeStyles\r\n} from \"@material-ui/core\";\r\nimport MuiDialogActions from \"@material-ui/core/DialogActions\";\r\nimport { Theme, createStyles, WithStyles } from \"@material-ui/core/styles\";\r\nimport { withStyles } from '@material-ui/core';\r\n\r\n//Update log\r\n// FB 6025 BR 04/26/2022 PE - Import Photos through QR code scan from smartphone\r\n\r\nexport default function Capturephotos(props:any) {\r\n\r\n const [inputList, setInputList] = useState([]);\r\n const [base64Img,setBase64Img] = useState(\"\");\r\n const [capturedImage,setCapturedImage] = useState(\"\");\r\n const [openDialog, setOpenDialog] = React.useState(false);\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n }\r\n })\r\n\r\n const classes = useStyles();\r\n\r\n const handleClose = async () => {\r\n setOpenDialog(false);\r\n };\r\n\r\n const styless = (theme: Theme) =>\r\n createStyles({\r\n root: {\r\n margin: 0,\r\n padding: theme.spacing(2),\r\n },\r\n closeButton: {\r\n position: \"absolute\",\r\n right: theme.spacing(1),\r\n top: theme.spacing(1),\r\n color: theme.palette.grey[500],\r\n },\r\n });\r\n\r\n const DialogActions = withStyles((theme: Theme) => ({\r\n root: {\r\n margin: 0,\r\n padding: theme.spacing(1),\r\n },\r\n }))(MuiDialogActions);\r\n\r\n useEffect( () => {\r\n async function upload () {\r\n if(base64Img != \"\"){\r\n var decodedAppt_n = Buffer.from(props.match.params.apptId, \"base64\").toString();\r\n //var encodedDocType = Buffer.from(props.match.params.docType).toString('base64');\r\n var decodedDocType = Buffer.from(props.match.params.docType , \"base64\").toString();\r\n const input = {\r\n DocumentType: decodedDocType,\r\n OtherDocument: '',\r\n FileName: Number(decodedAppt_n) +'.png',\r\n FileType: 'image/png',\r\n FileSize: 0,\r\n Base64EncodedFile: base64Img, \r\n Appointment_N: Number(decodedAppt_n)\r\n } as SupportFile;\r\n //setInputList([...inputList, input]);\r\n inputList.push(input);\r\n const result = await UploadDocuments(inputList, Number(decodedAppt_n));\r\n if (result === 200) {\r\n //alert(\"File uploaded successfully!\");\r\n setOpenDialog(true);\r\n setCapturedImage(\"saved\");\r\n setInputList([]);\r\n }\r\n }\r\n }\r\n upload();\r\n }, [base64Img]);\r\n\r\n const uploadImage = async (file:any) => {\r\n const formData = new FormData();\r\n formData.append(\"file\", file);\r\n \r\n // Connect to a seaweedfs instance\r\n };\r\n\r\n\r\n return (\r\n
\r\n

Capture image from your camera!!

\r\n \r\n\r\n \r\n \r\n \r\n \r\n File uploaded successfully!\r\n \r\n \r\n \r\n \r\n Ok\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","// update log\r\n// FB 4371 DK 03/29/2021 Added for global parameters used all over the site\r\n// FB 4472 DK 05/31/2021 Added new parameter for logo\r\n// FB 6042 DK 05/12/2022 Logo made generic\r\n// FB 6036 MS 05/17/2022 Telehealth Changes\r\n// FB 6099 GS 07/26/2022 Added variable for disabling By Office location button\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n\r\n\r\nlet config = {\r\n emrAPI: \"https://medrecordsportal.com:42080/\",\r\n //FB-6264\r\n digitalApptType: \"TeleHealth\",\r\n logoName: \"logo\",\t\t//FB 6042\t\tAdded to specify the logo image name\r\n trackingID: \"UA-201170884-1\", //FB 4533 BR GA tags for patient engagement\r\n clientIp: \"\", //FB 4960\r\n isByLocationEnabled: false, //FB 6099\r\n\r\n //FB 4661 BR: Start PE - configuring EMR and PE API\r\n 'Radiant+Dermatology': {\r\n emrAPI: \"https://medrecordsportal.com:42080/\"\r\n //FB-6264\r\n },\r\n //FB 6036 BEGIN\r\n twilio: {\r\n    accountSid: \"ACd0ea635ebc472021e056f5d2a66f2072\",\r\n    apiKey: \"SKd3b9a10a07ade38c37a075dbc97c3f2e\",\r\n    apiSecret: \"TLUUGanKLZYKXfYXw3OEuLdD6m95Q9nW\"\r\n  }\r\n //FB 6036 END\r\n //FB 4661 BR: End PE - configuring EMR and PE API\r\n};\r\nexport default config;","import {\r\n Appointmentdetails,\r\n Facility,\r\n Provider,\r\n SlotDetails,\r\n State,\r\n} from \"../store\";\r\nimport * as API from \"../api\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to define the actions required for the appointment booking flow\r\n// FB 4371 DK 04/20/2021 Added new param to send appointment type\r\n// FB 4556 DK 07/07/2021 Implement client side error handling on PE\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n\r\nexport type Actions =\r\n | ModifyAppointmentDetails\r\n | GetProviderslist\r\n | GetFacilitieslist\r\n | GetStateList\r\n | Patient\r\n | ModifySlotDetails;\r\n\r\nexport type ModifyAppointmentDetails = {\r\n type: \"MODIFY_APPOINTMENT_DETAILS\";\r\n data: Appointmentdetails;\r\n};\r\n\r\nexport type GetProviderslist = {\r\n type: \"GET_PROVIDERS\";\r\n data: Provider[];\r\n};\r\n\r\nexport type GetFacilitieslist = {\r\n type: \"GET_FACILITIES\";\r\n data: Facility[];\r\n};\r\n\r\nexport type GetStateList = {\r\n type: \"GET_STATES\";\r\n data: State[];\r\n};\r\n\r\nexport type Patient = {\r\n type: \"PATIENT\";\r\n data: Patient;\r\n};\r\n\r\nexport type ModifySlotDetails = {\r\n type: \"MODIFY_SLOT_DETAILS\";\r\n data: SlotDetails;\r\n};\r\n\r\n//FB 4371 DK Added to modify the state whenever the slot details get updated\r\nexport async function modify_SlotDetails(\r\n obj: any,\r\n dispatch: React.Dispatch\r\n) {\r\n dispatch({\r\n type: \"MODIFY_SLOT_DETAILS\",\r\n data: {\r\n employeeId: obj.employeeId,\r\n facilityId: obj.facilityId,\r\n id: obj.id,\r\n slotDate: obj.slotDate,\r\n employeeName: obj.employeeName,\r\n facilityName: obj.facilityName,\r\n isslotexisting: obj.isslotexisting,\r\n duration: obj.duration, //FB 4638 added duration field\r\n },\r\n });\r\n}\r\n\r\n//FB 4371 DK Added to modify the state whenever the appointment details get updated\r\nexport async function modify_AppointmentDetails(\r\n obj: any,\r\n dispatch: React.Dispatch\r\n) {\r\n dispatch({\r\n type: \"MODIFY_APPOINTMENT_DETAILS\",\r\n data: {\r\n appointmenttype: obj.appointmenttype,\r\n customappointmenttype: obj.customappointmenttype,//FB 7801\r\n appointmentfilter: obj.appointmentfilter,\r\n patientType: obj.patientType,\r\n isInsuranceExist: obj.isInsuranceExist,\r\n insurance: {\r\n id: obj.insurance.id,\r\n planId: obj.insurance.planId,\r\n name: obj.insurance.name,\r\n planName: obj.insurance.planName,\r\n },\r\n provider: obj.provider,\r\n location: {\r\n id: obj.location.id,\r\n name: obj.location.name,\r\n address: obj.location.address,\r\n region: obj.location.region,\r\n phone: obj.location.phone,\r\n },\r\n date: obj.date,\r\n duration:obj.duration //FB 4638 added duration field\r\n },\r\n });\r\n}\r\n\r\n//FB 4371 DK Added to fetch the provider list from API\r\n//FB 4371 DK Added new param to send appointment type\r\nexport async function get_Providers(\r\n insurance_id: number,\r\n apptType: any,\r\n dispatch: React.Dispatch\r\n): Promise {\r\n //FB 4371 DK Added new param to send appointment type\r\n const providers = await API.GetProviders(insurance_id, apptType);\r\n dispatch({ type: \"GET_PROVIDERS\", data: providers });\r\n}\r\n\r\n//FB 4371 DK Added to fetch the facility list from API\r\nexport async function get_Facilities(\r\n insurance_id: number,\r\n dispatch: React.Dispatch\r\n): Promise {\r\n const facilities = await API.GetFacilities(insurance_id);\r\n dispatch({ type: \"GET_FACILITIES\", data: facilities });\r\n}\r\n\r\n//FB 4371 DK Added to make POST call to create a new patient\r\nexport function create_patient(patientObj: any, appObj: any, id: number) {\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n const response = API.createPatient(patientObj, appObj);\r\n API.removePreRegistration(id);\r\n return response;\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n}\r\n\r\n//FB 4371 DK Added to make POST call to create a new appointment\r\nexport function create_appointment(appObj: any) {\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n const response = API.createAppointment(appObj);\r\n return response;\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n //API.removePreRegistration(id);\r\n}\r\n\r\n//FB 4371 DK Added to remove the selected slot from PreRegistration once the appointment is booked\r\nexport function remove_reg(id: number) {\r\n //API.createPatient(patientObj, appObj);\r\n API.removePreRegistration(id);\r\n}\r\n\r\n//FB 4371 DK Added to fetch the states for State dropdowm menu on demographics page\r\nexport async function get_States(\r\n dispatch: React.Dispatch\r\n): Promise {\r\n const states = await API.GetStates();\r\n dispatch({ type: \"GET_STATES\", data: states });\r\n}\r\n\r\n//FB-6264 Removed unused code","import React, { useEffect, useState, useContext } from \"react\";\r\nimport {\r\n Grid,\r\n Button,\r\n Card,\r\n CardContent,\r\n Typography,\r\n CardMedia,\r\n TextField,\r\n CircularProgress,\r\n createMuiTheme,\r\n ThemeProvider,\r\n Avatar,\r\n} from \"@material-ui/core\";\r\nimport Autocomplete, {\r\n createFilterOptions,\r\n} from \"@material-ui/lab/Autocomplete\";\r\nimport { Context } from \"../store\";\r\nimport { get_Providers, modify_AppointmentDetails } from \"../actions\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Provider } from \"../store/index\";\r\nimport useStyles from \"../css/styles\";\r\nimport { InsertPELogs } from '../api'; //FB 4960\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added for Provider module in home page\r\n// FB 4371 DK 04/20/2021 Fixed image src issue\r\n// FB 4574 DK 07/15/2021 Added styling for dropdown icon\r\n// FB 4769 MS 11/02/2021 Added Job title for provider\r\n// FB 4794 MS 11/08/2021 Removed the wrongly added comment\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7999 MS 01/05/2024 select provider by default in case of single provider practice\r\n// FB 8097 DK 01/17/2024 Single provider workflow is not working\r\n\r\nexport default function ProviderComponent(props: any) {\r\n const [open, setOpen] = React.useState(false);\r\n const { state, dispatch } = useContext(Context);\r\n const [providers, setProviders] = React.useState([]);\r\n const loading = open && providers.length === 0;\r\n const styles = useStyles();\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n //FB 4371 DK Added to load the provider list\r\n useEffect(() => {\r\n //if (!state.providers || state.providers.length === 0) {\r\n //FB 4371 DK - Added new param to send the selected appointment type\r\n get_Providers(\r\n state.appointmentdetails.insurance.id,\r\n state.appointmentdetails.appointmenttype,\r\n dispatch\r\n ).then(() => {\r\n setProviders(state.providers);\r\n });\r\n //}\r\n }, []);\r\n\r\n //FB 7999 BEGIN\r\n //FB 8097 Start\r\n useEffect(() => {\r\n if (state.providers.length == 1) {\r\n SetSelectedProvider(state.providers[0]);\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: state.appointmentdetails.insurance.id,\r\n planId: state.appointmentdetails.insurance.planId,\r\n name: state.appointmentdetails.insurance.name,\r\n planName: state.appointmentdetails.insurance.planName,\r\n },\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: state.providers[0],\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n }\r\n }, [state.providers.length > 0]);\r\n //FB 8097 End\r\n //FB 7999 END\r\n\r\n useEffect(() => {\r\n let active = true;\r\n\r\n if (!loading) {\r\n return undefined;\r\n }\r\n\r\n if (active) {\r\n setProviders(state.providers);\r\n }\r\n\r\n return () => {\r\n active = false;\r\n };\r\n }, [loading, state.providers.length]);\r\n\r\n const [selectedprovider, SetSelectedProvider] = useState({\r\n name: state.appointmentdetails.provider.name,\r\n id: state.appointmentdetails.provider.id,\r\n bio: state.appointmentdetails.provider.bio,\r\n job_title: state.appointmentdetails.provider.job_title, //FB 4769\r\n });\r\n\r\n useEffect(() => {\r\n if (!open) {\r\n setProviders([]);\r\n }\r\n }, [open]);\r\n\r\n //FB 4371 DK Added to modify the state when provider is selected\r\n const handleChange = (event: any, value: any) => {\r\n if (value != null) {\r\n SetSelectedProvider(value as Provider);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Choose the provider \" + value.name);\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: state.appointmentdetails.insurance.id,\r\n planId: state.appointmentdetails.insurance.planId,\r\n name: state.appointmentdetails.insurance.name,\r\n planName: state.appointmentdetails.insurance.planName,\r\n },\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: {\r\n id: value.id,\r\n name: value.name,\r\n bio: value.bio,\r\n job_title: value.job_title, //FB 4769\r\n },\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n } else {\r\n SetSelectedProvider({\r\n name: \"\",\r\n id: 0,\r\n bio: \"\",\r\n job_title: \"\", //FB 4769\r\n });\r\n }\r\n };\r\n\r\n const handleGoback = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - by provider\");\r\n //FB 4960 End\r\n props.onCallbackType(\"\");\r\n };\r\n\r\n const history = useHistory();\r\n\r\n //FB 4371 DK Added to navigate to slots page\r\n\r\n const handleProceed = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by provider\");\r\n //FB 4960 End\r\n history.push(\"/slots_byprovider\", state);\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n Please choose the provider\r\n \r\n {/* FB 4794 */}\r\n \r\n \r\n {\r\n setOpen(true);\r\n }}\r\n onClose={() => {\r\n setOpen(false);\r\n }}\r\n //getOptionSelected={(option, value) => option === value}\r\n getOptionLabel={(option) => option.job_title != \"\" && option.job_title != undefined ? option.name + \" (\" + option.job_title + \")\" : option.name} //FB 4769\r\n groupBy={(option) =>\r\n option.InsuranceAcceptance ? option.InsuranceAcceptance : \"\"\r\n }\r\n options={providers}\r\n loading={loading}\r\n //filterOptions={filterOptions}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n //FB 4574 DK - Added styling for dropdown icon\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n renderInput={(params) => (\r\n \r\n {loading ? (\r\n \r\n ) : null}\r\n {params.InputProps.endAdornment}\r\n \r\n ),\r\n }}\r\n />\r\n )}\r\n />\r\n \r\n \r\n \r\n 0 ? \"flex\" : \"none\",\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {/* FB 4371 DK - Changes the src syntax */}\r\n \r\n \r\n \r\n \r\n {selectedprovider.name}\r\n \r\n {/* FB 4769 BEGIN */}\r\n \r\n {selectedprovider.job_title}\r\n \r\n {/* FB 4769 END */}\r\n \r\n {selectedprovider.bio}\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0 ? \"block\" : \"none\",\r\n }}\r\n >\r\n \r\n Show Schedule\r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import React, { useEffect, useState, useContext } from \"react\";\r\nimport {\r\n Grid,\r\n Card,\r\n CardContent,\r\n Typography,\r\n Button,\r\n CardMedia,\r\n TextField,\r\n CircularProgress,\r\n createMuiTheme,\r\n ThemeProvider,\r\n Avatar,\r\n} from \"@material-ui/core\";\r\n//FB 4574 DK - Removed unused imports\r\nimport Autocomplete from \"@material-ui/lab/Autocomplete\";\r\nimport { Context, Facility, FacilityRegion } from \"../store\";\r\nimport { get_Facilities, modify_AppointmentDetails } from \"../actions\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useStyles from \"../css/styles\";\r\nimport { GetFacilityRegions, InsertPELogs } from \"../api\"; //FB 4960\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added for Location module in home page\r\n// FB 4371 DK 04/20/2021 Fixed image src issue\r\n// FB 4574 DK 07/15/2021 Added styling for dropdown icon\r\n// FB 4657 MS 08/27/2021 Fixed the issue where same state displays twice in region dropdown\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 8290 MS 04/29/2024 Get Facility Picture from EMR\r\n// FB 8722 DK 11/06/2024 PE workflows enhancements\r\n\r\nexport default function Location(props: any) {\r\n //FB-6264\r\n const { state, dispatch } = useContext(Context);\r\n const [facilities, setFacilities] = React.useState([]);\r\n //FB-6264\r\n const [facilitiesopen, setFacilitiesOpen] = React.useState(false);\r\n const facilitiesLoader = facilitiesopen && facilities.length === 0;\r\n const [regions, setRegions] = React.useState([]);\r\n //FB-6264\r\n const [regionsopen, setRegionsOpen] = React.useState(false);\r\n const regionsLoader = regionsopen && regions.length === 0;\r\n const styles = useStyles();\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n const [selectedfacility, setSelectedfacility] = useState({\r\n id: state.appointmentdetails.location.id,\r\n name: state.appointmentdetails.location.name,\r\n address: state.appointmentdetails.location.address,\r\n region: state.appointmentdetails.location.region,\r\n phone: state.appointmentdetails.location.phone,\r\n });\r\n\r\n const [selectedregion, setSelectedRegion] = useState({\r\n id: state.appointmentdetails.location.region,\r\n name: state.region.name,\r\n state: state.region.state,\r\n });\r\n //FB 8722\r\n const [isSingleRegion, setIsSingleRegion] = useState(0);\r\n const [isSingleLocation, setIsSingleLocation] = useState(0);\r\n\r\n //FB 4371 DK Added to load the region list\r\n useEffect(() => {\r\n GetFacilityRegions().then((data) => {\r\n setRegions(data);\r\n // FB 8722\r\n if (data.length == 1) {\r\n setIsSingleRegion(1);\r\n let value = data[0];\r\n setSelectedRegion({ id: value.id, name: value.name, state: value.state });\r\n state.region.id = value.id;\r\n state.region.name = value.name;\r\n state.region.state = value.state;\r\n }\r\n });\r\n }, []);\r\n\r\n //FB 4371 DK Added to get facilities list\r\n useEffect(() => {\r\n if (!state.facilities || state.facilities.length === 0) {\r\n get_Facilities(state.appointmentdetails.insurance.id, dispatch).then(\r\n (data) => {\r\n setFacilities(state.facilities);\r\n }\r\n );\r\n }\r\n }, []);\r\n\r\n //FB 6264\r\n useEffect(() => {\r\n setFacilities(state.facilities);\r\n });\r\n\r\n //FB 8722\r\n useEffect(() => {\r\n if (facilities.filter((facility) => facility.region === selectedregion.id).length == 1) {\r\n setIsSingleLocation(1);\r\n let value = state.facilities[0];\r\n setSelectedfacility(state.facilities[0] as Facility);\r\n modifyState(value);\r\n }\r\n }, [facilities]);\r\n\r\n //FB 4371 DK Added to modify the state when region is selected\r\n const handleRegionChange = (event: any, value: any) => {\r\n if (value != null) {\r\n setSelectedRegion({ id: value.id, name: value.name, state: value.state });\r\n state.region.id = value.id;\r\n state.region.name = value.name;\r\n state.region.state = value.state;\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Selected the region \" + value.name);\r\n //FB 4960 End\r\n } else {\r\n setSelectedRegion({\r\n id: 0,\r\n name: \"\",\r\n state: \"\",\r\n });\r\n }\r\n setSelectedfacility({\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n });\r\n };\r\n\r\n //FB 4371 DK Added to modify the state when facility is selected\r\n const handleChange = (event: any, value: any) => {\r\n if (value != null) {\r\n setSelectedfacility(value as Facility);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Selected the location \" + value.name);\r\n //FB 4960 End\r\n //FB 8722\r\n modifyState(value);\r\n } else {\r\n setSelectedfacility({\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n });\r\n }\r\n };\r\n\r\n //FB 4960\r\n const handleGoback = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - by office location\");\r\n //FB 4960 End\r\n props.onCallbackType(\"\");\r\n };\r\n\r\n const history = useHistory();\r\n\r\n //FB 4371 DK Added to navigate to slots page\r\n //FB 4960\r\n const handleProceed = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by office location\");\r\n //FB 4960 End\r\n history.push(\"/slots_bylocation\", state);\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n //FB 8722\r\n function modifyState(value: any) {\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: state.appointmentdetails.insurance.id,\r\n planId: state.appointmentdetails.insurance.planId,\r\n name: state.appointmentdetails.insurance.name,\r\n planName: state.appointmentdetails.insurance.planName,\r\n },\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: {\r\n id: 0,\r\n name: \"\",\r\n },\r\n location: {\r\n id: value.id,\r\n name: value.name,\r\n address: value.address,\r\n region: selectedregion.id,\r\n phone: value.phone,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n }\r\n\r\n return (\r\n
\r\n {/* FB 8722 */}\r\n \r\n \r\n Please choose the region\r\n \r\n \r\n \r\n -b.state.localeCompare(a.state))}\r\n getOptionLabel={(option) => option.name}\r\n //FB 4657 End\r\n groupBy={(options) => options.state}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n // FB 4574 DK - Added styling for dropdown icon\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n //FB-6264\r\n open={regionsopen}\r\n loading={regionsLoader}\r\n onOpen={() => {\r\n setRegionsOpen(true);\r\n }}\r\n onClose={() => {\r\n setRegionsOpen(false);\r\n }}\r\n renderInput={(params) => (\r\n \r\n {regionsLoader ? (\r\n \r\n ) : null}\r\n {params.InputProps.endAdornment}\r\n \r\n ),\r\n }}\r\n />\r\n )}\r\n />\r\n \r\n \r\n \r\n {/* FB 8722 Start*/}\r\n \r\n \r\n Selected region\r\n \r\n \r\n \r\n \r\n \r\n 0 && isSingleLocation == 0 ? \"flex\" : \"none\",\r\n }}\r\n >\r\n \r\n Please choose the location\r\n \r\n \r\n \r\n {/* FB-6264 */}\r\n option.name}\r\n options={facilities.filter(\r\n (facility) => facility.region === selectedregion.id\r\n )}\r\n groupBy={(option) =>\r\n option.InsuranceAcceptance &&\r\n state.appointmentdetails.isInsuranceExist === \"Yes\"\r\n ? option.InsuranceAcceptance\r\n : \"\"\r\n }\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n // FB 4574 DK - Added styling for dropdown icon\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n open={facilitiesopen}\r\n loading={facilitiesLoader}\r\n onOpen={() => {\r\n setFacilitiesOpen(true);\r\n }}\r\n onClose={() => {\r\n setFacilitiesOpen(false);\r\n }}\r\n renderInput={(params) => (\r\n \r\n {facilitiesLoader ? (\r\n \r\n ) : null}\r\n {params.InputProps.endAdornment}\r\n \r\n ),\r\n }}\r\n />\r\n )}\r\n />\r\n \r\n \r\n \r\n 0 && isSingleLocation == 1 ? \"flex\" : \"none\",\r\n }}\r\n >\r\n \r\n Selected location\r\n \r\n \r\n \r\n \r\n \r\n {/* FB 8722 End*/}\r\n 0 ? \"flex\" : \"none\",\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {/* FB 4371 DK - Changes the src syntax */}\r\n {/* FB 8290 MS - Changes the src */}\r\n \r\n \r\n \r\n \r\n {selectedfacility.name}\r\n \r\n \r\n {selectedfacility.address.includes(\"null\")\r\n ? \"\"\r\n : selectedfacility.address}\r\n \r\n \r\n {selectedfacility.phone !== \"\"\r\n ? \"(\" +\r\n selectedfacility.phone?.slice(0, 3) +\r\n \") \" +\r\n selectedfacility.phone?.slice(3, 6) +\r\n \"-\" +\r\n selectedfacility.phone?.slice(6, 10)\r\n : \"\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0 ? \"block\" : \"none\",\r\n }}\r\n >\r\n \r\n Show Schedule\r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport Location from \"../components/Location\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to invoke the location component\r\n\r\nexport default function FacilityPage(data:any) {\r\n return ;\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport {\r\n MuiPickersUtilsProvider,\r\n KeyboardDatePicker,\r\n} from \"@material-ui/pickers\";\r\n//FB 6264\r\nimport {\r\n Grid,\r\n Typography,\r\n Button,\r\n createMuiTheme,\r\n ThemeProvider,\r\n TextField,\r\n Tooltip,\r\n Fab,\r\n CircularProgress,\r\n} from \"@material-ui/core\";\r\nimport { Context, Facility, Provider } from \"../store\";\r\nimport { modify_AppointmentDetails } from \"../actions\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useStyles from \"../css/styles\";\r\nimport { Autocomplete } from \"@material-ui/lab\";\r\nimport {\r\n GetAvailableSlotsByDate,\r\n GetFacilityProviders,\r\n GetLocationsByDate,\r\n InsertPELogs\r\n} from \"../api\"; //FB 4960\r\nimport { format } from \"date-fns\";\r\nimport RefreshIcon from \"@material-ui/icons/Replay\";\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added for By Date screen of inoffice workflow\r\n// FB 4574 DK 07/15/2021 Added styling for dropdown icons\r\n// FB 4769 MS 11/02/2021 Added Job Title info for provider\r\n// FB 4774 DK 11/18/2021 Message changes\r\n// FB 4867 DK 01/20/2022 Phone numbe made clickable\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 6361 DK\t 01/03/2023 Employee Bio missing on ByDate workflow\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 8796 KI 06/23/20234 Auto selecting location and provider if we have only one data\r\n// FB 9135 MS 07/22/2024 Show unavailable message when there is no slots\r\n// FB 9597 DK 10/24/2024 Schedules not loading on PE\r\n// FB 9560 DK 11/29/2024 Location field should be hidden in the PE when no scheduler is available for the selected date in the By date flow.\r\n\r\nexport default function Datepage(props: any) {\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n const { state, dispatch } = useContext(Context);\r\n const styles = useStyles();\r\n const [providers, setProviders] = React.useState([]);\r\n //FB-6264\r\n const [providersopen, setProvidersOpen] = React.useState(false);\r\n const providersLoader = providersopen && providers.length === 0;\r\n const [selectedprovider, SetSelectedProvider] = useState({\r\n id: 0,\r\n name: \"\",\r\n bio: \"\",\t//FB 6361\r\n job_title: \"\", //FB 4769\r\n });\r\n\r\n const [facilities, setFacilities] = React.useState([]);\r\n //FB-6264\r\n const [facilitiesopen, setFacilitiesOpen] = React.useState(false);\r\n const facilitiesLoader = facilitiesopen && facilities.length === 0;\r\n const [selectedfacility, SetSelectedfacility] = useState(\r\n state.appointmentdetails.location\r\n );\r\n\r\n const [selectedDate, setSelectedDate] = useState(\r\n state.appointmentdetails.date\r\n );\r\n\r\n const [availableSlots, setAvailableSlots] = useState();\r\n const [isDisabled, setIsDisabled] = useState(false);\r\n\r\n //FB 4371 DK Added to refresh the selected options\r\n //FB 4960\r\n const resetForm = () => {\r\n SetSelectedProvider({ id: 0, name: \"\", job_title: \"\" }); //FB 4769\r\n SetSelectedfacility({ id: 0, name: \"\", address: \"\", region: 0, phone: \"\" }); //FB 4774 DK - Added phone\r\n setSelectedDate(new Date());\r\n state.appointmentdetails.date = new Date();\r\n GetLocationsByDate(\r\n format(selectedDate, \"MM-dd-yyyy\"),\r\n state.appointmentdetails.insurance.id\r\n ).then((data) => {\r\n setFacilities(data);\r\n });\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Click on Reset\");\r\n //FB 4960 End\r\n };\r\n\r\n //FB 4371 DK Added to refresh the facility list when date is changed\r\n useEffect(() => {\r\n SetSelectedProvider({ id: 0, name: \"\", job_title: \"\" }); //FB 4769\r\n SetSelectedfacility({ id: 0, name: \"\", address: \"\", region: 0, phone: \"\" }); //FB 4774 DK - Added phone\r\n\r\n GetLocationsByDate(\r\n format(selectedDate, \"MM-dd-yyyy\"),\r\n state.appointmentdetails.insurance.id\r\n ).then((data: any) => { //FB 8796\r\n setFacilities(data);\r\n setAvailableSlots(data.length); //FB 9135\r\n //FB 8796\r\n if (data.length == 1) {\r\n SetSelectedfacility(data[0]);\r\n }\r\n });\r\n }, [selectedDate]);\r\n\r\n //FB 4371 DK Added to refresh the available slots count on change of date\r\n useEffect(() => {\r\n let splittedDate = selectedDate.toLocaleDateString().split(\"/\");\r\n let date = splittedDate[0] + \"-\" + splittedDate[1] + \"-\" + splittedDate[2];\r\n GetAvailableSlotsByDate(date, 0, 0).then((data) => {\r\n //FB 9560\r\n //setAvailableSlots(data.length);\r\n });\r\n }, [selectedDate]);\r\n\r\n //FB 4371 DK Added to refresh the provider list when facility is changed\r\n useEffect(() => {\r\n //FB 9597\r\n let session_ApptN = sessionStorage.getItem(\"AppointmentType_N\");//FB 7801\r\n let appt_type_n = session_ApptN != null && session_ApptN != 'undefined' ? Number(session_ApptN) : 0;\r\n if (selectedfacility.id > 0) {\r\n SetSelectedProvider({ id: 0, name: \"\", job_title: \"\" }); //FB 4769\r\n GetFacilityProviders(\r\n format(selectedDate, \"MM-dd-yyyy\"),\r\n selectedfacility.id,\r\n state.appointmentdetails.insurance.id,//FB 7801\r\n appt_type_n //FB 7801\r\n ).then((data: any) => { \t//FB 8796\r\n setProviders(data);\r\n //FB 8796\r\n if (data.length == 1) {\r\n SetSelectedProvider(data[0]);\r\n }\r\n });\r\n }\r\n }, [selectedfacility]);\r\n\r\n //FB 4867 DK - Removed unused code\r\n\r\n //FB 4371 DK Added to show display message of slots unavailablility at specific location on selected date\r\n useEffect(() => {\r\n if (selectedfacility.id != 0) {\r\n setIsDisabled(false);\r\n } else {\r\n setIsDisabled(true);\r\n }\r\n }, [selectedfacility]);\r\n\r\n useEffect(() => {\r\n state.appointmentdetails.provider = { id: 0, name: \"\" };\r\n }, [selectedDate]);\r\n\r\n //FB 4371 DK Added to modify state when the selected provider is changed\r\n //FB 4960\r\n const handleProviderChange = (event: any, value: any) => {\r\n if (value != null) {\r\n SetSelectedProvider(value as Provider);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Choosed the provider \" + value.name);\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: value,\r\n location: state.appointmentdetails.location,\r\n date: state.appointmentdetails.date,\r\n },\r\n dispatch\r\n );\r\n } else {\r\n SetSelectedProvider({\r\n name: \"\",\r\n id: 0,\r\n job_title: \"\", //FB 4769\r\n });\r\n }\r\n };\r\n\r\n //FB 4371 DK Added to modify state when the selected facility is changed\r\n //FB 4960\r\n const handleLocationChange = (event: any, value: any) => {\r\n if (value != null) {\r\n SetSelectedfacility(value as Facility);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Choosed the location \" + value.name);\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: state.appointmentdetails.provider,\r\n location: {\r\n id: value.id,\r\n name: value.name,\r\n address: value.address,\r\n phone: value.phone, //FB-4867\r\n region: state.appointmentdetails.location.region,\r\n },\r\n date: state.appointmentdetails.date,\r\n },\r\n dispatch\r\n );\r\n } else {\r\n SetSelectedfacility(state.appointmentdetails.location);\r\n }\r\n };\r\n\r\n //FB 4371 DK Added to modify state when the selected date is changed\r\n //FB 4960\r\n const handleDateChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setSelectedDate(date);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Changed the date to \" + date.toDateString());\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: state.appointmentdetails.provider,\r\n location: state.appointmentdetails.location,\r\n date: date,\r\n },\r\n dispatch\r\n );\r\n }\r\n };\r\n\r\n //FB 4960\r\n const handleGoback = () => {\r\n props.onCallbackType(\"\");\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on go back - by date\");\r\n //FB 4960 End\r\n };\r\n\r\n const history = useHistory();\r\n\r\n //FB 4371 DK Added to navigate to slots page\r\n //FB 4960\r\n const handleProceed = () => {\r\n //let fac = facilities.find((facility) => (facility.id = 7));\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by date\");\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: state.appointmentdetails.provider,\r\n location: selectedfacility,\r\n date: state.appointmentdetails.date,\r\n },\r\n dispatch\r\n );\r\n history.push(\"/slots_bydate\", state);\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n Please select the date\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n 768 ? \"landscape\" : \"portrait\"}\r\n value={selectedDate}\r\n onChange={(date) => handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n {/* FB 9560 */}\r\n \r\n \r\n option.name}\r\n groupBy={(option) =>\r\n option.InsuranceAcceptance &&\r\n state.appointmentdetails.isInsuranceExist === \"Yes\"\r\n ? option.InsuranceAcceptance\r\n : \"\"\r\n }\r\n options={facilities}\r\n //FB-6264\r\n open={facilitiesopen}\r\n loading={facilitiesLoader}\r\n onOpen={() => {\r\n setFacilitiesOpen(true);\r\n }}\r\n onClose={() => {\r\n setFacilitiesOpen(false);\r\n }}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n // FB 4574 DK - Added class to increase the icon size\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n renderInput={(params) => (\r\n \r\n {facilitiesLoader ? (\r\n \r\n ) : null}\r\n {params.InputProps.endAdornment}\r\n \r\n ),\r\n }}\r\n />\r\n )}\r\n />\r\n \r\n \r\n 0 ? \"block\" : \"none\" }}\r\n >\r\n \r\n option.job_title != \"\" && option.job_title != undefined ? option.name + \" (\" + option.job_title + \")\" : option.name} //FB 4769\r\n groupBy={(option) =>\r\n option.InsuranceAcceptance &&\r\n state.appointmentdetails.isInsuranceExist === \"Yes\"\r\n ? option.InsuranceAcceptance\r\n : \"\"\r\n }\r\n options={providers}\r\n //FB-6264\r\n loading={providersLoader}\r\n open={providersopen}\r\n onOpen={() => {\r\n setProvidersOpen(true);\r\n }}\r\n onClose={() => {\r\n setProvidersOpen(false);\r\n }}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n // FB 4574 DK - Added class to increase the icon size\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n renderInput={(params) => (\r\n \r\n {providersLoader ? (\r\n \r\n ) : null}\r\n {params.InputProps.endAdornment}\r\n \r\n ),\r\n }}\r\n />\r\n )}\r\n />\r\n \r\n \r\n {window.innerWidth < 768 ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n No appointments available for the selected date. Please select\r\n another date.\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Show Schedule\r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport Date from \"../components/Date\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to invoke the date component\r\n\r\nexport default function ByDatePage(data:any) {\r\n return ;\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport {\r\n MuiPickersUtilsProvider,\r\n KeyboardDatePicker,\r\n} from \"@material-ui/pickers\";\r\n//FB 6264\r\nimport {\r\n Grid,\r\n Typography,\r\n Button,\r\n createMuiTheme,\r\n ThemeProvider,\r\n TextField,\r\n CircularProgress,\r\n} from \"@material-ui/core\";\r\nimport { Context, Provider } from \"../store\";\r\nimport { modify_AppointmentDetails } from \"../actions\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useStyles from \"../css/styles\";\r\nimport { Autocomplete } from \"@material-ui/lab\";\r\nimport { GetAvailableSlotsByDate, GetFacilityProviders, InsertPELogs } from \"../api\"; // FB 4960\r\nimport { format } from \"date-fns\";\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added for By Date screen of telederm workflow\r\n// FB 4574 DK 07/15/2021 Added class to style dropdown and calender icons\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 8796 KI 06/23/2024 Auto selecting location and provider if we have only one data\r\n// FB 9135 MS 07/22/2024 Show unavailable message when there is no slots\r\n// FB 9597 DK 10/24/2024 Schedules not loading on PE \r\n// FB 9560 DK 11/29/2024 Location field should be hidden in the PE when no scheduler is available for the selected date in the By date flow.\r\n\r\nexport default function Datepage(props: any) {\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n const { state, dispatch } = useContext(Context);\r\n const styles = useStyles();\r\n const [providers, setProviders] = React.useState([]);\r\n //FB-6264\r\n const [open, setOpen] = React.useState(false);\r\n const loading = open && providers.length === 0;\r\n const [selectedprovider, SetSelectedProvider] = useState(\r\n state.appointmentdetails.provider\r\n );\r\n\r\n const [selectedDate, setSelectedDate] = useState(\r\n state.appointmentdetails.date\r\n );\r\n\r\n const [availableSlots, setAvailableSlots] = useState();\r\n const [isDisabled, setIsDisabled] = useState(true);\r\n\r\n //FB 4371 DK Added to refresh the provider list when date is changed\r\n useEffect(() => {\r\n //FB 9597\r\n let session_ApptN = sessionStorage.getItem(\"AppointmentType_N\");//FB 7801\r\n let appt_type_n = session_ApptN != null && session_ApptN != 'undefined' ? Number(session_ApptN) : 0;\r\n SetSelectedProvider({ id: 0, name: \"\" });\r\n GetFacilityProviders(\r\n format(selectedDate, \"MM-dd-yyyy\"),\r\n -1,\r\n state.appointmentdetails.insurance.id, //FB 7801\r\n appt_type_n //FB 7801\r\n ).then((data: any) => { //FB 8796\r\n setProviders(data);\r\n setAvailableSlots(data.length); //FB 9135\r\n //FB 8796\r\n if (data.length == 1) {\r\n SetSelectedProvider(data[0]);\r\n }\r\n });\r\n }, [selectedDate]);\r\n\r\n //FB 4371 DK Added to refresh the available slots count on change of date\r\n useEffect(() => {\r\n let splittedDate = selectedDate.toLocaleDateString().split(\"/\");\r\n let date = splittedDate[0] + \"-\" + splittedDate[1] + \"-\" + splittedDate[2];\r\n GetAvailableSlotsByDate(date, 0, 0).then((data) => {\r\n //FB 9560\r\n //setAvailableSlots(data.length);\r\n });\r\n }, [selectedDate]);\r\n\r\n //FB 4371 DK Added to show display message of slots unavailablility on selected date\r\n useEffect(() => {\r\n if (availableSlots != 0) {\r\n setIsDisabled(false);\r\n } else {\r\n setIsDisabled(true);\r\n }\r\n }, [availableSlots]);\r\n\r\n // useEffect(() => {\r\n // if (selectedprovider.id != 0) {\r\n // setIsDisabled(false);\r\n // } else {\r\n // setIsDisabled(true);\r\n // }\r\n // }, [selectedprovider]);\r\n\r\n //FB 4371 DK Added to modify state when the selected provider is changed\r\n const handleProviderChange = (event: any, value: any) => {\r\n if (value != null) {\r\n SetSelectedProvider(value as Provider);\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: value,\r\n location: state.appointmentdetails.location,\r\n date: state.appointmentdetails.date,\r\n },\r\n dispatch\r\n );\r\n } else {\r\n SetSelectedProvider({\r\n name: \"\",\r\n id: 0,\r\n });\r\n }\r\n };\r\n\r\n //FB 4371 DK Added to modify state when the selected date is changed\r\n const handleDateChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setSelectedDate(date);\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: state.appointmentdetails.appointmentfilter,\r\n provider: state.appointmentdetails.provider,\r\n location: state.appointmentdetails.location,\r\n date: date,\r\n },\r\n dispatch\r\n );\r\n }\r\n };\r\n\r\n //FB 4960\r\n const handleGoback = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Date Telederm\");\r\n //FB 4960 End\r\n props.onCallbackType(\"\");\r\n };\r\n\r\n const history = useHistory();\r\n\r\n //FB 4371 DK Added to navigate to slots page\r\n //FB 4960\r\n const handleProceed = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by date\");\r\n //FB 4960 End\r\n history.push(\"/slots_bydate\", state);\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n Please select the date\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n 768 ? \"landscape\" : \"portrait\"}\r\n value={selectedDate}\r\n onChange={(date) => handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n {/* FB 9560 */}\r\n \r\n \r\n option.job_title != \"\" && option.job_title != undefined ? option.name + \" (\" + option.job_title + \")\" : option.name}\r\n options={providers}\r\n //FB-6264\r\n loading={loading}\r\n open={open}\r\n onOpen={() => {\r\n setOpen(true);\r\n }}\r\n onClose={() => {\r\n setOpen(false);\r\n }}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n // FB 4574 DK - Added class to increase the icon size\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n renderInput={(params) => (\r\n \r\n {loading ? (\r\n \r\n ) : null}\r\n {params.InputProps.endAdornment}\r\n \r\n ),\r\n }}\r\n />\r\n )}\r\n />\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n No appointments available for the selected date. Please select\r\n another date.\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Show Schedule\r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport Date from \"../components/Date_Telederm\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to invoke the telederm date component\r\n\r\nexport default function ByDateTeledermPage(data:any) {\r\n return ;\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\";//FB 7918\r\nimport Button from \"@material-ui/core/Button\";\r\nimport AccountCircle from \"@material-ui/icons/AccountCircle\";\r\nimport Business from \"@material-ui/icons/Business\";\r\nimport CalendarToday from \"@material-ui/icons/CalendarToday\";\r\nimport { Grid, Typography } from \"@material-ui/core\";\r\nimport ProviderPage from \"../components/Provider\";\r\nimport FacilityPage from \"./location\";\r\nimport ByDatePage from \"./date\";\r\nimport ByDateTeledermPage from \"./date_Telederm\";\r\nimport { AppointmentType, Context } from \"../store\"; //FB 8549\r\nimport { modify_AppointmentDetails } from \"../actions\";\r\nimport useStyles from \"../css/styles\";\r\n//FB 8722\r\nimport { GetAdminSettingValue, GetAppointmentTypeFromAdmin, GetFacilities, GetProviders, InsertPELogs } from '../api'; //FB 4960 //FB 7918 //FB 8796\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page for type of appointment module in home page\r\n// FB 4867 DK 01/20/2022 Changed buton label\r\n// FB 4949 DK 02/11/2022 Enable/Disable insurance selection\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6099 GS 07/26/2022 Disable the By Office Location button\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7918 SK 01/02/2024 PE - Restrict Appointments as per the Provider's Schedule\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8214 SK 02/01/2024 Accept Case Sensitive Admin Setting Value for Enable PE Custom Appointments in API and Portal and PE\r\n// FB 8796 KI 06/23/2024 Removing provider option if we have only one provider\r\n// FB 8549 DK 10/21/2024 TeleHealth re-work\r\n// FB 8722 DK 11/06/2024 PE workflows enhancements\r\n// FB 9973 DK 01/28/2025 Failed to fetch: GET https://drsamemr.com/api/Provider/GetSlotsByDate\r\n\r\nexport default function AppointmentFilterPage(props: any) {\r\n const classes = useStyles();\r\n const { state, dispatch } = useContext(Context);\r\n const [appointmentFilter, setAppointmentFilter] = useState(\r\n state.appointmentdetails.appointmentfilter\r\n );\r\n //FB 8796\r\n const [enableByProviderFilter, setByProvider] = useState(false);\r\n const [isSingleLocation, setIsSingleLocation] = useState(false); //FB 8722\r\n //FB 4371 DK Added to modify the state when appointment filter is selected\r\n const handleClick = (selectedFilter: string) => {\r\n setAppointmentFilter(selectedFilter);\r\n //FB 4960 Start\r\n if (selectedFilter == \"location\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected by office location\");\r\n }\r\n else if (selectedFilter == \"date\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected by date\");\r\n }\r\n else if (selectedFilter == \"provider\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected by provider\");\r\n }\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: state.appointmentdetails.insurance.id,\r\n planId: state.appointmentdetails.insurance.planId,\r\n name: state.appointmentdetails.insurance.name,\r\n planName: state.appointmentdetails.insurance.planName,\r\n },\r\n appointmentfilter: selectedFilter,\r\n provider: {\r\n id: 0,\r\n name: \"\",\r\n },\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n state.region.id = 0;\r\n state.region.name = \"\";\r\n state.region.state = \"\";\r\n };\r\n\r\n const handleGoback = () => {\r\n // FB 4949 DK - Start\r\n if (props.origin === \"PatientType\") {\r\n props.onCallback(\"\");\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Appointment Filter\");\r\n //FB 4960 End\r\n }\r\n else {\r\n props.onCallback(\"\");\r\n props.insurance({ id: 0, name: \"\" });\r\n props.insuranceplan({ id: 0, name: \"\" });\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Appointment Filter\");\r\n //FB 4960 End \r\n }\r\n // FB 4949 DK - End\r\n };\r\n\r\n //FB 4371 DK Added to load the component based on the selected option\r\n function getcomponent() {\r\n switch (appointmentFilter) {\r\n case \"provider\":\r\n return ;\r\n break;\r\n\r\n case \"location\":\r\n return ;\r\n break;\r\n\r\n case \"date\":\r\n return state.appointmentdetails.appointmenttype === \"telederm\" ? (\r\n \r\n ) : (\r\n \r\n );\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n //FB 7918 - Begin\r\n async function fetchAppointmentType() {\r\n //FB 9973\r\n const customApptAdmin = (await GetAdminSettingValue(\"Enable PE Custom Appointments\")).toLowerCase();//FB 8214\r\n sessionStorage.setItem(\"Enable PE Custom Appointments\", customApptAdmin);//FB 8142\r\n //FB 8214\r\n if (customApptAdmin == \"false\") {\r\n var apptTypes: any = \"\";\r\n if (state.appointmentdetails.appointmenttype == \"inoffice\") {\r\n if (state.appointmentdetails.patientType == \"existing\") {\r\n apptTypes = await GetAppointmentTypeFromAdmin(\"Existing Patient - Inoffice Appointment\");\r\n }\r\n else {\r\n apptTypes = await GetAppointmentTypeFromAdmin(\"New Patient - Inoffice Appointment\");\r\n }\r\n }\r\n else if (state.appointmentdetails.appointmenttype == \"telederm\") {\r\n if (state.appointmentdetails.patientType == \"existing\") {\r\n apptTypes = await GetAppointmentTypeFromAdmin(\"Existing Patient - TeleHealth Appointment\");\r\n }\r\n else {\r\n apptTypes = await GetAppointmentTypeFromAdmin(\"New Patient - TeleHealth Appointment\");\r\n }\r\n }\r\n sessionStorage.setItem(\"AppointmentType_N\", apptTypes[0].Id); //FB 8549\r\n }\r\n }\r\n\r\n //FB 8796 start\r\n useEffect(() => {\r\n const fetchProviders = async () => {\r\n //FB 9973\r\n //fetchAppointmentType();\r\n try {\r\n const data = await GetProviders(0, state.appointmentdetails.appointmenttype);\r\n if (data.length > 1) {\r\n setByProvider(true);\r\n }\r\n } catch (error) {\r\n console.error(\"Error fetching providers:\", error);\r\n setByProvider(false);\r\n }\r\n };\r\n\r\n //FB 8722\r\n const fetchLocations = async () => {\r\n //FB 9973\r\n //fetchAppointmentType();\r\n const data = await GetFacilities(0);\r\n if (data.length == 1) {\r\n setIsSingleLocation(true);\r\n }\r\n }\r\n\r\n fetchProviders();\r\n fetchLocations(); //FB 8722\r\n }, []);\r\n //FB 8796 end\r\n //FB 7918 - End\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n Choose how to create an appointment\r\n \r\n \r\n {/* FB 4867 */}\r\n \r\n {/* FB 4867 */}\r\n handleClick(\"location\")}\r\n startIcon={}\r\n className={\r\n appointmentFilter === \"location\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n >\r\n By Office Location\r\n \r\n \r\n \r\n handleClick(\"date\")}\r\n startIcon={}\r\n className={\r\n appointmentFilter === \"date\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n >\r\n By Date\r\n \r\n \r\n \r\n handleClick(\"provider\")}\r\n startIcon={}\r\n className={\r\n appointmentFilter === \"provider\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n >\r\n By Provider\r\n \r\n \r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n {getcomponent()}\r\n
\r\n );\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport {\r\n Grid,\r\n Button,\r\n Typography,\r\n TextField,\r\n createMuiTheme,\r\n ThemeProvider,\r\n} from \"@material-ui/core\";\r\nimport Autocomplete from \"@material-ui/lab/Autocomplete\";\r\nimport { Context } from \"../store\";\r\nimport { modify_AppointmentDetails } from \"../actions\";\r\nimport useStyles from \"../css/styles\";\r\nimport FilterPage from \"../inoffice/appointmentFilter\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { GetInsuranceCarriers, GetInsurancePlans, InsertPELogs } from \"../api\"; //FB 4960\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added for Insurance module in home page\r\n// FB 4574 DK 07/15/2021 Added styling for dropdown icon\r\n// FB 4735 DK 10/11/2021 implementation of provider specific workflow\r\n// FB 4949 DK 02/11/2022 Enable/Disable insurance selection\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n\r\nexport default function ProviderComponent(props: any) {\r\n const { state, dispatch } = useContext(Context);\r\n const [isInsuranceExist, setIsInsuranceExist] = useState(\r\n state.appointmentdetails.isInsuranceExist\r\n );\r\n const [insurancelist, setInsuranceList] = useState([]);\r\n const [insurance, SetInsurance] = useState({\r\n name: state.appointmentdetails.insurance.name,\r\n id: state.appointmentdetails.insurance.id,\r\n });\r\n const [insuranceplanlist, SetInsurancePlanlist] = useState([]);\r\n const [insuranceplan, SetInsurancePlan] = useState({\r\n name: state.appointmentdetails.insurance.planName,\r\n id: state.appointmentdetails.insurance.planId,\r\n });\r\n const styles = useStyles();\r\n\r\n //FB 4371 DK Added to load the insurance list\r\n useEffect(() => {\r\n GetInsuranceCarriers().then((data) => {\r\n setInsuranceList(data);\r\n });\r\n }, []);\r\n\r\n //FB 4371 DK Added to get plans for selected insurance\r\n useEffect(() => {\r\n if (state.appointmentdetails.insurance.planId === 0) {\r\n SetInsurancePlan({ id: 0, name: \"\" });\r\n }\r\n GetInsurancePlans(insurance.id).then((data) => {\r\n SetInsurancePlanlist(data);\r\n });\r\n }, [insurance]);\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n //FB 4371 DK Added to modify the state when isinsuranceexist value is updated\r\n const handleClick = (value: string) => {\r\n setIsInsuranceExist(value);\r\n //FB 4960 Start\r\n if (value == \"No\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected No insurance\");\r\n }\r\n else if (value == \"Yes\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected Choose insurance\");\r\n }\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: value,\r\n insurance: state.appointmentdetails.insurance,\r\n appointmentfilter: \"\",\r\n provider: state.appointmentdetails.provider,\r\n location: state.appointmentdetails.location,\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n };\r\n\r\n //FB 4371 DK Added to modify the state when insurance is selected\r\n const insuranceChange = (event: any, value: any) => {\r\n if (value != null) {\r\n SetInsurance(value);\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: value.id,\r\n planId: 0,\r\n name: value.name,\r\n planName: \"\",\r\n },\r\n appointmentfilter: \"\",\r\n provider: state.appointmentdetails.provider,\r\n location: state.appointmentdetails.location,\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Selected insurance \" + value.name);\r\n //FB 4960 End\r\n } else {\r\n SetInsurance({\r\n name: \"\",\r\n id: 0,\r\n });\r\n }\r\n };\r\n\r\n //FB 4371 DK Added to modify the state when insurance plan is selected\r\n const insuranceplanChange = (event: any, value: any) => {\r\n if (value != null) {\r\n SetInsurancePlan(value);\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: state.appointmentdetails.customappointmenttype,//FB 7801\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: state.appointmentdetails.insurance.id,\r\n planId: value.id,\r\n name: state.appointmentdetails.insurance.name,\r\n planName: value.name,\r\n },\r\n appointmentfilter: \"\",\r\n provider: state.appointmentdetails.provider,\r\n location: state.appointmentdetails.location,\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n } else {\r\n SetInsurancePlan({\r\n name: \"\",\r\n id: 0,\r\n });\r\n }\r\n };\r\n\r\n\r\n function handleGoback() {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Insurance Carrier\");\r\n //FB 4960 End\r\n props.onCallbackType(\"\");\r\n }\r\n\r\n //FB 4371 DK Added to load the next option based on the insurance selection\r\n function getcomponent() {\r\n if (isInsuranceExist === \"Yes\" && state.defaultlocation.id === 0) {\r\n //if (insuranceplan.id > 0 && insurance.id > 0) {\r\n if (insurance.id > 0) {\r\n //if(insurance.name==='OTHER'||insuranceplan.id>0)\r\n //if(insurance.name==='OTHER')\r\n return (\r\n // FB 4949\r\n \r\n );\r\n }\r\n } else if (isInsuranceExist === \"No\" && state.defaultlocation.id === 0) {\r\n return (\r\n // FB 4949\r\n \r\n );\r\n }\r\n }\r\n\r\n const history = useHistory();\r\n //FB 4735 DK - Added condition to differentiate between location and provider specific flows\r\n //FB 4960\r\n const handleProceed = () => {\r\n if (state.defaultlocation.id > 0) {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by office location\");\r\n //FB 4960 End\r\n history.push(\"/slots_bylocation\", state);\r\n }\r\n else {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by provider\");\r\n //FB 4960 End\r\n history.push(\"/slots_byprovider\", state);\r\n }\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n Please choose your insurance\r\n \r\n \r\n handleClick(\"No\")}\r\n className={\r\n isInsuranceExist === \"No\"\r\n ? styles.buttonActive\r\n : styles.buttonInactive\r\n }\r\n >\r\n No insurance\r\n \r\n \r\n \r\n handleClick(\"Yes\")}\r\n className={\r\n isInsuranceExist === \"Yes\"\r\n ? styles.buttonActive\r\n : styles.buttonInactive\r\n }\r\n >\r\n Choose insurance\r\n \r\n \r\n \r\n \r\n \r\n \r\n option.name}\r\n options={insurancelist}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n // FB 4574 DK - Added styling for icon\r\n classes={{\r\n popupIndicator: styles.autocompleteIcon\r\n }}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n 0 &&\r\n insurance.name != \"OTHER\"\r\n ? \"inline-flex\"\r\n : \"none\",\r\n }}\r\n >\r\n {/* \r\n \r\n option.name}\r\n options={insuranceplanlist}\r\n ListboxProps={{\r\n style: {\r\n maxHeight: 200,\r\n },\r\n }}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n */}\r\n \r\n\r\n 0)\r\n ? \"none\"\r\n : \"flex\",\r\n }}\r\n >\r\n \r\n {\r\n isInsuranceExist === \"Yes\"\r\n ? setIsInsuranceExist(\"\")\r\n : handleGoback();\r\n }}\r\n variant=\"contained\"\r\n className={styles.navigationButton}\r\n >\r\n Go Back\r\n \r\n \r\n \r\n {/* FB 4735 DK - Modified condition */}\r\n {(isInsuranceExist === \"No\" && (state.defaultlocation.id > 0 || state.defaultprovider.id > 0)) ||\r\n ((isInsuranceExist === \"Yes\" && (state.defaultlocation.id > 0 || state.defaultprovider.id > 0))\r\n && (state.appointmentdetails.insurance.id > 0 || state.appointmentdetails.insurance.name === \"OTHER\")) ? (\r\n \r\n \r\n \r\n Show Schedule\r\n \r\n \r\n \r\n {\r\n setIsInsuranceExist(\"\");\r\n SetInsurance({ id: 0, name: \"\" });\r\n SetInsurancePlan({ id: 0, name: \"\" });\r\n }}\r\n variant=\"contained\"\r\n className={styles.navigationButton}\r\n >\r\n Go Back\r\n \r\n \r\n \r\n ) : (\r\n {getcomponent()}\r\n )}\r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport InsuranceCarrier from \"../components/InsuranceCarrier\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to invoke the insurance component\r\n\r\nexport default function InsurancePage(data:any) {\r\n return ;\r\n}","import React, { useState, useContext, useEffect } from \"react\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport { Grid, Typography } from \"@material-ui/core\";\r\nimport { AppointmentType, Context } from \"../store\"; //FB 8549\r\nimport useStyles from \"../css/styles\";\r\n//FB 8549\r\nimport { GetAdminSettingValue, GetAppointmentTypeFromAdmin, GetAppointmentTypes, InsertPELogs, ValidateAppointmentType } from '../api';//FB 7997\r\nimport globalsettings from \"../../../config\";\r\nimport FilterPage from \"../inoffice/appointmentFilter\";\r\nimport { modify_AppointmentDetails } from \"../actions\";\r\n\r\n// update log\r\n// FB 7802 SK 12/14/2023 PE - Supporting Office-Specific Custom Appointment Types\r\n// FB 7997 SK 12/28/2023 PE- When an inactive appointment is mentioned in the admin parameter we should show that in PE\r\n// FB 8549 DK 10/21/2024 TeleHealth re-work\r\n\r\nexport default function AppointmentTypePage(props: any) {\r\n const classes = useStyles();\r\n const { state, dispatch } = useContext(Context);\r\n const [customApptType, setCustomAppointmentType] = useState(state.appointmentdetails.customappointmenttype);\r\n //FB 8549 Start\r\n const [appointmentTypes, setAppointmentTypes] = useState([]);\r\n\r\n const handleClick = async (type: AppointmentType) => {\r\n setCustomAppointmentType(type.NAME);\r\n sessionStorage.setItem(\"AppointmentType_N\", type.Id.toString());\r\n sessionStorage.setItem(\"AppointmentType\", type.NAME);\r\n sessionStorage.setItem(\"Duration\", type.DURATION.toString());\r\n\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: type.NAME,\r\n patientType: state.appointmentdetails.patientType,\r\n isInsuranceExist: state.appointmentdetails.isInsuranceExist,\r\n insurance: {\r\n id: state.appointmentdetails.insurance.id,\r\n planId: state.appointmentdetails.insurance.planId,\r\n name: state.appointmentdetails.insurance.name,\r\n planName: state.appointmentdetails.insurance.planName,\r\n },\r\n appointmentfilter: \"\",\r\n provider: {\r\n id: 0,\r\n name: \"\",\r\n },\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n };\r\n //FB 8549 End\r\n\r\n const handleGoback = () => {\r\n if (props.origin === \"PatientType\") {\r\n props.onCallback(\"\");\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Appointment Type\");\r\n }\r\n else {\r\n props.onCallback(\"\");\r\n props.insurance({ id: 0, name: \"\" });\r\n props.insuranceplan({ id: 0, name: \"\" });\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Appointment Type\");\r\n }\r\n };\r\n\r\n function getcomponent() {\r\n if (customApptType != \"\") {\r\n return \r\n }\r\n }\r\n\r\n //FB 8549 Start\r\n async function fetchAppointmentTypes() {\r\n var filter = state.appointmentdetails.appointmenttype != undefined ? state.appointmentdetails.appointmenttype : \"\";\r\n var types = await GetAppointmentTypes(filter, state.appointmentdetails.patientType);\r\n if (types != null) {\r\n setAppointmentTypes(types);\r\n }\r\n }\r\n //FB 8549 End\r\n\r\n useEffect(() => {\r\n fetchAppointmentTypes();\r\n }, []);\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n Choose Appointment Type\r\n \r\n \r\n \r\n \r\n {/* FB 8549 Begin */}\r\n {appointmentTypes.map((type) => (\r\n \r\n handleClick(type)}\r\n className={\r\n customApptType === type.NAME\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n >\r\n {type.NAME}\r\n \r\n {/* FB 8549 End */}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n {getcomponent()}\r\n
\r\n );\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\"; //FB 4949\r\nimport Button from \"@material-ui/core/Button\";\r\nimport { Grid, Typography } from \"@material-ui/core\";\r\nimport InsurancePage from \"../inoffice/insurance\";\r\nimport { Context } from \"../store\";\r\nimport { modify_AppointmentDetails } from \"../actions\";\r\nimport useStyles from \"../css/styles\";\r\n//FB-6264\r\nimport { GetAdminSettingValue, InsertPELogs } from \"../api\"; //FB 4949 , FB 4960\r\nimport FilterPage from \"../inoffice/appointmentFilter\"; //FB 4949\r\nimport { useHistory } from \"react-router-dom\"; //FB 4950\r\nimport globalsettings from \"../../../config\"; //FB 4960\r\nimport AppointmentTypePage from \"../inoffice/appointmentType\";//FB 7802\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added for Patient type module in home page\r\n// FB 4574 DK 07/15/2021 Fixed Go Back button issue\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific flow\r\n// FB 4949 DK 02/11/2022 Enable/Disable insurance selection\r\n// FB 4950 DK 02/14/2022 Fix for appointment filter options visibility on default location and provider flows\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 6366 SK 02/27/2023 Disable new patients for telehealth\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7802 SK 12/14/2023 PE - Supporting Office-Specific Custom Appointment Types\r\n// FB 8012 SK 01/08/2024 PE - Appointment types\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8214 SK 02/01/2024 Accept Case Sensitive Admin Setting Value for Enable PE Custom Appointments in API and Portal and PE\r\n// FB 9973 DK 01/28/2025 Failed to fetch: GET https://drsamemr.com/api/Provider/GetSlotsByDate\r\n\r\nexport default function InofficePage(props: any) {\r\n const history = useHistory(); //FB 4950\r\n const classes = useStyles();\r\n const { state, dispatch } = useContext(Context);\r\n const [patienttype, setPatientType] = useState(\r\n state.appointmentdetails.patientType\r\n );\r\n\r\n // FB 4949 DK - Start\r\n const [isInsuranceEnabled, setIsinsuranceEnabled] = useState(false);\r\n // FB 6366 SK - Start\r\n const [newPatient, setNewPatient] = useState(false);\r\n var np;\r\n async function GetNewPatient() {\r\n var enableNewPatient = await GetAdminSettingValue(\r\n \"Disable_New_PatientsforTelehealth\"\r\n );\r\n if (state.appointmentdetails.appointmenttype == \"telederm\") {\r\n if (enableNewPatient == \"true\" || enableNewPatient === \"True\") {\r\n setNewPatient(true);\r\n }\r\n } else {\r\n setNewPatient(false);\r\n }\r\n }\r\n // FB 6366 SK - End\r\n async function GetInsuranceAvailability() {\r\n //FB 6264\r\n let isInsuranceEnabled = await GetAdminSettingValue(\"Enable_PE_Insurance_Selection\");\r\n if (isInsuranceEnabled === 1) {\r\n setIsinsuranceEnabled(true);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n GetInsuranceAvailability();\r\n GetNewPatient();\t// FB 6366 SK\t\r\n }, []);\r\n // FB 4949 DK - End\r\n\r\n // FB 4950 Start\r\n const handleProceed = () => {\r\n if (state.defaultlocation.id > 0) {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by office location\");\r\n //FB 4960 End\r\n history.push(\"/slots_bylocation\", state);\r\n }\r\n else if (state.defaultprovider.id > 0) {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Show Schedule - by provider\");\r\n //FB 4960 End\r\n history.push(\"/slots_byprovider\", state);\r\n }\r\n };\r\n // FB 4950 End\r\n\r\n //FB 4371 DK Added to modify the state when patient type is selected\r\n const handleClick = (type: string) => {\r\n setPatientType(type);\r\n //FB 4960 Start\r\n if (type == \"new\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected new patient\");\r\n }\r\n else if (type == \"existing\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected existing patient\");\r\n }\r\n //FB 4960 End \r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: state.appointmentdetails.appointmenttype,\r\n customappointmenttype: \"\",//FB 7801\r\n patientType: type,\r\n isInsuranceExist: \"\",\r\n insurance: {\r\n id: 0,\r\n planId: 0,\r\n name: \"\",\r\n planName: \"\",\r\n },\r\n appointmentfilter: \"\",\r\n provider: {\r\n id: 0,\r\n name: \"\",\r\n },\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n };\r\n\r\n const handleGoback = () => {\r\n //FB 4735 DK - Modified condition\r\n if (!(state.defaultlocation.id > 0 || state.defaultprovider.id > 0)) {\r\n props.onCallbackAppt(\"\");\r\n }\r\n //FB 4950 Start\r\n else if ((state.defaultlocation.id > 0 || state.defaultprovider.id > 0) && patienttype !== \"\") {\r\n setPatientType(\"\");\r\n }\r\n //FB 4574 DK - Added a condition to redirect to advance derm. website on default location workflow\r\n else {\r\n if (state.defaultlocation.id > 0) {\r\n window.location.href = \"https://www.advanceddermatologypc.com/locations/\"\r\n }\r\n else if (state.defaultprovider.id > 0) {\r\n window.location.href = \"https://www.advanceddermatologypc.com/doctors/\"\r\n }\r\n }\r\n //FB 4950 End\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Patient Type\");\r\n //FB 4960 End\r\n };\r\n\r\n //FB 4950\r\n if ((state.defaultlocation.id > 0 || state.defaultprovider.id > 0) && !isInsuranceEnabled) {\r\n let ins = state.appointmentdetails.isInsuranceExist;\r\n state.appointmentdetails.isInsuranceExist = ins === \"\" ? \"No\" : ins;\r\n }\r\n\r\n //FB 7802 - Begin\r\n const [extractedText, setExtractedText] = useState(0);\r\n const [disableForm, setDisableForm] = useState(false);//FB 8012\r\n\r\n async function fetchAppointmentTypes() {\r\n //FB 9973\r\n //const apptTypes = (await GetAdminSettingValue(\"Enable PE Custom Appointments\")).toLowerCase();//FB 8214\r\n //sessionStorage.setItem(\"Enable PE Custom Appointments\",apptTypes);//FB 8142\r\n //FB 8214\r\n //FB 9973\r\n //if (apptTypes == \"true\") {\r\n setExtractedText(1);\r\n //}\r\n //else {\r\n //setExtractedText(0);\r\n //}\r\n //FB 8012 - Begin\r\n let adminSetting = await GetAdminSettingValue(\"DisableTeleHealth_PE\");\r\n //FB 9973\r\n if (adminSetting == \"true\"){\r\n setDisableForm(true);\r\n }\r\n //FB 8012 - End\r\n }\r\n\r\n useEffect(() => {\r\n fetchAppointmentTypes();\r\n }, []);\r\n //FB 7802 - End\r\n\r\n //FB 4371 DK Added to load the insurance module\r\n function getcomponent() {\r\n if (patienttype !== \"\") {\r\n //FB 4949 DK - Start\r\n if (isInsuranceEnabled) {\r\n return ;\r\n }\r\n //FB 4950 Start\r\n else if (!isInsuranceEnabled && state.defaultlocation.id == 0 && state.defaultprovider.id == 0) {\r\n let ins = state.appointmentdetails.isInsuranceExist;\r\n state.appointmentdetails.isInsuranceExist = ins === \"\" ? \"No\" : ins;\r\n //FB 7802 - Begin\r\n if (extractedText == 1) {\r\n return \r\n }\r\n else {\r\n return \r\n }\r\n }//FB 7802 - End\r\n //FB 4950 End\r\n //FB 4949 DK - End\r\n }\r\n }\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n Are you a new or existing patient?\r\n \r\n \r\n \r\n handleClick(\"new\")}\r\n className={\r\n patienttype === \"new\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n disabled={newPatient} //FB 6366\r\n >\r\n New\r\n \r\n \r\n \r\n handleClick(\"existing\")}\r\n className={\r\n patienttype === \"existing\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n >\r\n Existing\r\n \r\n \r\n \r\n \r\n {/* FB 4950 Start */}\r\n 0 || state.defaultprovider.id > 0) && patienttype !== \"\" && !isInsuranceEnabled) ? \"flex\" : \"none\",\r\n }}\r\n >\r\n \r\n Show Schedule\r\n \r\n \r\n\r\n 0 || state.defaultprovider.id > 0) && patienttype !== \"\" && !isInsuranceEnabled) || patienttype === \"\" ? \"flex\" : \"none\"\r\n }}\r\n >\r\n {/* FB 8012 */}\r\n \r\n Go Back\r\n \r\n\r\n \r\n {/* FB 4950 End */}\r\n \r\n {getcomponent()}\r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport PatientTypePage from \"../components/PatientType\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to invoke the patient type component\r\n\r\nexport default function InofficePage(data: any) {\r\n return ;\r\n}\r\n","import React from \"react\";\r\nimport PatientTypePage from \"../components/PatientType\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added to invoke the telederm page\r\n\r\nexport default function TeledermPage(data: any) {\r\n return ;\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport InofficePage from \"./inoffice/index\";\r\nimport TeledermPage from \"./telederm/index\";\r\nimport {\r\n Grid,\r\n TextField,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport { AppointmentType, Context, Facility, FacilityRegion, Provider } from \"./store/index\";\t//FB 4735 - Added reference //FB 9735\r\nimport { modify_AppointmentDetails } from \"./actions\";\r\nimport useStyles from \"./css/styles\";\r\n//FB 9735\r\nimport { GetAdminSettingValue, GetAllAppointmentTypes, GetFacilities, GetFacilityRegions, GetProviders, InsertPELogs } from \"./api\";\t//FB 4735 - Added reference , FB 4960 , FB 6366\r\nimport globalsettings from \"../../config\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Landing page of the site\r\n// FB 4522 DK 06/18/2021 Fixed variable type error\r\n// FB 4574 DK 07/15/2021 UI fixes\r\n// FB 4663 MS 09/01/2021 disabled telehealth button\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific workflow changes\r\n// FB 4783 MS 10/29/2021 Fixed location specific url issue\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6366 SK 02/20/2023 Admin setting for TeleHealth appointment message\r\n// FB 6986 KK 06/26/2023 Telehealth button should be enabled in PE by default\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 8043 MS 01/05/2024 Hide/show Telehealth button based on admin setting\r\n// FB 8012 SK 01/08/2024 PE - Appointment types\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8214 SK 02/01/2024 Accept Case Sensitive Admin Setting Value for Enable PE Custom Appointments in API and Portal and PE\r\n// FB 8259 SK 02/27/2024 After booking appt with card details when user click back button needs to be handled\r\n// FB 9735 DK \t 12/05/2024 On PE Sites, In Office vs TeleHealh is the First Patient Choice. These Must be Restictions Here\r\n// FB 9973 DK 01/28/2025 Failed to fetch: GET https://drsamemr.com/api/Provider/GetSlotsByDate\r\n\r\nexport default function Index(props: any) {\r\n const classes = useStyles();\r\n const { state, dispatch } = useContext(Context);\r\n const [appointmenttype, setAppointmenttype] = useState(\r\n state.appointmentdetails.appointmenttype\r\n );\r\n const [facilities, setFacilities] = React.useState({\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n });\r\n const [regions, setRegions] = React.useState({\r\n id: 0,\r\n name: \"\",\r\n state: \"\",\r\n });\r\n //FB 4735 DK - Added to store provider details\r\n const [providers, setProviders] = React.useState({\r\n id: 0,\r\n name: \"\",\r\n facility_n: 0,\r\n InsuranceAcceptance: \"\",\r\n bio: \"\"\r\n });\r\n let isDefaulted: boolean = false;\r\n const [inOfficeAppointmentTypesCount, setInOfficeAppointmentTypesCount] = useState(0); //FB 9735\r\n const [teleAppointmentTypesCount, setTeleAppointmentTypesCount] = useState(0); //FB 9735\r\n\r\n //FB 4371 DK Added to preload the region in default location workflow\r\n function setregion(id: any) {\r\n GetFacilityRegions().then((data) => {\r\n if (data.length > 0) {\r\n let selectedregion: FacilityRegion = data.find(\r\n (option) => option.id.toString() === id\r\n ) as FacilityRegion;\r\n setRegions(selectedregion as FacilityRegion);\r\n state.defaultlocation.region = selectedregion.id;\r\n }\r\n });\r\n }\r\n\r\n //FB 4371 DK Added to preload the facility in default location workflow\r\n function setlocation() {\r\n GetFacilities(0).then((data) => {\r\n if (data.length > 0) {\r\n //FB 4522 DK - Added type for option variable\r\n let selectedfacility: Facility = data.find(\r\n (option: any) => option.id.toString() === location\r\n ) as Facility;\r\n setFacilities(selectedfacility as Facility);\r\n state.defaultlocation = selectedfacility;\r\n }\r\n });\r\n }\r\n\r\n //FB 4735 DK - Added to preload the provider\r\n function setprovider() {\r\n GetProviders(0, state.appointmentdetails.appointmenttype).then((data) => {\r\n if (data.length > 0) {\r\n //FB 4522 DK - Added type for option variable\r\n let selectedprovider: Provider = data.find(\r\n (option: any) => option.id.toString() === provider\r\n ) as Provider;\r\n setProviders(selectedprovider as Provider);\r\n state.defaultprovider = selectedprovider;\r\n }\r\n });\r\n }\r\n\r\n let aptType = props.match.params.apt;\r\n let region = props.match.params.reg;\r\n let location = props.match.params.loc;\r\n let provider = props.match.params.provider;\t\t//FB 4735 DK - Added to read provider from url\r\n\r\n if (aptType != undefined && region != undefined && location != undefined) {\r\n isDefaulted = true;\r\n }\r\n\r\n //FB 4735 DK - Added to set default provider workflow\r\n if (aptType != undefined && provider != undefined) {\r\n isDefaulted = true;\r\n }\r\n //FB 6366 SK - Function to load Telehealth Message\r\n const [message, setMessage] = useState(\"\");\r\n async function GetTelehealthMessage() {\r\n setMessage(await GetAdminSettingValue(\"TeleHealthMessage\"));\r\n }\r\n\r\n //FB 6986 KK Begin\r\n const [disableTelehealth, setDisableTelehealth] = useState(false);\r\n const [disableForm, setDisableForm] = useState(false);//FB 8012\r\n async function GetTelehealthButton() {\r\n const data = await GetAdminSettingValue(\"DisableTeleHealth_PE\");\r\n //FB 9973\r\n //const customApptAdmin = (await GetAdminSettingValue(\"Enable PE Custom Appointments\")).toLowerCase();//FB 8012 //FB 8214\r\n //sessionStorage.setItem(\"Enable PE Custom Appointments\", customApptAdmin);//FB 8142\r\n if (data.toLowerCase() === \"true\") { //FB 8043\r\n setDisableTelehealth(data);\r\n }\r\n //FB 8012 - Begin\r\n //FB 9973\r\n if (data == \"true\") {\r\n setDisableForm(true);\r\n handleClick(\"inoffice\");\r\n }\r\n //FB 8012 - End\r\n }\r\n //FB 6986 KK End\r\n\r\n //FB 9735\r\n async function FetchAppointmentTypes() {\r\n var types: AppointmentType[] = await GetAllAppointmentTypes();\r\n if (types != null && types.length > 0) {\r\n setInOfficeAppointmentTypesCount(types.filter((type) => type.IS_TELE_APPOINTMENT == 0).length);\r\n setTeleAppointmentTypesCount(types.filter((type) => type.IS_TELE_APPOINTMENT == 1).length);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n sessionStorage.setItem(\"URL\", window.location.href);//FB 8259\r\n GetTelehealthButton();//FB 6986 KK\r\n GetTelehealthMessage(); //FB 6366 SK\r\n FetchAppointmentTypes(); //FB 9735\r\n if (aptType === \"1\") {\r\n setAppointmenttype(\"inoffice\");\r\n state.appointmentdetails.appointmenttype = \"inoffice\";\r\n } else if (aptType === \"2\") {\r\n setAppointmenttype(\"telederm\");\r\n state.appointmentdetails.appointmenttype = \"telederm\";\r\n }\r\n\r\n if (region != null) {\r\n setregion(region);\r\n }\r\n\r\n if (location != null) {\r\n setlocation();\r\n }\r\n\r\n //FB 4735 DK - Set provider if not null\r\n if (provider != null) {\r\n setprovider();\r\n }\r\n }, []);\r\n\r\n //FB 4371 DK Added to modify the state on selecting the appointment type\r\n\r\n const handleClick = (selected: string) => {\r\n setAppointmenttype(selected);\r\n //FB 4960 Start\r\n if (selected == \"inoffice\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected inoffice\");\r\n }\r\n else if (selected == \"telederm\") {\r\n InsertPELogs(globalsettings.clientIp, \"Selected telederm\");\r\n }\r\n //FB 4960 End\r\n modify_AppointmentDetails(\r\n {\r\n appointmenttype: selected,\r\n customappointmenttype: \"\",//FB 7801\r\n patientType: \"\",\r\n isInsuranceExist: \"\",\r\n insurance: {\r\n id: 0,\r\n planId: 0,\r\n name: \"\",\r\n planName: \"\",\r\n },\r\n appointmentfilter: \"\",\r\n provider: {\r\n id: 0,\r\n name: \"\",\r\n },\r\n location: {\r\n id: 0,\r\n name: \"\",\r\n address: \"\",\r\n region: 0,\r\n },\r\n date: new Date(),\r\n },\r\n dispatch\r\n );\r\n };\r\n\r\n //FB 4371 DK Added to load the component based on selected appointment type\r\n function getcomponent() {\r\n switch (appointmenttype) {\r\n case \"inoffice\":\r\n return (\r\n \r\n );\r\n break;\r\n\r\n case \"telederm\":\r\n return (\r\n \r\n );\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n {/* FB 8012 */}\r\n \r\n \r\n What type of appointment would you like to schedule?\r\n \r\n \r\n {/* FB 9735 */}\r\n \r\n handleClick(\"inoffice\")}\r\n variant=\"outlined\"\r\n className={\r\n appointmenttype === \"inoffice\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n //endIcon={appointmenttype === \"inoffice\" ? :\"\" }\r\n >\r\n In Office\r\n \r\n \r\n {/* FB 9735 */}\r\n \r\n handleClick(\"telederm\")}\r\n variant=\"outlined\"\r\n className={\r\n appointmenttype === \"telederm\"\r\n ? classes.buttonActive\r\n : classes.buttonInactive\r\n }\r\n style={{ display: disableTelehealth ? \"none\" : \"block\" }} //FB 8043\r\n //disabled={disableTelehealth} // FB 6986 disable or enable telehealth button from admin setting //FB 8043\r\n //disabled //FB 4663 disabled telehealth button\r\n >\r\n {globalsettings.digitalApptType}\r\n \r\n \r\n {/* FB 4574 DK - Added to notify user about tele appointment - Start */}\r\n \r\n \r\n {/* FB 6366 SK - Telehealth Message from Admin Param */}\r\n {message}\r\n \r\n \r\n {/* FB 4574 DK - Added to notify user about tele appointment - End */}\r\n \r\n {/* FB 4735 DK - Modified display condition */}\r\n 0 && facilities.id > 0 ? \"flex\" : \"none\", //FB 4783 - provider id check isn't required in this workflow\r\n marginTop: \"2%\",\r\n marginBottom: \"2%\",\r\n }}\r\n >\r\n \r\n \r\n \r\n Your selected office location\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* FB 4735 DK - Added grid to show provider name - Start */}\r\n 0 ? \"flex\" : \"none\",\r\n marginTop: \"2%\",\r\n marginBottom: \"2%\",\r\n }}\r\n >\r\n \r\n \r\n \r\n Selected provider\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* FB 4735 DK - Added grid to show provider name - End */}\r\n {/* FB 4735 DK - Modified condition */}\r\n \r\n {isDefaulted\r\n ? (regions.id > 0 && facilities.id > 0) || providers.id > 0\r\n ? getcomponent()\r\n : \"\"\r\n : getcomponent()}\r\n \r\n \r\n
\r\n );\r\n}\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\nimport TextField from \"@material-ui/core/TextField\";\r\nimport { Theme, createStyles, WithStyles } from \"@material-ui/core/styles\";\r\nimport MuiDialogTitle from \"@material-ui/core/DialogTitle\";\r\n// FB 4371 BR:Start 04/29/2021 Bug fix for the issue for DOB\r\nimport DateFnsUtils from '@date-io/date-fns';\r\nimport {\r\n MuiPickersUtilsProvider,\r\n KeyboardTimePicker,\r\n KeyboardDatePicker,\r\n} from '@material-ui/pickers';\r\n// FB 4371 BR:End\t04/29/2021 Bug fix for the issue for DOB\r\nimport {\r\n create_patient,\r\n get_States,\r\n remove_reg,\r\n create_appointment,\r\n} from \"../actions/index\";\r\nimport {\r\n SearchPatient,\r\n AppointmentCount,\r\n UpdateEmailCellPhone,\r\n FetchEmailCellPhone,\r\n InsertPELogs, //FB 4960\r\n GetPatientType, //FB 4959 \r\n UpdatePatientCommunicationPreference, //FB 6752\r\n ConvertTimeZone, //FB 7675\r\n GetSavedCards //FB 7719\r\n} from \"../api/index\"; //FB 4780 BR In PE, Getting Email/Cell for Existing Patients\r\nimport MuiDialogActions from \"@material-ui/core/DialogActions\";\r\nimport { GetAdminSettingValue } from '../api';//FB 7719\r\nimport {\r\n Grid,\r\n Button,\r\n makeStyles,\r\n createMuiTheme,\r\n ThemeProvider,\r\n Dialog,\r\n DialogContent,\r\n Typography,\r\n withStyles,\r\n NativeSelect,\r\n //FB 6752\r\n FormGroup,\r\n FormControlLabel,\r\n Checkbox,\r\n} from \"@material-ui/core\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { Context, State } from \"../store\";\r\nimport useStyle from \"../css/styles\";\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport CloseIcon from \"@material-ui/icons/Close\";\r\nimport { format } from \"date-fns\";\r\nimport Snackbar, { SnackbarOrigin } from \"@material-ui/core/Snackbar\";\r\nimport { Alert } from \"@material-ui/lab\";\r\nimport FormHelperText from \"@material-ui/core/FormHelperText\";\r\nimport FormControl from \"@material-ui/core/FormControl\";\r\nimport InputLabel from \"@material-ui/core/InputLabel\";\r\nimport globalsettings from \"../../../config\";\r\n//FB 4533 BR- GA to Patient Engagement\r\nimport ReactGA from 'react-ga';\r\n\r\n// update log\r\n// FB 4371 BR 03/29/2021 Demographics User Interface to accept the patient details\r\n// FB 4371 BR 04/29/2021 Bug fix for the issue for DOB\r\n// FB 4371 BR 04/29/2021 Bug fix for the issue which was creating 2 appointments on button click\r\n// FB 4409 DK 04/30/2021 Added logic to disable the DOB field after existing patient verified\r\n// FB 4499 DK 06/09/2021 Fix for Date of Birth field broken\r\n// FB 4533 BR 07/01/2021 GA tags to Patient Engagement\r\n// FB 4556 DK 07/07/2021 Implement client side error handling on PE\r\n// FB 4574 DK 07/15/2021 Fixed multiple UI issues\r\n// FB 4567 DK 07/12/2021 Modified gender options to sync with carecloud acceptable genders\r\n// FB 4578 DK 07/16/2021 Fixed issue with existing patient appointment booking\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4678 MS 08/31/2021 Fixed timer overlap issue\r\n// FB 4680 BR 09/13/2021\t PE - Existing patient workflow issues\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific flow\r\n// FB 4780 BR 11/02/2021 In PE, Getting Email/Cell for Existing Patients\r\n// FB 4816 MS 11/23/2021 Saving city, state, Zip for patient\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n// FB 4959 MS 03/01/2022 Added condition to hide PI button for existing patients in landing page\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6006 MS 04/05/2022 Added logic to save email/phone of an existing patient in new patient workflow\r\n// FB 4924 GS 06/21/2022 updated email validation to accept gmail accounts with special characters in recipient's name\r\n// FB 6752 DK 05/06/2023 Manage communication preference on PE\r\n// FB 7269 GA 08/31/2023 PE- Book Appointment is not enabled\r\n// FB 7330 GA 09/05/2023 PE - Unable to book appointment for existing patients\r\n// FB 7456 GS 09/22/2023 Issue with Appointment type when booked with telehealth existing patient\r\n// FB 7675 DK 11/09/2023 Timezone handling for appointments\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7719 SK 02/13/2024 PE- option to add credit card on file while booking an appointment\r\n// FB 8653 DK 05/08/2024 DOB is set to current date by default\r\n// FB 8917 DK 06/25/2024 Can't create patient without phone number\r\n// FB 9396 MS 09/13/2024 Renamed Book Appitnement Button to Verify for existing patient\r\n// FB 9538 KI 10/22/2024 Make PE Reason for Appt Mandetory\r\n// FB 9505 KI 10/22/2024 Mobile number is hardcode in PE alert\r\n\r\n\r\nexport interface SnackBarState extends SnackbarOrigin {\r\n open: boolean;\r\n}\r\n\r\nconst reEmail = /^([a-zA-Z0-9_\\-\\.]+)(?!.*[_./#&+!$%*=?'`{|^_-]{2})([ A-Za-z0-9_./#&+!$%*=?'`{|^_-]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/; //FB-4924\r\n\r\nconst styless = (theme: Theme) =>\r\n createStyles({\r\n root: {\r\n margin: 0,\r\n padding: theme.spacing(2),\r\n },\r\n closeButton: {\r\n position: \"absolute\",\r\n right: theme.spacing(1),\r\n top: theme.spacing(1),\r\n color: theme.palette.grey[500],\r\n },\r\n });\r\n\r\nexport interface DialogTitleProps extends WithStyles {\r\n id: string;\r\n children: React.ReactNode;\r\n onClose: () => void;\r\n}\r\n\r\nexport default function Demographics() {\r\n const styles = useStyle();\r\n\r\n const history = useHistory();\r\n\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n buttonactive: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n width: \"160px\",\r\n },\r\n inactive: {\r\n backgroundColor: \"white\",\r\n color: \"#18a2b8\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n },\r\n buttonMargin: {\r\n marginLeft: \"100px\",\r\n },\r\n datepickerroot: {\r\n \"&.MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n },\r\n dropdown_nomargin: {\r\n \"&.MuiFormControl-marginNormal\": {\r\n color: \"#18a2b8\",\r\n },\r\n //FB 4574 DK - Added styling for dropdown icon\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n //FB 4574 DK - Added a new class for calender icon\r\n iconCSS: {\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"1.8rem\"\r\n },\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n }\r\n });\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n const handleGoBack = () => {\r\n remove_reg(state.slotDetails.id);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Demographics\");\r\n //FB 4960 End\r\n history.goBack();\r\n };\r\n\r\n const dateOptions = {\r\n month: \"long\",\r\n day: \"numeric\",\r\n year: \"numeric\",\r\n weekday: \"long\",\r\n hour: \"2-digit\",\r\n minute: \"2-digit\",\r\n };\r\n\r\n const [FirstName, setFirstName] = useState(\"\");\r\n const [LastName, setLastName] = useState(\"\");\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n const [DOB, setDOB] = useState(null);\r\n const [Gender, setGender] = useState(0);\r\n const [Email, setEmail] = useState(\"\");\r\n const [Address, setAddress] = useState(\"\");\r\n const [ZipCode, setZipCode] = useState(\"\");\r\n const [CellPhone, setCellPhone] = useState(\"\");\r\n const [City, setCity] = useState(\"\");\r\n const [] = useState(\"\");\r\n const [Comments, setComments] = useState(\"\");\r\n const [states, setStates] = React.useState([]);\r\n const [opens] = React.useState(false);\r\n const [openDialog, setOpenDialog] = React.useState(false);\r\n const { state, dispatch } = useContext(Context);\r\n const [returnValue, setReturnvalue] = useState(0);\r\n const [displayvalue, setDisplayvalue] = useState(\"none\");\r\n const [displayMessage, setDisplaymessage] = useState(\"none\");\r\n const [disablebutton, setDisablebutton] = useState(\"none\");\r\n const [] = useState();\r\n const [statename, setStatename] = useState(\"\");\r\n const [verifydisplay, setVerifydisplay] = useState(\"none\");\r\n const [displayVerfiedMessage, SetdisplayVerfiedMessage] = useState(\"none\");\r\n const [, setCount] = useState(0);\r\n const [btnDisable, SetBtnDisable] = useState(false);\r\n const [seconds, setSeconds] = useState(0);\r\n //FB 4574 DK - Increased the time limit to 10 mins\r\n const [minutesLeft, setMinutesLeft] = useState(10);\r\n const [navigate, setNavigate] = useState(false);\r\n const [] = useState(false);\r\n const [genderMessage, setGenderMessage] = useState(\"\");\r\n const [stateMessage, setStateMessage] = useState(\"\");\r\n const [StatesError, setStatesError] = useState(false);\r\n const [GenderError, setGenderError] = useState(false);\r\n const [navigation, setNavigation] = useState(false);\r\n const [navigateWhenNotFound, setnavigateWhenNotFound] = useState(false);\r\n const [callCreatePatient, setCallCreatePatient] = useState(false);\r\n const todaysDate = format(new Date(), \"yyyy-MM-dd\");\r\n const [disableFields, setDisableFields] = useState(false);\r\n const [] = useState(false);\r\n const [emailError, setEmailError] = useState(false);\r\n const [emailMessage, setEmailMessage] = useState(\"\");\r\n const [CityError, setCityError] = useState(false);\r\n const [CommentError, setCommentError] = useState(false); //FB 9538\r\n const [CommentMessage, setCommentMessage] = useState(\"\"); //FB 9538\r\n const [CityMessage, setCityMessage] = useState(\"\");\r\n const [AddressError, setAddressError] = useState(false);\r\n const [AddressMessage, setAddressMessage] = useState(\"\");\r\n const [CellPhoneError, setCellPhoneError] = useState(false);\r\n const [CellPhoneMessage, setCellPhoneMessage] = useState(\"\");\r\n const [firstNameError, setfirstNameError] = useState(false);\r\n const [firstNameMessage, setfirstNameMessage] = useState(\"\");\r\n const [lastNameError, setlastNameError] = useState(false);\r\n const [lastNameMessage, setlastNameMessage] = useState(\"\");\r\n const [openValidationDialog, setOpenValidationDialog] = useState(false);\r\n const [patn, setPatn] = useState(0);\r\n const [DOBError, setDOBError] = useState(false);\r\n const [DOBMessage, setDOBMessage] = useState(\"\");\r\n //FB 8653\r\n const [dateforDOBfield, setDateforDOBfield] = useState(null as unknown as Date);\t\t//FB 4499 DK - Added to store the date selected from DOB field //FB 7719\r\n //FB 4780 BR:Start-In PE, Getting Email/Cell for Existing Patients\r\n const [openUpdateEmailDialog, setOpenUpdateEmailDialog] = React.useState(false);\r\n const [patientEmail, setPatientEmail] = useState(\"\");\r\n const [patientCellPhone, setPatientCellPhone] = useState(\"\");\r\n //FB 6752\r\n const [emailPref, setEmailPref] = useState(0);\r\n const [textPref, setTextPref] = useState(0);\r\n const [showPref, setShowPref] = useState(false);\r\n const [patientPref, setPatientPref] = useState(\"\");\r\n const [requireCC, setRequireCC] = useState(null); //FB 7719\r\n const [enableReasonForAppt, setEnableReasonForAppt] = useState(false); //FB 9538\r\n\r\n //FB 4780 BR:Start-In PE, Getting Email/Cell for Existing Patients\r\n\r\n //FB 4867 DK - Formatting phone number\r\n const normalizeInput = (value: any) => {\r\n if (!value) return value;\r\n const currentValue = value.replace(/[^\\d]/g, '');\r\n const cvLength = currentValue.length;\r\n\r\n if (value.length > 0) {\r\n if (cvLength < 4) return currentValue;\r\n if (cvLength < 7) return `(${currentValue.slice(0, 3)}) ${currentValue.slice(3)}`;\r\n return `(${currentValue.slice(0, 3)}) ${currentValue.slice(3, 6)}-${currentValue.slice(6, 10)}`;\r\n }\r\n };\r\n //FB 7719 Begin\r\n async function getadminsettingCCInfo() {\r\n const data = await GetAdminSettingValue(\"RequireCCInfo\");\r\n const parsedData = parseFloat(data);\r\n if (!isNaN(parsedData)) {\r\n setRequireCC(parsedData);\r\n }\r\n }\r\n\r\n //FB 9538 start\r\n async function getadminsettingEnableReasonForAppt() {\r\n const data = await GetAdminSettingValue(\"EnableReasonForAppointment_PE\");\r\n if (data.toLowerCase() === \"true\") {\r\n setEnableReasonForAppt(data);\r\n }\r\n }\r\n //FB 9538 end\r\n\r\n const buttonText = requireCC === 1 ? \"Next\" : \"Book Appointment\";\r\n const buttonVerifyText = requireCC === 1 ? \"Next\" : \"Verify\"; //FB 9396\r\n //FB 7719 End\r\n\r\n const [validationObj, setValidationObj] = useState({\r\n firstNameError: false,\r\n firstNameMessage: \"\",\r\n lastNameError: false,\r\n lastNameMessage: \"\",\r\n emailError: false,\r\n emailMessage: \"\",\r\n cellPhoneError: false,\r\n cellPhoneMessage: \"\",\r\n addressError: false,\r\n addressMessage: \"\",\r\n cityError: false,\r\n cityMessage: \"\",\r\n postalCodeError: false,\r\n postalCodeMessage: \"\",\r\n commentError: false, //FB 9538\r\n commentMessage: \"\",\t //FB 9538\r\n //FB 4371: Bindu:Start - Bug fix for the issue for DOB\r\n DOBError: false,\r\n DOBMessage: \"\",\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n });\r\n\r\n //FB 4371 BR 03/29/2021 validation flag to navigate to the next page\r\n const navigationValidation = () => {\r\n // FB 4924 \r\n const reName = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n var reGoodDate = /^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$/;\r\n\r\n if (navigateWhenNotFound == false) {\r\n setNavigate(false);\r\n } else {\r\n setNavigate(true);\r\n }\r\n\r\n if (navigation == true) {\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n Email.length != 0 &&\r\n Address.length != 0 &&\r\n ZipCode.length != 0 &&\r\n CellPhone.length != 0 &&\r\n City.length != 0 &&\r\n (enableReasonForAppt ? Comments.length != 0 : true) && //FB 9538\r\n statename != \"\" &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0 &&\r\n DOB <= todaysDate &&\r\n CellPhone.length === 14 && //FB-4867\r\n ZipCode.length === 5 &&\r\n reEmail.test(Email) && //FB-4924\r\n reName.test(FirstName) &&\r\n //FB 4371: Bindu: Start - Bug fix for the issue for DOB\r\n reName.test(LastName) &&\r\n reGoodDate.test(DOB)\r\n //FB 4371: Bindu: End - Bug fix for the issue for DOB\r\n ) {\r\n setNavigate(true);\r\n }\r\n } else {\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0\r\n ) {\r\n if (patType == \"existing\") {\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n Email.length != 0 &&\r\n Address.length != 0 &&\r\n ZipCode.length != 0 &&\r\n CellPhone.length != 0 &&\r\n City.length != 0 &&\r\n (enableReasonForAppt ? Comments.length != 0 : true) && //FB 9538\r\n statename != \"\" &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0 &&\r\n DOB <= todaysDate &&\r\n CellPhone.length === 14 && //FB-4867\r\n ZipCode.length === 5 &&\r\n reEmail.test(Email) && //FB-4924\r\n reName.test(FirstName) &&\r\n reName.test(LastName)\r\n ) {\r\n setNavigate(true);\r\n }\r\n } //FB 8917 - Removed unused code\r\n }\r\n }\r\n };\r\n\r\n //FB 7801 - Begin\r\n const [sessionAppointment_n, setSessionAppointment_n] = React.useState(\"\");\r\n const [sessionAppointment, setSessionAppointment] = React.useState(\"\");\r\n const [sessionAppointmentDuration, setSessionAppointmentDuration] = React.useState(\"\");\r\n const getSessionStorageValues = () => {\r\n const appt_n = sessionStorage.getItem(\"AppointmentType_N\");\r\n const appt = sessionStorage.getItem(\"AppointmentType\");\r\n const appt_duration = sessionStorage.getItem(\"Duration\");\r\n setSessionAppointment_n(appt_n!);\r\n setSessionAppointment(appt!);\r\n setSessionAppointmentDuration(appt_duration!);\r\n }\r\n\r\n useEffect(() => {\r\n //FB 7719 Begin\r\n const validateBackButton = sessionStorage.getItem(\"BackFromCreditCardScreen\");\r\n if (validateBackButton == \"True\") {\r\n var PatientDetails = sessionStorage.getItem(\"PatientDetails\");\r\n if (PatientDetails !== null) {\r\n var patientDetailsArray = JSON.parse(PatientDetails);\r\n setFirstName(patientDetailsArray[0]);\r\n setLastName(patientDetailsArray[1]);\r\n setDateforDOBfield(patientDetailsArray[2]);\r\n setGender(Number(patientDetailsArray[3]));\r\n let dob = new Date(patientDetailsArray[2]);\r\n handleDOBChange(dob);\r\n setEmail(patientDetailsArray[4]);\r\n setCellPhone(patientDetailsArray[5]);\r\n setAddress(patientDetailsArray[6]);\r\n setCity(patientDetailsArray[7]);\r\n setStatename((patientDetailsArray[8]));\r\n setZipCode(patientDetailsArray[9]);\r\n setEmailPref(Number(patientDetailsArray[10]));\r\n setTextPref(Number(patientDetailsArray[11]));\r\n setComments(patientDetailsArray[12]);\r\n if (state.patient.patient_type == \"existing\") {\r\n SetdisplayVerfiedMessage(\"flex\");\r\n }\r\n }\r\n }\r\n //FB 7719 End\r\n getSessionStorageValues();\r\n getadminsettingCCInfo(); //FB 7719 \r\n getadminsettingEnableReasonForAppt(); //FB 9538\r\n }, []);\r\n //FB 7801 - End\r\n\r\n useEffect(() => {\r\n navigationValidation();\r\n }, [\r\n FirstName,\r\n LastName,\r\n DOB,\r\n Gender,\r\n Email,\r\n Address,\r\n ZipCode,\r\n CellPhone,\r\n City,\r\n statename,\r\n Comments,\r\n ]); //FB 9538 included comments\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient gender\r\n const handleGenderChange = (event: React.ChangeEvent<{ value: any }>) => {\r\n setGender(parseInt(event.target.value));\r\n if (event.target.value === \"\") {\r\n setGenderError(true);\r\n setGenderMessage(\"Select the State\");\r\n } else {\r\n setGenderError(false);\r\n setGenderMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient state\r\n const handleStateChange = (event: React.ChangeEvent<{ value: unknown }>) => {\r\n setStatename(event.target.value as string);\r\n if (event.target.value === \"\") {\r\n setStatesError(true);\r\n setStateMessage(\"Select the State\");\r\n } else {\r\n setStatesError(false);\r\n setStateMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4574 DK - Modified the timer logic to expire after 10mins - Start\r\n React.useEffect(() => {\r\n if (seconds <= 600) {\r\n if (seconds === 60) {\r\n setMinutesLeft(\"9\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 120) {\r\n setMinutesLeft(\"8\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 180) {\r\n setMinutesLeft(\"7\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 240) {\r\n setMinutesLeft(\"6\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 300) {\r\n setMinutesLeft(\"5\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 360) {\r\n setMinutesLeft(\"4\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 420) {\r\n setMinutesLeft(\"3\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 480) {\r\n setMinutesLeft(\"2\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 540) {\r\n setMinutesLeft(\"1\");\r\n setState({ ...snackbarState, open: true });\r\n }\r\n if (seconds === 600) {\r\n setMinutesLeft(\"0\");\r\n setState({ ...snackbarState, open: true });\r\n SetBtnDisable(true);\r\n //alert(\"hi\");\r\n remove_reg(state.slotDetails.id);\r\n }\r\n }\r\n }, [seconds]);\r\n //FB 4574 DK - Modified the timer logic to expire after 10mins - End\r\n\r\n React.useEffect(() => {\r\n const interval = setInterval(() => {\r\n //setCount(countRef.current + 1);\r\n setSeconds((seconds) => seconds + 1);\r\n }, 1000);\r\n return () => clearInterval(interval);\r\n }, []);\r\n\r\n useEffect(() => {\r\n get_States(dispatch).then(() => {\r\n setStates(state.states);\r\n });\r\n if (patType == \"new\") {\r\n setCallCreatePatient(true);\r\n setDisplayvalue(\"initial\");\r\n setDisplaymessage(\"none\");\r\n setDisablebutton(\"initial\");\r\n setVerifydisplay(\"none\");\r\n setNavigation(true);\r\n } else {\r\n setCallCreatePatient(false);\r\n setDisplaymessage(\"none\");\r\n setDisablebutton(\"none\");\r\n setVerifydisplay(\"initial\");\r\n }\r\n }, []);\r\n\r\n const loading = opens && state.states.length === 0;\r\n //FB 7719 Begin\r\n const [model, setModel] = useState(false);\r\n async function getCardname(PATIENT_N: any) {\r\n var data = await GetSavedCards(PATIENT_N);\r\n if (data && data.length > 0) {\r\n setModel(true);\r\n }\r\n }\r\n //FB 7719 End\r\n\r\n useEffect(() => {\r\n let active = true;\r\n\r\n if (!loading) {\r\n return undefined;\r\n }\r\n\r\n if (active) {\r\n setStates(states);\r\n }\r\n\r\n return () => {\r\n active = false;\r\n };\r\n }, [loading, state.states.length]);\r\n\r\n //FB 7719 Removed Unused part of Code\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient cell phone\r\n const handleCellPhoneChange = (event: any) => {\r\n const re = /^[0-9\\b ()-]+$/; //FB-4867\r\n if (event.target.value === \"\" || re.test(event.target.value)) {\r\n setCellPhone(normalizeInput(event.target.value)); //FB-4867\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter the valid CellPhone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter the valid CellPhone\");\r\n }\r\n\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: false,\r\n cellPhoneMessage: \"\",\r\n });\r\n\r\n setCellPhoneError(false);\r\n setCellPhoneMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient zip code\r\n const handleZipCodeChange = (event: any) => {\r\n const re = /^[0-9\\b]+$/;\r\n if (event.target.value === \"\" || re.test(event.target.value)) {\r\n setZipCode(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n postalCodeError: true,\r\n postalCodeMessage: \"Enter the valid Postal Code\",\r\n });\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n postalCodeError: false,\r\n postalCodeMessage: \"\",\r\n });\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient address\r\n const handleAddressChange = (event: any) => {\r\n const re = /^[#.0-9a-zA-Z\\s,-]+$/;\r\n if (event.target.value === \"\" || re.test(event.target.value)) {\r\n setAddress(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n addressError: true,\r\n addressMessage: \"Enter the valid Address\",\r\n });\r\n\r\n setAddressError(true);\r\n setAddressMessage(\"Enter the valid Address\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n addressError: false,\r\n addressMessage: \"\",\r\n });\r\n\r\n setAddressError(false);\r\n setAddressMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient city\r\n const handleCityChange = (event: any) => {\r\n setCity(event.target.value);\r\n if (event.target.value === \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n cityError: true,\r\n cityMessage: \"Enter the valid City\",\r\n });\r\n\r\n setCityError(true);\r\n setCityMessage(\"Enter the valid City\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({ ...validationObj, cityError: false, cityMessage: \"\" });\r\n setCityError(false);\r\n setCityMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 9538 start\r\n const handleCommentChange = (event: any) => {\r\n setComments(event.target.value);\r\n if (event.target.value === \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n commentError: true,\r\n commentMessage: \"Enter the Reason for appointment booking\",\r\n });\r\n setCommentError(true);\r\n setCommentMessage(\"Enter the Reason for appointment booking\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({ ...validationObj, commentError: false, commentMessage: \"\" });\r\n setCommentError(false);\r\n setCommentMessage(\"\");\r\n }\r\n };\r\n //FB 9538 end\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient email\r\n const handleEmailChange = (event: any) => {\r\n setEmail(event.target.value);\r\n //FB 4924\r\n if (event.target.value === \"\" && reEmail.test(event.target.value)) { //FB-4924\r\n setEmail(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter the valid email\",\r\n });\r\n\r\n setEmailError(true);\r\n setEmailMessage(\"Enter the valid email\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: false,\r\n emailMessage: \"\",\r\n });\r\n\r\n setEmailError(false);\r\n setEmailMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient first name\r\n const handleFirstNameChange = (event: any) => {\r\n setFirstName(event.target.value);\r\n const re = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (event.target.value === \"\" && re.test(event.target.value)) {\r\n setFirstName(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: true,\r\n firstNameMessage: \"Enter valid first name\",\r\n });\r\n\r\n setfirstNameError(true);\r\n setfirstNameMessage(\"Enter valid first name\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: false,\r\n firstNameMessage: \"\",\r\n });\r\n\r\n setfirstNameError(false);\r\n setfirstNameMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient last name\r\n const handleLastNameChange = (event: any) => {\r\n setLastName(event.target.value);\r\n const re = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (event.target.value === \"\" && re.test(event.target.value)) {\r\n setLastName(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: true,\r\n lastNameMessage: \"Enter valid last name\",\r\n });\r\n\r\n setlastNameError(true);\r\n setlastNameMessage(\"Enter valid last name\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: false,\r\n lastNameMessage: \"\",\r\n });\r\n\r\n setlastNameError(false);\r\n setlastNameMessage(\"\");\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 validation for patient DOB\r\n //FB 4371: Bindu: Start - Bug fix for the issue for DOB\r\n const handleDOBChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setDateforDOBfield(date);\t\t//FB 4499 DK - Save the selected date\r\n setDOB(format(date, \"yyyy-MM-dd\"));\r\n if (\r\n format(date, \"yyyy-MM-dd\") < \"1800-01-01\" &&\r\n format(date, \"yyyy-MM-dd\") > \"9999-01-01\"\r\n ) {\r\n alert(format(date, \"yyyy-MM-dd\"));\r\n }\r\n if (date == null) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n if (date != null) {\r\n setDOBError(false);\r\n setDOBMessage(\"\");\r\n }\r\n }\r\n else {\r\n if (date == \"Invalid Date\") {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n }\r\n };\r\n //FB 4371: Bindu: End - Bug fix for the issue for DOB\r\n const handleClose = () => {\r\n remove_reg(state.slotDetails.id);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Close\");\r\n //FB 4960 End\r\n //FB 4735 DK - Added condition to redirect to provider flow \r\n if (state.defaultprovider.id > 0) {\r\n let apptType = state.appointmentdetails.appointmenttype === \"inoffice\" ? \"/1/\" : \"/2/\";\r\n window.location.href = apptType + state.defaultprovider.id;\r\n }\r\n else {\r\n history.push(\"\");\r\n }\r\n setOpenDialog(false);\r\n };\r\n\r\n //FB 4533 BR- GA to Patient Engagement\r\n const GAtracking = () => {\r\n ReactGA.event({\r\n category: 'Button',\r\n action: 'Appointment Booking'\r\n })\r\n }\r\n\r\n //FB 4780 BR-Start In PE, Getting Email/Cell for Existing Patients \r\n const handlePatientEmailChange = (event: any) => {\r\n //FB 4867 - Changed validation\r\n setPatientEmail(event.target.value);\r\n //FB 4924\r\n if (event.target.value === \"\" && reEmail.test(event.target.value)) { //FB-4924\r\n setPatientEmail(event.target.value);\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter the valid email\",\r\n });\r\n\r\n setEmailError(true);\r\n setEmailMessage(\"Enter the valid email\");\r\n }\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: false,\r\n emailMessage: \"\",\r\n });\r\n\r\n setEmailError(false);\r\n setEmailMessage(\"\");\r\n }\r\n };\r\n\r\n const handlePatientCellPhoneChange = (event: any) => {\r\n const re = /^[0-9\\b ()-]+$/; //FB-4867\r\n if (event.target.value === \"\" || re.test(event.target.value)) {\r\n setPatientCellPhone(normalizeInput(event.target.value)); //FB-4867\r\n\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter the valid CellPhone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter the valid CellPhone\");\r\n }\r\n\r\n if (event.target.value != \"\") {\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: false,\r\n cellPhoneMessage: \"\",\r\n });\r\n\r\n setCellPhoneError(false);\r\n setCellPhoneMessage(\"\");\r\n }\r\n };\r\n\r\n const updateEmailCellPhoneButton = async () => {\r\n //FB 4924\r\n if (patientEmail == null) {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter valid email\");\r\n }\r\n if (patientEmail != null) {\r\n if (patientEmail.length == 0) {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter valid email\");\r\n }\r\n\r\n if (!reEmail.test(patientEmail)) { //FB-4924\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter valid email\");\r\n }\r\n }\r\n if (patientCellPhone == null) {\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter valid Cell Phone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter valid Cell Phone\");\r\n }\r\n if (patientCellPhone != null) {\r\n if (patientCellPhone.length == 0 || patientCellPhone.length != 14) { //FB 4867 - Increased the maximum length\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter valid Cell Phone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter valid Cell Phone\");\r\n }\r\n }\r\n if (reEmail.test(patientEmail) && patientEmail.length != 0 && patientCellPhone.length != 0 && patientCellPhone.length == 14) { //FB 4867 - Increased the maximum length , FB-4924\r\n const patId = await SearchPatient(patientObj);\r\n const response = await UpdateEmailCellPhone(patId[0].Id, patientEmail, patientCellPhone);\r\n setOpenUpdateEmailDialog(false);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Update - Update patient email and cellphone dialog\");\r\n //FB 4960 End\r\n }\r\n }\r\n\r\n const handleDialogClose = () => {\r\n //FB 4924\r\n if (patientEmail == null) {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter valid email\");\r\n }\r\n if (patientEmail != null) {\r\n if (patientEmail.length == 0) {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter valid email\");\r\n }\r\n\r\n if (!reEmail.test(patientEmail)) { //FB-4924\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter valid email\");\r\n }\r\n }\r\n if (patientCellPhone == null) {\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter valid Cell Phone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter valid Cell Phone\");\r\n }\r\n if (patientCellPhone != null) {\r\n if (patientCellPhone.length == 0 || patientCellPhone.length != 14) { //FB 4867 - Increased the maximum length\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter valid Cell Phone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter valid Cell Phone\");\r\n }\r\n }\r\n if (reEmail.test(patientEmail) && patientEmail.length != 0 && patientCellPhone.length != 0 && patientCellPhone.length == 14) { //FB 4867 - Increased the maximum length , //FB-4924\r\n setOpenUpdateEmailDialog(false);\r\n }\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Close\");\r\n //FB 4960 End\r\n };\r\n //FB 4780 BR-End In PE, Getting Email/Cell for Existing Patients\r\n\r\n\r\n //FB 4371 BR 03/29/2021 Dialog close button funcationality\r\n //FB 4556 DK - Implement client side error handling on PE\r\n const handleCloseDialog = async () => {\r\n setOpenValidationDialog(false);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Close - exiting patient verification successful dialog\");\r\n //FB 4960 End\r\n appObj.PATIENT_N = patn;\r\n var date = new Date(appObj.APPOINTMENT_DATE);\r\n var x = date.getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - x);\r\n // if (date.getTimezoneOffset() === 240) {\r\n // date.setMinutes(date.getMinutes() - 240);\r\n // }\r\n appObj.APPOINTMENT_DATE = date;\r\n appObj.APPOINTMENT_CHECKIN_TIME = date;\r\n appObj.APPOINTMENT_CREATION_DATE = todaysDate;\r\n //FB 7456 Begin\r\n appObj.APPOINTMENT_TYPE_NAME === \"New Patient - Inoffice Appointment\" ?\r\n appObj.APPOINTMENT_TYPE_NAME = \"Existing Patient - Inoffice Appointment\" :\r\n appObj.APPOINTMENT_TYPE_NAME = \"Existing Patient - \" + globalsettings.digitalApptType + \" Appointment\";\r\n // appObj.APPOINTMENT_TYPE_NAME = \"Existing Patient - Inoffice Appointment\"; // commented old code\r\n //FB 7456 End\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB 6752\r\n let comm_pref = \"\";\r\n if (emailPref === 1 && textPref === 1) {\r\n comm_pref = \"E-mail & Text\";\r\n } else if (textPref === 1) {\r\n comm_pref = \"Text\";\r\n } else if (emailPref === 1) {\r\n comm_pref = \"E-mail\"\r\n }\r\n //FB 7801 - Begin\r\n if (Number(sessionAppointmentDuration) > 0) {\r\n appObj.DURATION = Number(sessionAppointmentDuration);\r\n appObj.APPOINTMENT_TYPE_NAME = sessionAppointment;\r\n appObj.APPOINTMENT_TYPE_OF_WORK = sessionAppointment;\r\n }\r\n //FB 7801 - End\r\n await UpdatePatientCommunicationPreference(appObj.PATIENT_N, comm_pref);\r\n //FB 7719 - Begin\r\n let result = 0;\r\n if (requireCC == 1) {\r\n result = 0;\r\n sessionStorage.setItem(\"appObj\", JSON.stringify(appObj));\r\n sessionStorage.setItem(\"patObj\", JSON.stringify(patientObj));\r\n var patientDetailsArray = [FirstName, LastName, dateforDOBfield, Gender, Email, CellPhone, Address, City, statename, ZipCode, emailPref, textPref, Comments];\r\n var patientDetailsString = JSON.stringify(patientDetailsArray);\r\n sessionStorage.setItem(\"PatientDetails\", patientDetailsString);\r\n if (model) {\r\n result = await create_appointment(appObj);\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result; //FB 4867 DK - Added appointment_n to state\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n else {\r\n history.push(\"/addCC\", state);\r\n }\r\n }\r\n else {\r\n result = await create_appointment(appObj);\r\n //FB 8917\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result;\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n //FB 7719 - End\r\n if (navigate == true) {\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n //FB 4533 BR-Start GA to Patient Engagement\r\n GAtracking();\r\n //FB 4533 BR-End GA to Patient Engagement\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (minutesLeft < 1) {\r\n setDisableFields(true);\r\n //FB 4780 BR - closing the update email and cellphone dialog on session expiry\r\n setOpenUpdateEmailDialog(false);\r\n }\r\n }, [minutesLeft]);\r\n\r\n //FB 6752 - Start\r\n useEffect(() => {\r\n if (displayVerfiedMessage != \"none\") {\r\n setShowPref(true);\r\n }\r\n }, [displayVerfiedMessage]);\r\n\r\n useEffect(() => {\r\n if (callCreatePatient) {\r\n setShowPref(true);\r\n }\r\n }, [callCreatePatient]);\r\n\r\n useEffect(() => {\r\n if (patientPref.includes(\"mail\") && (patientPref.includes(\"text\") || patientPref.includes(\"phone\"))) {\r\n setEmailPref(1);\r\n setTextPref(1);\r\n }\r\n else if (patientPref.includes(\"mail\")) {\r\n setEmailPref(1);\r\n } else if (patientPref.includes(\"text\") || patientPref.includes(\"phone\")) {\r\n setTextPref(1);\r\n }\r\n }, [patientPref]);\r\n //FB 6752 - End\r\n\r\n const DialogTitle = withStyles(styless)((props: DialogTitleProps) => {\r\n const { children, classes, onClose, ...other } = props;\r\n return (\r\n \r\n {children}\r\n {onClose ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n );\r\n });\r\n\r\n\r\n //FB 4371 BR 03/29/2021 book appointment button functionality\r\n const bookApptButtonClick = async () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Book Appointment - Demographics\");\r\n //FB 4960 End\r\n //FB 4924\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n var reGoodDate = /^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$/;\r\n if (\r\n FirstName.length != 0 &&\r\n firstNameMessage.length == 0 &&\r\n LastName.length != 0 &&\r\n lastNameMessage.length == 0 &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0 &&\r\n genderMessage.length == 0 &&\r\n Address.length != 0 &&\r\n AddressMessage.length == 0 &&\r\n City.length != 0 &&\r\n CityMessage.length == 0 &&\r\n (enableReasonForAppt ? Comments.length != 0 : true) && //FB 9538\r\n (enableReasonForAppt ? CommentMessage.length == 0 : true) && //FB 9538\r\n statename.length != 0 &&\r\n stateMessage.length == 0 &&\r\n ZipCode.length != 0 &&\r\n reEmail.test(Email) && //FB-4924\r\n CellPhone.length == 14 && //FB-4867\r\n //FB 4371: Bindu:Start - Bug fix for the issue for DOB\r\n statename.length != 1 &&\r\n reGoodDate.test(DOB)\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n ) {\r\n SetBtnDisable(true);\r\n }\r\n\r\n //FB 8917\r\n if (statename == \"\" || statename.length == 1) {\r\n setStatesError(true);\r\n setStateMessage(\"Select the state\");\r\n }\r\n if (Gender == 0) {\r\n setGenderError(true);\r\n setGenderMessage(\"Select the gender\");\r\n }\r\n //FB 4371: Bindu:Start - Bug fix for the DOB\r\n if (DOB == null) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n var reGoodDate = /^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$/;\r\n if (!reGoodDate.test(DOB)) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n if (Email.length == 0) {\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter the valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter the valid email\");\r\n }\r\n\r\n //FB 4924\r\n if (!reEmail.test(Email)) { //FB-4924\r\n setValidationObj({\r\n ...validationObj,\r\n emailError: true,\r\n emailMessage: \"Enter the valid email\",\r\n });\r\n setEmailError(true);\r\n setEmailMessage(\"Enter the valid email\");\r\n }\r\n\r\n const reName = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (!reName.test(FirstName)) {\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: true,\r\n firstNameMessage: \"Enter valid first name\",\r\n });\r\n setfirstNameError(true);\r\n setfirstNameMessage(\"Enter valid first name\");\r\n }\r\n if (!reName.test(LastName)) {\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: true,\r\n lastNameMessage: \"Enter valid last name\",\r\n });\r\n setlastNameError(true);\r\n setlastNameMessage(\"Enter valid last name\");\r\n }\r\n\r\n if (CellPhone.length == 0 || CellPhone.length != 14) { //FB-4867\r\n setValidationObj({\r\n ...validationObj,\r\n cellPhoneError: true,\r\n cellPhoneMessage: \"Enter the valid CellPhone\",\r\n });\r\n setCellPhoneError(true);\r\n setCellPhoneMessage(\"Enter the valid CellPhone\");\r\n }\r\n if (Address.length == 0) {\r\n setValidationObj({\r\n ...validationObj,\r\n addressError: true,\r\n addressMessage: \"Enter the valid Address\",\r\n });\r\n setAddressError(true);\r\n setAddressMessage(\"Enter the valid Address\");\r\n }\r\n if (City.length == 0) {\r\n setValidationObj({\r\n ...validationObj,\r\n cityError: true,\r\n cityMessage: \"Enter the valid City\",\r\n });\r\n setCityError(true);\r\n setCityMessage(\"Enter the valid City\");\r\n }\r\n\t//FB 9538 start\r\n if (Comments.length == 0) {\r\n setValidationObj({\r\n ...validationObj,\r\n commentError: true,\r\n commentMessage: \"Enter the Reason\",\r\n });\r\n setCommentError(true);\r\n setCommentMessage(\"Enter the Reason\");\r\n }\r\n\t//FB 9538 end\r\n if (ZipCode.length == 0 || ZipCode.length != 5) {\r\n setValidationObj({\r\n ...validationObj,\r\n postalCodeError: true,\r\n postalCodeMessage: \"Enter the valid Postal Code\",\r\n });\r\n }\r\n\r\n //FB 8917 - Removed unused code\r\n\r\n if (patType == \"new\") {\r\n //FB 4924\r\n const reName = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n Email.length != 0 &&\r\n Address.length != 0 &&\r\n ZipCode.length != 0 &&\r\n CellPhone.length != 0 &&\r\n City.length != 0 &&\r\n (enableReasonForAppt ? Comments.length != 0 : true) && //FB 9538\r\n statename != \"\" &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0 &&\r\n DOB <= todaysDate &&\r\n CellPhone.length === 14 && //FB-4867\r\n ZipCode.length === 5 &&\r\n reEmail.test(Email) && //FB-4924\r\n reName.test(FirstName) &&\r\n reName.test(LastName) &&\r\n //FB 4371: Bindu:Start - Bug fix for the issue for DOB\r\n statename.length != 1 &&\r\n reGoodDate.test(DOB)\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n ) {\r\n //FB 4371: Bindu - Bug fix for the issue which was creating 2 appointments on button click\r\n SetBtnDisable(true);\r\n const data = await AppointmentCount(\r\n state.slotDetails.slotDate,\r\n FirstName,\r\n LastName,\r\n DOB,\r\n Gender\r\n );\r\n setCount(data);\r\n if (data >= 1) {\r\n setOpenDialog(true);\r\n } else {\r\n setOpenDialog(false);\r\n if (callCreatePatient == true && navigate == true) {\r\n var date = new Date(appObj.APPOINTMENT_DATE);\r\n const ptData = await SearchPatient(patientObj);\r\n //FB 8917 - Removed unused code\r\n appObj.APPOINTMENT_DATE = date;\r\n appObj.APPOINTMENT_CHECKIN_TIME = date;\r\n appObj.PATIENT_N = returnValue;\r\n //FB 8917 - Removed unused code\r\n //FB 7801 - Begin\r\n if (Number(sessionAppointmentDuration) > 0) {\r\n appObj.DURATION = Number(sessionAppointmentDuration);\r\n appObj.APPOINTMENT_TYPE_NAME = sessionAppointment;\r\n appObj.APPOINTMENT_TYPE_OF_WORK = sessionAppointment;\r\n }\r\n //FB 7801 - End\r\n appObj.APPOINTMENT_CREATION_DATE = todaysDate;\r\n if (ptData.length != 0 || ptData[0] != undefined) {\r\n appObj.PATIENT_N =\r\n ptData[0].PE_PATIENT_N > 0\r\n ? ptData[0].PE_PATIENT_N\r\n : ptData[0].Id;\r\n setPatn(ptData[0].Id);\r\n //FB 4959 MS BEGIN\r\n const ptTypeData = await GetPatientType(ptData[0].Id);\r\n await UpdateEmailCellPhone(ptData[0].Id, Email, CellPhone); //FB 6006\r\n if (ptTypeData == 1)\r\n state.patient.patient_type = \"existing\";\r\n //FB 4959 MS END\r\n appObj.APPOINTMENT_CREATION_DATE = todaysDate;\r\n //alert(\"We found this user in our records! We will proceed with the existing details.\");\r\n setOpenValidationDialog(true);\r\n await getCardname(ptData[0].Id);//FB 7719\r\n return;\r\n } else {\r\n if (patientObj.PATIENT_FIRST_NAME !== \"\") {\r\n patientObj.PATIENT_FIRST_NAME =\r\n patientObj.PATIENT_FIRST_NAME.charAt(0).toUpperCase() +\r\n patientObj.PATIENT_FIRST_NAME.slice(1);\r\n }\r\n //FB 6752\r\n let comm_pref = \"\";\r\n if (emailPref === 1 && textPref === 1) {\r\n comm_pref = \"E-mail & Text\";\r\n } else if (textPref === 1) {\r\n comm_pref = \"Text\";\r\n } else if (emailPref === 1) {\r\n comm_pref = \"E-mail\"\r\n }\r\n patientObj.PATIENT_COMMUNICATION_PREFERENCE = comm_pref;\r\n //FB 7801 - Begin\r\n if (Number(sessionAppointmentDuration) > 0) {\r\n appObj.DURATION = Number(sessionAppointmentDuration);\r\n appObj.APPOINTMENT_TYPE_NAME = sessionAppointment;\r\n appObj.APPOINTMENT_TYPE_OF_WORK = sessionAppointment;\r\n }\r\n //FB 7801 - End\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB 7719 Begin\r\n let result = 0;\r\n if (requireCC) {\r\n result = 0;\r\n sessionStorage.setItem(\"appObj\", JSON.stringify(appObj));\r\n sessionStorage.setItem(\"patObj\", JSON.stringify(patientObj));\r\n var patientDetailsArray = [FirstName, LastName, dateforDOBfield, Gender, Email, CellPhone, Address, City, statename, ZipCode, emailPref, textPref, Comments];\r\n\r\n // Convert the array to a JSON string\r\n var patientDetailsString = JSON.stringify(patientDetailsArray);\r\n\r\n // Store the JSON string in sessionStorage\r\n sessionStorage.setItem(\"PatientDetails\", patientDetailsString);\r\n }\r\n else {\r\n result = await create_patient(patientObj, appObj, state.slotDetails.id);\r\n }\r\n //FB 7719 End\r\n //FB 4960 Start\r\n var selectedGender\r\n if (Gender == 1) {\r\n selectedGender = 'Male';\r\n }\r\n else if (Gender == 2) {\r\n selectedGender = 'Female';\r\n }\r\n else if (Gender == 3) {\r\n selectedGender = 'Unknown';\r\n }\r\n InsertPELogs(globalsettings.clientIp, \"The patients details are \" + FirstName + \", \" + LastName + \", \" + DOB + \", \" + selectedGender + \", \" + Email + \", \" + CellPhone + \", \" + Address + \", \" + City + \", \" + statename + \", \" + ZipCode);\r\n //FB 4960 End\r\n if (result != 0 && navigate == true) {\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result; //FB 4867 DK - Added appointment_n to state\r\n\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n //FB 7719 Begin\r\n else {\r\n if (result == 0) {\r\n if (requireCC == 1) {\r\n result = 0;\r\n sessionStorage.setItem(\"appObj\", JSON.stringify(appObj));\r\n sessionStorage.setItem(\"patObj\", JSON.stringify(patientObj));\r\n var patientDetailsArray = [FirstName, LastName, dateforDOBfield, Gender, Email, CellPhone, Address, City, statename, ZipCode, emailPref, textPref, Comments];\r\n var patientDetailsString = JSON.stringify(patientDetailsArray);\r\n sessionStorage.setItem(\"PatientDetails\", patientDetailsString);\r\n if (model) {\r\n result = await create_appointment(appObj);\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result; //FB 4867 DK - Added appointment_n to state\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n else {\r\n history.push(\"/addCC\", state);\r\n }\r\n }\r\n else {\r\n result = await create_appointment(appObj);\r\n //FB 8917\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result;\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n }\r\n }\r\n //FB 7719 End\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n }\r\n }\r\n if (navigate == true) {\r\n //FB 4533 BR-Start GA to Patient Engagement\r\n GAtracking();\r\n //FB 4533 BR-End GA to Patient Engagement\r\n }\r\n //FB 8917 - Removed unused code\r\n }\r\n }\r\n } else {\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n var reGoodDate = /^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$/;\r\n //FB 7330 Begin-Removed extra conditions inside IF\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0 &&\r\n (enableReasonForAppt ? Comments.length != 0 : true) && //FB 9538\r\n DOB <= todaysDate &&\r\n reGoodDate.test(DOB)\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n //FB 7269 End\r\n //FB 7330 End\r\n ) {\r\n //FB 8917 - Removed unused code\r\n //FB 4371: Bindu - Bug fix for the issue which was creating 2 appointments on button click\r\n //FB 7330 Begin\r\n const data = await AppointmentCount(\r\n state.slotDetails.slotDate,\r\n FirstName,\r\n LastName,\r\n DOB,\r\n Gender\r\n );\r\n setCount(data);\r\n if (data >= 1) {\r\n setOpenDialog(true);\r\n } else {\r\n setOpenDialog(false);\r\n if (callCreatePatient == true && navigate == true) {\r\n if (FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n Email.length != 0 &&\r\n Address.length != 0 &&\r\n ZipCode.length != 0 &&\r\n CellPhone.length != 0 &&\r\n City.length != 0 &&\r\n (enableReasonForAppt ? Comments.length != 0 : true) && //FB 9538\r\n statename != \"\" &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0 &&\r\n DOB <= todaysDate &&\r\n CellPhone.length === 14 && //FB-4867\r\n ZipCode.length === 5 &&\r\n reEmail.test(Email) && //FB-4924\r\n reName.test(FirstName) &&\r\n reName.test(LastName) &&\r\n //FB 4371: Bindu:Start - Bug fix for the issue for DOB\r\n statename.length != 1 &&\r\n reGoodDate.test(DOB)) {\r\n SetBtnDisable(true);\r\n }\r\n //FB 7330 End\r\n var date = new Date(appObj.APPOINTMENT_DATE);\r\n //FB 8917 - Removed unused code\r\n appObj.APPOINTMENT_DATE = date;\r\n appObj.APPOINTMENT_CHECKIN_TIME = date;\r\n appObj.PATIENT_N = returnValue;\r\n appObj.APPOINTMENT_CREATION_DATE = todaysDate;\r\n if (patientObj.PATIENT_FIRST_NAME !== \"\") {\r\n patientObj.PATIENT_FIRST_NAME =\r\n patientObj.PATIENT_FIRST_NAME.charAt(0).toUpperCase() +\r\n patientObj.PATIENT_FIRST_NAME.slice(1);\r\n }\r\n //FB 4680 BR - PE - Existing patient workflow issues\r\n //FB 7456 Begin\r\n // appObj.APPOINTMENT_TYPE_NAME = \"New Patient - Inoffice Appointment\"; //Commented old code\r\n appObj.APPOINTMENT_TYPE_NAME === \"Existing Patient - Inoffice Appointment\" ?\r\n appObj.APPOINTMENT_TYPE_NAME = \"New Patient - Inoffice Appointment\" :\r\n appObj.APPOINTMENT_TYPE_NAME = \"New Patient - \" + globalsettings.digitalApptType + \" Appointment\";\r\n //FB 7456 End\r\n //FB 6752\r\n let comm_pref = \"\";\r\n if (emailPref === 1 && textPref === 1) {\r\n comm_pref = \"E-mail & Text\";\r\n } else if (textPref === 1) {\r\n comm_pref = \"Text\";\r\n } else if (emailPref === 1) {\r\n comm_pref = \"E-mail\"\r\n }\r\n //FB 7801 - Begin\r\n if (Number(sessionAppointmentDuration) > 0) {\r\n appObj.DURATION = Number(sessionAppointmentDuration);\r\n appObj.APPOINTMENT_TYPE_NAME = sessionAppointment;\r\n appObj.APPOINTMENT_TYPE_OF_WORK = sessionAppointment;\r\n }\r\n //FB 7801 - End\r\n patientObj.PATIENT_COMMUNICATION_PREFERENCE = comm_pref;\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB 7719 Begin\r\n let result = 0;\r\n if (requireCC == 1) {\r\n result = 0;\r\n sessionStorage.setItem(\"appObj\", JSON.stringify(appObj));\r\n sessionStorage.setItem(\"patObj\", JSON.stringify(patientObj));\r\n var patientDetailsArray = [FirstName, LastName, dateforDOBfield, Gender, Email, CellPhone, Address, City, statename, ZipCode, emailPref, textPref, Comments];\r\n var patientDetailsString = JSON.stringify(patientDetailsArray);\r\n sessionStorage.setItem(\"PatientDetails\", patientDetailsString);\r\n if (model) {\r\n result = await create_appointment(appObj);\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result; //FB 4867 DK - Added appointment_n to state\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n else {\r\n history.push(\"/addCC\", state);\r\n }\r\n }\r\n else {\r\n result = await create_appointment(appObj);\r\n //FB 8917\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result;\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n //FB 7719 End\r\n }\r\n\r\n if (navigate == true) {\r\n GAtracking(); //FB 4533 BR - GA to Patient Engagement\r\n }\r\n if (callCreatePatient == false) {\r\n var date = new Date(appObj.APPOINTMENT_DATE);\r\n var x = date.getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - x);\r\n //FB 8917 - Removed unused code\r\n appObj.APPOINTMENT_DATE = date;\r\n appObj.APPOINTMENT_CHECKIN_TIME = date;\r\n appObj.PATIENT_N = returnValue;\r\n appObj.APPOINTMENT_CREATION_DATE = todaysDate;\r\n //FB 7801 - Begin\r\n if (Number(sessionAppointmentDuration) > 0) {\r\n appObj.DURATION = Number(sessionAppointmentDuration);\r\n appObj.APPOINTMENT_TYPE_NAME = sessionAppointment;\r\n appObj.APPOINTMENT_TYPE_OF_WORK = sessionAppointment;\r\n }\r\n //FB 7801 - End\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB 4578 DK - Removed syntax to avoid appointment booking twice\r\n //FB 4867 DK - sending appointment_n to state\r\n //FB 6752\r\n let comm_pref = \"\";\r\n if (emailPref === 1 && textPref === 1) {\r\n comm_pref = \"E-mail & Text\";\r\n } else if (textPref === 1) {\r\n comm_pref = \"Text\";\r\n } else if (emailPref === 1) {\r\n comm_pref = \"E-mail\"\r\n }\r\n await UpdatePatientCommunicationPreference(appObj.PATIENT_N, comm_pref);\r\n //FB 7719 Begin\r\n let result = 0;\r\n if (requireCC == 1) {\r\n result = 0;\r\n sessionStorage.setItem(\"appObj\", JSON.stringify(appObj));\r\n sessionStorage.setItem(\"patObj\", JSON.stringify(patientObj));\r\n var patientDetailsArray = [FirstName, LastName, dateforDOBfield, Gender, Email, CellPhone, Address, City, statename, ZipCode, emailPref, textPref, Comments];\r\n var patientDetailsString = JSON.stringify(patientDetailsArray);\r\n sessionStorage.setItem(\"PatientDetails\", patientDetailsString);\r\n if (model) {\r\n result = await create_appointment(appObj);\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result; //FB 4867 DK - Added appointment_n to state\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n else {\r\n history.push(\"/addCC\", state);\r\n }\r\n }\r\n else {\r\n result = await create_appointment(appObj);\r\n //FB 8917\r\n state.patient.name = FirstName;\r\n state.patient.appointment_n = result;\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n //FB 7719 End\r\n //FB 4556 DK - Implement client side error handling on PE - End\r\n //FB 4533 BR-Start GA to Patient Engagement\r\n GAtracking();\r\n //FB 4533 BR-End GA to Patient Engagement\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n const DialogActions = withStyles((theme: Theme) => ({\r\n root: {\r\n margin: 0,\r\n padding: theme.spacing(1),\r\n },\r\n }))(MuiDialogActions);\r\n\r\n //FB 4371 BR 03/29/2021 validate button functinality\r\n const buttonclick = async () => {\r\n const reName = /^(?=.{1,40}$)[a-zA-Z0-9 ]+(?:[-'\\s][a-zA-Z0-9 ]+)*$/;\r\n if (!reName.test(FirstName)) {\r\n setValidationObj({\r\n ...validationObj,\r\n firstNameError: true,\r\n firstNameMessage: \"Enter valid first name\",\r\n });\r\n setfirstNameError(true);\r\n setfirstNameMessage(\"Enter valid first name\");\r\n }\r\n if (!reName.test(LastName)) {\r\n setValidationObj({\r\n ...validationObj,\r\n lastNameError: true,\r\n lastNameMessage: \"Enter valid last name\",\r\n });\r\n setlastNameError(true);\r\n setlastNameMessage(\"Enter valid last name\");\r\n }\r\n //FB 4371: Bindu:Start - Bug fix for the DOB\r\n if (DOB == null) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n var reGoodDate = /^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$/;\r\n if (!reGoodDate.test(DOB)) {\r\n setDOBError(true);\r\n setDOBMessage(\"Enter valid Date of Birth\");\r\n }\r\n //FB 4371: Bindu:End - Bug fix for the issue for DOB\r\n\r\n if (\r\n FirstName.length != 0 &&\r\n LastName.length != 0 &&\r\n //FB 4371: Bindu - Bug fix for the issue for DOB\r\n DOB != null &&\r\n Gender != 0\r\n ) {\r\n const data = await SearchPatient(patientObj);\r\n if (data.length == 0 || data[0] == undefined) {\r\n setCallCreatePatient(true);\r\n setnavigateWhenNotFound(true); //FB 8917\r\n setNavigate(false);\r\n setVerifydisplay(\"none\");\r\n setDisplayvalue(\"initial\");\r\n setDisplaymessage(\"flex\");\r\n setDisablebutton(\"initial\");\r\n state.appointmentdetails.patientType = \"new\"; //FB 8917\r\n patType = \"new\"; //FB 8917\r\n } else {\r\n //FB 4959 MS BEGIN\r\n const ptTypeData = await GetPatientType(data[0].Id);\r\n if (ptTypeData == 1)\r\n state.patient.patient_type = \"existing\";\r\n //FB 4959 END \r\n setReturnvalue(\r\n data[0].PE_PATIENT_N > 0 ? data[0].PE_PATIENT_N : data[0].Id\r\n );\r\n await getCardname(data[0].Id); //FB 7719\r\n //FB 4780 BR:Start In PE, Getting Email/Cell for Existing Patients\r\n const patientDetails = await FetchEmailCellPhone(data[0].Id);\r\n setPatientEmail(patientDetails[0].email);\r\n\r\n //FB 4867 - Formatting the phone number - Start\r\n var cleaned = ('' + patientDetails[0].cellPhone).replace(/\\D/g, '');\r\n var match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\r\n var phone = \"\";\r\n if (match) {\r\n phone = '(' + match[1] + ') ' + match[2] + '-' + match[3];\r\n }\r\n setPatientCellPhone(phone);\r\n //FB 4867 - Formatting the phone number - End\r\n\r\n //FB 4780 BR:End In PE, Getting Email/Cell for Existing Patients\r\n setCallCreatePatient(false);\r\n setVerifydisplay(\"none\");\r\n setNavigation(true);\r\n setDisplaymessage(\"none\");\r\n setDisplayvalue(\"none\");\r\n SetdisplayVerfiedMessage(\"flex\");\r\n setDisableFields(true);\r\n setDisablebutton(\"initial\");\r\n //FB 4780 BR In PE, Getting Email/Cell for Existing Patients\r\n setOpenUpdateEmailDialog(true);\r\n setPatientPref(data[0].PATIENT_COMMUNICATION_PREFERENCE.toLowerCase()); //FB 6752\r\n }\r\n } else {\r\n if (Gender == 0) {\r\n setGenderError(true);\r\n setGenderMessage(\"Select the gender\");\r\n }\r\n }\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 patient details object\r\n const patientObj = {\r\n PATIENT_FIRST_NAME: FirstName,\r\n PATIENT_LAST_NAME: LastName,\r\n PATIENT_BIRTH_DAY: DOB,\r\n GENDER_N: Gender,\r\n PATIENT_ADDRESS: Address,\r\n PATIENT_CITY_STATE_ZIP: City + ', ' + statename + ' ' + ZipCode, //FB 4816 //FB 7719\r\n PATIENT_CELL_PHONE: CellPhone,\r\n PATIENT_EMAIL: Email,\r\n PATIENT_COMMENTS: null,\r\n PATIENT_INSURANCE_CARRIER:\r\n state.appointmentdetails.insurance.name === \"OTHER\"\r\n ? \"\"\r\n : state.appointmentdetails.insurance.name,\r\n PATIENT_INSURANCE_PLAN_NAME: state.appointmentdetails.insurance.planName,\r\n PATIENT_COMMUNICATION_PREFERENCE: \"\" //FB 6752\r\n };\r\n\r\n //FB 4371 BR 03/29/2021 appointment details object\r\n const appObj = {\r\n APPOINTMENT_EXTERNAL_ID: null,\r\n PATIENT_N: 0,\r\n EMPLOYEE_N: state.slotDetails.employeeId,\r\n APPOINTMENT_DATE: state.slotDetails.slotDate,\r\n APPOINTMENT_CHECKIN_TIME: state.slotDetails.slotDate,\r\n APPOINTMENT_TYPE_OF_WORK: \"\",\r\n APPOINTMENT_IS_ACTIVE: true,\r\n APPOINTMENT_TYPE_NAME:\r\n state.appointmentdetails.appointmenttype === \"inoffice\"\r\n ? state.appointmentdetails.patientType === \"new\"\r\n ? \"New Patient - Inoffice Appointment\"\r\n : \"Existing Patient - Inoffice Appointment\"\r\n : state.appointmentdetails.patientType === \"new\"\r\n ? \"New Patient - \" + globalsettings.digitalApptType + \" Appointment\"\r\n : \"Existing Patient - \" +\r\n globalsettings.digitalApptType +\r\n \" Appointment\",\r\n DURATION: state.appointmentdetails.duration, //FB 4638 reading value from API\r\n CANCELLATION_REASON: null,\r\n COMMENT: Comments,\r\n COLUMN_NUMBER: 0,\r\n APPOINTMENT_EXTERNAL_ID_TEXT: null,\r\n FACILITY_N: state.slotDetails.facilityId,\r\n Last_Text_Sent: null,\r\n Last_Email_Sent: null,\r\n IsConfirmed: false,\r\n APPOINTMENT_REVIEWSTARS: 0,\r\n APPOINTMENT_FEEDBACK: null,\r\n APPOINTMENT_CREATION_DATE: \"\",\r\n };\r\n\r\n const initialState = {\r\n errorMessage: null,\r\n errored: false,\r\n };\r\n\r\n const handleCloseSnackbar = () => {\r\n setState({ ...snackbarState, open: false });\r\n };\r\n const [] = React.useState(initialState);\r\n const { register, handleSubmit, errors } = useForm();\r\n const onSubmit = () => {\r\n //setOpendialog(true);\r\n };\r\n //FB 8917\r\n let patType = state.appointmentdetails.patientType;\r\n const [snackbarState, setState] = React.useState({\r\n open: false,\r\n vertical: \"bottom\",\r\n horizontal: \"left\",\r\n });\r\n const { vertical, horizontal, open } = snackbarState;\r\n //FB 6752\r\n const handleEmailCheckbox = async (e: any) => {\r\n if (e.target.checked) {\r\n setEmailPref(1);\r\n }\r\n else {\r\n setEmailPref(0);\r\n }\r\n }\r\n\r\n const handleTextCheckbox = async (e: any) => {\r\n if (e.target.checked) {\r\n setTextPref(1);\r\n }\r\n else {\r\n setTextPref(0);\r\n }\r\n }\r\n\r\n //FB 7675\r\n var timeZone = \"America/Port-au-Prince\";\r\n var userTimeZone = sessionStorage.getItem(\"TimeZone\");\r\n if (userTimeZone != null) {\r\n timeZone = userTimeZone;\r\n }\r\n\r\n //FB 7675\r\n var convertedSlot = ConvertTimeZone(state.slotDetails.slotDate.toDateString(), state.slotDetails.slotDate.toTimeString(), timeZone, \"datetime\");\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {minutesLeft != 0\r\n ? minutesLeft + \" minute(s) left\"\r\n : \"your session has expired!\"}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n {/*FB 4867 DK - Styling changes*/}\r\n \r\n

\r\n {\"You are booking an in-office appointment with \"} \r\n \r\n {/* FB 4574 DK - Removed \"Dr.\" string */}\r\n {/* FB 7675 */}\r\n {\r\n state.slotDetails.employeeName +\r\n \" on \" +\r\n new Date(convertedSlot).toLocaleString('en-US', dateOptions) +\r\n \" at \" +\r\n state.appointmentdetails.location.name}\r\n \r\n

\r\n \r\n {/*FB 4867 DK - Styling changes*/}\r\n \r\n

\r\n {\"You are booking a \" +\r\n globalsettings.digitalApptType.toLowerCase() +\r\n \" appointment with \"}\r\n  \r\n \r\n {/* FB 4574 DK - Removed \"Dr.\" string */}\r\n {/* FB 7675 */}\r\n {\r\n state.slotDetails.employeeName +\r\n \" on \" +\r\n new Date(convertedSlot).toLocaleString(\r\n \"en-US\",\r\n dateOptions\r\n )}\r\n \r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n Please fill out your details\r\n \r\n\r\n \r\n {minutesLeft != 0\r\n ? \"Your session will be active for next \" +\r\n minutesLeft +\r\n \" minute(s)\"\r\n : \"Your session has expired!\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n We could not find your record, please enter other details and\r\n book the appointment\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Verified. You can go ahead and book the appointment\r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* FB 7719 */}\r\n handleFirstNameChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n label=\"First Name *\"\r\n inputRef={register({\r\n required: true,\r\n pattern: /^[A-Za-z0-9 ]+$/i,\r\n })}\r\n autoCapitalize=\"none\"\r\n disabled={disableFields}\r\n helperText={firstNameMessage}\r\n value={FirstName}\r\n error={firstNameError}\r\n />\r\n \r\n \r\n {/* FB 7719 */}\r\n handleLastNameChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n inputRef={register({\r\n required: true,\r\n pattern: /^[A-Za-z0-9]+$/i,\r\n })}\r\n autoCapitalize=\"none\"\r\n disabled={disableFields}\r\n helperText={lastNameMessage}\r\n value={LastName}\r\n error={lastNameError}\r\n label=\"Last Name *\"\r\n />\r\n \r\n \r\n \r\n \r\n {/* FB 4371 : Bindu:Start - Below date control has been changed for the dat of birth field*/}\r\n \r\n \r\n handleDOBChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n maxDate={new Date()}\r\n initialFocusedDate={null}\r\n helperText={DOBMessage}\r\n error={DOBError}\r\n disabled={disableFields} //FB 4409 DK - Added to disable the DOB field after existing patient verified\r\n className={classes.iconCSS} //FB 4574 DK - Added styling for icon\r\n />\r\n \r\n \r\n {/* FB 4371 : Bindu:End - Below date control has been changed for the dat of birth field*/}\r\n \r\n \r\n \r\n \r\n Gender *\r\n \r\n \r\n \r\n \r\n \t\t//FB 4567 DK - Modified gender option from 'Other' to 'Unknown'\r\n \r\n {genderMessage}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n handleEmailChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n error={emailError}\r\n disabled={disableFields}\r\n helperText={emailMessage}\r\n label=\"Email *\"\r\n value={Email}\r\n />\r\n \r\n\r\n \r\n handleCellPhoneChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n error={CellPhoneError}\r\n disabled={disableFields}\r\n autoCapitalize=\"none\"\r\n helperText={CellPhoneMessage}\r\n label=\"Cell Phone *\"\r\n inputProps={{ maxLength: 14 }} //FB-4867\r\n value={CellPhone}\r\n />\r\n \r\n \r\n \r\n \r\n handleAddressChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n error={AddressError}\r\n disabled={disableFields}\r\n helperText={AddressMessage}\r\n label=\"Address *\"\r\n value={Address}\r\n />\r\n \r\n\r\n \r\n handleCityChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n error={CityError}\r\n disabled={disableFields}\r\n helperText={CityMessage}\r\n label=\"City *\"\r\n value={City}\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 {state.states.map((name: any) => (\r\n \r\n ))}\r\n \r\n {stateMessage}\r\n \r\n \r\n \r\n\r\n \r\n handleZipCodeChange(e)}\r\n style={{ fontSize: \"6px\", width: 250 }}\r\n helperText={validationObj.postalCodeMessage}\r\n error={validationObj.postalCodeError}\r\n label=\"Postal/Zip code *\"\r\n autoCapitalize=\"none\"\r\n disabled={disableFields}\r\n inputProps={{ maxLength: 5 }}\r\n value={ZipCode}\r\n />\r\n \r\n \r\n
\r\n {/* FB 6752 - Start */}\r\n \r\n \r\n \r\n Communication Preference\r\n \r\n \r\n } label=\"E-Mail\" />\r\n \r\n \r\n } label=\"Text\" />\r\n \r\n \r\n \r\n {/* FB 6752 - End */}\r\n\r\n {/* FB 4574 DK - Removed unneccasary code */}\r\n\t\t\t{/* FB 9538 changed the display style */}\r\n \r\n \r\n {/* FB 7719 */}\r\n handleCommentChange(e)} //FB 9538\r\n style={{ width: 845 }}\r\n\t\t\t\t //FB 9538 start\r\n error={CommentError} \r\n label=\"Reason for your appointment*\" \r\n helperText={CommentMessage}\r\n\t\t\t\t //FB 9538 end\r\n value={Comments}\r\n />\r\n \r\n \r\n {/* FB 6752 */}\r\n
\r\n {/* FB 4574 DK - Added mandatory fields note - Start */}\r\n \r\n \r\n * Mandatory fields\r\n \r\n \r\n {/* FB 4574 DK - Added mandatory fields note - End */}\r\n
\r\n {/* FB 8917 */}\r\n \r\n \r\n {/* FB 7719 */}\r\n {/* FB 9396 */}\r\n \r\n {buttonVerifyText}\r\n \r\n \r\n \r\n {/* FB 7719 */}\r\n {/* FB 8917 */}\r\n \r\n {buttonText}\r\n \r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n \r\n \r\n Maximum Appointments\r\n \r\n \r\n\t\t\t {/* FB 9505 included scheduler phoe number */}\r\n \r\n You have already booked an appointment for this date. If you\r\n need to book an additional appointment, please contact the\r\n office at {state.appointmentdetails.location.phone}\r\n \r\n \r\n \r\n \r\n Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n We found this user in our records! We will proceed with the\r\n existing details.\r\n \r\n \r\n \r\n \r\n Ok\r\n \r\n \r\n \r\n {/* FB 4780 BR-Start In PE, Getting Email/Cell for Existing Patients */}\r\n \r\n \r\n \r\n We found this user in our records! We will proceed with the\r\n existing details.\r\n \r\n \r\n \r\n \r\n Ok\r\n \r\n \r\n \r\n \r\n \r\n Please confirm your details\r\n\r\n \r\n \r\n \r\n handlePatientEmailChange(e)}\r\n style={{ fontSize: \"6px\", width: 300 }}\r\n error={emailError}\r\n helperText={emailMessage}\r\n label=\"Email *\"\r\n value={patientEmail}\r\n />\r\n \r\n
\r\n \r\n handlePatientCellPhoneChange(e)}\r\n style={{ fontSize: \"6px\", width: 300 }}\r\n error={CellPhoneError}\r\n autoCapitalize=\"none\"\r\n helperText={CellPhoneMessage}\r\n label=\"Cell Phone *\"\r\n inputProps={{ maxLength: 14 }} //FB-4867\r\n value={patientCellPhone}\r\n />\r\n \r\n
\r\n \r\n \r\n \r\n * Mandatory fields\r\n \r\n \r\n \r\n Update/Confirm\r\n \r\n \r\n \r\n {/* FB 4780 BR In PE, Getting Email/Cell for Existing Patients */}\r\n
\r\n
\r\n
\r\n );\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport {\r\n Grid,\r\n makeStyles,\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n DialogContentText,\r\n DialogActions,\r\n Button,\r\n Paper,\r\n} from \"@material-ui/core\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Context, ErrorLog } from \"../store\"; //FB 4487 DK - Importing ErrorLog class from store\r\n//import { modify_SlotDetails } from \"../actions\";\r\nimport { modify_SlotDetails } from \"../actions\";\r\nimport globalsettings from \"../../../config\";\r\n//FB-6264\r\n//FB 7675\r\nimport { ConvertTimeZone, InsertPELogs, NotifyErrorOutage } from \"../api\"; //FB 4487 DK - Importing the logError method used for error logging , FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added UI component to display the slots\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4487 DK 06/07/2021 Implemented error logging on api call failures\r\n// FB 4556 DK 07/07/2021 Implement client side error handling on PE\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific flow\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7675 DK 11/09/2023 Timezone handling for appointments\r\n// FB 9742 SK 12/12/2024 No appointments showing up on PE\r\n\r\nconst useStyles = makeStyles(() => ({\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n container: {\r\n maxWidth: \"10%\",\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignSelf: \"flex-start\",\r\n justifyContent: \"center\",\r\n },\r\n containerRow: {\r\n //maxWidth: \"10%\",\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n alignSelf: \"flex-start\",\r\n justifyContent: \"center\",\r\n },\r\n topBarItem: {\r\n alignSelf: \"flex-start\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: \"5px 0\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n maxWidth: \"70%\",\r\n paddingRight: \"5px\",\r\n paddingLeft: \"5px\",\r\n cursor: \"pointer\",\r\n fontSize: \"smaller\",\r\n height: \"25px\",\r\n \"&:hover, &:focus\": {\r\n backgroundColor: \"#25aae1\",\r\n color: \"#fff\",\r\n },\r\n },\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n paper: {\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n cursor: \"pointer\",\r\n alignContent: \"center\",\r\n display: \"flex\",\r\n boxShadow: \"none\",\r\n marginBottom: 10,\r\n },\r\n p: {\r\n backgroundColor: \"#EDEEEE\",\r\n padding: 5,\r\n borderRadius: \"10px\",\r\n fontSize: \"smaller\",\r\n \"&:hover, &:focus\": {\r\n backgroundColor: \"#25aae1\",\r\n color: \"#fff\",\r\n },\r\n margin: 0,\r\n },\r\n}));\r\n\r\n//FB 4371 DK Added fnction to save the selected slot to preregistartion table\r\nexport async function addPreRegistration(preRegObj: any) {\r\n //FB-6264\r\n const targetUrl = globalsettings.emrAPI + \"api/Provider/Schedule/Preregistration/AddSlot\";\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n\r\n body: JSON.stringify(preRegObj),\r\n };\r\n const response = await fetch(targetUrl, config);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n const data = await response.json();\r\n return data;\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\nfunction SlotsContainer(props: any) {\r\n const classes = useStyles();\r\n const [expanded, setExpanded] = React.useState(false);\r\n const [itemsToShow, setItemsToShow] = React.useState(6);\r\n const { state, dispatch } = useContext(Context);\r\n const [] = React.useState(false);\r\n const [selectedSlot, setSelectedSlot] = React.useState(\"\");\r\n const [open, setOpen] = React.useState(false);\r\n\r\n const handleClose = () => {\r\n setOpen(false);\r\n modify_SlotDetails(\r\n {\r\n isslotexisting: true,\r\n },\r\n dispatch\r\n );\r\n };\r\n\r\n //FB 4371 DK Added to toggle show more and hide slots\r\n\r\n function toggle() {\r\n setItemsToShow(expanded ? 6 : props.schedulesTest.Slots.length);\r\n setExpanded(!expanded);\r\n //FB 4960 Start\r\n if (expanded) {\r\n InsertPELogs(globalsettings.clientIp, \"Click on Show less for \" + props.schedulesTest.ScheduleDate);\r\n }\r\n else {\r\n InsertPELogs(globalsettings.clientIp, \"Click on Show More for \" + props.schedulesTest.ScheduleDate);\r\n }\r\n //FB 4960 End\r\n }\r\n const history = useHistory();\r\n\r\n //FB 4371 DK Added to save the selected slot to preregistartion table and modify the state\r\n React.useEffect(() => {\r\n if (selectedSlot != \"\") {\r\n props.onCallback(true);\r\n //FB 4409 DK Added to activate loading spinner once slot is selected\r\n props.isLoading(true);\r\n var date = new Date(\r\n props.schedulesTest.ScheduleDate + \" \" + selectedSlot\r\n );\r\n var x = date.getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - x);\r\n const preRegistrationObj = {\r\n EMPLOYEE_N: props.employeeid,\r\n FACILITY_N: props.facilityid,\r\n PRE_REGISTRATION_DATE: date,\r\n PRE_REGISTRATION_SLOT_TIME: date,\r\n };\r\n (async () => {\r\n var data = await addPreRegistration(preRegistrationObj);\r\n if (data == 0) {\r\n setOpen(true);\r\n } else {\r\n modify_SlotDetails(\r\n {\r\n employeeId: props.employeeid,\r\n facilityId: props.facilityid,\r\n id: data,\r\n slotDate: new Date(\r\n props.schedulesTest.ScheduleDate + \" \" + selectedSlot\r\n ),\r\n employeeName: props.employeeName,\r\n facilityName: props.facilityName,\r\n isslotexisting: false,\r\n duration: props.duration //FB 4638 added appt duration\r\n },\r\n dispatch\r\n );\r\n //FB 4735 DK - Modified condition\r\n if (state.appointmentdetails.appointmentfilter === \"provider\" || state.defaultprovider.id > 0) {\r\n state.appointmentdetails.location.name = props.facilityName;\r\n state.appointmentdetails.location.address = props.facilityAddress;\r\n }\r\n state.appointmentdetails.location.phone = props.facilityPhone;\r\n state.appointmentdetails.duration = props.duration; //FB 4638 added appt duration \r\n history.push(\"/demographics\", state);\r\n }\r\n })();\r\n }\r\n }, [selectedSlot]);\r\n\r\n //FB 4371 DK Added to book the selected slot\r\n\r\n function bookSlot(\r\n slots: any) {\r\n setSelectedSlot(slots);\r\n //FB 4960 start\r\n InsertPELogs(globalsettings.clientIp, \"Click on time slot \" + slots);\r\n //FB 4960 End\r\n }\r\n\r\n //FB 7675\r\n var timeZone = \"America/Port-au-Prince\";\r\n var userTimeZone = sessionStorage.getItem(\"TimeZone\");\r\n if (userTimeZone != null) {\r\n timeZone = userTimeZone;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n Slot is already booked!\r\n \r\n \r\n \r\n Please select a different slot.\r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.limited === 1 ? (\r\n \r\n {props.schedulesTest.Slots.map((slot: string, index: number) => {\r\n // FB 7675\r\n var convertedSlot = ConvertTimeZone(props.schedulesTest.ScheduleDate, slot, timeZone, \"time\");\r\n return (\r\n \r\n \r\n bookSlot(\r\n slot\r\n )\r\n }\r\n >\r\n {/* FB 7675 */}\r\n {convertedSlot}\r\n \r\n \r\n );\r\n })}\r\n \r\n ) : (\r\n \r\n {/* FB 9742 Begin */}\r\n {props.schedulesTest.Slots && props.schedulesTest.Slots.filter((slot:any) => slot.trim() !== \"\").slice(0, itemsToShow).map((slot: string, index: number) => {\r\n // FB 7675\r\n var convertedSlot = ConvertTimeZone(props.schedulesTest.ScheduleDate, slot, timeZone, \"time\");\r\n return (\r\n \r\n bookSlot(slot)}\r\n >\r\n {/* FB 7675 */}\r\n {convertedSlot}\r\n

\r\n
\r\n );\r\n })}\r\n {/* FB 9742 End*/}\r\n\r\n {props.schedulesTest.Slots.length < 6 ||\r\n props.schedulesTest.Slots.length === 0 ? (\r\n
\r\n ) : (\r\n \r\n \r\n {expanded ? \"Show Less\" : \"Show More\"}\r\n

\r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n}\r\n\r\nexport default SlotsContainer;\r\n","import React, { useContext, useEffect, useState } from \"react\";\t\t//FB 4409 DK - Added useeffect reference\r\nimport {\r\n Grid,\r\n Avatar,\r\n Typography,\r\n makeStyles,\r\n Link,\r\n Card,\r\n CardContent,\r\n CardMedia,\r\n} from \"@material-ui/core\";\r\n//import doc from \"../../../images/loc.jpg\";\r\n//import { Schedule, Provider } from \"../../types\";\r\nimport SlotsContainer from \"./SlotsContainer\";\r\nimport useStyle from \"../css/styles\";\r\nimport { Context } from \"../store\";\r\nimport globalsettings from \"../../../config\";\r\nimport { formatphone, InsertPELogs, GetAdminSettingValue } from \"../api\"; //FB 4774 DK - Added reference to formatphone method , FB 4960, FB 7418\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added UI component to display the slots container\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4409 DK 04/30/2021 Added message to show when all available slots are booked\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4774 DK 11/12/2021 Modified the messages\r\n// FB 4867 DK 01/20/2022 Phone number made clickable\r\n// FB 4912 DK 01/27/2022 Resolved message error\r\n// FB 4930 DK 01/31/2022 Phone number missing in message\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 7418 GS 09/21/2023 Added admin setting to change the message on PE when slots are not available\r\n// FB 7413 GA 09/25/2023 Orady - Update the map link to the correct one\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7908 SK 01/08/2024 PE Online Appointment Bookings Facility Missing Address 2\r\n// FB 8213 MS 02/08/2024 Fetch the facility image from EMR\r\n// FB 8290 MS 04/29/2024 Show google link only if available in EMR\r\n// FB 8680 DK 05/21/2024 Practice phone related changes\r\n\r\n\r\n\r\nexport type Schedule = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type SchedulesTest = {\r\n Facility_N: number;\r\n Facility_Name: string;\r\n Facility_Address: string;\r\n Facility_Address2: string;//FB 7908\r\n Facility_Info: string;\r\n NextAvailability: string;\r\n IsInsuranceAccepted: boolean;\r\n SlotsDate: SlotsDate[];\r\n Scheduling_Phone: string;\r\n availableSlotsCount: number; //FB 4409 DK - Added variable for available slots count\r\n Duration: number; //FB 4638 added duration field\r\n GOOGLE_MAPS_LINK: string; //FB 7413\r\n};\r\n\r\nexport type SlotsDate = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type Provider = {\r\n //name: string;\r\n //id: number;\r\n //facility: Facility;\r\n schedulesTest: SchedulesTest[];\r\n};\r\n\r\ninterface IProviderScheduleRowProps {\r\n Provider: Provider;\r\n Limited: number;\r\n Index: number;\r\n ProviderId: number;\r\n ProviderName: string;\r\n isLoading: any; //FB 4409 DK - Added isLoading flag to activate loading spinner\r\n}\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n maxHeight: \"220px\",\r\n },\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n centered: {\r\n alignSelf: \"center\",\r\n },\r\n content: {\r\n flex: \"1 0 auto\",\r\n },\r\n large: {\r\n width: theme.spacing(10),\r\n height: theme.spacing(10),\r\n },\r\n topBarItem: {\r\n alignSelf: \"center\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: theme.spacing(1),\r\n },\r\n providerRow: {\r\n borderTop: \"1px solid rgba(0, 0, 0, 0.12)\",\r\n padding: \"20px 0\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n padding: \"10px\",\r\n //width: \"70%\",\r\n fontSize: \"smaller\",\r\n //height: \"25px\",\r\n },\r\n}));\r\n\r\nfunction ProviderScheduleRow(props: IProviderScheduleRowProps) {\r\n const classes = useStyles();\r\n const styles = useStyle();\r\n const { state, dispatch } = useContext(Context);\r\n //FB 7418 Begin\r\n const [textMessage, setTextMessage] = useState(\"\");\r\n const [textValue, setTextValue] = useState(false);\r\n //FB 7418 End\r\n let Phone = props.Provider.schedulesTest[props.Index].Scheduling_Phone;\r\n if (Phone != null) {\r\n Phone = Phone.replace(/[^0-9]/g, \"\");\r\n }\r\n const [disableEvents, setDiableEvents] = useState(false);\r\n\r\n //FB 4409 DK - Added flag for loading spinner\r\n const [isLoading, setIsLoading] = useState(false);\r\n\r\n //FB 4960 Start\r\n const insertLogs = async () => {\r\n InsertPELogs(globalsettings.clientIp, \"Click on View Map\");\r\n }\r\n //FB 4960 End\r\n const [defaultPhone, setDefaultPhone] = useState(\"\"); //FB 8680\r\n\r\n //FB 7418 Begin\r\n async function GetSlotsMessage() {\r\n var data = await GetAdminSettingValue(\"PE_Slot_Unavailable_Message\");\r\n if (data != \"\") {\r\n setTextMessage(data);\r\n setTextValue(true);\r\n }\r\n //FB 8680\r\n var practicePhone = await GetAdminSettingValue(\"Default_Sch_Appt_Number\");\r\n if (practicePhone != null) {\r\n setDefaultPhone(practicePhone);\r\n }\r\n }\r\n //FB 7418 End\r\n\r\n //FB 4409 DK - Added to swap the isLoading flag on slots page when isLoading flag is updated \r\n useEffect(() => {\r\n GetSlotsMessage(); //FB 7418\r\n props.isLoading(isLoading);\r\n }, [isLoading])\r\n\r\n //FB 7801 - Begin\r\n const [sessionAppointment, setSessionAppointment] = React.useState(\"\");\r\n\r\n useEffect(() => {\r\n const appt = sessionStorage.getItem(\"AppointmentType\");\r\n setSessionAppointment(appt!);\r\n }, []);\r\n //FB 7801 - End\r\n\r\n return props.Provider !== undefined ? (\r\n
\r\n {window.innerWidth <= 768 ? (\r\n
\r\n \r\n \r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Name}\r\n \r\n \r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Address}\r\n \r\n {/* FB 7908 - Begin */}\r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Address2 && (\r\n props.Provider.schedulesTest[props.Index].Facility_Address2\r\n )}\r\n \r\n {/* FB 7908 - End */}\r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Info}\r\n \r\n \r\n {/*FB-4930*/}\r\n {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)}\r\n \r\n \r\n \r\n View Map\r\n \r\n \r\n {sessionAppointment}{/* FB 7801 */}\r\n \r\n This provider does not accept the selected insurance at this\r\n location.\r\n \r\n \r\n (If your insurance plan includes out-of-network coverage,\r\n please ignore this warning)\r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.Provider.schedulesTest[props.Index].SlotsDate.length ===\r\n 1 ? (\r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */}\r\n \r\n The next available online appointment for this provider is {props.Provider.schedulesTest[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)}.\r\n \r\n \r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - Start\r\n ) : props.Provider.schedulesTest[props.Index].availableSlotsCount <= 0 ? (\r\n \r\n {/*FB-4930 Start*/}\r\n {props.Provider.schedulesTest[props.Index].NextAvailability != null ?\r\n (\r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */} {/*FB-4912*/}\r\n The next available online appointment for this provider is {props.Provider.schedulesTest[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)}.\r\n \r\n ) : (\r\n //FB 7418 Begin\r\n (!textValue ? (\r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */} {/*FB-4912*/}\r\n There are no online appointments available for this provider. Please call {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)} to book an appointment.\r\n ) :\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n {/* FB 8680 */}\r\n {props.Provider.schedulesTest[props.Index].Scheduling_Phone.length > 0 ? textMessage.replace(\"@practice_phone\", props.Provider.schedulesTest[props.Index].Scheduling_Phone)\r\n : textMessage.replace(\"@practice_phone\", defaultPhone)}\r\n )\r\n //FB 7418 End\r\n )}\r\n {/*FB-4930 End*/}\r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - End\r\n \r\n {props.Provider.schedulesTest[props.Index].SlotsDate.map(\r\n (ele: SlotsDate, index: number) => (\r\n \r\n )\r\n )}\r\n \r\n )}\r\n \r\n
\r\n ) : (\r\n \r\n \r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Name}\r\n \r\n \r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Address}\r\n \r\n {/* FB 7908 - Begin */}\r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Address2 && (\r\n props.Provider.schedulesTest[props.Index].Facility_Address2\r\n )}\r\n \r\n {/* FB 7908 - End */}\r\n \r\n {props.Provider.schedulesTest[props.Index].Facility_Info}\r\n \r\n \r\n {/*FB-4930*/}\r\n {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)}\r\n \r\n \r\n \r\n View Map\r\n \r\n \r\n {sessionAppointment}{/* FB 7801 */}\r\n \r\n This provider does not accept the selected insurance at this\r\n location.\r\n \r\n \r\n (If your insurance plan includes out-of-network coverage,\r\n please ignore this warning)\r\n \r\n \r\n \r\n \r\n \r\n {props.Provider.schedulesTest[props.Index].SlotsDate.length ===\r\n 1 ? (\r\n \r\n \r\n
\r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */}\r\n The next available online appointment for this provider is {props.Provider.schedulesTest[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)} .\r\n \r\n
\r\n
\r\n \r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - Start\r\n ) : props.Provider.schedulesTest[props.Index].availableSlotsCount <= 0 ? (\r\n \r\n \r\n {/*FB-4930 Start*/}\r\n {props.Provider.schedulesTest[props.Index].NextAvailability != null ?\r\n (
\r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */} {/*FB-4912*/}\r\n The next available online appointment for this provider is {props.Provider.schedulesTest[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)}.\r\n \r\n
) : (
\r\n {/* FB 7418 Begin */}\r\n {!textValue ? (\r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */} {/*FB-4912*/}\r\n There are no online appointments available for this provider. Please call {formatphone(props.Provider.schedulesTest[props.Index].Scheduling_Phone)} to book an appointment.\r\n \r\n ) :\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n {/* FB 8680 */}\r\n {props.Provider.schedulesTest[props.Index].Scheduling_Phone.length > 0 ? textMessage.replace(\"@practice_phone\", props.Provider.schedulesTest[props.Index].Scheduling_Phone)\r\n : textMessage.replace(\"@practice_phone\", defaultPhone)}\r\n \r\n }\r\n {/* FB 7418 End */}\r\n
)}\r\n {/*FB-4930 End*/}\r\n
\r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - End\r\n props.Provider.schedulesTest[\r\n props.Index\r\n ].SlotsDate.map((ele: SlotsDate, index: number) => (\r\n \r\n ))\r\n )}\r\n \r\n \r\n )}\r\n
\r\n ) : (\r\n <>\r\n );\r\n}\r\n\r\nexport default ProviderScheduleRow;\r\n","//FB 4487 DK - Removed multiple unused imports below\r\nimport React, { useContext, useState } from \"react\";\r\nimport Provider from \"../components/Provider\";\r\nimport {\r\n Grid,\r\n makeStyles,\r\n Typography,\r\n IconButton,\r\n Tooltip,\r\n CircularProgress,\r\n Button,\r\n Avatar,\r\n ThemeProvider,\r\n createMuiTheme,\r\n Card,\r\n CardContent,\r\n CardMedia,\r\n Paper,\r\n} from \"@material-ui/core\";\r\nimport { Context, ErrorLog } from \"../store\"; //FB 4487 DK - Importing ErrorLog class from store\r\nimport NavigateBeforeIcon from \"@material-ui/icons/ArrowBack\";\r\nimport NavigateNextIcon from \"@material-ui/icons/ArrowForward\";\r\nimport ProviderScheduleRow from \"./ProviderScheduleRow\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport {\r\n MuiPickersUtilsProvider,\r\n KeyboardDatePicker,\r\n} from \"@material-ui/pickers\";\r\nimport useStyle from \"../css/styles\";\r\nimport globalsettings from \"../../../config\";\r\n// FB 4774 DK - Added reference to formatphone method\r\n//FB-6264\r\nimport { formatphone, InsertPELogs, NotifyErrorOutage, GetAdminSettingValue } from \"../api\"; //FB 4487 DK - Importing the logError method used for error logging , FB 4960, FB 7418\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page for the slots page in \"By Provider\" workflow\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4409 DK 04/30/2021 Added message to show when all available slots are booked\r\n// FB 4487 DK 06/07/2021 Implemented error logging on api call failures\r\n// FB 4574 DK 07/15/2021 Added styling for calender icon\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific flow\r\n// FB 4769 MS 11/02/2021 Added Job title for provider\r\n// FB 4774 DK 11/16/2021 Modified the messages\r\n// FB 4867 DK 01/20/2022 Phone numbe made clickable\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7418 GS 09/21/2023 Change the message on PE when slots are not available\r\n// FB 7413 GA 09/25/2023 Orady - Update the map link to the correct one\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7908 SK 01/08/2024 PE Online Appointment Bookings Facility Missing Address 2\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8680 DK 05/21/2024 Practice phone related changes\r\n// FB 9597 DK 10/24/2024 Schedules not loading on PE\r\n// FB 9973 DK 01/28/2025 Failed to fetch: GET https://drsamemr.com/api/Provider/GetSlotsByDate\r\n\r\n\r\n\r\nexport type Schedule = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type SchedulesTest = {\r\n Facility_N: number;\r\n Facility_Name: string;\r\n Facility_Address: string;\r\n Facility_Address2: string;//FB 7908\r\n Facility_Info: string;\r\n NextAvailability: string;\r\n IsInsuranceAccepted: boolean;\r\n SlotsDate: SlotsDate[];\r\n Scheduling_Phone: string;\r\n availableSlotsCount: number; //FB 4409 DK - Added variable for available slots count\r\n Duration: number; //FB 4638 added appt duration field\r\n GOOGLE_MAPS_LINK: string; //FB 7413\r\n};\r\n\r\nexport type SlotsDate = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n ApptTypeSlots: string[];//FB 7801\r\n};\r\nconst useStyles = makeStyles((theme) => ({\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n container: {\r\n //width: \"90%\",\r\n margin: \"0 auto\",\r\n border: \"1px solid rgb(0 0 0 / 25%)\",\r\n backgroundColor: \"#fff\",\r\n },\r\n filter: {\r\n justifyContent: \"flex-start\",\r\n minHeight: \"400px\",\r\n minWidth: \"10%\",\r\n borderRight: \"1px solid rgba(0, 0, 0, 0.12)\",\r\n },\r\n centered: {\r\n alignSelf: \"center\",\r\n },\r\n content: {\r\n flex: \"1 0 auto\",\r\n },\r\n large: {\r\n width: theme.spacing(7),\r\n height: theme.spacing(7),\r\n marginLeft: \"10px\",\r\n },\r\n topBarItem: {\r\n alignSelf: \"center\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: theme.spacing(1),\r\n },\r\n topBarItem_Day: {\r\n color: \"#A8ABAE\",\r\n textTransform: \"uppercase\",\r\n fontWeight: 500,\r\n letterSpacing: \".1em\",\r\n whiteSpace: \"normal\",\r\n fontSize: \"10px\",\r\n },\r\n navigateBackContainer: {\r\n height: \"9vh\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n },\r\n mainFilter: {\r\n minHeight: \"9vh\",\r\n marginTop: theme.spacing(5),\r\n marginBottom: theme.spacing(2),\r\n },\r\n mainFilter_Location_Caption: {\r\n color: \"#A8ABAE\",\r\n fontWeight: \"bold\",\r\n },\r\n slotsContainer: {\r\n //width: \"90%\",\r\n margin: \"0 auto\",\r\n //border: \"1px solid rgb(0 0 0 / 25%)\",\r\n backgroundColor: \"#fff\",\r\n },\r\n providerRowContainer: {\r\n overflowY: \"scroll\",\r\n minHeight: \"40vh\",\r\n maxHeight: \"55vh\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n padding: \"10px\",\r\n //width: \"70%\",\r\n fontSize: \"smaller\",\r\n //height: \"25px\",\r\n },\r\n datepickerroot: {\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n // FB 4574 DK - Added styling for increasing the icon size\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n paper: {\r\n height: \"auto\",\r\n width: \"auto\",\r\n alignContent: \"center\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n border: \"none\",\r\n boxShadow: \"none\",\r\n },\r\n scrollbar: {\r\n \"&::-webkit-scrollbar\": {\r\n width: \"6px\",\r\n height: \"10px\",\r\n backgroundColor: \"lightgray\",\r\n },\r\n\r\n \"&::-webkit-scrollbar-thumb:vertical\": {\r\n backgroundColor: \"rgba(0,0,0,.5)\",\r\n },\r\n },\r\n}));\r\n\r\ninterface singleDay {\r\n dateLabel: string;\r\n hiddenDateValue: string;\r\n}\r\n\r\nexport type Provider = {\r\n //name: string;\r\n //id: number;\r\n //facility: Facility;\r\n //schedules: Schedule[];\r\n schedulesTest: SchedulesTest[];\r\n};\r\n\r\nexport type Facility = {\r\n id: number;\r\n name: string;\r\n addressLine1: string;\r\n addressLine2: string;\r\n city: string;\r\n state: string;\r\n zipcode: string;\r\n};\r\n\r\n//FB 4371 DK Added to get available slots for selected provider\r\nexport async function GetAvailableSlotsByProvider(\r\n limited: number,\r\n startDate: string,\r\n id: number,\r\n apptType: any,\r\n insurance: number, //FB 7801\r\n appointment_type_n: number //FB 7801\r\n): Promise {\r\n //FB-6264\r\n let url;\r\n if (apptType === \"telederm\") {\r\n url =\r\n globalsettings.emrAPI +\r\n `api/Provider/TeleHealth/GetSlotsForProvider/${id}/${startDate}/${limited}/${appointment_type_n}`;//FB 7801\r\n } else {\r\n url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetSlotsForProvider/${id}/${startDate}/${limited}/${insurance}/${appointment_type_n}`;//FB 7801\r\n }\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n data = data.sort(function (x: any, y: any) {\r\n // true values first\r\n return x.IsInsuranceAccepted === y.IsInsuranceAccepted ? 0 : x ? -1 : 1;\r\n });\r\n return data as SchedulesTest[];\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\nfunction getWindowDimensions() {\r\n const { innerWidth: width, innerHeight: height } = window;\r\n return {\r\n width,\r\n height,\r\n };\r\n}\r\n\r\nexport default function Slots_byprovider() {\r\n const classes = useStyles();\r\n const [next7Days, setNext7Days] = React.useState([]);\r\n const [dateCounter, setDateCounter] = React.useState(0);\r\n const [loading, setLoading] = React.useState(true);\r\n const [providerSchedules, setProviderSchedules] = React.useState();\r\n const [todayDate, setToday] = React.useState(false);\r\n let tempdays: singleDay[] = [];\r\n const [windowDimensions, setWindowDimensions] = React.useState(\r\n getWindowDimensions()\r\n );\r\n const { width, height } = windowDimensions;\r\n const [limited, setLimit] = React.useState(7);\r\n const { state, dispatch } = useContext(Context);\r\n const [selectedDate, setSelectedDate] = useState(null);\r\n //FB 7418 Begin\r\n const [textMessage, setTextMessage] = useState(\"\");\r\n const [textValue, setTextValue] = useState(false);\r\n //FB 7418 End\r\n const styles = useStyle();\r\n const [defaultPhone, setDefaultPhone] = useState(\"\"); //FB 8680\r\n\r\n //FB 4735 DK - Added to assign default provider info to state object\r\n if (state.defaultprovider.id > 0) {\r\n state.appointmentdetails.provider = state.defaultprovider;\r\n }\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n //FB 4371 DK Added to display the slots in a week range\r\n const constructDates = (dtCounter: number = dateCounter) => {\r\n let limit: number = dtCounter + 1;\r\n //alert(width);\r\n if (window.innerWidth < 500) {\r\n limit = dtCounter + 1;\r\n setLimit(1);\r\n //alert(limit);\r\n } else if (window.innerWidth > 500 && window.innerWidth < 800) {\r\n limit = dtCounter + 1;\r\n setLimit(1);\r\n //alert(limit);\r\n } else {\r\n limit = dtCounter + 7;\r\n setLimit(7);\r\n //alert(limit);\r\n }\r\n for (dtCounter; dtCounter < limit; dtCounter++) {\r\n let currentDate = new Date();\r\n //alert(limit);\r\n //alert(\"currentDate: \" + selectedDate);\r\n if (\r\n selectedDate !== null &&\r\n selectedDate.toDateString() !== currentDate.toDateString()\r\n ) {\r\n currentDate = new Date(selectedDate);\r\n }\r\n let days = currentDate.getDate() + dtCounter;\r\n let value = new Date(currentDate.setDate(days));\r\n let splittedDate = value.toLocaleDateString().split(\"/\");\r\n tempdays.push({\r\n dateLabel: value.toString().substring(0, 10),\r\n hiddenDateValue: `${splittedDate[0]}-${splittedDate[1]}-${splittedDate[2]}`,\r\n });\r\n }\r\n setNext7Days(tempdays);\r\n setDateCounter(dtCounter);\r\n today();\r\n };\r\n\r\n\r\n const handleDateChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setSelectedDate(date);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Changed the date to \" + date.toDateString() + \" in by provider flow\");\r\n //FB 4960 End\r\n }\r\n };\r\n\r\n //FB 7418 Begin\r\n async function GetSlotsMessage() {\r\n var data = await GetAdminSettingValue(\"PE_Slot_Unavailable_Message\");\r\n if (data != \"\") {\r\n setTextMessage(data);\r\n setTextValue(true);\r\n }\r\n //FB 8680\r\n var practicePhone = await GetAdminSettingValue(\"Default_Sch_Appt_Number\");\r\n if (practicePhone != null) {\r\n setDefaultPhone(practicePhone);\r\n }\r\n }\r\n //FB 7418 End\r\n function today() {\r\n let currentDate = new Date();\r\n let days = currentDate.getDate();\r\n let value = new Date(currentDate.setDate(days));\r\n let splittedDate = value.toLocaleDateString().split(\"/\");\r\n if (\r\n `${splittedDate[0]}-${splittedDate[1]}-${splittedDate[2]}` ===\r\n tempdays[0].hiddenDateValue\r\n ) {\r\n setToday(true);\r\n } else setToday(false);\r\n }\r\n function handleResize() {\r\n //alert(\"handleResize\");\r\n setWindowDimensions(getWindowDimensions());\r\n //alert(\"Out \" + window.innerWidth);\r\n //if(width < 450){\r\n //alert(window.innerWidth);\r\n //constructDates(0);\r\n //today();\r\n //}\r\n }\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handleResize);\r\n constructDates(0);\r\n GetSlotsMessage(); //FB 7418\r\n //alert(\"hhh\");\r\n today();\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [window.innerWidth]);\r\n\r\n React.useEffect(() => {\r\n //alert(\"hello:\"+ selectedDate);\r\n if (selectedDate !== null) {\r\n constructDates(0);\r\n }\r\n }, [selectedDate]);\r\n\r\n React.useEffect(() => {\r\n if (next7Days.length > 0) {\r\n setLoading(true);\r\n let temp: Provider = {\r\n schedulesTest: [],\r\n };\r\n //FB 9597\r\n let session_ApptN = sessionStorage.getItem(\"AppointmentType_N\");//FB 7801\r\n let appt_type_n = session_ApptN != null && session_ApptN != 'undefined' ? Number(session_ApptN) : 0;\r\n //FB 9973\r\n //let custom_appt_type = sessionStorage.getItem(\"Enable PE Custom Appointments\");//FB 8142\r\n setTimeout(() => {\r\n (async () => {\r\n temp.schedulesTest = await GetAvailableSlotsByProvider(\r\n limited,\r\n next7Days[0].hiddenDateValue,\r\n state.appointmentdetails.provider.id,\r\n state.appointmentdetails.appointmenttype,\r\n state.appointmentdetails.insurance.id,//FB 7801\r\n Number(appt_type_n) //FB 7801\r\n );\r\n //FB 7801 - Begin //FB 8142\r\n //FB 9973\r\n //if (custom_appt_type == \"true\") {\r\n for (const facility of temp.schedulesTest) {\r\n for (const slotsDate of facility.SlotsDate) {\r\n if (slotsDate.ApptTypeSlots.length >= 1) {\r\n slotsDate.Slots = slotsDate.ApptTypeSlots.slice();\r\n }\r\n else {\r\n slotsDate.Slots = [\"\"];\r\n }\r\n }\r\n }\r\n setProviderSchedules(temp);\r\n //}\r\n //else {\r\n // setProviderSchedules(temp);\r\n //}\r\n //FB 7801 - End\r\n setLoading(false);\r\n })();\r\n }, 1000);\r\n }\r\n }, [next7Days]);\r\n\r\n const history = useHistory();\r\n\r\n const handleGoBack = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Slots page by provider flow\");\r\n //FB 4960 End\r\n history.goBack();\r\n };\r\n\r\n const handleProceed = () => {\r\n history.push(\"/appointment/create/components/Demographics\", state);\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {state.appointmentdetails.provider.name}\r\n \r\n {/* FB 4769 BEGIN */}\r\n \r\n {state.appointmentdetails.provider.job_title}\r\n \r\n {/* FB 4769 END */}\r\n \r\n {state.appointmentdetails.provider.bio}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n 768 ? \"flex-end\" : \"center\"}\r\n >\r\n 768 ? \"flex\" : \"none\" }}\r\n >\r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n {todayDate === false ? (\r\n \r\n \r\n constructDates(\r\n limited === 7 ? dateCounter - 14 : dateCounter - 2\r\n )\r\n }\r\n >\r\n \r\n \r\n \r\n ) : (\r\n \"\"\r\n )}\r\n \r\n \r\n {next7Days.map((ele: singleDay, index: number) => {\r\n return (\r\n \r\n \r\n \r\n {ele.dateLabel.substring(0, 3)}\r\n \r\n \r\n \r\n {ele.dateLabel.substring(4, 10)}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n constructDates()}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n {loading ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n {/* FB 4774 DK - modified condition*/}\r\n {providerSchedules?.schedulesTest.length === 0 ||\r\n providerSchedules?.schedulesTest[0].Facility_N === 0 ? (\r\n \r\n \r\n
\r\n {/* FB 7418 Begin */}\r\n {!textValue ? (\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n There are no online appointments available for this provider. Please call {formatphone(providerSchedules.schedulesTest[0].Scheduling_Phone)} to book an appointment.\r\n ) :\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n {/* FB 8680 */}\r\n {providerSchedules.schedulesTest[0].Scheduling_Phone.length > 0 ? textMessage.replace(\"@practice_phone\", providerSchedules.schedulesTest[0].Scheduling_Phone)\r\n : textMessage.replace(\"@practice_phone\", defaultPhone)}\r\n \r\n }\r\n {/* FB 7418 End */}\r\n
\r\n
\r\n \r\n ) : (\r\n <>\r\n )}\r\n {/* FB 4774 DK - Modified the condition to show messages - Start*/}\r\n {providerSchedules?.schedulesTest && providerSchedules.schedulesTest[0]?.Facility_N > 0 ? providerSchedules?.schedulesTest.map(\r\n (ele: SchedulesTest, index: number) => {\r\n return (\r\n \r\n );\r\n }\r\n ) : <>}\r\n {/* FB 4774 DK - Modified the condition to show messages - End*/}\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n\r\n {/* FB 4867 DK - Removed unused code */}\r\n \r\n
\r\n );\r\n}\r\n","import React, { useContext, useEffect, useState } from \"react\"; //FB 4409 DK - Added useeffect reference\r\nimport {\r\n Grid,\r\n Avatar,\r\n Typography,\r\n makeStyles,\r\n Link,\r\n Card,\r\n CardContent,\r\n CardMedia,\r\n} from \"@material-ui/core\";\r\nimport doc from \"../../../images/JoshuaFox.jpg\";\r\n//import { Schedule, Provider } from \"../../types\";\r\nimport SlotsContainer from \"./SlotsContainer\";\r\nimport useStyle from \"../css/styles\";\r\nimport { Context } from \"../store\";\r\nimport { formatphone, GetAdminSettingValue } from \"../api\";\t\t//FB 4774 DK - Importing formatphone method, FB 7418\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added UI component to display the slots container\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4409 DK 04/30/2021 Added message to show when all available slots are booked\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4769 MS 11/02/2021 Added Job title Info for provider\r\n// FB 4774 DK 11/24/2021 Message changes\r\n// FB 4867 DK 01/20/2022 Phone number made clickable\r\n// FB 4912 DK 01/27/2022 Resolved message error\r\n// FB 7418 GS 09/21/2023 Added admin setting to change the message on PE when slots are not available\r\n// FB 8680 DK 05/21/2024 Practice phone related changes\r\n\r\nexport type Schedule = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type schedulesByLocation = {\r\n Employee_N: number;\r\n Employee_First_Name: string;\r\n Employee_Last_Name: string;\r\n NextAvailability: string;\r\n SlotsDate: SlotsDate[];\r\n isInsuranceAccepted: boolean;\r\n SchedulinPhone: string;\r\n Employee_Bio: string;\r\n availableSlotsCount: number; //FB 4409 DK - Added variable for available slots count\r\n Duration: Number; //FB 4638 Added appointment duration field\r\n Employee_Job_Title: string; //FB 4769\r\n};\r\n\r\nexport type SlotsDate = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type Provider = {\r\n //name: string;\r\n //id: number;\r\n //facility: Facility;\r\n schedulesByLocation: schedulesByLocation[];\r\n};\r\n\r\ninterface ILocationScheduleRowProps {\r\n Provider: Provider;\r\n Limited: number;\r\n Index: number;\r\n FacilityId: number;\r\n FacilityName: string;\r\n isLoading: any; //FB 4409 DK - Added isLoading flag to activate loading spinner\r\n}\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n maxHeight: \"200px\",\r\n },\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n centered: {\r\n alignSelf: \"center\",\r\n },\r\n content: {\r\n flex: \"1 0 auto\",\r\n },\r\n large: {\r\n width: theme.spacing(10),\r\n height: theme.spacing(10),\r\n },\r\n topBarItem: {\r\n alignSelf: \"center\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: theme.spacing(1),\r\n },\r\n providerRow: {\r\n borderTop: \"1px solid rgba(0, 0, 0, 0.12)\",\r\n padding: \"20px 0\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n padding: \"10px\",\r\n cursor: \"pointer\",\r\n fontSize: \"smaller\",\r\n },\r\n}));\r\n\r\nfunction LocationScheduleRow(props: ILocationScheduleRowProps) {\r\n const classes = useStyles();\r\n const styles = useStyle();\r\n let Phone = props.Provider.schedulesByLocation[props.Index].SchedulinPhone;\r\n if (Phone !== null) {\r\n Phone = Phone.replace(/[^0-9]/g, \"\");\r\n } else {\r\n Phone = \"\";\r\n }\r\n const { state, dispatch } = useContext(Context);\r\n const [disableEvents, setDiableEvents] = useState(false);\r\n //FB 7418 Begin\r\n const [textMessage, setTextMessage] = useState(\"\");\r\n const [textValue, setTextValue] = useState(false);\r\n //FB 7418 End\r\n\r\n //FB 4409 DK - Added flag for loading spinner\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [defaultPhone, setDefaultPhone] = useState(\"\"); //FB 8680\r\n\r\n //FB 7418 Begin\r\n async function GetSlotsMessage() {\r\n var data = await GetAdminSettingValue(\"PE_Slot_Unavailable_Message\");\r\n if (data != \"\") {\r\n setTextMessage(data);\r\n setTextValue(true);\r\n }\r\n //FB 8680\r\n var practicePhone = await GetAdminSettingValue(\"Default_Sch_Appt_Number\");\r\n if (practicePhone != null) {\r\n setDefaultPhone(practicePhone);\r\n }\r\n }\r\n //FB 7418 End\r\n\r\n //FB 4409 DK - Added to swap the isLoading flag on slots page when isLoading flag is updated \r\n useEffect(() => {\r\n GetSlotsMessage(); //FB 7418\r\n props.isLoading(isLoading);\r\n }, [isLoading])\r\n\r\n return props.Provider !== undefined ? (\r\n
\r\n {window.innerWidth <= 768 ? (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n props.Provider.schedulesByLocation[props.Index]\r\n .Employee_First_Name\r\n }{\" \"}\r\n {\r\n props.Provider.schedulesByLocation[props.Index]\r\n .Employee_Last_Name\r\n }\r\n \r\n \r\n {/* FB 4769 BEGIN */}\r\n \r\n {\r\n props.Provider.schedulesByLocation[props.Index]\r\n .Employee_Job_Title\r\n }\r\n \r\n {/* FB 4769 END */}\r\n \r\n {\r\n props.Provider.schedulesByLocation[props.Index]\r\n .Employee_Bio\r\n }\r\n \r\n \r\n This provider does not accept the selected insurance.\r\n \r\n \r\n (If your insurance plan includes out-of-network coverage,\r\n please ignore this warning)\r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.Provider.schedulesByLocation[props.Index].NextAvailability\r\n != null && props.Provider.schedulesByLocation[props.Index].availableSlotsCount <= 0 ? ( //FB 4638 added condtion to check of slots are available\r\n \r\n {/*
*/}\r\n \r\n {/*FB 4774 DK - Modified message*/}\r\n {/*FB-4867*/} {/*FB-4912*/}\r\n The next available online appointment for this provider is {props.Provider.schedulesByLocation[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesByLocation[props.Index].SchedulinPhone)}.\r\n \r\n {/*
*/}\r\n \r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - Start\r\n ) : props.Provider.schedulesByLocation[props.Index].availableSlotsCount <= 0 ? (\r\n {/*
*/}\r\n \r\n {/*FB 4774 DK - Modified message*/}\r\n {/*FB-4867*/} {/*FB-4912*/}\r\n The next available online appointment for this provider is {props.Provider.schedulesByLocation[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesByLocation[props.Index].SchedulinPhone)}.\r\n \r\n {/*
*/}\r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - End\r\n \r\n {props.Provider.schedulesByLocation[props.Index].SlotsDate.map(\r\n (ele: SlotsDate, index: number) => (\r\n \r\n )\r\n )}\r\n \r\n )}\r\n \r\n
\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n props.Provider.schedulesByLocation[props.Index]\r\n .Employee_First_Name\r\n }{\" \"}\r\n {\r\n props.Provider.schedulesByLocation[props.Index]\r\n .Employee_Last_Name\r\n }\r\n \r\n \r\n {/* FB 4769 BEGIN */}\r\n \r\n {props.Provider.schedulesByLocation[props.Index].Employee_Job_Title}\r\n \r\n {/* FB 4769 END */}\r\n \r\n {props.Provider.schedulesByLocation[props.Index].Employee_Bio}\r\n \r\n \r\n This provider does not accept the selected insurance.\r\n \r\n \r\n (If your insurance plan includes out-of-network coverage,\r\n please ignore this warning)\r\n \r\n \r\n \r\n \r\n \r\n {/*FB 4774 DK - Modified condition*/}\r\n {props.Provider.schedulesByLocation[props.Index].availableSlotsCount <= 0 ? (\r\n \r\n \r\n {/*FB-4912 - Start*/}\r\n {props.Provider.schedulesByLocation[props.Index].NextAvailability != null ?\r\n (
\r\n \r\n The next available online appointment for this provider is {props.Provider.schedulesByLocation[props.Index].NextAvailability}\r\n . If you need an appointment sooner, Please call {formatphone(props.Provider.schedulesByLocation[props.Index].SchedulinPhone)}.\r\n \r\n
) : (\r\n
\r\n {/* FB 7418 Begin */}\r\n {!textValue ? (\r\n \r\n There are no online appointments available for this provider. Please call {formatphone(props.Provider.schedulesByLocation[props.Index].SchedulinPhone)} to book an appointment.\r\n )\r\n :\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n {/* FB 8680 */}\r\n {props.Provider.schedulesByLocation[props.Index].SchedulinPhone.length > 0 ? textMessage.replace(\"@practice_phone\", props.Provider.schedulesByLocation[props.Index].SchedulinPhone)\r\n : textMessage.replace(\"@practice_phone\", defaultPhone)}\r\n \r\n }\r\n {/* FB 7418 End */}\r\n
)}\r\n {/*FB-4912 - End*/}\r\n
\r\n \r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - Start\r\n ) : props.Provider.schedulesByLocation[props.Index].availableSlotsCount <= 0 ? (\r\n \r\n \r\n
\r\n {/* FB 7418 Begin */}\r\n {!textValue ? (\r\n \r\n {/*FB 4774 DK - Modified message*/}\r\n {/*FB-4867*/} {/*FB-4912*/}\r\n {props.Provider.schedulesByLocation[props.Index].NextAvailability != null ?\r\n \"The next available online appointment for this provider is \" +\r\n props.Provider.schedulesByLocation[props.Index].NextAvailability + \". If you need an appointment sooner, Please call \" + formatphone(props.Provider.schedulesByLocation[props.Index].SchedulinPhone) + \".\"\r\n :\r\n \"There are no online appointments available for this provider. Please call \" + formatphone(props.Provider.schedulesByLocation[props.Index].SchedulinPhone) + \" to book an appointment.\"}\r\n )\r\n :\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n {/* FB 8680 */}\r\n {props.Provider.schedulesByLocation[props.Index].SchedulinPhone.length > 0 ? textMessage.replace(\"@practice_phone\", props.Provider.schedulesByLocation[props.Index].SchedulinPhone)\r\n : textMessage.replace(\"@practice_phone\", defaultPhone)}\r\n \r\n }\r\n {/* FB 7418 End */}\r\n
\r\n
\r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - End\r\n props.Provider.schedulesByLocation[\r\n props.Index\r\n ].SlotsDate.map((ele: SlotsDate, index: number) => (\r\n \r\n ))\r\n )}\r\n \r\n \r\n )}\r\n
\r\n ) : (\r\n <>\r\n );\r\n}\r\n\r\nexport default LocationScheduleRow;\r\n","//FB 4487 DK - Removed multiple unused imports below\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport Provider from \"../components/Provider\";\r\nimport {\r\n Grid,\r\n makeStyles,\r\n Typography,\r\n IconButton,\r\n Tooltip,\r\n CircularProgress,\r\n Button,\r\n Avatar,\r\n Card,\r\n CardContent,\r\n CardMedia,\r\n Link,\r\n ThemeProvider,\r\n createMuiTheme,\r\n Paper,\r\n} from \"@material-ui/core\";\r\nimport { Context, ErrorLog } from \"../store\"; //FB 4487 DK - Importing ErrorLog class from store\r\nimport NavigateBeforeIcon from \"@material-ui/icons/ArrowBack\";\r\nimport NavigateNextIcon from \"@material-ui/icons/ArrowForward\";\r\nimport LocationScheduleRow from \"./LocationScheduleRow\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useStyle from \"../css/styles\";\r\nimport {\r\n KeyboardDatePicker,\r\n MuiPickersUtilsProvider,\r\n} from \"@material-ui/pickers\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport globalsettings from \"../../../config\";\r\n//FB 4774 DK - Importing formatphone method\r\n//FB-6264\r\nimport { formatphone, InsertPELogs, NotifyErrorOutage } from \"../api\"; //FB 4487 DK - Importing the logError method used for error logging, FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page for the slots page in \"By Location\" workflow\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4409 DK 04/30/2021 Added message to show when all available slots are booked\r\n// FB 4487 DK 06/07/2021 Implemented error logging on api call failures\r\n// FB 4574 DK 07/15/2021 Added styling for calender icon\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4715 DK 10/01/2021 Changed the message content for by location workflow when there are no future schedules\r\n// FB 4769 MS 11/02/2021 Added Job title for provider\r\n// FB 4774 DK 11/12/2021 Modified the messages\r\n// FB 4867 DK 01/20/2022 Phone numbe made clickable\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7908 SK 01/08/2024 PE Online Appointment Bookings Facility Missing Address 2\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8213 MS 02/08/2024 Fetch the facility image from EMR\r\n// FB 8290 MS 04/29/2024 Show google link only if available in EMR\r\n// FB 9597 DK 10/24/2024 Schedules not loading on PE\r\n// FB 9973 DK 01/28/2025 Failed to fetch: GET https://drsamemr.com/api/Provider/GetSlotsByDate\r\n\r\nexport type Schedule = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type schedulesByLocation = {\r\n Employee_N: number;\r\n Employee_First_Name: string;\r\n Employee_Last_Name: string;\r\n Facility_Info: string;\r\n NextAvailability: string;\r\n isInsuranceAccepted: boolean;\r\n SlotsDate: SlotsDate[];\r\n SchedulinPhone: string;\r\n Employee_Bio: string;\r\n availableSlotsCount: number; //FB 4409 DK - Added variable for available slots count\r\n Duration: number; //FB 4638 added duration field\r\n Employee_Job_Title: string; //FB 4769\r\n GOOGLE_MAPS_LINK: string; //FB 8290\r\n};\r\n\r\nexport type SlotsDate = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n ApptTypeSlots: string[];//FB 7801\r\n};\r\nconst useStyles = makeStyles((theme) => ({\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n container: {\r\n //width: \"90%\",\r\n margin: \"0 auto\",\r\n border: \"1px solid rgb(0 0 0 / 25%)\",\r\n backgroundColor: \"#fff\",\r\n },\r\n filter: {\r\n justifyContent: \"flex-start\",\r\n minHeight: \"400px\",\r\n minWidth: \"10%\",\r\n borderRight: \"1px solid rgba(0, 0, 0, 0.12)\",\r\n },\r\n centered: {\r\n alignSelf: \"center\",\r\n },\r\n content: {\r\n flex: \"1 0 auto\",\r\n },\r\n large: {\r\n width: theme.spacing(7),\r\n height: theme.spacing(7),\r\n marginLeft: \"10px\",\r\n },\r\n topBarItem: {\r\n alignSelf: \"center\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: theme.spacing(1),\r\n },\r\n topBarItem_Day: {\r\n color: \"#A8ABAE\",\r\n textTransform: \"uppercase\",\r\n fontWeight: 500,\r\n letterSpacing: \".1em\",\r\n whiteSpace: \"normal\",\r\n fontSize: \"10px\",\r\n },\r\n navigateBackContainer: {\r\n height: \"9vh\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n },\r\n mainFilter: {\r\n minHeight: \"9vh\",\r\n marginTop: theme.spacing(5),\r\n marginBottom: theme.spacing(2),\r\n },\r\n mainFilter_Location_Caption: {\r\n color: \"#A8ABAE\",\r\n fontWeight: \"bold\",\r\n },\r\n slotsContainer: {\r\n //width: \"90%\",\r\n margin: \"0 auto\",\r\n //border: \"1px solid rgb(0 0 0 / 25%)\",\r\n backgroundColor: \"#fff\",\r\n },\r\n providerRowContainer: {\r\n overflowY: \"scroll\",\r\n minHeight: \"40vh\",\r\n maxHeight: \"55vh\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n padding: \"10px\",\r\n //width: \"70%\",\r\n fontSize: \"smaller\",\r\n //height: \"25px\",\r\n },\r\n datepickerroot: {\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n // FB 4574 DK - Added styling for increasing the icon size\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n paper: {\r\n height: \"auto\",\r\n width: \"auto\",\r\n alignContent: \"center\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n border: \"none\",\r\n boxShadow: \"none\",\r\n },\r\n scrollbar: {\r\n \"&::-webkit-scrollbar\": {\r\n width: \"6px\",\r\n height: \"10px\",\r\n backgroundColor: \"lightgray\",\r\n },\r\n\r\n \"&::-webkit-scrollbar-thumb:vertical\": {\r\n backgroundColor: \"rgba(0,0,0,.5)\",\r\n },\r\n },\r\n}));\r\n\r\ninterface singleDay {\r\n dateLabel: string;\r\n hiddenDateValue: string;\r\n}\r\n\r\nexport type Provider = {\r\n //name: string;\r\n //id: number;\r\n //facility: Facility;\r\n //schedules: Schedule[];\r\n schedulesByLocation: schedulesByLocation[];\r\n};\r\n\r\nexport type Facility = {\r\n id: number;\r\n name: string;\r\n addressLine1: string;\r\n addressLine2: string;\r\n city: string;\r\n state: string;\r\n zipcode: string;\r\n};\r\n\r\n//FB 4371 DK Added to get available slots for the selected location\r\nexport async function GetAvailableSlotsByLocation(\r\n limited: number,\r\n startDate: string,\r\n id: number,\r\n insurance_id: number,//FB 7801\r\n appointment_type_n: number//FB 7801\r\n): Promise {\r\n //FB-6264\r\n let url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetSlotsForFacility/${id}/${startDate}/${limited}/${insurance_id}/${appointment_type_n}`;//FB 7801\r\n //alert(\"limited:\" + url);\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n data = data.sort(function (x: any, y: any) {\r\n // true values first\r\n return x.isInsuranceAccepted === y.isInsuranceAccepted ? 0 : x ? -1 : 1;\r\n });\r\n return data as schedulesByLocation[];\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\nfunction getWindowDimensions() {\r\n const { innerWidth: width, innerHeight: height } = window;\r\n return {\r\n width,\r\n height,\r\n };\r\n}\r\n\r\nexport default function Slots_bylocation() {\r\n const classes = useStyles();\r\n const [next7Days, setNext7Days] = React.useState([]);\r\n const [dateCounter, setDateCounter] = React.useState(0);\r\n const [loading, setLoading] = React.useState(true);\r\n const [providerSchedules, setProviderSchedules] = React.useState();\r\n const [todayDate, setToday] = React.useState(false);\r\n let tempdays: singleDay[] = [];\r\n const [windowDimensions, setWindowDimensions] = React.useState(\r\n getWindowDimensions()\r\n );\r\n const { state, dispatch } = useContext(Context);\r\n const [limited, setLimit] = React.useState(7);\r\n const [selectedDate, setSelectedDate] = useState(null);\r\n const styles = useStyle();\r\n const [reload, setReload] = useState(0);\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n });\r\n\r\n if (state.defaultlocation.id > 0) {\r\n state.appointmentdetails.location = state.defaultlocation;\r\n }\r\n\r\n const [sessionAppointment, setSessionAppointment] = React.useState(\"\");//FB 7801\r\n useEffect(() => {\r\n if (state.slotDetails.isslotexisting) {\r\n setReload(1);\r\n }\r\n //FB 7801 - Begin\r\n const appt = sessionStorage.getItem(\"AppointmentType\");\r\n setSessionAppointment(appt!);\r\n //FB 7801 - End\r\n }, []);\r\n\r\n //FB 4371 DK Added to display the slots in a week range\r\n const constructDates = (dtCounter: number = dateCounter) => {\r\n let limit: number = dtCounter + 1;\r\n //alert(width);\r\n if (window.innerWidth < 500) {\r\n limit = dtCounter + 1;\r\n setLimit(1);\r\n //alert(limit);\r\n } else if (window.innerWidth > 500 && window.innerWidth < 800) {\r\n limit = dtCounter + 1;\r\n setLimit(1);\r\n //alert(limit);\r\n } else {\r\n limit = dtCounter + 7;\r\n setLimit(7);\r\n //alert(limit);\r\n }\r\n for (dtCounter; dtCounter < limit; dtCounter++) {\r\n let currentDate = new Date();\r\n if (\r\n selectedDate !== null &&\r\n selectedDate.toDateString() !== currentDate.toDateString()\r\n ) {\r\n currentDate = new Date(selectedDate);\r\n }\r\n let days = currentDate.getDate() + dtCounter;\r\n let value = new Date(currentDate.setDate(days));\r\n let splittedDate = value.toLocaleDateString().split(\"/\");\r\n tempdays.push({\r\n dateLabel: value.toString().substring(0, 10),\r\n hiddenDateValue: `${splittedDate[0]}-${splittedDate[1]}-${splittedDate[2]}`,\r\n });\r\n }\r\n setNext7Days(tempdays);\r\n setDateCounter(dtCounter);\r\n today();\r\n };\r\n\r\n\r\n const handleDateChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setSelectedDate(date);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Changed the date to \" + date.toDateString() + \" in by location flow\");\r\n //FB 4960 End\r\n }\r\n //constructDates(0);\r\n };\r\n\r\n function today() {\r\n let currentDate = new Date();\r\n let days = currentDate.getDate();\r\n let value = new Date(currentDate.setDate(days));\r\n let splittedDate = value.toLocaleDateString().split(\"/\");\r\n if (\r\n `${splittedDate[0]}-${splittedDate[1]}-${splittedDate[2]}` ===\r\n tempdays[0].hiddenDateValue\r\n )\r\n setToday(true);\r\n else setToday(false);\r\n }\r\n\r\n //FB 4960\r\n const insertLogs = async () => {\r\n InsertPELogs(globalsettings.clientIp, \"Click on View Map\");\r\n }\r\n function handleResize() {\r\n //alert(\"handleResize\");\r\n setWindowDimensions(getWindowDimensions());\r\n //alert(\"Out \" + window.innerWidth);\r\n //if(width < 450){\r\n //alert(window.innerWidth);\r\n //constructDates(0);\r\n //today();\r\n //}\r\n }\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handleResize);\r\n constructDates(0);\r\n today();\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [window.innerWidth]);\r\n\r\n React.useEffect(() => {\r\n //alert(\"hello:\"+ selectedDate);\r\n if (selectedDate !== null) {\r\n constructDates(0);\r\n }\r\n }, [selectedDate]);\r\n\r\n React.useEffect(() => {\r\n if (next7Days.length > 0) {\r\n setLoading(true);\r\n let temp: Provider = {\r\n schedulesByLocation: [],\r\n };\r\n //FB 9597\r\n let session_ApptN = sessionStorage.getItem(\"AppointmentType_N\");//FB 7801\r\n let appt_type_n = session_ApptN != null && session_ApptN != 'undefined' ? Number(session_ApptN) : 0;\r\n //FB 9973\r\n //let custom_appt_type = sessionStorage.getItem(\"Enable PE Custom Appointments\")//FB 8142\r\n setTimeout(() => {\r\n (async () => {\r\n temp.schedulesByLocation = await GetAvailableSlotsByLocation(\r\n limited,\r\n next7Days[0].hiddenDateValue,\r\n state.appointmentdetails.location.id,\r\n state.appointmentdetails.insurance.id,//FB 7801\r\n Number(appt_type_n) //FB 7801\r\n );\r\n //FB 7801 - Begin //FB 8142\r\n //FB 9973\r\n //if (custom_appt_type == \"true\") {\r\n for (const facility of temp.schedulesByLocation) {\r\n for (const slotsDate of facility.SlotsDate) {\r\n if (slotsDate.ApptTypeSlots.length > 1) {\r\n slotsDate.Slots = slotsDate.ApptTypeSlots.slice();\r\n }\r\n else {\r\n slotsDate.Slots = [\"\"];\r\n }\r\n }\r\n }\r\n setProviderSchedules(temp);\r\n //}\r\n //else {\r\n // setProviderSchedules(temp);\r\n //}\r\n //FB 7801 - End\r\n setLoading(false);\r\n })();\r\n }, 1000);\r\n }\r\n }, [next7Days]);\r\n\r\n const history = useHistory();\r\n\r\n const handleGoBack = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Slots page by office location flow\");\r\n //FB 4960 End\r\n history.goBack();\r\n };\r\n\r\n const handleProceed = () => {\r\n history.push(\"/demographics\", state);\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n //FB 4774 DK - Moved phone number formatting to API index page\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n {state.appointmentdetails.location.name}\r\n \r\n {/* FB 7908 - Begin */}\r\n \r\n {state.appointmentdetails.location.address.includes(\"null\")\r\n ? \"\"\r\n : state.appointmentdetails.location.address\r\n .split(';')\r\n .map((part, index) => (\r\n part.trim() !== \"\" && (\r\n \r\n {part.trim()}\r\n
\r\n
\r\n )\r\n ))}\r\n
\r\n {/* FB 7908 - End */}\r\n\r\n {/* FB 4715 DK - Replaced number formatting with a function call */}\r\n \r\n {formatphone(state.appointmentdetails.location.phone)}\r\n \r\n {/* FB 7908 - Removed Unused part of code */}\r\n \r\n \r\n View Map\r\n \r\n \r\n {sessionAppointment}{/* FB 7801 */}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n\r\n 768 ? \"flex-end\" : \"center\"}\r\n >\r\n 768 ? \"flex\" : \"none\" }}\r\n >\r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n {todayDate === false ? (\r\n \r\n \r\n constructDates(\r\n limited === 7 ? dateCounter - 14 : dateCounter - 2\r\n )\r\n }\r\n >\r\n \r\n \r\n \r\n ) : (\r\n \"\"\r\n )}\r\n \r\n \r\n {next7Days.map((ele: singleDay, index: number) => {\r\n return (\r\n \r\n \r\n \r\n {ele.dateLabel.substring(0, 3)}\r\n \r\n \r\n \r\n {ele.dateLabel.substring(4, 10)}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n constructDates()}>\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {loading ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n {/* FB 4774 DK - Modified condition */}\r\n {providerSchedules?.schedulesByLocation.length === 0 ? (\r\n \r\n \r\n
\r\n {/* FB 4715 DK - Replaced number formatting with a function call */}\r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */}\r\n There are no online appointments available for this location. Please call {formatphone(state.appointmentdetails.location.phone)} to book an appointment.\r\n \r\n
\r\n
\r\n \r\n ) : (\r\n <>\r\n )}\r\n {providerSchedules?.schedulesByLocation.map(\r\n (ele: schedulesByLocation, index: number) => {\r\n return (\r\n \r\n );\r\n }\r\n )}\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n\r\n {/* FB 4867 - DK - Removed unused code */}\r\n \r\n
\r\n );\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport { Grid, makeStyles, Typography } from \"@material-ui/core\";\r\nimport { modify_SlotDetails } from \"../actions\";\r\nimport { Context, ErrorLog } from \"../store\"; //FB 4487 DK - Importing ErrorLog class from store\r\nimport { useHistory } from \"react-router-dom\";\r\nimport globalsettings from \"../../../config\";\r\n//FB-6264\r\n//FB 7675\r\nimport { ConvertTimeZone, InsertPELogs, NotifyErrorOutage } from \"../api\"; //FB 4487 DK - Importing the logError method used for error logging, FB 4960\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added UI component to display the slots\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4487 DK 06/07/2021 Implemented error logging on api call failures\r\n// FB 4556 DK 07/07/2021 Implement client side error handling on PE\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4867 DK 01/20/2022 Phone number made clickable\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7675 DK 11/09/2023 Timezone handling for appointments\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n container: {\r\n maxWidth: \"10%\",\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignSelf: \"flex-start\",\r\n justifyContent: \"center\",\r\n },\r\n containerRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n alignSelf: \"flex-start\",\r\n justifyContent: \"center\",\r\n },\r\n topBarItem: {\r\n alignSelf: \"flex-start\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: \"5px 5px 0 0\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n width: \"70%\",\r\n cursor: \"pointer\",\r\n fontSize: \"smaller\",\r\n height: \"25px\",\r\n \"&:hover, &:focus\": {\r\n backgroundColor: \"#25aae1\",\r\n color: \"#fff\",\r\n },\r\n },\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n}));\r\n\r\n//FB 4371 DK Added fnction to save the selected slot to preregistartion table\r\nexport async function addPreRegistration(preRegObj: any) {\r\n //FB-6264\r\n const targetUrl = globalsettings.emrAPI + \"api/Provider/Schedule/Preregistration/AddSlot\";\r\n const config = {\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n\r\n body: JSON.stringify(preRegObj),\r\n };\r\n const response = await fetch(targetUrl, config);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB 4556 DK - Implement client side error handling on PE - Start\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n const data = await response.json();\r\n return data;\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\nfunction SlotsByDateContainer(props: any) {\r\n const classes = useStyles();\r\n const { state, dispatch } = useContext(Context);\r\n const [expanded, setExpanded] = React.useState(false);\r\n const [itemsToShow, setItemsToShow] = React.useState(8);\r\n const [selectedSlot, setSelectedSlot] = React.useState(\"\");\r\n const history = useHistory();\r\n state.appointmentdetails.location.phone = props.facilityPhone.props.children[1]; //FB-4867\r\n\r\n //FB 4371 DK Added to toggle show more and hide slots\r\n\r\n function toggle() {\r\n setItemsToShow(expanded ? 8 : props.schedulesTest.Slots.length);\r\n setExpanded(!expanded);\r\n //FB 4960 Start\r\n if (expanded) {\r\n InsertPELogs(globalsettings.clientIp, \"Click on Show less - by Date flow for \" + props.schedulesTest.ScheduleDate);\r\n }\r\n else {\r\n InsertPELogs(globalsettings.clientIp, \"Click on Show More - by Date flow for \" + props.schedulesTest.ScheduleDate);\r\n }\r\n //FB 4960 End\r\n }\r\n\r\n //FB 4371 DK Added to book the selected slot\r\n\r\n function bookSlot(\r\n slots: any,\r\n scheduleDate: any,\r\n employeeid: any,\r\n facilityid: number\r\n ) {\r\n setSelectedSlot(slots);\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Click on time slot \" + slots);\r\n //FB 4960 End\r\n }\r\n\r\n //FB 4371 DK Added to save the selected slot to preregistartion table and modify the state\r\n React.useEffect(() => {\r\n if (selectedSlot != \"\") {\r\n props.onCallback(true);\r\n //FB 4409 DK Added to activate loading spinner once slot is selected\r\n props.isLoading(true);\r\n var date = new Date(\r\n state.appointmentdetails.date.toLocaleDateString() + \" \" + selectedSlot\r\n );\r\n var x = date.getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - x);\r\n const preRegistrationObj = {\r\n EMPLOYEE_N: props.employeeid,\r\n FACILITY_N: props.facilityid,\r\n PRE_REGISTRATION_DATE: date,\r\n PRE_REGISTRATION_SLOT_TIME: date,\r\n };\r\n (async () => {\r\n var data = await addPreRegistration(preRegistrationObj);\r\n if (data == 0) {\r\n //setOpen(true);\r\n } else {\r\n modify_SlotDetails(\r\n {\r\n employeeId: props.employeeid,\r\n facilityId: props.facilityid,\r\n id: data,\r\n slotDate: new Date(\r\n state.appointmentdetails.date.toLocaleDateString() +\r\n \" \" +\r\n selectedSlot\r\n ),\r\n employeeName: props.employeeName,\r\n facilityName: props.facilityName,\r\n isslotexisting: false,\r\n },\r\n dispatch\r\n );\r\n\r\n state.appointmentdetails.location.name = props.facilityName;\r\n state.appointmentdetails.location.address = props.facilityAddress;\r\n state.appointmentdetails.duration = props.duration; //FB 4638 added appt duration \r\n history.push(\"/demographics\", state);\r\n }\r\n })();\r\n }\r\n }, [selectedSlot]);\r\n\r\n //FB 7675\r\n var timeZone = \"America/Port-au-Prince\";\r\n var userTimeZone = sessionStorage.getItem(\"TimeZone\");\r\n if (userTimeZone != null) {\r\n timeZone = userTimeZone;\r\n }\r\n\r\n return (\r\n \r\n {props.limited === 1 ? (\r\n \r\n {props.schedulesTest.Slots.slice(0, itemsToShow).map(\r\n (slot: string, index: number) => {\r\n //FB 7675\r\n var convertedSlot = ConvertTimeZone(state.appointmentdetails.date.toLocaleDateString(), slot, timeZone, \"time\");\r\n return (\r\n \r\n \r\n bookSlot(\r\n slot,\r\n state.appointmentdetails.date,\r\n props.employeeid,\r\n props.facilityid\r\n )\r\n }\r\n >\r\n {/* FB 7675 */}\r\n {convertedSlot}\r\n \r\n \r\n );\r\n }\r\n )}\r\n {props.schedulesTest.Slots.length < 8 ? (\r\n
\r\n ) : (\r\n \r\n \r\n {expanded ? \"Show Less\" : \"Show More\"}\r\n \r\n \r\n )}\r\n \r\n ) : (\r\n <>\r\n )}\r\n
\r\n );\r\n}\r\n\r\nexport default SlotsByDateContainer;\r\n","import React, { useContext, useEffect, useState } from \"react\"; //FB 4409 DK - Added useeffect reference\r\nimport {\r\n Grid,\r\n Avatar,\r\n Typography,\r\n makeStyles,\r\n Link,\r\n CardMedia,\r\n CardContent,\r\n Card,\r\n Paper,\r\n} from \"@material-ui/core\";\r\nimport doc from \"../../../images/loc.jpg\";\r\n//import { Schedule, Provider } from \"../../types\";\r\nimport SlotsContainer from \"./slotsByDateContainer\";\r\nimport useStyle from \"../css/styles\";\r\nimport { Context } from \"../store\";\r\nimport globalsettings from \"../../../config\";\r\n//FB 4774 DK - Added reference for formatphone method\r\nimport { formatphone, InsertPELogs } from \"../api\"; // FB 4960\r\n\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added UI component to display the slots container\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4409 DK 04/30/2021 Added message to show when all available slots are booked\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4774 DK 11/16/2021 Modified messages\r\n// FB 4867 DK 01/20/2022 Phone number made clickable\r\n// FB 4912 DK 01/27/2022 Resolved message error\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 7413 GA 09/25/2023 Orady - Update the map link to the correct one\r\n// FB 7908 SK 01/08/2024 PE Online Appointment Bookings Facility Missing Address 2\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8213 MS 02/08/2024 Fetch the facility image from EMR\r\n// FB 8290 MS 04/29/2024 Show google link only if available in EMR\r\n\r\n\r\n\r\nexport type Schedule = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type SchedulesTest = {\r\n Facility_N: number;\r\n NextAvailability: string;\r\n SlotsDate: SlotsDate[];\r\n};\r\n\r\nexport type SlotsDate = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type Provider = {\r\n //name: string;\r\n //id: number;\r\n //facility: Facility;\r\n schedulesByDate: SchedulesByDate[];\r\n};\r\n\r\nexport type SchedulesByDate = {\r\n Employee_N: number;\r\n Employee_First_Name: string;\r\n Employee_Last_Name: string;\r\n NextAvailability: string;\r\n availableSlotsCount: number; //FB 4409 DK - Added variable for available slots count\r\n FacilityByDate: FacilityByDate[];\r\n Duration: number; //FB 4638 added duration field for ai response\r\n};\r\n\r\nexport type FacilityByDate = {\r\n Facility_n: number;\r\n Facility_Name: string;\r\n Facility_Address: string;\r\n Facility_Address2: string;//FB 7908\r\n Facility_City: string;\r\n Facility_State: string;\r\n Facility_Zip: string;\r\n Slots: string[];\r\n SchedulinPhone: string;\r\n GOOGLE_MAPS_LINK: string //FB 7413 \r\n};\r\n\r\ninterface IDateScheduleRowProps {\r\n Provider: Provider;\r\n FacilityByDate: FacilityByDate;\r\n Limited: number;\r\n indexNumber: number;\r\n Index: number;\r\n isLoading: any; //FB 4409 DK - Added isLoading flag to activate loading spinner\r\n}\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n centered: {\r\n alignSelf: \"center\",\r\n },\r\n content: {\r\n flex: \"1 0 auto\",\r\n },\r\n large: {\r\n width: theme.spacing(10),\r\n height: theme.spacing(10),\r\n },\r\n topBarItem: {\r\n alignSelf: \"center\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: theme.spacing(1),\r\n },\r\n providerRow: {\r\n borderTop: \"1px solid rgba(0, 0, 0, 0.12)\",\r\n padding: \"20px 0\",\r\n },\r\n timeSlotItem: {\r\n borderRadius: \"16px\",\r\n border: \"0\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n backgroundColor: \"#EDEEEE\",\r\n //width: \"70%\",\r\n cursor: \"pointer\",\r\n fontSize: \"smaller\",\r\n //height: \"25px\",\r\n \"&:hover, &:focus\": {\r\n backgroundColor: \"#25aae1\",\r\n color: \"#fff\",\r\n },\r\n },\r\n providerRowContainer: {\r\n overflowX: \"auto\",\r\n width: \"70%\",\r\n \"&::-webkit-scrollbar\": {\r\n width: \"4px\",\r\n height: \"10px\",\r\n backgroundColor: \"lightgray\",\r\n },\r\n\r\n \"&::-webkit-scrollbar-thumb:horizontal\": {\r\n backgroundColor: \"rgba(0,0,0,.5)\",\r\n //outline: '1px solid slategrey'\r\n },\r\n },\r\n}));\r\n\r\n\r\nfunction DateScheduleRow(props: IDateScheduleRowProps) {\r\n const classes = useStyles();\r\n const styles = useStyle();\r\n const { state, dispatch } = useContext(Context);\r\n //FB 4774 DK - Removed code since no longer needed\r\n const [disableEvents, setDiableEvents] = useState(false);\r\n\r\n //FB 4409 DK - Added flag for loading spinner\r\n const [isLoading, setIsLoading] = useState(false);\r\n const SchedulingPhone = formatphone(props.FacilityByDate.SchedulinPhone); //FB-4867\r\n //FB 4960 Start\r\n const insertLogs = async () => {\r\n InsertPELogs(globalsettings.clientIp, \"Click on View Map\");\r\n }\r\n //FB 4960 End\r\n\r\n //FB 4409 DK - Added to swap the isLoading flag on slots page when isLoading flag is updated \r\n useEffect(() => {\r\n props.isLoading(isLoading);\r\n }, [isLoading])\r\n\r\n //FB 8142 - Begin\r\n const [sessionAppointment, setSessionAppointment] = React.useState(\"\");\r\n\r\n useEffect(() => {\r\n const appt = sessionStorage.getItem(\"AppointmentType\");\r\n setSessionAppointment(appt!);\r\n }, []);\r\n //FB 8142 - End\r\n\r\n return props.FacilityByDate !== undefined ? (\r\n
\r\n {window.innerWidth <= 768 ? (\r\n
\r\n \r\n \r\n {state.appointmentdetails.appointmenttype === \"telederm\" ? (\r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n {props.FacilityByDate.Facility_Name}\r\n \r\n \r\n {/* FB 4774 DK - Formatting the phone number with a generic method */}\r\n {SchedulingPhone} {/*FB-4867*/}\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n {props.FacilityByDate.Facility_Name}\r\n \r\n \r\n {props.FacilityByDate.Facility_Address}\r\n \r\n {/* FB 7908 - Begin */}\r\n \r\n {props.FacilityByDate.Facility_Address2 && (\r\n props.FacilityByDate.Facility_Address2\r\n )}\r\n \r\n {/* FB 7908 - End */}\r\n \r\n {props.FacilityByDate.Facility_City},{\" \"}\r\n {props.FacilityByDate.Facility_State},{\" \"}\r\n {props.FacilityByDate.Facility_Zip}\r\n \r\n \r\n {/* FB 4774 DK - Formatting the phone number with a generic method */}\r\n {SchedulingPhone} {/*FB-4867*/}\r\n \r\n \r\n \r\n View Map\r\n \r\n \r\n {sessionAppointment}{/* FB 8142 */}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {props.FacilityByDate.Slots.length > 0 ? (\r\n \r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - Start\r\n ) : (props.Provider.schedulesByDate[props.indexNumber].availableSlotsCount <= 0 &&\r\n props.Provider.schedulesByDate[props.indexNumber].NextAvailability === null) ? (\r\n \r\n \r\n \r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/*FB-4867*/}\r\n There are no online appointments available for this date. Please call {SchedulingPhone} to book an appointment\r\n \r\n \r\n \r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - End\r\n \r\n \r\n \r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/*FB-4867*/} {/*FB-4912*/}\r\n The next available online appointment for this provider is {props.Provider.schedulesByDate[props.indexNumber].NextAvailability}\r\n . If you need an appointment sooner, Please call {SchedulingPhone}.\r\n \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.appointmentdetails.appointmenttype === \"telederm\" ? (\r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n {props.FacilityByDate.Facility_Name}\r\n \r\n\r\n \r\n {/* FB 4774 DK - Formatting the phone number with a generic method */}\r\n {SchedulingPhone} {/*FB-4867*/}\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n {/* FB 8213 - changed src */}\r\n \r\n \r\n \r\n \r\n {props.FacilityByDate.Facility_Name}\r\n \r\n \r\n {props.FacilityByDate.Facility_Address}\r\n \r\n {/* FB 7908 - Begin */}\r\n \r\n {props.FacilityByDate.Facility_Address2 && (\r\n props.FacilityByDate.Facility_Address2\r\n )}\r\n \r\n {/* FB 7908 - End */}\r\n \r\n {props.FacilityByDate.Facility_City},{\" \"}\r\n {props.FacilityByDate.Facility_State},{\" \"}\r\n {props.FacilityByDate.Facility_Zip}\r\n \r\n \r\n {/* FB 4774 DK - Formatting the phone number with a generic method */}\r\n {SchedulingPhone} {/*FB-4867*/}\r\n \r\n \r\n \r\n View Map\r\n \r\n \r\n {sessionAppointment}{/* FB 8142 */}\r\n \r\n \r\n )}\r\n \r\n \r\n {props.FacilityByDate.Slots.length > 0 ? (\r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - Start\r\n props.Provider.schedulesByDate[props.indexNumber].availableSlotsCount <= 0 &&\r\n props.Provider.schedulesByDate[props.indexNumber].NextAvailability === null) ? (\r\n \r\n \r\n \r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/*FB-4867*/}\r\n There are no online appointments available for this date. Please call {SchedulingPhone} to book an appointment.\r\n \r\n \r\n \r\n \r\n ) : (\r\n // FB 4409 DK - Added condition and message to be displayed when there are no available slots - End\r\n \r\n \r\n \r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/*FB-4867*/} {/*FB-4912*/}\r\n The next available online appointment for this provider is {props.Provider.schedulesByDate[props.indexNumber].NextAvailability}\r\n . If you need an appointment sooner, Please call {SchedulingPhone}.\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n )}\r\n
\r\n ) : (\r\n <>\r\n );\r\n}\r\nexport default DateScheduleRow;\r\n","//FB 4487 DK - Removed multiple unused imports below\r\nimport React, { useContext, useState } from \"react\";\r\nimport Provider from \"../components/Provider\";\r\nimport {\r\n Grid,\r\n makeStyles,\r\n Typography,\r\n IconButton,\r\n Tooltip,\r\n CircularProgress,\r\n Button,\r\n Avatar,\r\n CardContent,\r\n Card,\r\n CardMedia,\r\n Paper,\r\n ThemeProvider,\r\n createMuiTheme,\r\n} from \"@material-ui/core\";\r\nimport { Context, ErrorLog } from \"../store\"; //FB 4487 DK - Importing ErrorLog class from store\r\nimport NavigateBeforeIcon from \"@material-ui/icons/ArrowBack\";\r\nimport NavigateNextIcon from \"@material-ui/icons/ArrowForward\";\r\nimport DateScheduleRow from \"./DateScheduleRow\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useStyle from \"../css/styles\";\r\nimport {\r\n KeyboardDatePicker,\r\n MuiPickersUtilsProvider,\r\n} from \"@material-ui/pickers\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport globalsettings from \"../../../config\";\r\n//FB 4774 DK - Added reference for formatphone method\r\n//FB-6264\r\nimport { formatphone, InsertPELogs, NotifyErrorOutage, GetAdminSettingValue } from \"../api\"; //FB 4487 DK - Importing the logError method used for error logging , FB 4960, FB 7418\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page for the slots page in \"By Date\" workflow\r\n// FB 4409 DK 04/27/2021 Implementation of loading spinner on slots page\r\n// FB 4409 DK 04/30/2021 Added message to show when all available slots are booked\r\n// FB 4487 DK 06/07/2021 Implemented error logging on api call failures\r\n// FB 4574 DK 07/15/2021 Added styling for calender icon\r\n// FB 4638 MS 08/31/2021 Fixed Mobile view issues\r\n// FB 4769 MS 11/02/2021 Added Job Title for Provider\r\n// FB 4774 DK 11/16/2021 Modified messages\r\n// FB 4867 DK 01/20/2022 Phone numbe made clickable\r\n// FB 4960 BR 07/03/2022 Logging all actions on PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 7418 GS 09/21/2023 Added admin setting to change the message on PE when slots are not available\r\n// FB 7413 GA 09/25/2023 Orady - Update the map link to the correct one\r\n// FB 7801 SK 12/14/2023 PE - Handling Appointment Types that have Differing Lengths of Time\r\n// FB 7908 SK 01/08/2024 PE Online Appointment Bookings Facility Missing Address 2\r\n// FB 8142 SK 01/23/2024 Sophie - time slots are different when you go with by date vs. by provider flow\r\n// FB 8680 DK 05/21/2024 Practice phone related changes\r\n// FB 9597 DK 10/24/2024 Schedules not loading on PE \r\n// FB 9742 SK 12/12/2024 No appointments showing up on PE\r\n// FB 9973 DK 01/28/2025 Failed to fetch: GET https://drsamemr.com/api/Provider/GetSlotsByDate\r\n\r\n\r\nexport type Schedule = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nexport type SchedulesTest = {\r\n Facility_N: number;\r\n NextAvailability: string;\r\n SlotsDate: SlotsDate[];\r\n};\r\n\r\nexport type SchedulesByDate = {\r\n Employee_N: number;\r\n Employee_First_Name: string;\r\n Employee_Last_Name: string;\r\n Employee_Image: string;\r\n NextAvailability: string;\r\n isInsuranceAccepted: boolean;\r\n FacilityByDate: FacilityByDate[];\r\n Employee_Bio: string;\r\n availableSlotsCount: number; //FB 4409 DK - Added variable for available slots count\r\n Duration: number; //FB 4638 added duration field\r\n Employee_Job_Title: string; //FB 4769\r\n};\r\n\r\nexport type FacilityByDate = {\r\n Facility_n: number;\r\n Facility_Name: string;\r\n Facility_Address: string;\r\n Facility_Address2: string;//FB 7908\r\n Facility_City: string;\r\n Facility_State: string;\r\n Facility_Zip: string;\r\n Slots: string[];\r\n SchedulinPhone: string;\r\n GOOGLE_MAPS_LINK: string; //FB 7413\r\n ApptTypeSlots: string[]; //FB 7801\r\n};\r\n\r\nexport type SlotsDate = {\r\n ScheduleDate: string;\r\n Slots: string[];\r\n};\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n action: {\r\n selected: \"#8BD0DB\",\r\n hover: \"#5DBDCD\",\r\n },\r\n },\r\n});\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n flexColumn: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n flexRow: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n container: {\r\n //width: \"90%\",\r\n margin: \"0 auto\",\r\n border: \"1px solid rgb(0 0 0 / 25%)\",\r\n backgroundColor: \"#fff\",\r\n },\r\n filter: {\r\n justifyContent: \"flex-start\",\r\n minHeight: \"400px\",\r\n minWidth: \"10%\",\r\n borderRight: \"1px solid rgba(0, 0, 0, 0.12)\",\r\n },\r\n centered: {\r\n alignSelf: \"center\",\r\n },\r\n content: {\r\n flex: \"1 0 auto\",\r\n },\r\n large: {\r\n width: theme.spacing(7),\r\n height: theme.spacing(7),\r\n marginLeft: \"10px\",\r\n },\r\n topBarItem: {\r\n alignSelf: \"center\",\r\n textAlign: \"center\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n margin: {\r\n margin: theme.spacing(1),\r\n },\r\n topBarItem_Day: {\r\n color: \"#A8ABAE\",\r\n textTransform: \"uppercase\",\r\n fontWeight: 500,\r\n letterSpacing: \".1em\",\r\n whiteSpace: \"normal\",\r\n fontSize: \"10px\",\r\n },\r\n navigateBackContainer: {\r\n height: \"9vh\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n },\r\n mainFilter: {\r\n minHeight: \"9vh\",\r\n marginTop: theme.spacing(5),\r\n marginBottom: theme.spacing(2),\r\n },\r\n mainFilter_Location_Caption: {\r\n color: \"#A8ABAE\",\r\n fontWeight: \"bold\",\r\n },\r\n slotsContainer: {\r\n //width: \"90%\",\r\n margin: \"0 auto\",\r\n //border: \"1px solid rgb(0 0 0 / 25%)\",\r\n backgroundColor: \"#fff\",\r\n },\r\n providerRowContainer: {\r\n overflowY: \"auto\",\r\n minHeight: \"40vh\",\r\n maxHeight: \"55vh\",\r\n },\r\n borderlessCard: {\r\n border: \"none\",\r\n boxShadow: \"none\",\r\n },\r\n datepickerroot: {\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n // FB 4574 DK - Added styling for increasing the icon size\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n}));\r\n\r\ninterface singleDay {\r\n dateLabel: string;\r\n hiddenDateValue: string;\r\n}\r\n\r\nexport type Provider = {\r\n //name: string;\r\n //id: number;\r\n //facility: Facility;\r\n //schedules: Schedule[];\r\n schedulesByDate: SchedulesByDate[];\r\n};\r\n\r\nexport type Facility = {\r\n id: number;\r\n name: string;\r\n addressLine1: string;\r\n addressLine2: string;\r\n city: string;\r\n state: string;\r\n zipcode: string;\r\n};\r\n\r\n//FB 4371 DK Added to get available slots for selected date\r\nexport async function GetAvailableSlotsByDate(\r\n startDate: string,\r\n location: number,\r\n provider: number,\r\n apptType: any,\r\n insurance_id: number,//FB 7801\r\n appointment_type_n: number //FB 7801\r\n): Promise {\r\n let url;\r\n //FB-6264\r\n if (apptType === \"telederm\" && provider === 0) {\r\n url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetSlotsByDate/-1/${startDate}/1/${insurance_id}/${appointment_type_n}`;//FB 7801\r\n } else if (apptType === \"telederm\" && provider > 0) {\r\n url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetFacilitySlotsForProviderBydate/${provider}/-1/${startDate}/1/${insurance_id}/${appointment_type_n}`;//FB 7801\r\n } else if (provider === 0) {\r\n url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetSlotsByDate/${location}/${startDate}/1/${insurance_id}/${appointment_type_n}`;//FB 7801\r\n } else {\r\n url =\r\n globalsettings.emrAPI +\r\n `api/Provider/GetFacilitySlotsForProviderBydate/${provider}/${location}/${startDate}/1/${insurance_id}/${appointment_type_n}`;//FB 7801\r\n }\r\n const response = await fetch(url);\r\n\r\n //FB 4487 DK - Added logic for logging the error's on API call - Start\r\n if (!response.ok) {\r\n //FB-6264\r\n NotifyErrorOutage();\r\n return Promise.reject();\r\n }\r\n else {\r\n let data = await response.json();\r\n if (apptType === \"inoffice\" && provider === 0) {\r\n data = data.sort(function (x: any, y: any) {\r\n // true values first\r\n return x.isInsuranceAccepted === y.isInsuranceAccepted ? 0 : x ? -1 : 1;\r\n });\r\n }\r\n return data as SchedulesByDate[];\r\n }\r\n //FB 4487 DK - Added logic for logging the error's on API call - End\r\n}\r\n\r\nfunction getWindowDimensions() {\r\n const { innerWidth: width, innerHeight: height } = window;\r\n return {\r\n width,\r\n height,\r\n };\r\n}\r\n\r\nexport type ProviderDetails = {\r\n //Id: number;\r\n EMPLOYEE_FIRST_NAME: string;\r\n EMPLOYEE_LAST_NAME: string;\r\n};\r\n\r\nexport default function Slots_bydate() {\r\n const classes = useStyles();\r\n const [indexNumber, setIndexNumber] = React.useState(0);\r\n const [loading, setLoading] = React.useState(true);\r\n const [providerSchedules, setProviderSchedules] = React.useState();\r\n const [todayDate, setToday] = React.useState(false);\r\n let tempdays: singleDay[] = [];\r\n const [windowDimensions, setWindowDimensions] = React.useState(\r\n getWindowDimensions()\r\n );\r\n const [limited, setLimit] = React.useState(7);\r\n const { state, dispatch } = useContext(Context);\r\n const [weekDay, setWeekDay] = React.useState(0);\r\n //FB 7418 Begin\r\n const [textMessage, setTextMessage] = useState(\"\");\r\n const [textValue, setTextValue] = useState(false);\r\n //FB 7418 End\r\n var week = new Array(\r\n \"Sunday\",\r\n \"Monday\",\r\n \"Tuesday\",\r\n \"Wednesday\",\r\n \"Thursday\",\r\n \"Friday\",\r\n \"Saturday\"\r\n );\r\n const [selectedDate, setSelectedDate] = useState(null);\r\n const [outofSlots, setOutofSlots] = useState(false);\r\n\r\n const styles = useStyle();\r\n //FB 7418 Begin\r\n const [defaultPhone, setDefaultPhone] = useState(\"\"); //FB 8680\r\n\r\n async function GetSlotsMessage() {\r\n var data = await GetAdminSettingValue(\"PE_Slot_Unavailable_Message\");\r\n if (data != \"\") {\r\n setTextMessage(data);\r\n setTextValue(true);\r\n }\r\n //FB 8680\r\n var practicePhone = await GetAdminSettingValue(\"Default_Sch_Appt_Number\");\r\n if (practicePhone != null) {\r\n setDefaultPhone(practicePhone);\r\n }\r\n }\r\n //FB 7418 End\r\n\r\n function handleResize() {\r\n //alert(\"handleResize\");\r\n setWindowDimensions(getWindowDimensions());\r\n //alert(\"Out \" + window.innerWidth);\r\n //if(width < 450){\r\n //alert(window.innerWidth);\r\n //constructDates(0);\r\n //today();\r\n //}\r\n }\r\n\r\n\r\n const handleDateChange = (date: any) => {\r\n if (date != null && date != \"Invalid Date\") {\r\n setSelectedDate(date);\r\n state.appointmentdetails.date = date;\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Changed the date to \" + date.toDateString() + \" in by date flow\");\r\n //FB 4960 End\r\n }\r\n };\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handleResize);\r\n GetSlotsMessage(); //FB 7418\r\n //constructDates(0);\r\n //today();\r\n return () => window.removeEventListener(\"resize\", handleResize);\r\n }, [window.innerWidth]);\r\n\r\n React.useEffect(() => {\r\n //if (indexNumber === 0) {\r\n setIndexNumber(0);\r\n setLoading(true);\r\n let temp: Provider = {\r\n schedulesByDate: [],\r\n };\r\n //FB 9597\r\n let session_ApptN = sessionStorage.getItem(\"AppointmentType_N\");//FB 7801\r\n let appt_type_n = session_ApptN != null && session_ApptN != 'undefined' ? Number(session_ApptN) : 0;\r\n //FB 9973\r\n //let custom_appt_type = sessionStorage.getItem(\"Enable PE Custom Appointments\");//FB 8142\r\n setTimeout(() => {\r\n (async () => {\r\n let currentDate = state.appointmentdetails.date;\r\n let days = currentDate.getDate();\r\n let value = new Date(currentDate.setDate(days));\r\n let splittedDate = value.toLocaleDateString().split(\"/\");\r\n setWeekDay(currentDate.getDay());\r\n //state.appointmentdetails.date = new Date(state.appointmentdetails.date.getTime() + offset*60*1000)\r\n temp.schedulesByDate = await GetAvailableSlotsByDate(\r\n `${splittedDate[0]}-${splittedDate[1]}-${splittedDate[2]}`,\r\n state.appointmentdetails.location.id,\r\n state.appointmentdetails.provider.id,\r\n state.appointmentdetails.appointmenttype,\r\n state.appointmentdetails.insurance.id,//FB 7801\r\n Number(appt_type_n) //FB 7801\r\n );\r\n setLoading(false);\r\n //FB 8142 - Modified Approach - Removed Old Code- Begin\r\n //FB 9742 Removed unused part of code\r\n if (temp.schedulesByDate.length > 0 && temp.schedulesByDate[0].FacilityByDate[0].Facility_n != 0) {\r\n setOutofSlots(false);\r\n setProviderSchedules(temp);\r\n }\r\n //FB 7801 - End\r\n //FB 8142 - End\r\n else {\r\n setOutofSlots(true);\r\n setProviderSchedules(temp); //FB 4774\r\n }\r\n })();\r\n }, 1000);\r\n //}\r\n }, [selectedDate]);\r\n\r\n const history = useHistory();\r\n\r\n const handleGoBack = () => {\r\n //FB 4960 Start\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Slots page by date flow\");\r\n //FB 4960 End\r\n history.goBack();\r\n };\r\n\r\n const scrollTo = (ref: any) => {\r\n if (ref /* + other conditions */) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n return (\r\n \r\n {outofSlots ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {state.appointmentdetails.appointmenttype === \"inoffice\"\r\n ? \"In-office Appointment\"\r\n : state.appointmentdetails.appointmenttype ===\r\n \"telederm\"\r\n ? globalsettings.digitalApptType + \" Appointment\"\r\n : \"\"}\r\n \r\n \r\n {week[weekDay]}\r\n \r\n {state.appointmentdetails.date\r\n .toLocaleDateString(\"en-GB\", {\r\n day: \"2-digit\",\r\n month: \"long\",\r\n year: \"numeric\",\r\n })\r\n .replace(/ /g, \" \")}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n {loading ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n
\r\n \r\n \r\n \r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */}\r\n There are no online appointments available for this date. Please call {formatphone(state.appointmentdetails.location.phone)} to book an appointment.\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n \r\n \r\n \r\n \r\n Go Back\r\n \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.appointmentdetails.appointmenttype === \"inoffice\"\r\n ? \"In-office Appointment\"\r\n : state.appointmentdetails.appointmenttype ===\r\n \"telederm\"\r\n ? globalsettings.digitalApptType + \" Appointment\"\r\n : \"\"}\r\n \r\n \r\n {week[weekDay]}\r\n \r\n {state.appointmentdetails.date\r\n .toLocaleDateString(\"en-GB\", {\r\n day: \"2-digit\",\r\n month: \"long\",\r\n year: \"numeric\",\r\n })\r\n .replace(/ /g, \" \")}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n 768 ? \"flex\" : \"none\" }}\r\n >\r\n \r\n \r\n handleDateChange(date)}\r\n format=\"MM/dd/yyyy\"\r\n minDate={new Date()}\r\n initialFocusedDate={null}\r\n minDateMessage=\"Date should not be in past\"\r\n />\r\n \r\n \r\n \r\n \r\n {indexNumber === 0 ? (\r\n
\r\n ) : (\r\n \r\n setIndexNumber(indexNumber - 1)}\r\n //style={{fontSize:\"0.7rem\"}}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n {loading ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {providerSchedules?.schedulesByDate.length === 0 ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {state.appointmentdetails.provider.name}\r\n \r\n {/* FB 4769 BEGIN */}\r\n \r\n {state.appointmentdetails.provider.job_title}\r\n
\r\n {state.appointmentdetails.provider.bio}\r\n
\r\n {/* FB 4769 END */}\r\n
\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n providerSchedules?.schedulesByDate[indexNumber]\r\n .Employee_First_Name\r\n }{\" \"}\r\n {\r\n providerSchedules?.schedulesByDate[indexNumber]\r\n .Employee_Last_Name\r\n }\r\n \r\n \r\n\r\n {/* FB 4769 BEGIN */}\r\n \r\n {\r\n providerSchedules?.schedulesByDate[indexNumber]\r\n .Employee_Job_Title\r\n }\r\n
\r\n {\r\n providerSchedules?.schedulesByDate[indexNumber]\r\n .Employee_Bio\r\n }\r\n
\r\n {/* FB 4769 END */}\r\n \r\n This provider does not accept the selected insurance at\r\n this location.\r\n \r\n \r\n (If your insurance plan includes out-of-network\r\n coverage, please ignore this warning)\r\n \r\n
\r\n \r\n )}\r\n \r\n )}\r\n \r\n {indexNumber + 1 === providerSchedules?.schedulesByDate.length ? (\r\n
\r\n ) : (\r\n \r\n setIndexNumber(indexNumber + 1)}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n\r\n \r\n {loading ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : providerSchedules?.schedulesByDate[indexNumber]\r\n .FacilityByDate[0].Slots.length === 0\r\n && providerSchedules.schedulesByDate[indexNumber]\r\n .NextAvailability === null\r\n ? (\r\n
\r\n \r\n \r\n \r\n {/* FB 7418 Begin */}\r\n {!textValue ? (\r\n \r\n {/* FB 4774 DK - Modified message */}\r\n {/* FB 4867 */}\r\n There are no online appointments available for this provider. Please call {formatphone(providerSchedules.schedulesByDate[indexNumber].FacilityByDate[0].SchedulinPhone)} to book an appointment.\r\n ) :\r\n \r\n {/* FB 4774 - Modified the message */}\r\n {/* FB 4867 */}\r\n {/* FB 8680 */}\r\n {providerSchedules.schedulesByDate[indexNumber].FacilityByDate[0].SchedulinPhone.length > 0 ? textMessage.replace(\"@practice_phone\", providerSchedules.schedulesByDate[indexNumber].FacilityByDate[0].SchedulinPhone)\r\n : textMessage.replace(\"@practice_phone\", defaultPhone)}\r\n \r\n }\r\n {/* FB 7418 End */}\r\n \r\n \r\n \r\n
\r\n ) : (\r\n \r\n {providerSchedules?.schedulesByDate[\r\n indexNumber\r\n ].FacilityByDate.map((ele: FacilityByDate, index: number) => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n\r\n {/* FB 4867 DK - Removed unused code */}\r\n \r\n )}\r\n
\r\n );\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport Rating from \"@material-ui/lab/Rating\";\r\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\r\nimport TextareaAutosize from \"@material-ui/core/TextareaAutosize\";\r\nimport Divider from \"@material-ui/core/Divider\";\r\n//FB 4498 BR:start update reviews for sessions\r\nimport { GetMessage, GetLink, updateReviews, GetPracticeName } from \"../appointments/create/api/index\"; // FB 4867\r\n//FB 4498 BR:end update reviews for sessions\r\nimport Link from \"@material-ui/core/Link\";\r\n//FB-6264\r\nimport { useHistory } from \"react-router-dom\";\r\n\r\n// update log\r\n// FB 4371 BR 03/29/2021 Appointment Reviews User Interface\r\n// FB 4498 BR 06/10/2021 Review email for note creation\r\n// FB 4653 BR 08/23/2021 PE - Text message changed in review emails\r\n// FB 4867 BR 01/10/2022 PE - Implement the feature to upload Support files and Health forms after booking an appointment in PE\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n\r\nconst Reviews = (props: any) => {\r\n // alert(props.match.params.id);\r\n const [ratingValue, setRatingValue] = useState(0);\r\n const [displayMessage, setDisplayMessage] = useState(\"none\");\r\n const [displaylink, setDisplaylink] = useState(\"none\");\r\n const [displayTextarea, setdisplayTextarea] = useState(\"none\");\r\n const [displaySend, setDisoplaysend] = useState(\"none\");\r\n const [displaySubmit, setDisoplaysubmit] = useState(\"flex\");\r\n const [message, setMessage] = useState(\"\");\r\n const [googlelink, setGoogleLink] = useState(\"\");\r\n const [freezeStars, setfreezeStars] = useState(false);\r\n const [comments, setComments] = useState(\"\");\r\n const [practiceName, setPracticeName] = useState(\"\"); //FB 4867\r\n\r\n //FB 4867\r\n useEffect(() => {\r\n onload();\r\n }, []);\r\n\r\n //FB 4867\r\n const onload = async () => {\r\n const data = await GetPracticeName();\r\n setPracticeName(data);\r\n }\r\n\r\n const buttonClick = async () => {\r\n {/* FB 4639 BR - PE - Text message changed in review emails */ }\r\n const data = await GetMessage(ratingValue, props.match.params.id);\r\n setfreezeStars(true);\r\n setMessage(data);\r\n if (ratingValue !== null) {\r\n if (ratingValue <= 3) {\r\n setDisplayMessage(\"flex\");\r\n setDisplaylink(\"none\");\r\n setdisplayTextarea(\"flex\");\r\n setDisoplaysend(\"flex\");\r\n setDisoplaysubmit(\"none\");\r\n }\r\n if (ratingValue >= 4) {\r\n //FB 4498 BR:start update reviews for sessions\r\n const data = await GetLink(props.match.params.id, props.match.params.flag);\r\n setGoogleLink(data);\r\n setDisplayMessage(\"none\");\r\n setDisplaylink(\"flex\");\r\n setdisplayTextarea(\"none\");\r\n setDisoplaysend(\"none\");\r\n setDisoplaysubmit(\"none\");\r\n //FB 4498 BR:start update reviews for sessions\r\n //FB-6264\r\n updateReviews(ratingValue, comments, props.match.params.id);\r\n //FB 4498 BR:start update reviews for sessions\r\n }\r\n if (ratingValue == 0) {\r\n setDisplayMessage(\"none\");\r\n setDisplaylink(\"none\");\r\n setdisplayTextarea(\"none\");\r\n setDisoplaysend(\"none\");\r\n }\r\n } else {\r\n setDisplayMessage(\"none\");\r\n setDisplaylink(\"none\");\r\n if (ratingValue == 0) {\r\n setDisplayMessage(\"none\");\r\n setDisplaylink(\"none\");\r\n }\r\n }\r\n };\r\n\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n const history = useHistory();\r\n const sendButtonClick = () => {\r\n //update_appointment_reviews(props.match.params.id, ratingValue, comments); // FB 4867\r\n //FB 4498 BR:Start update reviews for sessions\r\n updateReviews(ratingValue, comments, props.match.params.id);\r\n //FB 4498 BR:End update reviews for sessions\r\n //FB 4867 BR:Added the missing parameter to navigate to thank you page\r\n history.push(\"/Thankyou/\" + props.match.params.id);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n

Satisfaction Survey

\r\n
\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n {/* FB 4867 */}\r\n Please rate your recent visit at {practiceName}\r\n \r\n {/* */}\r\n \r\n \r\n
\r\n \r\n \r\n {\r\n setRatingValue(newValue);\r\n }}\r\n readOnly={freezeStars}\r\n style={{\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n }}\r\n />\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Submit\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {message}\r\n \r\n \r\n setComments(e.target.value)}\r\n />\r\n \r\n \r\n
\r\n\r\n \r\n \r\n {/* FB 4639 BR:Start - PE - Text message changed in review emails */}\r\n

\r\n {message}\r\n \r\n \r\n Click Here\r\n \r\n \r\n\r\n

\r\n {/* FB 4639 BR:End - PE - Text message changed in review emails */}\r\n
\r\n \r\n \r\n \r\n \r\n Send\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Reviews;\r\n","import { Actions } from \"../actions\";\r\nimport { Store } from \".\";\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Added page to handle actions and state dispatch\r\n\r\nexport default function reducer(state: Store, action: Actions) {\r\n switch (action.type) {\r\n case \"MODIFY_APPOINTMENT_DETAILS\":\r\n return { ...state, appointmentdetails: action.data };\r\n\r\n case \"GET_PROVIDERS\":\r\n return { ...state, providers: action.data };\r\n\r\n case \"GET_FACILITIES\":\r\n return { ...state, facilities: action.data };\r\n\r\n case \"GET_STATES\":\r\n return { ...state, states: action.data };\r\n\r\n case \"MODIFY_SLOT_DETAILS\":\r\n return { ...state, slotDetails: action.data };\r\n\r\n default:\r\n return state;\r\n }\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\n//FB-6264\r\nimport { Grid, makeStyles } from \"@material-ui/core\";\r\nimport { GetPatientName } from \"../appointments/create/api/index\"; // FB 4653 BR:Start - PE - Text message changed in review emails\r\n\r\n\r\n// update log\r\n// FB 4371 BR 03/29/2021 Thank you UI after submitting the appointment reviews\r\n// FB 4653 BR 08/23/2021 PE - Text message changed in review emails\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n\r\nconst Thankyou = (props: any) => {\r\n // alert(props.match.params.id);\r\n const [ratingValue, setRatingValue] = useState(0);\r\n const [displayMessage, setDisplayMessage] = useState(\"none\");\r\n const [displaylink, setDisplaylink] = useState(\"none\");\r\n const [displayTextarea, setdisplayTextarea] = useState(\"none\");\r\n const [displaySend, setDisoplaysend] = useState(\"none\");\r\n const [displaySubmit, setDisoplaysubmit] = useState(\"flex\");\r\n const [message, setMessage] = useState(\"\");\r\n const [googlelink, setGoogleLink] = useState(\"\");\r\n const [freezeStars, setfreezeStars] = useState(false);\r\n const [comments, setComments] = useState(\"\");\r\n const [firstName, setFirstName] = useState(\"\"); // FB 4653 BR - PE - Text message changed in review emails\r\n\r\n {/* FB 4653 BR:Start - PE - Text message changed in review emails */ }\r\n useEffect(() => {\r\n onload();\r\n }, []); //FB 4867\r\n\r\n const onload = async () => {\r\n const data = await GetPatientName(props.match.params.id);\r\n setFirstName(data);\r\n }\r\n {/* FB 4653 BR:End - PE - Text message changed in review emails */ }\r\n\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n \r\n {/* */}\r\n \r\n {/* FB 4653 BR - PE - Text message changed in review emails */}\r\n We appreciate your kind feedback , {firstName} . Thank you for rating us.\r\n \r\n {/* */}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Thankyou;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { ConfirmAppt, LinkExpiry, GetSchedulingPhone } from '../appointments/create/api';\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\r\n\r\n// update log\r\n// FB 4660 BR 08/30/2021 PE - Appointment confirmation url\r\n// FB 4831 BR 11/26/2021 Appointment Confirmation - it refreshs every sec when the page is still open.\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n\r\n\r\nfunction Appointmentconfirm(props: any) {\r\n const [returnValue, setReturnValue] = useState(\"\");\r\n const [displayMessage, setDisplayMessage] = useState(\"\");\r\n const [fontColor, setFontColor] = useState(\"limegreen\");\r\n const [linkExpiryData, setLinkExpiryData] = useState(\"\");\r\n const [SchedulingPoneData, setSchedulingPoneData] = useState(\"\");\r\n const [assisstanceMessage, setAssisstanceMessage] = useState(\"\");\r\n\r\n useEffect(() => {\r\n onload();\r\n },[]); //FB 4831\r\n\r\n const onload = async () => {\r\n const data = await ConfirmAppt(props.match.params.apptId, props.match.params.licenseName);\r\n setReturnValue(data);\r\n const linkExpiryReturnData = await LinkExpiry(props.match.params.apptId, props.match.params.licenseName);\r\n setLinkExpiryData(linkExpiryReturnData);\r\n const SchedulingPhoneReturnData = await GetSchedulingPhone(props.match.params.apptId, props.match.params.licenseName);\r\n setSchedulingPoneData(SchedulingPhoneReturnData);\r\n if (data == \"Appointment is cancelled\") { //FB 4831\r\n setDisplayMessage(\"Your appointment is cancelled\");\r\n setAssisstanceMessage(\"For further assistance please call:\" + SchedulingPhoneReturnData); //FB 4831\r\n setFontColor(\"red\");\r\n } else {\r\n if (linkExpiryReturnData == \"Appointment is in the past\") { //4867\r\n setDisplayMessage(\"Your appointment date is already passed.\");\r\n setAssisstanceMessage(\"For further assistance please call:\" + SchedulingPhoneReturnData); //FB 4831\r\n setFontColor(\"red\");\r\n } else {\r\n if (data == \"Appointment is confirmed\") { //FB 4831\r\n setDisplayMessage(\"Your appointment is confirmed.\");\r\n setAssisstanceMessage(\"\");\r\n setFontColor(\"limegreen\");\r\n }\r\n else {\r\n setDisplayMessage(\"There was an error confirming your appointment.\");\r\n setAssisstanceMessage(\"For further assistance please call:\" + SchedulingPhoneReturnData); //FB 4831\r\n setFontColor(\"red\");\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n \r\n {/* */}\r\n \r\n

\r\n {displayMessage}\r\n

\r\n {assisstanceMessage}\r\n\r\n
\r\n {/*
*/}\r\n\r\n \r\n
\r\n );\r\n\r\n\r\n\r\n}\r\nexport default Appointmentconfirm;","import React, { useEffect, useState } from 'react';\r\nimport { ConfirmParkinglot, LinkExpiry, GetSchedulingPhone } from '../appointments/create/api';\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport { Grid, Button, makeStyles } from \"@material-ui/core\";\r\n\r\n// update log\r\n// FB 4661 BR 08/30/2021 PE - ParkingLot confirmation url\r\n// FB 4810 MS 11/22/2021 Fixed multiple calls to API issue\r\n// FB 4867 DK 12/27/2021 Added screens for Support files and Health forms upload\r\n\r\n\r\nfunction Parkinglotconfirm(props: any) {\r\n const [returnValue, setReturnValue] = useState(\"\");\r\n const [linkExpiryData, setLinkExpiryData] = useState(\"\");\r\n const [SchedulingPoneData, setSchedulingPoneData] = useState(\"\");\r\n const [displayMessage, setDisplayMessage] = useState(\"\");\r\n const [assisstanceMessage, setAssisstanceMessage] = useState(\"\");\r\n const [fontColor, setFontColor] = useState(\"limegreen\");\r\n\r\n useEffect(() => {\r\n onload();\r\n }, []); //FB 4810\r\n\r\n const onload = async () => {\r\n const MessageData = await ConfirmParkinglot(props.match.params.apptId, props.match.params.licenseName); //FB 4867\r\n setReturnValue(MessageData);\r\n const linkExpiryReturnData = await LinkExpiry(props.match.params.apptId, props.match.params.licenseName); //FB 4867\r\n setLinkExpiryData(linkExpiryReturnData);\r\n const SchedulingPhoneReturnData = await GetSchedulingPhone(props.match.params.apptId, props.match.params.licenseName); //FB 4867\r\n setSchedulingPoneData(SchedulingPhoneReturnData);\r\n //FB 4810 BEGIN\r\n if (MessageData == \"Appointment is cancelled\") {\r\n setDisplayMessage(\"Your appointment is cancelled\");\r\n setAssisstanceMessage(\"For further assistance please call:\" + SchedulingPhoneReturnData);\r\n setFontColor(\"red\");\r\n } else {\r\n if (linkExpiryReturnData == \"Appointment is in the past\") {\r\n setDisplayMessage(\"Your appointment date is already passed.\");\r\n setAssisstanceMessage(\"For further assistance please call:\" + SchedulingPhoneReturnData);\r\n setFontColor(\"red\");\r\n }\r\n else {\r\n if (MessageData == \"Patient Arrival is confirmed\") {\r\n setDisplayMessage(\"Our office will be notified of your arrival.\");\r\n setAssisstanceMessage(\"\");\r\n setFontColor(\"limegreen\");\r\n }\r\n else {\r\n setDisplayMessage(\"There was an error confirming your arrival.\");\r\n setAssisstanceMessage(\"For further assistance please call:\" + SchedulingPhoneReturnData);\r\n setFontColor(\"red\");\r\n }\r\n //FB 4810 END\r\n }\r\n }\r\n\r\n }\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n \r\n {/* */}\r\n \r\n

\r\n {displayMessage}\r\n

\r\n {assisstanceMessage}\r\n
\r\n {/*
*/}\r\n \r\n
\r\n );\r\n\r\n\r\n\r\n}\r\nexport default Parkinglotconfirm;","import React, { useEffect } from \"react\";\r\nimport { GetdecodedURL } from \"./api\";\r\n\r\n//Update log\r\n//FB 4763 DK 10/21/2021 Added to redirect the page from short url's\r\n//\r\n\r\nexport async function getdecodedURL(\r\n urlcode: string\r\n): Promise {\r\n const decodedURL = await GetdecodedURL(urlcode);\r\n return decodedURL;\r\n}\r\n\r\n\r\nexport default function Page_redirector(props: any) {\r\n let urlcode = props.match.params.urlcode;\r\n\r\n useEffect(() => {\r\n onload();\r\n });\r\n\r\n const onload = async () => {\r\n const redirectURL = await getdecodedURL(urlcode);\r\n\r\n\r\n if (!(redirectURL === \"\" || redirectURL === undefined)) {\r\n window.location.href = redirectURL;\r\n }\r\n }\r\n return (
)\r\n}","import { Grid, Typography } from \"@material-ui/core\";\r\nimport React from \"react\";\r\n\r\n//Update log\r\n// FB 4867 DK 12/27/2021 Added to display closure message\r\n//\r\n\r\nexport default function FinalPage(props: any) {\r\n let origin: string = props.location.state.origin;\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n {origin === \"upload\" ? \"Please close this tab to continue.\" : \"Thank you for booking an appointment with us. Have a great day!\"}\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}","import { Grid, Typography } from \"@material-ui/core\"; //FB 6163\r\nimport React, { useState, useEffect, useRef } from \"react\";\r\n\r\n// update log\r\n// FB 6036 MS 05/17/2022 Created\r\n// FB 6163 DK 09/21/2022 UI changes on video call\r\n\r\nconst Participant = (props) => {\r\n const participant = props.participant;\r\n const [videoTracks, setVideoTracks] = useState([]);\r\n const [audioTracks, setAudioTracks] = useState([]);\r\n\r\n const videoRef = useRef();\r\n const audioRef = useRef();\r\n\r\n const trackpubsToTracks = (trackMap) =>\r\n Array.from(trackMap.values())\r\n .map((publication) => publication.track)\r\n .filter((track) => track !== null);\r\n\r\n useEffect(() => {\r\n setVideoTracks(trackpubsToTracks(participant.videoTracks));\r\n setAudioTracks(trackpubsToTracks(participant.audioTracks));\r\n\r\n const trackSubscribed = (track) => {\r\n if (track.kind === \"video\") {\r\n setVideoTracks((videoTracks) => [...videoTracks, track]);\r\n } else if (track.kind === \"audio\") {\r\n setAudioTracks((audioTracks) => [...audioTracks, track]);\r\n }\r\n };\r\n\r\n const trackUnsubscribed = (track) => {\r\n if (track.kind === \"video\") {\r\n setVideoTracks((videoTracks) => videoTracks.filter((v) => v !== track));\r\n } else if (track.kind === \"audio\") {\r\n setAudioTracks((audioTracks) => audioTracks.filter((a) => a !== track));\r\n }\r\n };\r\n\r\n participant.on(\"trackSubscribed\", trackSubscribed);\r\n participant.on(\"trackUnsubscribed\", trackUnsubscribed);\r\n\r\n return () => {\r\n setVideoTracks([]);\r\n setAudioTracks([]);\r\n participant.removeAllListeners();\r\n };\r\n }, [participant]);\r\n\r\n useEffect(() => {\r\n const videoTrack = videoTracks[0];\r\n if (videoTrack) {\r\n videoTrack.attach(videoRef.current);\r\n return () => {\r\n videoTrack.detach();\r\n };\r\n }\r\n }, [videoTracks]);\r\n\r\n useEffect(() => {\r\n const audioTrack = audioTracks[0];\r\n if (audioTrack) {\r\n audioTrack.attach(audioRef.current);\r\n return () => {\r\n audioTrack.detach();\r\n };\r\n }\r\n }, [audioTracks]);\r\n\r\n return (\r\n // FB 6163 - Start\r\n \r\n \r\n {participant.identity}\r\n \r\n \r\n \r\n \r\n // FB 6163 - End\r\n );\r\n};\r\n\r\nexport default Participant;\r\n","import { Grid, IconButton, Typography, Paper, GridList, GridListTile, GridListTileBar, ListSubheader } from \"@material-ui/core\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport Participant from \"./participant\";\r\nimport VideocamIcon from \"@material-ui/icons/Videocam\";\r\nimport VideocamOffIcon from \"@material-ui/icons/VideocamOff\";\r\nimport MicIcon from '@material-ui/icons/Mic';\r\nimport MicOffIcon from '@material-ui/icons/MicOff';\r\nimport CallIcon from '@material-ui/icons/Call';\r\n\r\n// update log\r\n// FB 6036 MS 05/17/2022 Created\r\n// FB 6163 DK 09/21/2022 UI changes on video call\r\n\r\nconst Room = ({ roomName, identity, room, handleLogout }) => {\r\n const [participants, setParticipants] = useState([]);\r\n const waitingRoom = document.getElementById(\"waiting-room\");\r\n\r\n useEffect(() => {\r\n const participantConnected = (participant) => {\r\n setParticipants((prevParticipants) => [...prevParticipants, participant]);\r\n };\r\n\r\n const participantDisconnected = (participant) => {\r\n setParticipants((prevParticipants) =>\r\n prevParticipants.filter((p) => p !== participant)\r\n );\r\n };\r\n\r\n room.on(\"participantConnected\", participantConnected);\r\n room.on(\"participantDisconnected\", participantDisconnected);\r\n room.participants.forEach(participantConnected);\r\n return () => {\r\n room.off(\"participantConnected\", participantConnected);\r\n room.off(\"participantDisconnected\", participantDisconnected);\r\n };\r\n }, [room]);\r\n\r\n const remoteParticipants = participants.map((participant) => (\r\n waitingRoom.style.display = room.localParticipant.identity || participant.identity == \"provider\" ? \"none\" : \"\",\r\n // FB 6163\r\n \r\n ));\r\n\r\n function handleMuteUnmute() {\r\n const muteAudio = document.getElementById(\"muteAudio\");\r\n const unmuteAudio = document.getElementById(\"unmuteAudio\");\r\n muteAudio.style.display = (\r\n muteAudio.style.display == \"none\" ? \"block\" : \"none\");\r\n unmuteAudio.style.display = (\r\n unmuteAudio.style.display == \"none\" ? \"block\" : \"none\");\r\n room.localParticipant.audioTracks.forEach(track => {\r\n if (muteAudio.style.display == \"none\")\r\n track.track.disable();\r\n else\r\n track.track.enable();\r\n });\r\n }\r\n\r\n function handleShowHide() {\r\n const showCam = document.getElementById(\"showCam\");\r\n const hideCam = document.getElementById(\"hideCam\");\r\n showCam.style.display = (\r\n showCam.style.display == \"none\" ? \"block\" : \"none\");\r\n hideCam.style.display = (\r\n hideCam.style.display == \"none\" ? \"block\" : \"none\");\r\n room.localParticipant.videoTracks.forEach(track => {\r\n if (showCam.style.display == \"none\")\r\n track.track.disable();\r\n else\r\n track.track.enable();\r\n });\r\n }\r\n\r\n return (\r\n // FB 6163 - Start\r\n \r\n \r\n {remoteParticipants}\r\n \r\n \r\n {\r\n room ? (\r\n room.localParticipant.identity != \"provider\" ? (\r\n
\r\n
\r\n

Thanks! Your provider will be with you shortly.

\r\n
\r\n \r\n
\r\n ) : (\r\n
\r\n
\r\n

Thanks! Your provider will be with you shortly.

\r\n
\r\n \r\n
\r\n )\r\n ) :\r\n (\r\n <>\r\n \r\n )\r\n }\r\n
\r\n \r\n \r\n handleMuteUnmute()\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n handleShowHide()\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n handleLogout()\r\n }\r\n >\r\n \r\n \r\n \r\n
\r\n // FB 6163 - End\r\n );\r\n};\r\n\r\nexport default Room;\r\n","import React, { useState, useCallback, useEffect } from \"react\";\r\nimport Video from \"twilio-video\";\r\nimport Room from \"./room\";\r\nimport { getTwilioToken } from \"../appointments/create/api\";\r\nimport { updateTelePatientDetails } from \"../appointments/create/api/index\";\r\n\r\n// update log\r\n// FB 6036 MS 05/17/2022 Created\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n\r\nconst VideoChat = (props) => {\r\n const [room, setRoom] = useState(null);\r\n const [connecting, setConnecting] = useState(false);\r\n\r\n const username = props.match.params.patient;\r\n const roomName = props.match.params.room;\r\n\r\n useEffect(() => {\r\n async function getToken() {\r\n const response = await getTwilioToken(username, roomName);\r\n Video.connect(response, {\r\n name: roomName,\r\n })\r\n .then((room) => {\r\n setConnecting(false);\r\n setRoom(room);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n setConnecting(false);\r\n });\r\n }\r\n\r\n getToken();\r\n }, []);\r\n\r\n\r\n const handleLogout = useCallback(() => {\r\n setRoom((prevRoom) => {\r\n if (prevRoom) {\r\n prevRoom.localParticipant.tracks.forEach((trackPub) => {\r\n trackPub.track.stop();\r\n });\r\n prevRoom.disconnect();\r\n updateTelePatientDetails(0, roomName);\r\n }\r\n return null;\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (room) {\r\n const tidyUp = (event) => {\r\n if (event.persisted) {\r\n return;\r\n }\r\n if (room) {\r\n handleLogout();\r\n }\r\n };\r\n window.addEventListener(\"pagehide\", tidyUp);\r\n window.addEventListener(\"beforeunload\", tidyUp);\r\n return () => {\r\n window.removeEventListener(\"pagehide\", tidyUp);\r\n window.removeEventListener(\"beforeunload\", tidyUp);\r\n };\r\n }\r\n }, [room, handleLogout]);\r\n\r\n const scrollTo = (ref) => {\r\n if (ref) {\r\n ref.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\r\n }\r\n };\r\n\r\n let render;\r\n if (room) {\r\n render = (\r\n \r\n \r\n \r\n );\r\n } else {\r\n render = (\r\n
\r\n );\r\n }\r\n return render;\r\n};\r\n//FB-6264\r\nexport default VideoChat;\r\n","import React, { Fragment, useState } from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport Camera from './Camera';\r\nimport { InputFile } from \"../appointments/create/store\";\r\nimport { UploadImages } from \"../appointments/create/api\";\r\nimport { useEffect } from 'react';\r\nimport { Button, Grid, Typography } from '@material-ui/core';\r\n\r\n//Update log\r\n// FB 6039 DK 06/28/2022 Added for QR code scanning functionality\r\n// FB 6347 GS 12/23/2022 removed max height and added padding to increase the QR code picture capturing screen size\r\n// FB 6963 AS 06/09/2023 better error/success handling; renamed some fields for clarity\r\n// FB 7264 DK 08/28/2023 Need an Admin Setting to Specify The Resolution of QR Camera Images\r\n\r\nexport default function Capturephotos(props: any) {\r\n\r\n const [inputList, setInputList] = useState([]);\r\n const [base64Img, setBase64Img] = useState(\"\");\r\n const [capturedImage, setCapturedImage] = useState(\"\");\r\n const [successMessage, setSuccessMessage] = useState(\"\"); //FB 6963\r\n const [errorMessage, setErrorMessage] = useState(\"\"); //FB 6963\r\n\r\n useEffect(() => {\r\n async function upload() {\r\n if (base64Img != \"\") {\r\n var session_n = props.match.params.session_n; \t\t//FB 6963 renamed for clarity\r\n var control_name = props.match.params.control_name;\t\t//FB 6963 renamed for clarity\r\n var licenceName = props.match.params.LicenceName;\r\n var token = props.match.params.tokenId;\r\n var currentdate = new Date();\r\n const input = {\r\n SESSION_N: session_n,\t\t//FB 6963 renamed for clarity\r\n ImageId: Math.floor(new Date().getTime() / 1000),\r\n CONTROL_NAME: control_name,\t\t//FB 6963 renamed for clarity\r\n Image: base64Img\r\n } as InputFile;\r\n try {\r\n const result = await UploadImages(input, token.slice(1, -1));\r\n\r\n setSuccessMessage(\"File uploaded successfully!\"); // FB 6963 display success message on the page instead of alert\r\n\r\n } catch (err) {\r\n setErrorMessage(`There was an error while uploading the file(s): ${(err as Error).message}`); // FB 6963 display error message\r\n }\r\n\r\n }\r\n\r\n }\r\n setSuccessMessage(\"\"); //FB 6963 reset\r\n setErrorMessage(\"\"); //FB 6963 reset\r\n upload();\r\n }, [base64Img]);\r\n\r\n const uploadImage = async (file: any) => {\r\n const formData = new FormData();\r\n formData.append(\"file\", file);\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n Capture image from your camera!!\r\n \r\n
\r\n
\r\n \r\n {/* FB 6963 added success and error messages */}\r\n \r\n
\r\n
\r\n );\r\n}\r\n","import { useEffect, useState, useContext } from \"react\";\r\nimport React from 'react';\r\nimport Dialog from \"@material-ui/core/Dialog\";\r\nimport DialogActions from \"@material-ui/core/DialogActions\";\r\nimport DialogContent from \"@material-ui/core/DialogContent\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport globalsettings from \"../../../config\";\r\nimport { useHistory } from \"react-router-dom\";\r\n\r\nimport { createStyles, WithStyles, createMuiTheme } from \"@material-ui/core/styles\";\r\nimport {\r\n create_appointment,\r\n create_patient,\r\n remove_reg,\r\n} from \"../actions/index\";\r\nimport {\r\n GetPaymentToken,\r\n GetStates,\r\n postIframedata,\r\n SaveCard,\r\n\r\n} from \"../api\";\r\nimport {\r\n InsertPELogs,\r\n} from \"../api/index\";\r\nimport { Context, CreditCardPaymentModel, State } from \"../store\";\r\nimport {\r\n ListItem,\r\n ListItemIcon,\r\n IconButton,\r\n ListItemText,\r\n Typography,\r\n CircularProgress,\r\n TextField,\r\n Grid,\r\n Box,\r\n Checkbox,\r\n FormControl,\r\n InputLabel,\r\n Select,\r\n MenuItem,\r\n NativeSelect,\r\n} from \"@material-ui/core\";\r\nimport { makeStyles, Theme } from \"@material-ui/core\";\r\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\r\n\r\n// Update log\r\n// FB 7719 02/14/2024 SK PE- option to add credit card on file while booking an appointment\r\n\r\n\r\nconst styless = (theme: Theme) =>\r\n createStyles({\r\n root: {\r\n margin: 0,\r\n padding: theme.spacing(2),\r\n },\r\n closeButton: {\r\n position: \"absolute\",\r\n right: theme.spacing(1),\r\n top: theme.spacing(1),\r\n color: theme.palette.grey[500],\r\n },\r\n });\r\n\r\n\r\nexport interface DialogTitleProps extends WithStyles {\r\n id: string;\r\n children: React.ReactNode;\r\n onClose: () => void;\r\n}\r\n\r\n\r\nexport default function MakePayment() {\r\n\r\n const matches = useMediaQuery(\"(min-width:600px)\");\r\n\r\n const [states, setStates] = useState();\r\n const [statename, setStatename] = useState(\"\");\r\n\r\n\r\n const useStyles = makeStyles({\r\n active: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n marginLeft: \"20px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n },\r\n buttonactive: {\r\n backgroundColor: \"#18a2b8\",\r\n color: \"white\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n \"&:hover\": {\r\n backgroundColor: \"#18a2b8\",\r\n },\r\n width: \"160px\",\r\n },\r\n inactive: {\r\n backgroundColor: \"white\",\r\n color: \"#18a2b8\",\r\n textTransform: \"capitalize\",\r\n borderRadius: \"15px\",\r\n },\r\n buttonMargin: {\r\n marginLeft: \"100px\",\r\n },\r\n datepickerroot: {\r\n \"&.MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n },\r\n dropdown_nomargin: {\r\n \"&.MuiFormControl-marginNormal\": {\r\n color: \"#18a2b8\",\r\n },\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"2rem\"\r\n }\r\n },\r\n iconCSS: {\r\n \"& .MuiSvgIcon-root\": {\r\n fontSize: \"1.8rem\"\r\n },\r\n \"& .MuiIconButton-root\": {\r\n color: \"#18a2b8\",\r\n },\r\n }\r\n });\r\n\r\n const theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#18a2b8\",\r\n },\r\n },\r\n });\r\n\r\n const classes = useStyles();\r\n\r\n const handleGoBack = () => {\r\n sessionStorage.setItem(\"BackFromCreditCardScreen\", \"True\");\r\n remove_reg(state.slotDetails.id);\r\n InsertPELogs(globalsettings.clientIp, \"Clicked on Go Back - Demographics\");\r\n history.goBack();\r\n };\r\n\r\n\r\n\r\n const history = useHistory();\r\n const [viewIframe, setViewIframe] = useState(true);\r\n const JSAlert = require(\"js-alert\");\r\n\r\n const styletwo = {\r\n container: {\r\n paddingLeft: matches == false ? \"16px\" : \"80px\",\r\n paddingTop: \"40px\",\r\n paddingBottom: \"40px\",\r\n },\r\n };\r\n const stylestart = {\r\n container: {\r\n border: \"1px grey\",\r\n paddingLeft: matches == false ? \"0px\" : \"55px\",\r\n\r\n paddingTop: \"10px\",\r\n backgroundColor: \"#F8F8F8\",\r\n },\r\n };\r\n const [PaymentUrl, setPaymentUrl] = useState(\"\");\r\n const [sessionId, setSessionId] = useState(\"\");\r\n const [checked, setChecked] = useState(false);\r\n const [patientID, setPatientID] = useState(\"\");\r\n const [emrId, setEmrId] = useState(0);\r\n const [card, setCardOpen] = useState(false);\r\n const [paymentToken, setPaymentToken] = useState(\"\");\r\n const [open, setOpen] = useState(false);\r\n const { state, dispatch } = useContext(Context);\r\n\r\n const [paymentButton, setPaymentButton] = useState(true);\r\n const [patientCC, setPatientCC] = useState({} as CreditCardPaymentModel);\r\n const [saveCardModel, setSaveCardModel] = useState(true);\r\n\r\n const handleChange = async (event: { target: { checked: any } }) => {\r\n if (event.target.checked) {\r\n const patObjString = sessionStorage.getItem(\"patObj\");\r\n if (patObjString !== null) {\r\n var patObj = JSON.parse(patObjString);\r\n const values = patObj.PATIENT_CITY_STATE_ZIP.split(', ');\r\n\r\n const [city, stateZip] = values;\r\n\r\n const [state, zip] = stateZip.split(' ');\r\n\r\n setStatename(state);\r\n setPatientCC({\r\n ...patientCC,\r\n firstNameOnCard: patObj.PATIENT_FIRST_NAME,\r\n lastNameOnCard: patObj.PATIENT_LAST_NAME,\r\n address: patObj.PATIENT_ADDRESS,\r\n address2: patObj.PATIENT_ADDRESS2,\r\n city: city,\r\n state: state,\r\n zip: zip,\r\n phone: patObj.PATIENT_CELL_PHONE,\r\n email: patObj.PATIENT_EMAIL,\r\n month: patientCC.month,\r\n year: patientCC.year,\r\n CNP: patientCC.CNP,\r\n });\r\n }\r\n }\r\n else {\r\n setStatename(\"\");\r\n setPatientCC({\r\n ...patientCC,\r\n firstNameOnCard: \"\",\r\n lastNameOnCard: \"\",\r\n address: \"\",\r\n address2: \"\",\r\n city: \"\",\r\n state: \"\",\r\n zip: \"\",\r\n phone: \"\",\r\n email: \"\",\r\n });\r\n }\r\n };\r\n\r\n const handleInputChange = (e: any) => {\r\n if (e.target.name == \"PaymentAmount\") {\r\n if (e.target.value > 9999.99) {\r\n return false;\r\n }\r\n let match = /(\\d{0,4})[^.]*((?:\\.\\d{0,2})?)/g.exec(\r\n e.target.value.replace(/[^\\d.]/g, \"\")\r\n );\r\n if (\r\n match != null &&\r\n e.target.value > 0 &&\r\n e.target.value != \"\" &&\r\n e.target.value <= 9999.99\r\n ) {\r\n setPatientCC({ ...patientCC, [\"PaymentAmount\"]: match[1] + match[2] });\r\n setPaymentButton(false);\r\n } else {\r\n setPatientCC({ ...patientCC, [\"PaymentAmount\"]: e.target.value });\r\n setPaymentButton(true);\r\n }\r\n } else {\r\n setPatientCC({ ...patientCC, [e.target.name]: e.target.value });\r\n if(e.target.name == \"state\"){\r\n setStatename(e.target.value);\r\n }\r\n }\r\n };\r\n\r\n const handleClickOpen = async () => {\r\n if (!validation()) {\r\n return;\r\n }\r\n var patObjString = sessionStorage.getItem(\"patObj\");\r\n\r\n if (patObjString !== null) {\r\n var patObj = JSON.parse(patObjString);\r\n } else {\r\n var patObj: any = 0;\r\n }\r\n\r\n var apptObjString = sessionStorage.getItem(\"appObj\");\r\n\r\n if (apptObjString !== null) {\r\n var appObj = JSON.parse(apptObjString);\r\n } else {\r\n var appObj: any = 0;\r\n }\r\n let patient_ID;\r\n if (appObj.PATIENT_N > 0) {\r\n patient_ID = appObj.PATIENT_N;\r\n result = await create_appointment(appObj);\r\n state.patient.name = patObj.PATIENT_FIRST_NAME;\r\n state.patient.appointment_n = result;\r\n if (saveCardModel == true) {\r\n if (\r\n patientCC.CARD_NAME == null ||\r\n patientCC.CARD_NAME == undefined ||\r\n patientCC.CARD_NAME == \"\"\r\n ) {\r\n JSAlert.alert(\"Please enter Card Name\", null, JSAlert.Icons.Warning);\r\n } else {\r\n const saveCardData: CreditCardPaymentModel = {\r\n firstNameOnCard: patientCC.firstNameOnCard,\r\n lastNameOnCard: patientCC.lastNameOnCard,\r\n PaymentToken: paymentToken,\r\n ValidateOrAcceptPayment: \"A\",\r\n ExpirationDate: patientCC.month + patientCC.year,\r\n CNP: patientCC.CNP,\r\n PaymentAmount: 0,\r\n address: patientCC.address,\r\n address2: patientCC.address2,\r\n city: patientCC.city,\r\n state: patientCC.state,\r\n month: patientCC.month,\r\n year: patientCC.year,\r\n zip: patientCC.zip,\r\n phone: patientCC.phone,\r\n email: state.patientDemographics.email,\r\n Memo: \"\",\r\n Memo2: \"\",\r\n FeeAmount: \"\",\r\n Patient_N: appObj.PATIENT_N,\r\n SAVE_CARD: 1,\r\n CARD_NAME: patientCC.CARD_NAME,\r\n EMPLOYEE_N: 0,\r\n COMMENT: \"\",\r\n IS_PORTAL_PAYMENT: 0,\r\n };\r\n\r\n await SaveCard(saveCardData)\r\n }\r\n }\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n else {\r\n var result = await create_patient(patObj, appObj, state.slotDetails.id);\r\n let patientN = sessionStorage.getItem('patient_n') || '' as \"\";\r\n if (patientN != null) {\r\n patient_ID = patientN;\r\n }\r\n if (saveCardModel == true) {\r\n if (\r\n patientCC.CARD_NAME == null ||\r\n patientCC.CARD_NAME == undefined ||\r\n patientCC.CARD_NAME == \"\"\r\n ) {\r\n JSAlert.alert(\"Please enter Card Name\", null, JSAlert.Icons.Warning);\r\n } else {\r\n const values = patObj.PATIENT_CITY_STATE_ZIP.split(', ');\r\n const saveCardData: CreditCardPaymentModel = {\r\n firstNameOnCard: patientCC.firstNameOnCard,\r\n lastNameOnCard: patientCC.lastNameOnCard,\r\n PaymentToken: paymentToken,\r\n ValidateOrAcceptPayment: \"A\",\r\n ExpirationDate: patientCC.month + patientCC.year,\r\n CNP: patientCC.CNP,\r\n PaymentAmount: 0,\r\n address: patientCC.address,\r\n address2: patientCC.address2,\r\n city: patientCC.city,\r\n state: patientCC.state,\r\n month: patientCC.month,\r\n year: patientCC.year,\r\n zip: patientCC.zip,\r\n phone: patientCC.phone,\r\n email: state.patientDemographics.email,\r\n Memo: \"\",\r\n Memo2: \"\",\r\n FeeAmount: \"\",\r\n Patient_N: appObj.PATIENT_N,\r\n SAVE_CARD: 1,\r\n CARD_NAME: patientCC.CARD_NAME,\r\n EMPLOYEE_N: 0,\r\n COMMENT: \"\",\r\n IS_PORTAL_PAYMENT: 0,\r\n };\r\n\r\n await SaveCard(saveCardData)\r\n }\r\n }\r\n history.push(\"/confirmationPage\", state);\r\n }\r\n };\r\n\r\n function validation() {\r\n const remonth = /^(0[1-9]|1[012])$/;\r\n const re = /^[0-9]{5}\\-[0-9]{4}$/;\r\n const rea = /^[0-9]{5}$/;\r\n const reb = /^[0-9]{9}$/;\r\n const reyear = /^(?!00)[0-9]{2}$/;\r\n let isValidZip =\r\n re.test(patientCC.zip) ||\r\n reb.test(patientCC.zip) ||\r\n rea.test(patientCC.zip);\r\n const currentYearLastTwoDigits = new Date().getFullYear().toString().slice(-2);\r\n if (saveCardModel == true) {\r\n if (\r\n patientCC.CARD_NAME == null ||\r\n patientCC.CARD_NAME == undefined ||\r\n patientCC.CARD_NAME == \"\"\r\n ) {\r\n JSAlert.alert(\"Please enter Card Name\", null, JSAlert.Icons.Warning);\r\n return false;\r\n }\r\n }\r\n\r\n if (remonth.test(patientCC.month) == false) {\r\n JSAlert.alert(\r\n \"Please enter valid month.\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n } else if (patientCC.year < currentYearLastTwoDigits || patientCC.year == null ||\r\n patientCC.year == undefined ||\r\n !/^\\d+$/.test(patientCC.year) ||\r\n patientCC.year == \"\") {\r\n JSAlert.alert(\r\n \"Please enter valid year\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n else if (patientCC.CNP == \"null\" || patientCC.CNP?.length < 3 || patientCC.CNP?.length > 4 || patientCC.CNP == undefined) {\r\n JSAlert.alert(\r\n \"Please enter 3-4 digits CVC number.\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n else if (\r\n patientCC.firstNameOnCard == null ||\r\n patientCC.firstNameOnCard == undefined ||\r\n patientCC.firstNameOnCard == \"\"\r\n ) {\r\n JSAlert.alert(\r\n \"Please Enter Valid First Name.\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n else if (\r\n patientCC.address == null ||\r\n patientCC.address == undefined ||\r\n patientCC.address == \"\"\r\n ) {\r\n JSAlert.alert(\r\n \"Please Enter Valid Address.\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n else if (\r\n patientCC.city == null ||\r\n patientCC.city == undefined ||\r\n patientCC.city == \"\"\r\n ) {\r\n JSAlert.alert(\r\n \"Please Enter Valid City.\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n else if (\r\n statename == null ||\r\n statename == undefined ||\r\n statename == \"\" ||\r\n statename == \"0\"\r\n ) {\r\n JSAlert.alert(\r\n \"Please Choose State.\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n\r\n else if (\r\n patientCC.phone == null ||\r\n patientCC.phone == undefined ||\r\n patientCC.phone == \"\" ||\r\n patientCC.phone.length == 0 ||\r\n patientCC.phone.length < 10\r\n ) {\r\n JSAlert.alert(\r\n \"Please Enter Valid Cell Phone Number (must contain 10 numerics).\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n else if (!isValidZip) {\r\n JSAlert.alert(\r\n \"Zip code must be 5 or 9 digits or xxxxx-yyyyy\",\r\n null,\r\n JSAlert.Icons.Warning\r\n );\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n const handleClose = () => {\r\n setOpen(false);\r\n setCardOpen(false);\r\n setChecked(false);\r\n setViewIframe(true);\r\n setIframe({\r\n index: iframe.index + 1,\r\n });\r\n setPaymentUrl(\"\");\r\n setIsDisabled(true);\r\n setSessionId(\"\");\r\n setPaymentToken(\"\");\r\n handleIframeDetails();\r\n };\r\n const [isDisabled, setIsDisabled] = useState(true);\r\n const [showSpinner, setShowSpinner] = useState(false);\r\n\r\n\r\n let patientName = \"User\";\r\n let userName: any;\r\n let EMRID: any;\r\n let data = sessionStorage.getItem(\"user\");\r\n if (data != null) {\r\n patientName = JSON.parse(data).PatientFirstName;\r\n userName = JSON.parse(data).Login;\r\n EMRID = JSON.parse(data).EMRID;\r\n }\r\n\r\n async function handleIframeDetails() {\r\n\r\n setShowSpinner(true);\r\n var data = await postIframedata();\r\n if (data != null) {\r\n setPaymentUrl(data.PaymentURL);\r\n setSessionId(data.SessionID);\r\n setTimeout(() => {\r\n setShowSpinner(false);\r\n }, 10000);\r\n } else {\r\n window.location.reload();\r\n }\r\n let valueFromSessionStorage = sessionStorage.getItem(\"PayingAmount\");\r\n if (valueFromSessionStorage) {\r\n let numberValue = parseFloat(valueFromSessionStorage);\r\n setPaymentButton(false);\r\n }\r\n let totalFromSessionStorage = sessionStorage.getItem(\"Total\");\r\n if (totalFromSessionStorage) {\r\n setTotal(totalFromSessionStorage);\r\n }\r\n }\r\n\r\n async function getDetails() {\r\n var data = sessionStorage.getItem(\"user\");\r\n if (data != null) {\r\n const user = JSON.parse(data);\r\n if (user.Patient_n != null) {\r\n setEmrId(user.EMRID);\r\n setPatientID(user.Patient_n);\r\n }\r\n }\r\n }\r\n\r\n const [iframe, setIframe] = useState({ index: 0 });\r\n\r\n async function handleChangeCard() {\r\n setIframe({\r\n index: iframe.index + 1,\r\n });\r\n setPaymentUrl(\"\");\r\n setIsDisabled(true);\r\n setSessionId(\"\");\r\n setPaymentToken(\"\");\r\n handleIframeDetails();\r\n }\r\n async function getStates() {\r\n var data = await GetStates();\r\n setStates(data);\r\n }\r\n useEffect(() => {\r\n handleIframeDetails();\r\n getDetails();\r\n getStates();\r\n }, []);\r\n const Redirect = () => {\r\n window.location.reload();\r\n };\r\n const [ReloadPopUp, setReloadPopup] = useState(false);\r\n\r\n async function iframeVerification() {\r\n if (paymentToken == \"\") {\r\n if (sessionId != \"\") {\r\n if (paymentToken == \"\") {\r\n var data = await GetPaymentToken(sessionId);\r\n if (data != null) {\r\n setPaymentToken(data);\r\n setIsDisabled(false);\r\n }\r\n }\r\n }\r\n }\r\n var res = document.getElementById(\"iframe\");\r\n }\r\n\r\n const [total, setTotal] = useState(\"\");\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Add Credit Card\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n Change Card Number\r\n
\r\n
\r\n
\r\n \r\n {matches &&
}\r\n {saveCardModel && (\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n

\r\n *Expiration Date{\" \"}\r\n \r\n  \r\n \r\n

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

\r\n *CVC{\" \"}\r\n \r\n

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

\r\n {\" \"}\r\n Same As 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 State *\r\n \r\n \r\n \r\n {states?.map((state: State) => (\r\n \r\n ))}\r\n \r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Book Appointment\r\n \r\n\r\n \r\n \r\n Go Back\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n

\r\n \r\n {matches &&

}\r\n \r\n Pay\r\n \r\n    \r\n \r\n Cancel\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n Please refresh this page to make payment!\r\n
\r\n

\r\n \r\n \r\n Ok\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nconst button = {\r\n container: {\r\n marginTop: \"10px\",\r\n width: \"75px\",\r\n color: \"#13607C\",\r\n backgroundColor: \"#F5F5F7\",\r\n borderColor: \"#13607C\",\r\n },\r\n};\r\n\r\nconst text = {\r\n container: {\r\n height: \"35px\",\r\n },\r\n};\r\n\r\nconst select1 = {\r\n container: {\r\n height: \"35px\",\r\n width: \"595px\",\r\n borderRadius: \"1px\",\r\n },\r\n};\r\n\r\nconst cards = {\r\n container: {},\r\n};\r\n","import { Button } from '@material-ui/core';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { useHistory } from 'react-router-dom'; \r\nimport useStyles from './appointments/create/css/styles';\r\n\r\n// Update log\r\n// FB 8259 SK 02/27/2024 After booking appt with card details when user click back button needs to be handled\r\n\r\nexport default function LoggedOutMessage() {\r\n const [peURL, setPEURL] = useState(\"\");\r\n const history = useHistory();\r\n const handleClick = () => {\r\n if (peURL) {\r\n window.open(peURL, '_blank');\r\n }\r\n };\r\n useEffect(() => {\r\n let data=sessionStorage.getItem(\"URL\");\r\n if (data !=null){\r\n setPEURL(data);\r\n }\r\n });\r\n const styles = useStyles();\r\n return (\r\n
\r\n

You are logged out. Please click Book Appointment to continue.

\r\n \r\n Book Appointment\r\n \r\n
\r\n );\r\n};\r\n","import React, { useReducer, useEffect } from \"react\"; // FB 4533\r\nimport { AppBar, Toolbar, Typography, Card } from \"@material-ui/core\";\r\nimport StartPage from \"./appointments/create/index\";\r\nimport Demographics from \"./appointments/create/components/Demographics\";\r\n//FB 4553 DK - Moved logo to config.js\r\nimport { BrowserRouter, Route, Switch } from \"react-router-dom\";\r\nimport SlotsPage from \"./appointments/create/inoffice/slots_byprovider\";\r\nimport LocationSlotsPage from \"./appointments/create/inoffice/slots_bylocation\";\r\nimport DateSlotsPage from \"./appointments/create/inoffice/slots_bydate\";\r\nimport Confirmation from \"./appointments/create/confirmationPage\";\r\nimport Reviews from \"./components/reviews\";\r\nimport {\r\n Context,\r\n initialState,\r\n Store,\r\n} from \"./appointments/create/store/index\";\r\nimport reducer from \"./appointments/create/store/reducer\";\r\nimport useStyles from \"./appointments/create/css/styles\";\r\nimport Thankyou from \"./components/Thankyou\";\r\nimport Configurations from \"./config\"; //FB 4472 DK - Added to import configurations from config.js.sample\r\nimport { TrackJS } from 'trackjs'; //FB 4553 DK - Added import for track.js\r\nimport apptConfirmation from \"./components/Appointmentconfirm\";\t//FB 4660 BR PE - Appointment confirmation url\r\nimport parkinglotConfirmation from \"./components/Parkinglotconfirm\"; //FB 4661 BR PE - ParkingLot confirmation url\r\nimport page_redirector from \"./appointments/create/page_redirector\"; //FB 4763 DK - Added reference to page\r\nimport ReactGA from 'react-ga'; //FB 4533 : BR GA tags for patient engagement\r\n//FB 4867 DK - Added references for pages\r\nimport UploadPage from \"./appointments/create/upload\";\r\nimport PatientVerificationPage from \"./components/Verification\";\r\nimport LandingPage from \"./components/Landingpage\";\r\nimport Finalpage from \"./components/Finalpage\";\r\nimport globalsettings from \"./config\"; //FB 4960\r\nimport Video from \"./twilio/videoChat\";\t//FB 6036\r\nimport Importphotos from \"./components/Importphotos\"; //FB 6025\r\nimport Capturephotos from \"./components/Capturephotos\"; //FB 6025\r\nimport Upload from \"./components/Upload\";\t//FB 6039\r\nimport moment from \"moment-timezone\"; //FB 7675\r\nimport { GetAdminSettingValue } from \"./appointments/create/api\"; //FB 7917\r\nimport addCC from \"./appointments/create/components/addCC\";//FB 7719\r\nimport LoggedOutMessage from \"./logout\";//FB 8259\r\n\r\n\r\n// update log\r\n// FB 4371 DK 03/29/2021 Master page where the routing is defined and implemented\r\n// FB 4472 DK 05/31/2021 Logo moved to public->images folder and made as part of config.js\r\n// FB 4498 BR 06/10/2021 Review email for note creation\r\n// FB 4553 DK 07/05/2021 Implementing track.js\r\n// FB 4653 BR 08/23/2021 PE - Text message changed in review emails\r\n// FB 4660 BR 08/30/2021 PE - Appointment confirmation url\r\n// FB 4661 BR 08/30/2021 PE - ParkingLot confirmation url\r\n// FB 4735 DK 10/11/2021 Implementation of provider specific workflow\r\n// FB 4763 DK 10/21/2021 Added new path to redirect short url's\r\n// FB 4533 BR 07/01/2021 GA tags for patient engagement\r\n// FB 4867 DK 12/27/2021 Added screens for Support files upload and Health forms\r\n// FB 4960 BR 03/11/2022 Logging all actions on PE\r\n// FB 6036 MS 05/17/2022 Telehealth\r\n// FB 6025 BR 04/26/2022 PE - Import Photos through QR code scan from smartphone\r\n// FB 6039 DK 06/28/2022 QR code changes\r\n// FB 6109 DK 08/24/2022 Consent form integration changes\r\n// FB 6140 DK 09/19/2022 Removed comment from Header\r\n// FB 6264 DK 11/22/2022 Migrate PE API,DB to EMR\r\n// FB 6963 AS\t\t 06/09/2023 Renamed vars for clarity\r\n// FB 7675 DK 11/09/2023 Timezone handling for appointments\r\n// FB 7917 DK 12/15/2023 Timezone handling with admin setting\r\n// FB 7719 SK 02/13/2024 PE- option to add credit card on file while booking an appointment\r\n// FB 8259 SK 02/28/2024 After booking appt with card details when user click back button needs to be handled\r\n// FB 8290 MS 04/29/2024 Get practice logo from EMR\r\n// FB 8680 DK 05/21/2024 Practice phone related changes\r\n\r\n\r\n//FB 4533 : BR-Start GA tags for patient engagement\r\nfunction usePageViews() {\r\n useEffect(\r\n () => {\r\n ReactGA.initialize(Configurations.trackingID);\r\n ReactGA.pageview(window.location.pathname + window.location.search);\r\n getIpDetails(); //FB 4960\r\n GetTimeZoneflag(); //FB 7917\r\n }, []\r\n )\r\n}\r\n\r\n//FB 4960 BR Start-Logging all actions on PE\r\nexport const getIpDetails = async () => {\r\n try {\r\n const response = await fetch(\"https://api64.ipify.org?format=json\");\r\n if (response.ok) {\r\n const clientDetails = await response.json();\r\n globalsettings.clientIp = clientDetails.ip;\r\n return clientDetails.ip;\r\n } else {\r\n throw \"Error in calling getIpDetails\";\r\n }\r\n } catch (e) {\r\n const exceptionMessage = e.message || e;\r\n console.log(`Error in fetching Ip Details - ${exceptionMessage}`);\r\n return \"\";\r\n }\r\n};\r\n\r\n//FB 7917\r\nfunction GetTimeZoneflag() {\r\n let timeZoneFlag = sessionStorage.getItem(\"timeZoneFlag\");\r\n if (timeZoneFlag == null || timeZoneFlag == undefined) {\r\n GetAdminSettingValue(\"TimeZoneHandling\").then((data) => {\r\n if (data != null && data != \"\" && data != undefined) {\r\n sessionStorage.setItem(\"timeZoneFlag\", data);\r\n }\r\n })\r\n }\r\n}\r\n\r\n\r\nfunction App() {\r\n //FB 4533 : BR-Start GA tags for patient engagement\r\n usePageViews()\r\n //FB 4533 : BR- End GA tags for patient engagement\r\n const styles = useStyles();\r\n const [state, dispatch] = useReducer(reducer, initialState as Store);\r\n\r\n //FB 8680\r\n async function getDefaultPhone(){\r\n var DefaultPhone = await GetAdminSettingValue(\"Default_Sch_Appt_Number\");\r\n if(DefaultPhone!=null){\r\n sessionStorage.setItem(\"DefaultPhone\",DefaultPhone);\r\n }\r\n }\r\n\r\n //FB-6264\r\n useEffect(() => {\r\n //FB 4553 DK - installing track.js\r\n TrackJS.install({\r\n token: '281bcfb669fa4d8ebf2836dd4658ef74',\r\n enabled: window.location.hostname == \"localhost\" ? false : true,\r\n version: window.location.hostname\r\n });\r\n //FB 7675\r\n window.sessionStorage.setItem(\"TimeZone\", moment.tz.guess(true));\r\n getDefaultPhone(); //FB 8680\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {/* FB 6140 */}\r\n {window.location.pathname.includes(\"tele\") ? \"Video Conference\" : \"Book Appointment\"}\r\n \r\n \r\n \r\n \r\n \r\n {/* FB 4472 DK - Changed the src to pick image from public folder */}\r\n {/* FB 8290 MS - Changed the src to pick image from EMR folder */}\r\n \"logo\"\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/*FB 4763 DK - Added regExp to the params*/}\r\n \t{/*FB 4735 DK - Added route to provider specific flow*/}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* FB 7719*/}\r\n \r\n {/* FB 8259*/}\r\n \r\n {/* FB 4498 BR:start update reviews for sessions */}\r\n \r\n {/* FB 4498 BR:end update reviews for sessions */}\r\n {/* FB 4653 BR - PE - Text message changed in review emails */}\r\n \r\n {/* FB 4660 BR PE - Appointment confirmation url */}\r\n \r\n {/* FB 4661 BR PE - ParkingLot confirmation url */}\r\n \r\n {/* FB 4763 DK - Added path to redirect short url's */}\r\n \r\n\r\n {/* FB 4867 DK - Added screens for Support files upload and Health forms - Start*/}\r\n \r\n {/* FB 6109 */}\r\n \r\n \r\n \r\n {/* FB 4867 DK - Added screens for Support files upload and Health forms - End*/}\r\n {/*FB 6036*/}\r\n \r\n {/* FB 6025 BR - PE - Import Photos through QR code scan from smartphone - Start */}\r\n \r\n \r\n {/* FB 6025 BR - PE - Import Photos through QR code scan from smartphone - End */}\r\n {/*FB 6039*/}\r\n {/*FB 6963 Renamed vars for clarity*/}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default App;\r\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}