diff --git a/package.json b/package.json index 51bc1e30..89bc37b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ottehr", - "version": "0.16.0", + "version": "0.17.0", "private": true, "scripts": { "test": "pnpm recursive run test", diff --git a/packages/ehr-utils/package.json b/packages/ehr-utils/package.json index f1e5c6c9..275c6d23 100644 --- a/packages/ehr-utils/package.json +++ b/packages/ehr-utils/package.json @@ -1,7 +1,7 @@ { "name": "ehr-utils", "private": true, - "version": "0.16.0", + "version": "0.17.0", "main": "lib/main.ts", "types": "lib/main.ts", "scripts": { diff --git a/packages/ottehr-components/package.json b/packages/ottehr-components/package.json index 3aa5282b..091a5620 100644 --- a/packages/ottehr-components/package.json +++ b/packages/ottehr-components/package.json @@ -1,7 +1,7 @@ { "name": "ottehr-components", "private": true, - "version": "0.16.0", + "version": "0.17.0", "main": "lib/main.ts", "types": "lib/main.ts", "scripts": { diff --git a/packages/telemed-ehr/app/package.json b/packages/telemed-ehr/app/package.json index 94d6d855..d35328d8 100644 --- a/packages/telemed-ehr/app/package.json +++ b/packages/telemed-ehr/app/package.json @@ -1,6 +1,6 @@ { "name": "telemed-ehr-app", - "version": "0.16.0", + "version": "0.17.0", "private": true, "browserslist": { "production": [ diff --git a/packages/telemed-ehr/app/src/components/inputs/ProvidersSelect.tsx b/packages/telemed-ehr/app/src/components/inputs/ProvidersSelect.tsx index f342c31d..7c3402b6 100644 --- a/packages/telemed-ehr/app/src/components/inputs/ProvidersSelect.tsx +++ b/packages/telemed-ehr/app/src/components/inputs/ProvidersSelect.tsx @@ -18,6 +18,7 @@ export default function ProvidersSelect({ providers, practitioners, handleSubmit practitionerIDToName[practitioner.id] = formatHumanName(practitioner.name[0]); } }); + return ( => { try { if (!fhirClient) { @@ -58,7 +63,7 @@ export const createSampleAppointments = async ( for (let i = 0; i < 10; i++) { const visitService = appointmentTypes[i % 2]; - const randomPatientInfo = await generateRandomPatientInfo(fhirClient, visitService, phoneNumber); + const randomPatientInfo = await generateRandomPatientInfo(fhirClient, visitService, user, phoneNumber); const inputBody = JSON.stringify(randomPatientInfo); const response = await fetch(`${intakeZambdaUrl}/zambda/${createAppointmentZambdaId}/execute`, { @@ -83,6 +88,7 @@ export const createSampleAppointments = async ( const generateRandomPatientInfo = async ( fhirClient: FhirClient, visitService: 'in-person' | 'telemedicine', + user: User | undefined, phoneNumber?: string, ): Promise => { const firstNames = ['Alice', 'Bob', 'Charlie', 'Diana', 'Ethan', 'Fatima', 'Gabriel', 'Hannah', 'Ibrahim', 'Jake']; @@ -90,11 +96,14 @@ const generateRandomPatientInfo = async ( const sexes: PersonSex[] = [PersonSex.Male, PersonSex.Female, PersonSex.Intersex]; const searchParams: SearchParam[] = [{ name: 'status', value: 'active' }]; - const availableLocations: any[] = await fhirClient?.searchResources({ + + const allOffices: any[] = await fhirClient?.searchResources({ resourceType: 'Location', - searchParams: searchParams, + searchParams: [{ name: '_count', value: '1000' }], }); + const activeOffices = allOffices.filter((item) => item.status === 'active'); + const practitionersTemp: Practitioner[] = await fhirClient.searchResources({ resourceType: 'Practitioner', searchParams: [ @@ -110,11 +119,26 @@ const generateRandomPatientInfo = async ( .minus({ years: 7 + Math.floor(Math.random() * 16) }) .toISODate(); const randomSex = sexes[Math.floor(Math.random() * sexes.length)]; - const randomLocationIndex = Math.floor(Math.random() * availableLocations.length); - const randomLocationId = availableLocations[randomLocationIndex].id; + const randomLocationIndex = Math.floor(Math.random() * activeOffices.length); + const randomLocationId = activeOffices[randomLocationIndex].id; const randomProviderId = practitionersTemp[Math.floor(Math.random() * practitionersTemp.length)].id; - const selectedLocationID = localStorage.getItem('selectedLocationID'); + const selectedInPersonLocationID = localStorage.getItem('selectedLocationID'); + const selectedState = localStorage.getItem('selectedState'); + + const availableStates = + user?.profileResource && + allLicensesForPractitioner(user.profileResource).map((item) => { + return item.state; + }); + + const randomState = availableStates?.[Math.floor(Math.random() * availableStates.length)] || ''; + + const locationId = getLocationIdFromState(selectedState || randomState, allOffices); + + const isLocationActive = activeOffices.some((office) => office.id === locationId); + + const telemedLocationId = isLocationActive ? locationId : randomLocationId; if (visitService === 'telemedicine') { return { @@ -126,15 +150,16 @@ const generateRandomPatientInfo = async ( sex: randomSex, email: randomEmail, emailUser: 'Patient', + phoneNumber: phoneNumber, }, - scheduleType: 'provider', + scheduleType: 'location', visitType: 'now', visitService: visitService, providerID: randomProviderId, timezone: 'UTC', isDemo: true, phoneNumber: phoneNumber, - locationID: randomLocationId, + locationID: telemedLocationId, }; } @@ -147,6 +172,7 @@ const generateRandomPatientInfo = async ( sex: randomSex, email: randomEmail, emailUser: 'Patient', + phoneNumber: phoneNumber, }, // In fututre we might want to generate future date appointments for the patients // slot: DateTime.now() @@ -155,9 +181,14 @@ const generateRandomPatientInfo = async ( scheduleType: 'location', visitType: 'now', visitService: visitService, - locationID: selectedLocationID || randomLocationId, + locationID: selectedInPersonLocationID || randomLocationId, timezone: 'UTC', isDemo: true, phoneNumber: phoneNumber, }; }; + +const getLocationIdFromState = (state: string, allLocations: any[]): string | undefined => { + const location = allLocations.find((item) => item.address?.state === state); + return location?.id; +}; diff --git a/packages/telemed-ehr/app/src/hooks/useOttehrUser.tsx b/packages/telemed-ehr/app/src/hooks/useOttehrUser.tsx index 1cf4419b..ba6706c7 100644 --- a/packages/telemed-ehr/app/src/hooks/useOttehrUser.tsx +++ b/packages/telemed-ehr/app/src/hooks/useOttehrUser.tsx @@ -125,7 +125,6 @@ export default function useOttehrUser(): OttehrUser | undefined { if (resourceType && resourceId && resourceType === 'Practitioner') { const practitioner = await client.readResource({ resourceType, resourceId }); useOttehrUserStore.setState({ profile: practitioner }); - console.log('practitioner', practitioner); } _profileLoadingState = LoadingState.idle; } catch (e) { @@ -347,7 +346,6 @@ const useGetProfile = () => { if (resourceType && resourceId && resourceType === 'Practitioner') { const practitioner = await fhirClient?.readResource({ resourceType, resourceId }); useOttehrUserStore.setState({ profile: practitioner }); - console.log('practitioner', practitioner); } } catch (e) { console.error(`error fetching user's fhir profile: ${JSON.stringify(e)}`); diff --git a/packages/telemed-ehr/app/src/pages/Appointments.tsx b/packages/telemed-ehr/app/src/pages/Appointments.tsx index 32c614de..ae77c996 100644 --- a/packages/telemed-ehr/app/src/pages/Appointments.tsx +++ b/packages/telemed-ehr/app/src/pages/Appointments.tsx @@ -437,7 +437,7 @@ function AppointmentsBody(props: AppointmentsBodyProps): ReactElement { updateAppointments={updateAppointments} setEditingComment={setEditingComment} /> - + diff --git a/packages/telemed-ehr/app/src/telemed/features/tracking-board/CreateDemoVisits.tsx b/packages/telemed-ehr/app/src/telemed/features/tracking-board/CreateDemoVisits.tsx index 8a1b12b9..cea7e252 100644 --- a/packages/telemed-ehr/app/src/telemed/features/tracking-board/CreateDemoVisits.tsx +++ b/packages/telemed-ehr/app/src/telemed/features/tracking-board/CreateDemoVisits.tsx @@ -8,8 +8,13 @@ import { useAuth0 } from '@auth0/auth0-react'; import { otherColors } from '../../../CustomThemeProvider'; import { LoadingButton } from '@mui/lab'; import { Box } from '@mui/system'; +import useOttehrUser from '../../../hooks/useOttehrUser'; -const CreateDemoVisits = (): ReactElement => { +interface CreateDemoVisitsProps { + schedulePage?: 'telemedicine' | 'in-person'; +} + +const CreateDemoVisits = ({ schedulePage }: CreateDemoVisitsProps): ReactElement => { const [phoneNumber, setPhoneNumber] = useState(''); const [inputError, setInputError] = useState(false); const [loading, setLoading] = useState(false); @@ -24,6 +29,7 @@ const CreateDemoVisits = (): ReactElement => { }); const { fhirClient } = useApiClients(); const { getAccessTokenSilently } = useAuth0(); + const user = useOttehrUser(); const handleCreateSampleAppointments = async ( event: React.MouseEvent | React.FormEvent, @@ -40,12 +46,13 @@ const CreateDemoVisits = (): ReactElement => { setLoading(true); setInputError(false); const authToken = await getAccessTokenSilently(); - const response = await createSampleAppointments(fhirClient, authToken, formattedPhoneNumber); + const response = await createSampleAppointments(fhirClient, authToken, formattedPhoneNumber, user); setSnackbar({ open: true, message: 'Appointments created successfully!', severity: 'success', }); + return response; } catch (error) { setSnackbar({ open: true, diff --git a/packages/telemed-ehr/app/src/telemed/features/tracking-board/StateSelect.tsx b/packages/telemed-ehr/app/src/telemed/features/tracking-board/StateSelect.tsx index 9404558d..403bf8d1 100644 --- a/packages/telemed-ehr/app/src/telemed/features/tracking-board/StateSelect.tsx +++ b/packages/telemed-ehr/app/src/telemed/features/tracking-board/StateSelect.tsx @@ -9,7 +9,10 @@ export function StateSelect(): ReactElement { const { availableStates, state } = getSelectors(useTrackingBoardStore, ['availableStates', 'state']); const options = [EMPTY_STATE, ...availableStates.map((state) => ({ label: state, value: state }))]; + const randomState = availableStates[Math.floor(Math.random() * availableStates.length)]; + const handleStateChange = (_e: any, { value }: { label: string | null; value: string | null }): void => { + localStorage.setItem('selectedState', value || ''); useTrackingBoardStore.setState((prevState) => ({ ...prevState, state: value })); }; diff --git a/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardFilters.tsx b/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardFilters.tsx index a41a29c8..3bbdc83a 100644 --- a/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardFilters.tsx +++ b/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardFilters.tsx @@ -85,12 +85,10 @@ export const TrackingBoardFilters: FC<{ tab: ApptTab }> = (props) => { const useDate = tab === ApptTab.complete; const useUnsigned = tab === ApptTab['not-signed']; const handleProviderChange = (_e: any, value: string[]): void => { - console.log(10, value); setProviders(value); useTrackingBoardStore.setState({ providers: value }); }; const handleGroupChange = (_e: any, value: string[]): void => { - console.log(10, value); setGroups(value); useTrackingBoardStore.setState({ groups: value }); }; diff --git a/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTable.tsx b/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTable.tsx index cb7e9272..e7e3e60c 100644 --- a/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTable.tsx +++ b/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTable.tsx @@ -42,11 +42,11 @@ export function TrackingBoardTable({ tab }: AppointmentTableProps): ReactElement return {}; } return filteredAppointments.reduce>((accumulator, appointment) => { - if (appointment.location.locationID) { - if (!accumulator[appointment.location.locationID]) { - accumulator[appointment.location.locationID] = []; + if (appointment.location.state) { + if (!accumulator[appointment.location.state]) { + accumulator[appointment.location.state] = []; } - accumulator[appointment.location.locationID].push(appointment); + accumulator[appointment.location.state].push(appointment); return accumulator; } else if (appointment.provider) { if (!accumulator[appointment.provider.join(',')]) { diff --git a/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTabs.tsx b/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTabs.tsx index fabb750b..4219c20b 100644 --- a/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTabs.tsx +++ b/packages/telemed-ehr/app/src/telemed/features/tracking-board/TrackingBoardTabs.tsx @@ -63,7 +63,7 @@ export function TrackingBoardTabs(): ReactElement { - + ); diff --git a/packages/telemed-ehr/app/src/types/types.ts b/packages/telemed-ehr/app/src/types/types.ts index bbc1d83f..16af1f72 100644 --- a/packages/telemed-ehr/app/src/types/types.ts +++ b/packages/telemed-ehr/app/src/types/types.ts @@ -112,6 +112,8 @@ export const AllStates = [ export type StateType = (typeof AllStates extends readonly (infer TElementType)[] ? TElementType : never)['value']; +export const AllStatesValues: StateType[] = AllStates.map(({ value }) => value); + export const AllStatesToNames: { [value in StateType]: string; } = { diff --git a/packages/telemed-ehr/zambdas/package.json b/packages/telemed-ehr/zambdas/package.json index f6db2f04..b26627fe 100644 --- a/packages/telemed-ehr/zambdas/package.json +++ b/packages/telemed-ehr/zambdas/package.json @@ -1,6 +1,6 @@ { "name": "telemed-ehrzambdas", - "version": "0.16.0", + "version": "0.17.0", "private": true, "scripts": { "start": "npm run start:local", diff --git a/packages/telemed-ehr/zambdas/src/get-appointments/index.ts b/packages/telemed-ehr/zambdas/src/get-appointments/index.ts index a09bfca7..c121f855 100644 --- a/packages/telemed-ehr/zambdas/src/get-appointments/index.ts +++ b/packages/telemed-ehr/zambdas/src/get-appointments/index.ts @@ -208,9 +208,6 @@ export const index = async (input: ZambdaInput): Promise }); const [activeEncounters, searchResultsForSelectedDate] = await Promise.all([encounterSearch, appointmentSearch]); console.timeEnd('get_active_encounters + get_appointment_data'); - // console.log(searchResultsForSelectedDate); - // console.log(appointmentSearchParams); - // console.log(1, searchResultsForSelectedDate); const encounterIds: string[] = []; const tempAppointmentDates = activeEncounters @@ -419,7 +416,6 @@ export const index = async (input: ZambdaInput): Promise console.time('structure_appointment_data'); let appointments: Appointment[] = []; if (visitType?.length > 0) { - console.log(1, allAppointments.length); appointments = allAppointments?.filter((appointment) => { return visitType?.includes(appointment.appointmentType?.text || ''); }); diff --git a/packages/telemed-intake/app/package.json b/packages/telemed-intake/app/package.json index 370fe891..3c3c7252 100644 --- a/packages/telemed-intake/app/package.json +++ b/packages/telemed-intake/app/package.json @@ -1,7 +1,7 @@ { "name": "telemed-intake-app", "private": true, - "version": "0.16.0", + "version": "0.17.0", "type": "module", "scripts": { "start:local": "vite", diff --git a/packages/telemed-intake/app/src/components/CancelVisitDialog.tsx b/packages/telemed-intake/app/src/components/CancelVisitDialog.tsx index 7038ad15..7eeff1c0 100644 --- a/packages/telemed-intake/app/src/components/CancelVisitDialog.tsx +++ b/packages/telemed-intake/app/src/components/CancelVisitDialog.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; // Import useState for managing the select value +import { FC, useState } from 'react'; // Import useState for managing the select value import { Typography } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { CustomDialog, PageForm, safelyCaptureException } from 'ottehr-components'; @@ -19,6 +19,7 @@ export const CancelVisitDialog: FC = ({ onClose, appoint const { appointmentID } = getSelectors(useAppointmentStore, ['appointmentID']); const cancelAppointment = useCancelAppointmentMutation(); + const [cancelVisitErrorMessage, setCancelVisitErrorMessage] = useState(null); const onSubmit = async (data: FieldValues): Promise => { if (!appointmentID) { @@ -38,11 +39,18 @@ export const CancelVisitDialog: FC = ({ onClose, appoint }, { onSuccess: () => { + setCancelVisitErrorMessage(null); navigate(IntakeFlowPageRoute.PatientPortal.path); handleClose(); }, - onError: (error) => { - safelyCaptureException(error); + onError: (error: unknown) => { + if (error instanceof Error) { + safelyCaptureException(error); + setCancelVisitErrorMessage(error.message); + } else { + safelyCaptureException(new Error('An unknown error occurred')); + setCancelVisitErrorMessage('An unknown error occurred'); + } }, }, ); @@ -78,6 +86,11 @@ export const CancelVisitDialog: FC = ({ onClose, appoint }} onSubmit={onSubmit} /> + {cancelVisitErrorMessage && ( + + {cancelVisitErrorMessage} + + )} ); }; diff --git a/packages/telemed-intake/app/src/features/video-call/video-call.queries.ts b/packages/telemed-intake/app/src/features/video-call/video-call.queries.ts index 0a25044d..1feee572 100644 --- a/packages/telemed-intake/app/src/features/video-call/video-call.queries.ts +++ b/packages/telemed-intake/app/src/features/video-call/video-call.queries.ts @@ -6,6 +6,7 @@ import { PromiseReturnType } from 'ottehr-utils'; export const useJoinCall = ( apiClient: ZapEHRAPIClient | null, onSuccess: (data: PromiseReturnType>) => void, + setError: (err: Error) => void, // eslint-disable-next-line @typescript-eslint/explicit-function-return-type ) => { return useQuery( @@ -21,7 +22,8 @@ export const useJoinCall = ( }, { onSuccess, - onError: (err) => { + onError: (err: Error) => { + setError(err); console.error('Error during executing joinCall: ', err); }, }, diff --git a/packages/telemed-intake/app/src/pages/ReviewPaperwork.tsx b/packages/telemed-intake/app/src/pages/ReviewPaperwork.tsx index 06743f6f..9777604a 100644 --- a/packages/telemed-intake/app/src/pages/ReviewPaperwork.tsx +++ b/packages/telemed-intake/app/src/pages/ReviewPaperwork.tsx @@ -16,9 +16,9 @@ import { isPaperworkPageComplete } from '../utils/paperworkCompleted'; const ReviewPaperwork = (): JSX.Element => { const navigate = useNavigate(); - const { appointmentID, scheduleType, visitType } = getSelectors(useAppointmentStore, [ + const { appointmentID, visitService, visitType } = getSelectors(useAppointmentStore, [ 'appointmentID', - 'scheduleType', + 'visitService', 'visitType', ]); const fileURLs = useFilesStore((state) => state.fileURLs); @@ -91,7 +91,7 @@ const ReviewPaperwork = (): JSX.Element => { onSuccess: async () => { usePaperworkStore.setState({ paperworkQuestions: undefined, completedPaperwork: undefined }); useFilesStore.setState({ fileURLs: undefined }); - if (scheduleType === 'provider' && visitType === 'now') { + if (visitService === 'telemedicine' && visitType === 'now') { navigate(`${IntakeFlowPageRoute.WaitingRoom.path}?appointment_id=${appointmentID}`); } else { navigate(IntakeFlowPageRoute.ThankYou.path); diff --git a/packages/telemed-intake/app/src/pages/VideoChatPage.tsx b/packages/telemed-intake/app/src/pages/VideoChatPage.tsx index 81aca4ea..1d5d0adc 100644 --- a/packages/telemed-intake/app/src/pages/VideoChatPage.tsx +++ b/packages/telemed-intake/app/src/pages/VideoChatPage.tsx @@ -1,5 +1,5 @@ -import { FC } from 'react'; -import { Container } from '@mui/material'; +import { FC, useState } from 'react'; +import { Container, Typography } from '@mui/material'; import { useSearchParams } from 'react-router-dom'; import { getSelectors } from 'ottehr-utils'; import { IntakeFlowPageRoute } from '../App'; @@ -17,6 +17,8 @@ const VideoChatPage: FC = () => { const videoCallState = getSelectors(useVideoCallStore, ['meetingData']); const meetingManager = useMeetingManager(); + const [error, setError] = useState(null); + const apiClient = useZapEHRAPIClient(); const [searchParams] = useSearchParams(); const urlAppointmentID = searchParams.get('appointmentID'); @@ -25,18 +27,32 @@ const VideoChatPage: FC = () => { useAppointmentStore.setState(() => ({ appointmentID: urlAppointmentID })); } - useJoinCall(apiClient, async (response) => { - useVideoCallStore.setState({ meetingData: response }); + useJoinCall( + apiClient, + async (response) => { + useVideoCallStore.setState({ meetingData: response }); + + const meetingSessionConfiguration = new MeetingSessionConfiguration(response.Meeting, response.Attendee); + const options = { + deviceLabels: DeviceLabels.AudioAndVideo, + }; - const meetingSessionConfiguration = new MeetingSessionConfiguration(response.Meeting, response.Attendee); - const options = { - deviceLabels: DeviceLabels.AudioAndVideo, - }; + await meetingManager.join(meetingSessionConfiguration, options); - await meetingManager.join(meetingSessionConfiguration, options); + await meetingManager.start(); + }, + setError, + ); - await meetingManager.start(); - }); + if (error) { + return ( + + + {error.message} + + + ); + } if (!videoCallState.meetingData) { return ( diff --git a/packages/telemed-intake/app/vite.config.ts b/packages/telemed-intake/app/vite.config.ts index 3b97c3cc..d3c628c7 100644 --- a/packages/telemed-intake/app/vite.config.ts +++ b/packages/telemed-intake/app/vite.config.ts @@ -53,6 +53,9 @@ export default (env) => { open: 'patient-portal', }, plugins, + define: { + global: 'window', + }, }), ); }; diff --git a/packages/telemed-intake/zambdas/package.json b/packages/telemed-intake/zambdas/package.json index 0170359f..f0247122 100644 --- a/packages/telemed-intake/zambdas/package.json +++ b/packages/telemed-intake/zambdas/package.json @@ -1,6 +1,6 @@ { "name": "telemed-intake-zambdas", - "version": "0.16.0", + "version": "0.17.0", "private": true, "scripts": { "start": "npm run start:local", diff --git a/packages/telemed-intake/zambdas/scripts/setup.ts b/packages/telemed-intake/zambdas/scripts/setup.ts index 49a01fde..cf5101d1 100644 --- a/packages/telemed-intake/zambdas/scripts/setup.ts +++ b/packages/telemed-intake/zambdas/scripts/setup.ts @@ -26,6 +26,8 @@ async function createApplication( 'Zambda:Function:telemed-create-paperwork', 'Zambda:Function:telemed-cancel-telemed-appointment', 'Zambda:Function:telemed-cancel-in-person-appointment', + 'Zambda:Function:telemed-video-chat-invites-list', + 'Zambda:Function:telemed-video-chat-invites-create', ], action: ['Zambda:InvokeFunction'], effect: 'Allow', diff --git a/packages/telemed-intake/zambdas/src/appointment/create-appointment/index.ts b/packages/telemed-intake/zambdas/src/appointment/create-appointment/index.ts index 9e3ae942..eedd88dc 100644 --- a/packages/telemed-intake/zambdas/src/appointment/create-appointment/index.ts +++ b/packages/telemed-intake/zambdas/src/appointment/create-appointment/index.ts @@ -524,7 +524,7 @@ export const performTransactionalFhirRequests = async (input: TransactionInput): const apptResource: Appointment = { resourceType: 'Appointment', meta: { - tag: [{ code: OTTEHR_MODULE.TM }], + tag: [{ code: visitService === 'in-person' ? OTTEHR_MODULE.UC : OTTEHR_MODULE.TM }], }, participant: participants, start: startTimeToISO, diff --git a/packages/telemed-intake/zambdas/src/demo/example.spec.ts b/packages/telemed-intake/zambdas/src/demo/example.spec.ts index 99537e68..18e174c0 100644 --- a/packages/telemed-intake/zambdas/src/demo/example.spec.ts +++ b/packages/telemed-intake/zambdas/src/demo/example.spec.ts @@ -150,7 +150,6 @@ export async function getUser( await page.waitForTimeout(3000); expect(await page.getByText('Code is invalid').isVisible()).toBeFalsy(); await page.waitForTimeout(500); - console.log(1, token); return token; } diff --git a/packages/telemed-intake/zambdas/src/get-schedule/index.ts b/packages/telemed-intake/zambdas/src/get-schedule/index.ts index 48f72720..930b6482 100644 --- a/packages/telemed-intake/zambdas/src/get-schedule/index.ts +++ b/packages/telemed-intake/zambdas/src/get-schedule/index.ts @@ -261,7 +261,6 @@ async function getSchedule( currentDayTemp = currentDayTemp.plus({ days: 1 }); } }); - console.log(1, slots); return { message: 'Successful reply', // reminder to fix item adress @@ -397,13 +396,6 @@ export const distributeTimeSlots = ( currentAppointments: Appointment[], slotLength: number, ): string[] => { - // console.log(1, startTime, capacity, openingTime, closingTime); - // const minutesToDistributeInHour = Math.min( - // 60, - // startTime.diff(openingTime, 'minutes').minutes, - // startTime.diff(closingTime, 'minutes').minutes - // ); - // adjust startTime if minutes are not 00 to get an accurate minutesToDistributeInHour const adjustedStart: DateTime = startTime.minute !== 0 ? startTime.minus({ minutes: startTime.minute }) : startTime; @@ -430,7 +422,6 @@ export const distributeTimeSlots = ( const tempRoundedTime = tempTime.set({ minute: tempUpdatedRoundedMinute, second: 0, millisecond: 0 }); tempTime = tempTime.plus({ minutes: minutesPerSlot }); const timesSlotIndex = tempRoundedTime.toISO() || ''; - // console.log(1, tempRoundedTime.toISO()); // Appointments are bookable an hour away from the current time if (tempRoundedTime < DateTime.now().setZone('UTC').plus({ hours: 1 })) { diff --git a/packages/urgent-care-intake/app/src/api/zapehrApi.ts b/packages/urgent-care-intake/app/src/api/zapehrApi.ts index d80a2c14..ab2832a8 100644 --- a/packages/urgent-care-intake/app/src/api/zapehrApi.ts +++ b/packages/urgent-care-intake/app/src/api/zapehrApi.ts @@ -311,7 +311,6 @@ class API { if (GET_PRESIGNED_FILE_URL == null || REACT_APP_IS_LOCAL == null) { throw new Error('get presigned file url environment variable could not be loaded'); } - console.log(1); const response = await zambdaClient?.invokePublicZambda({ zambdaId: GET_PRESIGNED_FILE_URL, payload: { @@ -320,7 +319,6 @@ class API { fileFormat, }, }); - console.log(1); const jsonToUse = chooseJson(response, REACT_APP_IS_LOCAL); return jsonToUse; diff --git a/packages/urgent-care-intake/zambdas/src/shared/dateUtils.ts b/packages/urgent-care-intake/zambdas/src/shared/dateUtils.ts index 2a674f77..3ede8fb7 100644 --- a/packages/urgent-care-intake/zambdas/src/shared/dateUtils.ts +++ b/packages/urgent-care-intake/zambdas/src/shared/dateUtils.ts @@ -79,7 +79,6 @@ export const distributeTimeSlots = ( closingTime: DateTime, currentAppointments: Appointment[], ): string[] => { - // console.log(1, startTime, capacity, openingTime, closingTime); const ROUND_MINUTES = 15; // const minutesToDistributeInHour = Math.min( @@ -114,7 +113,6 @@ export const distributeTimeSlots = ( const tempRoundedTime = tempTime.set({ minute: tempUpdatedRoundedMinute, second: 0, millisecond: 0 }); tempTime = tempTime.plus({ minutes: minutesPerSlot }); const timesSlotIndex = tempRoundedTime.toISO() || ''; - // console.log(1, tempRoundedTime.toISO()); // Appointments are bookable an hour away from the current time if (tempRoundedTime < DateTime.now().setZone('UTC').plus({ hours: 1 })) { diff --git a/packages/utils/package.json b/packages/utils/package.json index 199b2ed2..f28e701f 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,7 +1,7 @@ { "name": "ottehr-utils", "private": true, - "version": "0.16.0", + "version": "0.17.0", "main": "lib/main.ts", "types": "lib/main.ts", "scripts": {