Examples of OrderService


Examples of org.openmrs.api.OrderService

   * @return
   */
  public static Set<Order> standardRegimenToDrugOrders(RegimenSuggestion rs, Date startDate, Patient patient){
    Set<Order> ret = new HashSet<Order>();
    if (rs != null){
      OrderService orderService = Context.getOrderService();
      ConceptService conceptService = Context.getConceptService();
      for (DrugSuggestion ds : rs.getDrugComponents()){
        DrugOrder dor = new DrugOrder();
        Drug drug = Context.getConceptService().getDrugByNameOrId(ds.getDrugId());
        if (drug == null)
View Full Code Here

Examples of org.springframework.samples.jpetstore.domain.logic.OrderService

  public void invokeOrderServices(int orderId, int nrOfCalls) {
    StopWatch stopWatch = new StopWatch(nrOfCalls + " OrderService call(s)");
    Map orderServices = this.beanFactory.getBeansOfType(OrderService.class);
    for (Iterator it = orderServices.keySet().iterator(); it.hasNext();) {
      String beanName = (String) it.next();
      OrderService orderService = (OrderService) orderServices.get(beanName);
      System.out.println("Calling OrderService '" + beanName + "' with order ID " + orderId);
      stopWatch.start(beanName);
      Order order = null;
      for (int i = 0; i < nrOfCalls; i++) {
        order = orderService.getOrder(orderId);
      }
      stopWatch.stop();
      if (order != null) {
        printOrder(order);
      }
View Full Code Here

Examples of test.complex.OrderService

        JbiProxyFactoryBean pf = new JbiProxyFactoryBean();
        pf.setContainer(container);
        pf.setInterfaceName(orderEndpoint.getInterfaceName());
        pf.setEndpoint(orderEndpoint.getEndpoint());
        pf.setType(OrderService.class);
        OrderService orderService = (OrderService) pf.getObject();

        // Prepare cart for order request
        Cart cart = new Cart();
        OrderItem orderItem = new OrderItem();
        orderItem.setCount(2);
        orderItem.setItem("Book");
        cart.getItems().add(orderItem);

        // Call the service
        OrderConfirmation orderConfirmation = orderService.order(cart);
        orderConfirmation = orderService.order(cart);
        orderConfirmation = orderService.order(cart);

        // Check that we get the expected order confirmation
        assertNotNull(orderConfirmation);
        cart = orderConfirmation.getCart();
        assertNotNull(cart);
View Full Code Here

Examples of test.complex.OrderService

        JbiProxyFactoryBean pf = new JbiProxyFactoryBean();
        pf.setContainer(container);
        pf.setInterfaceName(orderEndpoint.getInterfaceName());
        pf.setEndpoint(orderEndpoint.getEndpoint());
        pf.setType(OrderService.class);
        OrderService orderService = (OrderService) pf.getObject();
       
        // Prepare cart for order request
        Cart cart = new Cart();
        OrderItem orderItem = new OrderItem();
        orderItem.setCount(2);
        orderItem.setItem("Book");
        cart.getItems().add(orderItem);
       
        // Call the service
    OrderConfirmation orderConfirmation = orderService.order(cart);
    orderConfirmation = orderService.order(cart);
    orderConfirmation = orderService.order(cart);
   
    // Check that we get the expected order confirmation
    assertNotNull(orderConfirmation);
    cart = orderConfirmation.getCart();
    assertNotNull(cart);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.