本文整理汇总了Java中org.oscarehr.common.model.Drug.isLongTerm方法的典型用法代码示例。如果您正苦于以下问题:Java Drug.isLongTerm方法的具体用法?Java Drug.isLongTerm怎么用?Java Drug.isLongTerm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscarehr.common.model.Drug
的用法示例。
在下文中一共展示了Drug.isLongTerm方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillRx
import org.oscarehr.common.model.Drug; //导入方法依赖的package包/类
private void fillRx(LoggedInInfo loggedInInfo,List<SummaryItemTo1> list,Integer demographicNo,int count){
List<Drug> drugList = rxManager.getUniqueDrugsByPatient( loggedInInfo, demographicNo);
long now = System.currentTimeMillis();
long month = 1000L * 60L * 60L * 24L * 30L;
for( Drug drug :drugList ) {
if( drug.isArchived() )
continue;
if(drug.isHideFromDrugProfile()) {
continue;
}
String styleColor = "";
if (drug.isCurrent() && (drug.getEndDate().getTime() - now <= month)) {
styleColor="style=\"color:orange;font-weight:bold;\"";
}else if (drug.isCurrent() ) {
styleColor="style=\"color:blue;\"";
}else if (drug.isLongTerm() ) {
styleColor="style=\"color:grey;\"";
}else
continue;
String tmp = "";
if (drug.getFullOutLine()!=null) tmp=drug.getFullOutLine().replaceAll(";", " ");
String strTitle = StringUtils.maxLenString(tmp, MAX_LEN_TITLE, CROP_LEN_TITLE, ELLIPSES);
SummaryItemTo1 summaryItem = new SummaryItemTo1(drug.getId(),strTitle,"action","rx");
summaryItem.setDate(drug.getRxDate());
summaryItem.setAction("../oscarRx/choosePatient.do?demographicNo="+demographicNo); // for now, open the Rx module if the user clicks on any meds.
list.add(summaryItem);
count++;
}
}
示例2: getPrescriptionsByPatientHideDeleted
import org.oscarehr.common.model.Drug; //导入方法依赖的package包/类
public Prescription[] getPrescriptionsByPatientHideDeleted(int demographicNo) {
List<Prescription> lst = new ArrayList<Prescription>();
DrugDao dao = SpringUtils.getBean(DrugDao.class);
for (Drug drug : dao.findByDemographicId(demographicNo)) {
if ((drug.isCurrent() && !drug.isArchived() && !drug.isDeleted() && !drug.isDiscontinued()) || drug.isLongTerm()) {
lst.add(toPrescription(drug, demographicNo));
}
}
return lst.toArray(new Prescription[lst.size()]);
}