Mazecare Logo
Core Workflows

Telehealth & Virtual Consultations

SOP for managing online consultations, conducting video calls, and generating and dispatching secure digital Medical Certificates (MCs), integrated with workflow notifications.

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:

  1. Navigate to the Teleconsultation Lobby (/teleconsultation) to view scheduled virtual visits.
  2. Select the active patient and click Start Consultation.
  3. The system opens the Teleconsultation Space (/teleconsultation/[spaceId]) using the teleconsult-space-layout shell and the teleconsultation-space.vue component.
  4. 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.
  5. 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:

  1. Scroll to the Medical Certificate component (medical-certificate.vue) within the EMR workspace.
  2. Click Create Medical Certificate.
  3. In the form, select the start and end dates for the leave, and enter the diagnostic reasons.
  4. 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:

  1. In the encounter toolbar, click Complete Consult.
  2. The system executes the final consult mutations (actions/finish.vue and attester.vue), digitally locking the encounter record.
  3. 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.
Security Note
All digital MCs are generated with verification QR codes that link directly to a secure validator page to ensure authenticity.
Copyright © 2026