Clases para reflejar los enumerados TestType y QuestionStatus.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
package common;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
public class Constants {
|
||||
public static final int MAX_ITEMS_AUTOCOMPLETE_SEARCH = 200;
|
||||
public static final String PROFESSIONAL_NUMBER_PREFIX = "PRO#";
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package common;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
public class HashUtils {
|
||||
|
||||
public static String hashMD5(String stringValue) {
|
||||
|
||||
24
1.sources/MyHealth/src/common/QuestionStatus.java
Normal file
24
1.sources/MyHealth/src/common/QuestionStatus.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package common;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
public enum QuestionStatus {
|
||||
ANSWERED("Respondida"), PENDING("Pendiente");
|
||||
|
||||
private String questionStatusName;
|
||||
|
||||
private QuestionStatus(String typeName) {
|
||||
this.questionStatusName = typeName;
|
||||
}
|
||||
|
||||
public String getQuestionStatusName() {
|
||||
return questionStatusName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name();
|
||||
}
|
||||
}
|
||||
24
1.sources/MyHealth/src/common/TestType.java
Normal file
24
1.sources/MyHealth/src/common/TestType.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package common;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
public enum TestType {
|
||||
MAGNETIC_RESONANCE_IMAGING("Imagen por Resonancia Magnética"), CT_SCAN("Tomografía Áxial Computerizada"), BLOOD_TEST("Análisis de sangre");
|
||||
|
||||
private String testTypeName;
|
||||
|
||||
private TestType(String typeName) {
|
||||
this.testTypeName = typeName;
|
||||
}
|
||||
|
||||
public String getTestTypeName() {
|
||||
return testTypeName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name();
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package common;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
public enum UserType {
|
||||
PATIENT("Paciente"),
|
||||
FAMILY_DOCTOR("Médico de familia"),
|
||||
SPECIALIST_DOCTOR("Médico especialista"),
|
||||
ADMINISTRATOR("Administrador");
|
||||
PATIENT("Paciente"), FAMILY_DOCTOR("Médico de familia"), SPECIALIST_DOCTOR("Médico especialista"), ADMINISTRATOR("Administrador");
|
||||
|
||||
private String userTypename;
|
||||
|
||||
|
||||
@@ -2,10 +2,13 @@ package common;
|
||||
|
||||
import java.text.Normalizer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
public class Utils {
|
||||
public static String stripAccents(String input) {
|
||||
return input == null ? null :
|
||||
Normalizer.normalize(input, Normalizer.Form.NFD)
|
||||
.replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
|
||||
return input == null ? null : Normalizer.normalize(input, Normalizer.Form.NFD).replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user