|
|
@@ -4,10 +4,7 @@ package de.uniluebeck.mi.projmi6.controller; |
|
|
* Created by 631806 on 12.11.15. |
|
|
* 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 de.uniluebeck.mi.projmi6.model.*; |
|
|
import javafx.collections.FXCollections; |
|
|
import javafx.collections.FXCollections; |
|
|
import javafx.event.ActionEvent; |
|
|
import javafx.event.ActionEvent; |
|
|
import javafx.fxml.FXML; |
|
|
import javafx.fxml.FXML; |
|
|
@@ -82,4 +79,52 @@ public class DiagnoseController { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* The diagnose that is shown in the edit window, or null if a new diagnose should be created. |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
private Diagnose diagnose = null; |
|
|
|
|
|
|
|
|
|
|
|
public void setDiagnose(Diagnose diagnose){ |
|
|
|
|
|
this.diagnose = diagnose; |
|
|
|
|
|
if(diagnose==null){ |
|
|
|
|
|
clearFields(); |
|
|
|
|
|
}else { |
|
|
|
|
|
copyDiagnoseDataIntoFields(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void copyDiagnoseDataIntoFields(){ |
|
|
|
|
|
diagDiagnoseArzt.setText(diagnose.getArzt()); |
|
|
|
|
|
|
|
|
|
|
|
diagFreitext.setText(diagnose.getFreitext()); |
|
|
|
|
|
diagDiagnoseArt.setValue(diagnose.getDiagArt()); |
|
|
|
|
|
diagDiagnose.setValue() |
|
|
|
|
|
|
|
|
|
|
|
diagCreator.setText(Integer.toString(diagnose.getErsteller())); |
|
|
|
|
|
diagCreateTime.setText(diagnose.getErstellDatumZeit().toString()); |
|
|
|
|
|
diagChanger.setText(Integer.toString(diagnose.getBearbeiter())); |
|
|
|
|
|
diagChangeTime.setText(diagnose.getBearbeitetDatumZeit().toString()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void copyFieldDataIntoDiagnose(Diagnose diagnose){ |
|
|
|
|
|
|
|
|
|
|
|
diagnose.setArzt(diagDiagnoseArzt.getValue()); |
|
|
|
|
|
diagnose.freiTextProperty(diagFreitext.getText()); |
|
|
|
|
|
diagnose.getDiagArt(diagDiagnoseArt.getValue()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void clearFields(){ |
|
|
|
|
|
diagDiagnoseArzt.setValue(null); |
|
|
|
|
|
diagDiagnose.setValue(null); |
|
|
|
|
|
diagFreitext.setText(""); |
|
|
|
|
|
diagDiagnoseArt.setValue(null); |
|
|
|
|
|
|
|
|
|
|
|
diagCreator.setText("todo"); |
|
|
|
|
|
diagCreateTime.setText("<auto>"); |
|
|
|
|
|
diagChanger.setText("todo"); |
|
|
|
|
|
diagChangeTime.setText("<auto>"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |