*/
private PatientHabitsWs convertToRemoteHabits(HabitPatient habitPatient) {
if (habitPatient == null) {
return null;
}
PatientHabitsWs habitsWs = new PatientHabitsWs();
habitsWs.setAgeAtStart(habitPatient.getYearsOldAtStart() != null ? habitPatient.getYearsOldAtStart() : 0);
habitsWs.setAgeAtEnd(habitPatient.getYearsOldAtFinish() != null ? habitPatient.getYearsOldAtFinish() : 0);
habitsWs.setAngryLevel(habitPatient.getAngryLevel() != null ? habitPatient.getAngryLevel() : 0);
habitsWs.setStressLevel(habitPatient.getStressLevel() != null ? habitPatient.getStressLevel() : 0);
habitsWs.setAutomedication(habitPatient.getAutomedication() != null ? habitPatient.getAutomedication() : false);
habitsWs.setConsummingAlcohol(habitPatient.getConsummingAlcohol() != null ? habitPatient.getConsummingAlcohol() : false);
habitsWs.setWorkPlace(habitPatient.getWorkPlace());
habitsWs.setSmoked(habitPatient.getSmoked() != null ? habitPatient.getSmoked() : false);
habitsWs.setSmoking(habitPatient.getSmoking() != null ? habitPatient.getSmoking() : false);
habitsWs.setCigarettesPerDay(habitPatient.getCigarettesPerDay() != null ? habitPatient.getCigarettesPerDay() : 0);
habitsWs.setBlocksWalkedPerDay(habitPatient.getBlocksWalkedPerDay() != null ? habitPatient.getBlocksWalkedPerDay() : 0);
habitsWs.setSedentary(habitPatient.getSedentary() != null ? habitPatient.getSedentary() : false);
return habitsWs;
}