| @@ -145,13 +145,14 @@ public class PatientEditorController { | |||||
| patient.setFamilienstand(patFamilienstand.getValue()); | patient.setFamilienstand(patFamilienstand.getValue()); | ||||
| patient.setGeschlecht(patient.getGeschlecht()); | patient.setGeschlecht(patient.getGeschlecht()); | ||||
| patient.setVersichertennummer(patVersicherungsnummer.getText()); | patient.setVersichertennummer(patVersicherungsnummer.getText()); | ||||
| patient.setKassenID(patVersicherung.getSelectionModel().getSelectedItem().getKassenID()); | |||||
| if (patVersicherung.getSelectionModel().getSelectedItem() != null) | |||||
| patient.setKassenID(patVersicherung.getSelectionModel().getSelectedItem().getKassenID()); | |||||
| patient.setCave(patCave.getText()); | patient.setCave(patCave.getText()); | ||||
| } | } | ||||
| private boolean validateData() { | private boolean validateData() { | ||||
| if (!patPlz.getText().matches("[0-9]{5}")) { | |||||
| if (!patPlz.getText().matches("[0-9]{5}") && !(patPlz.getText().length() == 0)) { | |||||
| showMessage("Die eingegebene PLZ ist ung\u00fcltig!", | showMessage("Die eingegebene PLZ ist ung\u00fcltig!", | ||||
| "Postleitzahlen m\u00fcssen aus exakt 5 Ziffern bestehen!"); | "Postleitzahlen m\u00fcssen aus exakt 5 Ziffern bestehen!"); | ||||
| return false; | return false; | ||||
| @@ -165,18 +166,18 @@ public class PatientEditorController { | |||||
| private void clearFields() { | private void clearFields() { | ||||
| patId.setText("<auto>"); | patId.setText("<auto>"); | ||||
| patGeburtsname.setText(""); | patGeburtsname.setText(""); | ||||
| patNachname.setText("Peter"); | |||||
| patVorname.setText("Hans"); | |||||
| patNachname.setText(""); | |||||
| patVorname.setText(""); | |||||
| patStrasse.setText(""); | patStrasse.setText(""); | ||||
| patHausnummer.setText(""); | patHausnummer.setText(""); | ||||
| patPlz.setText("12345"); | |||||
| patPlz.setText(""); | |||||
| patOrt.setText(""); | patOrt.setText(""); | ||||
| patGeburtsdatum.setValue(LocalDate.of(1988, 4, 7)); | |||||
| patFamilienstand.setValue(Patient.Familienstand.VERWITWET); | |||||
| patGeschlecht.setValue(null); | |||||
| patGeburtsdatum.setValue(LocalDate.of(1900, 1, 1)); | |||||
| patFamilienstand.setValue(Patient.Familienstand.LEDIG); | |||||
| patGeschlecht.setValue(Patient.Geschlecht.FEMALE); | |||||
| patVersicherungsnummer.setText(""); | patVersicherungsnummer.setText(""); | ||||
| patVersicherung.setValue(null); | patVersicherung.setValue(null); | ||||
| patCave.setText("Angst"); | |||||
| patCave.setText(""); | |||||
| patCreator.setText("todo"); | patCreator.setText("todo"); | ||||
| patCreateTime.setText("<auto>"); | patCreateTime.setText("<auto>"); | ||||