Exemple #1
0
        public OrderListResult GetList(string patientDfn, int page, int itemsPerPage)
        {
            OrderListResult result = new OrderListResult();

            DsioGetOrderListCommand command = new DsioGetOrderListCommand(this.broker);

            command.AddCommandArguments(patientDfn, page, itemsPerPage);

            RpcResponse response = command.Execute();

            result.Success = response.Status == RpcResponseStatus.Success;
            result.Message = response.InformationalMessage;

            if (result.Success)
            {
                if (command.Orders != null)
                {
                    if (command.Orders.Count > 0)
                    {
                        foreach (DsioOrder dsioOrder in command.Orders)
                        {
                            Order tempOrder = GetOrder(dsioOrder);

                            result.OrderList.Add(tempOrder);
                        }
                    }
                }

                result.TotalResults = command.TotalResults;
            }

            return(result);
        }
        public void TestGetOrderList()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetOrderListCommand command = new DsioGetOrderListCommand(broker);

                command.AddCommandArguments(TestConfiguration.PatientWithOrdersDfn, 1, 10);
                //command.AddCommandArguments("715");

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
            }
        }