Exemple #1
0
        public RadiologyReportsResult GetReports(string dfn)
        {
            RadiologyReportsResult result = new RadiologyReportsResult();

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

                command.AddCommandArguments(dfn);

                RpcResponse response = command.Execute();

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

                if (result.Success)
                {
                    if (command.ReportList != null)
                    {
                        foreach (OrwrpReport orwrpReport in command.ReportList)
                        {
                            RadiologyReport report = GetRadiologyReport(orwrpReport);

                            result.Items.Add(report);
                        }
                    }
                }
            }

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

                OrwrpReportTextCommand command = new OrwrpReportTextCommand(broker);

                command.AddCommandArguments(TestConfiguration.DefaultPatientDfn);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }