Browse Source

Fall bearbeiten einweisender arzt versicherungsnummer Fallart

testBranch
Johannes Oehm 10 years ago
parent
commit
b77763a1e0
4 changed files with 37 additions and 10 deletions
  1. +4
    -3
      src/main/java/de/uniluebeck/mi/projmi6/controller/FallController.java
  2. +5
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/MainController.java
  3. +27
    -6
      src/main/java/de/uniluebeck/mi/projmi6/controller/StationsHistorieController.java
  4. +1
    -1
      src/main/resources/stationshistorie.fxml

+ 4
- 3
src/main/java/de/uniluebeck/mi/projmi6/controller/FallController.java View File

@@ -191,6 +191,7 @@ public class FallController {
e.printStackTrace(); e.printStackTrace();
} }
} else { } else {
copyFieldDataIntoFall(fallProperty.get());
try { try {
DBHandler.setFall(fallProperty.get(), mainController.getCurrentMitarbeiter().getMitarbID(), true); DBHandler.setFall(fallProperty.get(), mainController.getCurrentMitarbeiter().getMitarbID(), true);


@@ -259,7 +260,7 @@ public class FallController {
fall.setSelbsteinweisung(true); fall.setSelbsteinweisung(true);
fall.setEinweisenderArzt(null); fall.setEinweisenderArzt(null);
}else{ }else{
//fall.setEinweisenderArzt(fallEinweisenderArzt.getText()); TODO
fall.setEinweisenderArzt(fallEinweisenderArzt.getText());
fall.setSelbsteinweisung(false); fall.setSelbsteinweisung(false);
} }
fall.setVersichertenNummer(fallVersichertennummer.getText()); fall.setVersichertenNummer(fallVersichertennummer.getText());
@@ -287,7 +288,7 @@ public class FallController {
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());
fallSelbsteinweisung.setSelected(fall.getSelbsteinweisung()); fallSelbsteinweisung.setSelected(fall.getSelbsteinweisung());


fallVersichertennummer.setText(fall.getVersichertenNummer()); fallVersichertennummer.setText(fall.getVersichertenNummer());
@@ -296,6 +297,6 @@ public class FallController {
//fallHauptdiagnose.setValue(fall.getHauptDiagnose()); TODO //fallHauptdiagnose.setValue(fall.getHauptDiagnose()); TODO
// fallHauptdiagnose.setItems(fall.getD); TODO // fallHauptdiagnose.setItems(fall.getD); TODO


//fallFallart.setValue(fall.getFallArt());
fallFallart.setValue(fall.getFallArt());
} }
} }

+ 5
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/MainController.java View File

@@ -325,6 +325,11 @@ public class MainController {
return lvFall.getSelectionModel().getSelectedItem(); return lvFall.getSelectionModel().getSelectedItem();
} }


public ReadOnlyObjectProperty<Fall> fallProperty(){
return lvFall.getSelectionModel().selectedItemProperty();
}


public enum TabName { public enum TabName {
OVERVIEW, DIAGNOSE, UNTERSUCHUNG, STATIONSHISTORIE; OVERVIEW, DIAGNOSE, UNTERSUCHUNG, STATIONSHISTORIE;
} }


+ 27
- 6
src/main/java/de/uniluebeck/mi/projmi6/controller/StationsHistorieController.java View File

@@ -76,6 +76,9 @@ public class StationsHistorieController {
} }


@FXML @FXML
private Button btnStatHistCreate;

@FXML
private void initialize() { private void initialize() {
initColumns(); initColumns();


@@ -84,10 +87,12 @@ public class StationsHistorieController {


fields.disableProperty().bind(stateProperty().isEqualTo(State.VIEW)); fields.disableProperty().bind(stateProperty().isEqualTo(State.VIEW));


btnStatHistCreate.disableProperty().bind(mainController.fallProperty().isNull());

state.addListener((observable, oldValue, newValue) -> { state.addListener((observable, oldValue, newValue) -> {
if(newValue == State.CREATE || newValue == State.EDIT){
if (newValue == State.CREATE || newValue == State.EDIT) {
mainController.lockForEdit(MainController.TabName.STATIONSHISTORIE); mainController.lockForEdit(MainController.TabName.STATIONSHISTORIE);
}else{
} else {
mainController.unlockFromEdit(); mainController.unlockFromEdit();
} }
}); });
@@ -148,6 +153,14 @@ public class StationsHistorieController {
e.printStackTrace(); e.printStackTrace();
} }
mainController.refreshCaseData(); mainController.refreshCaseData();
}else{
copyFieldDataIntoStationsHistorie(stationsHistorieSelected);
try {
DBHandler.setStationsHistorie(stationsHistorieSelected, true);
} catch (SQLException e) {
e.printStackTrace();
}
mainController.refreshCaseData();
} }
} }


@@ -186,11 +199,9 @@ public class StationsHistorieController {
} }


private void initColumns(){ private void initColumns(){
// colStatHistStation.setCellValueFactory(new PropertyValueFactory<StationsHistorie, String>());
colStatHistStation.setCellValueFactory(new PropertyValueFactory<StationsHistorie, String>("stationKey"));
colStatHistAufnahmeDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("aufnahmeDatum")); colStatHistAufnahmeDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("aufnahmeDatum"));
colStatHistEntlassungsDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("entlassungsDatum")); colStatHistEntlassungsDatum.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>("entlassungsDatum"));
//colStatHistStation.setCellValueFactory(new PropertyValueFactory<StationsHistorie, LocalDate>());
//
} }


private void copyStationsHistorieDataIntoFields(){ private void copyStationsHistorieDataIntoFields(){
@@ -200,7 +211,17 @@ public class StationsHistorieController {
return; return;
} }


//TODO cmbStation.setValue
//Setze Station im Dropdownfeld
for (Station station : cmbStation.getItems()) {
if(station.getStation().equals(stationsHistorieSelected.getStationKey())){
cmbStation.getSelectionModel().select(station);
cmbAbteilung.getSelectionModel().select(station.getAbteilung());
break;
}
}





dtTmAufnahme.setDateTime(stationsHistorieSelected.getAufnahmeDatum()); dtTmAufnahme.setDateTime(stationsHistorieSelected.getAufnahmeDatum());
dtTmEntlassung.setDateTime(stationsHistorieSelected.getEntlassungsDatum()); dtTmEntlassung.setDateTime(stationsHistorieSelected.getEntlassungsDatum());


+ 1
- 1
src/main/resources/stationshistorie.fxml View File

@@ -16,7 +16,7 @@
<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" 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" >


Loading…
Cancel
Save