Skip to content

Telemed: Remove auto-text when provider clicks 'Assign Me' and 'Unassign Me'#4294

Draft
Copilot wants to merge 3 commits intodevelopfrom
copilot/fix-96e49322-bcc0-414a-9df7-b51181cb64ea
Draft

Telemed: Remove auto-text when provider clicks 'Assign Me' and 'Unassign Me'#4294
Copilot wants to merge 3 commits intodevelopfrom
copilot/fix-96e49322-bcc0-414a-9df7-b51181cb64ea

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 30, 2025

This PR removes automatic SMS messages that were previously sent to patients when providers clicked 'Assign Me' and 'Unassign Me' in the telemed system, while adding confirmation messages for ad-hoc appointments as requested.

Changes Made

Removed Automatic SMS Messages

  • Assign Me: Removed "Thank you for waiting. The clinician will see you within around 5 minutes." message
  • Unassign Me: Removed "Thank you for your patience. We apologize, but the provider is unexpectedly no longer available. You will receive an update when another provider is available." message

Added Ad-hoc Appointment Confirmation

For walk-in appointments, when a provider assigns themselves (status change from 'ready' to 'pre-video'), the system now sends a confirmation SMS with:

  • Organization name
  • Patient first name
  • Location name
  • Appointment start time
  • URL for visit management

Message format: "You're confirmed! Thanks for choosing [Org Name]! Your check-in time for [firstName] at [Location Name] is [startTime]. To start your visit or modify/cancel, please click here: [url]"

Test Updates

Updated the e2e test that was checking for the removed SMS functionality to document the behavioral change.

Implementation Details

The changes are implemented in the changeStatusIfPossible function in packages/zambdas/src/ehr/change-telemed-appointment-status/helpers/helpers.ts:

  • Pre-booked appointments: No SMS sent on assign/unassign (removed functionality)
  • Ad-hoc appointments (appointmentType.text === 'walkin'): Confirmation SMS sent on assign
  • All appointments: No SMS sent on unassign (removed functionality)

This addresses the complications with pre-booked telemedicine appointments while providing appropriate confirmation messaging for ad-hoc visits.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • downloads.sentry-cdn.com

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Telemed: Remove auto-text when provider clicks 'Assign Me' and 'Unassign Me'</issue_title>
<issue_description>Current State:

  • Once the provider selects ‘Assign Me’, the patient receives a text message that says: “Thank you for waiting. The clinician will see you within around 5 minutes.”
  • If the provider selects ‘Unassign Me’, the patient will receive a text message that says: ‘Thank you for your patience. We apologize, but the provider is unexpectedly no longer available. You will receive an update when another provider is available.”

However, this is creating complications for pre-booked telemedicine appointments. Because of this, we are going to remove the automatic text messages for both 'Assign Me' and 'Unassign Me'

For ad-hoc, replace 'assign me' text with confirmation text that sends when the patient books their appointment. We will also have a confirmation text for in-person that is captured in a separate ticket.

Ad-hoc copy: You're confirmed! Thanks for choosing [Org Name]! Your check-in time for ${firstName} at ${Location Name} is ${startTime}. To start your visit or modify/cancel, please click here: ${url}

We may add wait time to the ad-hoc copy eventually but it needs to be fixed first. </issue_description>

<agent_instructions>branch from and target the develop branch with your PR</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #4103

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits September 30, 2025 17:00
Co-authored-by: saewitz <48358905+saewitz@users.noreply.github.com>
Co-authored-by: saewitz <48358905+saewitz@users.noreply.github.com>
Copilot AI changed the title [WIP] Telemed: Remove auto-text when provider clicks 'Assign Me' and 'Unassign Me' Telemed: Remove auto-text when provider clicks 'Assign Me' and 'Unassign Me' Sep 30, 2025
Copilot AI requested a review from saewitz September 30, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants