Fixes #5877 Comlink Telehealth Module (#5878)
commitf4dbcf0c60cb81a5008b9f2b886726a41345b9f9
authorStephen Nielson <snielson@discoverandchange.com>
Fri, 28 Oct 2022 01:13:57 +0000 (27 21:13 -0400)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2022 01:13:57 +0000 (27 21:13 -0400)
tree1f889725683c73d554c0fadee431aad83f240aa8
parent416bbf63d2bb773a833f93b3b9032f93574e0797
Fixes #5877 Comlink Telehealth Module (#5878)

* Fixes #5877 Comlink Telehealth Module

Adds a telehealth module to OpenEMR for 1:1 video teleconferencing.

This module connects to hooks in the calendar, main screen, patient
demographics, user demographics, and patient portal credentials screen
on the OpenEMR provider interface.

On the patient portal this module connects to hooks in the appointment
screen to be able to launch telehealth sessions.

The main launching class is the Bootstrap.php class that connects to the
OpenEMR hooks.

There are several ajax communications that occur such as registering
providers / patients for telehealth services when they login to the
application.  These are all communicated via the public folder.
Index.php handles the provider ajax communications.  index-portal.php
handles all of the AJAX communication for the patient side.

Several tables are created by this module.
- comlink-telehealth_auth which holds the user provisioning /
authentication information for the Comlink backend telehealth servers.
- comlink_telehealth_person_settings holds individual telehealth
settings for providers and patients
- comlink_telehealth_appointment_session - holds a specific telehealth
session information that connects a provider w/ a patient

* Fix black stylesheet property

* Fix telehealth readme with updated instructions

* Add cache busting to js scripts

Adding in caching parameters exposes a problem in the ModulesApplication
where it wasn't handling script url query parameters.

* Fix sql if statement

* Fix spaces in translations, duplicate config value

* Fix translations and escaping

* Fix html and js escaping.

* Add cache buster to calendar css

* Add text escaping to appointment notes

* Fix style changes

* Add space between name and waiting message

* Make portal credentials fit on one page

With extra verbiage on the screen we reduced the font from 24pt to 22pt
so it can all fit on one page.

* Telehealth module Fix list option population

* Fix cache busting for calendar

Cache busting was already occurring in the script filter events via the
Header class and the double cache busting parameter was messing up the
frontend dispatcher.  This fixes that problem.

Also if the URL already has a query param, I fixed the header so it only
appends the param if there isn't a query parameter already.

* Remove extraneous console.logs

* Telehealth fix unit tests, security

Make it so the unit tests can only run from the command line.  Fix
extraneous parameter in unit test.

* Changed up the unit test a bit to function properly

* Remove extraneous escaping text calls

* Fix translation escaping problems

* Fix escaping issues
65 files changed:
interface/modules/custom_modules/oe-module-comlink-telehealth/CHANGELOG.md [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/Readme.md [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/cleanup.sql [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/info.txt [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/moduleConfig.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/openemr.bootstrap.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/phpunit.xml [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/css/telehealth.css [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/cvb.min.js [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/telehealth-appointment.js [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/telehealth-calendar.js [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/telehealth-patient.js [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/telehealth-provider.js [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/telehealth.js [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/index-portal.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/public/index.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/sql/table.sql [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Bootstrap.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/Admin/TeleHealthPatientAdminController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/Admin/TeleHealthUserAdminController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/TeleHealthCalendarController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/TeleHealthFrontendSettingsController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/TeleHealthPatientPortalController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/TeleHealthVideoRegistrationController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Controller/TeleconferenceRoomController.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Exception/TeleHealthProviderSuspendedException.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Exception/TelehealthProviderNotEnrolledException.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Models/TeleHealthPersonSettings.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Models/TeleHealthUser.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Models/UserVideoRegistrationRequest.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Repository/CalendarEventCategoryRepository.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Repository/TeleHealthPersonSettingsRepository.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Repository/TeleHealthProviderRepository.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Repository/TeleHealthSessionRepository.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Repository/TeleHealthUserRepository.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Services/TeleHealthRemoteRegistrationService.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Services/TelehealthRegistrationCodeService.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/TelehealthGlobalConfig.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/src/Util/CalendarUtils.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/admin/user_admin-extension.html.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/appointment/add_edit_event.js.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/conference-room.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/patient-portal.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/telehealth-frontend-settings.js.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/video-control-bar.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/waiting-room-patient.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/waiting-room-provider.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/comlink/waiting-room.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/emails/partials/patient/email-message-fhir-access.html.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/emails/partials/patient/email-message-fhir-access.text.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/patient/partials/registration-code.html.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/templates/portal/appointment-item.html.twig [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/tests/Tests/Unit/TeleHealthUserRepositoryTest.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/tests/Tests/Unit/TeleHealthVideoRegistrationControllerTest.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/tests/Tests/Unit/TeleconferenceRoomControllerTest.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/tests/bootstrap.php [new file with mode: 0644]
interface/modules/custom_modules/oe-module-comlink-telehealth/welcome.php [new file with mode: 0644]
library/htmlspecialchars.inc.php
src/Common/Twig/TwigExtension.php
src/Common/Utils/CacheUtils.php [new file with mode: 0644]
src/Core/Header.php
src/Core/ModulesApplication.php
templates/emails/partials/patient/email-message-fhir-access.html.twig
templates/patient/portal_login/print.html.twig
tests/bootstrap.php