-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathNursePageController.java
More file actions
68 lines (53 loc) · 1.56 KB
/
NursePageController.java
File metadata and controls
68 lines (53 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class NursePageController extends Controller{
private Nurse currentNurse;
private Patient currentPatient;
@FXML
private Button PatientListButton;
@FXML
private Button editVitalsButton;
@FXML
private Button goToPatientInfo;
@FXML
private Text selectedPatient;
@FXML
void handlePatientListButton(ActionEvent event) throws IOException{
super.goToPage("FXML/PatientList.fxml", PatientListButton);
}
@FXML
void handlePatientVitalsButton(ActionEvent event) throws IOException{
if(currentPatient!=null){
super.goToPage("FXML/PatientVitals.fxml", editVitalsButton);
}
}
@FXML
void handlePatientInfoButton(ActionEvent event) throws IOException{
if(currentPatient!=null){
super.goToPage("FXML/PatientInformation.fxml", goToPatientInfo);
}
}
@Override
public void initData() {
currentNurse = (Nurse) super.currentUser;
currentPatient = (Patient) super.selectedAccount;
if(currentPatient!= null){
selectedPatient.setText("Selected Patient : " + currentPatient.getPatientFullName());
}
}
@Override
public void initialize(URL location, ResourceBundle resources) {
// TODO Auto-generated method stub
}
}