| @@ -1,6 +1,7 @@ | |||
| package de.uniluebeck.mi.projmi6; | |||
| import de.uniluebeck.mi.projmi6.controller.MainController; | |||
| import de.uniluebeck.mi.projmi6.db.DBHandler; | |||
| import de.uniluebeck.mi.projmi6.model.Kasse; | |||
| import de.uniluebeck.mi.projmi6.model.Mitarbeiter; | |||
| import de.uniluebeck.mi.projmi6.model.OpsCode; | |||
| @@ -56,6 +57,7 @@ public class Main extends Application { | |||
| mainController.setMitarbeiter(FXCollections.observableArrayList( | |||
| mitarbeiter | |||
| )); | |||
| mainController.setStationen(FXCollections.observableArrayList(DBHandler.getAllStationen())); | |||
| Parent root = fxmlLoader.load(); | |||
| @@ -3,6 +3,7 @@ package de.uniluebeck.mi.projmi6.controller; | |||
| /** | |||
| * Created by 631806 on 12.11.15. | |||
| */ | |||
| import de.uniluebeck.mi.projmi6.model.Fall; | |||
| import de.uniluebeck.mi.projmi6.model.FallArt; | |||
| import de.uniluebeck.mi.projmi6.model.Kasse; | |||
| import de.uniluebeck.mi.projmi6.view.DateTimePicker; | |||
| @@ -14,6 +15,7 @@ import javafx.scene.control.CheckBox; | |||
| import javafx.scene.control.ComboBox; | |||
| import javafx.scene.control.Label; | |||
| import javafx.scene.control.TextField; | |||
| import javafx.scene.layout.GridPane; | |||
| public class FallController { | |||
| @@ -27,46 +29,49 @@ public class FallController { | |||
| private DateTimePicker dtTmAufnahme, dtTmEntlassung; | |||
| @FXML | |||
| private Label fallPatID; | |||
| @FXML | |||
| private ComboBox<FallArt> fallFallart; | |||
| @FXML | |||
| private ComboBox<Kasse> fallKasse; | |||
| @FXML | |||
| private Button btnFallEnableEdit; | |||
| private TextField fallVersichertennummer; | |||
| @FXML | |||
| private Label fallCreator; | |||
| private TextField fallEinweisenderArzt; | |||
| @FXML | |||
| private Label fallEditor; | |||
| private CheckBox fallSelbsteinweisung; | |||
| @FXML | |||
| private TextField fallVersichertennummer; | |||
| private Label fallCreator; | |||
| @FXML | |||
| private Label fallPatID; | |||
| private Label fallEditor; | |||
| @FXML | |||
| private TextField fallEinweisenderArzt; | |||
| private Label fallCreateTime; | |||
| @FXML | |||
| private Label fallEditTime; | |||
| @FXML | |||
| private Button btnFallSave; | |||
| @FXML | |||
| private Label fallCreateTime; | |||
| private Button btnFallAbort; | |||
| @FXML | |||
| private CheckBox fallSelbsteinweisung; | |||
| private Button btnFallCancel; | |||
| @FXML | |||
| private TextField fallEntlTime; | |||
| private Button btnFallEnableEdit; | |||
| @FXML | |||
| private Button btnFallAbort; | |||
| private GridPane fallFields; | |||
| public enum State { | |||
| CREATE, EDIT, VIEW | |||
| } | |||
| @FXML | |||
| private Button btnFallCancel; | |||
| @FXML | |||
| public void initialize(){ | |||
| @@ -105,4 +110,48 @@ public class FallController { | |||
| } | |||
| public void createNewFall() { | |||
| clearFields(); | |||
| setEditable(true); | |||
| btnFallSave.setVisible(true); | |||
| btnFallAbort.setVisible(true); | |||
| btnFallCancel.setVisible(false); | |||
| btnFallEnableEdit.setVisible(false); | |||
| } | |||
| private void setEditable(boolean editable){ | |||
| fallFields.setDisable(!editable); | |||
| } | |||
| private void clearFields(){ | |||
| dtTmAufnahme.setToCurrentDateTime(); | |||
| dtTmEntlassung.setToCurrentDateTime(); | |||
| fallPatID.setText("<todo>"); //TODO | |||
| fallCreateTime.setText("<auto>"); | |||
| fallCreator.setText("<auto>"); | |||
| fallEditTime.setText("<auto>"); | |||
| fallEditor.setText("<auto>"); | |||
| fallEinweisenderArzt.setText(""); | |||
| fallSelbsteinweisung.setSelected(false); | |||
| fallVersichertennummer.setText(""); | |||
| fallKasse.setValue(null); | |||
| fallFallart.setValue(null); | |||
| } | |||
| private void copyFieldDataIntoFall(Fall fall){ | |||
| fall.setAufnahmeDatum(dtTmAufnahme.getDateTime()); | |||
| fall.setEntlassungsDatum(dtTmEntlassung.getDateTime()); | |||
| } | |||
| } | |||
| @@ -1,10 +1,9 @@ | |||
| package de.uniluebeck.mi.projmi6.controller; | |||
| import de.uniluebeck.mi.projmi6.model.Icd10Code; | |||
| import de.uniluebeck.mi.projmi6.model.Kasse; | |||
| import de.uniluebeck.mi.projmi6.model.Mitarbeiter; | |||
| import de.uniluebeck.mi.projmi6.model.OpsCode; | |||
| import de.uniluebeck.mi.projmi6.db.DBHandler; | |||
| import de.uniluebeck.mi.projmi6.model.*; | |||
| import javafx.beans.property.SimpleObjectProperty; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.collections.ObservableList; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.*; | |||
| @@ -25,7 +24,19 @@ public class MainController { | |||
| private SimpleObjectProperty<ObservableList<Icd10Code>> icd10Codes = new SimpleObjectProperty<>(); | |||
| private SimpleObjectProperty<ObservableList<Mitarbeiter>> mitarbeiter = new SimpleObjectProperty<>(); | |||
| private SimpleObjectProperty<ObservableList<Kasse>> kassen = new SimpleObjectProperty<>(); | |||
| private SimpleObjectProperty<ObservableList<Station>> stationen = new SimpleObjectProperty<>(); | |||
| public ObservableList<Station> getStationen() { | |||
| return stationen.get(); | |||
| } | |||
| public SimpleObjectProperty<ObservableList<Station>> stationenProperty() { | |||
| return stationen; | |||
| } | |||
| public void setStationen(ObservableList<Station> stationen) { | |||
| this.stationen.set(stationen); | |||
| } | |||
| public ObservableList<Mitarbeiter> getMitarbeiter() { | |||
| return mitarbeiter.get(); | |||
| @@ -69,6 +80,13 @@ public class MainController { | |||
| @FXML | |||
| private ListView lvFall; | |||
| @FXML | |||
| private TabPane tabPaneFall; | |||
| @FXML | |||
| private Tab tabFallOverview, tabFallUntersuchungen, tabFallDiagnose, tabFallStationsHistorie ; | |||
| private Callback<Class<?>, Object> controllerFactory = clazz -> { | |||
| if(clazz.equals(MainController.class)) { | |||
| @@ -177,9 +195,20 @@ public class MainController { | |||
| fallOverview.disableProperty().bind(patientTablesController.selectedPatientProperty().isNull()); | |||
| cmbUserChoose.itemsProperty().bind(this.mitarbeiterProperty()); | |||
| patientTablesController.selectedPatientProperty().addListener((observableValue,oldValue,newValue)-> { | |||
| //Load to Fall lv. | |||
| //lvFall.setItems(FXCollections.observableArrayList(DBHandler.getFallsForPatientId(newValue.getPatID()))); | |||
| }); | |||
| } | |||
| @FXML | |||
| private void clickedCreateFall(){ | |||
| tabFallDiagnose.setDisable(true); | |||
| tabFallUntersuchungen.setDisable(true); | |||
| tabFallStationsHistorie.setDisable(true); | |||
| tabPaneFall.getSelectionModel().select(tabFallOverview); | |||
| fallController.createNewFall(); | |||
| } | |||
| } | |||
| @@ -5,6 +5,8 @@ package de.uniluebeck.mi.projmi6.controller; | |||
| */ | |||
| import de.uniluebeck.mi.projmi6.db.DBHandler; | |||
| import de.uniluebeck.mi.projmi6.model.Patient; | |||
| import de.uniluebeck.mi.projmi6.model.Station; | |||
| import de.uniluebeck.mi.projmi6.model.StationsUebersichtsItem; | |||
| import javafx.beans.binding.Bindings; | |||
| import javafx.beans.binding.ObjectBinding; | |||
| import javafx.beans.property.ObjectProperty; | |||
| @@ -83,28 +85,28 @@ public class PatientTablesController{ | |||
| private ToggleButton btnEntlassenePatientenZeigen; | |||
| @FXML | |||
| private ComboBox<?> cmbStationenFilter; | |||
| private ComboBox<Station> cmbStationenFilter; | |||
| @FXML | |||
| private TableView<?> tblStationOverview; | |||
| private TableView<StationsUebersichtsItem> tblStationOverview; | |||
| @FXML | |||
| private TableColumn<?, ?> colStatPatId; | |||
| private TableColumn<StationsUebersichtsItem, String> colStatPatId; | |||
| @FXML | |||
| private TableColumn<?,?> colStatFullName; | |||
| private TableColumn<StationsUebersichtsItem, String> colStatFullName; | |||
| @FXML | |||
| private TableColumn<?, ?> colStatGebDatum; | |||
| private TableColumn<StationsUebersichtsItem, String> colStatGebDatum; | |||
| @FXML | |||
| private TableColumn<?, ?> colStatAlter; | |||
| private TableColumn<StationsUebersichtsItem, String> colStatAlter; | |||
| @FXML | |||
| private TableColumn<?, ?> colStatAufnahmedatum; | |||
| private TableColumn<StationsUebersichtsItem, String> colStatAufnahmedatum; | |||
| @FXML | |||
| private TableColumn<?, ?> colStatEntlassungsdatum; | |||
| private TableColumn<StationsUebersichtsItem, String> colStatEntlassungsdatum; | |||
| @FXML | |||
| private Tab stationOverviewTab, patientOverviewTab; | |||
| @@ -134,6 +136,7 @@ public class PatientTablesController{ | |||
| lblTablePatientEmpty.setText("Liste ist leer."); | |||
| lblTableStationEmpty.setText("Daten werden geladen..."); | |||
| cmbStationenFilter.itemsProperty().bind(mainController.stationenProperty()); | |||
| ObservableList<Patient> patientList = null; | |||
| try { | |||
| @@ -145,10 +148,11 @@ public class PatientTablesController{ | |||
| tblPatientOverview.setItems(patientList); | |||
| initColumns(); | |||
| initColumnsPatient(); | |||
| initColumnsStation(); | |||
| } | |||
| private void initColumns(){ | |||
| private void initColumnsPatient(){ | |||
| colPatPatId.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patIDProperty().asString()); | |||
| colPatGeburtsname.setCellValueFactory(new PropertyValueFactory<>("geburtsname")); | |||
| colPatNachname.setCellValueFactory(new PropertyValueFactory<>("nachname")); | |||
| @@ -164,6 +168,15 @@ public class PatientTablesController{ | |||
| } | |||
| private void initColumnsStation(){ | |||
| colStatPatId.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patIdProperty().asString()); | |||
| colStatFullName.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patNameProperty()); | |||
| colStatGebDatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patBirthdateProperty().asString()); | |||
| colStatAlter.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patAgeProperty().asString()); | |||
| colStatAufnahmedatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().stationAufnahmeProperty().asString()); | |||
| colStatEntlassungsdatum.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().stationEntlassungProperty().asString()); | |||
| } | |||
| @FXML | |||
| private void clickedCreatePatient (){ | |||
| showEditWindow(null); | |||
| @@ -208,7 +221,7 @@ public class PatientTablesController{ | |||
| return Bindings.<Patient>createObjectBinding(() ->{ | |||
| return patientOverviewTabPane.getSelectionModel().getSelectedItem().equals(patientOverviewTab) | |||
| ? tblPatientOverview.getSelectionModel().getSelectedItem() | |||
| : (Patient)tblStationOverview.getSelectionModel().getSelectedItem(); //TODO | |||
| : null; //(Patient)tblStationOverview.getSelectionModel().getSelectedItem(); //TODO | |||
| }, tblPatientOverview.getSelectionModel().selectedItemProperty(), | |||
| tblStationOverview.getSelectionModel().selectedItemProperty(), | |||
| patientOverviewTabPane.getSelectionModel().selectedItemProperty()); | |||
| @@ -2,9 +2,11 @@ package de.uniluebeck.mi.projmi6.model; | |||
| import javafx.beans.property.SimpleBooleanProperty; | |||
| import javafx.beans.property.SimpleIntegerProperty; | |||
| import javafx.beans.property.SimpleObjectProperty; | |||
| import javafx.beans.property.SimpleStringProperty; | |||
| import java.text.SimpleDateFormat; | |||
| import java.time.LocalDateTime; | |||
| /** | |||
| * Created by 627933 on 12.11.15. | |||
| @@ -18,9 +20,45 @@ public class Fall { | |||
| private SimpleBooleanProperty selbsteinweisung = new SimpleBooleanProperty(this, "selbsteinweisung"); | |||
| private SimpleStringProperty versichertenNummer = new SimpleStringProperty(this, "versichertenNummer"); | |||
| private SimpleBooleanProperty storniert = new SimpleBooleanProperty(this, "storniert"); | |||
| private SimpleStringProperty vorstellDatum = new SimpleStringProperty(this, "vorstellDatum"); | |||
| private SimpleStringProperty aufnahmeDatum = new SimpleStringProperty(this, "aufnahmeDatum"); | |||
| private SimpleStringProperty entlassungsDatum = new SimpleStringProperty(this, "entlassungsDatum"); | |||
| private SimpleObjectProperty<LocalDateTime> vorstellDatum = new SimpleObjectProperty<>(this, "vorstellDatum"); | |||
| private SimpleObjectProperty<LocalDateTime> aufnahmeDatum = new SimpleObjectProperty<>(this, "aufnahmeDatum"); | |||
| private SimpleObjectProperty<LocalDateTime> entlassungsDatum = new SimpleObjectProperty<>(this, "entlassungsDatum"); | |||
| public LocalDateTime getVorstellDatum() { | |||
| return vorstellDatum.get(); | |||
| } | |||
| public SimpleObjectProperty<LocalDateTime> vorstellDatumProperty() { | |||
| return vorstellDatum; | |||
| } | |||
| public void setVorstellDatum(LocalDateTime vorstellDatum) { | |||
| this.vorstellDatum.set(vorstellDatum); | |||
| } | |||
| public LocalDateTime getAufnahmeDatum() { | |||
| return aufnahmeDatum.get(); | |||
| } | |||
| public SimpleObjectProperty<LocalDateTime> aufnahmeDatumProperty() { | |||
| return aufnahmeDatum; | |||
| } | |||
| public void setAufnahmeDatum(LocalDateTime aufnahmeDatum) { | |||
| this.aufnahmeDatum.set(aufnahmeDatum); | |||
| } | |||
| public LocalDateTime getEntlassungsDatum() { | |||
| return entlassungsDatum.get(); | |||
| } | |||
| public SimpleObjectProperty<LocalDateTime> entlassungsDatumProperty() { | |||
| return entlassungsDatum; | |||
| } | |||
| public void setEntlassungsDatum(LocalDateTime entlassungsDatum) { | |||
| this.entlassungsDatum.set(entlassungsDatum); | |||
| } | |||
| @@ -99,39 +137,4 @@ public class Fall { | |||
| } | |||
| public String getVorstellDatum() { | |||
| return vorstellDatum.get(); | |||
| } | |||
| public SimpleStringProperty vorstellDatumProperty() { | |||
| return vorstellDatum; | |||
| } | |||
| public void setVorstellDatum(String vorstellDatum) { | |||
| this.vorstellDatum.set(vorstellDatum); | |||
| } | |||
| public String getAufnahmeDatum() { | |||
| return aufnahmeDatum.get(); | |||
| } | |||
| public SimpleStringProperty aufnahmeDatumProperty() { | |||
| return aufnahmeDatum; | |||
| } | |||
| public void setAufnahmeDatum(String aufnahmeDatum) { | |||
| this.aufnahmeDatum.set(aufnahmeDatum); | |||
| } | |||
| public String getEntlassungsDatum() { | |||
| return entlassungsDatum.get(); | |||
| } | |||
| public SimpleStringProperty entlassungsDatumProperty() { | |||
| return entlassungsDatum; | |||
| } | |||
| public void setEntlassungsDatum(String entlassungsDatum) { | |||
| this.entlassungsDatum.set(entlassungsDatum); | |||
| } | |||
| } | |||
| @@ -60,4 +60,9 @@ public class Station { | |||
| public void setStationstyp(int stationstyp) { | |||
| this.stationstyp.set(stationstyp); | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return getBezeichnung(); | |||
| } | |||
| } | |||
| @@ -10,7 +10,7 @@ | |||
| <?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"> | |||
| <children> | |||
| <GridPane vgap="5.0"> | |||
| <GridPane vgap="5.0" fx:id="fallFields"> | |||
| <children> | |||
| <Label text="Patient:"/> | |||
| <Label fx:id="fallPatID" text="John Doe (PatID = XXX)" GridPane.columnIndex="1"/> | |||
| @@ -24,30 +24,30 @@ | |||
| <children> | |||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | |||
| <items> | |||
| <Button fx:id="btnFallCreate" text="Neuen _Fall erstellen" /> | |||
| <Button fx:id="btnFallCreate" text="Neuen _Fall erstellen" onAction="#clickedCreateFall"/> | |||
| </items> | |||
| </ToolBar> | |||
| <ListView VBox.vgrow="ALWAYS" fx:id="lvFall" /> | |||
| </children> | |||
| </VBox> | |||
| <TabPane prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE"> | |||
| <TabPane fx:id="tabPaneFall" prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE"> | |||
| <tabs> | |||
| <Tab text="Fallübersicht"> | |||
| <Tab fx:id="tabFallOverview" text="Fallübersicht"> | |||
| <content> | |||
| <fx:include source="fall.fxml" /> | |||
| </content> | |||
| </Tab> | |||
| <Tab text="Untersuchungen"> | |||
| <Tab fx:id="tabFallUntersuchungen" text="Untersuchungen"> | |||
| <content> | |||
| <fx:include source="untersuchungen.fxml" /> | |||
| </content> | |||
| </Tab> | |||
| <Tab text="Diagnose"> | |||
| <Tab fx:id="tabFallDiagnose" text="Diagnose"> | |||
| <content> | |||
| <fx:include source="diagnose.fxml" /> | |||
| </content> | |||
| </Tab> | |||
| <Tab text="Stationshistorie"> | |||
| <Tab fx:id="tabFallStationsHistorie" text="Stationshistorie"> | |||
| <content> | |||
| <fx:include source="stationshistorie.fxml" /> | |||
| </content> | |||