if (o.getCareSetting() == null) {
CareSetting careSetting = getCareSetting(session, submission);
o.setCareSetting(careSetting);
}
Order discontinuationOrder = null;
if (discontinuedDate != null) {
discontinuationOrder = newDiscontinuationOrder(discontinuedDate, discontinuedReasonStr, o);
}
session.getSubmissionActions().getCurrentEncounter().addOrder(o);
if (discontinuationOrder != null) {