Example #1
0
        /// <summary> //////////////////////////////////////////////////////////////////////////
        /// Person constructor - Uses input from DISEASE RR file to create a person object
        /// that stores relative risk as a function of disease state.
        /// </summary> /////////////////////////////////////////////////////////////////////////
        public Person(DiseaseRRPersonInitializer x)
        {
            // Set InitializeOK flag to true;
            initializeOK = true;

            // Set disease states
            haveDiarrhea = x.haveDiarrhea;
            haveAnemia   = x.haveAnemia;
            haveStunting = x.haveStunting;
        }
        public static Person DiseaseRRTablePerson(int lineNum, string inputData)
        {
            DiseaseRRPersonInitializer myDiseaseRRPersonInitializer =
                new DiseaseRRPersonInitializer(inputData, lineNum);

            if (!myDiseaseRRPersonInitializer.initializeOK)
            {
                return(new Person(false));
            }
            return(new Person(myDiseaseRRPersonInitializer));
        }