| @@ -114,6 +114,7 @@ public class FallController { | |||
| fallKasse.setItems(mainController.getStammdaten().getKassen()); | |||
| initButtons(); | |||
| fallFields.disableProperty().bind(state.isEqualTo(State.VIEW)); | |||
| @@ -156,8 +157,23 @@ public class FallController { | |||
| state.isEqualTo(State.VIEW).and(fallProperty.isNotNull()) | |||
| ); | |||
| btnFallCancel.visibleProperty().bind(btnFallCancel.managedProperty()); | |||
| btnFallSendHl7.managedProperty().bind( | |||
| state.isEqualTo(State.VIEW).and(fallProperty.isNotNull()) | |||
| ); | |||
| btnFallSendHl7.visibleProperty().bind(btnFallSendHl7.managedProperty()); | |||
| } | |||
| @FXML | |||
| Button btnFallSendHl7; | |||
| @FXML | |||
| private void clickedSendHl7(){ | |||
| /* Natascha */ | |||
| //TODO send funny message | |||
| Fall fall = fallProperty.get(); | |||
| Patient patient = mainController.getPatientTablesController().getSelectedPatient(); | |||
| } | |||
| public void editFall(){ | |||
| this.state.set(State.EDIT); | |||
| @@ -171,7 +187,15 @@ public class FallController { | |||
| @FXML | |||
| void clickedFallCancel(ActionEvent event) { | |||
| //Fall Stornieren... | |||
| if(fallProperty.get()!=null){ | |||
| fallProperty.get().setStorniert(true); | |||
| try { | |||
| DBHandler.setFall(fallProperty.get(), mainController.getCurrentMitarbeiter().getMitarbID(), true); | |||
| }catch (Exception e){ | |||
| e.printStackTrace(); | |||
| } | |||
| mainController.refreshCasesFromDb(mainController.getPatientTablesController().getSelectedPatient()); | |||
| } | |||
| } | |||
| @FXML | |||
| @@ -281,7 +305,7 @@ public class FallController { | |||
| dtTmAufnahme.setDateTime(fall.getAufnahmeDatum()); | |||
| dtTmEntlassung.setDateTime(fall.getEntlassungsDatum()); | |||
| fallPatID.setText(fallProperty.get().getPatient()+""); //(fall.getPatient().getVorname()+" "+fall.getPatient().getNachname()); //TODO | |||
| fallPatID.setText(fallProperty.get().getPatient() + ""); //(fall.getPatient().getVorname()+" "+fall.getPatient().getNachname()); //TODO | |||
| fallCreateTime.setText(fall.getErstellDatumZeit() !=null ? fall.getErstellDatumZeit().toString():""); | |||
| fallCreator.setText(Integer.toString(fall.getErsteller())); | |||
| @@ -11,6 +11,8 @@ import javafx.collections.ObservableList; | |||
| import javafx.concurrent.Task; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.*; | |||
| import javafx.scene.paint.Color; | |||
| import javafx.scene.text.Text; | |||
| import javafx.util.Callback; | |||
| import javax.swing.*; | |||
| @@ -215,9 +217,33 @@ public class MainController { | |||
| fallController.fallPropertyProperty().bind(lvFall.getSelectionModel().selectedItemProperty()); | |||
| lvFall.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) ->{ | |||
| lvFall.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> { | |||
| refreshCaseData(newValue); | |||
| }); | |||
| lvFall.setCellFactory(lv -> { | |||
| return new ListCell<Fall>() { | |||
| @Override | |||
| protected void updateItem(Fall item, boolean empty) { | |||
| super.updateItem(item, empty); | |||
| if (item == null || empty) { | |||
| this.setText(null); | |||
| this.setGraphic(null); | |||
| return; | |||
| } | |||
| setText(item.toString()); | |||
| if (item.getStorniert()) { | |||
| System.out.println("Storniertes Item"); | |||
| setGraphic(new Label("<storniert> ")); | |||
| setTextFill(Color.GRAY); //TODO | |||
| } else { | |||
| setTextFill(Color.BLACK); | |||
| setGraphic(null); | |||
| } | |||
| } | |||
| }; | |||
| }); | |||
| } | |||
| @@ -67,7 +67,16 @@ | |||
| <Insets right="5.0"/> | |||
| </HBox.margin> | |||
| </Button> | |||
| <Button fx:id="btnFallCancel" mnemonicParsing="false" onAction="#clickedFallCancel" text="Storno"/> | |||
| <Button fx:id="btnFallSendHl7" mnemonicParsing="false" onAction="#clickedSendHl7" text="Sende HL7"> | |||
| <HBox.margin> | |||
| <Insets left="5.0" right="5.0"/> | |||
| </HBox.margin> | |||
| </Button> | |||
| <Button fx:id="btnFallCancel" mnemonicParsing="false" onAction="#clickedFallCancel" text="Storno"> | |||
| <HBox.margin> | |||
| <Insets left="5.0" right="5.0"/> | |||
| </HBox.margin> | |||
| </Button> | |||
| <Button fx:id="btnFallAbort" cancelButton="true" mnemonicParsing="false" onAction="#clickedFallAbort" | |||
| text="Abbrechen"> | |||
| <HBox.margin> | |||
| @@ -87,8 +96,8 @@ | |||
| <children> | |||
| <Label styleClass="ersteller-label" text="Ersteller: "/> | |||
| <Label styleClass="ersteller-label" text="Erstelldatum:" GridPane.rowIndex="1"/> | |||
| <Label styleClass="ersteller-value" fx:id="fallCreator" text="Doc Holiday" GridPane.columnIndex="1"/> | |||
| <Label styleClass="ersteller-value" fx:id="fallCreateTime" text="12.01.2011 12:50" GridPane.columnIndex="1" | |||
| <Label styleClass="ersteller-value" fx:id="fallCreator" text="" GridPane.columnIndex="1"/> | |||
| <Label styleClass="ersteller-value" fx:id="fallCreateTime" text="" GridPane.columnIndex="1" | |||
| GridPane.rowIndex="1"/> | |||
| </children> | |||
| <columnConstraints> | |||
| @@ -112,8 +121,8 @@ | |||
| <children> | |||
| <Label styleClass="ersteller-label" text="Letzter Bearbeiter"/> | |||
| <Label styleClass="ersteller-label" text="Letzte Änderung:" GridPane.rowIndex="1"/> | |||
| <Label styleClass="ersteller-value" fx:id="fallEditor" text="Dr. House" GridPane.columnIndex="1"/> | |||
| <Label styleClass="ersteller-value" fx:id="fallEditTime" text="11.11.2011 11:11" GridPane.columnIndex="1" | |||
| <Label styleClass="ersteller-value" fx:id="fallEditor" text="" GridPane.columnIndex="1"/> | |||
| <Label styleClass="ersteller-value" fx:id="fallEditTime" text="" GridPane.columnIndex="1" | |||
| GridPane.rowIndex="1"/> | |||
| </children> | |||
| </GridPane> | |||