Пример #1
0
        public ConsultListResult GetList(string dfn)
        {
            ConsultListResult result = new ConsultListResult();

            if (this.broker != null)
            {
                OrqqcnListCommand command = new OrqqcnListCommand(this.broker);

                command.AddCommandArguments(dfn);

                RpcResponse response = command.Execute();

                result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage);

                if (result.Success)
                {
                    if (command.ConsultList != null)
                    {
                        if (command.ConsultList.Count > 0)
                        {
                            foreach (OrqqcnConsult orqqcnConsult in command.ConsultList)
                            {
                                Consult consult = GetConsult(orqqcnConsult);

                                result.Consults.Add(consult);
                            }
                        }
                    }
                }
            }

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

                OrqqcnListCommand command = new OrqqcnListCommand(broker);

                //command.AddCommandArguments("715");
                command.AddCommandArguments(TestConfiguration.DefaultPatientDfn);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
Пример #3
0
        public void TestConsultList()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                // TODO: Get working with non-programmer
                this.SignonToBroker(broker, 2);

                OrqqcnListCommand command = new OrqqcnListCommand(broker);

                command.AddCommandArguments("715");

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }