Esempio n. 1
0
        public static void BookMeeting(string participantEmail, string slots, string patientName,
                                       string questionCategory, string doctorName)
        {
            var dateStartDate = GetDateTime(slots);
            var itemId        = SharePointRepository.CreateMeetingDetails(dateStartDate, dateStartDate.AddHours(1),
                                                                          string.Empty, doctorName, patientName, participantEmail, string.Empty,
                                                                          questionCategory);
            var portalUrl            = "";
            var queryStringParameter = "";

            if (ConfigurationManager.AppSettings["IsAngularApp"] == "true")
            {
                portalUrl            = new Uri(ConfigurationManager.AppSettings["ida:HealthCarePortal"]).AbsoluteUri + "healthcare/guest?uri=";
                queryStringParameter = $"meetingId={itemId}&userType=Patient&displayName={patientName}";
            }
            else
            {
                portalUrl = new Uri(ConfigurationManager.AppSettings["ida:HealthCarePortal"]).AbsoluteUri +
                            "api/meeting?";
                queryStringParameter = "meetingId=" + itemId + "&userType=Patient&displayName=" + patientName;
            }

            string error;
            var    encrptedParameters = EncryptionHelper.Encrypt(queryStringParameter);
            var    meetingUrl         = portalUrl + encrptedParameters;
            var    invitation         = MeetingInvitation.SendEmail(meetingUrl, participantEmail,
                                                                    out error);
        }
 /// <summary>
 /// Inserts the blank meeting details.
 /// </summary>
 /// <param name="startDateTime">The start date time.</param>
 /// <param name="endDateTime">The end date time.</param>
 /// <param name="organizerEmail">The organizer email.</param>
 /// <param name="doctorName">Name of the doctor.</param>
 /// <param name="patientName">Name of the patient.</param>
 /// <param name="patientEmail">The patient email.</param>
 /// <param name="meetingId">The meeting identifier.</param>
 /// <param name="questionCategory">The question category.</param>
 /// <returns></returns>
 private string InsertBlankMeetingDetails(DateTime startDateTime, DateTime endDateTime, string organizerEmail, string doctorName, string patientName, string patientEmail,
                                          string meetingId, string questionCategory = null)
 {
     return(SharePointRepository.CreateMeetingDetails(startDateTime, endDateTime, organizerEmail, doctorName, patientName, patientEmail, meetingId, questionCategory));
 }