本文整理匯總了Java中org.oscarehr.common.model.PreventionExt.getVal方法的典型用法代碼示例。如果您正苦於以下問題:Java PreventionExt.getVal方法的具體用法?Java PreventionExt.getVal怎麽用?Java PreventionExt.getVal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.oscarehr.common.model.PreventionExt
的用法示例。
在下文中一共展示了PreventionExt.getVal方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getPreventionComment
import org.oscarehr.common.model.PreventionExt; //導入方法依賴的package包/類
public static String getPreventionComment(String id) {
log.debug("Calling getPreventionComment " + id);
String comment = null;
try {
List<PreventionExt> preventionExts = preventionExtDao.findByPreventionIdAndKey(Integer.valueOf(id), "comments");
for (PreventionExt preventionExt : preventionExts) {
comment = preventionExt.getVal();
if (comment != null && comment.trim().equals("")) comment = null;
break;
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return comment;
}
示例2: getPreventionComment
import org.oscarehr.common.model.PreventionExt; //導入方法依賴的package包/類
public static String getPreventionComment(String id) {
log.debug("Calling getPreventionComment " + id);
String comment = null;
try {
List<PreventionExt> preventionExts = preventionExtDao.findByPreventionIdAndKey(Integer.valueOf(id), "comments");
for (PreventionExt preventionExt : preventionExts) {
comment = preventionExt.getVal();
if (comment!=null && comment.trim().equals("")) comment = null;
break;
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return comment;
}
示例3: getExtValue
import org.oscarehr.common.model.PreventionExt; //導入方法依賴的package包/類
public static String getExtValue(String id, String keyval) {
try {
List<PreventionExt> preventionExts = preventionExtDao.findByPreventionIdAndKey(Integer.valueOf(id), keyval);
for (PreventionExt preventionExt : preventionExts) {
return preventionExt.getVal();
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return "";
}
示例4: getExtValue
import org.oscarehr.common.model.PreventionExt; //導入方法依賴的package包/類
public static String getExtValue(String id, String keyval) {
try {
List<PreventionExt> preventionExts = preventionExtDao.findByPreventionIdAndKey(Integer.valueOf(id), keyval);
for (PreventionExt preventionExt : preventionExts) {
return preventionExt.getVal();
}
}
catch (Exception e) {
log.error(e.getMessage(), e);
}
return "";
}
示例5: propulateRourkeFromImmunization
import org.oscarehr.common.model.PreventionExt; //導入方法依賴的package包/類
private void propulateRourkeFromImmunization(LoggedInInfo loggedInInfo, RBR rourke) {
PreventionDao preventionDao = SpringUtils.getBean(PreventionDao.class);
PreventionExtDao preventionExtDao = SpringUtils.getBean(PreventionExtDao.class);
List<String> immunizationPreventionTypes = new ArrayList<String>();
//Prepare list of prevention types which are immunizations
PreventionDisplayConfig pdc = PreventionDisplayConfig.getInstance(loggedInInfo);
ArrayList<HashMap<String,String>> prevList = pdc.getPreventions(loggedInInfo);
for (int k =0 ; k < prevList.size(); k++){
HashMap<String,String> a = new HashMap<String,String>();
a.putAll(prevList.get(k));
if (a != null && a.get("layout") != null && a.get("layout").equals("injection")){
if (a.get("name") != null) immunizationPreventionTypes.add(a.get("name"));
}
}
//Map list of prevention types to Vaccine Name in spec
if (preventionType.isEmpty()) {
preventionType.put("Rot", 1);
preventionType.put("DTaP-IPV-Hib", 2);
preventionType.put("Pneu-C", 3);
preventionType.put("MenC-C", 4);
preventionType.put("Men-C-ACWY", 5);
preventionType.put("HepB", 6);
preventionType.put("MMR", 7);
preventionType.put("MMRV", 7);
preventionType.put("VZ", 8);
preventionType.put("DTaP-IPV", 9);
preventionType.put("HPV", 10);
preventionType.put("HPV Vaccine", 10);
preventionType.put("dTap", 11);
preventionType.put("Flu", 12);
}
List<Prevention> preventions = preventionDao.findByDemographicId(Integer.valueOf(demographicNo));
for (Prevention prevention : preventions) {
if (!immunizationPreventionTypes.contains(prevention.getPreventionType())) continue;
IMMUNIZATION imm = rourke.addNewIMMUNIZATION();
imm.setDateGiven(dateToCal(prevention.getPreventionDate()));
if (preventionType.get(prevention.getPreventionType())!=null) {
imm.setVaccineName(preventionType.get(prevention.getPreventionType()));
} else {
imm.setVaccineName(13);
imm.setVaccineNameOther(prevention.getPreventionType());
}
List<PreventionExt> preventionExts = preventionExtDao.findByPreventionId(prevention.getId());
for (PreventionExt preventionExt : preventionExts) {
String key = preventionExt.getkeyval();
String val = preventionExt.getVal();
if (StringUtils.empty(key)) continue;
if (StringUtils.empty(val)) continue;
if (key.equals("name")) {
if (imm.getVaccineNameOther()==null) imm.setVaccineNameOther(val);
}
else if (key.equals("lot")) imm.setLotNumber(val);
else if (key.equals("comments")) imm.setComments(val);
}
}
}
示例6: propulateRourkeFromImmunization
import org.oscarehr.common.model.PreventionExt; //導入方法依賴的package包/類
private void propulateRourkeFromImmunization(RBR rourke) {
PreventionDao preventionDao = SpringUtils.getBean(PreventionDao.class);
PreventionExtDao preventionExtDao = SpringUtils.getBean(PreventionExtDao.class);
List<String> immunizationPreventionTypes = new ArrayList<String>();
//Prepare list of prevention types which are immunizations
PreventionDisplayConfig pdc = PreventionDisplayConfig.getInstance();
ArrayList<HashMap<String,String>> prevList = pdc.getPreventions();
for (int k =0 ; k < prevList.size(); k++){
HashMap<String,String> a = new HashMap<String,String>();
a.putAll(prevList.get(k));
if (a != null && a.get("layout") != null && a.get("layout").equals("injection")){
if (a.get("name") != null) immunizationPreventionTypes.add(a.get("name"));
}
}
List<Prevention> preventions = preventionDao.findByDemographicId(Integer.valueOf(demographicNo));
for (Prevention prevention : preventions) {
if (!immunizationPreventionTypes.contains(prevention.getPreventionType())) continue;
IMMUNIZATION imm = rourke.addNewIMMUNIZATION();
imm.setDateGiven(dateToCal(prevention.getPreventionDate()));
List<PreventionExt> preventionExts = preventionExtDao.findByPreventionId(prevention.getId());
for (PreventionExt preventionExt : preventionExts) {
String key = preventionExt.getkeyval();
String val = preventionExt.getVal();
if (StringUtils.empty(key)) continue;
if (StringUtils.empty(val)) continue;
if (key.equals("name")) {
if (val.equalsIgnoreCase("Rotavirus")) imm.setVaccineName(1);
else if (val.equalsIgnoreCase("DTaP/IPV/Hib")) imm.setVaccineName(2);
else if (val.equalsIgnoreCase("Pneu-Conj")) imm.setVaccineName(3);
else if (val.equalsIgnoreCase("Men-C-C")) imm.setVaccineName(4);
else if (val.equalsIgnoreCase("Men-C-ACWY")) imm.setVaccineName(5);
else if (val.equalsIgnoreCase("Hepatitis B")) imm.setVaccineName(6);
else if (val.equalsIgnoreCase("MMR/MMRV")) imm.setVaccineName(7);
else if (val.equalsIgnoreCase("Varicella")) imm.setVaccineName(8);
else if (val.equalsIgnoreCase("DTaP/IPV")) imm.setVaccineName(9);
else if (val.equalsIgnoreCase("HPV")) imm.setVaccineName(10);
else if (val.equalsIgnoreCase("dTap")) imm.setVaccineName(11);
else if (val.equalsIgnoreCase("Influenza")) imm.setVaccineName(12);
else {
imm.setVaccineName(13);
imm.setVaccineNameOther(val);
}
}
else if (key.equals("lot")) imm.setLotNumber(val);
else if (key.equals("comments")) imm.setComments(val);
}
}
}