| @@ -1,7 +1,6 @@ | |||
| package de.uniluebeck.mi.projmi6.controller; | |||
| import com.sun.prism.shader.Solid_Color_AlphaTest_Loader; | |||
| import de.uniluebeck.mi.projmi6.db.DBHandler; | |||
| import de.uniluebeck.mi.projmi6.model.DiagArt; | |||
| import de.uniluebeck.mi.projmi6.model.Diagnose; | |||
| @@ -12,7 +11,6 @@ import javafx.beans.property.ReadOnlyObjectProperty; | |||
| import javafx.beans.property.SimpleObjectProperty; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.collections.ObservableList; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.*; | |||
| import javafx.scene.layout.GridPane; | |||
| @@ -21,7 +19,7 @@ import javafx.scene.layout.GridPane; | |||
| * Controller that mantains the diagnosis assigned to a case in the UI. | |||
| * | |||
| * @author Johannes | |||
| * Created by 631806 on 12.11.15. | |||
| * Created by 631806 on 12.11.15. | |||
| */ | |||
| public class DiagnoseController { | |||
| @@ -40,7 +38,7 @@ public class DiagnoseController { | |||
| private final SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); | |||
| @FXML | |||
| private Button btnDiagAbort, btnDiagEdit, btnDiagSave,btnDiagCreate, btnDiagCancel; | |||
| private Button btnDiagAbort, btnDiagEdit, btnDiagSave, btnDiagCreate, btnDiagCancel; | |||
| @FXML | |||
| private final MainController mainController; | |||
| @@ -62,6 +60,7 @@ public class DiagnoseController { | |||
| /** | |||
| * Contructor. | |||
| * | |||
| * @param mainController The main controller that creates this instance. | |||
| */ | |||
| public DiagnoseController(MainController mainController) { | |||
| @@ -70,6 +69,7 @@ public class DiagnoseController { | |||
| /** | |||
| * Getter for the {@link #diagnosenProperty()}. | |||
| * | |||
| * @return The list of diagnosis shown in the GUI. Might be null. | |||
| */ | |||
| public ObservableList<Diagnose> getDiagnosen() { | |||
| @@ -79,6 +79,7 @@ public class DiagnoseController { | |||
| /** | |||
| * Setter for the {@link #diagnosenProperty()}. | |||
| * | |||
| * @param diagnosen A observable list of diagnosis to be set. | |||
| */ | |||
| public void setDiagnosen(ObservableList<Diagnose> diagnosen) { | |||
| @@ -87,6 +88,7 @@ public class DiagnoseController { | |||
| /** | |||
| * The diagnosis in this controller. | |||
| * | |||
| * @return A simple object property. | |||
| */ | |||
| public SimpleObjectProperty<ObservableList<Diagnose>> diagnosenProperty() { | |||
| @@ -95,6 +97,7 @@ public class DiagnoseController { | |||
| /** | |||
| * Getter for the state of this controller | |||
| * | |||
| * @return State.VIEW, State.EDIT or State.CREATE | |||
| */ | |||
| public State getState() { | |||
| @@ -103,7 +106,6 @@ public class DiagnoseController { | |||
| /** | |||
| * A property for the controllers state. | |||
| * @return | |||
| */ | |||
| public ReadOnlyObjectProperty<State> stateProperty() { | |||
| return state; | |||
| @@ -140,7 +142,7 @@ public class DiagnoseController { | |||
| //React on state changes. | |||
| state.addListener((observable, oldValue, newValue) -> { | |||
| if(newValue == State.VIEW){ | |||
| if (newValue == State.VIEW) { | |||
| mainController.unlockFromEdit(); | |||
| Diagnose diagnose = diagnoseList.getSelectionModel().getSelectedItem(); | |||
| if (diagnose == null) { | |||
| @@ -148,9 +150,9 @@ public class DiagnoseController { | |||
| } else { | |||
| copyDiagnoseDataIntoFields(diagnose); | |||
| } | |||
| }else{ | |||
| } else { | |||
| mainController.lockForEdit(MainController.TabName.DIAGNOSE); | |||
| if(newValue==State.CREATE){ | |||
| if (newValue == State.CREATE) { | |||
| clearFields(); | |||
| diagDiagnoseArzt.setValue(mainController.getCurrentMitarbeiter()); | |||
| } | |||
| @@ -227,9 +229,6 @@ public class DiagnoseController { | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } else { | |||
| //Update diagnosis in db | |||
| } | |||
| mainController.refreshCaseData(); | |||
| state.set(State.VIEW); | |||
| @@ -237,12 +236,13 @@ public class DiagnoseController { | |||
| /** | |||
| * Copy the object data into the fields. | |||
| * | |||
| * @param diagnose The object with the data. | |||
| */ | |||
| private void copyDiagnoseDataIntoFields(Diagnose diagnose) { | |||
| //Find the DiagnoseArzt by id. | |||
| for(Mitarbeiter current: diagDiagnoseArzt.getItems()){ | |||
| if(current.getMitarbID() == diagnose.getMitarbid()){ | |||
| for (Mitarbeiter current : diagDiagnoseArzt.getItems()) { | |||
| if (current.getMitarbID() == diagnose.getMitarbid()) { | |||
| diagDiagnoseArzt.setValue(current); | |||
| break; | |||
| } | |||
| @@ -260,6 +260,7 @@ public class DiagnoseController { | |||
| /** | |||
| * Copy the data from the ComboBoxes into data model object | |||
| * | |||
| * @param diagnose The object to copy the data into | |||
| */ | |||
| private void copyFieldDataIntoDiagnose(Diagnose diagnose) { | |||
| @@ -20,7 +20,8 @@ import java.sql.SQLException; | |||
| /** | |||
| * The controller that controls the detailed case data view. | |||
| * @author Johannes | |||
| * | |||
| * @author Johannes | |||
| */ | |||
| public class FallController { | |||
| @@ -57,6 +58,7 @@ public class FallController { | |||
| /** | |||
| * Contstructor. | |||
| * | |||
| * @param mainController The main controller that creats this instance | |||
| */ | |||
| public FallController(MainController mainController) { | |||
| @@ -73,6 +75,7 @@ public class FallController { | |||
| /** | |||
| * Setter for the {@link #fallProperty()} | |||
| * | |||
| * @param fall | |||
| */ | |||
| public void setFall(Fall fall) { | |||
| @@ -102,6 +105,7 @@ public class FallController { | |||
| /** | |||
| * For showing the main diagnosis, the Controller also needs a pointer to the list of case diagnosis. | |||
| * | |||
| * @return | |||
| */ | |||
| public ObjectProperty<ObservableList<Diagnose>> diagnosenProperty() { | |||
| @@ -117,6 +121,7 @@ public class FallController { | |||
| /** | |||
| * Setter for the diagnosis in the main diagnosis combo box. | |||
| * | |||
| * @see #diagnosenProperty() | |||
| */ | |||
| public void setDiagnosen(ObservableList<Diagnose> list) { | |||
| @@ -221,18 +226,18 @@ public class FallController { | |||
| /** | |||
| * Validate the data entered by the user. | |||
| */ | |||
| private boolean validateData(Fall fall){ | |||
| if(fall.getAufnahmeDatum()!= null && fall.getEntlassungsDatum() != null | |||
| && fall.getAufnahmeDatum().isAfter(fall.getEntlassungsDatum())){ | |||
| private boolean validateData(Fall fall) { | |||
| if (fall.getAufnahmeDatum() != null && fall.getEntlassungsDatum() != null | |||
| && fall.getAufnahmeDatum().isAfter(fall.getEntlassungsDatum())) { | |||
| showMessage("Aufnahmedatum lieght hinter Entlassungsdatum", "Der Patient muss aufgenommen worden sein, ehe " + | |||
| "er wieder entlassen worden sein kann."); | |||
| return false; | |||
| } | |||
| if(fall.getKasse()==null || fall.getVersichertenNummer().isEmpty()){ | |||
| if (fall.getKasse() == null || fall.getVersichertenNummer().isEmpty()) { | |||
| showMessage("Fall hat keine Kasse/Versicherungsnummer", "An den Fall m\u00fcssen Abrechnungsinfos angeh\u00e4ngt werden!"); | |||
| return false; | |||
| } | |||
| if(fall.getFallArt()==null){ | |||
| if (fall.getFallArt() == null) { | |||
| showMessage("Es ist keine Fallart ausgew\u00e4hlt!", "Bitte eine Fallart ausw\u00e4hlen!"); | |||
| return false; | |||
| } | |||
| @@ -288,7 +293,7 @@ public class FallController { | |||
| if (this.state.get() == State.CREATE) { | |||
| Fall fall = new Fall(); | |||
| copyFieldDataIntoFall(fall); | |||
| if(!validateData(fall)){ | |||
| if (!validateData(fall)) { | |||
| return; | |||
| } | |||
| try { | |||
| @@ -306,7 +311,7 @@ public class FallController { | |||
| mainController.refreshCasesFromDb(mainController.getPatientTablesController().getSelectedPatient()); | |||
| } else { //Update / edit | |||
| copyFieldDataIntoFall(fallProperty.get()); | |||
| if(!validateData(fallProperty.get())){ | |||
| if (!validateData(fallProperty.get())) { | |||
| return; | |||
| } | |||
| try { | |||
| @@ -372,6 +377,7 @@ public class FallController { | |||
| /** | |||
| * Copy the text entered in the views into a Fall object. | |||
| * | |||
| * @param fall The object for copying the data into. | |||
| */ | |||
| private void copyFieldDataIntoFall(Fall fall) { | |||
| @@ -399,6 +405,7 @@ public class FallController { | |||
| /** | |||
| * Set the field values in the view to the value of the {@link Fall} object. | |||
| * | |||
| * @param fall The object whose data will be copied. | |||
| */ | |||
| private void copyFallDataIntoField(Fall fall) { | |||
| @@ -431,6 +438,7 @@ public class FallController { | |||
| /** | |||
| * This method sets the main diagnosis in the ComboBox | |||
| * | |||
| * @param fall The case whose main diagnosis will be picked | |||
| */ | |||
| private void copyHauptdiagnoseToComboBox(Fall fall) { | |||
| @@ -458,5 +466,4 @@ public class FallController { | |||
| } | |||
| } | |||
| @@ -15,10 +15,11 @@ import java.util.List; | |||
| /** | |||
| * Controller for the HL7 Log Tab. | |||
| * | |||
| * <p> | |||
| * The log data is stored in the MySQL DB. The controller handles loading and showing of the data. | |||
| * | |||
| * <p> | |||
| * Created by Johannes on 19.11.15. | |||
| * | |||
| * @author Johannes | |||
| */ | |||
| public class LogController { | |||
| @@ -46,6 +47,7 @@ public class LogController { | |||
| /** | |||
| * Constructor. Instance is created by the main controller. | |||
| * | |||
| * @param mainController The main controller instance that creates this controller instance | |||
| */ | |||
| public LogController(MainController mainController) { | |||
| @@ -60,6 +62,7 @@ public class LogController { | |||
| initColumns(); | |||
| refreshLogFromDb(); | |||
| } | |||
| /** | |||
| * Init cell value factories for the table columns | |||
| */ | |||
| @@ -71,27 +74,27 @@ public class LogController { | |||
| //Change cell factory cuz we need scrollable fields | |||
| colLogMessage.setCellFactory(column -> | |||
| new TableCell<HL7LogEntry, String>() { | |||
| private TextArea textArea = new TextArea(); | |||
| { | |||
| textArea.setEditable(false); | |||
| textArea.setPrefRowCount(5); | |||
| } | |||
| @Override | |||
| protected void updateItem(String item, boolean empty) { | |||
| super.updateItem(item, empty); | |||
| this.setText(null); | |||
| if (item == null || empty) { | |||
| this.setGraphic(null); | |||
| return; | |||
| new TableCell<HL7LogEntry, String>() { | |||
| private TextArea textArea = new TextArea(); | |||
| { | |||
| textArea.setEditable(false); | |||
| textArea.setPrefRowCount(5); | |||
| } | |||
| @Override | |||
| protected void updateItem(String item, boolean empty) { | |||
| super.updateItem(item, empty); | |||
| this.setText(null); | |||
| if (item == null || empty) { | |||
| this.setGraphic(null); | |||
| return; | |||
| } | |||
| textArea.setText(item); | |||
| textArea.setWrapText(true); | |||
| this.setGraphic(textArea); | |||
| } | |||
| textArea.setText(item); | |||
| textArea.setWrapText(true); | |||
| this.setGraphic(textArea); | |||
| } | |||
| }); | |||
| }); | |||
| } | |||
| @@ -3,7 +3,6 @@ package de.uniluebeck.mi.projmi6.controller; | |||
| import de.uniluebeck.mi.projmi6.db.DBHandler; | |||
| import de.uniluebeck.mi.projmi6.model.*; | |||
| import javafx.beans.property.ReadOnlyObjectProperty; | |||
| import javafx.beans.property.SimpleObjectProperty; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.collections.ObservableList; | |||
| import javafx.collections.transformation.FilteredList; | |||
| @@ -213,8 +212,9 @@ public class MainController { | |||
| /** | |||
| * Opens a patient and specific case in the window. | |||
| * | |||
| * @param patient The patient to be shown. | |||
| * @param fallId The case number of the patient. | |||
| * @param fallId The case number of the patient. | |||
| */ | |||
| public void selectPatientAndFallId(Patient patient, int fallId) { | |||
| if (patientTablesController.getSelectedPatient() == patient | |||
| @@ -228,7 +228,8 @@ public class MainController { | |||
| } | |||
| /** | |||
| * Opens a specific case by id. | |||
| * Opens a specific case by id. | |||
| * | |||
| * @param id The case id | |||
| */ | |||
| private void selectFallById(int id) { | |||
| @@ -247,6 +248,7 @@ public class MainController { | |||
| /** | |||
| * Starts a task that loads all cases for the given patient and displays them | |||
| * Stops other running tasks if necessary. | |||
| * | |||
| * @param patient The patient whose cases will be loaded. | |||
| */ | |||
| public void refreshCasesFromDb(Patient patient) { | |||
| @@ -332,7 +334,6 @@ public class MainController { | |||
| }); | |||
| tabPaneFall.setDisable(false); | |||
| tabFallDiagnose.setDisable(true); | |||
| tabFallStationsHistorie.setDisable(true); | |||
| @@ -344,7 +345,7 @@ public class MainController { | |||
| /** | |||
| * Setup the list view of the patient's cases. | |||
| */ | |||
| private void initCaseListView(){ | |||
| private void initCaseListView() { | |||
| lvFall.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); | |||
| fallController.fallProperty().bind(lvFall.getSelectionModel().selectedItemProperty()); | |||
| @@ -384,6 +385,7 @@ public class MainController { | |||
| /** | |||
| * Loads all the data that belongs to a specific case (diagnosis, ward history, examinations) | |||
| * and sets the data in the correlating controllers. | |||
| * | |||
| * @param fall The case whose correlationg data will be loaded | |||
| */ | |||
| private void refreshCaseData(Fall fall) { | |||
| @@ -410,7 +412,6 @@ public class MainController { | |||
| } | |||
| loadCaseData = new Task<Void>() { | |||
| List<Untersuchung> untersuchungList; | |||
| List<Diagnose> diagnoseList; | |||
| @@ -499,6 +500,7 @@ public class MainController { | |||
| /** | |||
| * 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) { | |||
| @@ -16,6 +16,7 @@ import java.io.IOException; | |||
| /** | |||
| * This controller controlls the small message icon at the bottom of the application's main window. | |||
| * | |||
| * @author Johannes | |||
| */ | |||
| public class MessageController { | |||
| @@ -37,6 +38,7 @@ public class MessageController { | |||
| /** | |||
| * Constructor | |||
| * | |||
| * @param mainController The controller that creates this instance | |||
| */ | |||
| public MessageController(MainController mainController) { | |||
| @@ -61,6 +63,7 @@ public class MessageController { | |||
| /** | |||
| * Opens a window that shows all the unread messages. | |||
| * | |||
| * @see de.uniluebeck.mi.projmi6.controller.MessageListController | |||
| */ | |||
| private void showMessageList() { | |||
| @@ -94,6 +97,7 @@ public class MessageController { | |||
| /** | |||
| * Adds a message to the list of unread messages that is controlled by this controller | |||
| * | |||
| * @param message The message that will be added. | |||
| */ | |||
| public void addMessage(HL7Message message) { | |||
| @@ -9,12 +9,14 @@ import javafx.scene.control.Button; | |||
| import javafx.scene.control.ListView; | |||
| import javafx.stage.Modality; | |||
| 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. | |||
| * | |||
| * <p> | |||
| * Created by Johannes on 21/11/2015. | |||
| * @author Johannes | |||
| * | |||
| * @author Johannes | |||
| */ | |||
| public class MessageListController { | |||
| private final SimpleListProperty<HL7Message> messages; | |||
| @@ -28,7 +30,8 @@ public class MessageListController { | |||
| /** | |||
| * Contstructor. | |||
| * @param messages The list of messages that will be shown in this window. Elements might become deleted. | |||
| * | |||
| * @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) { | |||
| @@ -70,7 +73,6 @@ public class MessageListController { | |||
| /** | |||
| * EventHandler for {@link #btnShow}. | |||
| * Opens patient and case regarding the HL7 message, or shows a error text for the message. | |||
| * | |||
| */ | |||
| @FXML | |||
| private void clickedShow() { | |||
| @@ -8,7 +8,6 @@ import de.uniluebeck.mi.projmi6.db.DBHandler; | |||
| import de.uniluebeck.mi.projmi6.model.Kasse; | |||
| import de.uniluebeck.mi.projmi6.model.Patient; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.*; | |||
| import javafx.stage.Stage; | |||
| @@ -55,6 +54,7 @@ public class PatientEditorController { | |||
| /** | |||
| * The constructor. | |||
| * | |||
| * @param mainController | |||
| */ | |||
| public PatientEditorController(MainController mainController) { | |||
| @@ -74,6 +74,7 @@ public class PatientEditorController { | |||
| /** | |||
| * Sets the patient that is shown in this view. | |||
| * | |||
| * @param patient The patient to be edited, or null if a new patient shall be created. | |||
| */ | |||
| public void setPatient(Patient patient) { | |||
| @@ -117,7 +118,8 @@ public class PatientEditorController { | |||
| /** | |||
| * Shows alert dialog if data is invalid | |||
| * @param title the alert's header text. | |||
| * | |||
| * @param title the alert's header text. | |||
| * @param message the alert's content text. | |||
| */ | |||
| private void showMessage(String title, String message) { | |||
| @@ -153,6 +155,7 @@ public class PatientEditorController { | |||
| /** | |||
| * Validates the data in the fields. Makes alerts if data not valid. | |||
| * | |||
| * @return true if data is valid, false otherwise. | |||
| */ | |||
| private boolean validateData() { | |||
| @@ -161,19 +164,19 @@ public class PatientEditorController { | |||
| "Postleitzahlen m\u00fcssen aus exakt 5 Ziffern bestehen!"); | |||
| return false; | |||
| } | |||
| if(patNachname.getText()==null || patNachname.getText().isEmpty()){ | |||
| if (patNachname.getText() == null || patNachname.getText().isEmpty()) { | |||
| showMessage("Nachname ist leer", "Es muss ein Nachname eingegeben werden!"); | |||
| return false; | |||
| } | |||
| if(patVorname.getText()==null || patVorname.getText().isEmpty()){ | |||
| if (patVorname.getText() == null || patVorname.getText().isEmpty()) { | |||
| showMessage("Vorname ist leer", "Es muss ein Vorname eingegeben werden!"); | |||
| return false; | |||
| } | |||
| if(patGeburtsdatum.getValue()==null || patGeburtsdatum.getValue().isAfter(LocalDate.now().plusMonths(1))){ | |||
| if (patGeburtsdatum.getValue() == null || patGeburtsdatum.getValue().isAfter(LocalDate.now().plusMonths(1))) { | |||
| showMessage("Geburtsdatum ist ung\u00fcltig", "Das Geburtsdatum ist nicht gesetzt oder liegt zuweit in der Zukunft!"); | |||
| return false; | |||
| } | |||
| if(patVersicherung.getValue()==null){ | |||
| if (patVersicherung.getValue() == null) { | |||
| showMessage("Es ist keine Kasse ausgew\u00e4hlt!", "Bitte eine Kassse aus der List w\u00e4hle"); | |||
| return false; | |||
| } | |||
| @@ -46,7 +46,7 @@ public class PatientTablesController { | |||
| @FXML | |||
| private TableView<Patient> tblPatientOverview; | |||
| @FXML | |||
| private TableColumn<Patient, String> colPatPatId, colPatGeburtsname, colPatNachname, colPatVorname, colPatStrasse, | |||
| private TableColumn<Patient, String> colPatPatId, colPatGeburtsname, colPatNachname, colPatVorname, colPatStrasse, | |||
| colPatPlz, colPatOrt, colPatCave; | |||
| @FXML | |||
| private TableColumn<Patient, LocalDate> colPatGebDatum; | |||
| @@ -83,6 +83,7 @@ public class PatientTablesController { | |||
| /** | |||
| * Constructor. | |||
| * | |||
| * @param mainController The controller that creates this instance | |||
| */ | |||
| public PatientTablesController(MainController mainController) { | |||
| @@ -204,6 +205,7 @@ public class PatientTablesController { | |||
| /** | |||
| * Opens a window for editing the given patient. | |||
| * | |||
| * @param patient The patient that should be opened for editing. | |||
| */ | |||
| private void showEditWindow(Patient patient) { | |||
| @@ -20,14 +20,14 @@ import javafx.stage.Modality; | |||
| import java.sql.SQLException; | |||
| import java.time.LocalDate; | |||
| import java.time.LocalDateTime; | |||
| import java.util.Collections; | |||
| import java.util.List; | |||
| import java.util.stream.Collectors; | |||
| /** | |||
| * The controller class for the hospital ward history. | |||
| * | |||
| * @author Johannes | |||
| * Created by Johannes on 12.11.15. | |||
| * Created by Johannes on 12.11.15. | |||
| */ | |||
| public class StationsHistorieController { | |||
| @@ -38,7 +38,7 @@ public class StationsHistorieController { | |||
| @FXML | |||
| private TableView<StationsHistorie> tblStationsHistorie; | |||
| @FXML | |||
| private Button btnStatHistSave, btnStatHistCreate, btnStatHistEdit, btnStatHistDelete, btnStatHistAbort; | |||
| private Button btnStatHistSave, btnStatHistCreate, btnStatHistEdit, btnStatHistDelete, btnStatHistAbort; | |||
| @FXML | |||
| private Label statHistCreator, statHistCreateTime, statHistEditor, statHistEditTime; | |||
| @FXML | |||
| @@ -69,6 +69,7 @@ public class StationsHistorieController { | |||
| /** | |||
| * Constructor | |||
| * | |||
| * @param mainController | |||
| */ | |||
| public StationsHistorieController(MainController mainController) { | |||
| @@ -86,6 +87,7 @@ public class StationsHistorieController { | |||
| /** | |||
| * Getter for the {@link #stateProperty()} | |||
| * | |||
| * @return The stateProperty's value. | |||
| */ | |||
| public State getState() { | |||
| @@ -271,6 +273,7 @@ public class StationsHistorieController { | |||
| /** | |||
| * A getter for {@link #stationsHistorieProperty()} | |||
| * | |||
| * @return The value of that property. | |||
| */ | |||
| public ObservableList<StationsHistorie> getStationsHistorie() { | |||
| @@ -279,6 +282,7 @@ public class StationsHistorieController { | |||
| /** | |||
| * Setter for the {@link #stationsHistorieProperty()} | |||
| * | |||
| * @param stationsHistorie The value to be set. | |||
| */ | |||
| public void setStationsHistorie(ObservableList<StationsHistorie> stationsHistorie) { | |||
| @@ -287,6 +291,7 @@ public class StationsHistorieController { | |||
| /** | |||
| * The list that will be shown in the TableView. | |||
| * | |||
| * @return A property to that list. | |||
| */ | |||
| public SimpleObjectProperty<ObservableList<StationsHistorie>> stationsHistorieProperty() { | |||
| @@ -334,19 +339,20 @@ public class StationsHistorieController { | |||
| statHistCreator.setText(Integer.toString(stationsHistorie.getErsteller())); | |||
| if (stationsHistorie.getErstellDatumZeit() != null) { | |||
| statHistCreateTime.setText(stationsHistorie.getErstellDatumZeit().toString()); | |||
| }else{ | |||
| } else { | |||
| statHistCreateTime.setText(""); | |||
| } | |||
| statHistEditor.setText(Integer.toString(stationsHistorie.getBearbeiter())); | |||
| if (stationsHistorie.getBearbeitetDatumZeit() != null) { | |||
| statHistEditTime.setText(stationsHistorie.getBearbeitetDatumZeit().toString()); | |||
| }else{ | |||
| } else { | |||
| statHistEditTime.setText(""); | |||
| } | |||
| } | |||
| /** | |||
| * Copies the data entered in the fields into {@link de.uniluebeck.mi.projmi6.model.StationsHistorie} objects. | |||
| * | |||
| * @param stationsHistorie The object in which the data will be copied | |||
| */ | |||
| private void copyFieldDataIntoStationsHistorie(StationsHistorie stationsHistorie) { | |||
| @@ -365,7 +371,8 @@ public class StationsHistorieController { | |||
| /** | |||
| * Helper method for {@link #validateData(StationsHistorie)}. Opens a error window. | |||
| * @param title The Alerts header text | |||
| * | |||
| * @param title The Alerts header text | |||
| * @param message The Alerts contents text | |||
| */ | |||
| private void showMessage(String title, String message) { | |||
| @@ -380,6 +387,7 @@ public class StationsHistorieController { | |||
| /** | |||
| * Checks the StationsHistorie and makes error alerts if necessary. | |||
| * | |||
| * @param stationsHistorie The StationsHistorie that should be validated, | |||
| * @return true if data is valid, false otherwise. | |||
| */ | |||
| @@ -1,24 +1,24 @@ | |||
| /** | |||
| * This package contains the FXML Controller classes. | |||
| * | |||
| * <p> | |||
| * There is the {@link de.uniluebeck.mi.projmi6.controller.MainController}, that creates instances of these nested controller classes: | |||
| * <ul> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.DiagnoseController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.FallController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.LogController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.PatientTablesController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.MessageController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.SettingsController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.StationsHistorieController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.UntersuchungenController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.DiagnoseController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.FallController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.LogController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.PatientTablesController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.MessageController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.SettingsController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.StationsHistorieController}</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.UntersuchungenController}</li> | |||
| * </ul> | |||
| * The main controller has an {@link de.uniluebeck.mi.projmi6.controller.MainController#getControllerFactory()} for | |||
| * the FXMLLoader. | |||
| * | |||
| * <p> | |||
| * There are also two other controller classes, that aren't directly maintained by the FXMLLoader | |||
| * <ul> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.PatientEditorController} for the edit/create patient window</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.MessageListController} for the window of unseen HL7 messages</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.PatientEditorController} for the edit/create patient window</li> | |||
| * <li>{@link de.uniluebeck.mi.projmi6.controller.MessageListController} for the window of unseen HL7 messages</li> | |||
| * </ul> | |||
| */ | |||
| package de.uniluebeck.mi.projmi6.controller; | |||
| @@ -8,7 +8,7 @@ import java.sql.SQLException; | |||
| * MySQL Connection Factory. | |||
| */ | |||
| public class MySqlConnectionFactory { | |||
| public static final String URL = "jdbc:mysql://141.83.20.84:3306/pmiw15g06_v01"; | |||
| public static final String URL = "jdbc:mysql://localhost:3306/pmiw15g06_v01"; | |||
| public static final String USER = "pmiw15g06"; | |||
| public static final String PASS = "AX3yQSYJSH43PrSz"; | |||
| public static final String DRIVER = "com.mysql.jdbc.Driver"; | |||