|
|
@@ -14,48 +14,33 @@ import javafx.collections.FXCollections; |
|
|
import javafx.collections.ObservableList; |
|
|
import javafx.collections.ObservableList; |
|
|
import javafx.event.ActionEvent; |
|
|
import javafx.event.ActionEvent; |
|
|
import javafx.fxml.FXML; |
|
|
import javafx.fxml.FXML; |
|
|
import javafx.scene.control.Button; |
|
|
|
|
|
import javafx.scene.control.CheckBox; |
|
|
|
|
|
import javafx.scene.control.ComboBox; |
|
|
|
|
|
import javafx.scene.control.Label; |
|
|
|
|
|
import javafx.scene.control.TextField; |
|
|
|
|
|
|
|
|
import javafx.scene.control.*; |
|
|
import javafx.scene.layout.GridPane; |
|
|
import javafx.scene.layout.GridPane; |
|
|
|
|
|
|
|
|
import java.sql.SQLException; |
|
|
import java.sql.SQLException; |
|
|
|
|
|
|
|
|
public class FallController { |
|
|
public class FallController { |
|
|
|
|
|
|
|
|
|
|
|
SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); |
|
|
|
|
|
@FXML |
|
|
|
|
|
Button btnFallSendHl7; |
|
|
private MainController mainController; |
|
|
private MainController mainController; |
|
|
|
|
|
|
|
|
public FallController (MainController mainController){ |
|
|
|
|
|
this.mainController = mainController; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private DateTimePicker dtTmAufnahme, dtTmEntlassung; |
|
|
private DateTimePicker dtTmAufnahme, dtTmEntlassung; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private Label fallPatID; |
|
|
private Label fallPatID; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private ComboBox<FallArt> fallFallart; |
|
|
private ComboBox<FallArt> fallFallart; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private ComboBox<Kasse> fallKasse; |
|
|
private ComboBox<Kasse> fallKasse; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private TextField fallVersichertennummer; |
|
|
private TextField fallVersichertennummer; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private TextField fallEinweisenderArzt; |
|
|
private TextField fallEinweisenderArzt; |
|
|
@FXML |
|
|
@FXML |
|
|
private CheckBox fallSelbsteinweisung; |
|
|
private CheckBox fallSelbsteinweisung; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private ComboBox<Diagnose> fallHauptdiagnose; |
|
|
private ComboBox<Diagnose> fallHauptdiagnose; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private Label fallCreator; |
|
|
private Label fallCreator; |
|
|
@FXML |
|
|
@FXML |
|
|
@@ -66,34 +51,30 @@ public class FallController { |
|
|
private Label fallEditTime; |
|
|
private Label fallEditTime; |
|
|
@FXML |
|
|
@FXML |
|
|
private Button btnFallSave; |
|
|
private Button btnFallSave; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private Button btnFallAbort; |
|
|
private Button btnFallAbort; |
|
|
@FXML |
|
|
@FXML |
|
|
private Button btnFallCancel; |
|
|
private Button btnFallCancel; |
|
|
@FXML |
|
|
@FXML |
|
|
private Button btnFallEnableEdit; |
|
|
private Button btnFallEnableEdit; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private GridPane fallFields; |
|
|
private GridPane fallFields; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private SimpleObjectProperty<Fall> fallProperty = new SimpleObjectProperty<>(); |
|
|
private SimpleObjectProperty<Fall> fallProperty = new SimpleObjectProperty<>(); |
|
|
|
|
|
|
|
|
public Fall getFall() { |
|
|
|
|
|
return fallProperty.get(); |
|
|
|
|
|
|
|
|
public FallController(MainController mainController) { |
|
|
|
|
|
this.mainController = mainController; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public SimpleObjectProperty<Fall> fallPropertyProperty() { |
|
|
|
|
|
return fallProperty; |
|
|
|
|
|
|
|
|
public Fall getFall() { |
|
|
|
|
|
return fallProperty.get(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setFall(Fall fall) { |
|
|
public void setFall(Fall fall) { |
|
|
this.fallProperty.set(fall); |
|
|
this.fallProperty.set(fall); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public enum State { |
|
|
|
|
|
CREATE, EDIT, VIEW |
|
|
|
|
|
|
|
|
public SimpleObjectProperty<Fall> fallPropertyProperty() { |
|
|
|
|
|
return fallProperty; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public State getState() { |
|
|
public State getState() { |
|
|
@@ -104,27 +85,18 @@ public class FallController { |
|
|
return state; |
|
|
return state; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SimpleObjectProperty<State> state = new SimpleObjectProperty<>(State.VIEW); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ObjectProperty<ObservableList<Diagnose>> diagnosenProperty(){ |
|
|
public ObjectProperty<ObservableList<Diagnose>> diagnosenProperty(){ |
|
|
return fallHauptdiagnose.itemsProperty(); |
|
|
return fallHauptdiagnose.itemsProperty(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setDiagnosen(ObservableList<Diagnose> list){ |
|
|
|
|
|
fallHauptdiagnose.setItems(list); |
|
|
|
|
|
|
|
|
public ObservableList<Diagnose> getDiagnosen() { |
|
|
|
|
|
return fallHauptdiagnose.getItems(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ObservableList<Diagnose> getDiagnosen(){ |
|
|
|
|
|
return fallHauptdiagnose.getItems(); |
|
|
|
|
|
|
|
|
public void setDiagnosen(ObservableList<Diagnose> list){ |
|
|
|
|
|
fallHauptdiagnose.setItems(list); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
public void initialize(){ |
|
|
public void initialize(){ |
|
|
fallEinweisenderArzt.disableProperty().bind(fallSelbsteinweisung.selectedProperty()); |
|
|
fallEinweisenderArzt.disableProperty().bind(fallSelbsteinweisung.selectedProperty()); |
|
|
@@ -183,9 +155,6 @@ public class FallController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
Button btnFallSendHl7; |
|
|
|
|
|
|
|
|
|
|
|
@FXML |
|
|
|
|
|
private void clickedSendHl7(){ |
|
|
private void clickedSendHl7(){ |
|
|
/* Natascha */ |
|
|
/* Natascha */ |
|
|
//TODO send funny message |
|
|
//TODO send funny message |
|
|
@@ -197,7 +166,6 @@ public class FallController { |
|
|
this.state.set(State.EDIT); |
|
|
this.state.set(State.EDIT); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
void clickedFallEnableEdit(ActionEvent event) { |
|
|
void clickedFallEnableEdit(ActionEvent event) { |
|
|
editFall(); |
|
|
editFall(); |
|
|
@@ -205,11 +173,11 @@ public class FallController { |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
void clickedFallCancel(ActionEvent event) { |
|
|
void clickedFallCancel(ActionEvent event) { |
|
|
if(fallProperty.get()!=null){ |
|
|
|
|
|
|
|
|
if (fallProperty.get() != null) { |
|
|
fallProperty.get().setStorniert(true); |
|
|
fallProperty.get().setStorniert(true); |
|
|
try { |
|
|
try { |
|
|
DBHandler.setFall(fallProperty.get(), mainController.getCurrentMitarbeiter().getMitarbID(), true); |
|
|
DBHandler.setFall(fallProperty.get(), mainController.getCurrentMitarbeiter().getMitarbID(), true); |
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
mainController.refreshCasesFromDb(mainController.getPatientTablesController().getSelectedPatient()); |
|
|
mainController.refreshCasesFromDb(mainController.getPatientTablesController().getSelectedPatient()); |
|
|
@@ -262,9 +230,6 @@ public class FallController { |
|
|
fallVersichertennummer.setText(patient.getVersichertennummer()); |
|
|
fallVersichertennummer.setText(patient.getVersichertennummer()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void clearFields(){ |
|
|
private void clearFields(){ |
|
|
if(state.get() == State.CREATE) { |
|
|
if(state.get() == State.CREATE) { |
|
|
dtTmAufnahme.setToCurrentDateTime(); |
|
|
dtTmAufnahme.setToCurrentDateTime(); |
|
|
@@ -293,7 +258,6 @@ 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()); |
|
|
@@ -309,14 +273,15 @@ public class FallController { |
|
|
fall.setKasse(fallKasse.getValue()); |
|
|
fall.setKasse(fallKasse.getValue()); |
|
|
fall.setFallArt(fallFallart.getValue()); |
|
|
fall.setFallArt(fallFallart.getValue()); |
|
|
|
|
|
|
|
|
fall.setHauptdiagnoseId(fallHauptdiagnose.getSelectionModel().getSelectedItem().getDiagID()); |
|
|
|
|
|
|
|
|
if (fallHauptdiagnose.getSelectionModel().getSelectedItem() != null) { |
|
|
|
|
|
fall.setHauptdiagnoseId(fallHauptdiagnose.getSelectionModel().getSelectedItem().getDiagID()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//fall.setVorstellDatum(); //TODO |
|
|
//fall.setVorstellDatum(); //TODO |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void copyFallDataIntoField(Fall fall){ |
|
|
private void copyFallDataIntoField(Fall fall){ |
|
|
if(fall==null){ |
|
|
if(fall==null){ |
|
|
System.out.println("copyFallDataIntoFiled - Fall ist null"); |
|
|
System.out.println("copyFallDataIntoFiled - Fall ist null"); |
|
|
@@ -353,4 +318,9 @@ public class FallController { |
|
|
|
|
|
|
|
|
fallFallart.setValue(fall.getFallArt()); |
|
|
fallFallart.setValue(fall.getFallArt()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public enum State { |
|
|
|
|
|
CREATE, EDIT, VIEW |
|
|
|
|
|
} |
|
|
} |
|
|
} |