Package systole.view.wizard.analysis

Source Code of systole.view.wizard.analysis.JPnlPatientInfo

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/*
* JPnlPatientInfo.java
*
* Created on 06/12/2010, 20:53:52
*/
package systole.view.wizard.analysis;

import java.util.Calendar;
import org.jdesktop.application.Action;
import systole.domain.clinicalInformation.ClinicalInformation;
import systole.domain.clinicalInformation.standardValues.StandardParams;
import systole.domain.clinicalInformation.standardValues.StandardValue;
import systole.domain.persons.Patient;
import systole.exceptions.ExceptionDAO;
import systole.persistence.FacadeDB;
import systole.view.utils.ErrorDialog;

/**
*
* @author jmj
*/
public class JPnlPatientInfo extends javax.swing.JPanel {

    /** Creates new form JPnlPatientInfo */
    public JPnlPatientInfo() {
        initComponents();
        this.jXDateAnalysis.setDate(Calendar.getInstance().getTime());
    }

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

        jPpMenuLDL = new javax.swing.JPopupMenu();
        jMitLDLNormal = new javax.swing.JMenuItem();
        jMitLDLMedium = new javax.swing.JMenuItem();
        jMitLDLHigh = new javax.swing.JMenuItem();
        jPpMenuHDL = new javax.swing.JPopupMenu();
        jMitHDLNormal = new javax.swing.JMenuItem();
        jMitHDLMedium = new javax.swing.JMenuItem();
        jMitHDLHigh = new javax.swing.JMenuItem();
        jPpMenuCTotal = new javax.swing.JPopupMenu();
        jMitCTotalNormal = new javax.swing.JMenuItem();
        jMitCTotalMedium = new javax.swing.JMenuItem();
        jMitCTotalHigh = new javax.swing.JMenuItem();
        jPpMenuTriglycerides = new javax.swing.JPopupMenu();
        jMitTriglyceridesNormal = new javax.swing.JMenuItem();
        jMitTriglyceridesMedium = new javax.swing.JMenuItem();
        jMitTriglyceridesHigh = new javax.swing.JMenuItem();
        jPpMenuGlucemy = new javax.swing.JPopupMenu();
        jMitGlucemyNormal = new javax.swing.JMenuItem();
        jMitGlucemyMedium = new javax.swing.JMenuItem();
        jMitGlucemyHigh = new javax.swing.JMenuItem();
        jPpMenuPS = new javax.swing.JPopupMenu();
        jMitPSNormal = new javax.swing.JMenuItem();
        jMitPSMedium = new javax.swing.JMenuItem();
        jMitPSHigh = new javax.swing.JMenuItem();
        jPpMenuPD = new javax.swing.JPopupMenu();
        jMitPDNormal = new javax.swing.JMenuItem();
        jMitPDMedium = new javax.swing.JMenuItem();
        jMitPDHigh = new javax.swing.JMenuItem();
        jLblTitle = new javax.swing.JLabel();
        lblGlucemy = new javax.swing.JLabel();
        jTxtGlucemy = new javax.swing.JFormattedTextField();
        lblPatientHeight = new javax.swing.JLabel();
        lblPatientWeight = new javax.swing.JLabel();
        jTxtHeight = new javax.swing.JFormattedTextField();
        jTxtWeight = new javax.swing.JFormattedTextField();
        lblCT = new javax.swing.JLabel();
        lblTrig = new javax.swing.JLabel();
        lblCLDL = new javax.swing.JLabel();
        lblCHDL = new javax.swing.JLabel();
        jTxtLDL = new javax.swing.JFormattedTextField();
        jTxtHDL = new javax.swing.JFormattedTextField();
        jTxtTotal = new javax.swing.JFormattedTextField();
        jTxtTriglycerides = new javax.swing.JFormattedTextField();
        jLblDate = new javax.swing.JLabel();
        jXDateAnalysis = new org.jdesktop.swingx.JXDatePicker();
        lblDiastolic = new javax.swing.JLabel();
        lblSistolic = new javax.swing.JLabel();
        jTxtPD = new javax.swing.JFormattedTextField();
        jTxtPS = new javax.swing.JFormattedTextField();
        jLblAge = new javax.swing.JLabel();
        jTxtAge = new javax.swing.JFormattedTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();

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

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(systole.view.SystoleApp.class).getContext().getActionMap(JPnlPatientInfo.class, this);
        jMitLDLNormal.setAction(actionMap.get("setNormalValueToLDL")); // NOI18N
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(systole.view.SystoleApp.class).getContext().getResourceMap(JPnlPatientInfo.class);
        jMitLDLNormal.setText(resourceMap.getString("jMitLDLNormal.text")); // NOI18N
        jMitLDLNormal.setName("jMitLDLNormal"); // NOI18N
        jPpMenuLDL.add(jMitLDLNormal);

        jMitLDLMedium.setAction(actionMap.get("setMediumValueToLDL")); // NOI18N
        jMitLDLMedium.setText(resourceMap.getString("jMitLDLMedium.text")); // NOI18N
        jMitLDLMedium.setName("jMitLDLMedium"); // NOI18N
        jPpMenuLDL.add(jMitLDLMedium);

        jMitLDLHigh.setAction(actionMap.get("setHighValueToLDL")); // NOI18N
        jMitLDLHigh.setText(resourceMap.getString("jMitLDLHigh.text")); // NOI18N
        jMitLDLHigh.setName("jMitLDLHigh"); // NOI18N
        jPpMenuLDL.add(jMitLDLHigh);

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

        jMitHDLNormal.setAction(actionMap.get("setNormalValueToHDL")); // NOI18N
        jMitHDLNormal.setText(resourceMap.getString("jMitHDLNormal.text")); // NOI18N
        jMitHDLNormal.setName("jMitHDLNormal"); // NOI18N
        jPpMenuHDL.add(jMitHDLNormal);

        jMitHDLMedium.setAction(actionMap.get("setMediumValueToHDL")); // NOI18N
        jMitHDLMedium.setText(resourceMap.getString("jMitHDLMedium.text")); // NOI18N
        jMitHDLMedium.setName("jMitHDLMedium"); // NOI18N
        jPpMenuHDL.add(jMitHDLMedium);

        jMitHDLHigh.setAction(actionMap.get("setHighValueToHDL")); // NOI18N
        jMitHDLHigh.setText(resourceMap.getString("jMitHDLHigh.text")); // NOI18N
        jMitHDLHigh.setName("jMitHDLHigh"); // NOI18N
        jPpMenuHDL.add(jMitHDLHigh);

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

        jMitCTotalNormal.setAction(actionMap.get("setNormalValueToCTotal")); // NOI18N
        jMitCTotalNormal.setText(resourceMap.getString("jMitCTotalNormal.text")); // NOI18N
        jMitCTotalNormal.setName("jMitCTotalNormal"); // NOI18N
        jPpMenuCTotal.add(jMitCTotalNormal);

        jMitCTotalMedium.setAction(actionMap.get("setMediumValueToCTotal")); // NOI18N
        jMitCTotalMedium.setText(resourceMap.getString("jMitCTotalMedium.text")); // NOI18N
        jMitCTotalMedium.setName("jMitCTotalMedium"); // NOI18N
        jPpMenuCTotal.add(jMitCTotalMedium);

        jMitCTotalHigh.setAction(actionMap.get("setHighValueToCTotal")); // NOI18N
        jMitCTotalHigh.setText(resourceMap.getString("jMitCTotalHigh.text")); // NOI18N
        jMitCTotalHigh.setName("jMitCTotalHigh"); // NOI18N
        jPpMenuCTotal.add(jMitCTotalHigh);

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

        jMitTriglyceridesNormal.setAction(actionMap.get("setNormalValueToTriglycerides")); // NOI18N
        jMitTriglyceridesNormal.setText(resourceMap.getString("jMitTriglyceridesNormal.text")); // NOI18N
        jMitTriglyceridesNormal.setName("jMitTriglyceridesNormal"); // NOI18N
        jPpMenuTriglycerides.add(jMitTriglyceridesNormal);

        jMitTriglyceridesMedium.setAction(actionMap.get("setMediumValueToTriglycerides")); // NOI18N
        jMitTriglyceridesMedium.setText(resourceMap.getString("jMitTriglyceridesMedium.text")); // NOI18N
        jMitTriglyceridesMedium.setName("jMitTriglyceridesMedium"); // NOI18N
        jPpMenuTriglycerides.add(jMitTriglyceridesMedium);

        jMitTriglyceridesHigh.setAction(actionMap.get("setHighValueToTriglycerides")); // NOI18N
        jMitTriglyceridesHigh.setText(resourceMap.getString("jMitTriglyceridesHigh.text")); // NOI18N
        jMitTriglyceridesHigh.setName("jMitTriglyceridesHigh"); // NOI18N
        jPpMenuTriglycerides.add(jMitTriglyceridesHigh);

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

        jMitGlucemyNormal.setAction(actionMap.get("setNormalValueToGlucemy")); // NOI18N
        jMitGlucemyNormal.setText(resourceMap.getString("jMitGlucemyNormal.text")); // NOI18N
        jMitGlucemyNormal.setName("jMitGlucemyNormal"); // NOI18N
        jPpMenuGlucemy.add(jMitGlucemyNormal);

        jMitGlucemyMedium.setAction(actionMap.get("setMediumValueToGlucemy")); // NOI18N
        jMitGlucemyMedium.setText(resourceMap.getString("jMitGlucemyMedium.text")); // NOI18N
        jMitGlucemyMedium.setName("jMitGlucemyMedium"); // NOI18N
        jPpMenuGlucemy.add(jMitGlucemyMedium);

        jMitGlucemyHigh.setAction(actionMap.get("setHighValueToGlucemy")); // NOI18N
        jMitGlucemyHigh.setText(resourceMap.getString("jMitGlucemyHigh.text")); // NOI18N
        jMitGlucemyHigh.setName("jMitGlucemyHigh"); // NOI18N
        jPpMenuGlucemy.add(jMitGlucemyHigh);

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

        jMitPSNormal.setAction(actionMap.get("setNormalValueToPS")); // NOI18N
        jMitPSNormal.setText(resourceMap.getString("jMitPSNormal.text")); // NOI18N
        jMitPSNormal.setName("jMitPSNormal"); // NOI18N
        jPpMenuPS.add(jMitPSNormal);

        jMitPSMedium.setAction(actionMap.get("setMediumValueToPS")); // NOI18N
        jMitPSMedium.setText(resourceMap.getString("jMitPSMedium.text")); // NOI18N
        jMitPSMedium.setName("jMitPSMedium"); // NOI18N
        jPpMenuPS.add(jMitPSMedium);

        jMitPSHigh.setAction(actionMap.get("setHighValueToPS")); // NOI18N
        jMitPSHigh.setText(resourceMap.getString("jMitPSHigh.text")); // NOI18N
        jMitPSHigh.setName("jMitPSHigh"); // NOI18N
        jPpMenuPS.add(jMitPSHigh);

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

        jMitPDNormal.setAction(actionMap.get("setNormalValueToPD")); // NOI18N
        jMitPDNormal.setText(resourceMap.getString("jMitPDNormal.text")); // NOI18N
        jMitPDNormal.setName("jMitPDNormal"); // NOI18N
        jPpMenuPD.add(jMitPDNormal);

        jMitPDMedium.setAction(actionMap.get("setMediumValueToPD")); // NOI18N
        jMitPDMedium.setText(resourceMap.getString("jMitPDMedium.text")); // NOI18N
        jMitPDMedium.setName("jMitPDMedium"); // NOI18N
        jPpMenuPD.add(jMitPDMedium);

        jMitPDHigh.setAction(actionMap.get("setHighValueToPD")); // NOI18N
        jMitPDHigh.setText(resourceMap.getString("jMitPDHigh.text")); // NOI18N
        jMitPDHigh.setName("jMitPDHigh"); // NOI18N
        jPpMenuPD.add(jMitPDHigh);

        setName("Form"); // NOI18N

        jLblTitle.setFont(jLblTitle.getFont().deriveFont(jLblTitle.getFont().getStyle() | java.awt.Font.BOLD, jLblTitle.getFont().getSize()+2));
        jLblTitle.setText(resourceMap.getString("jLblTitle.text")); // NOI18N
        jLblTitle.setName("jLblTitle"); // NOI18N

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

        jTxtGlucemy.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtGlucemy.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtGlucemy.setComponentPopupMenu(jPpMenuGlucemy);
        jTxtGlucemy.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jTxtGlucemy.setName("jTxtGlucemy"); // NOI18N

        lblPatientHeight.setFont(lblPatientHeight.getFont().deriveFont(lblPatientHeight.getFont().getStyle() | java.awt.Font.BOLD));
        lblPatientHeight.setText(resourceMap.getString("lblPatientHeight.text")); // NOI18N
        lblPatientHeight.setName("lblPatientHeight"); // NOI18N

        lblPatientWeight.setFont(lblPatientWeight.getFont().deriveFont(lblPatientWeight.getFont().getStyle() | java.awt.Font.BOLD));
        lblPatientWeight.setText(resourceMap.getString("lblPatientWeight.text")); // NOI18N
        lblPatientWeight.setName("lblPatientWeight"); // NOI18N

        jTxtHeight.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
        jTxtHeight.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtHeight.setToolTipText(resourceMap.getString("jTxtHeight.toolTipText")); // NOI18N
        jTxtHeight.setName("jTxtHeight"); // NOI18N

        jTxtWeight.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtWeight.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtWeight.setToolTipText(resourceMap.getString("jTxtWeight.toolTipText")); // NOI18N
        jTxtWeight.setName("jTxtWeight"); // NOI18N

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

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

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

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

        jTxtLDL.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtLDL.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtLDL.setToolTipText(resourceMap.getString("jTxtLDL.toolTipText")); // NOI18N
        jTxtLDL.setComponentPopupMenu(jPpMenuLDL);
        jTxtLDL.setName("jTxtLDL"); // NOI18N

        jTxtHDL.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtHDL.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtHDL.setComponentPopupMenu(jPpMenuHDL);
        jTxtHDL.setName("jTxtHDL"); // NOI18N

        jTxtTotal.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtTotal.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtTotal.setComponentPopupMenu(jPpMenuCTotal);
        jTxtTotal.setName("jTxtTotal"); // NOI18N

        jTxtTriglycerides.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtTriglycerides.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtTriglycerides.setComponentPopupMenu(jPpMenuTriglycerides);
        jTxtTriglycerides.setName("jTxtTriglycerides"); // NOI18N

        jLblDate.setFont(jLblDate.getFont().deriveFont(jLblDate.getFont().getStyle() | java.awt.Font.BOLD));
        jLblDate.setText(resourceMap.getString("jLblDate.text")); // NOI18N
        jLblDate.setName("jLblDate"); // NOI18N

        jXDateAnalysis.setName("jXDateAnalysis"); // NOI18N
        jXDateAnalysis.setToolTipText(resourceMap.getString("jXDateAnalysis.toolTipText")); // NOI18N

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

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

        jTxtPD.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtPD.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtPD.setComponentPopupMenu(jPpMenuPD);
        jTxtPD.setName("jTxtPD"); // NOI18N

        jTxtPS.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        jTxtPS.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtPS.setComponentPopupMenu(jPpMenuPS);
        jTxtPS.setName("jTxtPS"); // NOI18N

        jLblAge.setFont(jLblAge.getFont().deriveFont(jLblAge.getFont().getStyle() | java.awt.Font.BOLD));
        jLblAge.setText(resourceMap.getString("jLblAge.text")); // NOI18N
        jLblAge.setName("jLblAge"); // NOI18N

        jTxtAge.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
        jTxtAge.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        jTxtAge.setToolTipText(resourceMap.getString("jTxtAge.toolTipText")); // NOI18N
        jTxtAge.setName("jTxtAge"); // NOI18N

        jLabel1.setFont(jLabel1.getFont().deriveFont(jLabel1.getFont().getSize()-2f));
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel3.setFont(jLabel3.getFont().deriveFont(jLabel3.getFont().getSize()-2f));
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setFont(jLabel4.getFont().deriveFont(jLabel4.getFont().getSize()-2f));
        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setFont(jLabel5.getFont().deriveFont(jLabel5.getFont().getSize()-2f));
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setFont(jLabel6.getFont().deriveFont(jLabel6.getFont().getSize()-2f));
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setFont(jLabel7.getFont().deriveFont(jLabel7.getFont().getSize()-2f));
        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setFont(jLabel8.getFont().deriveFont(jLabel8.getFont().getSize()-2f));
        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel9.setFont(jLabel9.getFont().deriveFont(jLabel9.getFont().getSize()-2f));
        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jLabel10.setFont(jLabel10.getFont().deriveFont(jLabel10.getFont().getSize()-2f));
        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel11.setFont(jLabel11.getFont().deriveFont(jLabel11.getFont().getSize()-2f));
        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(jLblTitle))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLblDate, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblPatientWeight, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCLDL, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCT, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblTrig, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblDiastolic, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jXDateAnalysis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jTxtTriglycerides, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTxtTotal, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTxtLDL, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTxtPD, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTxtWeight, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel11)
                                    .addComponent(jLabel9)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel1))))
                        .addGap(13, 13, 13)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLblAge, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblPatientHeight, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCHDL, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblGlucemy, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblSistolic, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jTxtPS)
                            .addComponent(jTxtGlucemy)
                            .addComponent(jTxtHDL)
                            .addComponent(jTxtHeight)
                            .addComponent(jTxtAge, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel6)
                            .addComponent(jLabel3)
                            .addComponent(jLabel7)
                            .addComponent(jLabel10))))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLblTitle)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jXDateAnalysis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLblDate)
                    .addComponent(jLblAge)
                    .addComponent(jTxtAge, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(lblPatientWeight)
                    .addComponent(jTxtWeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblPatientHeight)
                    .addComponent(jTxtHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(lblCLDL)
                    .addComponent(jTxtLDL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCHDL)
                    .addComponent(jTxtHDL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(lblCT)
                    .addComponent(lblGlucemy)
                    .addComponent(jTxtGlucemy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTxtTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lblTrig)
                                .addComponent(jTxtTriglycerides, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblSistolic)
                                    .addComponent(jLabel11))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblDiastolic)
                            .addComponent(jTxtPD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTxtPS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel6)))
                .addContainerGap(31, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    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.JLabel jLblAge;
    private javax.swing.JLabel jLblDate;
    private javax.swing.JLabel jLblTitle;
    private javax.swing.JMenuItem jMitCTotalHigh;
    private javax.swing.JMenuItem jMitCTotalMedium;
    private javax.swing.JMenuItem jMitCTotalNormal;
    private javax.swing.JMenuItem jMitGlucemyHigh;
    private javax.swing.JMenuItem jMitGlucemyMedium;
    private javax.swing.JMenuItem jMitGlucemyNormal;
    private javax.swing.JMenuItem jMitHDLHigh;
    private javax.swing.JMenuItem jMitHDLMedium;
    private javax.swing.JMenuItem jMitHDLNormal;
    private javax.swing.JMenuItem jMitLDLHigh;
    private javax.swing.JMenuItem jMitLDLMedium;
    private javax.swing.JMenuItem jMitLDLNormal;
    private javax.swing.JMenuItem jMitPDHigh;
    private javax.swing.JMenuItem jMitPDMedium;
    private javax.swing.JMenuItem jMitPDNormal;
    private javax.swing.JMenuItem jMitPSHigh;
    private javax.swing.JMenuItem jMitPSMedium;
    private javax.swing.JMenuItem jMitPSNormal;
    private javax.swing.JMenuItem jMitTriglyceridesHigh;
    private javax.swing.JMenuItem jMitTriglyceridesMedium;
    private javax.swing.JMenuItem jMitTriglyceridesNormal;
    private javax.swing.JPopupMenu jPpMenuCTotal;
    private javax.swing.JPopupMenu jPpMenuGlucemy;
    private javax.swing.JPopupMenu jPpMenuHDL;
    private javax.swing.JPopupMenu jPpMenuLDL;
    private javax.swing.JPopupMenu jPpMenuPD;
    private javax.swing.JPopupMenu jPpMenuPS;
    private javax.swing.JPopupMenu jPpMenuTriglycerides;
    private javax.swing.JFormattedTextField jTxtAge;
    private javax.swing.JFormattedTextField jTxtGlucemy;
    private javax.swing.JFormattedTextField jTxtHDL;
    private javax.swing.JFormattedTextField jTxtHeight;
    private javax.swing.JFormattedTextField jTxtLDL;
    private javax.swing.JFormattedTextField jTxtPD;
    private javax.swing.JFormattedTextField jTxtPS;
    private javax.swing.JFormattedTextField jTxtTotal;
    private javax.swing.JFormattedTextField jTxtTriglycerides;
    private javax.swing.JFormattedTextField jTxtWeight;
    private org.jdesktop.swingx.JXDatePicker jXDateAnalysis;
    private javax.swing.JLabel lblCHDL;
    private javax.swing.JLabel lblCLDL;
    private javax.swing.JLabel lblCT;
    private javax.swing.JLabel lblDiastolic;
    private javax.swing.JLabel lblGlucemy;
    private javax.swing.JLabel lblPatientHeight;
    private javax.swing.JLabel lblPatientWeight;
    private javax.swing.JLabel lblSistolic;
    private javax.swing.JLabel lblTrig;
    // End of variables declaration//GEN-END:variables

    /**
     * @return a string wit error message
     */
    public String validateConditions() {

        if (this.jXDateAnalysis.getDate() == null) {
            return "Debe ingresar la fecha";
        }

        if ((!this.jTxtAge.isEditValid()) || (this.jTxtAge.getText().isEmpty())) {
            return "Debe ingresar la edad";
        }

        if ((!this.jTxtWeight.isEditValid()) || (this.jTxtWeight.getText().isEmpty())) {
            return "Debe ingresar el peso";
        }

        if ((!this.jTxtHeight.isEditValid()) || (this.jTxtHeight.getText().isEmpty())) {
            return "Debe ingresar la altura";
        }

        return null;
    }

    public ClinicalInformation getClinicalInformation() {
        ClinicalInformation info = new ClinicalInformation();
        info.setInformationDate(this.jXDateAnalysis.getDate());

        Integer age = 0;
        if ((this.jTxtAge.isEditValid()) && (!this.jTxtAge.getText().isEmpty())) {
            try {
                age = Integer.parseInt(this.jTxtAge.getText());
            } catch (NumberFormatException e) {
                age = 0;
            }
        }
        info.setYears(age);

        Integer height = 0;
        if ((this.jTxtHeight.isEditValid()) && (!this.jTxtHeight.getText().isEmpty())) {
            try {
                height = Integer.parseInt(this.jTxtHeight.getText());
            } catch (NumberFormatException e) {
                height = 0;
            }
        }
        info.setHeight(height);

        Float weight = 0f;
        if ((this.jTxtWeight.isEditValid()) && (!this.jTxtWeight.getText().isEmpty())) {
            try {
                String value = this.jTxtWeight.getText();
                value = value.replace(",", ".");
                weight = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                weight = 0f;
            }
        }
        info.setWeight(weight);

        Float hdl = 0f;
        if ((this.jTxtHDL.isEditValid()) && (!this.jTxtHDL.getText().isEmpty())) {
            try {
                String value = this.jTxtHDL.getText();
                value = value.replace(",", ".");
                hdl = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                hdl = 0f;
            }
        }
        info.setHdl(hdl);

        Float ldl = 0f;
        if ((this.jTxtLDL.isEditValid()) && (!this.jTxtLDL.getText().isEmpty())) {
            try {
                String value = this.jTxtLDL.getText();
                value = value.replace(",", ".");
                ldl = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                ldl = 0f;
            }
        }
        info.setLdl(ldl);

        Float totalCholesterol = 0f;
        if ((this.jTxtTotal.isEditValid()) && (!this.jTxtTotal.getText().isEmpty())) {
            try {
                String value = this.jTxtTotal.getText();
                value = value.replace(",", ".");
                totalCholesterol = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                totalCholesterol = 0f;
            }
        }
        info.setTotalCholesterol(totalCholesterol);

        Float glucose = 0f;
        if ((this.jTxtGlucemy.isEditValid()) && (!this.jTxtGlucemy.getText().isEmpty())) {
            try {
                String value = this.jTxtGlucemy.getText();
                value = value.replace(",", ".");
                glucose = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                glucose = 0f;
            }
        }
        info.setGlucemic(glucose);

        Float triglycerides = 0f;
        if ((this.jTxtTriglycerides.isEditValid()) && (!this.jTxtTriglycerides.getText().isEmpty())) {
            try {
                String value = this.jTxtTriglycerides.getText();
                value = value.replace(",", ".");
                triglycerides = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                triglycerides = 0f;
            }
        }
        info.setTriglycerides(triglycerides);

        Float ps = 0f;
        if ((this.jTxtPS.isEditValid()) && (!this.jTxtPS.getText().isEmpty())) {
            try {
                String value = this.jTxtPS.getText();
                value = value.replace(",", ".");
                ps = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                ps = 0f;
            }
        }
        info.setSystolicPressure(ps);

        Float pd = 0f;
        if ((this.jTxtPD.isEditValid()) && (!this.jTxtPD.getText().isEmpty())) {
            try {
                String value = this.jTxtPD.getText();
                value = value.replace(",", ".");
                pd = Float.parseFloat(value);
            } catch (NumberFormatException e) {
                pd = 0f;
            }
        }
        info.setDiastolicPressure(pd);

        return info;

    }

    public void loadLastClinicalInfo(Patient patient) {
        this.jTxtAge.setText(patient.getAge().toString());
        try {
            ClinicalInformation information = FacadeDB.getInstance().getClinicalInfoBroker().getLastClinicalInfoByPatient(patient);

            if (information != null) {
                this.jTxtWeight.setText(information.getWeightAsString(false));
                this.jTxtHeight.setText(information.getHeightAsString(false));
            }
        } catch (ExceptionDAO ex) {
            FacadeDB.getInstance().refreshSession();
            ErrorDialog.showError(this, ex.getMessage());
        }
    }

    @Action
    public void setNormalValueToLDL() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.LDL);
            this.jTxtLDL.setText(st != null ? st.getNormal().toString() : StandardParams.LDL.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtLDL.setText(StandardParams.LDL.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToLDL() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.LDL);
            this.jTxtLDL.setText(st != null ? st.getMedium().toString() : StandardParams.LDL.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtLDL.setText(StandardParams.LDL.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToLDL() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.LDL);
            this.jTxtLDL.setText(st != null ? st.getHigh().toString() : StandardParams.LDL.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtLDL.setText(StandardParams.LDL.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setNormalValueToHDL() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.HDL);
            this.jTxtHDL.setText(st != null ? st.getNormal().toString() : StandardParams.HDL.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtHDL.setText(StandardParams.HDL.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToHDL() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.HDL);
            this.jTxtHDL.setText(st != null ? st.getMedium().toString() : StandardParams.HDL.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtHDL.setText(StandardParams.HDL.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToHDL() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.HDL);
            this.jTxtHDL.setText(st != null ? st.getHigh().toString() : StandardParams.HDL.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtHDL.setText(StandardParams.HDL.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setNormalValueToCTotal() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.TOTAL);
            this.jTxtTotal.setText(st != null ? st.getNormal().toString() : StandardParams.TOTAL.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtTotal.setText(StandardParams.TOTAL.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToCTotal() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.TOTAL);
            this.jTxtTotal.setText(st != null ? st.getMedium().toString() : StandardParams.TOTAL.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtTotal.setText(StandardParams.TOTAL.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToCTotal() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.TOTAL);
            this.jTxtTotal.setText(st != null ? st.getHigh().toString() : StandardParams.TOTAL.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtTotal.setText(StandardParams.TOTAL.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setNormalValueToTriglycerides() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.TRIGLYCERIDES);
            this.jTxtTriglycerides.setText(st != null ? st.getNormal().toString() : StandardParams.TRIGLYCERIDES.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtTriglycerides.setText(StandardParams.TRIGLYCERIDES.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToTriglycerides() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.TRIGLYCERIDES);
            this.jTxtTriglycerides.setText(st != null ? st.getMedium().toString() : StandardParams.TRIGLYCERIDES.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtTriglycerides.setText(StandardParams.TRIGLYCERIDES.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToTriglycerides() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.TRIGLYCERIDES);
            this.jTxtTriglycerides.setText(st != null ? st.getHigh().toString() : StandardParams.TRIGLYCERIDES.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtTriglycerides.setText(StandardParams.TRIGLYCERIDES.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setNormalValueToGlucemy() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.GLUCEMY);
            this.jTxtGlucemy.setText(st != null ? st.getNormal().toString() : StandardParams.GLUCEMY.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtGlucemy.setText(StandardParams.GLUCEMY.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToGlucemy() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.GLUCEMY);
            this.jTxtGlucemy.setText(st != null ? st.getMedium().toString() : StandardParams.GLUCEMY.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtGlucemy.setText(StandardParams.GLUCEMY.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToGlucemy() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.GLUCEMY);
            this.jTxtGlucemy.setText(st != null ? st.getHigh().toString() : StandardParams.GLUCEMY.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtGlucemy.setText(StandardParams.GLUCEMY.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

     @Action
    public void setNormalValueToPS() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.PS);
            this.jTxtPS.setText(st != null ? st.getNormal().toString() : StandardParams.PS.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtPS.setText(StandardParams.PS.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToPS() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.PS);
            this.jTxtPS.setText(st != null ? st.getMedium().toString() : StandardParams.PS.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtPS.setText(StandardParams.PS.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToPS() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.PS);
            this.jTxtPS.setText(st != null ? st.getHigh().toString() : StandardParams.PS.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtPS.setText(StandardParams.PS.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

     @Action
    public void setNormalValueToPD() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.PD);
            this.jTxtPD.setText(st != null ? st.getNormal().toString() : StandardParams.PD.getNormal().toString());
        } catch (ExceptionDAO e) {
            this.jTxtPD.setText(StandardParams.PD.getNormal().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setMediumValueToPD() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.PD);
            this.jTxtPD.setText(st != null ? st.getMedium().toString() : StandardParams.PD.getMedium().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtPD.setText(StandardParams.PD.getMedium().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }

    @Action
    public void setHighValueToPD() {
        try {
            StandardValue st = FacadeDB.getInstance().getStandardValuesBroker().getStandardValueByParamType(StandardParams.PD);
            this.jTxtPD.setText(st != null ? st.getHigh().toString() : StandardParams.PD.getHigh().toString());
        } catch (ExceptionDAO edao) {
            this.jTxtPD.setText(StandardParams.PD.getHigh().toString());
            FacadeDB.getInstance().refreshSession();
        }
    }
}
TOP

Related Classes of systole.view.wizard.analysis.JPnlPatientInfo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.