/*
 * LetterView.java
 *
 * Created on 2008/01/30, 21:42
 */
package open.dolphin.client;

/**
 *
 * @author  kazm
 */
public class LetterView extends PrintablePanel {

    private PrintKarte printTask;

    /** Creates new form LetterView */
    public LetterView() {
        initComponents();
    }

    /** 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.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel17 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        cHospital = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        cDept = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        cDoctor = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        patientName = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        patientGender = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        patientBirthday = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        patientAge = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        disease = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        purpose = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        clinicalCourse = new javax.swing.JTextArea();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        medication = new javax.swing.JTextArea();
        jLabel16 = new javax.swing.JLabel();
        remarks = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        pastFamily = new javax.swing.JTextArea();
        jLabel19 = new javax.swing.JLabel();
        confirmed = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        kanzyaIdField = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        cHospitalHistoryBtn = new javax.swing.JButton();
        cDeptHistoryBtn = new javax.swing.JButton();
        purposeHistoryBtn = new javax.swing.JButton();
        pastFamilyHistoryBtn = new javax.swing.JButton();
        cDoctorHistoryBtn = new javax.swing.JButton();
        clinicalCourseHistoryBtn = new javax.swing.JButton();
        medicationHistoryBtn = new javax.swing.JButton();
        remarkHistoryBtn = new javax.swing.JButton();
        diagnosisHistoryBtn = new javax.swing.JButton();
        jLabel23 = new javax.swing.JLabel();
        patientAddress = new javax.swing.JTextField();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(LetterView.class);
        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        setBackground(resourceMap.getColor("Form.background")); // NOI18N
        setName("Form"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        cHospital.setText(resourceMap.getString("cHospital.text")); // NOI18N
        cHospital.setName("cHospital"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        cDept.setText(resourceMap.getString("cDept.text")); // NOI18N
        cDept.setName("cDept"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        cDoctor.setFont(resourceMap.getFont("cDoctor.font")); // NOI18N
        cDoctor.setText(resourceMap.getString("cDoctor.text")); // NOI18N
        cDoctor.setName("cDoctor"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        patientName.setBackground(resourceMap.getColor("patientName.background")); // NOI18N
        patientName.setEditable(false);
        patientName.setText(resourceMap.getString("patientName.text")); // NOI18N
        patientName.setBorder(null);
        patientName.setName("patientName"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        patientGender.setBackground(resourceMap.getColor("patientGender.background")); // NOI18N
        patientGender.setEditable(false);
        patientGender.setFont(resourceMap.getFont("patientGender.font")); // NOI18N
        patientGender.setText(resourceMap.getString("patientGender.text")); // NOI18N
        patientGender.setBorder(null);
        patientGender.setName("patientGender"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        patientBirthday.setBackground(resourceMap.getColor("patientBirthday.background")); // NOI18N
        patientBirthday.setEditable(false);
        patientBirthday.setFont(resourceMap.getFont("patientBirthday.font")); // NOI18N
        patientBirthday.setText(resourceMap.getString("patientBirthday.text")); // NOI18N
        patientBirthday.setBorder(null);
        patientBirthday.setName("patientBirthday"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        patientAge.setBackground(resourceMap.getColor("patientAge.background")); // NOI18N
        patientAge.setEditable(false);
        patientAge.setText(resourceMap.getString("patientAge.text")); // NOI18N
        patientAge.setBorder(null);
        patientAge.setName("patientAge"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        disease.setText(resourceMap.getString("disease.text")); // NOI18N
        disease.setName("disease"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        purpose.setText(resourceMap.getString("purpose.text")); // NOI18N
        purpose.setName("purpose"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        clinicalCourse.setColumns(20);
        clinicalCourse.setFont(resourceMap.getFont("clinicalCourse.font")); // NOI18N
        clinicalCourse.setLineWrap(true);
        clinicalCourse.setRows(5);
        clinicalCourse.setMargin(new java.awt.Insets(5, 5, 5, 5));
        clinicalCourse.setName("clinicalCourse"); // NOI18N
        jScrollPane2.setViewportView(clinicalCourse);

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        medication.setColumns(20);
        medication.setFont(resourceMap.getFont("medication.font")); // NOI18N
        medication.setLineWrap(true);
        medication.setRows(5);
        medication.setMargin(new java.awt.Insets(5, 5, 5, 5));
        medication.setName("medication"); // NOI18N
        jScrollPane3.setViewportView(medication);

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        remarks.setFont(resourceMap.getFont("remarks.font")); // NOI18N
        remarks.setText(resourceMap.getString("remarks.text")); // NOI18N
        remarks.setName("remarks"); // NOI18N

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        pastFamily.setColumns(20);
        pastFamily.setFont(resourceMap.getFont("pastFamily.font")); // NOI18N
        pastFamily.setLineWrap(true);
        pastFamily.setRows(5);
        pastFamily.setMargin(new java.awt.Insets(5, 5, 5, 5));
        pastFamily.setName("pastFamily"); // NOI18N
        jScrollPane1.setViewportView(pastFamily);

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        confirmed.setBackground(resourceMap.getColor("confirmed.background")); // NOI18N
        confirmed.setEditable(false);
        confirmed.setFont(resourceMap.getFont("confirmed.font")); // NOI18N
        confirmed.setText(resourceMap.getString("confirmed.text")); // NOI18N
        confirmed.setBorder(null);
        confirmed.setName("confirmed"); // NOI18N

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N

        kanzyaIdField.setBackground(resourceMap.getColor("kanzyaIdField.background")); // NOI18N
        kanzyaIdField.setEditable(false);
        kanzyaIdField.setText(resourceMap.getString("kanzyaIdField.text")); // NOI18N
        kanzyaIdField.setBorder(null);
        kanzyaIdField.setName("kanzyaIdField"); // NOI18N

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        cHospitalHistoryBtn.setText(resourceMap.getString("cHospitalHistoryBtn.text")); // NOI18N
        cHospitalHistoryBtn.setName("cHospitalHistoryBtn"); // NOI18N
        cHospitalHistoryBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                diagnosisHistoryPopup(evt);
            }
        });

        cDeptHistoryBtn.setText(resourceMap.getString("cDeptHistoryBtn.text")); // NOI18N
        cDeptHistoryBtn.setName("cDeptHistoryBtn"); // NOI18N

        purposeHistoryBtn.setText(resourceMap.getString("purposeHistoryBtn.text")); // NOI18N
        purposeHistoryBtn.setName("purposeHistoryBtn"); // NOI18N

        pastFamilyHistoryBtn.setText(resourceMap.getString("pastFamilyHistoryBtn.text")); // NOI18N
        pastFamilyHistoryBtn.setName("pastFamilyHistoryBtn"); // NOI18N

        cDoctorHistoryBtn.setText(resourceMap.getString("cDoctorHistoryBtn.text")); // NOI18N
        cDoctorHistoryBtn.setName("cDoctorHistoryBtn"); // NOI18N

        clinicalCourseHistoryBtn.setText(resourceMap.getString("clinicalCourseHistoryBtn.text")); // NOI18N
        clinicalCourseHistoryBtn.setName("clinicalCourseHistoryBtn"); // NOI18N

        medicationHistoryBtn.setText(resourceMap.getString("medicationHistoryBtn.text")); // NOI18N
        medicationHistoryBtn.setName("medicationHistoryBtn"); // NOI18N

        remarkHistoryBtn.setText(resourceMap.getString("remarkHistoryBtn.text")); // NOI18N
        remarkHistoryBtn.setName("remarkHistoryBtn"); // NOI18N

        diagnosisHistoryBtn.setText(resourceMap.getString("diagnosisHistoryBtn.text")); // NOI18N
        diagnosisHistoryBtn.setName("diagnosisHistoryBtn"); // NOI18N

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        patientAddress.setBackground(resourceMap.getColor("patientAddress.background")); // NOI18N
        patientAddress.setEditable(false);
        patientAddress.setFont(resourceMap.getFont("patientAddress.font")); // NOI18N
        patientAddress.setBorder(null);
        patientAddress.setName("patientAddress"); // NOI18N

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jLabel23)
                    .add(jLabel19)
                    .add(jLabel3)
                    .add(jLabel2)
                    .add(jLabel4)
                    .add(jLabel5)
                    .add(jLabel7)
                    .add(jLabel16)
                    .add(jLabel15)
                    .add(jLabel11)
                    .add(jLabel10)
                    .add(jLabel9)
                    .add(jLabel14)
                    .add(jLabel13)
                    .add(jLabel12))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel1)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, cDoctor)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, cDept, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, patientName)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, patientBirthday))
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup()
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(layout.createSequentialGroup()
                                        .add(jLabel6)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(patientGender, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .add(18, 18, 18)
                                        .add(jLabel21)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(kanzyaIdField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(layout.createSequentialGroup()
                                        .add(jLabel8)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(patientAge, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 81, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(layout.createSequentialGroup()
                                        .add(jLabel20)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                        .add(cDoctorHistoryBtn))))
                            .add(layout.createSequentialGroup()
                                .add(22, 22, 22)
                                .add(cDeptHistoryBtn)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 208, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(layout.createSequentialGroup()
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(remarks, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)
                                    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)
                                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)
                                    .add(purpose, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)
                                    .add(disease, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)
                                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, patientAddress, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE))
                                .add(18, 18, 18))
                            .add(layout.createSequentialGroup()
                                .add(cHospital, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 360, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(25, 25, 25)))
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                                .add(cHospitalHistoryBtn)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 38, Short.MAX_VALUE)
                                .add(jLabel18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 156, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(124, 124, 124))
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, pastFamilyHistoryBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, purposeHistoryBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                    .add(diagnosisHistoryBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .add(318, 318, 318))
                            .add(layout.createSequentialGroup()
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, medicationHistoryBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, remarkHistoryBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .add(org.jdesktop.layout.GroupLayout.LEADING, clinicalCourseHistoryBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 194, Short.MAX_VALUE))))
                    .add(layout.createSequentialGroup()
                        .add(confirmed, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(221, 221, 221)
                        .add(jLabel22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(33, 33, 33)
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel19)
                    .add(confirmed, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel22))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(jLabel18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(cHospital, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(cHospitalHistoryBtn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel3)
                    .add(cDept, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(cDeptHistoryBtn))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel4)
                    .add(cDoctor)
                    .add(jLabel20)
                    .add(cDoctorHistoryBtn))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel5)
                    .add(patientName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel6)
                    .add(jLabel21)
                    .add(patientGender, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(kanzyaIdField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(patientBirthday, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel8)
                    .add(jLabel7)
                    .add(patientAge, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel23)
                    .add(patientAddress, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(41, 41, 41)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(disease, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel9)
                    .add(diagnosisHistoryBtn))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(purpose, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jLabel10))
                    .add(purposeHistoryBtn))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                            .add(layout.createSequentialGroup()
                                .add(jLabel11)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .add(layout.createSequentialGroup()
                                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(18, 18, 18)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 6, Short.MAX_VALUE)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                            .add(layout.createSequentialGroup()
                                .add(jLabel12)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .add(jLabel13)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jLabel14)
                                .add(91, 91, 91))
                            .add(layout.createSequentialGroup()
                                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 148, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED))))
                    .add(layout.createSequentialGroup()
                        .add(pastFamilyHistoryBtn)
                        .add(106, 106, 106)
                        .add(clinicalCourseHistoryBtn)))
                .add(10, 10, 10)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel15)
                    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(medicationHistoryBtn))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(remarks, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(remarkHistoryBtn)
                    .add(jLabel16))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

private void diagnosisHistoryPopup(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_diagnosisHistoryPopup
// TODO add your handling code here:
    //JPopupMenu p = PopupMenuFactory.create("stampTree.pop", evt.getSource());
    //p.show(evt.getComponent(),evt.getX(), evt.getY());
}//GEN-LAST:event_diagnosisHistoryPopup
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField cDept;
    public javax.swing.JButton cDeptHistoryBtn;
    private javax.swing.JTextField cDoctor;
    public javax.swing.JButton cDoctorHistoryBtn;
    public javax.swing.JTextField cHospital;
    public javax.swing.JButton cHospitalHistoryBtn;
    private javax.swing.JTextArea clinicalCourse;
    public javax.swing.JButton clinicalCourseHistoryBtn;
    private javax.swing.JTextField confirmed;
    public javax.swing.JButton diagnosisHistoryBtn;
    private javax.swing.JTextField disease;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTextField kanzyaIdField;
    private javax.swing.JTextArea medication;
    public javax.swing.JButton medicationHistoryBtn;
    private javax.swing.JTextArea pastFamily;
    public javax.swing.JButton pastFamilyHistoryBtn;
    private javax.swing.JTextField patientAddress;
    private javax.swing.JTextField patientAge;
    private javax.swing.JTextField patientBirthday;
    private javax.swing.JTextField patientGender;
    private javax.swing.JTextField patientName;
    private javax.swing.JTextField purpose;
    public javax.swing.JButton purposeHistoryBtn;
    public javax.swing.JButton remarkHistoryBtn;
    private javax.swing.JTextField remarks;
    // End of variables declaration//GEN-END:variables

    /**
     *
     * @param id
     */
    public void setKanzyaID(String id) {
        this.kanzyaIdField.setText(id);
    }

    public String getKanzyaID() {
        return this.kanzyaIdField.getText().trim();
    }

    /**
     *
     * @return
     */
    public javax.swing.JTextField getCDept() {
        return cDept;
    }

    public void setCDept(String s) {
        cDept.setText(s);
    }

    public javax.swing.JTextField getCDoctor() {
        return cDoctor;
    }

    public void setCDoctor(String s) {
        cDoctor.setText(s);
    }

    public javax.swing.JTextField getCHospital() {
        return cHospital;
    }

    public void setCHospital(String s) {
        cHospital.setText(s);
    }

    public javax.swing.JTextArea getClinicalCourse() {
        return clinicalCourse;
    }

    /**
     *
     * @param s
     */
    public void setClinicalCourse(String s) {
        clinicalCourse.setText(s);
    }

    public javax.swing.JTextField getConfirmed() {
        return confirmed;
    }

    public void setConfirmed(String s) {
        confirmed.setText(s);
    }

    public javax.swing.JTextField getDisease() {
        return disease;
    }

    public void setDisease(String s) {
        disease.setText(s);
    }

    public javax.swing.JTextArea getMedication() {
        return medication;
    }

    public void setMedication(String s) {
        medication.setText(s);
    }

    public javax.swing.JTextArea getPastFamily() {
        return pastFamily;
    }

    public void setPastFamily(String s) {
        pastFamily.setText(s);
    }

    public javax.swing.JTextField getPatientAge() {
        return patientAge;
    }

    public void setPatientAge(String s) {
        patientAge.setText(s);
    }

    public javax.swing.JTextField getPatientAddress() {
        return patientAddress;
    }

    public void setPatientAddress(String s) {
        patientAddress.setText(s);
    }

    public javax.swing.JTextField getPatientBirthday() {
        return patientBirthday;
    }

    public void setPatientBirthday(String s) {
        patientBirthday.setText(s);
    }

    public javax.swing.JTextField getPatientGender() {
        return patientGender;
    }

    public void setPatientGender(String s) {
        patientGender.setText(s);
    }

    public javax.swing.JTextField getPatientName() {
        return patientName;
    }

    public void setPatientName(String s) {
        patientName.setText(s);
    }

    public javax.swing.JTextField getPurpose() {
        return purpose;
    }

    public void setPurpose(String s) {
        purpose.setText(s);
    }

    public javax.swing.JTextField getRemarks() {
        return remarks;
    }

    public void setRemarks(String s) {
        remarks.setText(s);
    }

    public PrintKarte getPrintTask() {
        return printTask;
    }
}
