本文整理汇总了Java中org.oscarehr.common.model.Drug.getRefillQuantity方法的典型用法代码示例。如果您正苦于以下问题:Java Drug.getRefillQuantity方法的具体用法?Java Drug.getRefillQuantity怎么用?Java Drug.getRefillQuantity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscarehr.common.model.Drug
的用法示例。
在下文中一共展示了Drug.getRefillQuantity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: populateDrug
import org.oscarehr.common.model.Drug; //导入方法依赖的package包/类
private void populateDrug(VisitData visitData, Drug drug) {
Medication medication = visitData.addNewMedication();
if(drug.getBrandName() != null && !drug.getBrandName().isEmpty()) {
medication.setMedicationName(drug.getBrandName());
}
if(medication.getMedicationName()==null || medication.getMedicationName().isEmpty()) {
medication.setMedicationName(drug.getCustomName());
}
if(medication.getMedicationName()==null || medication.getMedicationName().isEmpty()) {
medication.setMedicationName(drug.getGenericName());
}
if(medication.getMedicationName()==null || medication.getMedicationName().isEmpty()) {
logger.warn("Could not find name for this drug! " + drug.getId());
}
if(drug.getRegionalIdentifier() != null && !drug.getRegionalIdentifier().isEmpty()) {
try {
medication.setMedicationDIN(drug.getRegionalIdentifier());
} catch(NumberFormatException e) {
logger.warn("regional identifier is not a number (id="+drug.getId()+")");
}
}
if(drug.getRefillQuantity() != null) {
medication.setMedicationNumberofRefills(drug.getRefillQuantity()+"");
}
/*
medication.setMedicationDosage(arg0);
medication.setMedicationDrugStrength(arg0);
medication.setMedicationFrequency(arg0);
*/
medication.setMedicationStartDate(new XmlCalendar(dateFormatter.format(drug.getRxDate())));
}
示例2: 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;
}
示例3: 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;
}
示例4: getDrugDisplayData
import org.oscarehr.common.model.Drug; //导入方法依赖的package包/类
private static DrugDisplayData getDrugDisplayData(Drug drug) {
DrugDisplayData drugDisplayData = new DrugDisplayData();
drugDisplayData.localDrugId = drug.getId();
RxProviderData.Provider prov = new RxProviderData().getProvider(drug.getProviderNo());
drugDisplayData.providerName = prov.getFirstName() + ' ' + prov.getSurname();
drugDisplayData.startDate = RxUtil.DateToString(drug.getRxDate());
drugDisplayData.dateStartDate = drug.getRxDate();
drugDisplayData.endDate = RxUtil.DateToString(drug.getEndDate());
drugDisplayData.writtenDate = RxUtil.DateToString(drug.getWrittenDate());
drugDisplayData.prescriptionDetails = RxPrescriptionData.getFullOutLine(drug.getSpecial()).replaceAll(";", " ");
drugDisplayData.nonAuthoritative = drug.isNonAuthoritative();
drugDisplayData.genericName = drug.getGenericName();
drugDisplayData.customName = drug.getCustomName();
drugDisplayData.brandName = drug.getBrandName();
drugDisplayData.isArchived = drug.isArchived();
drugDisplayData.pickupDate = RxUtil.DateToString(drug.getPickUpDateTime(),"yyyy-MM-dd");
drugDisplayData.pickupTime = RxUtil.DateToString(drug.getPickUpDateTime(),"hh:mm aa");
drugDisplayData.eTreatmentType = drug.getETreatmentType();
drugDisplayData.rxStatus = drug.getRxStatus();
drugDisplayData.dispenseInterval = drug.getDispenseInterval();
drugDisplayData.refillDuration = drug.getRefillDuration();
drugDisplayData.refillQuantity = drug.getRefillQuantity();
return (drugDisplayData);
}