Telehealth & Virtual Consultations
The Telehealth Flow manages remote patient encounters. This workflow handles virtual consultation spaces, real-time media/signaling, EMR charting, and the automated delivery of digitally signed documents to patients upon checkout.
Detailed Step-by-Step Walkthrough
Step 1: Join the Teleconsultation Space
When a virtual consultation slot becomes active, the physician joins the digital lobby to connect with the patient:
- Navigate to the Teleconsultation Lobby (
/teleconsultation) to view scheduled virtual visits. - Select the active patient and click Start Consultation.
- The system opens the Teleconsultation Space (
/teleconsultation/[spaceId]) using theteleconsult-space-layoutshell and theteleconsultation-space.vuecomponent. - Click Join Video Call to initialize the media connection:
- Video/Audio Streaming: Handled via the Agora RTC SDK (
teleconsultation-call-room.vue/teleconsultation-room-layout-tiled.vue). - Real-Time Signaling & Chat: Handled via the Agora RTM SDK (
teleconsultation-people-slideover.vue), allowing chat messaging and connection state monitoring.
- Video/Audio Streaming: Handled via the Agora RTC SDK (
- The interface displays a split-screen dashboard: the active video stream appears on the left, and the patient's EMR consultation workspace (
encounter-grid-layout.vue) renders on the right.
Step 2: Generate the Digital Medical Certificate (MC)
If the patient requires sick leave, generate a cryptographically verifiable digital MC:
- Scroll to the Medical Certificate component (
medical-certificate.vue) within the EMR workspace. - Click Create Medical Certificate.
- In the form, select the start and end dates for the leave, and enter the diagnostic reasons.
- Click Sign Certificate.
- Cryptographic Signature: The system signs the document using the physician's credentials, generates a PDF, and locks the file.
- Verification QR Code: The system embeds a unique verification QR code linked to a secure validator URL. This allows employers to confirm the certificate's authenticity.
Step 3: Complete Consultation & Dispatch via WhatsApp
After documenting clinical findings and prescribing medications, conclude the session:
- In the encounter toolbar, click Complete Consult.
- The system executes the final consult mutations (
actions/finish.vueandattester.vue), digitally locking the encounter record. - The Workflow Definition state machine transitions the Episode of Care from Consultation to Completed (or Discharged):
- State Exit Action: On leaving the Consultation state, the workflow executes an automated HTTP Action.
- WhatsApp Automation: The action calls the Meta WhatsApp Business API to dispatch a pre-approved template message to the patient.
- Liquid Interpolation: The notification payload resolves Liquid-style variables at runtime (e.g.,
{{workflowContext.whatsAppTemplateName}}and{{workflowContext.whatsAppPhoneNumberId}}) to deliver a message containing secure download links for the Digital MC, Prescription Details, and Invoice receipt directly to the patient's mobile number.
Appointment Check-In
Standard operating procedure for checking in scheduled appointments, from calendar status update to generating the Episode of Care and active QMS ticket.
Repeat Medication
Workflow for managing asynchronous prescription renewals and direct pharmacy dispensing without checking patients into the active queue.