org.openmrs.Order.setAccessionNumber()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.openmrs.Order.setAccessionNumber()方法的一些代码示例,展示了Order.setAccessionNumber()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.setAccessionNumber()方法的具体详情如下:
包路径:org.openmrs.Order
类名称:Order
方法名:setAccessionNumber

Order.setAccessionNumber介绍

暂无

代码示例

代码示例来源: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

.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");
order
    .setCommentToFulfiller("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 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 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 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

/**
   * @see TestOrder#cloneForRevision()
   */
  @Test
  public void cloneForRevision_shouldSetTheRelevantFieldsForADCOrder() {
    Order order = new TestOrder();
    order.setAction(Order.Action.DISCONTINUE);
    Date date = new Date();
    order.setDateActivated(date);
    order.setAutoExpireDate(date);
    order.setAccessionNumber("some number");
    OrderUtilTest.setDateStopped(order, date);
    order.setPreviousOrder(new Order());
    
    Order clone = order.cloneForRevision();
    assertEquals(Order.Action.DISCONTINUE, clone.getAction());
    assertEquals(order.getDateActivated(), clone.getDateActivated());
    assertEquals(order.getPreviousOrder(), clone.getPreviousOrder());
    assertNull(clone.getAutoExpireDate());
    assertNull(clone.getDateStopped());
    assertNull(clone.getAccessionNumber());
  }
}

代码示例来源:origin: openmrs/openmrs-core

/**
 * @see Order#cloneForRevision()
 */
@Test
public void cloneForRevision_shouldSetTheRelevantFieldsForADCOrder() throws Exception {
  Order order = new Order();
  order.setAction(Order.Action.DISCONTINUE);
  Date date = new Date();
  order.setDateActivated(date);
  order.setPreviousOrder(new Order());
  order.setAutoExpireDate(date);
  order.setAccessionNumber("some number");
  OrderUtilTest.setDateStopped(order, date);
  
  Order clone = order.cloneForRevision();
  assertEquals(Order.Action.DISCONTINUE, clone.getAction());
  assertEquals(order.getDateActivated(), clone.getDateActivated());
  assertEquals(order.getPreviousOrder(), clone.getPreviousOrder());
  assertNull(clone.getAutoExpireDate());
  assertNull(clone.getDateStopped());
  assertNull(clone.getAccessionNumber());
}

代码示例来源:origin: openmrs/openmrs-core

/**
 * @throws Exception
 * @see DrugOrder#cloneForRevision()
 */
@Test
public void cloneForRevision_shouldSetTheRelevantFieldsForADCOrder() {
  Order order = new DrugOrder();
  order.setAction(Order.Action.DISCONTINUE);
  Date date = new Date();
  order.setDateActivated(date);
  order.setAutoExpireDate(date);
  order.setAccessionNumber("some number");
  OrderUtilTest.setDateStopped(order, date);
  order.setPreviousOrder(new Order());
  
  Order clone = order.cloneForRevision();
  assertEquals(Order.Action.DISCONTINUE, clone.getAction());
  assertEquals(order.getDateActivated(), clone.getDateActivated());
  assertEquals(order.getPreviousOrder(), clone.getPreviousOrder());
  assertNull(clone.getAutoExpireDate());
  assertNull(clone.getDateStopped());
  assertNull(clone.getAccessionNumber());
}

代码示例来源:origin: openmrs/openmrs-core

target.setOrderReason(getOrderReason());
target.setOrderReasonNonCoded(getOrderReasonNonCoded());
target.setAccessionNumber(getAccessionNumber());
target.setVoided(getVoided());
target.setVoidedBy(getVoidedBy());

相关文章