| @@ -40,7 +40,7 @@ public class Main extends Application { | |||||
| * Cuz building the GUI from FXML is a bit costly, | * Cuz building the GUI from FXML is a bit costly, | ||||
| * it's done from its own thread. | * it's done from its own thread. | ||||
| */ | */ | ||||
| private Task<Parent> loadMainWindowTask = new Task<Parent>(){ | |||||
| private Task<Parent> loadMainWindowTask = new Task<Parent>() { | |||||
| @Override | @Override | ||||
| @@ -49,7 +49,7 @@ public class Main extends Application { | |||||
| MainController mainController = new MainController(); | MainController mainController = new MainController(); | ||||
| updateMessage("Lade OPS-Codes..."); | updateMessage("Lade OPS-Codes..."); | ||||
| mainController.getStammdaten().setOpsCodes(FXCollections.observableArrayList( | mainController.getStammdaten().setOpsCodes(FXCollections.observableArrayList( | ||||
| DBHandler.getAllOpsCodes() | |||||
| DBHandler.getAllOpsCodes() | |||||
| )); | )); | ||||
| updateMessage("Lade ICD-10-Codes..."); | updateMessage("Lade ICD-10-Codes..."); | ||||
| @@ -59,7 +59,7 @@ public class Main extends Application { | |||||
| updateMessage("Lade Krankenkassen..."); | updateMessage("Lade Krankenkassen..."); | ||||
| mainController.getStammdaten().setKassen(FXCollections.observableArrayList( | mainController.getStammdaten().setKassen(FXCollections.observableArrayList( | ||||
| DBHandler.getAllKassen() | |||||
| DBHandler.getAllKassen() | |||||
| )); | )); | ||||
| updateMessage("Lade Mitarbeiter..."); | updateMessage("Lade Mitarbeiter..."); | ||||
| @@ -79,7 +79,7 @@ public class Main extends Application { | |||||
| Parent root = fxmlLoader.load(); | Parent root = fxmlLoader.load(); | ||||
| server = new HL7Server(mainController); | |||||
| server = new HL7Server(); | |||||
| server.registerApplication("ADT", "A01", new HL7Receiver<>(ADT_A01.class, mainController)); // ADT_A01 parsen | server.registerApplication("ADT", "A01", new HL7Receiver<>(ADT_A01.class, mainController)); // ADT_A01 parsen | ||||
| server.registerApplication("BAR", "P05", new HL7Receiver<>(BAR_P05.class, mainController)); // BAR_P05 parsen | server.registerApplication("BAR", "P05", new HL7Receiver<>(BAR_P05.class, mainController)); // BAR_P05 parsen | ||||
| server.start(); | server.start(); | ||||
| @@ -111,7 +111,7 @@ public class Main extends Application { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public void start(Stage primaryStage) { | |||||
| public void start(Stage primaryStage) { | |||||
| System.out.println(getClass().getClassLoader().getResource("").toExternalForm()); | System.out.println(getClass().getClassLoader().getResource("").toExternalForm()); | ||||
| primaryStage.getIcons().add(icon); | primaryStage.getIcons().add(icon); | ||||
| @@ -150,27 +150,26 @@ public class DiagnoseController { | |||||
| @FXML | @FXML | ||||
| void clickedDiagSave(ActionEvent event) { | void clickedDiagSave(ActionEvent event) { | ||||
| if(state.get() == State.CREATE){ | |||||
| if (state.get() == State.CREATE) { | |||||
| //Create new diagnosis | //Create new diagnosis | ||||
| Diagnose diagnose = new Diagnose(); | Diagnose diagnose = new Diagnose(); | ||||
| copyFieldDataIntoDiagnose(diagnose); | copyFieldDataIntoDiagnose(diagnose); | ||||
| try { | try { | ||||
| DBHandler.setDiagnose(diagnose); | DBHandler.setDiagnose(diagnose); | ||||
| }catch (Exception e){ | |||||
| } catch (Exception e) { | |||||
| e.printStackTrace(); | e.printStackTrace(); | ||||
| } | } | ||||
| }else{ | |||||
| } else { | |||||
| //Update diagnosis in db | //Update diagnosis in db | ||||
| } | } | ||||
| mainController.refreshCaseData(); | mainController.refreshCaseData(); | ||||
| } | } | ||||
| private void copyDiagnoseDataIntoFields(Diagnose diagnose){ | |||||
| private void copyDiagnoseDataIntoFields(Diagnose diagnose) { | |||||
| diagDiagnoseArzt.setValue(diagnose.getArzt()); | diagDiagnoseArzt.setValue(diagnose.getArzt()); | ||||
| diagFreitext.setText(diagnose.getFreiText()); | diagFreitext.setText(diagnose.getFreiText()); | ||||
| diagDiagnoseArt.setValue(diagnose.getDiagArt()); | diagDiagnoseArt.setValue(diagnose.getDiagArt()); | ||||
| diagDiagnose.setValue(diagnose.getIcd10code()); | diagDiagnose.setValue(diagnose.getIcd10code()); | ||||
| @@ -181,7 +180,7 @@ public class DiagnoseController { | |||||
| diagChangeTime.setText(diagnose.getBearbeitetDatumZeit().toString()); | diagChangeTime.setText(diagnose.getBearbeitetDatumZeit().toString()); | ||||
| } | } | ||||
| private void copyFieldDataIntoDiagnose(Diagnose diagnose){ | |||||
| private void copyFieldDataIntoDiagnose(Diagnose diagnose) { | |||||
| diagnose.setIcd10code(diagDiagnose.getValue()); | diagnose.setIcd10code(diagDiagnose.getValue()); | ||||
| diagnose.setArzt(diagDiagnoseArzt.getValue()); | diagnose.setArzt(diagDiagnoseArzt.getValue()); | ||||
| diagnose.setFreiText(diagFreitext.getText()); | diagnose.setFreiText(diagFreitext.getText()); | ||||
| @@ -192,7 +191,7 @@ public class DiagnoseController { | |||||
| diagnose.setBearbeiter(mainController.getCurrentMitarbeiter().getMitarbID()); | diagnose.setBearbeiter(mainController.getCurrentMitarbeiter().getMitarbID()); | ||||
| } | } | ||||
| private void clearFields(){ | |||||
| private void clearFields() { | |||||
| diagDiagnoseArzt.setValue(mainController.getCurrentMitarbeiter()); | diagDiagnoseArzt.setValue(mainController.getCurrentMitarbeiter()); | ||||
| diagDiagnose.setValue(null); | diagDiagnose.setValue(null); | ||||
| diagFreitext.setText(""); | diagFreitext.setText(""); | ||||
| @@ -88,32 +88,31 @@ public class FallController { | |||||
| return state; | return state; | ||||
| } | } | ||||
| public ObjectProperty<ObservableList<Diagnose>> diagnosenProperty(){ | |||||
| return fallHauptdiagnose.itemsProperty(); | |||||
| public ObjectProperty<ObservableList<Diagnose>> diagnosenProperty() { | |||||
| return fallHauptdiagnose.itemsProperty(); | |||||
| } | } | ||||
| public ObservableList<Diagnose> getDiagnosen() { | public ObservableList<Diagnose> getDiagnosen() { | ||||
| return fallHauptdiagnose.getItems(); | return fallHauptdiagnose.getItems(); | ||||
| } | } | ||||
| public void setDiagnosen(ObservableList<Diagnose> list){ | |||||
| public void setDiagnosen(ObservableList<Diagnose> list) { | |||||
| fallHauptdiagnose.setItems(list); | fallHauptdiagnose.setItems(list); | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| public void initialize(){ | |||||
| public void initialize() { | |||||
| fallEinweisenderArzt.disableProperty().bind(fallSelbsteinweisung.selectedProperty()); | fallEinweisenderArzt.disableProperty().bind(fallSelbsteinweisung.selectedProperty()); | ||||
| fallFallart.setItems(FXCollections.observableArrayList(FallArt.values())); | fallFallart.setItems(FXCollections.observableArrayList(FallArt.values())); | ||||
| fallKasse.setItems(mainController.getStammdaten().getKassen()); | fallKasse.setItems(mainController.getStammdaten().getKassen()); | ||||
| initButtons(); | initButtons(); | ||||
| fallFields.disableProperty().bind(state.isEqualTo(State.VIEW)); | fallFields.disableProperty().bind(state.isEqualTo(State.VIEW)); | ||||
| fallProperty.addListener(((observable, oldValue, newValue) -> { | fallProperty.addListener(((observable, oldValue, newValue) -> { | ||||
| if(state.get() == State.VIEW){ | |||||
| if (state.get() == State.VIEW) { | |||||
| copyFallDataIntoField(fallProperty.get()); | copyFallDataIntoField(fallProperty.get()); | ||||
| } | } | ||||
| })); | })); | ||||
| @@ -124,9 +123,9 @@ public class FallController { | |||||
| state.addListener((observable, oldValue, newValue) -> { | state.addListener((observable, oldValue, newValue) -> { | ||||
| if(newValue==State.EDIT || newValue == State.CREATE){ | |||||
| if (newValue == State.EDIT || newValue == State.CREATE) { | |||||
| mainController.lockForEdit(MainController.TabName.OVERVIEW); | mainController.lockForEdit(MainController.TabName.OVERVIEW); | ||||
| }else{ | |||||
| } else { | |||||
| mainController.unlockFromEdit(); | mainController.unlockFromEdit(); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -135,7 +134,7 @@ public class FallController { | |||||
| /** | /** | ||||
| * Hide the buttons depending on controller state. | * Hide the buttons depending on controller state. | ||||
| */ | */ | ||||
| private void initButtons(){ | |||||
| private void initButtons() { | |||||
| btnFallEnableEdit.managedProperty().bind( | btnFallEnableEdit.managedProperty().bind( | ||||
| state.isEqualTo(State.VIEW).and(fallProperty.isNotNull()) | state.isEqualTo(State.VIEW).and(fallProperty.isNotNull()) | ||||
| ); | ); | ||||
| @@ -162,7 +161,7 @@ public class FallController { | |||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void clickedSendHl7(){ | |||||
| private void clickedSendHl7() { | |||||
| /* Natascha */ | /* Natascha */ | ||||
| //TODO send funny message | //TODO send funny message | ||||
| Patient patient = mainController.getPatientTablesController().getSelectedPatient(); | Patient patient = mainController.getPatientTablesController().getSelectedPatient(); | ||||
| @@ -176,7 +175,7 @@ public class FallController { | |||||
| } | } | ||||
| } | } | ||||
| public void editFall(){ | |||||
| public void editFall() { | |||||
| this.state.set(State.EDIT); | this.state.set(State.EDIT); | ||||
| } | } | ||||
| @@ -244,11 +243,11 @@ public class FallController { | |||||
| fallVersichertennummer.setText(patient.getVersichertennummer()); | fallVersichertennummer.setText(patient.getVersichertennummer()); | ||||
| } | } | ||||
| private void clearFields(){ | |||||
| if(state.get() == State.CREATE) { | |||||
| private void clearFields() { | |||||
| if (state.get() == State.CREATE) { | |||||
| dtTmAufnahme.setToCurrentDateTime(); | dtTmAufnahme.setToCurrentDateTime(); | ||||
| dtTmEntlassung.setToCurrentDateTime(); | dtTmEntlassung.setToCurrentDateTime(); | ||||
| }else{ | |||||
| } else { | |||||
| dtTmAufnahme.setDateTime(null); | dtTmAufnahme.setDateTime(null); | ||||
| dtTmEntlassung.setDateTime(null); | dtTmEntlassung.setDateTime(null); | ||||
| } | } | ||||
| @@ -272,14 +271,14 @@ public class FallController { | |||||
| fallFallart.setValue(null); | fallFallart.setValue(null); | ||||
| } | } | ||||
| private void copyFieldDataIntoFall(Fall fall){ | |||||
| private void copyFieldDataIntoFall(Fall fall) { | |||||
| fall.setPatient(mainController.getPatientTablesController().getSelectedPatient()); | fall.setPatient(mainController.getPatientTablesController().getSelectedPatient()); | ||||
| fall.setAufnahmeDatum(dtTmAufnahme.getDateTime()); | fall.setAufnahmeDatum(dtTmAufnahme.getDateTime()); | ||||
| fall.setEntlassungsDatum(dtTmEntlassung.getDateTime()); | fall.setEntlassungsDatum(dtTmEntlassung.getDateTime()); | ||||
| if(fallSelbsteinweisung.isSelected()) { | |||||
| if (fallSelbsteinweisung.isSelected()) { | |||||
| fall.setSelbsteinweisung(true); | fall.setSelbsteinweisung(true); | ||||
| fall.setEinweisenderArzt(null); | fall.setEinweisenderArzt(null); | ||||
| }else{ | |||||
| } else { | |||||
| fall.setEinweisenderArzt(fallEinweisenderArzt.getText()); | fall.setEinweisenderArzt(fallEinweisenderArzt.getText()); | ||||
| fall.setSelbsteinweisung(false); | fall.setSelbsteinweisung(false); | ||||
| } | } | ||||
| @@ -292,12 +291,11 @@ public class FallController { | |||||
| } | } | ||||
| //fall.setVorstellDatum(); //TODO | //fall.setVorstellDatum(); //TODO | ||||
| } | } | ||||
| private void copyFallDataIntoField(Fall fall){ | |||||
| if(fall==null){ | |||||
| private void copyFallDataIntoField(Fall fall) { | |||||
| if (fall == null) { | |||||
| System.out.println("copyFallDataIntoFiled - Fall ist null"); | System.out.println("copyFallDataIntoFiled - Fall ist null"); | ||||
| clearFields(); | clearFields(); | ||||
| return; | return; | ||||
| @@ -308,9 +306,9 @@ public class FallController { | |||||
| fallPatID.setText(fallProperty.get().getPatient() + ""); //(fall.getPatient().getVorname()+" "+fall.getPatient().getNachname()); //TODO | fallPatID.setText(fallProperty.get().getPatient() + ""); //(fall.getPatient().getVorname()+" "+fall.getPatient().getNachname()); //TODO | ||||
| fallCreateTime.setText(fall.getErstellDatumZeit() !=null ? fall.getErstellDatumZeit().toString():""); | |||||
| fallCreateTime.setText(fall.getErstellDatumZeit() != null ? fall.getErstellDatumZeit().toString() : ""); | |||||
| fallCreator.setText(Integer.toString(fall.getErsteller())); | fallCreator.setText(Integer.toString(fall.getErsteller())); | ||||
| fallEditTime.setText(fall.getBearbeitetDatumZeit()!=null? fall.getBearbeitetDatumZeit().toString():""); | |||||
| fallEditTime.setText(fall.getBearbeitetDatumZeit() != null ? fall.getBearbeitetDatumZeit().toString() : ""); | |||||
| fallEditor.setText(Integer.toString(fall.getBearbeiter())); | fallEditor.setText(Integer.toString(fall.getBearbeiter())); | ||||
| fallEinweisenderArzt.setText(fall.getEinweisenderArzt()); | fallEinweisenderArzt.setText(fall.getEinweisenderArzt()); | ||||
| @@ -324,7 +322,7 @@ public class FallController { | |||||
| fallFallart.setValue(fall.getFallArt()); | fallFallart.setValue(fall.getFallArt()); | ||||
| } | } | ||||
| private void copyHauptdiagnoseToComboBox(Fall fall){ | |||||
| private void copyHauptdiagnoseToComboBox(Fall fall) { | |||||
| if (fallHauptdiagnose.getItems() == null | if (fallHauptdiagnose.getItems() == null | ||||
| || fall == null) { | || fall == null) { | ||||
| fallHauptdiagnose.setValue(null); | fallHauptdiagnose.setValue(null); | ||||
| @@ -333,11 +331,11 @@ public class FallController { | |||||
| System.out.println("Suche Diagnose..."); | System.out.println("Suche Diagnose..."); | ||||
| for (Diagnose diagnose : fallHauptdiagnose.getItems()) { | for (Diagnose diagnose : fallHauptdiagnose.getItems()) { | ||||
| System.out.println(diagnose.getDiagID()+"="+fall.getHauptdiagnoseId()); | |||||
| System.out.println(diagnose.getDiagID() + "=" + fall.getHauptdiagnoseId()); | |||||
| if (diagnose.getDiagID() == fall.getHauptdiagnoseId()) { | if (diagnose.getDiagID() == fall.getHauptdiagnoseId()) { | ||||
| fallHauptdiagnose.getSelectionModel().select(diagnose); | |||||
| fallHauptdiagnose.getSelectionModel().select(diagnose); | |||||
| System.out.println("Diagnose wiedergefunden!!"); | System.out.println("Diagnose wiedergefunden!!"); | ||||
| return; | |||||
| return; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -347,5 +345,4 @@ public class FallController { | |||||
| } | } | ||||
| } | } | ||||
| @@ -23,7 +23,7 @@ public class LogController { | |||||
| TableView<HL7LogEntry> tblLog; | TableView<HL7LogEntry> tblLog; | ||||
| @FXML | @FXML | ||||
| TableColumn<HL7LogEntry, String> colLogIp, colLogMessage; | |||||
| TableColumn<HL7LogEntry, String> colLogIp, colLogMessage; | |||||
| @FXML | @FXML | ||||
| TableColumn<HL7LogEntry, LocalDateTime> colLogTime; | TableColumn<HL7LogEntry, LocalDateTime> colLogTime; | ||||
| @@ -34,28 +34,28 @@ public class LogController { | |||||
| @FXML | @FXML | ||||
| Button btnRefresh; | Button btnRefresh; | ||||
| private Task<List<HL7LogEntry>> loadLogEntryTask = null; | |||||
| public LogController(MainController mainController) { | public LogController(MainController mainController) { | ||||
| this.mainController = mainController; | this.mainController = mainController; | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void initialize(){ | |||||
| private void initialize() { | |||||
| initColumns(); | initColumns(); | ||||
| refreshLogFromDb(); | refreshLogFromDb(); | ||||
| } | } | ||||
| private void initColumns(){ | |||||
| private void initColumns() { | |||||
| colLogDirection.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, HL7LogEntry.Direction>("direction")); | colLogDirection.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, HL7LogEntry.Direction>("direction")); | ||||
| colLogIp.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("source")); | colLogIp.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("source")); | ||||
| colLogTime.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, LocalDateTime>("timestamp")); | colLogTime.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, LocalDateTime>("timestamp")); | ||||
| colLogMessage.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("message")); | colLogMessage.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("message")); | ||||
| colLogMessage.setCellFactory(column -> { | colLogMessage.setCellFactory(column -> { | ||||
| return new TableCell<HL7LogEntry, String>(){ | |||||
| return new TableCell<HL7LogEntry, String>() { | |||||
| private TextArea textArea = new TextArea(); | private TextArea textArea = new TextArea(); | ||||
| { | { | ||||
| textArea.setEditable(false); | textArea.setEditable(false); | ||||
| textArea.setPrefRowCount(5); | textArea.setPrefRowCount(5); | ||||
| @@ -65,7 +65,7 @@ public class LogController { | |||||
| protected void updateItem(String item, boolean empty) { | protected void updateItem(String item, boolean empty) { | ||||
| super.updateItem(item, empty); | super.updateItem(item, empty); | ||||
| this.setText(null); | this.setText(null); | ||||
| if(item == null || empty){ | |||||
| if (item == null || empty) { | |||||
| this.setGraphic(null); | this.setGraphic(null); | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -77,10 +77,7 @@ public class LogController { | |||||
| }); | }); | ||||
| } | } | ||||
| private Task<List<HL7LogEntry>> loadLogEntryTask = null; | |||||
| public void refreshLogFromDb(){ | |||||
| public void refreshLogFromDb() { | |||||
| if (this.loadLogEntryTask != null && this.loadLogEntryTask.isRunning()) { | if (this.loadLogEntryTask != null && this.loadLogEntryTask.isRunning()) { | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -92,11 +89,11 @@ public class LogController { | |||||
| tblLog.setPlaceholder(new Text("Liste wird geladen...")); | tblLog.setPlaceholder(new Text("Liste wird geladen...")); | ||||
| loadLogEntryTask= new Task<List<HL7LogEntry>>() { | |||||
| loadLogEntryTask = new Task<List<HL7LogEntry>>() { | |||||
| @Override | @Override | ||||
| protected List<HL7LogEntry> call() throws Exception { | protected List<HL7LogEntry> call() throws Exception { | ||||
| return FXCollections.<HL7LogEntry>observableArrayList(DBHandler.getLastHL7LogEntries()); | |||||
| return FXCollections.observableArrayList(DBHandler.getLastHL7LogEntries()); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -126,11 +123,9 @@ public class LogController { | |||||
| @FXML | @FXML | ||||
| private void clickedRefresh(){ | |||||
| private void clickedRefresh() { | |||||
| refreshLogFromDb(); | refreshLogFromDb(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -2,11 +2,7 @@ package de.uniluebeck.mi.projmi6.controller; | |||||
| import de.uniluebeck.mi.projmi6.db.DBHandler; | import de.uniluebeck.mi.projmi6.db.DBHandler; | ||||
| import de.uniluebeck.mi.projmi6.model.*; | import de.uniluebeck.mi.projmi6.model.*; | ||||
| import de.uniluebeck.mi.projmi6.view.MessageIcon; | |||||
| import javafx.beans.binding.Bindings; | |||||
| import javafx.beans.property.ReadOnlyObjectProperty; | import javafx.beans.property.ReadOnlyObjectProperty; | ||||
| import javafx.beans.property.SimpleObjectProperty; | |||||
| import javafx.beans.value.ChangeListener; | |||||
| import javafx.collections.FXCollections; | import javafx.collections.FXCollections; | ||||
| import javafx.collections.ObservableList; | import javafx.collections.ObservableList; | ||||
| import javafx.concurrent.Task; | import javafx.concurrent.Task; | ||||
| @@ -16,11 +12,7 @@ import javafx.scene.paint.Color; | |||||
| import javafx.scene.text.Text; | import javafx.scene.text.Text; | ||||
| import javafx.util.Callback; | import javafx.util.Callback; | ||||
| import javax.swing.*; | |||||
| import java.util.ArrayList; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Set; | |||||
| import java.util.concurrent.ThreadFactory; | |||||
| public class MainController { | public class MainController { | ||||
| @@ -78,14 +70,19 @@ public class MainController { | |||||
| return stationsHistorieController; | return stationsHistorieController; | ||||
| } else if (clazz.equals(LogController.class)) { | } else if (clazz.equals(LogController.class)) { | ||||
| return logController; | return logController; | ||||
| }else if(clazz.equals(MessageController.class)){ | |||||
| return messageController; | |||||
| } else if (clazz.equals(MessageController.class)) { | |||||
| return messageController; | |||||
| } else { | } else { | ||||
| System.err.println("Keine Controller-Klasse des Typs " + clazz + " gefunden!!!"); | System.err.println("Keine Controller-Klasse des Typs " + clazz + " gefunden!!!"); | ||||
| return null; | return null; | ||||
| } | } | ||||
| }; | }; | ||||
| private int fallIdToShow = -1; | |||||
| @FXML | |||||
| private Label lvFallPlaceholder; | |||||
| private Task<List<Fall>> loadFallTask = null; | |||||
| private Task<Void> loadCaseData = null; | |||||
| public MainController() { | public MainController() { | ||||
| fallController = new FallController(this); | fallController = new FallController(this); | ||||
| @@ -98,7 +95,6 @@ public class MainController { | |||||
| messageController = new MessageController(this); | messageController = new MessageController(this); | ||||
| } | } | ||||
| public Stammdaten getStammdaten() { | public Stammdaten getStammdaten() { | ||||
| return stammdaten; | return stammdaten; | ||||
| } | } | ||||
| @@ -107,7 +103,6 @@ public class MainController { | |||||
| return controllerFactory; | return controllerFactory; | ||||
| } | } | ||||
| public FallController getFallController() { | public FallController getFallController() { | ||||
| return fallController; | return fallController; | ||||
| } | } | ||||
| @@ -128,12 +123,12 @@ public class MainController { | |||||
| return untersuchungenController; | return untersuchungenController; | ||||
| } | } | ||||
| public MessageController getMessageController(){ | |||||
| public MessageController getMessageController() { | |||||
| return messageController; | return messageController; | ||||
| } | } | ||||
| public LogController getLogController(){ | |||||
| return logController; | |||||
| public LogController getLogController() { | |||||
| return logController; | |||||
| } | } | ||||
| public void increaseParallelTaskCount() { | public void increaseParallelTaskCount() { | ||||
| @@ -151,12 +146,9 @@ public class MainController { | |||||
| } | } | ||||
| } | } | ||||
| private int fallIdToShow = -1; | |||||
| public void selectPatientAndFallId(Patient patient, int fallId){ | |||||
| if(patientTablesController.getSelectedPatient()==patient | |||||
| && !loadFallTask.isRunning()){ | |||||
| public void selectPatientAndFallId(Patient patient, int fallId) { | |||||
| if (patientTablesController.getSelectedPatient() == patient | |||||
| && !loadFallTask.isRunning()) { | |||||
| selectFallById(fallId); | selectFallById(fallId); | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -165,13 +157,13 @@ public class MainController { | |||||
| patientTablesController.selectPatient(patient); | patientTablesController.selectPatient(patient); | ||||
| } | } | ||||
| private void selectFallById(int id){ | |||||
| if(lvFall.getItems() == null){ | |||||
| private void selectFallById(int id) { | |||||
| if (lvFall.getItems() == null) { | |||||
| return; | return; | ||||
| } | } | ||||
| for(Fall fall: lvFall.getItems()){ | |||||
| if(fall.getFallID()== id ){ | |||||
| for (Fall fall : lvFall.getItems()) { | |||||
| if (fall.getFallID() == id) { | |||||
| lvFall.getSelectionModel().select(fall); | lvFall.getSelectionModel().select(fall); | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -180,15 +172,6 @@ public class MainController { | |||||
| } | } | ||||
| @FXML | |||||
| private Label lvFallPlaceholder; | |||||
| private Task<List<Fall>> loadFallTask = null; | |||||
| public void refreshCasesFromDb(Patient patient) { | public void refreshCasesFromDb(Patient patient) { | ||||
| lvFall.setItems(null); //clear list | lvFall.setItems(null); //clear list | ||||
| @@ -218,7 +201,7 @@ public class MainController { | |||||
| lvFall.setItems(FXCollections.observableArrayList(getValue())); | lvFall.setItems(FXCollections.observableArrayList(getValue())); | ||||
| decreaseParallelTaskCount(); | decreaseParallelTaskCount(); | ||||
| if(fallIdToShow!=-1){ | |||||
| if (fallIdToShow != -1) { | |||||
| selectFallById(fallIdToShow); | selectFallById(fallIdToShow); | ||||
| fallIdToShow = -1; | fallIdToShow = -1; | ||||
| } | } | ||||
| @@ -246,7 +229,6 @@ public class MainController { | |||||
| thread.start(); | thread.start(); | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void initialize() { | private void initialize() { | ||||
| //Init user data. | //Init user data. | ||||
| @@ -299,12 +281,7 @@ public class MainController { | |||||
| } | } | ||||
| private Task<Void> loadCaseData = null; | |||||
| private void refreshCaseData(Fall fall){ | |||||
| private void refreshCaseData(Fall fall) { | |||||
| if (loadCaseData != null && loadCaseData.isRunning()) { | if (loadCaseData != null && loadCaseData.isRunning()) { | ||||
| loadCaseData.cancel(); | loadCaseData.cancel(); | ||||
| } | } | ||||
| @@ -382,7 +359,7 @@ public class MainController { | |||||
| } | } | ||||
| public void refreshCaseData(){ | |||||
| public void refreshCaseData() { | |||||
| refreshCaseData(lvFall.getSelectionModel().getSelectedItem()); | refreshCaseData(lvFall.getSelectionModel().getSelectedItem()); | ||||
| } | } | ||||
| @@ -400,19 +377,14 @@ public class MainController { | |||||
| } | } | ||||
| public Fall getFall(){ | |||||
| public Fall getFall() { | |||||
| return lvFall.getSelectionModel().getSelectedItem(); | return lvFall.getSelectionModel().getSelectedItem(); | ||||
| } | } | ||||
| public ReadOnlyObjectProperty<Fall> fallProperty(){ | |||||
| return lvFall.getSelectionModel().selectedItemProperty(); | |||||
| public ReadOnlyObjectProperty<Fall> fallProperty() { | |||||
| return lvFall.getSelectionModel().selectedItemProperty(); | |||||
| } | } | ||||
| public enum TabName { | |||||
| OVERVIEW, DIAGNOSE, UNTERSUCHUNG, STATIONSHISTORIE; | |||||
| } | |||||
| public void lockForEdit(TabName exclude) { | public void lockForEdit(TabName exclude) { | ||||
| tabFallDiagnose.setDisable(true); | tabFallDiagnose.setDisable(true); | ||||
| tabFallUntersuchungen.setDisable(true); | tabFallUntersuchungen.setDisable(true); | ||||
| @@ -455,11 +427,15 @@ public enum TabName { | |||||
| } | } | ||||
| public Mitarbeiter getCurrentMitarbeiter() { | public Mitarbeiter getCurrentMitarbeiter() { | ||||
| return cmbUserChoose==null?null:cmbUserChoose.getValue(); | |||||
| return cmbUserChoose == null ? null : cmbUserChoose.getValue(); | |||||
| } | } | ||||
| public ReadOnlyObjectProperty<Mitarbeiter> currentMitarbeiterProperty() { | public ReadOnlyObjectProperty<Mitarbeiter> currentMitarbeiterProperty() { | ||||
| return cmbUserChoose.valueProperty(); | return cmbUserChoose.valueProperty(); | ||||
| } | } | ||||
| public enum TabName { | |||||
| OVERVIEW, DIAGNOSE, UNTERSUCHUNG, STATIONSHISTORIE | |||||
| } | |||||
| } | } | ||||
| @@ -1,12 +1,9 @@ | |||||
| package de.uniluebeck.mi.projmi6.controller; | package de.uniluebeck.mi.projmi6.controller; | ||||
| import de.uniluebeck.mi.projmi6.model.Fall; | |||||
| import de.uniluebeck.mi.projmi6.model.HL7Message; | import de.uniluebeck.mi.projmi6.model.HL7Message; | ||||
| import de.uniluebeck.mi.projmi6.model.Patient; | |||||
| import de.uniluebeck.mi.projmi6.view.MessageIcon; | import de.uniluebeck.mi.projmi6.view.MessageIcon; | ||||
| import javafx.beans.property.SimpleListProperty; | import javafx.beans.property.SimpleListProperty; | ||||
| import javafx.collections.FXCollections; | import javafx.collections.FXCollections; | ||||
| import javafx.collections.ObservableList; | |||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.fxml.FXMLLoader; | import javafx.fxml.FXMLLoader; | ||||
| import javafx.scene.Parent; | import javafx.scene.Parent; | ||||
| @@ -16,36 +13,32 @@ import javafx.stage.Modality; | |||||
| import javafx.stage.Stage; | import javafx.stage.Stage; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.time.LocalDateTime; | |||||
| /** | /** | ||||
| * Created by Johannes on 21/11/2015. | * Created by Johannes on 21/11/2015. | ||||
| */ | */ | ||||
| public class MessageController { | public class MessageController { | ||||
| final MainController mainController; | final MainController mainController; | ||||
| private final SimpleListProperty<HL7Message> messages = new SimpleListProperty(FXCollections.observableArrayList()); | |||||
| @FXML | @FXML | ||||
| private MessageIcon messageIcon; | private MessageIcon messageIcon; | ||||
| private final SimpleListProperty<HL7Message> messages = new SimpleListProperty(FXCollections.observableArrayList()); | |||||
| public MessageController(MainController mainController){ | |||||
| public MessageController(MainController mainController) { | |||||
| this.mainController = mainController; | this.mainController = mainController; | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void initialize(){ | |||||
| private void initialize() { | |||||
| messageIcon.messageCountProperty().bind(messages.sizeProperty()); | messageIcon.messageCountProperty().bind(messages.sizeProperty()); | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void onMessageIconClicked(){ | |||||
| private void onMessageIconClicked() { | |||||
| showMessageList(); | showMessageList(); | ||||
| } | } | ||||
| private void showMessageList(){ | |||||
| private void showMessageList() { | |||||
| FXMLLoader fxmlLoader = new FXMLLoader(); | FXMLLoader fxmlLoader = new FXMLLoader(); | ||||
| fxmlLoader.setLocation(getClass().getClassLoader().getResource("message_list.fxml")); | fxmlLoader.setLocation(getClass().getClassLoader().getResource("message_list.fxml")); | ||||
| MessageListController messageListController = new MessageListController(messages, mainController); | MessageListController messageListController = new MessageListController(messages, mainController); | ||||
| @@ -71,7 +64,7 @@ public class MessageController { | |||||
| } | } | ||||
| public void addMessage(HL7Message message){ | |||||
| public void addMessage(HL7Message message) { | |||||
| messages.add(message); | messages.add(message); | ||||
| mainController.getLogController().refreshLogFromDb(); | mainController.getLogController().refreshLogFromDb(); | ||||
| } | } | ||||
| @@ -3,9 +3,9 @@ package de.uniluebeck.mi.projmi6.controller; | |||||
| /** | /** | ||||
| * Created by Johannes on 21/11/2015. | * 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; | ||||
| import javafx.collections.ObservableList; | |||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.scene.control.Alert; | import javafx.scene.control.Alert; | ||||
| import javafx.scene.control.Button; | import javafx.scene.control.Button; | ||||
| @@ -17,38 +17,35 @@ public class MessageListController { | |||||
| private final SimpleListProperty<HL7Message> messages; | private final SimpleListProperty<HL7Message> messages; | ||||
| private final MainController mainController; | private final MainController mainController; | ||||
| @FXML | |||||
| private ListView<HL7Message> lvMessages; | |||||
| @FXML | |||||
| private Button btnShow; | |||||
| @FXML | |||||
| private Button btnRemove; | |||||
| 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; | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void initialize(){ | |||||
| private void initialize() { | |||||
| lvMessages.setItems(messages); | lvMessages.setItems(messages); | ||||
| 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(messages.getSize()<=0){ | |||||
| ((Stage)lvMessages.getScene().getWindow()).close(); | |||||
| if (messages.getSize() <= 0) { | |||||
| ((Stage) lvMessages.getScene().getWindow()).close(); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private ListView<HL7Message> lvMessages; | |||||
| @FXML | |||||
| private Button btnShow; | |||||
| @FXML | |||||
| private Button btnRemove; | |||||
| @FXML | |||||
| void clickedRemove() { | void clickedRemove() { | ||||
| HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | ||||
| if(message==null){ | |||||
| if (message == null) { | |||||
| return; | return; | ||||
| } | } | ||||
| messages.remove(message); | messages.remove(message); | ||||
| @@ -57,12 +54,12 @@ public class MessageListController { | |||||
| @FXML | @FXML | ||||
| void clickedShow() { | void clickedShow() { | ||||
| HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | HL7Message message = lvMessages.getSelectionModel().getSelectedItem(); | ||||
| if(message==null){ | |||||
| if (message == null) { | |||||
| return; | return; | ||||
| } | } | ||||
| messages.remove(message); | messages.remove(message); | ||||
| if(message.isFailed()){ | |||||
| if (message.isFailed()) { | |||||
| 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"); | ||||
| @@ -71,9 +68,9 @@ public class MessageListController { | |||||
| alert.initModality(Modality.APPLICATION_MODAL); | alert.initModality(Modality.APPLICATION_MODAL); | ||||
| alert.showAndWait(); | alert.showAndWait(); | ||||
| }else{ | |||||
| } else { | |||||
| mainController.selectPatientAndFallId(message.getPatient(), message.getFallId()); | mainController.selectPatientAndFallId(message.getPatient(), message.getFallId()); | ||||
| ((Stage)lvMessages.getScene().getWindow()).close(); | |||||
| ((Stage) lvMessages.getScene().getWindow()).close(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -136,8 +136,7 @@ public class PatientTablesController { | |||||
| return null; | return null; | ||||
| } else { | } else { | ||||
| int selectedPatId = tblStationOverview.getSelectionModel().getSelectedItem().getPatId(); | int selectedPatId = tblStationOverview.getSelectionModel().getSelectedItem().getPatId(); | ||||
| Patient selectedPatient = tblPatientOverview.getItems().stream().filter(p -> p.getPatID() == selectedPatId).findFirst().orElse(null); | |||||
| return selectedPatient; | |||||
| return tblPatientOverview.getItems().stream().filter(p -> p.getPatID() == selectedPatId).findFirst().orElse(null); | |||||
| } | } | ||||
| }, tblPatientOverview.getSelectionModel().selectedItemProperty(), | }, tblPatientOverview.getSelectionModel().selectedItemProperty(), | ||||
| tblStationOverview.getSelectionModel().selectedItemProperty(), | tblStationOverview.getSelectionModel().selectedItemProperty(), | ||||
| @@ -223,7 +222,7 @@ public class PatientTablesController { | |||||
| stage.show(); | stage.show(); | ||||
| } | } | ||||
| 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); | ||||
| } | } | ||||
| @@ -246,7 +245,7 @@ public class PatientTablesController { | |||||
| @Override | @Override | ||||
| protected List<Patient> call() throws Exception { | protected List<Patient> call() throws Exception { | ||||
| return FXCollections.<Patient>observableArrayList(DBHandler.getAllPatients()); | |||||
| return FXCollections.observableArrayList(DBHandler.getAllPatients()); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -294,11 +293,11 @@ public class PatientTablesController { | |||||
| mainController.increaseParallelTaskCount(); | mainController.increaseParallelTaskCount(); | ||||
| Task<List<StationsUebersichtsItem>> loadStatHist = new Task<List<StationsUebersichtsItem>>() { | |||||
| this.loadStationsHistorieTask = new Task<List<StationsUebersichtsItem>>() { | |||||
| @Override | @Override | ||||
| protected List<StationsUebersichtsItem> call() throws Exception { | protected List<StationsUebersichtsItem> call() throws Exception { | ||||
| return FXCollections.<StationsUebersichtsItem>observableArrayList( | |||||
| return FXCollections.observableArrayList( | |||||
| DBHandler.getStationsUebersichtsItems(cmbStationenFilter.getValue().getStation())); | DBHandler.getStationsUebersichtsItems(cmbStationenFilter.getValue().getStation())); | ||||
| } | } | ||||
| @@ -330,7 +329,6 @@ public class PatientTablesController { | |||||
| } | } | ||||
| } | } | ||||
| }; | }; | ||||
| this.loadStationsHistorieTask = loadStatHist; | |||||
| Thread thread = new Thread(loadStationsHistorieTask); | Thread thread = new Thread(loadStationsHistorieTask); | ||||
| thread.setDaemon(true); | thread.setDaemon(true); | ||||
| @@ -351,5 +349,4 @@ public class PatientTablesController { | |||||
| } | } | ||||
| } | } | ||||
| @@ -20,19 +20,17 @@ import java.util.regex.Pattern; | |||||
| public class SettingsController { | public class SettingsController { | ||||
| /** | /** | ||||
| * A pointer to the applications main controller | |||||
| * Regex for the {@link #validateIpString(String)} method. | |||||
| */ | */ | ||||
| private MainController mainController; | |||||
| private static final Pattern PATTERN = Pattern.compile( | |||||
| "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | |||||
| "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | |||||
| "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | |||||
| "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"); | |||||
| /** | /** | ||||
| * Constructor - The object is generated in the MainController. | |||||
| * @param mainController The MainController that generates this object. | |||||
| * A pointer to the applications main controller | |||||
| */ | */ | ||||
| public SettingsController (MainController mainController){ | |||||
| this.mainController = mainController; | |||||
| } | |||||
| private MainController mainController; | |||||
| /** | /** | ||||
| * The button that for saving the data in the text fields. | * The button that for saving the data in the text fields. | ||||
| */ | */ | ||||
| @@ -48,14 +46,34 @@ public class SettingsController { | |||||
| /** | /** | ||||
| * Constructor - The object is generated in the MainController. | |||||
| * | |||||
| * @param mainController The MainController that generates this object. | |||||
| */ | |||||
| public SettingsController(MainController mainController) { | |||||
| this.mainController = mainController; | |||||
| } | |||||
| /** | |||||
| * Checks if the given string is a ip address string. | |||||
| * | |||||
| * @param ip The string to be validated. | |||||
| * @return true if ip is a valid ip address, otherwise false | |||||
| */ | |||||
| public static boolean validateIpString(final String ip) { | |||||
| return PATTERN.matcher(ip).matches(); | |||||
| } | |||||
| /** | |||||
| * initialize()-method for the FXMLLoader. | * initialize()-method for the FXMLLoader. | ||||
| */ | */ | ||||
| @FXML | @FXML | ||||
| private void initialize(){ | |||||
| private void initialize() { | |||||
| opsServerIp.setText(Main.OPS_IP); | opsServerIp.setText(Main.OPS_IP); | ||||
| opsServerPort.setText(Integer.toString(Main.OPS_PORT)); | opsServerPort.setText(Integer.toString(Main.OPS_PORT)); | ||||
| opsServerSave.setOnAction(event -> { | opsServerSave.setOnAction(event -> { | ||||
| if(validateData(opsServerIp.getText(), opsServerPort.getText())){ | |||||
| if (validateData(opsServerIp.getText(), opsServerPort.getText())) { | |||||
| Main.OPS_IP = opsServerIp.getText(); | Main.OPS_IP = opsServerIp.getText(); | ||||
| Main.OPS_PORT = Integer.parseInt(opsServerPort.getText()); | Main.OPS_PORT = Integer.parseInt(opsServerPort.getText()); | ||||
| @@ -71,7 +89,8 @@ public class SettingsController { | |||||
| /** | /** | ||||
| * Validation error dialog. | * Validation error dialog. | ||||
| * @param title The dialogs header text. | |||||
| * | |||||
| * @param title The dialogs header text. | |||||
| * @param message The dialogs content text. | * @param message The dialogs content text. | ||||
| */ | */ | ||||
| private void showMessage(String title, String message) { | private void showMessage(String title, String message) { | ||||
| @@ -83,28 +102,27 @@ public class SettingsController { | |||||
| alert.showAndWait(); | alert.showAndWait(); | ||||
| } | } | ||||
| /** | /** | ||||
| * Checks if the OPS-servers IP address and portnumber are valid, | * Checks if the OPS-servers IP address and portnumber are valid, | ||||
| * shows error messages if not. | * shows error messages if not. | ||||
| * | * | ||||
| * @param serverIp The servers ip address as string | * @param serverIp The servers ip address as string | ||||
| * @param portStr The port number as string | |||||
| * @param portStr The port number as string | |||||
| * @return true if serverIp is a valid ip and portStr a valid port number | * @return true if serverIp is a valid ip and portStr a valid port number | ||||
| */ | */ | ||||
| private boolean validateData(String serverIp, String portStr){ | |||||
| private boolean validateData(String serverIp, String portStr) { | |||||
| int port = -1; | int port = -1; | ||||
| try{ | |||||
| try { | |||||
| port = Integer.parseInt(portStr); | port = Integer.parseInt(portStr); | ||||
| }catch (Exception e){ | |||||
| } catch (Exception e) { | |||||
| showMessage("Portnummer ist nicht valide!", "Die Portnummer muss eine Zahl zwischen 1024 und 65535 sein!"); | showMessage("Portnummer ist nicht valide!", "Die Portnummer muss eine Zahl zwischen 1024 und 65535 sein!"); | ||||
| return false; | |||||
| return false; | |||||
| } | } | ||||
| if(!(port >= 1024 && port <= 65535)){ | |||||
| if (!(port >= 1024 && port <= 65535)) { | |||||
| showMessage("Portnummer ist nicht valide!", "Die Portnummer muss eine Zahl zwischen 1024 und 65535 sein!"); | showMessage("Portnummer ist nicht valide!", "Die Portnummer muss eine Zahl zwischen 1024 und 65535 sein!"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| if(!validateIpString(serverIp)){ | |||||
| if (!validateIpString(serverIp)) { | |||||
| showMessage("IP-Adresse nicht valide!", "Die IP-Adresse ist nicht g\u00fcltig!"); | showMessage("IP-Adresse nicht valide!", "Die IP-Adresse ist nicht g\u00fcltig!"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -112,24 +130,5 @@ public class SettingsController { | |||||
| return true; | return true; | ||||
| } | } | ||||
| /** | |||||
| * Regex for the {@link #validateIpString(String)} method. | |||||
| */ | |||||
| private static final Pattern PATTERN = Pattern.compile( | |||||
| "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | |||||
| "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | |||||
| "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | |||||
| "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"); | |||||
| /** | |||||
| * Checks if the given string is a ip address string. | |||||
| * | |||||
| * @param ip The string to be validated. | |||||
| * @return true if ip is a valid ip address, otherwise false | |||||
| */ | |||||
| public static boolean validateIpString(final String ip) { | |||||
| return PATTERN.matcher(ip).matches(); | |||||
| } | |||||
| } | } | ||||
| @@ -26,14 +26,14 @@ import java.util.stream.Collectors; | |||||
| /** | /** | ||||
| * The controller class for the hospital ward history. | * The controller class for the hospital ward history. | ||||
| * | |||||
| * <p> | |||||
| * Created by Johannes on 12.11.15. | * Created by Johannes on 12.11.15. | ||||
| */ | */ | ||||
| public class StationsHistorieController { | public class StationsHistorieController { | ||||
| private final SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); | |||||
| @FXML | @FXML | ||||
| private Button btnStatHistAbort; | private Button btnStatHistAbort; | ||||
| private final SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); | |||||
| @FXML | @FXML | ||||
| private GridPane fields; | private GridPane fields; | ||||
| @FXML | @FXML | ||||
| @@ -46,15 +46,15 @@ public class StationsHistorieController { | |||||
| private StationsHistorie stationsHistorieSelected = null; | private StationsHistorie stationsHistorieSelected = null; | ||||
| private MainController mainController; | private MainController mainController; | ||||
| @FXML | @FXML | ||||
| private TableView<StationsHistorie>tblStationsHistorie; | |||||
| private TableView<StationsHistorie> tblStationsHistorie; | |||||
| @FXML | @FXML | ||||
| private Button btnStatHistCancel, btnStatHistSave; | private Button btnStatHistCancel, btnStatHistSave; | ||||
| @FXML | @FXML | ||||
| private Label statHistCreator, statHistCreateTime, statHistEditor, statHistEditTime; | private Label statHistCreator, statHistCreateTime, statHistEditor, statHistEditTime; | ||||
| @FXML | @FXML | ||||
| private TableColumn<StationsHistorie,String> colStatHistStation; | |||||
| private TableColumn<StationsHistorie, String> colStatHistStation; | |||||
| @FXML | @FXML | ||||
| private TableColumn<StationsHistorie,LocalDate> colStatHistAufnahmeDatum, colStatHistEntlassungsDatum; | |||||
| private TableColumn<StationsHistorie, LocalDate> colStatHistAufnahmeDatum, colStatHistEntlassungsDatum; | |||||
| @FXML | @FXML | ||||
| private DateTimePicker dtTmAufnahme, dtTmEntlassung; | private DateTimePicker dtTmAufnahme, dtTmEntlassung; | ||||
| @FXML | @FXML | ||||
| @@ -112,9 +112,9 @@ public class StationsHistorieController { | |||||
| }); | }); | ||||
| } | } | ||||
| private void initButtons(){ | |||||
| private void initButtons() { | |||||
| // btnStatHistCancel.visibleProperty().bind(state.isEqualTo(State.VIEW).and(tblStationsHistorie.getSelectionModel().selectedItemProperty().isNotNull())); | // btnStatHistCancel.visibleProperty().bind(state.isEqualTo(State.VIEW).and(tblStationsHistorie.getSelectionModel().selectedItemProperty().isNotNull())); | ||||
| // btnStatHistCancel.managedProperty().bind(btnStatHistCancel.visibleProperty()); | |||||
| // btnStatHistCancel.managedProperty().bind(btnStatHistCancel.visibleProperty()); | |||||
| btnStatHistSave.visibleProperty().bind(state.isEqualTo(State.VIEW).not()); | btnStatHistSave.visibleProperty().bind(state.isEqualTo(State.VIEW).not()); | ||||
| btnStatHistSave.managedProperty().bind(btnStatHistSave.visibleProperty()); | btnStatHistSave.managedProperty().bind(btnStatHistSave.visibleProperty()); | ||||
| @@ -123,18 +123,18 @@ public class StationsHistorieController { | |||||
| btnStatHistAbort.managedProperty().bind(btnStatHistAbort.visibleProperty()); | btnStatHistAbort.managedProperty().bind(btnStatHistAbort.visibleProperty()); | ||||
| btnStatHistEdit.visibleProperty().bind(state.isEqualTo(State.VIEW) | btnStatHistEdit.visibleProperty().bind(state.isEqualTo(State.VIEW) | ||||
| .and(tblStationsHistorie.getSelectionModel().selectedItemProperty().isNotNull())); | |||||
| .and(tblStationsHistorie.getSelectionModel().selectedItemProperty().isNotNull())); | |||||
| btnStatHistEdit.managedProperty().bind(btnStatHistEdit.visibleProperty()); | btnStatHistEdit.managedProperty().bind(btnStatHistEdit.visibleProperty()); | ||||
| btnStatHistDelete.visibleProperty().bind(btnStatHistEdit.visibleProperty()); | btnStatHistDelete.visibleProperty().bind(btnStatHistEdit.visibleProperty()); | ||||
| btnStatHistDelete.managedProperty().bind(btnStatHistDelete.visibleProperty()); | btnStatHistDelete.managedProperty().bind(btnStatHistDelete.visibleProperty()); | ||||
| } | } | ||||
| private void initStationsFilter(){ | |||||
| private void initStationsFilter() { | |||||
| final String any = "beliebig"; | final String any = "beliebig"; | ||||
| List<String> abteilungen = mainController.getStammdaten().getStationen().stream() | List<String> abteilungen = mainController.getStammdaten().getStationen().stream() | ||||
| .map(stat->stat.getAbteilung()).distinct().collect(Collectors.toList()); | |||||
| .map(stat -> stat.getAbteilung()).distinct().collect(Collectors.toList()); | |||||
| Collections.sort(abteilungen); | Collections.sort(abteilungen); | ||||
| cmbAbteilung.setItems(FXCollections.observableArrayList(abteilungen)); | cmbAbteilung.setItems(FXCollections.observableArrayList(abteilungen)); | ||||
| cmbAbteilung.getItems().add(0, any); | cmbAbteilung.getItems().add(0, any); | ||||
| @@ -149,12 +149,11 @@ public class StationsHistorieController { | |||||
| FilteredList<Station> stationenFiltered = new FilteredList<Station>(mainController.getStammdaten().getStationen()); | FilteredList<Station> stationenFiltered = new FilteredList<Station>(mainController.getStammdaten().getStationen()); | ||||
| stationenFiltered.predicateProperty().bind(Bindings.createObjectBinding(() -> { | stationenFiltered.predicateProperty().bind(Bindings.createObjectBinding(() -> { | ||||
| if(cmbAbteilung.getValue()==null || cmbAbteilung.getValue().equals(any)){ | |||||
| return p->true; | |||||
| if (cmbAbteilung.getValue() == null || cmbAbteilung.getValue().equals(any)) { | |||||
| return p -> true; | |||||
| } | } | ||||
| return p -> p.getAbteilung().equals(cmbAbteilung.getValue()); | return p -> p.getAbteilung().equals(cmbAbteilung.getValue()); | ||||
| },cmbAbteilung.valueProperty())); | |||||
| }, cmbAbteilung.valueProperty())); | |||||
| cmbStation.setItems(stationenFiltered); | cmbStation.setItems(stationenFiltered); | ||||
| @@ -173,7 +172,7 @@ public class StationsHistorieController { | |||||
| if (getState() == State.CREATE) { | if (getState() == State.CREATE) { | ||||
| StationsHistorie stationsHistorie = new StationsHistorie(); | StationsHistorie stationsHistorie = new StationsHistorie(); | ||||
| copyFieldDataIntoStationsHistorie(stationsHistorie); | copyFieldDataIntoStationsHistorie(stationsHistorie); | ||||
| if(!validateData(stationsHistorie)){ | |||||
| if (!validateData(stationsHistorie)) { | |||||
| return; | return; | ||||
| } | } | ||||
| try { | try { | ||||
| @@ -184,7 +183,7 @@ public class StationsHistorieController { | |||||
| mainController.refreshCaseData(); | mainController.refreshCaseData(); | ||||
| } else { | } else { | ||||
| copyFieldDataIntoStationsHistorie(stationsHistorieSelected); | copyFieldDataIntoStationsHistorie(stationsHistorieSelected); | ||||
| if(!validateData(stationsHistorieSelected)){ | |||||
| if (!validateData(stationsHistorieSelected)) { | |||||
| return; | return; | ||||
| } | } | ||||
| try { | try { | ||||
| @@ -247,32 +246,32 @@ public class StationsHistorieController { | |||||
| return stationsHistorie; | return stationsHistorie; | ||||
| } | } | ||||
| public void setStationsHistorieSelected(StationsHistorie stationsHistorie){ | |||||
| this.stationsHistorieSelected=stationsHistorie; | |||||
| if(stationsHistorie==null){ | |||||
| public void setStationsHistorieSelected(StationsHistorie stationsHistorie) { | |||||
| this.stationsHistorieSelected = stationsHistorie; | |||||
| if (stationsHistorie == null) { | |||||
| clearFields(); | clearFields(); | ||||
| }else { | |||||
| } else { | |||||
| copyStationsHistorieDataIntoFields(); | copyStationsHistorieDataIntoFields(); | ||||
| } | } | ||||
| } | } | ||||
| private void initColumns(){ | |||||
| colStatHistStation.setCellValueFactory(new PropertyValueFactory<StationsHistorie, String>("stationKey")); | |||||
| colStatHistAufnahmeDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("aufnahmeDatum")); | |||||
| colStatHistEntlassungsDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("entlassungsDatum")); | |||||
| private void initColumns() { | |||||
| colStatHistStation.setCellValueFactory(new PropertyValueFactory<StationsHistorie, String>("stationKey")); | |||||
| colStatHistAufnahmeDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("aufnahmeDatum")); | |||||
| colStatHistEntlassungsDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("entlassungsDatum")); | |||||
| } | } | ||||
| private void copyStationsHistorieDataIntoFields(){ | |||||
| private void copyStationsHistorieDataIntoFields() { | |||||
| if(stationsHistorieSelected==null){ | |||||
| if (stationsHistorieSelected == null) { | |||||
| clearFields(); | clearFields(); | ||||
| return; | return; | ||||
| } | } | ||||
| //Setze Station im Dropdownfeld | //Setze Station im Dropdownfeld | ||||
| for (Station station : cmbStation.getItems()) { | for (Station station : cmbStation.getItems()) { | ||||
| if(station.getStation().equals(stationsHistorieSelected.getStationKey())){ | |||||
| if (station.getStation().equals(stationsHistorieSelected.getStationKey())) { | |||||
| cmbStation.getSelectionModel().select(station); | cmbStation.getSelectionModel().select(station); | ||||
| cmbAbteilung.getSelectionModel().select(station.getAbteilung()); | cmbAbteilung.getSelectionModel().select(station.getAbteilung()); | ||||
| break; | break; | ||||
| @@ -280,13 +279,11 @@ public class StationsHistorieController { | |||||
| } | } | ||||
| dtTmAufnahme.setDateTime(stationsHistorieSelected.getAufnahmeDatum()); | dtTmAufnahme.setDateTime(stationsHistorieSelected.getAufnahmeDatum()); | ||||
| dtTmEntlassung.setDateTime(stationsHistorieSelected.getEntlassungsDatum()); | dtTmEntlassung.setDateTime(stationsHistorieSelected.getEntlassungsDatum()); | ||||
| statHistCreator.setText(Integer.toString(stationsHistorieSelected.getErsteller())); | statHistCreator.setText(Integer.toString(stationsHistorieSelected.getErsteller())); | ||||
| if(stationsHistorieSelected.getErstellDatumZeit()!=null){ | |||||
| if (stationsHistorieSelected.getErstellDatumZeit() != null) { | |||||
| statHistCreateTime.setText(stationsHistorieSelected.getErstellDatumZeit().toString()); | statHistCreateTime.setText(stationsHistorieSelected.getErstellDatumZeit().toString()); | ||||
| } | } | ||||
| statHistEditor.setText(Integer.toString(stationsHistorieSelected.getBearbeiter())); | statHistEditor.setText(Integer.toString(stationsHistorieSelected.getBearbeiter())); | ||||
| @@ -295,14 +292,14 @@ public class StationsHistorieController { | |||||
| } | } | ||||
| } | } | ||||
| private void copyFieldDataIntoStationsHistorie(StationsHistorie stationsHistorie){ | |||||
| private void copyFieldDataIntoStationsHistorie(StationsHistorie stationsHistorie) { | |||||
| stationsHistorie.setAufnahmeDatum(dtTmAufnahme.getDateTime()); | stationsHistorie.setAufnahmeDatum(dtTmAufnahme.getDateTime()); | ||||
| stationsHistorie.setEntlassungsDatum(dtTmEntlassung.getDateTime()); | stationsHistorie.setEntlassungsDatum(dtTmEntlassung.getDateTime()); | ||||
| stationsHistorie.setStation(cmbStation.getValue()); | stationsHistorie.setStation(cmbStation.getValue()); | ||||
| stationsHistorie.setFallID(mainController.getFallController().getFall().getFallID()); | stationsHistorie.setFallID(mainController.getFallController().getFall().getFallID()); | ||||
| if(cmbStation.getValue()!= null){ | |||||
| if (cmbStation.getValue() != null) { | |||||
| stationsHistorie.setStationKey(cmbStation.getValue().getStation()); | stationsHistorie.setStationKey(cmbStation.getValue().getStation()); | ||||
| }else{ | |||||
| } else { | |||||
| stationsHistorie.setStationKey(null); | stationsHistorie.setStationKey(null); | ||||
| } | } | ||||
| stationsHistorie.setErsteller(mainController.getCurrentMitarbeiter().getMitarbID()); | stationsHistorie.setErsteller(mainController.getCurrentMitarbeiter().getMitarbID()); | ||||
| @@ -320,17 +317,17 @@ public class StationsHistorieController { | |||||
| } | } | ||||
| private boolean validateData(StationsHistorie stationsHistorie){ | |||||
| if(stationsHistorie.getStationKey()==null){ | |||||
| private boolean validateData(StationsHistorie stationsHistorie) { | |||||
| if (stationsHistorie.getStationKey() == null) { | |||||
| showMessage("Keine Station ausgew\00e4hlt!", "Bitte Station und nicht nur Abteilung ausw\00e4hlen!"); | showMessage("Keine Station ausgew\00e4hlt!", "Bitte Station und nicht nur Abteilung ausw\00e4hlen!"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| if(stationsHistorie.getAufnahmeDatum()==null){ | |||||
| if (stationsHistorie.getAufnahmeDatum() == null) { | |||||
| showMessage("Aufnahmedatum fehlt!", "Bitte den Beginn des Stationsaufenthalts angeben!"); | showMessage("Aufnahmedatum fehlt!", "Bitte den Beginn des Stationsaufenthalts angeben!"); | ||||
| return false; | |||||
| return false; | |||||
| } | } | ||||
| if(stationsHistorie.getEntlassungsDatum() != null && | |||||
| stationsHistorie.getAufnahmeDatum().isAfter(stationsHistorie.getEntlassungsDatum())){ | |||||
| if (stationsHistorie.getEntlassungsDatum() != null && | |||||
| stationsHistorie.getAufnahmeDatum().isAfter(stationsHistorie.getEntlassungsDatum())) { | |||||
| showMessage("Aufnahmedatum liegt hinter Entlassungsdatum!", "Bitte die eingegebenen Daten nocheinmal kontrollieren!"); | showMessage("Aufnahmedatum liegt hinter Entlassungsdatum!", "Bitte die eingegebenen Daten nocheinmal kontrollieren!"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -339,7 +336,7 @@ public class StationsHistorieController { | |||||
| return true; | return true; | ||||
| } | } | ||||
| private void clearFields(){ | |||||
| private void clearFields() { | |||||
| statHistCreateTime.setText(""); | statHistCreateTime.setText(""); | ||||
| statHistCreator.setText(""); | statHistCreator.setText(""); | ||||
| @@ -13,7 +13,6 @@ import de.uniluebeck.mi.projmi6.view.SelectKeyComboBoxListener; | |||||
| import javafx.beans.property.ReadOnlyObjectProperty; | import javafx.beans.property.ReadOnlyObjectProperty; | ||||
| import javafx.beans.property.SimpleObjectProperty; | import javafx.beans.property.SimpleObjectProperty; | ||||
| import javafx.collections.ObservableList; | import javafx.collections.ObservableList; | ||||
| import javafx.event.ActionEvent; | |||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.scene.control.*; | import javafx.scene.control.*; | ||||
| import javafx.scene.layout.GridPane; | import javafx.scene.layout.GridPane; | ||||
| @@ -28,65 +27,33 @@ import java.sql.SQLException; | |||||
| */ | */ | ||||
| public class UntersuchungenController { | public class UntersuchungenController { | ||||
| /** | |||||
| * The states the controller might be. | |||||
| */ | |||||
| public enum State { | |||||
| CREATE, EDIT, VIEW | |||||
| } | |||||
| private final SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); | |||||
| /** | |||||
| * A getter for the {@link #stateProperty()}. | |||||
| * @return The controllers current state | |||||
| */ | |||||
| public State getState() { | |||||
| return state.get(); | |||||
| } | |||||
| /** | |||||
| * A property for the state of the controller/UI. | |||||
| * @return | |||||
| */ | |||||
| public ReadOnlyObjectProperty<State> stateProperty() { | |||||
| return state; | |||||
| } | |||||
| private final SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); | |||||
| /** | /** | ||||
| * The list of examinations that is shown in the views that belong to the controller. | * The list of examinations that is shown in the views that belong to the controller. | ||||
| */ | */ | ||||
| private SimpleObjectProperty<ObservableList<Untersuchung>> untersuchungen = new SimpleObjectProperty<>(); | private SimpleObjectProperty<ObservableList<Untersuchung>> untersuchungen = new SimpleObjectProperty<>(); | ||||
| /** | /** | ||||
| * A pointer to the main controller. | * A pointer to the main controller. | ||||
| */ | */ | ||||
| private MainController mainController; | private MainController mainController; | ||||
| @FXML | @FXML | ||||
| private Button btnUntsCancel, btnUntsCreate, btnUntsSave, btnUntsAbort; | private Button btnUntsCancel, btnUntsCreate, btnUntsSave, btnUntsAbort; | ||||
| @FXML | @FXML | ||||
| private DateTimePicker dtTmUntersuchungszeitpunkt; | private DateTimePicker dtTmUntersuchungszeitpunkt; | ||||
| @FXML | @FXML | ||||
| private Label untsChanger, untsCreator, untsChangeTime, untsCreateTime; | |||||
| private Label untsChanger, untsCreator, untsChangeTime, untsCreateTime; | |||||
| @FXML | @FXML | ||||
| private ListView<Untersuchung> untsList; | private ListView<Untersuchung> untsList; | ||||
| @FXML | @FXML | ||||
| private ComboBox<OpsCode> untsOpsCode; | private ComboBox<OpsCode> untsOpsCode; | ||||
| @FXML | @FXML | ||||
| private GridPane fields; | private GridPane fields; | ||||
| @FXML | @FXML | ||||
| private ComboBox<Mitarbeiter> untsArzt; | private ComboBox<Mitarbeiter> untsArzt; | ||||
| /** | /** | ||||
| * Constructor for the mainController. | * Constructor for the mainController. | ||||
| * | |||||
| * @param mainController The MainController that created this instance. | * @param mainController The MainController that created this instance. | ||||
| */ | */ | ||||
| public UntersuchungenController(MainController mainController) { | public UntersuchungenController(MainController mainController) { | ||||
| @@ -94,16 +61,35 @@ public class UntersuchungenController { | |||||
| } | } | ||||
| /** | /** | ||||
| * A getter for the {@link #stateProperty()}. | |||||
| * | |||||
| * @return The controllers current state | |||||
| */ | |||||
| public State getState() { | |||||
| return state.get(); | |||||
| } | |||||
| /** | |||||
| * A property for the state of the controller/UI. | |||||
| * | |||||
| * @return | |||||
| */ | |||||
| public ReadOnlyObjectProperty<State> stateProperty() { | |||||
| return state; | |||||
| } | |||||
| /** | |||||
| * A getter for the {@link #untersuchungenProperty()}. Might be null. | * A getter for the {@link #untersuchungenProperty()}. Might be null. | ||||
| * | |||||
| * @return The list of examinations that are shown in this view. | * @return The list of examinations that are shown in this view. | ||||
| */ | */ | ||||
| public ObservableList<Untersuchung> getUntersuchungen() { | public ObservableList<Untersuchung> getUntersuchungen() { | ||||
| return untersuchungen.get(); | return untersuchungen.get(); | ||||
| } | } | ||||
| /** | /** | ||||
| * A setter for the {@link #untersuchungenProperty()}. Might be null. | * A setter for the {@link #untersuchungenProperty()}. Might be null. | ||||
| * | |||||
| * @param untersuchungen The ObservableList to set. | * @param untersuchungen The ObservableList to set. | ||||
| */ | */ | ||||
| public void setUntersuchungen(ObservableList<Untersuchung> untersuchungen) { | public void setUntersuchungen(ObservableList<Untersuchung> untersuchungen) { | ||||
| @@ -120,18 +106,17 @@ public class UntersuchungenController { | |||||
| /** | /** | ||||
| * Initializes the comboboxes with values. | * Initializes the comboboxes with values. | ||||
| */ | */ | ||||
| private void initComboBoxes(){ | |||||
| private void initComboBoxes() { | |||||
| untsOpsCode.itemsProperty().bind(mainController.getStammdaten().opsCodesProperty()); | untsOpsCode.itemsProperty().bind(mainController.getStammdaten().opsCodesProperty()); | ||||
| new SelectKeyComboBoxListener(untsOpsCode); | new SelectKeyComboBoxListener(untsOpsCode); | ||||
| untsArzt.itemsProperty().bind(mainController.getStammdaten().mitarbeiterProperty()); | untsArzt.itemsProperty().bind(mainController.getStammdaten().mitarbeiterProperty()); | ||||
| } | } | ||||
| /** | /** | ||||
| * Binds the buttons visibility to the controllers current state. | * Binds the buttons visibility to the controllers current state. | ||||
| */ | */ | ||||
| private void initButtons(){ | |||||
| private void initButtons() { | |||||
| btnUntsCreate.disableProperty().bind(mainController.fallProperty().isNull()); | btnUntsCreate.disableProperty().bind(mainController.fallProperty().isNull()); | ||||
| btnUntsCancel.managedProperty().bind(state.isEqualTo(State.VIEW) | btnUntsCancel.managedProperty().bind(state.isEqualTo(State.VIEW) | ||||
| @@ -148,29 +133,29 @@ public class UntersuchungenController { | |||||
| /** | /** | ||||
| * Set up data, disable property and listener. | * Set up data, disable property and listener. | ||||
| */ | */ | ||||
| private void initList(){ | |||||
| private void initList() { | |||||
| untsList.itemsProperty().bind(untersuchungen); | untsList.itemsProperty().bind(untersuchungen); | ||||
| untsList.getSelectionModel().selectedItemProperty().addListener( | untsList.getSelectionModel().selectedItemProperty().addListener( | ||||
| (observable, oldVal, newVal) -> copyUntersuchungDataIntoFields()); | (observable, oldVal, newVal) -> copyUntersuchungDataIntoFields()); | ||||
| untsList.disableProperty().bind(state.isNotEqualTo(State.VIEW)); | untsList.disableProperty().bind(state.isNotEqualTo(State.VIEW)); | ||||
| untsList.setCellFactory(lv -> { | untsList.setCellFactory(lv -> { | ||||
| return new ListCell<Untersuchung>(){ | |||||
| return new ListCell<Untersuchung>() { | |||||
| @Override | @Override | ||||
| protected void updateItem(Untersuchung item, boolean empty) { | protected void updateItem(Untersuchung item, boolean empty) { | ||||
| super.updateItem(item, empty); | super.updateItem(item, empty); | ||||
| if(item==null||empty){ | |||||
| if (item == null || empty) { | |||||
| setText(null); | setText(null); | ||||
| setGraphic(null); | setGraphic(null); | ||||
| return; | return; | ||||
| } | } | ||||
| setText(item.toString()); | setText(item.toString()); | ||||
| if(item.getStorniert()){ | |||||
| if (item.getStorniert()) { | |||||
| setTextFill(Color.GRAY); | setTextFill(Color.GRAY); | ||||
| Text text = new Text("<storniert> "); | Text text = new Text("<storniert> "); | ||||
| text.setFill(Color.RED); | text.setFill(Color.RED); | ||||
| setGraphic(text); | setGraphic(text); | ||||
| }else{ | |||||
| } else { | |||||
| setTextFill(Color.BLACK); | setTextFill(Color.BLACK); | ||||
| setGraphic(null); | setGraphic(null); | ||||
| } | } | ||||
| @@ -183,7 +168,7 @@ public class UntersuchungenController { | |||||
| * FXMLLoaders init method. | * FXMLLoaders init method. | ||||
| */ | */ | ||||
| @FXML | @FXML | ||||
| void initialize(){ | |||||
| void initialize() { | |||||
| //Clear fields on startup | //Clear fields on startup | ||||
| copyUntersuchungDataIntoFields(); | copyUntersuchungDataIntoFields(); | ||||
| @@ -194,9 +179,9 @@ public class UntersuchungenController { | |||||
| fields.disableProperty().bind(state.isEqualTo(State.VIEW)); | fields.disableProperty().bind(state.isEqualTo(State.VIEW)); | ||||
| state.addListener((observable, oldValue, newValue) -> { | state.addListener((observable, oldValue, newValue) -> { | ||||
| if(newValue==State.VIEW){ | |||||
| if (newValue == State.VIEW) { | |||||
| mainController.unlockFromEdit(); | mainController.unlockFromEdit(); | ||||
| }else{ | |||||
| } else { | |||||
| mainController.lockForEdit(MainController.TabName.UNTERSUCHUNG); | mainController.lockForEdit(MainController.TabName.UNTERSUCHUNG); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -218,23 +203,23 @@ public class UntersuchungenController { | |||||
| @FXML | @FXML | ||||
| private void clickedUntsCancel() { | private void clickedUntsCancel() { | ||||
| Untersuchung untersuchung = untsList.getSelectionModel().getSelectedItem(); | Untersuchung untersuchung = untsList.getSelectionModel().getSelectedItem(); | ||||
| if(untersuchung==null) { | |||||
| if (untersuchung == null) { | |||||
| return; | return; | ||||
| } | } | ||||
| untersuchung.setStorniert(true); | untersuchung.setStorniert(true); | ||||
| try { | try { | ||||
| DBHandler.setUntersuchung(untersuchung, mainController.getCurrentMitarbeiter().getMitarbID(), true); | DBHandler.setUntersuchung(untersuchung, mainController.getCurrentMitarbeiter().getMitarbID(), true); | ||||
| }catch (Exception e){ | |||||
| } catch (Exception e) { | |||||
| e.printStackTrace(); | e.printStackTrace(); | ||||
| } | } | ||||
| mainController.refreshCaseData(); | |||||
| mainController.refreshCaseData(); | |||||
| } | } | ||||
| /** | /** | ||||
| * Handler for the abort button. Aborts editing/creating. | * Handler for the abort button. Aborts editing/creating. | ||||
| */ | */ | ||||
| @FXML | @FXML | ||||
| private void clickedUntsAbort(){ | |||||
| private void clickedUntsAbort() { | |||||
| state.set(State.VIEW); | state.set(State.VIEW); | ||||
| copyUntersuchungDataIntoFields(); | copyUntersuchungDataIntoFields(); | ||||
| } | } | ||||
| @@ -253,20 +238,19 @@ public class UntersuchungenController { | |||||
| } catch (SQLException e) { | } catch (SQLException e) { | ||||
| e.printStackTrace(); | e.printStackTrace(); | ||||
| } | } | ||||
| } else if(state.get()==State.EDIT){ | |||||
| } else if (state.get() == State.EDIT) { | |||||
| Untersuchung untersuchung = untsList.getSelectionModel().getSelectedItem(); | Untersuchung untersuchung = untsList.getSelectionModel().getSelectedItem(); | ||||
| copyFieldDataIntoUntersuchung(untersuchung); | copyFieldDataIntoUntersuchung(untersuchung); | ||||
| //... | //... | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Copy the currently selected Untersuchung object into the fields on the right. | * Copy the currently selected Untersuchung object into the fields on the right. | ||||
| */ | */ | ||||
| private void copyUntersuchungDataIntoFields(){ | |||||
| private void copyUntersuchungDataIntoFields() { | |||||
| Untersuchung untersuchung = untsList.getSelectionModel().getSelectedItem(); | Untersuchung untersuchung = untsList.getSelectionModel().getSelectedItem(); | ||||
| if(untersuchung==null){ | |||||
| if (untersuchung == null) { | |||||
| clearFields(); | clearFields(); | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -283,18 +267,19 @@ public class UntersuchungenController { | |||||
| /** | /** | ||||
| * Copies the values from the TextFields and ComboBoxes into the given Untersuchung object. | * Copies the values from the TextFields and ComboBoxes into the given Untersuchung object. | ||||
| * | |||||
| * @param untersuchung The object the data will be copied into. | * @param untersuchung The object the data will be copied into. | ||||
| */ | */ | ||||
| private void copyFieldDataIntoUntersuchung(Untersuchung untersuchung){ | |||||
| untersuchung.setOpscode(untsOpsCode.getValue()); | |||||
| untersuchung.setDurchfuehrenderArzt(untsArzt.getValue()); | |||||
| untersuchung.setUntersuchungsdatum(dtTmUntersuchungszeitpunkt.getDateTime()); | |||||
| private void copyFieldDataIntoUntersuchung(Untersuchung untersuchung) { | |||||
| untersuchung.setOpscode(untsOpsCode.getValue()); | |||||
| untersuchung.setDurchfuehrenderArzt(untsArzt.getValue()); | |||||
| untersuchung.setUntersuchungsdatum(dtTmUntersuchungszeitpunkt.getDateTime()); | |||||
| } | } | ||||
| /** | /** | ||||
| * Clears the TextFields. | * Clears the TextFields. | ||||
| */ | */ | ||||
| private void clearFields(){ | |||||
| private void clearFields() { | |||||
| untsCreateTime.setText(""); | untsCreateTime.setText(""); | ||||
| untsCreator.setText(""); | untsCreator.setText(""); | ||||
| untsChangeTime.setText(""); | untsChangeTime.setText(""); | ||||
| @@ -306,6 +291,12 @@ public class UntersuchungenController { | |||||
| } | } | ||||
| /** | |||||
| * The states the controller might be. | |||||
| */ | |||||
| public enum State { | |||||
| CREATE, EDIT, VIEW | |||||
| } | |||||
| } | } | ||||
| @@ -140,13 +140,7 @@ public class HL7Sender { | |||||
| response = initiator.sendAndReceive(adt); | response = initiator.sendAndReceive(adt); | ||||
| Thread.sleep(5000); | Thread.sleep(5000); | ||||
| } | } | ||||
| } catch (HL7Exception e) { | |||||
| e.printStackTrace(); | |||||
| } catch (LLPException e) { | |||||
| e.printStackTrace(); | |||||
| } catch (IOException e) { | |||||
| e.printStackTrace(); | |||||
| } catch (InterruptedException e) { | |||||
| } catch (HL7Exception | LLPException | IOException | InterruptedException e) { | |||||
| e.printStackTrace(); | e.printStackTrace(); | ||||
| } | } | ||||
| @@ -4,7 +4,6 @@ import ca.uhn.hl7v2.DefaultHapiContext; | |||||
| import ca.uhn.hl7v2.HapiContext; | import ca.uhn.hl7v2.HapiContext; | ||||
| import ca.uhn.hl7v2.app.HL7Service; | import ca.uhn.hl7v2.app.HL7Service; | ||||
| import ca.uhn.hl7v2.protocol.ReceivingApplication; | import ca.uhn.hl7v2.protocol.ReceivingApplication; | ||||
| import de.uniluebeck.mi.projmi6.controller.MainController; | |||||
| import java.util.concurrent.ArrayBlockingQueue; | import java.util.concurrent.ArrayBlockingQueue; | ||||
| import java.util.concurrent.ThreadPoolExecutor; | import java.util.concurrent.ThreadPoolExecutor; | ||||
| @@ -16,15 +15,14 @@ import java.util.concurrent.TimeUnit; | |||||
| public class HL7Server { | public class HL7Server { | ||||
| private static final int PORT = 1111; | private static final int PORT = 1111; | ||||
| private final HapiContext context; | |||||
| private final HL7Service server; | private final HL7Service server; | ||||
| private final ThreadPoolExecutor executor; | private final ThreadPoolExecutor executor; | ||||
| public HL7Server(MainController mainctrl) throws InterruptedException { | |||||
| public HL7Server() { | |||||
| executor = new ThreadPoolExecutor(10, 100, 30, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(100)); | executor = new ThreadPoolExecutor(10, 100, 30, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(100)); | ||||
| executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); | ||||
| context = new DefaultHapiContext(); | |||||
| HapiContext context = new DefaultHapiContext(); | |||||
| context.setExecutorService(executor); | context.setExecutorService(executor); | ||||
| server = context.newServer(PORT, false); | server = context.newServer(PORT, false); | ||||
| @@ -5,10 +5,10 @@ package de.uniluebeck.mi.projmi6.model; | |||||
| */ | */ | ||||
| public enum DiagArt { | public enum DiagArt { | ||||
| VERDACHT(1,"Verdacht"), | |||||
| EINWEISUNG(2,"Einweisung"), | |||||
| VERDACHT(1, "Verdacht"), | |||||
| EINWEISUNG(2, "Einweisung"), | |||||
| OPDIAG(3, "OP-Diag"), | OPDIAG(3, "OP-Diag"), | ||||
| ENTLASSUNG(4,"Entlassung"); | |||||
| ENTLASSUNG(4, "Entlassung"); | |||||
| private final int id; | private final int id; | ||||
| private final String diagArt; | private final String diagArt; | ||||
| @@ -18,7 +18,7 @@ public enum DiagArt { | |||||
| this.diagArt = diagArt; | this.diagArt = diagArt; | ||||
| } | } | ||||
| public static DiagArt parseInt(final int id){ | |||||
| public static DiagArt parseInt(final int id) { | |||||
| switch (id) { | switch (id) { | ||||
| case 1: | case 1: | ||||
| return VERDACHT; | return VERDACHT; | ||||
| @@ -42,19 +42,19 @@ public class Diagnose extends Version { | |||||
| return freiText.get(); | return freiText.get(); | ||||
| } | } | ||||
| public void setFreiText(String freiText) { | |||||
| this.freiText.set(freiText); | |||||
| } | |||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| return icd10code+""; | |||||
| return icd10code + ""; | |||||
| } | } | ||||
| public SimpleStringProperty freiTextProperty() { | public SimpleStringProperty freiTextProperty() { | ||||
| return freiText; | return freiText; | ||||
| } | } | ||||
| public void setFreiText(String freiText) { | |||||
| this.freiText.set(freiText); | |||||
| } | |||||
| public DiagArt getDiagArt() { | public DiagArt getDiagArt() { | ||||
| return diagArt; | return diagArt; | ||||
| } | } | ||||
| @@ -2,7 +2,6 @@ package de.uniluebeck.mi.projmi6.model; | |||||
| import javafx.beans.property.SimpleIntegerProperty; | import javafx.beans.property.SimpleIntegerProperty; | ||||
| import javafx.beans.property.SimpleStringProperty; | import javafx.beans.property.SimpleStringProperty; | ||||
| import sun.java2d.pipe.SpanShapeRenderer; | |||||
| /** | /** | ||||
| * Created by 630030 on 12.11.15. | * Created by 630030 on 12.11.15. | ||||
| @@ -19,59 +18,59 @@ public class Fachrichtung { | |||||
| return abteilung.get(); | return abteilung.get(); | ||||
| } | } | ||||
| public SimpleStringProperty abteilungProperty() { | |||||
| return abteilung; | |||||
| } | |||||
| public void setAbteilung(String abteilung) { | public void setAbteilung(String abteilung) { | ||||
| this.abteilung.set(abteilung); | this.abteilung.set(abteilung); | ||||
| } | } | ||||
| public int getAbteilungstyp() { | |||||
| return abteilungstyp.get(); | |||||
| public SimpleStringProperty abteilungProperty() { | |||||
| return abteilung; | |||||
| } | } | ||||
| public SimpleIntegerProperty abteilungstypProperty() { | |||||
| return abteilungstyp; | |||||
| public int getAbteilungstyp() { | |||||
| return abteilungstyp.get(); | |||||
| } | } | ||||
| public void setAbteilungstyp(int abteilungstyp) { | public void setAbteilungstyp(int abteilungstyp) { | ||||
| this.abteilungstyp.set(abteilungstyp); | this.abteilungstyp.set(abteilungstyp); | ||||
| } | } | ||||
| public String getBezeichnung() { | |||||
| return bezeichnung.get(); | |||||
| public SimpleIntegerProperty abteilungstypProperty() { | |||||
| return abteilungstyp; | |||||
| } | } | ||||
| public SimpleStringProperty bezeichnungProperty() { | |||||
| return bezeichnung; | |||||
| public String getBezeichnung() { | |||||
| return bezeichnung.get(); | |||||
| } | } | ||||
| public void setBezeichnung(String bezeichnung) { | public void setBezeichnung(String bezeichnung) { | ||||
| this.bezeichnung.set(bezeichnung); | this.bezeichnung.set(bezeichnung); | ||||
| } | } | ||||
| public String getBezeichnungLang() { | |||||
| return bezeichnungLang.get(); | |||||
| public SimpleStringProperty bezeichnungProperty() { | |||||
| return bezeichnung; | |||||
| } | } | ||||
| public SimpleStringProperty bezeichnungLangProperty() { | |||||
| return bezeichnungLang; | |||||
| public String getBezeichnungLang() { | |||||
| return bezeichnungLang.get(); | |||||
| } | } | ||||
| public void setBezeichnungLang(String bezeichnungLang) { | public void setBezeichnungLang(String bezeichnungLang) { | ||||
| this.bezeichnungLang.set(bezeichnungLang); | this.bezeichnungLang.set(bezeichnungLang); | ||||
| } | } | ||||
| public String getBezeichnungLang2() { | |||||
| return bezeichnungLang2.get(); | |||||
| public SimpleStringProperty bezeichnungLangProperty() { | |||||
| return bezeichnungLang; | |||||
| } | } | ||||
| public SimpleStringProperty bezeichnungLang2Property() { | |||||
| return bezeichnungLang2; | |||||
| public String getBezeichnungLang2() { | |||||
| return bezeichnungLang2.get(); | |||||
| } | } | ||||
| public void setBezeichnungLang2(String bezeichnungLang2) { | public void setBezeichnungLang2(String bezeichnungLang2) { | ||||
| this.bezeichnungLang2.set(bezeichnungLang2); | this.bezeichnungLang2.set(bezeichnungLang2); | ||||
| } | } | ||||
| public SimpleStringProperty bezeichnungLang2Property() { | |||||
| return bezeichnungLang2; | |||||
| } | |||||
| } | } | ||||
| @@ -28,28 +28,27 @@ public class Fall extends Version { | |||||
| private SimpleObjectProperty<LocalDateTime> entlassungsDatum = new SimpleObjectProperty<>(this, "entlassungsDatum"); | private SimpleObjectProperty<LocalDateTime> entlassungsDatum = new SimpleObjectProperty<>(this, "entlassungsDatum"); | ||||
| private SimpleIntegerProperty fallID = new SimpleIntegerProperty(this, "fallid"); | private SimpleIntegerProperty fallID = new SimpleIntegerProperty(this, "fallid"); | ||||
| public LocalDateTime getVorstellDatum() { | |||||
| return vorstellDatum.get(); | |||||
| } | |||||
| public void setVorstellDatum(LocalDateTime vorstellDatum) { | public void setVorstellDatum(LocalDateTime vorstellDatum) { | ||||
| this.vorstellDatum.set(vorstellDatum); | this.vorstellDatum.set(vorstellDatum); | ||||
| } | } | ||||
| public LocalDateTime getVorstellDatum() { | |||||
| return vorstellDatum.get(); | |||||
| } | |||||
| public int getHauptdiagnoseId() { | public int getHauptdiagnoseId() { | ||||
| return hauptdiagnoseId.get(); | return hauptdiagnoseId.get(); | ||||
| } | } | ||||
| public void setHauptdiagnoseId(int hauptdiagnoseId) { | |||||
| this.hauptdiagnoseId.set(hauptdiagnoseId); | |||||
| } | |||||
| public SimpleIntegerProperty hauptdiagnoseIdProperty() { | public SimpleIntegerProperty hauptdiagnoseIdProperty() { | ||||
| return hauptdiagnoseId; | return hauptdiagnoseId; | ||||
| } | } | ||||
| public void setHauptdiagnoseId(int hauptdiagnoseId) { | |||||
| this.hauptdiagnoseId.set(hauptdiagnoseId); | |||||
| } | |||||
| public SimpleObjectProperty<LocalDateTime> vorstellDatumProperty() { | public SimpleObjectProperty<LocalDateTime> vorstellDatumProperty() { | ||||
| return vorstellDatum; | return vorstellDatum; | ||||
| } | } | ||||
| @@ -124,9 +123,9 @@ public class Fall extends Version { | |||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| if(getAufnahmeDatum()!=null){ | |||||
| if (getAufnahmeDatum() != null) { | |||||
| return getAufnahmeDatum().toLocalDate().toString(); | return getAufnahmeDatum().toLocalDate().toString(); | ||||
| }else{ | |||||
| } else { | |||||
| return Integer.toString(getFallID()); | return Integer.toString(getFallID()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -16,7 +16,7 @@ public enum FallArt { | |||||
| this.fallArt = fallArt; | this.fallArt = fallArt; | ||||
| } | } | ||||
| public static FallArt parseString (final String id){ | |||||
| public static FallArt parseString(final String id) { | |||||
| switch (id) { | switch (id) { | ||||
| case "amb": | case "amb": | ||||
| return AMBULANT; | return AMBULANT; | ||||
| @@ -26,16 +26,16 @@ public class HL7Message { | |||||
| return dateTime; | return dateTime; | ||||
| } | } | ||||
| @Override | |||||
| public String toString() { | |||||
| return dateTime+ " - "+(failed?"<fehlerhafte Nachricht>": | |||||
| (patient!=null? patient.getNachname()+", "+patient.getVorname():"")); | |||||
| } | |||||
| public void setDateTime(LocalDateTime dateTime) { | public void setDateTime(LocalDateTime dateTime) { | ||||
| this.dateTime = dateTime; | this.dateTime = dateTime; | ||||
| } | } | ||||
| @Override | |||||
| public String toString() { | |||||
| return dateTime + " - " + (failed ? "<fehlerhafte Nachricht>" : | |||||
| (patient != null ? patient.getNachname() + ", " + patient.getVorname() : "")); | |||||
| } | |||||
| public String getMessageContent() { | public String getMessageContent() { | ||||
| return messageContent; | return messageContent; | ||||
| } | } | ||||
| @@ -12,7 +12,7 @@ public class Icd10Code { | |||||
| private final int version; | private final int version; | ||||
| public Icd10Code(String icd10Code, String text, int version){ | |||||
| public Icd10Code(String icd10Code, String text, int version) { | |||||
| this.code = icd10Code; | this.code = icd10Code; | ||||
| this.text = text; | this.text = text; | ||||
| this.version = version; | this.version = version; | ||||
| @@ -32,17 +32,14 @@ public class Icd10Code { | |||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| return code+" - "+ text; | |||||
| return code + " - " + text; | |||||
| } | } | ||||
| public boolean isLastElementANumber() { | public boolean isLastElementANumber() { | ||||
| String lastElement = code.substring(code.length() - 1); | String lastElement = code.substring(code.length() - 1); | ||||
| char[] lastEl = lastElement.toCharArray(); | char[] lastEl = lastElement.toCharArray(); | ||||
| if (Character.isDigit(lastEl[0])) { | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| return Character.isDigit(lastEl[0]); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,4 +1,5 @@ | |||||
| package de.uniluebeck.mi.projmi6.model; | package de.uniluebeck.mi.projmi6.model; | ||||
| import javafx.beans.property.SimpleBooleanProperty; | import javafx.beans.property.SimpleBooleanProperty; | ||||
| import javafx.beans.property.SimpleIntegerProperty; | import javafx.beans.property.SimpleIntegerProperty; | ||||
| import javafx.beans.property.SimpleStringProperty; | import javafx.beans.property.SimpleStringProperty; | ||||
| @@ -12,12 +13,12 @@ public class Kasse extends Version { | |||||
| private SimpleStringProperty name = new SimpleStringProperty(this, "name"); | private SimpleStringProperty name = new SimpleStringProperty(this, "name"); | ||||
| private SimpleBooleanProperty privat = new SimpleBooleanProperty(this, "privat"); | private SimpleBooleanProperty privat = new SimpleBooleanProperty(this, "privat"); | ||||
| public Kasse(){ | |||||
| public Kasse() { | |||||
| } | } | ||||
| public Kasse(int id, String name, String adresse, boolean privat){ | |||||
| public Kasse(int id, String name, String adresse, boolean privat) { | |||||
| kassenID.set(id); | kassenID.set(id); | ||||
| this.name.set(name); | this.name.set(name); | ||||
| this.adresse.set(adresse); | this.adresse.set(adresse); | ||||
| @@ -28,52 +29,52 @@ public class Kasse extends Version { | |||||
| return adresse.get(); | return adresse.get(); | ||||
| } | } | ||||
| public SimpleStringProperty adresseProperty() { | |||||
| return adresse; | |||||
| } | |||||
| public void setAdresse(String adresse) { | public void setAdresse(String adresse) { | ||||
| this.adresse.set(adresse); | this.adresse.set(adresse); | ||||
| } | } | ||||
| public int getKassenID() { | |||||
| return kassenID.get(); | |||||
| public SimpleStringProperty adresseProperty() { | |||||
| return adresse; | |||||
| } | } | ||||
| public SimpleIntegerProperty kassenIDProperty() { | |||||
| return kassenID; | |||||
| public int getKassenID() { | |||||
| return kassenID.get(); | |||||
| } | } | ||||
| public void setKassenID(int kassenID) { | public void setKassenID(int kassenID) { | ||||
| this.kassenID.set(kassenID); | this.kassenID.set(kassenID); | ||||
| } | } | ||||
| public String getName() { | |||||
| return name.get(); | |||||
| public SimpleIntegerProperty kassenIDProperty() { | |||||
| return kassenID; | |||||
| } | } | ||||
| public SimpleStringProperty nameProperty() { | |||||
| return name; | |||||
| public String getName() { | |||||
| return name.get(); | |||||
| } | } | ||||
| public void setName(String name) { | public void setName(String name) { | ||||
| this.name.set(name); | this.name.set(name); | ||||
| } | } | ||||
| public boolean getPrivat() { | |||||
| return privat.get(); | |||||
| public SimpleStringProperty nameProperty() { | |||||
| return name; | |||||
| } | } | ||||
| public SimpleBooleanProperty privatProperty() { | |||||
| return privat; | |||||
| public boolean getPrivat() { | |||||
| return privat.get(); | |||||
| } | } | ||||
| public void setPrivat(boolean privat) { | public void setPrivat(boolean privat) { | ||||
| this.privat.set(privat); | this.privat.set(privat); | ||||
| } | } | ||||
| public SimpleBooleanProperty privatProperty() { | |||||
| return privat; | |||||
| } | |||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| return getName() + " (" +(getPrivat()?"privat":"gesetzlich")+")" ; | |||||
| return getName() + " (" + (getPrivat() ? "privat" : "gesetzlich") + ")"; | |||||
| } | } | ||||
| } | } | ||||
| @@ -11,7 +11,7 @@ public class OpsCode { | |||||
| private final int version; | private final int version; | ||||
| public OpsCode(String opsCode, String text, int version){ | |||||
| public OpsCode(String opsCode, String text, int version) { | |||||
| this.opsCode = opsCode; | this.opsCode = opsCode; | ||||
| this.text = text; | this.text = text; | ||||
| this.version = version; | this.version = version; | ||||
| @@ -151,14 +151,14 @@ public class Patient extends Version { | |||||
| return kassenID.get(); | return kassenID.get(); | ||||
| } | } | ||||
| public SimpleIntegerProperty kassenIDProperty() { | |||||
| return kassenID; | |||||
| } | |||||
| public void setKassenID(int kassenID) { | public void setKassenID(int kassenID) { | ||||
| this.kassenID.set(kassenID); | this.kassenID.set(kassenID); | ||||
| } | } | ||||
| public SimpleIntegerProperty kassenIDProperty() { | |||||
| return kassenID; | |||||
| } | |||||
| public LocalDate getGeburtsdatum() { | public LocalDate getGeburtsdatum() { | ||||
| return geburtsdatum.get(); | return geburtsdatum.get(); | ||||
| } | } | ||||
| @@ -235,7 +235,7 @@ public class Patient extends Version { | |||||
| } | } | ||||
| public static Geschlecht parseStringFromHL7(final String geschlecht) { | public static Geschlecht parseStringFromHL7(final String geschlecht) { | ||||
| geschlecht.toLowerCase(); | |||||
| geschlecht.toLowerCase(); | |||||
| if (geschlecht.startsWith("m")) { | if (geschlecht.startsWith("m")) { | ||||
| return MALE; | return MALE; | ||||
| } else if (geschlecht.startsWith("f")) { | } else if (geschlecht.startsWith("f")) { | ||||
| @@ -13,22 +13,19 @@ public class Stammdaten { | |||||
| private SimpleObjectProperty<ObservableList<Mitarbeiter>> mitarbeiter = new SimpleObjectProperty<>(); | private SimpleObjectProperty<ObservableList<Mitarbeiter>> mitarbeiter = new SimpleObjectProperty<>(); | ||||
| private SimpleObjectProperty<ObservableList<Kasse>> kassen = new SimpleObjectProperty<>(); | private SimpleObjectProperty<ObservableList<Kasse>> kassen = new SimpleObjectProperty<>(); | ||||
| private SimpleObjectProperty<ObservableList<Station>> stationen = new SimpleObjectProperty<>(); | private SimpleObjectProperty<ObservableList<Station>> stationen = new SimpleObjectProperty<>(); | ||||
| private SimpleObjectProperty<ObservableList<Patient>> patienten = new SimpleObjectProperty<>(); | |||||
| public ObservableList<Patient> getPatienten() { | public ObservableList<Patient> getPatienten() { | ||||
| return patienten.get(); | return patienten.get(); | ||||
| } | } | ||||
| public SimpleObjectProperty<ObservableList<Patient>> patientenProperty() { | |||||
| return patienten; | |||||
| } | |||||
| public void setPatienten(ObservableList<Patient> patienten) { | public void setPatienten(ObservableList<Patient> patienten) { | ||||
| this.patienten.set(patienten); | this.patienten.set(patienten); | ||||
| } | } | ||||
| private SimpleObjectProperty<ObservableList<Patient>> patienten = new SimpleObjectProperty<>(); | |||||
| public SimpleObjectProperty<ObservableList<Patient>> patientenProperty() { | |||||
| return patienten; | |||||
| } | |||||
| public ObservableList<OpsCode> getOpsCodes() { | public ObservableList<OpsCode> getOpsCodes() { | ||||
| return opsCodes.get(); | return opsCodes.get(); | ||||
| @@ -12,7 +12,7 @@ import java.time.LocalDate; | |||||
| public class StationsUebersichtsItem { | public class StationsUebersichtsItem { | ||||
| private SimpleIntegerProperty patId = new SimpleIntegerProperty(this, "patId"); | private SimpleIntegerProperty patId = new SimpleIntegerProperty(this, "patId"); | ||||
| private SimpleStringProperty patName = new SimpleStringProperty(this, "patName"); | private SimpleStringProperty patName = new SimpleStringProperty(this, "patName"); | ||||
| private SimpleObjectProperty<LocalDate> patBirthdate = new SimpleObjectProperty<>(this,"patBirthdate"); | |||||
| private SimpleObjectProperty<LocalDate> patBirthdate = new SimpleObjectProperty<>(this, "patBirthdate"); | |||||
| private SimpleIntegerProperty patAge = new SimpleIntegerProperty(this, "patAge"); | private SimpleIntegerProperty patAge = new SimpleIntegerProperty(this, "patAge"); | ||||
| private SimpleObjectProperty<LocalDate> stationAufnahme = new SimpleObjectProperty<>(this, "stationAufnahme"); | private SimpleObjectProperty<LocalDate> stationAufnahme = new SimpleObjectProperty<>(this, "stationAufnahme"); | ||||
| private SimpleObjectProperty<LocalDate> stationEntlassung = new SimpleObjectProperty<>(this, "stationEntlassung"); | private SimpleObjectProperty<LocalDate> stationEntlassung = new SimpleObjectProperty<>(this, "stationEntlassung"); | ||||
| @@ -23,74 +23,74 @@ public class StationsUebersichtsItem { | |||||
| return patId.get(); | return patId.get(); | ||||
| } | } | ||||
| public SimpleIntegerProperty patIdProperty() { | |||||
| return patId; | |||||
| } | |||||
| public void setPatId(int patId) { | public void setPatId(int patId) { | ||||
| this.patId.set(patId); | this.patId.set(patId); | ||||
| } | } | ||||
| public String getPatName() { | |||||
| return patName.get(); | |||||
| public SimpleIntegerProperty patIdProperty() { | |||||
| return patId; | |||||
| } | } | ||||
| public SimpleStringProperty patNameProperty() { | |||||
| return patName; | |||||
| public String getPatName() { | |||||
| return patName.get(); | |||||
| } | } | ||||
| public void setPatName(String patName) { | public void setPatName(String patName) { | ||||
| this.patName.set(patName); | this.patName.set(patName); | ||||
| } | } | ||||
| public LocalDate getPatBirthdate() { | |||||
| return patBirthdate.get(); | |||||
| public SimpleStringProperty patNameProperty() { | |||||
| return patName; | |||||
| } | } | ||||
| public SimpleObjectProperty<LocalDate> patBirthdateProperty() { | |||||
| return patBirthdate; | |||||
| public LocalDate getPatBirthdate() { | |||||
| return patBirthdate.get(); | |||||
| } | } | ||||
| public void setPatBirthdate(LocalDate patBirthdate) { | public void setPatBirthdate(LocalDate patBirthdate) { | ||||
| this.patBirthdate.set(patBirthdate); | this.patBirthdate.set(patBirthdate); | ||||
| } | } | ||||
| public int getPatAge() { | |||||
| return patAge.get(); | |||||
| public SimpleObjectProperty<LocalDate> patBirthdateProperty() { | |||||
| return patBirthdate; | |||||
| } | } | ||||
| public SimpleIntegerProperty patAgeProperty() { | |||||
| return patAge; | |||||
| public int getPatAge() { | |||||
| return patAge.get(); | |||||
| } | } | ||||
| public void setPatAge(int patAge) { | public void setPatAge(int patAge) { | ||||
| this.patAge.set(patAge); | this.patAge.set(patAge); | ||||
| } | } | ||||
| public LocalDate getStationAufnahme() { | |||||
| return stationAufnahme.get(); | |||||
| public SimpleIntegerProperty patAgeProperty() { | |||||
| return patAge; | |||||
| } | } | ||||
| public SimpleObjectProperty<LocalDate> stationAufnahmeProperty() { | |||||
| return stationAufnahme; | |||||
| public LocalDate getStationAufnahme() { | |||||
| return stationAufnahme.get(); | |||||
| } | } | ||||
| public void setStationAufnahme(LocalDate stationAufnahme) { | public void setStationAufnahme(LocalDate stationAufnahme) { | ||||
| this.stationAufnahme.set(stationAufnahme); | this.stationAufnahme.set(stationAufnahme); | ||||
| } | } | ||||
| public LocalDate getStationEntlassung() { | |||||
| return stationEntlassung.get(); | |||||
| public SimpleObjectProperty<LocalDate> stationAufnahmeProperty() { | |||||
| return stationAufnahme; | |||||
| } | } | ||||
| public SimpleObjectProperty<LocalDate> stationEntlassungProperty() { | |||||
| return stationEntlassung; | |||||
| public LocalDate getStationEntlassung() { | |||||
| return stationEntlassung.get(); | |||||
| } | } | ||||
| public void setStationEntlassung(LocalDate stationEntlassung) { | public void setStationEntlassung(LocalDate stationEntlassung) { | ||||
| this.stationEntlassung.set(stationEntlassung); | this.stationEntlassung.set(stationEntlassung); | ||||
| } | } | ||||
| public SimpleObjectProperty<LocalDate> stationEntlassungProperty() { | |||||
| return stationEntlassung; | |||||
| } | |||||
| public int getFallId() { | public int getFallId() { | ||||
| return fallId; | return fallId; | ||||
| } | } | ||||
| @@ -3,7 +3,6 @@ package de.uniluebeck.mi.projmi6.model; | |||||
| import javafx.beans.property.SimpleBooleanProperty; | import javafx.beans.property.SimpleBooleanProperty; | ||||
| import javafx.beans.property.SimpleIntegerProperty; | import javafx.beans.property.SimpleIntegerProperty; | ||||
| import javafx.beans.property.SimpleObjectProperty; | import javafx.beans.property.SimpleObjectProperty; | ||||
| import javafx.beans.property.SimpleStringProperty; | |||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
| @@ -46,40 +45,40 @@ public class Untersuchung extends Version { | |||||
| return storniert.get(); | return storniert.get(); | ||||
| } | } | ||||
| public SimpleBooleanProperty storniertProperty() { | |||||
| return storniert; | |||||
| } | |||||
| public void setStorniert(boolean storniert) { | public void setStorniert(boolean storniert) { | ||||
| this.storniert.set(storniert); | this.storniert.set(storniert); | ||||
| } | } | ||||
| public SimpleBooleanProperty storniertProperty() { | |||||
| return storniert; | |||||
| } | |||||
| public LocalDateTime getUntersuchungsdatum() { | public LocalDateTime getUntersuchungsdatum() { | ||||
| return untersuchungsdatum.get(); | return untersuchungsdatum.get(); | ||||
| } | } | ||||
| public void setUntersuchungsdatum(LocalDateTime untersuchungsdatum) { | |||||
| this.untersuchungsdatum.set(untersuchungsdatum); | |||||
| } | |||||
| public SimpleObjectProperty<LocalDateTime> untersuchungsdatumProperty() { | public SimpleObjectProperty<LocalDateTime> untersuchungsdatumProperty() { | ||||
| return untersuchungsdatum; | return untersuchungsdatum; | ||||
| } | } | ||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| return getUntersuchungsdatum()+": "+getOpscode().getText(); | |||||
| } | |||||
| public void setUntersuchungsdatum(LocalDateTime untersuchungsdatum) { | |||||
| this.untersuchungsdatum.set(untersuchungsdatum); | |||||
| return getUntersuchungsdatum() + ": " + getOpscode().getText(); | |||||
| } | } | ||||
| public int getUntersID() { | public int getUntersID() { | ||||
| return untersID.get(); | return untersID.get(); | ||||
| } | } | ||||
| public SimpleIntegerProperty untersIDProperty() { | |||||
| return untersID; | |||||
| } | |||||
| public void setUntersID(int untersID) { | public void setUntersID(int untersID) { | ||||
| this.untersID.set(untersID); | this.untersID.set(untersID); | ||||
| } | } | ||||
| public SimpleIntegerProperty untersIDProperty() { | |||||
| return untersID; | |||||
| } | |||||
| } | } | ||||
| @@ -2,23 +2,21 @@ package de.uniluebeck.mi.projmi6.view; | |||||
| import javafx.beans.binding.Bindings; | import javafx.beans.binding.Bindings; | ||||
| import javafx.beans.property.BooleanProperty; | import javafx.beans.property.BooleanProperty; | ||||
| import javafx.beans.property.IntegerPropertyBase; | |||||
| import javafx.collections.FXCollections; | |||||
| import javafx.geometry.Insets; | import javafx.geometry.Insets; | ||||
| import javafx.geometry.Pos; | import javafx.geometry.Pos; | ||||
| import javafx.scene.Node; | |||||
| import javafx.scene.control.*; | |||||
| import javafx.scene.control.Button; | |||||
| import javafx.scene.control.DatePicker; | |||||
| import javafx.scene.control.Label; | |||||
| import javafx.scene.effect.DropShadow; | import javafx.scene.effect.DropShadow; | ||||
| import javafx.scene.effect.Effect; | import javafx.scene.effect.Effect; | ||||
| import javafx.scene.layout.*; | |||||
| import javafx.scene.layout.HBox; | |||||
| import javafx.scene.layout.Priority; | |||||
| import javafx.scene.paint.Color; | import javafx.scene.paint.Color; | ||||
| import javafx.scene.paint.Paint; | |||||
| import java.time.LocalDate; | import java.time.LocalDate; | ||||
| import java.time.LocalTime; | |||||
| import java.util.Arrays; | |||||
| import java.util.stream.IntStream; | |||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
| import java.time.LocalTime; | |||||
| /** | /** | ||||
| * A picker for date and time, composed from a DatePicker and two ComboBoxes. It also has an optional Button to set | * A picker for date and time, composed from a DatePicker and two ComboBoxes. It also has an optional Button to set | ||||
| * date and time to the current system time. | * date and time to the current system time. | ||||
| @@ -37,12 +35,12 @@ public class DateTimePicker extends HBox { | |||||
| /** | /** | ||||
| * Empty constructor for the FXMLLoader. | * Empty constructor for the FXMLLoader. | ||||
| */ | */ | ||||
| public DateTimePicker(){ | |||||
| public DateTimePicker() { | |||||
| this.setAlignment(Pos.CENTER_LEFT); | this.setAlignment(Pos.CENTER_LEFT); | ||||
| hourText.setOnKeyReleased(event ->{ | |||||
| if(hourText.getCaretPosition()>=2){ | |||||
| hourText.setOnKeyReleased(event -> { | |||||
| if (hourText.getCaretPosition() >= 2) { | |||||
| int hour = Integer.parseInt(hourText.getText()); | int hour = Integer.parseInt(hourText.getText()); | ||||
| if(hour>=0 && hour <= 24){ | |||||
| if (hour >= 0 && hour <= 24) { | |||||
| minuteText.requestFocus(); | minuteText.requestFocus(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -57,34 +55,34 @@ public class DateTimePicker extends HBox { | |||||
| minuteText.setPromptText("MM"); | minuteText.setPromptText("MM"); | ||||
| HBox.setHgrow(minuteText, Priority.ALWAYS); | HBox.setHgrow(minuteText, Priority.ALWAYS); | ||||
| hourText.effectProperty().bind(Bindings.<Effect>createObjectBinding(()->{ | |||||
| hourText.effectProperty().bind(Bindings.<Effect>createObjectBinding(() -> { | |||||
| String text = hourText.getText(); | String text = hourText.getText(); | ||||
| if(text.isEmpty()){ | |||||
| if (text.isEmpty()) { | |||||
| return null; | return null; | ||||
| } | } | ||||
| int value = Integer.parseInt(text); | int value = Integer.parseInt(text); | ||||
| if(value>=0&&value<24){ | |||||
| if (value >= 0 && value < 24) { | |||||
| return null; | return null; | ||||
| } | } | ||||
| return invalidValue; | return invalidValue; | ||||
| }, hourText.textProperty())); | }, hourText.textProperty())); | ||||
| minuteText.effectProperty().bind(Bindings.<Effect>createObjectBinding(()->{ | |||||
| minuteText.effectProperty().bind(Bindings.<Effect>createObjectBinding(() -> { | |||||
| String text = minuteText.getText(); | String text = minuteText.getText(); | ||||
| if(text.isEmpty()){ | |||||
| if (text.isEmpty()) { | |||||
| return null; | return null; | ||||
| } | } | ||||
| int value = Integer.parseInt(text); | int value = Integer.parseInt(text); | ||||
| if(value>=0&&value<59){ | |||||
| if (value >= 0 && value < 59) { | |||||
| return null; | return null; | ||||
| } | } | ||||
| return invalidValue; | return invalidValue; | ||||
| }, minuteText.textProperty())); | }, minuteText.textProperty())); | ||||
| Label colon = new Label(":"); | Label colon = new Label(":"); | ||||
| 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.setMinWidth(55); | ||||
| @@ -98,84 +96,85 @@ public class DateTimePicker extends HBox { | |||||
| btnNow.getStyleClass().add("now-button"); | btnNow.getStyleClass().add("now-button"); | ||||
| //Add the subcomponents to the view. | //Add the subcomponents to the view. | ||||
| this.getChildren().addAll(datePicker,timePicker,btnNow); | |||||
| this.getChildren().addAll(datePicker, timePicker, btnNow); | |||||
| this.setSpacing(5); | this.setSpacing(5); | ||||
| } | } | ||||
| /** | |||||
| * Setter for the DateTime that is set in the view. | |||||
| * @param localDateTime The date to be set in the view. | |||||
| */ | |||||
| public void setDateTime(LocalDateTime localDateTime){ | |||||
| if(localDateTime==null){ | |||||
| hourText.setText(""); | |||||
| minuteText.setText(""); | |||||
| datePicker.setValue(null); | |||||
| }else{ | |||||
| datePicker.setValue(LocalDate.from(localDateTime)); | |||||
| hourText.setText(Integer.toString(localDateTime.getHour())); | |||||
| int minute = localDateTime.getMinute(); | |||||
| minuteText.setText((minute<9?"0":"")+Integer.toString(minute)); | |||||
| } | |||||
| } | |||||
| /** | /** | ||||
| * Sets the date set in the view to the current systems time. | * Sets the date set in the view to the current systems time. | ||||
| */ | */ | ||||
| public void setToCurrentDateTime(){ | |||||
| public void setToCurrentDateTime() { | |||||
| setDateTime(LocalDateTime.now()); | setDateTime(LocalDateTime.now()); | ||||
| } | } | ||||
| /** | /** | ||||
| * Getter for date and time that is currently set in the view. | * Getter for date and time that is currently set in the view. | ||||
| * | |||||
| * @return A LocalDateTime object or null, if one or more fields are not set. | * @return A LocalDateTime object or null, if one or more fields are not set. | ||||
| */ | */ | ||||
| public LocalDateTime getDateTime(){ | |||||
| if(datePicker.getValue()==null ){ | |||||
| return null; | |||||
| public LocalDateTime getDateTime() { | |||||
| if (datePicker.getValue() == null) { | |||||
| return null; | |||||
| } | } | ||||
| try{ | |||||
| int hour = Integer.parseInt( hourText.getText()); | |||||
| try { | |||||
| int hour = Integer.parseInt(hourText.getText()); | |||||
| int minute = Integer.parseInt(minuteText.getText()); | int minute = Integer.parseInt(minuteText.getText()); | ||||
| if(hour>=24|| hour<0||minute<0||minute>=60){ | |||||
| if (hour >= 24 || hour < 0 || minute < 0 || minute >= 60) { | |||||
| return null; | return null; | ||||
| } | } | ||||
| return LocalDateTime.of(datePicker.getValue(), LocalTime.of(hour, minute)); | return LocalDateTime.of(datePicker.getValue(), LocalTime.of(hour, minute)); | ||||
| }catch (Exception e){ | |||||
| return null; | |||||
| } catch (Exception e) { | |||||
| return null; | |||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * A property for hiding the "Set date and time to now"-Button. | |||||
| * @return A BooleanProperty, true if the button is visible. | |||||
| * Setter for the DateTime that is set in the view. | |||||
| * | |||||
| * @param localDateTime The date to be set in the view. | |||||
| */ | */ | ||||
| public BooleanProperty nowButtonVisiblePropety(){ | |||||
| return btnNow.visibleProperty(); | |||||
| public void setDateTime(LocalDateTime localDateTime) { | |||||
| if (localDateTime == null) { | |||||
| hourText.setText(""); | |||||
| minuteText.setText(""); | |||||
| datePicker.setValue(null); | |||||
| } else { | |||||
| datePicker.setValue(LocalDate.from(localDateTime)); | |||||
| hourText.setText(Integer.toString(localDateTime.getHour())); | |||||
| int minute = localDateTime.getMinute(); | |||||
| minuteText.setText((minute < 9 ? "0" : "") + Integer.toString(minute)); | |||||
| } | |||||
| } | } | ||||
| /** | /** | ||||
| * Setter for the {@link DateTimePicker#nowButtonVisiblePropety}. | |||||
| * @param visible When set to true, the button will be shown. | |||||
| * A property for hiding the "Set date and time to now"-Button. | |||||
| * | |||||
| * @return A BooleanProperty, true if the button is visible. | |||||
| */ | */ | ||||
| public void setNowButtonVisible(boolean visible){ | |||||
| btnNow.setVisible(visible); | |||||
| public BooleanProperty nowButtonVisiblePropety() { | |||||
| return btnNow.visibleProperty(); | |||||
| } | } | ||||
| /** | /** | ||||
| * Getter for the {@link DateTimePicker#nowButtonVisiblePropety}. | * Getter for the {@link DateTimePicker#nowButtonVisiblePropety}. | ||||
| * | |||||
| * @return true if the now-Button is visible, false otherwise. | * @return true if the now-Button is visible, false otherwise. | ||||
| */ | */ | ||||
| public boolean isNowButtonVisible(){ | |||||
| public boolean isNowButtonVisible() { | |||||
| return btnNow.isVisible(); | return btnNow.isVisible(); | ||||
| } | } | ||||
| /** | |||||
| * Setter for the {@link DateTimePicker#nowButtonVisiblePropety}. | |||||
| * | |||||
| * @param visible When set to true, the button will be shown. | |||||
| */ | |||||
| public void setNowButtonVisible(boolean visible) { | |||||
| btnNow.setVisible(visible); | |||||
| } | |||||
| } | } | ||||
| @@ -2,7 +2,6 @@ package de.uniluebeck.mi.projmi6.view; | |||||
| import javafx.animation.FadeTransition; | import javafx.animation.FadeTransition; | ||||
| import javafx.animation.Timeline; | import javafx.animation.Timeline; | ||||
| import javafx.animation.Transition; | |||||
| import javafx.beans.binding.Bindings; | import javafx.beans.binding.Bindings; | ||||
| import javafx.beans.property.SimpleIntegerProperty; | import javafx.beans.property.SimpleIntegerProperty; | ||||
| import javafx.geometry.Pos; | import javafx.geometry.Pos; | ||||
| @@ -19,7 +18,7 @@ import javafx.util.Duration; | |||||
| /** | /** | ||||
| * A simple Button with a letter icon that manages an IntegerProperty. Blinks if the integer is greater than zero. | * A simple Button with a letter icon that manages an IntegerProperty. Blinks if the integer is greater than zero. | ||||
| * | |||||
| * <p> | |||||
| * Created by Johannes on 21/11/2015. | * Created by Johannes on 21/11/2015. | ||||
| * | * | ||||
| * @author Johannes | * @author Johannes | ||||
| @@ -29,7 +28,7 @@ public class MessageIcon extends Button { | |||||
| /** | /** | ||||
| * The letter image. | * The letter image. | ||||
| */ | */ | ||||
| private final ImageView imageView = new ImageView(new Image("message.png"));; | |||||
| private final ImageView imageView = new ImageView(new Image("message.png")); | |||||
| /** | /** | ||||
| * The message number label in the center of the button. | * The message number label in the center of the button. | ||||
| @@ -51,7 +50,7 @@ public class MessageIcon extends Button { | |||||
| /** | /** | ||||
| * Public parameterless constructor, required for the FXMLLoader. | * Public parameterless constructor, required for the FXMLLoader. | ||||
| */ | */ | ||||
| public MessageIcon(){ | |||||
| public MessageIcon() { | |||||
| initImage(); | initImage(); | ||||
| initLabel(); | initLabel(); | ||||
| initTransition(); | initTransition(); | ||||
| @@ -66,18 +65,18 @@ public class MessageIcon extends Button { | |||||
| /** | /** | ||||
| * Inits the label with the message count. | * Inits the label with the message count. | ||||
| */ | */ | ||||
| private void initLabel(){ | |||||
| private void initLabel() { | |||||
| messageCountLabel.textProperty().bind(messageCount.asString()); | messageCountLabel.textProperty().bind(messageCount.asString()); | ||||
| messageCountLabel.setFont(Font.font("", FontWeight.BOLD, 20)); | messageCountLabel.setFont(Font.font("", FontWeight.BOLD, 20)); | ||||
| StackPane.setAlignment(messageCountLabel, Pos.CENTER); | StackPane.setAlignment(messageCountLabel, Pos.CENTER); | ||||
| messageCountLabel.textFillProperty().bind(Bindings.createObjectBinding( | messageCountLabel.textFillProperty().bind(Bindings.createObjectBinding( | ||||
| () -> (messageCount.get() > 0? Color.DARKRED: Color.BLACK), messageCount)); | |||||
| () -> (messageCount.get() > 0 ? Color.DARKRED : Color.BLACK), messageCount)); | |||||
| } | } | ||||
| /** | /** | ||||
| * Inits the letter image with shadow etc. | * Inits the letter image with shadow etc. | ||||
| */ | */ | ||||
| private void initImage(){ | |||||
| private void initImage() { | |||||
| imageView.setFitHeight(30); | imageView.setFitHeight(30); | ||||
| imageView.setFitWidth(30); | imageView.setFitWidth(30); | ||||
| /* imageView.opacityProperty().bind(Bindings.createDoubleBinding( | /* imageView.opacityProperty().bind(Bindings.createDoubleBinding( | ||||
| @@ -87,7 +86,7 @@ public class MessageIcon extends Button { | |||||
| ds1.setOffsetX(0.0f); | ds1.setOffsetX(0.0f); | ||||
| ds1.setColor(Color.valueOf("#e38217")); | ds1.setColor(Color.valueOf("#e38217")); | ||||
| imageView.effectProperty().bind(Bindings.createObjectBinding( | imageView.effectProperty().bind(Bindings.createObjectBinding( | ||||
| ()->messageCount.get() > 0 ? ds1:null, messageCount | |||||
| () -> messageCount.get() > 0 ? ds1 : null, messageCount | |||||
| )); | )); | ||||
| } | } | ||||
| @@ -95,16 +94,16 @@ public class MessageIcon extends Button { | |||||
| /** | /** | ||||
| * Set up blinking effect. | * Set up blinking effect. | ||||
| */ | */ | ||||
| private void initTransition(){ | |||||
| private void initTransition() { | |||||
| transition = new FadeTransition(Duration.millis(500), imageView); | transition = new FadeTransition(Duration.millis(500), imageView); | ||||
| transition.setFromValue(0.2); | transition.setFromValue(0.2); | ||||
| transition.setToValue(1.0); | transition.setToValue(1.0); | ||||
| transition.setCycleCount(Timeline.INDEFINITE); | transition.setCycleCount(Timeline.INDEFINITE); | ||||
| transition.setAutoReverse(true); | transition.setAutoReverse(true); | ||||
| messageCount.addListener((observable, oldValue, newValue) -> { | messageCount.addListener((observable, oldValue, newValue) -> { | ||||
| if(messageCount.get()>0){ | |||||
| if (messageCount.get() > 0) { | |||||
| transition.play(); | transition.play(); | ||||
| }else{ | |||||
| } else { | |||||
| transition.stop(); | transition.stop(); | ||||
| } | } | ||||
| @@ -113,6 +112,7 @@ public class MessageIcon extends Button { | |||||
| /** | /** | ||||
| * Getter for the {@link #messageCountProperty()} | * Getter for the {@link #messageCountProperty()} | ||||
| * | |||||
| * @return The messageCountProperty's value. | * @return The messageCountProperty's value. | ||||
| */ | */ | ||||
| public int getMessageCount() { | public int getMessageCount() { | ||||
| @@ -120,21 +120,22 @@ public class MessageIcon extends Button { | |||||
| } | } | ||||
| /** | /** | ||||
| * The count of messages that this view will indicate. | |||||
| * @return A property for the count of messages. | |||||
| */ | |||||
| public SimpleIntegerProperty messageCountProperty() { | |||||
| return messageCount; | |||||
| } | |||||
| /** | |||||
| * Setter for the {@link #messageCountProperty()} | * Setter for the {@link #messageCountProperty()} | ||||
| * | |||||
| * @param messageCount The value to be set in the message count property. | * @param messageCount The value to be set in the message count property. | ||||
| */ | */ | ||||
| public void setMessageCount(int messageCount) { | public void setMessageCount(int messageCount) { | ||||
| this.messageCount.set(messageCount); | this.messageCount.set(messageCount); | ||||
| } | } | ||||
| /** | |||||
| * The count of messages that this view will indicate. | |||||
| * | |||||
| * @return A property for the count of messages. | |||||
| */ | |||||
| public SimpleIntegerProperty messageCountProperty() { | |||||
| return messageCount; | |||||
| } | |||||
| } | } | ||||
| @@ -5,29 +5,28 @@ import javafx.scene.control.TextField; | |||||
| /** | /** | ||||
| * Based on <a href="http://blog.axxg.de/javafx-textfield-beschraenken/" >http://blog.axxg.de/javafx-textfield-beschraenken/</a> | * Based on <a href="http://blog.axxg.de/javafx-textfield-beschraenken/" >http://blog.axxg.de/javafx-textfield-beschraenken/</a> | ||||
| * | |||||
| * <p> | |||||
| * TextField that only allows two digit characters. | * TextField that only allows two digit characters. | ||||
| * Using the {@link javafx.scene.control.TextFormatter} would be better. | * Using the {@link javafx.scene.control.TextFormatter} would be better. | ||||
| * | |||||
| * <p> | |||||
| * Created by Johannes on 14/11/2015. | * Created by Johannes on 14/11/2015. | ||||
| */ | */ | ||||
| public class NumberTextField extends TextField { | public class NumberTextField extends TextField { | ||||
| @Override | @Override | ||||
| public void replaceText(int start, int end, String text) { | public void replaceText(int start, int end, String text) { | ||||
| int charactersRemoved = end -start; | |||||
| int charactersRemoved = end - start; | |||||
| int charactersAdded = text.length(); | int charactersAdded = text.length(); | ||||
| if ((text.matches("[0-9]")||text.length()==0) && getText().length()-charactersRemoved+charactersAdded <=2) { | |||||
| if ((text.matches("[0-9]") || text.length() == 0) && getText().length() - charactersRemoved + charactersAdded <= 2) { | |||||
| super.replaceText(start, end, text); | super.replaceText(start, end, text); | ||||
| } | } | ||||
| } | } | ||||
| @Override | @Override | ||||
| public void replaceSelection(String text) { | public void replaceSelection(String text) { | ||||
| int newTextLength = getText().length()-getSelectedText().length()+text.length(); | |||||
| if (newTextLength<=2 && (text.matches("[0-9]")||text.length()==0)) { | |||||
| int newTextLength = getText().length() - getSelectedText().length() + text.length(); | |||||
| if (newTextLength <= 2 && (text.matches("[0-9]") || text.length() == 0)) { | |||||
| super.replaceSelection(text); | super.replaceSelection(text); | ||||
| } | } | ||||
| } | } | ||||
| @@ -13,7 +13,7 @@ import javafx.scene.input.MouseEvent; | |||||
| /** | /** | ||||
| * Created by nils on 19.11.2015. | * Created by nils on 19.11.2015. | ||||
| * <p/> | |||||
| * <p> | |||||
| * Geklaut von <a href="http://tech.chitgoks.com/2013/07/19/how-to-go-to-item-in-combobox-on-keypress-in-java-fx-2/">hier</a> | * Geklaut von <a href="http://tech.chitgoks.com/2013/07/19/how-to-go-to-item-in-combobox-on-keypress-in-java-fx-2/">hier</a> | ||||
| */ | */ | ||||
| public class SelectKeyComboBoxListener implements EventHandler<KeyEvent> { | public class SelectKeyComboBoxListener implements EventHandler<KeyEvent> { | ||||
| @@ -1,88 +1,96 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.geometry.*?> | |||||
| <?import javafx.scene.text.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.geometry.Insets?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <SplitPane dividerPositions="0.45" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.DiagnoseController"> | |||||
| <items> | |||||
| <VBox> | |||||
| <children> | |||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | |||||
| <items> | |||||
| <Button fx:id="btnDiagCreate" mnemonicParsing="false" onAction="#clickedDiagCreate" text="Neue Diagnose erstellen" /> | |||||
| </items> | |||||
| </ToolBar> | |||||
| <ListView prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" fx:id="diagnoseList"/> | |||||
| </children> | |||||
| </VBox> | |||||
| <VBox> | |||||
| <children> | |||||
| <GridPane vgap="5.0" fx:id="fields" styleClass="fields"> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| <children> | |||||
| <Label text="Diagnose:" GridPane.columnIndex="0" GridPane.rowIndex="0" /> | |||||
| <Label text="Diagnoseart:" GridPane.columnIndex="0" GridPane.rowIndex="1" /> | |||||
| <Label text="DiagnoseArzt:" GridPane.columnIndex="0" GridPane.rowIndex="2" /> | |||||
| <Label text="Freitext: (optional)" GridPane.columnIndex="0" GridPane.rowIndex="3" /> | |||||
| <ComboBox fx:id="diagDiagnose" maxWidth="1.7976931348623157E308" promptText="ICD-10" GridPane.columnIndex="1" GridPane.rowIndex="0" /> | |||||
| <ComboBox fx:id="diagDiagnoseArt" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <ComboBox fx:id="diagDiagnoseArzt" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" promptText="CurrentUser is Default" GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| <TextArea fx:id="diagFreitext" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.rowIndex="3" /> | |||||
| </children> | |||||
| </GridPane> | |||||
| <HBox alignment="TOP_RIGHT" spacing="5.0" VBox.vgrow="ALWAYS"> | |||||
| <children> | |||||
| <Button fx:id="btnDiagAbort" mnemonicParsing="false" onAction="#clickedAbort" text="Abbrechen" /> | |||||
| <Button fx:id="btnDiagEdit" mnemonicParsing="false" onAction="#clickedEdit" text="Bearbeiten" /> | |||||
| <Button fx:id="btnDiagSave" mnemonicParsing="false" onAction="#clickedDiagSave" text="Speichern" /> | |||||
| </children> | |||||
| <VBox.margin> | |||||
| <Insets /> | |||||
| </VBox.margin> | |||||
| <padding> | |||||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> | |||||
| </padding> | |||||
| </HBox> | |||||
| <GridPane> | |||||
| <children> | |||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.rowIndex="2" /> | |||||
| <Label styleClass="ersteller-label" text="Ersteller: " /> | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1" /> | |||||
| <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" GridPane.rowIndex="1" /> | |||||
| <Label styleClass="ersteller-value" fx:id="diagChanger" text="dolor" GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| <Label styleClass="ersteller-value" fx:id="diagChangeTime" text="amet" GridPane.columnIndex="1" GridPane.rowIndex="3" /> | |||||
| </children> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| </GridPane> | |||||
| </children> | |||||
| </VBox> | |||||
| </items> | |||||
| <stylesheets> | |||||
| <URL value="@style.css" /> | |||||
| </stylesheets> | |||||
| <SplitPane xmlns:fx="http://javafx.com/fxml/1" dividerPositions="0.45" xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.DiagnoseController"> | |||||
| <items> | |||||
| <VBox> | |||||
| <children> | |||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | |||||
| <items> | |||||
| <Button fx:id="btnDiagCreate" mnemonicParsing="false" onAction="#clickedDiagCreate" | |||||
| text="Neue Diagnose erstellen"/> | |||||
| </items> | |||||
| </ToolBar> | |||||
| <ListView prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" fx:id="diagnoseList"/> | |||||
| </children> | |||||
| </VBox> | |||||
| <VBox> | |||||
| <children> | |||||
| <GridPane vgap="5.0" fx:id="fields" styleClass="fields"> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | |||||
| <children> | |||||
| <Label text="Diagnose:" GridPane.columnIndex="0" GridPane.rowIndex="0"/> | |||||
| <Label text="Diagnoseart:" GridPane.columnIndex="0" GridPane.rowIndex="1"/> | |||||
| <Label text="DiagnoseArzt:" GridPane.columnIndex="0" GridPane.rowIndex="2"/> | |||||
| <Label text="Freitext: (optional)" GridPane.columnIndex="0" GridPane.rowIndex="3"/> | |||||
| <ComboBox fx:id="diagDiagnose" maxWidth="1.7976931348623157E308" promptText="ICD-10" | |||||
| GridPane.columnIndex="1" GridPane.rowIndex="0"/> | |||||
| <ComboBox fx:id="diagDiagnoseArt" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="1"/> | |||||
| <ComboBox fx:id="diagDiagnoseArzt" maxHeight="1.7976931348623157E308" | |||||
| maxWidth="1.7976931348623157E308" promptText="CurrentUser is Default" | |||||
| GridPane.columnIndex="1" GridPane.rowIndex="2"/> | |||||
| <TextArea fx:id="diagFreitext" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="3"/> | |||||
| </children> | |||||
| </GridPane> | |||||
| <HBox alignment="TOP_RIGHT" spacing="5.0" VBox.vgrow="ALWAYS"> | |||||
| <children> | |||||
| <Button fx:id="btnDiagAbort" mnemonicParsing="false" onAction="#clickedAbort" text="Abbrechen"/> | |||||
| <Button fx:id="btnDiagEdit" mnemonicParsing="false" onAction="#clickedEdit" text="Bearbeiten"/> | |||||
| <Button fx:id="btnDiagSave" mnemonicParsing="false" onAction="#clickedDiagSave" | |||||
| text="Speichern"/> | |||||
| </children> | |||||
| <VBox.margin> | |||||
| <Insets/> | |||||
| </VBox.margin> | |||||
| <padding> | |||||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> | |||||
| </padding> | |||||
| </HBox> | |||||
| <GridPane> | |||||
| <children> | |||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.rowIndex="2"/> | |||||
| <Label styleClass="ersteller-label" text="Ersteller: "/> | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | |||||
| <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" | |||||
| GridPane.rowIndex="1"/> | |||||
| <Label styleClass="ersteller-value" fx:id="diagChanger" text="dolor" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="2"/> | |||||
| <Label styleClass="ersteller-value" fx:id="diagChangeTime" text="amet" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="3"/> | |||||
| </children> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | |||||
| </GridPane> | |||||
| </children> | |||||
| </VBox> | |||||
| </items> | |||||
| <stylesheets> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | |||||
| </SplitPane> | </SplitPane> | ||||
| @@ -1,14 +1,12 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.DateTimePicker?> | |||||
| <?import javafx.geometry.*?> | <?import javafx.geometry.*?> | ||||
| <?import javafx.scene.text.*?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import java.lang.*?> | |||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.DateTimePicker?> | |||||
| <VBox fx:controller="de.uniluebeck.mi.projmi6.controller.FallController" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <VBox xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.FallController" | |||||
| xmlns="http://javafx.com/javafx/8"> | |||||
| <children> | <children> | ||||
| <GridPane vgap="5.0" fx:id="fallFields" styleClass="fields"> | <GridPane vgap="5.0" fx:id="fallFields" styleClass="fields"> | ||||
| <children> | <children> | ||||
| @@ -16,10 +14,10 @@ | |||||
| <Label fx:id="fallPatID" text="John Doe (PatID = XXX)" GridPane.columnIndex="1"/> | <Label fx:id="fallPatID" text="John Doe (PatID = XXX)" GridPane.columnIndex="1"/> | ||||
| <Label text="Aufnahmedatum:" GridPane.rowIndex="1"/> | <Label text="Aufnahmedatum:" GridPane.rowIndex="1"/> | ||||
| <DateTimePicker GridPane.rowIndex="1" GridPane.columnIndex="1" fx:id="dtTmAufnahme" /> | |||||
| <DateTimePicker GridPane.rowIndex="1" GridPane.columnIndex="1" fx:id="dtTmAufnahme"/> | |||||
| <Label text="Entlassungsdatum:" GridPane.rowIndex="2"/> | <Label text="Entlassungsdatum:" GridPane.rowIndex="2"/> | ||||
| <DateTimePicker GridPane.rowIndex="2" GridPane.columnIndex="1" fx:id="dtTmEntlassung" /> | |||||
| <DateTimePicker GridPane.rowIndex="2" GridPane.columnIndex="1" fx:id="dtTmEntlassung"/> | |||||
| <Label text="Versichertennummer:" GridPane.rowIndex="3"/> | <Label text="Versichertennummer:" GridPane.rowIndex="3"/> | ||||
| <TextField fx:id="fallVersichertennummer" GridPane.columnIndex="1" GridPane.rowIndex="3"/> | <TextField fx:id="fallVersichertennummer" GridPane.columnIndex="1" GridPane.rowIndex="3"/> | ||||
| @@ -44,7 +42,7 @@ | |||||
| </children> | </children> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints percentWidth="30" minWidth="200"/> | <ColumnConstraints percentWidth="30" minWidth="200"/> | ||||
| <ColumnConstraints hgrow="ALWAYS" /> | |||||
| <ColumnConstraints hgrow="ALWAYS"/> | |||||
| </columnConstraints> | </columnConstraints> | ||||
| <rowConstraints> | <rowConstraints> | ||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | ||||
| @@ -133,6 +131,6 @@ | |||||
| </HBox> | </HBox> | ||||
| </children> | </children> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </VBox> | </VBox> | ||||
| @@ -1,36 +1,37 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import java.net.*?> | |||||
| <?import javafx.geometry.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.geometry.Insets?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | |||||
| <?import javafx.scene.layout.HBox?> | |||||
| <?import javafx.scene.layout.Pane?> | |||||
| <?import javafx.scene.layout.VBox?> | |||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <VBox minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.LogController"> | |||||
| <children> | |||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | |||||
| <items> | |||||
| <Pane HBox.hgrow="ALWAYS" /> | |||||
| <Button fx:id="btnRefresh" onAction="#clickedRefresh" text="Liste aktualisieren" /> | |||||
| </items> | |||||
| </ToolBar> | |||||
| <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | |||||
| <columns> | |||||
| <TableColumn fx:id="colLogDirection" editable="false" maxWidth="50.0" minWidth="75.0" text="Richtung" /> | |||||
| <TableColumn fx:id="colLogIp" editable="false" maxWidth="200.0" minWidth="150.0" text="Source / Destination" /> | |||||
| <TableColumn fx:id="colLogTime" editable="false" maxWidth="200.0" minWidth="150.0" text="Uhrzeit" /> | |||||
| <TableColumn fx:id="colLogMessage" editable="false" prefWidth="75.0" text="Nachricht" /> | |||||
| </columns> | |||||
| <columnResizePolicy> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||||
| </columnResizePolicy> | |||||
| </TableView> | |||||
| </children> | |||||
| <padding> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| </padding> | |||||
| <VBox xmlns:fx="http://javafx.com/fxml/1" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.LogController"> | |||||
| <children> | |||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | |||||
| <items> | |||||
| <Pane HBox.hgrow="ALWAYS"/> | |||||
| <Button fx:id="btnRefresh" onAction="#clickedRefresh" text="Liste aktualisieren"/> | |||||
| </items> | |||||
| </ToolBar> | |||||
| <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | |||||
| <columns> | |||||
| <TableColumn fx:id="colLogDirection" editable="false" maxWidth="50.0" minWidth="75.0" text="Richtung"/> | |||||
| <TableColumn fx:id="colLogIp" editable="false" maxWidth="200.0" minWidth="150.0" | |||||
| text="Source / Destination"/> | |||||
| <TableColumn fx:id="colLogTime" editable="false" maxWidth="200.0" minWidth="150.0" text="Uhrzeit"/> | |||||
| <TableColumn fx:id="colLogMessage" editable="false" prefWidth="75.0" text="Nachricht"/> | |||||
| </columns> | |||||
| <columnResizePolicy> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/> | |||||
| </columnResizePolicy> | |||||
| </TableView> | |||||
| </children> | |||||
| <padding> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | |||||
| </padding> | |||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </VBox> | </VBox> | ||||
| @@ -1,59 +1,62 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.geometry.*?> | |||||
| <?import javafx.scene.text.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.* ?> | |||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.MessageIcon?> | |||||
| <VBox fx:controller="de.uniluebeck.mi.projmi6.controller.MainController" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <VBox xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.MainController" | |||||
| maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" xmlns="http://javafx.com/javafx/8"> | |||||
| <children> | <children> | ||||
| <TabPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" side="LEFT" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS"> | |||||
| <TabPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" | |||||
| minWidth="-Infinity" side="LEFT" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS"> | |||||
| <tabs> | <tabs> | ||||
| <Tab text="Patientenübersicht"> | |||||
| <Tab text="Patientenübersicht"> | |||||
| <content> | <content> | ||||
| <VBox prefHeight="200.0" prefWidth="100.0"> | <VBox prefHeight="200.0" prefWidth="100.0"> | ||||
| <children> | <children> | ||||
| <SplitPane dividerPositions="0.5" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" orientation="VERTICAL" VBox.vgrow="ALWAYS"> | |||||
| <SplitPane dividerPositions="0.5" maxHeight="1.7976931348623157E308" | |||||
| maxWidth="1.7976931348623157E308" orientation="VERTICAL" VBox.vgrow="ALWAYS"> | |||||
| <items> | <items> | ||||
| <fx:include source="patient_tables.fxml" /> | |||||
| <SplitPane dividerPositions="0.2981007431874484" prefHeight="160.0" prefWidth="200.0" fx:id="fallOverview"> | |||||
| <fx:include source="patient_tables.fxml"/> | |||||
| <SplitPane dividerPositions="0.2981007431874484" prefHeight="160.0" | |||||
| prefWidth="200.0" fx:id="fallOverview"> | |||||
| <items> | <items> | ||||
| <VBox prefHeight="200.0" prefWidth="100.0"> | <VBox prefHeight="200.0" prefWidth="100.0"> | ||||
| <children> | <children> | ||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | <ToolBar prefHeight="40.0" prefWidth="200.0"> | ||||
| <items> | <items> | ||||
| <Button fx:id="btnFallCreate" text="Neuen _Fall erstellen" onAction="#clickedCreateFall"/> | |||||
| <Button fx:id="btnFallCreate" | |||||
| text="Neuen _Fall erstellen" | |||||
| onAction="#clickedCreateFall"/> | |||||
| </items> | </items> | ||||
| </ToolBar> | </ToolBar> | ||||
| <ListView VBox.vgrow="ALWAYS" fx:id="lvFall" > | |||||
| <placeholder><Label fx:id="lvFallPlaceholder" /></placeholder> | |||||
| <ListView VBox.vgrow="ALWAYS" fx:id="lvFall"> | |||||
| <placeholder> | |||||
| <Label fx:id="lvFallPlaceholder"/> | |||||
| </placeholder> | |||||
| </ListView> | </ListView> | ||||
| </children> | </children> | ||||
| </VBox> | </VBox> | ||||
| <TabPane fx:id="tabPaneFall" prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE"> | |||||
| <TabPane fx:id="tabPaneFall" prefHeight="200.0" prefWidth="200.0" | |||||
| tabClosingPolicy="UNAVAILABLE"> | |||||
| <tabs> | <tabs> | ||||
| <Tab fx:id="tabFallOverview" text="Fallübersicht"> | <Tab fx:id="tabFallOverview" text="Fallübersicht"> | ||||
| <content> | <content> | ||||
| <fx:include source="fall.fxml" /> | |||||
| <fx:include source="fall.fxml"/> | |||||
| </content> | </content> | ||||
| </Tab> | </Tab> | ||||
| <Tab fx:id="tabFallUntersuchungen" text="Untersuchungen"> | <Tab fx:id="tabFallUntersuchungen" text="Untersuchungen"> | ||||
| <content> | <content> | ||||
| <fx:include source="untersuchungen.fxml" /> | |||||
| <fx:include source="untersuchungen.fxml"/> | |||||
| </content> | </content> | ||||
| </Tab> | </Tab> | ||||
| <Tab fx:id="tabFallDiagnose" text="Diagnose"> | <Tab fx:id="tabFallDiagnose" text="Diagnose"> | ||||
| <content> | <content> | ||||
| <fx:include source="diagnose.fxml" /> | |||||
| <fx:include source="diagnose.fxml"/> | |||||
| </content> | </content> | ||||
| </Tab> | </Tab> | ||||
| <Tab fx:id="tabFallStationsHistorie" text="Stationshistorie"> | <Tab fx:id="tabFallStationsHistorie" text="Stationshistorie"> | ||||
| <content> | <content> | ||||
| <fx:include source="stationshistorie.fxml" /> | |||||
| <fx:include source="stationshistorie.fxml"/> | |||||
| </content> | </content> | ||||
| </Tab> | </Tab> | ||||
| </tabs> | </tabs> | ||||
| @@ -66,29 +69,30 @@ | |||||
| </VBox> | </VBox> | ||||
| </content> | </content> | ||||
| </Tab> | </Tab> | ||||
| <Tab text="Einstellungen"> | |||||
| <content> | |||||
| <fx:include source="settings.fxml" /> | |||||
| </content> | |||||
| <Tab text="Einstellungen"> | |||||
| <content> | |||||
| <fx:include source="settings.fxml"/> | |||||
| </content> | |||||
| </Tab> | </Tab> | ||||
| <Tab text="Logs"> | <Tab text="Logs"> | ||||
| <content> | <content> | ||||
| <fx:include source="log.fxml" /> | |||||
| <fx:include source="log.fxml"/> | |||||
| </content> | </content> | ||||
| </Tab> | </Tab> | ||||
| </tabs> | </tabs> | ||||
| </TabPane> | </TabPane> | ||||
| <ToolBar> | <ToolBar> | ||||
| <items> | <items> | ||||
| <Label text="Mitarbeiter wählen:" /> | |||||
| <ChoiceBox fx:id="cmbUserChoose" prefWidth="150.0" /> | |||||
| <Pane HBox.hgrow="ALWAYS" /> | |||||
| <ProgressIndicator fx:id="progressIndicator" visible="false" pickOnBounds="false" prefHeight="35.0" prefWidth="35.0" /> | |||||
| <fx:include source="message.fxml" /> | |||||
| <Label text="Mitarbeiter wählen:"/> | |||||
| <ChoiceBox fx:id="cmbUserChoose" prefWidth="150.0"/> | |||||
| <Pane HBox.hgrow="ALWAYS"/> | |||||
| <ProgressIndicator fx:id="progressIndicator" visible="false" pickOnBounds="false" prefHeight="35.0" | |||||
| prefWidth="35.0"/> | |||||
| <fx:include source="message.fxml"/> | |||||
| </items> | </items> | ||||
| </ToolBar> | </ToolBar> | ||||
| </children> | </children> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </VBox> | </VBox> | ||||
| @@ -1,13 +1,7 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.geometry.*?> | |||||
| <?import javafx.scene.text.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.scene.control.*?> | |||||
| <?import javafx.scene.layout.*?> | |||||
| <?import de.uniluebeck.mi.projmi6.view.* ?> | |||||
| <MessageIcon fx:id="messageIcon" fx:controller="de.uniluebeck.mi.projmi6.controller.MessageController" | |||||
| onAction="#onMessageIconClicked" | |||||
| xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"/> | |||||
| <?import de.uniluebeck.mi.projmi6.view.MessageIcon?> | |||||
| <MessageIcon xmlns:fx="http://javafx.com/fxml/1" fx:id="messageIcon" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.MessageController" | |||||
| onAction="#onMessageIconClicked" xmlns="http://javafx.com/javafx/8"/> | |||||
| @@ -1,23 +1,26 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.geometry.*?> | |||||
| <?import javafx.scene.control.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.scene.layout.*?> | |||||
| <VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.MessageListController"> | |||||
| <children> | |||||
| <ListView fx:id="lvMessages" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" /> | |||||
| <HBox alignment="CENTER_RIGHT" spacing="5.0" VBox.vgrow="NEVER"> | |||||
| <children> | |||||
| <Button fx:id="btnRemove" cancelButton="true" mnemonicParsing="false" onAction="#clickedRemove" text="Entfernen" /> | |||||
| <Button fx:id="btnShow" defaultButton="true" mnemonicParsing="false" onAction="#clickedShow" text="Zeigen" /> | |||||
| </children> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| </VBox.margin> | |||||
| </HBox> | |||||
| </children> | |||||
| <?import javafx.geometry.Insets?> | |||||
| <?import javafx.scene.control.Button?> | |||||
| <?import javafx.scene.control.ListView?> | |||||
| <?import javafx.scene.layout.*?> | |||||
| <VBox xmlns:fx="http://javafx.com/fxml/1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" | |||||
| minWidth="-Infinity" | |||||
| prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.MessageListController"> | |||||
| <children> | |||||
| <ListView fx:id="lvMessages" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/> | |||||
| <HBox alignment="CENTER_RIGHT" spacing="5.0" VBox.vgrow="NEVER"> | |||||
| <children> | |||||
| <Button fx:id="btnRemove" cancelButton="true" mnemonicParsing="false" onAction="#clickedRemove" | |||||
| text="Entfernen"/> | |||||
| <Button fx:id="btnShow" defaultButton="true" mnemonicParsing="false" onAction="#clickedShow" | |||||
| text="Zeigen"/> | |||||
| </children> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | |||||
| </VBox.margin> | |||||
| </HBox> | |||||
| </children> | |||||
| </VBox> | </VBox> | ||||
| @@ -1,155 +1,168 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import java.net.*?> | |||||
| <?import javafx.geometry.*?> | <?import javafx.geometry.*?> | ||||
| <?import javafx.scene.text.*?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import java.lang.*?> | |||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="633.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.PatientEditorController"> | |||||
| <VBox xmlns:fx="http://javafx.com/fxml/1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" | |||||
| minWidth="-Infinity" | |||||
| prefHeight="633.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.PatientEditorController"> | |||||
| <children> | <children> | ||||
| <GridPane> | <GridPane> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="35.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="35.0" prefWidth="100.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| </columnConstraints> | </columnConstraints> | ||||
| <rowConstraints> | <rowConstraints> | ||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints maxHeight="1.7976931348623157E308" minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints maxHeight="1.7976931348623157E308" minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | </rowConstraints> | ||||
| <children> | <children> | ||||
| <Label text="PatID:" /> | |||||
| <Label fx:id="patId" text="xxxx" GridPane.columnIndex="1" /> | |||||
| <Label text="PatID:"/> | |||||
| <Label fx:id="patId" text="xxxx" GridPane.columnIndex="1"/> | |||||
| <Label text="Vorname:" GridPane.rowIndex="1"/> | |||||
| <TextField fx:id="patVorname" promptText="Vorname" GridPane.columnIndex="1" GridPane.rowIndex="1"/> | |||||
| <Label text="Geburtsname:" GridPane.rowIndex="2"/> | |||||
| <TextField fx:id="patGeburtsname" promptText="Geburtsname" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="2"/> | |||||
| <Label text="Nachname:" GridPane.rowIndex="3"/> | |||||
| <TextField fx:id="patNachname" promptText="Nachname" GridPane.columnIndex="1" GridPane.rowIndex="3"/> | |||||
| <Label text="Vorname:" GridPane.rowIndex="1" /> | |||||
| <TextField fx:id="patVorname" promptText="Vorname" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <Label text="Straße / Hausnummer:" GridPane.rowIndex="4"/> | |||||
| <HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1" GridPane.rowIndex="4"> | |||||
| <children> | |||||
| <TextField fx:id="patStrasse" promptText="Straße" GridPane.columnIndex="1" GridPane.rowIndex="4" | |||||
| HBox.hgrow="ALWAYS"/> | |||||
| <TextField fx:id="patHausnummer" promptText="Hausnummer" HBox.hgrow="SOMETIMES"/> | |||||
| </children> | |||||
| </HBox> | |||||
| <Label text="Geburtsname:" GridPane.rowIndex="2" /> | |||||
| <TextField fx:id="patGeburtsname" promptText="Geburtsname" GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| <Label text="PLZ / Ort:" GridPane.rowIndex="5"/> | |||||
| <HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1" GridPane.rowIndex="5"> | |||||
| <children> | |||||
| <TextField fx:id="patPlz" promptText="PLZ" GridPane.columnIndex="1" GridPane.rowIndex="6" | |||||
| HBox.hgrow="SOMETIMES"/> | |||||
| <TextField fx:id="patOrt" promptText="Ort" HBox.hgrow="ALWAYS"/> | |||||
| </children> | |||||
| </HBox> | |||||
| <Label text="Nachname:" GridPane.rowIndex="3" /> | |||||
| <TextField fx:id="patNachname" promptText="Nachname" GridPane.columnIndex="1" GridPane.rowIndex="3" /> | |||||
| <Label text="Telefonnummer:" GridPane.rowIndex="6"/> | |||||
| <TextField fx:id="patTelefonnummer" promptText="Telefonnummer" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="6"/> | |||||
| <Label text="Straße / Hausnummer:" GridPane.rowIndex="4" /> | |||||
| <HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1" GridPane.rowIndex="4"> | |||||
| <children> | |||||
| <TextField fx:id="patStrasse" promptText="Straße" GridPane.columnIndex="1" GridPane.rowIndex="4" HBox.hgrow="ALWAYS" /> | |||||
| <TextField fx:id="patHausnummer" promptText="Hausnummer" HBox.hgrow="SOMETIMES" /> | |||||
| </children> | |||||
| </HBox> | |||||
| <Label text="Geburtsdatum:" GridPane.rowIndex="7"/> | |||||
| <DatePicker fx:id="patGeburtsdatum" promptText="Geburtsdatum" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="7"/> | |||||
| <Label text="PLZ / Ort:" GridPane.rowIndex="5" /> | |||||
| <HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1" GridPane.rowIndex="5"> | |||||
| <children> | |||||
| <TextField fx:id="patPlz" promptText="PLZ" GridPane.columnIndex="1" GridPane.rowIndex="6" HBox.hgrow="SOMETIMES" /> | |||||
| <TextField fx:id="patOrt" promptText="Ort" HBox.hgrow="ALWAYS" /> | |||||
| </children> | |||||
| </HBox> | |||||
| <Label text="Familienstand:" GridPane.rowIndex="8"/> | |||||
| <ComboBox fx:id="patFamilienstand" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="8"/> | |||||
| <Label text="Telefonnummer:" GridPane.rowIndex="6" /> | |||||
| <TextField fx:id="patTelefonnummer" promptText="Telefonnummer" GridPane.columnIndex="1" GridPane.rowIndex="6" /> | |||||
| <Label text="Geschlecht:" GridPane.rowIndex="9"/> | |||||
| <ComboBox fx:id="patGeschlecht" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="9"/> | |||||
| <Label text="Geburtsdatum:" GridPane.rowIndex="7" /> | |||||
| <DatePicker fx:id="patGeburtsdatum" promptText="Geburtsdatum" GridPane.columnIndex="1" GridPane.rowIndex="7" /> | |||||
| <Label text="Familienstand:" GridPane.rowIndex="8" /> | |||||
| <ComboBox fx:id="patFamilienstand" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="8" /> | |||||
| <Label text="Versicherungsnummer:" GridPane.rowIndex="10"/> | |||||
| <TextField fx:id="patVersicherungsnummer" promptText="Versicherungsnummer" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="10"/> | |||||
| <Label text="Geschlecht:" GridPane.rowIndex="9" /> | |||||
| <ComboBox fx:id="patGeschlecht" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="9" /> | |||||
| <Label text="Versicherungsnummer:" GridPane.rowIndex="10" /> | |||||
| <TextField fx:id="patVersicherungsnummer" promptText="Versicherungsnummer" GridPane.columnIndex="1" GridPane.rowIndex="10" /> | |||||
| <Label text="Versicherung:" GridPane.rowIndex="11" /> | |||||
| <ComboBox fx:id="patVersicherung" prefWidth="225.0" GridPane.columnIndex="1" GridPane.rowIndex="11" /> | |||||
| <Label text="Versicherung:" GridPane.rowIndex="11"/> | |||||
| <ComboBox fx:id="patVersicherung" prefWidth="225.0" GridPane.columnIndex="1" GridPane.rowIndex="11"/> | |||||
| <Label text="CAVE:" GridPane.rowIndex="12"/> | |||||
| <TextArea fx:id="patCave" maxHeight="100.0" prefHeight="56.0" prefWidth="383.0" promptText="CAVE" | |||||
| GridPane.columnIndex="1" GridPane.rowIndex="12"> | |||||
| <GridPane.margin> | |||||
| <Insets top="5.0"/> | |||||
| </GridPane.margin> | |||||
| </TextArea> | |||||
| <Label text="CAVE:" GridPane.rowIndex="12" /> | |||||
| <TextArea fx:id="patCave" maxHeight="100.0" prefHeight="56.0" prefWidth="383.0" promptText="CAVE" GridPane.columnIndex="1" GridPane.rowIndex="12"> | |||||
| <GridPane.margin> | |||||
| <Insets top="5.0" /> | |||||
| </GridPane.margin></TextArea> | |||||
| </children> | </children> | ||||
| <VBox.margin> | |||||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> | |||||
| </VBox.margin> | |||||
| <VBox.margin> | |||||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> | |||||
| </VBox.margin> | |||||
| </GridPane> | </GridPane> | ||||
| <HBox alignment="TOP_RIGHT" prefHeight="100.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> | <HBox alignment="TOP_RIGHT" prefHeight="100.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> | ||||
| <children> | <children> | ||||
| <Button fx:id="btnPatSave" defaultButton="true" mnemonicParsing="false" onAction="#clickedSave" text="Speichern"> | |||||
| <Button fx:id="btnPatSave" defaultButton="true" mnemonicParsing="false" onAction="#clickedSave" | |||||
| text="Speichern"> | |||||
| <HBox.margin> | <HBox.margin> | ||||
| <Insets right="5.0" /> | |||||
| <Insets right="5.0"/> | |||||
| </HBox.margin> | </HBox.margin> | ||||
| </Button> | </Button> | ||||
| <Button fx:id="btnPatAbort" cancelButton="true" mnemonicParsing="false" onAction="#clickedAbort" text="Abbrechen"> | |||||
| <Button fx:id="btnPatAbort" cancelButton="true" mnemonicParsing="false" onAction="#clickedAbort" | |||||
| text="Abbrechen"> | |||||
| <HBox.margin> | <HBox.margin> | ||||
| <Insets right="5.0" /> | |||||
| <Insets right="5.0"/> | |||||
| </HBox.margin> | </HBox.margin> | ||||
| </Button> | </Button> | ||||
| </children> | </children> | ||||
| </HBox> | </HBox> | ||||
| <GridPane> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| <children> | |||||
| <GridPane> | |||||
| <children> | |||||
| <Label styleClass="ersteller-label" text="Ersteller: " GridPane.rowIndex="0" /> | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1" /> | |||||
| <Label fx:id="patCreator" styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="0" /> | |||||
| <Label fx:id="patCreateTime" styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| </children> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| </GridPane> | |||||
| <GridPane GridPane.columnIndex="1"> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| <children> | |||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.rowIndex="0" /> | |||||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="1" /> | |||||
| <Label fx:id="patChanger" styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="0" /> | |||||
| <Label fx:id="patChangeTime" styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| </children> | |||||
| </GridPane> | |||||
| </children> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| </VBox.margin> | |||||
| </GridPane> | |||||
| <GridPane> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | |||||
| <children> | |||||
| <GridPane> | |||||
| <children> | |||||
| <Label styleClass="ersteller-label" text="Ersteller: " GridPane.rowIndex="0"/> | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | |||||
| <Label fx:id="patCreator" styleClass="ersteller-value" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="0"/> | |||||
| <Label fx:id="patCreateTime" styleClass="ersteller-value" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="1"/> | |||||
| </children> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | |||||
| </GridPane> | |||||
| <GridPane GridPane.columnIndex="1"> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | |||||
| <children> | |||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.rowIndex="0"/> | |||||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="1"/> | |||||
| <Label fx:id="patChanger" styleClass="ersteller-value" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="0"/> | |||||
| <Label fx:id="patChangeTime" styleClass="ersteller-value" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="1"/> | |||||
| </children> | |||||
| </GridPane> | |||||
| </children> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | |||||
| </VBox.margin> | |||||
| </GridPane> | |||||
| </children> | </children> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </VBox> | </VBox> | ||||
| @@ -1,13 +1,10 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.geometry.*?> | |||||
| <?import javafx.scene.text.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <TabPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.PatientTablesController" fx:id="patientOverviewTabPane"> | |||||
| <TabPane xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.PatientTablesController" fx:id="patientOverviewTabPane"> | |||||
| <tabs> | <tabs> | ||||
| <Tab closable="false" text="Patientenübersicht" fx:id="patientOverviewTab"> | <Tab closable="false" text="Patientenübersicht" fx:id="patientOverviewTab"> | ||||
| <content> | <content> | ||||
| @@ -15,37 +12,41 @@ | |||||
| <children> | <children> | ||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | <ToolBar prefHeight="40.0" prefWidth="200.0"> | ||||
| <items> | <items> | ||||
| <Button fx:id="btnPatCreate" text="Neuen _Patient erstellen" onAction="#clickedCreatePatient" /> | |||||
| <Button fx:id="btnPatEdit" text="Patient _bearbeiten" onAction="#clickedEditPatient"/> | |||||
| <Pane HBox.hgrow="ALWAYS" /> | |||||
| <Button fx:id="btnPatRefresh" text="Liste aktualisieren" onAction="#clickedRefreshPatient"/> | |||||
| <Button fx:id="btnPatCreate" text="Neuen _Patient erstellen" | |||||
| onAction="#clickedCreatePatient"/> | |||||
| <Button fx:id="btnPatEdit" text="Patient _bearbeiten" onAction="#clickedEditPatient"/> | |||||
| <Pane HBox.hgrow="ALWAYS"/> | |||||
| <Button fx:id="btnPatRefresh" text="Liste aktualisieren" | |||||
| onAction="#clickedRefreshPatient"/> | |||||
| </items> | </items> | ||||
| </ToolBar> | </ToolBar> | ||||
| <TableView fx:id="tblPatientOverview" editable="true" tableMenuButtonVisible="true" VBox.vgrow="ALWAYS"> | |||||
| <TableView fx:id="tblPatientOverview" editable="true" tableMenuButtonVisible="true" | |||||
| VBox.vgrow="ALWAYS"> | |||||
| <placeholder> | <placeholder> | ||||
| <Label fx:id="lblTablePatientEmpty" /> | |||||
| <Label fx:id="lblTablePatientEmpty"/> | |||||
| </placeholder> | </placeholder> | ||||
| <columns> | <columns> | ||||
| <TableColumn fx:id="colPatPatId" editable="false" prefWidth="75.0" sortable="false" text="PatID" /> | |||||
| <TableColumn fx:id="colPatPatId" editable="false" prefWidth="75.0" sortable="false" | |||||
| text="PatID"/> | |||||
| <TableColumn prefWidth="75.0" text="Name"> | <TableColumn prefWidth="75.0" text="Name"> | ||||
| <columns> | <columns> | ||||
| <TableColumn fx:id="colPatGeburtsname" prefWidth="75.0" text="Geburtsname" /> | |||||
| <TableColumn fx:id="colPatNachname" prefWidth="75.0" text="Nachname" /> | |||||
| <TableColumn fx:id="colPatVorname" prefWidth="75.0" text="Vorname" /> | |||||
| <TableColumn fx:id="colPatGeburtsname" prefWidth="75.0" text="Geburtsname"/> | |||||
| <TableColumn fx:id="colPatNachname" prefWidth="75.0" text="Nachname"/> | |||||
| <TableColumn fx:id="colPatVorname" prefWidth="75.0" text="Vorname"/> | |||||
| </columns> | </columns> | ||||
| </TableColumn> | </TableColumn> | ||||
| <TableColumn fx:id="colPatGebDatum" prefWidth="75.0" text="GebDatum" /> | |||||
| <TableColumn fx:id="colPatGebDatum" prefWidth="75.0" text="GebDatum"/> | |||||
| <TableColumn prefWidth="75.0" text="Adresse"> | <TableColumn prefWidth="75.0" text="Adresse"> | ||||
| <columns> | <columns> | ||||
| <TableColumn fx:id="colPatStrasse" prefWidth="75.0" text="Straße" /> | |||||
| <TableColumn fx:id="colPatPlz" prefWidth="75.0" text="PLZ" /> | |||||
| <TableColumn fx:id="colPatOrt" prefWidth="75.0" text="Ort" /> | |||||
| <TableColumn fx:id="colPatStrasse" prefWidth="75.0" text="Straße"/> | |||||
| <TableColumn fx:id="colPatPlz" prefWidth="75.0" text="PLZ"/> | |||||
| <TableColumn fx:id="colPatOrt" prefWidth="75.0" text="Ort"/> | |||||
| </columns> | </columns> | ||||
| </TableColumn> | </TableColumn> | ||||
| <TableColumn fx:id="colPatCave" prefWidth="75.0" text="CAVE" /> | |||||
| <TableColumn fx:id="colPatCave" prefWidth="75.0" text="CAVE"/> | |||||
| </columns> | </columns> | ||||
| <columnResizePolicy> | <columnResizePolicy> | ||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/> | |||||
| </columnResizePolicy> | </columnResizePolicy> | ||||
| </TableView> | </TableView> | ||||
| </children> | </children> | ||||
| @@ -58,28 +59,35 @@ | |||||
| <children> | <children> | ||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | <ToolBar prefHeight="40.0" prefWidth="200.0"> | ||||
| <items> | <items> | ||||
| <ComboBox fx:id="cmbStationenFilter" prefWidth="250.0" promptText="Station auswählen..." /> | |||||
| <ToggleButton fx:id="btnEntlassenePatientenZeigen" mnemonicParsing="false" text="Entlassene Patienten zeigen" /> | |||||
| <Pane HBox.hgrow="ALWAYS" /> | |||||
| <Button fx:id="btnStatRefresh" text="Liste aktualisieren" onAction="#clickedRefreshStation"/> | |||||
| <ComboBox fx:id="cmbStationenFilter" prefWidth="250.0" | |||||
| promptText="Station auswählen..."/> | |||||
| <ToggleButton fx:id="btnEntlassenePatientenZeigen" mnemonicParsing="false" | |||||
| text="Entlassene Patienten zeigen"/> | |||||
| <Pane HBox.hgrow="ALWAYS"/> | |||||
| <Button fx:id="btnStatRefresh" text="Liste aktualisieren" | |||||
| onAction="#clickedRefreshStation"/> | |||||
| </items> | </items> | ||||
| </ToolBar> | </ToolBar> | ||||
| <SplitPane prefHeight="160.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> | <SplitPane prefHeight="160.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> | ||||
| <items> | <items> | ||||
| <TableView fx:id="tblStationOverview" prefHeight="200.0" prefWidth="200.0" tableMenuButtonVisible="true"> | |||||
| <TableView fx:id="tblStationOverview" prefHeight="200.0" prefWidth="200.0" | |||||
| tableMenuButtonVisible="true"> | |||||
| <placeholder> | <placeholder> | ||||
| <Label fx:id="lblTableStationEmpty" /> | |||||
| <Label fx:id="lblTableStationEmpty"/> | |||||
| </placeholder> | </placeholder> | ||||
| <columns> | <columns> | ||||
| <TableColumn fx:id="colStatPatId" prefWidth="75.0" text="PatID" /> | |||||
| <TableColumn fx:id="colStatFullName" prefWidth="135.0" text="Nachname, Vorname" /> | |||||
| <TableColumn fx:id="colStatGebDatum" prefWidth="121.0" text="Geburtsdatum" /> | |||||
| <TableColumn fx:id="colStatAlter" prefWidth="50.0" text="Alter" /> | |||||
| <TableColumn fx:id="colStatAufnahmedatum" prefWidth="129.0" text="Aufnahmedatum" /> | |||||
| <TableColumn fx:id="colStatEntlassungsdatum" prefWidth="152.0" text="Entlassungsdatum" /> | |||||
| <TableColumn fx:id="colStatPatId" prefWidth="75.0" text="PatID"/> | |||||
| <TableColumn fx:id="colStatFullName" prefWidth="135.0" | |||||
| text="Nachname, Vorname"/> | |||||
| <TableColumn fx:id="colStatGebDatum" prefWidth="121.0" text="Geburtsdatum"/> | |||||
| <TableColumn fx:id="colStatAlter" prefWidth="50.0" text="Alter"/> | |||||
| <TableColumn fx:id="colStatAufnahmedatum" prefWidth="129.0" | |||||
| text="Aufnahmedatum"/> | |||||
| <TableColumn fx:id="colStatEntlassungsdatum" prefWidth="152.0" | |||||
| text="Entlassungsdatum"/> | |||||
| </columns> | </columns> | ||||
| <columnResizePolicy> | <columnResizePolicy> | ||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/> | |||||
| </columnResizePolicy> | </columnResizePolicy> | ||||
| </TableView> | </TableView> | ||||
| </items> | </items> | ||||
| @@ -90,6 +98,6 @@ | |||||
| </Tab> | </Tab> | ||||
| </tabs> | </tabs> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </TabPane> | </TabPane> | ||||
| @@ -1,137 +1,137 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.scene.paint.*?> | |||||
| <?import java.net.*?> | |||||
| <?import java.lang.*?> | |||||
| <?import javafx.geometry.*?> | <?import javafx.geometry.*?> | ||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import javafx.scene.text.*?> | <?import javafx.scene.text.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <TilePane prefHeight="240.0" prefWidth="702.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.SettingsController"> | |||||
| <TilePane xmlns:fx="http://javafx.com/fxml/1" prefHeight="240.0" prefWidth="702.0" xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.SettingsController"> | |||||
| <children> | <children> | ||||
| <!-- <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <children> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="MySQL-Datenbank"> | |||||
| <font> | |||||
| <Font size="18.0" /> | |||||
| </font> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" /> | |||||
| </VBox.margin> | |||||
| </Text> | |||||
| <GridPane> | |||||
| <children> | |||||
| <Label text="JDBC-Serveradresse:" /> | |||||
| <Label text="Benutzername:" GridPane.rowIndex="1" /> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Text" GridPane.columnIndex="1" /> | |||||
| <TextField fx:id="opsServerIp1" GridPane.columnIndex="1" /> | |||||
| <TextField fx:id="opsServerCode1" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <Label text="Kennwort:" GridPane.rowIndex="2" /> | |||||
| <TextField GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| </children> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| </GridPane> | |||||
| <HBox alignment="BOTTOM_RIGHT" VBox.vgrow="ALWAYS"> | |||||
| <children> | |||||
| <Button fx:id="opsServerSave1" alignment="CENTER_RIGHT" mnemonicParsing="false" text="Speichern" /> | |||||
| </children> | |||||
| </HBox> | |||||
| </children> | |||||
| <padding> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| </padding> | |||||
| <TilePane.margin> | |||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | |||||
| </TilePane.margin> | |||||
| </VBox> --> | |||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <!-- <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <children> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="MySQL-Datenbank"> | |||||
| <font> | |||||
| <Font size="18.0" /> | |||||
| </font> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" /> | |||||
| </VBox.margin> | |||||
| </Text> | |||||
| <GridPane> | |||||
| <children> | |||||
| <Label text="JDBC-Serveradresse:" /> | |||||
| <Label text="Benutzername:" GridPane.rowIndex="1" /> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Text" GridPane.columnIndex="1" /> | |||||
| <TextField fx:id="opsServerIp1" GridPane.columnIndex="1" /> | |||||
| <TextField fx:id="opsServerCode1" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <Label text="Kennwort:" GridPane.rowIndex="2" /> | |||||
| <TextField GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| </children> | |||||
| <columnConstraints> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| </columnConstraints> | |||||
| <rowConstraints> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | |||||
| </GridPane> | |||||
| <HBox alignment="BOTTOM_RIGHT" VBox.vgrow="ALWAYS"> | |||||
| <children> | |||||
| <Button fx:id="opsServerSave1" alignment="CENTER_RIGHT" mnemonicParsing="false" text="Speichern" /> | |||||
| </children> | |||||
| </HBox> | |||||
| </children> | |||||
| <padding> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| </padding> | |||||
| <TilePane.margin> | |||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | |||||
| </TilePane.margin> | |||||
| </VBox> --> | |||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" | |||||
| styleClass="settings-box"> | |||||
| <children> | <children> | ||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="OPS-Server"> | <Text strokeType="OUTSIDE" strokeWidth="0.0" text="OPS-Server"> | ||||
| <font> | <font> | ||||
| <Font size="18.0" /> | |||||
| <Font size="18.0"/> | |||||
| </font> | </font> | ||||
| <VBox.margin> | <VBox.margin> | ||||
| <Insets bottom="10.0" /> | |||||
| <Insets bottom="10.0"/> | |||||
| </VBox.margin> | </VBox.margin> | ||||
| </Text> | </Text> | ||||
| <GridPane> | <GridPane> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| </columnConstraints> | </columnConstraints> | ||||
| <rowConstraints> | <rowConstraints> | ||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | </rowConstraints> | ||||
| <children> | <children> | ||||
| <Label text="OPS-Sever:" /> | |||||
| <Label text="Port:" GridPane.rowIndex="1" /> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Text" GridPane.columnIndex="1" /> | |||||
| <TextField fx:id="opsServerIp" GridPane.columnIndex="1" /> | |||||
| <TextField fx:id="opsServerPort" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <Label text="OPS-Sever:"/> | |||||
| <Label text="Port:" GridPane.rowIndex="1"/> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Text" GridPane.columnIndex="1"/> | |||||
| <TextField fx:id="opsServerIp" GridPane.columnIndex="1"/> | |||||
| <TextField fx:id="opsServerPort" GridPane.columnIndex="1" GridPane.rowIndex="1"/> | |||||
| </children> | </children> | ||||
| </GridPane> | </GridPane> | ||||
| <HBox alignment="BOTTOM_RIGHT" VBox.vgrow="ALWAYS"> | <HBox alignment="BOTTOM_RIGHT" VBox.vgrow="ALWAYS"> | ||||
| <children> | <children> | ||||
| <Button fx:id="opsServerSave" alignment="CENTER_RIGHT" mnemonicParsing="false" text="Speichern" /> | |||||
| <Button fx:id="opsServerSave" alignment="CENTER_RIGHT" mnemonicParsing="false" | |||||
| text="Speichern"/> | |||||
| </children> | </children> | ||||
| </HBox> | </HBox> | ||||
| </children> | </children> | ||||
| <TilePane.margin> | <TilePane.margin> | ||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | |||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/> | |||||
| </TilePane.margin> | </TilePane.margin> | ||||
| <padding> | <padding> | ||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | |||||
| </padding> | </padding> | ||||
| </VBox> | </VBox> | ||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" | |||||
| styleClass="settings-box"> | |||||
| <children> | <children> | ||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="KIS Gruppe 6"> | <Text strokeType="OUTSIDE" strokeWidth="0.0" text="KIS Gruppe 6"> | ||||
| <font> | <font> | ||||
| <Font size="18.0" /> | |||||
| <Font size="18.0"/> | |||||
| </font> | </font> | ||||
| <VBox.margin> | <VBox.margin> | ||||
| <Insets bottom="10.0" /> | |||||
| <Insets bottom="10.0"/> | |||||
| </VBox.margin> | </VBox.margin> | ||||
| </Text> | </Text> | ||||
| <Label text="Eine Projeketarbeit von:"> | |||||
| <VBox.margin> | |||||
| <Insets bottom="6.0" /> | |||||
| </VBox.margin> | |||||
| </Label> | |||||
| <Label text=" - Ileana Krontsi" /> | |||||
| <Label layoutX="20.0" layoutY="71.0" text=" - Natascha Koch" /> | |||||
| <Label layoutX="20.0" layoutY="88.0" text=" - Johannes Oehm" /> | |||||
| <Label layoutX="20.0" layoutY="105.0" text=" - Nils Dittberner" /> | |||||
| <Label text="Projektpraktikum Medizinische Informatik"> | |||||
| <VBox.margin> | |||||
| <Insets top="10.0" /> | |||||
| </VBox.margin> | |||||
| </Label> | |||||
| <Label layoutX="20.0" layoutY="155.0" text="Wintersemester 2015/16" textFill="#777777" /> | |||||
| <Label layoutX="20.0" layoutY="172.0" text="Universität zu Lübeck" textFill="#777777" /> | |||||
| <Label text="Eine Projeketarbeit von:"> | |||||
| <VBox.margin> | |||||
| <Insets bottom="6.0"/> | |||||
| </VBox.margin> | |||||
| </Label> | |||||
| <Label text=" - Ileana Krontsi"/> | |||||
| <Label layoutX="20.0" layoutY="71.0" text=" - Natascha Koch"/> | |||||
| <Label layoutX="20.0" layoutY="88.0" text=" - Johannes Oehm"/> | |||||
| <Label layoutX="20.0" layoutY="105.0" text=" - Nils Dittberner"/> | |||||
| <Label text="Projektpraktikum Medizinische Informatik"> | |||||
| <VBox.margin> | |||||
| <Insets top="10.0"/> | |||||
| </VBox.margin> | |||||
| </Label> | |||||
| <Label layoutX="20.0" layoutY="155.0" text="Wintersemester 2015/16" textFill="#777777"/> | |||||
| <Label layoutX="20.0" layoutY="172.0" text="Universität zu Lübeck" textFill="#777777"/> | |||||
| </children> | </children> | ||||
| <padding> | <padding> | ||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | |||||
| </padding> | </padding> | ||||
| <TilePane.margin> | <TilePane.margin> | ||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | |||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/> | |||||
| </TilePane.margin> | </TilePane.margin> | ||||
| </VBox> | </VBox> | ||||
| </children> | </children> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </TilePane> | </TilePane> | ||||
| @@ -1,39 +1,38 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.geometry.*?> | |||||
| <?import javafx.scene.text.*?> | |||||
| <?import java.net.* ?> | |||||
| <?import java.lang.*?> | |||||
| <?import de.uniluebeck.mi.projmi6.view.DateTimePicker?> | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.*?> | |||||
| <SplitPane fx:controller="de.uniluebeck.mi.projmi6.controller.StationsHistorieController" dividerPositions="0.45" xmlns="http://javafx.com/javafx/8" | |||||
| xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <?import java.net.URL?> | |||||
| <SplitPane xmlns:fx="http://javafx.com/fxml/1" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.StationsHistorieController" | |||||
| dividerPositions="0.45" | |||||
| xmlns="http://javafx.com/javafx/8"> | |||||
| <items> | <items> | ||||
| <VBox> | <VBox> | ||||
| <children> | <children> | ||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | <ToolBar prefHeight="40.0" prefWidth="200.0"> | ||||
| <items> | <items> | ||||
| <Button mnemonicParsing="false" text="Neuen Aufenthalt erstellen" fx:id="btnStatHistCreate" onAction="#clickedCreateAufenthalt"/> | |||||
| <Button mnemonicParsing="false" text="Neuen Aufenthalt erstellen" fx:id="btnStatHistCreate" | |||||
| onAction="#clickedCreateAufenthalt"/> | |||||
| </items> | </items> | ||||
| </ToolBar> | </ToolBar> | ||||
| <TableView prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" fx:id="tblStationsHistorie" > | |||||
| <TableView prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" fx:id="tblStationsHistorie"> | |||||
| <columns> | <columns> | ||||
| <TableColumn prefWidth="75.0" text="Station" fx:id="colStatHistStation"/> | <TableColumn prefWidth="75.0" text="Station" fx:id="colStatHistStation"/> | ||||
| <TableColumn prefWidth="75.0" text="Aufnahme" fx:id="colStatHistAufnahmeDatum"/> | <TableColumn prefWidth="75.0" text="Aufnahme" fx:id="colStatHistAufnahmeDatum"/> | ||||
| <TableColumn prefWidth="75.0" text="Entlassung" fx:id="colStatHistEntlassungsDatum"/> | <TableColumn prefWidth="75.0" text="Entlassung" fx:id="colStatHistEntlassungsDatum"/> | ||||
| </columns> | </columns> | ||||
| <columnResizePolicy> | <columnResizePolicy> | ||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/> | |||||
| </columnResizePolicy> | </columnResizePolicy> | ||||
| </TableView> | </TableView> | ||||
| </children> | </children> | ||||
| </VBox> | </VBox> | ||||
| <VBox> | <VBox> | ||||
| <children> | <children> | ||||
| <GridPane VBox.vgrow="ALWAYS" fx:id="fields" styleClass="fields"> | |||||
| <GridPane VBox.vgrow="ALWAYS" fx:id="fields" styleClass="fields"> | |||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | ||||
| @@ -46,25 +45,29 @@ | |||||
| </rowConstraints> | </rowConstraints> | ||||
| <children> | <children> | ||||
| <Label text="Abteilung:"/> | <Label text="Abteilung:"/> | ||||
| <ComboBox prefWidth="150.0" GridPane.columnIndex="1" fx:id="cmbAbteilung"/> | |||||
| <ComboBox prefWidth="150.0" GridPane.columnIndex="1" fx:id="cmbAbteilung"/> | |||||
| <Label text="Station:" GridPane.rowIndex="1"/> | <Label text="Station:" GridPane.rowIndex="1"/> | ||||
| <ComboBox prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="1" fx:id="cmbStation"/> | <ComboBox prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="1" fx:id="cmbStation"/> | ||||
| <Label text="Aufnahmedatum / -Zeit:" GridPane.rowIndex="2" /> | |||||
| <Label text="Aufnahmedatum / -Zeit:" GridPane.rowIndex="2"/> | |||||
| <DateTimePicker GridPane.columnIndex="1" GridPane.rowIndex="2" fx:id="dtTmAufnahme"/> | <DateTimePicker GridPane.columnIndex="1" GridPane.rowIndex="2" fx:id="dtTmAufnahme"/> | ||||
| <Label text="Entlassungsdatum/ -Zeit:" GridPane.rowIndex="3"/> | <Label text="Entlassungsdatum/ -Zeit:" GridPane.rowIndex="3"/> | ||||
| <DateTimePicker GridPane.columnIndex="1" GridPane.rowIndex="3" fx:id="dtTmEntlassung"/> | |||||
| <DateTimePicker GridPane.columnIndex="1" GridPane.rowIndex="3" fx:id="dtTmEntlassung"/> | |||||
| </children> | </children> | ||||
| </GridPane> | </GridPane> | ||||
| <HBox alignment="CENTER_RIGHT"> | <HBox alignment="CENTER_RIGHT"> | ||||
| <children> | <children> | ||||
| <Button mnemonicParsing="false" text="Bearbeiten" onAction="#clickedEdit" fx:id="btnStatHistEdit"/> | |||||
| <Button mnemonicParsing="false" text="Abbrechen" onAction="#clickedAbort" fx:id="btnStatHistAbort"/> | |||||
| <Button mnemonicParsing="false" text="Speichern" onAction="#clickedSave" fx:id="btnStatHistSave"/> | |||||
| <Button mnemonicParsing="false" text="Entfernen" onAction="#clickedDelete" fx:id="btnStatHistDelete"/> | |||||
| <!-- <Button disable="true" mnemonicParsing="false" text="Eintrag entfernen" fx:id="btnStatHistCancel" onAction="#clickedCancel"/> --> | |||||
| <Button mnemonicParsing="false" text="Bearbeiten" onAction="#clickedEdit" | |||||
| fx:id="btnStatHistEdit"/> | |||||
| <Button mnemonicParsing="false" text="Abbrechen" onAction="#clickedAbort" | |||||
| fx:id="btnStatHistAbort"/> | |||||
| <Button mnemonicParsing="false" text="Speichern" onAction="#clickedSave" | |||||
| fx:id="btnStatHistSave"/> | |||||
| <Button mnemonicParsing="false" text="Entfernen" onAction="#clickedDelete" | |||||
| fx:id="btnStatHistDelete"/> | |||||
| <!-- <Button disable="true" mnemonicParsing="false" text="Eintrag entfernen" fx:id="btnStatHistCancel" onAction="#clickedCancel"/> --> | |||||
| </children> | </children> | ||||
| </HBox> | </HBox> | ||||
| <GridPane> | <GridPane> | ||||
| @@ -73,10 +76,14 @@ | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | ||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.rowIndex="2"/> | <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.rowIndex="2"/> | ||||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="3"/> | <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="3"/> | ||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="0" fx:id="statHistCreator" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="1" fx:id="statHistCreateTime" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="2" fx:id="statHistEditor" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="3" fx:id="statHistEditTime" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="0" | |||||
| fx:id="statHistCreator" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="1" | |||||
| fx:id="statHistCreateTime" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="2" | |||||
| fx:id="statHistEditor" text=""/> | |||||
| <Label styleClass="ersteller-value" GridPane.columnIndex="1" GridPane.rowIndex="3" | |||||
| fx:id="statHistEditTime" text=""/> | |||||
| </children> | </children> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | ||||
| @@ -93,6 +100,6 @@ | |||||
| </VBox> | </VBox> | ||||
| </items> | </items> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </SplitPane> | </SplitPane> | ||||
| @@ -3,15 +3,14 @@ | |||||
| } | } | ||||
| .ersteller-value { | .ersteller-value { | ||||
| /* -fx-text-fill: red; */ | |||||
| /* -fx-text-fill: red; */ | |||||
| } | } | ||||
| DateTimePicker .text-field{ | |||||
| -fx-background-color:transparent; | |||||
| DateTimePicker .text-field { | |||||
| -fx-background-color: transparent; | |||||
| } | } | ||||
| .fields:disabled{ | |||||
| .fields:disabled { | |||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| } | } | ||||
| @@ -19,40 +18,46 @@ DateTimePicker .text-field{ | |||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| } | } | ||||
| .fields:disabled .text-field{ | |||||
| .fields:disabled .text-field { | |||||
| -fx-text-fill: black; | -fx-text-fill: black; | ||||
| -fx-background-color: transparent; | -fx-background-color: transparent; | ||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| } | } | ||||
| .fields:disabled .label{ | |||||
| .fields:disabled .label { | |||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| } | } | ||||
| .fields:disabled ComboBox{ | |||||
| .fields:disabled ComboBox { | |||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| -fx-background-color: transparent; | -fx-background-color: transparent; | ||||
| -fx-text-fill: black; | -fx-text-fill: black; | ||||
| } | } | ||||
| .fields:disabled .list-cell{ | |||||
| .fields:disabled .list-cell { | |||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| -fx-background-color: transparent; | -fx-background-color: transparent; | ||||
| -fx-text-fill: black; | -fx-text-fill: black; | ||||
| } | } | ||||
| .fields:disabled .time-picker { | .fields:disabled .time-picker { | ||||
| -fx-background-color: transparent; | -fx-background-color: transparent; | ||||
| } | } | ||||
| .fields:disabled .arrow-button{ | |||||
| .fields:disabled .arrow-button { | |||||
| -fx-opacity: 0; | -fx-opacity: 0; | ||||
| } | } | ||||
| .fields:disabled .arrow{ | |||||
| .fields:disabled .arrow { | |||||
| -fx-opacity: 0; | -fx-opacity: 0; | ||||
| } | } | ||||
| .fields:disabled .date-picker { | .fields:disabled .date-picker { | ||||
| -fx-opacity: 1; | -fx-opacity: 1; | ||||
| -fx-background-color: transparent; | -fx-background-color: transparent; | ||||
| } | } | ||||
| .fields:disabled .now-button { | .fields:disabled .now-button { | ||||
| visibility: hidden; | |||||
| visibility: hidden; | |||||
| } | } | ||||
| @@ -1,82 +1,97 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.DateTimePicker?> | |||||
| <?import javafx.geometry.Insets?> | <?import javafx.geometry.Insets?> | ||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <?import de.uniluebeck.mi.projmi6.view.DateTimePicker?> | |||||
| <SplitPane xmlns:fx="http://javafx.com/fxml/1" dividerPositions="0.45" | <SplitPane xmlns:fx="http://javafx.com/fxml/1" dividerPositions="0.45" | ||||
| xmlns="http://javafx.com/javafx/8" fx:controller="de.uniluebeck.mi.projmi6.controller.UntersuchungenController"> | |||||
| xmlns="http://javafx.com/javafx/8" | |||||
| fx:controller="de.uniluebeck.mi.projmi6.controller.UntersuchungenController"> | |||||
| <items> | <items> | ||||
| <VBox> | <VBox> | ||||
| <children> | <children> | ||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | <ToolBar prefHeight="40.0" prefWidth="200.0"> | ||||
| <items> | <items> | ||||
| <Button fx:id="btnUntsCreate" mnemonicParsing="false" onAction="#clickedUntsCreate" text="Neue Untersuchung erstellen" /> | |||||
| <Button fx:id="btnUntsCreate" mnemonicParsing="false" onAction="#clickedUntsCreate" | |||||
| text="Neue Untersuchung erstellen"/> | |||||
| </items> | </items> | ||||
| </ToolBar> | </ToolBar> | ||||
| <ListView fx:id="untsList" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" /> | |||||
| <ListView fx:id="untsList" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/> | |||||
| </children> | </children> | ||||
| </VBox> | </VBox> | ||||
| <VBox prefHeight="200.0" prefWidth="100.0"> | <VBox prefHeight="200.0" prefWidth="100.0"> | ||||
| <children> | <children> | ||||
| <GridPane vgap="5.0" styleClass="fields" fx:id="fields"> | <GridPane vgap="5.0" styleClass="fields" fx:id="fields"> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="40.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="40.0" prefWidth="100.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> | |||||
| </columnConstraints> | </columnConstraints> | ||||
| <rowConstraints> | <rowConstraints> | ||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | </rowConstraints> | ||||
| <children> | <children> | ||||
| <Label text="OPS-Code:" /> | |||||
| <ComboBox fx:id="untsOpsCode" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" /> | |||||
| <Label text="OPS-Code:"/> | |||||
| <ComboBox fx:id="untsOpsCode" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1"/> | |||||
| <Label text="Durchführender Arzt:" GridPane.rowIndex="1" /> | |||||
| <ComboBox fx:id="untsArzt" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <Label text="Durchführender Arzt:" GridPane.rowIndex="1"/> | |||||
| <ComboBox fx:id="untsArzt" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="1"/> | |||||
| <Label text="Untersuchungszeitpunkt:" GridPane.rowIndex="2" /> | |||||
| <DateTimePicker fx:id="dtTmUntersuchungszeitpunkt" GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| <Label text="Untersuchungszeitpunkt:" GridPane.rowIndex="2"/> | |||||
| <DateTimePicker fx:id="dtTmUntersuchungszeitpunkt" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="2"/> | |||||
| </children> | </children> | ||||
| </GridPane> | </GridPane> | ||||
| <HBox alignment="TOP_RIGHT" prefHeight="100.0" prefWidth="200.0" spacing="5.0" VBox.vgrow="ALWAYS"> | <HBox alignment="TOP_RIGHT" prefHeight="100.0" prefWidth="200.0" spacing="5.0" VBox.vgrow="ALWAYS"> | ||||
| <children> | <children> | ||||
| <Button fx:id="btnUntsCancel" mnemonicParsing="false" onAction="#clickedUntsCancel" text="Storno" /> | |||||
| <Button fx:id="btnUntsAbort" mnemonicParsing="false" onAction="#clickedUntsAbort" text="Abbrechen" /> | |||||
| <Button fx:id="btnUntsSave" mnemonicParsing="false" onAction="#clickedUntsSave" text="Speichern" /> | |||||
| <Button fx:id="btnUntsCancel" mnemonicParsing="false" onAction="#clickedUntsCancel" | |||||
| text="Storno"/> | |||||
| <Button fx:id="btnUntsAbort" mnemonicParsing="false" onAction="#clickedUntsAbort" | |||||
| text="Abbrechen"/> | |||||
| <Button fx:id="btnUntsSave" mnemonicParsing="false" onAction="#clickedUntsSave" | |||||
| text="Speichern"/> | |||||
| </children> | </children> | ||||
| <padding> | |||||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> | |||||
| </padding> | |||||
| <padding> | |||||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/> | |||||
| </padding> | |||||
| </HBox> | </HBox> | ||||
| <GridPane> | <GridPane> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | |||||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0"/> | |||||
| </columnConstraints> | </columnConstraints> | ||||
| <rowConstraints> | <rowConstraints> | ||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES"/> | |||||
| </rowConstraints> | </rowConstraints> | ||||
| <children> | <children> | ||||
| <Label styleClass="ersteller-label" text="Ersteller:" GridPane.columnIndex="0" GridPane.rowIndex="0" /> | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.columnIndex="0" GridPane.rowIndex="1" /> | |||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.columnIndex="0" GridPane.rowIndex="2" /> | |||||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.columnIndex="0" GridPane.rowIndex="3" /> | |||||
| <Label styleClass="ersteller-value" fx:id="untsCreator" text="" GridPane.columnIndex="1" GridPane.rowIndex="0" /> | |||||
| <Label styleClass="ersteller-value" fx:id="untsCreateTime" text="" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <Label styleClass="ersteller-value" fx:id="untsChanger" text="" GridPane.columnIndex="1" GridPane.rowIndex="2" /> | |||||
| <Label styleClass="ersteller-value" fx:id="untsChangeTime" text="" GridPane.columnIndex="1" GridPane.rowIndex="3" /> | |||||
| <Label styleClass="ersteller-label" text="Ersteller:" GridPane.columnIndex="0" | |||||
| GridPane.rowIndex="0"/> | |||||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.columnIndex="0" | |||||
| GridPane.rowIndex="1"/> | |||||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter:" GridPane.columnIndex="0" | |||||
| GridPane.rowIndex="2"/> | |||||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.columnIndex="0" | |||||
| GridPane.rowIndex="3"/> | |||||
| <Label styleClass="ersteller-value" fx:id="untsCreator" text="" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="0"/> | |||||
| <Label styleClass="ersteller-value" fx:id="untsCreateTime" text="" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="1"/> | |||||
| <Label styleClass="ersteller-value" fx:id="untsChanger" text="" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="2"/> | |||||
| <Label styleClass="ersteller-value" fx:id="untsChangeTime" text="" GridPane.columnIndex="1" | |||||
| GridPane.rowIndex="3"/> | |||||
| </children> | </children> | ||||
| </GridPane> | </GridPane> | ||||
| </children> | </children> | ||||
| </VBox> | </VBox> | ||||
| </items> | </items> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | |||||
| <URL value="@style.css"/> | |||||
| </stylesheets> | </stylesheets> | ||||
| </SplitPane> | </SplitPane> | ||||