Ejemplo n.º 1
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();
            }
        }
Ejemplo n.º 2
0
        public void TestGetTracking_AllEntries()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetTrackingCommand command = new DsioGetTrackingCommand(broker);

                command.AddGetAllParameters(1, 5);

                RpcResponse response = command.Execute();

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

                if (command.TrackingItems.Count > 0)
                {
                    foreach (DsioTrackingItem item in command.TrackingItems)
                    {
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.Id));
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.Dfn));
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.PatientName));
                        //Assert.IsFalse(string.IsNullOrWhiteSpace(item.Reason));
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.Source));
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.TrackingItemDateTime));
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.TrackingType));
                        Assert.IsFalse(string.IsNullOrWhiteSpace(item.User));
                    }
                }
                broker.Disconnect();
            }
        }
Ejemplo n.º 3
0
        public void TestSignNote()
        {
            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);

                DsioSignANoteCommand command = new DsioSignANoteCommand(broker);

                command.AddCommandArguments(commandCreate.Ien, "NUR1234");

                response = command.Execute();

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

                broker.Disconnect();
            }
        }
        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();
            }
        }
Ejemplo n.º 5
0
        public void TestSaveChecklistItem()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioSaveMccChecklistCommand command = new DsioSaveMccChecklistCommand(broker);

                DsioChecklistItem item = new DsioChecklistItem()
                {
                    Ien                 = "",
                    Description         = "Send Link to Pregnancy Video",
                    ItemType            = DsioChecklistItemType.EducationItem,
                    DueCalculationType  = DsioChecklistCalculationType.WeeksGa,
                    DueCalculationValue = "12",
                    Category            = "Some New Category",
                    EducationIen        = "8"
                };

                //6:Send Link to Pregnancy Video^2:Education Item^2:WEEKS GA^12^0:0^3456

                command.AddCommandArguments(item);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
Ejemplo n.º 6
0
        public void TestSaveNewPatientChecklistItem()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioSaveMccPatChecklistCommand command = new DsioSaveMccPatChecklistCommand(broker);

                DsioPatientChecklistItem item = new DsioPatientChecklistItem()
                {
                    PatientDfn          = "28",
                    PregnancyIen        = "4",
                    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",
                    EducationIen    = "8"
                };

                command.AddCommandArguments(item);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
        private void TestDivisionSet(int userIndex, string divId, RpcResponseStatus expectedResponse)
        {
            Queue <CommandBase> commandQueue = new Queue <CommandBase>();

            using (RpcBroker broker = GetConnectedBroker())
            {
                commandQueue.Enqueue(new XusSignonSetupCommand(broker));

                XusAvCodeCommand avCommand = new XusAvCodeCommand(broker);
                avCommand.AddCommandArguments(ValidAccessCodes[userIndex], ValidVerifyCodes[userIndex]);

                commandQueue.Enqueue(avCommand);

                XusDivisionSetCommand divCommand = new XusDivisionSetCommand(broker, divId);

                commandQueue.Enqueue(divCommand);

                RpcResponse response = ExecuteCommandQueue(commandQueue);

                // *** Check results ***
                Assert.AreEqual(expectedResponse, response.Status);

                broker.Disconnect();
            }
        }
Ejemplo n.º 8
0
        public void TestGetContactNotesByDateRange()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetTiuNotesCommand command = new DsioGetTiuNotesCommand(broker);

                string[] TiuNoteTitleText = new string[] {
                    "PHONE CALL #1 (FIRST CONTACT)",
                    "PHONE CALL #2 (12 WEEKS)",
                    "PHONE CALL #3 (20 WEEKS)",
                    "PHONE CALL #4 (28 WEEKS)",
                    "PHONE CALL #5 (36 WEEKS)",
                    "PHONE CALL #6A (41 WEEKS",
                    "PHONE CALL #6B (12 WEEKS)",
                    "PHONE CALL #7 (6 WEEKS POSTPARTUM) TOPICS",
                    "MCC Phone Call – Additional"
                };

                command.AddCommandArguments(patDfn, TiuNoteTitleText, "08/11/2014", "08/15/2014", 1, 100, true, "", "");

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
                broker.Disconnect();
            }
        }
        public void TestFailedGetUserInfo()
        {
            Queue <CommandBase> commandQueue = new Queue <CommandBase>();

            using (RpcBroker broker = GetConnectedBroker())
            {
                commandQueue.Enqueue(new XusSignonSetupCommand(broker));

                XusAvCodeCommand avCommand = new XusAvCodeCommand(broker);

                avCommand.AddCommandArguments(ValidAccessCodes[0], ValidVerifyCodes[0]);

                //commandQueue.Enqueue(avCommand);

                XusGetUserInfoCommand userInfoCommand = new XusGetUserInfoCommand(broker);

                commandQueue.Enqueue(userInfoCommand);

                RpcResponse response = ExecuteCommandQueue(commandQueue);

                // *** Check results ***
                Assert.AreEqual(RpcResponseStatus.Fail, response.Status);

                broker.Disconnect();
            }
        }
Ejemplo n.º 10
0
        public void TestUserInfoCommand()
        {
            Queue <CommandBase> commandQueue = new Queue <CommandBase>();

            using (RpcBroker broker = GetConnectedBroker())
            {
                commandQueue.Enqueue(new XusSignonSetupCommand(broker));

                XusAvCodeCommand avCommand = new XusAvCodeCommand(broker);

                avCommand.AddCommandArguments(TestConfiguration.ValidAccessCodes[2], TestConfiguration.ValidVerifyCodes[2]);

                commandQueue.Enqueue(avCommand);

                OrwuUserInfoCommand testCommand = new OrwuUserInfoCommand(broker);

                commandQueue.Enqueue(testCommand);

                RpcResponse response = ExecuteCommandQueue(commandQueue);

                // *** Check results ***
                Assert.AreEqual(RpcResponseStatus.Success, response.Status);

                Assert.IsTrue((testCommand.UserInfo.Timeout > 0));

                broker.Disconnect();
            }
        }
Ejemplo n.º 11
0
        public void TestCreateTrackingLog()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioCreateTrackingLogCommand command = new DsioCreateTrackingLogCommand(broker);

                string   dfn       = TestConfiguration.DefaultPatientDfn;
                string   eventType = "0";
                string   reason    = "Pregnant";
                string[] comment   = new string[] { "line1", "line2" };

                command.AddCommandArguments(dfn, eventType, reason, comment);

                RpcResponse response = command.Execute();

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

                eventType = "1";

                command.AddCommandArguments(dfn, eventType, reason, comment);

                response = command.Execute();

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

                broker.Disconnect();
            }
        }
        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();
            }
        }
Ejemplo n.º 13
0
        public void TestHasKeyCommand()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                TestHasSecurityKeyCommand(broker, "WEBM ADMIN");

                broker.Disconnect();
            }
        }
Ejemplo n.º 14
0
        public void TestSavePatientItem()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                SaveNewPatientItem(broker);

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

                DsioGetEducationItemsCommand getCommand = new DsioGetEducationItemsCommand(broker);

                getCommand.AddCommandArguments("", "", "", 0, 0, 0);

                RpcResponse response = getCommand.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
                Assert.IsNotNull(getCommand.EducationItems);

                if (getCommand.EducationItems.Count > 0)
                {
                    DsioEducationItem item = getCommand.EducationItems[getCommand.EducationItems.Count - 1];

                    string newDescription = "Edited Description " + DateTime.Now.ToString("yyMMdd");
                    item.Description = newDescription;
                    item.CodeSystem  = "N";

                    DsioSaveEducationItemCommand saveCommand = new DsioSaveEducationItemCommand(broker);

                    saveCommand.AddCommandArguments(item);

                    response = saveCommand.Execute();

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

                    getCommand.AddCommandArguments(item.Ien, "", "", 0, 0, 0);

                    response = getCommand.Execute();

                    // NOTE: This is failing because total results are missing from command response...waiting for fix...

                    Assert.AreEqual(RpcResponseStatus.Success, response.Status);
                    Assert.IsNotNull(getCommand.EducationItems);

                    DsioEducationItem editedItem = getCommand.EducationItems[0];

                    Assert.AreEqual(item.Description, editedItem.Description);
                }

                broker.Disconnect();
            }
        }
Ejemplo n.º 16
0
        private bool TestConnect(string server, int port)
        {
            bool returnVal = false;

            using (RpcBroker broker = new RpcBroker(server, port))
            {
                returnVal = broker.Connect();

                if (returnVal)
                {
                    broker.Disconnect();
                }
            }

            return(returnVal);
        }
Ejemplo n.º 17
0
        public void TestEmptyRpcName()
        {
            using (RpcBroker broker = new RpcBroker("", validServerPort))
            {
                if (broker.Connect())
                {
                    broker.CallRpc("", "", "", null);

                    broker.Disconnect();
                }
                else
                {
                    Assert.Fail("No connection");
                }
            }
        }
Ejemplo n.º 18
0
        public void TestPatientFind()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioPatientListCommand command = new DsioPatientListCommand(broker);

                command.AddCommandArguments(TestConfiguration.PatientSearchILast4[0], -1, -1);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
        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();
            }
        }
Ejemplo n.º 20
0
        public void TestGetPatientChecklistItem()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetMccPatientChecklistCommand command = new DsioGetMccPatientChecklistCommand(broker);

                command.AddCommandArguments("715", "", "5", DsioChecklistCompletionStatus.Unknown);

                RpcResponse response = command.Execute();

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

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

                OrqqcnDetailCommand command = new OrqqcnDetailCommand(broker);

                command.AddCommandArguments(TestConfiguration.ValidConsultIen);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
Ejemplo n.º 22
0
        public void TestGetChecklistItems()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetMccChecklistCommand command = new DsioGetMccChecklistCommand(broker);

                command.AddCommandArguments("", 1, 100);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
Ejemplo n.º 23
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();
            }
        }
        public void TestGetEducationItemsOnePage()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetEducationItemsCommand command = new DsioGetEducationItemsCommand(broker);

                command.AddCommandArguments("", "", "", 3, 2, 0);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }