Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 1 addition & 30 deletions apps/ehr/src/components/AppointmentTableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { Link, useNavigate } from 'react-router-dom';
import { FEATURE_FLAGS } from 'src/constants/feature-flags';
import { ROUTER_PATH } from 'src/features/visits/in-person/routing/routesInPerson';
import { VitalsIconTooltip } from 'src/features/visits/shared/components/VitalsIconTooltip';
import { TrackingBoardTableButton } from 'src/features/visits/telemed/components/tracking-board/TrackingBoardTableButton';
import { getTelemedQuickTexts } from 'src/features/visits/telemed/utils/appointments';
import { LocationWithWalkinSchedule } from 'src/pages/AddPatient';
import { otherColors } from 'src/themes/ottehr/colors';
Expand All @@ -43,7 +42,6 @@ import {
getInPersonQuickTexts,
getPatchBinary,
getSupportPhoneFor,
getTelemedVisitStatus,
getVisitTotalTime,
GetVitalsResponseData,
InPersonAppointmentInformation,
Expand Down Expand Up @@ -586,10 +584,7 @@ export default function AppointmentTableRow({
};

const renderStartIntakeButton = (): ReactElement | undefined => {
if (
!isVirtual(appointment) &&
(appointment.status === 'arrived' || appointment.status === 'ready' || appointment.status === 'intake')
) {
if (appointment.status === 'arrived' || appointment.status === 'ready' || appointment.status === 'intake') {
return (
<GoToButton
text="Start Intake"
Expand All @@ -604,29 +599,6 @@ export default function AppointmentTableRow({
return undefined;
};

const renderAssignMeButton = (): ReactElement | undefined => {
const location = appointment.location;
if (isVirtual(appointment) && location?.id) {
return (
<TrackingBoardTableButton
appointment={{
...appointment,
telemedStatus: getTelemedVisitStatus(encounter.status, appointment.status) ?? 'ready',
locationVirtual: {
reference: `Location/${location.id}`,
name: location.name,
state: location.address?.state,
resourceType: 'Location',
id: location.id,
extension: location.extension,
},
}}
/>
);
}
return undefined;
};

const handleProgressNoteButton = async (): Promise<void> => {
setProgressNoteButtonLoading(true);
try {
Expand Down Expand Up @@ -1059,7 +1031,6 @@ export default function AppointmentTableRow({
{renderStartIntakeButton()}
{renderProgressNoteButton()}
{renderDischargeButton()}
{renderAssignMeButton()}
{FEATURE_FLAGS.SUPERVISOR_APPROVAL_ENABLED && renderSupervisorApproval()}
</Stack>
</TableCell>
Expand Down
10 changes: 0 additions & 10 deletions apps/ehr/tests/e2e/page/VisitsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ export class VisitsPage {
await arrivedButton.click();
}

async clickAssignButton(appointmentId: string): Promise<void> {
const arrivedButton = this.#page
.getByTestId(dataTestIds.dashboard.tableRowWrapper(appointmentId))
.getByTestId(dataTestIds.telemedEhrFlow.trackingBoardAssignButton);
// Wait for button to be visible and enabled before clicking
await arrivedButton.waitFor({ state: 'visible', timeout: 60000 });
await expect(arrivedButton).toBeEnabled({ timeout: 5000 });
await arrivedButton.click();
}

async clickOnPatientName(appointmentId: string): Promise<void> {
await this.#page
.getByTestId(dataTestIds.dashboard.tableRowWrapper(appointmentId))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ test.describe.skip('Telemed tracking board checks, buttons, chart data filling',
await test.step('Find and assign my appointment', async () => {
const visitsPage = await openVisitsPage(page);
await visitsPage.selectLocation(myPatientsTabAppointmentResources.appointmentLocation?.name ?? 'Unknown');
await visitsPage.clickAssignButton(myPatientsTabAppointmentResources.appointment.id!);

await telemedDialogConfirm(page);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ test.describe.configure({ mode: 'serial' });
test('Should assign visit to practitioner', async () => {
const visitsPage = await openVisitsPage(page);
await visitsPage.selectLocation(resourceHandler.appointmentLocation?.name ?? 'Unknown');
await visitsPage.clickAssignButton(resourceHandler.appointment.id!);
await visitsPage.clickProgressNoteButton(resourceHandler.appointment.id!);
const assignMeButton = page.getByTestId(dataTestIds.telemedEhrFlow.footerButtonAssignMe);
await assignMeButton.click();
await telemedDialogConfirm(page);
});

Expand Down
Loading