public async Task <SurgeryRequestNotification> PublishSurgeryRequestNotification(SurgeryRequest surgeryRequest, DateTime timestamp, string message)
        {
            var notification = new SurgeryRequestNotification();

            await Create(notification);

            notification.IsActive       = true;
            notification.SurgeryRequest = surgeryRequest;
            notification.Timestamp      = timestamp;
            notification.Status         = NotificationStatus.Unread;
            notification.Message        = message;

            return(await Update(notification) as SurgeryRequestNotification);
        }
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var selectedTemplate = SurgeryNotificationTemplate;

            var notification = item as Notification;

            selectedTemplate = notification switch
            {
                SurgeryNotification _ => SurgeryNotificationTemplate,
                SurgeryRequestNotification _ => SurgeryRequestNotificationTemplate,
                AppointmentRequestNotification _ => AppointmentRequestNotificationTemplate,
                AppointmentChangeRequestNotification _ => AppointmentChangeRequestNotificationTemplate,
                                    _ => selectedTemplate
            };
            return(selectedTemplate);
        }
    }