|
|
|
@@ -5,10 +5,7 @@ package de.uniluebeck.mi.projmi6.controller; |
|
|
|
*/ |
|
|
|
|
|
|
|
import de.uniluebeck.mi.projmi6.db.DBHandler; |
|
|
|
import de.uniluebeck.mi.projmi6.model.Diagnose; |
|
|
|
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.model.*; |
|
|
|
import de.uniluebeck.mi.projmi6.view.DateTimePicker; |
|
|
|
import javafx.beans.property.SimpleObjectProperty; |
|
|
|
import javafx.collections.FXCollections; |
|
|
|
@@ -80,7 +77,7 @@ public class FallController { |
|
|
|
|
|
|
|
private SimpleObjectProperty<Fall> fallProperty = new SimpleObjectProperty<>(); |
|
|
|
|
|
|
|
public Fall getFallProperty() { |
|
|
|
public Fall getFall() { |
|
|
|
return fallProperty.get(); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -88,8 +85,8 @@ public class FallController { |
|
|
|
return fallProperty; |
|
|
|
} |
|
|
|
|
|
|
|
public void setFallProperty(Fall fallProperty) { |
|
|
|
this.fallProperty.set(fallProperty); |
|
|
|
public void setFall(Fall fall) { |
|
|
|
this.fallProperty.set(fall); |
|
|
|
} |
|
|
|
|
|
|
|
public enum State { |
|
|
|
@@ -181,14 +178,16 @@ public class FallController { |
|
|
|
clearFields(); |
|
|
|
this.state.set(State.CREATE); |
|
|
|
|
|
|
|
Patient patient = mainController.getPatientTablesController().getSelectedPatient(); |
|
|
|
|
|
|
|
// Kasse by Default auf die im Patienten hinterlegten Kasse setzen. |
|
|
|
for (Kasse kasse : fallKasse.getItems()) { |
|
|
|
if (kasse.getKassenID() == fallProperty.get().getPatient().getKassenID()) { |
|
|
|
if (kasse.getKassenID() == patient.getKassenID()) { |
|
|
|
fallKasse.getSelectionModel().select(kasse); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
fallVersichertennummer.setText(fallProperty.get().getPatient().getVersichertennummer()); |
|
|
|
fallVersichertennummer.setText(patient.getVersichertennummer()); |
|
|
|
|
|
|
|
// TODO: Jojo: Kannst Du das wieder heile machen? :D |
|
|
|
// fallProperty.unbind(); |
|
|
|
@@ -228,10 +227,7 @@ public class FallController { |
|
|
|
|
|
|
|
|
|
|
|
private void copyFieldDataIntoFall(Fall fall){ |
|
|
|
|
|
|
|
// TODO: Jojo: Soll man das so machen? |
|
|
|
fall.setPatient(mainController.getPatientTablesController().getSelectedPatient()); |
|
|
|
|
|
|
|
fall.setAufnahmeDatum(dtTmAufnahme.getDateTime()); |
|
|
|
fall.setEntlassungsDatum(dtTmEntlassung.getDateTime()); |
|
|
|
if(fallSelbsteinweisung.isSelected()) { |
|
|
|
|