private void ScheduleAppointmentButton_Click(object sender, RoutedEventArgs e)
        {
            if (AppointmentSearchResultsDataGrid.SelectedItem == null || SelectedAppointmentRoomComboBox.SelectedItem == null)
            {
                return;
            }



            ExaminationDTO selectedExamination = (ExaminationDTO)AppointmentSearchResultsDataGrid.SelectedItem;
            List <EquipmentInExaminationDTO> equipmentInExaminationDTOs = new List <EquipmentInExaminationDTO>();
            List <int> appointmentRequiredEquipmentTypes = new List <int>();

            foreach (EquipmentTypeForViewDTO equipmentType in AllEquipmentTypes)
            {
                if (equipmentType.IsSelected)
                {
                    appointmentRequiredEquipmentTypes.Add(equipmentType.EquipmentType.Id);
                    // equipmentInExaminationDTOs.Add(new EquipmentInExaminationDTO(equipmentType.EquipmentType.Id,selectedExamination.))
                }
            }
            int selectedRoomForExaminationId = (int)SelectedAppointmentRoomComboBox.SelectedItem;

            selectedExamination.RoomId = selectedRoomForExaminationId;

            new AppointmentService().AddExamination(selectedExamination, appointmentRequiredEquipmentTypes);
            InfoDialog infoDialog = new InfoDialog("Uspešno ste zakazali pregled!");

            infoDialog.ShowDialog();

            ClearAppointmentSearchFields();
            AppointmentSearchScrollViewer.ScrollToTop();
        }
Пример #2
0
        private void ShowRelocationUnavailableDialog(long problematicRoomId)
        {
            string relocationUnavailableMessage = String.Format("Premeštanje opreme nije moguće!{0}U sobi broj {1} izabrana oprema se koristi ili postoji neki zakazan pregled u navedenom terminu.{2}Problematična soba je označena na mapi.{3}Možete odabrati neki termin iz liste alternativnih termina za premeštanje željene opreme.",
                                                                Environment.NewLine, problematicRoomId, Environment.NewLine, Environment.NewLine);
            InfoDialog infoDialog = new InfoDialog(relocationUnavailableMessage);

            infoDialog.ShowDialog();
        }
Пример #3
0
        private void ShowRenovationUnavailableDialog()
        {
            string relocationUnavailableMessage = String.Format("Renoviranje nije moguće!{0}Postoji neki zakazan pregled, premeštanje opreme ili renoviranje u navedenom terminu.{1}Možete odabrati neki termin iz liste alternativnih termina za renoviranje.",
                                                                Environment.NewLine, Environment.NewLine);
            InfoDialog infoDialog = new InfoDialog(relocationUnavailableMessage);

            infoDialog.ShowDialog();
        }
Пример #4
0
        private void ShowDateIntervalInvalidDialog()
        {
            string dateIntervalInvalidMessage = String.Format("Neispravan unos vremenskog intervala!{0}Gornja granica vremenskog intervala mora biti veća od donje!",
                                                              Environment.NewLine);

            InfoDialog infoDialog = new InfoDialog(dateIntervalInvalidMessage);

            infoDialog.ShowDialog();
        }
Пример #5
0
        private void ShowRenovationSuccessfullyScheduledDialog()
        {
            IsAlternativeAppointmentsSectionVisible = false;

            this.Close();
            InfoDialog infoDialog = new InfoDialog("Uspešno ste zakazali renoviranje!");

            infoDialog.ShowDialog();
        }
Пример #6
0
        private void ScheduleEquipmentRelocation(TransferEquipmentDTO relocationAppointmentDTO)
        {
            IsAlternativeAppointmentsSectionVisible = false;

            _equipmentService.ScheduleEquipmentTransfer(relocationAppointmentDTO);
            this.Close();
            InfoDialog infoDialog = new InfoDialog("Uspešno ste zakazali premeštanje opreme!");

            infoDialog.ShowDialog();
        }
Пример #7
0
        private void ShowRenovationSuccessfullyCancelledDialog()
        {
            InfoDialog infoDialog = new InfoDialog("Uspešno ste otkazali renoviranje!");

            infoDialog.ShowDialog();
        }
Пример #8
0
        private void ShowAppointmentSuccessfullyCancelledDialog()
        {
            InfoDialog infoDialog = new InfoDialog("Uspešno ste otkazali pregled!");

            infoDialog.ShowDialog();
        }
        private void ShowRelocationSuccessfullyCancelledDialog()
        {
            InfoDialog infoDialog = new InfoDialog("Uspešno ste otkazali premeštanje opreme!");

            infoDialog.ShowDialog();
        }
        private void ScheduleEmergencyAppointmentButton_Click(object sender, RoutedEventArgs e)
        {
            int patientCardId = ((PatientBasicDTO)AppointmentSearchPatientComboBox.SelectedItem).PatientCardId;

            int doctorSpecialtyId = ((SpecialtyDTO)AppointmentDoctorSpecializationComboBox.SelectedItem).Id;

            List <int> appointmentRequiredEquipmentTypes = new List <int>();

            foreach (EquipmentTypeForViewDTO equipmentType in AllEquipmentTypes)
            {
                if (equipmentType.IsSelected)
                {
                    appointmentRequiredEquipmentTypes.Add(equipmentType.EquipmentType.Id);
                }
            }


            AppointmentSearchWithPrioritiesDTO appointmentSearchParametersDTO = new AppointmentSearchWithPrioritiesDTO
            {
                InitialParameters = new BasicAppointmentSearchDTO(patientCardId, doctorJmbg: "0909965768767", appointmentRequiredEquipmentTypes,
                                                                  earliestDateTime: new DateTime(DateTime.Now.Year, DateTime.Now.Month, 29, 7, 0, 0, DateTimeKind.Utc), latestDateTime: new DateTime()),
                Priority    = SearchPriority.Date,
                SpecialtyId = doctorSpecialtyId
            };

            AppointmentService appointmentService = new AppointmentService();



            if (EmergencyAppointmentSearchResultsDataGrid.SelectedItem == null)
            {
                List <EmergencyExaminationDTO> emergencyExaminationSearchResults = appointmentService.GetEmergencyAppointments(appointmentSearchParametersDTO);

                if (emergencyExaminationSearchResults.Count == 1 && emergencyExaminationSearchResults[0].UnchangedExamination.DateTime.Equals(emergencyExaminationSearchResults[0].ShiftedExamination.DateTime))
                {
                    appointmentService.AddExamination(emergencyExaminationSearchResults[0].UnchangedExamination, appointmentRequiredEquipmentTypes);


                    InfoDialog infoDialog = new InfoDialog(String.Format("Uspešno ste zakazali pregled!{0}{0}Nakon zatvaranja ovog dijaloga, biće prikazano više informacija o zakazanom pregledu.", Environment.NewLine));
                    infoDialog.ShowDialog();
                    ShowDialogWithMoreDetailsAboutScheduledExamination(emergencyExaminationSearchResults[0].UnchangedExamination);

                    ClearAppointmentSearchFields();
                    AppointmentSearchScrollViewer.ScrollToTop();
                }
                else
                {
                    EmergencyAppointmentSearchResultsDataGrid.ItemsSource = emergencyExaminationSearchResults;

                    InfoDialog infoDialog = new InfoDialog("Nažalost u skorijem periodu nema slobodnih termina koji odgovaraju unetim parametrima. Možete pomeriti neki od postojećih termina. Termini su sortirani u tabeli po pogodnosti za pomeranje. Termin koji je najpogodniji za pomeranje je posebno naglašen.");
                    infoDialog.ShowDialog();
                }
            }
            else
            {
                EmergencyExaminationDTO selectedEmergencyExamination = (EmergencyExaminationDTO)EmergencyAppointmentSearchResultsDataGrid.SelectedItem;

                ExaminationDTO unchangedExamination = selectedEmergencyExamination.UnchangedExamination;

                ExaminationDTO examinationForScheduleDTO = new ExaminationDTO(unchangedExamination.DateTime, unchangedExamination.Doctor, unchangedExamination.RoomId, patientCardId);

                RescheduleExaminationDTO rescheduleExaminationDTO = new RescheduleExaminationDTO(examinationForScheduleDTO, selectedEmergencyExamination.UnchangedExamination, selectedEmergencyExamination.ShiftedExamination);

                appointmentService.RescheduleExamination(rescheduleExaminationDTO);


                InfoDialog infoDialog = new InfoDialog(String.Format("Uspešno ste zakazali pregled!{0}{0}Nakon zatvaranja ovog dijaloga, biće prikazano više informacija o zakazanom pregledu.", Environment.NewLine));
                infoDialog.ShowDialog();
                ShowDialogWithMoreDetailsAboutScheduledExamination(examinationForScheduleDTO);

                ClearAppointmentSearchFields();
                AppointmentSearchScrollViewer.ScrollToTop();
            }
        }
        private void ShowCreatedPatientAccountInfoDialog()
        {
            InfoDialog infoDialog = new InfoDialog("Uspešno ste kreirali nalog pacijentu!");

            infoDialog.ShowDialog();
        }
        private void ShowActionSuccessfullyCancelledDialog()
        {
            InfoDialog infoDialog = new InfoDialog("Uspešno ste otkazali zakazanu akciju!");

            infoDialog.ShowDialog();
        }