本文整理了Java中org.openmrs.Order.setOrderReasonNonCoded()
方法的一些代码示例,展示了Order.setOrderReasonNonCoded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.setOrderReasonNonCoded()
方法的具体详情如下:
包路径:org.openmrs.Order
类名称:Order
方法名:setOrderReasonNonCoded
暂无
代码示例来源:origin: openmrs/openmrs-core
/**
* @see org.openmrs.api.OrderService#discontinueOrder(org.openmrs.Order, String, java.util.Date,
* org.openmrs.Provider, org.openmrs.Encounter)
*/
@Override
public Order discontinueOrder(Order orderToDiscontinue, String reasonNonCoded, Date discontinueDate, Provider orderer,
Encounter encounter) {
if (discontinueDate == null) {
discontinueDate = aMomentBefore(new Date());
}
stopOrder(orderToDiscontinue, discontinueDate, false);
Order newOrder = orderToDiscontinue.cloneForDiscontinuing();
newOrder.setOrderReasonNonCoded(reasonNonCoded);
newOrder.setOrderer(orderer);
newOrder.setEncounter(encounter);
newOrder.setDateActivated(discontinueDate);
return saveOrderInternal(newOrder, null);
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see OrderValidator#validate(Object,Errors)
*/
@Test
public void validate_shouldPassValidationIfFieldLengthsAreCorrect() {
Order order = new Order();
Encounter encounter = new Encounter();
order.setConcept(Context.getConceptService().getConcept(88));
order.setOrderer(Context.getProviderService().getProvider(1));
Patient patient = Context.getPatientService().getPatient(2);
encounter.setPatient(patient);
order.setPatient(patient);
Calendar cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH) - 1);
order.setDateActivated(cal.getTime());
order.setAutoExpireDate(new Date());
order.setCareSetting(new CareSetting());
order.setEncounter(encounter);
order.setUrgency(Order.Urgency.ROUTINE);
order.setAction(Order.Action.NEW);
order.setOrderReasonNonCoded("orderReasonNonCoded");
order.setAccessionNumber("accessionNumber");
order.setCommentToFulfiller("commentToFulfiller");
order.setVoidReason("voidReason");
Errors errors = new BindException(order, "order");
new OrderValidator().validate(order, errors);
Assert.assertFalse(errors.hasErrors());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see OrderService#saveOrder(org.openmrs.Order, OrderContext)
*/
@Test
public void saveOrder_shouldFailIfConceptInPreviousOrderDoesNotMatchThisConcept() {
Order previousOrder = orderService.getOrder(7);
assertTrue(OrderUtilTest.isActiveOrder(previousOrder, null));
Order order = previousOrder.cloneForDiscontinuing();
order.setDateActivated(new Date());
order.setOrderReasonNonCoded("Discontinue this");
order.setEncounter(encounterService.getEncounter(6));
order.setOrderer(providerService.getProvider(1));
Concept newConcept = conceptService.getConcept(5089);
assertFalse(previousOrder.getConcept().equals(newConcept));
order.setConcept(newConcept);
expectedException.expect(EditedOrderDoesNotMatchPreviousException.class);
expectedException.expectMessage("The orderable of the previous order and the new one order don't match");
orderService.saveOrder(order, null);
}
代码示例来源:origin: openmrs/openmrs-core
.setOrderReasonNonCoded("too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text");
order
.setAccessionNumber("too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text too long text");
代码示例来源:origin: openmrs/openmrs-core
target.setCommentToFulfiller(getCommentToFulfiller());
target.setOrderReason(getOrderReason());
target.setOrderReasonNonCoded(getOrderReasonNonCoded());
target.setOrderGroup(getOrderGroup());
target.setSortWeight(getSortWeight());
代码示例来源:origin: openmrs/openmrs-core
target.dateStopped = getDateStopped();
target.setOrderReason(getOrderReason());
target.setOrderReasonNonCoded(getOrderReasonNonCoded());
target.setAccessionNumber(getAccessionNumber());
target.setVoided(getVoided());
内容来源于网络,如有侵权,请联系作者删除!