Exemple #1
0
        public void TestGetTracking_FlaggedPatients()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetTrackingCommand command = new DsioGetTrackingCommand(broker);

                command.AddGetFlaggedPatientsParameters(1, 1000);

                RpcResponse response = command.Execute();

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

                broker.Disconnect();
            }
        }
        public FlaggedPatientsResult GetFlaggedPatients(int page, int itemsPerPage)
        {
            // *** Gets a list of flagged patients ***

            FlaggedPatientsResult result = new FlaggedPatientsResult();

            // *** Create the command ***
            DsioGetTrackingCommand command = new DsioGetTrackingCommand(this.broker);

            // *** Add the parameters ***
            command.AddGetFlaggedPatientsParameters(page, itemsPerPage);

            // *** Execute the command ***
            RpcResponse response = command.Execute();

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

            // *** Check for success and results ***
            if (result.Success)
            {
                if (command.FlaggedPatientResult != null)
                {
                    if (command.FlaggedPatientResult.FlaggedPatients != null)
                    {
                        if (command.FlaggedPatientResult.FlaggedPatients.Count > 0)
                        {
                            result.Patients = ProcessDsioFlaggedPatients(command.FlaggedPatientResult.FlaggedPatients);

                            result.TotalResults = command.TotalResults;
                        }
                    }
                }
            }

            return(result);
        }