Twilio is the software Heydoc uses to allow you to have a video consultation with your patient. Heydoc is not involved in this relationship, it simply provides you with the technology. The connection is between yourself and your patient only.
Heydoc uses a peer to peer connection and as such participants exchange media directly so that:
Media is encrypted end-to-end (E2E) using WebRTC security protocols.
Heydoc does not mediate in the media exchange, which takes place through direct communication among Participants.
As Heydoc does not intercept the media in P2P Rooms, it is not possible to record or to transcode the media or to make it interoperate with other RTC services.
Source: Twilio Support
If you follow this link you'll find technical information but it also gives a good overview on how it works in great detail, and the fact that it’s end to end and HIPAA compliant.