当前位置: 首页>>代码示例>>Java>>正文


Java PreventionExt.getVal方法代码示例

本文整理汇总了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;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:17,代码来源:PreventionData.java

示例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;
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:17,代码来源:PreventionData.java

示例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 "";
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:12,代码来源:PreventionData.java

示例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 "";
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:13,代码来源:PreventionData.java

示例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);
		}
	}
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:64,代码来源:BORN18MFormToXML.java

示例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);
		}
	}
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:54,代码来源:BORN18MFormToXML.java


注:本文中的org.oscarehr.common.model.PreventionExt.getVal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。