Virtual Consultation

Virtual Consultation (VC) is a function available in HIE based on the HIE-VC scope. By using Jitsi Meet practitioner & patient/customer via video conferencing method in HIE.

Aside from calling HIE API, any source system that wish to use VC functions through HIE must be be able to;

It is also important to note that the patient/customer planned for the VC session must have an activated RekodSaya as it is the portal/app for them to assess the video conferencing session.


Type of Sessions

The type of VC are stored in Appointment.serviceType for appointment records and Encounter.serviceType for encounter records.

Currently in HIE-VC scope, therese are the types of VC:

  1. Virtual Consulation Individual (VCI)
  1. Virtual Consultation Education (VCE)

Resource Details & API


HIE MY Core API

Click MY Core postman API link to view common API used in HIE.

[base] = address url e.g. "https://fhir.hie.moh.gov.my/baseR4/"
[type] = resource type e.g. "Patient | Encounter | Composition"
@recordId = unique patient id defined from source system e.g "841eaff3-18a0-42d9-a62c-91a3cbb6bcec"
@patientIdentifier = patient identifier such as mykad number or MRN e.g "HIE-00000003"

Sample Description Sample Body API Method API
Create/Update VC Appointment

1.VCI Appointment,

2.VCE Appointment

PUT [base]/Appointment/@recordId
Update Encounter

1.VCI Encounter,

2.VCE Encounter

PUT [base]/Encounter/@recordId
Create/Update Schedule

1.VCI Schedule,

2.VCE Schedule

PUT [base]/Schedule/@recordId
Create/Update Slot

1.VCI Slot,

2.VCE Slot

PUT [base]/Slot/@recordId
Bundle Create/Update Schedule & Slot

1.VCI Bundle Scheduling,

2.VCE Bundle Scheduling

PUT [base]

Jitsi API

Jitsi API is covered under Jitsi team. Refer Jitsi documentation for details.

The primary resource required to initiate a VC session are Appointment, Schedule, Slot and Encounter.

  1. For Appointment (MY Core) VC, the record must have;
  1. For Encounter (MY Core) VC, the record must have;
  1. For Schedule (MY Core) VC, the record must have;
  1. For Slot (MY Core) VC, the record must have;

Jitsi API

Jitsi API is covered under Jitsi team. Refer Jitsi documentation for details.


Integration Point

This section covers the integration point overview for VCI and VCE. The Source System is expected to be able to integrate with HIE API, Jitsi API and Notification API to be able to host their own video conferencing via HIE.

VCI Flow

For VCI, the Jitsi token session is stored in the encounter. Once, a patient check in their appointments in RekodSaya, HIE will initiate the Jitsi API and store it in Encounter.identifier. The source system will then be required to activate the token and also call a notification API to notify the patient/customer using RekodSaya that the session has started.

It is optional for a VCI appointment to refer to a Slot. However, should a source system wish to send scheduling records, the integration points and flow for scheduling is covered under

Command 'pagelink' could not render: Page not found.
use case.

Diagram below shows the concept flow related to enable source system integration of VCI through HIE:

Scenario 2 VCI (Source System)

  1. (Optional Flow) Source System CREATE VCI Schedule and Slot in HIE.
  2. Source System CREATE Appointment record in HIE.
  3. Once appointment start time arrives a patient/customer will check in using RekodSaya.
  4. Once checked in RekodSaya. HIE will call Jitsi API to CREATE a session token.
  5. HIE will CREATE Encounter and Jitsi token is stored in Encounter.identifier.value where Encounter.identifier.system="http://fhir.hie.moh.gov.my/sid/vc-token"
  6. Kafka will detect the Encounter criteria and generate a notification inside Kafka subscription.
  7. Source System will GET Encounter record from Kafka together with the Jitsi token stored within Encounter.
  8. Source System will GET Jitsi token to start session for their practitioner.
  9. Source System will POST HIE notification API to notify the patient/customer in RekodSaya that the session can begin
  10. HIE will GET Jitsi token for patient to join using RekodSaya.
  11. Once session is finish source system need to UPDATE HIE of the Encounter status to Encounter.status=finished.
  12. Source system will UPDATE Jitsi record to end session.

VCE Flow

For VCE, the source system will have to first call the Jitsi API to obtain a session token. For each appointment related to the same VCE session, it is required for source system to mention the token identifier in Appointment.identifier.where (system = 'http://fhir.hie.moh.gov.my/sid/vc-token').value.

Patient/customer using RekodSaya will then check in and HIE will create an encounter with the Jtsi token from appointment stored inside. Source system will then retrieve the encounter through Kafka, call Jitsi API to activate the session and call HIE notification API to notify patient/customer in HIE that the session has started.

Diagram below shows the concept flow related to enable source system integration of VCE through HIE:

Scenario 3 VCE (Source System)

  1. Source System call Jitsi API to CREATE a session token.
  2. (Optional) Source System CREATE VCE schedule and slot in HIE and store token in the Schedule.identifier.value where Schedule.identifier.system="http://fhir.hie.moh.gov.my/sid/vc-token"
  3. Source System CREATE Appointment record in HIE and store token in the Appointment.identifier.value where Appointment.identifier.system="http://fhir.hie.moh.gov.my/sid/vc-token"
  4. Once appointment start time arrives a patient/customer will check in using RekodSaya.
  5. HIE will CREATE Encounter and Jitsi token is stored in Encounter.identifier.value (from Appointment.identifier.value) where Encounter.identifier.system="http://fhir.hie.moh.gov.my/sid/vc-token"
  6. Kafka will detect the Encounter criteria and generate a notification inside Kafka subscription.
  7. Source System will GET encounter record from Kafka together with the Jitsi token stored within Encounter.
  8. Source System will GET Jitsi token to start session for their practitioner.
  9. Source System will POST HIE notification API to notify the patient/customer in RekodSaya that the session can begin
  10. HIE will GET Jitsi token for patient to join using RekodSaya.
  11. Once session is finish source system need to UPDATE HIE of the Encounter status to Encounter.status=finished.
  12. Source system will UPDATE Jitsi record to end session.