diff --git a/config/ng-config.json b/config/ng-config.json
index c9f2ad5f6f..1bdd31ad35 100644
--- a/config/ng-config.json
+++ b/config/ng-config.json
@@ -80,7 +80,9 @@
"openMRSSystemSettingUrl": "/openmrs/ws/rest/v1/systemsetting/",
"baseLocaleURL": "./i18n/",
"customLocaleURL": "/bahmni_config/openmrs/i18n/",
- "loginPageUrl": "../../bahmni/home/index.html#/login"
+ "loginPageUrl": "../../bahmni/home/index.html#/login",
+ "patientsURL": "/bahmni/clinical/index.html#/default/patient/",
+ "patientsURLGeneralInformationTab": "/dashboard?currentTab=DASHBOARD_TAB_GENERAL_KEY"
}
},
"Appointments": {
diff --git a/i18n/appointments/locale_en.json b/i18n/appointments/locale_en.json
index c2f2aaf6ac..a38f2b4b25 100644
--- a/i18n/appointments/locale_en.json
+++ b/i18n/appointments/locale_en.json
@@ -174,5 +174,7 @@
"PLACEHOLDER_APPOINTMENT_REQUEST": "Select Appointment Status",
"ACCEPT_APPOINTMENT_REQUEST": "Accept",
"PROVIDER_RESPONSE_ACCEPT_SUCCESS_MESSAGE": "Appointment invitation accepted successfully.",
- "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "Are you sure, you want to accept the appointment invite?"
+ "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "Are you sure, you want to accept the appointment invite?",
+ "JOIN_TELE_CONSULTATION":"Join Teleconsultation",
+ "COPY_LINK": "Copy TeleConsultation Link"
}
diff --git a/i18n/appointments/locale_es.json b/i18n/appointments/locale_es.json
index fe92671900..76441dd0a8 100644
--- a/i18n/appointments/locale_es.json
+++ b/i18n/appointments/locale_es.json
@@ -151,5 +151,7 @@
"PLACEHOLDER_APPOINTMENT_REQUEST": "Seleccionar estado de cita",
"ACCEPT_APPOINTMENT_REQUEST": "Aceptar",
"PROVIDER_RESPONSE_ACCEPT_SUCCESS_MESSAGE": "Invitación de cita aceptada con éxito.",
- "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "¿Estás seguro de que quieres aceptar la invitación a la cita?"
+ "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "¿Estás seguro de que quieres aceptar la invitación a la cita?",
+ "JOIN_TELE_CONSULTATION":"Unirse Teleconsulta",
+ "COPY_LINK": "copiar enlace de teleconsulta"
}
diff --git a/i18n/appointments/locale_fr.json b/i18n/appointments/locale_fr.json
index 1dc7042bc0..4d3629582f 100644
--- a/i18n/appointments/locale_fr.json
+++ b/i18n/appointments/locale_fr.json
@@ -167,5 +167,7 @@
"PLACEHOLDER_APPOINTMENT_REQUEST": "Sélectionnez statut rendez-vous",
"ACCEPT_APPOINTMENT_REQUEST": "Acceptez",
"PROVIDER_RESPONSE_ACCEPT_SUCCESS_MESSAGE": "Invitation à le rendez-vous acceptée avec succès.",
- "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "Êtes-vous sûr de vouloir accepter l'invitation au rendez-vous?"
+ "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "Êtes-vous sûr de vouloir accepter l'invitation au rendez-vous?",
+ "COPY_LINK": "copier le lien de téléconsultation",
+ "JOIN_TELE_CONSULTATION":"Joindre Téléconsultation"
}
diff --git a/i18n/appointments/locale_pt_BR.json b/i18n/appointments/locale_pt_BR.json
index 280e31f43d..635723e95c 100644
--- a/i18n/appointments/locale_pt_BR.json
+++ b/i18n/appointments/locale_pt_BR.json
@@ -151,5 +151,7 @@
"PLACEHOLDER_APPOINTMENT_REQUEST": "Selecionar status do compromisso",
"ACCEPT_APPOINTMENT_REQUEST": "Aceitar",
"PROVIDER_RESPONSE_ACCEPT_SUCCESS_MESSAGE": "Convite para compromisso aceito com sucesso.",
- "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "Tem certeza de que deseja aceitar o convite para o compromisso?"
+ "APPOINTMENT_ACCEPT_CONFIRM_MESSAGE": "Tem certeza de que deseja aceitar o convite para o compromisso?",
+ "COPY_LINK": "copiar link de teleconsulta",
+ "JOIN_TELE_CONSULTATION":"Junte-se Teleconsulta"
}
diff --git a/src/controllers/manage/list/appointmentsListViewController.js b/src/controllers/manage/list/appointmentsListViewController.js
index ea164f9f19..186d6ae6c8 100644
--- a/src/controllers/manage/list/appointmentsListViewController.js
+++ b/src/controllers/manage/list/appointmentsListViewController.js
@@ -175,13 +175,35 @@ angular.module('bahmni.appointments')
return appointmentType === 'WalkIn' ? 'Yes' : 'No';
};
- $scope.editAppointment = function () {
+ $scope.editAppointment = function () {
var params = $stateParams;
params.uuid = $scope.selectedAppointment.uuid;
params.isRecurring = $scope.selectedAppointment.recurring;
$state.go('home.manage.appointments.list.edit', params);
};
+ $scope.openJitsiMeet = function () {
+
+ window.open("https://" +
+ window.location.hostname +
+ Bahmni.Common.Constants.patientsURL +
+ $scope.selectedAppointment.patient.uuid +
+ Bahmni.Common.Constants.patientsURLGeneralInformationTab
+ , '_self')
+ };
+
+ $scope.copyTeleConsultationMeetingURL = function () {
+ var jitsiMeetingUrl = 'https://meet.jit.si/' + $scope.selectedAppointment.uuid;
+
+ const el = document.createElement('textarea');
+ el.value = jitsiMeetingUrl;
+ document.body.appendChild(el);
+ el.select();
+ document.execCommand('copy');
+ document.body.removeChild(el);
+
+ };
+
$scope.checkinAppointment = function () {
var scope = $rootScope.$new();
scope.message = $translate.instant('APPOINTMENT_STATUS_CHANGE_CONFIRM_MESSAGE', {
@@ -419,6 +441,13 @@ angular.module('bahmni.appointments')
return false;
};
+ $scope.isTeleconsultingAllowed = function () {
+ if (!_.isUndefined($scope.selectedAppointment)) {
+ return $scope.selectedAppointment.teleconsultation && $scope.selectedAppointment.status == window.Bahmni.Appointments.Constants.appointmentStatuses.Scheduled;
+ }
+ return false;
+ };
+
$scope.isResetAppointmentStatusFeatureEnabled = function () {
return !(_.isNull($scope.enableResetAppointmentStatuses) ||
_.isUndefined($scope.enableResetAppointmentStatuses));
diff --git a/src/images/copy_24px.png b/src/images/copy_24px.png
new file mode 100644
index 0000000000..21a9ae882d
Binary files /dev/null and b/src/images/copy_24px.png differ
diff --git a/src/models/appointment.js b/src/models/appointment.js
index 15124133dd..a62a4943c1 100644
--- a/src/models/appointment.js
+++ b/src/models/appointment.js
@@ -41,6 +41,7 @@ Bahmni.Appointments.Appointment = (function () {
locationUuid: appointmentDetails.location && appointmentDetails.location.uuid,
status: appointmentDetails.status,
appointmentKind: appointmentDetails.appointmentKind,
+ teleconsultation: appointmentDetails.teleconsultation,
comments: appointmentDetails.comments
});
return appointment;
diff --git a/src/models/appointmentViewModel.js b/src/models/appointmentViewModel.js
index 3a9e9e9330..241c04720f 100644
--- a/src/models/appointmentViewModel.js
+++ b/src/models/appointmentViewModel.js
@@ -68,6 +68,7 @@ Bahmni.Appointments.AppointmentViewModel = (function () {
startTime: getTimeWithoutDate(appointmentDetails.startDateTime),
endTime: getTimeWithoutDate(appointmentDetails.endDateTime),
appointmentKind: appointmentDetails.appointmentKind,
+ teleconsultation: appointmentDetails.teleconsultation,
status: appointmentDetails.status,
comments: appointmentDetails.comments
});
diff --git a/src/services/calendarViewPopUp.js b/src/services/calendarViewPopUp.js
index d69b933c59..231ec35b8b 100644
--- a/src/services/calendarViewPopUp.js
+++ b/src/services/calendarViewPopUp.js
@@ -1,9 +1,9 @@
'use strict';
angular.module('bahmni.appointments')
- .service('calendarViewPopUp', ['$rootScope', 'ngDialog', '$state', '$translate', 'appointmentsService',
+ .service('calendarViewPopUp', ['$rootScope', 'ngDialog', '$state','$window', '$translate', 'appointmentsService',
'confirmBox', 'checkinPopUp', 'appService', 'messagingService', 'appointmentCommonService',
- function ($rootScope, ngDialog, $state, $translate, appointmentsService, confirmBox, checkinPopUp, appService, messagingService, appointmentCommonService) {
+ function ($rootScope, ngDialog, $state, $window, $translate, appointmentsService, confirmBox, checkinPopUp, appService, messagingService, appointmentCommonService) {
var calendarViewPopUp = function (config) {
var popUpScope = $rootScope.$new();
var dialog;
@@ -42,6 +42,25 @@ angular.module('bahmni.appointments')
popUpScope.$destroy();
};
+ popUpScope.openJitsiMeet = function (appointment) {
+
+ $window.open("https://" +
+ window.location.hostname +
+ Bahmni.Common.Constants.patientsURL +
+ appointment.patient.uuid +
+ Bahmni.Common.Constants.patientsURLGeneralInformationTab
+ , '_self')
+ };
+ popUpScope.copyTeleConsultationMeetingURL = function (appointment) {
+ var jitsiMeetingUrl = 'https://meet.jit.si/' + appointment.uuid
+ const el = document.createElement('textarea');
+ el.value = jitsiMeetingUrl;
+ document.body.appendChild(el);
+ el.select();
+ document.execCommand('copy');
+ document.body.removeChild(el);
+ };
+
var closeConfirmBox = function (closeConfirmBox) {
closeConfirmBox();
};
diff --git a/src/styles/appointments/_manageAppointments.scss b/src/styles/appointments/_manageAppointments.scss
index 2ad3be8a73..c8f909f1a0 100644
--- a/src/styles/appointments/_manageAppointments.scss
+++ b/src/styles/appointments/_manageAppointments.scss
@@ -229,8 +229,13 @@
&.calendar-view-btn-container {
height: 51px;
}
+ .copy-clip,.copy-clip:disabled,.copy-clip:hover{
+ width: 25px;
+ height: 30px;
+ background:url('../images/copy_24px.png') no-repeat left center;
+ padding: 10px;
+ }
}
-
/*----- create new appointment styles -----*/
.create-new-app-wrapper {
top: 52px;
diff --git a/src/styles/bahmni-components/_ngDialog.scss b/src/styles/bahmni-components/_ngDialog.scss
index 7a1fe891ca..4b81a98082 100644
--- a/src/styles/bahmni-components/_ngDialog.scss
+++ b/src/styles/bahmni-components/_ngDialog.scss
@@ -306,3 +306,12 @@ div.ngdialog-close {
position:static!important;
height:auto!important;
}
+
+.copy-clip,.copy-clip:hover{
+ width: 25px;
+ height: 30px;
+ background:url('../images/copy_24px.png') no-repeat left center;
+ padding: 10px;
+
+ }
+
\ No newline at end of file
diff --git a/src/views/manage/calendar/popUp.html b/src/views/manage/calendar/popUp.html
index 92234d5293..95671f9b3f 100644
--- a/src/views/manage/calendar/popUp.html
+++ b/src/views/manage/calendar/popUp.html
@@ -29,6 +29,13 @@
{{::'APPOINTMENT_DATE' | translate}}: {{scope.appointments[0].startDateTime | bahmniDate}}
{{::'APPOINTMENT_SLOT' | translate}}: {{scope.appointments[0].startDateTime | bahmniTime}} -
{{scope.appointments[0].endDateTime | bahmniTime}}
+
+
+
+