public BrokerOperationResult DeleteNote(string ien, string justification)
        {
            BrokerOperationResult result = new BrokerOperationResult();

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

                command.AddCommandArguments(ien, justification);

                RpcResponse response = command.Execute();

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

            return(result);
        }
Esempio n. 2
0
        public void TestDeleteNote()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioCreateANoteCommand commandCreate = new DsioCreateANoteCommand(broker);

                commandCreate.AddCommandArguments(patDfn, "MCC DASHBOARD NOTE", "Note text for Friday", "test subject", new DsioNoteData(), "");

                RpcResponse response = commandCreate.Execute();

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

                DsioDeleteANoteCommand command = new DsioDeleteANoteCommand(broker);

                command.AddCommandArguments(commandCreate.Ien, "This note was added to the wrong patient");

                response = command.Execute();

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