-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathemergency_doc.dart
153 lines (144 loc) · 4.28 KB
/
emergency_doc.dart
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import 'package:flutter/material.dart';
void main() {
runApp(EmergencyInterface());
}
class EmergencyInterface extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Emergency Interface'),
backgroundColor: Colors.red,
),
body: EmergencyScreen(),
),
);
}
}
class EmergencyScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
// Estimated Wait Time
Text(
'Estimated Incoming Time: 15 mins', // Add your estimated time here
style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
),
SizedBox(height: 20.0),
// Emergency Alert Button
ElevatedButton(
onPressed: () {
// Trigger emergency action
// Add functionality here
},
style: ElevatedButton.styleFrom(
primary: Colors.red,
padding: EdgeInsets.all(20.0),
),
child: Text(
'EMERGENCY ALERT!',
style: TextStyle(fontSize: 24.0, color: Colors.white),
),
),
// Patient Information
Card(
elevation: 5.0,
child: ListTile(
leading: CircleAvatar(
backgroundImage: AssetImage('assets/patient_photo.jpg'),
radius: 30.0,
),
title: Text(
'Patient Name',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Age: 35'),
Text('Gender: Male'),
Text('Room: 305'),
],
),
),
),
SizedBox(height: 20.0),
// Critical Actions
ElevatedButton(
onPressed: () {
// Perform critical action
// Add functionality here
},
style: ElevatedButton.styleFrom(
primary: Colors.blue,
padding: EdgeInsets.all(20.0),
),
child: Text(
'ORDER TESTS',
style: TextStyle(fontSize: 24.0, color: Colors.white),
),
),
ElevatedButton(
onPressed: () {
// Perform critical action
// Add functionality here
},
style: ElevatedButton.styleFrom(
primary: Colors.orange,
padding: EdgeInsets.all(20.0),
),
child: Text(
'ADMINISTER MEDICATION',
style: TextStyle(fontSize: 24.0, color: Colors.white),
),
),
SizedBox(height: 20.0),
// Communication
Card(
elevation: 5.0,
child: ListTile(
leading: Icon(Icons.message),
title: Text('Chat with Nurse'),
subtitle: Text('Request immediate assistance'),
trailing: Icon(Icons.arrow_forward),
onTap: () {
// Open chat with nurse
// Add functionality here
},
),
),
SizedBox(height: 20.0),
// Location Information
Card(
elevation: 5.0,
child: ListTile(
leading: Icon(Icons.room),
title: Text('Patient Location'),
subtitle: Text('Room 305'),
),
),
SizedBox(height: 20.0),
// Emergency Contact
Card(
elevation: 5.0,
child: ListTile(
leading: Icon(Icons.phone),
title: Text('Emergency Contact'),
subtitle: Text('Call 102'),
onTap: () {
// Call emergency services
// Add functionality here
},
),
),
],
),
);
}
}