Subversion Repository Public Repository

Satyam

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
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bestray.healthcareinpatient.view;

import com.bestray.healthcarecommonutil.exception.HealthCareException;
import com.bestray.healthcarecommonutil.exception.ProcessingException;
import com.bestray.healthcarecommonutil.util.DisabledGlassPane;
import com.bestray.healthcarecommonutil.util.SimpleGradientPanel;
import com.bestray.healthcarecommonutil.util.TextPrompt;
import com.bestray.healthcarecommonutil.vo.TAppointment;
import com.bestray.healthcarecommonutil.vo.TInpatentAdmission;
import com.bestray.healthcareinpatient.controller.AvailableInpatientController;
import com.bestray.healthcareinpatient.controller.InPatientAdmissionController;
import com.bestray.healthcareinpatient.reports.InpatientAdmsnReport;
import com.bestray.healthcareinpatient.util.MessageProperties;
import com.toedter.calendar.JDateChooser;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRootPane;
import javax.swing.ListSelectionModel;
import javax.swing.RowFilter;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;

/**
 *
 * @author User1
 */
public class AvailableInpatientPanel extends SimpleGradientPanel {

    /**
     * Creates new form AvailableInpatientPanel
     */
    public AvailableInpatientPanel() {
        populateData();
        initComponents();
        displayAdmittedPatientList();
    }

    /**
     * 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();
        inPatientSearch_textbox = new javax.swing.JTextField();
        main_toolbar = new javax.swing.JToolBar();
        admitedInpatient_toggelButton = new javax.swing.JToggleButton();
        sheduledInpatient_toggelButton = new javax.swing.JToggleButton();
        disChargedInpatient_toggelButton = new javax.swing.JToggleButton();
        sub_toolbar = new javax.swing.JToolBar();
        updateAdmissionInfo_button = new javax.swing.JButton();
        updateTreatment_button = new javax.swing.JButton();
        patientTransfer_button = new javax.swing.JButton();
        patientInformation_button = new javax.swing.JButton();
        printBedHeadTicket_bt = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        admittedPatientData_table = new javax.swing.JTable(){
            public boolean isCellEditable(int row, int column){
                return false;
            }
            public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex) {
                Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
                if (rowIndex % 2 == 0 && !isCellSelected(rowIndex, vColIndex)) {
                    c.setForeground(Color.BLACK);
                    c.setBackground(new Color(200, 225, 250));
                }
                else if(rowIndex % 2 == 0 && isCellSelected(rowIndex, vColIndex)){
                    c.setForeground(Color.WHITE);
                    c.setBackground(Color.BLUE);
                }
                else if(rowIndex % 2 != 0 && isCellSelected(rowIndex, vColIndex)){
                    c.setForeground(Color.WHITE);
                    c.setBackground(Color.BLUE);
                }
                else {
                    c.setForeground(Color.BLACK);
                    c.setBackground(getBackground());
                }
                return c;
            }
        };
        jLabel1 = new javax.swing.JLabel();
        dischargeFrom_date = new com.toedter.calendar.JDateChooser();
        jLabel2 = new javax.swing.JLabel();
        dischareTo_date = new com.toedter.calendar.JDateChooser();
        submit_button = new javax.swing.JButton();
        dischargeAgain_button = new javax.swing.JButton();

        setOpaque(false);

        inPatientSearch_textbox.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        org.jdesktop.swingx.border.IconBorder iconBorder1 = new org.jdesktop.swingx.border.IconBorder();
        iconBorder1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/search-icon16X16.png"))); // NOI18N
        iconBorder1.setPadding(5);
        inPatientSearch_textbox.setBorder(iconBorder1);
        TextPrompt tp7 = new TextPrompt("   Search For In-Patient", inPatientSearch_textbox);
        tp7.setForeground( Color.RED );
        tp7.changeAlpha(0.5f);
        tp7.changeStyle(Font.BOLD);
        inPatientSearch_textbox.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                inPatientSearch_textboxKeyTyped(evt);
            }
        });

        main_toolbar.setBackground(new java.awt.Color(204, 204, 255));
        main_toolbar.setFloatable(false);
        main_toolbar.setRollover(true);

        buttonGroup1.add(admitedInpatient_toggelButton);
        admitedInpatient_toggelButton.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        admitedInpatient_toggelButton.setText("Admitted");
        admitedInpatient_toggelButton.setFocusable(false);
        admitedInpatient_toggelButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        admitedInpatient_toggelButton.setMargin(new java.awt.Insets(2, 20, 2, 20));
        admitedInpatient_toggelButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        admitedInpatient_toggelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                admitedInpatient_toggelButtonActionPerformed(evt);
            }
        });
        main_toolbar.add(admitedInpatient_toggelButton);

        buttonGroup1.add(sheduledInpatient_toggelButton);
        sheduledInpatient_toggelButton.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        sheduledInpatient_toggelButton.setText("Scheduled");
        sheduledInpatient_toggelButton.setFocusable(false);
        sheduledInpatient_toggelButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        sheduledInpatient_toggelButton.setMargin(new java.awt.Insets(2, 20, 2, 20));
        sheduledInpatient_toggelButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        sheduledInpatient_toggelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sheduledInpatient_toggelButtonActionPerformed(evt);
            }
        });
        main_toolbar.add(sheduledInpatient_toggelButton);
        sheduledInpatient_toggelButton.setVisible(false);

        buttonGroup1.add(disChargedInpatient_toggelButton);
        disChargedInpatient_toggelButton.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        disChargedInpatient_toggelButton.setText("Discharged");
        disChargedInpatient_toggelButton.setFocusable(false);
        disChargedInpatient_toggelButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        disChargedInpatient_toggelButton.setMargin(new java.awt.Insets(2, 20, 2, 20));
        disChargedInpatient_toggelButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        disChargedInpatient_toggelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                disChargedInpatient_toggelButtonActionPerformed(evt);
            }
        });
        main_toolbar.add(disChargedInpatient_toggelButton);

        sub_toolbar.setBackground(new java.awt.Color(204, 255, 204));
        sub_toolbar.setFloatable(false);
        sub_toolbar.setRollover(true);

        updateAdmissionInfo_button.setFont(new java.awt.Font("SansSerif", 1, 11)); // NOI18N
        updateAdmissionInfo_button.setForeground(new java.awt.Color(255, 0, 0));
        updateAdmissionInfo_button.setText("Update Admission Info");
        updateAdmissionInfo_button.setFocusable(false);
        updateAdmissionInfo_button.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        updateAdmissionInfo_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        updateAdmissionInfo_button.setOpaque(false);
        updateAdmissionInfo_button.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        updateAdmissionInfo_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                updateAdmissionInfo_buttonActionPerformed(evt);
            }
        });
        sub_toolbar.add(updateAdmissionInfo_button);
        updateAdmissionInfo_button.setVisible(false);

        updateTreatment_button.setFont(new java.awt.Font("SansSerif", 1, 11)); // NOI18N
        updateTreatment_button.setForeground(new java.awt.Color(255, 0, 0));
        updateTreatment_button.setText("Update Treatment");
        updateTreatment_button.setFocusable(false);
        updateTreatment_button.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        updateTreatment_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        updateTreatment_button.setOpaque(false);
        updateTreatment_button.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        updateTreatment_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                updateTreatment_buttonActionPerformed(evt);
            }
        });
        sub_toolbar.add(updateTreatment_button);
        updateTreatment_button.setVisible(false);

        patientTransfer_button.setFont(new java.awt.Font("SansSerif", 1, 11)); // NOI18N
        patientTransfer_button.setForeground(new java.awt.Color(255, 0, 0));
        patientTransfer_button.setText("Patient Transfer");
        patientTransfer_button.setFocusable(false);
        patientTransfer_button.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        patientTransfer_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        patientTransfer_button.setOpaque(false);
        patientTransfer_button.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        patientTransfer_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                patientTransfer_buttonActionPerformed(evt);
            }
        });
        sub_toolbar.add(patientTransfer_button);

        patientInformation_button.setFont(new java.awt.Font("SansSerif", 1, 11)); // NOI18N
        patientInformation_button.setForeground(new java.awt.Color(255, 0, 0));
        patientInformation_button.setText("Patient Information");
        patientInformation_button.setFocusable(false);
        patientInformation_button.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        patientInformation_button.setMargin(new java.awt.Insets(2, 20, 2, 20));
        patientInformation_button.setOpaque(false);
        patientInformation_button.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        patientInformation_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                patientInformation_buttonActionPerformed(evt);
            }
        });
        sub_toolbar.add(patientInformation_button);

        printBedHeadTicket_bt.setFont(new java.awt.Font("SansSerif", 1, 11)); // NOI18N
        printBedHeadTicket_bt.setForeground(new java.awt.Color(255, 0, 0));
        printBedHeadTicket_bt.setText("Print Bed Head Ticket");
        printBedHeadTicket_bt.setFocusable(false);
        printBedHeadTicket_bt.setMargin(new java.awt.Insets(2, 20, 2, 20));
        printBedHeadTicket_bt.setOpaque(false);
        printBedHeadTicket_bt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                printBedHeadTicket_btActionPerformed(evt);
            }
        });
        sub_toolbar.add(printBedHeadTicket_bt);

        jPanel1.setOpaque(false);

        jScrollPane1.setOpaque(false);

        admittedPatientData_table.getTableHeader().setFont(new Font("SansSerif", Font.BOLD, 10));
        admittedPatientData_table.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
        admittedPatientData_table.setModel(new javax.swing.table.DefaultTableModel(admittedPatientData,admittedheader));
        admittedPatientData_table.setRowHeight(25);
        admittedPatientData_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        admittedPatientData_table.setShowHorizontalLines(false);
        admittedPatientData_table.setShowVerticalLines(false);
        admittedPatientData_table.getTableHeader().setReorderingAllowed(false);
        admittedPatientData_table.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                admittedPatientData_tableMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(admittedPatientData_table);

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

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

        submit_button.setFont(new java.awt.Font("SansSerif", 1, 12)); // NOI18N
        submit_button.setText("SUBMIT");
        submit_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                submit_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(dischargeFrom_date, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)
                            .addComponent(dischareTo_date, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(submit_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1048, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 406, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dischargeFrom_date, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(dischareTo_date, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(submit_button)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        dischargeAgain_button.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        dischargeAgain_button.setForeground(new java.awt.Color(204, 0, 0));
        dischargeAgain_button.setText("Discharge Report");
        dischargeAgain_button.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        dischargeAgain_button.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        dischargeAgain_button.setVisible(false);
        dischargeAgain_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dischargeAgain_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(main_toolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(sub_toolbar, javax.swing.GroupLayout.DEFAULT_SIZE, 1262, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(214, 214, 214)
                        .addComponent(dischargeAgain_button)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(inPatientSearch_textbox, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(main_toolbar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(sub_toolbar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inPatientSearch_textbox, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dischargeAgain_button))
                .addContainerGap(23, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void admitedInpatient_toggelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_admitedInpatient_toggelButtonActionPerformed
        sub_toolbar.setVisible(true);
//      jCalendar1.setVisible(false);
        jLabel1.setVisible(false);
        jLabel2.setVisible(false);
        dischargeFrom_date.setVisible(false);
        dischareTo_date.setVisible(false);
        submit_button.setVisible(false);
        dischargeAgain_button.setVisible(false);
        inPatientSearch_textbox.setVisible(true);
        displayAdmittedPatientList();
    }//GEN-LAST:event_admitedInpatient_toggelButtonActionPerformed

    private void sheduledInpatient_toggelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sheduledInpatient_toggelButtonActionPerformed
        sub_toolbar.setVisible(false);
      //  jCalendar1.setVisible(true);
        //displayInPatientScheduleList();
    }//GEN-LAST:event_sheduledInpatient_toggelButtonActionPerformed
    
    private void admittedPatientData_tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_admittedPatientData_tableMouseClicked
      /*row = admittedPatientData_table.getSelectedRow();
      if(sheduledInpatient_toggelButton.isSelected()){  
        if(evt.getClickCount()==2){
            JRootPane rootPane = SwingUtilities.getRootPane(this);
            rootPane.setGlassPane(glassPane);
            glassPane.activateLoadingImage();
            SwingWorker s = new SwingWorker() {

                @Override
                protected Object doInBackground() throws Exception {
                    inPatAdmission = availableInpatientController.getInPatientAdmissionDetailByID(Long.parseLong(String.valueOf(admittedPatientData_table.getValueAt(row, 0))));
                    inPatientPanel = new InPatient_Admission_panel(inPatAdmission.getPatientId());
                    return inPatientPanel;
                }

                @Override
                protected void done() {
                    super.done();
                    glassPane.deactivate();
                    InPatientHomePanel.home_display_panel.removeAll();
                    InPatientHomePanel.home_display_panel.updateUI();
                    InPatientHomePanel.home_display_panel.setBackground(Color.WHITE);
                    InPatientHomePanel.home_display_panel.add(inPatientPanel,java.awt.BorderLayout.CENTER);
                    InPatientHomePanel.home_display_panel.setVisible(true);
                }
                
            };
            
            s.execute();
        }
      }
        row = admittedPatientData_table.getSelectedRow();
        if(sheduledInpatient_toggelButton.isSelected()){  
        if(evt.getClickCount()==2){
            try{
                TAppointment appointment = availableInpatientController.getInPatientAppointmentByID(Long.parseLong(String.valueOf(admittedPatientData_table.getValueAt(row, 0))));
                if(inPatientAdmissionController.checkAvailablePatient(appointment.getPatientNameId())){
                    JOptionPane.showMessageDialog(null, "patient is already admitted in hospital.");
                }else{
                    InPatientHomePanel.home_display_panel.removeAll();
                    InPatientHomePanel.home_display_panel.updateUI();
                    InPatientHomePanel.home_display_panel.setBackground(Color.WHITE);
                    InPatientHomePanel.home_display_panel.add(new InPatient_Admission_panel(appointment.getPatientNameId()),java.awt.BorderLayout.CENTER);
                    InPatientHomePanel.home_display_panel.setVisible(true);
                    }
                } catch(Exception ex) {
                    Logger.getLogger(AvailableInpatientPanel.class.getName()).log(Level.SEVERE, null, ex);
                }
        }
       }*/
    }//GEN-LAST:event_admittedPatientData_tableMouseClicked

    private void updateTreatment_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateTreatment_buttonActionPerformed
        /*row = admittedPatientData_table.getSelectedRow();
        JRootPane rootPane = SwingUtilities.getRootPane(this);
            rootPane.setGlassPane(glassPane);
            glassPane.activateLoadingImage();
            SwingWorker s = new SwingWorker() {

                @Override
                protected Object doInBackground() throws Exception {
                    inPatAdmission = availableInpatientController.getInPatientAdmissionDetailByID(Long.parseLong(String.valueOf(admittedPatientData_table.getValueAt(row, 0))));
                    inPatientPanel = new InPatient_Rounding_panel(inPatAdmission);
                    return inPatientPanel;
                }

                @Override
                protected void done() {
                    super.done();
                    glassPane.deactivate();
                    InPatientHomePanel.home_display_panel.removeAll();
                    InPatientHomePanel.home_display_panel.updateUI();
                    InPatientHomePanel.home_display_panel.setBackground(Color.WHITE);
                    InPatientHomePanel.home_display_panel.add(inPatientPanel,java.awt.BorderLayout.CENTER);
                    InPatientHomePanel.home_display_panel.setVisible(true);
                }
                
            };
            
            s.execute();*/
    }//GEN-LAST:event_updateTreatment_buttonActionPerformed

    private void patientInformation_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_patientInformation_buttonActionPerformed
     try {
           row = admittedPatientData_table.getSelectedRow();
        if(row!=-1){
                inPatAdmission = availableInpatientController.getInPatientAdmissionDetailByID(Long.parseLong(String.valueOf(admittedPatientData_table.getValueAt(row, 0))));
                DisabledGlassPane glassPane = new DisabledGlassPane();
                JRootPane rootPane = SwingUtilities.getRootPane(this);
                rootPane.setGlassPane(glassPane);
                PatienInformationDialog patInfoDialoge = new PatienInformationDialog(MainApp, true, inPatAdmission.getPatientId(), inPatAdmission);                
                //PatienInformationDialog patInfoDialoge = new PatienInformationDialog(MainApp, true, inPatAdmission.getPatientId(), inPatAdmission.getIpdNo(),  inPatAdmission.getPatientDisease(),  inPatAdmission.getPatientNote());                
                patInfoDialoge.setResizable(false);
                patInfoDialoge.setLocationRelativeTo(null);
                glassPane.activate("");
                patInfoDialoge.setVisible(true);
                patInfoDialoge.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
                glassPane.deactivate();
                admitedInpatient_toggelButtonActionPerformed(null);
              }else{
                JOptionPane.showMessageDialog(null, "Select a record for the table");
            }
       } catch(Exception ex) {
           ex.printStackTrace();
            Logger.getLogger(AvailableInpatientPanel.class.getName()).log(Level.SEVERE, null, ex);
       }
    }//GEN-LAST:event_patientInformation_buttonActionPerformed

    private void patientTransfer_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_patientTransfer_buttonActionPerformed
        row = admittedPatientData_table.getSelectedRow();
        if(row!=-1){
        JRootPane rootPane = SwingUtilities.getRootPane(this);
            rootPane.setGlassPane(glassPane);
            glassPane.activateLoadingImage();
            SwingWorker s = new SwingWorker() {

                @Override
                protected Object doInBackground() throws Exception {                    
                    inPatAdmission = availableInpatientController.getInPatientAdmissionDetailByID(Long.parseLong(String.valueOf(admittedPatientData_table.getValueAt(row, 0))));
                    System.out.println("@@@@@@@@@@  getInpatientId  "+inPatAdmission.getInpatientId());
                    inPatientPanel = new InPatient_Transfer_Panel(inPatAdmission);
                    return inPatientPanel;
                }

                @Override
                protected void done() {
                    super.done();
                    glassPane.deactivate();
                    InPatientHomePanel.home_display_panel.removeAll();
                    InPatientHomePanel.home_display_panel.updateUI();
                    InPatientHomePanel.home_display_panel.setBackground(Color.WHITE);
                    InPatientHomePanel.home_display_panel.add(inPatientPanel,java.awt.BorderLayout.CENTER);
                    InPatientHomePanel.home_display_panel.setVisible(true);
                }
                
            };
            
            s.execute();
        }else{
            JOptionPane.showMessageDialog(null, "Select a record for the table");
        }
    }//GEN-LAST:event_patientTransfer_buttonActionPerformed

    private void inPatientSearch_textboxKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_inPatientSearch_textboxKeyTyped
        String expr = inPatientSearch_textbox.getText().toUpperCase();
            if(admitedInpatient_toggelButton.isSelected()){
                displayAdmittedPatientList();
                sorter = new TableRowSorter<TableModel>();
                sorter = new TableRowSorter<TableModel>(admittedPatientData_table.getModel());
                admittedPatientData_table.setRowSorter(sorter);
                sorter.setRowFilter(RowFilter.regexFilter(expr));
                sorter.setSortKeys(null);
            }else if(sheduledInpatient_toggelButton.isSelected()){
                //displayInPatientScheduleList();
                sorter = new TableRowSorter<TableModel>();
                sorter = new TableRowSorter<TableModel>(admittedPatientData_table.getModel());
                admittedPatientData_table.setRowSorter(sorter);
                sorter.setRowFilter(RowFilter.regexFilter(expr));
                sorter.setSortKeys(null);
            }
    }//GEN-LAST:event_inPatientSearch_textboxKeyTyped

    private void updateAdmissionInfo_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateAdmissionInfo_buttonActionPerformed
        InPatientHomePanel.home_display_panel.removeAll();
        InPatientHomePanel.home_display_panel.updateUI();
        InPatientHomePanel.home_display_panel.setBackground(Color.WHITE);
        InPatientHomePanel.home_display_panel.add(new InPatient_Admission_panel(),java.awt.BorderLayout.CENTER);
        InPatientHomePanel.home_display_panel.setVisible(true);
    }//GEN-LAST:event_updateAdmissionInfo_buttonActionPerformed

    private void printBedHeadTicket_btActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printBedHeadTicket_btActionPerformed
        try {
           row = admittedPatientData_table.getSelectedRow();
        if(row!=-1){
           inPatAdmission = availableInpatientController.getInPatientAdmissionDetailByID(Long.parseLong(String.valueOf(admittedPatientData_table.getValueAt(row, 0))));
           InpatientAdmsnReport admissionReport = new InpatientAdmsnReport();
           System.out.println("inPatAdmission.getId()**********"+inPatAdmission.getId());
           System.out.println("inPatAdmission.getInpatientId()**********"+inPatAdmission.getInpatientId());
           admissionReport.getPdfReport(inPatAdmission.getId(),inPatAdmission.getInpatientId());
           admissionReport.openPdfReport();
        }else{
                JOptionPane.showMessageDialog(null, "Select a record for the table");
            }
        }catch(Exception ex) {
            Logger.getLogger(AvailableInpatientPanel.class.getName()).log(Level.SEVERE, null, ex);
            ex.printStackTrace();
       }
    }//GEN-LAST:event_printBedHeadTicket_btActionPerformed

    private void disChargedInpatient_toggelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_disChargedInpatient_toggelButtonActionPerformed
      //  jCalendar1.setVisible(false);
//        sub_toolbar.setVisible(false);
//        inPatientSearch_textbox.setVisible(false);
        jLabel1.setVisible(true);
        jLabel2.setVisible(true);
        dischargeFrom_date.setVisible(true);
        dischareTo_date.setVisible(true);
        submit_button.setVisible(true);
        dischargeAgain_button.setVisible(false);
        if(dischargeFrom_date.getDate()!=null){
         displayInPatientDisChargeList();
        }else{
         displayInPatientDisChargeList();
         JOptionPane.showMessageDialog(null,"Select Date to Show Patients","Date",JOptionPane.INFORMATION_MESSAGE);
        }
       
    }//GEN-LAST:event_disChargedInpatient_toggelButtonActionPerformed

    private void submit_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_submit_buttonActionPerformed
        sub_toolbar.setVisible(false);
        inPatientSearch_textbox.setVisible(false);
        displayInPatientDisChargeList();
    }//GEN-LAST:event_submit_buttonActionPerformed

    private void dischargeAgain_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dischargeAgain_buttonActionPerformed
       //showDischargeReportAgain();
    }//GEN-LAST:event_dischargeAgain_buttonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public static javax.swing.JToggleButton admitedInpatient_toggelButton;
    public static javax.swing.JTable admittedPatientData_table;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JToggleButton disChargedInpatient_toggelButton;
    private com.toedter.calendar.JDateChooser dischareTo_date;
    private javax.swing.JButton dischargeAgain_button;
    private com.toedter.calendar.JDateChooser dischargeFrom_date;
    private javax.swing.JTextField inPatientSearch_textbox;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar main_toolbar;
    private javax.swing.JButton patientInformation_button;
    private javax.swing.JButton patientTransfer_button;
    private javax.swing.JButton printBedHeadTicket_bt;
    private javax.swing.JToggleButton sheduledInpatient_toggelButton;
    private javax.swing.JToolBar sub_toolbar;
    private javax.swing.JButton submit_button;
    private javax.swing.JButton updateAdmissionInfo_button;
    private javax.swing.JButton updateTreatment_button;
    // End of variables declaration//GEN-END:variables
    private AvailableInpatientController availableInpatientController;
    
    /** The Admitted Patent data. */
    private Vector<Vector<String>> admittedPatientData = new Vector<Vector<String>>();
    
    /** The scheduled Patent data. 
    private Vector<Vector<String>> scheduledPatientData = new Vector<Vector<String>>();*/
    
    /** The scheduled Patent data. */
    private Vector<Vector<String>> dischargePatientData = new Vector<Vector<String>>();
    
    /** The scheduleHeader. */
    private Vector<String> admittedheader;
    
    /** The scheduleHeader. 
    private Vector<String> scheduleHeader;*/
    
    /** The dischargeHeader. */
    private Vector<String> dischargeHeader;
    
    private TInpatentAdmission inPatAdmission;
    
    private DisabledGlassPane glassPane = new DisabledGlassPane();
    
    private int row;
    
    private JPanel inPatientPanel;
    
    private JFrame MainApp;
    
    /** The sorter. */
    TableRowSorter<TableModel> sorter;
    
    private void populateData(){
       inPatAdmission = new TInpatentAdmission();
       availableInpatientController = (AvailableInpatientController)HealthCareInpatientHome.context.getBean("availableInpatientController"); 
       intializeAmittedTableHeader();
       initializeDischargedTableHeader();
    }
    
    private void displayAdmittedPatientList(){
        admittedPatientData = new Vector<Vector<String>>();
        try{
            admittedPatientData = availableInpatientController.getAdmittedInPatientList();
            if(admittedPatientData!=null){
            admittedPatientData_table.setModel(new javax.swing.table.DefaultTableModel(admittedPatientData,admittedheader));
            admittedPatientData_table.getColumnModel().getColumn(0).setPreferredWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(0).setMinWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(0).setMinWidth(60);
            admittedPatientData_table.getColumnModel().getColumn(0).setMaxWidth(0);
        
            admittedPatientData_table.getColumnModel().getColumn(1).setPreferredWidth(60);
            admittedPatientData_table.getColumnModel().getColumn(1).setMaxWidth(90);

            admittedPatientData_table.getColumnModel().getColumn(2).setPreferredWidth(100);
            admittedPatientData_table.getColumnModel().getColumn(2).setMaxWidth(100);
            
            admittedPatientData_table.getColumnModel().getColumn(3).setPreferredWidth(220);
            admittedPatientData_table.getColumnModel().getColumn(3).setMaxWidth(220);
            sorter = new TableRowSorter<TableModel>();
            sorter = new TableRowSorter<TableModel>(admittedPatientData_table.getModel());
            admittedPatientData_table.setRowSorter(sorter);
            }else{
                    JOptionPane.showMessageDialog(null, MessageProperties.getMessage("notfound"));
                }
           }catch(ProcessingException e){
             JOptionPane.showMessageDialog(null,MessageProperties.getMessage("error.fetch",new Object[]{"Admitted Patient"}));
             throw new HealthCareException(MessageProperties.getMessage("error.dao"));
         }catch(Exception e){
             JOptionPane.showMessageDialog(null,MessageProperties.getMessage("error.fetch",new Object[]{"Admitted Patient"}));
         }
    }    

    /*private void displayInPatientScheduleList() {
        scheduledPatientData = new Vector<Vector<String>>(); 
        try{
            scheduledPatientData = availableInpatientController.getIPAppointmentListByDate(jCalendar1.getDate());
            if(scheduledPatientData!=null){
            admittedPatientData_table.setModel(new javax.swing.table.DefaultTableModel(scheduledPatientData,scheduleHeader));
            admittedPatientData_table.getColumnModel().getColumn(0).setPreferredWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(0).setMinWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(0).setMaxWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(1).setPreferredWidth(50);
            admittedPatientData_table.getColumnModel().getColumn(1).setMaxWidth(50);
            admittedPatientData_table.getColumnModel().getColumn(2).setPreferredWidth(80);
            admittedPatientData_table.getColumnModel().getColumn(2).setMaxWidth(80);
            admittedPatientData_table.getColumnModel().getColumn(3).setPreferredWidth(60);
            admittedPatientData_table.getColumnModel().getColumn(3).setMaxWidth(60);
            admittedPatientData_table.getColumnModel().getColumn(4).setPreferredWidth(130);
            admittedPatientData_table.getColumnModel().getColumn(4).setMaxWidth(130);
            admittedPatientData_table.getColumnModel().getColumn(5).setPreferredWidth(90);
            admittedPatientData_table.getColumnModel().getColumn(5).setMaxWidth(90);
            admittedPatientData_table.getColumnModel().getColumn(6).setPreferredWidth(100);
            admittedPatientData_table.getColumnModel().getColumn(6).setMaxWidth(100);
            admittedPatientData_table.getColumnModel().getColumn(7).setPreferredWidth(110);
            admittedPatientData_table.getColumnModel().getColumn(7).setMaxWidth(100);
            admittedPatientData_table.getColumnModel().getColumn(8).setPreferredWidth(90);
            admittedPatientData_table.getColumnModel().getColumn(8).setMaxWidth(90);
            sorter = new TableRowSorter<TableModel>();
            sorter = new TableRowSorter<TableModel>(admittedPatientData_table.getModel());
            admittedPatientData_table.setRowSorter(sorter);
            }else{
                    JOptionPane.showMessageDialog(null, MessageProperties.getMessage("notfound"));
                }
         }catch(ProcessingException e){
             JOptionPane.showMessageDialog(null,MessageProperties.getMessage("error.fetch",new Object[]{"appointment"}));
             throw new HealthCareException(MessageProperties.getMessage("error.dao"));
         }catch(Exception e){
             JOptionPane.showMessageDialog(null,MessageProperties.getMessage("error.fetch",new Object[]{"appointment"}));
         }
    }*/

    private void displayInPatientDisChargeList() {
        dischargePatientData = new Vector<Vector<String>>(); 
        try{
            dischargePatientData = availableInpatientController.getDischargeIPListByDate(dischargeFrom_date.getDate(),dischareTo_date.getDate());
            if(dischargePatientData!=null){
            admittedPatientData_table.setModel(new javax.swing.table.DefaultTableModel(dischargePatientData,dischargeHeader));
            admittedPatientData_table.getColumnModel().getColumn(0).setPreferredWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(0).setMinWidth(0);
            admittedPatientData_table.getColumnModel().getColumn(0).setMaxWidth(0);
            sorter = new TableRowSorter<TableModel>();
            sorter = new TableRowSorter<TableModel>(admittedPatientData_table.getModel());
            admittedPatientData_table.setRowSorter(sorter);
            }else{
                    JOptionPane.showMessageDialog(null, MessageProperties.getMessage("notfound"));
                }
         }catch(Exception e){
             JOptionPane.showMessageDialog(null,MessageProperties.getMessage("error.fetch",new Object[]{"appointment"}));
         }
    }

    private void intializeAmittedTableHeader() {
       admittedheader = new Vector<String>();
       admittedheader.add("ID");
       admittedheader.add("InPatient ID");
       admittedheader.add("MRN #");
       admittedheader.add("PATIENT NAME");
       admittedheader.add("IPD NO");       
       admittedheader.add("DOB");
       admittedheader.add("Doctor");
       admittedheader.add("Department");
       admittedheader.add("Admission Date");
       admittedheader.add("Room Number");
       admittedheader.add("Bed Number");
    }

    /*private void initializeScheduledTableHeader() {
        scheduleHeader = new Vector<String>();
        scheduleHeader.add("ID");
        scheduleHeader.add("OPD#");
        scheduleHeader.add("Date");
        scheduleHeader.add("Time");
        scheduleHeader.add("Patient Name");
        scheduleHeader.add("Schedule Type");
        scheduleHeader.add("Doctor's Name");
        scheduleHeader.add("Visit Type");
        scheduleHeader.add("Patient Status");
        scheduleHeader.add("Checkin Time");
        scheduleHeader.add("Checkout Time");
        scheduleHeader.add("Visit Duration");
        scheduleHeader.add("Consultation Fee");
    }*/

    private void initializeDischargedTableHeader() {
       dischargeHeader = new Vector<String>();
       dischargeHeader.add("ID");
       dischargeHeader.add("InPatient ID");
       dischargeHeader.add("MRN #");
       dischargeHeader.add("PATIENT NAME");
       dischargeHeader.add("IPD NO");
       dischargeHeader.add("DOB");
       dischargeHeader.add("Doctor");
       dischargeHeader.add("Department");
       dischargeHeader.add("Admission Date");
       dischargeHeader.add("Discharge Date");
    }



//    private void showDischargeReportAgain() {
//      try{
//                if(discharge_dateChooser.getDate()!=null){
//                    inPatientAdmission.setReleaseDate(discharge_dateChooser.getDate());
//                    inPatientDischargeController.dischargeInPatient(inPatientAdmission);
//                    closePatientEncounter(encounter);
//                                      
//                    //JOptionPane.showMessageDialog(null, "Patient has been discharged.");
//                }else{
//                    JOptionPane.showMessageDialog(null, "Choose a patient discharge date.");
//                    discharge_dateChooser.requestFocus();
//                }
//                Long encounterId = encounter.getEncId();
//                String Name = inPatientAdmission.getPatientId().getPatientFName();
//                if(generalReportRadioButton1.isSelected()){
//                IPDischargeReport iPDichargeReport = new IPDischargeReport();
//                iPDichargeReport.getPdfReport(encounterId,Name);
//                iPDichargeReport.openPdfReport();
//                }
//                if(maternityReportRadioButton2.isSelected()){
//                    rootPane = SwingUtilities.getRootPane(this);
//                     glassPane = new DisabledGlassPane();
//                     try {
//               
//                SwingWorker s = new SwingWorker() {
//
//                    @Override
//                    protected Object doInBackground() throws Exception {
//                        rootPane.setGlassPane(glassPane);
//                        glassPane.activateLoadingImage();
//                          return null;
//                    }
//                     @Override
//                    protected void done() {
//                             super.done();                           
//                            glassPane.deactivate();
//                            glassPane.activate("");
//                  PatientTypeJDialog dialog = new PatientTypeJDialog(new javax.swing.JFrame(),true,inPatientAdmission,encounter);
//                 dialog.setResizable(false);
//                            dialog.setLocationRelativeTo(null);
//                            dialog.setVisible(true);
//                            dialog.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
//                            glassPane.deactivate();
//                  }
//
//                };
//                s.execute();
//            } catch (Exception ex) {
//                Logger.getLogger(ProcedurePanel.class.getName()).log(Level.SEVERE, null, ex);
//            }  
//                }
//                /*if(str.equalsIgnoreCase("Maternity")){
//                 *          IPMaternityDischargeReport  ipMaternityDischargeReport=new IPMaternityDischargeReport();
//                    ipMaternityDischargeReport.getPdfReport(encounterId, Name);
//                    ipMaternityDischargeReport.openPdfReport();;
//                }*/
//                
//            }catch(HibernateOptimisticLockingFailureException e){
//                JOptionPane.showMessageDialog(null, MessageProperties.getMessage("error.update",new Object[]{"InPatient Charge Entry"}));
//            }catch(ProcessingException e){
//                JOptionPane.showMessageDialog(null, MessageProperties.getMessage("error.save",new Object[]{"InPatient Charge Entry"}));
//                throw new HealthCareException(MessageProperties.getMessage("error.dao"));
//            }catch(Exception e){
//                JOptionPane.showMessageDialog(null, MessageProperties.getMessage("error.save",new Object[]{"InPatient Charge Entry"}));
//            }
//    }                                                     
    
    } 
    

Commits for Satyam/AuroCareHealthCareInPatient/src/main/java/com/bestray/healthcareinpatient/view/AvailableInpatientPanel.java

Diff revisions: vs.
Revision Author Commited Message
1 girijabapi picture girijabapi Fri 20 Jul, 2018 05:59:17 +0000