Package systole.domain.clinicalInformation

Examples of systole.domain.clinicalInformation.ClinicalInformation


        Vector<String> result = new Vector<String>();

        int amount = (maxAmount > 0 ? maxAmount : this.getClinicalInfo().size());

        while ((it.hasNext()) && (amount > 0)) {
            ClinicalInformation clinicalInfoItem = it.next();
            result.add(clinicalInfoItem.toString());
            amount--;
        }
        return result;
    }
View Full Code Here


        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;

    }
View Full Code Here

    }

    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());
        }
View Full Code Here

    public boolean uploadClinicalInfo() {
        try {
            this.log.logDebug("Start to upload clinical info");
            Iterator<ClinicalInformation> clinicalInfoToUpload = this.facadeDB.getClinicalInfoSyncBroker().getClinicalInfoToUpload().iterator();
            while (clinicalInfoToUpload.hasNext()) {
                ClinicalInformation clinicalInformation = clinicalInfoToUpload.next();
                ClinicalInfoWs clinicalInfoWs = this.toRemoteEntity.generateRemoteClinicalInformation(clinicalInformation);
                if (clinicalInfoWs != null) {
                    int remoteId = this.systoleSync.uploadClinicalInformation(clinicalInfoWs);
                    if (remoteId > 0) {
                        ClinicalInfoRemote clinicalInfoRemote = new ClinicalInfoRemote(clinicalInformation);
View Full Code Here

        analisys.setFilePath((String) this.results.get("signal"));
        analisys.setSignalFrequency((SignalFrequency) this.results.get("period"));
        analisys.setFileName((String) this.results.get("filename"));
        Patient patient = (Patient) this.results.get("patient");
        patient.getRawsignals().add(rawSignal);
        ClinicalInformation clinicalInformation = (ClinicalInformation) this.results.get("clinicalInfo");
        clinicalInformation.setPatient(patient);
        analisys.setPatient(patient);
        analisys.setClinicalInformation(clinicalInformation);

        Iterator<String> familyList = patient.getClinicalHistoryProxy().getFamilyBackground(2).iterator();
        Iterator<String> medicinesList = patient.getClinicalHistoryProxy().getPatientMedicines(2).iterator();
View Full Code Here

    public ClinicalInformation getLastClinicalInfoByPatient(Patient patient) throws ExceptionDAO {
        try {
            this.logger.logDebug("Getting last clinical information by patient");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            ClinicalInformation clinicalInfo = (ClinicalInformation) currentSession.
                    createCriteria(ClinicalInformation.class).add(Restrictions.eq("patient", patient)).
                    addOrder(Order.desc("informationDate")).setMaxResults(1).uniqueResult();
            this.logger.logDebug("get last clinical information patient");
            return clinicalInfo;
        } catch (HibernateException e) {
View Full Code Here

        Patient patient = FacadeDB.getInstance().getPatientSyncBroker().getPatientByRemoteId(clinicalInfoWs.getPatientId());
        if (patient == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();
        ClinicalInformation clinicalInformation = new ClinicalInformation(patient);
        clinicalInformation.setYears(clinicalInfoWs.getAge());
        clinicalInformation.setInformationDate(this.xmlGregorianCalendarToDate(clinicalInfoWs.getDate()));
        clinicalInformation.setHeight(clinicalInfoWs.getHeight());
        clinicalInformation.setWeight(clinicalInfoWs.getWeight());
        clinicalInformation.setHdl(clinicalInfoWs.getHdl());
        clinicalInformation.setLdl(clinicalInfoWs.getLdl());
        clinicalInformation.setGlucemic(clinicalInfoWs.getGlucemic());
        clinicalInformation.setTriglycerides(clinicalInfoWs.getTriglycerides());
        clinicalInformation.setTotalCholesterol(clinicalInfoWs.getTotalCholesterol());
        clinicalInformation.setSystolicPressure(clinicalInfoWs.getSystolicPressure());
        clinicalInformation.setDiastolicPressure(clinicalInfoWs.getDiastolicPressure());
        FacadeDB.getInstance().getClinicalInfoBroker().insert(clinicalInformation);
        ClinicalInfoRemote clinicalInfoRemote = new ClinicalInfoRemote(clinicalInformation);
        clinicalInfoRemote.setRemoteId(clinicalInfoWs.getId());
        FacadeDB.getInstance().getClinicalInfoSyncBroker().saveClinicalInfoRemote(clinicalInfoRemote);
        FacadeDB.getInstance().commitTransaction();
View Full Code Here

        return true;
    }

    @Override
    public WizardResult loadResult(WizardResult result) {
        ClinicalInformation clinicalInformation = this.page.getClinicalInformation();
        result.putObjet("clinicalInfo", clinicalInformation);
        return result;
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityFromForm()
     */
    @Override
    protected void loadEntityFromForm() {
        JDialogClinicalInfo jDialogClinicalInfo = (JDialogClinicalInfo) this.editForm;
        ClinicalInformation clinicalInformation = (ClinicalInformation) this.curretnEntity;

        String value;

        clinicalInformation.setInformationDate(jDialogClinicalInfo.getjXDateAnalysis().getDate());

        if ((!jDialogClinicalInfo.getjTxtAge().isEditValid()) || (jDialogClinicalInfo.getjTxtAge().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtAge().getText();
        }
        clinicalInformation.setYears(Integer.parseInt(value));

        if ((!jDialogClinicalInfo.getjTxtHeight().isEditValid()) || (jDialogClinicalInfo.getjTxtHeight().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtHeight().getText();
        }
        clinicalInformation.setHeight(new Integer(value));

        if ((!jDialogClinicalInfo.getjTxtWeight().isEditValid()) || (jDialogClinicalInfo.getjTxtWeight().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtWeight().getText();
            value = value.replace(",", ".");
        }
        clinicalInformation.setWeight(new Float(value));

        if ((!jDialogClinicalInfo.getjTxtLDL().isEditValid()) || (jDialogClinicalInfo.getjTxtLDL().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtLDL().getText();
            value = value.replace(",", ".");
        }
        clinicalInformation.setLdl(new Float(value));

        if ((!jDialogClinicalInfo.getjTxtHDL().isEditValid()) || (jDialogClinicalInfo.getjTxtHDL().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtHDL().getText();
            value = value.replace(",", ".");
        }
        clinicalInformation.setHdl(new Float(value));

        if ((!jDialogClinicalInfo.getjTxtTotal().isEditValid()) || (jDialogClinicalInfo.getjTxtTotal().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtTotal().getText();
        }
        value = value.replace(",", ".");
        clinicalInformation.setTotalCholesterol(new Float(value));

        if ((!jDialogClinicalInfo.getjTxtTriglycerides().isEditValid()) || (jDialogClinicalInfo.getjTxtTriglycerides().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtTriglycerides().getText();
            value = value.replace(",", ".");
        }
        clinicalInformation.setTriglycerides(new Float(value));

        if ((!jDialogClinicalInfo.getjTxtPS().isEditValid()) || (jDialogClinicalInfo.getjTxtPS().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtPS().getText();
        }
        value = value.replace(",", ".");
        clinicalInformation.setSystolicPressure(new Float(value));


        if ((!jDialogClinicalInfo.getjTxtPD().isEditValid()) || (jDialogClinicalInfo.getjTxtPD().getText().isEmpty())) {
            value = "0";
        } else {
            value = jDialogClinicalInfo.getjTxtPD().getText();
        }
        value = value.replace(",", ".");
        clinicalInformation.setDiastolicPressure(new Float(value));

    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityOnForm()
     */
    @Override
    protected void loadEntityOnForm() {
        JDialogClinicalInfo jDialogClinicalInfo = (JDialogClinicalInfo) this.editForm;
        ClinicalInformation clinicalInformation = (ClinicalInformation) this.curretnEntity;

        jDialogClinicalInfo.getjXDateAnalysis().setDate(clinicalInformation.getInformationDate());

        DecimalFormat decimalFormat = new DecimalFormat("##0.00");

        if (clinicalInformation.getYears() != null) {
            jDialogClinicalInfo.getjTxtAge().setText(clinicalInformation.getYears().toString());
        }

        if (clinicalInformation.getGlucemic() != null) {
            jDialogClinicalInfo.getjTxtGlucemy().setText(decimalFormat.format(clinicalInformation.getGlucemic()));
        }

        if (clinicalInformation.getHeight() != null) {
            jDialogClinicalInfo.getjTxtHeight().setText(clinicalInformation.getHeight().toString());
        }

        if (clinicalInformation.getWeight() != null) {
            jDialogClinicalInfo.getjTxtWeight().setText(decimalFormat.format(clinicalInformation.getWeight()));
        }

        if (clinicalInformation.getHdl() != null) {
            jDialogClinicalInfo.getjTxtHDL().setText(decimalFormat.format(clinicalInformation.getHdl()));
        }

        if (clinicalInformation.getLdl() != null) {
            jDialogClinicalInfo.getjTxtLDL().setText(decimalFormat.format(clinicalInformation.getLdl()));
        }

        if (clinicalInformation.getTotalCholesterol() != null) {
            jDialogClinicalInfo.getjTxtTotal().setText(decimalFormat.format(clinicalInformation.getTotalCholesterol()));
        }

        if (clinicalInformation.getTriglycerides() != null) {
            jDialogClinicalInfo.getjTxtTriglycerides().setText(decimalFormat.format(clinicalInformation.getTriglycerides()));
        }

        if (clinicalInformation.getSystolicPressure() != null) {
            jDialogClinicalInfo.getjTxtPS().setText(decimalFormat.format(clinicalInformation.getSystolicPressure()));
        }

        if (clinicalInformation.getDiastolicPressure() != null) {
            jDialogClinicalInfo.getjTxtPD().setText(decimalFormat.format(clinicalInformation.getDiastolicPressure()));
        }
    }
View Full Code Here

TOP

Related Classes of systole.domain.clinicalInformation.ClinicalInformation

Copyright © 2018 www.massapicom. 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.