Clases para reflejar los enumerados TestType y QuestionStatus.
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
package common;
|
package common;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class Constants {
|
public class Constants {
|
||||||
public static final int MAX_ITEMS_AUTOCOMPLETE_SEARCH = 200;
|
public static final int MAX_ITEMS_AUTOCOMPLETE_SEARCH = 200;
|
||||||
public static final String PROFESSIONAL_NUMBER_PREFIX= "PRO#";
|
public static final String PROFESSIONAL_NUMBER_PREFIX = "PRO#";
|
||||||
public static final String PERSONAL_IDENTIFICATION_CODE_PREFIX= "PAT#";
|
public static final String PERSONAL_IDENTIFICATION_CODE_PREFIX = "PAT#";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
package common;
|
package common;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
|
|
||||||
import javax.xml.bind.DatatypeConverter;
|
import javax.xml.bind.DatatypeConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class HashUtils {
|
public class HashUtils {
|
||||||
|
|
||||||
public static String hashMD5(String stringValue) {
|
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,22 +1,24 @@
|
|||||||
package common;
|
package common;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||||
|
*
|
||||||
|
*/
|
||||||
public enum UserType {
|
public enum UserType {
|
||||||
PATIENT("Paciente"),
|
PATIENT("Paciente"), FAMILY_DOCTOR("Médico de familia"), SPECIALIST_DOCTOR("Médico especialista"), ADMINISTRATOR("Administrador");
|
||||||
FAMILY_DOCTOR("Médico de familia"),
|
|
||||||
SPECIALIST_DOCTOR("Médico especialista"),
|
|
||||||
ADMINISTRATOR("Administrador");
|
|
||||||
|
|
||||||
private String userTypename;
|
private String userTypename;
|
||||||
|
|
||||||
private UserType (String userTypename){
|
private UserType(String userTypename) {
|
||||||
this.userTypename = userTypename;
|
this.userTypename = userTypename;
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserTypename() {
|
|
||||||
return userTypename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return this.name();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserTypename() {
|
||||||
|
return userTypename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,10 +2,13 @@ package common;
|
|||||||
|
|
||||||
import java.text.Normalizer;
|
import java.text.Normalizer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class Utils {
|
public class Utils {
|
||||||
public static String stripAccents(String input){
|
public static String stripAccents(String input) {
|
||||||
return input == null ? null :
|
return input == null ? null : Normalizer.normalize(input, Normalizer.Form.NFD).replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
|
||||||
Normalizer.normalize(input, Normalizer.Form.NFD)
|
|
||||||
.replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user