Subversion Repository Public Repository

Aurocare_27_07_2018

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
/*
 * 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.util.CurvedGradientPanel;
import com.bestray.healthcarecommonutil.vo.TPermission;
import com.bestray.healthcarecommonutil.util.PreferenceUtil;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
import java.util.prefs.Preferences;

// TODO: Auto-generated Javadoc
/**
 * The Class PatientRegDisplayPanel.
 *
 * @author user3
 */
public class PatientRegDisplayPanel extends CurvedGradientPanel {

    /**
     * Creates new form PatientRegDisplayPanel.
     */
    List<TPermission> permissions = new ArrayList<TPermission>();
    private Preferences myPrefObj = Preferences.userRoot();
    public PatientRegDisplayPanel() {
        try{
            permissions=(List<TPermission>)PreferenceUtil.getObject(myPrefObj, "permissions");
        }catch(Exception e){
            throw new HealthCareException("Not Getting All Permissions For the loggedin User");
        }
        initComponents();
        if(permissions.contains("REPORTS")){
            reports_label.setVisible(true);
        }else{
            reports_label.setVisible(false);
        }
    }

    /**
     * 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() {

        jLabel1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        patientreg_label = new javax.swing.JLabel();
        search_label = new javax.swing.JLabel();
        reports_label = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        quickreg_label = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        duplicateReplace_label = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/patient-registration.png"))); // NOI18N

        jPanel2.setOpaque(false);

        patientreg_label.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        patientreg_label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user-add-icon.png"))); // NOI18N
        patientreg_label.setText("Full Registration");
        patientreg_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        patientreg_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                patientreg_labelMouseClicked(evt);
            }
        });

        search_label.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        search_label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user-search-icon.png"))); // NOI18N
        search_label.setText("Search Patient");
        search_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        search_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                search_labelMouseClicked(evt);
            }
        });

        reports_label.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        reports_label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/application-vndstardivisioncalc-icone-8698-64.png"))); // NOI18N
        reports_label.setText("Reports");
        reports_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        reports_label.setName("REPORTS"); // NOI18N
        reports_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reports_labelMouseClicked(evt);
            }
        });

        jPanel1.setOpaque(false);
        jPanel1.setLayout(null);

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/fast32X32.png"))); // NOI18N
        jPanel1.add(jLabel3);
        jLabel3.setBounds(40, 40, 32, 40);

        quickreg_label.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        quickreg_label.setText("                  Quick Patient Registration");
        quickreg_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        quickreg_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                quickreg_labelMouseClicked(evt);
            }
        });
        jPanel1.add(quickreg_label);
        quickreg_label.setBounds(-1, 0, 260, 80);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user-add-icon.png"))); // NOI18N
        jPanel1.add(jLabel2);
        jLabel2.setBounds(0, 0, 64, 64);

        duplicateReplace_label.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        duplicateReplace_label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/duplicate 64X64.png"))); // NOI18N
        duplicateReplace_label.setText("Duplicate Patient Reconciliation");
        duplicateReplace_label.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        duplicateReplace_label.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                duplicateReplace_labelMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(patientreg_label)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(reports_label)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(search_label)
                        .addGap(18, 18, 18)
                        .addComponent(duplicateReplace_label, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap(179, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(patientreg_label)
                    .addComponent(search_label)
                    .addComponent(duplicateReplace_label))
                .addGap(27, 27, 27)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                    .addComponent(reports_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(179, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    /**
     * Patientreg_label mouse clicked.
     *
     * @param evt the evt
     */
    private void patientreg_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_patientreg_labelMouseClicked
        HealthCareEmrAdvanceHome.button_panel.setVisible(true);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.removeAll();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.updateUI();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setBackground(Color.WHITE);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.add(new PatientRegistrationPanel(),java.awt.BorderLayout.CENTER);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setVisible(true);
    }//GEN-LAST:event_patientreg_labelMouseClicked

    /**
     * Quickreg_label mouse clicked.
     *
     * @param evt the evt
     */
    private void quickreg_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_quickreg_labelMouseClicked
        HealthCareEmrAdvanceHome.button_panel.setVisible(true);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.removeAll();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.updateUI();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setBackground(Color.WHITE);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.add(new QuickPatientRegistrationPanel(),java.awt.BorderLayout.CENTER);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setVisible(true);
    }//GEN-LAST:event_quickreg_labelMouseClicked

    /**
     * Search_label mouse clicked.
     *
     * @param evt the evt
     */
    private void search_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_search_labelMouseClicked
        HealthCareEmrAdvanceHome.button_panel.setVisible(true);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.removeAll();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.updateUI();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setBackground(Color.WHITE);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.add(new PatientLookuppanel("Registration"),java.awt.BorderLayout.CENTER);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setVisible(true);
    }//GEN-LAST:event_search_labelMouseClicked

    /**
     * Reports_label mouse clicked.
     *
     * @param evt the evt
     */
    private void reports_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reports_labelMouseClicked
        HealthCareEmrAdvanceHome.button_panel.setVisible(true);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.removeAll();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.updateUI();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setBackground(Color.WHITE);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.add(new ReportPanel(),java.awt.BorderLayout.CENTER);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setVisible(true);
    }//GEN-LAST:event_reports_labelMouseClicked

    private void duplicateReplace_labelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_duplicateReplace_labelMouseClicked
        HealthCareEmrAdvanceHome.button_panel.setVisible(true);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.removeAll();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.updateUI();
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setBackground(Color.WHITE);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.add(new DuplicatePatientPanel(),java.awt.BorderLayout.CENTER);
        HealthCareEmrAdvanceHome.patientinfo_right_display_panel.setVisible(true);
    }//GEN-LAST:event_duplicateReplace_labelMouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel duplicateReplace_label;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JLabel patientreg_label;
    private javax.swing.JLabel quickreg_label;
    private javax.swing.JLabel reports_label;
    private javax.swing.JLabel search_label;
    // End of variables declaration//GEN-END:variables
   /** The Main app. */
    private javax.swing.JFrame MainAPP; 
}

Commits for Aurocare_27_07_2018/AuroCareEMR/src/main/java/com/bestray/healthcareemr/Views/PatientRegDisplayPanel.java

Diff revisions: vs.
Revision Author Commited Message
1 girijabapi picture girijabapi Fri 27 Jul, 2018 07:21:55 +0000