protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            var pacienteId = App.Current.PacienteAtual;
            var query      = ctx.GetAtendimentoQuery().Where(a => a.PacienteId == pacienteId);
            var operation  = ctx.Load(query);

            operation.Completed += (s, ex) =>
            {
                if (operation.HasError)
                {
                    MessageBox.Show(operation.Error.Message);
                    return;
                }
                atendimentosList.ItemsSource = operation.Entities;
            };
        }
        private void ObtemAtendimentoAtual()
        {
            var operation = ctx.Load(ctx.GetAtendimentoQuery().Where(a => a.Id == App.Current.AtendimentoAtual));

            operation.Completed += (s, ex) =>
            {
                if (operation.HasError)
                {
                    MessageBox.Show(operation.Error.Message);
                    return;
                }
                if (operation.Entities.Count() == 0)
                {
                    MessageBox.Show("Erro ao carregar atendimento");
                    return;
                }
                DataContext = operation.Entities.First();
            };
        }