Ejemplo n.º 1
0
        public BrokerOperationResult DeletePregnancyItem(string dfn, string ien)
        {
            BrokerOperationResult result = new BrokerOperationResult();

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

                command.AddCommandArguments(dfn, ien);

                RpcResponse response = command.Execute();

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

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

                DsioPregnancy preg = this.GetOrCreatePregnancy(broker, TestConfiguration.DefaultPatientDfn);

                Assert.IsNotNull(preg);

                DsioSaveMccPatChecklistCommand saveCommand = new DsioSaveMccPatChecklistCommand(broker);

                DsioPatientChecklistItem item = new DsioPatientChecklistItem()
                {
                    PatientDfn          = TestConfiguration.DefaultPatientDfn,
                    PregnancyIen        = preg.Ien,
                    Category            = "First Trimester Requirements",
                    Description         = "Friday Tests",
                    ItemType            = DsioChecklistItemType.Lab,
                    DueCalculationType  = DsioChecklistCalculationType.None,
                    DueCalculationValue = "0",
                    CompletionStatus    = DsioChecklistCompletionStatus.Complete,
                    Link            = "12345",
                    SpecificDueDate = Util.GetFileManDate(new DateTime(2014, 9, 1)),
                    CompletionLink  = "54321",
                    Note            = "Checklist Item Note Text",
                    InProgress      = "1"
                };

                saveCommand.AddCommandArguments(item);

                RpcResponse response = saveCommand.Execute();

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

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

                DsioDeleteMccPatChklstCommand delCommand = new DsioDeleteMccPatChklstCommand(broker);

                delCommand.AddCommandArguments(TestConfiguration.DefaultPatientDfn, saveCommand.Ien);

                response = delCommand.Execute();

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