/** * @see DosingInstructions#getDosingInstructions(DrugOrder) */ @Override public DosingInstructions getDosingInstructions(DrugOrder order) { if (!order.getDosingType().equals(this.getClass())) { throw new APIException("DrugOrder.error.dosingTypeIsMismatched", new Object[] { this.getClass().getName(), order.getDosingType() }); } SimpleDosingInstructions simpleDosingInstructions = new SimpleDosingInstructions(); simpleDosingInstructions.setDose(order.getDose()); simpleDosingInstructions.setDoseUnits(order.getDoseUnits()); simpleDosingInstructions.setRoute(order.getRoute()); simpleDosingInstructions.setFrequency(order.getFrequency()); simpleDosingInstructions.setDuration(order.getDuration()); simpleDosingInstructions.setDurationUnits(order.getDurationUnits()); simpleDosingInstructions.setAsNeeded(order.getAsNeeded()); simpleDosingInstructions.setAsNeededCondition(order.getAsNeededCondition()); simpleDosingInstructions.setAdministrationInstructions(order.getDosingInstructions()); return simpleDosingInstructions; }
/** * @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; }
/** * @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; }