public void InvalidSurgicalSpecialtyStdDev()
        {
            // Arrange
            IAbstractFactory abstractFactory = AbstractFactory.Create();

            IDependenciesAbstractFactory dependenciesAbstractFactory = abstractFactory.CreateDependenciesAbstractFactory();

            IPatientLengthOfStayInputContext patientLengthOfStayInputContext = abstractFactory.CreateContextsAbstractFactory().CreatePatientLengthOfStayInputContextFactory().Create(
                specialty: dependenciesAbstractFactory.CreateCodeableConceptFactory().Create(BoneAndMarrowTransplantationSurgery, SNOMEDCT, null),
                statistic: dependenciesAbstractFactory.CreateValueFactory().CreateStdDev());

            IPatientLengthOfStayExport patientLengthOfStayExport = abstractFactory.CreateExportsAbstractFactory().CreatePatientLengthOfStayExportFactory().Create();

            // Act
            Action action = () =>
            {
                IPatientLengthOfStayOutputContext surgicalDurationOutputContext = patientLengthOfStayExport.GetPatientLengthOfStay(
                    abstractFactory,
                    patientLengthOfStayInputContext);
            };

            // Assert
            Assert.ThrowsException <NullReferenceException>(
                action);
        }
        public void Table1(
            string specialty,
            decimal value,
            string unit,
            string statistic)
        {
            // Arrange
            IAbstractFactory abstractFactory = AbstractFactory.Create();

            IDependenciesAbstractFactory dependenciesAbstractFactory = abstractFactory.CreateDependenciesAbstractFactory();

            IPatientLengthOfStayInputContext patientLengthOfStayInputContext = abstractFactory.CreateContextsAbstractFactory().CreatePatientLengthOfStayInputContextFactory().Create(
                specialty: dependenciesAbstractFactory.CreateCodeableConceptFactory().Create(specialty, SNOMEDCT, null),
                statistic: dependenciesAbstractFactory.CreateValueFactory().Create(statistic));

            IPatientLengthOfStayExport patientLengthOfStayExport = abstractFactory.CreateExportsAbstractFactory().CreatePatientLengthOfStayExportFactory().Create();

            // Act
            IPatientLengthOfStayOutputContext patientLengthOfStayOutputContext = patientLengthOfStayExport.GetPatientLengthOfStay(
                abstractFactory,
                patientLengthOfStayInputContext);

            // Assert
            Assert.AreEqual(
                expected: value,
                actual: patientLengthOfStayOutputContext.Duration.Value.Value);

            Assert.AreEqual(
                expected: unit,
                actual: patientLengthOfStayOutputContext.Duration.UnitElement.Value);
        }
Exemple #3
0
        public IPatientLengthOfStayOutputContext Create(
            Duration duration)
        {
            IPatientLengthOfStayOutputContext context = null;

            try
            {
                context = new PatientLengthOfStayOutputContext(
                    duration);
            }
            finally
            {
            }

            return(context);
        }
        public void EarNoseThroatSurgeryInvalidStatistic()
        {
            // Arrange
            IAbstractFactory abstractFactory = AbstractFactory.Create();

            IDependenciesAbstractFactory dependenciesAbstractFactory = abstractFactory.CreateDependenciesAbstractFactory();

            IPatientLengthOfStayInputContext patientLengthOfStayInputContext = abstractFactory.CreateContextsAbstractFactory().CreatePatientLengthOfStayInputContextFactory().Create(
                specialty: dependenciesAbstractFactory.CreateCodeableConceptFactory().CreateEarNoseThroatSurgery(),
                statistic: dependenciesAbstractFactory.CreateValueFactory().Create(skew));

            IPatientLengthOfStayExport patientLengthOfStayExport = abstractFactory.CreateExportsAbstractFactory().CreatePatientLengthOfStayExportFactory().Create();

            // Act
            IPatientLengthOfStayOutputContext patientLengthOfStayOutputContext = patientLengthOfStayExport.GetPatientLengthOfStay(
                abstractFactory,
                patientLengthOfStayInputContext);

            // Assert
            Assert.IsNull(
                patientLengthOfStayOutputContext.Duration);
        }