Subversion Repository Public Repository

KNH_Project

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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bestray.healthcareemr.Views;

import com.bestray.healthcarecommonutil.exception.HealthCareException;
import com.bestray.healthcarecommonutil.exception.ProcessingException;
import com.bestray.healthcarecommonutil.util.CWTabbedPaneUI;
import com.bestray.healthcarecommonutil.util.CurvedGradientPanel;
import com.bestray.healthcarecommonutil.util.DisabledGlassPane;
import com.bestray.healthcarecommonutil.util.PreferenceUtil;
import com.bestray.healthcarecommonutil.util.StandardButton;
import com.bestray.healthcarecommonutil.vo.TAccDeptRole;
import com.bestray.healthcarecommonutil.vo.TAccount;
import com.bestray.healthcarecommonutil.vo.TAccountDepartment;
import com.bestray.healthcarecommonutil.vo.TRolePermission;
import com.bestray.healthcareemr.Controller.DepartmentMasterController;
import com.bestray.healthcareemr.Controller.DeptWithRoleController;
import com.bestray.healthcareemr.Controller.UserSetupController;
import com.bestray.healthcareemr.Util.Utils;
import com.bestray.healthcareinpatient.view.InPatientHomePanel;
import com.bestray.labinformationsystem.views.PatientLabRecordPanel;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Desktop;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JRootPane;
import javax.swing.SwingUtilities;
import javax.swing.Timer;

/**
 *
 * @author User1
 */
public class HealthCareEmrAdvanceHome extends javax.swing.JFrame {

    /**
     * Creates new form HealthCareEmrAdvanceHome
     */
    public HealthCareEmrAdvanceHome() {
        populate();
        try{
            permissions = (List<String>)PreferenceUtil.getObject(myPrefObj, "permissions");
            accdepartments = (List<TAccountDepartment>)PreferenceUtil.getObject(myPrefObj, "departments");
            //department = (TAccountDepartment)PreferenceUtil.getObject(myPrefObj, "selecteddept");
            selecteddept = (TAccountDepartment)PreferenceUtil.getObject(myPrefObj, "selecteddepartment");
        }catch(Exception e){
            throw new HealthCareException("Not Getting All Permissions For the loggedin User");
        }
        
        timer = new Timer(1000, new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    //timer_label.setText(getCurrentTime(System.currentTimeMillis() - initTime));
                    dateFormat = new SimpleDateFormat("EEEE dd-MMM-yyyy  hh:mm:ss a");
                    date = new Date();
                    timer_label.setText(dateFormat.format(date));
                }
            });
        }
    });
        timer.start();
        initComponents();
        setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);
        setIconImage(Toolkit.getDefaultToolkit().getImage(HealthCareEmrAdvanceHome.class.getResource("/images/Plus-icon64X64.png")));
        Utils u = new Utils();
        comp = u.getAllComponents(this);
        for(String per:permissions){
            String pname = per;            
            for(int i=0;i<comp.size();i++){
                String coname = String.valueOf(comp.get(i).getName());
                if(pname.equalsIgnoreCase(coname)){
                    validcomp.add(comp.get(i));
                }
            }
        }
        
        invalidcomp = comp;
        
        for(Component vc:validcomp){
            for(int i=0;i<invalidcomp.size();i++){
                if((String.valueOf(vc.getName())).equalsIgnoreCase(String.valueOf(invalidcomp.get(i).getName()))){
                    invalidcomp.remove(vc);
                }
            }
        }
        
        for(Component c:invalidcomp){
            if(healthcare_tabbedpane.isAncestorOf(c)){
                healthcare_tabbedpane.remove(c);
            }
            if(healthcare_menubar.isAncestorOf(c)){
                healthcare_menubar.remove(c);
            }
        }
        if(permissions.contains("REPORTS")){
            patientreport_button.setVisible(true);
            PatientSchedulingPanel.patient_reprt_button.setVisible(true);
            PatientSchedulingPanel.consutationFeeEdit_bt.setVisible(true);
        }else{
            patientreport_button.setVisible(false);
            PatientSchedulingPanel.patient_reprt_button.setVisible(false);
            PatientSchedulingPanel.consutationFeeEdit_bt.setVisible(false);
        }
        showoutpatient();
        
        for(TAccountDepartment d:accdepartments){
            menu = new javax.swing.JRadioButtonMenuItem();
            buttonGroup1.add(menu);
            menu.setText(d.getDeptId().getDepartmentName());
            menu.setName(String.valueOf(d.getId()));
            departmentmenu.add(menu);
            if(d.getDeptId().getDepartmentName().equalsIgnoreCase(selecteddept.getDeptId().getDepartmentName())){
                menu.setSelected(true);
            }
            menu.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                   getSelectedMenuItem(e);
                }
            });
        }
        
        deptnamelabel.setText(selecteddept.getDeptId().getDepartmentName());
        
    }
    JRadioButtonMenuItem menu;
    TAccountDepartment selecteddept;
    private void getSelectedMenuItem(java.awt.event.ActionEvent evt) {
        try {
            JRadioButtonMenuItem selectedmenu = (JRadioButtonMenuItem)evt.getSource();
            //TDepartmentMaster selecteddept = departmentMasterController.getDepartmentByName(selectedmenu.getName());
            Long id = Long.parseLong(selectedmenu.getName());
            selecteddept = deptWithRoleController.getAccDeptById(id);
            PreferenceUtil.putObject(myPrefObj, "selecteddepartment", selecteddept);
            List<TAccDeptRole> selecteddeptroles = deptWithRoleController.getAssociatedRole(selecteddept);
            List<TRolePermission> rolepermissions = new ArrayList<TRolePermission>();
            List<TRolePermission> permissionslist = new ArrayList<TRolePermission>();
            List<String> permissions = new ArrayList<String>();
            for(TAccDeptRole r: selecteddeptroles){
               rolepermissions = userSetupController.getRolePermission(r.getRoleId());
               for(TRolePermission permission:rolepermissions){
                  permissionslist.add(permission);
               } 
            }
            Set<TRolePermission> dupli = new HashSet<TRolePermission>(permissionslist);
            for(TRolePermission s:dupli){
                String str = s.getPermissionId().getPermissionName();
                permissions.add(str);
            }
                        
            try {
                PreferenceUtil.putObject(myPrefObj, "permissions", permissions);
                //PreferenceUtil.putObject(myPrefObj, "selecteddept", selecteddept);
            } catch (IOException ex) {
                Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(Level.SEVERE, null, ex);
            } catch (BackingStoreException ex) {
                Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(Level.SEVERE, null, ex);
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(Level.SEVERE, null, ex);
            }
            if(deptnamelabel.getText().equalsIgnoreCase(selecteddept.getDeptId().getDepartmentName())){
                
            }else{
                this.dispose();
                HealthCareEmrAdvanceHome home = new HealthCareEmrAdvanceHome();
                home.setVisible(true);
            }
        } catch (ProcessingException ex) {
            Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(Level.SEVERE, null, ex);
        }catch (Exception ex) {
            Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        timer_label = new javax.swing.JLabel();
        changePasswordLabel = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        logout_button = new javax.swing.JButton();
        loginUser_label = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        deptnamelabel = new javax.swing.JLabel();
        healthcare_tabbedpane = new javax.swing.JTabbedPane();
        home_panel = new javax.swing.JPanel();
        home_left_panel = new javax.swing.JPanel();
        home_taskcontanier = new org.jdesktop.swingx.JXTaskPaneContainer();
        adminsetup_taskpane = new org.jdesktop.swingx.JXTaskPane();
        clinicalsetup_label = new javax.swing.JLabel();
        facilitysetup_label = new javax.swing.JLabel();
        usersetup_label = new javax.swing.JLabel();
        inpatientSetup_label = new javax.swing.JLabel();
        codesetup_taskpane = new org.jdesktop.swingx.JXTaskPane();
        codevalues_label = new javax.swing.JLabel();
        certificationsetup_taskpane = new org.jdesktop.swingx.JXTaskPane();
        licence_label = new javax.swing.JLabel();
        databaseBackUp_taskpane = new org.jdesktop.swingx.JXTaskPane();
        backUp_label = new javax.swing.JLabel();
        restore_label = new javax.swing.JLabel();
        home_display_panel_right = new CurvedGradientPanel();
        patientinfo_panel = new javax.swing.JPanel();
        button_panel = new javax.swing.JPanel();
        mainmenu_button = new StandardButton("<html>Registration<br/>Main Menu<html/>");//new GlossyButton("<html>Registration<br/>Main Menu<html/>",Theme.GLOSSY_SKYBLUE_THEME,ButtonType.BUTTON_ROUNDED_RECTANGLUR);
        complete_registration_button = new StandardButton("<html>Full<br/>Registration</html>");//new GlossyButton("<html>New Patient<br/>Registration</html>",Theme.GLOSSY_SKYBLUE_THEME,ButtonType.BUTTON_ROUNDED_RECTANGLUR);
        quick_entry_button = new StandardButton("<html>Quick<br/>Registration</html>");//new GlossyButton("<html>Quick<br/>Registration</html>",Theme.GLOSSY_SKYBLUE_THEME,ButtonType.BUTTON_ROUNDED_RECTANGLUR);
        lookup_button = new StandardButton("<html>Search<br/>Patient<html/>");//new GlossyButton("<html>Search<br/>Patient      <html/>",Theme.GLOSSY_SKYBLUE_THEME,ButtonType.BUTTON_ROUNDED_RECTANGLUR);
        duplicateReplca_button = new StandardButton("<html>Duplicate<br/>Patients<html/>");//new GlossyButton("<html>Report<br/>           <html/>",Theme.GLOSSY_SKYBLUE_THEME,ButtonType.BUTTON_ROUNDED_RECTANGLUR);
        patientreport_button = new StandardButton("<html>Report<br/>           <html/>");//new GlossyButton("<html>Report<br/>           <html/>",Theme.GLOSSY_SKYBLUE_THEME,ButtonType.BUTTON_ROUNDED_RECTANGLUR);
        patientinfo_right_display_panel = new javax.swing.JPanel();
        patientscheduling_panel = new javax.swing.JPanel();
        scheduling_right_display_panel = new javax.swing.JPanel();
        outpatient_panel = new javax.swing.JPanel();
        jToolBar1 = new javax.swing.JToolBar();
        schedule_button = new javax.swing.JButton();
        NewEncounter_button = new javax.swing.JButton();
        openEncounter_button = new javax.swing.JButton();
        outpatient_right_display_panel = new javax.swing.JPanel();
        inpatient_panel = new javax.swing.JPanel();
        In_Patient_Display_panel = new javax.swing.JPanel();
        labInformation_panel = new javax.swing.JPanel();
        labinformation_displayPanel = new javax.swing.JPanel();
        healthcare_menubar = new javax.swing.JMenuBar();
        admin_menu = new javax.swing.JMenu();
        clinical_setup = new javax.swing.JMenuItem();
        facility_setup = new javax.swing.JMenuItem();
        user_setup = new javax.swing.JMenuItem();
        inpatient_setup = new javax.swing.JMenuItem();
        codevalues_setup = new javax.swing.JMenuItem();
        registration_menu = new javax.swing.JMenu();
        complete_registration = new javax.swing.JMenuItem();
        quick_registration = new javax.swing.JMenuItem();
        patient_search = new javax.swing.JMenuItem();
        duplicate_Patient_item = new javax.swing.JMenuItem();
        scheduling_menu = new javax.swing.JMenu();
        make_appointment = new javax.swing.JMenuItem();
        search_appointment = new javax.swing.JMenuItem();
        outpatient_menu = new javax.swing.JMenu();
        op_schedule_item = new javax.swing.JMenuItem();
        new_encounter_item = new javax.swing.JMenuItem();
        open_encounter_item = new javax.swing.JMenuItem();
        inpatient_menu = new javax.swing.JMenu();
        inpatient_admission = new javax.swing.JMenuItem();
        inpatient_discharge = new javax.swing.JMenuItem();
        inpatient_Billing = new javax.swing.JMenuItem();
        inpatient_rounding = new javax.swing.JMenuItem();
        laboratory_menu = new javax.swing.JMenu();
        report_menu = new javax.swing.JMenu();
        registration_report = new javax.swing.JMenuItem();
        scheduling_report = new javax.swing.JMenuItem();
        inpatBilling_report_menuItem = new javax.swing.JMenuItem();
        user_menu = new javax.swing.JMenu();
        username_menuItem = new javax.swing.JMenuItem();
        departmentmenu = new javax.swing.JMenu();
        changePassword_menuItem = new javax.swing.JMenuItem();
        support_menuItem = new javax.swing.JMenuItem();
        logout_menuItem = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Best Ray EMR Care Suite");
        setBackground(new java.awt.Color(255, 255, 255));

        //SimpleGradientPanel()
        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logo3small.jpg"))); // NOI18N

        timer_label.setEnabled(true);
        dateFormat = new SimpleDateFormat("EEEE dd-MMM-yyyy  hh:mm:ss a");
        date = new Date();
        timer_label.setText(dateFormat.format(date));
        timer_label.setBackground(new java.awt.Color(51, 204, 255));
        timer_label.setFont(new java.awt.Font("SansSerif", 1, 13)); // NOI18N
        timer_label.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

        changePasswordLabel.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        changePasswordLabel.setText("Change Password");
        changePasswordLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        changePasswordLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                changePasswordLabelMouseClicked(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user 16X16.png"))); // NOI18N
        jLabel2.setText("User :");
        jLabel2.setIconTextGap(2);

        logout_button.setFocusable(false);
        logout_button.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        logout_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logout.png"))); // NOI18N
        logout_button.setText("Logout");
        logout_button.setContentAreaFilled(false);
        logout_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        logout_button.setName("LOGOUT_BUTTON"); // NOI18N
        logout_button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                logout_buttonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                logout_buttonMouseReleased(evt);
            }
        });
        logout_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                logout_buttonActionPerformed(evt);
            }
        });

        loginUser_label.setFont(new java.awt.Font("Tahoma", 1, 12));
        //loginUser_label.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        Preferences myPrefObj = Preferences.userRoot();
        try{
            TAccount useraccount = (TAccount)PreferenceUtil.getObject(myPrefObj, "user");
            //loginUser_label.setForeground(new java.awt.Color(255, 255, 255));

            loginUser_label.setText(useraccount.getFirstName()+" "+ useraccount.getLastName());
        }catch(Exception e){
            System.out.println("Exception "+e.getMessage());
        }
        loginUser_label.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N

        jLabel3.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        jLabel3.setText("Department :");

        deptnamelabel.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        deptnamelabel.setText("jLabel4");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(loginUser_label, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(changePasswordLabel)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(deptnamelabel)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(timer_label, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(logout_button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(loginUser_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(timer_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(4, 4, 4)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(changePasswordLabel)
                    .addComponent(jLabel3)
                    .addComponent(deptnamelabel))
                .addGap(4, 4, 4))
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addComponent(logout_button)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        healthcare_tabbedpane.setUI(new CWTabbedPaneUI());
        healthcare_tabbedpane.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        healthcare_tabbedpane.setName("TABPANE"); // NOI18N

        home_panel.setBackground(new java.awt.Color(253, 251, 251));
        home_panel.setName("HOMEPANEL"); // NOI18N

        home_left_panel.setPreferredSize(new java.awt.Dimension(179, 554));
        home_left_panel.setLayout(new java.awt.BorderLayout());

        adminsetup_taskpane.setTitle("ADMIN SETUP");

        clinicalsetup_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        clinicalsetup_label.setText("Clinical Setup");
        clinicalsetup_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        clinicalsetup_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                clinicalsetup_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                clinicalsetup_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                clinicalsetup_labelMouseReleased(evt);
            }
        });

        facilitysetup_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        facilitysetup_label.setText("Facility Setup");
        facilitysetup_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        facilitysetup_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                facilitysetup_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                facilitysetup_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                facilitysetup_labelMouseReleased(evt);
            }
        });

        usersetup_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        usersetup_label.setText("User Setup");
        usersetup_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        usersetup_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                usersetup_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                usersetup_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                usersetup_labelMouseReleased(evt);
            }
        });

        inpatientSetup_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        inpatientSetup_label.setText("In-Patient Setup");
        inpatientSetup_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        inpatientSetup_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                inpatientSetup_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                inpatientSetup_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                inpatientSetup_labelMouseReleased(evt);
            }
        });

        javax.swing.GroupLayout adminsetup_taskpaneLayout = new javax.swing.GroupLayout(adminsetup_taskpane.getContentPane());
        adminsetup_taskpane.getContentPane().setLayout(adminsetup_taskpaneLayout);
        adminsetup_taskpaneLayout.setHorizontalGroup(
            adminsetup_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(clinicalsetup_label, javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE)
            .addComponent(facilitysetup_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(usersetup_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(adminsetup_taskpaneLayout.createSequentialGroup()
                .addComponent(inpatientSetup_label)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        adminsetup_taskpaneLayout.setVerticalGroup(
            adminsetup_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(adminsetup_taskpaneLayout.createSequentialGroup()
                .addComponent(clinicalsetup_label)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(facilitysetup_label)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(usersetup_label)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(inpatientSetup_label)
                .addContainerGap())
        );

        codesetup_taskpane.setTitle("CODE SETUP");

        codevalues_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        codevalues_label.setText("Code Values Setup");
        codevalues_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        codevalues_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                codevalues_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                codevalues_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                codevalues_labelMouseReleased(evt);
            }
        });

        javax.swing.GroupLayout codesetup_taskpaneLayout = new javax.swing.GroupLayout(codesetup_taskpane.getContentPane());
        codesetup_taskpane.getContentPane().setLayout(codesetup_taskpaneLayout);
        codesetup_taskpaneLayout.setHorizontalGroup(
            codesetup_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(codevalues_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        codesetup_taskpaneLayout.setVerticalGroup(
            codesetup_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(codevalues_label)
        );

        certificationsetup_taskpane.setTitle("CERTIFICATION SETUP");

        licence_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        licence_label.setText("Licence");
        licence_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        licence_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                licence_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                licence_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                licence_labelMouseReleased(evt);
            }
        });

        javax.swing.GroupLayout certificationsetup_taskpaneLayout = new javax.swing.GroupLayout(certificationsetup_taskpane.getContentPane());
        certificationsetup_taskpane.getContentPane().setLayout(certificationsetup_taskpaneLayout);
        certificationsetup_taskpaneLayout.setHorizontalGroup(
            certificationsetup_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(licence_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        certificationsetup_taskpaneLayout.setVerticalGroup(
            certificationsetup_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(licence_label)
        );

        databaseBackUp_taskpane.setTitle("DATABASE SETUP");
        databaseBackUp_taskpane.setToolTipText("");

        backUp_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        backUp_label.setText("Database Backup");
        backUp_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        backUp_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                backUp_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                backUp_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                backUp_labelMouseReleased(evt);
            }
        });

        restore_label.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        restore_label.setText("Database Restore");
        restore_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        restore_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                restore_labelMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                restore_labelMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                restore_labelMouseReleased(evt);
            }
        });

        javax.swing.GroupLayout databaseBackUp_taskpaneLayout = new javax.swing.GroupLayout(databaseBackUp_taskpane.getContentPane());
        databaseBackUp_taskpane.getContentPane().setLayout(databaseBackUp_taskpaneLayout);
        databaseBackUp_taskpaneLayout.setHorizontalGroup(
            databaseBackUp_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, databaseBackUp_taskpaneLayout.createSequentialGroup()
                .addGroup(databaseBackUp_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(restore_label, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(backUp_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        databaseBackUp_taskpaneLayout.setVerticalGroup(
            databaseBackUp_taskpaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(databaseBackUp_taskpaneLayout.createSequentialGroup()
                .addComponent(backUp_label)
                .addGap(8, 8, 8)
                .addComponent(restore_label)
                .addContainerGap())
        );

        javax.swing.GroupLayout home_taskcontanierLayout = new javax.swing.GroupLayout(home_taskcontanier);
        home_taskcontanier.setLayout(home_taskcontanierLayout);
        home_taskcontanierLayout.setHorizontalGroup(
            home_taskcontanierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(home_taskcontanierLayout.createSequentialGroup()
                .addGroup(home_taskcontanierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(certificationsetup_taskpane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(codesetup_taskpane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(adminsetup_taskpane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(databaseBackUp_taskpane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(0, 0, Short.MAX_VALUE))
        );
        home_taskcontanierLayout.setVerticalGroup(
            home_taskcontanierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(home_taskcontanierLayout.createSequentialGroup()
                .addComponent(adminsetup_taskpane, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(codesetup_taskpane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(4, 4, 4)
                .addComponent(certificationsetup_taskpane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(4, 4, 4)
                .addComponent(databaseBackUp_taskpane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(71, 71, 71))
        );

        home_left_panel.add(home_taskcontanier, java.awt.BorderLayout.CENTER);

        home_display_panel_right.setBackground(new java.awt.Color(255, 255, 255));
        home_display_panel_right.setLayout(new java.awt.BorderLayout());

        javax.swing.GroupLayout home_panelLayout = new javax.swing.GroupLayout(home_panel);
        home_panel.setLayout(home_panelLayout);
        home_panelLayout.setHorizontalGroup(
            home_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(home_panelLayout.createSequentialGroup()
                .addComponent(home_left_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(home_display_panel_right, javax.swing.GroupLayout.DEFAULT_SIZE, 1016, Short.MAX_VALUE))
        );
        home_panelLayout.setVerticalGroup(
            home_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(home_left_panel, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
            .addComponent(home_display_panel_right, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
        );

        healthcare_tabbedpane.addTab("   Home", new javax.swing.ImageIcon(getClass().getResource("/images/home24x24.png")), home_panel); // NOI18N

        patientinfo_panel.setBackground(new java.awt.Color(255, 255, 255));
        patientinfo_panel.setName("REGISTRATIONPANEL"); // NOI18N
        patientinfo_panel.setLayout(new java.awt.BorderLayout());

        button_panel.setOpaque(false);
        button_panel.setVisible(false);

        mainmenu_button.setBackground(new java.awt.Color(255, 255, 255));
        mainmenu_button.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        mainmenu_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/main menu 32.png"))); // NOI18N
        mainmenu_button.setContentAreaFilled(false);
        mainmenu_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        mainmenu_button.setPreferredSize(new java.awt.Dimension(57, 33));
        mainmenu_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mainmenu_buttonActionPerformed(evt);
            }
        });

        complete_registration_button.setBackground(new java.awt.Color(255, 255, 255));
        complete_registration_button.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        complete_registration_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/add patient32X32.png"))); // NOI18N
        complete_registration_button.setContentAreaFilled(false);
        complete_registration_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        complete_registration_button.setPreferredSize(new java.awt.Dimension(57, 33));
        complete_registration_button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                complete_registration_buttonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                complete_registration_buttonMouseReleased(evt);
            }
        });
        complete_registration_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                complete_registration_buttonActionPerformed(evt);
            }
        });

        quick_entry_button.setBackground(new java.awt.Color(255, 255, 255));
        quick_entry_button.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        quick_entry_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/fast32X32.png"))); // NOI18N
        quick_entry_button.setContentAreaFilled(false);
        quick_entry_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        quick_entry_button.setPreferredSize(new java.awt.Dimension(57, 33));
        quick_entry_button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                quick_entry_buttonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                quick_entry_buttonMouseReleased(evt);
            }
        });
        quick_entry_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quick_entry_buttonActionPerformed(evt);
            }
        });

        lookup_button.setBackground(new java.awt.Color(255, 255, 255));
        lookup_button.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lookup_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/search-patient 32X32icon.png"))); // NOI18N
        lookup_button.setContentAreaFilled(false);
        lookup_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        lookup_button.setPreferredSize(new java.awt.Dimension(57, 33));
        lookup_button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                lookup_buttonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                lookup_buttonMouseReleased(evt);
            }
        });
        lookup_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lookup_buttonActionPerformed(evt);
            }
        });

        duplicateReplca_button.setBackground(new java.awt.Color(255, 255, 255));
        duplicateReplca_button.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        duplicateReplca_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/duplicateReplace 32X32.png"))); // NOI18N
        duplicateReplca_button.setContentAreaFilled(false);
        duplicateReplca_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        duplicateReplca_button.setPreferredSize(new java.awt.Dimension(57, 33));
        duplicateReplca_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                duplicateReplca_buttonActionPerformed(evt);
            }
        });

        patientreport_button.setBackground(new java.awt.Color(255, 255, 255));
        patientreport_button.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        patientreport_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/report32x32.png"))); // NOI18N
        patientreport_button.setContentAreaFilled(false);
        patientreport_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        patientreport_button.setName("REPORTS"); // NOI18N
        patientreport_button.setPreferredSize(new java.awt.Dimension(57, 33));
        patientreport_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                patientreport_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout button_panelLayout = new javax.swing.GroupLayout(button_panel);
        button_panel.setLayout(button_panelLayout);
        button_panelLayout.setHorizontalGroup(
            button_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(button_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(button_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(quick_entry_button, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(patientreport_button, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lookup_button, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(complete_registration_button, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mainmenu_button, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(duplicateReplca_button, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        button_panelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {complete_registration_button, duplicateReplca_button, lookup_button, mainmenu_button, patientreport_button, quick_entry_button});

        button_panelLayout.setVerticalGroup(
            button_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(button_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(mainmenu_button, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(complete_registration_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(quick_entry_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(lookup_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(duplicateReplca_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(patientreport_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        button_panelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {complete_registration_button, duplicateReplca_button, lookup_button, mainmenu_button, patientreport_button, quick_entry_button});

        patientinfo_panel.add(button_panel, java.awt.BorderLayout.LINE_START);

        patientinfo_right_display_panel.setOpaque(false);
        patientinfo_right_display_panel.setLayout(new java.awt.BorderLayout());
        patientinfo_right_display_panel.add(new PatientRegDisplayPanel(),java.awt.BorderLayout.CENTER);
        patientinfo_panel.add(patientinfo_right_display_panel, java.awt.BorderLayout.CENTER);

        healthcare_tabbedpane.addTab("    Patient Registration", new javax.swing.ImageIcon(getClass().getResource("/images/patient24x24.png")), patientinfo_panel); // NOI18N

        patientscheduling_panel.setName("SCHEDULINGPANEL"); // NOI18N
        patientscheduling_panel.setLayout(new java.awt.BorderLayout());

        scheduling_right_display_panel.setName("SCHEDULING_RIGHTPANEL"); // NOI18N
        scheduling_right_display_panel.setLayout(new java.awt.BorderLayout());
        patientscheduling_panel.add(scheduling_right_display_panel, java.awt.BorderLayout.CENTER);
        showPatientSchedulingPanel();

        healthcare_tabbedpane.addTab("    Patient Scheduling", new javax.swing.ImageIcon(getClass().getResource("/images/schedule-icon24x24.png")), patientscheduling_panel); // NOI18N

        outpatient_panel.setName("OUTPATIENTVISIT"); // NOI18N
        outpatient_panel.setLayout(new java.awt.BorderLayout());

        jToolBar1.setBackground(new java.awt.Color(117, 150, 227));
        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        schedule_button.setBackground(new java.awt.Color(117, 150, 227));
        schedule_button.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        schedule_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/date.png"))); // NOI18N
        schedule_button.setText("Schedule");
        schedule_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        schedule_button.setFocusable(false);
        schedule_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        schedule_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                schedule_buttonActionPerformed(evt);
            }
        });
        jToolBar1.add(schedule_button);

        NewEncounter_button.setBackground(new java.awt.Color(117, 150, 227));
        NewEncounter_button.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        NewEncounter_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Patients-icon 24X24.png"))); // NOI18N
        NewEncounter_button.setText("New Encounter");
        NewEncounter_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        NewEncounter_button.setFocusable(false);
        NewEncounter_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        NewEncounter_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NewEncounter_buttonActionPerformed(evt);
            }
        });
        jToolBar1.add(NewEncounter_button);

        openEncounter_button.setBackground(new java.awt.Color(117, 150, 227));
        openEncounter_button.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        openEncounter_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Patients-icon 24X24.png"))); // NOI18N
        openEncounter_button.setText("Open Encounter");
        openEncounter_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        openEncounter_button.setFocusable(false);
        openEncounter_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        openEncounter_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                openEncounter_buttonActionPerformed(evt);
            }
        });
        jToolBar1.add(openEncounter_button);

        outpatient_panel.add(jToolBar1, java.awt.BorderLayout.PAGE_START);

        outpatient_right_display_panel.setLayout(new java.awt.BorderLayout());
        outpatient_panel.add(outpatient_right_display_panel, java.awt.BorderLayout.CENTER);
        //outpatient_right_display_panel.add(new OutpatientPanel(),java.awt.BorderLayout.CENTER);

        healthcare_tabbedpane.addTab("    Ambulatory", new javax.swing.ImageIcon(getClass().getResource("/images/Patients-icon 24X24.png")), outpatient_panel); // NOI18N

        inpatient_panel.setBackground(new java.awt.Color(255, 255, 255));
        inpatient_panel.setName("INPATIENT"); // NOI18N
        inpatient_panel.setLayout(new java.awt.BorderLayout());

        In_Patient_Display_panel.setLayout(new java.awt.BorderLayout());
        inpatient_panel.add(In_Patient_Display_panel, java.awt.BorderLayout.CENTER);
        In_Patient_Display_panel.removeAll();
        In_Patient_Display_panel.updateUI();
        In_Patient_Display_panel.setBackground(Color.WHITE);
        In_Patient_Display_panel.add(new InPatientHomePanel(),java.awt.BorderLayout.CENTER);
        In_Patient_Display_panel.setVisible(true);

        healthcare_tabbedpane.addTab("    Inpatient System", new javax.swing.ImageIcon(getClass().getResource("/images/medical-bed-icon24X24.png")), inpatient_panel); // NOI18N

        labInformation_panel.setBackground(new java.awt.Color(255, 255, 255));
        labInformation_panel.setName("LABPANEL"); // NOI18N
        labInformation_panel.setLayout(new java.awt.BorderLayout());

        labinformation_displayPanel.setBackground(new java.awt.Color(255, 255, 255));
        labinformation_displayPanel.setLayout(new java.awt.BorderLayout());
        labInformation_panel.add(labinformation_displayPanel, java.awt.BorderLayout.CENTER);
        labinformation_displayPanel.removeAll();
        labinformation_displayPanel.updateUI();
        labinformation_displayPanel.setBackground(Color.WHITE);
        labinformation_displayPanel.add(new PatientLabRecordPanel(),java.awt.BorderLayout.CENTER);
        labinformation_displayPanel.setVisible(true);

        healthcare_tabbedpane.addTab("    Lab Information", new javax.swing.ImageIcon(getClass().getResource("/images/microscope-icon24X24.png")), labInformation_panel); // NOI18N

        admin_menu.setText("Home");
        admin_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        admin_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        admin_menu.setName("HOMEPANEL"); // NOI18N

        clinical_setup.setText("Clinical Setup");
        clinical_setup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clinical_setupActionPerformed(evt);
            }
        });
        admin_menu.add(clinical_setup);

        facility_setup.setText("Facility Setup");
        facility_setup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                facility_setupActionPerformed(evt);
            }
        });
        admin_menu.add(facility_setup);

        user_setup.setText("User  Setup");
        user_setup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                user_setupActionPerformed(evt);
            }
        });
        admin_menu.add(user_setup);

        inpatient_setup.setText("In-Patient Setup");
        inpatient_setup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inpatient_setupActionPerformed(evt);
            }
        });
        admin_menu.add(inpatient_setup);

        codevalues_setup.setText("Code Values Setup");
        codevalues_setup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                codevalues_setupActionPerformed(evt);
            }
        });
        admin_menu.add(codevalues_setup);

        healthcare_menubar.add(admin_menu);

        registration_menu.setText("Registration");
        registration_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        registration_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        registration_menu.setName("REGISTRATIONPANEL"); // NOI18N

        complete_registration.setText("Complete Registration");
        complete_registration.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                complete_registrationActionPerformed(evt);
            }
        });
        registration_menu.add(complete_registration);

        quick_registration.setText("Quick Registration");
        quick_registration.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quick_registrationActionPerformed(evt);
            }
        });
        registration_menu.add(quick_registration);

        patient_search.setText("Patient Search");
        patient_search.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                patient_searchActionPerformed(evt);
            }
        });
        registration_menu.add(patient_search);

        duplicate_Patient_item.setText("Duplicate Patient");
        duplicate_Patient_item.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                duplicate_Patient_itemActionPerformed(evt);
            }
        });
        registration_menu.add(duplicate_Patient_item);

        healthcare_menubar.add(registration_menu);

        scheduling_menu.setText("Scheduling");
        scheduling_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        scheduling_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        scheduling_menu.setName("SCHEDULINGPANEL"); // NOI18N

        make_appointment.setText("Make Appointment");
        make_appointment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                make_appointmentActionPerformed(evt);
            }
        });
        scheduling_menu.add(make_appointment);

        search_appointment.setText("Search Appointment");
        search_appointment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                search_appointmentActionPerformed(evt);
            }
        });
        scheduling_menu.add(search_appointment);

        healthcare_menubar.add(scheduling_menu);

        outpatient_menu.setText("Ambulatory");
        outpatient_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        outpatient_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        outpatient_menu.setName("OUTPATIENTVISIT"); // NOI18N

        op_schedule_item.setText("OP-Schedule");
        op_schedule_item.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                op_schedule_itemActionPerformed(evt);
            }
        });
        outpatient_menu.add(op_schedule_item);

        new_encounter_item.setText("New Encounter");
        new_encounter_item.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                new_encounter_itemActionPerformed(evt);
            }
        });
        outpatient_menu.add(new_encounter_item);

        open_encounter_item.setText("Open Encounter");
        open_encounter_item.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                open_encounter_itemActionPerformed(evt);
            }
        });
        outpatient_menu.add(open_encounter_item);

        healthcare_menubar.add(outpatient_menu);

        inpatient_menu.setText("In-Patient");
        inpatient_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        inpatient_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        inpatient_menu.setName("INPATIENT"); // NOI18N

        inpatient_admission.setText("Admission");
        inpatient_admission.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inpatient_admissionActionPerformed(evt);
            }
        });
        inpatient_menu.add(inpatient_admission);

        inpatient_discharge.setText("Discharge");
        inpatient_discharge.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inpatient_dischargeActionPerformed(evt);
            }
        });
        inpatient_menu.add(inpatient_discharge);

        inpatient_Billing.setText("Billing");
        inpatient_Billing.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inpatient_BillingActionPerformed(evt);
            }
        });
        inpatient_menu.add(inpatient_Billing);

        inpatient_rounding.setText("Rounding");
        inpatient_rounding.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inpatient_roundingActionPerformed(evt);
            }
        });
        inpatient_menu.add(inpatient_rounding);

        healthcare_menubar.add(inpatient_menu);

        laboratory_menu.setText("Laboratory");
        laboratory_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        laboratory_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        laboratory_menu.setName("LABPANEL"); // NOI18N
        healthcare_menubar.add(laboratory_menu);

        report_menu.setText("Reports");
        report_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        report_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        report_menu.setName("REPORTS"); // NOI18N

        registration_report.setText("Registration Reports");
        registration_report.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                registration_reportActionPerformed(evt);
            }
        });
        report_menu.add(registration_report);

        scheduling_report.setText("Scheduling Reports");
        scheduling_report.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                scheduling_reportActionPerformed(evt);
            }
        });
        report_menu.add(scheduling_report);

        inpatBilling_report_menuItem.setText("IP Billing Report");
        inpatBilling_report_menuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inpatBilling_report_menuItemActionPerformed(evt);
            }
        });
        report_menu.add(inpatBilling_report_menuItem);

        healthcare_menubar.add(report_menu);

        user_menu.setText("User");
        user_menu.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        user_menu.setMargin(new java.awt.Insets(2, 8, 2, 8));
        user_menu.setName("USERMENU"); // NOI18N

        myPrefObj = Preferences.userRoot();
        TAccount useraccount = new TAccount();
        try{
            useraccount = (TAccount)PreferenceUtil.getObject(myPrefObj, "user");
        }catch(Exception e){
            System.out.println("Exception "+e.getMessage());
        }
        username_menuItem.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        username_menuItem.setText(useraccount.getFirstName()+" "+ useraccount.getLastName());
        user_menu.add(username_menuItem);

        departmentmenu.setText("Departments");
        user_menu.add(departmentmenu);

        changePassword_menuItem.setText("Change Password");
        changePassword_menuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                changePassword_menuItemActionPerformed(evt);
            }
        });
        user_menu.add(changePassword_menuItem);

        support_menuItem.setText("Technical Support");
        support_menuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                support_menuItemActionPerformed(evt);
            }
        });
        user_menu.add(support_menuItem);

        logout_menuItem.setText("Logout");
        logout_menuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                logout_menuItemActionPerformed(evt);
            }
        });
        user_menu.add(logout_menuItem);

        healthcare_menubar.add(user_menu);

        setJMenuBar(healthcare_menubar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(healthcare_tabbedpane)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0)
                .addComponent(healthcare_tabbedpane))
        );

        healthcare_tabbedpane.setSelectedIndex(1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void changePasswordLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_changePasswordLabelMouseClicked
        DisabledGlassPane glassPane = new DisabledGlassPane();
        JRootPane rootPane = SwingUtilities.getRootPane(this);
        rootPane.setGlassPane(glassPane);
        ChangePasswordDialog changepassDialoge = new ChangePasswordDialog(MainAPP, true);
        changepassDialoge.setResizable(false);
        changepassDialoge.setLocationRelativeTo(null);
        glassPane.activate("");
        changepassDialoge.setVisible(true);
        changepassDialoge.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        glassPane.deactivate();
    }//GEN-LAST:event_changePasswordLabelMouseClicked

    private void logout_buttonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_logout_buttonMousePressed
        logout_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logout - clicked.png")));
        logout_button.setForeground(Color.WHITE);
    }//GEN-LAST:event_logout_buttonMousePressed

    private void logout_buttonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_logout_buttonMouseReleased
        logout_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logout.png")));
        logout_button.setForeground(Color.BLACK);
    }//GEN-LAST:event_logout_buttonMouseReleased

    private void logout_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logout_buttonActionPerformed
        Preferences myPrefObj = Preferences.userRoot();
        try{
            PreferenceUtil.putObject(myPrefObj, "user", null);
            PreferenceUtil.putObject(myPrefObj, "permissions", null);
            PreferenceUtil.putObject(myPrefObj, "udepartments", null);
            PreferenceUtil.putObject(myPrefObj, "selecteddepartment", null);
        }catch(Exception e){}
        dispose();
        new HealthcareLogin().setVisible(true);
    }//GEN-LAST:event_logout_buttonActionPerformed

    private void clinicalsetup_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clinicalsetup_labelMouseClicked
        showClinicalSetupPanel();
    }//GEN-LAST:event_clinicalsetup_labelMouseClicked

    private void clinicalsetup_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clinicalsetup_labelMousePressed
        clinicalsetup_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_clinicalsetup_labelMousePressed

    private void clinicalsetup_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clinicalsetup_labelMouseReleased
        clinicalsetup_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_clinicalsetup_labelMouseReleased

    private void facilitysetup_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_facilitysetup_labelMouseClicked
        showFacilitySetupPanel();
    }//GEN-LAST:event_facilitysetup_labelMouseClicked

    private void facilitysetup_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_facilitysetup_labelMousePressed
        facilitysetup_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_facilitysetup_labelMousePressed

    private void facilitysetup_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_facilitysetup_labelMouseReleased
        facilitysetup_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_facilitysetup_labelMouseReleased

    private void usersetup_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_usersetup_labelMouseClicked
        showUserSetupPanel();
    }//GEN-LAST:event_usersetup_labelMouseClicked

    private void usersetup_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_usersetup_labelMousePressed
        usersetup_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_usersetup_labelMousePressed

    private void usersetup_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_usersetup_labelMouseReleased
        usersetup_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_usersetup_labelMouseReleased

    private void codevalues_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_codevalues_labelMouseClicked
        showCodeSetupPanel();
    }//GEN-LAST:event_codevalues_labelMouseClicked

    private void codevalues_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_codevalues_labelMousePressed
        codevalues_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_codevalues_labelMousePressed

    private void codevalues_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_codevalues_labelMouseReleased
        codevalues_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_codevalues_labelMouseReleased

    private void licence_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_licence_labelMouseClicked

        DisabledGlassPane glassPane = new DisabledGlassPane();
        JRootPane rootPane = SwingUtilities.getRootPane(this);
        rootPane.setGlassPane(glassPane);
        LicenceDialoge r = new LicenceDialoge(MainAPP, true);
        r.setResizable(false);
        r.setLocationRelativeTo(null);
        glassPane.activate("");
        r.setVisible(true);
        r.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        glassPane.deactivate();

    }//GEN-LAST:event_licence_labelMouseClicked

    private void licence_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_licence_labelMousePressed
        licence_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_licence_labelMousePressed

    private void licence_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_licence_labelMouseReleased
        licence_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_licence_labelMouseReleased

    private void backUp_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backUp_labelMouseClicked
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(b,java.awt.BorderLayout.CENTER);
        CardLayout card = (CardLayout) b.getLayout();
        card.show(b, "card1");
        home_display_panel_right.setVisible(true);
    }//GEN-LAST:event_backUp_labelMouseClicked

    private void backUp_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backUp_labelMousePressed
        backUp_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_backUp_labelMousePressed

    private void backUp_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backUp_labelMouseReleased
        backUp_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_backUp_labelMouseReleased

    private void restore_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_restore_labelMouseClicked
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(b,java.awt.BorderLayout.CENTER);
        CardLayout card = (CardLayout) b.getLayout();
        card.show(b, "card2");
        home_display_panel_right.setVisible(true);
    }//GEN-LAST:event_restore_labelMouseClicked

    private void restore_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_restore_labelMousePressed
        restore_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_restore_labelMousePressed

    private void restore_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_restore_labelMouseReleased
        restore_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_restore_labelMouseReleased

    private void complete_registration_buttonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_complete_registration_buttonMousePressed
        complete_registration_button.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_complete_registration_buttonMousePressed

    private void complete_registration_buttonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_complete_registration_buttonMouseReleased
        complete_registration_button.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_complete_registration_buttonMouseReleased

    private void complete_registration_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_complete_registration_buttonActionPerformed
        showCompletePatientRegistraionPanel();
    }//GEN-LAST:event_complete_registration_buttonActionPerformed

    private void quick_entry_buttonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_quick_entry_buttonMousePressed
        quick_entry_button.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_quick_entry_buttonMousePressed

    private void quick_entry_buttonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_quick_entry_buttonMouseReleased
        quick_entry_button.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_quick_entry_buttonMouseReleased

    private void quick_entry_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quick_entry_buttonActionPerformed
        showQuickPatientRegistraionPanel();
    }//GEN-LAST:event_quick_entry_buttonActionPerformed

    private void lookup_buttonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lookup_buttonMousePressed
        lookup_button.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_lookup_buttonMousePressed

    private void lookup_buttonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lookup_buttonMouseReleased
        lookup_button.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_lookup_buttonMouseReleased

    private void lookup_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lookup_buttonActionPerformed
        showPatientLookupPanel();
    }//GEN-LAST:event_lookup_buttonActionPerformed

    private void patientreport_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_patientreport_buttonActionPerformed
        showPatientRegistrationReportPanel();
    }//GEN-LAST:event_patientreport_buttonActionPerformed

    private void mainmenu_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mainmenu_buttonActionPerformed
        patientinfo_right_display_panel.removeAll();
        patientinfo_right_display_panel.updateUI();
        button_panel.setVisible(false);
        patientinfo_right_display_panel.add(new PatientRegDisplayPanel(),java.awt.BorderLayout.CENTER);
    }//GEN-LAST:event_mainmenu_buttonActionPerformed

    private void duplicateReplca_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_duplicateReplca_buttonActionPerformed
        showDuplicatePatientPanel();
    }//GEN-LAST:event_duplicateReplca_buttonActionPerformed

    private void schedule_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_schedule_buttonActionPerformed
        outpatient_right_display_panel.removeAll();
        outpatient_right_display_panel.updateUI();
        outpatient_right_display_panel.setBackground(Color.WHITE);
        outpatient_right_display_panel.add(new OutpatientPanel(),java.awt.BorderLayout.CENTER);
        outpatient_right_display_panel.setVisible(true);
    }//GEN-LAST:event_schedule_buttonActionPerformed

    private void NewEncounter_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NewEncounter_buttonActionPerformed
        outpatient_right_display_panel.removeAll();
        outpatient_right_display_panel.updateUI();
        outpatient_right_display_panel.setBackground(Color.WHITE);
        outpatient_right_display_panel.add(new PatientLookuppanel("New Encounter"),java.awt.BorderLayout.CENTER);
        outpatient_right_display_panel.setVisible(true);
    }//GEN-LAST:event_NewEncounter_buttonActionPerformed

    private void openEncounter_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openEncounter_buttonActionPerformed
        outpatient_right_display_panel.removeAll();
        outpatient_right_display_panel.updateUI();
        outpatient_right_display_panel.setBackground(Color.WHITE);
        outpatient_right_display_panel.add(new PatientLookuppanel("Open Encounter"),java.awt.BorderLayout.CENTER);
        outpatient_right_display_panel.setVisible(true);
    }//GEN-LAST:event_openEncounter_buttonActionPerformed

    private void inpatientSetup_labelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_inpatientSetup_labelMousePressed
        inpatientSetup_label.setForeground(new java.awt.Color(255, 255, 255));
    }//GEN-LAST:event_inpatientSetup_labelMousePressed

    private void inpatientSetup_labelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_inpatientSetup_labelMouseReleased
        inpatientSetup_label.setForeground(new java.awt.Color(0, 0, 0));
    }//GEN-LAST:event_inpatientSetup_labelMouseReleased

    private void inpatientSetup_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_inpatientSetup_labelMouseClicked
        showInPatienSetupPanel();
    }//GEN-LAST:event_inpatientSetup_labelMouseClicked

    private void clinical_setupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clinical_setupActionPerformed
        healthcare_tabbedpane.setSelectedComponent(home_panel);
        showClinicalSetupPanel();
    }//GEN-LAST:event_clinical_setupActionPerformed

    private void facility_setupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_facility_setupActionPerformed
        healthcare_tabbedpane.setSelectedComponent(home_panel);
        showFacilitySetupPanel();
    }//GEN-LAST:event_facility_setupActionPerformed

    private void user_setupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_user_setupActionPerformed
        healthcare_tabbedpane.setSelectedComponent(home_panel);
        showUserSetupPanel();
    }//GEN-LAST:event_user_setupActionPerformed

    private void inpatient_setupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inpatient_setupActionPerformed
        healthcare_tabbedpane.setSelectedComponent(home_panel);
        showInPatienSetupPanel();
    }//GEN-LAST:event_inpatient_setupActionPerformed

    private void codevalues_setupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_codevalues_setupActionPerformed
        healthcare_tabbedpane.setSelectedComponent(home_panel);
        showCodeSetupPanel();
    }//GEN-LAST:event_codevalues_setupActionPerformed

    private void complete_registrationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_complete_registrationActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientinfo_panel);
        if(button_panel.isVisible()){
        showCompletePatientRegistraionPanel();
        }else{
        button_panel.setVisible(true);
        showCompletePatientRegistraionPanel();
        }
    }//GEN-LAST:event_complete_registrationActionPerformed

    private void quick_registrationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quick_registrationActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientinfo_panel);
        if(button_panel.isVisible()){
        showQuickPatientRegistraionPanel();
        }else{
        button_panel.setVisible(true);
        showQuickPatientRegistraionPanel();
        }
    }//GEN-LAST:event_quick_registrationActionPerformed

    private void patient_searchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_patient_searchActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientinfo_panel);
        if(button_panel.isVisible()){
        showPatientLookupPanel();
        }else{
        button_panel.setVisible(true);
        showPatientLookupPanel();
        }
    }//GEN-LAST:event_patient_searchActionPerformed

    private void search_appointmentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_search_appointmentActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientscheduling_panel);
        showPatientSchedulingPanel();
        PatientSchedulingPanel.search_appointment_button.doClick();
    }//GEN-LAST:event_search_appointmentActionPerformed

    private void make_appointmentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_make_appointmentActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientscheduling_panel);
        showPatientSchedulingPanel();
        PatientSchedulingPanel.new_appointment_button.doClick();
    }//GEN-LAST:event_make_appointmentActionPerformed

    private void logout_menuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logout_menuItemActionPerformed
        Preferences myPrefObj = Preferences.userRoot();
        try{
            PreferenceUtil.putObject(myPrefObj, "user", null);
            PreferenceUtil.putObject(myPrefObj, "permissions", null);
            PreferenceUtil.putObject(myPrefObj, "udepartments", null);
        }catch(Exception e){}
        dispose();
        new HealthcareLogin().setVisible(true);
    }//GEN-LAST:event_logout_menuItemActionPerformed

    private void changePassword_menuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_changePassword_menuItemActionPerformed
        DisabledGlassPane glassPane = new DisabledGlassPane();
        JRootPane rootPane = SwingUtilities.getRootPane(this);
        rootPane.setGlassPane(glassPane);
        ChangePasswordDialog changepassDialoge = new ChangePasswordDialog(MainAPP, true);
        changepassDialoge.setResizable(false);
        changepassDialoge.setLocationRelativeTo(null);
        glassPane.activate("");
        changepassDialoge.setVisible(true);
        changepassDialoge.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        glassPane.deactivate();
    }//GEN-LAST:event_changePassword_menuItemActionPerformed

    private void support_menuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_support_menuItemActionPerformed
         try 
        {
            Desktop.getDesktop().browse(new URL("http://www.bestrayinfotech.com/contact.php").toURI());
        }           
        catch (Exception e) {
            e.printStackTrace();
        }
    }//GEN-LAST:event_support_menuItemActionPerformed

    private void duplicate_Patient_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_duplicate_Patient_itemActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientinfo_panel);
        if(button_panel.isVisible()){
        showDuplicatePatientPanel();
        }else{
        button_panel.setVisible(true);
        showDuplicatePatientPanel();
        }
    }//GEN-LAST:event_duplicate_Patient_itemActionPerformed

    private void op_schedule_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_op_schedule_itemActionPerformed
        healthcare_tabbedpane.setSelectedComponent(outpatient_panel);
        schedule_button.doClick();
    }//GEN-LAST:event_op_schedule_itemActionPerformed

    private void new_encounter_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_new_encounter_itemActionPerformed
        healthcare_tabbedpane.setSelectedComponent(outpatient_panel);
        NewEncounter_button.doClick();
    }//GEN-LAST:event_new_encounter_itemActionPerformed

    private void open_encounter_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_open_encounter_itemActionPerformed
        healthcare_tabbedpane.setSelectedComponent(outpatient_panel);
        openEncounter_button.doClick();
    }//GEN-LAST:event_open_encounter_itemActionPerformed

    private void registration_reportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_registration_reportActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientinfo_panel);
        if(button_panel.isVisible()){
        showPatientRegistrationReportPanel();
        }else{
        button_panel.setVisible(true);
        showPatientRegistrationReportPanel();
        }
    }//GEN-LAST:event_registration_reportActionPerformed

    private void scheduling_reportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scheduling_reportActionPerformed
        healthcare_tabbedpane.setSelectedComponent(patientscheduling_panel);
        showPatientSchedulingPanel();
        PatientSchedulingPanel.patient_reprt_button.doClick();
    }//GEN-LAST:event_scheduling_reportActionPerformed

    private void inpatient_admissionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inpatient_admissionActionPerformed
        healthcare_tabbedpane.setSelectedComponent(inpatient_panel);
        InPatientHomePanel.admissionToggleButton.doClick();
    }//GEN-LAST:event_inpatient_admissionActionPerformed

    private void inpatient_dischargeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inpatient_dischargeActionPerformed
        healthcare_tabbedpane.setSelectedComponent(inpatient_panel);
        InPatientHomePanel.dischargeToggleButton.doClick();
    }//GEN-LAST:event_inpatient_dischargeActionPerformed

    private void inpatient_BillingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inpatient_BillingActionPerformed
        healthcare_tabbedpane.setSelectedComponent(inpatient_panel);
        InPatientHomePanel.IPBillingToggleButton.doClick();
    }//GEN-LAST:event_inpatient_BillingActionPerformed

    private void inpatient_roundingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inpatient_roundingActionPerformed
        healthcare_tabbedpane.setSelectedComponent(inpatient_panel);
        InPatientHomePanel.roundingToggleButton.doClick();
    }//GEN-LAST:event_inpatient_roundingActionPerformed

    private void inpatBilling_report_menuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inpatBilling_report_menuItemActionPerformed
        healthcare_tabbedpane.setSelectedComponent(inpatient_panel);
        InPatientHomePanel.collectionReport_ToggleButton.doClick();
    }//GEN-LAST:event_inpatBilling_report_menuItemActionPerformed

    /**
     * @param args the command line arguments
     
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                /*if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(HealthCareEmrAdvanceHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

         Create and display the form 
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new HealthCareEmrAdvanceHome().setVisible(true);
            }
        });
    }*/
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel In_Patient_Display_panel;
    private javax.swing.JButton NewEncounter_button;
    private javax.swing.JMenu admin_menu;
    private org.jdesktop.swingx.JXTaskPane adminsetup_taskpane;
    private javax.swing.JLabel backUp_label;
    private javax.swing.ButtonGroup buttonGroup1;
    public static javax.swing.JPanel button_panel;
    private org.jdesktop.swingx.JXTaskPane certificationsetup_taskpane;
    private javax.swing.JLabel changePasswordLabel;
    private javax.swing.JMenuItem changePassword_menuItem;
    private javax.swing.JMenuItem clinical_setup;
    private javax.swing.JLabel clinicalsetup_label;
    private org.jdesktop.swingx.JXTaskPane codesetup_taskpane;
    private javax.swing.JLabel codevalues_label;
    private javax.swing.JMenuItem codevalues_setup;
    private javax.swing.JMenuItem complete_registration;
    private javax.swing.JButton complete_registration_button;
    private org.jdesktop.swingx.JXTaskPane databaseBackUp_taskpane;
    private javax.swing.JMenu departmentmenu;
    private javax.swing.JLabel deptnamelabel;
    private javax.swing.JButton duplicateReplca_button;
    private javax.swing.JMenuItem duplicate_Patient_item;
    private javax.swing.JMenuItem facility_setup;
    private javax.swing.JLabel facilitysetup_label;
    private javax.swing.JMenuBar healthcare_menubar;
    private javax.swing.JTabbedPane healthcare_tabbedpane;
    private javax.swing.JPanel home_display_panel_right;
    private javax.swing.JPanel home_left_panel;
    private javax.swing.JPanel home_panel;
    private org.jdesktop.swingx.JXTaskPaneContainer home_taskcontanier;
    private javax.swing.JMenuItem inpatBilling_report_menuItem;
    private javax.swing.JLabel inpatientSetup_label;
    private javax.swing.JMenuItem inpatient_Billing;
    private javax.swing.JMenuItem inpatient_admission;
    private javax.swing.JMenuItem inpatient_discharge;
    private javax.swing.JMenu inpatient_menu;
    private javax.swing.JPanel inpatient_panel;
    private javax.swing.JMenuItem inpatient_rounding;
    private javax.swing.JMenuItem inpatient_setup;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JPanel labInformation_panel;
    private javax.swing.JPanel labinformation_displayPanel;
    private javax.swing.JMenu laboratory_menu;
    private javax.swing.JLabel licence_label;
    private javax.swing.JLabel loginUser_label;
    private javax.swing.JButton logout_button;
    private javax.swing.JMenuItem logout_menuItem;
    private javax.swing.JButton lookup_button;
    private javax.swing.JButton mainmenu_button;
    private javax.swing.JMenuItem make_appointment;
    private javax.swing.JMenuItem new_encounter_item;
    private javax.swing.JMenuItem op_schedule_item;
    private javax.swing.JButton openEncounter_button;
    private javax.swing.JMenuItem open_encounter_item;
    private javax.swing.JMenu outpatient_menu;
    private javax.swing.JPanel outpatient_panel;
    public static javax.swing.JPanel outpatient_right_display_panel;
    private javax.swing.JMenuItem patient_search;
    private javax.swing.JPanel patientinfo_panel;
    public static javax.swing.JPanel patientinfo_right_display_panel;
    private javax.swing.JButton patientreport_button;
    private javax.swing.JPanel patientscheduling_panel;
    private javax.swing.JButton quick_entry_button;
    private javax.swing.JMenuItem quick_registration;
    private javax.swing.JMenu registration_menu;
    private javax.swing.JMenuItem registration_report;
    private javax.swing.JMenu report_menu;
    private javax.swing.JLabel restore_label;
    public static javax.swing.JButton schedule_button;
    private javax.swing.JMenu scheduling_menu;
    private javax.swing.JMenuItem scheduling_report;
    public static javax.swing.JPanel scheduling_right_display_panel;
    private javax.swing.JMenuItem search_appointment;
    private javax.swing.JMenuItem support_menuItem;
    private javax.swing.JLabel timer_label;
    private javax.swing.JMenu user_menu;
    private javax.swing.JMenuItem user_setup;
    private javax.swing.JMenuItem username_menuItem;
    private javax.swing.JLabel usersetup_label;
    // End of variables declaration//GEN-END:variables
    /** The permissions. */
    List<String> permissions = new ArrayList<String>();
    List<TAccountDepartment> accdepartments = new ArrayList<TAccountDepartment>();
    TAccountDepartment department = new TAccountDepartment();
    /** The date format. */
    DateFormat dateFormat;
    
    /** The date. */
    Date date;
    
    /** The my pref obj. */
    private Preferences myPrefObj = Preferences.userRoot();
    
    /** The dept. */
    String dept;
    
    /** The Main app. */
    private javax.swing.JFrame MainAPP;
    
    private List<Component> validcomp = new ArrayList<Component>();
    
    /** The invalidcomp. */
    private List<Component> invalidcomp = new ArrayList<Component>();
    
    /** The comp. */
    private List<Component> comp = new ArrayList<Component>();
    
    /** The timer. */
    private Timer timer;
    
    /** The b. */
    private BackupRestorePanel b = new BackupRestorePanel();
    
    private DepartmentMasterController departmentMasterController;
    
    private UserSetupController userSetupController;
    
    private DeptWithRoleController deptWithRoleController;
    
    
    /**
 * My format.
 *
 * @param time the time
 * @return the string
 */
    private String myFormat(final long time) {
    final long hr = TimeUnit.MILLISECONDS.toHours(time);
    final long min = TimeUnit.MILLISECONDS.toMinutes(time - TimeUnit.HOURS.toMillis(hr));
    final long sec = TimeUnit.MILLISECONDS.toSeconds(time - TimeUnit.HOURS.toMillis(hr)
            - TimeUnit.MINUTES.toMillis(min));
   
    return String.format("%02d:%02d:%02d", hr, min, sec);
}

    private void showClinicalSetupPanel() {
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(new ClinicalSetupPanel(),java.awt.BorderLayout.CENTER);
        home_display_panel_right.setVisible(true);
    }

    private void showFacilitySetupPanel() {
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(new FacilitySetupPanel(),java.awt.BorderLayout.CENTER);
        home_display_panel_right.setVisible(true);
    }

    private void showUserSetupPanel() {
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(new UserSetupPanel(),java.awt.BorderLayout.CENTER);
        home_display_panel_right.setVisible(true);
    }

    private void showInPatienSetupPanel() {
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(new InPatientSetUpPanel(),java.awt.BorderLayout.CENTER);
        home_display_panel_right.setVisible(true);
    }

    private void showCodeSetupPanel() {
        home_display_panel_right.removeAll();
        home_display_panel_right.updateUI();
        home_display_panel_right.setBackground(Color.WHITE);
        home_display_panel_right.add(new CodeSetupPanel("GOTOCODEVALUE"),java.awt.BorderLayout.CENTER);
        home_display_panel_right.setVisible(true);
    }

    private void showCompletePatientRegistraionPanel() {
        patientinfo_right_display_panel.removeAll();
        patientinfo_right_display_panel.updateUI();
        patientinfo_right_display_panel.setBackground(Color.WHITE);
        patientinfo_right_display_panel.add(new PatientRegistrationPanel(),java.awt.BorderLayout.CENTER);
        patientinfo_right_display_panel.setVisible(true);
    }

    private void showPatientLookupPanel() {
        patientinfo_right_display_panel.removeAll();
        patientinfo_right_display_panel.updateUI();
        patientinfo_right_display_panel.setBackground(Color.WHITE);
        patientinfo_right_display_panel.add(new PatientLookuppanel("Registration"),java.awt.BorderLayout.CENTER);
        patientinfo_right_display_panel.setVisible(true);
    }

    private void showQuickPatientRegistraionPanel() {
        patientinfo_right_display_panel.removeAll();
        patientinfo_right_display_panel.updateUI();
        patientinfo_right_display_panel.setBackground(Color.WHITE);
        patientinfo_right_display_panel.add(new QuickPatientRegistrationPanel(),java.awt.BorderLayout.CENTER);
        patientinfo_right_display_panel.setVisible(true);
    }
    
    private void showDuplicatePatientPanel() {
        patientinfo_right_display_panel.removeAll();
        patientinfo_right_display_panel.updateUI();
        patientinfo_right_display_panel.setBackground(Color.WHITE);
        patientinfo_right_display_panel.add(new DuplicatePatientPanel(),java.awt.BorderLayout.CENTER);
        patientinfo_right_display_panel.setVisible(true);
    }
    
    private void showPatientRegistrationReportPanel() {
        patientinfo_right_display_panel.removeAll();
        patientinfo_right_display_panel.updateUI();
        patientinfo_right_display_panel.setBackground(Color.WHITE);
        patientinfo_right_display_panel.add(new ReportPanel(),java.awt.BorderLayout.CENTER);
        patientinfo_right_display_panel.setVisible(true);
    }

    private void showPatientSchedulingPanel() {
        scheduling_right_display_panel.removeAll();
        scheduling_right_display_panel.updateUI();
        scheduling_right_display_panel.setBackground(Color.WHITE);
        scheduling_right_display_panel.add(new PatientSchedulingPanel(),java.awt.BorderLayout.CENTER);
        scheduling_right_display_panel.setVisible(true);
    }
    
    private void showoutpatient(){
        outpatient_right_display_panel.removeAll();
        outpatient_right_display_panel.updateUI();
        outpatient_right_display_panel.setBackground(Color.WHITE);
        outpatient_right_display_panel.add(new OutpatientPanel(),java.awt.BorderLayout.CENTER);
        outpatient_right_display_panel.setVisible(true);
    }
    
    private void showInpatientPanel() {
        scheduling_right_display_panel.removeAll();
        scheduling_right_display_panel.updateUI();
        scheduling_right_display_panel.setBackground(Color.WHITE);
        scheduling_right_display_panel.add(new InPatientHomePanel(),java.awt.BorderLayout.CENTER);
        scheduling_right_display_panel.setVisible(true);
    }

    private void populate() {
        departmentMasterController = (DepartmentMasterController)HealthcareLogin.context.getBean("departmentMasterController");
        deptWithRoleController=(DeptWithRoleController)HealthcareLogin.context.getBean("deptWithRoleController");
        userSetupController = (UserSetupController)HealthcareLogin.context.getBean("userSetupController");
    }

}

Commits for KNH_Project/HealthCareEMR/src/main/java/com/bestray/healthcareemr/Views/HealthCareEmrAdvanceHome.java

Diff revisions: vs.
Revision Author Commited Message
1 girijabapi picture girijabapi Fri 27 Jul, 2018 13:29:42 +0000