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


Java Drug.getPatientCompliance方法代码示例

本文整理汇总了Java中org.oscarehr.common.model.Drug.getPatientCompliance方法的典型用法代码示例。如果您正苦于以下问题:Java Drug.getPatientCompliance方法的具体用法?Java Drug.getPatientCompliance怎么用?Java Drug.getPatientCompliance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.oscarehr.common.model.Drug的用法示例。


在下文中一共展示了Drug.getPatientCompliance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPrescription

import org.oscarehr.common.model.Drug; //导入方法依赖的package包/类
public Prescription getPrescription(int drugId) {

		DrugDao drugDao = (DrugDao) SpringUtils.getBean("drugDao");
		Drug drug = drugDao.find(drugId);

		Prescription prescription = new Prescription(drugId, drug.getProviderNo(), drug.getDemographicId());
		prescription.setRxCreatedDate(drug.getCreateDate());
		prescription.setRxDate(drug.getRxDate());
		prescription.setEndDate(drug.getEndDate());
		prescription.setWrittenDate(drug.getWrittenDate());
		prescription.setBrandName(drug.getBrandName());
		prescription.setGCN_SEQNO(drug.getGcnSeqNo());
		prescription.setCustomName(drug.getCustomName());
		prescription.setTakeMin(drug.getTakeMin());
		prescription.setTakeMax(drug.getTakeMax());
		prescription.setFrequencyCode(drug.getFreqCode());
		String dur = drug.getDuration();
		if (StringUtils.isBlank(dur) || dur.equalsIgnoreCase("null")) dur = "";
		prescription.setDuration(dur);
		prescription.setDurationUnit(drug.getDurUnit());
		prescription.setQuantity(drug.getQuantity());
		prescription.setDispensingUnits(drug.getDispensingUnits());
		prescription.setRepeat(drug.getRepeat());
		prescription.setLastRefillDate(drug.getLastRefillDate());
		prescription.setNosubs(drug.isNoSubs());
		prescription.setPrn(drug.isPrn());
		prescription.setSpecial(drug.getSpecial());
		prescription.setGenericName(drug.getGenericName());
		prescription.setAtcCode(drug.getAtc());
		prescription.setScript_no(String.valueOf(drug.getScriptNo()));
		prescription.setRegionalIdentifier(drug.getRegionalIdentifier());
		prescription.setUnit(drug.getUnit());
		prescription.setUnitName(drug.getUnitName());
		prescription.setMethod(drug.getMethod());
		prescription.setRoute(drug.getRoute());
		prescription.setDrugForm(drug.getDrugForm());
		prescription.setCustomInstr(drug.isCustomInstructions());
		prescription.setDosage(drug.getDosage());
		prescription.setLongTerm(drug.isLongTerm());
		prescription.setCustomNote(drug.isCustomNote());
		prescription.setPastMed(drug.getPastMed());
		prescription.setDispenseInternal(drug.getDispenseInternal());
		prescription.setStartDateUnknown(drug.getStartDateUnknown());
		prescription.setComment(drug.getComment());
		if (drug.getPatientCompliance() == null) prescription.setPatientCompliance(null);
		else prescription.setPatientCompliance(drug.getPatientCompliance());
		prescription.setOutsideProviderName(drug.getOutsideProviderName());
		prescription.setOutsideProviderOhip(drug.getOutsideProviderOhip());
		prescription.setSpecialInstruction(drug.getSpecialInstruction());
		prescription.setPickupDate(drug.getPickUpDateTime());
		prescription.setPickupTime(drug.getPickUpDateTime());
		prescription.setETreatmentType(drug.getETreatmentType());
		prescription.setRxStatus(drug.getRxStatus());
		if (drug.getDispenseInterval() != null) prescription.setDispenseInterval(drug.getDispenseInterval());
		if (drug.getRefillDuration() != null) prescription.setRefillDuration(drug.getRefillDuration());
		if (drug.getRefillQuantity() != null) prescription.setRefillQuantity(drug.getRefillQuantity());

		if (prescription.getSpecial() == null || prescription.getSpecial().length() <= 6) {
			logger.warn("I strongly suspect something is wrong, either special is null or it appears to not contain anything useful. drugId=" + drugId + ", drug.special=" + prescription.getSpecial());
			logger.warn("data from db is : " + drug.getSpecial());
		}
		prescription.setDispenseInternal(drug.getDispenseInternal());
		return prescription;
	}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:65,代码来源:RxPrescriptionData.java

示例2: toPrescription

import org.oscarehr.common.model.Drug; //导入方法依赖的package包/类
public Prescription toPrescription(Drug drug, int demographicNo) {
	Prescription p = new Prescription(drug.getId(), drug.getProviderNo(), demographicNo);
	p.setRxCreatedDate(drug.getCreateDate());
	p.setRxDate(drug.getRxDate());
	p.setEndDate(drug.getEndDate());
	p.setWrittenDate(drug.getWrittenDate());
	p.setBrandName(drug.getBrandName());
	p.setGCN_SEQNO(drug.getGcnSeqNo());
	p.setCustomName(drug.getCustomName());
	p.setTakeMin(drug.getTakeMin());
	p.setTakeMax(drug.getTakeMax());
	p.setFrequencyCode(drug.getFreqCode());
	p.setDuration(drug.getDuration());
	p.setDurationUnit(drug.getDuration());
	p.setQuantity(drug.getQuantity());
	p.setDispensingUnits(drug.getDispensingUnits());
	p.setRepeat(drug.getRepeat());
	p.setLastRefillDate(drug.getLastRefillDate());
	p.setNosubs(drug.isNoSubs());
	p.setPrn(drug.isPrn());
	p.setSpecial(drug.getSpecial());
	p.setSpecialInstruction(drug.getSpecialInstruction());
	p.setArchived(String.valueOf(drug.isArchived()));
	p.setGenericName(drug.getGenericName());
	p.setAtcCode(drug.getAtc());
	p.setScript_no(ConversionUtils.toIntString(drug.getScriptNo()));
	p.setRegionalIdentifier(drug.getRegionalIdentifier());
	p.setUnit(drug.getUnit());
	p.setUnitName(drug.getUnitName());
	p.setMethod(drug.getMethod());
	p.setRoute(drug.getRoute());
	p.setDrugForm(drug.getDrugForm());
	p.setCustomInstr(drug.isCustomInstructions());
	p.setDosage(drug.getDosage());
	p.setLongTerm(drug.getLongTerm());
	p.setCustomNote(drug.isCustomNote());
	p.setPastMed(drug.getPastMed());
	p.setStartDateUnknown(drug.getStartDateUnknown());
	p.setComment(drug.getComment());
	if (drug.getPatientCompliance() == null) p.setPatientCompliance(null);
	else p.setPatientCompliance(drug.getPatientCompliance());
	p.setOutsideProviderName(drug.getOutsideProviderName());
	p.setOutsideProviderOhip(drug.getOutsideProviderOhip());
	p.setPickupDate(drug.getPickUpDateTime());
	p.setPickupTime(drug.getPickUpDateTime());
	p.setETreatmentType(drug.getETreatmentType());
	p.setRxStatus(drug.getRxStatus());
	if (drug.getDispenseInterval() != null) p.setDispenseInterval(drug.getDispenseInterval());
	if (drug.getRefillDuration() != null) p.setRefillDuration(drug.getRefillDuration());
	if (drug.getRefillQuantity() != null) p.setRefillQuantity(drug.getRefillQuantity());
	p.setHideCpp(drug.getHideFromCpp());
	return p;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:54,代码来源:RxPrescriptionData.java


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