private void ViewDicomButtonClick(object sender, RoutedEventArgs e)
        {
            var id = int.Parse(((Button)sender).CommandParameter.ToString());
            var dicomRepository = new DicomDataRepository(EHealthCareDesktopApp.Properties.Settings.Default.UniqueIdentifier);

            try
            {
                var dicom = dicomRepository.GetDicomById(EHealthCareDesktopApp.Properties.Settings.Default.PatientID, id);
                var displayDicomImage = new DisplayDicomImage(ByteArrayToImage(dicom.Dicom1));
                displayDicomImage.ShowDialog();
            }
            catch(Exception ex){
                MessageBox.Show(ex.ToString());
                return;
            }
        }
        private void ViewDicomButtonClick(object sender, RoutedEventArgs e)
        {
            if (((Button)sender).CommandParameter == null) return;

            var id = int.Parse(((Button)sender).CommandParameter.ToString());
            var dicomRepository = new DicomDataRepository(UniqueIdentifier);

            try
            {
                var dicom = dicomRepository.GetDicomById(this.PatientId, id);
                var displayDicomImage = new DisplayDicomImage(ByteArrayToImage(dicom.Dicom1));
                displayDicomImage.ShowDialog();
            }
            catch(Exception ex){
                MessageBox.Show(ex.ToString());
                return;
            }
        }