Package systole.domain.analysis

Examples of systole.domain.analysis.Analysis


    @Override
    public Analysis getAnalisysById(Integer id) throws ExceptionDAO {
        try {           
            this.logger.logDebug("Getting Analysis with id " + id);
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Analysis instance = (Analysis) currentSession.get(Analysis.class, id);
            this.logger.logDebug("Anaysis get successfully");
            return instance;
        } catch (HibernateException e) {
            this.logger.logError("error on get analysis, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo obtener el Análisis", e.fillInStackTrace());
View Full Code Here


    public Analysis getLastPatientAnalisys(Patient patient) throws ExceptionDAO {
        try {
            this.logger.logDebug("Getting last Analysis of patient " + patient.toString());
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(Analysis.class).add(Restrictions.eq("patient", patient)).addOrder(Order.desc("creationDay")).setMaxResults(1);
            Analysis instance = (Analysis) criteria.uniqueResult();
            if (instance == null) {
                this.logger.logDebug("Analysis not found");
            } else {
                this.logger.logDebug("Analysis found");
            }
View Full Code Here

    public boolean uploadAnalysis() {
        try {
            this.log.logDebug("Start to upload Analysis");
            Iterator<Analysis> familyToUpload = this.facadeDB.getAnalysisSyncBroker().getAnalysisToUpload().iterator();
            while (familyToUpload.hasNext()) {
                Analysis analysis = familyToUpload.next();
                AnalysisWs analysisWs = this.toRemoteEntity.generateRemoteAnalysis(analysis);
                if (analysisWs != null) {
                    int remoteId = this.systoleSync.uploadAnalysis(analysisWs);
                    if (remoteId > 0) {
                        AnalysisRemote analysisRemote = new AnalysisRemote(analysis);
View Full Code Here

*/
public class WizardAnalysisResult extends WizardResult {

    @Override
    public Object generateResult() {
        Analysis analisys = new Analysis();
        analisys.setMedic((Medic) this.results.get("medic"));
        RawSignal rawSignal = (RawSignal) this.results.get("rawSignal");
        rawSignal.setInverted((Boolean) this.results.get("inverted"));
        analisys.setRawSignal(rawSignal);
        analisys.setCreationDay((Date) this.results.get("date"));
        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();
        Iterator<String> pathologiesList = patient.getClinicalHistoryProxy().getPatientPathologies(2).iterator();
        Iterator<String> surgeriesList = patient.getClinicalHistoryProxy().getPatientSurgeries(2).iterator();

        Report report = new Report();

        String family = "";
        while (familyList.hasNext()) {
            family = family.concat((family.isEmpty() ? "" : ". ") + familyList.next());
        }
        report.setBackgroundFamily(family.isEmpty() ? "" : "Antecendentes Familiares: " + family);

        String medicine = "";
        while (medicinesList.hasNext()) {
            medicine = medicine.concat((medicine.isEmpty() ? "" : ". ") + medicinesList.next());
        }
        report.setBackgroundMedicines(medicine.isEmpty() ? "" : "Medicamentos: " + medicine);

        String pathology = "";
        while (pathologiesList.hasNext()) {
            pathology = pathology.concat((pathology.isEmpty() ? "" : ". ") + pathologiesList.next());
        }
        report.setBackgroundPathologies(pathology.isEmpty() ? "" : EntityDescriptions.PATHOLOGIES + ": " + pathology);

        String surgeries = "";
        while (surgeriesList.hasNext()) {
            surgeries = surgeries.concat((surgeries.isEmpty() ? "" : ". ") + surgeriesList.next());
        }
        report.setBackgroundSurgeries(surgeries.isEmpty()?"":EntityDescriptions.SURGERIES + ": " +surgeries);

        analisys.setReport(report);

        return analisys;
    }
View Full Code Here

     *
     */
    public void open() {
        int selected = this.analysisView.getjXTableAnalysis().getSelectedRow();
        if (selected != -1) {
            Analysis analysis = this.entityList.get(selected);
            this.closeForm();
            this.mainController.openAnalysis(analysis);
        }
    }
View Full Code Here

     *
     */
    public void showParams() {
        int selected = this.analysisView.getjXTableAnalysis().getSelectedRow();
        if (selected != -1) {
            Analysis analysis = this.entityList.get(selected);
            if (analysis.getAnalysisResult() != null) {
                this.dialogResults = new JDialogResults(null, analysis.getAnalysisResult(), this.analysisView);
                this.dialogResults.setVisible(true);
            } else {
                ErrorDialog.showError(this.analysisView, "El analisis no tiene resultados aún");
            }
        }
View Full Code Here

TOP

Related Classes of systole.domain.analysis.Analysis

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.