mediQuo

mediQuo

›Widget

Overview

  • Getting Started

API Reference

  • Overview
  • Activation Codes
  • Patients
  • Prescriptions
  • Professionals
  • Messages
  • Troubleshooting

Android SDK

  • Installation
  • Professional List
  • Medical history
  • Customization
  • Other funcionalities
  • Changelog

iOS SDK

  • Installation
  • Professional List
  • Medical history
  • Customization
  • Other funcionalities
  • Changelog

Widget

  • Introduction
  • Permament session

    • Integration
    • Authentication

    Temporal session

    • Integration
  • Methods
  • Customization
  • Events

Events

In order to keep track of whats happening within the widget and be able to handle certain cases, the widget publishes different events that can be listened to.

Events

To listen the events published by the widget you can add the following event listener to your site. This events are sent by our widget iframe through the Post Message Api.

Example

<script>
  window.addEventListener(
    "message",
    ({ data: { command, detail } }) =>
      command === "professionalIsUnavailable" &&
      alert(`${detail.name} no está disponible`)
  );
</script>

In this example, we are listening to the event command professionalIsUnavailable and throwing an alert with their name.

professionalIsUnavailable

In case that a professional is not available for the patient the widget will not allow to navigate to its room to chat and a small lock icon will appear on the cell. However in case that the patient tries to, an event to notify this will be fired. You can then handle what to show to the patient.

Detail

ValueDescription
nameProfessional name
titleProfessional title
avatarProfessional avatar
statusThe status of the professional: online or offline
collegiate_numberThe professional collegiate number
is_availableBoolean that indicates if the professional is available or not

consultations

When number of pending consultations has changed an event with this number will be fired. You can then handle what to show to the patient.

Payload

ValueDescription
pendingConsultationsNumber of pending consultations
← Customization
  • Events
    • Example
    • professionalIsUnavailable
    • consultations
MediQuo PRO Logo
Copyright © 2023 mediQuo