private TiuNoteResult GetDashboardNote(string ien, DsioGetRecordTextMode mode)
        {
            // TODO: Get header information also...

            TiuNoteResult result = new TiuNoteResult();

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

                command.AddCommandArgument(ien, mode);

                RpcResponse response = command.Execute();

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

                if (result.Success)
                {
                    result.Note = new TiuNote()
                    {
                        NoteText = command.RecordText, Ien = ien
                    }
                }
                ;
            }

            return(result);
        }
Beispiel #2
0
        public void TestGetProgressNoteText()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioCreateANoteCommand command = new DsioCreateANoteCommand(broker);

                command.AddCommandArguments(TestConfiguration.DefaultPatientDfn, "MCC DASHBOARD NOTE", "Note Text Here", "Some Subject", new DsioNoteData(), "");

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status, "MCC DASHBOARD NOTE could not be created");

                Assert.IsFalse(string.IsNullOrWhiteSpace(command.Ien));

                DsioGetRecordTextCommand getCommand = new DsioGetRecordTextCommand(broker);

                getCommand.AddCommandArgument(command.Ien, DsioGetRecordTextMode.HeaderAndBody);

                response = command.Execute();

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

                broker.Disconnect();
            }
        }
Beispiel #3
0
        public void TestGetProgressNoteTextMissing()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetRecordTextCommand command = new DsioGetRecordTextCommand(broker);

                command.AddCommandArgument("9999", DsioGetRecordTextMode.HeaderAndBody);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }