-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnurse.dash.php
1201 lines (1102 loc) · 72.3 KB
/
nurse.dash.php
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
include "includes/headerDash.php";
include "includes/nurseStats.php";
include "includes/messaging.php";
?>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow position-fixed fixed-top">
<div class="container">
<div class="navbar-brand d-grid">
<a href="#"><img src="images/newLogo3.png" alt="" class=" img_size"></a>
</div>
<div class="profile_detail d-flex align-items-center justify-content-between text-white">
<ul class="navbar-nav ms-auto mb-2 mb-md-0">
<li class="d-flex align-items-center me-4">
<span class="material-icons-sharp cursor" title="Notifications" onclick="show('dashbody_7','btn7');">
notifications
</span>
</li>
<li class="d-flex align-items-center">
<div class="photo bg-black rounded-circle overflow-hidden" id="userphoto">
<img src="<?= $staff_photo ?>" alt="" class="img_size">
</div>
<div class="dropdown me-3">
<a class="text-white dropdown-toggle" role="button" data-bs-toggle="dropdown">
</a>
<ul class="dropdown-menu px-2">
<li class="d-flex align-items-center">
<span class="material-icons-sharp">
person
</span>
<a class="dropdown-item cursor" data-bs-toggle="modal" data-bs-target="#profileEdit">
My Profile
</a>
</li>
<li class="d-flex align-items-center">
<span class="material-icons-sharp">
logout
</span>
<a class="dropdown-item cursor" href="models/logout.php">
Logout
</a>
</li>
<!-- <li><a class="dropdown-item" href="#">Something else here</a></li> -->
</ul>
</div>
<div class="row">
<p class="m-0 p-0 ps-2 name"><?= $staff_info["firstname"] ?> <?= $staff_info["lastname"] ?></p>
<small class="position"><?= $staff_info["position"] ?></small>
</div>
</li>
</ul>
</div>
</div>
</nav>
<div class="pad"></div>
<main>
<div class="row mx-0">
<!-- alerts -->
<!-- alerts -->
<div aria-live="polite" aria-atomic="true" class="position-relative">
<!-- Position it: -->
<!-- - `.toast-container` for spacing between toasts -->
<!-- - `top-0` & `end-0` to position the toasts in the upper right corner -->
<!-- - `.p-3` to prevent the toasts from sticking to the edge of the container -->
<div class="toast-container top-0 end-0 p-3">
<!-- Then put toasts within -->
<div class="toast" id="toast1" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<span class="material-icons-sharp rounded me-2 text-danger">
warning
</span>
<strong class="me-auto">Error Message</strong>
<small class="text-muted">just now</small>
<button type="button" class="btn-close" onclick="closeAlert()"></button>
</div>
<div class="toast-body bg-danger text-white toast1Msg">
.........
</div>
</div>
<div class="toast" id="toast2" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<span class="material-icons-sharp rounded me-2 text-success">
warning
</span>
<strong class="me-auto">Success Message</strong>
<small class="text-muted">just now</small>
<button type="button" class="btn-close" onclick="closeAlert2()"></button>
</div>
<div class="toast-body bg-success text-white " id="toast2Msg">
........
</div>
</div>
</div>
</div>
<!-- alerts -->
<!-- alerts -->
<!-- ASIDE -->
<!-- ASIDE -->
<aside class="bg-white col d-none d-lg-grid p-3 pt-5">
<div class="dash_navigation">
<ul class="navbar-nav">
<li class="nav-item nav_item nav_item2 d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_1','btn1');" id="btn1">
<span class="material-icons-sharp text-primary">
dashboard
</span>
<p class="align-self-center my-auto ms-3">Dashboard</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_2','btn2');" id="btn2">
<span class="material-icons-sharp text-primary">
person_add_alt
</span>
<p class="align-self-center my-auto ms-3">New Patient</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_3','btn3');" id="btn3">
<span class="material-icons-sharp text-primary">
note_alt
</span>
<p class="align-self-center my-auto ms-3">Patient Vitals</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_4','btn4');" id="btn4">
<span class="material-icons-sharp text-primary">
person_search
</span>
<p class="align-self-center my-auto ms-3">Find Patient</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_9','btn9');" id="btn9">
<span class="material-icons-sharp text-primary">
screen_search_desktop
</span>
<p class="align-self-center my-auto ms-3">Check Payment</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_8','btn8');" id="btn8">
<span class="material-icons-sharp text-primary">
pageview
</span>
<p class="align-self-center my-auto ms-3">Medical Records</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_5','btn5');" id="btn5">
<span class="material-icons-sharp text-primary">
alarm_add
</span>
<p class="align-self-center my-auto ms-3">Appointments</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_6','btn6');" id="btn6">
<span class="material-icons-sharp text-primary">
calculate
</span>
<p class="align-self-center my-auto ms-3">EDD Calculator</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_7','btn7');" id="btn7">
<span class="material-icons-sharp text-primary">
email
</span>
<p class="align-self-center my-auto ms-3">Messages <span class="badge badge-pill badge-danger bg-danger">0</span></p>
</li>
</ul>
</div>
</aside>
<!-- ASIDE -->
<!-- ASIDE -->
<!-- CHANGING DASHBOARD -->
<!-- CHANGING DASHBOARD -->
<div class="dashbody col-10 p-5 overflow-y-scroll">
<!-- dash body 1 -->
<!-- dash body 1 -->
<div id="dashbody_1" class="page">
<div class="body_1">
<p>Dashboard Nurse #<span class="staffID"><?= $staff_info['Staff_id'] ?></span></p>
</div>
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white">Hospital Stats</h5>
<div class="card-body row px-4">
<div class="col">
<div class="details d-flex align-items-center">
<span class="material-icons-sharp me-2 span_1 fs-1 text-primary">
reorder
</span>
<div class="details_2">
<small class="mb-5 fw-bold">Today's Appointments</small>
<h4 class="appToday"><?= $sql1_count ?></h4>
<small class="text-muted">last updated: <span class="lupdated1"><?= $today ?></span></small>
</div>
</div>
</div>
<div class="col">
<div class="details d-flex align-items-center">
<span class="material-icons-sharp me-2 span_1 fs-1 text-danger">
reorder
</span>
<div class="details_2">
<small class="mb-5 fw-bold">Available Doctors</small>
<h4 class="docActive"><?= $sql2_count ?></h4>
<small class="text-muted">last updated: <span class="lupdated1"><?= $today ?></span></small>
</div>
</div>
</div>
<div class="col">
<div class="details d-flex align-items-center">
<span class="material-icons-sharp me-2 span_1 fs-1 text-info">
reorder
</span>
<div class="details_2">
<small class="mb-5 fw-bold">Total Patients</small>
<h4 class="noPatient"><?= $sql3_count ?></h4>
<small class="text-muted">last updated: <span class="lupdated1"><?= $today ?></span> </small>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="body_3">
<div class="row gap-3">
<div class="col-6">
<div class="card shadow border-0 rounded-0">
<div class="d-flex card-header align-items-center">
<span class="material-icons-sharp text-primary m-0">
access_alarms
</span>
<h5 class="m-0 mx-3">
Appointments for Today
</h5>
<div class="more_1 bg-primary m-auto d-flex align-items-center gap-2" onclick="show('dashbody_5','btn5');">
<span class="material-icons-sharp text-white">
expand_more
</span>
<small class="text-white">View all</small>
</div>
</div>
<div class="card-body row px-4">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Patient ID</th>
<th scope="col">Patient</th>
<th scope="col">Doctor to see</th>
</tr>
</thead>
<tbody id="data-output">
<?php
$i = 1;
while ($result1 = mysqli_fetch_assoc($sql1)) {
$unique = $result1['patient_id'];
$sql5 = mysqli_query($conn, "select * from nhmh_patient_db where patient_id = '$unique' ");
$sql3_array = mysqli_fetch_assoc($sql5);
?>
<tr>
<td><?= $i ?></td>
<td><?= $unique ?></td>
<td><?= $sql3_array['firstname'] ?> <?= $sql3_array['lastname'] ?></td>
<td>Doctor <?= $result1['doctor_to_see'] ?></td>
</tr>
<?php $i++ ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
supervised_user_circle
</span>
Doctors Active
</h5>
<div class="card-body row px-4">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Doctor</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody id="data-output3">
<?php
$i = 1;
while ($result3 = mysqli_fetch_assoc($sql2a)) {
$status = $result3['status'];
?>
<?php if ($status == 'Active now') { ?>
<tr>
<td><?= $i ?></td>
<td>Doctor <?= $result3['firstname'] ?></td>
<td><button class="btn btn-success text-white m-0"> <?= $result3['status'] ?></button></td>
</tr>
<?php } else { ?>
<tr>
<td><?= $i ?></td>
<td>Doctor <?= $result3['firstname'] ?></td>
<td><button class="btn btn-danger text-white m-0"> <?= $result3['status'] ?></button></td>
</tr>
<?php } ?>
<?php $i++ ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- dash body 1 -->
<!-- dash body 1 -->
<!-- dash body 2 -->
<!-- dash body 2 -->
<div id="dashbody_2" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person_add_alt
</span>
Confirm Patient Payment
</h5>
<div class="card-body px-2">
<div class="row g-3 px-3">
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Registration Code [10 digits]</label>
<input type="text" class="form-control" id="inputCode" oninput="verifyRegCode('showStatus')">
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Status</label>
<div id="showStatus">
<!-- <button class="btn btn-danger text-white w-100">CODE IS INACTIVE
</button> -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="body_2 mb-4" id="formtoAdd" style="display: none;">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person_add_alt
</span>
Add New Patient Record
</h5>
<div class="card-body px-2">
<form class="row g-3 px-3" id="addPatForm">
<div class="col-md-12 mb-0 text-danger">
<small>Personal Details</small>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Firstname</label>
<input type="text" class="form-control" name="fname">
<input type="hidden" class="form-control" name="regCode" id="regCode">
<input type="hidden" class="form-control" name="nurse_id" value="<?= $staff_info['Staff_id'] ?>">
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Lastname</label>
<input type="text" class="form-control" name="lname">
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Phone</label>
<input type="text" class="form-control" name="phone">
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Email</label>
<input type="text" class="form-control" name="email">
</div>
<div class="col">
<label for="inputEmail4" class="form-label">Address</label>
<input type="text" class="form-control" name="address">
</div>
<div class="col-md-12 mb-0 text-danger">
<small>Medical Details</small>
</div>
<div class="col-md-2">
<label for="inputEmail4" class="form-label">Date of Birth</label>
<input type="date" class="form-control" id="inputEmail4" name="dob">
</div>
<div class="col-md-3">
<label for="inputState" class="form-label">Genotype</label>
<select id="inputState" class="form-select" name="genotype">
<option value="">Choose Genotype</option>
<option value="AA"> AA </option>
<option value="AS"> AS </option>
<option value="AC"> AC </option>
<option value="SS"> SS </option>
<option value="SC"> SC </option>
</select>
</div>
<div class="col-md-3">
<label for="inputState" class="form-label">Blood Group</label>
<select id="inputState" class="form-select" name="bgroup">
<option value="">Choose Blood Group</option>
<option value="A+"> A+ </option>
<option value="A-"> A- </option>
<option value="B+"> B+ </option>
<option value="B-"> B- </option>
<option value="AB+"> AB+ </option>
<option value="AB-"> AB- </option>
<option value="O+"> O+ </option>
<option value="O-"> O- </option>
</select>
</div>
<div class="col-md-2">
<label for="inputState" class="form-label">Number of Children</label>
<input type="text" class="form-control" name="children">
</div>
<div class="col-md-2">
<label for="inputEmail4" class="form-label">Height[cm]</label>
<input type="text" class="form-control" name="height">
</div>
<div class="col-md-12 mb-0 text-danger">
<small>Next of Kin Details</small>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Full Name</label>
<input type="text" class="form-control" name="nokname">
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Phone</label>
<input type="text" class="form-control" name="nokphone">
</div>
<div class="col-md-5">
<label for="inputEmail4" class="form-label">Relationship</label>
<select id="inputState" class="form-select" name="nokrel">
<option value="">Choose next of kin relationship with patient.....</option>
<option value="Husband">Husband</option>
<option value="Father">Father</option>
<option value="Brother">Brother</option>
<option value="Sister">Sister</option>
<option value="Son">Son</option>
<option value="Daughter">Daughter</option>
<option value="Others">Other relations</option>
</select>
</div>
<div class="col-md-7">
<label for="inputEmail4" class="form-label">Address</label>
<input type="text" class="form-control" name="nokaddress">
</div>
<div class="col-12 text-center">
<button type="submit" class="btn btn-primary text-white w-100" id="addPatBtn" onclick="addPat()">Save Record
</button>
</div>
</form>
</div>
</div>
</div>
<div class="body_2 mb-4" style="display: none;" id="verifyOtp">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person_add_alt
</span>
Verify Patient Email
</h5>
<small class="text-success mx-3">A code has been sent to Patients' email which contains a code for verification</small>
<div class="card-body px-2">
<form class="row g-3 px-3 border">
<div class="col-md-3 m-auto">
<label for="inputEmail4" class="form-label">Verification Code</label>
<input type="text" class="form-control" id="inpOTP">
</div>
<div class="d-flex justify-content-around">
<div class="ms-auto me-2 text-center">
<button type="button" class="btn btn-primary text-white w-100" id="addPatBtn" onclick="resend()">Check Email
</button>
</div>
<div class="me-auto ms-2 text-center">
<button type="button" class="btn btn-primary text-white w-100" id="addPatBtn" onclick="validateOtp()">Validate Code
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- dash body 2 -->
<!-- dash body 2 -->
<!-- dash body 3 -->
<!-- dash body 3 -->
<div id="dashbody_3" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
note_alt
</span>
Record Patient Vitals
</h5>
<div class="card-body px-2">
<form class="row g-3 px-3" id="addVital">
<div class="col-md-12">
<label for="inputState" class="form-label">Input Patient ID or Name</label>
<div class="input-group mb-0">
<input type="text" class="form-control" placeholder="Patient's ID" name="pid">
<!-- <button class="btn btn-outline-secondary" type="button" id="button-addon2">Button</button> -->
</div>
</div>
<div class="col-md-3">
<label for="inputState" class="form-label">Body Temperature[℃]</label>
<select id="inputState" class="form-select" name="temp">
<option value="">Choose temperature range</option>
<option value="Low (less than 35.8)">Low (less than 35.8)</option>
<option value="Normal (between 35.8 - 37.0)">Normal (between 35.8 - 37.0)</option>
<option value="Moderate High (between 37.1 - 38.0)">Moderately High (between 37.1 - 38.0)</option>
<option value="High (between 38.1 - 42.0)">High (between 38.1 - 42.0)</option>
</select>
</div>
<div class="col-md-3">
<label for="inputState" class="form-label">Blood Pressure</label>
<select id="inputState" class="form-select" name="bpressure">
<option value="">Choose Blood pressure range</option>
<option value="Low (less than 90 / 60)">Low (less than 90 / 60)</option>
<option value="Normal (120/80)">Normal (120-91 / 80-61)</option>
<option value="Elevated(120-129 / 80-61)">Elevated (120-129 / 80-61)</option>
<option value="High Blood Pressure(greater than 130 / greater than 80)">High Blood Pressure(greater than 130 / greater
than 80)</option>
</select>
</div>
<div class="col-md-3">
<label for="inputState" class="form-label">Pulse Rate</label>
<select id="inputState" class="form-select" name="pulse">
<option value="">Choose Pulse rate range</option>
<option value="Low (less than 60 beats per minute)">Low (less than 60 beats per minute)</option>
<option value="Normal (between 60 - 100 beats per minute)">Normal (between 60 - 100 beats per minute)</option>
<option value="High ( above 100 beats per minute)">High ( above 100 beats per minute)</option>
</select>
</div>
<div class="col-md-3">
<label for="inputEmail4" class="form-label">Weight[KG]</label>
<input type="text" class="form-control" name="weight">
</div>
<div class="col-12 text-center">
<button type="submit" class="btn btn-primary text-white w-100" id="addVitalBtn" onclick="addVital()">Record Patient Vitals
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- dash body 3 -->
<!-- dash body 3 -->
<!-- dash body 4 -->
<!-- dash body 4 -->
<div id="dashbody_4" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
search
</span>
Find Patient
</h5>
<div class="card-body px-2">
<form class="row g-3 px-3" id="patInp">
<div class="col-md-12">
<label for="inputState" class="form-label">Input Patient ID or Name</label>
<div class="input-group mb-0">
<input type="text" class="form-control" placeholder="Patient's ID" name="patient_id" id="pat">
<button class="btn btn-outline-primary" type="submit" id="searchpat" onclick="searchPat('searchpat')">Search
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="resultPat1" style="display: none;">
<div class="body_2 mb-2">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person
</span>
Patient Personal Data
</h5>
<div class="card-body px-4">
<div class="patient_img text-center border mb-2 out1">
<img src="images/b1.png" class="img_size2">
</div>
<form class="row g-3 px-3">
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Patient ID</label>
<input type="text" class="form-control out2" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Patient EDD</label>
<input type="text" class="form-control out3" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Full Name</label>
<input type="text" class="form-control out4" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Email Address</label>
<input type="text" class="form-control out5" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Phone Number</label>
<input type="text" class="form-control out6" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">House Address</label>
<input type="text" class="form-control out7" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Next of Kin Name</label>
<input type="text" class="form-control out8" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Next of Kin Phone Number</label>
<input type="text" class="form-control out10" readonly>
</div>
<div class="col-md-4">
<label for="inputEmail4" class="form-label">Next of Kin House Address</label>
<input type="text" class="form-control out11" readonly>
</div>
<!-- <div class="col-12 text-center">
<button type="submit" class="btn btn-primary text-white w-100">Update Patient Profile
<div class="spinner-border text-light" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</button>
</div> -->
</form>
</div>
</div>
</div>
<div class="body_2 mb-2">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person
</span>
Patient Medical Data
</h5>
<div class="card-body px-4">
<form class="row g-3 px-3">
<div class="col-md-2">
<label for="inputEmail4" class="form-label">Patient Age[y/o]</label>
<input type="text" class="form-control out12" readonly>
</div>
<div class="col-md-2">
<label for="inputEmail4" class="form-label">Patient Blood Group</label>
<input type="text" class="form-control out13" readonly>
</div>
<div class="col-md-2">
<label for="inputEmail4" class="form-label">Patient Genotype</label>
<input type="text" class="form-control out14" readonly>
</div>
<div class="col-md-2">
<label for="inputEmail4" class="form-label">Patient Height[cm]</label>
<input type="text" class="form-control out15" readonly>
</div>
<div class="col">
<label for="inputEmail4" class="form-label">Patient Number of Children</label>
<input type="text" class="form-control out16" readonly>
</div>
</form>
</div>
</div>
</div>
<div class="body_2 mb-2">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person
</span>
Patient Updated Vitals
</h5>
<div class="card-body px-4">
<form class="row g-3 px-3">
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Patient Temperature[℃]</label>
<input type="text" class="form-control out17" readonly>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Patient Blood Pressure</label>
<input type="text" class="form-control out18" readonly>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Patient Weight[KG]</label>
<input type="text" class="form-control out19" readonly>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Patient Pulse Rate</label>
<input type="text" class="form-control out20" readonly>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- dash body 4 -->
<!-- dash body 4 -->
<!-- dash body 3 -->
<!-- dash body 3 -->
<div id="dashbody_8" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
search
</span>
Find Patient Medical Record
</h5>
<div class="card-body px-2">
<form class="row g-3 px-3" id="getMedfrm">
<div class="col-md-12">
<label for="inputState" class="form-label">Input Patient ID</label>
<div class="input-group mb-0">
<input type="text" class="form-control" placeholder="Patient's ID" name="patient_id">
<button class="btn btn-outline-secondary" type="submit" id="medBtn" onclick="searchMedPat('medBtn')">Search
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="body_2 mb-4" id="medPat1" style="display: none;">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
pageview
</span>
Patient Medical Records
</h5>
<div class="card-body" id="medDataOut">
</div>
</div>
</div>
</div>
<!-- dash body 3 -->
<!-- dash body 3 -->
<!-- dash body 5 -->
<!-- dash body 5 -->
<div id="dashbody_5" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
dashboard
</span>
All Appointments Set for Today
</h5>
<div class="card-body px-2">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Patient ID</th>
<th scope="col">Patient Name</th>
<th scope="col">Doctor to See</th>
<th scope="col">Time</th>
<th scope="col">Date</th>
<th scope="col">Purpose of Appointment</th>
</tr>
</thead>
<tbody id="data-output2">
<?php
$i = 1;
while ($result2 = mysqli_fetch_assoc($sql1a)) {
$unique = $result2['patient_id'];
$sql5 = mysqli_query($conn, "select * from nhmh_patient_db where patient_id = '$unique' ");
$sql3_array = mysqli_fetch_assoc($sql5);
?>
<tr>
<td><?= $i ?></td>
<td><?= $unique ?></td>
<td><?= $sql3_array['firstname'] ?> <?= $sql3_array['lastname'] ?></td>
<td>Doctor <?= $result2['doctor_to_see'] ?></td>
<td><?= $result2['app_time'] ?></td>
<td><?= $result2['app_date'] ?></td>
<td><?= $result2['purpose'] ?></td>
</tr>
<?php $i++ ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- dash body 5 -->
<!-- dash body 5 -->
<!-- dash body 6 -->
<!-- dash body 6 -->
<div id="dashbody_6" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
dashboard
</span>
Calculate the Estimated Delivery Date of Patient
</h5>
<div class="card-body px-5">
<form class="row g-3 bg-light pt-4 shadow pb-4 px-3" id="eddForm">
<div class="col-md-12">
<label for="inputState" class="form-label">Input Patient ID to record her EDD</label>
<div class="input-group mb-0">
<input type="text" class="form-control" placeholder="Patient's ID" name="patient">
<button class="btn btn-outline-secondary" type="button" id="button-addon2">Button</button>
</div>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">First Day of Last Menstrual Period</label>
<input type="date" class="form-control" name="lmp" onchange="eddCalculate()">
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Date of Conception </label>
<input type="text" class="form-control eddOut1" readonly>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Gestational Age</label>
<input type="text" class="form-control eddOut2" readonly>
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Estimated Due Date</label>
<input type="text" class="form-control eddOut3" readonly name="edd">
</div>
<div class="col-12 text-center">
<button type="submit" class="btn btn-primary text-white w-100" id="addEddBtn" onclick="addEdd()">Record EDD for Patient
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- dash body 6 -->
<!-- dash body 6 -->
<!-- dash body 7 -->
<!-- dash body 7 -->
<div id="dashbody_7" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
dashboard
</span>
NHMH Messaging software
</h5>
<div class="card-body px-4">
<div class="row">
<div class="col-4">
<h3>Chats</h3>
<div class="card-body bg-light rounded-3 p-1 d-flex align-items-center">
<span class="material-icons-sharp text-primary me-2">
search
</span>
<input type="text" class="form-control bg-light text-primary border-0" id="searchUsers" placeholder="Search Users...." value="">
</div>
<div class="users mt-2">
<?php while ($mresult10 = mysqli_fetch_assoc($msql10)) {
$outgoing_id = $staff_info['unique_id'];
$msql11 = mysqli_query($conn, "SELECT * FROM nhmh_internal_messages_db WHERE (incoming_msg_id = {$mresult10['unique_id']}
OR outgoing_msg_id = {$mresult10['unique_id']}) AND (outgoing_msg_id = {$outgoing_id}
OR incoming_msg_id = {$outgoing_id}) ORDER BY msg_id DESC LIMIT 1");
$row11 = mysqli_fetch_assoc($msql11);
(mysqli_num_rows($msql11) > 0) ? $result = $row11['message'] : $result = "No message available";
(strlen($result) > 20) ? $msg = substr($result, 0, 20) . '...' : $msg = $result;
if (isset($row11['outgoing_msg_id'])) {
($outgoing_id == $row11['outgoing_msg_id']) ? $you = "You: " : $you = "";
} else {
$you = "";
}
?>
<div class="card-body d-flex align-items-start gap-2 border-bottom cursor" data-userMsgId="<?= $mresult10['unique_id'] ?>">
<form action="" id="messageForm">
<input type="hidden" name="incoming_id" id="incoming_id">
<input type="hidden" name="outgoing_id" value="<?= $staff_info['unique_id'] ?>">
</form>
<img src="images/staff<?= $mresult10['photo'] ?>" alt="" class="bg-primary img_wrap rounded">
<div class="row">
<div class="d-flex align-items-center mb-0 col-12 ">
<h6><?= $mresult10['position'] ?> <?= $mresult10['firstname'] ?></h6>
<!-- <small class="text-muted mx-auto">09:24</small> -->
</div>
<small class="col-12"><?= $you . $msg ?></small>
</div>
<?php if (($mresult10['status']) == "Offline now") { ?>
<span class="badge badge-pill badge-danger bg-light">0</span>
<?php } else { ?>
<span class="badge badge-pill badge-danger bg-success">0</span>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-8 bg-light p-2">
<div class="card-body bg-white" id="msgUI1" style="display: none;">
<div class="card-header d-flex bg-white gap-4">
<span class="material-icons-sharp cursor" onclick="closeMsg()">
clear
</span>
<img src="" id="msgUIimg" class="bg-primary img_size">
<div class=" mb-0">
<h6 id="msgUIname">Doctor Olamide</h6>
<small class="text-muted mx-auto" id="msgUIstatus">Active now</small>
</div>
</div>
<div class="card-body bg-light msg-body d-fl" id="msg_blank">
</div>
<div class="card-body bg-white ">
<form class="d-flex align-items-center" id="sendMessage">
<input type="hidden" name="incoming" id="incoming_id1">
<input type="hidden" name="outgoing" value="<?= $staff_info['unique_id'] ?>">
<input type="text" class="form-control bg-light border-0" id="send" placeholder="Send Message" name="message">
<button type="submit" class="btn btn-primary" onclick="insertChat()">
<span class="material-icons-sharp text-white ">
send
</span>
</button>
</form>
</div>
</div>
</div>
</div>