task/#17 Treatement -> Nurse Relation #36
3 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,7 @@ public class Treatment {
|
|||
private final SimpleObjectProperty<LocalTime> end;
|
||||
private final SimpleStringProperty description;
|
||||
private final SimpleStringProperty remarks;
|
||||
//TODO: Add Nurse
|
||||
|
||||
public Treatment(Patient patient, LocalDate date, LocalTime begin,
|
||||
LocalTime end, String description, String remarks) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.sql.SQLException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
//TODO: Update Methods to use a new Nurse Field (cascade this to any class using this DAO)
|
||||
public class TreatmentDao extends DaoImp<Treatment> {
|
||||
|
||||
public TreatmentDao(Connection connection) {
|
||||
|
@ -83,6 +84,8 @@ public class TreatmentDao extends DaoImp<Treatment> {
|
|||
return getListFromResultSet(result);
|
||||
}
|
||||
|
||||
//TODO: readTreatmentsByNurse
|
||||
|
||||
@Override
|
||||
protected PreparedStatement getUpdateStatement(Treatment treatment) throws SQLException {
|
||||
final String SQL = """
|
||||
|
|
|
@ -8,4 +8,5 @@ CREATE TABLE treatment
|
|||
description TEXT NOT NULL,
|
||||
remark TEXT NOT NULL,
|
||||
FOREIGN KEY (patientId) REFERENCES patient (id) ON DELETE CASCADE
|
||||
-- TODO: Add Nurse
|
||||
)
|
Loading…
Reference in a new issue