Package systole.synchronization.remote.entities

Examples of systole.synchronization.remote.entities.ClinicalInfoRemote


        try {
            this.logger.logDebug("getting clinical info by remote id");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    ClinicalInfoRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
            ClinicalInfoRemote clinicalInfoRemote = (ClinicalInfoRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (clinicalInfoRemote != null ? clinicalInfoRemote.getClinicalInformation() : null);
        } catch (HibernateException e) {
            this.logger.logError("error on get clinical info by remote id, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los informes clínicos", e.fillInStackTrace());
        }
    }
View Full Code Here


         try {
            this.logger.logDebug("getting clinical info remote by local clinical info");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    ClinicalInfoRemote.class).add(Restrictions.eq("clinicalInformation", clinicalInfo)).setMaxResults(1);
            ClinicalInfoRemote sportRemote = (ClinicalInfoRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return sportRemote;
        } catch (HibernateException e) {
            this.logger.logError("error on get remote clinical info by clinical info, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los informes clínicos", e.fillInStackTrace());
View Full Code Here

          try {
            this.logger.logDebug("getting last remote clinical info sync");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    ClinicalInfoRemote.class).addOrder(Order.desc("remoteId")).setMaxResults(1);
            ClinicalInfoRemote clinicalInfoRemote = (ClinicalInfoRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (clinicalInfoRemote != null ? clinicalInfoRemote.getRemoteId() : -1);
        } catch (HibernateException e) {
            this.logger.logError("error on get last remote clinical info synchronized, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los informes clínicos", e.fillInStackTrace());
        }
    }
View Full Code Here

                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);
                        clinicalInfoRemote.setRemoteId(remoteId);
                        FacadeDB.getInstance().startTransaction();
                        FacadeDB.getInstance().getClinicalInfoSyncBroker().saveClinicalInfoRemote(clinicalInfoRemote);
                        FacadeDB.getInstance().commitTransaction();
                    }
                }
View Full Code Here

            return null;
        }

        analysisWs.setSignalFrequencyId(frequencyRemote.getRemoteId());

        ClinicalInfoRemote clinicalInfoRemote = FacadeDB.getInstance().getClinicalInfoSyncBroker().getClinicalInfoRemoteByClinicalInfo(analysis.getClinicalInformation());

        if (clinicalInfoRemote == null) {
            return null;
        }
        analysisWs.setClinicalInfoId(clinicalInfoRemote.getRemoteId());

        analysisWs.setDate(this.dateToXMLGregorianCalendar(analysis.getAnalysisDay()));
        analysisWs.setRawSignal(this.convertToRemoteRawSignal(analysis.getRawSignal(), analysis));
        analysisWs.setReport(this.convertToRemoteReport(analysis.getReport()));
        analysisWs.setResult(this.convetToRemoteAnalysisResult(analysis.getAnalysisResult()));
View Full Code Here

        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

TOP

Related Classes of systole.synchronization.remote.entities.ClinicalInfoRemote

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.