public void ValidProviderNpi()
        {
            var provider = new RenderingProvider
            {
                FirstName = "John",
                LastName  = "Smith",
                Npi       = "1234567893"
            };

            var npiValidator = new NpivalidationRule();
            var expected     = false;

            npiValidator.ParseNpi(provider.Npi);
            var actual = npiValidator.InvalidNPI;

            Assert.AreEqual(expected, actual);
        }
        public void ShortProviderNpi()
        {
            var provider = new RenderingProvider
            {
            };

            try
            {
                provider.Npi = "12345678";
            }
            catch (ArgumentException)
            {
                string npi = "1234567893";
                provider.Npi = npi;
                var expected = "1234567893";
                var actual   = npi;
                Assert.AreEqual(actual, expected);
            }
        }
Пример #3
0
        private Provider LoadDefaultRenderingProvider(Patient patient)
        {
            var provider = new RenderingProvider();

            if (!string.IsNullOrEmpty(Settings.Default.RenderingProviderFirstName))
            {
                provider.FirstName = Settings.Default.RenderingProviderFirstName;
            }

            if (!string.IsNullOrEmpty(Settings.Default.RenderingProviderLastName))
            {
                provider.LastName = Settings.Default.RenderingProviderLastName;
            }

            if (!string.IsNullOrEmpty(Settings.Default.RenderingProviderNpi))
            {
                provider.Npi = Settings.Default.RenderingProviderNpi;
            }

            return(provider);
        }