public void TestSavePatientItemCopy()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioSavePatientEducationCommand command = new DsioSavePatientEducationCommand(broker);

                DsioPatientEducationItem edItem = new DsioPatientEducationItem()
                {
                    PatientDfn       = "715",
                    CompletedOn      = Util.GetFileManDate(DateTime.Now),
                    EducationItemIen = "8"
                };

                command.AddCommandArguments(edItem);

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
                Assert.IsNotNull(command.Ien);

                broker.Disconnect();
            }
        }
        public IenResult SavePatientItem(PatientEducationItem item)
        {
            IenResult result = new IenResult();

            if (this.broker != null)
            {
                DsioEducationItem dsioEdItem = GetDsioItem(item);

                DsioPatientEducationItem dsioItem = new DsioPatientEducationItem(dsioEdItem);

                dsioItem.EducationItemIen = item.EducationItemIen;
                dsioItem.PatientDfn       = item.PatientDfn;

                dsioItem.CompletedOn = Util.GetFileManDateAndTime(item.CompletedOn);

                DsioSavePatientEducationCommand command = new DsioSavePatientEducationCommand(this.broker);

                command.AddCommandArguments(dsioItem);

                RpcResponse response = command.Execute();

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

                if (result.Success)
                {
                    result.Ien = command.Ien;
                }
            }

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

                DsioSavePatientEducationCommand command = new DsioSavePatientEducationCommand(broker);

                DsioPatientEducationItem edItem = new DsioPatientEducationItem()
                {
                    PatientDfn  = "647",
                    CompletedOn = Util.GetFileManDateAndTime(DateTime.Now),
                    Description = "Testing",
                    Category    = "Other",
                    ItemType    = "E",
                    CodeSystem  = "N",
                    //Url = "http://testurl"
                    //Description = "D234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890",
                    //Category = "C234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890",
                    //ItemType = "L",
                    //CodeSystem = "None",
                    //Url = "U234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890"
                };

                command.AddCommandArguments(edItem);

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
                Assert.IsNotNull(command.Ien);

                broker.Disconnect();
            }
        }
Example #4
0
        private string SaveNewPatientItem(IRpcBroker broker)
        {
            DsioSavePatientEducationCommand command = new DsioSavePatientEducationCommand(broker);

            DsioPatientEducationItem edItem = new DsioPatientEducationItem()
            {
                PatientDfn  = TestConfiguration.DefaultPatientDfn,
                CompletedOn = Util.GetFileManDateAndTime(DateTime.Now),
                Description = "Testing",
                Category    = "Other",
                ItemType    = "E",
                CodeSystem  = "N",
            };

            command.AddCommandArguments(edItem);

            RpcResponse response = command.Execute();

            Assert.AreEqual(RpcResponseStatus.Success, response.Status);
            Assert.IsNotNull(command.Ien);

            return(command.Ien);
        }