public async Task <SurgeryNotification> PublishSurgeryNotification(Surgery surgery, DateTime timestamp, string message)
        {
            var notification = new SurgeryNotification();

            await Create(notification);

            notification.IsActive  = true;
            notification.Surgery   = surgery;
            notification.Timestamp = timestamp;
            notification.Status    = NotificationStatus.Unread;
            notification.Message   = message;

            return(await Update(notification) as SurgeryNotification);
        }
        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);
        }
    }