| @@ -129,7 +129,7 @@ public class Main extends Application { | |||||
| loadingMessage.close(); | loadingMessage.close(); | ||||
| primaryStage.setTitle("KIS Gruppe 06"); | primaryStage.setTitle("KIS Gruppe 06"); | ||||
| primaryStage.setScene(new Scene(root, 1000, 800)); | |||||
| primaryStage.setScene(new Scene(root, 1200, 800)); | |||||
| primaryStage.show(); | primaryStage.show(); | ||||
| }); | }); | ||||
| @@ -271,7 +271,7 @@ public class DiagnoseController { | |||||
| * Clear the fields in case no diagnosis is selcted, or | * Clear the fields in case no diagnosis is selcted, or | ||||
| * creating a new one is started. | * creating a new one is started. | ||||
| */ | */ | ||||
| private void clearFields() { | |||||
| public void clearFields() { | |||||
| diagDiagnoseArzt.setValue(mainController.getCurrentMitarbeiter()); | diagDiagnoseArzt.setValue(mainController.getCurrentMitarbeiter()); | ||||
| diagDiagnose.setValue(null); | diagDiagnose.setValue(null); | ||||
| diagFreitext.setText(""); | diagFreitext.setText(""); | ||||
| @@ -21,6 +21,10 @@ import javafx.scene.layout.GridPane; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.sql.SQLException; | import java.sql.SQLException; | ||||
| /** | |||||
| * The controller that controls the detailed case data view. | |||||
| * @author Johannes | |||||
| */ | |||||
| public class FallController { | public class FallController { | ||||
| /** | /** | ||||
| @@ -300,7 +304,7 @@ public class FallController { | |||||
| /** | /** | ||||
| * Clears the TextFields. | * Clears the TextFields. | ||||
| */ | */ | ||||
| private void clearFields() { | |||||
| public void clearFields() { | |||||
| if (state.get() == State.CREATE) { | if (state.get() == State.CREATE) { | ||||
| dtTmAufnahme.setToCurrentDateTime(); | dtTmAufnahme.setToCurrentDateTime(); | ||||
| dtTmEntlassung.setToCurrentDateTime(); | dtTmEntlassung.setToCurrentDateTime(); | ||||
| @@ -14,6 +14,13 @@ import javafx.util.Callback; | |||||
| import java.util.List; | import java.util.List; | ||||
| /** | |||||
| * The applications main window controller. Has several sub controllers and handles the list of cases to a single | |||||
| * patient as well as the spinning progress indicator. | |||||
| * | |||||
| * @author Johannes | |||||
| */ | |||||
| public class MainController { | public class MainController { | ||||
| /** | /** | ||||
| @@ -368,13 +375,20 @@ public class MainController { | |||||
| if (fall == null) { | if (fall == null) { | ||||
| tabPaneFall.setDisable(true); | tabPaneFall.setDisable(true); | ||||
| System.out.println("TODO: Clear tables cuz fall = null!"); | |||||
| fallController.clearFields(); | |||||
| stationsHistorieController.clearFields(); | |||||
| diagnoseController.clearFields(); | |||||
| untersuchungenController.clearFields(); | |||||
| stationsHistorieController.setStationsHistorie(null); | |||||
| diagnoseController.setDiagnosen(null); | |||||
| untersuchungenController.setUntersuchungen(null); | |||||
| //fallController.c | //fallController.c | ||||
| return; | return; | ||||
| } | } | ||||
| if (fall == null) { // If no patient is selected | if (fall == null) { // If no patient is selected | ||||
| //lvFallPlaceholder.setText("Kein Patient ausgew\u00e4hlt!"); | |||||
| lvFallPlaceholder.setText("Kein Patient ausgew\u00e4hlt!"); | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -451,17 +465,24 @@ public class MainController { | |||||
| /** | /** | ||||
| * | |||||
| * @return | |||||
| * Getter for the case that is currently selected in the list | |||||
| */ | */ | ||||
| public Fall getFall() { | public Fall getFall() { | ||||
| return lvFall.getSelectionModel().getSelectedItem(); | return lvFall.getSelectionModel().getSelectedItem(); | ||||
| } | } | ||||
| /** | |||||
| * Property for the case selected in the list. | |||||
| */ | |||||
| public ReadOnlyObjectProperty<Fall> fallProperty() { | public ReadOnlyObjectProperty<Fall> fallProperty() { | ||||
| return lvFall.getSelectionModel().selectedItemProperty(); | return lvFall.getSelectionModel().selectedItemProperty(); | ||||
| } | } | ||||
| /** | |||||
| * Prevents the user from changing the patient/case and tab while editing case data. | |||||
| * @param exclude The case data tab that should be excluded from disabling. | |||||
| */ | |||||
| public void lockForEdit(TabName exclude) { | public void lockForEdit(TabName exclude) { | ||||
| tabFallDiagnose.setDisable(true); | tabFallDiagnose.setDisable(true); | ||||
| tabFallUntersuchungen.setDisable(true); | tabFallUntersuchungen.setDisable(true); | ||||
| @@ -491,6 +512,9 @@ public class MainController { | |||||
| } | } | ||||
| /** | |||||
| * Unlocks the GUI from locking by {@link #lockForEdit(TabName)} | |||||
| */ | |||||
| public void unlockFromEdit() { | public void unlockFromEdit() { | ||||
| tabFallDiagnose.setDisable(false); | tabFallDiagnose.setDisable(false); | ||||
| tabFallUntersuchungen.setDisable(false); | tabFallUntersuchungen.setDisable(false); | ||||
| @@ -503,14 +527,23 @@ public class MainController { | |||||
| } | } | ||||
| /** | |||||
| * The user / hospital employee that is currently "logged in" by choosing his name from the dropdown menu. | |||||
| */ | |||||
| public Mitarbeiter getCurrentMitarbeiter() { | public Mitarbeiter getCurrentMitarbeiter() { | ||||
| return cmbUserChoose == null ? null : cmbUserChoose.getValue(); | return cmbUserChoose == null ? null : cmbUserChoose.getValue(); | ||||
| } | } | ||||
| /** | |||||
| * Property of the currently logged in user. | |||||
| */ | |||||
| public ReadOnlyObjectProperty<Mitarbeiter> currentMitarbeiterProperty() { | public ReadOnlyObjectProperty<Mitarbeiter> currentMitarbeiterProperty() { | ||||
| return cmbUserChoose.valueProperty(); | return cmbUserChoose.valueProperty(); | ||||
| } | } | ||||
| /** | |||||
| * TabName defintions for the {@link #lockForEdit(TabName)}-method | |||||
| */ | |||||
| public enum TabName { | public enum TabName { | ||||
| OVERVIEW, DIAGNOSE, UNTERSUCHUNG, STATIONSHISTORIE | OVERVIEW, DIAGNOSE, UNTERSUCHUNG, STATIONSHISTORIE | ||||
| } | } | ||||
| @@ -1,8 +1,5 @@ | |||||
| package de.uniluebeck.mi.projmi6.controller; | package de.uniluebeck.mi.projmi6.controller; | ||||
| /** | |||||
| * Created by Johannes on 21/11/2015. | |||||
| */ | |||||
| import de.uniluebeck.mi.projmi6.model.HL7Message; | import de.uniluebeck.mi.projmi6.model.HL7Message; | ||||
| import javafx.beans.property.SimpleListProperty; | import javafx.beans.property.SimpleListProperty; | ||||
| @@ -12,7 +9,13 @@ import javafx.scene.control.Button; | |||||
| import javafx.scene.control.ListView; | import javafx.scene.control.ListView; | ||||
| import javafx.stage.Modality; | import javafx.stage.Modality; | ||||
| import javafx.stage.Stage; | import javafx.stage.Stage; | ||||
| /** | |||||
| * The Controller that manages the list of unseen HL7 messages. | |||||
| * At the moment, the list is opened in its own window. | |||||
| * | |||||
| * Created by Johannes on 21/11/2015. | |||||
| * @author Johannes | |||||
| */ | |||||
| public class MessageListController { | public class MessageListController { | ||||
| private final SimpleListProperty<HL7Message> messages; | private final SimpleListProperty<HL7Message> messages; | ||||
| @@ -24,26 +27,40 @@ public class MessageListController { | |||||
| @FXML | @FXML | ||||
| private Button btnRemove; | private Button btnRemove; | ||||
| /** | |||||
| * Contstructor. | |||||
| * @param messages The list of messages that will be shown in this window. Elements might become deleted. | |||||
| * @param mainController The main controller. Necessary to switch the patient and case. | |||||
| */ | |||||
| public MessageListController(SimpleListProperty<HL7Message> messages, MainController mainController) { | public MessageListController(SimpleListProperty<HL7Message> messages, MainController mainController) { | ||||
| this.messages = messages; | this.messages = messages; | ||||
| this.mainController = mainController; | this.mainController = mainController; | ||||
| } | } | ||||
| /** | |||||
| * FXMLLoaders initialize()-method | |||||
| */ | |||||
| @FXML | @FXML | ||||
| private void initialize() { | private void initialize() { | ||||
| lvMessages.setItems(messages); | lvMessages.setItems(messages); | ||||
| //Disable buttons until a message in the list is selected | |||||
| btnShow.disableProperty().bind(lvMessages.getSelectionModel().selectedItemProperty().isNull()); | btnShow.disableProperty().bind(lvMessages.getSelectionModel().selectedItemProperty().isNull()); | ||||
| btnRemove.disableProperty().bind(lvMessages.getSelectionModel().selectedItemProperty().isNull()); | btnRemove.disableProperty().bind(lvMessages.getSelectionModel().selectedItemProperty().isNull()); | ||||
| messages.sizeProperty().addListener((observable, oldValue, newValue) -> { | messages.sizeProperty().addListener((observable, oldValue, newValue) -> { | ||||
| //If no messages are left in the window, close the window. | |||||
| if (messages.getSize() <= 0) { | if (messages.getSize() <= 0) { | ||||
| ((Stage) lvMessages.getScene().getWindow()).close(); | ((Stage) lvMessages.getScene().getWindow()).close(); | ||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| /** | |||||
| * EventHandler for {@link #btnRemove} | |||||
| */ | |||||
| @FXML | @FXML | ||||
| void clickedRemove() { | |||||
| private void clickedRemove() { | |||||
| HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | ||||
| if (message == null) { | if (message == null) { | ||||
| return; | return; | ||||
| @@ -51,8 +68,13 @@ public class MessageListController { | |||||
| messages.remove(message); | messages.remove(message); | ||||
| } | } | ||||
| /** | |||||
| * EventHandler for {@link #btnShow}. | |||||
| * Opens patient and case regarding the HL7 message, or shows a error text for the message. | |||||
| * | |||||
| */ | |||||
| @FXML | @FXML | ||||
| void clickedShow() { | |||||
| private void clickedShow() { | |||||
| HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | ||||
| if (message == null) { | if (message == null) { | ||||
| return; | return; | ||||
| @@ -60,6 +82,7 @@ public class MessageListController { | |||||
| messages.remove(message); | messages.remove(message); | ||||
| if (message.isFailed()) { | if (message.isFailed()) { | ||||
| //Show error messge. | |||||
| Alert alert = new Alert(Alert.AlertType.ERROR); | Alert alert = new Alert(Alert.AlertType.ERROR); | ||||
| alert.setTitle("Nachricht konnte nicht verarbeitet werden"); | alert.setTitle("Nachricht konnte nicht verarbeitet werden"); | ||||
| alert.setHeaderText("Die Nachricht konnte nicht verarbeitet werden"); | alert.setHeaderText("Die Nachricht konnte nicht verarbeitet werden"); | ||||
| @@ -69,6 +92,7 @@ public class MessageListController { | |||||
| alert.showAndWait(); | alert.showAndWait(); | ||||
| } else { | } else { | ||||
| //Select patient in the main window. | |||||
| mainController.selectPatientAndFallId(message.getPatient(), message.getFallId()); | mainController.selectPatientAndFallId(message.getPatient(), message.getFallId()); | ||||
| ((Stage) lvMessages.getScene().getWindow()).close(); | ((Stage) lvMessages.getScene().getWindow()).close(); | ||||
| } | } | ||||
| @@ -207,7 +207,7 @@ public class PatientEditorController { | |||||
| } | } | ||||
| /** | /** | ||||
| * | |||||
| * EventHandler for {@link #btnPatSave} | |||||
| */ | */ | ||||
| @FXML | @FXML | ||||
| private void clickedSave() { | private void clickedSave() { | ||||
| @@ -236,6 +236,10 @@ public class PatientEditorController { | |||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * EventHandler for {@link #btnPatAbort} | |||||
| */ | |||||
| @FXML | @FXML | ||||
| private void clickedAbort() { | private void clickedAbort() { | ||||
| ((Stage) patVorname.getScene().getWindow()).close(); //Close Window | ((Stage) patVorname.getScene().getWindow()).close(); //Close Window | ||||
| @@ -34,71 +34,56 @@ import java.util.List; | |||||
| */ | */ | ||||
| public class PatientTablesController { | public class PatientTablesController { | ||||
| private final MainController mainController; | |||||
| /** | |||||
| * The placeholder labels in case the TableViews are empty | |||||
| */ | |||||
| @FXML | @FXML | ||||
| Button btnStatRefresh; | |||||
| private MainController mainController; | |||||
| @FXML | |||||
| private Label lblTablePatientEmpty; | |||||
| @FXML | |||||
| private Label lblTableStationEmpty; | |||||
| @FXML | |||||
| private Button btnPatCreate; | |||||
| private Label lblTablePatientEmpty, lblTableStationEmpty; | |||||
| @FXML | @FXML | ||||
| private Button btnPatEdit; | |||||
| private Button btnPatCreate, btnPatEdit, btnPatRefresh; | |||||
| @FXML | @FXML | ||||
| private TableView<Patient> tblPatientOverview; | private TableView<Patient> tblPatientOverview; | ||||
| @FXML | @FXML | ||||
| private TableColumn<Patient, String> colPatPatId; | |||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatGeburtsname; | |||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatNachname; | |||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatVorname; | |||||
| private TableColumn<Patient, String> colPatPatId, colPatGeburtsname, colPatNachname, colPatVorname, colPatStrasse, | |||||
| colPatPlz, colPatOrt, colPatCave; | |||||
| @FXML | @FXML | ||||
| private TableColumn<Patient, LocalDate> colPatGebDatum; | private TableColumn<Patient, LocalDate> colPatGebDatum; | ||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatStrasse; | |||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatPlz; | |||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatOrt; | |||||
| @FXML | |||||
| private TableColumn<Patient, String> colPatCave; | |||||
| @FXML | @FXML | ||||
| private ToggleButton btnEntlassenePatientenZeigen; | private ToggleButton btnEntlassenePatientenZeigen; | ||||
| @FXML | |||||
| private Button btnStatRefresh; | |||||
| @FXML | @FXML | ||||
| private ComboBox<Station> cmbStationenFilter; | private ComboBox<Station> cmbStationenFilter; | ||||
| @FXML | @FXML | ||||
| private TableView<StationsUebersichtsItem> tblStationOverview; | private TableView<StationsUebersichtsItem> tblStationOverview; | ||||
| @FXML | @FXML | ||||
| private TableColumn<StationsUebersichtsItem, Integer> colStatPatId; | |||||
| private TableColumn<StationsUebersichtsItem, Integer> colStatPatId, colStatAlter; | |||||
| @FXML | @FXML | ||||
| private TableColumn<StationsUebersichtsItem, String> colStatFullName; | private TableColumn<StationsUebersichtsItem, String> colStatFullName; | ||||
| @FXML | @FXML | ||||
| private TableColumn<StationsUebersichtsItem, LocalDate> colStatGebDatum; | |||||
| @FXML | |||||
| private TableColumn<StationsUebersichtsItem, Integer> colStatAlter; | |||||
| @FXML | |||||
| private TableColumn<StationsUebersichtsItem, LocalDate> colStatAufnahmedatum; | |||||
| @FXML | |||||
| private TableColumn<StationsUebersichtsItem, LocalDate> colStatEntlassungsdatum; | |||||
| @FXML | |||||
| private Tab stationOverviewTab; | |||||
| @FXML | |||||
| private Tab patientOverviewTab; | |||||
| private TableColumn<StationsUebersichtsItem, LocalDate> colStatGebDatum, colStatAufnahmedatum, colStatEntlassungsdatum; | |||||
| @FXML | @FXML | ||||
| private TabPane patientOverviewTabPane; | private TabPane patientOverviewTabPane; | ||||
| @FXML | |||||
| private Tab stationOverviewTab, patientOverviewTab; | |||||
| private ObservableList<StationsUebersichtsItem> stationsUebersicht = FXCollections.observableArrayList(); | private ObservableList<StationsUebersichtsItem> stationsUebersicht = FXCollections.observableArrayList(); | ||||
| private FilteredList<StationsUebersichtsItem> stationsUebersichtsItemFilteredList = new FilteredList<StationsUebersichtsItem>(stationsUebersicht, | private FilteredList<StationsUebersichtsItem> stationsUebersichtsItemFilteredList = new FilteredList<StationsUebersichtsItem>(stationsUebersicht, | ||||
| item -> item.getStationEntlassung() == null || item.getStationEntlassung().isAfter(LocalDate.now())); | item -> item.getStationEntlassung() == null || item.getStationEntlassung().isAfter(LocalDate.now())); | ||||
| private Task loadStationsHistorieTask = null; | private Task loadStationsHistorieTask = null; | ||||
| private Task loadPatientTask = null; | private Task loadPatientTask = null; | ||||
| @FXML | |||||
| private Button btnPatRefresh; | |||||
| private ObjectBinding<Patient> patientObjectBinding = null; | private ObjectBinding<Patient> patientObjectBinding = null; | ||||
| /** | |||||
| * Constructor. | |||||
| * @param mainController The controller that creates this instance | |||||
| */ | |||||
| public PatientTablesController(MainController mainController) { | public PatientTablesController(MainController mainController) { | ||||
| this.mainController = mainController; | this.mainController = mainController; | ||||
| } | } | ||||
| @@ -107,8 +92,11 @@ public class PatientTablesController { | |||||
| return patientOverviewTabPane; | return patientOverviewTabPane; | ||||
| } | } | ||||
| /** | |||||
| * FXMLLoaders initialize()-method. | |||||
| */ | |||||
| @FXML | @FXML | ||||
| public void initialize() { | |||||
| private void initialize() { | |||||
| btnPatEdit.disableProperty().bind(tblPatientOverview.getSelectionModel().selectedItemProperty().isNull()); | btnPatEdit.disableProperty().bind(tblPatientOverview.getSelectionModel().selectedItemProperty().isNull()); | ||||
| tblPatientOverview.setRowFactory(tableView -> { | tblPatientOverview.setRowFactory(tableView -> { | ||||
| TableRow<Patient> tableRow = new TableRow<>(); | TableRow<Patient> tableRow = new TableRow<>(); | ||||
| @@ -149,6 +137,9 @@ public class PatientTablesController { | |||||
| updatePatientsFromDb(); | updatePatientsFromDb(); | ||||
| } | } | ||||
| /** | |||||
| * Set up cell value factories for the patients table. | |||||
| */ | |||||
| private void initColumnsPatient() { | private void initColumnsPatient() { | ||||
| colPatPatId.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patIDProperty().asString()); | colPatPatId.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patIDProperty().asString()); | ||||
| colPatGeburtsname.setCellValueFactory(new PropertyValueFactory<>("geburtsname")); | colPatGeburtsname.setCellValueFactory(new PropertyValueFactory<>("geburtsname")); | ||||
| @@ -164,6 +155,9 @@ public class PatientTablesController { | |||||
| colPatCave.setCellValueFactory(new PropertyValueFactory<>("cave")); | colPatCave.setCellValueFactory(new PropertyValueFactory<>("cave")); | ||||
| } | } | ||||
| /** | |||||
| * Set up cell value factories for the hospital ward overview. | |||||
| */ | |||||
| private void initColumnsStation() { | private void initColumnsStation() { | ||||
| colStatPatId.setCellValueFactory(new PropertyValueFactory<StationsUebersichtsItem, Integer>("patId")); | colStatPatId.setCellValueFactory(new PropertyValueFactory<StationsUebersichtsItem, Integer>("patId")); | ||||
| colStatFullName.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patNameProperty()); | colStatFullName.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patNameProperty()); | ||||
| @@ -172,10 +166,12 @@ public class PatientTablesController { | |||||
| colStatAufnahmedatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().stationAufnahmeProperty()); | colStatAufnahmedatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().stationAufnahmeProperty()); | ||||
| colStatEntlassungsdatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().stationEntlassungProperty()); | colStatEntlassungsdatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().stationEntlassungProperty()); | ||||
| //Reload data if the user selects another ward. | |||||
| cmbStationenFilter.valueProperty().addListener((observableValue, oldValue, newValue) -> { | cmbStationenFilter.valueProperty().addListener((observableValue, oldValue, newValue) -> { | ||||
| updateStationsHistorieFromDb(); | updateStationsHistorieFromDb(); | ||||
| }); | }); | ||||
| //Init filter | |||||
| tblStationOverview.itemsProperty().bind(Bindings.createObjectBinding(() -> { | tblStationOverview.itemsProperty().bind(Bindings.createObjectBinding(() -> { | ||||
| if (btnEntlassenePatientenZeigen.isSelected()) { | if (btnEntlassenePatientenZeigen.isSelected()) { | ||||
| return stationsUebersicht; | return stationsUebersicht; | ||||
| @@ -185,16 +181,27 @@ public class PatientTablesController { | |||||
| }, btnEntlassenePatientenZeigen.selectedProperty())); | }, btnEntlassenePatientenZeigen.selectedProperty())); | ||||
| } | } | ||||
| /** | |||||
| * EventHandler for {@link #btnPatCreate} | |||||
| */ | |||||
| @FXML | @FXML | ||||
| private void clickedCreatePatient() { | private void clickedCreatePatient() { | ||||
| showEditWindow(null); | showEditWindow(null); | ||||
| } | } | ||||
| /** | |||||
| * EventHandler for {@link #btnPatEdit} | |||||
| */ | |||||
| @FXML | @FXML | ||||
| private void clickedEditPatient() { | private void clickedEditPatient() { | ||||
| showEditWindow(tblPatientOverview.getSelectionModel().getSelectedItem()); | showEditWindow(tblPatientOverview.getSelectionModel().getSelectedItem()); | ||||
| } | } | ||||
| /** | |||||
| * Opens a window for editing the given patient. | |||||
| * @param patient The patient that should be opened for editing. | |||||
| */ | |||||
| private void showEditWindow(Patient patient) { | private void showEditWindow(Patient patient) { | ||||
| FXMLLoader fxmlLoader = new FXMLLoader(); | FXMLLoader fxmlLoader = new FXMLLoader(); | ||||
| fxmlLoader.setLocation(getClass().getClassLoader().getResource("patient_edit.fxml")); | fxmlLoader.setLocation(getClass().getClassLoader().getResource("patient_edit.fxml")); | ||||
| @@ -219,14 +226,20 @@ public class PatientTablesController { | |||||
| stage.initModality(Modality.WINDOW_MODAL); | stage.initModality(Modality.WINDOW_MODAL); | ||||
| stage.initOwner(btnPatEdit.getScene().getWindow()); | stage.initOwner(btnPatEdit.getScene().getWindow()); | ||||
| patientEditorController.setPatient(patient); | patientEditorController.setPatient(patient); | ||||
| stage.show(); | |||||
| stage.showAndWait(); | |||||
| } | } | ||||
| /** | |||||
| * Highlight the given patient in the list, if patient was changed outside the controller. | |||||
| */ | |||||
| public void selectPatient(Patient patient) { | public void selectPatient(Patient patient) { | ||||
| patientOverviewTabPane.getSelectionModel().select(0); // Select first tab | patientOverviewTabPane.getSelectionModel().select(0); // Select first tab | ||||
| tblPatientOverview.getSelectionModel().select(patient); | tblPatientOverview.getSelectionModel().select(patient); | ||||
| } | } | ||||
| /** | |||||
| * Start the db request for loading every patient in the MySQL database. | |||||
| */ | |||||
| public void updatePatientsFromDb() { | public void updatePatientsFromDb() { | ||||
| if (this.loadPatientTask != null && this.loadPatientTask.isRunning()) { | if (this.loadPatientTask != null && this.loadPatientTask.isRunning()) { | ||||
| System.out.println("Patienten werden bereits geladen."); | System.out.println("Patienten werden bereits geladen."); | ||||
| @@ -405,7 +405,7 @@ public class StationsHistorieController { | |||||
| /** | /** | ||||
| * Clears TextFields in the view | * Clears TextFields in the view | ||||
| */ | */ | ||||
| private void clearFields() { | |||||
| public void clearFields() { | |||||
| statHistCreateTime.setText(""); | statHistCreateTime.setText(""); | ||||
| statHistCreator.setText(""); | statHistCreator.setText(""); | ||||
| statHistEditTime.setText(""); | statHistEditTime.setText(""); | ||||
| @@ -279,14 +279,14 @@ public class UntersuchungenController { | |||||
| /** | /** | ||||
| * Clears the TextFields. | * Clears the TextFields. | ||||
| */ | */ | ||||
| private void clearFields() { | |||||
| public void clearFields() { | |||||
| untsCreateTime.setText(""); | untsCreateTime.setText(""); | ||||
| untsCreator.setText(""); | untsCreator.setText(""); | ||||
| untsChangeTime.setText(""); | untsChangeTime.setText(""); | ||||
| untsChanger.setText(""); | untsChanger.setText(""); | ||||
| untsOpsCode.setValue(null); | untsOpsCode.setValue(null); | ||||
| untsArzt.setValue(mainController.getCurrentMitarbeiter()); | |||||
| untsArzt.setValue(null); | |||||
| dtTmUntersuchungszeitpunkt.setDateTime(null); | dtTmUntersuchungszeitpunkt.setDateTime(null); | ||||
| } | } | ||||
| @@ -85,8 +85,8 @@ public class DateTimePicker extends HBox { | |||||
| HBox timePicker = new HBox(hourText, colon, minuteText); | HBox timePicker = new HBox(hourText, colon, minuteText); | ||||
| timePicker.maxHeightProperty().bind(datePicker.heightProperty()); | timePicker.maxHeightProperty().bind(datePicker.heightProperty()); | ||||
| timePicker.getStyleClass().add("time-picker"); | timePicker.getStyleClass().add("time-picker"); | ||||
| timePicker.setMinWidth(55); | |||||
| timePicker.setMaxWidth(70); | |||||
| timePicker.setMinWidth(65); | |||||
| timePicker.setMaxWidth(80); | |||||
| timePicker.getStyleClass().add("button"); | timePicker.getStyleClass().add("button"); | ||||
| //Set Now-Button action | //Set Now-Button action | ||||
| @@ -95,6 +95,9 @@ public class DateTimePicker extends HBox { | |||||
| btnNow.setMinWidth(50); | btnNow.setMinWidth(50); | ||||
| btnNow.getStyleClass().add("now-button"); | btnNow.getStyleClass().add("now-button"); | ||||
| btnNow.managedProperty().bind(this.disabledProperty().not()); | |||||
| //Add the subcomponents to the view. | //Add the subcomponents to the view. | ||||
| this.getChildren().addAll(datePicker, timePicker, btnNow); | this.getChildren().addAll(datePicker, timePicker, btnNow); | ||||
| @@ -37,7 +37,7 @@ | |||||
| <Label text="Diagnoseart:" GridPane.columnIndex="0" GridPane.rowIndex="1"/> | <Label text="Diagnoseart:" GridPane.columnIndex="0" GridPane.rowIndex="1"/> | ||||
| <Label text="DiagnoseArzt:" GridPane.columnIndex="0" GridPane.rowIndex="2"/> | <Label text="DiagnoseArzt:" GridPane.columnIndex="0" GridPane.rowIndex="2"/> | ||||
| <Label text="Freitext: (optional)" GridPane.columnIndex="0" GridPane.rowIndex="3"/> | <Label text="Freitext: (optional)" GridPane.columnIndex="0" GridPane.rowIndex="3"/> | ||||
| <ComboBox fx:id="diagDiagnose" maxWidth="1.7976931348623157E308" promptText="ICD-10" | |||||
| <ComboBox fx:id="diagDiagnose" maxWidth="1.7976931348623157E308" promptText="" | |||||
| GridPane.columnIndex="1" GridPane.rowIndex="0"/> | GridPane.columnIndex="1" GridPane.rowIndex="0"/> | ||||
| <ComboBox fx:id="diagDiagnoseArt" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" | <ComboBox fx:id="diagDiagnoseArt" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" | ||||
| GridPane.rowIndex="1"/> | GridPane.rowIndex="1"/> | ||||
| @@ -68,12 +68,13 @@ | |||||
| <Label styleClass="ersteller-label" text="Ersteller: "/> | <Label styleClass="ersteller-label" text="Ersteller: "/> | ||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | ||||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="3"/> | <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="3"/> | ||||
| <Label styleClass="ersteller-value" fx:id="diagCreator" text="lorem" GridPane.columnIndex="1"/> | |||||
| <Label styleClass="ersteller-value" fx:id="diagCreateTime" text="ipsum" GridPane.columnIndex="1" | |||||
| <Label styleClass="ersteller-value" fx:id="diagCreator" text="" GridPane.columnIndex="1"/> | |||||
| <Label styleClass="ersteller-value" fx:id="diagCreateTime" text="" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="1"/> | GridPane.rowIndex="1"/> | ||||
| <Label styleClass="ersteller-value" fx:id="diagChanger" text="dolor" GridPane.columnIndex="1" | |||||
| <Label styleClass="ersteller-value" fx:id="diagChanger" text="" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="2"/> | GridPane.rowIndex="2"/> | ||||
| <Label styleClass="ersteller-value" fx:id="diagChangeTime" text="amet" GridPane.columnIndex="1" | |||||
| <Label styleClass="ersteller-value" fx:id="diagChangeTime" text=" | |||||
| " GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="3"/> | GridPane.rowIndex="3"/> | ||||
| </children> | </children> | ||||
| <columnConstraints> | <columnConstraints> | ||||