if (order.getQuantityUnits() != null) { List<Concept> drugDispensingUnits = orderService.getDrugDispensingUnits(); if (!drugDispensingUnits.contains(order.getQuantityUnits())) { errors.rejectValue("quantityUnits", "DrugOrder.error.notAmongAllowedConcepts");
/** * @see org.openmrs.Order#copyHelper(Order) */ protected DrugOrder copyHelper(DrugOrder target) { super.copyHelper(target); target.setDose(getDose()); target.setDoseUnits(getDoseUnits()); target.setFrequency(getFrequency()); target.setAsNeeded(getAsNeeded()); target.setAsNeededCondition(getAsNeededCondition()); target.setQuantity(getQuantity()); target.setQuantityUnits(getQuantityUnits()); target.setDrug(getDrug()); target.setDosingType(getDosingType()); target.setDosingInstructions(getDosingInstructions()); target.setDuration(getDuration()); target.setDurationUnits(getDurationUnits()); target.setNumRefills(getNumRefills()); target.setRoute(getRoute()); target.setBrandName(getBrandName()); target.setDispenseAsWritten(getDispenseAsWritten()); target.setDrugNonCoded(getDrugNonCoded()); return target; }
/** * @see Order#cloneForRevisionHelper(Order) */ protected DrugOrder cloneForRevisionHelper(DrugOrder target) { super.cloneForRevisionHelper(target); target.setDose(getDose()); target.setDoseUnits(getDoseUnits()); target.setFrequency(getFrequency()); target.setAsNeeded(getAsNeeded()); target.setAsNeededCondition(getAsNeededCondition()); target.setQuantity(getQuantity()); target.setQuantityUnits(getQuantityUnits()); target.setDrug(getDrug()); target.setDosingType(getDosingType()); target.setDosingInstructions(getDosingInstructions()); target.setDuration(getDuration()); target.setDurationUnits(getDurationUnits()); target.setRoute(getRoute()); target.setNumRefills(getNumRefills()); target.setBrandName(getBrandName()); target.setDispenseAsWritten(getDispenseAsWritten()); target.setDrugNonCoded(getDrugNonCoded()); return target; }
order.setFrequency(duplicateOrder.getFrequency()); order.setQuantity(duplicateOrder.getQuantity()); order.setQuantityUnits(duplicateOrder.getQuantityUnits()); order.setNumRefills(duplicateOrder.getNumRefills());
order.setFrequency(orderToDiscontinue.getFrequency()); order.setQuantity(orderToDiscontinue.getQuantity()); order.setQuantityUnits(orderToDiscontinue.getQuantityUnits()); order.setNumRefills(orderToDiscontinue.getNumRefills());
drugOrder.setFrequency(duplicateOrder.getFrequency()); drugOrder.setQuantity(duplicateOrder.getQuantity()); drugOrder.setQuantityUnits(duplicateOrder.getQuantityUnits()); drugOrder.setNumRefills(duplicateOrder.getNumRefills());
if (lastRevision.getQuantityUnits() != null) { quantityUnitsWidget.setInitialValue(lastRevision.getQuantityUnits().getId());