MainController hat Mitarbeiter, ICD10 und OPSListen Neue Klassen Icd10Code und OpsCode; Stationsübersichtsitemhapi
| @@ -1,7 +1,10 @@ | |||
| package de.uniluebeck.mi.projmi6; | |||
| import de.uniluebeck.mi.projmi6.controller.MainController; | |||
| import de.uniluebeck.mi.projmi6.model.Mitarbeiter; | |||
| import de.uniluebeck.mi.projmi6.model.OpsCode; | |||
| import javafx.application.Application; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.concurrent.Task; | |||
| import javafx.fxml.FXMLLoader; | |||
| import javafx.geometry.Insets; | |||
| @@ -34,9 +37,21 @@ public class Main extends Application { | |||
| FXMLLoader fxmlLoader = new FXMLLoader(); | |||
| fxmlLoader.setLocation(getClass().getClassLoader().getResource("main.fxml")); | |||
| MainController mainController = new MainController(); | |||
| fxmlLoader.setControllerFactory(mainController.getControllerFactory()); | |||
| mainController.setOpsCodes(FXCollections.observableArrayList( | |||
| new OpsCode("1234", "Hallo OPS", 20), | |||
| new OpsCode("876-3", "Darmspiegelung", 20) | |||
| )); | |||
| Mitarbeiter mitarbeiter = new Mitarbeiter(); | |||
| mainController.setMitarbeiter(FXCollections.observableArrayList( | |||
| mitarbeiter | |||
| )); | |||
| Parent root = fxmlLoader.load(); | |||
| return root; | |||
| @@ -4,8 +4,11 @@ package de.uniluebeck.mi.projmi6.controller; | |||
| * Created by 631806 on 12.11.15. | |||
| */ | |||
| import de.uniluebeck.mi.projmi6.model.DiagArt; | |||
| import de.uniluebeck.mi.projmi6.model.Diagnose; | |||
| import de.uniluebeck.mi.projmi6.model.Icd10Code; | |||
| import de.uniluebeck.mi.projmi6.model.Mitarbeiter; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.Button; | |||
| @@ -23,6 +26,15 @@ public class DiagnoseController { | |||
| } | |||
| @FXML | |||
| public void initialize(){ | |||
| diagDiagnose.itemsProperty().bind(mainController.icd10CodesProperty()); | |||
| diagDiagnoseArt.setItems(FXCollections.observableArrayList(DiagArt.values())); | |||
| diagDiagnoseArzt.itemsProperty().bind(mainController.mitarbeiterProperty()); | |||
| } | |||
| @FXML | |||
| private ComboBox<Mitarbeiter> diagDiagnoseArzt; | |||
| @FXML | |||
| @@ -41,13 +53,13 @@ public class DiagnoseController { | |||
| private Label diagCreateTime; | |||
| @FXML | |||
| private ComboBox<Mitarbeiter> diagDiagnoseArt; | |||
| private ComboBox<DiagArt> diagDiagnoseArt; | |||
| @FXML | |||
| private Label diagChanger; | |||
| @FXML | |||
| private ComboBox<Diagnose> diagDiagnose; | |||
| private ComboBox<Icd10Code> diagDiagnose; | |||
| @FXML | |||
| private Label diagChangeTime; | |||
| @@ -3,7 +3,10 @@ package de.uniluebeck.mi.projmi6.controller; | |||
| /** | |||
| * Created by 631806 on 12.11.15. | |||
| */ | |||
| import de.uniluebeck.mi.projmi6.model.FallArt; | |||
| import de.uniluebeck.mi.projmi6.model.Kasse; | |||
| import de.uniluebeck.mi.projmi6.view.DateTimePicker; | |||
| import javafx.collections.FXCollections; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.Button; | |||
| @@ -21,18 +24,13 @@ public class FallController { | |||
| } | |||
| @FXML | |||
| public void initialize(){ | |||
| fallEinweisenderArzt.disableProperty().bind(fallSelbsteinweisung.selectedProperty()); | |||
| } | |||
| @FXML | |||
| private DateTimePicker dtTmAufnahme, dtTmEntlassung; | |||
| @FXML | |||
| private ComboBox<?> fallFallart; | |||
| private ComboBox<FallArt> fallFallart; | |||
| @FXML | |||
| private ComboBox<?> fallKasse; | |||
| private ComboBox<Kasse> fallKasse; | |||
| @FXML | |||
| private Button btnFallEnableEdit; | |||
| @@ -71,6 +69,13 @@ public class FallController { | |||
| private Button btnFallCancel; | |||
| @FXML | |||
| public void initialize(){ | |||
| fallEinweisenderArzt.disableProperty().bind(fallSelbsteinweisung.selectedProperty()); | |||
| fallFallart.setItems(FXCollections.observableArrayList(FallArt.values())); | |||
| fallKasse.setItems(mainController.getKassen()); | |||
| } | |||
| @FXML | |||
| void clickedFallAufnNow(ActionEvent event) { | |||
| } | |||
| @@ -1,6 +1,11 @@ | |||
| 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 javafx.beans.property.SimpleObjectProperty; | |||
| import javafx.collections.ObservableList; | |||
| import javafx.fxml.FXML; | |||
| import javafx.scene.control.*; | |||
| import javafx.util.Callback; | |||
| @@ -11,23 +16,54 @@ public class MainController { | |||
| private FallController fallController; | |||
| private DiagnoseController diagnoseController; | |||
| //private PatientEditorController patientEditorController; | |||
| private PatientTablesController patientTablesController; | |||
| private SettingsController settingsController; | |||
| private StationsHistorieController stationsHistorieController; | |||
| private UntersuchungenController untersuchungenController; | |||
| private SimpleObjectProperty<ObservableList<OpsCode>> opsCodes = new SimpleObjectProperty<>(); | |||
| private SimpleObjectProperty<ObservableList<Icd10Code>> icd10Codes = new SimpleObjectProperty<>(); | |||
| public ObservableList<Mitarbeiter> getMitarbeiter() { | |||
| return mitarbeiter.get(); | |||
| } | |||
| public SimpleObjectProperty<ObservableList<Mitarbeiter>> mitarbeiterProperty() { | |||
| return mitarbeiter; | |||
| } | |||
| public void setMitarbeiter(ObservableList<Mitarbeiter> mitarbeiter) { | |||
| this.mitarbeiter.set(mitarbeiter); | |||
| } | |||
| private SimpleObjectProperty<ObservableList<Mitarbeiter>> mitarbeiter = new SimpleObjectProperty<>(); | |||
| public ObservableList<Kasse> getKassen() { | |||
| return kassen.get(); | |||
| } | |||
| public SimpleObjectProperty<ObservableList<Kasse>> kassenProperty() { | |||
| return kassen; | |||
| } | |||
| public void setKassen(ObservableList<Kasse> kassen) { | |||
| this.kassen.set(kassen); | |||
| } | |||
| private SimpleObjectProperty<ObservableList<Kasse>> kassen = new SimpleObjectProperty<>(); | |||
| private int parallelTaskCount = 0; | |||
| @FXML | |||
| private ChoiceBox<Mitarbeiter> cmbUserChoose; | |||
| @FXML | |||
| private ProgressIndicator progressIndicator; | |||
| @FXML | |||
| private Button btnFallCreate; | |||
| @FXML | |||
| private SplitPane fallOverview; | |||
| private Callback<Class<?>, Object> controllerFactory = clazz -> { | |||
| if(clazz.equals(MainController.class)) { | |||
| return this; | |||
| @@ -35,8 +71,6 @@ public class MainController { | |||
| return fallController; | |||
| }else if(clazz.equals(DiagnoseController.class)){ | |||
| return diagnoseController; | |||
| //}else if(clazz.equals(PatientEditorController.class)) { | |||
| // return patientEditorController; | |||
| }else if(clazz.equals(PatientTablesController.class)){ | |||
| return patientTablesController; | |||
| }else if(clazz.equals(SettingsController.class)){ | |||
| @@ -52,13 +86,9 @@ public class MainController { | |||
| }; | |||
| public MainController(){ | |||
| fallController = new FallController(this); | |||
| diagnoseController = new DiagnoseController(this); | |||
| //patientEditorController = new PatientEditorController(this); | |||
| patientTablesController = new PatientTablesController(this); | |||
| settingsController = new SettingsController(this); | |||
| untersuchungenController = new UntersuchungenController(this); | |||
| @@ -72,6 +102,9 @@ public class MainController { | |||
| return controllerFactory; | |||
| } | |||
| public FallController getFallController(){ | |||
| return fallController; | |||
| } | |||
| @@ -80,10 +113,6 @@ public class MainController { | |||
| return diagnoseController; | |||
| } | |||
| // public PatientEditorController getPatientEditorController(){ | |||
| // return patientEditorController; | |||
| // } | |||
| public PatientTablesController getPatientTablesController(){ | |||
| return patientTablesController; | |||
| } | |||
| @@ -103,7 +132,6 @@ public class MainController { | |||
| } | |||
| } | |||
| public void decreaseParallelTaskCount(){ | |||
| parallelTaskCount++; | |||
| if(parallelTaskCount<=0){ | |||
| @@ -113,12 +141,35 @@ public class MainController { | |||
| } | |||
| public ObservableList<OpsCode> getOpsCodes() { | |||
| return opsCodes.get(); | |||
| } | |||
| public SimpleObjectProperty<ObservableList<OpsCode>> opsCodesProperty() { | |||
| return opsCodes; | |||
| } | |||
| public void setOpsCodes(ObservableList<OpsCode> opsCodes){ | |||
| this.opsCodesProperty().set(opsCodes); | |||
| } | |||
| public ObservableList<Icd10Code> getIcd10Codes() { | |||
| return icd10Codes.get(); | |||
| } | |||
| public SimpleObjectProperty<ObservableList<Icd10Code>> icd10CodesProperty() { | |||
| return icd10Codes; | |||
| } | |||
| public void setIcd10Codes(ObservableList<Icd10Code> icd10Codes) { | |||
| this.icd10Codes.set(icd10Codes); | |||
| } | |||
| @FXML | |||
| private void initialize(){ | |||
| fallOverview.disableProperty().bind(patientTablesController.selectedPatientProperty().isNull()); | |||
| cmbUserChoose.itemsProperty().bind(this.mitarbeiterProperty()); | |||
| } | |||
| } | |||
| @@ -215,6 +215,7 @@ public class PatientTablesController{ | |||
| }, tblPatientOverview.getSelectionModel().selectedItemProperty(), | |||
| tblStationOverview.getSelectionModel().selectedItemProperty(), | |||
| patientOverviewTabPane.getSelectionModel().selectedItemProperty()); | |||
| } | |||
| public Patient getSelectedPatient(){ | |||
| @@ -16,8 +16,6 @@ public class SettingsController { | |||
| this.mainController = mainController; | |||
| } | |||
| @FXML | |||
| private Button opsServerSave; | |||
| @@ -6,6 +6,7 @@ package de.uniluebeck.mi.projmi6.controller; | |||
| import de.uniluebeck.mi.projmi6.Main; | |||
| import de.uniluebeck.mi.projmi6.model.Mitarbeiter; | |||
| import de.uniluebeck.mi.projmi6.model.OpsCode; | |||
| import de.uniluebeck.mi.projmi6.view.DateTimePicker; | |||
| import javafx.event.ActionEvent; | |||
| import javafx.fxml.FXML; | |||
| @@ -17,10 +18,6 @@ public class UntersuchungenController { | |||
| private MainController mainController; | |||
| public UntersuchungenController (MainController mainController){ | |||
| this.mainController = mainController; | |||
| } | |||
| @FXML | |||
| private Button btnUntsCancel; | |||
| @@ -49,11 +46,20 @@ public class UntersuchungenController { | |||
| private ListView<?> untsList; | |||
| @FXML | |||
| private ComboBox<?> untsOpsCode; | |||
| private ComboBox<OpsCode> untsOpsCode; | |||
| @FXML | |||
| private ComboBox<Mitarbeiter> untsArzt; | |||
| public UntersuchungenController (MainController mainController){ | |||
| this.mainController = mainController; | |||
| } | |||
| @FXML | |||
| public void initialize(){ | |||
| untsOpsCode.itemsProperty().bind(mainController.opsCodesProperty()); | |||
| } | |||
| @FXML | |||
| void clickedUntsCreate(ActionEvent event) { | |||
| @@ -17,4 +17,9 @@ public enum DiagArt { | |||
| this.id = id; | |||
| this.diagArt = diagArt; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return diagArt; | |||
| } | |||
| } | |||
| @@ -6,7 +6,7 @@ package de.uniluebeck.mi.projmi6.model; | |||
| public enum FallArt { | |||
| AMBULANT("amb", "ambulant"), | |||
| STATIONAER("stat", "stationaer"); | |||
| STATIONAER("stat", "station\u00E4r"); | |||
| private final String id; | |||
| private final String fallArt; | |||
| @@ -15,4 +15,9 @@ public enum FallArt { | |||
| this.id = id; | |||
| this.fallArt = fallArt; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return fallArt; | |||
| } | |||
| } | |||
| @@ -0,0 +1,37 @@ | |||
| package de.uniluebeck.mi.projmi6.model; | |||
| /** | |||
| * A simple, immutable class that wraps an ICD10 code entry from the db. | |||
| */ | |||
| public class Icd10Code { | |||
| private final String code; | |||
| private final String text; | |||
| private final int version; | |||
| public Icd10Code(String icd10Code, String text, int version){ | |||
| this.code = icd10Code; | |||
| this.text = text; | |||
| this.version = version; | |||
| } | |||
| public String getCode() { | |||
| return code; | |||
| } | |||
| public String getText() { | |||
| return text; | |||
| } | |||
| public int getVersion() { | |||
| return version; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return code+" - "+ text; | |||
| } | |||
| } | |||
| @@ -0,0 +1,37 @@ | |||
| package de.uniluebeck.mi.projmi6.model; | |||
| /** | |||
| * A simple, immutable object class that wraps an OPS code entry from the db. | |||
| */ | |||
| public class OpsCode { | |||
| private final String opsCode; | |||
| private final String text; | |||
| private final int version; | |||
| public OpsCode(String opsCode, String text, int version){ | |||
| this.opsCode = opsCode; | |||
| this.text = text; | |||
| this.version = version; | |||
| } | |||
| public String getOpsCode() { | |||
| return opsCode; | |||
| } | |||
| public String getText() { | |||
| return text; | |||
| } | |||
| public int getVersion() { | |||
| return version; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return opsCode + " - " + text; | |||
| } | |||
| } | |||
| @@ -26,6 +26,8 @@ public class Patient extends Version { | |||
| private SimpleObjectProperty<Familienstand> familienstand = new SimpleObjectProperty<Familienstand>(this, "familienstand"); | |||
| private SimpleStringProperty cave = new SimpleStringProperty(this, "cave"); | |||
| public int getPatID() { | |||
| return patID.get(); | |||
| } | |||
| @@ -207,6 +209,12 @@ public class Patient extends Version { | |||
| this.id = id; | |||
| this.geschlecht = geschlecht; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return geschlecht; | |||
| } | |||
| } | |||
| public enum Familienstand { | |||
| @@ -223,5 +231,10 @@ public class Patient extends Version { | |||
| this.id = id; | |||
| this.familienstand = familienstand; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return familienstand; | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,101 @@ | |||
| package de.uniluebeck.mi.projmi6.model; | |||
| import javafx.beans.property.SimpleIntegerProperty; | |||
| import javafx.beans.property.SimpleObjectProperty; | |||
| import javafx.beans.property.SimpleStringProperty; | |||
| import java.time.LocalDate; | |||
| /** | |||
| * Created by Johannes on 15.11.2015. | |||
| */ | |||
| public class StationsUebersichtsItem { | |||
| private SimpleIntegerProperty patId = new SimpleIntegerProperty(this, "patId"); | |||
| private SimpleStringProperty patName = new SimpleStringProperty(this, "patName"); | |||
| private SimpleObjectProperty<LocalDate> patBirthdate = new SimpleObjectProperty<>(this,"patBirthdate"); | |||
| private SimpleIntegerProperty patAge = new SimpleIntegerProperty(this, "patAge"); | |||
| private SimpleObjectProperty<LocalDate> stationAufnahme = new SimpleObjectProperty<>(this, "stationAufnahme"); | |||
| private SimpleObjectProperty<LocalDate> stationEntlassung = new SimpleObjectProperty<>(this, "stationEntlassung"); | |||
| private int fallId = -1; | |||
| public int getPatId() { | |||
| return patId.get(); | |||
| } | |||
| public SimpleIntegerProperty patIdProperty() { | |||
| return patId; | |||
| } | |||
| public void setPatId(int patId) { | |||
| this.patId.set(patId); | |||
| } | |||
| public String getPatName() { | |||
| return patName.get(); | |||
| } | |||
| public SimpleStringProperty patNameProperty() { | |||
| return patName; | |||
| } | |||
| public void setPatName(String patName) { | |||
| this.patName.set(patName); | |||
| } | |||
| public LocalDate getPatBirthdate() { | |||
| return patBirthdate.get(); | |||
| } | |||
| public SimpleObjectProperty<LocalDate> patBirthdateProperty() { | |||
| return patBirthdate; | |||
| } | |||
| public void setPatBirthdate(LocalDate patBirthdate) { | |||
| this.patBirthdate.set(patBirthdate); | |||
| } | |||
| public int getPatAge() { | |||
| return patAge.get(); | |||
| } | |||
| public SimpleIntegerProperty patAgeProperty() { | |||
| return patAge; | |||
| } | |||
| public void setPatAge(int patAge) { | |||
| this.patAge.set(patAge); | |||
| } | |||
| public LocalDate getStationAufnahme() { | |||
| return stationAufnahme.get(); | |||
| } | |||
| public SimpleObjectProperty<LocalDate> stationAufnahmeProperty() { | |||
| return stationAufnahme; | |||
| } | |||
| public void setStationAufnahme(LocalDate stationAufnahme) { | |||
| this.stationAufnahme.set(stationAufnahme); | |||
| } | |||
| public LocalDate getStationEntlassung() { | |||
| return stationEntlassung.get(); | |||
| } | |||
| public SimpleObjectProperty<LocalDate> stationEntlassungProperty() { | |||
| return stationEntlassung; | |||
| } | |||
| public void setStationEntlassung(LocalDate stationEntlassung) { | |||
| this.stationEntlassung.set(stationEntlassung); | |||
| } | |||
| public int getFallId() { | |||
| return fallId; | |||
| } | |||
| public void setFallId(int fallId) { | |||
| this.fallId = fallId; | |||
| } | |||
| } | |||