浏览代码

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/de/uniluebeck/mi/projmi6/model/Fall.java
hapi
Nils Dittberner 10 年前
父节点
当前提交
95636e4ec5
共有 9 个文件被更改,包括 191 次插入79 次删除
  1. +2
    -0
      src/main/java/de/uniluebeck/mi/projmi6/Main.java
  2. +66
    -17
      src/main/java/de/uniluebeck/mi/projmi6/controller/FallController.java
  3. +34
    -5
      src/main/java/de/uniluebeck/mi/projmi6/controller/MainController.java
  4. +24
    -11
      src/main/java/de/uniluebeck/mi/projmi6/controller/PatientTablesController.java
  5. +42
    -39
      src/main/java/de/uniluebeck/mi/projmi6/model/Fall.java
  6. +11
    -0
      src/main/java/de/uniluebeck/mi/projmi6/model/FallArt.java
  7. +5
    -0
      src/main/java/de/uniluebeck/mi/projmi6/model/Station.java
  8. +1
    -1
      src/main/resources/fall.fxml
  9. +6
    -6
      src/main/resources/main.fxml

+ 2
- 0
src/main/java/de/uniluebeck/mi/projmi6/Main.java 查看文件

@@ -1,6 +1,7 @@
package de.uniluebeck.mi.projmi6; package de.uniluebeck.mi.projmi6;


import de.uniluebeck.mi.projmi6.controller.MainController; 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.Kasse;
import de.uniluebeck.mi.projmi6.model.Mitarbeiter; import de.uniluebeck.mi.projmi6.model.Mitarbeiter;
import de.uniluebeck.mi.projmi6.model.OpsCode; import de.uniluebeck.mi.projmi6.model.OpsCode;
@@ -56,6 +57,7 @@ public class Main extends Application {
mainController.setMitarbeiter(FXCollections.observableArrayList( mainController.setMitarbeiter(FXCollections.observableArrayList(
mitarbeiter mitarbeiter
)); ));
mainController.setStationen(FXCollections.observableArrayList(DBHandler.getAllStationen()));


Parent root = fxmlLoader.load(); Parent root = fxmlLoader.load();




+ 66
- 17
src/main/java/de/uniluebeck/mi/projmi6/controller/FallController.java 查看文件

@@ -3,6 +3,7 @@ package de.uniluebeck.mi.projmi6.controller;
/** /**
* Created by 631806 on 12.11.15. * 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.FallArt;
import de.uniluebeck.mi.projmi6.model.Kasse; import de.uniluebeck.mi.projmi6.model.Kasse;
import de.uniluebeck.mi.projmi6.view.DateTimePicker; 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.ComboBox;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;


public class FallController { public class FallController {


@@ -27,46 +29,49 @@ public class FallController {
private DateTimePicker dtTmAufnahme, dtTmEntlassung; private DateTimePicker dtTmAufnahme, dtTmEntlassung;


@FXML @FXML
private Label fallPatID;

@FXML
private ComboBox<FallArt> fallFallart; private ComboBox<FallArt> fallFallart;


@FXML @FXML
private ComboBox<Kasse> fallKasse; private ComboBox<Kasse> fallKasse;


@FXML @FXML
private Button btnFallEnableEdit;
private TextField fallVersichertennummer;


@FXML @FXML
private Label fallCreator;
private TextField fallEinweisenderArzt;


@FXML @FXML
private Label fallEditor;

private CheckBox fallSelbsteinweisung;
@FXML @FXML
private TextField fallVersichertennummer;
private Label fallCreator;


@FXML @FXML
private Label fallPatID;

private Label fallEditor;
@FXML @FXML
private TextField fallEinweisenderArzt;

private Label fallCreateTime;
@FXML
private Label fallEditTime;
@FXML @FXML
private Button btnFallSave; private Button btnFallSave;


@FXML @FXML
private Label fallCreateTime;

private Button btnFallAbort;
@FXML @FXML
private CheckBox fallSelbsteinweisung;

private Button btnFallCancel;
@FXML @FXML
private TextField fallEntlTime;
private Button btnFallEnableEdit;


@FXML @FXML
private Button btnFallAbort;
private GridPane fallFields;


public enum State {
CREATE, EDIT, VIEW
}


@FXML
private Button btnFallCancel;


@FXML @FXML
public void initialize(){ 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());
}
} }

+ 34
- 5
src/main/java/de/uniluebeck/mi/projmi6/controller/MainController.java 查看文件

@@ -1,10 +1,9 @@
package de.uniluebeck.mi.projmi6.controller; 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.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.*; import javafx.scene.control.*;
@@ -25,7 +24,19 @@ public class MainController {
private SimpleObjectProperty<ObservableList<Icd10Code>> icd10Codes = new SimpleObjectProperty<>(); private SimpleObjectProperty<ObservableList<Icd10Code>> icd10Codes = new SimpleObjectProperty<>();
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<>();


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() { public ObservableList<Mitarbeiter> getMitarbeiter() {
return mitarbeiter.get(); return mitarbeiter.get();
@@ -69,6 +80,13 @@ public class MainController {
@FXML @FXML
private ListView lvFall; private ListView lvFall;


@FXML
private TabPane tabPaneFall;

@FXML
private Tab tabFallOverview, tabFallUntersuchungen, tabFallDiagnose, tabFallStationsHistorie ;




private Callback<Class<?>, Object> controllerFactory = clazz -> { private Callback<Class<?>, Object> controllerFactory = clazz -> {
if(clazz.equals(MainController.class)) { if(clazz.equals(MainController.class)) {
@@ -177,9 +195,20 @@ public class MainController {
fallOverview.disableProperty().bind(patientTablesController.selectedPatientProperty().isNull()); fallOverview.disableProperty().bind(patientTablesController.selectedPatientProperty().isNull());
cmbUserChoose.itemsProperty().bind(this.mitarbeiterProperty()); cmbUserChoose.itemsProperty().bind(this.mitarbeiterProperty());
patientTablesController.selectedPatientProperty().addListener((observableValue,oldValue,newValue)-> { 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();
}

} }

+ 24
- 11
src/main/java/de/uniluebeck/mi/projmi6/controller/PatientTablesController.java 查看文件

@@ -5,6 +5,8 @@ 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.Patient; 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.Bindings;
import javafx.beans.binding.ObjectBinding; import javafx.beans.binding.ObjectBinding;
import javafx.beans.property.ObjectProperty; import javafx.beans.property.ObjectProperty;
@@ -83,28 +85,28 @@ public class PatientTablesController{
private ToggleButton btnEntlassenePatientenZeigen; private ToggleButton btnEntlassenePatientenZeigen;


@FXML @FXML
private ComboBox<?> cmbStationenFilter;
private ComboBox<Station> cmbStationenFilter;


@FXML @FXML
private TableView<?> tblStationOverview;
private TableView<StationsUebersichtsItem> tblStationOverview;


@FXML @FXML
private TableColumn<?, ?> colStatPatId;
private TableColumn<StationsUebersichtsItem, String> colStatPatId;


@FXML @FXML
private TableColumn<?,?> colStatFullName;
private TableColumn<StationsUebersichtsItem, String> colStatFullName;


@FXML @FXML
private TableColumn<?, ?> colStatGebDatum;
private TableColumn<StationsUebersichtsItem, String> colStatGebDatum;


@FXML @FXML
private TableColumn<?, ?> colStatAlter;
private TableColumn<StationsUebersichtsItem, String> colStatAlter;


@FXML @FXML
private TableColumn<?, ?> colStatAufnahmedatum;
private TableColumn<StationsUebersichtsItem, String> colStatAufnahmedatum;


@FXML @FXML
private TableColumn<?, ?> colStatEntlassungsdatum;
private TableColumn<StationsUebersichtsItem, String> colStatEntlassungsdatum;


@FXML @FXML
private Tab stationOverviewTab, patientOverviewTab; private Tab stationOverviewTab, patientOverviewTab;
@@ -134,6 +136,7 @@ public class PatientTablesController{
lblTablePatientEmpty.setText("Liste ist leer."); lblTablePatientEmpty.setText("Liste ist leer.");
lblTableStationEmpty.setText("Daten werden geladen..."); lblTableStationEmpty.setText("Daten werden geladen...");


cmbStationenFilter.itemsProperty().bind(mainController.stationenProperty());


ObservableList<Patient> patientList = null; ObservableList<Patient> patientList = null;
try { try {
@@ -145,10 +148,11 @@ public class PatientTablesController{


tblPatientOverview.setItems(patientList); tblPatientOverview.setItems(patientList);


initColumns();
initColumnsPatient();
initColumnsStation();
} }


private void initColumns(){
private void initColumnsPatient(){
colPatPatId.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patIDProperty().asString()); colPatPatId.setCellValueFactory(cellDataFeatures -> cellDataFeatures.getValue().patIDProperty().asString());
colPatGeburtsname.setCellValueFactory(new PropertyValueFactory<>("geburtsname")); colPatGeburtsname.setCellValueFactory(new PropertyValueFactory<>("geburtsname"));
colPatNachname.setCellValueFactory(new PropertyValueFactory<>("nachname")); 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 @FXML
private void clickedCreatePatient (){ private void clickedCreatePatient (){
showEditWindow(null); showEditWindow(null);
@@ -208,7 +221,7 @@ public class PatientTablesController{
return Bindings.<Patient>createObjectBinding(() ->{ return Bindings.<Patient>createObjectBinding(() ->{
return patientOverviewTabPane.getSelectionModel().getSelectedItem().equals(patientOverviewTab) return patientOverviewTabPane.getSelectionModel().getSelectedItem().equals(patientOverviewTab)
? tblPatientOverview.getSelectionModel().getSelectedItem() ? tblPatientOverview.getSelectionModel().getSelectedItem()
: (Patient)tblStationOverview.getSelectionModel().getSelectedItem(); //TODO
: null; //(Patient)tblStationOverview.getSelectionModel().getSelectedItem(); //TODO
}, tblPatientOverview.getSelectionModel().selectedItemProperty(), }, tblPatientOverview.getSelectionModel().selectedItemProperty(),
tblStationOverview.getSelectionModel().selectedItemProperty(), tblStationOverview.getSelectionModel().selectedItemProperty(),
patientOverviewTabPane.getSelectionModel().selectedItemProperty()); patientOverviewTabPane.getSelectionModel().selectedItemProperty());


+ 42
- 39
src/main/java/de/uniluebeck/mi/projmi6/model/Fall.java 查看文件

@@ -2,9 +2,11 @@ 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.SimpleStringProperty; import javafx.beans.property.SimpleStringProperty;


import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;


/** /**
* Created by 627933 on 12.11.15. * Created by 627933 on 12.11.15.
@@ -18,10 +20,46 @@ public class Fall {
private SimpleBooleanProperty selbsteinweisung = new SimpleBooleanProperty(this, "selbsteinweisung"); private SimpleBooleanProperty selbsteinweisung = new SimpleBooleanProperty(this, "selbsteinweisung");
private SimpleStringProperty versichertenNummer = new SimpleStringProperty(this, "versichertenNummer"); private SimpleStringProperty versichertenNummer = new SimpleStringProperty(this, "versichertenNummer");
private SimpleBooleanProperty storniert = new SimpleBooleanProperty(this, "storniert"); 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 SimpleIntegerProperty fallID = new SimpleIntegerProperty(this, "fallid");
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);
}





public Patient getPatient() { public Patient getPatient() {
@@ -116,39 +154,4 @@ public class Fall {
this.fallID.set(fallID); this.fallID.set(fallID);
} }


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);
}
} }

+ 11
- 0
src/main/java/de/uniluebeck/mi/projmi6/model/FallArt.java 查看文件

@@ -16,6 +16,17 @@ public enum FallArt {
this.fallArt = fallArt; this.fallArt = fallArt;
} }


public static FallArt parseString (final String id){
switch (id) {
case "amb":
return AMBULANT;
case "stat":
return STATIONAER;
default:
return STATIONAER;
}
}

@Override @Override
public String toString() { public String toString() {
return fallArt; return fallArt;


+ 5
- 0
src/main/java/de/uniluebeck/mi/projmi6/model/Station.java 查看文件

@@ -60,4 +60,9 @@ public class Station {
public void setStationstyp(int stationstyp) { public void setStationstyp(int stationstyp) {
this.stationstyp.set(stationstyp); this.stationstyp.set(stationstyp);
} }

@Override
public String toString() {
return getBezeichnung();
}
} }

+ 1
- 1
src/main/resources/fall.fxml 查看文件

@@ -10,7 +10,7 @@
<?import de.uniluebeck.mi.projmi6.view.DateTimePicker?> <?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 fx:controller="de.uniluebeck.mi.projmi6.controller.FallController" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children> <children>
<GridPane vgap="5.0">
<GridPane vgap="5.0" fx:id="fallFields">
<children> <children>
<Label text="Patient:"/> <Label text="Patient:"/>
<Label fx:id="fallPatID" text="John Doe (PatID = XXX)" GridPane.columnIndex="1"/> <Label fx:id="fallPatID" text="John Doe (PatID = XXX)" GridPane.columnIndex="1"/>


+ 6
- 6
src/main/resources/main.fxml 查看文件

@@ -24,30 +24,30 @@
<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" />
<Button fx:id="btnFallCreate" text="Neuen _Fall erstellen" onAction="#clickedCreateFall"/>
</items> </items>
</ToolBar> </ToolBar>
<ListView VBox.vgrow="ALWAYS" fx:id="lvFall" /> <ListView VBox.vgrow="ALWAYS" fx:id="lvFall" />
</children> </children>
</VBox> </VBox>
<TabPane prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE">
<TabPane fx:id="tabPaneFall" prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE">
<tabs> <tabs>
<Tab 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 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 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 text="Stationshistorie">
<Tab fx:id="tabFallStationsHistorie" text="Stationshistorie">
<content> <content>
<fx:include source="stationshistorie.fxml" /> <fx:include source="stationshistorie.fxml" />
</content> </content>


正在加载...
取消
保存